mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2024-11-26 00:36:25 +00:00
moves: (mostly) fix parting shot stack bug (#495)
This commit is contained in:
parent
408b189966
commit
8e606139fa
@ -1463,8 +1463,8 @@ export class StatChangeAttr extends MoveEffectAttr {
|
|||||||
private condition: MoveConditionFunc;
|
private condition: MoveConditionFunc;
|
||||||
private showMessage: boolean;
|
private showMessage: boolean;
|
||||||
|
|
||||||
constructor(stats: BattleStat | BattleStat[], levels: integer, selfTarget?: boolean, condition?: MoveConditionFunc, showMessage: boolean = true, firstHitOnly: boolean = false) {
|
constructor(stats: BattleStat | BattleStat[], levels: integer, selfTarget?: boolean, condition?: MoveConditionFunc, showMessage: boolean = true, firstHitOnly: boolean = false, moveEffectTrigger: MoveEffectTrigger = MoveEffectTrigger.HIT) {
|
||||||
super(selfTarget, MoveEffectTrigger.HIT, firstHitOnly);
|
super(selfTarget, moveEffectTrigger, firstHitOnly);
|
||||||
this.stats = typeof(stats) === 'number'
|
this.stats = typeof(stats) === 'number'
|
||||||
? [ stats as BattleStat ]
|
? [ stats as BattleStat ]
|
||||||
: stats as BattleStat[];
|
: stats as BattleStat[];
|
||||||
@ -5497,7 +5497,7 @@ export function initMoves() {
|
|||||||
.soundBased()
|
.soundBased()
|
||||||
.target(MoveTarget.ALL_NEAR_ENEMIES),
|
.target(MoveTarget.ALL_NEAR_ENEMIES),
|
||||||
new StatusMove(Moves.PARTING_SHOT, Type.DARK, 100, 20, 100, 0, 6)
|
new StatusMove(Moves.PARTING_SHOT, Type.DARK, 100, 20, 100, 0, 6)
|
||||||
.attr(StatChangeAttr, [ BattleStat.ATK, BattleStat.SPATK ], -1)
|
.attr(StatChangeAttr, [ BattleStat.ATK, BattleStat.SPATK ], -1, false, null, true, true, MoveEffectTrigger.PRE_APPLY)
|
||||||
.attr(ForceSwitchOutAttr, true, false)
|
.attr(ForceSwitchOutAttr, true, false)
|
||||||
.soundBased(),
|
.soundBased(),
|
||||||
new StatusMove(Moves.TOPSY_TURVY, Type.DARK, -1, 20, -1, 0, 6)
|
new StatusMove(Moves.TOPSY_TURVY, Type.DARK, -1, 20, -1, 0, 6)
|
||||||
|
Loading…
Reference in New Issue
Block a user