mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 11:44:17 +01:00
Add remaining multistring chooser constants
This commit is contained in:
parent
a836bd1085
commit
9ea9ffde09
File diff suppressed because it is too large
Load Diff
@ -69,16 +69,16 @@ BattleScript_PrintCaughtMonInfo::
|
||||
trysetcaughtmondexflags BattleScript_TryNicknameCaughtMon
|
||||
printstring STRINGID_PKMNDATAADDEDTODEX
|
||||
waitstate
|
||||
setbyte gBattleCommunication, 0x0
|
||||
setbyte gBattleCommunication, 0
|
||||
displaydexinfo
|
||||
BattleScript_TryNicknameCaughtMon::
|
||||
printstring STRINGID_GIVENICKNAMECAPTURED
|
||||
waitstate
|
||||
setbyte gBattleCommunication, 0x0
|
||||
setbyte gBattleCommunication, 0
|
||||
trygivecaughtmonnick BattleScript_GiveCaughtMonEnd
|
||||
givecaughtmon
|
||||
printfromtable gCaughtMonStringIds
|
||||
waitmessage 0x40
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
goto BattleScript_SuccessBallThrowEnd
|
||||
BattleScript_GiveCaughtMonEnd::
|
||||
givecaughtmon
|
||||
@ -93,21 +93,21 @@ BattleScript_WallyBallThrow::
|
||||
|
||||
BattleScript_ShakeBallThrow::
|
||||
printfromtable gBallEscapeStringIds
|
||||
waitmessage 0x40
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
jumpifword CMP_NO_COMMON_BITS, gBattleTypeFlags, BATTLE_TYPE_SAFARI, BattleScript_ShakeBallThrowEnd
|
||||
jumpifbyte CMP_NOT_EQUAL, gNumSafariBalls, 0x0, BattleScript_ShakeBallThrowEnd
|
||||
printstring STRINGID_OUTOFSAFARIBALLS
|
||||
waitmessage 0x40
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
setbyte gBattleOutcome, B_OUTCOME_NO_SAFARI_BALLS
|
||||
BattleScript_ShakeBallThrowEnd::
|
||||
finishaction
|
||||
|
||||
BattleScript_TrainerBallBlock::
|
||||
waitmessage 0x40
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
printstring STRINGID_TRAINERBLOCKEDBALL
|
||||
waitmessage 0x40
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
printstring STRINGID_DONTBEATHIEF
|
||||
waitmessage 0x40
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
finishaction
|
||||
|
||||
BattleScript_PlayerUsesItem::
|
||||
@ -117,16 +117,16 @@ BattleScript_PlayerUsesItem::
|
||||
|
||||
BattleScript_OpponentUsesHealItem::
|
||||
printstring STRINGID_EMPTYSTRING3
|
||||
pause 0x30
|
||||
pause B_WAIT_TIME_MED
|
||||
playse SE_USE_ITEM
|
||||
printstring STRINGID_TRAINER1USEDITEM
|
||||
waitmessage 0x40
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
useitemonopponent
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE
|
||||
healthbarupdate BS_ATTACKER
|
||||
datahpupdate BS_ATTACKER
|
||||
printstring STRINGID_PKMNSITEMRESTOREDHEALTH
|
||||
waitmessage 0x40
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
updatestatusicon BS_ATTACKER
|
||||
setbyte sMOVEEND_STATE, 0xF
|
||||
moveend 0x1, 0x0
|
||||
@ -134,13 +134,13 @@ BattleScript_OpponentUsesHealItem::
|
||||
|
||||
BattleScript_OpponentUsesStatusCureItem::
|
||||
printstring STRINGID_EMPTYSTRING3
|
||||
pause 0x30
|
||||
pause B_WAIT_TIME_MED
|
||||
playse SE_USE_ITEM
|
||||
printstring STRINGID_TRAINER1USEDITEM
|
||||
waitmessage 0x40
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
useitemonopponent
|
||||
printfromtable gTrainerItemCuredStatusStringIds
|
||||
waitmessage 0x40
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
updatestatusicon BS_ATTACKER
|
||||
setbyte sMOVEEND_STATE, 0xF
|
||||
moveend 0x1, 0x0
|
||||
@ -148,26 +148,26 @@ BattleScript_OpponentUsesStatusCureItem::
|
||||
|
||||
BattleScript_OpponentUsesXItem::
|
||||
printstring STRINGID_EMPTYSTRING3
|
||||
pause 0x30
|
||||
pause B_WAIT_TIME_MED
|
||||
playse SE_USE_ITEM
|
||||
printstring STRINGID_TRAINER1USEDITEM
|
||||
waitmessage 0x40
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
useitemonopponent
|
||||
printfromtable gStatUpStringIds
|
||||
waitmessage 0x40
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
setbyte sMOVEEND_STATE, 0xF
|
||||
moveend 0x1, 0x0
|
||||
finishaction
|
||||
|
||||
BattleScript_OpponentUsesGuardSpecs::
|
||||
printstring STRINGID_EMPTYSTRING3
|
||||
pause 0x30
|
||||
pause B_WAIT_TIME_MED
|
||||
playse SE_USE_ITEM
|
||||
printstring STRINGID_TRAINER1USEDITEM
|
||||
waitmessage 0x40
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
useitemonopponent
|
||||
printfromtable gMistUsedStringIds
|
||||
waitmessage 0x40
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
setbyte sMOVEEND_STATE, 0xF
|
||||
moveend 0x1, 0x0
|
||||
finishaction
|
||||
@ -179,29 +179,29 @@ BattleScript_RunByUsingItem::
|
||||
|
||||
BattleScript_ActionWatchesCarefully:
|
||||
printstring STRINGID_PKMNWATCHINGCAREFULLY
|
||||
waitmessage 0x40
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
end2
|
||||
|
||||
BattleScript_ActionGetNear:
|
||||
printfromtable gSafariGetNearStringIds
|
||||
waitmessage 0x40
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
end2
|
||||
|
||||
BattleScript_ActionThrowPokeblock:
|
||||
printstring STRINGID_THREWPOKEBLOCKATPKMN
|
||||
waitmessage 0x40
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
playanimation BS_ATTACKER, B_ANIM_POKEBLOCK_THROW, NULL
|
||||
printfromtable gSafariPokeblockResultStringIds
|
||||
waitmessage 0x40
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
end2
|
||||
|
||||
BattleScript_ActionWallyThrow:
|
||||
printstring STRINGID_RETURNMON
|
||||
waitmessage 0x40
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
returnatktoball
|
||||
waitstate
|
||||
trainerslidein BS_TARGET
|
||||
waitstate
|
||||
printstring STRINGID_YOUTHROWABALLNOWRIGHT
|
||||
waitmessage 0x40
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
end2
|
||||
|
@ -40,16 +40,17 @@
|
||||
#define MAX_TRAINER_ITEMS 4
|
||||
|
||||
// array entries for battle communication
|
||||
#define MULTIUSE_STATE 0x0
|
||||
#define CURSOR_POSITION 0x1
|
||||
#define TASK_ID 0x1 // task Id and cursor position share the same field
|
||||
#define SPRITES_INIT_STATE1 0x1 // shares the Id as well
|
||||
#define SPRITES_INIT_STATE2 0x2
|
||||
#define MOVE_EFFECT_BYTE 0x3
|
||||
#define ACTIONS_CONFIRMED_COUNT 0x4
|
||||
#define MULTISTRING_CHOOSER 0x5
|
||||
#define MSG_DISPLAY 0x7
|
||||
#define BATTLE_COMMUNICATION_ENTRIES_COUNT 0x8
|
||||
#define MULTIUSE_STATE 0
|
||||
#define CURSOR_POSITION 1
|
||||
#define TASK_ID 1 // task Id and cursor position share the same field
|
||||
#define SPRITES_INIT_STATE1 1 // shares the Id as well
|
||||
#define SPRITES_INIT_STATE2 2
|
||||
#define MOVE_EFFECT_BYTE 3
|
||||
#define ACTIONS_CONFIRMED_COUNT 4
|
||||
#define MULTISTRING_CHOOSER 5
|
||||
#define MISS_TYPE 6
|
||||
#define MSG_DISPLAY 7
|
||||
#define BATTLE_COMMUNICATION_ENTRIES_COUNT 8
|
||||
|
||||
#define MOVE_TARGET_SELECTED 0x0
|
||||
#define MOVE_TARGET_DEPENDS 0x1
|
||||
|
@ -11,6 +11,26 @@ enum
|
||||
AI_ITEM_NOT_RECOGNIZABLE
|
||||
};
|
||||
|
||||
enum {
|
||||
AI_HEAL_CONFUSION,
|
||||
AI_HEAL_PARALYSIS,
|
||||
AI_HEAL_FREEZE,
|
||||
AI_HEAL_BURN,
|
||||
AI_HEAL_POISON,
|
||||
AI_HEAL_SLEEP,
|
||||
};
|
||||
|
||||
enum {
|
||||
AI_X_ATTACK,
|
||||
AI_X_DEFEND,
|
||||
AI_X_SPEED,
|
||||
AI_X_SPATK,
|
||||
AI_X_SPDEF, // Unused
|
||||
AI_X_ACCURACY,
|
||||
AI_X_EVASION, // Unused
|
||||
AI_DIRE_HIT,
|
||||
};
|
||||
|
||||
void AI_TrySwitchOrUseItem(void);
|
||||
u8 GetMostSuitableMonToSwitchInto(void);
|
||||
|
||||
|
@ -223,7 +223,6 @@ extern const u8* const gBattleStringsTable[];
|
||||
extern const u8* const gStatNamesTable[];
|
||||
extern const u8* const gPokeblockWasTooXStringTable[];
|
||||
extern const u8* const gRefereeStringsTable[];
|
||||
extern const u8* const gStatNamesTable2[];
|
||||
extern const u8 *const gRoundsStringTable[];
|
||||
|
||||
extern const u8 gText_PkmnIsEvolving[];
|
||||
@ -269,7 +268,7 @@ extern const u8 gText_Win[];
|
||||
extern const u8 gText_Loss[];
|
||||
extern const u8 gText_Draw[];
|
||||
extern const u8 gText_StatRose[];
|
||||
extern const u8 gText_PkmnsStatChanged2[];
|
||||
extern const u8 gText_DefendersStatRose[];
|
||||
extern const u8 gText_PkmnGettingPumped[];
|
||||
extern const u8 gText_PkmnShroudedInMist[];
|
||||
extern const u8 gText_PkmnsXPreventsSwitching[];
|
||||
|
@ -302,4 +302,8 @@
|
||||
#define BATTLE_TERRAIN_BUILDING 8
|
||||
#define BATTLE_TERRAIN_PLAIN 9
|
||||
|
||||
#define B_WAIT_TIME_LONG 64
|
||||
#define B_WAIT_TIME_MED 48
|
||||
#define B_WAIT_TIME_SHORT 32
|
||||
|
||||
#endif // GUARD_CONSTANTS_BATTLE_H
|
||||
|
@ -214,10 +214,10 @@
|
||||
#define STRINGID_STATROSE 210
|
||||
#define STRINGID_STATHARSHLY 211
|
||||
#define STRINGID_STATFELL 212
|
||||
#define STRINGID_PKMNSSTATCHANGED 213
|
||||
#define STRINGID_PKMNSSTATCHANGED2 214
|
||||
#define STRINGID_PKMNSSTATCHANGED3 215
|
||||
#define STRINGID_PKMNSSTATCHANGED4 216
|
||||
#define STRINGID_ATTACKERSSTATROSE 213
|
||||
#define STRINGID_DEFENDERSSTATROSE 214
|
||||
#define STRINGID_ATTACKERSSTATFELL 215
|
||||
#define STRINGID_DEFENDERSSTATFELL 216
|
||||
#define STRINGID_CRITICALHIT 217
|
||||
#define STRINGID_ONEHITKO 218
|
||||
#define STRINGID_123POOF 219
|
||||
@ -326,7 +326,7 @@
|
||||
#define STRINGID_SOOTHINGAROMA 322
|
||||
#define STRINGID_ITEMSCANTBEUSEDNOW 323
|
||||
#define STRINGID_FORXCOMMAYZ 324
|
||||
#define STRINGID_USINGXTHEYOFZN 325
|
||||
#define STRINGID_USINGITEMSTATOFPKMNROSE 325
|
||||
#define STRINGID_PKMNUSEDXTOGETPUMPED 326
|
||||
#define STRINGID_PKMNSXMADEYUSELESS 327
|
||||
#define STRINGID_PKMNTRAPPEDBYSANDTOMB 328
|
||||
@ -383,11 +383,207 @@
|
||||
#define STRINGID_TRAINER1WINTEXT 379
|
||||
#define STRINGID_TRAINER2WINTEXT 380
|
||||
|
||||
// Indexes into gMissStringIds
|
||||
|
||||
// The below IDs are all indexes into battle message tables,
|
||||
// used to determine which of a set of messages to print.
|
||||
// They are assigned to the MULTISTRING_CHOOSER byte of gBattleCommunication
|
||||
// and read when e.g. the command printfromtable is used.
|
||||
|
||||
// gStatUpStringIds
|
||||
#define B_MSG_ATTACKER_STAT_ROSE 0
|
||||
#define B_MSG_DEFENDER_STAT_ROSE 1
|
||||
#define B_MSG_STAT_WONT_INCREASE 2
|
||||
#define B_MSG_STAT_ROSE_EMPTY 3
|
||||
#define B_MSG_STAT_ROSE_ITEM 4
|
||||
#define B_MSG_USED_DIRE_HIT 5
|
||||
|
||||
// gStatDownStringIds
|
||||
#define B_MSG_ATTACKER_STAT_FELL 0
|
||||
#define B_MSG_DEFENDER_STAT_FELL 1
|
||||
#define B_MSG_STAT_WONT_DECREASE 2
|
||||
#define B_MSG_STAT_FELL_EMPTY 3
|
||||
|
||||
// gMissStringIds
|
||||
#define B_MSG_MISSED 0
|
||||
#define B_MSG_PROTECTED 1
|
||||
#define B_MSG_AVOIDED_ATK 2
|
||||
#define B_MSG_AVOIDED_DMG 3
|
||||
#define B_MSG_GROUND_MISS 4
|
||||
|
||||
// gAbsorbDrainStringIds
|
||||
#define B_MSG_ABSORB 0
|
||||
#define B_MSG_ABSORB_OOZE 1
|
||||
|
||||
// gLeechSeedStringIds
|
||||
#define B_MSG_LEECH_SEED_SET 0
|
||||
#define B_MSG_LEECH_SEED_MISS 1
|
||||
#define B_MSG_LEECH_SEED_FAIL 2
|
||||
#define B_MSG_LEECH_SEED_DRAIN 3
|
||||
#define B_MSG_LEECH_SEED_OOZE 4
|
||||
|
||||
// gBattlePalaceFlavorTextTable
|
||||
#define B_MSG_GLINT_IN_EYE 0
|
||||
#define B_MSG_GETTING_IN_POS 1
|
||||
#define B_MSG_GROWL_DEEPLY 2
|
||||
#define B_MSG_EAGER_FOR_MORE 3
|
||||
|
||||
// gFirstTurnOfTwoStringIds
|
||||
#define B_MSG_TURN1_RAZOR_WIND 0
|
||||
#define B_MSG_TURN1_SOLAR_BEAM 1
|
||||
#define B_MSG_TURN1_SKULL_BASH 2
|
||||
#define B_MSG_TURN1_SKY_ATTACK 3
|
||||
#define B_MSG_TURN1_FLY 4
|
||||
#define B_MSG_TURN1_DIG 5
|
||||
#define B_MSG_TURN1_DIVE 6
|
||||
#define B_MSG_TURN1_BOUNCE 7
|
||||
|
||||
// gMoveWeatherChangeStringIds
|
||||
#define B_MSG_STARTED_RAIN 0
|
||||
#define B_MSG_STARTED_DOWNPOUR 1
|
||||
#define B_MSG_WEATHER_FAILED 2
|
||||
#define B_MSG_STARTED_SANDSTORM 3
|
||||
#define B_MSG_STARTED_SUNLIGHT 4
|
||||
#define B_MSG_STARTED_HAIL 5
|
||||
|
||||
// gRainContinuesStringIds
|
||||
#define B_MSG_RAIN_CONTINUES 0
|
||||
#define B_MSG_DOWNPOUR_CONTINUES 1
|
||||
#define B_MSG_RAIN_STOPPED 2
|
||||
|
||||
// gSandStormHailContinuesStringIds / gSandStormHailDmgStringIds/ gSandStormHailEndStringIds
|
||||
#define B_MSG_SANDSTORM 0
|
||||
#define B_MSG_HAIL 1
|
||||
|
||||
// gReflectLightScreenSafeguardStringIds
|
||||
#define B_MSG_SIDE_STATUS_FAILED 0
|
||||
#define B_MSG_SET_REFLECT_SINGLE 1
|
||||
#define B_MSG_SET_REFLECT_DOUBLE 2
|
||||
#define B_MSG_SET_LIGHTSCREEN_SINGLE 3
|
||||
#define B_MSG_SET_LIGHTSCREEN_DOUBLE 4
|
||||
#define B_MSG_SET_SAFEGUARD 5
|
||||
|
||||
// gProtectLikeUsedStringIds
|
||||
#define B_MSG_PROTECTED_ITSELF 0
|
||||
#define B_MSG_BRACED_ITSELF 1
|
||||
#define B_MSG_PROTECT_FAILED 2
|
||||
|
||||
// gRestUsedStringIds
|
||||
#define B_MSG_REST 0
|
||||
#define B_MSG_REST_STATUSED 1
|
||||
|
||||
// gWokeUpStringIds
|
||||
#define B_MSG_WOKE_UP 0
|
||||
#define B_MSG_WOKE_UP_UPROAR 1
|
||||
|
||||
// gUproarAwakeStringIds
|
||||
#define B_MSG_CANT_SLEEP_UPROAR 0
|
||||
#define B_MSG_UPROAR_KEPT_AWAKE 1
|
||||
#define B_MSG_STAYED_AWAKE_USING 2
|
||||
|
||||
// gUproarOverTurnStringIds
|
||||
#define B_MSG_UPROAR_CONTINUES 0
|
||||
#define B_MSG_UPROAR_ENDS 1
|
||||
|
||||
// gStockpileUsedStringIds
|
||||
#define B_MSG_STOCKPILED 0
|
||||
#define B_MSG_CANT_STOCKPILE 1
|
||||
|
||||
// gSwallowFailStringIds
|
||||
#define B_MSG_SWALLOW_FAILED 0
|
||||
#define B_MSG_SWALLOW_FULL_HP 1
|
||||
|
||||
// gKOFailedStringIds
|
||||
#define B_MSG_KO_MISS 0
|
||||
#define B_MSG_KO_UNAFFECTED 1
|
||||
|
||||
// gMistUsedStringIds
|
||||
#define B_MSG_SET_MIST 0
|
||||
#define B_MSG_MIST_FAILED 1
|
||||
|
||||
// gFocusEnergyUsedStringIds
|
||||
#define B_MSG_GETTING_PUMPED 0
|
||||
#define B_MSG_FOCUS_ENERGY_FAILED 1
|
||||
|
||||
// gTransformUsedStringIds
|
||||
#define B_MSG_TRANSFORMED 0
|
||||
#define B_MSG_TRANSFORM_FAILED 1
|
||||
|
||||
// gSubsituteUsedStringIds
|
||||
#define B_MSG_SET_SUBSTITUTE 0
|
||||
#define B_MSG_SUBSTITUTE_FAILED 1
|
||||
|
||||
// gPartyStatusHealStringIds
|
||||
#define B_MSG_BELL 0
|
||||
#define B_MSG_BELL_SOUNDPROOF_ATTACKER 1
|
||||
#define B_MSG_BELL_SOUNDPROOF_PARTNER 2
|
||||
#define B_MSG_BELL_BOTH_SOUNDPROOF 3
|
||||
#define B_MSG_SOOTHING_AROMA 4
|
||||
|
||||
// gFutureMoveUsedStringIds
|
||||
#define B_MSG_FUTURE_SIGHT 0
|
||||
#define B_MSG_DOOM_DESIRE 1
|
||||
|
||||
// gItemSwapStringIds
|
||||
#define B_MSG_ITEM_SWAP_TAKEN 0
|
||||
#define B_MSG_ITEM_SWAP_GIVEN 1
|
||||
#define B_MSG_ITEM_SWAP_BOTH 2
|
||||
|
||||
// gSportsUsedStringIds
|
||||
#define B_MSG_WEAKEN_ELECTRIC 0
|
||||
#define B_MSG_WEAKEN_FIRE 1
|
||||
|
||||
// gCaughtMonStringIds
|
||||
#define B_MSG_SENT_SOMEONES_PC 0
|
||||
#define B_MSG_SENT_LANETTES_PC 1
|
||||
#define B_MSG_SOMEONES_BOX_FULL 2
|
||||
#define B_MSG_LANETTES_BOX_FULL 3
|
||||
|
||||
// gInobedientStringIds
|
||||
#define B_MSG_LOAFING 0
|
||||
#define B_MSG_WONT_OBEY 1
|
||||
#define B_MSG_TURNED_AWAY 2
|
||||
#define B_MSG_PRETEND_NOT_NOTICE 3
|
||||
#define B_MSG_INCAPABLE_OF_POWER 4
|
||||
// For randomly selecting a disobey string
|
||||
// Skips the one used for Battle Palace
|
||||
#define NUM_LOAF_STRINGS 4
|
||||
|
||||
// gSafariGetNearStringIds
|
||||
#define B_MSG_CREPT_CLOSER 0
|
||||
#define B_MSG_CANT_GET_CLOSER 1
|
||||
|
||||
// gSafariPokeblockResultStringIds
|
||||
#define B_MSG_MON_CURIOUS 0
|
||||
#define B_MSG_MON_ENTHRALLED 1
|
||||
#define B_MSG_MON_IGNORED 2
|
||||
|
||||
// gFlashFireStringIds
|
||||
#define B_MSG_FLASH_FIRE_BOOST 0
|
||||
#define B_MSG_FLASH_FIRE_NO_BOOST 1
|
||||
|
||||
// gBerryEffectStringIds
|
||||
#define B_MSG_CURED_PROBLEM 0
|
||||
#define B_MSG_NORMALIZED_STATUS 1
|
||||
|
||||
// gNoEscapeStringIds
|
||||
#define B_MSG_CANT_ESCAPE 0
|
||||
#define B_MSG_DONT_LEAVE_BIRCH 1
|
||||
#define B_MSG_PREVENTS_ESCAPE 2
|
||||
#define B_MSG_CANT_ESCAPE_2 3
|
||||
#define B_MSG_ATTACKER_CANT_ESCAPE 4
|
||||
|
||||
// gGotPoisonedStringIds / gGotParalyzedStringIds / gFellAsleepStringIds
|
||||
// gGotBurnedStringIds / gGotFrozenStringIds / gAttractUsedStringIds
|
||||
#define B_MSG_STATUSED 0
|
||||
#define B_MSG_STATUSED_BY_ABILITY 1
|
||||
|
||||
// gBRNPreventionStringIds / gPRLZPreventionStringIds / gPSNPreventionStringIds
|
||||
#define B_MSG_ABILITY_PREVENTS_MOVE_STATUS 0
|
||||
#define B_MSG_ABILITY_PREVENTS_ABILITY_STATUS 1
|
||||
#define B_MSG_STATUS_HAD_NO_EFFECT 2
|
||||
|
||||
// gGotDefrostedStringIds
|
||||
#define B_MSG_DEFROSTED 0
|
||||
#define B_MSG_DEFROSTED_BY_MOVE 1
|
||||
|
||||
#endif // GUARD_CONSTANTS_BATTLE_STRING_IDS_H
|
||||
|
@ -863,32 +863,33 @@ static bool8 ShouldUseItem(void)
|
||||
*(gBattleStruct->AI_itemFlags + gActiveBattler / 2) = 0;
|
||||
if (itemEffects[3] & ITEM3_SLEEP && gBattleMons[gActiveBattler].status1 & STATUS1_SLEEP)
|
||||
{
|
||||
*(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= 0x20;
|
||||
*(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= (1 << AI_HEAL_SLEEP);
|
||||
shouldUse = TRUE;
|
||||
}
|
||||
if (itemEffects[3] & ITEM3_POISON && (gBattleMons[gActiveBattler].status1 & STATUS1_POISON || gBattleMons[gActiveBattler].status1 & STATUS1_TOXIC_POISON))
|
||||
if (itemEffects[3] & ITEM3_POISON && (gBattleMons[gActiveBattler].status1 & STATUS1_POISON
|
||||
|| gBattleMons[gActiveBattler].status1 & STATUS1_TOXIC_POISON))
|
||||
{
|
||||
*(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= 0x10;
|
||||
*(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= (1 << AI_HEAL_POISON);
|
||||
shouldUse = TRUE;
|
||||
}
|
||||
if (itemEffects[3] & ITEM3_BURN && gBattleMons[gActiveBattler].status1 & STATUS1_BURN)
|
||||
{
|
||||
*(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= 0x8;
|
||||
*(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= (1 << AI_HEAL_BURN);
|
||||
shouldUse = TRUE;
|
||||
}
|
||||
if (itemEffects[3] & ITEM3_FREEZE && gBattleMons[gActiveBattler].status1 & STATUS1_FREEZE)
|
||||
{
|
||||
*(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= 0x4;
|
||||
*(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= (1 << AI_HEAL_FREEZE);
|
||||
shouldUse = TRUE;
|
||||
}
|
||||
if (itemEffects[3] & ITEM3_PARALYSIS && gBattleMons[gActiveBattler].status1 & STATUS1_PARALYSIS)
|
||||
{
|
||||
*(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= 0x2;
|
||||
*(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= (1 << AI_HEAL_PARALYSIS);
|
||||
shouldUse = TRUE;
|
||||
}
|
||||
if (itemEffects[3] & ITEM3_CONFUSION && gBattleMons[gActiveBattler].status2 & STATUS2_CONFUSION)
|
||||
{
|
||||
*(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= 0x1;
|
||||
*(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= (1 << AI_HEAL_CONFUSION);
|
||||
shouldUse = TRUE;
|
||||
}
|
||||
break;
|
||||
@ -897,17 +898,17 @@ static bool8 ShouldUseItem(void)
|
||||
if (gDisableStructs[gActiveBattler].isFirstTurn == 0)
|
||||
break;
|
||||
if (itemEffects[0] & ITEM0_X_ATTACK)
|
||||
*(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= 0x1;
|
||||
*(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= (1 << AI_X_ATTACK);
|
||||
if (itemEffects[1] & ITEM1_X_DEFEND)
|
||||
*(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= 0x2;
|
||||
*(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= (1 << AI_X_DEFEND);
|
||||
if (itemEffects[1] & ITEM1_X_SPEED)
|
||||
*(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= 0x4;
|
||||
*(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= (1 << AI_X_SPEED);
|
||||
if (itemEffects[2] & ITEM2_X_SPATK)
|
||||
*(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= 0x8;
|
||||
*(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= (1 << AI_X_SPATK);
|
||||
if (itemEffects[2] & ITEM2_X_ACCURACY)
|
||||
*(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= 0x20;
|
||||
*(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= (1 << AI_X_ACCURACY);
|
||||
if (itemEffects[0] & ITEM0_DIRE_HIT)
|
||||
*(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= 0x80;
|
||||
*(gBattleStruct->AI_itemFlags + gActiveBattler / 2) |= (1 << AI_DIRE_HIT);
|
||||
shouldUse = TRUE;
|
||||
break;
|
||||
case AI_ITEM_GUARD_SPECS:
|
||||
|
@ -3959,7 +3959,7 @@ u8 IsRunningFromBattleImpossible(void)
|
||||
{
|
||||
gBattleScripting.battler = i;
|
||||
gLastUsedAbility = gBattleMons[i].ability;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 2;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_PREVENTS_ESCAPE;
|
||||
return 2;
|
||||
}
|
||||
if (side != GetBattlerSide(i)
|
||||
@ -3969,7 +3969,7 @@ u8 IsRunningFromBattleImpossible(void)
|
||||
{
|
||||
gBattleScripting.battler = i;
|
||||
gLastUsedAbility = gBattleMons[i].ability;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 2;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_PREVENTS_ESCAPE;
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
@ -3978,18 +3978,18 @@ u8 IsRunningFromBattleImpossible(void)
|
||||
{
|
||||
gBattleScripting.battler = i - 1;
|
||||
gLastUsedAbility = gBattleMons[i - 1].ability;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 2;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_PREVENTS_ESCAPE;
|
||||
return 2;
|
||||
}
|
||||
if ((gBattleMons[gActiveBattler].status2 & (STATUS2_ESCAPE_PREVENTION | STATUS2_WRAPPED))
|
||||
|| (gStatuses3[gActiveBattler] & STATUS3_ROOTED))
|
||||
{
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_CANT_ESCAPE;
|
||||
return 1;
|
||||
}
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_FIRST_BATTLE)
|
||||
{
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 1;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_DONT_LEAVE_BIRCH;
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
|
@ -305,11 +305,11 @@ static const u8 sText_StatSharply[] = _("sharply ");
|
||||
const u8 gText_StatRose[] = _("rose!");
|
||||
static const u8 sText_StatHarshly[] = _("harshly ");
|
||||
static const u8 sText_StatFell[] = _("fell!");
|
||||
static const u8 sText_PkmnsStatChanged[] = _("{B_ATK_NAME_WITH_PREFIX}'s {B_BUFF1}\n{B_BUFF2}");
|
||||
const u8 gText_PkmnsStatChanged2[] = _("{B_DEF_NAME_WITH_PREFIX}'s {B_BUFF1}\n{B_BUFF2}");
|
||||
static const u8 sText_UsingXTheYOfZN[] = _("Using {B_LAST_ITEM}, the {B_BUFF1}\nof {B_SCR_ACTIVE_NAME_WITH_PREFIX} {B_BUFF2}");
|
||||
static const u8 sText_PkmnsStatChanged3[] = _("{B_ATK_NAME_WITH_PREFIX}'s {B_BUFF1}\n{B_BUFF2}");
|
||||
static const u8 sText_PkmnsStatChanged4[] = _("{B_DEF_NAME_WITH_PREFIX}'s {B_BUFF1}\n{B_BUFF2}");
|
||||
static const u8 sText_AttackersStatRose[] = _("{B_ATK_NAME_WITH_PREFIX}'s {B_BUFF1}\n{B_BUFF2}");
|
||||
const u8 gText_DefendersStatRose[] = _("{B_DEF_NAME_WITH_PREFIX}'s {B_BUFF1}\n{B_BUFF2}");
|
||||
static const u8 sText_UsingItemTheStatOfPkmnRose[] = _("Using {B_LAST_ITEM}, the {B_BUFF1}\nof {B_SCR_ACTIVE_NAME_WITH_PREFIX} {B_BUFF2}");
|
||||
static const u8 sText_AttackersStatFell[] = _("{B_ATK_NAME_WITH_PREFIX}'s {B_BUFF1}\n{B_BUFF2}");
|
||||
static const u8 sText_DefendersStatFell[] = _("{B_DEF_NAME_WITH_PREFIX}'s {B_BUFF1}\n{B_BUFF2}");
|
||||
static const u8 sText_StatsWontIncrease2[] = _("{B_ATK_NAME_WITH_PREFIX}'s stats won't\ngo any higher!");
|
||||
static const u8 sText_StatsWontDecrease2[] = _("{B_DEF_NAME_WITH_PREFIX}'s stats won't\ngo any lower!");
|
||||
static const u8 sText_CriticalHit[] = _("A critical hit!");
|
||||
@ -721,10 +721,10 @@ const u8 * const gBattleStringsTable[BATTLESTRINGS_COUNT] =
|
||||
[STRINGID_STATROSE - 12] = gText_StatRose,
|
||||
[STRINGID_STATHARSHLY - 12] = sText_StatHarshly,
|
||||
[STRINGID_STATFELL - 12] = sText_StatFell,
|
||||
[STRINGID_PKMNSSTATCHANGED - 12] = sText_PkmnsStatChanged,
|
||||
[STRINGID_PKMNSSTATCHANGED2 - 12] = gText_PkmnsStatChanged2,
|
||||
[STRINGID_PKMNSSTATCHANGED3 - 12] = sText_PkmnsStatChanged3,
|
||||
[STRINGID_PKMNSSTATCHANGED4 - 12] = sText_PkmnsStatChanged4,
|
||||
[STRINGID_ATTACKERSSTATROSE - 12] = sText_AttackersStatRose,
|
||||
[STRINGID_DEFENDERSSTATROSE - 12] = gText_DefendersStatRose,
|
||||
[STRINGID_ATTACKERSSTATFELL - 12] = sText_AttackersStatFell,
|
||||
[STRINGID_DEFENDERSSTATFELL - 12] = sText_DefendersStatFell,
|
||||
[STRINGID_CRITICALHIT - 12] = sText_CriticalHit,
|
||||
[STRINGID_ONEHITKO - 12] = sText_OneHitKO,
|
||||
[STRINGID_123POOF - 12] = sText_123Poof,
|
||||
@ -833,7 +833,7 @@ const u8 * const gBattleStringsTable[BATTLESTRINGS_COUNT] =
|
||||
[STRINGID_SOOTHINGAROMA - 12] = sText_SoothingAroma,
|
||||
[STRINGID_ITEMSCANTBEUSEDNOW - 12] = sText_ItemsCantBeUsedNow,
|
||||
[STRINGID_FORXCOMMAYZ - 12] = sText_ForXCommaYZ,
|
||||
[STRINGID_USINGXTHEYOFZN - 12] = sText_UsingXTheYOfZN,
|
||||
[STRINGID_USINGITEMSTATOFPKMNROSE - 12] = sText_UsingItemTheStatOfPkmnRose,
|
||||
[STRINGID_PKMNUSEDXTOGETPUMPED - 12] = sText_PkmnUsedXToGetPumped,
|
||||
[STRINGID_PKMNSXMADEYUSELESS - 12] = sText_PkmnsXMadeYUseless,
|
||||
[STRINGID_PKMNTRAPPEDBYSANDTOMB - 12] = sText_PkmnTrappedBySandTomb,
|
||||
@ -902,105 +902,140 @@ const u16 gMissStringIds[] =
|
||||
|
||||
const u16 gNoEscapeStringIds[] =
|
||||
{
|
||||
STRINGID_CANTESCAPE, STRINGID_DONTLEAVEBIRCH, STRINGID_PREVENTSESCAPE,
|
||||
STRINGID_CANTESCAPE2, STRINGID_ATTACKERCANTESCAPE
|
||||
[B_MSG_CANT_ESCAPE] = STRINGID_CANTESCAPE,
|
||||
[B_MSG_DONT_LEAVE_BIRCH] = STRINGID_DONTLEAVEBIRCH,
|
||||
[B_MSG_PREVENTS_ESCAPE] = STRINGID_PREVENTSESCAPE,
|
||||
[B_MSG_CANT_ESCAPE_2] = STRINGID_CANTESCAPE2,
|
||||
[B_MSG_ATTACKER_CANT_ESCAPE] = STRINGID_ATTACKERCANTESCAPE
|
||||
};
|
||||
|
||||
const u16 gMoveWeatherChangeStringIds[] =
|
||||
{
|
||||
STRINGID_STARTEDTORAIN, STRINGID_DOWNPOURSTARTED, STRINGID_BUTITFAILED,
|
||||
STRINGID_SANDSTORMBREWED, STRINGID_SUNLIGHTGOTBRIGHT, STRINGID_STARTEDHAIL
|
||||
[B_MSG_STARTED_RAIN] = STRINGID_STARTEDTORAIN,
|
||||
[B_MSG_STARTED_DOWNPOUR] = STRINGID_DOWNPOURSTARTED, // Unused
|
||||
[B_MSG_WEATHER_FAILED] = STRINGID_BUTITFAILED,
|
||||
[B_MSG_STARTED_SANDSTORM] = STRINGID_SANDSTORMBREWED,
|
||||
[B_MSG_STARTED_SUNLIGHT] = STRINGID_SUNLIGHTGOTBRIGHT,
|
||||
[B_MSG_STARTED_HAIL] = STRINGID_STARTEDHAIL,
|
||||
};
|
||||
|
||||
const u16 gSandStormHailContinuesStringIds[] =
|
||||
{
|
||||
STRINGID_SANDSTORMRAGES, STRINGID_HAILCONTINUES
|
||||
[B_MSG_SANDSTORM] = STRINGID_SANDSTORMRAGES,
|
||||
[B_MSG_HAIL] = STRINGID_HAILCONTINUES
|
||||
};
|
||||
|
||||
const u16 gSandStormHailDmgStringIds[] =
|
||||
{
|
||||
STRINGID_PKMNBUFFETEDBYSANDSTORM, STRINGID_PKMNPELTEDBYHAIL
|
||||
[B_MSG_SANDSTORM] = STRINGID_PKMNBUFFETEDBYSANDSTORM,
|
||||
[B_MSG_HAIL] = STRINGID_PKMNPELTEDBYHAIL
|
||||
};
|
||||
|
||||
const u16 gSandStormHailEndStringIds[] =
|
||||
{
|
||||
STRINGID_SANDSTORMSUBSIDED, STRINGID_HAILSTOPPED
|
||||
[B_MSG_SANDSTORM] = STRINGID_SANDSTORMSUBSIDED,
|
||||
[B_MSG_HAIL] = STRINGID_HAILSTOPPED
|
||||
};
|
||||
|
||||
const u16 gRainContinuesStringIds[] =
|
||||
{
|
||||
STRINGID_RAINCONTINUES, STRINGID_DOWNPOURCONTINUES, STRINGID_RAINSTOPPED
|
||||
[B_MSG_RAIN_CONTINUES] = STRINGID_RAINCONTINUES,
|
||||
[B_MSG_DOWNPOUR_CONTINUES] = STRINGID_DOWNPOURCONTINUES,
|
||||
[B_MSG_RAIN_STOPPED] = STRINGID_RAINSTOPPED
|
||||
};
|
||||
|
||||
const u16 gProtectLikeUsedStringIds[] =
|
||||
{
|
||||
STRINGID_PKMNPROTECTEDITSELF2, STRINGID_PKMNBRACEDITSELF, STRINGID_BUTITFAILED
|
||||
[B_MSG_PROTECTED_ITSELF] = STRINGID_PKMNPROTECTEDITSELF2,
|
||||
[B_MSG_BRACED_ITSELF] = STRINGID_PKMNBRACEDITSELF,
|
||||
[B_MSG_PROTECT_FAILED] = STRINGID_BUTITFAILED,
|
||||
};
|
||||
|
||||
const u16 gReflectLightScreenSafeguardStringIds[] =
|
||||
{
|
||||
STRINGID_BUTITFAILED, STRINGID_PKMNRAISEDDEF, STRINGID_PKMNRAISEDDEFALITTLE,
|
||||
STRINGID_PKMNRAISEDSPDEF, STRINGID_PKMNRAISEDSPDEFALITTLE, STRINGID_PKMNCOVEREDBYVEIL
|
||||
[B_MSG_SIDE_STATUS_FAILED] = STRINGID_BUTITFAILED,
|
||||
[B_MSG_SET_REFLECT_SINGLE] = STRINGID_PKMNRAISEDDEF,
|
||||
[B_MSG_SET_REFLECT_DOUBLE] = STRINGID_PKMNRAISEDDEFALITTLE,
|
||||
[B_MSG_SET_LIGHTSCREEN_SINGLE] = STRINGID_PKMNRAISEDSPDEF,
|
||||
[B_MSG_SET_LIGHTSCREEN_DOUBLE] = STRINGID_PKMNRAISEDSPDEFALITTLE,
|
||||
[B_MSG_SET_SAFEGUARD] = STRINGID_PKMNCOVEREDBYVEIL,
|
||||
};
|
||||
|
||||
const u16 gLeechSeedStringIds[] =
|
||||
{
|
||||
STRINGID_PKMNSEEDED, STRINGID_PKMNEVADEDATTACK,
|
||||
STRINGID_ITDOESNTAFFECT, STRINGID_PKMNSAPPEDBYLEECHSEED, STRINGID_ITSUCKEDLIQUIDOOZE,
|
||||
[B_MSG_LEECH_SEED_SET] = STRINGID_PKMNSEEDED,
|
||||
[B_MSG_LEECH_SEED_MISS] = STRINGID_PKMNEVADEDATTACK,
|
||||
[B_MSG_LEECH_SEED_FAIL] = STRINGID_ITDOESNTAFFECT,
|
||||
[B_MSG_LEECH_SEED_DRAIN] = STRINGID_PKMNSAPPEDBYLEECHSEED,
|
||||
[B_MSG_LEECH_SEED_OOZE] = STRINGID_ITSUCKEDLIQUIDOOZE,
|
||||
};
|
||||
|
||||
const u16 gRestUsedStringIds[] =
|
||||
{
|
||||
STRINGID_PKMNWENTTOSLEEP, STRINGID_PKMNSLEPTHEALTHY
|
||||
[B_MSG_REST] = STRINGID_PKMNWENTTOSLEEP,
|
||||
[B_MSG_REST_STATUSED] = STRINGID_PKMNSLEPTHEALTHY
|
||||
};
|
||||
|
||||
const u16 gUproarOverTurnStringIds[] =
|
||||
{
|
||||
STRINGID_PKMNMAKINGUPROAR, STRINGID_PKMNCALMEDDOWN
|
||||
[B_MSG_UPROAR_CONTINUES] = STRINGID_PKMNMAKINGUPROAR,
|
||||
[B_MSG_UPROAR_ENDS] = STRINGID_PKMNCALMEDDOWN
|
||||
};
|
||||
|
||||
const u16 gStockpileUsedStringIds[] =
|
||||
{
|
||||
STRINGID_PKMNSTOCKPILED, STRINGID_PKMNCANTSTOCKPILE,
|
||||
[B_MSG_STOCKPILED] = STRINGID_PKMNSTOCKPILED,
|
||||
[B_MSG_CANT_STOCKPILE] = STRINGID_PKMNCANTSTOCKPILE,
|
||||
};
|
||||
|
||||
const u16 gWokeUpStringIds[] =
|
||||
{
|
||||
STRINGID_PKMNWOKEUP, STRINGID_PKMNWOKEUPINUPROAR
|
||||
[B_MSG_WOKE_UP] = STRINGID_PKMNWOKEUP,
|
||||
[B_MSG_WOKE_UP_UPROAR] = STRINGID_PKMNWOKEUPINUPROAR
|
||||
};
|
||||
|
||||
const u16 gSwallowFailStringIds[] =
|
||||
{
|
||||
STRINGID_FAILEDTOSWALLOW, STRINGID_PKMNHPFULL
|
||||
[B_MSG_SWALLOW_FAILED] = STRINGID_FAILEDTOSWALLOW,
|
||||
[B_MSG_SWALLOW_FULL_HP] = STRINGID_PKMNHPFULL
|
||||
};
|
||||
|
||||
const u16 gUproarAwakeStringIds[] =
|
||||
{
|
||||
STRINGID_PKMNCANTSLEEPINUPROAR2, STRINGID_UPROARKEPTPKMNAWAKE, STRINGID_PKMNSTAYEDAWAKEUSING
|
||||
[B_MSG_CANT_SLEEP_UPROAR] = STRINGID_PKMNCANTSLEEPINUPROAR2,
|
||||
[B_MSG_UPROAR_KEPT_AWAKE] = STRINGID_UPROARKEPTPKMNAWAKE,
|
||||
[B_MSG_STAYED_AWAKE_USING] = STRINGID_PKMNSTAYEDAWAKEUSING,
|
||||
};
|
||||
|
||||
const u16 gStatUpStringIds[] =
|
||||
{
|
||||
STRINGID_PKMNSSTATCHANGED, STRINGID_PKMNSSTATCHANGED2, STRINGID_STATSWONTINCREASE,
|
||||
STRINGID_EMPTYSTRING3, STRINGID_USINGXTHEYOFZN, STRINGID_PKMNUSEDXTOGETPUMPED
|
||||
[B_MSG_ATTACKER_STAT_ROSE] = STRINGID_ATTACKERSSTATROSE,
|
||||
[B_MSG_DEFENDER_STAT_ROSE] = STRINGID_DEFENDERSSTATROSE,
|
||||
[B_MSG_STAT_WONT_INCREASE] = STRINGID_STATSWONTINCREASE,
|
||||
[B_MSG_STAT_ROSE_EMPTY] = STRINGID_EMPTYSTRING3,
|
||||
[B_MSG_STAT_ROSE_ITEM] = STRINGID_USINGITEMSTATOFPKMNROSE,
|
||||
[B_MSG_USED_DIRE_HIT] = STRINGID_PKMNUSEDXTOGETPUMPED,
|
||||
};
|
||||
|
||||
const u16 gStatDownStringIds[] =
|
||||
{
|
||||
STRINGID_PKMNSSTATCHANGED3, STRINGID_PKMNSSTATCHANGED4, STRINGID_STATSWONTDECREASE, STRINGID_EMPTYSTRING3
|
||||
[B_MSG_ATTACKER_STAT_FELL] = STRINGID_ATTACKERSSTATFELL,
|
||||
[B_MSG_DEFENDER_STAT_FELL] = STRINGID_DEFENDERSSTATFELL,
|
||||
[B_MSG_STAT_WONT_DECREASE] = STRINGID_STATSWONTDECREASE,
|
||||
[B_MSG_STAT_FELL_EMPTY] = STRINGID_EMPTYSTRING3,
|
||||
};
|
||||
|
||||
// Index read from sTWOTURN_STRINGID
|
||||
const u16 gFirstTurnOfTwoStringIds[] =
|
||||
{
|
||||
STRINGID_PKMNWHIPPEDWHIRLWIND, // MOVE_RAZOR_WIND
|
||||
STRINGID_PKMNTOOKSUNLIGHT, // MOVE_SOLAR_BEAM
|
||||
STRINGID_PKMNLOWEREDHEAD, // MOVE_SKULL_BASH
|
||||
STRINGID_PKMNISGLOWING, // MOVE_SKY_ATTACK
|
||||
STRINGID_PKMNFLEWHIGH, // MOVE_FLY
|
||||
STRINGID_PKMNDUGHOLE, // MOVE_DIG
|
||||
STRINGID_PKMNHIDUNDERWATER, // MOVE_DIVE
|
||||
STRINGID_PKMNSPRANGUP // MOVE_BOUNCE
|
||||
[B_MSG_TURN1_RAZOR_WIND] = STRINGID_PKMNWHIPPEDWHIRLWIND,
|
||||
[B_MSG_TURN1_SOLAR_BEAM] = STRINGID_PKMNTOOKSUNLIGHT,
|
||||
[B_MSG_TURN1_SKULL_BASH] = STRINGID_PKMNLOWEREDHEAD,
|
||||
[B_MSG_TURN1_SKY_ATTACK] = STRINGID_PKMNISGLOWING,
|
||||
[B_MSG_TURN1_FLY] = STRINGID_PKMNFLEWHIGH,
|
||||
[B_MSG_TURN1_DIG] = STRINGID_PKMNDUGHOLE,
|
||||
[B_MSG_TURN1_DIVE] = STRINGID_PKMNHIDUNDERWATER,
|
||||
[B_MSG_TURN1_BOUNCE] = STRINGID_PKMNSPRANGUP,
|
||||
};
|
||||
|
||||
// Index copied from move's index in gTrappingMoves
|
||||
@ -1016,89 +1051,109 @@ const u16 gWrappedStringIds[] =
|
||||
|
||||
const u16 gMistUsedStringIds[] =
|
||||
{
|
||||
STRINGID_PKMNSHROUDEDINMIST, STRINGID_BUTITFAILED
|
||||
[B_MSG_SET_MIST] = STRINGID_PKMNSHROUDEDINMIST,
|
||||
[B_MSG_MIST_FAILED] = STRINGID_BUTITFAILED
|
||||
};
|
||||
|
||||
const u16 gFocusEnergyUsedStringIds[] =
|
||||
{
|
||||
STRINGID_PKMNGETTINGPUMPED, STRINGID_BUTITFAILED
|
||||
[B_MSG_GETTING_PUMPED] = STRINGID_PKMNGETTINGPUMPED,
|
||||
[B_MSG_FOCUS_ENERGY_FAILED] = STRINGID_BUTITFAILED
|
||||
};
|
||||
|
||||
const u16 gTransformUsedStringIds[] =
|
||||
{
|
||||
STRINGID_PKMNTRANSFORMEDINTO, STRINGID_BUTITFAILED
|
||||
[B_MSG_TRANSFORMED] = STRINGID_PKMNTRANSFORMEDINTO,
|
||||
[B_MSG_TRANSFORM_FAILED] = STRINGID_BUTITFAILED
|
||||
};
|
||||
|
||||
const u16 gSubsituteUsedStringIds[] =
|
||||
{
|
||||
STRINGID_PKMNMADESUBSTITUTE, STRINGID_TOOWEAKFORSUBSTITUTE
|
||||
[B_MSG_SET_SUBSTITUTE] = STRINGID_PKMNMADESUBSTITUTE,
|
||||
[B_MSG_SUBSTITUTE_FAILED] = STRINGID_TOOWEAKFORSUBSTITUTE
|
||||
};
|
||||
|
||||
const u16 gGotPoisonedStringIds[] =
|
||||
{
|
||||
STRINGID_PKMNWASPOISONED, STRINGID_PKMNPOISONEDBY
|
||||
[B_MSG_STATUSED] = STRINGID_PKMNWASPOISONED,
|
||||
[B_MSG_STATUSED_BY_ABILITY] = STRINGID_PKMNPOISONEDBY
|
||||
};
|
||||
|
||||
const u16 gGotParalyzedStringIds[] =
|
||||
{
|
||||
STRINGID_PKMNWASPARALYZED, STRINGID_PKMNWASPARALYZEDBY
|
||||
[B_MSG_STATUSED] = STRINGID_PKMNWASPARALYZED,
|
||||
[B_MSG_STATUSED_BY_ABILITY] = STRINGID_PKMNWASPARALYZEDBY
|
||||
};
|
||||
|
||||
const u16 gFellAsleepStringIds[] =
|
||||
{
|
||||
STRINGID_PKMNFELLASLEEP, STRINGID_PKMNMADESLEEP,
|
||||
[B_MSG_STATUSED] = STRINGID_PKMNFELLASLEEP,
|
||||
[B_MSG_STATUSED_BY_ABILITY] = STRINGID_PKMNMADESLEEP,
|
||||
};
|
||||
|
||||
const u16 gGotBurnedStringIds[] =
|
||||
{
|
||||
STRINGID_PKMNWASBURNED, STRINGID_PKMNBURNEDBY
|
||||
[B_MSG_STATUSED] = STRINGID_PKMNWASBURNED,
|
||||
[B_MSG_STATUSED_BY_ABILITY] = STRINGID_PKMNBURNEDBY
|
||||
};
|
||||
|
||||
const u16 gGotFrozenStringIds[] =
|
||||
{
|
||||
STRINGID_PKMNWASFROZEN, STRINGID_PKMNFROZENBY
|
||||
[B_MSG_STATUSED] = STRINGID_PKMNWASFROZEN,
|
||||
[B_MSG_STATUSED_BY_ABILITY] = STRINGID_PKMNFROZENBY
|
||||
};
|
||||
|
||||
const u16 gGotDefrostedStringIds[] =
|
||||
{
|
||||
STRINGID_PKMNWASDEFROSTED2, STRINGID_PKMNWASDEFROSTEDBY
|
||||
[B_MSG_DEFROSTED] = STRINGID_PKMNWASDEFROSTED2,
|
||||
[B_MSG_DEFROSTED_BY_MOVE] = STRINGID_PKMNWASDEFROSTEDBY
|
||||
};
|
||||
|
||||
const u16 gKOFailedStringIds[] =
|
||||
{
|
||||
STRINGID_ATTACKMISSED, STRINGID_PKMNUNAFFECTED
|
||||
[B_MSG_KO_MISS] = STRINGID_ATTACKMISSED,
|
||||
[B_MSG_KO_UNAFFECTED] = STRINGID_PKMNUNAFFECTED
|
||||
};
|
||||
|
||||
const u16 gAttractUsedStringIds[] =
|
||||
{
|
||||
STRINGID_PKMNFELLINLOVE, STRINGID_PKMNSXINFATUATEDY
|
||||
[B_MSG_STATUSED] = STRINGID_PKMNFELLINLOVE,
|
||||
[B_MSG_STATUSED_BY_ABILITY] = STRINGID_PKMNSXINFATUATEDY
|
||||
};
|
||||
|
||||
const u16 gLeechSeedDrainStringIds[] =
|
||||
const u16 gAbsorbDrainStringIds[] =
|
||||
{
|
||||
STRINGID_PKMNENERGYDRAINED, STRINGID_ITSUCKEDLIQUIDOOZE
|
||||
[B_MSG_ABSORB] = STRINGID_PKMNENERGYDRAINED,
|
||||
[B_MSG_ABSORB_OOZE] = STRINGID_ITSUCKEDLIQUIDOOZE
|
||||
};
|
||||
|
||||
const u16 gSportsUsedStringIds[] =
|
||||
{
|
||||
STRINGID_ELECTRICITYWEAKENED, STRINGID_FIREWEAKENED
|
||||
[B_MSG_WEAKEN_ELECTRIC] = STRINGID_ELECTRICITYWEAKENED,
|
||||
[B_MSG_WEAKEN_FIRE] = STRINGID_FIREWEAKENED
|
||||
};
|
||||
|
||||
const u16 gPartyStatusHealStringIds[] =
|
||||
{
|
||||
STRINGID_BELLCHIMED, STRINGID_BELLCHIMED, STRINGID_BELLCHIMED, STRINGID_BELLCHIMED,
|
||||
// interesting how there are four instances of the same string
|
||||
STRINGID_SOOTHINGAROMA
|
||||
[B_MSG_BELL] = STRINGID_BELLCHIMED,
|
||||
[B_MSG_BELL_SOUNDPROOF_ATTACKER] = STRINGID_BELLCHIMED,
|
||||
[B_MSG_BELL_SOUNDPROOF_PARTNER] = STRINGID_BELLCHIMED,
|
||||
[B_MSG_BELL_BOTH_SOUNDPROOF] = STRINGID_BELLCHIMED,
|
||||
[B_MSG_SOOTHING_AROMA] = STRINGID_SOOTHINGAROMA
|
||||
};
|
||||
|
||||
const u16 gFutureMoveUsedStringIds[] =
|
||||
{
|
||||
STRINGID_PKMNFORESAWATTACK, STRINGID_PKMNCHOSEXASDESTINY
|
||||
[B_MSG_FUTURE_SIGHT] = STRINGID_PKMNFORESAWATTACK,
|
||||
[B_MSG_DOOM_DESIRE] = STRINGID_PKMNCHOSEXASDESTINY
|
||||
};
|
||||
|
||||
const u16 gBallEscapeStringIds[] =
|
||||
{
|
||||
STRINGID_PKMNBROKEFREE, STRINGID_ITAPPEAREDCAUGHT, STRINGID_AARGHALMOSTHADIT, STRINGID_SHOOTSOCLOSE
|
||||
[BALL_NO_SHAKES] = STRINGID_PKMNBROKEFREE,
|
||||
[BALL_1_SHAKE] = STRINGID_ITAPPEAREDCAUGHT,
|
||||
[BALL_2_SHAKES] = STRINGID_AARGHALMOSTHADIT,
|
||||
[BALL_3_SHAKES_FAIL] = STRINGID_SHOOTSOCLOSE
|
||||
};
|
||||
|
||||
// Overworld weathers that don't have an associated battle weather default to "It is raining."
|
||||
@ -1124,59 +1179,82 @@ const u16 gWeatherStartsStringIds[] =
|
||||
|
||||
const u16 gInobedientStringIds[] =
|
||||
{
|
||||
STRINGID_PKMNLOAFING, STRINGID_PKMNWONTOBEY, STRINGID_PKMNTURNEDAWAY,
|
||||
STRINGID_PKMNPRETENDNOTNOTICE, STRINGID_PKMNINCAPABLEOFPOWER
|
||||
[B_MSG_LOAFING] = STRINGID_PKMNLOAFING,
|
||||
[B_MSG_WONT_OBEY] = STRINGID_PKMNWONTOBEY,
|
||||
[B_MSG_TURNED_AWAY] = STRINGID_PKMNTURNEDAWAY,
|
||||
[B_MSG_PRETEND_NOT_NOTICE] = STRINGID_PKMNPRETENDNOTNOTICE,
|
||||
[B_MSG_INCAPABLE_OF_POWER] = STRINGID_PKMNINCAPABLEOFPOWER
|
||||
};
|
||||
|
||||
const u16 gSafariGetNearStringIds[] =
|
||||
{
|
||||
STRINGID_CREPTCLOSER, STRINGID_CANTGETCLOSER
|
||||
[B_MSG_CREPT_CLOSER] = STRINGID_CREPTCLOSER,
|
||||
[B_MSG_CANT_GET_CLOSER] = STRINGID_CANTGETCLOSER
|
||||
};
|
||||
|
||||
const u16 gSafariPokeblockResultStringIds[] =
|
||||
{
|
||||
STRINGID_PKMNCURIOUSABOUTX, STRINGID_PKMNENTHRALLEDBYX, STRINGID_PKMNIGNOREDX
|
||||
[B_MSG_MON_CURIOUS] = STRINGID_PKMNCURIOUSABOUTX,
|
||||
[B_MSG_MON_ENTHRALLED] = STRINGID_PKMNENTHRALLEDBYX,
|
||||
[B_MSG_MON_IGNORED] = STRINGID_PKMNIGNOREDX
|
||||
};
|
||||
|
||||
const u16 gTrainerItemCuredStatusStringIds[] =
|
||||
{
|
||||
STRINGID_PKMNSITEMSNAPPEDOUT, STRINGID_PKMNSITEMCUREDPARALYSIS, STRINGID_PKMNSITEMDEFROSTEDIT,
|
||||
STRINGID_PKMNSITEMHEALEDBURN, STRINGID_PKMNSITEMCUREDPOISON, STRINGID_PKMNSITEMWOKEIT
|
||||
[AI_HEAL_CONFUSION] = STRINGID_PKMNSITEMSNAPPEDOUT,
|
||||
[AI_HEAL_PARALYSIS] = STRINGID_PKMNSITEMCUREDPARALYSIS,
|
||||
[AI_HEAL_FREEZE] = STRINGID_PKMNSITEMDEFROSTEDIT,
|
||||
[AI_HEAL_BURN] = STRINGID_PKMNSITEMHEALEDBURN,
|
||||
[AI_HEAL_POISON] = STRINGID_PKMNSITEMCUREDPOISON,
|
||||
[AI_HEAL_SLEEP] = STRINGID_PKMNSITEMWOKEIT
|
||||
};
|
||||
|
||||
const u16 gBerryEffectStringIds[] =
|
||||
{
|
||||
STRINGID_PKMNSITEMCUREDPROBLEM, STRINGID_PKMNSITEMNORMALIZEDSTATUS
|
||||
[B_MSG_CURED_PROBLEM] = STRINGID_PKMNSITEMCUREDPROBLEM,
|
||||
[B_MSG_NORMALIZED_STATUS] = STRINGID_PKMNSITEMNORMALIZEDSTATUS
|
||||
};
|
||||
|
||||
const u16 gBRNPreventionStringIds[] =
|
||||
{
|
||||
STRINGID_PKMNSXPREVENTSBURNS, STRINGID_PKMNSXPREVENTSYSZ, STRINGID_PKMNSXHADNOEFFECTONY
|
||||
[B_MSG_ABILITY_PREVENTS_MOVE_STATUS] = STRINGID_PKMNSXPREVENTSBURNS,
|
||||
[B_MSG_ABILITY_PREVENTS_ABILITY_STATUS] = STRINGID_PKMNSXPREVENTSYSZ,
|
||||
[B_MSG_STATUS_HAD_NO_EFFECT] = STRINGID_PKMNSXHADNOEFFECTONY
|
||||
};
|
||||
|
||||
const u16 gPRLZPreventionStringIds[] =
|
||||
{
|
||||
STRINGID_PKMNPREVENTSPARALYSISWITH, STRINGID_PKMNSXPREVENTSYSZ, STRINGID_PKMNSXHADNOEFFECTONY
|
||||
[B_MSG_ABILITY_PREVENTS_MOVE_STATUS] = STRINGID_PKMNPREVENTSPARALYSISWITH,
|
||||
[B_MSG_ABILITY_PREVENTS_ABILITY_STATUS] = STRINGID_PKMNSXPREVENTSYSZ,
|
||||
[B_MSG_STATUS_HAD_NO_EFFECT] = STRINGID_PKMNSXHADNOEFFECTONY
|
||||
};
|
||||
|
||||
const u16 gPSNPreventionStringIds[] =
|
||||
{
|
||||
STRINGID_PKMNPREVENTSPOISONINGWITH, STRINGID_PKMNSXPREVENTSYSZ, STRINGID_PKMNSXHADNOEFFECTONY
|
||||
[B_MSG_ABILITY_PREVENTS_MOVE_STATUS] = STRINGID_PKMNPREVENTSPOISONINGWITH,
|
||||
[B_MSG_ABILITY_PREVENTS_ABILITY_STATUS] = STRINGID_PKMNSXPREVENTSYSZ,
|
||||
[B_MSG_STATUS_HAD_NO_EFFECT] = STRINGID_PKMNSXHADNOEFFECTONY
|
||||
};
|
||||
|
||||
const u16 gItemSwapStringIds[] =
|
||||
{
|
||||
STRINGID_PKMNOBTAINEDX, STRINGID_PKMNOBTAINEDX2, STRINGID_PKMNOBTAINEDXYOBTAINEDZ
|
||||
[B_MSG_ITEM_SWAP_TAKEN] = STRINGID_PKMNOBTAINEDX,
|
||||
[B_MSG_ITEM_SWAP_GIVEN] = STRINGID_PKMNOBTAINEDX2,
|
||||
[B_MSG_ITEM_SWAP_BOTH] = STRINGID_PKMNOBTAINEDXYOBTAINEDZ
|
||||
};
|
||||
|
||||
const u16 gFlashFireStringIds[] =
|
||||
{
|
||||
STRINGID_PKMNRAISEDFIREPOWERWITH, STRINGID_PKMNSXMADEYINEFFECTIVE
|
||||
[B_MSG_FLASH_FIRE_BOOST] = STRINGID_PKMNRAISEDFIREPOWERWITH,
|
||||
[B_MSG_FLASH_FIRE_NO_BOOST] = STRINGID_PKMNSXMADEYINEFFECTIVE
|
||||
};
|
||||
|
||||
const u16 gCaughtMonStringIds[] =
|
||||
{
|
||||
STRINGID_PKMNTRANSFERREDSOMEONESPC, STRINGID_PKMNTRANSFERREDLANETTESPC, STRINGID_PKMNBOXSOMEONESPCFULL, STRINGID_PKMNBOXLANETTESPCFULL,
|
||||
[B_MSG_SENT_SOMEONES_PC] = STRINGID_PKMNTRANSFERREDSOMEONESPC,
|
||||
[B_MSG_SENT_LANETTES_PC] = STRINGID_PKMNTRANSFERREDLANETTESPC,
|
||||
[B_MSG_SOMEONES_BOX_FULL] = STRINGID_PKMNBOXSOMEONESPCFULL,
|
||||
[B_MSG_LANETTES_BOX_FULL] = STRINGID_PKMNBOXLANETTESPCFULL,
|
||||
};
|
||||
|
||||
const u16 gTrappingMoves[] =
|
||||
@ -1218,7 +1296,8 @@ static const u8 sText_Defense[] = _("DEFENSE");
|
||||
static const u8 sText_SpAtk[] = _("SP. ATK");
|
||||
static const u8 sText_SpDef[] = _("SP. DEF");
|
||||
|
||||
const u8 * const gStatNamesTable2[] =
|
||||
// Unused
|
||||
static const u8 * const sStatNamesTable2[] =
|
||||
{
|
||||
sText_HP, sText_SpAtk, sText_Attack,
|
||||
sText_SpDef, sText_Defense, sText_Speed
|
||||
@ -1311,10 +1390,10 @@ static const u8 sText_PkmnEagerForMore[] = _("{B_SCR_ACTIVE_NAME_WITH_PREFIX} is
|
||||
|
||||
const u16 gBattlePalaceFlavorTextTable[] =
|
||||
{
|
||||
STRINGID_GLINTAPPEARSINEYE,
|
||||
STRINGID_PKMNGETTINGINTOPOSITION,
|
||||
STRINGID_PKMNBEGANGROWLINGDEEPLY,
|
||||
STRINGID_PKMNEAGERFORMORE
|
||||
[B_MSG_GLINT_IN_EYE] = STRINGID_GLINTAPPEARSINEYE,
|
||||
[B_MSG_GETTING_IN_POS] = STRINGID_PKMNGETTINGINTOPOSITION,
|
||||
[B_MSG_GROWL_DEEPLY] = STRINGID_PKMNBEGANGROWLINGDEEPLY,
|
||||
[B_MSG_EAGER_FOR_MORE] = STRINGID_PKMNEAGERFORMORE,
|
||||
};
|
||||
|
||||
static const u8 sText_RefIfNothingIsDecided[] = _("REFEREE: If nothing is decided in\n3 turns, we will go to judging!");
|
||||
|
@ -876,34 +876,33 @@ const ALIGNED(4) u8 gBattlePalaceNatureToMoveGroupLikelihood[NUM_NATURES][4] =
|
||||
[NATURE_QUIRKY] = PALACE_STYLE(56, 22, 56, 22) // 22%, 22%
|
||||
};
|
||||
|
||||
// Indices into gBattlePalaceFlavorTextTable
|
||||
static const u8 sBattlePalaceNatureToFlavorTextId[NUM_NATURES] =
|
||||
{
|
||||
[NATURE_HARDY] = 3,
|
||||
[NATURE_LONELY] = 0,
|
||||
[NATURE_BRAVE] = 1,
|
||||
[NATURE_ADAMANT] = 0,
|
||||
[NATURE_NAUGHTY] = 0,
|
||||
[NATURE_BOLD] = 1,
|
||||
[NATURE_DOCILE] = 3,
|
||||
[NATURE_RELAXED] = 0,
|
||||
[NATURE_IMPISH] = 1,
|
||||
[NATURE_LAX] = 2,
|
||||
[NATURE_TIMID] = 2,
|
||||
[NATURE_HASTY] = 0,
|
||||
[NATURE_SERIOUS] = 3,
|
||||
[NATURE_JOLLY] = 1,
|
||||
[NATURE_NAIVE] = 3,
|
||||
[NATURE_MODEST] = 1,
|
||||
[NATURE_MILD] = 2,
|
||||
[NATURE_QUIET] = 3,
|
||||
[NATURE_BASHFUL] = 3,
|
||||
[NATURE_RASH] = 2,
|
||||
[NATURE_CALM] = 1,
|
||||
[NATURE_GENTLE] = 0,
|
||||
[NATURE_SASSY] = 2,
|
||||
[NATURE_CAREFUL] = 2,
|
||||
[NATURE_QUIRKY] = 3,
|
||||
[NATURE_HARDY] = B_MSG_EAGER_FOR_MORE,
|
||||
[NATURE_LONELY] = B_MSG_GLINT_IN_EYE,
|
||||
[NATURE_BRAVE] = B_MSG_GETTING_IN_POS,
|
||||
[NATURE_ADAMANT] = B_MSG_GLINT_IN_EYE,
|
||||
[NATURE_NAUGHTY] = B_MSG_GLINT_IN_EYE,
|
||||
[NATURE_BOLD] = B_MSG_GETTING_IN_POS,
|
||||
[NATURE_DOCILE] = B_MSG_EAGER_FOR_MORE,
|
||||
[NATURE_RELAXED] = B_MSG_GLINT_IN_EYE,
|
||||
[NATURE_IMPISH] = B_MSG_GETTING_IN_POS,
|
||||
[NATURE_LAX] = B_MSG_GROWL_DEEPLY,
|
||||
[NATURE_TIMID] = B_MSG_GROWL_DEEPLY,
|
||||
[NATURE_HASTY] = B_MSG_GLINT_IN_EYE,
|
||||
[NATURE_SERIOUS] = B_MSG_EAGER_FOR_MORE,
|
||||
[NATURE_JOLLY] = B_MSG_GETTING_IN_POS,
|
||||
[NATURE_NAIVE] = B_MSG_EAGER_FOR_MORE,
|
||||
[NATURE_MODEST] = B_MSG_GETTING_IN_POS,
|
||||
[NATURE_MILD] = B_MSG_GROWL_DEEPLY,
|
||||
[NATURE_QUIET] = B_MSG_EAGER_FOR_MORE,
|
||||
[NATURE_BASHFUL] = B_MSG_EAGER_FOR_MORE,
|
||||
[NATURE_RASH] = B_MSG_GROWL_DEEPLY,
|
||||
[NATURE_CALM] = B_MSG_GETTING_IN_POS,
|
||||
[NATURE_GENTLE] = B_MSG_GLINT_IN_EYE,
|
||||
[NATURE_SASSY] = B_MSG_GROWL_DEEPLY,
|
||||
[NATURE_CAREFUL] = B_MSG_GROWL_DEEPLY,
|
||||
[NATURE_QUIRKY] = B_MSG_EAGER_FOR_MORE,
|
||||
};
|
||||
|
||||
static void Cmd_attackcanceler(void)
|
||||
@ -991,7 +990,7 @@ static void Cmd_attackcanceler(void)
|
||||
gMoveResultFlags |= MOVE_RESULT_MISSED;
|
||||
gLastLandedMoves[gBattlerTarget] = 0;
|
||||
gLastHitByType[gBattlerTarget] = 0;
|
||||
gBattleCommunication[6] = B_MSG_PROTECTED;
|
||||
gBattleCommunication[MISS_TYPE] = B_MSG_PROTECTED;
|
||||
gBattlescriptCurrInstr++;
|
||||
}
|
||||
else
|
||||
@ -1024,7 +1023,7 @@ static void Cmd_jumpifaffectedbyprotect(void)
|
||||
{
|
||||
gMoveResultFlags |= MOVE_RESULT_MISSED;
|
||||
JumpIfMoveFailed(5, 0);
|
||||
gBattleCommunication[6] = B_MSG_PROTECTED;
|
||||
gBattleCommunication[MISS_TYPE] = B_MSG_PROTECTED;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1039,7 +1038,7 @@ bool8 JumpIfMoveAffectedByProtect(u16 move)
|
||||
{
|
||||
gMoveResultFlags |= MOVE_RESULT_MISSED;
|
||||
JumpIfMoveFailed(7, move);
|
||||
gBattleCommunication[6] = B_MSG_PROTECTED;
|
||||
gBattleCommunication[MISS_TYPE] = B_MSG_PROTECTED;
|
||||
affected = TRUE;
|
||||
}
|
||||
return affected;
|
||||
@ -1172,9 +1171,9 @@ static void Cmd_accuracycheck(void)
|
||||
gMoveResultFlags |= MOVE_RESULT_MISSED;
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE &&
|
||||
(gBattleMoves[move].target == MOVE_TARGET_BOTH || gBattleMoves[move].target == MOVE_TARGET_FOES_AND_ALLY))
|
||||
gBattleCommunication[6] = B_MSG_AVOIDED_ATK;
|
||||
gBattleCommunication[MISS_TYPE] = B_MSG_AVOIDED_ATK;
|
||||
else
|
||||
gBattleCommunication[6] = B_MSG_MISSED;
|
||||
gBattleCommunication[MISS_TYPE] = B_MSG_MISSED;
|
||||
|
||||
CheckWonderGuardAndLevitate();
|
||||
}
|
||||
@ -1370,7 +1369,7 @@ static void Cmd_typecalc(void)
|
||||
gMoveResultFlags |= (MOVE_RESULT_MISSED | MOVE_RESULT_DOESNT_AFFECT_FOE);
|
||||
gLastLandedMoves[gBattlerTarget] = 0;
|
||||
gLastHitByType[gBattlerTarget] = 0;
|
||||
gBattleCommunication[6] = B_MSG_GROUND_MISS;
|
||||
gBattleCommunication[MISS_TYPE] = B_MSG_GROUND_MISS;
|
||||
RecordAbilityBattle(gBattlerTarget, gLastUsedAbility);
|
||||
}
|
||||
else
|
||||
@ -1406,7 +1405,7 @@ static void Cmd_typecalc(void)
|
||||
gMoveResultFlags |= MOVE_RESULT_MISSED;
|
||||
gLastLandedMoves[gBattlerTarget] = 0;
|
||||
gLastHitByType[gBattlerTarget] = 0;
|
||||
gBattleCommunication[6] = B_MSG_AVOIDED_DMG;
|
||||
gBattleCommunication[MISS_TYPE] = B_MSG_AVOIDED_DMG;
|
||||
RecordAbilityBattle(gBattlerTarget, gLastUsedAbility);
|
||||
}
|
||||
if (gMoveResultFlags & MOVE_RESULT_DOESNT_AFFECT_FOE)
|
||||
@ -1429,7 +1428,7 @@ static void CheckWonderGuardAndLevitate(void)
|
||||
if (gBattleMons[gBattlerTarget].ability == ABILITY_LEVITATE && moveType == TYPE_GROUND)
|
||||
{
|
||||
gLastUsedAbility = ABILITY_LEVITATE;
|
||||
gBattleCommunication[6] = B_MSG_GROUND_MISS;
|
||||
gBattleCommunication[MISS_TYPE] = B_MSG_GROUND_MISS;
|
||||
RecordAbilityBattle(gBattlerTarget, ABILITY_LEVITATE);
|
||||
return;
|
||||
}
|
||||
@ -1484,7 +1483,7 @@ static void CheckWonderGuardAndLevitate(void)
|
||||
if (((flags & 2) || !(flags & 1)) && gBattleMoves[gCurrentMove].power)
|
||||
{
|
||||
gLastUsedAbility = ABILITY_WONDER_GUARD;
|
||||
gBattleCommunication[6] = B_MSG_AVOIDED_DMG;
|
||||
gBattleCommunication[MISS_TYPE] = B_MSG_AVOIDED_DMG;
|
||||
RecordAbilityBattle(gBattlerTarget, ABILITY_WONDER_GUARD);
|
||||
}
|
||||
}
|
||||
@ -2019,9 +2018,9 @@ static void Cmd_resultmessage(void)
|
||||
if (gBattleControllerExecFlags)
|
||||
return;
|
||||
|
||||
if (gMoveResultFlags & MOVE_RESULT_MISSED && (!(gMoveResultFlags & MOVE_RESULT_DOESNT_AFFECT_FOE) || gBattleCommunication[6] > B_MSG_AVOIDED_ATK))
|
||||
if (gMoveResultFlags & MOVE_RESULT_MISSED && (!(gMoveResultFlags & MOVE_RESULT_DOESNT_AFFECT_FOE) || gBattleCommunication[MISS_TYPE] > B_MSG_AVOIDED_ATK))
|
||||
{
|
||||
stringId = gMissStringIds[gBattleCommunication[6]];
|
||||
stringId = gMissStringIds[gBattleCommunication[MISS_TYPE]];
|
||||
gBattleCommunication[MSG_DISPLAY] = 1;
|
||||
}
|
||||
else
|
||||
@ -2273,12 +2272,12 @@ void SetMoveEffect(bool8 primary, u8 certain)
|
||||
|
||||
if (gHitMarker & HITMARKER_IGNORE_SAFEGUARD)
|
||||
{
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 1;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_ABILITY_PREVENTS_ABILITY_STATUS;
|
||||
gHitMarker &= ~(HITMARKER_IGNORE_SAFEGUARD);
|
||||
}
|
||||
else
|
||||
{
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_ABILITY_PREVENTS_MOVE_STATUS;
|
||||
}
|
||||
RESET_RETURN
|
||||
}
|
||||
@ -2289,7 +2288,7 @@ void SetMoveEffect(bool8 primary, u8 certain)
|
||||
BattleScriptPush(gBattlescriptCurrInstr + 1);
|
||||
gBattlescriptCurrInstr = BattleScript_PSNPrevention;
|
||||
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 2;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_STATUS_HAD_NO_EFFECT;
|
||||
RESET_RETURN
|
||||
}
|
||||
if (IS_BATTLER_OF_TYPE(gEffectBattler, TYPE_POISON))
|
||||
@ -2314,12 +2313,12 @@ void SetMoveEffect(bool8 primary, u8 certain)
|
||||
gBattlescriptCurrInstr = BattleScript_BRNPrevention;
|
||||
if (gHitMarker & HITMARKER_IGNORE_SAFEGUARD)
|
||||
{
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 1;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_ABILITY_PREVENTS_ABILITY_STATUS;
|
||||
gHitMarker &= ~(HITMARKER_IGNORE_SAFEGUARD);
|
||||
}
|
||||
else
|
||||
{
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_ABILITY_PREVENTS_MOVE_STATUS;
|
||||
}
|
||||
RESET_RETURN
|
||||
}
|
||||
@ -2330,7 +2329,7 @@ void SetMoveEffect(bool8 primary, u8 certain)
|
||||
BattleScriptPush(gBattlescriptCurrInstr + 1);
|
||||
gBattlescriptCurrInstr = BattleScript_BRNPrevention;
|
||||
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 2;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_STATUS_HAD_NO_EFFECT;
|
||||
RESET_RETURN
|
||||
}
|
||||
if (IS_BATTLER_OF_TYPE(gEffectBattler, TYPE_FIRE))
|
||||
@ -2370,12 +2369,12 @@ void SetMoveEffect(bool8 primary, u8 certain)
|
||||
|
||||
if (gHitMarker & HITMARKER_IGNORE_SAFEGUARD)
|
||||
{
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 1;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_ABILITY_PREVENTS_ABILITY_STATUS;
|
||||
gHitMarker &= ~(HITMARKER_IGNORE_SAFEGUARD);
|
||||
}
|
||||
else
|
||||
{
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_ABILITY_PREVENTS_MOVE_STATUS;
|
||||
}
|
||||
RESET_RETURN
|
||||
}
|
||||
@ -2398,12 +2397,12 @@ void SetMoveEffect(bool8 primary, u8 certain)
|
||||
|
||||
if (gHitMarker & HITMARKER_IGNORE_SAFEGUARD)
|
||||
{
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 1;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_ABILITY_PREVENTS_ABILITY_STATUS;
|
||||
gHitMarker &= ~(HITMARKER_IGNORE_SAFEGUARD);
|
||||
}
|
||||
else
|
||||
{
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_ABILITY_PREVENTS_MOVE_STATUS;
|
||||
}
|
||||
RESET_RETURN
|
||||
}
|
||||
@ -2414,7 +2413,7 @@ void SetMoveEffect(bool8 primary, u8 certain)
|
||||
BattleScriptPush(gBattlescriptCurrInstr + 1);
|
||||
gBattlescriptCurrInstr = BattleScript_PSNPrevention;
|
||||
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 2;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_STATUS_HAD_NO_EFFECT;
|
||||
RESET_RETURN
|
||||
}
|
||||
if (gBattleMons[gEffectBattler].status1)
|
||||
@ -2453,12 +2452,12 @@ void SetMoveEffect(bool8 primary, u8 certain)
|
||||
|
||||
if (gHitMarker & HITMARKER_IGNORE_SAFEGUARD)
|
||||
{
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 1;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_STATUSED_BY_ABILITY;
|
||||
gHitMarker &= ~(HITMARKER_IGNORE_SAFEGUARD);
|
||||
}
|
||||
else
|
||||
{
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_STATUSED;
|
||||
}
|
||||
|
||||
// for synchronize
|
||||
@ -3579,7 +3578,7 @@ static void MoveValuesCleanUp(void)
|
||||
gBattleScripting.dmgMultiplier = 1;
|
||||
gCritMultiplier = 1;
|
||||
gBattleCommunication[MOVE_EFFECT_BYTE] = 0;
|
||||
gBattleCommunication[6] = 0;
|
||||
gBattleCommunication[MISS_TYPE] = 0;
|
||||
gHitMarker &= ~(HITMARKER_DESTINYBOND);
|
||||
gHitMarker &= ~(HITMARKER_SYNCHRONISE_EFFECT);
|
||||
}
|
||||
@ -4459,7 +4458,7 @@ static void Cmd_typecalc2(void)
|
||||
gLastUsedAbility = gBattleMons[gBattlerTarget].ability;
|
||||
gMoveResultFlags |= (MOVE_RESULT_MISSED | MOVE_RESULT_DOESNT_AFFECT_FOE);
|
||||
gLastLandedMoves[gBattlerTarget] = 0;
|
||||
gBattleCommunication[6] = B_MSG_GROUND_MISS;
|
||||
gBattleCommunication[MISS_TYPE] = B_MSG_GROUND_MISS;
|
||||
RecordAbilityBattle(gBattlerTarget, gLastUsedAbility);
|
||||
}
|
||||
else
|
||||
@ -4534,7 +4533,7 @@ static void Cmd_typecalc2(void)
|
||||
gLastUsedAbility = ABILITY_WONDER_GUARD;
|
||||
gMoveResultFlags |= MOVE_RESULT_MISSED;
|
||||
gLastLandedMoves[gBattlerTarget] = 0;
|
||||
gBattleCommunication[6] = B_MSG_AVOIDED_DMG;
|
||||
gBattleCommunication[MISS_TYPE] = B_MSG_AVOIDED_DMG;
|
||||
RecordAbilityBattle(gBattlerTarget, gLastUsedAbility);
|
||||
}
|
||||
if (gMoveResultFlags & MOVE_RESULT_DOESNT_AFFECT_FOE)
|
||||
@ -6446,19 +6445,19 @@ static void Cmd_setprotectlike(void) // protect and endure
|
||||
if (gBattleMoves[gCurrentMove].effect == EFFECT_PROTECT)
|
||||
{
|
||||
gProtectStructs[gBattlerAttacker].protected = 1;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_PROTECTED_ITSELF;
|
||||
}
|
||||
if (gBattleMoves[gCurrentMove].effect == EFFECT_ENDURE)
|
||||
{
|
||||
gProtectStructs[gBattlerAttacker].endured = 1;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 1;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_BRACED_ITSELF;
|
||||
}
|
||||
gDisableStructs[gBattlerAttacker].protectUses++;
|
||||
}
|
||||
else
|
||||
{
|
||||
gDisableStructs[gBattlerAttacker].protectUses = 0;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 2;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_PROTECT_FAILED;
|
||||
gMoveResultFlags |= MOVE_RESULT_MISSED;
|
||||
}
|
||||
|
||||
@ -6611,12 +6610,12 @@ static void Cmd_setrain(void)
|
||||
if (gBattleWeather & WEATHER_RAIN_ANY)
|
||||
{
|
||||
gMoveResultFlags |= MOVE_RESULT_MISSED;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 2;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_WEATHER_FAILED;
|
||||
}
|
||||
else
|
||||
{
|
||||
gBattleWeather = WEATHER_RAIN_TEMPORARY;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_STARTED_RAIN;
|
||||
gWishFutureKnock.weatherDuration = 5;
|
||||
}
|
||||
gBattlescriptCurrInstr++;
|
||||
@ -6627,7 +6626,7 @@ static void Cmd_setreflect(void)
|
||||
if (gSideStatuses[GET_BATTLER_SIDE(gBattlerAttacker)] & SIDE_STATUS_REFLECT)
|
||||
{
|
||||
gMoveResultFlags |= MOVE_RESULT_MISSED;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SIDE_STATUS_FAILED;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -6636,9 +6635,9 @@ static void Cmd_setreflect(void)
|
||||
gSideTimers[GET_BATTLER_SIDE(gBattlerAttacker)].reflectBattlerId = gBattlerAttacker;
|
||||
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE && CountAliveMonsInBattle(BATTLE_ALIVE_ATK_SIDE) == 2)
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 2;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SET_REFLECT_DOUBLE;
|
||||
else
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 1;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SET_REFLECT_SINGLE;
|
||||
}
|
||||
gBattlescriptCurrInstr++;
|
||||
}
|
||||
@ -6648,18 +6647,18 @@ static void Cmd_setseeded(void)
|
||||
if (gMoveResultFlags & MOVE_RESULT_NO_EFFECT || gStatuses3[gBattlerTarget] & STATUS3_LEECHSEED)
|
||||
{
|
||||
gMoveResultFlags |= MOVE_RESULT_MISSED;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 1;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_LEECH_SEED_MISS;
|
||||
}
|
||||
else if (IS_BATTLER_OF_TYPE(gBattlerTarget, TYPE_GRASS))
|
||||
{
|
||||
gMoveResultFlags |= MOVE_RESULT_MISSED;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 2;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_LEECH_SEED_FAIL;
|
||||
}
|
||||
else
|
||||
{
|
||||
gStatuses3[gBattlerTarget] |= gBattlerAttacker;
|
||||
gStatuses3[gBattlerTarget] |= STATUS3_LEECHSEED;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_LEECH_SEED_SET;
|
||||
}
|
||||
|
||||
gBattlescriptCurrInstr++;
|
||||
@ -6700,11 +6699,11 @@ static void Cmd_trysetrest(void)
|
||||
else
|
||||
{
|
||||
if (gBattleMons[gBattlerTarget].status1 & ((u8)(~STATUS1_SLEEP)))
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 1;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_REST_STATUSED;
|
||||
else
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_REST;
|
||||
|
||||
gBattleMons[gBattlerTarget].status1 = 3;
|
||||
gBattleMons[gBattlerTarget].status1 = STATUS1_SLEEP_TURN(3);
|
||||
BtlController_EmitSetMonData(0, REQUEST_STATUS_BATTLE, 0, 4, &gBattleMons[gActiveBattler].status1);
|
||||
MarkBattlerForControllerExec(gActiveBattler);
|
||||
gBattlescriptCurrInstr += 5;
|
||||
@ -6740,9 +6739,9 @@ bool8 UproarWakeUpCheck(u8 battlerId)
|
||||
if (gBattlerTarget == 0xFF)
|
||||
gBattlerTarget = i;
|
||||
else if (gBattlerTarget == i)
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_CANT_SLEEP_UPROAR;
|
||||
else
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 1;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_UPROAR_KEPT_AWAKE;
|
||||
|
||||
break;
|
||||
}
|
||||
@ -6765,7 +6764,7 @@ static void Cmd_jumpifcantmakeasleep(void)
|
||||
|| gBattleMons[gBattlerTarget].ability == ABILITY_VITAL_SPIRIT)
|
||||
{
|
||||
gLastUsedAbility = gBattleMons[gBattlerTarget].ability;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 2;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_STAYED_AWAKE_USING;
|
||||
gBattlescriptCurrInstr = jumpPtr;
|
||||
RecordAbilityBattle(gBattlerTarget, gLastUsedAbility);
|
||||
}
|
||||
@ -6780,7 +6779,7 @@ static void Cmd_stockpile(void)
|
||||
if (gDisableStructs[gBattlerAttacker].stockpileCounter == 3)
|
||||
{
|
||||
gMoveResultFlags |= MOVE_RESULT_MISSED;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 1;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_CANT_STOCKPILE;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -6788,7 +6787,7 @@ static void Cmd_stockpile(void)
|
||||
|
||||
PREPARE_BYTE_NUMBER_BUFFER(gBattleTextBuff1, 1, gDisableStructs[gBattlerAttacker].stockpileCounter)
|
||||
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_STOCKPILED;
|
||||
}
|
||||
gBattlescriptCurrInstr++;
|
||||
}
|
||||
@ -6802,7 +6801,7 @@ static void Cmd_stockpiletobasedamage(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gBattleCommunication[6] != B_MSG_PROTECTED)
|
||||
if (gBattleCommunication[MISS_TYPE] != B_MSG_PROTECTED)
|
||||
{
|
||||
gBattleMoveDamage = CalculateBaseDamage(&gBattleMons[gBattlerAttacker], &gBattleMons[gBattlerTarget], gCurrentMove,
|
||||
gSideStatuses[GET_BATTLER_SIDE(gBattlerTarget)], 0,
|
||||
@ -6826,14 +6825,14 @@ static void Cmd_stockpiletohpheal(void)
|
||||
if (gDisableStructs[gBattlerAttacker].stockpileCounter == 0)
|
||||
{
|
||||
gBattlescriptCurrInstr = jumpPtr;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SWALLOW_FAILED;
|
||||
}
|
||||
else if (gBattleMons[gBattlerAttacker].maxHP == gBattleMons[gBattlerAttacker].hp)
|
||||
{
|
||||
gDisableStructs[gBattlerAttacker].stockpileCounter = 0;
|
||||
gBattlescriptCurrInstr = jumpPtr;
|
||||
gBattlerTarget = gBattlerAttacker;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 1;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SWALLOW_FULL_HP;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -6985,9 +6984,9 @@ static u8 ChangeStatBuffs(s8 statValue, u8 statId, u8 flags, const u8 *BS_ptr)
|
||||
gBattleTextBuff2[index] = B_BUFF_EOS;
|
||||
|
||||
if (gBattleMons[gActiveBattler].statStages[statId] == MIN_STAT_STAGE)
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 2;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_STAT_WONT_DECREASE;
|
||||
else
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = (gBattlerTarget == gActiveBattler);
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = (gBattlerTarget == gActiveBattler); // B_MSG_ATTACKER_STAT_FELL or B_MSG_DEFENDER_STAT_FELL
|
||||
|
||||
}
|
||||
}
|
||||
@ -7012,9 +7011,9 @@ static u8 ChangeStatBuffs(s8 statValue, u8 statId, u8 flags, const u8 *BS_ptr)
|
||||
gBattleTextBuff2[index] = B_BUFF_EOS;
|
||||
|
||||
if (gBattleMons[gActiveBattler].statStages[statId] == MAX_STAT_STAGE)
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 2;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_STAT_WONT_INCREASE;
|
||||
else
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = (gBattlerTarget == gActiveBattler);
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = (gBattlerTarget == gActiveBattler); // B_MSG_ATTACKER_STAT_ROSE or B_MSG_DEFENDER_STAT_ROSE
|
||||
}
|
||||
|
||||
gBattleMons[gActiveBattler].statStages[statId] += statValue;
|
||||
@ -7023,10 +7022,10 @@ static u8 ChangeStatBuffs(s8 statValue, u8 statId, u8 flags, const u8 *BS_ptr)
|
||||
if (gBattleMons[gActiveBattler].statStages[statId] > MAX_STAT_STAGE)
|
||||
gBattleMons[gActiveBattler].statStages[statId] = MAX_STAT_STAGE;
|
||||
|
||||
if (gBattleCommunication[MULTISTRING_CHOOSER] == 2 && flags & STAT_BUFF_ALLOW_PTR)
|
||||
if (gBattleCommunication[MULTISTRING_CHOOSER] == B_MSG_STAT_WONT_INCREASE && flags & STAT_BUFF_ALLOW_PTR)
|
||||
gMoveResultFlags |= MOVE_RESULT_MISSED;
|
||||
|
||||
if (gBattleCommunication[MULTISTRING_CHOOSER] == 2 && !(flags & STAT_BUFF_ALLOW_PTR))
|
||||
if (gBattleCommunication[MULTISTRING_CHOOSER] == B_MSG_STAT_WONT_INCREASE && !(flags & STAT_BUFF_ALLOW_PTR))
|
||||
return STAT_BUFF_DIDNT_WORK;
|
||||
|
||||
return STAT_BUFF_WORKED;
|
||||
@ -7358,7 +7357,7 @@ static void Cmd_setlightscreen(void)
|
||||
if (gSideStatuses[GET_BATTLER_SIDE(gBattlerAttacker)] & SIDE_STATUS_LIGHTSCREEN)
|
||||
{
|
||||
gMoveResultFlags |= MOVE_RESULT_MISSED;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SIDE_STATUS_FAILED;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -7367,9 +7366,9 @@ static void Cmd_setlightscreen(void)
|
||||
gSideTimers[GET_BATTLER_SIDE(gBattlerAttacker)].lightscreenBattlerId = gBattlerAttacker;
|
||||
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE && CountAliveMonsInBattle(BATTLE_ALIVE_ATK_SIDE) == 2)
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 4;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SET_LIGHTSCREEN_DOUBLE;
|
||||
else
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 3;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SET_LIGHTSCREEN_SINGLE;
|
||||
}
|
||||
|
||||
gBattlescriptCurrInstr++;
|
||||
@ -7453,9 +7452,9 @@ static void Cmd_tryKO(void)
|
||||
{
|
||||
gMoveResultFlags |= MOVE_RESULT_MISSED;
|
||||
if (gBattleMons[gBattlerAttacker].level >= gBattleMons[gBattlerTarget].level)
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_KO_MISS;
|
||||
else
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 1;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_KO_UNAFFECTED;
|
||||
gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1);
|
||||
}
|
||||
}
|
||||
@ -7475,12 +7474,12 @@ static void Cmd_setsandstorm(void)
|
||||
if (gBattleWeather & WEATHER_SANDSTORM_ANY)
|
||||
{
|
||||
gMoveResultFlags |= MOVE_RESULT_MISSED;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 2;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_WEATHER_FAILED;
|
||||
}
|
||||
else
|
||||
{
|
||||
gBattleWeather = WEATHER_SANDSTORM_TEMPORARY;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 3;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_STARTED_SANDSTORM;
|
||||
gWishFutureKnock.weatherDuration = 5;
|
||||
}
|
||||
gBattlescriptCurrInstr++;
|
||||
@ -7621,14 +7620,14 @@ static void Cmd_setmist(void)
|
||||
if (gSideTimers[GET_BATTLER_SIDE(gBattlerAttacker)].mistTimer)
|
||||
{
|
||||
gMoveResultFlags |= MOVE_RESULT_FAILED;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 1;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_MIST_FAILED;
|
||||
}
|
||||
else
|
||||
{
|
||||
gSideTimers[GET_BATTLER_SIDE(gBattlerAttacker)].mistTimer = 5;
|
||||
gSideTimers[GET_BATTLER_SIDE(gBattlerAttacker)].mistBattlerId = gBattlerAttacker;
|
||||
gSideStatuses[GET_BATTLER_SIDE(gBattlerAttacker)] |= SIDE_STATUS_MIST;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SET_MIST;
|
||||
}
|
||||
gBattlescriptCurrInstr++;
|
||||
}
|
||||
@ -7638,12 +7637,12 @@ static void Cmd_setfocusenergy(void)
|
||||
if (gBattleMons[gBattlerAttacker].status2 & STATUS2_FOCUS_ENERGY)
|
||||
{
|
||||
gMoveResultFlags |= MOVE_RESULT_FAILED;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 1;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_FOCUS_ENERGY_FAILED;
|
||||
}
|
||||
else
|
||||
{
|
||||
gBattleMons[gBattlerAttacker].status2 |= STATUS2_FOCUS_ENERGY;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_GETTING_PUMPED;
|
||||
}
|
||||
gBattlescriptCurrInstr++;
|
||||
}
|
||||
@ -7656,7 +7655,7 @@ static void Cmd_transformdataexecution(void)
|
||||
|| gStatuses3[gBattlerTarget] & STATUS3_SEMI_INVULNERABLE)
|
||||
{
|
||||
gMoveResultFlags |= MOVE_RESULT_FAILED;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 1;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_TRANSFORM_FAILED;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -7688,7 +7687,7 @@ static void Cmd_transformdataexecution(void)
|
||||
gActiveBattler = gBattlerAttacker;
|
||||
BtlController_EmitResetActionMoveSelection(0, RESET_MOVE_SELECTION);
|
||||
MarkBattlerForControllerExec(gActiveBattler);
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_TRANSFORMED;
|
||||
}
|
||||
}
|
||||
|
||||
@ -7701,7 +7700,7 @@ static void Cmd_setsubstitute(void)
|
||||
if (gBattleMons[gBattlerAttacker].hp <= hp)
|
||||
{
|
||||
gBattleMoveDamage = 0;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 1;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SUBSTITUTE_FAILED;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -7712,7 +7711,7 @@ static void Cmd_setsubstitute(void)
|
||||
gBattleMons[gBattlerAttacker].status2 |= STATUS2_SUBSTITUTE;
|
||||
gBattleMons[gBattlerAttacker].status2 &= ~(STATUS2_WRAPPED);
|
||||
gDisableStructs[gBattlerAttacker].substituteHP = gBattleMoveDamage;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SET_SUBSTITUTE;
|
||||
gHitMarker |= HITMARKER_IGNORE_SUBSTITUTE;
|
||||
}
|
||||
|
||||
@ -8250,7 +8249,7 @@ static void Cmd_healpartystatus(void)
|
||||
struct Pokemon *party;
|
||||
s32 i;
|
||||
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_BELL;
|
||||
|
||||
if (GetBattlerSide(gBattlerAttacker) == B_SIDE_PLAYER)
|
||||
party = gPlayerParty;
|
||||
@ -8265,7 +8264,7 @@ static void Cmd_healpartystatus(void)
|
||||
else
|
||||
{
|
||||
RecordAbilityBattle(gBattlerAttacker, gBattleMons[gBattlerAttacker].ability);
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] |= 1;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] |= B_MSG_BELL_SOUNDPROOF_ATTACKER;
|
||||
}
|
||||
|
||||
gActiveBattler = gBattleScripting.battler = GetBattlerAtPosition(GetBattlerPosition(gBattlerAttacker) ^ BIT_FLANK);
|
||||
@ -8281,10 +8280,12 @@ static void Cmd_healpartystatus(void)
|
||||
else
|
||||
{
|
||||
RecordAbilityBattle(gActiveBattler, gBattleMons[gActiveBattler].ability);
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] |= 2;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] |= B_MSG_BELL_SOUNDPROOF_PARTNER;
|
||||
}
|
||||
}
|
||||
|
||||
// Because the above MULTISTRING_CHOOSER are ORd, if both are set then it will be B_MSG_BELL_BOTH_SOUNDPROOF
|
||||
|
||||
for (i = 0; i < PARTY_SIZE; i++)
|
||||
{
|
||||
u16 species = GetMonData(&party[i], MON_DATA_SPECIES2);
|
||||
@ -8310,7 +8311,7 @@ static void Cmd_healpartystatus(void)
|
||||
}
|
||||
else // Aromatherapy
|
||||
{
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 4;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SOOTHING_AROMA;
|
||||
toHeal = 0x3F;
|
||||
|
||||
gBattleMons[gBattlerAttacker].status1 = 0;
|
||||
@ -8514,14 +8515,14 @@ static void Cmd_setsafeguard(void)
|
||||
if (gSideStatuses[GET_BATTLER_SIDE(gBattlerAttacker)] & SIDE_STATUS_SAFEGUARD)
|
||||
{
|
||||
gMoveResultFlags |= MOVE_RESULT_MISSED;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SIDE_STATUS_FAILED;
|
||||
}
|
||||
else
|
||||
{
|
||||
gSideStatuses[GET_BATTLER_SIDE(gBattlerAttacker)] |= SIDE_STATUS_SAFEGUARD;
|
||||
gSideTimers[GET_BATTLER_SIDE(gBattlerAttacker)].safeguardTimer = 5;
|
||||
gSideTimers[GET_BATTLER_SIDE(gBattlerAttacker)].safeguardBattlerId = gBattlerAttacker;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 5;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SET_SAFEGUARD;
|
||||
}
|
||||
|
||||
gBattlescriptCurrInstr++;
|
||||
@ -8630,12 +8631,12 @@ static void Cmd_setsunny(void)
|
||||
if (gBattleWeather & WEATHER_SUN_ANY)
|
||||
{
|
||||
gMoveResultFlags |= MOVE_RESULT_MISSED;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 2;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_WEATHER_FAILED;
|
||||
}
|
||||
else
|
||||
{
|
||||
gBattleWeather = WEATHER_SUN_TEMPORARY;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 4;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_STARTED_SUNLIGHT;
|
||||
gWishFutureKnock.weatherDuration = 5;
|
||||
}
|
||||
|
||||
@ -8806,9 +8807,9 @@ static void Cmd_trysetfutureattack(void)
|
||||
gWishFutureKnock.futureSightDmg[gBattlerTarget] = gWishFutureKnock.futureSightDmg[gBattlerTarget] * 15 / 10;
|
||||
|
||||
if (gCurrentMove == MOVE_DOOM_DESIRE)
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 1;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_DOOM_DESIRE;
|
||||
else
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_FUTURE_SIGHT;
|
||||
|
||||
gBattlescriptCurrInstr += 5;
|
||||
}
|
||||
@ -8912,12 +8913,12 @@ static void Cmd_sethail(void)
|
||||
if (gBattleWeather & WEATHER_HAIL_ANY)
|
||||
{
|
||||
gMoveResultFlags |= MOVE_RESULT_MISSED;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 2;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_WEATHER_FAILED;
|
||||
}
|
||||
else
|
||||
{
|
||||
gBattleWeather = WEATHER_HAIL;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 5;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_STARTED_HAIL;
|
||||
gWishFutureKnock.weatherDuration = 5;
|
||||
}
|
||||
|
||||
@ -8928,7 +8929,7 @@ static void Cmd_jumpifattackandspecialattackcannotfall(void) // memento
|
||||
{
|
||||
if (gBattleMons[gBattlerTarget].statStages[STAT_ATK] == MIN_STAT_STAGE
|
||||
&& gBattleMons[gBattlerTarget].statStages[STAT_SPATK] == MIN_STAT_STAGE
|
||||
&& gBattleCommunication[6] != B_MSG_PROTECTED)
|
||||
&& gBattleCommunication[MISS_TYPE] != B_MSG_PROTECTED)
|
||||
{
|
||||
gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1);
|
||||
}
|
||||
@ -9113,11 +9114,11 @@ static void Cmd_tryswapitems(void) // trick
|
||||
PREPARE_ITEM_BUFFER(gBattleTextBuff2, oldItemAtk)
|
||||
|
||||
if (oldItemAtk != 0 && *newItemAtk != 0)
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 2; // attacker's item -> <- target's item
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_ITEM_SWAP_BOTH; // attacker's item -> <- target's item
|
||||
else if (oldItemAtk == 0 && *newItemAtk != 0)
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 0; // nothing -> <- target's item
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_ITEM_SWAP_TAKEN; // nothing -> <- target's item
|
||||
else
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 1; // attacker's item -> <- nothing
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_ITEM_SWAP_GIVEN; // attacker's item -> <- nothing
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -9605,7 +9606,7 @@ static void Cmd_settypebasedhalvers(void) // water and mud sport
|
||||
if (!(gStatuses3[gBattlerAttacker] & STATUS3_MUDSPORT))
|
||||
{
|
||||
gStatuses3[gBattlerAttacker] |= STATUS3_MUDSPORT;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_WEAKEN_ELECTRIC;
|
||||
worked = TRUE;
|
||||
}
|
||||
}
|
||||
@ -9614,7 +9615,7 @@ static void Cmd_settypebasedhalvers(void) // water and mud sport
|
||||
if (!(gStatuses3[gBattlerAttacker] & STATUS3_WATERSPORT))
|
||||
{
|
||||
gStatuses3[gBattlerAttacker] |= STATUS3_WATERSPORT;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 1;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_WEAKEN_FIRE;
|
||||
worked = TRUE;
|
||||
}
|
||||
}
|
||||
@ -9883,7 +9884,6 @@ static void Cmd_handleballthrow(void)
|
||||
else // not caught
|
||||
{
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = shakes;
|
||||
// Maybe inject SpriteCB_TestBallThrow here
|
||||
gBattlescriptCurrInstr = BattleScript_ShakeBallThrow;
|
||||
}
|
||||
}
|
||||
@ -9896,7 +9896,7 @@ static void Cmd_givecaughtmon(void)
|
||||
{
|
||||
if (!ShouldShowBoxWasFullMessage())
|
||||
{
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SENT_SOMEONES_PC;
|
||||
StringCopy(gStringVar1, GetBoxNamePtr(VarGet(VAR_PC_BOX_TO_SEND_MON)));
|
||||
GetMonData(&gEnemyParty[gBattlerPartyIndexes[gBattlerAttacker ^ BIT_SIDE]], MON_DATA_NICKNAME, gStringVar2);
|
||||
}
|
||||
@ -9905,9 +9905,10 @@ static void Cmd_givecaughtmon(void)
|
||||
StringCopy(gStringVar1, GetBoxNamePtr(VarGet(VAR_PC_BOX_TO_SEND_MON))); // box the mon was sent to
|
||||
GetMonData(&gEnemyParty[gBattlerPartyIndexes[gBattlerAttacker ^ BIT_SIDE]], MON_DATA_NICKNAME, gStringVar2);
|
||||
StringCopy(gStringVar3, GetBoxNamePtr(GetPCBoxToSendMon())); //box the mon was going to be sent to
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 2;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SOMEONES_BOX_FULL;
|
||||
}
|
||||
|
||||
// Change to B_MSG_SENT_LANETTES_PC or B_MSG_LANETTES_BOX_FULL
|
||||
if (FlagGet(FLAG_SYS_PC_LANETTE))
|
||||
gBattleCommunication[MULTISTRING_CHOOSER]++;
|
||||
}
|
||||
|
@ -666,7 +666,7 @@ void BattleTv_SetDataBasedOnString(u16 stringId)
|
||||
case STRINGID_CRITICALHIT:
|
||||
AddMovePoints(PTS_CRITICAL_HIT, moveSlot, 0, 0);
|
||||
break;
|
||||
case STRINGID_PKMNSSTATCHANGED:
|
||||
case STRINGID_ATTACKERSSTATROSE:
|
||||
if (gBattleTextBuff1[2] != 0)
|
||||
{
|
||||
if (*statStringId == STRINGID_STATSHARPLY)
|
||||
@ -675,7 +675,7 @@ void BattleTv_SetDataBasedOnString(u16 stringId)
|
||||
AddMovePoints(PTS_STAT_INCREASE_1, moveSlot, gBattleTextBuff1[2] - 1, 0);
|
||||
}
|
||||
break;
|
||||
case STRINGID_PKMNSSTATCHANGED2:
|
||||
case STRINGID_DEFENDERSSTATROSE:
|
||||
if (gBattleTextBuff1[2] != 0)
|
||||
{
|
||||
if (gBattlerAttacker == gBattlerTarget)
|
||||
@ -691,11 +691,11 @@ void BattleTv_SetDataBasedOnString(u16 stringId)
|
||||
}
|
||||
}
|
||||
break;
|
||||
case STRINGID_PKMNSSTATCHANGED3:
|
||||
case STRINGID_ATTACKERSSTATFELL:
|
||||
if (gBattleTextBuff1[2] != 0)
|
||||
AddMovePoints(PTS_STAT_DECREASE_SELF, moveSlot, gBattleTextBuff1[2] - 1, 0);
|
||||
break;
|
||||
case STRINGID_PKMNSSTATCHANGED4:
|
||||
case STRINGID_DEFENDERSSTATFELL:
|
||||
if (gBattleTextBuff1[2] != 0)
|
||||
{
|
||||
if (*statStringId == STRINGID_STATHARSHLY)
|
||||
|
@ -49,7 +49,29 @@ extern const u8 *const gBattlescriptsForRunningByItem[];
|
||||
extern const u8 *const gBattlescriptsForUsingItem[];
|
||||
extern const u8 *const gBattlescriptsForSafariActions[];
|
||||
|
||||
static const u8 sPkblToEscapeFactor[][3] = {{0, 0, 0}, {3, 5, 0}, {2, 3, 0}, {1, 2, 0}, {1, 1, 0}};
|
||||
static const u8 sPkblToEscapeFactor[][3] = {
|
||||
{
|
||||
[B_MSG_MON_CURIOUS] = 0,
|
||||
[B_MSG_MON_ENTHRALLED] = 0,
|
||||
[B_MSG_MON_IGNORED] = 0
|
||||
},{
|
||||
[B_MSG_MON_CURIOUS] = 3,
|
||||
[B_MSG_MON_ENTHRALLED] = 5,
|
||||
[B_MSG_MON_IGNORED] = 0
|
||||
},{
|
||||
[B_MSG_MON_CURIOUS] = 2,
|
||||
[B_MSG_MON_ENTHRALLED] = 3,
|
||||
[B_MSG_MON_IGNORED] = 0
|
||||
},{
|
||||
[B_MSG_MON_CURIOUS] = 1,
|
||||
[B_MSG_MON_ENTHRALLED] = 2,
|
||||
[B_MSG_MON_IGNORED] = 0
|
||||
},{
|
||||
[B_MSG_MON_CURIOUS] = 1,
|
||||
[B_MSG_MON_ENTHRALLED] = 1,
|
||||
[B_MSG_MON_IGNORED] = 0
|
||||
}
|
||||
};
|
||||
static const u8 sGoNearCounterToCatchFactor[] = {4, 3, 2, 1};
|
||||
static const u8 sGoNearCounterToEscapeFactor[] = {4, 4, 4, 4};
|
||||
|
||||
@ -238,10 +260,9 @@ void HandleAction_UseMove(void)
|
||||
}
|
||||
}
|
||||
|
||||
// choose battlescript
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_PALACE
|
||||
&& gProtectStructs[gBattlerAttacker].palaceUnableToUseMove)
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_PALACE && gProtectStructs[gBattlerAttacker].palaceUnableToUseMove)
|
||||
{
|
||||
// Battle Palace, select battle script for failure to use move
|
||||
if (gBattleMons[gBattlerAttacker].hp == 0)
|
||||
{
|
||||
gCurrentActionFuncId = B_ACTION_FINISHED;
|
||||
@ -249,13 +270,13 @@ void HandleAction_UseMove(void)
|
||||
}
|
||||
else if (gPalaceSelectionBattleScripts[gBattlerAttacker] != NULL)
|
||||
{
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 4;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_INCAPABLE_OF_POWER;
|
||||
gBattlescriptCurrInstr = gPalaceSelectionBattleScripts[gBattlerAttacker];
|
||||
gPalaceSelectionBattleScripts[gBattlerAttacker] = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 4;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_INCAPABLE_OF_POWER;
|
||||
gBattlescriptCurrInstr = BattleScript_MoveUsedLoafingAround;
|
||||
}
|
||||
}
|
||||
@ -318,26 +339,29 @@ void HandleAction_UseItem(void)
|
||||
case AI_ITEM_HEAL_HP:
|
||||
break;
|
||||
case AI_ITEM_CURE_CONDITION:
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
|
||||
if (*(gBattleStruct->AI_itemFlags + gBattlerAttacker / 2) & 1)
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = AI_HEAL_CONFUSION;
|
||||
if (*(gBattleStruct->AI_itemFlags + gBattlerAttacker / 2) & (1 << AI_HEAL_CONFUSION))
|
||||
{
|
||||
if (*(gBattleStruct->AI_itemFlags + gBattlerAttacker / 2) & 0x3E)
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 5;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = AI_HEAL_SLEEP;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Check for other statuses, stopping at first (shouldn't be more than one)
|
||||
while (!(*(gBattleStruct->AI_itemFlags + gBattlerAttacker / 2) & 1))
|
||||
{
|
||||
*(gBattleStruct->AI_itemFlags + gBattlerAttacker / 2) >>= 1;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER]++;
|
||||
// MULTISTRING_CHOOSER will be either AI_HEAL_PARALYSIS, AI_HEAL_FREEZE,
|
||||
// AI_HEAL_BURN, AI_HEAL_POISON, or AI_HEAL_SLEEP
|
||||
}
|
||||
}
|
||||
break;
|
||||
case AI_ITEM_X_STAT:
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 4;
|
||||
if (*(gBattleStruct->AI_itemFlags + (gBattlerAttacker >> 1)) & 0x80)
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_STAT_ROSE_ITEM;
|
||||
if (*(gBattleStruct->AI_itemFlags + (gBattlerAttacker >> 1)) & (1 << AI_DIRE_HIT))
|
||||
{
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 5;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_USED_DIRE_HIT;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -356,9 +380,9 @@ void HandleAction_UseItem(void)
|
||||
break;
|
||||
case AI_ITEM_GUARD_SPECS:
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE)
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 2;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 2; // Going OOB for gMistUsedStringIds?
|
||||
else
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SET_MIST;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -479,7 +503,7 @@ void HandleAction_Run(void)
|
||||
if (!TryRunFromBattle(gBattlerAttacker)) // failed to run away
|
||||
{
|
||||
ClearFuryCutterDestinyBondGrudge(gBattlerAttacker);
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 3;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_CANT_ESCAPE_2;
|
||||
gBattlescriptCurrInstr = BattleScript_PrintFailedToRunString;
|
||||
gCurrentActionFuncId = B_ACTION_EXEC_SCRIPT;
|
||||
}
|
||||
@ -488,7 +512,7 @@ void HandleAction_Run(void)
|
||||
{
|
||||
if (gBattleMons[gBattlerAttacker].status2 & (STATUS2_WRAPPED | STATUS2_ESCAPE_PREVENTION))
|
||||
{
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 4;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_ATTACKER_CANT_ESCAPE;
|
||||
gBattlescriptCurrInstr = BattleScript_PrintFailedToRunString;
|
||||
gCurrentActionFuncId = B_ACTION_EXEC_SCRIPT;
|
||||
}
|
||||
@ -567,11 +591,11 @@ void HandleAction_GoNear(void)
|
||||
if (gBattleStruct->safariGoNearCounter < 3)
|
||||
{
|
||||
gBattleStruct->safariGoNearCounter++;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_CREPT_CLOSER;
|
||||
}
|
||||
else
|
||||
{
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 1; // Can't get closer.
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_CANT_GET_CLOSER;
|
||||
}
|
||||
gBattlescriptCurrInstr = gBattlescriptsForSafariActions[1];
|
||||
gCurrentActionFuncId = B_ACTION_EXEC_SCRIPT;
|
||||
@ -1295,20 +1319,20 @@ u8 DoFieldEndTurnEffects(void)
|
||||
{
|
||||
gBattleWeather &= ~WEATHER_RAIN_TEMPORARY;
|
||||
gBattleWeather &= ~WEATHER_RAIN_DOWNPOUR;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 2;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_RAIN_STOPPED;
|
||||
}
|
||||
else if (gBattleWeather & WEATHER_RAIN_DOWNPOUR)
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 1;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_DOWNPOUR_CONTINUES;
|
||||
else
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_RAIN_CONTINUES;
|
||||
}
|
||||
else if (gBattleWeather & WEATHER_RAIN_DOWNPOUR)
|
||||
{
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 1;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_DOWNPOUR_CONTINUES;
|
||||
}
|
||||
else
|
||||
{
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_RAIN_CONTINUES;
|
||||
}
|
||||
|
||||
BattleScriptExecute(BattleScript_RainContinuesOrEnds);
|
||||
@ -1330,7 +1354,7 @@ u8 DoFieldEndTurnEffects(void)
|
||||
}
|
||||
|
||||
gBattleScripting.animArg1 = B_ANIM_SANDSTORM_CONTINUES;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_SANDSTORM;
|
||||
BattleScriptExecute(gBattlescriptCurrInstr);
|
||||
effect++;
|
||||
}
|
||||
@ -1368,7 +1392,7 @@ u8 DoFieldEndTurnEffects(void)
|
||||
}
|
||||
|
||||
gBattleScripting.animArg1 = B_ANIM_HAIL_CONTINUES;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 1;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_HAIL;
|
||||
BattleScriptExecute(gBattlescriptCurrInstr);
|
||||
effect++;
|
||||
}
|
||||
@ -1597,16 +1621,16 @@ u8 DoBattlerEndTurnEffects(void)
|
||||
if (WasUnableToUseMove(gActiveBattler))
|
||||
{
|
||||
CancelMultiTurnMoves(gActiveBattler);
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 1;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_UPROAR_ENDS;
|
||||
}
|
||||
else if (gBattleMons[gActiveBattler].status2 & STATUS2_UPROAR)
|
||||
{
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_UPROAR_CONTINUES;
|
||||
gBattleMons[gActiveBattler].status2 |= STATUS2_MULTIPLETURNS;
|
||||
}
|
||||
else
|
||||
{
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 1;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_UPROAR_ENDS;
|
||||
CancelMultiTurnMoves(gActiveBattler);
|
||||
}
|
||||
BattleScriptExecute(BattleScript_PrintUproarOverTurns);
|
||||
@ -1749,9 +1773,9 @@ bool8 HandleWishPerishSongOnTurnEnd(void)
|
||||
&& gBattleMons[gActiveBattler].hp != 0)
|
||||
{
|
||||
if (gWishFutureKnock.futureSightMove[gActiveBattler] == MOVE_FUTURE_SIGHT)
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_FUTURE_SIGHT;
|
||||
else
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 1;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_DOOM_DESIRE;
|
||||
|
||||
PREPARE_MOVE_BUFFER(gBattleTextBuff1, gWishFutureKnock.futureSightMove[gActiveBattler]);
|
||||
|
||||
@ -1962,7 +1986,7 @@ u8 AtkCanceller_UnableToUseMove(void)
|
||||
gBattleMons[gBattlerAttacker].status1 &= ~(STATUS1_SLEEP);
|
||||
gBattleMons[gBattlerAttacker].status2 &= ~(STATUS2_NIGHTMARE);
|
||||
BattleScriptPushCursor();
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 1;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_WOKE_UP_UPROAR;
|
||||
gBattlescriptCurrInstr = BattleScript_MoveUsedWokeUp;
|
||||
effect = 2;
|
||||
}
|
||||
@ -1990,7 +2014,7 @@ u8 AtkCanceller_UnableToUseMove(void)
|
||||
{
|
||||
gBattleMons[gBattlerAttacker].status2 &= ~(STATUS2_NIGHTMARE);
|
||||
BattleScriptPushCursor();
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_WOKE_UP;
|
||||
gBattlescriptCurrInstr = BattleScript_MoveUsedWokeUp;
|
||||
effect = 2;
|
||||
}
|
||||
@ -2019,7 +2043,7 @@ u8 AtkCanceller_UnableToUseMove(void)
|
||||
gBattleMons[gBattlerAttacker].status1 &= ~(STATUS1_FREEZE);
|
||||
BattleScriptPushCursor();
|
||||
gBattlescriptCurrInstr = BattleScript_MoveUsedUnfroze;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_DEFROSTED;
|
||||
}
|
||||
effect = 2;
|
||||
}
|
||||
@ -2030,7 +2054,7 @@ u8 AtkCanceller_UnableToUseMove(void)
|
||||
{
|
||||
CancelMultiTurnMoves(gBattlerAttacker);
|
||||
gHitMarker |= HITMARKER_UNABLE_TO_USE_MOVE;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_LOAFING;
|
||||
gBattlescriptCurrInstr = BattleScript_MoveUsedLoafingAround;
|
||||
gMoveResultFlags |= MOVE_RESULT_MISSED;
|
||||
effect = 1;
|
||||
@ -2103,12 +2127,14 @@ u8 AtkCanceller_UnableToUseMove(void)
|
||||
{
|
||||
if (Random() & 1)
|
||||
{
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
|
||||
// The MULTISTRING_CHOOSER is used here as a bool to signal
|
||||
// to BattleScript_MoveUsedIsConfused whether or not damage was taken
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = FALSE;
|
||||
BattleScriptPushCursor();
|
||||
}
|
||||
else // confusion dmg
|
||||
{
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 1;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = TRUE;
|
||||
gBattlerTarget = gBattlerAttacker;
|
||||
gBattleMoveDamage = CalculateBaseDamage(&gBattleMons[gBattlerAttacker], &gBattleMons[gBattlerAttacker], MOVE_POUND, 0, 40, 0, gBattlerAttacker, gBattlerAttacker);
|
||||
gProtectStructs[gBattlerAttacker].confusionSelfDmg = 1;
|
||||
@ -2195,7 +2221,7 @@ u8 AtkCanceller_UnableToUseMove(void)
|
||||
gBattleMons[gBattlerAttacker].status1 &= ~(STATUS1_FREEZE);
|
||||
BattleScriptPushCursor();
|
||||
gBattlescriptCurrInstr = BattleScript_MoveUsedUnfroze;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 1;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_DEFROSTED_BY_MOVE;
|
||||
}
|
||||
effect = 2;
|
||||
}
|
||||
@ -2593,7 +2619,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u8 ability, u8 special, u16 moveA
|
||||
if (gBattleMons[battler].statStages[STAT_SPEED] < MAX_STAT_STAGE && gDisableStructs[battler].isFirstTurn != 2)
|
||||
{
|
||||
gBattleMons[battler].statStages[STAT_SPEED]++;
|
||||
gBattleScripting.animArg1 = 0x11;
|
||||
gBattleScripting.animArg1 = 14 + STAT_SPEED;
|
||||
gBattleScripting.animArg2 = 0;
|
||||
BattleScriptPushCursorAndCallback(BattleScript_SpeedBoostActivates);
|
||||
gBattleScripting.battler = battler;
|
||||
@ -2655,7 +2681,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u8 ability, u8 special, u16 moveA
|
||||
{
|
||||
if (!(gBattleResources->flags->flags[battler] & RESOURCE_FLAG_FLASH_FIRE))
|
||||
{
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_FLASH_FIRE_BOOST;
|
||||
if (gProtectStructs[gBattlerAttacker].notFirstStrike)
|
||||
gBattlescriptCurrInstr = BattleScript_FlashFireBoost;
|
||||
else
|
||||
@ -2666,7 +2692,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u8 ability, u8 special, u16 moveA
|
||||
}
|
||||
else
|
||||
{
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 1;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_FLASH_FIRE_NO_BOOST;
|
||||
if (gProtectStructs[gBattlerAttacker].notFirstStrike)
|
||||
gBattlescriptCurrInstr = BattleScript_FlashFireBoost;
|
||||
else
|
||||
@ -3431,7 +3457,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn)
|
||||
|
||||
gEffectBattler = battlerId;
|
||||
SET_STATCHANGER(STAT_ATK, 1, FALSE);
|
||||
gBattleScripting.animArg1 = 0xE + STAT_ATK;
|
||||
gBattleScripting.animArg1 = 14 + STAT_ATK;
|
||||
gBattleScripting.animArg2 = 0;
|
||||
BattleScriptExecute(BattleScript_BerryStatRaiseEnd2);
|
||||
effect = ITEM_STATS_CHANGE;
|
||||
@ -3445,7 +3471,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn)
|
||||
|
||||
gEffectBattler = battlerId;
|
||||
SET_STATCHANGER(STAT_DEF, 1, FALSE);
|
||||
gBattleScripting.animArg1 = 0xE + STAT_DEF;
|
||||
gBattleScripting.animArg1 = 14 + STAT_DEF;
|
||||
gBattleScripting.animArg2 = 0;
|
||||
BattleScriptExecute(BattleScript_BerryStatRaiseEnd2);
|
||||
effect = ITEM_STATS_CHANGE;
|
||||
@ -3459,7 +3485,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn)
|
||||
|
||||
gEffectBattler = battlerId;
|
||||
SET_STATCHANGER(STAT_SPEED, 1, FALSE);
|
||||
gBattleScripting.animArg1 = 0xE + STAT_SPEED;
|
||||
gBattleScripting.animArg1 = 14 + STAT_SPEED;
|
||||
gBattleScripting.animArg2 = 0;
|
||||
BattleScriptExecute(BattleScript_BerryStatRaiseEnd2);
|
||||
effect = ITEM_STATS_CHANGE;
|
||||
@ -3473,7 +3499,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn)
|
||||
|
||||
gEffectBattler = battlerId;
|
||||
SET_STATCHANGER(STAT_SPATK, 1, FALSE);
|
||||
gBattleScripting.animArg1 = 0xE + STAT_SPATK;
|
||||
gBattleScripting.animArg1 = 14 + STAT_SPATK;
|
||||
gBattleScripting.animArg2 = 0;
|
||||
BattleScriptExecute(BattleScript_BerryStatRaiseEnd2);
|
||||
effect = ITEM_STATS_CHANGE;
|
||||
@ -3487,7 +3513,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn)
|
||||
|
||||
gEffectBattler = battlerId;
|
||||
SET_STATCHANGER(STAT_SPDEF, 1, FALSE);
|
||||
gBattleScripting.animArg1 = 0xE + STAT_SPDEF;
|
||||
gBattleScripting.animArg1 = 14 + STAT_SPDEF;
|
||||
gBattleScripting.animArg2 = 0;
|
||||
BattleScriptExecute(BattleScript_BerryStatRaiseEnd2);
|
||||
effect = ITEM_STATS_CHANGE;
|
||||
@ -3622,9 +3648,9 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn)
|
||||
i++;
|
||||
}
|
||||
if (!(i > 1))
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_CURED_PROBLEM;
|
||||
else
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 1;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_NORMALIZED_STATUS;
|
||||
gBattleMons[battlerId].status1 = 0;
|
||||
gBattleMons[battlerId].status2 &= ~(STATUS2_CONFUSION);
|
||||
BattleScriptExecute(BattleScript_BerryCureChosenStatusEnd2);
|
||||
@ -3637,7 +3663,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn)
|
||||
gBattleMons[battlerId].status2 &= ~(STATUS2_INFATUATION);
|
||||
StringCopy(gBattleTextBuff1, gStatusConditionString_LoveJpn);
|
||||
BattleScriptExecute(BattleScript_BerryCureChosenStatusEnd2);
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_CURED_PROBLEM;
|
||||
effect = ITEM_EFFECT_OTHER;
|
||||
}
|
||||
break;
|
||||
@ -3740,7 +3766,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn)
|
||||
gBattleMons[battlerId].status2 &= ~(STATUS2_INFATUATION);
|
||||
StringCopy(gBattleTextBuff1, gStatusConditionString_LoveJpn);
|
||||
BattleScriptPushCursor();
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_CURED_PROBLEM;
|
||||
gBattlescriptCurrInstr = BattleScript_BerryCureChosenStatusRet;
|
||||
effect = ITEM_EFFECT_OTHER;
|
||||
}
|
||||
@ -3776,7 +3802,7 @@ u8 ItemBattleEffects(u8 caseID, u8 battlerId, bool8 moveTurn)
|
||||
gBattleMons[battlerId].status1 = 0;
|
||||
gBattleMons[battlerId].status2 &= ~(STATUS2_CONFUSION);
|
||||
BattleScriptPushCursor();
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_CURED_PROBLEM;
|
||||
gBattlescriptCurrInstr = BattleScript_BerryCureChosenStatusRet;
|
||||
effect = ITEM_STATUS_CHANGE;
|
||||
}
|
||||
@ -4016,7 +4042,9 @@ u8 IsMonDisobedient(void)
|
||||
calc = CheckMoveLimitations(gBattlerAttacker, gBitTable[gCurrMovePos], 0xFF);
|
||||
if (calc == 0xF) // all moves cannot be used
|
||||
{
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = Random() & 3;
|
||||
// Randomly select, then print a disobedient string
|
||||
// B_MSG_LOAFING, B_MSG_WONT_OBEY, B_MSG_TURNED_AWAY, or B_MSG_PRETEND_NOT_NOTICE
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = Random() & (NUM_LOAF_STRINGS - 1);
|
||||
gBattlescriptCurrInstr = BattleScript_MoveUsedLoafingAround;
|
||||
return 1;
|
||||
}
|
||||
@ -4024,7 +4052,7 @@ u8 IsMonDisobedient(void)
|
||||
{
|
||||
do
|
||||
{
|
||||
gCurrMovePos = gChosenMovePos = Random() & 3;
|
||||
gCurrMovePos = gChosenMovePos = Random() & (MAX_MON_MOVES - 1);
|
||||
} while (gBitTable[gCurrMovePos] & calc);
|
||||
|
||||
gCalledMove = gBattleMons[gBattlerAttacker].moves[gCurrMovePos];
|
||||
@ -4065,7 +4093,9 @@ u8 IsMonDisobedient(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = Random() & 3;
|
||||
// Randomly select, then print a disobedient string
|
||||
// B_MSG_LOAFING, B_MSG_WONT_OBEY, B_MSG_TURNED_AWAY, or B_MSG_PRETEND_NOT_NOTICE
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = Random() & (NUM_LOAF_STRINGS - 1);
|
||||
gBattlescriptCurrInstr = BattleScript_MoveUsedLoafingAround;
|
||||
return 1;
|
||||
}
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include "constants/abilities.h"
|
||||
#include "random.h"
|
||||
#include "battle_scripts.h"
|
||||
#include "constants/battle_string_ids.h"
|
||||
|
||||
void AllocateBattleResources(void)
|
||||
{
|
||||
@ -136,7 +137,7 @@ u32 sub_805725C(u8 battlerId)
|
||||
gBattleMons[battlerId].status1 &= ~(STATUS1_SLEEP);
|
||||
gBattleMons[battlerId].status2 &= ~(STATUS2_NIGHTMARE);
|
||||
BattleScriptPushCursor();
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 1;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_WOKE_UP_UPROAR;
|
||||
gBattlescriptCurrInstr = BattleScript_MoveUsedWokeUp;
|
||||
effect = 2;
|
||||
}
|
||||
@ -163,7 +164,7 @@ u32 sub_805725C(u8 battlerId)
|
||||
{
|
||||
gBattleMons[battlerId].status2 &= ~(STATUS2_NIGHTMARE);
|
||||
BattleScriptPushCursor();
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_WOKE_UP;
|
||||
gBattlescriptCurrInstr = BattleScript_MoveUsedWokeUp;
|
||||
effect = 2;
|
||||
}
|
||||
@ -183,7 +184,7 @@ u32 sub_805725C(u8 battlerId)
|
||||
gBattleMons[battlerId].status1 &= ~(STATUS1_FREEZE);
|
||||
BattleScriptPushCursor();
|
||||
gBattlescriptCurrInstr = BattleScript_MoveUsedUnfroze;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_DEFROSTED;
|
||||
}
|
||||
effect = 2;
|
||||
}
|
||||
|
@ -5366,7 +5366,7 @@ static void BufferStatRoseMessage(s32 arg0)
|
||||
gBattlerTarget = gBattlerInMenuId;
|
||||
StringCopy(gBattleTextBuff1, gStatNamesTable[sStatsToRaise[arg0]]);
|
||||
StringCopy(gBattleTextBuff2, gText_StatRose);
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gText_PkmnsStatChanged2);
|
||||
BattleStringExpandPlaceholdersToDisplayedString(gText_DefendersStatRose);
|
||||
}
|
||||
|
||||
u8 *UseStatIncreaseItem(u16 itemId)
|
||||
|
Loading…
Reference in New Issue
Block a user