|
|
|
@ -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 { 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'; |
|
|
|
@ -100,13 +109,13 @@ export class AoZhiDu extends SufPassiveSkill {
@@ -100,13 +109,13 @@ export class AoZhiDu extends SufPassiveSkill {
|
|
|
|
|
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])); |
|
|
|
|
owner.extraDmgLog(replace(st('aozhidu.2'), [t(target.type), this.last, aozhidu.layer])); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//十九叉
|
|
|
|
|
export class ShiJiuCha extends SufPassiveSkill { |
|
|
|
|
name: string = 'shijiucha'; |
|
|
|
|
times: number = 9; |
|
|
|
|
times: number = 19; |
|
|
|
|
cout: number = 0; |
|
|
|
|
desc(): string { |
|
|
|
|
return replace(st('shijiucha.1'), [this.times]); |
|
|
|
@ -153,10 +162,10 @@ export class BaoFengXue extends Control {
@@ -153,10 +162,10 @@ export class BaoFengXue extends Control {
|
|
|
|
|
// 波动杀意
|
|
|
|
|
export class BoDongShaYi extends PrePassiveSkill { |
|
|
|
|
name: string = 'bodongshayi'; |
|
|
|
|
perent: number = 6; |
|
|
|
|
precent: number = 10; |
|
|
|
|
maxLayer: number = 15; |
|
|
|
|
desc(): string { |
|
|
|
|
return replace(st('bodongshayi.1'), [this.perent, this.maxLayer]); |
|
|
|
|
return replace(st('bodongshayi.1'), [this.precent, this.maxLayer]); |
|
|
|
|
} |
|
|
|
|
trigger(owner: BattleRole, target: BattleRole): boolean { |
|
|
|
|
return true; |
|
|
|
@ -164,8 +173,93 @@ export class BoDongShaYi extends PrePassiveSkill {
@@ -164,8 +173,93 @@ export class BoDongShaYi extends PrePassiveSkill {
|
|
|
|
|
takeEffect(owner: BattleRole, target: BattleRole): void { |
|
|
|
|
const shayi: any = owner.attackBuff.get('shayi'); |
|
|
|
|
if (shayi) { |
|
|
|
|
shayi.percent = this.perent; |
|
|
|
|
shayi.percent = this.precent; |
|
|
|
|
shayi.maxLayer = this.maxLayer; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
// 利刃咒
|
|
|
|
|
export class LiRenZhou extends SufPassiveSkill { |
|
|
|
|
name: string = 'lirenzhou'; |
|
|
|
|
precent: number = 3; |
|
|
|
|
layer: number[] = [1, 3]; |
|
|
|
|
maxLayer: number = 14; |
|
|
|
|
desc(): string { |
|
|
|
|
return replace(st('lirenzhou.1'), [this.layer[0], this.layer[1], this.maxLayer, this.precent]); |
|
|
|
|
} |
|
|
|
|
trigger(owner: BattleRole, target: BattleRole): boolean { |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
takeEffect(owner: BattleRole, target: BattleRole): void { |
|
|
|
|
const lirenzhou = new DmgPercentBuff(this.name, this.precent, 9999, this.maxLayer); |
|
|
|
|
const layer = this.layer[0] + Math.floor(Math.random() * (this.layer[1] - this.layer[0] + 1)); |
|
|
|
|
lirenzhou.layer = layer; |
|
|
|
|
owner.putBuff(lirenzhou); |
|
|
|
|
owner.atteckLog(replace(st('lirenzhou.2'), [layer, lirenzhou.layer])); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
// 刀刃风暴
|
|
|
|
|
export class DaoRenFengBao extends Attack { |
|
|
|
|
order: number = 11; |
|
|
|
|
name: string = 'daorenfengbao'; |
|
|
|
|
dmgPrecent: number = 80; |
|
|
|
|
desc(): string { |
|
|
|
|
return replace(st('daorenfengbao.1'), [this.dmgPrecent]); |
|
|
|
|
} |
|
|
|
|
beforeAtk(owner: BattleRole, target: BattleRole): void { |
|
|
|
|
if (owner.action) { |
|
|
|
|
return; |
|
|
|
|
} else { |
|
|
|
|
const lirenzhou = owner.attackBuff.get('lirenzhou'); |
|
|
|
|
if (lirenzhou && lirenzhou.layer == lirenzhou.maxLayer) { |
|
|
|
|
owner.action = this; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
use(owner: BattleRole, target: BattleRole): void { |
|
|
|
|
const lirenzhou: any = owner.attackBuff.get('lirenzhou'); |
|
|
|
|
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])); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
//失恋
|
|
|
|
|
export class ShiLian extends StartPassiveSkill { |
|
|
|
|
name: string = 'shilian'; |
|
|
|
|
dmgReduce: number = -100; |
|
|
|
|
desc(): string { |
|
|
|
|
return replace(st('shilian.1'), [-1 * this.dmgReduce]); |
|
|
|
|
} |
|
|
|
|
takeEffect(owner: BattleRole, target: BattleRole): void { |
|
|
|
|
const shilian = new DmgReducBuff(this.name, this.dmgReduce, 9999); |
|
|
|
|
owner.putBuff(shilian); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|