Add Sweet Veil
This commit is contained in:
parent
b12334c88b
commit
6f9096c613
6 changed files with 18 additions and 1 deletions
|
@ -1819,6 +1819,7 @@ BattleScript_EffectSleep::
|
|||
jumpifstatus BS_TARGET, STATUS1_SLEEP, BattleScript_AlreadyAsleep
|
||||
jumpifcantmakeasleep BattleScript_CantMakeAsleep
|
||||
jumpifflowerveil BattleScript_FlowerVeilProtects
|
||||
jumpifability BS_TARGET_SIDE, ABILITY_SWEET_VEIL, BattleScript_SweetVeilProtects
|
||||
jumpifstatus BS_TARGET, STATUS1_ANY, BattleScript_ButItFailed
|
||||
accuracycheck BattleScript_ButItFailed, ACC_CURR_MOVE
|
||||
jumpifsideaffecting BS_TARGET, SIDE_STATUS_SAFEGUARD, BattleScript_SafeguardProtected
|
||||
|
@ -1840,6 +1841,18 @@ BattleScript_FlowerVeilProtects:
|
|||
orhalfword gMoveResultFlags, MOVE_RESULT_FAILED
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
BattleScript_SweetVeilProtectsRet::
|
||||
pause 0x20
|
||||
call BattleScript_AbilityPopUp
|
||||
printstring STRINGID_FLOWERVEILPROTECTED
|
||||
waitmessage 0x40
|
||||
return
|
||||
|
||||
BattleScript_SweetVeilProtects:
|
||||
call BattleScript_SweetVeilProtectsRet
|
||||
orhalfword gMoveResultFlags, MOVE_RESULT_FAILED
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
BattleScript_AlreadyAsleep::
|
||||
setalreadystatusedmoveattempt BS_ATTACKER
|
||||
pause 0x20
|
||||
|
|
|
@ -301,5 +301,6 @@ extern const u8 BattleScript_GrassyTerrainLoop[];
|
|||
extern const u8 BattleScript_VCreateStatLoss[];
|
||||
extern const u8 BattleScript_SpikyShieldEffect[];
|
||||
extern const u8 BattleScript_FlowerVeilProtectsRet[];
|
||||
extern const u8 BattleScript_SweetVeilProtectsRet[];
|
||||
|
||||
#endif // GUARD_BATTLE_SCRIPTS_H
|
||||
|
|
|
@ -139,7 +139,6 @@
|
|||
#define VARIOUS_GRAVITY_ON_AIRBORNE_MONS 76
|
||||
#define VARIOUS_CHECK_IF_GRASSY_TERRAIN_HEALS 77
|
||||
#define VARIOUS_JUMP_IF_ROAR_FAILS 78
|
||||
#define VARIOUS_JUMP_IF_FLOWER_VEIL 79
|
||||
|
||||
// atk80, dmg manipulation
|
||||
#define ATK80_DMG_CHANGE_SIGN 0
|
||||
|
|
|
@ -525,6 +525,7 @@
|
|||
#define STRINGID_PSYCHICTERRAINPREVENTS 521
|
||||
#define STRINGID_SAFETYGOOGLESPROTECTED 522
|
||||
#define STRINGID_FLOWERVEILPROTECTED 523
|
||||
#define STRINGID_SWEETVEILPROTECTED 524
|
||||
|
||||
#define BATTLESTRINGS_COUNT 529
|
||||
|
||||
|
|
|
@ -650,9 +650,11 @@ static const u8 sText_ElectricTerrainPreventsSleep[] = _("{B_DEF_NAME_WITH_PREFI
|
|||
static const u8 sText_PsychicTerrainPreventsPriority[] = _("{B_DEF_NAME_WITH_PREFIX} surrounds itself\nwith psychic terrain!");
|
||||
static const u8 sText_SafetyGooglesProtected[] = _("{B_DEF_NAME_WITH_PREFIX} is not affected\nthanks to its {B_LAST_ITEM}!");
|
||||
static const u8 sText_FlowerVeilProtected[] = _("{B_DEF_NAME_WITH_PREFIX} surrounded itself\nwith a veil of petals!");
|
||||
static const u8 sText_SweetVeilProtected[] = _("{B_DEF_NAME_WITH_PREFIX} surrounded itself\nwith a veil of sweetness!");
|
||||
|
||||
const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] =
|
||||
{
|
||||
[STRINGID_SWEETVEILPROTECTED - 12] = sText_SweetVeilProtected,
|
||||
[STRINGID_FLOWERVEILPROTECTED - 12] = sText_FlowerVeilProtected,
|
||||
[STRINGID_SAFETYGOOGLESPROTECTED - 12] = sText_SafetyGooglesProtected,
|
||||
[STRINGID_SPECTRALTHIEFSTEAL - 12] = sText_SpectralThiefSteal,
|
||||
|
|
|
@ -2050,6 +2050,7 @@ void SetMoveEffect(bool32 primary, u32 certain)
|
|||
break;
|
||||
if (GetBattlerAbility(gEffectBattler) == ABILITY_VITAL_SPIRIT
|
||||
|| GetBattlerAbility(gEffectBattler) == ABILITY_INSOMNIA
|
||||
|| IsAbilityOnSide(gEffectBattler, ABILITY_SWEET_VEIL)
|
||||
|| IsFlowerVeilProtected(gEffectBattler))
|
||||
break;
|
||||
|
||||
|
|
Loading…
Reference in a new issue