新增莱特伤害计算等

This commit is contained in:
UCPr 2025-01-18 01:52:10 +08:00
parent cecc33b24d
commit 85d368619f
7 changed files with 123 additions and 19 deletions

View file

@ -222,13 +222,6 @@ export class BuffManager {
return buffs
}
/**
* buff列表
*/
forEach(fnc: (buff: buff, index: number) => void) {
return this.buffs.forEach(fnc)
}
/**
* buff
*/
@ -253,6 +246,16 @@ export class BuffManager {
return this._filter(this.buffs, param, valueOcalc)
}
/** 遍历buff列表 */
forEach(fnc: (buff: buff, index: number) => void) {
return this.buffs.forEach(fnc)
}
/** 查找指定buff */
find<T extends keyof buff>(type: T, value: buff[T]) {
return this.buffs.find(buff => buff[type] === value)
}
operator<T extends keyof buff>(type: T, value: buff[T], fnc: (buff: buff) => void) {
this.forEach(buff => {
if (buff[type] === value) {