mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-06 00:12:16 +02:00
switched to randSeedItem
This commit is contained in:
parent
e65ec66565
commit
ee99d0a323
@ -1011,20 +1011,14 @@ export class StatusEffectAttr extends MoveEffectAttr {
|
|||||||
|
|
||||||
export class MultiStatusEffectAttr extends StatusEffectAttr {
|
export class MultiStatusEffectAttr extends StatusEffectAttr {
|
||||||
public effects: StatusEffect[];
|
public effects: StatusEffect[];
|
||||||
public cureTurn: integer;
|
|
||||||
public overrideStatus: boolean;
|
|
||||||
|
|
||||||
constructor(effects: StatusEffect[], selfTarget?: boolean, cureTurn?: integer, overrideStatus?: boolean) {
|
constructor(effects: StatusEffect[], selfTarget?: boolean, cureTurn?: integer, overrideStatus?: boolean) {
|
||||||
super(effects[0], selfTarget, cureTurn, overrideStatus);
|
super(effects[0], selfTarget, cureTurn, overrideStatus);
|
||||||
|
|
||||||
this.effects = effects;
|
this.effects = effects;
|
||||||
this.cureTurn = cureTurn;
|
|
||||||
this.overrideStatus = !!overrideStatus;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
||||||
const statusIndex = Math.floor((Utils.randSeedInt(100)*this.effects.length-1)/100)
|
this.effect = Utils.randSeedItem(this.effects);
|
||||||
this.effect = this.effects[statusIndex] as StatusEffect;
|
|
||||||
const result = super.apply(user, target, move, args);
|
const result = super.apply(user, target, move, args);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user