mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2024-11-25 08:16:04 +00:00
making trapping moves generally not work on ghost and adding the message when it fails
This commit is contained in:
parent
7197b8584f
commit
758c53b51b
@ -7454,6 +7454,8 @@ const failIfLastInPartyCondition: MoveConditionFunc = (user: Pokemon, target: Po
|
|||||||
return party.some(pokemon => pokemon.isActive() && !pokemon.isOnField());
|
return party.some(pokemon => pokemon.isActive() && !pokemon.isOnField());
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const failIfGhostType: MoveConditionFunc = (user: Pokemon, target: Pokemon, move: Move) => !target.isOfType(Type.GHOST);
|
||||||
|
|
||||||
export type MoveAttrFilter = (attr: MoveAttr) => boolean;
|
export type MoveAttrFilter = (attr: MoveAttr) => boolean;
|
||||||
|
|
||||||
function applyMoveAttrsInternal(attrFilter: MoveAttrFilter, user: Pokemon | null, target: Pokemon | null, move: Move, args: any[]): Promise<void> {
|
function applyMoveAttrsInternal(attrFilter: MoveAttrFilter, user: Pokemon | null, target: Pokemon | null, move: Move, args: any[]): Promise<void> {
|
||||||
@ -8202,6 +8204,7 @@ export function initMoves() {
|
|||||||
new AttackMove(Moves.THIEF, Type.DARK, MoveCategory.PHYSICAL, 60, 100, 25, -1, 0, 2)
|
new AttackMove(Moves.THIEF, Type.DARK, MoveCategory.PHYSICAL, 60, 100, 25, -1, 0, 2)
|
||||||
.attr(StealHeldItemChanceAttr, 0.3),
|
.attr(StealHeldItemChanceAttr, 0.3),
|
||||||
new StatusMove(Moves.SPIDER_WEB, Type.BUG, -1, 10, -1, 0, 2)
|
new StatusMove(Moves.SPIDER_WEB, Type.BUG, -1, 10, -1, 0, 2)
|
||||||
|
.condition(failIfGhostType)
|
||||||
.attr(AddBattlerTagAttr, BattlerTagType.TRAPPED, false, true, 1),
|
.attr(AddBattlerTagAttr, BattlerTagType.TRAPPED, false, true, 1),
|
||||||
new StatusMove(Moves.MIND_READER, Type.NORMAL, -1, 5, -1, 0, 2)
|
new StatusMove(Moves.MIND_READER, Type.NORMAL, -1, 5, -1, 0, 2)
|
||||||
.attr(IgnoreAccuracyAttr),
|
.attr(IgnoreAccuracyAttr),
|
||||||
@ -8338,6 +8341,7 @@ export function initMoves() {
|
|||||||
new AttackMove(Moves.STEEL_WING, Type.STEEL, MoveCategory.PHYSICAL, 70, 90, 25, 10, 0, 2)
|
new AttackMove(Moves.STEEL_WING, Type.STEEL, MoveCategory.PHYSICAL, 70, 90, 25, 10, 0, 2)
|
||||||
.attr(StatStageChangeAttr, [ Stat.DEF ], 1, true),
|
.attr(StatStageChangeAttr, [ Stat.DEF ], 1, true),
|
||||||
new StatusMove(Moves.MEAN_LOOK, Type.NORMAL, -1, 5, -1, 0, 2)
|
new StatusMove(Moves.MEAN_LOOK, Type.NORMAL, -1, 5, -1, 0, 2)
|
||||||
|
.condition(failIfGhostType)
|
||||||
.attr(AddBattlerTagAttr, BattlerTagType.TRAPPED, false, true, 1),
|
.attr(AddBattlerTagAttr, BattlerTagType.TRAPPED, false, true, 1),
|
||||||
new StatusMove(Moves.ATTRACT, Type.NORMAL, 100, 15, -1, 0, 2)
|
new StatusMove(Moves.ATTRACT, Type.NORMAL, 100, 15, -1, 0, 2)
|
||||||
.attr(AddBattlerTagAttr, BattlerTagType.INFATUATED)
|
.attr(AddBattlerTagAttr, BattlerTagType.INFATUATED)
|
||||||
@ -8717,6 +8721,7 @@ export function initMoves() {
|
|||||||
new SelfStatusMove(Moves.IRON_DEFENSE, Type.STEEL, -1, 15, -1, 0, 3)
|
new SelfStatusMove(Moves.IRON_DEFENSE, Type.STEEL, -1, 15, -1, 0, 3)
|
||||||
.attr(StatStageChangeAttr, [ Stat.DEF ], 2, true),
|
.attr(StatStageChangeAttr, [ Stat.DEF ], 2, true),
|
||||||
new StatusMove(Moves.BLOCK, Type.NORMAL, -1, 5, -1, 0, 3)
|
new StatusMove(Moves.BLOCK, Type.NORMAL, -1, 5, -1, 0, 3)
|
||||||
|
.condition(failIfGhostType)
|
||||||
.attr(AddBattlerTagAttr, BattlerTagType.TRAPPED, false, true, 1),
|
.attr(AddBattlerTagAttr, BattlerTagType.TRAPPED, false, true, 1),
|
||||||
new StatusMove(Moves.HOWL, Type.NORMAL, -1, 40, -1, 0, 3)
|
new StatusMove(Moves.HOWL, Type.NORMAL, -1, 40, -1, 0, 3)
|
||||||
.attr(StatStageChangeAttr, [ Stat.ATK ], 1)
|
.attr(StatStageChangeAttr, [ Stat.ATK ], 1)
|
||||||
@ -10012,6 +10017,7 @@ export function initMoves() {
|
|||||||
.attr(EatBerryAttr)
|
.attr(EatBerryAttr)
|
||||||
.target(MoveTarget.ALL),
|
.target(MoveTarget.ALL),
|
||||||
new StatusMove(Moves.OCTOLOCK, Type.FIGHTING, 100, 15, -1, 0, 8)
|
new StatusMove(Moves.OCTOLOCK, Type.FIGHTING, 100, 15, -1, 0, 8)
|
||||||
|
.condition(failIfGhostType)
|
||||||
.attr(AddBattlerTagAttr, BattlerTagType.OCTOLOCK, false, true, 1),
|
.attr(AddBattlerTagAttr, BattlerTagType.OCTOLOCK, false, true, 1),
|
||||||
new AttackMove(Moves.BOLT_BEAK, Type.ELECTRIC, MoveCategory.PHYSICAL, 85, 100, 10, -1, 0, 8)
|
new AttackMove(Moves.BOLT_BEAK, Type.ELECTRIC, MoveCategory.PHYSICAL, 85, 100, 10, -1, 0, 8)
|
||||||
.attr(FirstAttackDoublePowerAttr),
|
.attr(FirstAttackDoublePowerAttr),
|
||||||
|
Loading…
Reference in New Issue
Block a user