mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-06 16:32:16 +02:00
feature/add-variable-power-knock-off
This commit is contained in:
parent
6011794732
commit
b9fda10c21
@ -2018,6 +2018,18 @@ export class PresentPowerAttr extends VariablePowerAttr {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export class KnockOffPowerAttr extends VariablePowerAttr {
|
||||||
|
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
||||||
|
if(target.getHeldItems().length > 0){
|
||||||
|
(args[0] as Utils.NumberHolder).value *= 1.5;
|
||||||
|
console.log(args[0])
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
console.log(args[0])
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export class VariableAtkAttr extends MoveAttr {
|
export class VariableAtkAttr extends MoveAttr {
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
@ -4580,6 +4592,7 @@ export function initMoves() {
|
|||||||
.attr(AddBattlerTagAttr, BattlerTagType.DROWSY, false, true)
|
.attr(AddBattlerTagAttr, BattlerTagType.DROWSY, false, true)
|
||||||
.condition((user, target, move) => !target.status),
|
.condition((user, target, move) => !target.status),
|
||||||
new AttackMove(Moves.KNOCK_OFF, Type.DARK, MoveCategory.PHYSICAL, 65, 100, 20, -1, 0, 3)
|
new AttackMove(Moves.KNOCK_OFF, Type.DARK, MoveCategory.PHYSICAL, 65, 100, 20, -1, 0, 3)
|
||||||
|
.attr(KnockOffPowerAttr)
|
||||||
.partial(),
|
.partial(),
|
||||||
new AttackMove(Moves.ENDEAVOR, Type.NORMAL, MoveCategory.PHYSICAL, -1, 100, 5, -1, 0, 3)
|
new AttackMove(Moves.ENDEAVOR, Type.NORMAL, MoveCategory.PHYSICAL, -1, 100, 5, -1, 0, 3)
|
||||||
.attr(MatchHpAttr)
|
.attr(MatchHpAttr)
|
||||||
|
Loading…
Reference in New Issue
Block a user