You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
171 lines
5.4 KiB
171 lines
5.4 KiB
import { ActionSkill, Attack, Control, PassiveSkill, PrePassiveSkill, StartPassiveSkill, SufPassiveSkill } from './base'; |
|
import { createt } from '../i18n'; |
|
import { replace, BattleRole } from '@/tool'; |
|
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'; |
|
rate: number = 10; |
|
percent: number = 1000; |
|
last: number = 1; |
|
desc(): string { |
|
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; |
|
} |
|
takeEffect(owner: BattleRole, target: BattleRole): void { |
|
const additional = Math.ceil((owner.atk * this.percent) / 100); |
|
target.addHp(-1 * additional); |
|
target.putBuff(new ControlBuff(this.name, this.last)); |
|
owner.extraDmgLog(replace(st('iceBlade.2'), [additional, t(target.type), this.last])); |
|
} |
|
} |
|
//见红 |
|
export class SeeRed extends ActionSkill { |
|
name: string = 'seeRed'; |
|
layer: number = 5; |
|
cd: number = 5; |
|
last: number = 5; |
|
desc(): string { |
|
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.extraDmgLog(replace(st('user'), [t(owner.type), st(this.name + '.0')]) + replace(st('seeRed.1'), [this.layer, this.last])); |
|
} |
|
} |
|
//鳍刺 |
|
export class QiCi extends SufPassiveSkill { |
|
name: string = 'qici'; |
|
rate: number = 30; |
|
layer: number = 3; |
|
last: number = 4; |
|
desc(): string { |
|
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; |
|
} |
|
takeEffect(owner: BattleRole, target: BattleRole): void { |
|
const liuxue = new LiuXue(this.layer, this.last); |
|
target.putBuff(liuxue); |
|
owner.extraDmgLog(replace(st('qici.2'), [t(target.type), this.layer, this.last])); |
|
} |
|
} |
|
//暴虐 |
|
export class BaoNue extends SufPassiveSkill { |
|
name: string = 'baonue'; |
|
rate: number = 30; |
|
last: number = 2; |
|
desc(): string { |
|
return replace(st('baonue.1'), [this.rate, this.last]); |
|
} |
|
trigger(owner: BattleRole, target: BattleRole): boolean { |
|
return owner.dmg > 0 && Math.random() < this.rate / 100; |
|
} |
|
takeEffect(owner: BattleRole, target: BattleRole): void { |
|
const liuxue = new LiuXue(9999, this.last); |
|
target.putBuff(liuxue); |
|
owner.extraDmgLog(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.extraDmgLog(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.extraDmgLog(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.dmgReduc, 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 = 10; |
|
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; |
|
} |
|
} |
|
}
|
|
|