英雄技能相关字段修改
This commit is contained in:
@@ -62,9 +62,6 @@ export class HeroViewComp extends CCComp {
|
||||
dpw:number=0;
|
||||
pwt:Timer = new Timer(1); //计时器
|
||||
|
||||
sk1:number = 9001;
|
||||
sk2:number = 1001;
|
||||
sk3:number = 1001;
|
||||
akr:number=0; //攻击触发机率
|
||||
uar:number=0; //受伤触发机率
|
||||
dgr:number=0; //闪避触发机率
|
||||
@@ -328,50 +325,50 @@ export class HeroViewComp extends CCComp {
|
||||
* 使用do_skill方法处理触发的技能。
|
||||
*/
|
||||
check_atk_counts() {
|
||||
if (this.atk_count >= this.akc) {
|
||||
this.atk_count = 0
|
||||
// console.log("atk_count 清零:"+this.atk_count);
|
||||
let i = RandomManager.instance.getRandomInt(0,100,3)
|
||||
// console.log("攻击判断: i="+i+":akr="+this.akr);
|
||||
if(i < this.akr){
|
||||
// console.log("攻击触发: i="+i+":akr="+this.akr);
|
||||
// this.BUFFCOMP.max_show()
|
||||
this.do_skill(this.sk3)
|
||||
}
|
||||
}
|
||||
if(this.dodge_count >= this.dgc){
|
||||
this.dodge_count = 0
|
||||
// console.log("dodge_count 清零:"+this.dodge_count);
|
||||
let i = RandomManager.instance.getRandomInt(0,100,3)
|
||||
// console.log("闪避判断: i="+i+":dgr="+this.dgr);
|
||||
if(i < this.dgr){
|
||||
// console.log("闪避触发: i="+i+":dgr="+this.dgr);
|
||||
// this.BUFFCOMP.max_show()
|
||||
this.do_skill(this.sk3)
|
||||
}
|
||||
}
|
||||
if(this.crit_count >= this.crc){
|
||||
this.crit_count = 0
|
||||
// console.log("crit_count 清零:"+this.crit_count);
|
||||
let i = RandomManager.instance.getRandomInt(0,100,3)
|
||||
// console.log("暴击判断: i="+i+":crr="+this.crr);
|
||||
if(i < this.crr){
|
||||
// console.log("暴击触发: i="+i+":crr="+this.crr);
|
||||
// if (this.atk_count >= this.akc) {
|
||||
// this.atk_count = 0
|
||||
// // console.log("atk_count 清零:"+this.atk_count);
|
||||
// let i = RandomManager.instance.getRandomInt(0,100,3)
|
||||
// // console.log("攻击判断: i="+i+":akr="+this.akr);
|
||||
// if(i < this.akr){
|
||||
// // console.log("攻击触发: i="+i+":akr="+this.akr);
|
||||
// // this.BUFFCOMP.max_show()
|
||||
// this.do_skill(this.sk3)
|
||||
// }
|
||||
// }
|
||||
// if(this.dodge_count >= this.dgc){
|
||||
// this.dodge_count = 0
|
||||
// // console.log("dodge_count 清零:"+this.dodge_count);
|
||||
// let i = RandomManager.instance.getRandomInt(0,100,3)
|
||||
// // console.log("闪避判断: i="+i+":dgr="+this.dgr);
|
||||
// if(i < this.dgr){
|
||||
// // console.log("闪避触发: i="+i+":dgr="+this.dgr);
|
||||
// // this.BUFFCOMP.max_show()
|
||||
// this.do_skill(this.sk3)
|
||||
// }
|
||||
// }
|
||||
// if(this.crit_count >= this.crc){
|
||||
// this.crit_count = 0
|
||||
// // console.log("crit_count 清零:"+this.crit_count);
|
||||
// let i = RandomManager.instance.getRandomInt(0,100,3)
|
||||
// // console.log("暴击判断: i="+i+":crr="+this.crr);
|
||||
// if(i < this.crr){
|
||||
// // console.log("暴击触发: i="+i+":crr="+this.crr);
|
||||
|
||||
// this.BUFFCOMP.max_show()
|
||||
this.do_skill(this.sk3)
|
||||
}
|
||||
}
|
||||
if(this.atked_count >= this.uac){
|
||||
this.atked_count = 0
|
||||
let i = RandomManager.instance.getRandomInt(0,100,3)
|
||||
// console.log("受伤判断:i="+i+":akr="+this.uar);
|
||||
if(i < this.uar){
|
||||
// console.log("受伤触发: i="+i+":uar="+this.uar);
|
||||
// this.BUFFCOMP.max_show()
|
||||
this.do_skill(this.sk3)
|
||||
}
|
||||
}
|
||||
// // this.BUFFCOMP.max_show()
|
||||
// this.do_skill(this.sk3)
|
||||
// }
|
||||
// }
|
||||
// if(this.atked_count >= this.uac){
|
||||
// this.atked_count = 0
|
||||
// let i = RandomManager.instance.getRandomInt(0,100,3)
|
||||
// // console.log("受伤判断:i="+i+":akr="+this.uar);
|
||||
// if(i < this.uar){
|
||||
// // console.log("受伤触发: i="+i+":uar="+this.uar);
|
||||
// // this.BUFFCOMP.max_show()
|
||||
// this.do_skill(this.sk3)
|
||||
// }
|
||||
// }
|
||||
}
|
||||
in_atk(dt: number) {
|
||||
if(this.at >= this.cd){
|
||||
@@ -382,9 +379,6 @@ export class HeroViewComp extends CCComp {
|
||||
this.power_add(this.apw)
|
||||
// console.log("cd:"+this.cd);
|
||||
this.as.atk();
|
||||
this.scheduleOnce(()=>{
|
||||
this.shoot_enemy(this.sk1)
|
||||
},0.3)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -393,7 +387,6 @@ export class HeroViewComp extends CCComp {
|
||||
if(this.pw >= this.pwm){
|
||||
this.pw = 0
|
||||
this.BUFFCOMP.max_show()
|
||||
this.do_skill(this.sk2)
|
||||
return true
|
||||
}else{
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user