|
|
|
@ -1,8 +1,10 @@
@@ -1,8 +1,10 @@
|
|
|
|
|
import { ActionSkill, Attack, PassiveSkill, SufPassiveSkill } from './base'; |
|
|
|
|
import i18n from '../i18n'; |
|
|
|
|
import { ActionSkill, Attack, Control, PassiveSkill, PrePassiveSkill, StartPassiveSkill, SufPassiveSkill } from './base'; |
|
|
|
|
import { createt } from '../i18n'; |
|
|
|
|
import { replace, BattleRole } from '@/tool'; |
|
|
|
|
import { ControlAbnormal, LiuXue } from './buff'; |
|
|
|
|
const { t } = i18n; |
|
|
|
|
import { BaseAtkPercentBuff, ControlBuff, CritDmgBuff, DmgPercentBuff, DmgReducBuff, KuiLan, LiuXue } from './buff'; |
|
|
|
|
|
|
|
|
|
const t = createt(''); |
|
|
|
|
const st = createt('skill.'); |
|
|
|
|
//冰刃
|
|
|
|
|
export class IceBlade extends SufPassiveSkill { |
|
|
|
|
name: string = 'iceBlade'; |
|
|
|
@ -10,7 +12,7 @@ export class IceBlade extends SufPassiveSkill {
@@ -10,7 +12,7 @@ export class IceBlade extends SufPassiveSkill {
|
|
|
|
|
percent: number = 1000; |
|
|
|
|
last: number = 1; |
|
|
|
|
desc(): string { |
|
|
|
|
return replace(t('skill.iceBlade.1'), [this.rate, this.percent, this.last]); |
|
|
|
|
return replace(st('iceBlade.1'), [this.rate, this.percent, this.last]); |
|
|
|
|
} |
|
|
|
|
trigger(owner: BattleRole, target: BattleRole): boolean { |
|
|
|
|
return owner.crit && Math.random() < this.rate / 100; |
|
|
|
@ -18,8 +20,8 @@ export class IceBlade extends SufPassiveSkill {
@@ -18,8 +20,8 @@ export class IceBlade extends SufPassiveSkill {
|
|
|
|
|
takeEffect(owner: BattleRole, target: BattleRole): void { |
|
|
|
|
const additional = Math.ceil((owner.atk * this.percent) / 100); |
|
|
|
|
target.addHp(-1 * additional); |
|
|
|
|
target.putBuff(new ControlAbnormal(this.name, this.last)); |
|
|
|
|
owner.battleLog(replace(t('skill.iceBlade.2'), [additional, t(target.type), this.last])); |
|
|
|
|
target.putBuff(new ControlBuff(this.name, this.last)); |
|
|
|
|
owner.battleLog(replace(st('iceBlade.2'), [additional, t(target.type), this.last])); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//见红
|
|
|
|
@ -29,13 +31,13 @@ export class SeeRed extends ActionSkill {
@@ -29,13 +31,13 @@ export class SeeRed extends ActionSkill {
|
|
|
|
|
cd: number = 5; |
|
|
|
|
last: number = 5; |
|
|
|
|
desc(): string { |
|
|
|
|
return replace(t('skill.seeRed.1'), [this.layer, this.last]) + replace(t('skill.seeRed.2'), [this.cd]); |
|
|
|
|
return replace(st('seeRed.1'), [this.layer, this.last]) + replace(st('seeRed.2'), [this.cd]); |
|
|
|
|
} |
|
|
|
|
use(owner: BattleRole, target: BattleRole): void { |
|
|
|
|
owner.skillPercent = 0; |
|
|
|
|
const liuxue = new LiuXue(this.layer, this.last); |
|
|
|
|
target.putBuff(liuxue); |
|
|
|
|
owner.battleLog(replace(t('skill.user'), [t(owner.type), t('skill.' + this.name + '.0')]) + replace(t('skill.seeRed.1'), [this.layer, this.last])); |
|
|
|
|
owner.battleLog(replace(st('user'), [t(owner.type), st(this.name + '.0')]) + replace(st('seeRed.1'), [this.layer, this.last])); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//鳍刺
|
|
|
|
@ -45,7 +47,7 @@ export class QiCi extends SufPassiveSkill {
@@ -45,7 +47,7 @@ export class QiCi extends SufPassiveSkill {
|
|
|
|
|
layer: number = 3; |
|
|
|
|
last: number = 4; |
|
|
|
|
desc(): string { |
|
|
|
|
return replace(t('skill.qici.1'), [this.rate, this.layer, this.last]); |
|
|
|
|
return replace(st('qici.1'), [this.rate, this.layer, this.last]); |
|
|
|
|
} |
|
|
|
|
trigger(owner: BattleRole, target: BattleRole): boolean { |
|
|
|
|
return owner.dmg > 0 && Math.random() < this.rate / 100; |
|
|
|
@ -53,7 +55,7 @@ export class QiCi extends SufPassiveSkill {
@@ -53,7 +55,7 @@ export class QiCi extends SufPassiveSkill {
|
|
|
|
|
takeEffect(owner: BattleRole, target: BattleRole): void { |
|
|
|
|
const liuxue = new LiuXue(this.layer, this.last); |
|
|
|
|
target.putBuff(liuxue); |
|
|
|
|
owner.battleLog(replace(t('skill.qici.2'), [t(target.type), this.layer, this.last])); |
|
|
|
|
owner.battleLog(replace(st('qici.2'), [t(target.type), this.layer, this.last])); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//暴虐
|
|
|
|
@ -62,7 +64,7 @@ export class BaoNue extends SufPassiveSkill {
@@ -62,7 +64,7 @@ export class BaoNue extends SufPassiveSkill {
|
|
|
|
|
rate: number = 30; |
|
|
|
|
last: number = 2; |
|
|
|
|
desc(): string { |
|
|
|
|
return replace(t('skill.baonue.1'), [this.rate, this.last]); |
|
|
|
|
return replace(st('baonue.1'), [this.rate, this.last]); |
|
|
|
|
} |
|
|
|
|
trigger(owner: BattleRole, target: BattleRole): boolean { |
|
|
|
|
return owner.dmg > 0 && Math.random() < this.rate / 100; |
|
|
|
@ -70,6 +72,100 @@ export class BaoNue extends SufPassiveSkill {
@@ -70,6 +72,100 @@ export class BaoNue extends SufPassiveSkill {
|
|
|
|
|
takeEffect(owner: BattleRole, target: BattleRole): void { |
|
|
|
|
const liuxue = new LiuXue(9999, this.last); |
|
|
|
|
target.putBuff(liuxue); |
|
|
|
|
owner.battleLog(replace(t('skill.baonue.2'), [t(target.type), this.last])); |
|
|
|
|
owner.battleLog(replace(st('baonue.2'), [t(target.type), this.last])); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//扎心
|
|
|
|
|
export class ZhaXin extends StartPassiveSkill { |
|
|
|
|
name: string = 'zhaxin'; |
|
|
|
|
critDmg: number = 200; |
|
|
|
|
desc(): string { |
|
|
|
|
return replace(st('zhaxin.1'), [this.critDmg]); |
|
|
|
|
} |
|
|
|
|
takeEffect(owner: BattleRole, target: BattleRole): void { |
|
|
|
|
const zhaxin = new CritDmgBuff(this.name, this.critDmg, 9999); |
|
|
|
|
owner.putBuff(zhaxin); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//鳌之毒
|
|
|
|
|
export class AoZhiDu extends SufPassiveSkill { |
|
|
|
|
name: string = 'aozhidu'; |
|
|
|
|
last: number = 2; |
|
|
|
|
desc(): string { |
|
|
|
|
return replace(st('aozhidu.1'), [this.last]); |
|
|
|
|
} |
|
|
|
|
trigger(owner: BattleRole, target: BattleRole): boolean { |
|
|
|
|
return owner.dmg > 0; |
|
|
|
|
} |
|
|
|
|
takeEffect(owner: BattleRole, target: BattleRole): void { |
|
|
|
|
const aozhidu = new KuiLan('kuilan', this.last); |
|
|
|
|
target.putBuff(aozhidu); |
|
|
|
|
owner.battleLog(replace(st('aozhidu.2'), [t(target.type), this.last])); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//十九叉
|
|
|
|
|
export class ShiJiuCha extends SufPassiveSkill { |
|
|
|
|
name: string = 'shijiucha'; |
|
|
|
|
times: number = 9; |
|
|
|
|
cout: number = 0; |
|
|
|
|
desc(): string { |
|
|
|
|
return replace(st('shijiucha.1'), [this.times]); |
|
|
|
|
} |
|
|
|
|
trigger(owner: BattleRole, target: BattleRole): boolean { |
|
|
|
|
return owner.dmg > 0; |
|
|
|
|
} |
|
|
|
|
takeEffect(owner: BattleRole, target: BattleRole): void { |
|
|
|
|
this.cout++; |
|
|
|
|
if (this.cout >= 10) { |
|
|
|
|
this.cout = 0; |
|
|
|
|
const dmg = owner.dmg * this.times; |
|
|
|
|
owner.battleLog(replace(st('shijiucha.2'), [t(owner.type), dmg])); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//剑气动四方
|
|
|
|
|
export class JianQiDongSiFang extends StartPassiveSkill { |
|
|
|
|
name: string = 'jianqidongsifang'; |
|
|
|
|
dmgPercent: number = 50; |
|
|
|
|
dmgReduc: number = -20; |
|
|
|
|
desc(): string { |
|
|
|
|
return replace(st('jianqidongsifang.1'), [this.dmgPercent, this.dmgReduc * -1]); |
|
|
|
|
} |
|
|
|
|
takeEffect(owner: BattleRole, target: BattleRole): void { |
|
|
|
|
const buff1 = new DmgPercentBuff(this.name, this.dmgPercent, 9999); |
|
|
|
|
owner.putBuff(buff1); |
|
|
|
|
const buff2 = new DmgReducBuff(this.name, this.dmgPercent, 9999); |
|
|
|
|
owner.putBuff(buff2); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//暴风雪
|
|
|
|
|
export class BaoFengXue extends Control { |
|
|
|
|
name: string = 'baofengxue'; |
|
|
|
|
cd: number = 10; |
|
|
|
|
last: number = 3; |
|
|
|
|
rate: number = 100; |
|
|
|
|
bossRate: number = 65; |
|
|
|
|
desc(): string { |
|
|
|
|
return replace(st('baofengxue.1'), [this.last, this.cd, this.bossRate]); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 波动杀意
|
|
|
|
|
export class BoDongShaYi extends PrePassiveSkill { |
|
|
|
|
name: string = 'bodongshayi'; |
|
|
|
|
perent: number = 6; |
|
|
|
|
maxLayer: number = 15; |
|
|
|
|
desc(): string { |
|
|
|
|
return replace(st('bodongshayi.1'), [this.perent, this.maxLayer]); |
|
|
|
|
} |
|
|
|
|
trigger(owner: BattleRole, target: BattleRole): boolean { |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
takeEffect(owner: BattleRole, target: BattleRole): void { |
|
|
|
|
const shayi: any = owner.attackBuff.get('shayi'); |
|
|
|
|
if (shayi) { |
|
|
|
|
shayi.percent = this.perent; |
|
|
|
|
shayi.maxLayer = this.maxLayer; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|