mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-27 20:24:18 +01:00
Implemented Sand Spit
This commit is contained in:
parent
322918e280
commit
7d8b8083e8
@ -6738,6 +6738,15 @@ BattleScript_SandstreamActivates::
|
||||
call BattleScript_WeatherFormChanges
|
||||
end3
|
||||
|
||||
BattleScript_SandSpitActivates::
|
||||
pause 0x20
|
||||
call BattleScript_AbilityPopUp
|
||||
printstring STRINGID_ASANDSTORMKICKEDUP
|
||||
waitstate
|
||||
playanimation BS_BATTLER_0, B_ANIM_SANDSTORM_CONTINUES, NULL
|
||||
call BattleScript_WeatherFormChanges
|
||||
return
|
||||
|
||||
BattleScript_ShedSkinActivates::
|
||||
call BattleScript_AbilityPopUp
|
||||
printstring STRINGID_PKMNSXCUREDYPROBLEM
|
||||
|
@ -353,5 +353,6 @@ extern const u8 BattleScript_AnnounceAirLockCloudNine[];
|
||||
extern const u8 BattleScript_BattlerAbilityStatRaiseOnSwitchIn[];
|
||||
extern const u8 BattleScript_CottonDownActivates[];
|
||||
extern const u8 BattleScript_BallFetch[];
|
||||
extern const u8 BattleScript_SandSpitActivates[];
|
||||
|
||||
#endif // GUARD_BATTLE_SCRIPTS_H
|
||||
|
@ -560,8 +560,9 @@
|
||||
#define STRINGID_SCREENCLEANERENTERS 556
|
||||
#define STRINGID_FETCHEDPOKEBALL 557
|
||||
#define STRINGID_BATTLERABILITYRAISEDSTAT 558
|
||||
#define STRINGID_ASANDSTORMKICKEDUP 559
|
||||
|
||||
#define BATTLESTRINGS_COUNT 559
|
||||
#define BATTLESTRINGS_COUNT 560
|
||||
|
||||
//// multichoice message IDs
|
||||
// switch in ability message
|
||||
|
@ -687,9 +687,11 @@ static const u8 sText_ComatoseActivates[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} i
|
||||
static const u8 sText_ScreenCleanerActivates[] = _("All screens on the field were\ncleansed!");
|
||||
static const u8 sText_FetchedPokeBall[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} found\na {B_LAST_ITEM}!");
|
||||
static const u8 sText_BattlerAbilityRaisedStat[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX}'s {B_SCR_ACTIVE_ABILITY}\nraised its {B_BUFF1}!");
|
||||
static const u8 sText_ASandstormKickedUp[] = _("A sandstorm kicked up!");
|
||||
|
||||
const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] =
|
||||
{
|
||||
[STRINGID_ASANDSTORMKICKEDUP - 12] = sText_ASandstormKickedUp,
|
||||
[STRINGID_BATTLERABILITYRAISEDSTAT - 12] = sText_BattlerAbilityRaisedStat,
|
||||
[STRINGID_FETCHEDPOKEBALL - 12] = sText_FetchedPokeBall,
|
||||
[STRINGID_STATWASNOTLOWERED - 12] = sText_StatWasNotLowered,
|
||||
|
@ -4650,6 +4650,19 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
|
||||
effect++;
|
||||
}
|
||||
break;
|
||||
case ABILITY_SAND_SPIT:
|
||||
if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT)
|
||||
&& !gProtectStructs[gBattlerAttacker].confusionSelfDmg
|
||||
&& TARGET_TURN_DAMAGED
|
||||
&& !(WEATHER_HAS_EFFECT && gBattleWeather & WEATHER_SANDSTORM_ANY)
|
||||
&& TryChangeBattleWeather(battler, ENUM_WEATHER_SANDSTORM, TRUE))
|
||||
{
|
||||
gBattleScripting.battler = gActiveBattler = battler;
|
||||
BattleScriptPushCursor();
|
||||
gBattlescriptCurrInstr = BattleScript_SandSpitActivates;
|
||||
effect++;
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case ABILITYEFFECT_MOVE_END_ATTACKER: // Same as above, but for attacker
|
||||
|
Loading…
Reference in New Issue
Block a user