|
|
|
@ -1,14 +1,14 @@
@@ -1,14 +1,14 @@
|
|
|
|
|
import { ActionSkill, Attack, Control, PassiveSkill, PrePassiveSkill, StartPassiveSkill, SufPassiveSkill } from './base'; |
|
|
|
|
import { ActionSkill, Attack, Control, PrePassiveSkill, StartPassiveSkill, SufPassiveSkill } from './base'; |
|
|
|
|
import { createt } from '../i18n'; |
|
|
|
|
import { replace, BattleRole } from '@/tool'; |
|
|
|
|
import { AttackedBuff, BaseAtkPercentBuff, ControlBuff, CritDmgBuff, DmgPercentBuff, DmgReducBuff, KuiLan, LiuXue } from './buff'; |
|
|
|
|
import { ControlBuff, CritDmgBuff, DmgPercentBuff, DmgReducBuff, GanDian, KuiLan, LiuXue } from './buff'; |
|
|
|
|
|
|
|
|
|
const t = createt(''); |
|
|
|
|
const st = createt('skill.'); |
|
|
|
|
//冰刃
|
|
|
|
|
export class IceBlade extends SufPassiveSkill { |
|
|
|
|
name: string = 'iceBlade'; |
|
|
|
|
rate: number = 10; |
|
|
|
|
rate: number = 15; |
|
|
|
|
percent: number = 1000; |
|
|
|
|
last: number = 1; |
|
|
|
|
desc(): string { |
|
|
|
@ -24,6 +24,15 @@ export class IceBlade extends SufPassiveSkill {
@@ -24,6 +24,15 @@ export class IceBlade extends SufPassiveSkill {
|
|
|
|
|
owner.extraDmgLog(replace(st('iceBlade.2'), [additional, t(target.type), this.last])); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
// 求爱
|
|
|
|
|
export class QiuAi extends Attack { |
|
|
|
|
name: string = 'qiuai'; |
|
|
|
|
order: number = 998; |
|
|
|
|
percent: number = 240; |
|
|
|
|
desc(): string { |
|
|
|
|
return replace(st('qiuai.1'), [this.percent]); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//见红
|
|
|
|
|
export class SeeRed extends ActionSkill { |
|
|
|
|
name: string = 'seeRed'; |
|
|
|
@ -191,12 +200,11 @@ export class LiRenZhou extends SufPassiveSkill {
@@ -191,12 +200,11 @@ export class LiRenZhou extends SufPassiveSkill {
|
|
|
|
|
} |
|
|
|
|
// 刀刃风暴
|
|
|
|
|
export class DaoRenFengBao extends Attack { |
|
|
|
|
order: number = 101; |
|
|
|
|
order: number = 11; |
|
|
|
|
name: string = 'daorenfengbao'; |
|
|
|
|
dmgPrecent: number = 80; |
|
|
|
|
cd: number = 1; |
|
|
|
|
desc(): string { |
|
|
|
|
return replace(st('daorenfengbao.1'), [this.precent]); |
|
|
|
|
return replace(st('daorenfengbao.1'), [this.dmgPrecent]); |
|
|
|
|
} |
|
|
|
|
beforeAtk(owner: BattleRole, target: BattleRole): void { |
|
|
|
|
if (owner.action) { |
|
|
|
@ -210,8 +218,36 @@ export class DaoRenFengBao extends Attack {
@@ -210,8 +218,36 @@ export class DaoRenFengBao extends Attack {
|
|
|
|
|
} |
|
|
|
|
use(owner: BattleRole, target: BattleRole): void { |
|
|
|
|
const lirenzhou: any = owner.attackBuff.get('lirenzhou'); |
|
|
|
|
this.precent = lirenzhou.layer * this.dmgPrecent; |
|
|
|
|
this.percent = lirenzhou.layer * this.dmgPrecent; |
|
|
|
|
super.use(owner, target); |
|
|
|
|
lirenzhou.layer = 0; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//流萤
|
|
|
|
|
export class LiuYing extends SufPassiveSkill { |
|
|
|
|
name: string = 'liuying'; |
|
|
|
|
rate: number = 60; |
|
|
|
|
layer: number = 1; |
|
|
|
|
maxLayer: number = 3; |
|
|
|
|
percent: number = 600; |
|
|
|
|
last: number = 3; |
|
|
|
|
curLayer: number = 0; |
|
|
|
|
desc(): string { |
|
|
|
|
return replace(st('liuying.1'), [this.rate, this.layer, this.maxLayer, this.percent, this.last]); |
|
|
|
|
} |
|
|
|
|
trigger(owner: BattleRole, target: BattleRole): boolean { |
|
|
|
|
return owner.dmg > 0 && Math.random() < this.rate / 100; |
|
|
|
|
} |
|
|
|
|
takeEffect(owner: BattleRole, target: BattleRole): void { |
|
|
|
|
this.curLayer += this.layer; |
|
|
|
|
owner.extraDmgLog(replace(st('liuying.2'), [t(owner.type), this.layer, this.maxLayer, this.curLayer])); |
|
|
|
|
if (this.curLayer >= this.maxLayer) { |
|
|
|
|
const additional = Math.ceil((owner.atk * this.percent) / 100); |
|
|
|
|
target.addHp(-1 * additional); |
|
|
|
|
const gandian = new GanDian(this.last); |
|
|
|
|
target.putBuff(gandian); |
|
|
|
|
this.curLayer = 0; |
|
|
|
|
owner.extraDmgLog(replace(st('liuying.3'), [t(owner.type), additional, this.last])); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|