mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-02-20 19:23:38 +01:00
Powder moves on grass types
This commit is contained in:
parent
8e9296a42b
commit
bf70861798
@ -5573,6 +5573,19 @@ BattleScript_MoveUsedIsParalyzed::
|
||||
statusanimation BS_ATTACKER
|
||||
cancelmultiturnmoves BS_ATTACKER
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
BattleScript_PowderMoveNoEffect::
|
||||
attackstring
|
||||
ppreduce
|
||||
pause 0x20
|
||||
jumpiftype BS_TARGET, TYPE_GRASS, BattleScript_PowderMoveNoEffectPrint
|
||||
call BattleScript_AbilityPopUp
|
||||
BattleScript_PowderMoveNoEffectPrint:
|
||||
printstring STRINGID_ITDOESNTAFFECT
|
||||
waitmessage 0x40
|
||||
cancelmultiturnmoves BS_ATTACKER
|
||||
sethword gMoveResultFlags, MOVE_RESULT_FAILED
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
BattleScript_MoveUsedFlinched::
|
||||
printstring STRINGID_PKMNFLINCHED
|
||||
|
@ -296,5 +296,6 @@ extern const u8 BattleScript_ElectricSurgeActivates[];
|
||||
extern const u8 BattleScript_SpectralThiefSteal[];
|
||||
extern const u8 BattleScript_StatUpMsg[];
|
||||
extern const u8 BattleScript_DefiantActivates[];
|
||||
extern const u8 BattleScript_PowderMoveNoEffect[];
|
||||
|
||||
#endif // GUARD_BATTLE_SCRIPTS_H
|
||||
|
@ -111,6 +111,7 @@
|
||||
// Gen6 hold effects
|
||||
#define HOLD_EFFECT_FAIRY_POWER 129
|
||||
#define HOLD_EFFECT_MEGA_STONE 130
|
||||
#define HOLD_EFFECT_SAFETY_GOOGLES 131
|
||||
|
||||
// Gen7 hold effects
|
||||
#define HOLD_EFFECT_PROTECTIVE_PADS 149
|
||||
|
@ -103,6 +103,7 @@
|
||||
#define FLAG_SOUND 0x10000
|
||||
#define FLAG_BALLISTIC 0x20000
|
||||
#define FLAG_PROTECTION_MOVE 0x40000
|
||||
#define FLAG_POWDER 0x80000
|
||||
|
||||
// Split defines.
|
||||
#define SPLIT_PHYSICAL 0x0
|
||||
|
@ -2012,7 +2012,8 @@ enum
|
||||
CANCELLER_IN_LOVE,
|
||||
CANCELLER_BIDE,
|
||||
CANCELLER_THAW,
|
||||
CANCELLER_POWDER,
|
||||
CANCELLER_POWDER_MOVE,
|
||||
CANCELLER_POWDER_STATUS,
|
||||
CANCELLER_END,
|
||||
CANCELLER_PSYCHIC_TERRAIN,
|
||||
CANCELLER_END2,
|
||||
@ -2303,7 +2304,27 @@ u8 AtkCanceller_UnableToUseMove(void)
|
||||
}
|
||||
gBattleStruct->atkCancellerTracker++;
|
||||
break;
|
||||
case CANCELLER_POWDER:
|
||||
case CANCELLER_POWDER_MOVE:
|
||||
if (gBattleMoves[gCurrentMove].flags & FLAG_POWDER)
|
||||
{
|
||||
if (IS_BATTLER_OF_TYPE(gBattlerTarget, TYPE_GRASS)
|
||||
|| GetBattlerAbility(gBattlerTarget) == ABILITY_OVERCOAT)
|
||||
{
|
||||
gBattlerAbility = gBattlerTarget;
|
||||
effect = 1;
|
||||
}
|
||||
else if (GetBattlerHoldEffect(gBattlerTarget, TRUE) == HOLD_EFFECT_SAFETY_GOOGLES)
|
||||
{
|
||||
RecordItemEffectBattle(gBattlerTarget, HOLD_EFFECT_SAFETY_GOOGLES);
|
||||
effect = 1;
|
||||
}
|
||||
|
||||
if (effect)
|
||||
gBattlescriptCurrInstr = BattleScript_PowderMoveNoEffect;
|
||||
}
|
||||
gBattleStruct->atkCancellerTracker++;
|
||||
break;
|
||||
case CANCELLER_POWDER_STATUS:
|
||||
if (gBattleMons[gBattlerAttacker].status2 & STATUS2_POWDER)
|
||||
{
|
||||
u32 moveType;
|
||||
|
@ -1088,7 +1088,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
|
||||
.secondaryEffectChance = 0,
|
||||
.target = MOVE_TARGET_SELECTED,
|
||||
.priority = 0,
|
||||
.flags = FLAG_PROTECT_AFFECTED | FLAG_MAGICCOAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED,
|
||||
.flags = FLAG_PROTECT_AFFECTED | FLAG_MAGICCOAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_POWDER,
|
||||
.split = SPLIT_STATUS,
|
||||
},
|
||||
|
||||
@ -1102,7 +1102,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
|
||||
.secondaryEffectChance = 0,
|
||||
.target = MOVE_TARGET_SELECTED,
|
||||
.priority = 0,
|
||||
.flags = FLAG_PROTECT_AFFECTED | FLAG_MAGICCOAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED,
|
||||
.flags = FLAG_PROTECT_AFFECTED | FLAG_MAGICCOAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_POWDER,
|
||||
.split = SPLIT_STATUS,
|
||||
},
|
||||
|
||||
@ -1116,7 +1116,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
|
||||
.secondaryEffectChance = 0,
|
||||
.target = MOVE_TARGET_SELECTED,
|
||||
.priority = 0,
|
||||
.flags = FLAG_PROTECT_AFFECTED | FLAG_MAGICCOAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED,
|
||||
.flags = FLAG_PROTECT_AFFECTED | FLAG_MAGICCOAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_POWDER,
|
||||
.split = SPLIT_STATUS,
|
||||
},
|
||||
|
||||
@ -2069,7 +2069,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
|
||||
.secondaryEffectChance = 0,
|
||||
.target = MOVE_TARGET_SELECTED,
|
||||
.priority = 0,
|
||||
.flags = FLAG_PROTECT_AFFECTED | FLAG_MAGICCOAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED,
|
||||
.flags = FLAG_PROTECT_AFFECTED | FLAG_MAGICCOAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_POWDER,
|
||||
.split = SPLIT_STATUS,
|
||||
},
|
||||
|
||||
@ -2503,7 +2503,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
|
||||
.secondaryEffectChance = 0,
|
||||
.target = MOVE_TARGET_SELECTED,
|
||||
.priority = 0,
|
||||
.flags = FLAG_PROTECT_AFFECTED | FLAG_MAGICCOAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED,
|
||||
.flags = FLAG_PROTECT_AFFECTED | FLAG_MAGICCOAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_POWDER,
|
||||
.split = SPLIT_STATUS,
|
||||
},
|
||||
|
||||
@ -6684,7 +6684,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
|
||||
.secondaryEffectChance = 0,
|
||||
.target = MOVE_TARGET_USER,
|
||||
.priority = 2,
|
||||
.flags = 0,
|
||||
.flags = FLAG_POWDER,
|
||||
.split = SPLIT_STATUS,
|
||||
},
|
||||
|
||||
@ -8429,7 +8429,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
|
||||
.secondaryEffectChance = 0,
|
||||
.target = MOVE_TARGET_SELECTED,
|
||||
.priority = 1,
|
||||
.flags = FLAG_PROTECT_AFFECTED | FLAG_MAGICCOAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED,
|
||||
.flags = FLAG_PROTECT_AFFECTED | FLAG_MAGICCOAT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_POWDER,
|
||||
.split = SPLIT_STATUS,
|
||||
},
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user