局内技能 ui + 局内英雄卡片
This commit is contained in:
@@ -252,8 +252,12 @@ export class HeroViewComp extends CCComp {
|
||||
let pos =v3(-999,this.node.position.y)
|
||||
if(this.box_group == BoxSet.MONSTER){
|
||||
pos =v3(999,this.node.position.y)
|
||||
smc.vmdata.mission.mdead +=1
|
||||
}else{
|
||||
smc.vmdata.mission.dead +=1
|
||||
}
|
||||
this.node.setPosition(pos)
|
||||
|
||||
}
|
||||
//是否在墓地
|
||||
in_grave(){
|
||||
@@ -359,7 +363,11 @@ export class HeroViewComp extends CCComp {
|
||||
//暴击判断
|
||||
check_crit(){
|
||||
let i = RandomManager.instance.getRandomInt(0,100,3)
|
||||
if(i < this.crit){
|
||||
let crit=this.crit+smc.vmdata.mission.crit
|
||||
if(this.box_group == BoxSet.MONSTER){
|
||||
crit = this.crit+smc.vmdata.mission.mcrit
|
||||
}
|
||||
if(i < crit){
|
||||
this.tooltip(5,"*会心一击*");
|
||||
this.crit_count += 1
|
||||
this.exp_add(this.cexp) // 暴击经验
|
||||
@@ -372,8 +380,12 @@ export class HeroViewComp extends CCComp {
|
||||
//闪避判断
|
||||
check_dodge(){
|
||||
let i = RandomManager.instance.getRandomInt(0,100,3)
|
||||
if(i < this.dodge){
|
||||
console.log("闪避触发: i="+i+":dodge="+this.dodge);
|
||||
let dodge=this.dodge+smc.vmdata.mission.dodge;
|
||||
if(this.box_group == BoxSet.MONSTER){
|
||||
dodge = this.dodge+smc.vmdata.mission.mdodge;
|
||||
}
|
||||
if(i < dodge){
|
||||
// console.log("闪避触发: i="+i+":dodge="+dodge);
|
||||
this.tooltip(5,"闪避");
|
||||
this.exp_add(this.doexp) // 闪避经验
|
||||
this.power_add(this.dopw)
|
||||
|
||||
Reference in New Issue
Block a user