mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-06 16:32:16 +02:00
Merge branch 'pr/221'
This commit is contained in:
commit
6e26025a1c
@ -3750,6 +3750,19 @@ export class FirstMoveCondition extends MoveCondition {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export class hitsSameTypeAttr extends VariableMoveTypeMultiplierAttr {
|
||||||
|
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
||||||
|
const multiplier = args[0] as Utils.NumberHolder;
|
||||||
|
if (!user.getTypes().some(type => target.getTypes().includes(type))){
|
||||||
|
multiplier.value = 0;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const unknownTypeCondition: MoveConditionFunc = (user, target, move) => !user.getTypes().includes(Type.UNKNOWN);
|
||||||
|
|
||||||
export type MoveTargetSet = {
|
export type MoveTargetSet = {
|
||||||
targets: BattlerIndex[];
|
targets: BattlerIndex[];
|
||||||
multiple: boolean;
|
multiple: boolean;
|
||||||
@ -5133,7 +5146,8 @@ export function initMoves() {
|
|||||||
.condition(failOnMaxCondition),
|
.condition(failOnMaxCondition),
|
||||||
new AttackMove(Moves.SYNCHRONOISE, Type.PSYCHIC, MoveCategory.SPECIAL, 120, 100, 10, -1, 0, 5)
|
new AttackMove(Moves.SYNCHRONOISE, Type.PSYCHIC, MoveCategory.SPECIAL, 120, 100, 10, -1, 0, 5)
|
||||||
.target(MoveTarget.ALL_NEAR_OTHERS)
|
.target(MoveTarget.ALL_NEAR_OTHERS)
|
||||||
.partial(),
|
.condition(unknownTypeCondition)
|
||||||
|
.attr(hitsSameTypeAttr),
|
||||||
new AttackMove(Moves.ELECTRO_BALL, Type.ELECTRIC, MoveCategory.SPECIAL, -1, 100, 10, -1, 0, 5)
|
new AttackMove(Moves.ELECTRO_BALL, Type.ELECTRIC, MoveCategory.SPECIAL, -1, 100, 10, -1, 0, 5)
|
||||||
.attr(BattleStatRatioPowerAttr, Stat.SPD)
|
.attr(BattleStatRatioPowerAttr, Stat.SPD)
|
||||||
.ballBombMove(),
|
.ballBombMove(),
|
||||||
|
Loading…
Reference in New Issue
Block a user