一个全随机的刷装备小游戏
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.

49 lines
1.6 KiB

import { SufPassiveSkill, PrePassiveSkill, CounterSkill, StartPassiveSkill } from './base';
import i18n from '../i18n';
import { BattleRole, replace } from '@/tool';
import { KBLYDebuff, LingGanBuff } from './buff';
const { t } = i18n;
//恐怖领域
export class KongBuLingYu extends StartPassiveSkill {
name: string = 'kongbulingyu';
defReduc: number = 500;
desc(): string {
return replace(t('skill.kongbulingyu.1'), [this.defReduc]);
}
takeEffect(owner: BattleRole, target: BattleRole): void {
const buff = new KBLYDebuff(this.name, this.defReduc, 9999);
target.putBuff(buff);
}
}
//白骨夫人的庇护
export class FuRenBiHu extends PrePassiveSkill {
name: string = 'furenbihu';
cd: number = 999;
hpPercent: number = 30;
last: number = 3;
dmgReduc: number = 100;
desc(): string {
return replace(t('skill.furenbihu.1'), [this.hpPercent, this.dmgReduc, this.last]);
}
trigger(owner: BattleRole, target: BattleRole): boolean {
return owner.attr.curHp / owner.attr.hp < this.hpPercent / 100;
}
takeEffect(owner: BattleRole, target: BattleRole): void {
owner.extraAttr.dmgReduc = this.dmgReduc;
owner.battleLog(replace(t('skill.furenbihu.2'), [this.hpPercent, this.dmgReduc]));
}
}
//灵感
export class LingGan extends StartPassiveSkill {
name: string = 'linggan';
percent: number = 1.5;
desc(): string {
return replace(t('skill.linggan.1'), [this.percent]);
}
takeEffect(owner: BattleRole, target: BattleRole): void {
const linggan = new LingGanBuff(this.name, this.percent, 9999);
owner.putBuff(linggan);
}
}