奖励完善
This commit is contained in:
@@ -153,7 +153,7 @@ export class HeroViewComp extends CCComp {
|
||||
if(selfCollider.group != otherCollider.group){
|
||||
let skill = otherCollider.node.getComponent(SkillCom)!;
|
||||
// console.log('onPostSolve',skill);
|
||||
this.in_atked();
|
||||
|
||||
if(this.hp <= 0 ){
|
||||
return
|
||||
}
|
||||
@@ -166,6 +166,7 @@ export class HeroViewComp extends CCComp {
|
||||
return
|
||||
}
|
||||
if(this.check_dodge()) return
|
||||
this.in_atked();
|
||||
let l_hp=(skill.ap-this.def)*-1
|
||||
if(skill.is_crit){
|
||||
l_hp = l_hp * (150+skill.crit_add)/100
|
||||
@@ -356,7 +357,8 @@ export class HeroViewComp extends CCComp {
|
||||
check_dodge(){
|
||||
let i = RandomManager.instance.getRandomInt(0,100,3)
|
||||
if(i < this.dodge){
|
||||
this.tooltip(5,"/闪避/");
|
||||
console.log("闪避触发: i="+i+":dodge="+this.dodge);
|
||||
this.tooltip(5,"闪避");
|
||||
this.dodge_count += 1
|
||||
return true
|
||||
}else{
|
||||
@@ -454,7 +456,7 @@ export class HeroViewComp extends CCComp {
|
||||
}
|
||||
//使用max_skill
|
||||
handle_skill(skill:number){
|
||||
this.as.atk()
|
||||
this.as.max()
|
||||
this.at = 0;
|
||||
this.tooltip(3,smc.skills[skill].name,skill);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user