This commit is contained in:
Kermalis 2025-11-22 02:39:56 -05:00
parent 471f319060
commit 114cc7a3c6
112 changed files with 2030 additions and 1964 deletions

View File

@ -105,12 +105,69 @@ enum DungeonID
DUNGEON_INVALID, // 99
};
enum PrefightKind
enum CutsceneKind
{
PREFIGHT_NONE,
PREFIGHT_SKARMORY_ATTEMPT1,
PREFIGHT_SKARMORY_ATTEMPT2,
PREFIGHT_SKARMORY_GONE,
CUTSCENE_NONE,
CUTSCENE_MT_STEEL_ATTEMPT1,
CUTSCENE_MT_STEEL_ATTEMPT2,
CUTSCENE_MT_STEEL_POSTSTORY,
CUTSCENE_SINISTER_WOODS_ATTEMPT1,
CUTSCENE_SINISTER_WOODS_ATTEMPT2,
CUTSCENE_SINISTER_WOODS_POSTSTORY,
CUTSCENE_MT_THUNDER_PEAK_ATTEMPT1,
CUTSCENE_MT_THUNDER_PEAK_ATTEMPT2,
CUTSCENE_MT_THUNDER_PEAK_POSTSTORY,
CUTSCENE_MT_BLAZE_PEAK_ATTEMPT1,
CUTSCENE_MT_BLAZE_PEAK_ATTEMPT2,
CUTSCENE_MT_BLAZE_PEAK_POSTSTORY,
CUTSCENE_FROSTY_GROTTO_ATTEMPT1,
CUTSCENE_FROSTY_GROTTO_ATTEMPT2,
CUTSCENE_FROSTY_GROTTO_POSTSTORY,
CUTSCENE_MT_FREEZE_PEAK,
CUTSCENE_MT_FREEZE_PEAK_POSTSTORY,
CUTSCENE_MAGMA_CAVERN_PIT_ATTEMPT1,
CUTSCENE_MAGMA_CAVERN_PIT_ATTEMPT2,
CUTSCENE_MAGMA_CAVERN_PIT_POSTSTORY,
CUTSCENE_MAGMA_CAVERN_MID,
CUTSCENE_MAGMA_CAVERN_MID_POSTSTORY,
CUTSCENE_SKY_TOWER_SUMMIT_ATTEMPT1,
CUTSCENE_SKY_TOWER_SUMMIT_ATTEMPT2,
CUTSCENE_SKY_TOWER_SUMMIT_POSTSTORY,
CUTSCENE_UPROAR_FOREST_ATTEMPT1,
CUTSCENE_UPROAR_FOREST_ATTEMPT2,
CUTSCENE_UPROAR_FOREST_POSTSTORY,
CUTSCENE_WESTERN_CAVE_ATTEMPT1,
CUTSCENE_WESTERN_CAVE_ATTEMPT2,
CUTSCENE_WESTERN_CAVE_POSTSTORY,
CUTSCENE_FIERY_FIELD_ATTEMPT1,
CUTSCENE_FIERY_FIELD_ATTEMPT2,
CUTSCENE_FIERY_FIELD_POSTSTORY,
CUTSCENE_LIGHTNING_FIELD_ATTEMPT1,
CUTSCENE_LIGHTNING_FIELD_ATTEMPT2,
CUTSCENE_LIGHTNING_FIELD_POSTSTORY,
CUTSCENE_NORTHWIND_FIELD_ATTEMPT1,
CUTSCENE_NORTHWIND_FIELD_ATTEMPT2,
CUTSCENE_NORTHWIND_FIELD_POSTSTORY,
CUTSCENE_MT_FARAWAY,
CUTSCENE_MT_FARAWAY_POSTSTORY,
CUTSCENE_NORTHERN_RANGE_ATTEMPT1,
CUTSCENE_NORTHERN_RANGE_ATTEMPT2,
CUTSCENE_NORTHERN_RANGE_POSTSTORY,
CUTSCENE_REGIROCK,
CUTSCENE_REGICE,
CUTSCENE_REGISTEEL,
CUTSCENE_JIRACHI,
CUTSCENE_JIRACHI_POSTSTORY,
CUTSCENE_SILVER_TRENCH,
CUTSCENE_STORMY_SEA,
CUTSCENE_METEOR_CAVE,
CUTSCENE_PURITY_FOREST,
CUTSCENE_MAZE_BOSS,
CUTSCENE_MEDICHAM,
CUTSCENE_MEDICHAM_POSTSTORY,
CUTSCENE_HOWLING_FOREST,
CUTSCENE_HOWLING_FOREST_POSTSTORY,
CUTSCENE_MAX
};
#define DUNGEON_FIRST_MAZE DUNGEON_NORMAL_MAZE_2

View File

@ -6,7 +6,7 @@
#include "structs/str_stat_index.h"
s32 sub_80416E0(PixelPos *pos, u32 param_2, bool8 param_3);
void sub_804178C(u8 param_1);
void sub_804178C_Async(u8 param_1);
u32 EntityGetStatusSprites(Entity *entity);
void sub_8041888(u8 param_1);
void UpdateStatusIconFlags(Entity *entity);

View File

@ -6,6 +6,6 @@
extern u8 gUnknown_202F32C;
extern u8 gUnknown_202F32D;
bool8 ExecuteEntityDungeonAction(Entity *entity);
bool8 ExecuteEntityDungeonAction_Async(Entity *entity);
#endif

View File

@ -3,14 +3,14 @@
#include "structs/dungeon_entity.h"
void HandlePickUpPlayerAction(Entity *entity);
void HandleSetItemAction(Entity *param_1, bool8 param_2);
void HandleUnsetItemAction(Entity *entity, bool8 enableMessage);
void HandleGiveItemAction(Entity *param_1);
void HandleTakeItemAction(Entity *param_1);
void sub_8066BD4(Entity *param_1);
void HandlePickUpPlayerAction_Async(Entity *entity);
void HandleSetItemAction_Async(Entity *param_1, bool8 param_2);
void HandleUnsetItemAction_Async(Entity *entity, bool8 enableMessage);
void HandleGiveItemAction_Async(Entity *param_1);
void HandleTakeItemAction_Async(Entity *param_1);
void sub_8066BD4_Async(Entity *param_1);
void HandleUseItemAction(Entity *param_1);
void HandlePlaceItemAction(Entity *entity);
void HandlePlaceItemAction_Async(Entity *entity);
void sub_8066E14(Entity *entity);
void sub_8066FA4(Entity *entity);
void sub_8067110(Entity *entity);

View File

@ -17,7 +17,7 @@ void ChooseAIMove(Entity *pokemon);
s32 AIConsiderMove(struct AIPossibleMove *aiPossibleMove, Entity *pokemon, Move *move);
bool8 IsTargetInRange(Entity *pokemon, Entity *targetPokemon, s32 direction, s32 maxRange);
void HandleUseMoveAIAction(Entity *target);
void HandleUseOrbAction(Entity *pokemon);
void HandleUseOrbAction_Async(Entity *pokemon);
s16 GetMoveTargetAndRangeForPokemon(Entity *pokemon, Move *move, bool32 isAI);
#endif

View File

@ -17,7 +17,7 @@ void sub_80847D4(void);
bool8 ShouldShowDungeonBanner(void);
void sub_80848F0(void);
void DisplayPreFightDialogue(void);
void sub_8084E00(Entity *entity, u8 param_2, bool8 param_3);
void sub_8084E00_Async(Entity *entity, u8 param_2, bool8 param_3);
void sub_8085140(void);
bool8 sub_808529C(s32 speciesId_);
void sub_8085374(void);
@ -42,7 +42,7 @@ void sub_8085EB0(void);
u32 sub_8085EC8(s16 param_1,u32 param_2,u32 param_3,DungeonPos *param_4, bool32 param_5);
void sub_8085F44(s32 param_1);
void sub_8085F78(void);
bool8 sub_80860A8(u8 id);
bool8 ItemInInventoryOrHeld(u8 id);
void sub_8086130(void);
void sub_80861A8(Entity *a0);
void sub_80861B8(Entity *a0, u8 r1, s32 direction);

View File

@ -124,7 +124,7 @@ void sub_808B030(u8);
void sub_808B0B0(u8);
void sub_808B2F4(void);
void sub_808B35C(void);
void sub_808B3E4(u8, u8, u8);
void sub_808B3E4_Async(u8, u8, u8);
void sub_808BDEC(void);
void sub_808BE70(u8, u8, u8);
void sub_808C10C(void);

View File

@ -4,12 +4,12 @@
#include "structs/dungeon_entity.h"
#include "structs/str_damage.h"
void HandleDealingDamage(Entity *attacker, Entity *target, struct DamageStruct *dmgStruct, bool32 isFalseSwipe, bool32 giveExp, s16 dungeonExitReason, bool32 arg8, s32 argC);
void HandleDealingDamage_Async(Entity *attacker, Entity *target, struct DamageStruct *dmgStruct, bool32 isFalseSwipe, bool32 giveExp, s16 dungeonExitReason, bool32 arg8, s32 argC);
s32 WeightWeakTypePicker(Entity *user, Entity *target, u8 moveType);
void CalcDamage(Entity *attacker, Entity *target, u8 moveType, s32 movePower, s32 critChance, struct DamageStruct *dmgStruct, s24_8 arg8, u16 moveId, bool8 arg_10);
void sub_806F2BC(Entity *attacker, Entity *target, u8 moveType, s32 a2, struct DamageStruct *dmgStruct);
void DealDamageToEntity(Entity *entity, s32 dmg, s32 residualDmgType, s32 dungeonExitReason);
void sub_806F370(Entity *pokemon, Entity *target, s32 dmg, s32 giveExp, bool8 *tookNoDamage, u8 moveType, s16 dungeonExitReason, s32 residualDmgType, s32 arg_10, s32 arg_14);
void DealDamageToEntity_Async(Entity *entity, s32 dmg, s32 residualDmgType, s32 dungeonExitReason);
void sub_806F370_Async(Entity *pokemon, Entity *target, s32 dmg, s32 giveExp, bool8 *tookNoDamage, u8 moveType, s16 dungeonExitReason, s32 residualDmgType, s32 arg_10, s32 arg_14);
void SetShopkeeperAggression(Entity *pokemon, Entity *target);
void sub_806F480(Entity *pokemon, bool8 attackEnemies);
u8 sub_806F4A4(Entity *pokemon, u8 type);

View File

@ -7,8 +7,8 @@
extern const s16 gSpeedTurns[NUM_SPEED_COUNTERS][25];
void RunFractionalTurn(bool8 param_1);
void sub_80444F4(Entity *pokemon);
void RunFractionalTurn_Async(bool8 param_1);
void sub_80444F4_Async(Entity *pokemon);
bool8 IsFloorOver(void);
bool8 sub_8044B84(void);

View File

@ -5,9 +5,9 @@
#include "structs/str_position.h"
void sub_8074FB0(Entity *entity, s32 a1, DungeonPos *pos);
bool8 DisplayActions(Entity *a0);
bool8 DisplayActions_Async(Entity *a0);
void sub_8075680(bool8 unused);
bool8 CheckEntityTileForInteraction(Entity *entity);
void TryTriggerMonsterHouseWithMsg(Entity *pokemon, bool8 forcedMonsterHouse);
void TryTriggerMonsterHouseWithMsg_Async(Entity *pokemon, bool8 forcedMonsterHouse);
#endif

View File

@ -13,7 +13,7 @@ void sub_8045C18(u8 *buffer, Item *item);
#define FORCE_STICKY_NEVER 2
void CreateItemWithStickyChance(Item *item, u8 itemID, u32 forceSticky);
void CreateFloorItems(void);
void TryLeaderItemPickUp(struct DungeonPos *pos, bool8 printMsg);
void TryLeaderItemPickUp_Async(struct DungeonPos *pos, bool8 printMsg);
bool8 SpawnItem(DungeonPos *pos, Item *item, bool8 a2);
bool8 RemoveGroundItem(DungeonPos *pos, bool8 a2);
bool8 sub_80462AC(Entity * entity, u8 hallucinating, u8 a2, u8 a3, u8 a4);

View File

@ -34,21 +34,20 @@ void sub_8052210(bool8 a0);
void sub_805229C(void);
// These functions display the string if certain conditions are met. The conditions differ depending on the function. The string is then saved to the message log.
void LogMessageByIdWithPopupCheckUser(Entity *pokemon, const u8 *str);
void TryDisplayDungeonLoggableMessage2(Entity *pokemon, const u8 *str);
void TryDisplayDungeonLoggableMessage3(Entity *attacker, Entity *target, const u8 *str);
void TryDisplayDungeonLoggableMessage4(Entity *attacker, Entity *target, const u8 *str);
void LogMessageByIdWithPopupCheckUserUnknown(Entity *pokemon, DungeonPos *pos, const u8 *str);
void LogMessageByIdWithPopupCheckUser_Async(Entity *pokemon, const u8 *str);
void TryDisplayDungeonLoggableMessage3_Async(Entity *attacker, Entity *target, const u8 *str);
void TryDisplayDungeonLoggableMessage4_Async(Entity *attacker, Entity *target, const u8 *str);
void LogMessageByIdWithPopupCheckUserUnknown_Async(Entity *pokemon, DungeonPos *pos, const u8 *str);
// As opposed to the above - these always display the string and save it in the message log. False/True stand for an unknown argument. Not sure what the practical difference is between these.
void DisplayDungeonLoggableMessage(Entity *pokemon, const u8 *str);
void DisplayDungeonLoggableMessageFalse(Entity *pokemon, const u8 *str);
void DisplayDungeonLoggableMessageTrue(Entity *pokemon, const u8 *str);
void DisplayDungeonLoggableMessageFalse_Async(Entity *pokemon, const u8 *str);
void DisplayDungeonLoggableMessageTrue_Async(Entity *pokemon, const u8 *str);
void xxx_draw_string_80524F0(void);
void sub_80526D0(s32 r0);
void sub_8052740(s32 a0);
void DisplayDungeonMessage(struct MonDialogueSpriteInfo *monSpriteInfo, const u8 *str, bool8 a2);
void DisplayDungeonMessage_Async(struct MonDialogueSpriteInfo *monSpriteInfo, const u8 *str, bool8 a2);
void DisplayDungeonDialogue(const struct DungeonDialogueStruct *dialogueInfo);
bool32 DisplayDungeonYesNoMessage(struct MonDialogueSpriteInfo *monSpriteInfo, const u8 *str, bool32 defaultYes);
s32 DisplayDungeonMenuMessage(struct MonDialogueSpriteInfo *monSpriteInfo, const u8 *str, const MenuItem *menuItems, u16 unkArg);

View File

@ -35,7 +35,7 @@ void sub_8068A84(Pokemon *pokemon);
void sub_8068BDC(bool8 a0);
void sub_8068F28(void);
void sub_8068F80(void);
void HandleFaint(Entity *entity, s32 dungeonExitReason, Entity *param_3);
void HandleFaint_Async(Entity *entity, s32 dungeonExitReason, Entity *param_3);
void sub_80694C0(Entity *target,s32 x,s32 y,u8 param_4);
void sub_80695EC(Entity *param_1,int x,int y);
Entity * sub_8069660(Entity *target);

View File

@ -6,7 +6,7 @@
bool8 TryRecruitMonster(Entity *attacker, Entity *target);
bool8 IsMonsterRecruitable(s32 species);
bool8 HandleMonsterJoinSequence(Entity *entity1, Entity *entity2, struct unkStruct_8069D4C *param_3);
bool8 MonsterJoinSequence_Async(Entity *entity1, Entity *entity2, struct unkStruct_8069D4C *param_3);
// These two functions are only used for Celebi's scene for some reason.
bool8 CanEntityBeRecruited(Entity *param_1);
bool8 HandleSpecialEntityJoinSequence(Entity *entity1,Entity *entity2,Entity **entityPtr);

View File

@ -4,6 +4,6 @@
#include "structs/dungeon_entity.h"
void TryWakeSleepingWildPokemon(void);
void TriggerMonsterHouse(Entity *entity, bool8 forcedMonsterHouse);
void TriggerMonsterHouse_Async(Entity *entity, bool8 forcedMonsterHouse);
#endif // GUARD_DUNGEON_MONSTER_HOUSE_H

View File

@ -25,7 +25,7 @@ void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move *move,
bool8 HandleRegularDamagingMove(Entity *attacker, Entity *target, Move *move, s32 itemId);
s32 HandleDamagingMove(Entity *attacker, Entity *target, Move *move, s24_8 modifier, s32 itemId);
s32 sub_80556BC(Entity *attacker, Entity *target, u8 moveType, Move *move, s24_8 modifier, s32 itemId);
s32 sub_8055864(Entity *attacker, Entity *target, Move *move, s32 param_4, s32 itemId);
s32 sub_8055864_Async(Entity *attacker, Entity *target, Move *move, s32 param_4, s32 itemId);
bool8 sub_8055988(Entity *r2, Entity *r4);
void sub_80559DC(Entity *entity1, Entity *entity2);

View File

@ -3,7 +3,7 @@
#include "structs/dungeon_entity.h"
void ApplyEndOfTurnEffects(Entity *entity);
void DoEndOfTurnEffects_Async(Entity *entity);
void TickStatusAndHealthRegen(Entity *entity);
#endif

View File

@ -22,7 +22,7 @@ bool8 sub_8043CE4(s32 dungeonId);
u8 GetFloorType(void);
void sub_8043D50(s32 *a0, s32 *a1);
void sub_8043D60(void);
bool8 TryForcedLoss(bool8 a0);
bool8 TryForcedLoss_Async(bool8 a0);
void EnforceMaxItemsAndMoney(void);
bool8 IsFloorwideFixedRoom(void);
bool8 IsCurrentFixedRoomBossFight(void);

View File

@ -25,7 +25,7 @@ void CreateYesNoDialogueBoxAndPortrait_DefaultNo(const u8 *text, MonPortraitMsg
void CreateMenuDialogueBoxAndPortrait(const u8 *text, void *a1, u32 r9, const MenuItem *menuItems, void *arg_0, u32 a5, u32 unknownUnused, MonPortraitMsg *monPortraitPtr, u16 flags);
void sub_8014490(void);
s32 sub_80144A4(s32 *a0);
void DrawDialogueBoxString(void);
void DrawDialogueBoxString_Async(void);
const u8 *FormatString(const u8 *str, u8 *dst, u8 *dstMax, u16 flags);
void PrintFormattedStringOnWindow(s32 x, s32 y, const u8 *str, u32 windowId, u32 terminatingChr);
void PrintFormattedStringOnWindow2(s32 x, s32 y, const u8 *str, u32 windowId, u32 terminatingChr, s32 lineSpacing);

View File

@ -438,7 +438,7 @@ enum MonsterBehavior
BEHAVIOR_JIRACHI,
BEHAVIOR_LUGIA,
BEHAVIOR_KYOGRE,
BEHAVIOR_29,
BEHAVIOR_DEOXYS_NORMAL,
BEHAVIOR_CELEBI,
BEHAVIOR_SMEARGLE,
BEHAVIOR_32,

View File

@ -368,12 +368,19 @@ struct DungeonMap
#define MONSTER_SPAWNS_ARR_COUNT 32
enum DungeonUnk2Kind
{
DUNGEON_UNK2_0,
DUNGEON_UNK2_1,
DUNGEON_UNK2_PITFALL_TRAP,
};
// size: 0x1CEDC
typedef struct Dungeon
{
u8 unk0;
u8 unk1;
u8 unk2;
u8 unk2; // Cutscene-related. See enum "DungeonUnk2Kind"
u8 unk3;
u8 unk4;
u8 unk5;
@ -387,7 +394,7 @@ typedef struct Dungeon
u8 unkD;
u8 unkE;
/* 0xF */ bool8 noActionInProgress; // Whether the game is currently accepting input. Set to false while action animations play.
u8 unk10;
u8 unk10; // Forced-loss reason? 0 = partner felled ... 1 = failed to protect client ... 2 = failed to protect client
u8 unk11;
s16 unk12;
s16 startFloorId; // It's always 0 by default(see sDungeonStartingFloor table). If changed, it would be possible for the first entered floor to be displayed as not B1, but the specified number.
@ -430,7 +437,7 @@ typedef struct Dungeon
/* 0x3A0A */ bool8 unk3A0A;
/* 0x3A0B */ bool8 unk3A0B;
/* 0x3A0C */ u8 monsterHouseRoom; // room index of monster house
/* 0x3A0D */ u8 prefight; // See enum "PrefightKind"
/* 0x3A0D */ u8 cutscene; // See enum "CutsceneKind"
/* 0x3A0E */ s16 tileset;
/* 0x3A10 */ s16 unk3A10;
/* 0x3A12 */ s16 unk3A12;
@ -457,7 +464,7 @@ typedef struct Dungeon
u8 ALIGNED(4) unk12C24[0x930];
u16 unk13554[10];
OpenedFile *unk13568;
u8 unk1356C;
bool8 unk1356C; // Cutscene-related
u8 fill1356D[0x13570 - 0x1356D];
/* 0x13570 */ u8 unk13570;
/* 0x13574 */ DungeonPos trapPos;

View File

@ -42,25 +42,25 @@ void BlowAwayTarget(Entity *pokemon, Entity *target, u32 direction)
counter = 10;
if (IsCurrentFixedRoomBossFight()) {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC9E8); // It couldn't be knocked flying!
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC9E8); // It couldn't be knocked flying!
return;
}
if (pokemon == target) {
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FCA10); // {POKEMON_0} couldn't be knocked flying!
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FCA10); // {POKEMON_0} couldn't be knocked flying!
return;
}
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
if (AbilityIsActive(target,ABILITY_SUCTION_CUPS)) {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FCBCC); // {POKEMON_0} is anchored! It can't be knocked flying!
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FCBCC); // {POKEMON_0} is anchored! It can't be knocked flying!
return;
}
GetEntInfo(target)->action.direction = (direction + 4) & DIRECTION_MASK;
sub_806CDD4(target, 6, (direction + 4) & DIRECTION_MASK);
sub_80421C0(target,0x1a3);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80F8A0C); // {POKEMON_0} was blown away!
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80F8A0C); // {POKEMON_0} was blown away!
flag = TRUE;
entity = NULL;
@ -104,7 +104,7 @@ void BlowAwayTarget(Entity *pokemon, Entity *target, u32 direction)
if (!flag) {
sub_807D068(target,&target->pos);
sub_806F370(pokemon,target,gBlowAwayDmgValue,0,0,0,DUNGEON_EXIT_FAINTED_FROM_BEING_KNOCKED,RESIDUAL_DAMAGE_REGULAR,0,0);
sub_806F370_Async(pokemon,target,gBlowAwayDmgValue,0,0,0,DUNGEON_EXIT_FAINTED_FROM_BEING_KNOCKED,RESIDUAL_DAMAGE_REGULAR,0,0);
}
if (IsFloorOver()) {
return;
@ -115,7 +115,7 @@ void BlowAwayTarget(Entity *pokemon, Entity *target, u32 direction)
InitPokemonMove(&move, MOVE_REGULAR_ATTACK);
if (!sub_80571F0(entity,&move)) {
TrySendImmobilizeSleepEndMsg(pokemon,entity);
sub_806F370(pokemon,entity,gBlowAwayDmgValue,0,0,0,DUNGEON_EXIT_FELLED_BY_POKEMON_FLYING,RESIDUAL_DAMAGE_REGULAR,0,0);
sub_806F370_Async(pokemon,entity,gBlowAwayDmgValue,0,0,0,DUNGEON_EXIT_FELLED_BY_POKEMON_FLYING,RESIDUAL_DAMAGE_REGULAR,0,0);
}
}
if (IsFloorOver())
@ -138,7 +138,7 @@ void BlowAwayTarget(Entity *pokemon, Entity *target, u32 direction)
sub_807EC28(FALSE);
}
sub_806A5B8(target);
TryTriggerMonsterHouseWithMsg(target,gDungeon->forceMonsterHouse);
TryTriggerMonsterHouseWithMsg_Async(target,gDungeon->forceMonsterHouse);
}
void sub_807D068(Entity *pokemon, DungeonPos *pos)

View File

@ -157,7 +157,7 @@ void sub_8040DA0(Entity *entity, Move *move)
gUnknown_202F224 = DungeonRandInt(7);
gDungeon->unk181e8.unk18204 = gDungeon->unk181e8.unk18200 = gUnknown_8106A8C[gUnknown_202F224];
gFormatArgs[0] = gUnknown_202F224 + 4;
LogMessageByIdWithPopupCheckUser(anotherEntity, gPtrMagnitudeMessage);
LogMessageByIdWithPopupCheckUser_Async(anotherEntity, gPtrMagnitudeMessage);
sub_80421C0(anotherEntity, 0x1A4);
}
else if (move->id == MOVE_EARTHQUAKE) {

View File

@ -131,7 +131,7 @@ UNUSED static void DebugMapViewer(void)
sub_809D25C();
sub_80A59DC();
DrawDialogueBoxString();
DrawDialogueBoxString_Async();
sub_8005838(NULL, 0);
sub_80060EC();
nullsub_8(gGameOptionsRef->touchScreen);

View File

@ -35,13 +35,13 @@ void HandleDroughtOrb(Entity *pokemon, Entity *target)
flag = FALSE;
if(IsCurrentFixedRoomBossFight())
{
LogMessageByIdWithPopupCheckUser(pokemon, gUnknown_80FD060);
LogMessageByIdWithPopupCheckUser_Async(pokemon, gUnknown_80FD060);
return;
}
if(IsWaterTileset())
{
LogMessageByIdWithPopupCheckUser(pokemon, gUnknown_80FD08C);
LogMessageByIdWithPopupCheckUser_Async(pokemon, gUnknown_80FD08C);
return;
}
@ -63,11 +63,11 @@ void HandleDroughtOrb(Entity *pokemon, Entity *target)
if(flag)
{
sub_80421C0(pokemon, 0x1A1);
LogMessageByIdWithPopupCheckUser(pokemon, gUnknown_80FD05C);
LogMessageByIdWithPopupCheckUser_Async(pokemon, gUnknown_80FD05C);
}
else
{
LogMessageByIdWithPopupCheckUser(pokemon, gUnknown_80FD060);
LogMessageByIdWithPopupCheckUser_Async(pokemon, gUnknown_80FD060);
}
gDungeon->unk644.unk2C = 1;
DetermineAllMonsterShadow();

View File

@ -206,7 +206,7 @@ static s32 sub_8041550(Entity *entity, s32 a1, u8 a2, u8 a3, s32 a4, u8 a5)
return -1;
if (a4 != 0) {
sub_804178C(a4 == 2);
sub_804178C_Async(a4 == 2);
}
sub_800569C(&pos, &entity->axObj.axdata, a3);
@ -296,7 +296,7 @@ static u32 sub_8041764(unkStruct_80416E0 *param_1, bool8 param_2)
return sub_800E890(param_1);
}
void sub_804178C(u8 param_1)
void sub_804178C_Async(u8 param_1)
{
u32 temp;
s32 counter;
@ -1328,7 +1328,7 @@ void sub_80427AC(void)
sub_80429A0(entity);
if (!enInfo->isNotTeamMember) {
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], entity, 0);
DisplayDungeonLoggableMessageTrue(entity, gPtrFeralFoundItemMessage);
DisplayDungeonLoggableMessageTrue_Async(entity, gPtrFeralFoundItemMessage);
}
}
}
@ -1522,7 +1522,7 @@ static void sub_8042A84(s16 param_1, Entity *entity, u32 param_3)
iVar3 = (entity->pixelPos.y - entity->unk1C) / 256;
} while (-8 <= iVar3 - gDungeon->unk181e8.cameraPixelPos.y);
entity->isVisible = 0;
sub_804178C(0);
sub_804178C_Async(0);
}
}

View File

@ -51,7 +51,7 @@ static void HandleSleepTalk(void);
static void HandleSnore(void);
static void HandleFlashFire(void);
bool8 ExecuteEntityDungeonAction(Entity *entity)
bool8 ExecuteEntityDungeonAction_Async(Entity *entity)
{
bool8 bVar4;
bool8 bVar5;
@ -62,7 +62,7 @@ bool8 ExecuteEntityDungeonAction(Entity *entity)
DungeonPos pos;
DungeonPos pos1;
sub_804178C(1);
sub_804178C_Async(1);
gUnknown_203B434 = TRUE;
info = GetEntInfo(entity);
info->useHeldItem = FALSE;
@ -76,7 +76,7 @@ bool8 ExecuteEntityDungeonAction(Entity *entity)
sub_8075BA4(entity,gUnknown_80F58F4[(info->action).action][1]);
}
}
if ((CannotAttack(entity, FALSE)) && (IsChargingAnyTwoTurnMove(entity, TRUE))) {
if (CannotAttack(entity, FALSE) && IsChargingAnyTwoTurnMove(entity, TRUE)) {
sub_8079764(entity);
}
@ -88,7 +88,7 @@ bool8 ExecuteEntityDungeonAction(Entity *entity)
}
}
if (!IsNotAttacking(entity, FALSE)) {
if (DisplayActions(entity)) {
if (DisplayActions_Async(entity)) {
if (IsFloorOver()) {
return FALSE;
}
@ -169,12 +169,12 @@ bool8 ExecuteEntityDungeonAction(Entity *entity)
break;
case ACTION_STAIRS:
if ((gDungeon->unk644.dungeonLocation.id == DUNGEON_METEOR_CAVE) && (!gDungeon->deoxysDefeat)) {
LogMessageByIdWithPopupCheckUser(entity,gUnknown_80FA5B4); // It's impossible to go down the stairs now!
LogMessageByIdWithPopupCheckUser_Async(entity,gUnknown_80FA5B4); // It's impossible to go down the stairs now!
}
else
{
PlayStairsSound();
gDungeon->unk2 = 1;
gDungeon->unk2 = DUNGEON_UNK2_1;
gUnknown_202F32C = (info->action).direction;
}
break;
@ -184,34 +184,34 @@ bool8 ExecuteEntityDungeonAction(Entity *entity)
sub_8067110(entity);
break;
case ACTION_USE_ORB:
HandleUseOrbAction(entity);
HandleUseOrbAction_Async(entity);
break;
case ACTION_PICK_UP_PLAYER:
HandlePickUpPlayerAction(entity);
HandlePickUpPlayerAction_Async(entity);
break;
case ACTION_GIVE_ITEM:
HandleGiveItemAction(entity);
HandleGiveItemAction_Async(entity);
break;
case ACTION_TAKE_ITEM:
HandleTakeItemAction(entity);
HandleTakeItemAction_Async(entity);
break;
case 0x3e:
sub_8066BD4(entity); // ITEM_SWITCH_TOOLBOX (When you switch item in Toolbox)
sub_8066BD4_Async(entity); // ITEM_SWITCH_TOOLBOX (When you switch item in Toolbox)
break;
case ACTION_USE_ITEM:
HandleUseItemAction(entity);
break;
case ACTION_SET_ITEM:
HandleSetItemAction(entity, TRUE);
HandleSetItemAction_Async(entity, TRUE);
break;
case ACTION_UNSET_ITEM:
HandleUnsetItemAction(entity, TRUE);
HandleUnsetItemAction_Async(entity, TRUE);
break;
case 0x3b:
gDungeon->unkBC = gDungeon->teamPokemon[(info->action).actionParameters[0].actionUseIndex];
break;
case ACTION_PLACE_ITEM:
HandlePlaceItemAction(entity);
HandlePlaceItemAction_Async(entity);
break;
case 10: // Switch with Item on Ground
sub_8066E14(entity);
@ -228,7 +228,7 @@ bool8 ExecuteEntityDungeonAction(Entity *entity)
break;
}
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],entity,0);
LogMessageByIdWithPopupCheckUser(entity,gUnknown_80FE6D4);
LogMessageByIdWithPopupCheckUser_Async(entity,gUnknown_80FE6D4);
break;
case ACTION_TALK_FIELD:
HandleTalkFieldAction(entity);
@ -256,7 +256,7 @@ bool8 ExecuteEntityDungeonAction(Entity *entity)
break;
case ACTION_SECOND_THOUGHTS:
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],entity,0);
LogMessageByIdWithPopupCheckUser(entity,gUnknown_80FE478);
LogMessageByIdWithPopupCheckUser_Async(entity,gUnknown_80FE478);
break;
default:
info->action.action = ACTION_PASS_TURN;
@ -284,7 +284,7 @@ bool8 ExecuteEntityDungeonAction(Entity *entity)
}
}
if (bVar4) {
LogMessageByIdWithPopupCheckUser(entity,gUnknown_80FD2CC);
LogMessageByIdWithPopupCheckUser_Async(entity,gUnknown_80FD2CC);
}
}
HandleFlashFire();
@ -309,7 +309,7 @@ bool8 ExecuteEntityDungeonAction(Entity *entity)
if (sub_80706A4(entity,&entity->pos) != '\0') {
WarpTarget(entity,entity,0,0);
}
ApplyEndOfTurnEffects(entity);
DoEndOfTurnEffects_Async(entity);
EnemyEvolution(entity);
}
}
@ -374,7 +374,7 @@ static void HandleSleepTalk(void)
}
}
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], entity, 0);
LogMessageByIdWithPopupCheckUser(entity, gUnknown_80FCF38); // {ARG_POKEMON_0} uttered its sleep talk!
LogMessageByIdWithPopupCheckUser_Async(entity, gUnknown_80FCF38); // {ARG_POKEMON_0} uttered its sleep talk!
info->action.direction = sl & DIRECTION_MASK;
TryUseChosenMove(entity, 0, ITEM_NOTHING, 1, FALSE, &moveStack);
flag = TRUE;
@ -440,7 +440,7 @@ static void HandleSnore(void)
}
}
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],pokemon,0);
LogMessageByIdWithPopupCheckUser(pokemon,gUnknown_80FCF50);
LogMessageByIdWithPopupCheckUser_Async(pokemon,gUnknown_80FCF50);
info->action.direction = r8 & DIRECTION_MASK;
TryUseChosenMove(pokemon,0,ITEM_NOTHING,1,FALSE,&chosenMove);
info->unk165 |= 0xff;

View File

@ -50,13 +50,13 @@ static void sub_8067558(Entity *entity, Entity *targetEntity, s32 a2);
static Entity *sub_806773C(Entity *entity);
static void sub_8067794(Entity *entity, Entity *targetEntity, s32 a2);
void HandlePickUpPlayerAction(Entity *entity)
void HandlePickUpPlayerAction_Async(Entity *entity)
{
GetEntInfo(entity)->action.actionParameters[0].actionUseIndex = 1;
TryLeaderItemPickUp(&entity->pos,0);
TryLeaderItemPickUp_Async(&entity->pos,0);
}
void HandleSetItemAction(Entity *param_1, bool8 param_2)
void HandleSetItemAction_Async(Entity *param_1, bool8 param_2)
{
Item *item;
Item *itemPtr;
@ -69,7 +69,7 @@ void HandleSetItemAction(Entity *param_1, bool8 param_2)
if (((itemPtr->flags & ITEM_FLAG_EXISTS)) && ((itemPtr->flags & ITEM_FLAG_SET))) {
if ((itemPtr->flags & ITEM_FLAG_STICKY)) {
sub_8045BF8(gFormatBuffer_Items[0],itemPtr);
LogMessageByIdWithPopupCheckUser(param_1,gItemStickyCannotEquip);
LogMessageByIdWithPopupCheckUser_Async(param_1,gItemStickyCannotEquip);
return;
}
itemPtr->flags &= ~(ITEM_FLAG_SET);
@ -77,31 +77,31 @@ void HandleSetItemAction(Entity *param_1, bool8 param_2)
}
sub_8045BF8(gFormatBuffer_Items[0],item);
PlaySoundEffect(0x133);
if (param_2 != 0) {
if (param_2) {
if ((item->flags & ITEM_FLAG_STICKY)) {
LogMessageByIdWithPopupCheckUser(param_1,gUnknown_80F8D04);
LogMessageByIdWithPopupCheckUser_Async(param_1,gUnknown_80F8D04);
}
else {
if (GetItemCategory(item->id) == CATEGORY_THROWN_LINE) {
LogMessageByIdWithPopupCheckUser(param_1,gUnknown_80F8CE4);
LogMessageByIdWithPopupCheckUser_Async(param_1,gUnknown_80F8CE4);
}
else
{
LogMessageByIdWithPopupCheckUser(param_1,gUnknown_80F8CE8);
LogMessageByIdWithPopupCheckUser_Async(param_1,gUnknown_80F8CE8);
}
}
}
item->flags |= ITEM_FLAG_SET;
if (((item->flags & ITEM_FLAG_STICKY)) && (param_2 != 0)) {
if (((item->flags & ITEM_FLAG_STICKY)) && param_2) {
sub_8045BF8(gFormatBuffer_Items[0],item);
LogMessageByIdWithPopupCheckUser(param_1,gUnknown_80F8BE0);
LogMessageByIdWithPopupCheckUser_Async(param_1,gUnknown_80F8BE0);
}
}
void HandleUnsetItemAction(Entity *entity, bool8 enableMessage)
void HandleUnsetItemAction_Async(Entity *entity, bool8 enableMessage)
{
Item *item;
int index;
s32 index;
for(index = 0; index < INVENTORY_SIZE; index++)
{
@ -109,20 +109,20 @@ void HandleUnsetItemAction(Entity *entity, bool8 enableMessage)
if (((item->flags & ITEM_FLAG_EXISTS)) && ((item->flags & ITEM_FLAG_SET))) {
if ((item->flags & ITEM_FLAG_STICKY)) {
sub_8045BF8(gFormatBuffer_Items[0],item);
LogMessageByIdWithPopupCheckUser(entity,gItemStickyCannotEquip);
LogMessageByIdWithPopupCheckUser_Async(entity,gItemStickyCannotEquip);
return;
}
item->flags &= ~(ITEM_FLAG_SET);
sub_8045BF8(gFormatBuffer_Items[0],item);
PlaySoundEffect(0x133);
if (enableMessage) {
LogMessageByIdWithPopupCheckUser(entity,gUnknown_80F8D20);
LogMessageByIdWithPopupCheckUser_Async(entity,gUnknown_80F8D20);
}
}
}
}
void HandleGiveItemAction(Entity *param_1)
void HandleGiveItemAction_Async(Entity *param_1)
{
Entity *entity;
Item *item;
@ -145,7 +145,7 @@ void HandleGiveItemAction(Entity *param_1)
if ((!bVar3) && ((item->flags & (ITEM_FLAG_STICKY | ITEM_FLAG_SET)) == (ITEM_FLAG_STICKY | ITEM_FLAG_SET))) {
sub_8045BF8(gFormatBuffer_Items[1],item);
LogMessageByIdWithPopupCheckUser(param_1,gItemStickyCannotMove2);
LogMessageByIdWithPopupCheckUser_Async(param_1,gItemStickyCannotMove2);
}
else
{
@ -153,7 +153,7 @@ void HandleGiveItemAction(Entity *param_1)
if (((info2->heldItem).flags & ITEM_FLAG_EXISTS)) {
if (((info2->heldItem).flags & ITEM_FLAG_STICKY)) {
sub_8045BF8(gFormatBuffer_Items[1],&info2->heldItem);
LogMessageByIdWithPopupCheckUser(param_1,gItemStickyCannotMove1);
LogMessageByIdWithPopupCheckUser_Async(param_1,gItemStickyCannotMove1);
return;
}
item1 = (info2->heldItem);
@ -171,9 +171,9 @@ void HandleGiveItemAction(Entity *param_1)
sub_8045BF8(gFormatBuffer_Items[0],&item2);
sub_8045BF8(gFormatBuffer_Items[1],&item1);
PlaySoundEffect(0x14d);
LogMessageByIdWithPopupCheckUser(param_1,gMonTookAndReturnedItem);
LogMessageByIdWithPopupCheckUser_Async(param_1,gMonTookAndReturnedItem);
if ((item2.flags & ITEM_FLAG_STICKY)) {
LogMessageByIdWithPopupCheckUser(param_1,gUnknown_80F8BE0);
LogMessageByIdWithPopupCheckUser_Async(param_1,gUnknown_80F8BE0);
}
}
else {
@ -183,9 +183,9 @@ void HandleGiveItemAction(Entity *param_1)
info2->heldItem = item3;
sub_8045BF8(gFormatBuffer_Items[0],&item3);
PlaySoundEffect(0x14d);
LogMessageByIdWithPopupCheckUser(param_1,gUnknown_80F8D44);
LogMessageByIdWithPopupCheckUser_Async(param_1,gUnknown_80F8D44);
if ((item3.flags & ITEM_FLAG_STICKY)) {
LogMessageByIdWithPopupCheckUser(param_1,gUnknown_80F8BE0);
LogMessageByIdWithPopupCheckUser_Async(param_1,gUnknown_80F8BE0);
}
}
sub_806A6E8(entity);
@ -195,11 +195,11 @@ void HandleGiveItemAction(Entity *param_1)
if (!info2->isTeamLeader) {
info2->flags = info2->flags | MOVEMENT_FLAG_UNK_14;
}
TriggerMonsterHouse(param_1,gDungeon->forceMonsterHouse);
TriggerMonsterHouse_Async(param_1,gDungeon->forceMonsterHouse);
}
}
void HandleTakeItemAction(Entity *param_1)
void HandleTakeItemAction_Async(Entity *param_1)
{
Entity *entity;
EntityInfo *info;
@ -210,13 +210,13 @@ void HandleTakeItemAction(Entity *param_1)
info = GetEntInfo(entity);
heldItem = &info->heldItem;
if (ItemExists(&gTeamInventoryRef->teamItems[ITEM_POWER_BAND])) {
LogMessageByIdWithPopupCheckUser(param_1,gUnknown_80F8D60);
LogMessageByIdWithPopupCheckUser_Async(param_1,gUnknown_80F8D60);
}
else
{
if (ItemSticky(heldItem)) {
sub_8045BF8(gFormatBuffer_Items[0],heldItem);
LogMessageByIdWithPopupCheckUser(param_1,gUnknown_80F8BE0);
LogMessageByIdWithPopupCheckUser_Async(param_1,gUnknown_80F8BE0);
}
else
{
@ -227,7 +227,7 @@ void HandleTakeItemAction(Entity *param_1)
ZeroOutItem(heldItem);
AddItemToInventory(&item);
PlaySoundEffect(0x14d);
LogMessageByIdWithPopupCheckUser(param_1,gUnknown_80F8D7C);
LogMessageByIdWithPopupCheckUser_Async(param_1,gUnknown_80F8D7C);
sub_806A6E8(entity);
if (sub_80706A4(entity,&entity->pos) != 0) {
WarpTarget(param_1,entity,0,0);
@ -235,12 +235,12 @@ void HandleTakeItemAction(Entity *param_1)
if (!info->isTeamLeader) {
info->flags |= MOVEMENT_FLAG_UNK_14;
}
TriggerMonsterHouse(param_1,gDungeon->forceMonsterHouse);
TriggerMonsterHouse_Async(param_1,gDungeon->forceMonsterHouse);
}
}
}
void sub_8066BD4(Entity *param_1)
void sub_8066BD4_Async(Entity *param_1)
{
Entity *entity;
EntityInfo *info;
@ -255,11 +255,11 @@ void sub_8066BD4(Entity *param_1)
if (heldItem->flags & ITEM_FLAG_STICKY)
{
sub_8045BF8(gFormatBuffer_Items[0],heldItem);
LogMessageByIdWithPopupCheckUser(param_1,gUnknown_80F8BE0);
LogMessageByIdWithPopupCheckUser_Async(param_1,gUnknown_80F8BE0);
}
else if ((item->flags & (ITEM_FLAG_STICKY | ITEM_FLAG_SET)) == (ITEM_FLAG_STICKY | ITEM_FLAG_SET)) {
sub_8045BF8(gFormatBuffer_Items[0],item);
LogMessageByIdWithPopupCheckUser(param_1,gUnknown_80F8BE0);
LogMessageByIdWithPopupCheckUser_Async(param_1,gUnknown_80F8BE0);
}
else
{
@ -272,14 +272,14 @@ void sub_8066BD4(Entity *param_1)
info->heldItem = *item;
*item = temp;
PlaySoundEffect(0x14d);
LogMessageByIdWithPopupCheckUser(param_1,gUnknown_80F8DB4);
LogMessageByIdWithPopupCheckUser_Async(param_1,gUnknown_80F8DB4);
if (sub_80706A4(entity,&entity->pos) != 0) {
WarpTarget(param_1,entity,0,0);
}
if (!info->isTeamLeader) {
info->flags = info->flags | MOVEMENT_FLAG_UNK_14;
}
TriggerMonsterHouse(param_1,gDungeon->forceMonsterHouse);
TriggerMonsterHouse_Async(param_1,gDungeon->forceMonsterHouse);
}
}
@ -291,45 +291,45 @@ void HandleUseItemAction(Entity *param_1)
GetEntInfo(entity)->useHeldItem = TRUE;
}
void HandlePlaceItemAction(Entity *entity)
void HandlePlaceItemAction_Async(Entity *entity)
{
EntityInfo *info = GetEntInfo(entity);
Item *item = sub_8044D90(entity,0,4);
sub_8045BF8(gFormatBuffer_Items[0],item);
if (info->action.actionParameters[0].actionUseIndex == 0x80) {
LogMessageByIdWithPopupCheckUser(entity,gUnknown_80F8DE0);
LogMessageByIdWithPopupCheckUser_Async(entity,gUnknown_80F8DE0);
}
else if (info->action.actionParameters[0].actionUseIndex < 0x15 && (item->flags & (ITEM_FLAG_STICKY | ITEM_FLAG_SET)) == (ITEM_FLAG_STICKY | ITEM_FLAG_SET)) {
LogMessageByIdWithPopupCheckUser(entity,gUnknown_80F8BE0);
LogMessageByIdWithPopupCheckUser_Async(entity,gUnknown_80F8BE0);
}
else if (info->action.actionParameters[0].actionUseIndex == 0x81 && (item->flags & ITEM_FLAG_STICKY)) {
LogMessageByIdWithPopupCheckUser(entity,gUnknown_80F8BE0);
LogMessageByIdWithPopupCheckUser_Async(entity,gUnknown_80F8BE0);
}
else {
const Tile *tile = GetTile(entity->pos.x, entity->pos.y);
if ((tile->terrainFlags & TERRAIN_TYPE_STAIRS)) {
LogMessageByIdWithPopupCheckUser(entity,gUnknown_80F8E04);
LogMessageByIdWithPopupCheckUser_Async(entity,gUnknown_80F8E04);
}
else if (GetTerrainType(tile) != TERRAIN_TYPE_NORMAL) {
LogMessageByIdWithPopupCheckUser(entity,gUnknown_80F8E04);
LogMessageByIdWithPopupCheckUser_Async(entity,gUnknown_80F8E04);
}
else if (tile->object != NULL) {
LogMessageByIdWithPopupCheckUser(entity,gUnknown_80F8E04);
LogMessageByIdWithPopupCheckUser_Async(entity,gUnknown_80F8E04);
}
else {
item->flags &= ~(ITEM_FLAG_SET);
sub_8045BF8(gFormatBuffer_Items[0],item);
if (SpawnItem(&entity->pos,item,1) == 0) {
LogMessageByIdWithPopupCheckUser(entity,gUnknown_80F8E04);
LogMessageByIdWithPopupCheckUser_Async(entity,gUnknown_80F8E04);
}
else {
ZeroOutItem(item);
FillInventoryGaps();
PlaySoundEffect(0x14d);
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],entity,0);
LogMessageByIdWithPopupCheckUser(entity,gUnknown_80F8E28);
TriggerMonsterHouse(entity,gDungeon->forceMonsterHouse);
LogMessageByIdWithPopupCheckUser_Async(entity,gUnknown_80F8E28);
TriggerMonsterHouse_Async(entity,gDungeon->forceMonsterHouse);
}
}
}
@ -343,20 +343,20 @@ void sub_8066E14(Entity *entity)
item[1] = sub_8044D90(entity,1,6);
if (info->action.actionParameters[0].actionUseIndex != 0x80) {
LogMessageByIdWithPopupCheckUser(entity,gUnknown_80F8E2C);
LogMessageByIdWithPopupCheckUser_Async(entity,gUnknown_80F8E2C);
}
else if (info->action.actionParameters[1].actionUseIndex < 0x15 && (item[1]->flags & ITEM_FLAG_SET) && (item[1]->flags & ITEM_FLAG_STICKY)) {
sub_8045BF8(gFormatBuffer_Items[0],item[1]);
LogMessageByIdWithPopupCheckUser(entity,gUnknown_80F8BE0);
LogMessageByIdWithPopupCheckUser_Async(entity,gUnknown_80F8BE0);
}
else if (info->action.actionParameters[1].actionUseIndex == 0x81 && ItemSticky(item[1])) {
sub_8045BF8(gFormatBuffer_Items[1],item[1]);
LogMessageByIdWithPopupCheckUser(entity,gItemStickyCannotMove3);
LogMessageByIdWithPopupCheckUser_Async(entity,gItemStickyCannotMove3);
}
else {
const Tile *tile = GetTile((entity->pos).x,(entity->pos).y);
if (tile->object != NULL && GetEntityType(tile->object) != ENTITY_ITEM) {
LogMessageByIdWithPopupCheckUser(entity,gNoExchangesHere);
LogMessageByIdWithPopupCheckUser_Async(entity,gNoExchangesHere);
}
else {
Item newItems[2];
@ -369,7 +369,7 @@ void sub_8066E14(Entity *entity)
RemoveGroundItem(&info->action.actionParameters[0].itemPos,1);
ZeroOutItem(item[1]);
if (!SpawnItem(&info->action.actionParameters[0].itemPos,&newItems[1],1)) {
LogMessageByIdWithPopupCheckUser(entity,gNothingCanBePutDownHere);
LogMessageByIdWithPopupCheckUser_Async(entity,gNothingCanBePutDownHere);
}
else {
if (info->action.actionParameters[1].actionUseIndex == 0x81) {
@ -383,8 +383,8 @@ void sub_8066E14(Entity *entity)
sub_8045BF8(gFormatBuffer_Items[0],&newItems[1]);
sub_8045BF8(gFormatBuffer_Items[1],&newItems[0]);
PlaySoundEffect(0x14d);
LogMessageByIdWithPopupCheckUser(entity,gSwappedGroundItem);
TriggerMonsterHouse(entity,gDungeon->forceMonsterHouse);
LogMessageByIdWithPopupCheckUser_Async(entity,gSwappedGroundItem);
TriggerMonsterHouse_Async(entity,gDungeon->forceMonsterHouse);
}
}
}
@ -400,13 +400,13 @@ void sub_8066FA4(Entity *entity)
sub_8045BF8(gFormatBuffer_Items[0],item[0]);
if (info->action.actionParameters[0].actionUseIndex < 0x15 && (item[0]->flags & ITEM_FLAG_SET) && (item[0]->flags & ITEM_FLAG_STICKY)) {
sub_8045BF8(gFormatBuffer_Items[1],item[0]);
LogMessageByIdWithPopupCheckUser(entity,gItemStickyCannotMove3);
LogMessageByIdWithPopupCheckUser_Async(entity,gItemStickyCannotMove3);
}
else if (info->action.actionParameters[0].actionUseIndex == 0x81 && ItemSticky(item[0])) {
LogMessageByIdWithPopupCheckUser(entity,gItemStickyCannotMove2);
LogMessageByIdWithPopupCheckUser_Async(entity,gItemStickyCannotMove2);
}
else if (tile->object != NULL && GetEntityType(tile->object) != ENTITY_ITEM) {
LogMessageByIdWithPopupCheckUser(entity,gNoExchangesHere);
LogMessageByIdWithPopupCheckUser_Async(entity,gNoExchangesHere);
}
else {
Item newItems[2];
@ -421,7 +421,7 @@ void sub_8066FA4(Entity *entity)
RemoveGroundItem(&entity->pos,1);
ZeroOutItem(item[0]);
if (!SpawnItem(&entity->pos, &newItems[0],1)) {
LogMessageByIdWithPopupCheckUser(entity,gNothingCanBePutDownHere);
LogMessageByIdWithPopupCheckUser_Async(entity,gNothingCanBePutDownHere);
}
else {
if (info->action.actionParameters[0].actionUseIndex == 0x81) {
@ -432,8 +432,8 @@ void sub_8066FA4(Entity *entity)
}
FillInventoryGaps();
PlaySoundEffect(0x14d);
LogMessageByIdWithPopupCheckUser(entity,gSwappedGroundItem);
TriggerMonsterHouse(entity,gDungeon->forceMonsterHouse);
LogMessageByIdWithPopupCheckUser_Async(entity,gSwappedGroundItem);
TriggerMonsterHouse_Async(entity,gDungeon->forceMonsterHouse);
}
}
}
@ -448,12 +448,12 @@ void sub_8067110(Entity *entity)
if (sub_8048D50(entity,item)) {
Item item2;
LogMessageByIdWithPopupCheckUser(entity,sub_80464AC(item));
LogMessageByIdWithPopupCheckUser_Async(entity,sub_80464AC(item));
item2 = *item;
sub_8044DF0(entity,0,0x66);
sub_803E708(0x1e,0x11);
sub_80479B8(0,0,0,entity,entity,&item2);
TriggerMonsterHouse(entity,gDungeon->forceMonsterHouse);
TriggerMonsterHouse_Async(entity,gDungeon->forceMonsterHouse);
}
}
@ -464,16 +464,16 @@ void sub_80671A0(Entity *entity)
if (info->action.actionParameters[0].actionUseIndex == 0x81 && ItemSticky(item)) {
sub_8045BF8(gFormatBuffer_Items[0], item);
LogMessageByIdWithPopupCheckUser(entity, gUnknown_80F8BE0);
LogMessageByIdWithPopupCheckUser_Async(entity, gUnknown_80F8BE0);
sub_803E708(0x14, 0x4C);
}
else if ((GetItemCategory(item->id) == CATEGORY_THROWN_LINE || GetItemCategory(item->id) == CATEGORY_THROWN_ARC) && ItemSticky(item)) {
sub_8045BF8(gFormatBuffer_Items[0], item);
LogMessageByIdWithPopupCheckUser(entity, gUnknown_80F8BE0);
LogMessageByIdWithPopupCheckUser_Async(entity, gUnknown_80F8BE0);
sub_803E708(0x14, 0x4C);
}
else if (ShouldMonsterRunAwayAndShowEffect(entity, TRUE)) {
LogMessageByIdWithPopupCheckUser(entity, gUnknown_80FF76C);
LogMessageByIdWithPopupCheckUser_Async(entity, gUnknown_80FF76C);
sub_803E708(0x14, 0x4C);
}
else {
@ -536,10 +536,10 @@ void sub_80671A0(Entity *entity)
sub_8045C08(gFormatBuffer_Items[0], &newItem);
SetMessageArgument_2(gFormatBuffer_Monsters[0], info, 0);
if (GetItemCategory(newItem.id) == CATEGORY_THROWN_LINE) {
LogMessageByIdWithPopupCheckUser(entity, gMonThrewItem2);
LogMessageByIdWithPopupCheckUser_Async(entity, gMonThrewItem2);
}
else {
LogMessageByIdWithPopupCheckUser(entity, gMonThrewItem1);
LogMessageByIdWithPopupCheckUser_Async(entity, gMonThrewItem1);
}
sub_8042208(entity, GetItemCategory(newItem.id));
@ -580,7 +580,7 @@ void sub_80671A0(Entity *entity)
if (EntityIsValid(entity)) {
sub_806CE68(entity, info->action.direction);
TriggerMonsterHouse(entity,gDungeon->forceMonsterHouse);
TriggerMonsterHouse_Async(entity,gDungeon->forceMonsterHouse);
}
}
}
@ -601,10 +601,10 @@ static void sub_8067558(Entity *entity, Entity *targetEntity, s32 a2)
EntityInfo *info1 = GetEntInfo(entity);
if (targetEntity == NULL) {
DisplayDungeonMessage(NULL, gCannotTalk, TRUE);
DisplayDungeonMessage_Async(NULL, gCannotTalk, TRUE);
}
else if (!sub_8070BC0(entity)) {
DisplayDungeonMessage(NULL, gCannotTalk, TRUE);
DisplayDungeonMessage_Async(NULL, gCannotTalk, TRUE);
}
else if (GetTreatmentBetweenMonsters(entity, targetEntity, TRUE, FALSE) != 1
&& GetTreatmentBetweenMonsters(targetEntity, entity, TRUE, FALSE) != 1)
@ -616,7 +616,7 @@ static void sub_8067558(Entity *entity, Entity *targetEntity, s32 a2)
sub_8084778();
TrySendImmobilizeSleepEndMsg(entity, targetEntity);
if (!sub_8070BC0(targetEntity) || CheckVariousStatuses2(targetEntity, TRUE)) {
DisplayDungeonMessage(NULL, gUnknown_80FE008, TRUE);
DisplayDungeonMessage_Async(NULL, gUnknown_80FE008, TRUE);
return;
}
@ -635,7 +635,7 @@ static void sub_8067558(Entity *entity, Entity *targetEntity, s32 a2)
if (info2->monsterBehavior == 1) {
if (gDungeon->unk644.stoleFromKecleon != 0) {
DisplayDungeonMessage(NULL, gUnknown_80FF674, TRUE);
DisplayDungeonMessage_Async(NULL, gUnknown_80FF674, TRUE);
}
else if (gDungeon->unk644.unk33) {
sub_80845E0(targetEntity);
@ -671,11 +671,11 @@ static void sub_8067558(Entity *entity, Entity *targetEntity, s32 a2)
}
sub_806A3D4(txt, speciesId, r2, r6);
DisplayDungeonMessage(NULL, txt, TRUE);
DisplayDungeonMessage_Async(NULL, txt, TRUE);
}
}
else {
DisplayDungeonMessage(NULL, gCannotTalk, TRUE);
DisplayDungeonMessage_Async(NULL, gCannotTalk, TRUE);
}
}
@ -703,7 +703,7 @@ static void sub_8067794(Entity *entity, Entity *targetEntity, s32 a2)
EntityInfo *info2 = GetEntInfo(targetEntity);
if (targetEntity == NULL) {
DisplayDungeonMessage(NULL, gCannotFarewell, TRUE);
DisplayDungeonMessage_Async(NULL, gCannotFarewell, TRUE);
return;
}
@ -732,9 +732,9 @@ static void sub_8067794(Entity *entity, Entity *targetEntity, s32 a2)
u8 tempText[64];
strncpy(tempText, gFormatBuffer_Monsters[0], sizeof(tempText));
HandleFaint(targetEntity, DUNGEON_EXIT_WENT_AWAY, 0);
HandleFaint_Async(targetEntity, DUNGEON_EXIT_WENT_AWAY, 0);
strncpy(gFormatBuffer_Monsters[0], tempText, sizeof(tempText));
DisplayDungeonMessage(NULL, stringPtr2, TRUE);
DisplayDungeonMessage_Async(NULL, stringPtr2, TRUE);
}
}
@ -773,11 +773,11 @@ void sub_8067904(Entity *entity, u16 moveId)
InitPokemonMove(&move, moveId);
if (info->cringeClassStatus.status == STATUS_CRINGE) {
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], entity, 0);
LogMessageByIdWithPopupCheckUser(entity, gMonCringing);
LogMessageByIdWithPopupCheckUser_Async(entity, gMonCringing);
}
else if (info->burnClassStatus.status == STATUS_PARALYSIS) {
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], entity, 0);
LogMessageByIdWithPopupCheckUser(entity, gMonParalyzed);
LogMessageByIdWithPopupCheckUser_Async(entity, gMonParalyzed);
}
else {
s32 i;
@ -806,7 +806,7 @@ void sub_8067904(Entity *entity, u16 moveId)
if (EntityIsValid(entity)) {
if (moveId == MOVE_STRUGGLE && gUnknown_202F208 == 0) {
LogMessageByIdWithPopupCheckUser(entity, gUnknown_80FC690);
LogMessageByIdWithPopupCheckUser_Async(entity, gUnknown_80FC690);
}
if (info->isTeamLeader && moveId != MOVE_STRUGGLE) {
DungeonPos pos;

View File

@ -52,7 +52,7 @@ void RunMonsterAI(Entity *pokemon, u32 unused)
{
pokemonInfo->useHeldItem = FALSE;
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], pokemon, 0);
LogMessageByIdWithPopupCheckUser(pokemon, gPtrCouldntBeUsedMessage);
LogMessageByIdWithPopupCheckUser_Async(pokemon, gPtrCouldntBeUsedMessage);
return;
}
AIDecideUseItem(pokemon);

View File

@ -901,7 +901,7 @@ void HandleUseMoveAIAction(Entity *target)
sub_806A1B0(target);
}
void HandleUseOrbAction(Entity *pokemon)
void HandleUseOrbAction_Async(Entity *pokemon)
{
bool8 r4;
Item *item;
@ -918,14 +918,14 @@ void HandleUseOrbAction(Entity *pokemon)
if (item->flags & ITEM_FLAG_STICKY) {
sub_8045BF8(gFormatBuffer_Items[0], item);
LogMessageByIdWithPopupCheckUser(pokemon, gItemStickyDoesntWorkText);
LogMessageByIdWithPopupCheckUser_Async(pokemon, gItemStickyDoesntWorkText);
return;
}
act = entityInfo->action;
if (IsFloorwideFixedRoom()) {
LogMessageByIdWithPopupCheckUser(pokemon, gPtrMysteriousPowerPreventedUseMessage);
LogMessageByIdWithPopupCheckUser_Async(pokemon, gPtrMysteriousPowerPreventedUseMessage);
r4 = TRUE;
}
else {
@ -945,20 +945,20 @@ void HandleUseOrbAction(Entity *pokemon)
if (entityInfo->cringeClassStatus.status == 1) {
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], pokemon, 0);
LogMessageByIdWithPopupCheckUser(pokemon, gUnknown_80FC714);
LogMessageByIdWithPopupCheckUser_Async(pokemon, gUnknown_80FC714);
r4 = FALSE;
r8 = FALSE;
}
else if (entityInfo->cringeClassStatus.status == 7) {
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], pokemon, 0);
LogMessageByIdWithPopupCheckUser(pokemon, gUnknown_80FC718);
LogMessageByIdWithPopupCheckUser_Async(pokemon, gUnknown_80FC718);
r4 = FALSE;
r8 = FALSE;
}
else if (entityInfo->burnClassStatus.status == 4)
{
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], pokemon, 0);
LogMessageByIdWithPopupCheckUser(pokemon, gUnknown_80FC6A8);
LogMessageByIdWithPopupCheckUser_Async(pokemon, gUnknown_80FC6A8);
r4 = FALSE;
r8 = FALSE;
}
@ -995,7 +995,7 @@ void HandleUseOrbAction(Entity *pokemon)
}
sub_806A5B8(pokemon);
TryTriggerMonsterHouseWithMsg(pokemon, gDungeon->forceMonsterHouse);
TryTriggerMonsterHouseWithMsg_Async(pokemon, gDungeon->forceMonsterHouse);
}
else if (r4)
sub_8044D40(&act, 0);

View File

@ -454,7 +454,7 @@ void MonTryPickUpItem(Entity *entity)
if (ShouldMonsterRunAwayAndShowEffect(entity, TRUE)) {
sub_8045BF8(gFormatBuffer_Items[0], groundItem);
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], entity, 0);
DisplayDungeonLoggableMessageTrue(entity, gMonTerrifiedCouldntPickUpItem);
DisplayDungeonLoggableMessageTrue_Async(entity, gMonTerrifiedCouldntPickUpItem);
}
else if (!_entityInfo->isNotTeamMember && GetItemCategory(groundItem->id) == CATEGORY_POKE) {
// Why check the same thing again?
@ -467,7 +467,7 @@ void MonTryPickUpItem(Entity *entity)
AddToTeamMoney(GetMoneyValue(groundItem));
sub_8045BF8(gFormatBuffer_Items[0], groundItem);
RemoveGroundItem(&entity->pos, 1);
DisplayDungeonLoggableMessageTrue(entity, gMonPickedUpItem);
DisplayDungeonLoggableMessageTrue_Async(entity, gMonPickedUpItem);
}
else {
s32 i, nItems, newInventoryId;
@ -531,9 +531,9 @@ void MonTryPickUpItem(Entity *entity)
RemoveGroundItem(&entity->pos, 1);
PlaySoundEffect(0x14A);
if (inventoryIds[newInventoryId] <= -1)
DisplayDungeonLoggableMessageTrue(entity, gMonPickedUpItem2);
DisplayDungeonLoggableMessageTrue_Async(entity, gMonPickedUpItem2);
else
DisplayDungeonLoggableMessageTrue(entity, gMonPickedUpItemToolbox);
DisplayDungeonLoggableMessageTrue_Async(entity, gMonPickedUpItemToolbox);
return;
}
@ -546,7 +546,7 @@ void MonTryPickUpItem(Entity *entity)
if (i == nItems) {
sub_8045BF8(gFormatBuffer_Items[0], groundItem);
DisplayDungeonLoggableMessageTrue(entity, gMonSteppedOnItem);
DisplayDungeonLoggableMessageTrue_Async(entity, gMonSteppedOnItem);
}
else {
if (_entityInfo->isNotTeamMember) {
@ -560,16 +560,16 @@ void MonTryPickUpItem(Entity *entity)
_entityInfo->heldItem = *groundItem;
sub_8045BF8(gFormatBuffer_Items[0], groundItem);
RemoveGroundItem(&entity->pos, 1);
DisplayDungeonLoggableMessageTrue(entity, gMonPickedUpItem2);
DisplayDungeonLoggableMessageTrue_Async(entity, gMonPickedUpItem2);
}
else if (AddItemToInventory(groundItem)) {
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], entity, 0);
DisplayDungeonLoggableMessageTrue(entity, gMonCouldntPickUpItem);
DisplayDungeonLoggableMessageTrue_Async(entity, gMonCouldntPickUpItem);
}
else {
sub_8045BF8(gFormatBuffer_Items[0], groundItem);
RemoveGroundItem(&entity->pos, 1);
DisplayDungeonLoggableMessageTrue(entity, gMonPickedUpItemToolbox);
DisplayDungeonLoggableMessageTrue_Async(entity, gMonPickedUpItemToolbox);
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -81,7 +81,7 @@ void sub_8087FF8(void)
sub_8085930(DIRECTION_NORTH);
sub_80855E4(sub_8086A3C);
if (sub_8086AE4(MONSTER_ARTICUNO)) {
HandleFaint(articunoEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
HandleFaint_Async(articunoEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
}
else {
LevelUpTarget(articunoEntity,articunoEntity,gArticunoConfigLevel,0,0);
@ -92,11 +92,11 @@ void sub_8087FF8(void)
CopyMonsterNameToBuffer(gFormatBuffer_Monsters[2], MONSTER_ARTICUNO);
}
void sub_8088088(u8 param_1, u8 param_2)
void sub_8088088(u8 monsterBehavior, u8 cutscene)
{
if ((param_2 == 0xD || param_2 == 0xE || param_2 == 0xF) && (param_1 == 0xD)) {
sub_8097FA8(0x9);
gDungeon->unk2 = 1;
if ((cutscene == CUTSCENE_FROSTY_GROTTO_ATTEMPT1 || cutscene == CUTSCENE_FROSTY_GROTTO_ATTEMPT2 || cutscene == CUTSCENE_FROSTY_GROTTO_POSTSTORY) && monsterBehavior == BEHAVIOR_ARTICUNO) {
sub_8097FA8(9);
gDungeon->unk2 = DUNGEON_UNK2_1;
}
}

View File

@ -58,7 +58,7 @@ void sub_808C5C0(void)
CopyMonsterNameToBuffer(gFormatBuffer_Monsters[2], MONSTER_CELEBI);
}
void nullsub_100(u8 r0, u8 r1, u8 r3)
void nullsub_100(u8 monsterBehavior, u8 cutscene, u8 r3)
{
}
@ -73,7 +73,7 @@ void CelebiJoinDialogue(void)
celebiEntity = GetEntityFromMonsterBehavior(BEHAVIOR_CELEBI);
if ((HasRecruitedMon(MONSTER_CELEBI)) || (!CanEntityBeRecruited(celebiEntity)))
{
HandleFaint(celebiEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
HandleFaint_Async(celebiEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
SpriteLookAroundEffect(leaderEntity);
sub_803E708(10,0x46);
// .........
@ -182,9 +182,9 @@ void CelebiJoinDialogue(void)
}
} while (state != 2);
}
DungeonFadeOutBGM(0x1e);
sub_803E708(0x1e,0x46);
gDungeon->unk2 = 1;
DungeonFadeOutBGM(30);
sub_803E708(30, 70);
gDungeon->unk2 = DUNGEON_UNK2_1;
}
static void sub_808C8E0(Entity *entity)
@ -209,13 +209,13 @@ void sub_808C938(void)
sub_80855E4(sub_808C9B0);
}
void sub_808C948(Entity *entity, u8 param_2)
void sub_808C948(Entity *entity, u8 cutscene)
{
bool8 flag;
s32 index;
Entity *pokeEntity;
if (param_2 == 0x37) {
if (cutscene == CUTSCENE_MAZE_BOSS) {
flag = FALSE;
for(index = 0; index < DUNGEON_MAX_WILD_POKEMON; index++){
pokeEntity = gDungeon->wildPokemon[index];
@ -225,7 +225,7 @@ void sub_808C948(Entity *entity, u8 param_2)
}
}
if (!flag) {
gDungeon->unk2 = 1;
gDungeon->unk2 = DUNGEON_UNK2_1;
}
}
}

View File

@ -58,10 +58,10 @@ void sub_808C3A0(void)
CopyMonsterNameToBuffer(gFormatBuffer_Monsters[2], MONSTER_DEOXYS_NORMAL);
}
void sub_808C414(u8 param_1,u8 param_2,u8 param_3)
void sub_808C414(u8 monsterBehavior, u8 cutscene, u8 param_3)
{
if ((param_2 == 0x35) && (param_1 == 0x1D)) {
gDungeon->unk2 = 1;
if (cutscene == CUTSCENE_METEOR_CAVE && monsterBehavior == BEHAVIOR_DEOXYS_NORMAL) {
gDungeon->unk2 = DUNGEON_UNK2_1;
DungeonStartNewBGM(MUS_RAYQUAZAS_DOMAIN);
}
}
@ -127,7 +127,7 @@ static void sub_808C550(void)
static void sub_808C590(Entity *r0)
{
HandleFaint(r0, DUNGEON_EXIT_DELETED_FOR_EVENT, 0);
HandleFaint_Async(r0, DUNGEON_EXIT_DELETED_FOR_EVENT, 0);
}
static void SetupDeoxysFacingDirection(Entity *deoxysEntity)

View File

@ -54,7 +54,7 @@ void sub_80885C4(void)
void sub_8088608(void)
{
gDungeon->unk2 = 1;
gDungeon->unk2 = DUNGEON_UNK2_1;
}
void sub_8088618(void)

View File

@ -59,7 +59,7 @@ void sub_8089C90(void)
sub_80854D4();
sub_8085930(DIRECTION_NORTH);
if (HasRecruitedMon(MONSTER_ENTEI)) {
HandleFaint(EnteiEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
HandleFaint_Async(EnteiEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
}
else {
SetFacingDirection(EnteiEntity, DIRECTION_SOUTH);
@ -68,11 +68,11 @@ void sub_8089C90(void)
CopyMonsterNameToBuffer(gFormatBuffer_Monsters[2], MONSTER_ENTEI);
}
void sub_8089CFC(u8 param_1, u8 param_2)
void sub_8089CFC(u8 monsterBehavior, u8 cutscene)
{
if ((param_2 == 0x20 || param_2 == 0x21 || param_2 == 0x22) && (param_1 == 0x12)) {
sub_8097FA8(0x15);
gDungeon->unk2 = 1;
if ((cutscene == CUTSCENE_FIERY_FIELD_ATTEMPT1 || cutscene == CUTSCENE_FIERY_FIELD_ATTEMPT2 || cutscene == CUTSCENE_FIERY_FIELD_POSTSTORY) && monsterBehavior == BEHAVIOR_ENTEI) {
sub_8097FA8(21);
gDungeon->unk2 = DUNGEON_UNK2_1;
}
}

View File

@ -78,7 +78,7 @@ void sub_80886C4(void)
sub_8085374();
sub_80854D4();
sub_8085930(DIRECTION_NORTH);
HandleFaint(alakazamEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
HandleFaint_Async(alakazamEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
SetFacingDirection(groudonEntity, DIRECTION_SOUTH);
sub_8086A3C(groudonEntity);
sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y);
@ -102,9 +102,9 @@ void sub_808875C(void)
sub_80854D4();
sub_8085930(DIRECTION_NORTH);
sub_80855E4(sub_8086A3C);
HandleFaint(alakazamEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
HandleFaint_Async(alakazamEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
if (sub_8086AE4(MONSTER_GROUDON)) {
HandleFaint(groudonEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
HandleFaint_Async(groudonEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
}
else {
LevelUpTarget(groudonEntity,groudonEntity,gGroudonConfigLevel,0,0);
@ -116,11 +116,11 @@ void sub_808875C(void)
CopyMonsterNameToBuffer(gFormatBuffer_Monsters[3], MONSTER_ALAKAZAM);
}
void sub_8088818(u8 param_1, u8 param_2)
void sub_8088818(u8 monsterBehavior, u8 cutscene)
{
if ((param_2 == 0x12 || param_2 == 0x13 || param_2 == 0x14) && (param_1 == 0xE)) {
sub_8097FA8(0xC);
gDungeon->unk2 = 1;
if ((cutscene == CUTSCENE_MAGMA_CAVERN_PIT_ATTEMPT1 || cutscene == CUTSCENE_MAGMA_CAVERN_PIT_ATTEMPT2 || cutscene == CUTSCENE_MAGMA_CAVERN_PIT_POSTSTORY) && monsterBehavior == BEHAVIOR_GROUDON_2) {
sub_8097FA8(12);
gDungeon->unk2 = DUNGEON_UNK2_1;
}
}
@ -172,7 +172,7 @@ void GroudonPreFightDialogue(void)
sub_80861B8(alakazamEntity,6,DIRECTION_NORTH);
PlaySoundEffect(0x205);
sub_8086738();
HandleFaint(alakazamEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
HandleFaint_Async(alakazamEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
DisplayDungeonDialogue(&GroudonPreFightDialogue_8);
sub_803E708(10,0x46);
DisplayDungeonDialogue(&GroudonPreFightDialogue_9);

View File

@ -65,7 +65,7 @@ void sub_808A668(void)
sub_80854D4();
sub_8085930(DIRECTION_NORTH);
if (HasRecruitedMon(MONSTER_HO_OH)) {
HandleFaint(HoOhEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
HandleFaint_Async(HoOhEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
}
else {
SetFacingDirection(HoOhEntity, DIRECTION_SOUTH);
@ -75,11 +75,11 @@ void sub_808A668(void)
CopyMonsterNameToBuffer(gFormatBuffer_Monsters[2], MONSTER_HO_OH);
}
void sub_808A6E8(u8 param_1, u8 param_2)
void sub_808A6E8(u8 monsterBehavior, u8 cutscene)
{
if ((param_2 == 0x29 || param_2 == 0x2A) && (param_1 == 0x15)) {
sub_8097FA8(0x1A);
gDungeon->unk2 = 1;
if ((cutscene == CUTSCENE_MT_FARAWAY || cutscene == CUTSCENE_MT_FARAWAY_POSTSTORY) && monsterBehavior == BEHAVIOR_HO_OH) {
sub_8097FA8(26);
gDungeon->unk2 = DUNGEON_UNK2_1;
}
}

View File

@ -36,7 +36,7 @@
static void sub_808B50C(void);
static void JirachiWish(void);
static void JirachiWish_Async(void);
static void JirachiWishGrantFlash(void);
static void sub_808BB3C(DungeonPos *pos1);
static void sub_808BBA8(Entity *jirachiEntity);
@ -78,7 +78,7 @@ void sub_808B35C(void)
sub_8085930(DIRECTION_NORTH);
sub_80855E4(sub_8086A3C);
if (HasRecruitedMon(MONSTER_JIRACHI)) {
HandleFaint(jirachiEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
HandleFaint_Async(jirachiEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
}
else {
SetFacingDirection(jirachiEntity, DIRECTION_SOUTH);
@ -91,29 +91,24 @@ void sub_808B35C(void)
CopyMonsterNameToBuffer(gFormatBuffer_Monsters[2], MONSTER_JIRACHI);
}
void sub_808B3E4(u8 param_1, u8 param_2, u8 param_3)
void sub_808B3E4_Async(u8 monsterBehavior, u8 cutscene, u8 param_3)
{
u8 uVar1;
if ((param_2 == 0x31 || param_2 == 0x32) && (param_1 == 0x1A)) {
sub_8097FA8(0x1E);
if(param_3 != 0)
{
gDungeon->unk2 = 1;
}
else {
uVar1 = gDungeon->unk1356C;
if(sub_80860A8(0x36) != 0)
{
JirachiWish();
if ((cutscene == CUTSCENE_JIRACHI || cutscene == CUTSCENE_JIRACHI_POSTSTORY) && monsterBehavior == BEHAVIOR_JIRACHI) {
sub_8097FA8(30);
if (param_3 != 0)
gDungeon->unk2 = DUNGEON_UNK2_1;
else {
bool8 b = gDungeon->unk1356C;
if (ItemInInventoryOrHeld(ITEM_WISH_STONE))
JirachiWish_Async();
else
sub_808B50C();
gDungeon->unk1356C = b;
UpdateMinimap();
}
else
{
sub_808B50C();
}
gDungeon->unk1356C = uVar1;
UpdateMinimap();
}
}
}
void JirachiPreFightDialogue(void)
@ -168,12 +163,12 @@ static void sub_808B50C(void)
JirachiSpinEffect(jirachiEntity);
DisplayDungeonDialogue(&gUnknown_81055F4);
sub_803E708(10,70);
gDungeon->unk2 = 1;
gDungeon->unk2 = DUNGEON_UNK2_1;
}
static const u8 sJirachiItems[] = {ITEM_PROTEIN, ITEM_CALCIUM, ITEM_IRON, ITEM_ZINC, ITEM_JOY_SEED, ITEM_GINSENG, ITEM_LIFE_SEED, ITEM_SITRUS_BERRY};
static void JirachiWish(void)
static void JirachiWish_Async(void)
{
Entity *jirachiEntity;
DungeonPos *LeaderPos;
@ -189,7 +184,7 @@ static void JirachiWish(void)
GetEntInfo(jirachiEntity)->unk15E = 0;
sub_80861B8(jirachiEntity,0xe,DIRECTION_SOUTH);
sub_80855E4(sub_80861A8);
gDungeon->unk1356C = 1;
gDungeon->unk1356C = TRUE;
DungeonFadeOutBGM(0x1e);
sub_803E708(0x1e,0x46);
DisplayDungeonDialogue(&gUnknown_8105668);

View File

@ -51,7 +51,7 @@ void sub_808C10C(void)
sub_80854D4();
sub_8085930(DIRECTION_NORTH);
if (HasRecruitedMon(MONSTER_KYOGRE)) {
HandleFaint(kyogreEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
HandleFaint_Async(kyogreEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
}
else {
gDungeon->unk7 = 1;
@ -65,10 +65,10 @@ void sub_808C10C(void)
CopyMonsterNameToBuffer(gFormatBuffer_Monsters[3], MONSTER_GROUDON);
}
void sub_808C1A4(u8 param_1,u8 param_2,u8 param_3)
void sub_808C1A4(u8 monsterBehavior, u8 cutscene, u8 param_3)
{
if ((param_2 == 0x34) && (param_1 == 0x1C)) {
gDungeon->unk2 = 1;
if (cutscene == CUTSCENE_STORMY_SEA && monsterBehavior == BEHAVIOR_KYOGRE) {
gDungeon->unk2 = DUNGEON_UNK2_1;
DungeonStartNewBGM(MUS_FRIEND_AREA_CRYPTIC_CAVE);
}
}
@ -87,7 +87,7 @@ void KyogrePreFightDialogue(void)
sub_803E708(10,0x46);
DisplayDungeonDialogue(&gKyogrePreFightDialogue_8);
sub_803E708(10,0x46);
gDungeon->unk2 = 1;
gDungeon->unk2 = DUNGEON_UNK2_1;
}
else {
DisplayDungeonDialogue(&gKyogrePreFightDialogue_1);

View File

@ -77,16 +77,16 @@ void sub_808AA94(void)
sub_80854D4();
sub_8085930(DIRECTION_NORTH);
sub_80855E4(sub_8086A3C);
HandleFaint(LatiosEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
HandleFaint_Async(LatiosEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y - 3);
CopyMonsterNameToBuffer(gFormatBuffer_Monsters[2], MONSTER_LATIOS);
}
void sub_808AAF0(u8 param_1, u8 param_2)
void sub_808AAF0(u8 monsterBehavior, u8 cutscene)
{
if ((param_2 == 0x2B || param_2 == 0x2C || param_2 == 0x2D) && (param_1 == 0x16)) {
sub_8097FA8(0x1C);
gDungeon->unk2 = 1;
if ((cutscene == CUTSCENE_NORTHERN_RANGE_ATTEMPT1 || cutscene == CUTSCENE_NORTHERN_RANGE_ATTEMPT2 || cutscene == CUTSCENE_NORTHERN_RANGE_POSTSTORY) && monsterBehavior == BEHAVIOR_LATIOS) {
sub_8097FA8(28);
gDungeon->unk2 = DUNGEON_UNK2_1;
}
}

View File

@ -49,7 +49,7 @@ void sub_808BDEC(void)
sub_80855E4(sub_8086A3C);
if (HasRecruitedMon(MONSTER_LUGIA)) {
DungeonStartNewBGM(MUS_FRIEND_AREA_CRYPTIC_CAVE);
HandleFaint(lugiaEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
HandleFaint_Async(lugiaEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
}
else {
gDungeon->unk7 = 1;
@ -59,10 +59,10 @@ void sub_808BDEC(void)
CopyMonsterNameToBuffer(gFormatBuffer_Monsters[2], MONSTER_LUGIA);
}
void sub_808BE70(u8 param_1,u8 param_2,u8 param_3)
void sub_808BE70(u8 monsterBehavior, u8 cutscene, u8 param_3)
{
if ((param_2 == 0x33) && (param_1 == 0x1B)) {
gDungeon->unk2 = 1;
if (cutscene == CUTSCENE_SILVER_TRENCH && monsterBehavior == BEHAVIOR_LUGIA) {
gDungeon->unk2 = DUNGEON_UNK2_1;
}
}

View File

@ -72,8 +72,8 @@ void sub_8088E5C(void)
sub_80854D4();
sub_8085930(DIRECTION_NORTH);
sub_80855E4(sub_8086A3C);
HandleFaint(groudonEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
HandleFaint(alakazamEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
HandleFaint_Async(groudonEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
HandleFaint_Async(alakazamEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y + -3);
CopyMonsterNameToBuffer(gFormatBuffer_Monsters[2], MONSTER_GROUDON);
CopyMonsterNameToBuffer(gFormatBuffer_Monsters[3], MONSTER_ALAKAZAM);
@ -203,7 +203,7 @@ void MagmaCavernMidDialogue(void)
// Be careful!
DisplayDungeonDialogue(&MagmaCavernMidDialogue_15);
sub_803E708(10,0x46);
gDungeon->unk2 = 1;
gDungeon->unk2 = DUNGEON_UNK2_1;
}
void sub_8089168(void)

View File

@ -59,25 +59,25 @@ void sub_808974C(void)
sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y + -3);
}
void sub_8089788(Entity *entity, u8 param_2, u8 param_3)
void sub_8089788(Entity *entity, u8 monsterBehavior, u8 cutscene)
{
Entity *monEntity;
s32 index;
bool8 found = FALSE;
if (param_3 == 0x1A || param_3 == 0x1B) {
if (cutscene == CUTSCENE_UPROAR_FOREST_ATTEMPT1 || cutscene == CUTSCENE_UPROAR_FOREST_ATTEMPT2) {
for(index = 0; index < DUNGEON_MAX_WILD_POKEMON; index++)
{
monEntity = gDungeon->wildPokemon[index];
if ((EntityIsValid(monEntity)) && (monEntity != entity) && (GetEntInfo(monEntity)->monsterBehavior == param_2)) {
if ((EntityIsValid(monEntity)) && (monEntity != entity) && (GetEntInfo(monEntity)->monsterBehavior == monsterBehavior)) {
found = TRUE;
break;
}
}
if(!found){
sub_8097FA8(0x11);
gDungeon->unk2 = 1;
sub_8097FA8(17);
gDungeon->unk2 = DUNGEON_UNK2_1;
}
}
}
@ -143,7 +143,7 @@ void sub_80898E4(void)
static void sub_80898F8(Entity *r0)
{
HandleFaint(r0, DUNGEON_EXIT_DELETED_FOR_EVENT, 0);
HandleFaint_Async(r0, DUNGEON_EXIT_DELETED_FOR_EVENT, 0);
}
static void sub_8089908(Entity *r0)

View File

@ -63,17 +63,17 @@ void sub_8086F00(void)
CopyMonsterNameToBuffer(gFormatBuffer_Monsters[4], MONSTER_CATERPIE);
}
void sub_8086F54(u8 param_1, u8 param_2)
void sub_8086F54(u8 monsterBehavior, u8 cutscene)
{
s32 index;
if (param_2 == 4 || param_2 == 5) {
if (cutscene == CUTSCENE_SINISTER_WOODS_ATTEMPT1 || cutscene == CUTSCENE_SINISTER_WOODS_ATTEMPT2) {
bool8 found = FALSE;
for (index = 0; index < 0x10; index++) {
for (index = 0; index < 16; index++) {
struct Entity *entity = gDungeon->wildPokemon[index];
if ((EntityIsValid(entity))) {
struct EntityInfo *entInfo = GetEntInfo(entity);
if (entInfo->monsterBehavior != param_1) {
if (entInfo->monsterBehavior != monsterBehavior) {
found = TRUE;
return;
}
@ -82,7 +82,7 @@ void sub_8086F54(u8 param_1, u8 param_2)
if (!found) {
sub_8097FA8(3);
gDungeon->unk2 = 1;
gDungeon->unk2 = DUNGEON_UNK2_1;
}
}
}

View File

@ -94,7 +94,7 @@ void MedichamRescueDialogue(void)
sub_806CE68(medichamEntity, DIRECTION_SOUTH);
sub_803E708(0x20, 0x46);
sub_8042B0C(medichamEntity);
HandleFaint(medichamEntity, DUNGEON_EXIT_DELETED_FOR_EVENT, 0);
HandleFaint_Async(medichamEntity, DUNGEON_EXIT_DELETED_FOR_EVENT, 0);
gDungeon->unk4 = 1;
gDungeon->unk11 = 4;
}
@ -109,7 +109,7 @@ void sub_808CB5C(void)
DungeonStartNewBGM(MUS_IN_THE_DEPTHS_OF_THE_PIT);
sub_80854D4();
sub_8085930(DIRECTION_NORTH);
HandleFaint(medichamEntity, DUNGEON_EXIT_DELETED_FOR_EVENT, 0);
HandleFaint_Async(medichamEntity, DUNGEON_EXIT_DELETED_FOR_EVENT, 0);
sub_8085860(leaderEntity->pos.x, leaderEntity->pos.y);
CopyMonsterNameToBuffer(gFormatBuffer_Monsters[2], MONSTER_MEDICHAM);
}

View File

@ -65,7 +65,7 @@ void sub_8089978(void)
sub_80855E4(sub_8086A3C);
if(HasRecruitedMon(MONSTER_MEWTWO)){
DungeonStartNewBGM(MUS_FRIEND_AREA_CRYPTIC_CAVE);
HandleFaint(MewtwoEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
HandleFaint_Async(MewtwoEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
}
else {
gDungeon->unk7 = 1;
@ -76,11 +76,11 @@ void sub_8089978(void)
CopyMonsterNameToBuffer(gFormatBuffer_Monsters[2],MONSTER_MEWTWO);
}
void sub_8089A00(u8 param_1, u8 param_2)
void sub_8089A00(u8 monsterBehavior, u8 cutscene)
{
if ((param_2 == 0x1d || param_2 == 0x1e || param_2 == 0x1f) && (param_1 == 0x11)) {
sub_8097FA8(0x13);
gDungeon->unk2 = 1;
if ((cutscene == CUTSCENE_WESTERN_CAVE_ATTEMPT1 || cutscene == CUTSCENE_WESTERN_CAVE_ATTEMPT2 || cutscene == CUTSCENE_WESTERN_CAVE_POSTSTORY) && monsterBehavior == BEHAVIOR_MEWTWO) {
sub_8097FA8(19);
gDungeon->unk2 = DUNGEON_UNK2_1;
}
}

View File

@ -72,7 +72,7 @@ void sub_8087848(void)
sub_8085930(DIRECTION_WEST);
sub_80855E4(sub_8086A3C);
if (sub_8086AE4(MONSTER_MOLTRES)) {
HandleFaint(moltresEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
HandleFaint_Async(moltresEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
}
else {
LevelUpTarget(moltresEntity,moltresEntity,gMoltresConfigLevel,0,0);
@ -86,11 +86,11 @@ void sub_8087848(void)
CopyMonsterNameToBuffer(gFormatBuffer_Monsters[2],MONSTER_MOLTRES);
}
void sub_80878F4(u8 param_1, u8 param_2)
void sub_80878F4(u8 monsterBehavior, u8 cutscene)
{
if ((param_2 == 0xA || param_2 == 0xB || param_2 == 0xC) && (param_1 == 0x9)) {
sub_8097FA8(0x7);
gDungeon->unk2 = 1;
if ((cutscene == CUTSCENE_MT_BLAZE_PEAK_ATTEMPT1 || cutscene == CUTSCENE_MT_BLAZE_PEAK_ATTEMPT2 || cutscene == CUTSCENE_MT_BLAZE_PEAK_POSTSTORY) && monsterBehavior == BEHAVIOR_MOLTRES) {
sub_8097FA8(7);
gDungeon->unk2 = DUNGEON_UNK2_1;
}
}
@ -222,7 +222,7 @@ void MoltresPostStoryPreFightDialogue(void)
sub_803E708(10,0x46);
DisplayDungeonDialogue(&gUnknown_8100D3C);
sub_803E708(10,0x46);
gDungeon->unk2 = 1;
gDungeon->unk2 = DUNGEON_UNK2_1;
}
else {
DisplayDungeonDialogue(&gMoltresPostStoryPreFightDialogue_1);

View File

@ -75,7 +75,7 @@ void sub_8089F8C(void)
sub_80854D4();
sub_8085930(DIRECTION_NORTH);
if (HasRecruitedMon(MONSTER_RAIKOU)) {
HandleFaint(RaikouEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
HandleFaint_Async(RaikouEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
}
else {
SetFacingDirection(RaikouEntity, DIRECTION_SOUTH);
@ -84,11 +84,11 @@ void sub_8089F8C(void)
CopyMonsterNameToBuffer(gFormatBuffer_Monsters[2], MONSTER_RAIKOU);
}
void sub_8089FF0(u8 param_1, u8 param_2)
void sub_8089FF0(u8 monsterBehavior, u8 cutscene)
{
if ((param_2 == 0x23 || param_2 == 0x24 || param_2 == 0x25) && (param_1 == 0x13)) {
sub_8097FA8(0x17);
gDungeon->unk2 = 1;
if ((cutscene == CUTSCENE_LIGHTNING_FIELD_ATTEMPT1 || cutscene == CUTSCENE_LIGHTNING_FIELD_ATTEMPT2 || cutscene == CUTSCENE_LIGHTNING_FIELD_POSTSTORY) && monsterBehavior == BEHAVIOR_RAIKOU) {
sub_8097FA8(23);
gDungeon->unk2 = DUNGEON_UNK2_1;
}
}
@ -156,7 +156,7 @@ void RaikouPostStoryPreFightDialogue(void)
RaikouScreenFlash();
DisplayDungeonDialogue(&gRaikouPostStoryPreFightDialogue_3);
sub_803E708(10,70);
SetupBossFightHP(RaikouEntity,0x28a,MUS_BOSS_BATTLE);
SetupBossFightHP(RaikouEntity,650,MUS_BOSS_BATTLE);
ShiftCameraToPosition(&leaderEntity->pixelPos,0x10);
}
}

View File

@ -65,7 +65,7 @@ void sub_8089328(void)
sub_8085930(DIRECTION_NORTH);
sub_80855E4(sub_8086A3C);
if (sub_8086AE4(MONSTER_RAYQUAZA)) {
HandleFaint(rayquazaEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
HandleFaint_Async(rayquazaEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
}
else {
LevelUpTarget(rayquazaEntity,rayquazaEntity,gRayquazaConfigLevel,0,0);
@ -75,11 +75,11 @@ void sub_8089328(void)
CopyMonsterNameToBuffer(gFormatBuffer_Monsters[2],MONSTER_RAYQUAZA);
}
void sub_80893B4(u8 param_1, u8 param_2)
void sub_80893B4(u8 monsterBehavior, u8 cutscene)
{
if ((param_2 == 0x17 || param_2 == 0x18 || param_2 == 0x19) && (param_1 == 0xF)) {
sub_8097FA8(0xF);
gDungeon->unk2 = 1;
if ((cutscene == CUTSCENE_SKY_TOWER_SUMMIT_ATTEMPT1 || cutscene == CUTSCENE_SKY_TOWER_SUMMIT_ATTEMPT2 || cutscene == CUTSCENE_SKY_TOWER_SUMMIT_POSTSTORY) && monsterBehavior == BEHAVIOR_RAYQUAZA) {
sub_8097FA8(15);
gDungeon->unk2 = DUNGEON_UNK2_1;
}
}

View File

@ -40,209 +40,208 @@ static void SetupRegisteelFightHP(Entity *r0);
void sub_808ACC0(void)
{
Entity * entity;
if (HasRecruitedMon(MONSTER_REGIROCK)) {
entity = GetEntityFromMonsterBehavior(BEHAVIOR_REGIROCK);
HandleFaint(entity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
sub_8097FA8(0x22);
sub_8097FA8(0x1d);
sub_808B1CC(ITEM_ROCK_PART);
}
else if (sub_80860A8(ITEM_ROCK_PART) != 0) {
sub_8098044(0x22);
sub_8097FA8(0x1d);
}
else if (sub_80860A8(ITEM_MUSIC_BOX) != 0) {
sub_8098044(0x22);
sub_8097FA8(0x1d);
}
else {
sub_8098044(0x22);
sub_8098044(0x1d);
if (HasRecruitedMon(MONSTER_REGIROCK)) {
Entity *entity = GetEntityFromMonsterBehavior(BEHAVIOR_REGIROCK);
HandleFaint_Async(entity, DUNGEON_EXIT_DELETED_FOR_EVENT, NULL);
sub_8097FA8(34);
sub_8097FA8(29);
sub_808B1CC(ITEM_ROCK_PART);
}
else if (ItemInInventoryOrHeld(ITEM_ROCK_PART)) {
sub_8098044(34);
sub_8097FA8(29);
}
else if (ItemInInventoryOrHeld(ITEM_MUSIC_BOX)) {
sub_8098044(34);
sub_8097FA8(29);
}
else {
sub_8098044(34);
sub_8098044(29);
sub_80855E4(SetupRegiFacingDirection);
CopyMonsterNameToBuffer(gFormatBuffer_Monsters[2], MONSTER_REGIROCK);
}
}
}
void sub_808AD48(void)
{
Entity * entity;
if (HasRecruitedMon(MONSTER_REGICE)) {
entity = GetEntityFromMonsterBehavior(BEHAVIOR_REGICE);
HandleFaint(entity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
sub_8097FA8(0x22);
sub_8097FA8(0x1d);
sub_808B1CC(ITEM_ICE_PART);
}
else if (sub_80860A8(ITEM_ICE_PART) != 0) {
sub_8098044(0x22);
sub_8097FA8(0x1d);
}
else if (sub_80860A8(ITEM_MUSIC_BOX) != 0) {
sub_8098044(0x22);
sub_8097FA8(0x1d);
}
else {
sub_8098044(0x22);
sub_8098044(0x1d);
if (HasRecruitedMon(MONSTER_REGICE)) {
Entity *entity = GetEntityFromMonsterBehavior(BEHAVIOR_REGICE);
HandleFaint_Async(entity, DUNGEON_EXIT_DELETED_FOR_EVENT, NULL);
sub_8097FA8(34);
sub_8097FA8(29);
sub_808B1CC(ITEM_ICE_PART);
}
else if (ItemInInventoryOrHeld(ITEM_ICE_PART)) {
sub_8098044(34);
sub_8097FA8(29);
}
else if (ItemInInventoryOrHeld(ITEM_MUSIC_BOX)) {
sub_8098044(34);
sub_8097FA8(29);
}
else {
sub_8098044(34);
sub_8098044(29);
sub_80855E4(SetupRegiFacingDirection);
CopyMonsterNameToBuffer(gFormatBuffer_Monsters[2], MONSTER_REGICE);
}
}
}
void sub_808ADCC(void)
{
Entity * entity;
if (HasRecruitedMon(MONSTER_REGISTEEL)) {
entity = GetEntityFromMonsterBehavior(BEHAVIOR_REGISTEEL);
HandleFaint(entity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
sub_8097FA8(0x22);
sub_8097FA8(0x1d);
sub_808B1CC(ITEM_STEEL_PART);
}
else if (sub_80860A8(ITEM_STEEL_PART) != 0) {
sub_8098044(0x22);
sub_8097FA8(0x1d);
}
else if (sub_80860A8(ITEM_MUSIC_BOX) != 0) {
sub_8098044(0x22);
sub_8097FA8(0x1d);
}
else {
sub_8098044(0x22);
sub_8098044(0x1d);
if (HasRecruitedMon(MONSTER_REGISTEEL)) {
Entity *entity = GetEntityFromMonsterBehavior(BEHAVIOR_REGISTEEL);
HandleFaint_Async(entity, DUNGEON_EXIT_DELETED_FOR_EVENT, NULL);
sub_8097FA8(34);
sub_8097FA8(29);
sub_808B1CC(ITEM_STEEL_PART);
}
else if (ItemInInventoryOrHeld(ITEM_STEEL_PART)) {
sub_8098044(34);
sub_8097FA8(29);
}
else if (ItemInInventoryOrHeld(ITEM_MUSIC_BOX)) {
sub_8098044(34);
sub_8097FA8(29);
}
else {
sub_8098044(34);
sub_8098044(29);
sub_80855E4(SetupRegiFacingDirection);
CopyMonsterNameToBuffer(gFormatBuffer_Monsters[2], MONSTER_REGISTEEL);
}
}
void sub_808AE54(u8 param_1,u8 param_2,DungeonPos *param_3)
{
Entity * leaderEntity;
s16 IDStack[2];
Item item;
leaderEntity = CutsceneGetLeader();
sub_8052D44(IDStack,leaderEntity,0);
if (!sub_8098100(0x22) && (param_2 == 0x2E) && (param_1 == 0x17)) {
sub_808B1CC(ITEM_NOTHING);
if (!sub_8098100(0x1d)) {
ItemIdToItem(&item,ITEM_ROCK_PART,0);
SpawnDroppedItemWrapper(GetLeader(),param_3,&item);
DungeonStartNewBGM(MUS_IN_THE_DEPTHS_OF_THE_PIT);
// Something fell from Regirock's body
// Regirock was apparently guarding this item
DisplayDungeonDialogue(&gRegirockPostFightDialogue_1);
}
}
}
void sub_808AEC8(u8 param_1,u8 param_2,DungeonPos *param_3)
void sub_808AE54(u8 monsterBehavior, u8 cutscene, DungeonPos *pos)
{
Entity * leaderEntity;
s16 IDStack[2];
Item item;
Entity *leaderEntity;
s16 IDStack[2];
leaderEntity = CutsceneGetLeader();
sub_8052D44(IDStack, leaderEntity, NULL);
leaderEntity = CutsceneGetLeader();
sub_8052D44(IDStack,leaderEntity,0);
if (!sub_8098100(0x22) && (param_2 == 0x2F) && (param_1 == 0x18)) {
sub_808B1CC(ITEM_NOTHING);
if (!sub_8098100(0x1d)) {
ItemIdToItem(&item,ITEM_ICE_PART,0);
SpawnDroppedItemWrapper(GetLeader(),param_3,&item);
DungeonStartNewBGM(MUS_IN_THE_DEPTHS_OF_THE_PIT);
// Something fell from Regice's body
// Regice was apparently guarding this item
DisplayDungeonDialogue(&gRegicePostFightDialogue_1);
if (!sub_8098100(34) && cutscene == CUTSCENE_REGIROCK && monsterBehavior == BEHAVIOR_REGIROCK) {
sub_808B1CC(ITEM_NOTHING);
if (!sub_8098100(29)) {
Item item;
ItemIdToItem(&item, ITEM_ROCK_PART, FALSE);
SpawnDroppedItemWrapper(GetLeader(),pos,&item);
DungeonStartNewBGM(MUS_IN_THE_DEPTHS_OF_THE_PIT);
// Something fell from Regirock's body
// Regirock was apparently guarding this item
DisplayDungeonDialogue(&gRegirockPostFightDialogue_1);
}
}
}
}
void sub_808AF3C(u8 param_1,u8 param_2,DungeonPos *param_3)
void sub_808AEC8(u8 monsterBehavior, u8 cutscene, DungeonPos *pos)
{
Entity * leaderEntity;
s16 IDStack[2];
Item item;
Entity *leaderEntity;
s16 IDStack[2];
leaderEntity = CutsceneGetLeader();
sub_8052D44(IDStack, leaderEntity, NULL);
leaderEntity = CutsceneGetLeader();
sub_8052D44(IDStack,leaderEntity,0);
if (!sub_8098100(0x22) && (param_2 == 0x30) && (param_1 == 0x19)) {
sub_808B1CC(ITEM_NOTHING);
if (!sub_8098100(0x1d)) {
ItemIdToItem(&item,ITEM_STEEL_PART,0);
SpawnDroppedItemWrapper(GetLeader(),param_3, &item);
DungeonStartNewBGM(MUS_IN_THE_DEPTHS_OF_THE_PIT);
// Something fell from Registeel's body
// Registeel was apparently guarding this item
DisplayDungeonDialogue(&gRegisteelPostFightDialogue_1);
if (!sub_8098100(34) && cutscene == CUTSCENE_REGICE && monsterBehavior == BEHAVIOR_REGICE) {
sub_808B1CC(ITEM_NOTHING);
if (!sub_8098100(29)) {
Item item;
ItemIdToItem(&item, ITEM_ICE_PART, FALSE);
SpawnDroppedItemWrapper(GetLeader(), pos, &item);
DungeonStartNewBGM(MUS_IN_THE_DEPTHS_OF_THE_PIT);
// Something fell from Regice's body
// Regice was apparently guarding this item
DisplayDungeonDialogue(&gRegicePostFightDialogue_1);
}
}
}
}
void sub_808AFB0(u8 param_1)
void sub_808AF3C(u8 monsterBehavior, u8 cutscene, DungeonPos *pos)
{
Entity * leaderEntity;
s16 IDStack [2];
Entity *leaderEntity;
s16 IDStack[2];
leaderEntity = CutsceneGetLeader();
sub_8052D44(IDStack,leaderEntity,0);
if (!sub_8098100(0x22) && (param_1 == 0x2E) && (!sub_8098100(0x1d)) && (sub_80860A8(ITEM_ROCK_PART) != 0)) {
sub_8097FD0(0x1d);
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],GetLeader(),0);
// {POKEMON_0} obtained the Rock Part that Regirock was guarding
DisplayDungeonDialogue(&gRegirockPostFightDialogue_2);
sub_80421C0(0,0xd4);
sub_803E708(10,70);
sub_8046D20();
}
leaderEntity = CutsceneGetLeader();
sub_8052D44(IDStack, leaderEntity, NULL);
if (!sub_8098100(34) && cutscene == CUTSCENE_REGISTEEL && monsterBehavior == BEHAVIOR_REGISTEEL) {
sub_808B1CC(ITEM_NOTHING);
if (!sub_8098100(29)) {
Item item;
ItemIdToItem(&item, ITEM_STEEL_PART, FALSE);
SpawnDroppedItemWrapper(GetLeader(), pos, &item);
DungeonStartNewBGM(MUS_IN_THE_DEPTHS_OF_THE_PIT);
// Something fell from Registeel's body
// Registeel was apparently guarding this item
DisplayDungeonDialogue(&gRegisteelPostFightDialogue_1);
}
}
}
void sub_808B030(u8 param_1)
void sub_808AFB0(u8 cutscene)
{
Entity * leaderEntity;
s16 IDStack [2];
Entity *leaderEntity;
s16 IDStack[2];
leaderEntity = CutsceneGetLeader();
sub_8052D44(IDStack,leaderEntity,0);
if (!sub_8098100(0x22) && (param_1 == 0x2F) && (!sub_8098100(0x1d)) && (sub_80860A8(ITEM_ICE_PART) != 0)) {
sub_8097FD0(0x1d);
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],GetLeader(),0);
// {POKEMON_0} obtained the Ice Part that Regice was guarding
DisplayDungeonDialogue(&gRegicePostFightDialogue_2);
sub_80421C0(0,0xd4);
sub_803E708(10,70);
sub_8046D20();
}
leaderEntity = CutsceneGetLeader();
sub_8052D44(IDStack, leaderEntity, NULL);
if (!sub_8098100(34) && cutscene == CUTSCENE_REGIROCK && !sub_8098100(29) && ItemInInventoryOrHeld(ITEM_ROCK_PART)) {
sub_8097FD0(29);
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],GetLeader(),0);
// {POKEMON_0} obtained the Rock Part that Regirock was guarding
DisplayDungeonDialogue(&gRegirockPostFightDialogue_2);
sub_80421C0(0,212);
sub_803E708(10,70);
sub_8046D20();
}
}
void sub_808B0B0(u8 param_1)
void sub_808B030(u8 cutscene)
{
Entity * leaderEntity;
s16 IDStack [2];
Entity *leaderEntity;
s16 IDStack[2];
leaderEntity = CutsceneGetLeader();
sub_8052D44(IDStack,leaderEntity,0);
if (!sub_8098100(0x22) && (param_1 == 0x30) && (!sub_8098100(0x1d)) && (sub_80860A8(ITEM_STEEL_PART) != 0)) {
sub_8097FD0(0x1d);
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], GetLeader(), 0);
// {POKEMON_0} obtained the Steel Part that Registeel was guarding
DisplayDungeonDialogue(&gRegisteelPostFightDialogue_2);
sub_80421C0(0,0xd4);
sub_803E708(10,70);
sub_8046D20();
}
leaderEntity = CutsceneGetLeader();
sub_8052D44(IDStack, leaderEntity, NULL);
if (!sub_8098100(34) && cutscene == CUTSCENE_REGICE && !sub_8098100(29) && ItemInInventoryOrHeld(ITEM_ICE_PART)) {
sub_8097FD0(29);
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],GetLeader(),0);
// {POKEMON_0} obtained the Ice Part that Regice was guarding
DisplayDungeonDialogue(&gRegicePostFightDialogue_2);
sub_80421C0(0,212);
sub_803E708(10,70);
sub_8046D20();
}
}
void sub_808B0B0(u8 cutscene)
{
Entity *leaderEntity;
s16 IDStack[2];
leaderEntity = CutsceneGetLeader();
sub_8052D44(IDStack,leaderEntity, NULL);
if (!sub_8098100(34) && cutscene == CUTSCENE_REGISTEEL && !sub_8098100(29) && ItemInInventoryOrHeld(ITEM_STEEL_PART)) {
sub_8097FD0(29);
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], GetLeader(), 0);
// {POKEMON_0} obtained the Steel Part that Registeel was guarding
DisplayDungeonDialogue(&gRegisteelPostFightDialogue_2);
sub_80421C0(0,212);
sub_803E708(10,70);
sub_8046D20();
}
}
void RegirockPreFightDialogue(void)
{
if (!sub_8098100(0x22)) {
if (!sub_8098100(34)) {
sub_8085930(DIRECTION_NORTH);
// INTRUDER ALERT
// EXTERMINATE
@ -254,7 +253,7 @@ void RegirockPreFightDialogue(void)
void RegicePreFightDialogue(void)
{
if (!sub_8098100(0x22)) {
if (!sub_8098100(34)) {
sub_8085930(DIRECTION_NORTH);
// INTRUDER ALERT
// EXTERMINATE
@ -266,7 +265,7 @@ void RegicePreFightDialogue(void)
void RegisteelPreFightDialogue(void)
{
if (!sub_8098100(0x22)) {
if (!sub_8098100(34)) {
sub_8085930(DIRECTION_NORTH);
// INTRUDER ALERT
// EXTERMINATE
@ -288,7 +287,7 @@ static void sub_808B1CC(u8 itemID)
if ((pos.x < 0) || (pos.y < 0)) {
entity = GetLeader();
if (entity == NULL) {
gDungeon->unk2 = 1;
gDungeon->unk2 = DUNGEON_UNK2_1;
return;
}
pos.x = entity->pos.x;
@ -297,9 +296,8 @@ static void sub_808B1CC(u8 itemID)
sub_807FE04(&pos, 0);
tile = GetTileMut(pos.x, pos.y);
tile->terrainFlags = tile->terrainFlags | TERRAIN_TYPE_STAIRS;
if (((itemID != ITEM_NOTHING) && (sub_80860A8(itemID) == 0)) &&
(sub_80860A8(ITEM_MUSIC_BOX) == 0)) {
ItemIdToItem(&item,itemID,0);
if (itemID != ITEM_NOTHING && !ItemInInventoryOrHeld(itemID) && !ItemInInventoryOrHeld(ITEM_MUSIC_BOX)) {
ItemIdToItem(&item, itemID, FALSE);
pos.y--;
SpawnItem(&pos,&item,1);
}

View File

@ -64,18 +64,18 @@ void sub_8086B94(void)
diglettEntity = GetEntityFromMonsterBehavior(BEHAVIOR_DIGLETT);
skarmoryEntity = GetEntityFromMonsterBehavior(BEHAVIOR_SKARMORY);
HandleFaint(skarmoryEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
HandleFaint(diglettEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
HandleFaint_Async(skarmoryEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
HandleFaint_Async(diglettEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
sub_80854D4();
sub_8085930(DIRECTION_NORTH);
sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y);
}
void sub_8086BDC(u8 param_1, u8 prefight)
void sub_8086BDC(u8 monsterBehavior, u8 cutscene)
{
if ((prefight == PREFIGHT_SKARMORY_ATTEMPT1 || prefight == PREFIGHT_SKARMORY_ATTEMPT2) && param_1 == 3) {
if ((cutscene == CUTSCENE_MT_STEEL_ATTEMPT1 || cutscene == CUTSCENE_MT_STEEL_ATTEMPT2) && monsterBehavior == BEHAVIOR_SKARMORY) {
sub_8097FA8(1);
gDungeon->unk2 = 1;
gDungeon->unk2 = DUNGEON_UNK2_1;
}
}
@ -166,11 +166,11 @@ void SkarmoryReFightDialogue(void)
void sub_8086E40(void)
{
SpriteLookAroundEffect(CutsceneGetLeader());
sub_803E708(10,0x46);
DisplayDungeonDialogue(&gUnknown_8100D3C);
sub_803E708(10,0x46);
gDungeon->unk2 = 1;
SpriteLookAroundEffect(CutsceneGetLeader());
sub_803E708(10, 70);
DisplayDungeonDialogue(&gUnknown_8100D3C);
sub_803E708(10, 70);
gDungeon->unk2 = DUNGEON_UNK2_1;
}
static void SkarmoryEntry(Entity * skarmoryEntity)

View File

@ -100,7 +100,7 @@ void SmeargleRescueDialogue(void)
sub_806CE68(smeargleEntity, DIRECTION_SOUTH);
sub_803E708(0x20, 0x46);
sub_8042B0C(smeargleEntity);
HandleFaint(smeargleEntity, DUNGEON_EXIT_DELETED_FOR_EVENT, 0);
HandleFaint_Async(smeargleEntity, DUNGEON_EXIT_DELETED_FOR_EVENT, 0);
gDungeon->unk4 = 1;
gDungeon->unk11 = 4;
}
@ -116,7 +116,7 @@ void sub_808CD44(void)
sub_80854D4();
sub_8085930(DIRECTION_NORTH);
sub_80855E4(sub_8086A3C);
HandleFaint(smeargleEntity, DUNGEON_EXIT_DELETED_FOR_EVENT, 0);
HandleFaint_Async(smeargleEntity, DUNGEON_EXIT_DELETED_FOR_EVENT, 0);
sub_8085860(leaderEntity->pos.x, leaderEntity->pos.y - 3);
CopyMonsterNameToBuffer(gFormatBuffer_Monsters[2], MONSTER_SMEARGLE);
}

View File

@ -77,7 +77,7 @@ void sub_808A308(void)
sub_80854D4();
sub_8085930(DIRECTION_NORTH);
if (HasRecruitedMon(MONSTER_SUICUNE)) {
HandleFaint(SuicuneEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
HandleFaint_Async(SuicuneEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
}
else {
SetFacingDirection(SuicuneEntity, DIRECTION_SOUTH);
@ -86,11 +86,11 @@ void sub_808A308(void)
CopyMonsterNameToBuffer(gFormatBuffer_Monsters[2], MONSTER_SUICUNE);
}
void sub_808A36C(u8 param_1, u8 param_2)
void sub_808A36C(u8 monsterBehavior, u8 cutscene)
{
if ((param_2 == 0x26 || param_2 == 0x27 || param_2 == 0x28) && (param_1 == 0x14)) {
sub_8097FA8(0x19);
gDungeon->unk2 = 1;
if ((cutscene == CUTSCENE_NORTHWIND_FIELD_ATTEMPT1 || cutscene == CUTSCENE_NORTHWIND_FIELD_ATTEMPT2 || cutscene == CUTSCENE_NORTHWIND_FIELD_POSTSTORY) && monsterBehavior == BEHAVIOR_SUICUNE) {
sub_8097FA8(25);
gDungeon->unk2 = DUNGEON_UNK2_1;
}
}

View File

@ -75,7 +75,7 @@ void sub_808729C(void)
sub_8085930(4);
sub_80855E4(sub_8086A3C);
if (sub_8086AE4(MONSTER_ZAPDOS)) {
HandleFaint(zapdosEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
HandleFaint_Async(zapdosEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
}
else {
LevelUpTarget(zapdosEntity,zapdosEntity,gZapdosConfigLevel,0,0);
@ -87,11 +87,11 @@ void sub_808729C(void)
CopyMonsterNameToBuffer(gFormatBuffer_Monsters[3], MONSTER_ZAPDOS);
}
void sub_8087334(u8 param_1, u8 param_2)
void sub_8087334(u8 monsterBehavior, u8 cutscene)
{
if ((param_2 == 7 || param_2 == 8 || param_2 == 9) && (param_1 == 8)) {
if ((cutscene == CUTSCENE_MT_THUNDER_PEAK_ATTEMPT1 || cutscene == CUTSCENE_MT_THUNDER_PEAK_ATTEMPT2 || cutscene == CUTSCENE_MT_THUNDER_PEAK_POSTSTORY) && monsterBehavior == BEHAVIOR_ZAPDOS) {
sub_8097FA8(5);
gDungeon->unk2 = 1;
gDungeon->unk2 = DUNGEON_UNK2_1;
}
}

View File

@ -50,7 +50,7 @@
#include "dungeon_tilemap.h"
#include "effect_main.h"
static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struct DamageStruct *r5, bool32 isFalseSwipe, bool32 giveExp, s16 dungeonExitReason_, s32 arg8);
static bool8 HandleDealingDamageInternal_Async(Entity *attacker, Entity *target, struct DamageStruct *r5, bool32 isFalseSwipe, bool32 giveExp, s16 dungeonExitReason_, s32 arg8);
static bool8 sub_806E100(s48_16 *param_1, Entity *pokemon, Entity *target, u8 type, DamageStruct *dmgStruct);
static void sub_806F500(void);
static void sub_806F63C(Entity *param_1);
@ -67,14 +67,14 @@ static const s48_16 gUnknown_8106F3C = {0x0, 0x8000};
static const s48_16 gUnknown_8106F44 = {0x0, 0xE666};
static const s48_16 gUnknown_8106F4C = {0x0, 0x18000};
void HandleDealingDamage(Entity *attacker, Entity *target, struct DamageStruct *dmgStruct, bool32 isFalseSwipe, bool32 giveExp, s16 dungeonExitReason_, bool32 arg8, s32 argC)
void HandleDealingDamage_Async(Entity *attacker, Entity *target, struct DamageStruct *dmgStruct, bool32 isFalseSwipe, bool32 giveExp, s16 dungeonExitReason_, bool32 arg8, s32 argC)
{
bool32 r9;
// Some compiler weirdness, because it won't match without creating dungeonExitReason_ again
s32 dungeonExitReason = dungeonExitReason_;
s32 returnDmg = 0;
if (HandleDealingDamageInternal(attacker, target, dmgStruct, isFalseSwipe, giveExp, dungeonExitReason, argC))
if (HandleDealingDamageInternal_Async(attacker, target, dmgStruct, isFalseSwipe, giveExp, dungeonExitReason, argC))
return;
if (dmgStruct->tookNoDamage)
return;
@ -127,7 +127,7 @@ void HandleDealingDamage(Entity *attacker, Entity *target, struct DamageStruct *
if (returnDmg) {
struct DamageStruct sp;
TryDisplayDungeonLoggableMessage3(attacker, target, gUnknown_80FCFA4);
TryDisplayDungeonLoggableMessage3_Async(attacker, target, gUnknown_80FCFA4);
sp.dmg = (dmgStruct->dmg * returnDmg) / 4;
sp.type = dmgStruct->type;
sp.residualDmgType = RESIDUAL_DAMAGE_COUNTERATTACK;
@ -135,7 +135,7 @@ void HandleDealingDamage(Entity *attacker, Entity *target, struct DamageStruct *
sp.isCrit = FALSE;
sp.unkE = 0;
sp.tookNoDamage = FALSE;
HandleDealingDamageInternal(target, attacker, &sp, FALSE, giveExp, dungeonExitReason, argC);
HandleDealingDamageInternal_Async(target, attacker, &sp, FALSE, giveExp, dungeonExitReason, argC);
}
}
if (!EntityIsValid(attacker) || !EntityIsValid(target))
@ -224,7 +224,7 @@ void HandleDealingDamage(Entity *attacker, Entity *target, struct DamageStruct *
}
else {
sub_8041D00(destBondTarget, target);
DealDamageToEntity(destBondTarget, dmgStruct->dmg, RESIDUAL_DAMAGE_DESTINY_BOND, DUNGEON_EXIT_FAINTED_FROM_DESTINY_BOND);
DealDamageToEntity_Async(destBondTarget, dmgStruct->dmg, RESIDUAL_DAMAGE_DESTINY_BOND, DUNGEON_EXIT_FAINTED_FROM_DESTINY_BOND);
}
}
}
@ -235,7 +235,7 @@ static inline u32 ItemId(Item *item)
return item->id;
}
static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struct DamageStruct *dmgStruct, bool32 isFalseSwipe, bool32 giveExp, s16 dungeonExitReason_, s32 arg8)
static bool8 HandleDealingDamageInternal_Async(Entity *attacker, Entity *target, struct DamageStruct *dmgStruct, bool32 isFalseSwipe, bool32 giveExp, s16 dungeonExitReason_, s32 arg8)
{
s32 hpBefore, hpChange;
EntityInfo *targetData;
@ -263,14 +263,14 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc
if (dungeonExitReason != DUNGEON_EXIT_FAINTED_FROM_PERISH_SONG && AbilityIsActive(target, ABILITY_STURDY) && dmgStruct->dmg == 9999) {
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1], target, 0);
TryDisplayDungeonLoggableMessage3(attacker, target, gUnknown_80FCA90);
TryDisplayDungeonLoggableMessage3_Async(attacker, target, gUnknown_80FCA90);
sub_8042238(attacker, target);
dmgStruct->tookNoDamage = TRUE;
return FALSE;
}
if (targetData->frozenClassStatus.status == STATUS_FROZEN) {
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1], target, 0);
TryDisplayDungeonLoggableMessage3(attacker, target, gUnknown_80F9600);
TryDisplayDungeonLoggableMessage3_Async(attacker, target, gUnknown_80F9600);
sub_8042238(attacker, target);
dmgStruct->tookNoDamage = TRUE;
return FALSE;
@ -295,17 +295,17 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc
if (targetData->unk152 == 0) {
if (dmgStruct->isCrit) {
TryDisplayDungeonLoggableMessage3(attacker, target, gUnknown_80F9614);
TryDisplayDungeonLoggableMessage3_Async(attacker, target, gUnknown_80F9614);
}
switch (dmgStruct->typeEffectiveness) {
case EFFECTIVENESS_IMMUNE:
TryDisplayDungeonLoggableMessage3(attacker, target, gUnknown_80F9630);
TryDisplayDungeonLoggableMessage3_Async(attacker, target, gUnknown_80F9630);
break;
case EFFECTIVENESS_RESIST:
TryDisplayDungeonLoggableMessage3(attacker, target, gUnknown_80F9654);
TryDisplayDungeonLoggableMessage3_Async(attacker, target, gUnknown_80F9654);
break;
case EFFECTIVENESS_SUPER:
TryDisplayDungeonLoggableMessage3(attacker, target, gUnknown_80F9670);
TryDisplayDungeonLoggableMessage3_Async(attacker, target, gUnknown_80F9670);
break;
}
}
@ -315,13 +315,13 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc
if (dmgStruct->dmg == 0) {
if (ShouldDisplayEntity(attacker) && ShouldDisplayEntity(target)) {
if (targetData->unk152 == 0) {
TryDisplayDungeonLoggableMessage3(attacker, target, gUnknown_80F9688);
TryDisplayDungeonLoggableMessage3_Async(attacker, target, gUnknown_80F9688);
}
sub_8042238(attacker, target);
}
else {
if (targetData->unk152 == 0) {
TryDisplayDungeonLoggableMessage3(attacker, target, gUnknown_80F9688);
TryDisplayDungeonLoggableMessage3_Async(attacker, target, gUnknown_80F9688);
}
sub_803E708(0x1E, 0x18);
}
@ -336,7 +336,7 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc
UpdateTrapsVisibility();
}
if (targetData->unk152 == 0) {
TryDisplayDungeonLoggableMessage3(attacker, target, gUnknown_80F96A8);
TryDisplayDungeonLoggableMessage3_Async(attacker, target, gUnknown_80F96A8);
}
targetData->unkA0 = 999;
}
@ -357,12 +357,12 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc
sub_803ED30(-dmgStruct->dmg, target, 1, -1);
}
if (targetData->unk152 == 0 && str != NULL) {
TryDisplayDungeonLoggableMessage3(attacker, target, str);
TryDisplayDungeonLoggableMessage3_Async(attacker, target, str);
}
}
else {
if (targetData->unk152 == 0 && str != NULL) {
TryDisplayDungeonLoggableMessage3(attacker, target, str);
TryDisplayDungeonLoggableMessage3_Async(attacker, target, str);
}
}
}
@ -404,12 +404,12 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc
if (targetData->reflectClassStatus.status == STATUS_ENDURING) {
if (targetData->HP == 0) {
targetData->HP = 1;
TryDisplayDungeonLoggableMessage3(attacker, target, gUnknown_8100548);
TryDisplayDungeonLoggableMessage3_Async(attacker, target, gUnknown_8100548);
}
}
else if (isFalseSwipe == TRUE && targetData->HP == 0) {
targetData->HP = 1;
TryDisplayDungeonLoggableMessage3(attacker, target, gUnknown_810056C);
TryDisplayDungeonLoggableMessage3_Async(attacker, target, gUnknown_810056C);
}
hpChange = hpBefore - targetData->HP;
@ -461,42 +461,42 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1], target, 0);
if (dmgStruct->residualDmgType == RESIDUAL_DAMAGE_MOVE_FAIL || dmgStruct->residualDmgType == RESIDUAL_DAMAGE_RECOIL) {
if (targetData->isNotTeamMember) {
TryDisplayDungeonLoggableMessage3(attacker, target, gUnknown_80F9E44);
TryDisplayDungeonLoggableMessage3_Async(attacker, target, gUnknown_80F9E44);
}
else {
DisplayDungeonLoggableMessageTrue(attacker, gUnknown_80F9E44);
DisplayDungeonLoggableMessageTrue_Async(attacker, gUnknown_80F9E44);
}
}
else if (targetData->isNotTeamMember)
{
if (targetData->monsterBehavior == BEHAVIOR_RESCUE_TARGET) {
DisplayDungeonLoggableMessageTrue(attacker, gUnknown_80F9DF0[r8]);
DisplayDungeonLoggableMessageTrue_Async(attacker, gUnknown_80F9DF0[r8]);
}
else {
TryDisplayDungeonLoggableMessage3(attacker, target, gUnknown_80F9CC0[r8]);
TryDisplayDungeonLoggableMessage3_Async(attacker, target, gUnknown_80F9CC0[r8]);
}
}
else {
DungeonMon *recruitedMon = &gRecruitedPokemonRef->dungeonTeam[targetData->teamIndex];
if (targetData->isTeamLeader || (targetData->joinedAt.id == DUNGEON_JOIN_LOCATION_PARTNER && !gDungeon->unk644.canChangeLeader)) {
DisplayDungeonLoggableMessageTrue(attacker, gUnknown_80F9CEC[r8]);
DisplayDungeonLoggableMessageTrue_Async(attacker, gUnknown_80F9CEC[r8]);
}
else if (IsExperienceLocked(targetData->joinedAt.id)) {
DisplayDungeonLoggableMessageTrue(attacker, gUnknown_80F9DAC[r8]);
DisplayDungeonLoggableMessageTrue_Async(attacker, gUnknown_80F9DAC[r8]);
}
else if (targetData->monsterBehavior == BEHAVIOR_RESCUE_TARGET) {
DisplayDungeonLoggableMessageTrue(attacker, gUnknown_80F9DF0[r8]);
DisplayDungeonLoggableMessageTrue_Async(attacker, gUnknown_80F9DF0[r8]);
}
else if (sub_806A58C(recruitedMon->recruitedPokemonId)) {
if (gDungeon->unk644.unk19 != 0) {
DisplayDungeonLoggableMessageTrue(attacker, gUnknown_80F9D8C[r8]);
DisplayDungeonLoggableMessageTrue_Async(attacker, gUnknown_80F9D8C[r8]);
}
else {
DisplayDungeonLoggableMessageTrue(attacker, gUnknown_80F9D84[r8]);
DisplayDungeonLoggableMessageTrue_Async(attacker, gUnknown_80F9D84[r8]);
}
}
else {
DisplayDungeonLoggableMessageTrue(attacker, gUnknown_80F9D28[r8]);
DisplayDungeonLoggableMessageTrue_Async(attacker, gUnknown_80F9D28[r8]);
}
}
@ -534,7 +534,7 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc
sub_806CCB4(target, sub_806CEBC(target));
UpdateStatusIconFlags(target);
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1], target, 0);
DisplayDungeonLoggableMessageTrue(attacker, gUnknown_80FD46C);
DisplayDungeonLoggableMessageTrue_Async(attacker, gUnknown_80FD46C);
sub_806F63C(target);
return FALSE;
}
@ -564,7 +564,7 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc
sub_8042148(target);
monPos = teamMember->pos;
HandleFaint(teamMember, DUNGEON_EXIT_WAS_POSSESSED, target);
HandleFaint_Async(teamMember, DUNGEON_EXIT_WAS_POSSESSED, target);
sub_80694C0(target, monPos.x, monPos.y, 1);
UpdateEntityPixelPos(target, NULL);
target->unk22 = 0;
@ -592,7 +592,7 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc
UpdateStatusIconFlags(target);
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], target, 0);
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1], teamMember, 0);
DisplayDungeonLoggableMessageTrue(attacker, gUnknown_80FD484);
DisplayDungeonLoggableMessageTrue_Async(attacker, gUnknown_80FD484);
sub_806F63C(target);
return FALSE;
}
@ -645,7 +645,7 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc
sub_806CCB4(target, sub_806CEBC(target));
UpdateStatusIconFlags(target);
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1], target, 0);
DisplayDungeonLoggableMessageTrue(attacker, gUnknown_80FD46C);
DisplayDungeonLoggableMessageTrue_Async(attacker, gUnknown_80FD46C);
sub_806F63C(target);
return FALSE;
}
@ -714,19 +714,19 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc
sub_8069D4C(&sp, target);
if (TryRecruitMonster(attacker, target)) {
if (!HandleMonsterJoinSequence(attacker, target, &sp)) {
HandleFaint(target, DUNGEON_EXIT_LEFT_WITHOUT_BEING_BEFRIENDED, attacker);
if (!MonsterJoinSequence_Async(attacker, target, &sp)) {
HandleFaint_Async(target, DUNGEON_EXIT_LEFT_WITHOUT_BEING_BEFRIENDED, attacker);
}
else {
gUnknown_202F221 = 1;
}
}
else {
HandleFaint(target, dungeonExitReason, attacker);
HandleFaint_Async(target, dungeonExitReason, attacker);
}
}
else {
HandleFaint(target, dungeonExitReason, attacker);
HandleFaint_Async(target, dungeonExitReason, attacker);
}
return TRUE;
@ -826,7 +826,7 @@ static bool8 sub_806E100(s48_16 *param_1, Entity *pokemon, Entity *target, u8 ty
}
if (torrentVisualFlag) {
sub_80428EC(pokemon);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FEDA8);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FEDA8);
}
}
if ((type == TYPE_GRASS) && (AbilityIsActive(pokemon, ABILITY_OVERGROW))) {
@ -838,7 +838,7 @@ static bool8 sub_806E100(s48_16 *param_1, Entity *pokemon, Entity *target, u8 ty
}
if (overgrowVisualFlag) {
sub_80428D8(pokemon);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FED88);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FED88);
}
}
if ((type == TYPE_BUG) && (AbilityIsActive(pokemon, ABILITY_SWARM))) {
@ -850,7 +850,7 @@ static bool8 sub_806E100(s48_16 *param_1, Entity *pokemon, Entity *target, u8 ty
}
if (swarmVisualFlag) {
sub_8042978(pokemon);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FEDC8);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FEDC8);
}
}
if ((type == TYPE_FIRE) && (AbilityIsActive(pokemon, ABILITY_BLAZE))) {
@ -862,7 +862,7 @@ static bool8 sub_806E100(s48_16 *param_1, Entity *pokemon, Entity *target, u8 ty
}
if (blazeVisualFlag) {
sub_804298C(pokemon);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FEDE8);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FEDE8);
}
}
if (!(F48_16_IsZero(param_1)) && (MonsterIsType(pokemon, type))) {
@ -1034,7 +1034,7 @@ static void ApplyAtkDefStatBoosts(Entity *attacker, Entity *target, u8 moveType,
}
if (visFlags_attacker_1) {
sub_80428B0(attacker);
TryDisplayDungeonLoggableMessage3(attacker,target, gUnknown_80FEE04); // Guts boosted its power
TryDisplayDungeonLoggableMessage3_Async(attacker,target, gUnknown_80FEE04); // Guts boosted its power
}
}
@ -1049,7 +1049,7 @@ static void ApplyAtkDefStatBoosts(Entity *attacker, Entity *target, u8 moveType,
}
if (visFlags_attacker_2) {
sub_80428C4(attacker);
TryDisplayDungeonLoggableMessage3(attacker,target, gUnknown_80FEE2C); // It's special ability boosted Attack
TryDisplayDungeonLoggableMessage3_Async(attacker,target, gUnknown_80FEE2C); // It's special ability boosted Attack
}
}
@ -1090,7 +1090,7 @@ static void ApplyAtkDefStatBoosts(Entity *attacker, Entity *target, u8 moveType,
}
if (visFlags_target) {
sub_8042940(target);
TryDisplayDungeonLoggableMessage3(attacker,target, gUnknown_80FEE54); // Its special ability quickened attacks!
TryDisplayDungeonLoggableMessage3_Async(attacker,target, gUnknown_80FEE54); // Its special ability quickened attacks!
}
}
@ -1286,10 +1286,10 @@ void CalcDamage(Entity *attacker, Entity *target, u8 moveType, s32 movePower, s3
targetInfo->unk152 = 1;
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1], target, 0);
if (flashFireStatus == FLASH_FIRE_STATUS_MAXED) {
TryDisplayDungeonLoggableMessage3(attacker, target, gUnknown_80FAE00); // Fire moves won't become stronger!
TryDisplayDungeonLoggableMessage3_Async(attacker, target, gUnknown_80FAE00); // Fire moves won't become stronger!
}
else {
TryDisplayDungeonLoggableMessage3(attacker, target, gUnknown_80FADD8); // m1 used Flash Fire to absorb fire!
TryDisplayDungeonLoggableMessage3_Async(attacker, target, gUnknown_80FADD8); // m1 used Flash Fire to absorb fire!
}
}
}
@ -1395,7 +1395,7 @@ void sub_806F2BC(Entity *attacker, Entity *target, u8 moveType, s32 a2, struct D
dmgStruct->residualDmgType = RESIDUAL_DAMAGE_REGULAR;
}
void DealDamageToEntity(Entity *entity, s32 dmg, s32 residualDmgType, s32 dungeonExitReason_)
void DealDamageToEntity_Async(Entity *entity, s32 dmg, s32 residualDmgType, s32 dungeonExitReason_)
{
Entity spEntity;
struct DamageStruct dmgStruct;
@ -1409,10 +1409,10 @@ void DealDamageToEntity(Entity *entity, s32 dmg, s32 residualDmgType, s32 dungeo
dmgStruct.isCrit = FALSE;
dmgStruct.unkE = 0;
dmgStruct.tookNoDamage = FALSE;
HandleDealingDamage(&spEntity, entity, &dmgStruct, FALSE, FALSE, dungeonExitReason, FALSE, 0);
HandleDealingDamage_Async(&spEntity, entity, &dmgStruct, FALSE, FALSE, dungeonExitReason, FALSE, 0);
}
void sub_806F370(Entity *pokemon, Entity *target, s32 dmg, s32 giveExp, bool8 *tookNoDamage, u8 moveType, s16 dungeonExitReason_, s32 residualDmgType, s32 arg_10, s32 arg_14)
void sub_806F370_Async(Entity *pokemon, Entity *target, s32 dmg, s32 giveExp, bool8 *tookNoDamage, u8 moveType, s16 dungeonExitReason_, s32 residualDmgType, s32 arg_10, s32 arg_14)
{
s32 i;
struct DamageStruct dmgStruct;
@ -1447,7 +1447,7 @@ void sub_806F370(Entity *pokemon, Entity *target, s32 dmg, s32 giveExp, bool8 *t
dmgStruct.tookNoDamage = FALSE;
}
HandleDealingDamage(pokemon, target, &dmgStruct, FALSE, giveExp, dungeonExitReason, arg_10, arg_14);
HandleDealingDamage_Async(pokemon, target, &dmgStruct, FALSE, giveExp, dungeonExitReason, arg_10, arg_14);
if (tookNoDamage != NULL) {
*tookNoDamage = dmgStruct.tookNoDamage;
}

View File

@ -23,11 +23,11 @@
#include "dungeon_entity_movement.h"
#include "dungeon_wind.h"
static void sub_8044454(void);
static bool8 RunLeaderTurn(bool8);
static void sub_8044574(void);
static void sub_8044820(void);
static void TrySpawnMonsterAndActivatePlusMinus(void);
static void sub_8044454_Async(void);
static bool8 RunLeaderTurn_Async(bool8);
static void sub_8044574_Async(void);
static void sub_8044820_Async(void);
static void TrySpawnMonsterAndActivatePlusMinus_Async(void);
static void sub_8044AB4(void);
EWRAM_DATA DungeonPos gLeaderPosition = {0};
@ -41,31 +41,42 @@ const s16 gSpeedTurns[NUM_SPEED_COUNTERS][25] = {
[4] = {40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64},
};
void RunFractionalTurn(bool8 param_1)
void RunFractionalTurn_Async(bool8 param_1)
{
bool8 cVar2;
if (IsFloorOver()) return;
TrySpawnMonsterAndActivatePlusMinus();
if (IsFloorOver()) return;
cVar2 = RunLeaderTurn(param_1);
if (IsFloorOver()) return;
if (IsFloorOver())
return;
TrySpawnMonsterAndActivatePlusMinus_Async();
if (IsFloorOver())
return;
cVar2 = RunLeaderTurn_Async(param_1);
if (IsFloorOver())
return;
if (cVar2) {
UpdateWindTurns();
if (IsFloorOver()) return;
if (IsFloorOver())
return;
}
if (IsFloorOver()) return;
sub_8044574();
if (IsFloorOver()) return;
sub_8044820();
if (IsFloorOver()) return;
if (IsFloorOver())
return;
sub_8044574_Async();
if (IsFloorOver())
return;
sub_8044820_Async();
if (IsFloorOver())
return;
sub_8044AB4();
if (++gDungeon->unk644.fractionalTurn == 24) {
if (++gDungeon->unk644.fractionalTurn == 24)
gDungeon->unk644.fractionalTurn = 0;
}
}
static bool8 RunLeaderTurn(bool8 param_1)
static bool8 RunLeaderTurn_Async(bool8 param_1)
{
EntityInfo *entityInfo;
s32 movSpeed;
@ -84,8 +95,8 @@ static bool8 RunLeaderTurn(bool8 param_1)
entity = GetLeader();
if (entity == NULL)
return FALSE;
if (DisplayActions(0) == 0 && (gDungeon->unk644.unk28 != 0 || (gDungeon->unk644.unk2F != 0))) {
DungeonRunFrameActions(0xc);
if (!DisplayActions_Async(NULL) && (gDungeon->unk644.unk28 != 0 || gDungeon->unk644.unk2F != 0)) {
DungeonRunFrameActions(12);
}
GetEntInfo(entity)->speedStageChanged = FALSE;
if (IsFloorOver())
@ -107,9 +118,9 @@ static bool8 RunLeaderTurn(bool8 param_1)
gDungeon->noActionInProgress = FALSE;
if (IsFloorOver())
break;
ExecuteEntityDungeonAction(entity);
ExecuteEntityDungeonAction_Async(entity);
sub_8086AC0();
TryForcedLoss(0);
TryForcedLoss_Async(FALSE);
if (IsFloorOver())
break;
entityInfo = GetEntInfo(entity);
@ -118,7 +129,7 @@ static bool8 RunLeaderTurn(bool8 param_1)
}
if (IsFloorOver())
break;
sub_8044454();
sub_8044454_Async();
if (IsFloorOver())
break;
@ -137,7 +148,7 @@ static bool8 RunLeaderTurn(bool8 param_1)
return TRUE;
}
static void sub_8044454(void)
static void sub_8044454_Async(void)
{
Entity *entity;
EntityInfo *entityInfo;
@ -155,9 +166,9 @@ static void sub_8044454(void)
if (EntityIsValid(entity)) {
EnemyEvolution(entity);
RunMonsterAI(entity, 0);
ExecuteEntityDungeonAction(entity);
ExecuteEntityDungeonAction_Async(entity);
sub_8086AC0();
TryForcedLoss(0);
TryForcedLoss_Async(FALSE);
entityInfo->flags = (entityInfo->flags & ~(MOVEMENT_FLAG_SWAPPING_PLACES_PETRIFIED_ALLY)) | MOVEMENT_FLAG_UNK_14;
}
}
@ -165,7 +176,7 @@ static void sub_8044454(void)
}
}
void sub_80444F4(Entity *pokemon)
void sub_80444F4_Async(Entity *pokemon)
{
Entity *entity;
EntityInfo *entityInfo;
@ -180,9 +191,9 @@ void sub_80444F4(Entity *pokemon)
if ((EntityIsValid(entity)) && (pokemon != entity) && (entityInfo = GetEntInfo(entity), (entityInfo->flags & MOVEMENT_FLAG_SWAPPING_PLACES_PETRIFIED_ALLY))) {
if (IsFloorOver()) break;
RunMonsterAI(entity, 0);
ExecuteEntityDungeonAction(entity);
ExecuteEntityDungeonAction_Async(entity);
sub_8086AC0();
TryForcedLoss(0);
TryForcedLoss_Async(FALSE);
}
}
}
@ -194,7 +205,7 @@ struct Struct_8044574
struct Struct_8044574 *next;
};
static void sub_8044574(void)
static void sub_8044574_Async(void)
{
s32 i, id;
struct Struct_8044574 sp0[4];
@ -231,10 +242,10 @@ static void sub_8044574(void)
EnemyEvolution(teamMon);
for (j = 0; j < 3; j++) {
RunMonsterAI(teamMon, 0);
if (IsFloorOver() || !ExecuteEntityDungeonAction(teamMon))
if (IsFloorOver() || !ExecuteEntityDungeonAction_Async(teamMon))
break;
sub_8086AC0();
TryForcedLoss(0);
TryForcedLoss_Async(FALSE);
if (IsFloorOver())
break;
}
@ -288,9 +299,9 @@ static void sub_8044574(void)
info->recalculateFollow = TRUE;
info->aiAllySkip = FALSE;
RunMonsterAI(entity,1);
ExecuteEntityDungeonAction(entity);
ExecuteEntityDungeonAction_Async(entity);
sub_8086AC0();
TryForcedLoss(0);
TryForcedLoss_Async(FALSE);
EntityIsValid(entity); // Does nothing
}
ptr = ptr->next;
@ -303,7 +314,7 @@ static void sub_8044574(void)
if (EntityIsValid(teamMon)) {
EntityInfo *teamMonInfo = GetEntInfo(teamMon);
if (teamMonInfo->aiAllySkip) {
ApplyEndOfTurnEffects(teamMon);
DoEndOfTurnEffects_Async(teamMon);
if (EntityIsValid(teamMon)) {
EnemyEvolution(teamMon);
teamMonInfo->aiAllySkip = FALSE;
@ -314,7 +325,7 @@ static void sub_8044574(void)
}
}
static void sub_8044820(void)
static void sub_8044820_Async(void)
{
s32 movSpeed;
EntityInfo *entityInfo;
@ -347,9 +358,9 @@ static void sub_8044820(void)
EnemyEvolution(entity);
RunMonsterAI(entity, 0);
if (IsFloorOver()) break;
ExecuteEntityDungeonAction(entity);
ExecuteEntityDungeonAction_Async(entity);
sub_8086AC0();
TryForcedLoss(0);
TryForcedLoss_Async(FALSE);
if (IsFloorOver()) break;
}
}
@ -364,7 +375,7 @@ static void sub_8044820(void)
entity2 = gDungeon->wildPokemon[index];
if ((EntityIsValid(entity2)) && (entityInfo2 = GetEntInfo(entity2), entityInfo2->aiAllySkip))
{
ApplyEndOfTurnEffects(entity2);
DoEndOfTurnEffects_Async(entity2);
if (EntityIsValid(entity2)) {
EnemyEvolution(entity2);
entityInfo2->aiAllySkip = FALSE;
@ -374,7 +385,7 @@ static void sub_8044820(void)
}
}
static void TrySpawnMonsterAndActivatePlusMinus(void)
static void TrySpawnMonsterAndActivatePlusMinus_Async(void)
{
EntityInfo * entityInfo;
Entity *entity;
@ -417,7 +428,7 @@ static void TrySpawnMonsterAndActivatePlusMinus(void)
}
}
}
TryForcedLoss(0);
TryForcedLoss_Async(FALSE);
}
}
@ -428,13 +439,13 @@ static void sub_8044AB4(void)
if (gSpeedTurns[1][gDungeon->unk644.fractionalTurn + 1] != 0) {
for (index = 0; index < DUNGEON_MAX_POKEMON; index++) {
if (EntityIsValid(gDungeon->activePokemon[index])) {
DisplayActions(0);
DisplayActions_Async(0);
break;
}
}
sub_807EAA0(1,0);
sub_8086AC0();
TryForcedLoss(0);
TryForcedLoss_Async(FALSE);
}
}
@ -444,10 +455,10 @@ bool8 IsFloorOver(void)
if (GetLeader() == NULL) {
gDungeon->unk644.unk10 = 1;
}
else if (gDungeon->unk2 == 1) {
else if (gDungeon->unk2 == DUNGEON_UNK2_1) {
gDungeon->unk644.unk10 = 2;
}
else if (gDungeon->unk2 != 2) {
else if (gDungeon->unk2 != DUNGEON_UNK2_PITFALL_TRAP) {
return FALSE;
}
else {
@ -459,11 +470,8 @@ bool8 IsFloorOver(void)
bool8 sub_8044B84(void)
{
if(gDungeon->unk10 != 0)
{
if (gDungeon->unk10 != 0)
return TRUE;
}
else {
return IsFloorOver();
}
return IsFloorOver();
}

View File

@ -143,7 +143,7 @@ static void sub_8075050(EntityInfo *info, Unk_Entity_x184 *strPtr)
}
}
bool8 DisplayActions(Entity *a0)
bool8 DisplayActions_Async(Entity *a0)
{
s32 i, j, loop;
Entity *savedEntityPtr;
@ -274,8 +274,8 @@ bool8 DisplayActions(Entity *a0)
if (IsFloorOver())
break;
TryForcedLoss(0);
ApplyEndOfTurnEffects(mon);
TryForcedLoss_Async(FALSE);
DoEndOfTurnEffects_Async(mon);
if (!EntityIsValid(mon))
continue;
if (IsFloorOver())
@ -283,7 +283,7 @@ bool8 DisplayActions(Entity *a0)
EnemyEvolution(mon);
sub_8046D20();
TryTriggerMonsterHouseWithMsg(mon, gDungeon->forceMonsterHouse);
TryTriggerMonsterHouseWithMsg_Async(mon, gDungeon->forceMonsterHouse);
}
if (!EntityIsValid(mon))
continue;
@ -466,7 +466,7 @@ bool8 CheckEntityTileForInteraction(Entity *entity)
return FALSE;
}
void TryTriggerMonsterHouseWithMsg(Entity *pokemon, bool8 forcedMonsterHouse)
void TryTriggerMonsterHouseWithMsg_Async(Entity *pokemon, bool8 forcedMonsterHouse)
{
if (EntityIsValid(pokemon)
&& !GetEntInfo(pokemon)->isNotTeamMember
@ -475,9 +475,9 @@ void TryTriggerMonsterHouseWithMsg(Entity *pokemon, bool8 forcedMonsterHouse)
&& (GetTileAtEntitySafe(pokemon)->terrainFlags & TERRAIN_TYPE_IN_MONSTER_HOUSE))
{
// It's a monster house!
LogMessageByIdWithPopupCheckUser(GetLeader(), gPtrItsaMonsterHouseMessage);
LogMessageByIdWithPopupCheckUser_Async(GetLeader(), gPtrItsaMonsterHouseMessage);
gDungeon->unk644.monsterHouseTriggeredEvent = TRUE;
TriggerMonsterHouse(pokemon, forcedMonsterHouse);
TriggerMonsterHouse_Async(pokemon, forcedMonsterHouse);
sub_8041888(0);
if (sub_803F428(&pokemon->pos))
sub_803E708(0x78, 0x39);

View File

@ -295,7 +295,7 @@ static const struct FixedRoomEntitiesInfo sFixedRoomEntities[204] = {
},
[34] = {
.speciesId = MONSTER_DEOXYS_NORMAL,
.monsterBehavior = BEHAVIOR_29,
.monsterBehavior = BEHAVIOR_DEOXYS_NORMAL,
.trapId = NUM_TRAPS,
.roomId = 0,
},
@ -988,7 +988,7 @@ void sub_8051E7C(Entity *pokemon)
Tile *tile = GetTileMut(pokemon->pos.x, pokemon->pos.y - 1);
if (!(tile->terrainFlags & TERRAIN_TYPE_UNK_x1000)) {
LogMessageByIdWithPopupCheckUser(pokemon, gUnknown_80FDDF0); // It can't be used here!
LogMessageByIdWithPopupCheckUser_Async(pokemon, gUnknown_80FDDF0); // It can't be used here!
}
else if (!gDungeon->unk3A09) {
s32 x, y;
@ -1048,11 +1048,11 @@ void sub_8051E7C(Entity *pokemon)
sub_8049B8C();
UpdateTrapsVisibility();
sub_80429FC(&pos);
LogMessageByIdWithPopupCheckUser(pokemon, gUnknown_80FDDD0); // The closed corridor was opened!
LogMessageByIdWithPopupCheckUser_Async(pokemon, gUnknown_80FDDD0); // The closed corridor was opened!
sub_803E708(0x14, 0x3C);
}
else {
LogMessageByIdWithPopupCheckUser(pokemon, gUnknown_80FDDF0); // It can't be used here!
LogMessageByIdWithPopupCheckUser_Async(pokemon, gUnknown_80FDDF0); // It can't be used here!
}
}

View File

@ -110,7 +110,7 @@ void sub_80479B8(bool8 param_1, bool8 param_2, u8 param_3, Entity *pokemon, Enti
PlaySoundEffect(0x14d);
sub_8045BF8(gFormatBuffer_Items[0],item);
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FDBB8); // $m0 caught the $i0
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FDBB8); // $m0 caught the $i0
info->heldItem = *item;
sub_806A6E8(target);
}
@ -126,10 +126,10 @@ void sub_80479B8(bool8 param_1, bool8 param_2, u8 param_3, Entity *pokemon, Enti
if (item->flags & ITEM_FLAG_STICKY) {
sub_8045BF8(gFormatBuffer_Items[0],item);
TryDisplayDungeonLoggableMessage3(pokemon,target,gItemStickyDoesntWorkText);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gItemStickyDoesntWorkText);
if (param_1) {
u8 uStack_24;
sub_806F370(pokemon,target,gUnknown_80F4FAE,1,&uStack_24,0,DUNGEON_EXIT_FELLED_BY_THROWN_ITEM,RESIDUAL_DAMAGE_REGULAR,0,0);
sub_806F370_Async(pokemon,target,gUnknown_80F4FAE,1,&uStack_24,0,DUNGEON_EXIT_FELLED_BY_THROWN_ITEM,RESIDUAL_DAMAGE_REGULAR,0,0);
EnemyEvolution(pokemon);
return;
}
@ -145,10 +145,10 @@ void sub_80479B8(bool8 param_1, bool8 param_2, u8 param_3, Entity *pokemon, Enti
if (GetItemCategory(item->id) == CATEGORY_TMS_HMS || GetItemCategory(item->id) == CATEGORY_LINK_BOX) {
if (param_1) {
u8 uStack_23;
sub_806F370(pokemon,target,gUnknown_80F4FAC,1,&uStack_23,0,DUNGEON_EXIT_FELLED_BY_THROWN_ITEM,RESIDUAL_DAMAGE_REGULAR,0,0);
sub_806F370_Async(pokemon,target,gUnknown_80F4FAC,1,&uStack_23,0,DUNGEON_EXIT_FELLED_BY_THROWN_ITEM,RESIDUAL_DAMAGE_REGULAR,0,0);
}
else {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FE458);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FE458);
}
}
else {
@ -349,10 +349,10 @@ void sub_80479B8(bool8 param_1, bool8 param_2, u8 param_3, Entity *pokemon, Enti
default:
if (param_1) {
u8 auStack_22;
sub_806F370(pokemon,target,gUnknown_80F4FAC,1,&auStack_22,0,DUNGEON_EXIT_FELLED_BY_THROWN_ITEM,RESIDUAL_DAMAGE_REGULAR,0,0);
sub_806F370_Async(pokemon,target,gUnknown_80F4FAC,1,&auStack_22,0,DUNGEON_EXIT_FELLED_BY_THROWN_ITEM,RESIDUAL_DAMAGE_REGULAR,0,0);
}
else {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FE458);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FE458);
}
break;
}
@ -379,7 +379,7 @@ static void sub_80482FC(Entity *pokemon, Entity *target, u32 pp, u8 param_4)
static void sub_8048340(Entity *pokemon, Entity *target, u32 r2)
{
sub_806F370(pokemon, target, r2, 1, 0, 0, DUNGEON_EXIT_FELLED_BY_THROWN_ROCK, RESIDUAL_DAMAGE_REGULAR, 0, 0);
sub_806F370_Async(pokemon, target, r2, 1, 0, 0, DUNGEON_EXIT_FELLED_BY_THROWN_ROCK, RESIDUAL_DAMAGE_REGULAR, 0, 0);
}
static void HealSeedItemAction(Entity *pokemon, Entity *target, u8 r2)
@ -433,7 +433,7 @@ static void CheriBerryItemAction(Entity *pokemon, Entity *target)
EndBurnClassStatus(pokemon, target);
else
// Pointer to "But nothing happened!"
TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80F89F4);
TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80F89F4);
}
static void PechaBerryItemAction(Entity *pokemon, Entity *target)
@ -442,7 +442,7 @@ static void PechaBerryItemAction(Entity *pokemon, Entity *target)
if (ENTITY_POISONED(entInfo))
EndBurnClassStatus(pokemon, target);
else
TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80F89F4); // Pointer to "But nothing happened!"
TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80F89F4); // Pointer to "But nothing happened!"
}
static void WarpSeedItemAction(Entity *pokemon, Entity *target)
@ -473,7 +473,7 @@ static void StunSeedItemAction(Entity *pokemon, Entity *target)
static void PlainSeedItemAction(Entity *pokemon, Entity *target)
{
// Pointer to "But nothing happened!"
TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80F89F4);
TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80F89F4);
}
static void DoomSeedItemAction(Entity *pokemon, Entity *target)
@ -489,7 +489,7 @@ static void RawstBerryItemAction(Entity *pokemon, Entity *target)
{
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], target, 0);
// Pointer to "But nothing happened!"
TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FB580);
TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80FB580);
}
}
@ -503,15 +503,15 @@ static void HungerSeedItemAction(Entity *pokemon, Entity * target)
entityInfo = GetEntInfo(target);
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], target, 0);
if (IqSkillIsEnabled(target, IQ_SELF_CURER))
TryDisplayDungeonLoggableMessage3(pokemon, target, gPtrSelfHealPreventedHungerMessage);
TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gPtrSelfHealPreventedHungerMessage);
else
{
if (FixedPointToInt(entityInfo->belly) != 0) {
entityInfo->belly = IntToFixedPoint(0);
TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80F9740);
TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80F9740);
}
else
TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80F9760);
TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80F9760);
}
}
}
@ -547,18 +547,18 @@ static void GinsengItemAction(Entity *pokemon, Entity * target)
}
if (isMoveBoosted) {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FE454);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FE454);
if (moveBoost != 1) {
sub_803E708(10,0x40);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FE434);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FE434);
}
}
else {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FE40C);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FE40C);
}
}
else {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FE40C);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FE40C);
}
}
@ -575,7 +575,7 @@ static void BlastSeedItemAction(Entity *pokemon, Entity * target, u8 param_3)
entityInfo_1 = entityInfo;
if (gDungeon->unk644.unk31 != 0) {
dmg = gBlastSeedThrownBossDmgValue;
TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FEAE8); // It appears to be weak here...
TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80FEAE8); // It appears to be weak here...
}
else {
dmg = gBlastSeedThrownDmgValue;
@ -583,7 +583,7 @@ static void BlastSeedItemAction(Entity *pokemon, Entity * target, u8 param_3)
if (entityInfo_1->frozenClassStatus.status == STATUS_FROZEN) {
EndFrozenClassStatus(pokemon, target);
}
sub_806F370(pokemon, target, dmg, 1, auStack28, 0, DUNGEON_EXIT_DEFEATED_BLAST_SEED, RESIDUAL_DAMAGE_REGULAR, 0, 0);
sub_806F370_Async(pokemon, target, dmg, 1, auStack28, 0, DUNGEON_EXIT_DEFEATED_BLAST_SEED, RESIDUAL_DAMAGE_REGULAR, 0, 0);
}
else
{
@ -591,14 +591,14 @@ static void BlastSeedItemAction(Entity *pokemon, Entity * target, u8 param_3)
entity = sub_80696FC(pokemon);
if (entity == NULL)
{
TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FDBA0);
TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80FDBA0);
}
else
{
entityInfo = GetEntInfo(entity);
if (gDungeon->unk644.unk31 != 0) {
dmg = gBlastSeedEatenBossDmgValue;
TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FEAE8); // It appears to be weak here...
TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80FEAE8); // It appears to be weak here...
}
else {
dmg = gBlastSeedEatenDmgValue;
@ -606,7 +606,7 @@ static void BlastSeedItemAction(Entity *pokemon, Entity * target, u8 param_3)
if (entityInfo->frozenClassStatus.status == STATUS_FROZEN) {
EndFrozenClassStatus(pokemon, entity);
}
sub_806F370(pokemon, entity, dmg, 1, auStack28, 0, DUNGEON_EXIT_DEFEATED_BLAST_SEED, RESIDUAL_DAMAGE_REGULAR, 0, 0);
sub_806F370_Async(pokemon, entity, dmg, 1, auStack28, 0, DUNGEON_EXIT_DEFEATED_BLAST_SEED, RESIDUAL_DAMAGE_REGULAR, 0, 0);
}
}
}
@ -644,7 +644,7 @@ static void HandleGummiItemAction(Entity *pokemon, Entity *target, u8 gummiIndex
targetInfo->IQ = 999;
}
if (baseIQ == targetInfo->IQ) {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FD644);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FD644);
}
else {
iVar5 = currIQ - baseIQ;
@ -657,8 +657,8 @@ static void HandleGummiItemAction(Entity *pokemon, Entity *target, u8 gummiIndex
if (((iVar5 < 9) && (iVar3 = 1, iVar5 < 5)) && (iVar3 = 3, 2 < iVar5)) {
iVar3 = 2;
}
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FD648[iVar4]);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FD6E8[iVar3]);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FD648[iVar4]);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FD6E8[iVar3]);
LoadIQSkills(target);
DisplayMsgIfNewIqSkillLearned(targetInfo,baseIQ);
}
@ -700,11 +700,11 @@ bool8 sub_8048950(Entity *param_1,Item *item)
moveID = GetItemMoveID(item->id);
if ((item->flags & ITEM_FLAG_STICKY)) {
DisplayDungeonMessage(0,gItemStickyDoesntWorkText,1);
DisplayDungeonMessage_Async(0,gItemStickyDoesntWorkText,1);
return FALSE;
}
else if (IsHMItem(item->id)) {
DisplayDungeonMessage(0,gPtrCantUseInDungeonMessage,1);
DisplayDungeonMessage_Async(0,gPtrCantUseInDungeonMessage,1);
return FALSE;
}
else
@ -751,13 +751,13 @@ bool8 sub_8048A68(Entity *param_1,Item *item)
DungeonMon *pokemon;
if ((item->flags & ITEM_FLAG_STICKY)) {
DisplayDungeonMessage(0,gItemStickyDoesntWorkText,1);
DisplayDungeonMessage_Async(0,gItemStickyDoesntWorkText,1);
return FALSE;
}
else
{
if (!gDungeon->unk644.canChangeLeader) {
DisplayDungeonMessage(0,gUnknown_80F9BD8,1);
DisplayDungeonMessage_Async(0,gUnknown_80F9BD8,1);
return FALSE;
}
else
@ -814,7 +814,7 @@ bool8 HandleLinkBoxAction(Entity *entity, Item *item)
ActionContainer originalAction;
if (ItemSticky(item)) {
DisplayDungeonMessage(0,gItemStickyDoesntWorkText,1);
DisplayDungeonMessage_Async(0,gItemStickyDoesntWorkText,1);
return FALSE;
}
@ -893,14 +893,14 @@ bool8 sub_8048D50(Entity *pokemon, Item *item)
if ((item->flags & ITEM_FLAG_STICKY) != 0) {
sub_8045BF8(gFormatBuffer_Items[0], item);
LogMessageByIdWithPopupCheckUser(pokemon,gItemStickyDoesntWorkText);
LogMessageByIdWithPopupCheckUser_Async(pokemon,gItemStickyDoesntWorkText);
return FALSE;
}
else
{
if ((entityInfo->muzzled.muzzled == TRUE) && (IsEdibleItem(item->id))) {
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],pokemon,0);
LogMessageByIdWithPopupCheckUser(pokemon,gUnknown_80FDCA4);
LogMessageByIdWithPopupCheckUser_Async(pokemon,gUnknown_80FDCA4);
return FALSE;
}
}
@ -911,7 +911,7 @@ static void KeyItemAction(Entity *pokemon, Entity *target, u8 r2)
{
u8 temp;
if(r2 != 0)
sub_806F370(pokemon, target, gUnknown_80F4FAC, 1, &temp, 0, DUNGEON_EXIT_FELLED_BY_THROWN_ITEM, RESIDUAL_DAMAGE_REGULAR, 0, 0);
sub_806F370_Async(pokemon, target, gUnknown_80F4FAC, 1, &temp, 0, DUNGEON_EXIT_FELLED_BY_THROWN_ITEM, RESIDUAL_DAMAGE_REGULAR, 0, 0);
else
sub_8051E7C(pokemon);
}
@ -942,27 +942,27 @@ static void GrimyFoodItemAction(Entity *pokemon, Entity * target)
static void IcePartItemAction(Entity *pokemon, Entity *target, u8 r2)
{
LogMessageByIdWithPopupCheckUser(pokemon, gPtrIcePartCrumbledMessage);
LogMessageByIdWithPopupCheckUser_Async(pokemon, gPtrIcePartCrumbledMessage);
}
static void RockPartItemAction(Entity *pokemon, Entity *target, u8 r2)
{
LogMessageByIdWithPopupCheckUser(pokemon, gPtrRockPartCrumbledMessage);
LogMessageByIdWithPopupCheckUser_Async(pokemon, gPtrRockPartCrumbledMessage);
}
static void SteelPartItemAction(Entity *pokemon, Entity *target, u8 r2)
{
LogMessageByIdWithPopupCheckUser(pokemon, gPtrSteelPartCrumbledMessage);
LogMessageByIdWithPopupCheckUser_Async(pokemon, gPtrSteelPartCrumbledMessage);
}
static void WishStoneItemAction(Entity *pokemon, Entity *target, u8 r2)
{
LogMessageByIdWithPopupCheckUser(pokemon, gPtrWishStoneCrumbledMessage);
LogMessageByIdWithPopupCheckUser_Async(pokemon, gPtrWishStoneCrumbledMessage);
}
static void MusicBoxItemAction(Entity *pokemon, Entity *target, u8 r2)
{
sub_80421C0(pokemon, 0xD6);
LogMessageByIdWithPopupCheckUser(pokemon, gPtrMusicBoxPlayedCrumbledMessage);
LogMessageByIdWithPopupCheckUser_Async(pokemon, gPtrMusicBoxPlayedCrumbledMessage);
sub_803E708(0x3C, 0x46);
}

View File

@ -142,7 +142,7 @@ void CreateFloorItems(void)
}
}
void TryLeaderItemPickUp(struct DungeonPos *pos, bool8 printMsg)
void TryLeaderItemPickUp_Async(struct DungeonPos *pos, bool8 printMsg)
{
Item *tileItem;
int inventoryIds[INVENTORY_SIZE + 1];
@ -164,7 +164,7 @@ void TryLeaderItemPickUp(struct DungeonPos *pos, bool8 printMsg)
}
sub_8045BF8(gFormatBuffer_Items[0],tileItem);
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],leader,0);
LogMessageByIdWithPopupCheckUser(leader,gMonSteppedOnItem);
LogMessageByIdWithPopupCheckUser_Async(leader,gMonSteppedOnItem);
}
else if (ShouldMonsterRunAwayAndShowEffect(leader,1)) {
if (!printMsg) {
@ -172,14 +172,14 @@ void TryLeaderItemPickUp(struct DungeonPos *pos, bool8 printMsg)
}
sub_8045BF8(gFormatBuffer_Items[0],tileItem);
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],leader,0);
LogMessageByIdWithPopupCheckUser(leader,gMonTerrifiedCouldntPickUpItem);
LogMessageByIdWithPopupCheckUser_Async(leader,gMonTerrifiedCouldntPickUpItem);
}
else if (GetItemCategory(tileItem->id) == CATEGORY_POKE) {
PlaySoundEffect(0x14c);
AddToTeamMoney(GetMoneyValue(tileItem));
sub_8045BF8(gFormatBuffer_Items[0],tileItem);
RemoveGroundItem(pos,TRUE);
LogMessageByIdWithPopupCheckUser(leader,gPickedUpItem);
LogMessageByIdWithPopupCheckUser_Async(leader,gPickedUpItem);
DisplayItemTip(tileItem->id);
}
else {
@ -248,10 +248,10 @@ void TryLeaderItemPickUp(struct DungeonPos *pos, bool8 printMsg)
RemoveGroundItem(pos,TRUE);
PlaySoundEffect(0x14a);
if (inventoryIds[index] < 0) {
LogMessageByIdWithPopupCheckUser(leader,gPickedUpItem2);
LogMessageByIdWithPopupCheckUser_Async(leader,gPickedUpItem2);
}
else {
LogMessageByIdWithPopupCheckUser(leader,gPickedUpItemToolbox);
LogMessageByIdWithPopupCheckUser_Async(leader,gPickedUpItemToolbox);
}
DisplayItemTip(tileItem->id);
return;
@ -269,7 +269,7 @@ void TryLeaderItemPickUp(struct DungeonPos *pos, bool8 printMsg)
}
sub_8045BF8(gFormatBuffer_Items[0],tileItem);
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],leader,0);
LogMessageByIdWithPopupCheckUser(leader,gMonSteppedOnItem);
LogMessageByIdWithPopupCheckUser_Async(leader,gMonSteppedOnItem);
}
else {
PlaySoundEffect(0x14a);
@ -277,16 +277,16 @@ void TryLeaderItemPickUp(struct DungeonPos *pos, bool8 printMsg)
leaderInfo->heldItem = *tileItem;
sub_8045BF8(gFormatBuffer_Items[0],tileItem);
RemoveGroundItem(pos,TRUE);
LogMessageByIdWithPopupCheckUser(leader,gPickedUpItem2);
LogMessageByIdWithPopupCheckUser_Async(leader,gPickedUpItem2);
}
else if (AddItemToInventory(tileItem) != 0) {
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],leader,0);
LogMessageByIdWithPopupCheckUser(leader,gMonCouldntPickUpItem);
LogMessageByIdWithPopupCheckUser_Async(leader,gMonCouldntPickUpItem);
}
else {
sub_8045BF8(gFormatBuffer_Items[0],tileItem);
RemoveGroundItem(pos,TRUE);
LogMessageByIdWithPopupCheckUser(leader,gPickedUpItemToolbox);
LogMessageByIdWithPopupCheckUser_Async(leader,gPickedUpItemToolbox);
}
DisplayItemTip(tileItem->id);
}
@ -460,7 +460,7 @@ void SpawnDroppedItem(Entity *entity1, Entity *entity2, Item *item, bool8 a3, Du
if (tileObject != NULL && GetEntityType(tileObject) == ENTITY_TRAP) {
sub_8046734(entity2, &entity2->pos);
sub_807FE44(&entity2->pos, 1);
LogMessageByIdWithPopupCheckUser(entity1, gUnknown_80FED30);
LogMessageByIdWithPopupCheckUser_Async(entity1, gUnknown_80FED30);
if (!ItemExists(item))
return;
}
@ -499,16 +499,16 @@ void SpawnDroppedItem(Entity *entity1, Entity *entity2, Item *item, bool8 a3, Du
DrawMinimapTile(localPos.x, localPos.y);
switch (GetTerrainType(GetTile(localPos.x, localPos.y))) {
case TERRAIN_TYPE_NORMAL:
LogMessageByIdWithPopupCheckUserUnknown(entity1, &localPos, gItemFellOnGround);
LogMessageByIdWithPopupCheckUserUnknown_Async(entity1, &localPos, gItemFellOnGround);
break;
case TERRAIN_TYPE_SECONDARY:
LogMessageByIdWithPopupCheckUserUnknown(entity1, &localPos, gItemFellInWater);
LogMessageByIdWithPopupCheckUserUnknown_Async(entity1, &localPos, gItemFellInWater);
break;
case TERRAIN_TYPE_WALL:
LogMessageByIdWithPopupCheckUserUnknown(entity1, &localPos, gItemBuried);
LogMessageByIdWithPopupCheckUserUnknown_Async(entity1, &localPos, gItemBuried);
break;
case TERRAIN_TYPE_SECONDARY | TERRAIN_TYPE_NORMAL:
LogMessageByIdWithPopupCheckUserUnknown(entity1, &localPos, gItemFellOutOfSight);
LogMessageByIdWithPopupCheckUserUnknown_Async(entity1, &localPos, gItemFellOutOfSight);
break;
}
}
@ -523,7 +523,7 @@ void SpawnDroppedItem(Entity *entity1, Entity *entity2, Item *item, bool8 a3, Du
}
sub_804219C(&pixelPos);
LogMessageByIdWithPopupCheckUserUnknown(entity1, &localPos, gItemLost);
LogMessageByIdWithPopupCheckUserUnknown_Async(entity1, &localPos, gItemLost);
}
}
@ -647,10 +647,10 @@ void sub_804687C(Entity *entity, DungeonPos *pos1, DungeonPos *pos2, Item *item,
if (!r1) {
if (count > 1) {
LogMessageByIdWithPopupCheckUser(entity, gAllItemsLost);
LogMessageByIdWithPopupCheckUser_Async(entity, gAllItemsLost);
}
else {
LogMessageByIdWithPopupCheckUser(entity, gItemLost);
LogMessageByIdWithPopupCheckUser_Async(entity, gItemLost);
}
}
else {
@ -659,7 +659,7 @@ void sub_804687C(Entity *entity, DungeonPos *pos1, DungeonPos *pos2, Item *item,
bool8 hallucinating;
if (r9) {
LogMessageByIdWithPopupCheckUser(entity, gSeveralItemsLost);
LogMessageByIdWithPopupCheckUser_Async(entity, gSeveralItemsLost);
}
dirMaybe = 0;
@ -792,22 +792,22 @@ static void MusicBoxCreation(void)
if (createMusicBox) {
Entity *leader = GetLeader();
sub_80855E4(sub_80861A8);
gDungeon->unk1356C = 1;
DisplayDungeonMessage(0,gUnknown_810531C,1);
gDungeon->unk1356C = TRUE;
DisplayDungeonMessage_Async(0,gUnknown_810531C,1);
sub_803E708(0x3c,0x41);
DisplayDungeonMessage(0,gUnknown_8105360,1);
DisplayDungeonMessage_Async(0,gUnknown_8105360,1);
sub_80869E4(leader,4,10,0);
sub_80416E0(&leader->pixelPos,0x10c,FALSE);
sub_80421C0(leader,0xd7);
sub_803E708(0x3c,0x41);
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],leader,0);
DisplayDungeonMessage(0,gUnknown_81053A8,1);
DisplayDungeonMessage_Async(0,gUnknown_81053A8,1);
sub_803E708(10,0x41);
PlaySoundEffect(0xd4);
DisplayDungeonMessage(0,gUnknown_8105434,1);
DisplayDungeonMessage_Async(0,gUnknown_8105434,1);
sub_803E708(10,0x41);
sub_804178C(1);
gDungeon->unk1356C = 0;
sub_804178C_Async(1);
gDungeon->unk1356C = FALSE;
UpdateMinimap();
}
}

View File

@ -89,7 +89,7 @@ void sub_8084448(Entity *pokemon)
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],GetLeader(),0);
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1],pokemon,0);
if (!sub_8070BC0(pokemon)) {
DisplayDungeonMessage(0,gUnknown_80FA464,1);
DisplayDungeonMessage_Async(0,gUnknown_80FA464,1);
return;
}
@ -109,25 +109,25 @@ void sub_8084448(Entity *pokemon)
}
if (i == INVENTORY_SIZE) {
DisplayDungeonMessage(0, gUnknown_80FA448, 1);
DisplayDungeonMessage_Async(0, gUnknown_80FA448, 1);
return;
}
ZeroOutItem(&gTeamInventoryRef->teamItems[i]);
FillInventoryGaps();
DisplayDungeonMessage(0, gUnknown_80FA2B0, 1);
DisplayDungeonMessage_Async(0, gUnknown_80FA2B0, 1);
str = gUnknown_80FA370;
}
else {
if (DisplayDungeonYesNoMessage(0, gUnknown_80FA2F0, 1) != 1)
return;
DisplayDungeonMessage(0, gUnknown_80FA260, 1);
DisplayDungeonMessage_Async(0, gUnknown_80FA260, 1);
str = gUnknown_80FA36C;
}
sub_80843BC(entInfo->id);
sub_8042A34(&pokemon->pos);
HandleFaint(pokemon,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
sub_804178C(1);
HandleFaint_Async(pokemon,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
sub_804178C_Async(1);
while(1) {
if (DisplayDungeonYesNoMessage(0,str,1) == 1) {
if (DisplayDungeonYesNoMessage(0,gUnknown_80FA394,0) == 1) {
@ -151,7 +151,7 @@ void sub_80845E0(Entity *pokemon)
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],GetLeader(),0);
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1],pokemon,0);
if (!sub_8070BC0(pokemon)) {
DisplayDungeonMessage(0,gUnknown_80FA530,1);
DisplayDungeonMessage_Async(0,gUnknown_80FA530,1);
return;
}
@ -166,28 +166,28 @@ void sub_80845E0(Entity *pokemon)
}
}
if (entity == NULL) {
DisplayDungeonMessage(0,gUnknown_80FA52C,1);
DisplayDungeonMessage_Async(0,gUnknown_80FA52C,1);
return;
}
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[2],entity,0);
if (!sub_8070BC0(entity)) {
DisplayDungeonMessage(0,gUnknown_80FA54C,1);
DisplayDungeonMessage_Async(0,gUnknown_80FA54C,1);
return;
}
if (!CanSeeTarget(pokemon,entity)) {
DisplayDungeonMessage(0,gUnknown_80FA500,1);
DisplayDungeonMessage_Async(0,gUnknown_80FA500,1);
return;
}
DisplayDungeonMessage(0,gUnknown_80FA4D4,1);
DisplayDungeonMessage_Async(0,gUnknown_80FA4D4,1);
sub_80843BC(info1->id);
info2->joinedAt.id = gDungeon->unk644.dungeonLocation.id;
sub_8042A34(&pokemon->pos);
sub_8042A34(&entity->pos);
HandleFaint(pokemon,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
HandleFaint(entity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
sub_804178C(1);
HandleFaint_Async(pokemon,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
HandleFaint_Async(entity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
sub_804178C_Async(1);
while(1) {
if (DisplayDungeonYesNoMessage(0,gUnknown_80FA4D8,1) == 1) {
if (DisplayDungeonYesNoMessage(0,gUnknown_80FA394,0) == 1) {

View File

@ -81,7 +81,7 @@ void sub_807EC28(bool8 arg0)
if (!prevTileWasShop) {
if (isShopTile == TRUE) {
if (sameRoom) {
DisplayDungeonMessage(&dialogueInfo, gUnknown_80FE674, TRUE); // Ah welcome!
DisplayDungeonMessage_Async(&dialogueInfo, gUnknown_80FE674, TRUE); // Ah welcome!
}
return;
}
@ -156,7 +156,7 @@ void sub_807EC28(bool8 arg0)
sub_807F33C();
}
else if (prevTileWasShop == TRUE && !isShopTile && sameRoom) {
DisplayDungeonMessage(&dialogueInfo, gUnknown_80FE65C, TRUE); // I await your next visit
DisplayDungeonMessage_Async(&dialogueInfo, gUnknown_80FE65C, TRUE); // I await your next visit
}
}
}
@ -188,7 +188,7 @@ void sub_807EF84(void)
Tile *tile = GetTileAtEntitySafe(GetLeader());
if (tile->terrainFlags & TERRAIN_TYPE_SHOP) {
if (val != 2) {
DisplayDungeonMessage(&dialogueInfo, gUnknown_80FE63C, 1); // This is very disappointing, please return any items before you leave.
DisplayDungeonMessage_Async(&dialogueInfo, gUnknown_80FE63C, 1); // This is very disappointing, please return any items before you leave.
}
}
else {
@ -196,7 +196,7 @@ void sub_807EF84(void)
}
}
else {
DisplayDungeonMessage(&dialogueInfo, gUnknown_80FE5F0, 1); // Looking forward to seeing you again!
DisplayDungeonMessage_Async(&dialogueInfo, gUnknown_80FE5F0, 1); // Looking forward to seeing you again!
}
}
@ -243,7 +243,7 @@ static void sub_807EFFC(bool8 arg0)
}
gDungeon->unk644.unk50 += (gDungeon->unk644.unk48 - local_24);
DisplayDungeonMessage(&dialogueInfo, gUnknown_80FE4F4, 1); // Your patronage is valued
DisplayDungeonMessage_Async(&dialogueInfo, gUnknown_80FE4F4, 1); // Your patronage is valued
}
}
@ -266,7 +266,7 @@ static s32 sub_807F19C(bool8 arg0)
return 1;
}
if (gTeamInventoryRef->teamMoney < diff) {
DisplayDungeonMessage(&dialogueInfo, gUnknown_80FE520, TRUE); // You don't have enough money.
DisplayDungeonMessage_Async(&dialogueInfo, gUnknown_80FE520, TRUE); // You don't have enough money.
return 2;
}
PlaySoundEffect(0x14c);
@ -302,7 +302,7 @@ static s32 sub_807F19C(bool8 arg0)
}
}
gDungeon->unk644.unk50 = gDungeon->unk644.unk48;
DisplayDungeonMessage(&dialogueInfo, gUnknown_80FE4D4, TRUE); // Thank you very much.
DisplayDungeonMessage_Async(&dialogueInfo, gUnknown_80FE4D4, TRUE); // Thank you very much.
}
return 0;
@ -314,7 +314,7 @@ static void sub_807F33C(void)
gDungeon->unk644.stoleFromKecleon = 1;
gDungeon->unk644.unk2B = 1;
LogMessageByIdWithPopupCheckUser(GetLeader(), gUnknown_80FE4B8); // Help! Thief! I've been robbed! Help me catch the thief.
LogMessageByIdWithPopupCheckUser_Async(GetLeader(), gUnknown_80FE4B8); // Help! Thief! I've been robbed! Help me catch the thief.
for (x = 0; x < DUNGEON_MAX_SIZE_X; x++) {
for (y = 0; y < DUNGEON_MAX_SIZE_Y; y++) {
const Tile *tile = GetTile(x,y);

View File

@ -119,7 +119,7 @@ void EnemyEvolution(Entity *entity)
info->exp += expGained;
gFormatArgs[0] = expGained;
SetMessageArgument_2(gFormatBuffer_Monsters[0],info,0);
TryDisplayDungeonLoggableMessage3(entityPtr,target,gUnknown_80F9E64); // $m0 gained $d0 Exp Points
TryDisplayDungeonLoggableMessage3_Async(entityPtr,target,gUnknown_80F9E64); // $m0 gained $d0 Exp Points
flag = LevelUp(entityPtr,target,1,1);
}
}
@ -159,7 +159,7 @@ void EnemyEvolution(Entity *entity)
if ((tacticsBuffer1[tacticIndex] == 0) && (tacticsBuffer2[tacticIndex] == 1)) {
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
CopyTacticsNameToBuffer(gFormatBuffer_Items[0],tacticIndex);
TryDisplayDungeonLoggableMessage3(entityPtr,target,gUnknown_80FF730); // $i0 was added to $m0's list of usable tactics
TryDisplayDungeonLoggableMessage3_Async(entityPtr,target,gUnknown_80FF730); // $i0 was added to $m0's list of usable tactics
}
}
}
@ -223,7 +223,7 @@ void LevelUpTarget(Entity *pokemon, Entity *target, s32 level, u8 param_4, u8 pa
if ((tacticsBuffer1[tacticIndex] == 0) && (tacticsBuffer2[tacticIndex] == 1)) {
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
CopyTacticsNameToBuffer(gFormatBuffer_Items[0],tacticIndex);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FF730);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FF730);
}
}
}
@ -231,7 +231,7 @@ void LevelUpTarget(Entity *pokemon, Entity *target, s32 level, u8 param_4, u8 pa
info->unk149 = 0;
if ((flag == 0) && (param_4 != 0)) {
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80F9B74);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80F9B74);
}
}
}
@ -272,7 +272,7 @@ static void sub_807218C(Entity *pokemon)
{
strcpy(buffer, gUnknown_80FCF18);
}
DisplayDungeonMessage(0, buffer, 1);
DisplayDungeonMessage_Async(0, buffer, 1);
buffer[0] = 0;
@ -311,7 +311,7 @@ static void sub_807218C(Entity *pokemon)
}
if(buffer[0])
DisplayDungeonMessage(0, buffer, 1);
DisplayDungeonMessage_Async(0, buffer, 1);
TryPointCameraToMonster(GetLeader(), 0);
}
@ -346,7 +346,7 @@ void LevelDownTarget(Entity *pokemon, Entity *target, u32 level)
if(!flag)
{
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], target, 0);
TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80F9B94);
TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80F9B94);
}
}
}
@ -395,7 +395,7 @@ static bool8 LevelUp(Entity *pokemon, Entity *target, u8 param_3, u8 param_4)
sub_8083D58();
gFormatArgs[0] = level;
SetMessageArgument_2(gFormatBuffer_Monsters[0], info, 0);
DisplayDungeonLoggableMessageTrue(target, gUnknown_80F9E80);
DisplayDungeonLoggableMessageTrue_Async(target, gUnknown_80F9E80);
}
}
flag = TRUE;
@ -542,12 +542,12 @@ static bool8 sub_80725A4(Entity *pokemon, Entity *target)
{
gFormatArgs[0] = info->level;
sub_80421C0(target, 0xD3 << 1);
TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80F9EC8); // $m0 dropped to Level $d0!
TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80F9EC8); // $m0 dropped to Level $d0!
return TRUE;
}
else
{
TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80F9EEC); // $m0's level didn't drop!
TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80F9EEC); // $m0's level didn't drop!
return FALSE;
}
}
@ -619,7 +619,7 @@ static void sub_8072778(Entity *pokemon, Entity *target, u8 param_2, u8 param_3)
if (!info->isNotTeamMember && param_3) {
if (!sp_0xCC && param_2) {
sub_803E708(0xA, 0x6);
DisplayDungeonMessage(0, gUnknown_80F9FA4, 1);
DisplayDungeonMessage_Async(0, gUnknown_80F9FA4, 1);
}
sp_0xCC = 1;
sub_8063E70(target, localMoves, 1, 0);
@ -687,7 +687,7 @@ bool8 sub_8072938(Entity *target, u16 moveId)
r10 = FALSE;
if (!info->isNotTeamMember) {
DisplayDungeonMessage(0, gUnknown_80FDF40, 1);
DisplayDungeonMessage_Async(0, gUnknown_80FDF40, 1);
if (!sub_8063E70(target, localMoves, TRUE, TRUE)) {
return FALSE;
}
@ -784,7 +784,7 @@ static void sub_8072B78(Entity *pokemon, Entity *target, s16 id)
ResetMonEntityData(entityInfo,0);
sub_8069E0C(target);
sub_806CCB4(target,7);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FE2EC);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FE2EC);
sub_8042A44(target);
sub_8083D78();
if (id_s32 == MONSTER_NINJASK) {

View File

@ -382,7 +382,7 @@ s32 sub_8070828(Entity *pokemon, bool8 displayMessage)
}
if (displayMessage && SetVisualFlags(GetEntInfo(pokemon), 0x40, flag)) {
sub_80429B4(pokemon);
LogMessageByIdWithPopupCheckUser(pokemon, gUnknown_80FEE80);
LogMessageByIdWithPopupCheckUser_Async(pokemon, gUnknown_80FEE80);
}
if (flag) {
return 2;
@ -1206,7 +1206,7 @@ bool8 SafeguardIsActive(Entity * pokemon, Entity * target, bool8 displayMessage)
if (GetEntInfo(target)->reflectClassStatus.status == STATUS_SAFEGUARD) {
if (displayMessage) {
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC2FC);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC2FC);
}
return TRUE;
}
@ -1218,7 +1218,7 @@ bool8 IsProtectedFromStatDrops(Entity * pokemon, Entity * target, bool8 displayM
if (GetEntInfo(target)->reflectClassStatus.status == STATUS_MIST) {
if (displayMessage) {
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], target, 0);
TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FC31C);
TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80FC31C);
}
return TRUE;
}
@ -1226,7 +1226,7 @@ bool8 IsProtectedFromStatDrops(Entity * pokemon, Entity * target, bool8 displayM
if (AbilityIsActive(target, ABILITY_CLEAR_BODY) || AbilityIsActive(target, ABILITY_WHITE_SMOKE)) {
if (displayMessage) {
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], target, 0);
TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FCEFC);
TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80FCEFC);
}
return TRUE;
}

View File

@ -191,7 +191,7 @@ void DungeonHandlePlayerInput(void)
}
}
else if (ShouldMonsterRunAwayAndShowEffect(leader, TRUE)) {
LogMessageByIdWithPopupCheckUser(leader, gUnknown_80FD4B0);
LogMessageByIdWithPopupCheckUser_Async(leader, gUnknown_80FD4B0);
SetLeaderActionFields(ACTION_PASS_TURN);
gDungeon->unk644.unk2F = 1;
break;
@ -206,7 +206,7 @@ void DungeonHandlePlayerInput(void)
}
}
if (i == MAX_MON_MOVES) {
LogMessageByIdWithPopupCheckUser(leader, gUnknown_80F8A28);
LogMessageByIdWithPopupCheckUser_Async(leader, gUnknown_80F8A28);
break;
}
@ -232,7 +232,7 @@ void DungeonHandlePlayerInput(void)
}
}
if (!canUseMove) {
LogMessageByIdWithPopupCheckUser(leader, gUnknown_80F8A4C);
LogMessageByIdWithPopupCheckUser_Async(leader, gUnknown_80F8A4C);
}
else {
SetMonsterActionFields(&leaderInfo->action, ACTION_USE_MOVE_PLAYER);
@ -456,7 +456,7 @@ void DungeonHandlePlayerInput(void)
if (!(canMoveFlags & 2)) {
if (canMoveFlags & 1) {
if (immobilizedMsg != NULL) {
LogMessageByIdWithPopupCheckUser(leader, immobilizedMsg);
LogMessageByIdWithPopupCheckUser_Async(leader, immobilizedMsg);
}
SetLeaderActionFields(ACTION_PASS_TURN);
gDungeon->unk644.unk2F = 1;
@ -971,7 +971,7 @@ void CheckLeaderTile(void)
case ENTITY_ITEM: {
Item *item = GetItemInfo(tileObject);
if (!(item->flags & ITEM_FLAG_IN_SHOP)) {
TryLeaderItemPickUp(&leader->pos, 1);
TryLeaderItemPickUp_Async(&leader->pos, 1);
}
else {
gDungeon->unk5C0 = 4;
@ -1033,13 +1033,13 @@ void sub_805F02C(void)
EntityInfo *leaderInfo = GetEntInfo(leader);
if (r8->isTeamLeader) {
DisplayDungeonLoggableMessageTrue(r7, gUnknown_80F9BD8);
DisplayDungeonLoggableMessageTrue_Async(r7, gUnknown_80F9BD8);
}
else if (PlayerHasItemWithFlag(ITEM_FLAG_IN_SHOP) || sub_807EF48()) {
DisplayDungeonLoggableMessageTrue(r7, gUnknown_80F9C08);
DisplayDungeonLoggableMessageTrue_Async(r7, gUnknown_80F9C08);
}
else if (gDungeon->unk644.stoleFromKecleon) {
DisplayDungeonLoggableMessageTrue(r7, gUnknown_80F9C2C);
DisplayDungeonLoggableMessageTrue_Async(r7, gUnknown_80F9C2C);
}
else {
gDungeon->unk644.emptyBellyAlert = 0;
@ -1073,7 +1073,7 @@ void sub_805F02C(void)
sub_8041AD0(leader);
sub_8041AE0(GetLeader());
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], r7, 0);
LogMessageByIdWithPopupCheckUser(r7, gUnknown_80F9BB0);
LogMessageByIdWithPopupCheckUser_Async(r7, gUnknown_80F9BB0);
sub_807EC28(FALSE);
r8->unk64 = 0;
leaderInfo->unk64 = 0;
@ -1208,14 +1208,14 @@ static void ShowMainMenu(bool8 fromBPress, bool8 a1)
}
}
else if (action == ACTION_SET_ITEM) {
HandleSetItemAction(GetLeader(), TRUE);
HandleSetItemAction_Async(GetLeader(), TRUE);
SetLeaderActionToNothing(TRUE);
sub_803E708(0x50, 0x4D);
sub_8052210(0);
break;
}
else if (action == ACTION_UNSET_ITEM) {
HandleUnsetItemAction(GetLeader(), TRUE);
HandleUnsetItemAction_Async(GetLeader(), TRUE);
SetLeaderActionToNothing(TRUE);
sub_803E708(0x50, 0x4D);
sub_8052210(0);
@ -1443,7 +1443,7 @@ static void ShowMainMenu(bool8 fromBPress, bool8 a1)
}
else {
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], GetLeader(), 0);
DisplayDungeonMessage(0, gUnknown_80FDE18, 1);
DisplayDungeonMessage_Async(0, gUnknown_80FDE18, 1);
}
r10 = -1;
@ -1581,7 +1581,7 @@ bool8 DungeonGiveNameToRecruitedMon(u8 *name)
do
{
DungeonRunFrameActions(0xE);
DrawDialogueBoxString();
DrawDialogueBoxString_Async();
r4 = sub_8016080();
} while (r4 == 0);
CleanConfirmNameMenu();

View File

@ -109,7 +109,7 @@ bool8 ShowDungeonItemsMenu(Entity * a0, struct UnkMenuBitsStruct *a1)
sUnknown_202F258 = sub_8060D64(sUnknown_202F248, var_30, var_34, var_28, a0);
if (sUnknown_202F258 == 0) {
DisplayDungeonMessage(0, gUnknown_80F8B24, 1);
DisplayDungeonMessage_Async(0, gUnknown_80F8B24, 1);
return TRUE;
}

View File

@ -735,10 +735,10 @@ void ActionSetOrUnsetMove(ActionContainer *a0, bool8 flagToSet)
PlaySoundEffect(0x133);
if (flagToSet) {
if (!wasSet) {
LogMessageByIdWithPopupCheckUser(entity, gUnknown_80F8B40);
LogMessageByIdWithPopupCheckUser_Async(entity, gUnknown_80F8B40);
}
else {
LogMessageByIdWithPopupCheckUser(entity, gUnknown_80F8B64);
LogMessageByIdWithPopupCheckUser_Async(entity, gUnknown_80F8B64);
}
sub_803E708(0x78, 0x1F);
}
@ -844,10 +844,10 @@ void ActionDelinkMoves(ActionContainer *a0, bool8 showMsg)
PlaySoundEffect(0x133);
if (showMsg) {
if (unlInked) {
LogMessageByIdWithPopupCheckUser(entity, gUnknown_80F8B88);
LogMessageByIdWithPopupCheckUser_Async(entity, gUnknown_80F8B88);
}
else {
LogMessageByIdWithPopupCheckUser(entity, gUnknown_80F8BB4);
LogMessageByIdWithPopupCheckUser_Async(entity, gUnknown_80F8BB4);
}
sub_803E708(0x78, 0x1F);
}

View File

@ -71,10 +71,10 @@ void ShowRecruitmentSearchMenu(void)
s32 currTabId = 0;
if (!IsRecruitingEnabled(gDungeon->unk644.dungeonLocation.id)) {
DisplayDungeonMessage(NULL, gUnknown_80FA5F4, TRUE);
DisplayDungeonMessage_Async(NULL, gUnknown_80FA5F4, TRUE);
}
else if (gDungeon->unk644.unk19) {
DisplayDungeonMessage(NULL, gUnknown_80FA61C, TRUE);
DisplayDungeonMessage_Async(NULL, gUnknown_80FA61C, TRUE);
}
else {
struct MonRecruitList tabsData[2];
@ -325,7 +325,7 @@ static void SetRecruitableMons(struct MonRecruitList *tabsData)
unrecruitableRate = (u16) -999;
if (recruitRate == unrecruitableRate)
continue;
if (speciesId == MONSTER_MEW && !sub_80860A8(122))
if (speciesId == MONSTER_MEW && !ItemInInventoryOrHeld(ITEM_MUSIC_BOX))
continue;
}
else {

View File

@ -35,7 +35,7 @@ static EWRAM_DATA SpriteOAM sUnknown_202F1F0 = {0};
EWRAM_INIT bool8 gUnknown_203B434 = TRUE;
static bool8 sub_8052DC0(Entity *);
static void DisplayMessageAddToLog(Entity *pokemon, const u8 *str, bool8 r2);
static void DisplayMessageAddToLog_Async(Entity *pokemon, const u8 *str, bool8 r2);
void sub_80521D0(void)
{
@ -74,26 +74,26 @@ void sub_805229C(void)
return sub_80526D0(0x50);
}
void LogMessageByIdWithPopupCheckUser(Entity *pokemon, const u8 *str)
void LogMessageByIdWithPopupCheckUser_Async(Entity *pokemon, const u8 *str)
{
if (ShouldDisplayEntity(pokemon)){
DisplayMessageAddToLog(pokemon, str, TRUE);
DisplayMessageAddToLog_Async(pokemon, str, TRUE);
}
}
UNUSED void TryDisplayDungeonLoggableMessage2(Entity *pokemon, const u8 *str)
UNUSED void TryDisplayDungeonLoggableMessage2_Async(Entity *pokemon, const u8 *str)
{
if (ShouldDisplayEntity(pokemon)){
DisplayMessageAddToLog(pokemon, str, FALSE);
DisplayMessageAddToLog_Async(pokemon, str, FALSE);
}
}
void DisplayDungeonLoggableMessageFalse(Entity *pokemon, const u8 *str)
void DisplayDungeonLoggableMessageFalse_Async(Entity *pokemon, const u8 *str)
{
DisplayMessageAddToLog(pokemon, str, FALSE);
DisplayMessageAddToLog_Async(pokemon, str, FALSE);
}
void TryDisplayDungeonLoggableMessage3(Entity *attacker, Entity *target, const u8 *str)
void TryDisplayDungeonLoggableMessage3_Async(Entity *attacker, Entity *target, const u8 *str)
{
u8 flag;
flag = ShouldDisplayEntity(attacker) ? TRUE : FALSE;
@ -103,11 +103,11 @@ void TryDisplayDungeonLoggableMessage3(Entity *attacker, Entity *target, const u
}
if(flag)
{
DisplayMessageAddToLog(attacker, str, TRUE);
DisplayMessageAddToLog_Async(attacker, str, TRUE);
}
}
void TryDisplayDungeonLoggableMessage4(Entity *attacker, Entity *target, const u8 *str)
void TryDisplayDungeonLoggableMessage4_Async(Entity *attacker, Entity *target, const u8 *str)
{
u8 flag;
flag = ShouldDisplayEntity(attacker) ? TRUE : FALSE;
@ -117,11 +117,11 @@ void TryDisplayDungeonLoggableMessage4(Entity *attacker, Entity *target, const u
}
if(flag)
{
DisplayMessageAddToLog(attacker, str, FALSE);
DisplayMessageAddToLog_Async(attacker, str, FALSE);
}
}
void LogMessageByIdWithPopupCheckUserUnknown(Entity *pokemon, DungeonPos *pos, const u8 *str)
void LogMessageByIdWithPopupCheckUserUnknown_Async(Entity *pokemon, DungeonPos *pos, const u8 *str)
{
u8 flag;
flag = ShouldDisplayEntity(pokemon) ? TRUE : FALSE;
@ -131,16 +131,16 @@ void LogMessageByIdWithPopupCheckUserUnknown(Entity *pokemon, DungeonPos *pos, c
}
if(flag)
{
DisplayMessageAddToLog(pokemon, str, TRUE);
DisplayMessageAddToLog_Async(pokemon, str, TRUE);
}
}
void DisplayDungeonLoggableMessageTrue(Entity *pokemon, const u8 *str)
void DisplayDungeonLoggableMessageTrue_Async(Entity *pokemon, const u8 *str)
{
DisplayMessageAddToLog(pokemon, str, TRUE);
DisplayMessageAddToLog_Async(pokemon, str, TRUE);
}
static void DisplayMessageAddToLog(Entity *pokemon, const u8 *str, bool8 r2)
static void DisplayMessageAddToLog_Async(Entity *pokemon, const u8 *str, bool8 r2)
{
u8 txt[64];
bool8 r7;
@ -157,8 +157,8 @@ static void DisplayMessageAddToLog(Entity *pokemon, const u8 *str, bool8 r2)
sLastLogMsgEntity = pokemon;
gUnknown_203B434 = FALSE;
r9 = FALSE;
while (1) {
while (1) {
while (TRUE) {
while (TRUE) {
s32 val = gDungeon->unk1BDD4.unk1C060;
if (++val == UNK_1BBD4_STR_COUNT) {
val = 0;
@ -190,7 +190,7 @@ static void DisplayMessageAddToLog(Entity *pokemon, const u8 *str, bool8 r2)
}
if (r9) {
gDungeon->unk1BDD4.unk1C064 = 0xF0;
gDungeon->unk1BDD4.unk1C064 = 240;
if (gDungeon->unk1BDD4.unk1C06C == 0) {
gDungeon->unk1BDD4.unk1C06C = 1;
}
@ -298,18 +298,18 @@ void sub_8052740(s32 a0)
}
// Prints string in dialogue box and waits for A/B button press
#define PRINT_STRING_WAIT_PRESS(chosenMenuIndex) \
#define PRINT_STRING_WAIT_PRESS_ASYNC(chosenMenuIndex) \
{ \
s32 unkPrintRet; \
\
do { \
DrawDialogueBoxString(); \
DrawDialogueBoxString_Async(); \
DungeonRunFrameActions(9); \
unkPrintRet = sub_80144A4(chosenMenuIndex);\
} while (unkPrintRet != 0); \
}
void DisplayDungeonMessage(struct MonDialogueSpriteInfo *monSpriteInfo, const u8 *str, bool8 a2)
void DisplayDungeonMessage_Async(struct MonDialogueSpriteInfo *monSpriteInfo, const u8 *str, bool8 a2)
{
MonPortraitMsg monPortrait, *monPortraitPtr;
s32 chosenMenuIndex;
@ -341,7 +341,7 @@ void DisplayDungeonMessage(struct MonDialogueSpriteInfo *monSpriteInfo, const u8
CreateMenuDialogueBoxAndPortrait(str, 0, 0, NULL, NULL, 3, 0, monPortraitPtr, (a2 != FALSE) ? 0x701 : 0x400);
gDungeon->unk1BDD4.unk1C05F = 1;
PRINT_STRING_WAIT_PRESS(&chosenMenuIndex);
PRINT_STRING_WAIT_PRESS_ASYNC(&chosenMenuIndex);
gDungeon->unk1BDD4.unk1C05F = 0;
if (monPortrait.faceFile != NULL) {
@ -364,8 +364,8 @@ void DisplayDungeonMessage(struct MonDialogueSpriteInfo *monSpriteInfo, const u8
void DisplayDungeonLoggableMessage(Entity *pokemon, const u8 *str)
{
DisplayDungeonMessage(NULL, str, TRUE);
DisplayDungeonLoggableMessageFalse(pokemon, str);
DisplayDungeonMessage_Async(NULL, str, TRUE);
DisplayDungeonLoggableMessageFalse_Async(pokemon, str);
}
static const u16 sUnknownDialogueFlags[] = {0x30D, 0x10D, 0x30D, 0x10D, 0x301, 1, 0x11};
@ -468,7 +468,7 @@ void DisplayDungeonDialogue(const struct DungeonDialogueStruct *dialogueInfo)
sub_803EAF0(2, NULL);
sub_8052210(FALSE);
CreateDialogueBoxAndPortrait(dialogueInfo->str, 0, monPortraitPtr, sUnknownDialogueFlags[dialogueInfo->type]);
PRINT_STRING_WAIT_PRESS(&chosenMenuIndex);
PRINT_STRING_WAIT_PRESS_ASYNC(&chosenMenuIndex);
if (monPortraitPtr != NULL) {
CloseFile(monPortraitPtr->faceFile);
@ -515,7 +515,7 @@ bool32 DisplayDungeonYesNoMessage(struct MonDialogueSpriteInfo *monSpriteInfo, c
CreateYesNoDialogueBoxAndPortrait_DefaultNo(str, monPortraitPtr, 0x300); // Yes/No - cursor starts at NO
}
PRINT_STRING_WAIT_PRESS(&chosenMenuIndex);
PRINT_STRING_WAIT_PRESS_ASYNC(&chosenMenuIndex);
if (monPortrait.faceFile != NULL) {
CloseFile(monPortrait.faceFile);
@ -558,7 +558,7 @@ s32 DisplayDungeonMenuMessage(struct MonDialogueSpriteInfo *monSpriteInfo, const
}
CreateMenuDialogueBoxAndPortrait(str, 0, -1, menuItems, NULL, 3, 0, monPortraitPtr, unkArg);
PRINT_STRING_WAIT_PRESS(&chosenMenuIndex);
PRINT_STRING_WAIT_PRESS_ASYNC(&chosenMenuIndex);
if (monPortrait.faceFile != NULL) {
CloseFile(monPortrait.faceFile);
@ -605,9 +605,9 @@ static inline bool32 DislayTutorialMsg(Entity *leader, const struct TutorialFlag
SetTutorialFlag(flag);
sub_8083E28();
str = tutorial->str;
DisplayDungeonMessage(NULL, str, TRUE);
DisplayDungeonMessage_Async(NULL, str, TRUE);
if (unkFunctionCall) {
DisplayDungeonLoggableMessageFalse(leader, str);
DisplayDungeonLoggableMessageFalse_Async(leader, str);
}
return TRUE;
}
@ -662,10 +662,10 @@ void DisplayItemTip(u8 itemId)
void DisplayYouReachedDestFloorStr(void)
{
if (gDungeon->unkA != 0) {
DisplayDungeonMessage(NULL, gUnknown_80FF6F8, 1); // But the pokemon you seek isn't here...
DisplayDungeonMessage_Async(NULL, gUnknown_80FF6F8, 1); // But the pokemon you seek isn't here...
}
else {
DisplayDungeonMessage(NULL, gUnknown_80FF6A4, 1);
DisplayDungeonMessage_Async(NULL, gUnknown_80FF6A4, 1);
}
}
@ -711,7 +711,7 @@ void sub_8052FB8(const u8 *str)
if (gRealInputs.pressed & AB_BUTTONS)
break;
}
DrawDialogueBoxString();
DrawDialogueBoxString_Async();
DungeonRunFrameActions(9);
}
@ -719,7 +719,7 @@ void sub_8052FB8(const u8 *str)
for (j = 0; j < 8; j++) {
SetBGPaletteBufferColorRGB(240 + j, &gFontPalette[j], r8 / 2, NULL);
}
DrawDialogueBoxString();
DrawDialogueBoxString_Async();
DungeonRunFrameActions(9);
r8--;
}

View File

@ -235,13 +235,13 @@ void sub_8068A84(Pokemon *pokemon)
if (totalBodySize >= 7) {
PrintColoredPokeNameToBuffer(gFormatBuffer_Monsters[0],pokemon,0);
if (pokemon->dungeonLocation.id == DUNGEON_JOIN_LOCATION_CLIENT_POKEMON) {
DisplayDungeonMessage(0,gUnknown_80FE0F4,1);
DisplayDungeonMessage_Async(0,gUnknown_80FE0F4,1);
}
else if (pokemon->dungeonLocation.id == DUNGEON_RESCUE_TEAM_BASE) {
DisplayDungeonMessage(0,gUnknown_80FE0F8,1);
DisplayDungeonMessage_Async(0,gUnknown_80FE0F8,1);
}
else {
DisplayDungeonMessage(0,gUnknown_80FE0AC,1);
DisplayDungeonMessage_Async(0,gUnknown_80FE0AC,1);
}
}
else {
@ -258,26 +258,26 @@ void sub_8068A84(Pokemon *pokemon)
ZeroOutItem(&monPtr->itemSlot);
PrintColoredPokeNameToBuffer(gFormatBuffer_Monsters[0],pokemon,6);
if (pokemon->dungeonLocation.id == DUNGEON_JOIN_LOCATION_CLIENT_POKEMON) {
DisplayDungeonMessage(0,gUnknown_80FE168,1);
DisplayDungeonMessage_Async(0,gUnknown_80FE168,1);
}
else if (pokemon->dungeonLocation.id == DUNGEON_RESCUE_TEAM_BASE) {
;
}
else {
DisplayDungeonMessage(0,gUnknown_80FE134,1);
DisplayDungeonMessage_Async(0,gUnknown_80FE134,1);
}
return;
}
}
PrintColoredPokeNameToBuffer(gFormatBuffer_Monsters[0],pokemon,6);
if (pokemon->dungeonLocation.id == DUNGEON_JOIN_LOCATION_CLIENT_POKEMON) {
DisplayDungeonMessage(0,gUnknown_80FE0F4,1);
DisplayDungeonMessage_Async(0,gUnknown_80FE0F4,1);
}
else if (pokemon->dungeonLocation.id == DUNGEON_RESCUE_TEAM_BASE) {
DisplayDungeonMessage(0,gUnknown_80FE0F8,1);
DisplayDungeonMessage_Async(0,gUnknown_80FE0F8,1);
}
else {
DisplayDungeonMessage(0,gUnknown_80FE0AC,1);
DisplayDungeonMessage_Async(0,gUnknown_80FE0AC,1);
}
}
}
@ -370,7 +370,7 @@ void sub_8068BDC(bool8 a0)
}
else {
WriteFriendAreaName(gFormatBuffer_Items[0], friendAreaId, FALSE);
DisplayDungeonMessage(NULL, gUnknown_80FE1A4, TRUE); // The Friend Area is full, a friend must be released.
DisplayDungeonMessage_Async(NULL, gUnknown_80FE1A4, TRUE); // The Friend Area is full, a friend must be released.
while (1) {
ShowRecruitReleaseMenu(friendAreaId, j - areaCapacity.maxPokemon, j, monPointers);
for (id = 0; id < j; id++) {
@ -447,7 +447,7 @@ static inline void ClearMonItemId(Pokemon *mon)
mon->heldItem.id = ITEM_NOTHING;
}
void HandleFaint(Entity *entity, s32 dungeonExitReason_, Entity *param_3)
void HandleFaint_Async(Entity *entity, s32 dungeonExitReason_, Entity *param_3)
{
u16 joinId;
Entity EStack_a4;
@ -505,13 +505,13 @@ void HandleFaint(Entity *entity, s32 dungeonExitReason_, Entity *param_3)
&& dungeonExitReason != DUNGEON_EXIT_DELETED_FOR_EVENT
&& dungeonExitReason != DUNGEON_EXIT_FAILED_TO_PROTECT_CLIENT
&& dungeonExitReason != DUNGEON_EXIT_BLOWN_OUT_UNSEEN_FORCE
&& gDungeon->prefight == PREFIGHT_NONE
&& gDungeon->cutscene == CUTSCENE_NONE
&& gDungeon->unk644.unk37 >= 0
&& gDungeon->unk644.missionKind != DUNGEON_MISSION_OUTONRESCUE)
{
if (gDungeon->unk644.unk37 > 0) {
if (DisplayDungeonYesNoMessage(NULL,gUnknown_80FE268,1) == 1) {
DisplayDungeonMessage(NULL,gUnknown_80FE28C,1);
DisplayDungeonMessage_Async(NULL,gUnknown_80FE28C,1);
gDungeon->unk4 = 1;
gDungeon->unk6 = 1;
gDungeon->unk644.unk10 = 1;
@ -520,7 +520,7 @@ void HandleFaint(Entity *entity, s32 dungeonExitReason_, Entity *param_3)
}
}
else {
DisplayDungeonMessage(NULL,gUnknown_80FE2D0,1);
DisplayDungeonMessage_Async(NULL,gUnknown_80FE2D0,1);
}
}
}
@ -579,10 +579,10 @@ void HandleFaint(Entity *entity, s32 dungeonExitReason_, Entity *param_3)
}
if (GetLeader() != NULL && dungeonExitReason != DUNGEON_EXIT_DELETED_FOR_EVENT && !entInfo->isTeamLeader && !gDungeon->unk10) {
sub_8084E00(entity,entInfo->monsterBehavior, dungeonExitReason == DUNGEON_EXIT_TRANSFORMED_INTO_FRIEND);
sub_8084E00_Async(entity, entInfo->monsterBehavior, dungeonExitReason == DUNGEON_EXIT_TRANSFORMED_INTO_FRIEND);
if (IS_DEOXYS_FORM_MONSTER(entInfo->apparentID) && !IsFloorwideFixedRoom() && entInfo->isNotTeamMember) {
gDungeon->deoxysDefeat = 1;
DisplayDungeonLoggableMessageTrue(entity,gUnknown_80FA580);
DisplayDungeonLoggableMessageTrue_Async(entity,gUnknown_80FA580);
sub_803E178();
UpdateTrapsVisibility();
}
@ -1146,7 +1146,7 @@ void sub_8069F9C(Entity *pokemon, Entity *target, Move *move)
targetInfo->abilities[abilityIndex] = abilities[randomIndex];
gDungeon->unkC = 1;
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], target, 0);
TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FCC7C);
TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80FCC7C);
sub_8042900(target);
EndAbilityImmuneStatus(pokemon, target);
}
@ -1170,7 +1170,7 @@ void sub_8069F9C(Entity *pokemon, Entity *target, Move *move)
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], target, 0);
str = GetUnformattedTypeString(targetInfo->types[0]);
strcpy(gFormatBuffer_Items[0], str);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FCCAC);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FCCAC);
sub_8042968(target);
}
}
@ -1195,7 +1195,7 @@ void sub_806A120(Entity * pokemon, Entity * target, Move* move)
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
typeString = GetUnformattedTypeString(uVar2_u32);
strcpy(gFormatBuffer_Items[0],typeString);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FDCC8);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FDCC8);
}
}
}
@ -1256,7 +1256,7 @@ void TryPointCameraToMonster(Entity *pokemon, u8 param_2)
{
if ((EntityIsValid(pokemon)) && (GetEntityType(pokemon) == ENTITY_MONSTER) && (gDungeon->unk181e8.cameraTarget != pokemon)) {
if (param_2 != '\0') {
sub_804178C(1);
sub_804178C_Async(1);
while (gDungeon->unk12 < 0x3c) {
DungeonRunFrameActions(0x34);
}
@ -1459,7 +1459,7 @@ void sub_806A5B8(Entity *entity)
}
if (str != NULL) {
LogMessageByIdWithPopupCheckUser(entity, str);
LogMessageByIdWithPopupCheckUser_Async(entity, str);
}
}
}
@ -1543,7 +1543,7 @@ void DisplayMsgIfNewIqSkillLearned(EntityInfo *info, s32 iqBefore)
if (hadIqSkillBefore != hasIqSkillNow) {
strcpy(gFormatBuffer_Items[0], GetIQSkillName(i));
DisplayDungeonLoggableMessageTrue(NULL, gUnknown_80FEAC4); // IQ rose! \n It learned the IQ skill 'i0'
DisplayDungeonLoggableMessageTrue_Async(NULL, gUnknown_80FEAC4); // IQ rose! \n It learned the IQ skill 'i0'
}
}
}
@ -1605,13 +1605,13 @@ void sub_806A9B4(Entity *entity, s32 moveIndex)
s32 ret = sub_80935B8(info->moves.moves, moveIndex);
if (ret == 0) {
LogMessageByIdWithPopupCheckUser(entity, gPtrLinkedMovesComeApartMessage);
LogMessageByIdWithPopupCheckUser_Async(entity, gPtrLinkedMovesComeApartMessage);
}
else if (ret == 1) {
LogMessageByIdWithPopupCheckUser(entity, gPtrLinkMoveOneUseWarningMessage);
LogMessageByIdWithPopupCheckUser_Async(entity, gPtrLinkMoveOneUseWarningMessage);
}
else if (ret == 2) {
LogMessageByIdWithPopupCheckUser(entity, gPtrLinkMoveTwoUsesWarningMessage);
LogMessageByIdWithPopupCheckUser_Async(entity, gPtrLinkMoveTwoUsesWarningMessage);
}
}
}

View File

@ -222,7 +222,7 @@ bool8 IsMonsterRecruitable(s32 species)
}
}
bool8 HandleMonsterJoinSequence(Entity *entity1, Entity *entity2, struct unkStruct_8069D4C *param_3)
bool8 MonsterJoinSequence_Async(Entity *entity1, Entity *entity2, struct unkStruct_8069D4C *param_3)
{
DungeonMon *dungeonMon;
int pokeIndex;
@ -240,7 +240,7 @@ bool8 HandleMonsterJoinSequence(Entity *entity1, Entity *entity2, struct unkStru
if (DisplayDungeonYesNoMessage(0,gUnknown_80F9FE8,1) == 0) {
if (param_3->id != MONSTER_JIRACHI) {
LogMessageByIdWithPopupCheckUser(entity1,gText_Pokemon0WentAway);
LogMessageByIdWithPopupCheckUser_Async(entity1,gText_Pokemon0WentAway);
}
return FALSE;
}
@ -251,7 +251,7 @@ bool8 HandleMonsterJoinSequence(Entity *entity1, Entity *entity2, struct unkStru
}
if (pokeIndex == MAX_TEAM_MEMBERS) {
LogMessageByIdWithPopupCheckUser(entity1,gText_ThePokemonCouldntJoinTeam);
LogMessageByIdWithPopupCheckUser_Async(entity1,gText_ThePokemonCouldntJoinTeam);
return FALSE;
}
@ -259,7 +259,7 @@ bool8 HandleMonsterJoinSequence(Entity *entity1, Entity *entity2, struct unkStru
UnlockFriendArea(friendArea);
unlockedFriendArea = TRUE;
}
HandleFaint(entity2,DUNGEON_EXIT_TRANSFORMED_INTO_FRIEND,entity1);
HandleFaint_Async(entity2,DUNGEON_EXIT_TRANSFORMED_INTO_FRIEND,entity1);
dungeonMon = &gRecruitedPokemonRef->dungeonTeam[pokeIndex];
dungeonMon->flags = POKEMON_FLAG_EXISTS | POKEMON_FLAG_ON_TEAM;
dungeonMon->isTeamLeader = FALSE;
@ -291,7 +291,7 @@ bool8 HandleMonsterJoinSequence(Entity *entity1, Entity *entity2, struct unkStru
IncrementAdventureNumJoined();
if (SpawnTeamMember(param_3->id,param_3->pos.x,param_3->pos.y,dungeonMon,&local_2c,0,1) == 0) {
LogMessageByIdWithPopupCheckUser(entity1,gText_ButItCouldntJoinTheTeam);
LogMessageByIdWithPopupCheckUser_Async(entity1,gText_ButItCouldntJoinTheTeam);
dungeonMon->flags = 0;
}
else {
@ -299,17 +299,17 @@ bool8 HandleMonsterJoinSequence(Entity *entity1, Entity *entity2, struct unkStru
sub_803E708(0xa0,0x46);
if (DisplayDungeonYesNoMessage(0,gText_NewMemberJoinedGiveItNickname,TRUE) == 1) {
while (DungeonGiveNameToRecruitedMon(dungeonMon->name) == 0) {
DisplayDungeonMessage(0,gText_PleaseGiveNicknameNewMember,TRUE);
DisplayDungeonMessage_Async(0,gText_PleaseGiveNicknameNewMember,TRUE);
}
}
sub_808D9DC(gFormatBuffer_Monsters[0],dungeonMon,0);
LogMessageByIdWithPopupCheckUser(entity1,gText_Pokemon0JoinedToGoOnAdventures);
LogMessageByIdWithPopupCheckUser_Async(entity1,gText_Pokemon0JoinedToGoOnAdventures);
if (unlockedFriendArea) {
Entity *leader = CutsceneGetLeader();
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],leader,0);
sub_8092558(gFormatBuffer_FriendArea, friendArea);
PlaySound(0xce);
DisplayDungeonMessage(0,gText_Pokemon0GainedAccessToFriendArea,1);
DisplayDungeonMessage_Async(0,gText_Pokemon0GainedAccessToFriendArea,1);
}
if (param_3->id == MONSTER_MEW) {
gDungeon->unk4 = 1;
@ -416,14 +416,14 @@ bool8 HandleSpecialEntityJoinSequence(Entity *entity1,Entity *entity2,Entity **e
unlockedFriendArea = TRUE;
}
IncrementAdventureNumJoined();
HandleFaint(entity2,DUNGEON_EXIT_TRANSFORMED_INTO_FRIEND,entity1);
HandleFaint_Async(entity2,DUNGEON_EXIT_TRANSFORMED_INTO_FRIEND,entity1);
if (SpawnTeamMember(local_74.id,local_74.pos.x,local_74.pos.y,dungeonMon,&local_2c,0,0) == 0) {
dungeonMon->flags = 0;
}
else {
if (DisplayDungeonYesNoMessage(0,gText_NewMemberJoinedGiveItNickname,TRUE) == 1) {
while (!DungeonGiveNameToRecruitedMon(dungeonMon->name)) {
DisplayDungeonMessage(0,gText_PleaseGiveNicknameNewMember,TRUE);
DisplayDungeonMessage_Async(0,gText_PleaseGiveNicknameNewMember,TRUE);
}
}
if (unlockedFriendArea) {
@ -431,7 +431,7 @@ bool8 HandleSpecialEntityJoinSequence(Entity *entity1,Entity *entity2,Entity **e
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],leader,0);
sub_8092558(gFormatBuffer_FriendArea, friendArea);
PlaySound(0xce);
DisplayDungeonMessage(0,gText_Pokemon0GainedAccessToFriendArea,1);
DisplayDungeonMessage_Async(0,gText_Pokemon0GainedAccessToFriendArea,1);
}
sub_808D9DC(gFormatBuffer_Monsters[3],dungeonMon,0);
*entityPtr = local_2c;

View File

@ -444,7 +444,7 @@ void SpawnWildMonsOnFloor(void)
s32 x, y;
bool8 r8 = (gDungeon->unk644.unk44 != 0);
if (sub_80860A8(ITEM_MUSIC_BOX) && !HasRecruitedMon(MONSTER_MEW)) {
if (ItemInInventoryOrHeld(ITEM_MUSIC_BOX) && !HasRecruitedMon(MONSTER_MEW)) {
gDungeon->unk37FF = FALSE;
}
else {

View File

@ -75,7 +75,7 @@ void TryWakeSleepingWildPokemon(void)
}
}
void TriggerMonsterHouse(Entity *entity, bool8 forcedMonsterHouse)
void TriggerMonsterHouse_Async(Entity *entity, bool8 forcedMonsterHouse)
{
u8 monsterHouseRoomId;
DungeonPos positions[100];
@ -170,7 +170,7 @@ void TriggerMonsterHouse(Entity *entity, bool8 forcedMonsterHouse)
if (newMonster->unk1C < IntToF248(1)) {
break;
}
DungeonRunFrameActions(0x57);
DungeonRunFrameActions(87);
}
newMonster->unk1C = IntToF248(0);
}
@ -179,6 +179,6 @@ void TriggerMonsterHouse(Entity *entity, bool8 forcedMonsterHouse)
}
sub_804178C(1);
sub_804178C_Async(1);
}

View File

@ -46,7 +46,7 @@
extern void sub_8041168(Entity *entity, Entity *entity2, Move *,DungeonPos *);
static s32 TryHitTarget(Entity *attacker, Entity *target, Move *move, struct DamageStruct *dmgStruct, s16 unk_);
static s32 TryHitTarget_Async(Entity *attacker, Entity *target, Move *move, struct DamageStruct *dmgStruct, s16 unk_);
EWRAM_DATA s32 gUnknown_202F208 = 0;
EWRAM_DATA s32 gUnknown_202F20C = 0;
@ -99,7 +99,7 @@ void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move *move,
&& GetEntInfo(snatchMon)->dungeonSpriteId == gDungeon->unk17B3C
&& targetInfo->unkFF == 0)
{
TryDisplayDungeonLoggableMessage3(attacker, currTarget, gUnknown_80FCD28); // The move was snatched.
TryDisplayDungeonLoggableMessage3_Async(attacker, currTarget, gUnknown_80FCD28); // The move was snatched.
currTarget = snatchMon;
}
}
@ -112,7 +112,7 @@ void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move *move,
&& ((targetInfo->unkFF == 0 && lightRodInfo->unkFF == 0) || currTarget == lightRodMon))
{
sub_8042930(lightRodMon);
TryDisplayDungeonLoggableMessage3(attacker, currTarget, gUnknown_80FCD0C); // A Lightningrod took the move
TryDisplayDungeonLoggableMessage3_Async(attacker, currTarget, gUnknown_80FCD0C); // A Lightningrod took the move
currTarget = lightRodMon;
lightRodRedirect = TRUE;
}
@ -127,7 +127,7 @@ void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move *move,
s32 direction1 = targetInfo->action.direction;
s32 direction2 = targetInfo->action.direction;
if (IsFloorwideFixedRoom()) {
TryDisplayDungeonLoggableMessage3(attacker, currTarget, gUnknown_80FDD88); // A mysterious force prevents moves from being passed off!
TryDisplayDungeonLoggableMessage3_Async(attacker, currTarget, gUnknown_80FDD88); // A mysterious force prevents moves from being passed off!
}
else {
s32 j;
@ -157,10 +157,10 @@ void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move *move,
}
targetInfo->belly = FixedPoint_Subtract(targetInfo->belly, IntToFixedPoint(gPassScarfBellyDownValue));
if (move->id == MOVE_REGULAR_ATTACK) {
TryDisplayDungeonLoggableMessage3(attacker, currTarget, gUnknown_80FDDA8); // Attack was passed off
TryDisplayDungeonLoggableMessage3_Async(attacker, currTarget, gUnknown_80FDDA8); // Attack was passed off
}
else {
TryDisplayDungeonLoggableMessage3(attacker, currTarget, gUnknown_80FDD20); // Move was passed off
TryDisplayDungeonLoggableMessage3_Async(attacker, currTarget, gUnknown_80FDD20); // Move was passed off
}
currTargetSaved = currTarget;
currTarget = tileEntity;
@ -169,10 +169,10 @@ void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move *move,
}
if (j == 8) {
if (move->id == MOVE_REGULAR_ATTACK) {
TryDisplayDungeonLoggableMessage3(attacker, currTarget, gUnknown_80FDDAC); // There's no one to pass off to!
TryDisplayDungeonLoggableMessage3_Async(attacker, currTarget, gUnknown_80FDDAC); // There's no one to pass off to!
}
else {
TryDisplayDungeonLoggableMessage3(attacker, currTarget, gUnknown_80FDD48); //There's no one to pass off to!
TryDisplayDungeonLoggableMessage3_Async(attacker, currTarget, gUnknown_80FDD48); //There's no one to pass off to!
}
}
}
@ -193,7 +193,7 @@ void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move *move,
if (!lightRodRedirect) {
if (targetInfo->reflectClassStatus.status == STATUS_MAGIC_COAT) {
if (IsReflectedByMagicCoat(moveId) && sub_8055988(attacker, currTarget)) {
TryDisplayDungeonLoggableMessage3(attacker, currTarget, gUnknown_80FC52C); // The target~27s Magic Coat bounced it back!
TryDisplayDungeonLoggableMessage3_Async(attacker, currTarget, gUnknown_80FC52C); // The target~27s Magic Coat bounced it back!
sub_8041B48(currTarget);
sub_80559DC(currTarget, attacker);
currTarget = attacker;
@ -210,7 +210,7 @@ void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move *move,
&& ((target & 0xF) == 0 || (target & 0xF) == 4 || (target & 0xF) == 5 || (target & 0xF) == 2)
&& sub_8055988(attacker, currTarget))
{
TryDisplayDungeonLoggableMessage3(attacker, currTarget, gUnknown_80FC558); // The target~27s Mirror Move returned it!
TryDisplayDungeonLoggableMessage3_Async(attacker, currTarget, gUnknown_80FC558); // The target~27s Mirror Move returned it!
sub_8041BA8(currTarget);
sub_80559DC(currTarget, attacker);
currTarget = attacker;
@ -226,7 +226,7 @@ void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move *move,
s32 targetFlagsAnd = targetFlags & 0xF;
if ((targetFlagsAnd == 0 || targetFlagsAnd == 4 || targetFlagsAnd == 5 || targetFlagsAnd == 2) && !r4) {
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1], currTarget, 0);
TryDisplayDungeonLoggableMessage3(attacker, currTarget, gUnknown_80FC574); // protected itself!
TryDisplayDungeonLoggableMessage3_Async(attacker, currTarget, gUnknown_80FC574); // protected itself!
moveHits = FALSE;
}
}
@ -239,7 +239,7 @@ void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move *move,
if (moveHits) {
if (AbilityIsActive(currTarget, ABILITY_SOUNDPROOF) && IsSoundMove(move)) {
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1], currTarget, 0);
TryDisplayDungeonLoggableMessage3(attacker, currTarget, gUnknown_8100524); // Soundproof suppressed the sound move!
TryDisplayDungeonLoggableMessage3_Async(attacker, currTarget, gUnknown_8100524); // Soundproof suppressed the sound move!
moveHits = FALSE;
}
}
@ -272,16 +272,16 @@ void UseMoveAgainstTargets(Entity **targetsArray, Entity *attacker, Move *move,
SetMessageArgument_2(gFormatBuffer_Monsters[1], GetEntInfo(currTarget), 0);
// Interesting that these 3 strings are the same. Curious if that's the case in Blue/Europe versions.
if (attacker == currTarget) {
TryDisplayDungeonLoggableMessage3(attacker, currTarget, gUnknown_80F9380); // The move missed
TryDisplayDungeonLoggableMessage3_Async(attacker, currTarget, gUnknown_80F9380); // The move missed
}
else if (GetTreatmentBetweenMonsters(attacker, currTarget, TRUE, FALSE) == 0) {
TryDisplayDungeonLoggableMessage3(attacker, currTarget, gUnknown_80F9384); // The move missed
TryDisplayDungeonLoggableMessage3_Async(attacker, currTarget, gUnknown_80F9384); // The move missed
}
else if (lightRodRedirect) {
TryDisplayDungeonLoggableMessage3(attacker, currTarget, gUnknown_80F93A4); // The move missed
TryDisplayDungeonLoggableMessage3_Async(attacker, currTarget, gUnknown_80F93A4); // The move missed
}
else {
TryDisplayDungeonLoggableMessage3(attacker, currTarget, gUnknown_80F9364); // is unaffected!
TryDisplayDungeonLoggableMessage3_Async(attacker, currTarget, gUnknown_80F9364); // is unaffected!
}
if (ShouldDisplayEntity(currTarget)) {
@ -1341,7 +1341,7 @@ s32 HandleDamagingMove(Entity *attacker, Entity *target, Move *move, s24_8 modif
CalcDamage(attacker, target, moveType, movePower, critChance, &dmgStruct, modifier, move->id, 1);
dungeonExitReason = GetDungeonExitReasonFromMoveOrItem(move, itemId);
return TryHitTarget(attacker, target, move, &dmgStruct, dungeonExitReason);
return TryHitTarget_Async(attacker, target, move, &dmgStruct, dungeonExitReason);
}
s32 sub_80556BC(Entity *attacker, Entity *target, u8 moveType, Move *move, s24_8 modifier, s32 itemId)
@ -1353,10 +1353,10 @@ s32 sub_80556BC(Entity *attacker, Entity *target, u8 moveType, Move *move, s24_8
CalcDamage(attacker, target, moveType, movePower, critChance, &dmgStruct, modifier, move->id, 1);
dungeonExitReason = GetDungeonExitReasonFromMoveOrItem(move, itemId);
return TryHitTarget(attacker, target, move, &dmgStruct, dungeonExitReason);
return TryHitTarget_Async(attacker, target, move, &dmgStruct, dungeonExitReason);
}
static s32 TryHitTarget(Entity *attacker, Entity *target, Move *move, struct DamageStruct *dmgStruct, s16 dungeonExitReason_)
static s32 TryHitTarget_Async(Entity *attacker, Entity *target, Move *move, struct DamageStruct *dmgStruct, s16 dungeonExitReason_)
{
s32 dungeonExitReason = dungeonExitReason_; // It's happening again...
if (AccuracyCalc(attacker, target, move, ACCURACY_2, TRUE)) { // Move hits
@ -1368,17 +1368,17 @@ static s32 TryHitTarget(Entity *attacker, Entity *target, Move *move, struct Dam
gDungeon->illuminateMonSpawnGenID = target->spawnGenID;
}
HandleDealingDamage(attacker, target, dmgStruct, isFalseSwipe, TRUE, dungeonExitReason, TRUE, 0);
HandleDealingDamage_Async(attacker, target, dmgStruct, isFalseSwipe, TRUE, dungeonExitReason, TRUE, 0);
}
else {
SetMessageArgument_2(gFormatBuffer_Monsters[1], GetEntInfo(target), 0);
if (ShouldDisplayEntity(attacker) && ShouldDisplayEntity(target)) {
sub_803ED30(9999, target, 1, -1);
TryDisplayDungeonLoggableMessage4(attacker, target, gUnknown_80F9688); // It took no damage!
TryDisplayDungeonLoggableMessage4_Async(attacker, target, gUnknown_80F9688); // It took no damage!
sub_8042238(attacker, target);
}
else {
TryDisplayDungeonLoggableMessage3(attacker, target, gUnknown_80F9688); // It took no damage!
TryDisplayDungeonLoggableMessage3_Async(attacker, target, gUnknown_80F9688); // It took no damage!
}
dmgStruct->tookNoDamage = TRUE;
}
@ -1394,13 +1394,13 @@ static s32 TryHitTarget(Entity *attacker, Entity *target, Move *move, struct Dam
return dmgStruct->dmg;
}
s32 sub_8055864(Entity *attacker, Entity *target, Move *move, s32 param_4, s32 itemId)
s32 sub_8055864_Async(Entity *attacker, Entity *target, Move *move, s32 param_4, s32 itemId)
{
struct DamageStruct dmgStruct;
s32 moveType = GetMoveTypeForMonster(attacker, move);
sub_806F2BC(attacker, target, moveType, param_4, &dmgStruct);
HandleDealingDamage(attacker, target, &dmgStruct, FALSE, TRUE, GetDungeonExitReasonFromMoveOrItem(move, itemId), TRUE, 0);
HandleDealingDamage_Async(attacker, target, &dmgStruct, FALSE, TRUE, GetDungeonExitReasonFromMoveOrItem(move, itemId), TRUE, 0);
if (dmgStruct.tookNoDamage) {
return 0;
}

View File

@ -68,17 +68,17 @@ bool32 sub_8055A00(Entity *attacker, s32 firstMoveId, s32 var_34, s32 itemId, s3
attackerInfo->unk159 = 0;
if (attackerInfo->cringeClassStatus.status == STATUS_CRINGE) {
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], attacker, 0);
LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FC714); // is cringing!
LogMessageByIdWithPopupCheckUser_Async(attacker, gUnknown_80FC714); // is cringing!
return FALSE;
}
else if (attackerInfo->cringeClassStatus.status == STATUS_INFATUATED) {
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], attacker, 0);
LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FC718); // is infatuated!
LogMessageByIdWithPopupCheckUser_Async(attacker, gUnknown_80FC718); // is infatuated!
return FALSE;
}
else if (attackerInfo->burnClassStatus.status == STATUS_PARALYSIS) {
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], attacker, 0);
LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FC6A8); // is paralyzed!
LogMessageByIdWithPopupCheckUser_Async(attacker, gUnknown_80FC6A8); // is paralyzed!
return FALSE;
}
@ -132,7 +132,7 @@ bool32 sub_8055A00(Entity *attacker, s32 firstMoveId, s32 var_34, s32 itemId, s3
else {
if (!statusMoveMatch) {
BufferMoveName(gFormatBuffer_Items[0], currMove, NULL);
LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80F93C8); // The move can't be used!
LogMessageByIdWithPopupCheckUser_Async(attacker, gUnknown_80F93C8); // The move can't be used!
moveUsable = FALSE;
}
}
@ -147,7 +147,7 @@ bool32 sub_8055A00(Entity *attacker, s32 firstMoveId, s32 var_34, s32 itemId, s3
assistMove.id = sub_8057144(attacker);
BufferMoveName(gFormatBuffer_Items[0], &assistMove, NULL);
LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FD2DC); // Assist:
LogMessageByIdWithPopupCheckUser_Async(attacker, gUnknown_80FD2DC); // Assist:
moveWasUsed = TryUseChosenMove(attacker, var_34, itemId, arg_0, isLinkedMove, &assistMove);
}
else {
@ -165,16 +165,16 @@ bool32 sub_8055A00(Entity *attacker, s32 firstMoveId, s32 var_34, s32 itemId, s3
if (unkBefore == gUnknown_202F208) {
if (itemId == 0) {
LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FC690); // The currMove failed!
LogMessageByIdWithPopupCheckUser_Async(attacker, gUnknown_80FC690); // The currMove failed!
}
else {
LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FC6A4); // The Orb failed!
LogMessageByIdWithPopupCheckUser_Async(attacker, gUnknown_80FC6A4); // The Orb failed!
}
}
}
}
sub_804178C(1);
sub_804178C_Async(1);
if (!EntityIsValid(attacker) || IsFloorOver())
break;
if (++moveId >= MAX_MON_MOVES)
@ -197,11 +197,11 @@ bool32 sub_8055A00(Entity *attacker, s32 firstMoveId, s32 var_34, s32 itemId, s3
assistMove.id = sub_8057144(attacker);
movePtr = &assistMove;
BufferMoveName(gFormatBuffer_Items[0], &assistMove, NULL);
LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FD2DC); // Assist:
LogMessageByIdWithPopupCheckUser_Async(attacker, gUnknown_80FD2DC); // Assist:
}
TryUseChosenMove(attacker, 0, itemId, arg_0, isLinkedMove, movePtr);
}
sub_804178C(1);
sub_804178C_Async(1);
}
}
}
@ -228,48 +228,48 @@ void TriggerTargetAbilityEffect(Entity *attacker)
EntityInfo *entInfo = GetEntInfo(attacker);
if (entInfo->abilityEffectFlags & ABILITY_FLAG_ARENA_TRAP) {
LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FEEA4); // Arena Trap prevents movement!
LogMessageByIdWithPopupCheckUser_Async(attacker, gUnknown_80FEEA4); // Arena Trap prevents movement!
ImmobilizedStatusTarget(attacker, attacker);
}
if (entInfo->abilityEffectFlags & ABILITY_FLAG_SHADOW_TAG) {
LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FEEC8); // Shadow Tag prevents movement!
LogMessageByIdWithPopupCheckUser_Async(attacker, gUnknown_80FEEC8); // Shadow Tag prevents movement!
ImmobilizedStatusTarget(attacker, attacker);
}
if (entInfo->abilityEffectFlags & ABILITY_FLAG_MAGNET_PULL) {
LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FEEEC); // Magnet Pull prevents movement!
LogMessageByIdWithPopupCheckUser_Async(attacker, gUnknown_80FEEEC); // Magnet Pull prevents movement!
ImmobilizedStatusTarget(attacker, attacker);
}
if (entInfo->abilityEffectFlags & ABILITY_FLAG_STATIC) {
LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FEF0C); // Static caused paralysis!
LogMessageByIdWithPopupCheckUser_Async(attacker, gUnknown_80FEF0C); // Static caused paralysis!
TryInflictParalysisStatus(attacker, attacker, TRUE);
}
if (entInfo->abilityEffectFlags & ABILITY_FLAG_EFFECT_SPORE_PRLZ) {
LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FEF30); // Effect Spore scattered spores
LogMessageByIdWithPopupCheckUser_Async(attacker, gUnknown_80FEF30); // Effect Spore scattered spores
TryInflictParalysisStatus(attacker, attacker, TRUE);
}
if (entInfo->abilityEffectFlags & ABILITY_FLAG_POISON_POINT) {
LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FEF4C); // Poison Point struck!
LogMessageByIdWithPopupCheckUser_Async(attacker, gUnknown_80FEF4C); // Poison Point struck!
PoisonedStatusTarget(attacker, attacker, TRUE);
}
if (entInfo->abilityEffectFlags & ABILITY_FLAG_EFFECT_SPORE_PSN) {
LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FEF50); // Effect Spore scattered spores!
LogMessageByIdWithPopupCheckUser_Async(attacker, gUnknown_80FEF50); // Effect Spore scattered spores!
PoisonedStatusTarget(attacker, attacker, TRUE);
}
if (entInfo->abilityEffectFlags & ABILITY_FLAG_EFFECT_SPORE_SLP) {
LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FEF54); // Effect Spore scattered spores!
LogMessageByIdWithPopupCheckUser_Async(attacker, gUnknown_80FEF54); // Effect Spore scattered spores!
SleepStatusTarget(attacker, attacker, CalculateStatusTurns(attacker, gSleepTurnRange, TRUE), TRUE);
}
if (entInfo->abilityEffectFlags & ABILITY_FLAG_FLAME_BODY) {
LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FEF74); // Flame Body caused a burn!
LogMessageByIdWithPopupCheckUser_Async(attacker, gUnknown_80FEF74); // Flame Body caused a burn!
BurnedStatusTarget(attacker, attacker, TRUE, TRUE);
}
if (entInfo->abilityEffectFlags & ABILITY_FLAG_CUTE_CHARM) {
LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FEF98); // Cute Charm caused infatuation
LogMessageByIdWithPopupCheckUser_Async(attacker, gUnknown_80FEF98); // Cute Charm caused infatuation
InfatuateStatusTarget(attacker, attacker, TRUE);
}
if (entInfo->abilityEffectFlags & ABILITY_FLAG_STENCH) {
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], attacker, 0);
LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FEFD0); // A horrid stench billowed out
LogMessageByIdWithPopupCheckUser_Async(attacker, gUnknown_80FEFD0); // A horrid stench billowed out
sub_80428A0(attacker);
entInfo->terrifiedTurns = gStenchTerrifiedTurnsNo;
}
@ -292,14 +292,14 @@ bool8 TryUseChosenMove(struct Entity *attacker, u32 r6, s32 itemId, u32 var_30,
msg = NULL;
targetsArray[0] = NULL;
sub_804178C(1);
sub_804178C_Async(1);
if (move->id == MOVE_METRONOME) {
gMetronomeCalledArrayId = DungeonRandInt(METRONOME_AVAILABLE_CALLED_MOVES);
InitPokemonMove(&metronomeMove, gMetronomeCalledMoves[gMetronomeCalledArrayId].moveID);
metronomeMove.moveFlags = move->moveFlags;
metronomeMove.moveFlags2 = move->moveFlags2;
sub_8056468(attacker, move, gUnknown_80FECBC, targetsArray, itemId, TRUE, FALSE);
sub_804178C(1);
sub_804178C_Async(1);
move = &metronomeMove;
}
else if (move->id == MOVE_NATURE_POWER)
@ -315,7 +315,7 @@ bool8 TryUseChosenMove(struct Entity *attacker, u32 r6, s32 itemId, u32 var_30,
naturePwrMove.moveFlags = move->moveFlags;
naturePwrMove.moveFlags2 = move->moveFlags2;
sub_8056468(attacker, move, gUnknown_80FECE0, targetsArray, itemId, TRUE, FALSE);
sub_804178C(1);
sub_804178C_Async(1);
move = &naturePwrMove;
}
@ -359,24 +359,24 @@ bool8 TryUseChosenMove(struct Entity *attacker, u32 r6, s32 itemId, u32 var_30,
if (GetEntInfo(attacker)->muzzled.muzzled == TRUE && FailsWhileMuzzled(move->id)) {
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], attacker, 0);
LogMessageByIdWithPopupCheckUser(attacker, msg);
LogMessageByIdWithPopupCheckUser_Async(attacker, msg);
sub_803E708(0xA, 0x3F);
LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FC710); // is muzzled!
LogMessageByIdWithPopupCheckUser_Async(attacker, gUnknown_80FC710); // is muzzled!
return FALSE;
}
else if (!moveUsable) {
SetMessageArgument_2(gFormatBuffer_Monsters[0], GetEntInfo(attacker), 0);
if (itemId == 0) {
BufferMoveName(gFormatBuffer_Items[0], move, NULL);
LogMessageByIdWithPopupCheckUser(attacker, msg);
LogMessageByIdWithPopupCheckUser_Async(attacker, msg);
sub_803E708(0xA, 0x3F);
LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FC6D0); // But the move couldn't be used!
LogMessageByIdWithPopupCheckUser_Async(attacker, gUnknown_80FC6D0); // But the move couldn't be used!
}
else {
BufferItemName(gFormatBuffer_Items[0], itemId, NULL);
LogMessageByIdWithPopupCheckUser(attacker, msg);
LogMessageByIdWithPopupCheckUser_Async(attacker, msg);
sub_803E708(0xA, 0x3F);
LogMessageByIdWithPopupCheckUser(attacker, gUnknown_80FC6FC); // But Orbs are prevented from being used!
LogMessageByIdWithPopupCheckUser_Async(attacker, gUnknown_80FC6FC); // But Orbs are prevented from being used!
}
return FALSE;
}
@ -500,10 +500,10 @@ bool8 sub_8056468(Entity *entity, Move *move, const u8 *str, Entity **targetsArr
}
if (move->id != MOVE_REGULAR_ATTACK) {
DisplayDungeonLoggableMessageTrue(entity, str);
DisplayDungeonLoggableMessageTrue_Async(entity, str);
}
else {
DisplayDungeonLoggableMessageFalse(entity, str);
DisplayDungeonLoggableMessageFalse_Async(entity, str);
}
}
@ -726,7 +726,7 @@ void sub_80566F8(Entity *attacker, Move *move, s32 a2, bool8 a3, s32 itemId, s32
if (var_34 >= 0) {
sub_800DC14(var_34);
}
sub_804178C(1);
sub_804178C_Async(1);
gDungeon->unk1BDD4.unk1C05E = 0;
if (targetArrId > 0) {

View File

@ -185,7 +185,7 @@ void HandleStraightProjectileThrow(Entity *thrower, Item *item, DungeonPos *pos,
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], target, 0);
sub_8045C08(gFormatBuffer_Items[0], item);
TryDisplayDungeonLoggableMessage3(thrower, target, gUnknown_80F94C4);
TryDisplayDungeonLoggableMessage3_Async(thrower, target, gUnknown_80F94C4);
endMsg = TrySendImmobilizeSleepEndMsg(thrower, target);
sub_80479B8(1, (lockOnActive || a4->unk0) ? 1 : 0, endMsg, thrower, target, item);
}
@ -198,10 +198,10 @@ void HandleStraightProjectileThrow(Entity *thrower, Item *item, DungeonPos *pos,
sub_8045BF8(gFormatBuffer_Items[0], item);
if (a4->unk0) {
TryDisplayDungeonLoggableMessage3(thrower, target, gUnknown_80F94D8);
TryDisplayDungeonLoggableMessage3_Async(thrower, target, gUnknown_80F94D8);
}
else {
TryDisplayDungeonLoggableMessage3(thrower, target, gUnknown_80F94F0);
TryDisplayDungeonLoggableMessage3_Async(thrower, target, gUnknown_80F94F0);
}
}
}
@ -217,7 +217,7 @@ void HandleStraightProjectileThrow(Entity *thrower, Item *item, DungeonPos *pos,
break;
case 2:
sub_8045C08(gFormatBuffer_Items[0], item);
LogMessageByIdWithPopupCheckUser(thrower, gUnknown_80F9530);
LogMessageByIdWithPopupCheckUser_Async(thrower, gUnknown_80F9530);
break;
}
}
@ -359,17 +359,17 @@ void HandleCurvedProjectileThrow(Entity *thrower, Item *item, DungeonPos *startP
bool8 immobiSlpEndMsg;
sub_806CE94(hitResult.target, 8);
TryDisplayDungeonLoggableMessage3(thrower, hitResult.target, gUnknown_80F94C4);
TryDisplayDungeonLoggableMessage3_Async(thrower, hitResult.target, gUnknown_80F94C4);
immobiSlpEndMsg = TrySendImmobilizeSleepEndMsg(thrower, hitResult.target);
sub_80479B8(1, (lockOnSpecs || a4->unk0 != 0) ? 1 : 0, immobiSlpEndMsg, thrower, hitResult.target, item);
throwResult = 0;
}
else {
if (hasBounceBand) {
TryDisplayDungeonLoggableMessage3(thrower, hitResult.target, gUnknown_80F9510);
TryDisplayDungeonLoggableMessage3_Async(thrower, hitResult.target, gUnknown_80F9510);
}
else {
TryDisplayDungeonLoggableMessage3(thrower, hitResult.target, gUnknown_80F94F0);
TryDisplayDungeonLoggableMessage3_Async(thrower, hitResult.target, gUnknown_80F94F0);
}
throwResult = 1;
}

View File

@ -403,7 +403,7 @@ static void WriteDungeonFloor(DataSerializer *seri)
WriteBool8(seri, gDungeon->unk3A0A);
WriteBool8(seri, gDungeon->unk3A0B);
WriteU8(seri, gDungeon->monsterHouseRoom);
WriteU8(seri, gDungeon->prefight);
WriteU8(seri, gDungeon->cutscene);
WriteS16(seri, gDungeon->tileset);
WriteS16(seri,gDungeon->unk3A10);
WriteS16(seri, gDungeon->unk3A12);
@ -765,7 +765,7 @@ static void ReadDungeonFloor(DataSerializer *seri)
gDungeon->unk3A0A = ReadBool8(seri);
gDungeon->unk3A0B = ReadBool8(seri);
gDungeon->monsterHouseRoom = ReadU8(seri);
gDungeon->prefight = ReadU8(seri);
gDungeon->cutscene = ReadU8(seri);
gDungeon->tileset = ReadS16(seri);
gDungeon->unk3A10 = ReadS16(seri);
gDungeon->unk3A12 = ReadS16(seri);

View File

@ -149,7 +149,7 @@ void sub_803F4A0(Entity *a0)
UpdateCamera(0);
sub_803F38C();
if (gDungeon->unk1356C == 0) {
if (!gDungeon->unk1356C) {
sub_806CD90();
}
}
@ -172,7 +172,7 @@ void PointCameraToMonster(Entity *a0)
UpdateCamera(0);
sub_803F38C();
if (gDungeon->unk1356C == 0) {
if (!gDungeon->unk1356C) {
sub_806CD90();
}
UpdateTrapsVisibility();
@ -382,7 +382,7 @@ void sub_803F9CC(void)
Entity *cameraTarget = gDungeon->unk181e8.cameraTarget;
bool32 r5 = FALSE;
if (gDungeon->unk1356C != 0 || gDungeon->unk181e8.unk18218 != 0 || sub_800EC74() != 0) {
if (gDungeon->unk1356C || gDungeon->unk181e8.unk18218 != 0 || sub_800EC74() != 0) {
r5 = FALSE;
}
else if (cameraTarget != NULL && GetEntityType(cameraTarget) == ENTITY_MONSTER) {
@ -709,7 +709,7 @@ void HandleLuminousOrbAction(Entity *pokemon)
UpdateCamera(0);
UpdateTrapsVisibility();
UpdateMinimap();
LogMessageByIdWithPopupCheckUser(pokemon, gUnknown_80FD040);
LogMessageByIdWithPopupCheckUser_Async(pokemon, gUnknown_80FD040);
}
void sub_8040094(u8 r0)

View File

@ -44,7 +44,7 @@
#include "dungeon_entity_movement.h"
#include "dungeon_main.h"
void ApplyEndOfTurnEffects(Entity *entity)
void DoEndOfTurnEffects_Async(Entity *entity)
{
s32 rand;
EntityInfo *entityInfo;
@ -63,8 +63,8 @@ void ApplyEndOfTurnEffects(Entity *entity)
entityInfo->turnsSinceWarpScarfActivation = WARP_SCARF_ACTIVATION_CHANCES_COUNT - 1;
if (DungeonRandInt(100) < gWarpScarfActivationChances[entityInfo->turnsSinceWarpScarfActivation]) {
entityInfo->turnsSinceWarpScarfActivation = 0;
sub_80444F4(entity);
DisplayActions(NULL);
sub_80444F4_Async(entity);
DisplayActions_Async(NULL);
if (!EntityIsValid(entity) || IsFloorOver())
return;
WarpTarget(entity, entity, 0, NULL);
@ -124,8 +124,8 @@ void ApplyEndOfTurnEffects(Entity *entity)
if (FixedPointToInt(entityInfo->belly) == 0) {
sub_805E804();
sub_80444F4(entity);
DisplayActions(NULL);
sub_80444F4_Async(entity);
DisplayActions_Async(NULL);
if (!EntityIsValid(entity) || IsFloorOver())
return;
if (gDungeon->unk644.emptyBellyAlert < MAX_EMPTY_BELLY_ALERT_STEPS)
@ -144,7 +144,7 @@ void ApplyEndOfTurnEffects(Entity *entity)
}
TrySendImmobilizeSleepEndMsg(entity, entity);
DealDamageToEntity(entity, 1, RESIDUAL_DAMAGE_HUNGER, DUNGEON_EXIT_FAINTED_FROM_HUNGER);
DealDamageToEntity_Async(entity, 1, RESIDUAL_DAMAGE_HUNGER, DUNGEON_EXIT_FAINTED_FROM_HUNGER);
entityInfo->bellyEmpty = TRUE;
if (FixedPointToInt(entityInfo->belly) != 0)
str = NULL;
@ -156,7 +156,7 @@ void ApplyEndOfTurnEffects(Entity *entity)
if (str != NULL) {
if (sound)
PlaySoundEffect(0x153);
LogMessageByIdWithPopupCheckUser(entity, str);
LogMessageByIdWithPopupCheckUser_Async(entity, str);
sub_803E708(30, 0x32);
}
}
@ -166,12 +166,12 @@ void ApplyEndOfTurnEffects(Entity *entity)
if (gDungeon->weather.weatherDamageCounter == 0) {
if (GetApparentWeather(entity) == WEATHER_HAIL) {
if (!MonsterIsType(entity, TYPE_ICE)) {
DealDamageToEntity(entity, gHailSandstormDmgValue, RESIDUAL_DAMAGE_BAD_WEATHER, DUNGEON_EXIT_FAINTED_DUE_TO_WEATHER);
DealDamageToEntity_Async(entity, gHailSandstormDmgValue, RESIDUAL_DAMAGE_BAD_WEATHER, DUNGEON_EXIT_FAINTED_DUE_TO_WEATHER);
}
}
else if (GetApparentWeather(entity) == WEATHER_SANDSTORM) {
if (!MonsterIsType(entity, TYPE_GROUND) && !MonsterIsType(entity, TYPE_ROCK) && !MonsterIsType(entity, TYPE_STEEL)) {
DealDamageToEntity(entity, gHailSandstormDmgValue, RESIDUAL_DAMAGE_BAD_WEATHER, DUNGEON_EXIT_FAINTED_DUE_TO_WEATHER);
DealDamageToEntity_Async(entity, gHailSandstormDmgValue, RESIDUAL_DAMAGE_BAD_WEATHER, DUNGEON_EXIT_FAINTED_DUE_TO_WEATHER);
}
}
if (!EntityIsValid(entity) || IsFloorOver())
@ -181,7 +181,7 @@ void ApplyEndOfTurnEffects(Entity *entity)
// Abilities check
rand = DungeonRandInt(100);
if (AbilityIsActive(entity, ABILITY_SHED_SKIN) && rand < gShedSkinActivateChance && MonsterHasNegativeStatus(entity)) {
DisplayActions(NULL);
DisplayActions_Async(NULL);
if (!EntityIsValid(entity) || IsFloorOver())
return;
sub_8079F20(entity, entity, 1, 0);
@ -196,7 +196,7 @@ void ApplyEndOfTurnEffects(Entity *entity)
// Statuses
if (entityInfo->sleepClassStatus.status == STATUS_YAWNING) {
DisplayActions(NULL);
DisplayActions_Async(NULL);
if (!EntityIsValid(entity) || IsFloorOver())
return;
sub_80420B8(entity);
@ -204,12 +204,12 @@ void ApplyEndOfTurnEffects(Entity *entity)
if (entityInfo->burnClassStatus.status == STATUS_BURN) {
if (entityInfo->burnClassStatus.damageCountdown == 0 || --entityInfo->burnClassStatus.damageCountdown == 0) {
DisplayActions(NULL);
DisplayActions_Async(NULL);
if (!EntityIsValid(entity) || IsFloorOver())
return;
entityInfo->burnClassStatus.damageCountdown = gBurnDmgCountdown;
TrySendImmobilizeSleepEndMsg(entity, entity);
DealDamageToEntity(entity, gBurnDmgValue, RESIDUAL_DAMAGE_BURN, DUNGEON_EXIT_FAINTED_FROM_BURN);
DealDamageToEntity_Async(entity, gBurnDmgValue, RESIDUAL_DAMAGE_BURN, DUNGEON_EXIT_FAINTED_FROM_BURN);
}
if (!EntityIsValid(entity) || IsFloorOver())
return;
@ -217,12 +217,12 @@ void ApplyEndOfTurnEffects(Entity *entity)
if (entityInfo->burnClassStatus.status == STATUS_POISONED) {
if (entityInfo->burnClassStatus.damageCountdown == 0 || --entityInfo->burnClassStatus.damageCountdown == 0) {
DisplayActions(NULL);
DisplayActions_Async(NULL);
if (!EntityIsValid(entity) || IsFloorOver())
return;
entityInfo->burnClassStatus.damageCountdown = gPoisonDmgCountdown;
TrySendImmobilizeSleepEndMsg(entity, entity);
DealDamageToEntity(entity, gPoisonDmgValue, RESIDUAL_DAMAGE_POISON, DUNGEON_EXIT_FAINTED_FROM_POISON);
DealDamageToEntity_Async(entity, gPoisonDmgValue, RESIDUAL_DAMAGE_POISON, DUNGEON_EXIT_FAINTED_FROM_POISON);
}
if (!EntityIsValid(entity) || IsFloorOver())
return;
@ -236,12 +236,12 @@ void ApplyEndOfTurnEffects(Entity *entity)
if (turns >= BAD_POISON_DMG_TURN_VALUES_COUNT - 1)
turns = BAD_POISON_DMG_TURN_VALUES_COUNT - 1;
DisplayActions(NULL);
DisplayActions_Async(NULL);
if (!EntityIsValid(entity) || IsFloorOver())
return;
TrySendImmobilizeSleepEndMsg(entity, entity);
DealDamageToEntity(entity, gBadPoisonDmgValuesByTurn[turns], RESIDUAL_DAMAGE_POISON, DUNGEON_EXIT_FAINTED_FROM_POISON);
DealDamageToEntity_Async(entity, gBadPoisonDmgValuesByTurn[turns], RESIDUAL_DAMAGE_POISON, DUNGEON_EXIT_FAINTED_FROM_POISON);
}
if (!EntityIsValid(entity) || IsFloorOver())
return;
@ -249,32 +249,32 @@ void ApplyEndOfTurnEffects(Entity *entity)
if (entityInfo->frozenClassStatus.status == STATUS_CONSTRICTION) {
if (entityInfo->frozenClassStatus.damageCountdown == 0 || --entityInfo->frozenClassStatus.damageCountdown == 0) {
DisplayActions(NULL);
DisplayActions_Async(NULL);
if (!EntityIsValid(entity) || IsFloorOver())
return;
entityInfo->frozenClassStatus.damageCountdown = gConstrictionDmgCountdown;
TrySendImmobilizeSleepEndMsg(entity, entity);
sub_8041C4C(entity, entityInfo->frozenClassStatus.unk4);
DealDamageToEntity(entity, gConstrictionDmgValue, RESIDUAL_DAMAGE_CONSTRICT, DUNGEON_EXIT_FAINTED_FROM_CONSTRICTION);
DealDamageToEntity_Async(entity, gConstrictionDmgValue, RESIDUAL_DAMAGE_CONSTRICT, DUNGEON_EXIT_FAINTED_FROM_CONSTRICTION);
}
if (!EntityIsValid(entity) || IsFloorOver())
return;
}
else if (entityInfo->frozenClassStatus.status == STATUS_WRAPPED) {
if (entityInfo->frozenClassStatus.damageCountdown == 0 || --entityInfo->frozenClassStatus.damageCountdown == 0) {
DisplayActions(NULL);
DisplayActions_Async(NULL);
if (!EntityIsValid(entity) || IsFloorOver())
return;
entityInfo->frozenClassStatus.damageCountdown = gWrapDmgCountdown;
TrySendImmobilizeSleepEndMsg(entity, entity);
DealDamageToEntity(entity, gWrapDmgValue, RESIDUAL_DAMAGE_WRAP, DUNGEON_EXIT_FAINTED_FROM_WRAP);
DealDamageToEntity_Async(entity, gWrapDmgValue, RESIDUAL_DAMAGE_WRAP, DUNGEON_EXIT_FAINTED_FROM_WRAP);
}
if (!EntityIsValid(entity) || IsFloorOver())
return;
}
else if (entityInfo->frozenClassStatus.status == STATUS_INGRAIN) {
if (entityInfo->frozenClassStatus.damageCountdown == 0 || --entityInfo->frozenClassStatus.damageCountdown == 0) {
DisplayActions(NULL);
DisplayActions_Async(NULL);
if (!EntityIsValid(entity) || IsFloorOver())
return;
entityInfo->frozenClassStatus.damageCountdown = gIngrainHealCountdown;
@ -288,12 +288,12 @@ void ApplyEndOfTurnEffects(Entity *entity)
if (dmg == 0)
dmg = 1;
entityInfo->curseClassStatus.damageCountdown = gCurseDmgCountdown;
DisplayActions(NULL);
DisplayActions_Async(NULL);
if (!EntityIsValid(entity) || IsFloorOver())
return;
TrySendImmobilizeSleepEndMsg(entity, entity);
DealDamageToEntity(entity, dmg, RESIDUAL_DAMAGE_CURSE, DUNGEON_EXIT_FELLED_BY_CURSE);
DealDamageToEntity_Async(entity, dmg, RESIDUAL_DAMAGE_CURSE, DUNGEON_EXIT_FELLED_BY_CURSE);
}
if (!EntityIsValid(entity) || IsFloorOver())
return;
@ -315,17 +315,17 @@ void ApplyEndOfTurnEffects(Entity *entity)
}
else {
bool8 dmgUser = AbilityIsActive(entity, ABILITY_LIQUID_OOZE);
sub_80444F4(entity);
DisplayActions(NULL);
sub_80444F4_Async(entity);
DisplayActions_Async(NULL);
if (!EntityIsValid(entity) || !EntityIsValid(target) || IsFloorOver())
return;
if (entityInfo->frozenClassStatus.status != STATUS_FROZEN) {
TrySendImmobilizeSleepEndMsg(entity, entity);
DealDamageToEntity(entity, hp, RESIDUAL_DAMAGE_LEECH_SEED, DUNGEON_EXIT_DRAINED_BY_LEECH_SEED);
DealDamageToEntity_Async(entity, hp, RESIDUAL_DAMAGE_LEECH_SEED, DUNGEON_EXIT_DRAINED_BY_LEECH_SEED);
if (dmgUser) {
TrySendImmobilizeSleepEndMsg(target, target);
DealDamageToEntity(target, hp, RESIDUAL_DAMAGE_LIQUID_OOZE, DUNGEON_EXIT_FAINTED_COVERED_IN_SLUDGE);
DealDamageToEntity_Async(target, hp, RESIDUAL_DAMAGE_LIQUID_OOZE, DUNGEON_EXIT_FAINTED_COVERED_IN_SLUDGE);
}
else {
HealTargetHP(target, target, hp, 0, TRUE);
@ -341,17 +341,17 @@ void ApplyEndOfTurnEffects(Entity *entity)
if (entityInfo->perishSongTurns != 0) {
sub_80838EC(&entityInfo->perishSongTurns);
if (entityInfo->perishSongTurns == 0) {
DisplayActions(NULL);
DisplayActions_Async(NULL);
if (!EntityIsValid(entity) || IsFloorOver())
return;
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1], entity, 0);
LogMessageByIdWithPopupCheckUser(entity, gUnknown_80FEB30);
LogMessageByIdWithPopupCheckUser_Async(entity, gUnknown_80FEB30);
TrySendImmobilizeSleepEndMsg(entity, entity);
if (entityInfo->reflectClassStatus.status == STATUS_PROTECT) {
LogMessageByIdWithPopupCheckUser(entity, gPtrProtectSavedItMessage);
LogMessageByIdWithPopupCheckUser_Async(entity, gPtrProtectSavedItMessage);
}
else {
DealDamageToEntity(entity, 9999, RESIDUAL_DAMAGE_PERISH_SONG, DUNGEON_EXIT_FAINTED_FROM_PERISH_SONG);
DealDamageToEntity_Async(entity, 9999, RESIDUAL_DAMAGE_PERISH_SONG, DUNGEON_EXIT_FAINTED_FROM_PERISH_SONG);
}
if (!EntityIsValid(entity) || IsFloorOver())
return;
@ -365,7 +365,7 @@ void ApplyEndOfTurnEffects(Entity *entity)
if (!CheckVariousStatuses2(entity, FALSE) && !CannotAttack(entity, FALSE) && !CheckVariousStatuses(entity)) {
Move bideMove;
DisplayActions(NULL);
DisplayActions_Async(NULL);
InitPokemonMove(&bideMove, MOVE_BIDE_2);
bideMove.moveFlags |= MOVE_FLAG_LAST_USED;
TryUseChosenMove(entity, 0, 0, 0, 0, &bideMove);
@ -385,7 +385,7 @@ void ApplyEndOfTurnEffects(Entity *entity)
entityInfo->bideClassStatus.status = 0;
entityInfo->unk14A = 0;
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], entity, 0);
LogMessageByIdWithPopupCheckUser(entity, gUnknown_80FABD8);
LogMessageByIdWithPopupCheckUser_Async(entity, gUnknown_80FABD8);
}
}
@ -541,7 +541,7 @@ void TickStatusAndHealthRegen(Entity *entity)
sub_80838EC(&entityInfo->terrifiedTurns);
if (entityInfo->terrifiedTurns == 0) {
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], entity, 0);
LogMessageByIdWithPopupCheckUser(entity, gPtrStenchWavedOffMessage);
LogMessageByIdWithPopupCheckUser_Async(entity, gPtrStenchWavedOffMessage);
}
}
@ -565,7 +565,7 @@ void TickStatusAndHealthRegen(Entity *entity)
if (oldSpdStage != newSpdStage) {
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], entity, 0);
LogMessageByIdWithPopupCheckUser(entity, gUnknown_80FA124[newSpdStage]);
LogMessageByIdWithPopupCheckUser_Async(entity, gUnknown_80FA124[newSpdStage]);
}
}
}

View File

@ -79,7 +79,7 @@ void TrySpawnWildMonster(void)
}
}
if (illuminateEntity != NULL) {
DisplayDungeonLoggableMessageTrue(0,gText_Pokemon0Blinked);
DisplayDungeonLoggableMessageTrue_Async(0,gText_Pokemon0Blinked);
sub_8042920(illuminateEntity);
}

View File

@ -37,9 +37,9 @@ void UpdateWindTurns(void)
if (gDungeon->unk644.windTurns < 0xfa) {
sub_805E804();
TryPointCameraToMonster(leader,1);
DisplayActions(leader);
DisplayActions_Async(leader);
if (!IsFloorOver()) {
LogMessageByIdWithPopupCheckUser(leader,gText_SomethingStirring);
LogMessageByIdWithPopupCheckUser_Async(leader,gText_SomethingStirring);
sub_80426C8(gUnknown_80F5FAC[gDungeon->tileset],0);
gDungeon->unk644.windPhase = 1;
}
@ -49,9 +49,9 @@ void UpdateWindTurns(void)
if (gDungeon->unk644.windTurns < 0x96) {
sub_805E804();
TryPointCameraToMonster(leader,1);
DisplayActions(leader);
DisplayActions_Async(leader);
if (!IsFloorOver()) {
LogMessageByIdWithPopupCheckUser(leader,gText_SomethingApproaching);
LogMessageByIdWithPopupCheckUser_Async(leader,gText_SomethingApproaching);
sub_80426C8(gUnknown_80F5FAC[gDungeon->tileset],1);
gDungeon->unk644.windPhase = 2;
}
@ -61,9 +61,9 @@ void UpdateWindTurns(void)
if (gDungeon->unk644.windTurns < 0x32) {
sub_805E804();
TryPointCameraToMonster(leader,1);
DisplayActions(leader);
DisplayActions_Async(leader);
if (!IsFloorOver()) {
LogMessageByIdWithPopupCheckUser(leader,gText_ItsGettingCloser);
LogMessageByIdWithPopupCheckUser_Async(leader,gText_ItsGettingCloser);
sub_80426C8(gUnknown_80F5FAC[gDungeon->tileset],2);
gDungeon->unk644.windPhase = 3;
}
@ -73,12 +73,12 @@ void UpdateWindTurns(void)
if (gDungeon->unk644.windTurns < 1) {
sub_805E804();
TryPointCameraToMonster(leader,1);
DisplayActions(leader);
DisplayActions_Async(leader);
if (!IsFloorOver()) {
LogMessageByIdWithPopupCheckUser(leader,gText_ItsRightNearbyGustingHard);
LogMessageByIdWithPopupCheckUser_Async(leader,gText_ItsRightNearbyGustingHard);
sub_80426C8(gUnknown_80F5FAC[gDungeon->tileset],3);
gDungeon->unk644.windPhase = 4;
HandleFaint(leader,DUNGEON_EXIT_BLOWN_OUT_UNSEEN_FORCE,leader);
HandleFaint_Async(leader,DUNGEON_EXIT_BLOWN_OUT_UNSEEN_FORCE,leader);
}
}
}

View File

@ -102,16 +102,16 @@ void HandleExplosion(Entity *pokemon,Entity *target,DungeonPos *param_3,s32 para
if (index != DUNGEON_MAX_POKEMON) {
sub_804218C(pokemon,target);
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80F96EC);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80F96EC);
}
else if (GetApparentWeather(target) == WEATHER_RAIN) {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80F96EC);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80F96EC);
}
else
{
sub_804216C(pokemon,target,param_4);
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80F96BC);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80F96BC);
flag = FALSE;
posPtr = (gUnknown_8107178)[param_4];
@ -198,7 +198,7 @@ static void sub_807E1A0(Entity *pokemon,Entity *target,u8 moveType,s32 dungeonEx
newHP /= 2;
}
}
sub_806F370(pokemon,target,newHP,0,&flag,moveType,dungeonExitReason,RESIDUAL_DAMAGE_REGULAR,0,0);
sub_806F370_Async(pokemon,target,newHP,0,&flag,moveType,dungeonExitReason,RESIDUAL_DAMAGE_REGULAR,0,0);
}
}
}

View File

@ -58,12 +58,12 @@ void sub_807D3CC(Entity *param_1)
}
}
if (flag) {
LogMessageByIdWithPopupCheckUser(param_1,gUnknown_80FD2F8); // All traps were exposed
LogMessageByIdWithPopupCheckUser_Async(param_1,gUnknown_80FD2F8); // All traps were exposed
UpdateMinimap();
UpdateTrapsVisibility();
}
else {
LogMessageByIdWithPopupCheckUser(param_1,gUnknown_80FD320); // There appears to be no hidden traps.
LogMessageByIdWithPopupCheckUser_Async(param_1,gUnknown_80FD320); // There appears to be no hidden traps.
}
}

View File

@ -65,12 +65,12 @@ void HandleHurlOrb(Entity *target, Entity *attacker)
if (AbilityIsActive(attacker, ABILITY_SUCTION_CUPS)) {
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], attacker, 0);
TryDisplayDungeonLoggableMessage3(target, attacker, gUnknown_80FCB40); // is anchored, cannot be moved
TryDisplayDungeonLoggableMessage3_Async(target, attacker, gUnknown_80FCB40); // is anchored, cannot be moved
return;
}
if (target == attacker) {
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], attacker, 0);
TryDisplayDungeonLoggableMessage3(target, attacker, gUnknown_80FCB70); // couldn't be thrown for some reason
TryDisplayDungeonLoggableMessage3_Async(target, attacker, gUnknown_80FCB70); // couldn't be thrown for some reason
return;
}
@ -135,13 +135,13 @@ void HandleHurlOrb(Entity *target, Entity *attacker)
}
}
if (i == 100) {
TryDisplayDungeonLoggableMessage3(target, attacker, gUnknown_80FE6B4); // But it didn~27t go anywhere.
TryDisplayDungeonLoggableMessage3_Async(target, attacker, gUnknown_80FE6B4); // But it didn~27t go anywhere.
return;
}
}
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], attacker, 0);
TryDisplayDungeonLoggableMessage3(target, attacker, gUnknown_80FE690); // m0 was sent flying!
TryDisplayDungeonLoggableMessage3_Async(target, attacker, gUnknown_80FE690); // m0 was sent flying!
if (ShouldDisplayEntity(attacker)) {
PlaySoundEffect(0x1A3);
}
@ -215,14 +215,14 @@ void HandleHurlOrb(Entity *target, Entity *attacker)
InitPokemonMove(&move, MOVE_REGULAR_ATTACK);
if (!sub_80571F0(tileEntity, &move)) {
sub_806F370(target, tileEntity, gHurlOrbDmgValue, FALSE, NULL, TYPE_NONE, DUNGEON_EXIT_FELLED_BY_POKEMON_FLYING, RESIDUAL_DAMAGE_REGULAR, 0, 0);
sub_806F370_Async(target, tileEntity, gHurlOrbDmgValue, FALSE, NULL, TYPE_NONE, DUNGEON_EXIT_FELLED_BY_POKEMON_FLYING, RESIDUAL_DAMAGE_REGULAR, 0, 0);
}
if (EntityIsValid(tileEntity)) {
sub_806CE68(tileEntity, GetEntInfo(tileEntity)->action.direction);
}
}
sub_806F370(target, attacker, gHurlOrbDmgValue, FALSE, NULL, TYPE_NONE, DUNGEON_EXIT_FAINTED_FROM_BEING_KNOCKED, RESIDUAL_DAMAGE_REGULAR, 0, 0);
sub_806F370_Async(target, attacker, gHurlOrbDmgValue, FALSE, NULL, TYPE_NONE, DUNGEON_EXIT_FAINTED_FROM_BEING_KNOCKED, RESIDUAL_DAMAGE_REGULAR, 0, 0);
if (EntityIsValid(attacker)) {
sub_806CE68(attacker, GetEntInfo(attacker)->action.direction);
}
@ -242,6 +242,6 @@ static void sub_807F9BC(Entity *entity)
sub_807EC28(FALSE);
}
sub_806A5B8(entity);
TryTriggerMonsterHouseWithMsg(entity, gDungeon->forceMonsterHouse);
TryTriggerMonsterHouseWithMsg_Async(entity, gDungeon->forceMonsterHouse);
}
}

View File

@ -275,7 +275,7 @@ void GameLoop(void)
// arm9.bin::0200E02C
static void MainLoops_RunFrameActions(u32 unused)
{
DrawDialogueBoxString();
DrawDialogueBoxString_Async();
sub_8005838(NULL, 0);
nullsub_8(gGameOptionsRef->touchScreen);

View File

@ -64,7 +64,7 @@ static s32 GetCurrMenuIndex(MenuInputStruct *menuInput);
void sub_8012A18(s32 unused)
{
UpdateSoundEffectCounters();
DrawDialogueBoxString();
DrawDialogueBoxString_Async();
nullsub_8(gGameOptionsRef->touchScreen);
sub_8005180();
sub_80060EC();

View File

@ -112,7 +112,7 @@ bool8 DigMoveAction(Entity * pokemon, Entity * target, Move *move, s32 itemId)
flag = FALSE;
tile = GetTileAtEntitySafe(pokemon);
if ((!IsTileGround(tile)) || ((tile->terrainFlags & (TERRAIN_TYPE_NORMAL | TERRAIN_TYPE_SECONDARY)) != 1)) {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FD14C); // It can only be used on land!
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FD14C); // It can only be used on land!
}
else {
if (MoveMatchesBideClassStatus(pokemon,move)) {
@ -144,7 +144,7 @@ bool8 RainDanceMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemI
gDungeon->weather.unkE267[WEATHER_RAIN] = gMoveWeatherDuration;
if (sub_807EAA0(1,0) == 0) {
// The weather remains unchanged
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FCF74);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FCF74);
}
return TRUE;
}
@ -154,7 +154,7 @@ bool8 HailMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
gDungeon->weather.unkE267[WEATHER_HAIL] = gMoveWeatherDuration;
if (sub_807EAA0(1,0) == 0) {
// The weather remains unchanged
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FCF80);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FCF80);
}
return TRUE;
}
@ -200,13 +200,13 @@ bool8 SuperFangMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemI
newHP = GetEntInfo(target)->HP / 2;
local_24 = FALSE;
if (newHP != 0) {
sub_806F370(pokemon,target,newHP,1,&local_24,GetMoveType(move),GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,1,0);
sub_806F370_Async(pokemon,target,newHP,1,&local_24,GetMoveType(move),GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,1,0);
local_24 = local_24 == 0;
}
else
{
// The target's HP can't be halved anymore
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FD018);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FD018);
}
return local_24;
}
@ -230,7 +230,7 @@ bool8 PainSplitMoveAction(Entity *attacker, Entity *target, Move *move, s32 item
SetExpMultplier(attackerInfo);
// $m0 and $m1 shared their HP
TryDisplayDungeonLoggableMessage3(attacker,target,gUnknown_80FC7EC);
TryDisplayDungeonLoggableMessage3_Async(attacker,target,gUnknown_80FC7EC);
return TRUE;
}
@ -253,7 +253,7 @@ bool8 TormentMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
if ((movePtr->moveFlags & MOVE_FLAG_LAST_USED) != 0) {
BufferMoveName(gFormatBuffer_Items[0],movePtr,0);
// $i0 was tormented
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FCFBC);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FCFBC);
movePtr->moveFlags |= MOVE_FLAG_DISABLED;
isTormented = TRUE;
}
@ -271,7 +271,7 @@ bool8 TormentMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
isTormented = TRUE;
BufferMoveName(gFormatBuffer_Items[0],&struggleMove,0);
// $i0 was tormented
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FCFBC);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FCFBC);
}
}
else if ((entityInfo->moves.struggleMoveFlags & MOVE_FLAG_LAST_USED) == 0) {
@ -286,7 +286,7 @@ bool8 TormentMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
else
{
// The target couldn't be tormented
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FCFE4);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FCFE4);
}
return isTormented;
}
@ -318,7 +318,7 @@ bool8 SnoreMoveAction(Entity *pokemon, Entity *target, Move * move, s32 itemId)
}
}
else {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC734);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC734);
}
return flag;
}
@ -392,10 +392,10 @@ bool8 SpiteMoveAction(Entity * pokemon, Entity * target, Move *move, s32 itemId)
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1], target, 0);
if (flag) {
TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FD350);
TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80FD350);
}
else {
TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FD370);
TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80FD370);
}
return flag;
@ -496,10 +496,10 @@ bool8 WillOWispMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemI
GetEntInfo(target)->unk152 = 1;
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1],target,0);
if (flashFireStatus == FLASH_FIRE_STATUS_MAXED) {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FAE00); // Fire moves won't become stronger
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FAE00); // Fire moves won't become stronger
}
else {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FADD8); // $m0 used flash fire to absorb fire
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FADD8); // $m0 used flash fire to absorb fire
}
}
}
@ -523,7 +523,7 @@ bool8 ReturnMoveAction(Entity * pokemon,Entity * target,Move * move,s32 itemId)
}
}
sub_806F370(pokemon,target,dmg,1,&local_24,GetMoveType(move),GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,1,0);
sub_806F370_Async(pokemon,target,dmg,1,&local_24,GetMoveType(move),GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,1,0);
local_24 = (local_24 == 0);
return local_24;
}
@ -537,12 +537,12 @@ bool8 GrudgeMoveAction(Entity *pokemon, Entity * target, Move *move, s32 itemId)
entityInfo = GetEntInfo(target);
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1],target,0);
if (entityInfo->grudge) {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FD2B4);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FD2B4);
}
else {
entityInfo->grudge = TRUE;
hasGrudge = TRUE;
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FD294);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FD294);
}
return hasGrudge;
}
@ -665,7 +665,7 @@ bool8 Bide2MoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
if (999 < iVar2) {
iVar2 = 999;
}
sub_806F370(pokemon,target,iVar2,1,&local_18, GetMoveType(move),DUNGEON_EXIT_DEFEATED_PENT_UP_ENERGY,RESIDUAL_DAMAGE_REGULAR,1,0);
sub_806F370_Async(pokemon,target,iVar2,1,&local_18, GetMoveType(move),DUNGEON_EXIT_DEFEATED_PENT_UP_ENERGY,RESIDUAL_DAMAGE_REGULAR,1,0);
local_18 = local_18 == 0;
return local_18;
@ -731,7 +731,7 @@ bool8 EndeavorMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId
if (diffHP < 0) {
diffHP = 0;
}
sub_806F370(pokemon,target,diffHP,0,&local_24,GetMoveType(move),GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,1,0);
sub_806F370_Async(pokemon,target,diffHP,0,&local_24,GetMoveType(move),GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,1,0);
local_24 = local_24 == 0;
return local_24;
@ -770,7 +770,7 @@ bool8 BrickBreakMoveAction(Entity *pokemon, Entity *target, Move *move, s32 item
flag = FALSE;
if ((GetEntInfo(target)->reflectClassStatus.status == STATUS_REFLECT) || (GetEntInfo(target)->reflectClassStatus.status == STATUS_LIGHT_SCREEN)) {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FD104); // The barrier was shattered
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FD104); // The barrier was shattered
EndReflectClassStatus(pokemon,target);
flag = TRUE;
}
@ -829,7 +829,7 @@ bool8 GigaDrainMoveAction(Entity * pokemon, Entity * target, Move * move, s32 it
}
SetExpMultplier(entityInfo);
if (hasLiquidOoze) {
DealDamageToEntity(pokemon, newHP, RESIDUAL_DAMAGE_LIQUID_OOZE, DUNGEON_EXIT_FAINTED_COVERED_IN_SLUDGE);
DealDamageToEntity_Async(pokemon, newHP, RESIDUAL_DAMAGE_LIQUID_OOZE, DUNGEON_EXIT_FAINTED_COVERED_IN_SLUDGE);
}
else {
HealTargetHP(pokemon, pokemon, newHP, 0, TRUE);

View File

@ -136,7 +136,7 @@ bool8 PsywaveMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
if (199 < rand) {
rand = 199;
}
flag = sub_8055864(pokemon,target,move,rand,itemId) != 0 ? TRUE: FALSE;
flag = sub_8055864_Async(pokemon,target,move,rand,itemId) != 0 ? TRUE: FALSE;
return flag;
}
@ -217,7 +217,7 @@ bool8 PsychUpMoveAction(Entity * pokemon, Entity * target, Move * move, s32 item
iVar4->defensiveMultipliers[index] = iVar3->defensiveMultipliers[index];
}
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBD58); // It psyched itself up!
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBD58); // It psyched itself up!
SetExpMultplier(iVar4);
return TRUE;
}
@ -240,7 +240,7 @@ bool8 sub_8058E5C(Entity *pokemon, Entity *target, Move *move, s32 itemId)
}
flag = TRUE;
if ((!AbilityIsActive(pokemon, ABILITY_ROCK_HEAD)) && RollSecondaryEffect(pokemon, 0)) {
sub_806F370(pokemon,pokemon,iVar3,0,0,0,DUNGEON_EXIT_FAINTED_FROM_RECOIL,RESIDUAL_DAMAGE_RECOIL,1,0);
sub_806F370_Async(pokemon,pokemon,iVar3,0,0,0,DUNGEON_EXIT_FAINTED_FROM_RECOIL,RESIDUAL_DAMAGE_RECOIL,1,0);
}
}
return flag;
@ -355,10 +355,10 @@ bool8 FissureMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
uVar5 = FALSE;
}
if (!uVar5) {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FEB88);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FEB88);
}
else {
sub_806F370(pokemon,target,9999,1,&flag,GetMoveType(move),GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,1,1);
sub_806F370_Async(pokemon,target,9999,1,&flag,GetMoveType(move),GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,1,1);
flag = flag == 0;
}
return flag;
@ -406,7 +406,7 @@ bool8 AbsorbMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
SetExpMultplier(entityInfo);
if (RollSecondaryEffect(pokemon,0)) {
if (hasLiquidOoze) {
DealDamageToEntity(pokemon,iVar4,RESIDUAL_DAMAGE_LIQUID_OOZE,DUNGEON_EXIT_FAINTED_COVERED_IN_SLUDGE);
DealDamageToEntity_Async(pokemon,iVar4,RESIDUAL_DAMAGE_LIQUID_OOZE,DUNGEON_EXIT_FAINTED_COVERED_IN_SLUDGE);
}
else {
HealTargetHP(pokemon,pokemon,iVar4,0,1);
@ -424,7 +424,7 @@ bool8 SkillSwapMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemI
EntityInfo *pokeEntityData = GetEntInfo(pokemon);
EntityInfo *targetEntityInfo = GetEntInfo(target);
if ((AbilityIsActive(target, ABILITY_WONDER_GUARD)) || (AbilityIsActive(pokemon, ABILITY_WONDER_GUARD))) {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC8C0);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC8C0);
flag = FALSE;
}
else
@ -436,7 +436,7 @@ bool8 SkillSwapMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemI
pokeEntityData->abilities[0] = ability1;
pokeEntityData->abilities[1] = ability2;
gDungeon->unkC = 1;
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC888);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC888);
// Weirdly enough SetExpMultplier inline doesn't work here...
if (pokeEntityData->expMultiplier == EXP_HALVED) {
pokeEntityData->expMultiplier = EXP_REGULAR;
@ -466,19 +466,19 @@ bool8 SketchMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
}
if (!moveFound) {
TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FE3BC);
TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80FE3BC);
return FALSE;
}
if (moveId == MOVE_NOTHING) {
TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FE3BC);
TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80FE3BC);
}
else {
InitPokemonMove(move, moveId);
BufferMoveName(gFormatBuffer_Items[0], move, 0);
move->moveFlags2 |= MOVE_FLAG2_UNK4;
move->moveFlags2 |= MOVE_FLAG_REPLACE;
TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FE38C);
TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80FE38C);
ASM_MATCH_TRICK(pokeInfo);
SetExpMultplier(pokeInfo);
ret = TRUE;
@ -519,7 +519,7 @@ bool8 DoubleEdgeMoveAction(Entity * pokemon,Entity * target,Move * move,s32 item
if (HP == 0) {
HP = 1;
}
sub_806F370(pokemon,pokemon,HP,0,0,0,DUNGEON_EXIT_FAINTED_FROM_RECOIL,RESIDUAL_DAMAGE_RECOIL,1,0);
sub_806F370_Async(pokemon,pokemon,HP,0,0,0,DUNGEON_EXIT_FAINTED_FROM_RECOIL,RESIDUAL_DAMAGE_RECOIL,1,0);
}
}
return flag;
@ -530,7 +530,7 @@ bool8 SandstormMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemI
gDungeon->weather.unkE267[WEATHER_SANDSTORM] = gMoveWeatherDuration;
if(sub_807EAA0(1, 0) == 0)
{
TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FCF78);
TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80FCF78);
}
return TRUE;
}
@ -584,12 +584,12 @@ bool8 sub_80595EC(Entity * pokemon,Entity * target,Move * move,s32 itemId)
local_20 = 0;
if (sub_806F4A4(target,GetMoveType(move)) == 0) {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FEB8C);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FEB8C);
return FALSE;
}
else {
moveType = GetMoveType(move);
sub_806F370(pokemon,target,9999,1,&local_20,moveType,GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,1,0);
sub_806F370_Async(pokemon,target,9999,1,&local_20,moveType,GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,1,0);
local_20 = (local_20 == 0);
return local_20;
}
@ -622,7 +622,7 @@ bool8 SonicboomMoveAction(Entity * pokemon,Entity * target,Move * move,s32 itemI
u8 local_20;
local_20 = 0;
sub_806F370(pokemon,target,gSonicboomDmgValue,1,&local_20,GetMoveType(move),GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,1,0);
sub_806F370_Async(pokemon,target,gSonicboomDmgValue,1,&local_20,GetMoveType(move),GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,1,0);
local_20 = local_20 == 0;
return local_20;
}
@ -655,7 +655,7 @@ bool8 DiveMoveAction(Entity * pokemon, Entity * target, Move * move, s32 itemId)
flag = FALSE;
if (IsTileGround(GetTileAtEntitySafe(pokemon))) {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FD128);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FD128);
}
else if (MoveMatchesBideClassStatus(pokemon,move)) {
flag = HandleDamagingMove(pokemon,target,move,gDiveModifier,itemId) != 0 ? TRUE : FALSE;
@ -748,7 +748,7 @@ bool8 sub_8059A2C(Entity * pokemon,Entity * target,Move * move,s32 itemId)
local_20 = 0;
level = GetEntInfo(pokemon)->level;
sub_806F370(pokemon,target,level,1,&local_20,GetMoveType(move),GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,1,0);
sub_806F370_Async(pokemon,target,level,1,&local_20,GetMoveType(move),GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,1,0);
local_20 = local_20 == 0;
return local_20;
}
@ -777,11 +777,11 @@ bool8 HornDrillMoveAction(Entity * pokemon,Entity * target,Move * move,s32 itemI
local_20 = 0;
if (sub_806F4A4(target,GetMoveType(move)) == 0) {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FEB90);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FEB90);
return FALSE;
}
else {
sub_806F370(pokemon,target,9999,1,&local_20,GetMoveType(move),GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,0,0);
sub_806F370_Async(pokemon,target,9999,1,&local_20,GetMoveType(move),GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,0,0);
local_20 = local_20 == 0;
return local_20;
}
@ -806,7 +806,7 @@ bool8 ConversionMoveAction(Entity * pokemon,Entity * target,Move * move,s32 item
counter = 0;
info = GetEntInfo(target);
if (AbilityIsActive(target, ABILITY_FORECAST)) {
TryDisplayDungeonLoggableMessage3(pokemon,target,gPtrForecastPreventsTypeSwitchMessage);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gPtrForecastPreventsTypeSwitchMessage);
return FALSE;
}
else
@ -820,7 +820,7 @@ bool8 ConversionMoveAction(Entity * pokemon,Entity * target,Move * move,s32 item
}
}
if (counter == 0) {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FE36C);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FE36C);
return FALSE;
}
else
@ -831,7 +831,7 @@ bool8 ConversionMoveAction(Entity * pokemon,Entity * target,Move * move,s32 item
info->types[1] = TYPE_NONE;
info->isColorChanged = TRUE;
BufferMoveName(gFormatBuffer_Items[0], moveStack[newIndex], NULL);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FE330);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FE330);
return TRUE;
}
}
@ -849,7 +849,7 @@ bool8 HelpingHandMoveAction(Entity *pokemon, Entity *target, Move *move, s32 ite
flag = FALSE;
if(pokemon == target)
{
TryDisplayDungeonLoggableMessage3(target, target, gUnknown_80FEB60);
TryDisplayDungeonLoggableMessage3_Async(target, target, gUnknown_80FEB60);
}
else {
BoostOffensiveStat(pokemon, target, gStatIndexAtkDef, 1);

View File

@ -85,12 +85,12 @@ bool8 JumpKickMoveAction(Entity * pokemon,Entity * target,Move * move,s32 itemId
moveCritChance = GetMoveCritChance(move);
CalcDamage(pokemon,target,moveType,movePower,moveCritChance,&dmgStruct, IntToF248(1),move->id,0);
SetMessageArgument_2(gFormatBuffer_Monsters[0],GetEntInfo(pokemon),0);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC7C8);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC7C8);
dmgStruct.dmg /= 2;
if (dmgStruct.dmg == 0) {
dmgStruct.dmg = 1;
}
sub_806F370(pokemon,pokemon,dmgStruct.dmg,0,&auStack_20,0,DUNGEON_EXIT_MISSED_JUMP_KICK,RESIDUAL_DAMAGE_MOVE_FAIL,1,0);
sub_806F370_Async(pokemon,pokemon,dmgStruct.dmg,0,&auStack_20,0,DUNGEON_EXIT_MISSED_JUMP_KICK,RESIDUAL_DAMAGE_MOVE_FAIL,1,0);
}
return flag;
}
@ -135,12 +135,12 @@ bool8 HiJumpKickMoveAction(Entity * pokemon,Entity * target,Move * move,s32 item
moveCritChance = GetMoveCritChance(move);
CalcDamage(pokemon,target,moveType,movePower,moveCritChance,&dmgStruct,IntToF248(2),move->id,0);
SetMessageArgument_2(gFormatBuffer_Monsters[0],GetEntInfo(pokemon),0);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC7C8);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC7C8);
dmgStruct.dmg /= 2;
if (dmgStruct.dmg == 0) {
dmgStruct.dmg = 1;
}
sub_806F370(pokemon,pokemon,dmgStruct.dmg,0,&auStack_20,0,DUNGEON_EXIT_MISSED_HI_JUMP_KICK,RESIDUAL_DAMAGE_MOVE_FAIL,1,0);
sub_806F370_Async(pokemon,pokemon,dmgStruct.dmg,0,&auStack_20,0,DUNGEON_EXIT_MISSED_HI_JUMP_KICK,RESIDUAL_DAMAGE_MOVE_FAIL,1,0);
}
return flag;
}
@ -193,11 +193,11 @@ bool8 TrickMoveAction(Entity * pokemon,Entity * target, Move *move, s32 itemId)
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],pokemon,0);
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1],target,0);
if (AbilityIsActive(target, ABILITY_STICKY_HOLD)) {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FCCE4);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FCCE4);
return FALSE;
}
else if (HasHeldItem(target, ITEM_ALERT_SPECS)) {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FD578);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FD578);
return FALSE;
}
else
@ -212,7 +212,7 @@ bool8 TrickMoveAction(Entity * pokemon,Entity * target, Move *move, s32 itemId)
if (flag)
{
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC7AC); // The item trade failed
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC7AC); // The item trade failed
return FALSE;
}
else
@ -223,7 +223,7 @@ bool8 TrickMoveAction(Entity * pokemon,Entity * target, Move *move, s32 itemId)
sub_806A6E8(pokemon);
sub_806A6E8(target);
SetExpMultplier(r7);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC790); // Traded items
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC790); // Traded items
return TRUE;
}
}
@ -310,7 +310,7 @@ bool8 RolePlayMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId
entityInfo = GetEntInfo(pokemon);
targetEntityInfo = GetEntInfo(target);
if (AbilityIsActive(target, ABILITY_WONDER_GUARD)) {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC854);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC854);
return FALSE;
}
else
@ -319,7 +319,7 @@ bool8 RolePlayMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId
entityInfo->abilities[1] = targetEntityInfo->abilities[1];
gDungeon->unkC = 1;
SetExpMultplier(entityInfo);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC81C);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC81C);
EndAbilityImmuneStatus(pokemon, pokemon);
return TRUE;
}
@ -329,7 +329,7 @@ bool8 SunnyDayMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId
{
gDungeon->weather.unkE267[WEATHER_SUNNY] = gMoveWeatherDuration;
if (sub_807EAA0(1,0) == 0) {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FCF7C);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FCF7C);
}
return TRUE;
}
@ -363,7 +363,7 @@ bool8 FakeOutMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
bool8 sub_805A450(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC730);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC730);
return FALSE;
}
@ -390,7 +390,7 @@ bool8 PayDayMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
bool8 AssistMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC74C);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC74C);
return FALSE;
}
@ -416,7 +416,7 @@ bool8 SwallowMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
*stockpileStage = 0;
}
else {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC770);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC770);
}
return TRUE;
}
@ -477,7 +477,7 @@ bool8 SpitUpMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
*stockpileStage = 0;
}
else {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FCA3C);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FCA3C);
}
return TRUE;
}
@ -510,12 +510,12 @@ bool8 KnockOffMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1], target, 0);
if (AbilityIsActive(target, ABILITY_STICKY_HOLD))
{
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FCCE8);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FCCE8);
return FALSE;
}
else if (HasHeldItem(target, ITEM_ALERT_SPECS))
{
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FD57C);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FD57C);
return FALSE;
}
else
@ -523,13 +523,13 @@ bool8 KnockOffMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId
heldItem = targetEntityInfo->heldItem;
if (!ItemExists(&heldItem))
{
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FD18C);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FD18C);
return FALSE;
}
else
{
ZeroOutItem(&targetEntityInfo->heldItem);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FD170); // $m1's item was swatted down!
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FD170); // $m1's item was swatted down!
pos.x = gAdjacentTileOffsets[entityInfo->action.direction].x;
pos.y = gAdjacentTileOffsets[entityInfo->action.direction].y;
sub_805A7D4(pokemon,target,&heldItem,&pos);
@ -592,7 +592,7 @@ bool8 SplashMoveAction(Entity * pokemon, Entity * target, Move *move, s32 itemId
}
_0805A8C2:
if (counter == 0x28) {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FEBDC);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FEBDC);
return FALSE;
}
@ -612,10 +612,10 @@ _0805A8C2:
if (GetEntityType(entity) == ENTITY_MONSTER) {
InitPokemonMove(&stackMove,MOVE_REGULAR_ATTACK);
if (sub_80571F0(entity,&stackMove) == 0) {
sub_806F370(pokemon,entity,gSplashDmgValue,0,0,TYPE_NONE,GetDungeonExitReasonFromMoveOrItem(move, itemId),RESIDUAL_DAMAGE_REGULAR,1,0);
sub_806F370_Async(pokemon,entity,gSplashDmgValue,0,0,TYPE_NONE,GetDungeonExitReasonFromMoveOrItem(move, itemId),RESIDUAL_DAMAGE_REGULAR,1,0);
}
if ((IsFloorOver() == 0) && (EntityIsValid(pokemon))) {
sub_806F370(pokemon,pokemon,gSplashDmgValue,0,0,0,DUNGEON_EXIT_FAINTED_FROM_DAMAGE_BOUNCING,RESIDUAL_DAMAGE_REGULAR,0,0);
sub_806F370_Async(pokemon,pokemon,gSplashDmgValue,0,0,0,DUNGEON_EXIT_FAINTED_FROM_DAMAGE_BOUNCING,RESIDUAL_DAMAGE_REGULAR,0,0);
if ((IsFloorOver() == 0) && (EntityIsValid(pokemon))) goto _0805A9FE;
}
}
@ -653,7 +653,7 @@ _0805AA5E:
sub_807EC28(FALSE);
}
sub_806A5B8(target);
TryTriggerMonsterHouseWithMsg(target,gDungeon->forceMonsterHouse);
TryTriggerMonsterHouseWithMsg_Async(target,gDungeon->forceMonsterHouse);
}
}
return TRUE;
@ -679,7 +679,7 @@ bool8 BellyDrumMoveAction(Entity * pokemon,Entity * target, Move *move, s32 item
}
else {
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],pokemon,0);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC5CC);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC5CC);
}
return flag;
}
@ -799,7 +799,7 @@ bool8 BeatUpMoveAction(Entity * pokemon, Entity * target, Move *move, s32 itemId
}
if (!flag) {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_81004EC);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_81004EC);
}
return flag;
}
@ -849,7 +849,7 @@ bool8 PresentMoveAction(Entity * pokemon, Entity * target, Move *move, s32 itemI
s32 rand1 = DungeonRandInt(100);
s32 rand2 = rand1;
if (rand1 < 10) {
flag = (sub_8055864(pokemon,target,move,0x78,itemId) != 0);
flag = (sub_8055864_Async(pokemon,target,move,0x78,itemId) != 0);
return flag;
}
else {
@ -859,11 +859,11 @@ bool8 PresentMoveAction(Entity * pokemon, Entity * target, Move *move, s32 itemI
return TRUE;
}
else if (rand2 >= 60) {
flag = (sub_8055864(pokemon,target,move,0x28,itemId) != 0);
flag = (sub_8055864_Async(pokemon,target,move,0x28,itemId) != 0);
return flag;
}
else {
flag = (sub_8055864(pokemon,target,move,0x50,itemId) != 0);
flag = (sub_8055864_Async(pokemon,target,move,0x50,itemId) != 0);
return flag;
}
}
@ -905,7 +905,7 @@ bool8 GlareMoveAction(Entity * pokemon,Entity * target,Move *move,s32 itemId)
bool8 TransformMoveAction(Entity * pokemon, Entity * target, Move *move, s32 itemId)
{
if (IsFloorwideFixedRoom()) {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FEFF4);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FEFF4);
return FALSE;
}
else {
@ -944,7 +944,7 @@ bool8 HandleColorChange(Entity * pokemon, Entity * target, Move *move, s32 itemI
entityInfo = GetEntInfo(target);
newType = gDungeonCamouflageTypes[gDungeon->tileset];
if (AbilityIsActive(target, ABILITY_FORECAST)) {
TryDisplayDungeonLoggableMessage3(pokemon,target,gPtrForecastPreventsTypeSwitchMessage);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gPtrForecastPreventsTypeSwitchMessage);
return FALSE;
}
else {
@ -954,7 +954,7 @@ bool8 HandleColorChange(Entity * pokemon, Entity * target, Move *move, s32 itemI
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1],target,0);
typeString = GetUnformattedTypeString(newType);
strcpy(gFormatBuffer_Items[0], typeString);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FEB08);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FEB08);
return TRUE;
}
}
@ -1020,7 +1020,7 @@ bool8 SpikesMoveAction(Entity * pokemon, Entity * target, Move *move, s32 itemId
}
else
{
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC5A8); // A trap can't be laid here!
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC5A8); // A trap can't be laid here!
}
UpdateTrapsVisibility();
return trapLaid;
@ -1045,7 +1045,7 @@ bool8 MagnitudeMoveAction(Entity * pokemon, Entity * target, Move *move, s32 ite
if (entityInfo->bideClassStatus.status == STATUS_DIGGING) {
magnitudeDmgVal *= 2;
}
r6 = sub_8055864(pokemon,target,move,magnitudeDmgVal,itemId) ? TRUE : FALSE;
r6 = sub_8055864_Async(pokemon,target,move,magnitudeDmgVal,itemId) ? TRUE : FALSE;
return r6;
}

View File

@ -164,11 +164,11 @@ bool8 MimicMoveAction(Entity * pokemon, Entity * target, Move *move, s32 itemId)
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],pokemon,0);
if (moveCounter != 0) {
SetExpMultplier(entityInfo);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FDCE4);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FDCE4);
mimicSuccess = TRUE;
}
else {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FDD00);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FDD00);
}
return mimicSuccess;
}
@ -187,7 +187,7 @@ bool8 FrustrationMoveAction(Entity * pokemon, Entity * target, Move *move, s32 i
}
}
sub_806F370(pokemon,target,dmg,1,&local_24,GetMoveType(move),GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,1,0);
sub_806F370_Async(pokemon,target,dmg,1,&local_24,GetMoveType(move),GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,1,0);
local_24 = (local_24 == 0);
return local_24;
}
@ -233,7 +233,7 @@ bool8 DreamEaterMoveAction(Entity * pokemon, Entity * target, Move *move, s32 it
SetExpMultplier(GetEntInfo(pokemon));
if (RollSecondaryEffect(pokemon,0) != 0) {
if (hasLiquidOoze) {
DealDamageToEntity(pokemon,newHP,RESIDUAL_DAMAGE_LIQUID_OOZE,DUNGEON_EXIT_FAINTED_COVERED_IN_SLUDGE);
DealDamageToEntity_Async(pokemon,newHP,RESIDUAL_DAMAGE_LIQUID_OOZE,DUNGEON_EXIT_FAINTED_COVERED_IN_SLUDGE);
}
else {
HealTargetHP(pokemon,pokemon,newHP,0,TRUE);
@ -243,7 +243,7 @@ bool8 DreamEaterMoveAction(Entity * pokemon, Entity * target, Move *move, s32 it
}
}
else {
TryDisplayDungeonLoggableMessage3(pokemon,target,gPtrSleepingTargetOnlyMessage);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gPtrSleepingTargetOnlyMessage);
}
return flag;
}
@ -279,10 +279,10 @@ bool8 RecycleMoveAction(Entity * pokemon, Entity * target, Move *move, s32 itemI
}
if (isTMRecycled) {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FDC9C); // The Used TM was recharged!
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FDC9C); // The Used TM was recharged!
}
else {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FDCA0); // But nothing happened!
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FDCA0); // But nothing happened!
}
return isTMRecycled;
}
@ -298,7 +298,7 @@ bool8 DragonRageMoveAction(Entity * pokemon, Entity * target, Move *move, s32 it
u8 local_20;
local_20 = 0;
sub_806F370(pokemon,target,gDragonRageDmgValue,1,&local_20,GetMoveType(move),GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,1,0);
sub_806F370_Async(pokemon,target,gDragonRageDmgValue,1,&local_20,GetMoveType(move),GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,1,0);
local_20 = (local_20 == 0);
return local_20;
}
@ -358,7 +358,7 @@ bool8 StruggleMoveAction(Entity * pokemon, Entity * target, Move * move, s32 ite
if (newHP < 1) {
newHP = 1;
}
sub_806F370(pokemon, pokemon, newHP, 0, 0, 0, GetDungeonExitReasonFromMoveOrItem(move, itemId), RESIDUAL_DAMAGE_REGULAR, 1, 0);
sub_806F370_Async(pokemon, pokemon, newHP, 0, 0, 0, GetDungeonExitReasonFromMoveOrItem(move, itemId), RESIDUAL_DAMAGE_REGULAR, 1, 0);
}
}
return flag;
@ -371,14 +371,14 @@ bool8 RockSmashMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemI
bool8 flag = FALSE;
if (sub_8069D18(&pos, target)) {
TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FD430); // Can't use that diagonally!
TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80FD430); // Can't use that diagonally!
}
else {
flag = sub_804AD34(&pos);
if (flag)
TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FD3F0); // It dug the wall in front!
TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80FD3F0); // It dug the wall in front!
else
TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FD40C); // Can't use that here!
TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80FD40C); // Can't use that here!
}
return flag;
@ -414,18 +414,18 @@ bool8 ThiefAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
return TRUE;
}
else if (HasHeldItem(target, ITEM_ALERT_SPECS)) {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FD574); // $m1 was protected by its Specs!
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FD574); // $m1 was protected by its Specs!
return TRUE;
}
else {
pokeItem = &pokemonInfo1->heldItem;
targetItem = &targetInfo1->heldItem;
if ((pokeItem->flags & ITEM_FLAG_EXISTS) != 0) {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC654); // $m0 has an item already!
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC654); // $m0 has an item already!
return TRUE;
}
else if ((targetItem->flags & ITEM_FLAG_EXISTS) == 0) {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC678); // $m1 doesn't have anything
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC678); // $m1 doesn't have anything
return TRUE;
}
else {
@ -434,7 +434,7 @@ bool8 ThiefAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
sub_806A6E8(pokemon);
sub_806A6E8(target);
SetExpMultplier(pokemonInfo2);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC614); // Got $m1's item!
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC614); // Got $m1's item!
}
}
}
@ -491,10 +491,10 @@ bool8 CleanseOrbAction(Entity * pokemon, Entity * target, Move *move, s32 itemId
}
if (isItemCleaned) {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC8F0);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC8F0);
}
else {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC920);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC920);
}
return isItemCleaned;
}
@ -521,12 +521,12 @@ bool8 TwoEdgeMoveAction(Entity * pokemon, Entity * target, Move *move, s32 itemI
if (targetHP < 0) {
targetHP = 0;
}
sub_806F370(pokemon,target,targetHP,0,&local_28,0,GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,0,0);
sub_806F370_Async(pokemon,target,targetHP,0,&local_28,0,GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,0,0);
pokeHP = entityInfo->HP / 2;
if (pokeHP < 0) {
pokeHP = 0;
}
sub_806F370(pokemon,pokemon,pokeHP,0,&local_27,0,GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,0,0);
sub_806F370_Async(pokemon,pokemon,pokeHP,0,&local_27,0,GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,0,0);
local_28 = (local_28 == 0);
local_27 = (local_27 == 0);
@ -571,7 +571,7 @@ bool8 TransferOrbAction(Entity *pokemon, Entity * target, Move *move, s32 itemId
oldID = entityInfo->id;
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
if (entityInfo->monsterBehavior != BEHAVIOR_FIXED_ENEMY) {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FD450);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FD450);
return FALSE;
}
else
@ -583,11 +583,11 @@ bool8 TransferOrbAction(Entity *pokemon, Entity * target, Move *move, s32 itemId
}
}
if ((r6 == 0x1e) || (entityInfo->id == targetID)) {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FD450);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FD450);
}
else {
CopyCyanMonsterNametoBuffer(gFormatBuffer_Monsters[1], targetID);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FD434);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FD434);
UpdateEntitySpecies(target, targetID);
didTransfer = TRUE;
}
@ -595,7 +595,7 @@ bool8 TransferOrbAction(Entity *pokemon, Entity * target, Move *move, s32 itemId
}
else {
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FD450);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FD450);
}
return didTransfer;
}
@ -634,10 +634,10 @@ bool8 EscapeOrbAction(Entity * pokemon, Entity * target, Move *move, s32 itemId)
{
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],pokemon,0);
if (gDungeon->unk644.stoleFromKecleon != 0) {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FD4DC); // $m0 can't escape!
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FD4DC); // $m0 can't escape!
}
else {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FD4C4); // $m0 escaped!
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FD4C4); // $m0 escaped!
gDungeon->unk4 = 1;
gDungeon->unk11 = 1;
}
@ -663,7 +663,7 @@ bool8 TrapbustOrbAction(Entity * pokemon,Entity * target, Move *move, s32 itemId
bool8 foundTrap = FALSE;
tile = GetTileAtEntitySafe(target);
if (IsFloorwideFixedRoom()) {
LogMessageByIdWithPopupCheckUser(pokemon,gUnknown_80FD1EC);
LogMessageByIdWithPopupCheckUser_Async(pokemon,gUnknown_80FD1EC);
return FALSE;
}
else
@ -695,12 +695,12 @@ bool8 TrapbustOrbAction(Entity * pokemon,Entity * target, Move *move, s32 itemId
}
}
if (foundTrap) {
TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FD1B0);
TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80FD1B0);
UpdateMinimap();
UpdateTrapsVisibility();
}
else {
TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FD1CC);
TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80FD1CC);
}
}
return foundTrap;
@ -732,7 +732,7 @@ bool8 RollcallOrbAction(Entity * pokemon, Entity *target, Move *move, s32 itemId
}
}
if (!foundTarget) {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_81004F0);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_81004F0);
}
return foundTarget;
}
@ -748,7 +748,7 @@ bool8 OneShotOrbAction(Entity * pokemon, Entity * target, Move *move, s32 itemId
u8 local_20;
local_20 = 0;
sub_806F370(pokemon,target,9999,1,&local_20,GetMoveType(move),GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,1,0);
sub_806F370_Async(pokemon,target,9999,1,&local_20,GetMoveType(move),GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,1,0);
local_20 = (local_20 == 0);
return local_20;
}
@ -763,13 +763,13 @@ bool8 VacuumCutMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemI
{
bool8 flag;
flag = sub_8055864(pokemon, target, move, gVacuumCutDmgValue, itemId) != 0 ? TRUE : FALSE;
flag = sub_8055864_Async(pokemon, target, move, gVacuumCutDmgValue, itemId) != 0 ? TRUE : FALSE;
return flag;
}
bool8 ReviverOrbAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FD454);
TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80FD454);
return FALSE;
}
@ -786,7 +786,7 @@ bool8 sub_805C208(Entity *pokemon, Entity *target, Move *move, u32 itemId)
local_24 = 0;
targetSize = GetSize(GetEntInfo(target)->apparentID);
sub_806F370(pokemon,target,targetSize,1,&local_24,GetMoveType(move),GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,1,0);
sub_806F370_Async(pokemon,target,targetSize,1,&local_24,GetMoveType(move),GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,1,0);
local_24 = local_24 == 0;
return local_24;

View File

@ -31,7 +31,7 @@ bool8 FillInOrbAction(Entity *pokemon,Entity *target, Move *move, s32 itemId)
filledInTile = FALSE;
targetInfo = GetEntInfo(target);
if (IsFloorwideFixedRoom()) {
LogMessageByIdWithPopupCheckUser(pokemon,gUnknown_80FD0B8);
LogMessageByIdWithPopupCheckUser_Async(pokemon,gUnknown_80FD0B8);
return FALSE;
}
else
@ -58,10 +58,10 @@ bool8 FillInOrbAction(Entity *pokemon,Entity *target, Move *move, s32 itemId)
if (filledInTile) {
sub_8042A64(&tileCoords);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FD0B4);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FD0B4);
}
else {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FD0B8);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FD0B8);
}
UpdateMinimap();
UpdateTrapsVisibility();
@ -84,7 +84,7 @@ bool8 ItemizeOrbAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
if(GetEntInfo(target)->monsterBehavior != BEHAVIOR_FIXED_ENEMY)
{
TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FF678);
TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80FF678);
return FALSE;
}
else
@ -92,7 +92,7 @@ bool8 ItemizeOrbAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
target->isVisible = FALSE;
CreateItemWithStickyChance(&stack, GetRandomFloorItem(0), 0);
SpawnDroppedItemWrapper(pokemon, &posStruct, &stack);
HandleFaint(target, DUNGEON_EXIT_TRANSFORMED_INTO_ITEM, pokemon);
HandleFaint_Async(target, DUNGEON_EXIT_TRANSFORMED_INTO_ITEM, pokemon);
return TRUE;
}
}

View File

@ -75,11 +75,11 @@ void SleepStatusTarget(Entity * pokemon, Entity * target, s32 turns, u8 displayM
sleep = GetEntInfo(target)->sleepClassStatus.status;
if (sleep == STATUS_SLEEPLESS) {
if (displayMessage)
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB380);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB380);
}
else if (sleep == STATUS_NAPPING) {
if (displayMessage)
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB384);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB384);
}
else {
sub_8041AF4(target);
@ -87,11 +87,11 @@ void SleepStatusTarget(Entity * pokemon, Entity * target, s32 turns, u8 displayM
sub_806CE68(target,8);
if (cVar2 == 1)
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB338);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB338);
else if (cVar2 == 2)
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB35C);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB35C);
else
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB318);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB318);
}
}
}
@ -105,25 +105,25 @@ bool8 CannotSleep(Entity * pokemon, Entity * target, u8 param_3, bool8 displayMe
}
else if (IqSkillIsEnabled(target, IQ_NONSLEEPER)) {
if (displayMessage) {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FCD54);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FCD54);
}
return TRUE;
}
else if (AbilityIsActive(target, ABILITY_INSOMNIA)) {
if (displayMessage) {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FCD58);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FCD58);
}
return TRUE;
}
else if (AbilityIsActive(target, ABILITY_VITAL_SPIRIT)) {
if (displayMessage) {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FCD88);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FCD88);
}
return TRUE;
}
else if (HasHeldItem(target, ITEM_INSOMNISCOPE)) {
if (displayMessage) {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FD548);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FD548);
}
return TRUE;
}
@ -153,15 +153,15 @@ void NightmareStatusTarget(Entity * pokemon, Entity * target, s32 turns)
entityInfo->sleepClassStatus.status = STATUS_NIGHTMARE;
sub_806CE68(target,8);
if (hasNightmare) {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB3CC);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB3CC);
}
else {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB3A4);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB3A4);
}
}
else
{
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB3D0);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB3D0);
}
UpdateStatusIconFlags(target);
}
@ -190,15 +190,15 @@ void NappingStatusTarget(Entity * pokemon, Entity * target, s32 turns)
entityInfo->sleepClassStatus.status = STATUS_NAPPING;
sub_806CE68(target, 8);
if (isSleeping) {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB360);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB360);
}
else {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB31C);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB31C);
}
}
else
{
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB388);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB388);
}
UpdateStatusIconFlags(target);
}
@ -217,19 +217,19 @@ void YawnedStatusTarget(Entity * pokemon, Entity * target, s32 turns)
entityInfo->sleepClassStatus.turns = turns;
nullsub_91(target);
sub_806CE68(target, 8);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB3E0);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB3E0);
}
else if (((entityInfo->sleepClassStatus.status == STATUS_SLEEP) || (entityInfo->sleepClassStatus.status == STATUS_NIGHTMARE)) || (entityInfo->sleepClassStatus.status == STATUS_NAPPING)) {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB418);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB418);
}
else if (entityInfo->sleepClassStatus.status == STATUS_SLEEPLESS) {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB3F8);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB3F8);
}
else {
if (entityInfo->sleepClassStatus.status == STATUS_YAWNING)
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB414);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB414);
else
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB3E0);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB3E0);
}
UpdateStatusIconFlags(target);
}
@ -259,12 +259,12 @@ void SleeplessStatusTarget(Entity * pokemon, Entity * target)
sub_8041EE8(target);
sub_806CE68(target,8);
if(isAsleep)
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB41C);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB458);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB41C);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB458);
}
else
{
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB43C);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB43C);
}
UpdateStatusIconFlags(target);
}
@ -286,19 +286,19 @@ void PausedStatusTarget(Entity * pokemon, Entity * target, u8 param_3, s32 turns
entityInfo->cringeClassStatus.turns = turns + 1;
nullsub_72(target);
if (turns == 1) {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB480);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB480);
}
else {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB4D4);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB4D4);
}
}
else {
if (turns == 1) {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB4B0);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB4B0);
}
else
{
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB4F0);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB4F0);
}
}
UpdateStatusIconFlags(target);
@ -315,7 +315,7 @@ void InfatuateStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessa
if (AbilityIsActive(target,ABILITY_OBLIVIOUS)) {
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
if (displayMessage) {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FCC4C);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FCC4C);
}
}
else
@ -325,10 +325,10 @@ void InfatuateStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessa
entityInfo->cringeClassStatus.status = STATUS_INFATUATED;
entityInfo->cringeClassStatus.turns = CalculateStatusTurns(target,gInfatuatedTurnRange,TRUE) + 1;
sub_8041EF8(target);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB50C);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB50C);
}
else {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB52C);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB52C);
}
UpdateStatusIconFlags(target);
}
@ -355,13 +355,13 @@ void BurnedStatusTarget(Entity * pokemon, Entity * target, u8 param_3, bool8 dis
SetMessageArgument_2(gFormatBuffer_Monsters[0],entityInfo,0);
if (AbilityIsActive(target, ABILITY_WATER_VEIL)) {
if (displayMessage)
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FCE5C);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FCE5C);
}
else
{
if (MonsterIsType(target, TYPE_FIRE)) {
if (displayMessage)
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FCE84);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FCE84);
}
else
{
@ -369,7 +369,7 @@ void BurnedStatusTarget(Entity * pokemon, Entity * target, u8 param_3, bool8 dis
if (((tile_1->terrainFlags & (TERRAIN_TYPE_SECONDARY | TERRAIN_TYPE_NORMAL)) == TERRAIN_TYPE_SECONDARY) &&
(gDungeonWaterType[gDungeon->tileset] != DUNGEON_WATER_TYPE_LAVA)) {
if (displayMessage)
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FEBBC);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FEBBC);
}
else
{
@ -383,10 +383,10 @@ void BurnedStatusTarget(Entity * pokemon, Entity * target, u8 param_3, bool8 dis
if (param_3 != 0) {
sub_8041C34(target);
}
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB548);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB548);
}
else {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB564);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB564);
}
UpdateStatusIconFlags(target);
@ -410,7 +410,7 @@ void BurnedStatusTarget(Entity * pokemon, Entity * target, u8 param_3, bool8 dis
if (!hasSynchronized) {
hasSynchronized = TRUE;
SetMessageArgument_2(gFormatBuffer_Monsters[0],entityInfo,0);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FF01C);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FF01C);
}
if (GetTreatmentBetweenMonstersIgnoreStatus(target,entity) == TREATMENT_TREAT_AS_ENEMY) {
// Recurse with the new target
@ -442,19 +442,19 @@ void PoisonedStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessag
SetMessageArgument_2(gFormatBuffer_Monsters[0],entityInfo,0);
if (HasHeldItem(target, ITEM_PECHA_SCARF)) {
if (displayMessage)
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FD524);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FD524);
}
else
{
if (AbilityIsActive(target, ABILITY_IMMUNITY)) {
if (displayMessage)
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FCEB0);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FCEB0);
}
else
{
if(MonsterIsType(target, TYPE_POISON) || MonsterIsType(target, TYPE_STEEL)){
if (displayMessage)
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FCEDC);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FCEDC);
}
else
{
@ -470,17 +470,17 @@ void PoisonedStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessag
entityInfo->burnClassStatus.badlyPoisonedDamageCount = 0;
isNotPoisoned = FALSE;
sub_8041C6C(target);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB598);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB598);
sub_806CE94(target, 8);
}
else
{
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB5D4);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB5D4);
}
}
else
{
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB5F8);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB5F8);
}
if ((AbilityIsActive(target, ABILITY_SYNCHRONIZE)) && !isNotPoisoned)
@ -497,7 +497,7 @@ void PoisonedStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessag
if (!hasSynchronized) {
hasSynchronized = TRUE;
SetMessageArgument_2(gFormatBuffer_Monsters[0],entityInfo,0);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FF01C);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FF01C);
}
if (GetTreatmentBetweenMonstersIgnoreStatus(target,entity) == TREATMENT_TREAT_AS_ENEMY) {
// Recurse with the new target
@ -531,19 +531,19 @@ void BadlyPoisonedStatusTarget(Entity * pokemon, Entity * target, bool8 displayM
SetMessageArgument_2(gFormatBuffer_Monsters[0],entityInfo,0);
if (HasHeldItem(target, ITEM_PECHA_SCARF)) {
if (displayMessage)
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FD524);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FD524);
}
else
{
if (AbilityIsActive(target, ABILITY_IMMUNITY)) {
if (displayMessage)
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FCEB0);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FCEB0);
}
else
{
if(MonsterIsType(target, TYPE_POISON) || MonsterIsType(target, TYPE_STEEL)){
if (displayMessage)
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FCEDC);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FCEDC);
}
else
{
@ -557,12 +557,12 @@ void BadlyPoisonedStatusTarget(Entity * pokemon, Entity * target, bool8 displayM
entityInfo->burnClassStatus.badlyPoisonedDamageCount = 0;
isNotBadlyPoisoned = FALSE;
sub_8041C7C(target);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB5B4);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB5B4);
sub_806CE94(target, 8);
}
else
{
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB5F8);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB5F8);
}
if ((AbilityIsActive(target, ABILITY_SYNCHRONIZE)) && !isNotBadlyPoisoned)
@ -579,7 +579,7 @@ void BadlyPoisonedStatusTarget(Entity * pokemon, Entity * target, bool8 displayM
if (!hasSynchronized) {
hasSynchronized = TRUE;
SetMessageArgument_2(gFormatBuffer_Monsters[0],entityInfo,0);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FF01C);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FF01C);
}
if (GetTreatmentBetweenMonstersIgnoreStatus(target,entity) == TREATMENT_TREAT_AS_ENEMY) {
// Recurse with the new target
@ -610,13 +610,13 @@ void FrozenStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessage)
if ((entityInfo->frozenClassStatus.status != STATUS_FROZEN) && !SafeguardIsActive(pokemon,target,displayMessage)) {
if (AbilityIsActive(target, ABILITY_MAGMA_ARMOR)) {
if (displayMessage)
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FCDE0);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FCDE0);
}
else
{
if (MonsterIsType(target, TYPE_ICE)) {
if (displayMessage)
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FCE00);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FCE00);
}
else
{
@ -624,7 +624,7 @@ void FrozenStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessage)
if (((tile->terrainFlags & (TERRAIN_TYPE_SECONDARY | TERRAIN_TYPE_NORMAL)) == TERRAIN_TYPE_SECONDARY) &&
(gDungeonWaterType[gDungeon->tileset] == DUNGEON_WATER_TYPE_LAVA)) {
if (displayMessage)
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FCE34);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FCE34);
}
else
{
@ -635,7 +635,7 @@ void FrozenStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessage)
entityInfo->frozenClassStatus.status = STATUS_FROZEN;
entityInfo->frozenClassStatus.turns = CalculateStatusTurns(target,gFreezeTurnRange,TRUE) + 1;
entityInfo->frozenClassStatus.damageCountdown = 0;
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB610);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB610);
UpdateStatusIconFlags(target);
}
}
@ -656,7 +656,7 @@ void SqueezedStatusTarget(Entity * pokemon, Entity * target, s32 param_3, bool32
}
else if (entityInfo->frozenClassStatus.status == STATUS_INGRAIN) {
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FA844);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FA844);
}
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
if (entityInfo->frozenClassStatus.status != STATUS_CONSTRICTION) {
@ -665,11 +665,11 @@ void SqueezedStatusTarget(Entity * pokemon, Entity * target, s32 param_3, bool32
entityInfo->frozenClassStatus.damageCountdown = 0;
entityInfo->frozenClassStatus.unk4 = param_3_s32;
nullsub_71(target);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB628);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB628);
sub_806CE94(target,8);
}
else {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB64C);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB64C);
}
UpdateStatusIconFlags(target);
}
@ -686,7 +686,7 @@ void ImmobilizedStatusTarget(Entity * pokemon, Entity * target)
}
else if (entityInfo->frozenClassStatus.status == STATUS_INGRAIN) {
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FA844);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FA844);
}
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
if (entityInfo->frozenClassStatus.status != STATUS_SHADOW_HOLD) {
@ -694,11 +694,11 @@ void ImmobilizedStatusTarget(Entity * pokemon, Entity * target)
entityInfo->frozenClassStatus.turns = CalculateStatusTurns(target,gShadowHoldTurnRange,TRUE) + 1;
entityInfo->frozenClassStatus.damageCountdown = 0;
nullsub_70(target);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB668);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB668);
sub_806CE94(target,8);
}
else {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB688);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB688);
}
UpdateStatusIconFlags(target);
}
@ -719,10 +719,10 @@ void IngrainedStatusTarget(Entity * pokemon, Entity * target)
entityInfo->frozenClassStatus.turns = CalculateStatusTurns(target,gIngrainTurnRange,TRUE) + 1;
entityInfo->frozenClassStatus.damageCountdown = 0;
nullsub_90(target);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB6A4);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB6A4);
}
else {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB6C0);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB6C0);
}
UpdateStatusIconFlags(target);
}
@ -756,25 +756,25 @@ void WrapTarget(Entity *pokemon, Entity *target)
gDungeon->unk37F4++;
nullsub_69(pokemon, target);
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB6D8);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB6D8);
sub_806CE94(target,8);
}
else {
if (pokemonEntityData->frozenClassStatus.status == STATUS_WRAP) {
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],pokemon,0);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB6FC);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB6FC);
}
if (targetEntityInfo->frozenClassStatus.status == STATUS_WRAP) {
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB6FC);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB6FC);
}
if (pokemonEntityData->frozenClassStatus.status == STATUS_WRAPPED) {
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],pokemon,0);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB718);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB718);
}
if (targetEntityInfo->frozenClassStatus.status == STATUS_WRAPPED) {
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB718);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB718);
}
}
@ -826,11 +826,11 @@ void PetrifiedStatusTarget(Entity * pokemon, Entity * target)
targetEntityInfo->frozenClassStatus.turns = CalculateStatusTurns(target,gPetrifiedTurnRange,TRUE) + 1;
}
targetEntityInfo->frozenClassStatus.damageCountdown = 0;
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB7BC);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB7BC);
}
else {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB7DC);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB7DC);
}
if (targetEntityInfo->isNotTeamMember) {
for(index = 0; index < MAX_TEAM_MEMBERS; index++)
@ -872,13 +872,13 @@ void LowerOffensiveStat(Entity *user, Entity *target, StatIndex stat, s32 nStage
if (HasHeldItem(target, ITEM_TWIST_BAND)) {
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FD550);
TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FD550);
return;
}
if (AbilityIsActive(target, ABILITY_HYPER_CUTTER) && stat.id == STAT_INDEX_PHYSICAL) {
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FCA60);
TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FCA60);
return;
}
}
@ -901,10 +901,10 @@ void LowerOffensiveStat(Entity *user, Entity *target, StatIndex stat, s32 nStage
if (entityInfo->offensiveStages[stat.id] != newStage) {
entityInfo->offensiveStages[stat.id] = newStage;
TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FC15C);
TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FC15C);
}
else {
TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FC274);
TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FC274);
}
UpdateStatusIconFlags(target);
@ -948,10 +948,10 @@ void LowerDefensiveStat(Entity *user, Entity *target, StatIndex stat, s32 nStage
if (entityInfo->defensiveStages[stat.id] != newStage) {
entityInfo->defensiveStages[stat.id] = newStage;
TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FC158);
TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FC158);
}
else {
TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FC248);
TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FC248);
}
UpdateStatusIconFlags(target);
@ -990,10 +990,10 @@ void BoostOffensiveStat(Entity *user, Entity *target, StatIndex stat, s32 nStage
if (entityInfo->offensiveStages[stat.id] != newStage) {
entityInfo->offensiveStages[stat.id] = newStage;
TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FC13C);
TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FC13C);
}
else {
TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FC270);
TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FC270);
}
UpdateStatusIconFlags(target);
}
@ -1031,10 +1031,10 @@ void BoostDefensiveStat(Entity *user, Entity *target, StatIndex stat, s32 nStage
if (entityInfo->defensiveStages[stat.id] != newStage) {
entityInfo->defensiveStages[stat.id] = newStage;
TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FC138);
TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FC138);
}
else {
TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FC21C);
TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FC21C);
}
UpdateStatusIconFlags(target);
}
@ -1092,7 +1092,7 @@ void ApplyOffensiveStatMultiplier(Entity *user, Entity *target, StatIndex stat,
if (HasHeldItem(target,ITEM_TWIST_BAND) && F248LessThanInt(multiplier, 1)) {
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FD550);
TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FD550);
return;
}
@ -1102,7 +1102,7 @@ void ApplyOffensiveStatMultiplier(Entity *user, Entity *target, StatIndex stat,
{
if (displayMessage) {
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FCA60);
TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FCA60);
}
return;
}
@ -1128,13 +1128,13 @@ void ApplyOffensiveStatMultiplier(Entity *user, Entity *target, StatIndex stat,
}
if (F248GreaterThan(oldMulti, entityInfo->offensiveMultipliers[stat.id])) {
TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FC11C);
TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FC11C);
}
else if (F248LessThan(oldMulti, entityInfo->offensiveMultipliers[stat.id])) {
TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FC118);
TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FC118);
}
else {
TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FC184);
TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FC184);
}
UpdateStatusIconFlags(target);
}
@ -1179,13 +1179,13 @@ void ApplyDefensiveStatMultiplier(Entity *user, Entity *target, StatIndex stat,
}
if (F248GreaterThan(oldMulti, entityInfo->defensiveMultipliers[stat.id])) {
TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FC114);
TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FC114);
}
else if (F248LessThan(oldMulti, entityInfo->defensiveMultipliers[stat.id])) {
TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FC0FC);
TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FC0FC);
}
else {
TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FC180);
TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FC180);
}
UpdateStatusIconFlags(target);
}
@ -1209,10 +1209,10 @@ void BoostHitChanceStat(Entity *user, Entity *target, StatIndex stat)
if (entityInfo->hitChanceStages[stat.id] < MAX_STAT_STAGE) {
entityInfo->hitChanceStages[stat.id]++;
TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FC1C4);
TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FC1C4);
}
else {
TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FC218);
TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FC218);
}
UpdateStatusIconFlags(target);
}
@ -1237,7 +1237,7 @@ void LowerHitChanceStat(Entity *user, Entity *target, StatIndex stat, bool8 disp
if (AbilityIsActive(target, ABILITY_KEEN_EYE) && stat.id == STAT_INDEX_ACCURACY) {
if (displayMessage) {
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FCA64);
TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FCA64);
}
return;
}
@ -1247,10 +1247,10 @@ void LowerHitChanceStat(Entity *user, Entity *target, StatIndex stat, bool8 disp
PlayHitChanceDownEffect(target,stat.id);
if (entityInfo->hitChanceStages[stat.id] != 0) {
entityInfo->hitChanceStages[stat.id]--;
TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FC1A4);
TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FC1A4);
}
else {
TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FC1F0);
TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FC1F0);
}
UpdateStatusIconFlags(target);
}
@ -1268,7 +1268,7 @@ void TryInflictCringeStatus(Entity *user ,Entity *target, bool8 displayMessage)
if (AbilityIsActive(target, ABILITY_INNER_FOCUS)){
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
if (displayMessage)
TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FCC18);
TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FCC18);
return;
}
@ -1278,10 +1278,10 @@ void TryInflictCringeStatus(Entity *user ,Entity *target, bool8 displayMessage)
entityInfo->cringeClassStatus.status = STATUS_CRINGE;
entityInfo->cringeClassStatus.turns = CalculateStatusTurns(target, gCringeTurnRange, TRUE) + 1;
PlayCringeExclamationPointEffect(target);
TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FB2E0);
TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FB2E0);
}
else {
TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FB300);
TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FB300);
}
UpdateStatusIconFlags(target);
}
@ -1300,7 +1300,7 @@ void TryInflictParalysisStatus(Entity *user, Entity *target, bool8 displayMessag
if (AbilityIsActive(target, ABILITY_LIMBER)) {
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
if (displayMessage) {
TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FCBF8);
TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FCBF8);
}
return;
}
@ -1314,12 +1314,12 @@ void TryInflictParalysisStatus(Entity *user, Entity *target, bool8 displayMessag
entityInfo->burnClassStatus.damageCountdown = 0;
entityInfo->burnClassStatus.badlyPoisonedDamageCount = 0;
alreadyParalyzed = FALSE;
TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FB2AC);
TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FB2AC);
PlayParalysisEffect(target);
CalcSpeedStage(target);
}
else {
TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FB2CC);
TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FB2CC);
}
if (AbilityIsActive(target, ABILITY_SYNCHRONIZE) && !alreadyParalyzed) {
@ -1333,7 +1333,7 @@ void TryInflictParalysisStatus(Entity *user, Entity *target, bool8 displayMessag
if (!synchronizePrinted) {
synchronizePrinted = TRUE;
SetMessageArgument_2(gFormatBuffer_Monsters[0],entityInfo,0);
TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FF01C);
TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FF01C);
}
if (GetTreatmentBetweenMonstersIgnoreStatus(target,mapMonster) == TREATMENT_TREAT_AS_ENEMY) {
TryInflictParalysisStatus(user, mapMonster, displayMessage);
@ -1364,7 +1364,7 @@ void BoostSpeed(Entity *user, Entity *target, s32 turns, bool8 displayMessage)
speedBefore = CalcSpeedStage(target);
if (speedBefore == MAX_SPEED_STAGE) {
if (displayMessage)
TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FC2B8);
TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FC2B8);
}
else {
for (i = 0; i < NUM_SPEED_COUNTERS; i++) {
@ -1376,11 +1376,11 @@ void BoostSpeed(Entity *user, Entity *target, s32 turns, bool8 displayMessage)
speedAfter = CalcSpeedStage(target);
if (speedBefore == speedAfter) {
TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FC298);
TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FC298);
}
else {
PlaySpeedUpEffect(target);
TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FA124[speedAfter]);
TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FA124[speedAfter]);
entityInfo->speedStageChanged = TRUE;
entityInfo->attacking = FALSE;
}
@ -1406,7 +1406,7 @@ void LowerSpeed(Entity *user, Entity *target, s32 nStages, bool8 displayMessage)
speedBefore = CalcSpeedStage(target);
if (speedBefore == 0) {
if (displayMessage)
TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FC2D8);
TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FC2D8);
}
else {
s32 counter, i;
@ -1421,11 +1421,11 @@ void LowerSpeed(Entity *user, Entity *target, s32 nStages, bool8 displayMessage)
speedAfter = CalcSpeedStage(target);
if (speedBefore == speedAfter) {
if (displayMessage)
TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FC298);
TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FC298);
}
else {
PlaySpeedDownEffect(target);
TryDisplayDungeonLoggableMessage3(user,target,gUnknown_80FA124[speedAfter]);
TryDisplayDungeonLoggableMessage3_Async(user,target,gUnknown_80FA124[speedAfter]);
}
}

View File

@ -47,13 +47,13 @@ void ConfuseStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessage
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
if (HasHeldItem(target,ITEM_PERSIM_BAND)) {
if (displayMessage)
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FD500);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FD500);
}
else
{
if (AbilityIsActive(target, ABILITY_OWN_TEMPO)) {
if (displayMessage)
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FCDB4);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FCDB4);
}
else
{
@ -62,10 +62,10 @@ void ConfuseStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessage
if (entityInfo->cringeClassStatus.status != STATUS_CONFUSED) {
entityInfo->cringeClassStatus.status = STATUS_CONFUSED;
entityInfo->cringeClassStatus.turns = CalculateStatusTurns(target,gConfusionTurnRange,TRUE) + 1;
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB25C);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB25C);
}
else {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB27C);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB27C);
}
UpdateStatusIconFlags(target);
}
@ -83,10 +83,10 @@ void CowerStatusTarget(Entity * pokemon, Entity * target, bool8 displayMessage)
entityInfo->cringeClassStatus.status = STATUS_COWERING;
entityInfo->cringeClassStatus.turns = CalculateStatusTurns(target,gCowerTurnRange,TRUE) + 1;
sub_8041BF8(target);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB940);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB940);
}
else {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB960);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB960);
}
UpdateStatusIconFlags(target);
}
@ -138,12 +138,12 @@ void HealTargetHP(Entity *pokemon, Entity *target, s32 param_3, s32 param_4, boo
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
if ((HP == 0) && (maxHPStat == 0)) {
if (displayMessage_u8)
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB204); // $m0's HP remained unchanged
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB204); // $m0's HP remained unchanged
}
else if ((param_4 == 0) && (HP == 0))
{
if (displayMessage_u8)
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB21C); // $m0 has full HP
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB21C); // $m0 has full HP
}
else
{
@ -152,7 +152,7 @@ void HealTargetHP(Entity *pokemon, Entity *target, s32 param_3, s32 param_4, boo
if (ShouldDisplayEntity(target)) {
r8 = maxHPStat;
}
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB240); // m0$'s max HP rose by {VALUE_1}
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB240); // m0$'s max HP rose by {VALUE_1}
}
if (HP != 0) {
if (ShouldDisplayEntity(target)) {
@ -160,10 +160,10 @@ void HealTargetHP(Entity *pokemon, Entity *target, s32 param_3, s32 param_4, boo
}
if (param_3 != 0) {
if (entityInfo->maxHPStat == entityInfo->HP) {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB1E0); // $m0 was fully healed
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB1E0); // $m0 was fully healed
}
else {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB1C4); // $m0 recovered {VALUE_0} HP
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB1C4); // $m0 recovered {VALUE_0} HP
}
}
}
@ -176,14 +176,14 @@ void HandleScannerOrb(Entity* pokemon, Entity* target)
{
if (EntityIsValid(target)) {
if (GetEntInfo(target)->scanning) {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FAEF0); // Item locations are already known
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FAEF0); // Item locations are already known
}
else
{
GetEntInfo(target)->scanning = TRUE;
nullsub_75(target);
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], target, 0);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FAEA0); // Item locations became evident
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FAEA0); // Item locations became evident
UpdateCamera(0);
UpdateMinimap();
UpdateStatusIconFlags(target);
@ -196,19 +196,19 @@ void HandleStairsOrb(Entity* pokemon, Entity* target)
if (EntityIsValid(target)) {
if(GetFloorType())
{
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FAF3C);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FAF3C);
}
else
{
if (GetEntInfo(target)->stairSpotter) {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FAF1C);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FAF1C);
}
else
{
GetEntInfo(target)->stairSpotter = TRUE;
nullsub_76(target);
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FAEC8);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FAEC8);
UpdateCamera(0);
UpdateMinimap();
UpdateStatusIconFlags(target);
@ -221,14 +221,14 @@ void HandleRadarOrb(Entity* pokemon, Entity* target)
{
if (EntityIsValid(target)) {
if (GetEntInfo(target)->powerEars != 0) {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FAFD0);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FAFD0);
}
else
{
GetEntInfo(target)->powerEars = TRUE;
nullsub_77(target);
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FAFAC);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FAFAC);
UpdateCamera(0);
UpdateMinimap();
UpdateStatusIconFlags(target);
@ -247,7 +247,7 @@ void HandleLeechSeed(Entity * pokemon, Entity * target, bool8 displayMessage)
if (pokemon == target) {
pokemon = target;
if (displayMessage)
TryDisplayDungeonLoggableMessage3(pokemon,target,gPtrCantLeechSeedSelfMessage);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gPtrCantLeechSeedSelfMessage);
}
else {
if (SafeguardIsActive(pokemon,target,displayMessage)) {
@ -256,14 +256,14 @@ void HandleLeechSeed(Entity * pokemon, Entity * target, bool8 displayMessage)
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
if (MonsterIsType(target, TYPE_GRASS)) {
if (displayMessage)
TryDisplayDungeonLoggableMessage3(pokemon,target,gPtrCantLeechSeedMonMessage);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gPtrCantLeechSeedMonMessage);
}
else
{
switch(entityInfo->leechSeedClassStatus.status)
{
case STATUS_DESTINY_BOND:
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FAA8C);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FAA8C);
default:
entityInfo->leechSeedClassStatus.status = STATUS_LEECH_SEED;
entityInfo->leechSeedClassStatus.turns = CalculateStatusTurns(target, gLeechSeedTurnRange, TRUE) + 1;
@ -272,7 +272,7 @@ void HandleLeechSeed(Entity * pokemon, Entity * target, bool8 displayMessage)
entityInfo->leechSeedClassStatus.unk8 = 0xff;
break;
case STATUS_LEECH_SEED:
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FAE7C);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FAE7C);
return;
}
for(index = 0; index < DUNGEON_MAX_POKEMON; index++)
@ -283,7 +283,7 @@ void HandleLeechSeed(Entity * pokemon, Entity * target, bool8 displayMessage)
entityInfo->leechSeedClassStatus.unk4 = entityInfo2->dungeonSpriteId;
}
}
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FAE58);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FAE58);
UpdateStatusIconFlags(target);
}
}
@ -328,7 +328,7 @@ void DestinyBondStatusTarget(Entity * pokemon, Entity * target)
if (entityInfo->leechSeedClassStatus.status != STATUS_DESTINY_BOND)
{
if (entityInfo->leechSeedClassStatus.status == STATUS_LEECH_SEED)
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FA79C);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FA79C);
entityInfo->leechSeedClassStatus.status = STATUS_DESTINY_BOND;
entityInfo->leechSeedClassStatus.turns = CalculateStatusTurns(target,gDestinyBondTurnRange,TRUE) + 1;
@ -338,7 +338,7 @@ void DestinyBondStatusTarget(Entity * pokemon, Entity * target)
}
else
{
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBB78);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBB78);
return;
}
for(index = 0; index < DUNGEON_MAX_POKEMON; index++)
@ -349,7 +349,7 @@ void DestinyBondStatusTarget(Entity * pokemon, Entity * target)
entityInfo->leechSeedClassStatus.unk4 = entityInfo2->dungeonSpriteId;
}
}
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBB4C);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBB4C);
UpdateStatusIconFlags(target);
}
}
@ -365,10 +365,10 @@ void SureShotStatusTarget(Entity *pokemon, Entity * target, s32 turns)
entityInfo->sureShotClassStatus.status = STATUS_SURE_SHOT;
entityInfo->sureShotClassStatus.turns = turns + 1;
sub_8041CDC(target);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB73C);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB73C);
}
else {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB764);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB764);
}
UpdateStatusIconFlags(target);
}
@ -385,10 +385,10 @@ void WhifferStatusTarget(Entity *pokemon, Entity * target, s32 turns)
entityInfo->sureShotClassStatus.status = STATUS_WHIFFER;
entityInfo->sureShotClassStatus.turns = turns + 1;
sub_8041CEC(target);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB780);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB780);
}
else {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB7A0);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB7A0);
}
UpdateStatusIconFlags(target);
}
@ -405,10 +405,10 @@ void FixedDamageStatusTarget(Entity *pokemon, Entity * target)
entityInfo->sureShotClassStatus.status = STATUS_SET_DAMAGE;
entityInfo->sureShotClassStatus.turns = CalculateStatusTurns(target, gSetDamageTurnRange, FALSE) + 1;
nullsub_79(target);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB8BC);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB8BC);
}
else {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB8E4);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB8E4);
}
UpdateStatusIconFlags(target);
}
@ -425,10 +425,10 @@ void FocusEnergyStatusTarget(Entity *pokemon, Entity * target)
entityInfo->sureShotClassStatus.status = STATUS_FOCUS_ENERGY;
entityInfo->sureShotClassStatus.turns = CalculateStatusTurns(target, gFocusEnergyTurnRange, FALSE) + 1;
nullsub_80(target);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB900);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB900);
}
else {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB924);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB924);
}
UpdateStatusIconFlags(target);
}
@ -447,7 +447,7 @@ void sub_80783C4(Entity * pokemon, Entity * target, bool8 param_3)
targetEntityInfo = GetEntInfo(target);
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
if (targetEntityInfo->curseClassStatus.status == STATUS_DECOY) {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB994);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB994);
}
else {
for(index = 0; index < DUNGEON_MAX_POKEMON; index++)
@ -471,7 +471,7 @@ void sub_80783C4(Entity * pokemon, Entity * target, bool8 param_3)
targetEntityInfo->curseClassStatus.damageCountdown = 0;
sub_806CCB4(target,sub_806CEBC(target));
gDungeon->decoyIsActive = TRUE;
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB978);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB978);
for(index = 0; index < DUNGEON_MAX_POKEMON; index++)
{
@ -520,7 +520,7 @@ void CurseStatusTarget(Entity *pokemon, Entity * target)
targetEntityInfo->curseClassStatus.damageCountdown = 0;
}
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB004);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB004);
}
else {
BoostOffensiveStat(pokemon,pokemon,gStatIndexAtkDef,1);
@ -559,7 +559,7 @@ void SnatchStatusTarget(Entity * pokemon, Entity * target)
gDungeon->snatchPokemon = target;
gDungeon->unk17B3C = targetEntityInfo->dungeonSpriteId;
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB01C);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB01C);
UpdateStatusIconFlags(target);
}
}
@ -575,10 +575,10 @@ void TauntStatusTarget(Entity * pokemon, Entity * target)
entityInfo->cringeClassStatus.status = STATUS_TAUNTED;
entityInfo->cringeClassStatus.turns = CalculateStatusTurns(target,gTauntTurnRange,TRUE) + 1;
nullsub_73(target);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB9F0);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB9F0);
}
else {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBA14);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBA14);
}
UpdateStatusIconFlags(target);
}
@ -593,13 +593,13 @@ void HandleStockpile(Entity * pokemon, Entity * target)
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
if (entityInfo->stockpileStage < MAX_STOCKPILE_STAGE) {
entityInfo->stockpileStage++;
sub_804178C(1);
sub_804178C_Async(1);
sub_8041D5C(target);
gFormatArgs[0] = entityInfo->stockpileStage;
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBA38);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBA38);
}
else {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBA60);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBA60);
}
UpdateStatusIconFlags(target);
}
@ -619,10 +619,10 @@ void InvisibleStatusTarget(Entity * pokemon, Entity * target)
targetEntityInfo->invisibleClassStatus.status = STATUS_INVISIBLE;
targetEntityInfo->invisibleClassStatus.turns = CalculateStatusTurns(target,gInvisibleTurnRange,FALSE) + 1;
sub_8041D84(target);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBA80);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBA80);
}
else {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBAA0);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBAA0);
}
UpdateStatusIconFlags(target);
}
@ -638,10 +638,10 @@ void PerishSongTarget(Entity * pokemon, Entity * target)
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
if (entityInfo->perishSongTurns == 0) {
entityInfo->perishSongTurns = CalculateStatusTurns(target,gPerishSongTurnRange,FALSE) + 1;
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBB04);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBB04);
}
else {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBB28);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBB28);
}
UpdateStatusIconFlags(target);
}
@ -662,7 +662,7 @@ void EncoreStatusTarget(Entity *pokemon,Entity *target)
}
if ((index == MAX_MON_MOVES) && ((EntityInfo->moves.struggleMoveFlags & MOVE_FLAG_LAST_USED) == 0)) {
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBBD4);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBBD4);
}
else {
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
@ -670,10 +670,10 @@ void EncoreStatusTarget(Entity *pokemon,Entity *target)
EntityInfo->cringeClassStatus.status = STATUS_ENCORE;
EntityInfo->cringeClassStatus.turns = CalculateStatusTurns(target,gEncoreTurnRange,TRUE) + 1;
nullsub_83(target);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBB94);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBB94);
}
else {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBBB8);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBBB8);
}
UpdateStatusIconFlags(target);
}
@ -699,10 +699,10 @@ void sub_8078A58(Entity *pokemon, Entity *target, s32 param_3, s32 param_4)
if (FixedPointToInt(bellyBefore) != FixedPointToInt(targetInfo->maxBelly)) {
sub_8041D9C(target);
TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FBD9C);
TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80FBD9C);
}
else
TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FBE3C);
TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80FBE3C);
}
else {
FixedPoint sp8 = IntToFixedPoint(param_3);
@ -713,10 +713,10 @@ void sub_8078A58(Entity *pokemon, Entity *target, s32 param_3, s32 param_4)
if (FixedPointToInt(bellyBefore) != FixedPointToInt(targetInfo->belly)) {
nullsub_84(target);
TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FBD78);
TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80FBD78);
}
else
TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FBE40);
TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80FBE40);
}
UpdateStatusIconFlags(target);
@ -743,7 +743,7 @@ void sub_8078B5C(Entity *pokemon, Entity *target, u32 bellyIncrement, s32 maxBel
}
targetInfo = GetEntInfo(target);
if ((!targetInfo->isTeamLeader) && (HasHeldItem(target,0x1b))) {
if (displayMessage) TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBEA0);
if (displayMessage) TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBEA0);
return;
}
bellySizeIncreased = FALSE;
@ -768,16 +768,16 @@ void sub_8078B5C(Entity *pokemon, Entity *target, u32 bellyIncrement, s32 maxBel
*bellyPtr = FixedPoint_Min(sp_0x4,sp_0x8);
targetInfo->belly = *bellyPtr;
if ((!bellySame) && (displayMessage)) {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBE64); // $m0's belly filled up full!
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBE64); // $m0's belly filled up full!
}
if (FixedPointToInt(sp_0x20) == FixedPointToInt(targetInfo->maxBelly)) {
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
if (displayMessage) TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBDF0); // $m0's belly won't get any bigger!
if (displayMessage) TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBDF0); // $m0's belly won't get any bigger!
}
else {
sub_8041DB0(target);
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
if (displayMessage) TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBDC4); // m0's max belly size increased!
if (displayMessage) TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBDC4); // m0's max belly size increased!
}
}
else {
@ -795,15 +795,15 @@ void sub_8078B5C(Entity *pokemon, Entity *target, u32 bellyIncrement, s32 maxBel
nullsub_85(target);
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
if (FixedPointToInt(oldBelly) == FixedPointToInt(*bellyPtr)) {
if (displayMessage) TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBE14); // $m0's belly didn't change!
if (displayMessage) TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBE14); // $m0's belly didn't change!
}
else {
if (FixedPointToInt(*bellyPtr) >= FixedPointToInt(*puVar8)) {
if (displayMessage) TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBE64); // $m0's belly filled up full!
if (displayMessage) TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBE64); // $m0's belly filled up full!
}
else
{
if (displayMessage) TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBE84); // $m0's belly was filled!
if (displayMessage) TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBE84); // $m0's belly was filled!
}
}
}
@ -821,11 +821,11 @@ void MuzzleTarget(Entity *pokemon, Entity *target)
entityInfo->muzzled.muzzled = TRUE;
entityInfo->muzzled.turns = CalculateStatusTurns(target,gMuzzledTurnRange, TRUE) + 1;
nullsub_86(target);
TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FBF68);
TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80FBF68);
}
else
{
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBF84);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBF84);
}
UpdateStatusIconFlags(target);
}
@ -848,13 +848,13 @@ void TransformStatusTarget(Entity * pokemon, Entity * target)
entityInfo = GetEntInfo(target);
if (entityInfo->invisibleClassStatus.status == STATUS_TRANSFORMED)
TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FBF04);
TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80FBF04);
else {
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], target, 0);
iVar5 = GetAvailableMonsToTransform(auStack544, 0);
if (iVar5 == 0)
TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FBEE4);
TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80FBEE4);
else {
sprite = NULL;
@ -871,7 +871,7 @@ void TransformStatusTarget(Entity * pokemon, Entity * target)
}
if (index == DUNGEON_MAX_POKEMON || sprite == NULL)
TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FBEE4);
TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80FBEE4);
else {
entityInfo->apparentID = apparentID;
target->axObj.spriteFile = sprite;
@ -881,7 +881,7 @@ void TransformStatusTarget(Entity * pokemon, Entity * target)
nullsub_87(target);
sub_806CCB4(target, sub_806CEBC(target));
CopyCyanMonsterNametoBuffer(gFormatBuffer_Monsters[1], entityInfo->apparentID);
TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FBEC0);
TryDisplayDungeonLoggableMessage3_Async(pokemon, target, gUnknown_80FBEC0);
UpdateStatusIconFlags(target);
}
}
@ -904,10 +904,10 @@ void MobileStatusTarget(Entity * pokemon, Entity * target)
entityInfo->invisibleClassStatus.status = STATUS_MOBILE;
entityInfo->invisibleClassStatus.turns = CalculateStatusTurns(target,gMobileTurnRange, FALSE) + 1;
nullsub_88(target);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBF28);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBF28);
}
else {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBF50);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBF50);
}
UpdateStatusIconFlags(target);
}
@ -936,11 +936,11 @@ void ExposeStatusTarget(Entity * pokemon, Entity * target, s16 param_3)
if(flag)
{
sub_8041DD8(target,param_3_s16);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC000);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC000);
flag2 = TRUE;
}
if (entityInfo->exposed) {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBFB8);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBFB8);
}
else
{
@ -948,11 +948,11 @@ void ExposeStatusTarget(Entity * pokemon, Entity * target, s16 param_3)
sub_8041DD8(target,param_3_s16_2);
}
if (!MonsterIsType(target, TYPE_GHOST)) {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBFD8);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBFD8);
}
else {
entityInfo->exposed = TRUE;
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBF9C);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBF9C);
}
UpdateStatusIconFlags(target);
}
@ -967,11 +967,11 @@ void IdentityItemHolders(Entity *pokemon, Entity *target)
nullsub_89(target);
gDungeon->unk644.itemHoldersIdentified = TRUE;
UpdateStatusIconFlags(target);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC028);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC028);
}
else
{
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC054);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC054);
}
}
}
@ -987,14 +987,14 @@ void BlindTarget(Entity *pokemon, Entity *target)
entityInfo->blinkerClassStatus.status = STATUS_BLINKER;
entityInfo->blinkerClassStatus.turns = CalculateStatusTurns(target,gBlinkerTurnRange, TRUE) + 1;
sub_8041E0C(target);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB7F4);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB7F4);
DungeonRunFrameActions(0x31);
UpdateTrapsVisibility();
UpdateMinimap();
}
else
{
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB810);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB810);
}
UpdateStatusIconFlags(target);
}
@ -1012,7 +1012,7 @@ void CrossEyeVisionTarget(Entity *pokemon, Entity *target)
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
if (entityInfo->blinkerClassStatus.status != STATUS_CROSS_EYED) {
sub_8041E1C(target);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB834);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB834);
entityInfo->blinkerClassStatus.status = STATUS_CROSS_EYED;
entityInfo->blinkerClassStatus.turns = CalculateStatusTurns(target,gCrossEyedTurnRange, TRUE) + 1;
UpdateCamera(0x1);
@ -1021,7 +1021,7 @@ void CrossEyeVisionTarget(Entity *pokemon, Entity *target)
}
else
{
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB85C);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB85C);
}
UpdateStatusIconFlags(target);
}
@ -1040,14 +1040,14 @@ void RestoreVisionTarget(Entity *pokemon, Entity *target)
entityInfo->blinkerClassStatus.status = STATUS_EYEDROPS;
entityInfo->blinkerClassStatus.turns = CalculateStatusTurns(target,gEyedropsTurnRange, FALSE) + 1;
sub_8041E3C(target);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB880);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB880);
DungeonRunFrameActions(0x31);
UpdateTrapsVisibility();
UpdateMinimap();
}
else
{
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB89C);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB89C);
}
UpdateStatusIconFlags(target);
}
@ -1086,10 +1086,10 @@ void RestorePPTarget(Entity * pokemon,Entity * target, s32 param_3)
}
if (PPChanged) {
sub_8041E4C(target);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FDBD0);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FDBD0);
}
else {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FDBF0);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FDBF0);
}
UpdateStatusIconFlags(target);
}
@ -1116,10 +1116,10 @@ void RaiseAtkStatTarget(Entity * pokemon, Entity *target, s32 increment)
entityInfo->atk[0] = newStat;
if (oldStat1 < (u8)newStat) {
sub_8041E60(target);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC33C);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC33C);
}
else {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC360);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC360);
}
UpdateStatusIconFlags(target);
}
@ -1146,10 +1146,10 @@ void RaiseSpAtkStatTarget(Entity * pokemon, Entity *target, s32 increment)
entityInfo->atk[1] = newStat;
if (oldStat1 < (u8)newStat) {
sub_8041E74(target);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC388);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC388);
}
else {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC3B4);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC3B4);
}
UpdateStatusIconFlags(target);
}
@ -1176,10 +1176,10 @@ void RaiseDefStatTarget(Entity * pokemon, Entity *target, s32 increment)
entityInfo->def[0] = newStat;
if (oldStat1 < (u8)newStat) {
sub_8041E84(target);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC3D8);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC3D8);
}
else {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC3FC);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC3FC);
}
UpdateStatusIconFlags(target);
}
@ -1206,10 +1206,10 @@ void RaiseSpDefStatTarget(Entity * pokemon, Entity *target, s32 increment)
entityInfo->def[1] = newStat;
if (oldStat1 < (u8)newStat) {
sub_8041E94(target);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC428);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC428);
}
else {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC454);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC454);
}
UpdateStatusIconFlags(target);
}
@ -1224,10 +1224,10 @@ void LongTossStatusTarget(Entity * pokemon, Entity * target)
if (entityInfo->longTossClassStatus.status != STATUS_LONG_TOSS) {
entityInfo->longTossClassStatus.status = STATUS_LONG_TOSS;
sub_8041EA4(target);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FD20C);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FD20C);
}
else {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FD22C);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FD22C);
}
UpdateStatusIconFlags(target);
}
@ -1241,10 +1241,10 @@ void PierceStatusTarget(Entity * pokemon, Entity * target)
if (entityInfo->longTossClassStatus.status != STATUS_PIERCE) {
entityInfo->longTossClassStatus.status = STATUS_PIERCE;
sub_8041EB4(target);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FD254);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FD254);
}
else {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FD27C);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FD27C);
}
UpdateStatusIconFlags(target);
}

View File

@ -42,7 +42,7 @@ void SetChargeStatusTarget(Entity *pokemon, Entity *target, u8 newStatus, Move *
entityInfo = GetEntInfo(target);
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
if ((entityInfo->bideClassStatus.status == newStatus) && (newStatus == STATUS_ENRAGED)) {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC074);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FC074);
}
else {
entityInfo->bideClassStatus.status = newStatus;
@ -74,7 +74,7 @@ void SetChargeStatusTarget(Entity *pokemon, Entity *target, u8 newStatus, Move *
entityInfo->bideClassStatus.turns = CalculateStatusTurns(target,gEnragedTurnRange, FALSE) + 1;
}
sub_8041BD0(target,uVar5);
TryDisplayDungeonLoggableMessage3(pokemon,target,message);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,message);
UpdateStatusIconFlags(target);
// TODO: this could probably be cleaner..

View File

@ -36,7 +36,7 @@ void CounterStatusTarget(Entity * pokemon, Entity * target, u8 newStatus)
entityInfo = GetEntInfo(target);
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
if (entityInfo->reflectClassStatus.status == newStatus) {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB10C);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB10C);
}
else {
nullsub_57(target);
@ -44,7 +44,7 @@ void CounterStatusTarget(Entity * pokemon, Entity * target, u8 newStatus)
entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target,gCounterTurnRange, FALSE) + 1;
}
entityInfo->reflectClassStatus.status = newStatus;
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB0E0);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB0E0);
UpdateStatusIconFlags(target);
}
}
@ -61,10 +61,10 @@ void SafeguardStatusTarget(Entity * pokemon, Entity * target)
entityInfo->reflectClassStatus.status = STATUS_SAFEGUARD;
entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target, gSafeguardTurnRange, FALSE) + 1;
nullsub_58(target);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB048);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB048);
}
else {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB074);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB074);
}
UpdateStatusIconFlags(target);
}
@ -81,10 +81,10 @@ void MistStatusTarget(Entity * pokemon, Entity * target)
entityInfo->reflectClassStatus.status = STATUS_MIST;
entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target, gMistTurnRange, FALSE) + 1;
nullsub_59(target);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB09C);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB09C);
}
else {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB0C4);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB0C4);
}
UpdateStatusIconFlags(target);
}
@ -101,10 +101,10 @@ void WishStatusTarget(Entity * pokemon, Entity * target)
entityInfo->reflectClassStatus.status = STATUS_WISH;
entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target, gWishTurnRange, FALSE) + 1;
sub_8041B34(target);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FAE1C);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FAE1C);
}
else {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FAE3C);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FAE3C);
}
UpdateStatusIconFlags(target);
}
@ -121,10 +121,10 @@ void MagicCoatStatusTarget(Entity * pokemon, Entity * target)
entityInfo->reflectClassStatus.status = STATUS_MAGIC_COAT;
entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target, gMagicCoatTurnRange, FALSE) + 1;
nullsub_60(target);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FAF5C);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FAF5C);
}
else {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FAF8C);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FAF8C);
}
UpdateStatusIconFlags(target);
}
@ -141,10 +141,10 @@ void LightScreenStatusTarget(Entity * pokemon, Entity * target)
entityInfo->reflectClassStatus.status = STATUS_LIGHT_SCREEN;
entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target, gLightScreenTurnRange, FALSE) + 1;
nullsub_61(target);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB130);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB130);
}
else {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB160);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB160);
}
UpdateStatusIconFlags(target);
}
@ -161,10 +161,10 @@ void ReflectStatusTarget(Entity * pokemon, Entity * target)
entityInfo->reflectClassStatus.status = STATUS_REFLECT;
entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target, gReflectTurnRange, FALSE) + 1;
nullsub_62(target);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB17C);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB17C);
}
else {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB1A8);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB1A8);
}
UpdateStatusIconFlags(target);
}
@ -181,11 +181,11 @@ void ProtectStatusTarget(Entity * pokemon, Entity * target)
entityInfo->reflectClassStatus.status = STATUS_PROTECT;
entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target, gProtectTurnRange, FALSE) + 1;
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB9B0);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB9B0);
}
else {
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FB9D8);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FB9D8);
}
UpdateStatusIconFlags(target);
}
@ -202,10 +202,10 @@ void MirrorCoatStatusTarget(Entity * pokemon, Entity * target)
entityInfo->reflectClassStatus.status = STATUS_MIRROR_COAT;
entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target, gMirrorCoatTurnRange, FALSE) + 1;
nullsub_64(target);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBAC0);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBAC0);
}
else {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBAE4);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBAE4);
}
UpdateStatusIconFlags(target);
}
@ -222,10 +222,10 @@ void EndureStatusTarget(Entity * pokemon, Entity * target)
entityInfo->reflectClassStatus.status = STATUS_ENDURING;
entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target, gEnduringTurnRange, FALSE) + 1;
nullsub_65(target);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBBF0);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBBF0);
}
else {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBC14);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBC14);
}
UpdateStatusIconFlags(target);
}
@ -242,10 +242,10 @@ void MirrorMoveStatusTarget(Entity * pokemon, Entity * target)
entityInfo->reflectClassStatus.status = STATUS_MIRROR_MOVE;
entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target, gMirrorMoveTurnRange, FALSE) + 1;
nullsub_66(target);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBC38);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBC38);
}
else {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBC5C);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBC5C);
}
UpdateStatusIconFlags(target);
}
@ -259,7 +259,7 @@ void Conversion2StatusTarget(Entity * pokemon, Entity * target)
entityInfo = GetEntInfo(target);
if(AbilityIsActive(target, ABILITY_FORECAST))
TryDisplayDungeonLoggableMessage3(pokemon,target,gPtrForecastPreventsConversion2Message);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gPtrForecastPreventsConversion2Message);
else
{
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
@ -267,10 +267,10 @@ void Conversion2StatusTarget(Entity * pokemon, Entity * target)
entityInfo->reflectClassStatus.status = STATUS_CONVERSION2;
entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target, gConversion2TurnRange, FALSE) + 1;
nullsub_67(target);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBC7C);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBC7C);
}
else {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBCA4);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBCA4);
}
UpdateStatusIconFlags(target);
}
@ -288,10 +288,10 @@ void VitalThrowStatusTarget(Entity * pokemon, Entity * target)
entityInfo->reflectClassStatus.status = STATUS_VITAL_THROW;
entityInfo->reflectClassStatus.turns = CalculateStatusTurns(target, gVitalThrowTurnRange, FALSE) + 1;
nullsub_68(target);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBCC8);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBCC8);
}
else {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBCF0);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBCF0);
}
UpdateStatusIconFlags(target);
}
@ -338,10 +338,10 @@ void sub_8079E34(Entity * pokemon, Entity * target, bool8 param_3)
}
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
if (statChanged) {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBD18);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBD18);
}
else {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FBD3C);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FBD3C);
}
UpdateStatusIconFlags(target);
}

View File

@ -65,11 +65,11 @@ void sub_8079F20(Entity * pokemon, Entity * target, u8 param_3, u8 param_4)
SendMuzzledEndMessage(pokemon,target);
if (entityInfo->perishSongTurns != 0) {
entityInfo->perishSongTurns = 0;
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_8100594);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_8100594);
}
if (entityInfo->exposed) {
entityInfo->exposed = FALSE;
TryDisplayDungeonLoggableMessage3(pokemon,target,gPtrExposedWoreOffMessage);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gPtrExposedWoreOffMessage);
}
}
@ -81,7 +81,7 @@ void sub_8079F20(Entity * pokemon, Entity * target, u8 param_3, u8 param_4)
if (moveSpeed != CalcSpeedStage(target)) {
bVar8 = TRUE;
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FA124[entityInfo->speedStage]);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FA124[entityInfo->speedStage]);
}
for(index = 0; index < MAX_MON_MOVES; index++)
@ -99,11 +99,11 @@ void sub_8079F20(Entity * pokemon, Entity * target, u8 param_3, u8 param_4)
sub_80420C8(target);
}
if (moveUnsealed) {
TryDisplayDungeonLoggableMessage3(pokemon,target,gPtrSealedMoveReleasedMessage);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gPtrSealedMoveReleasedMessage);
}
}
else if (param_4 == 0) {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_81004E8);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_81004E8);
}
UpdateStatusIconFlags(target);
}
@ -149,21 +149,21 @@ void EndSleepClassStatus(Entity * pokemon, Entity * target, bool8 param_3, bool8
break;
case STATUS_SLEEP:
isAsleep = TRUE;
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FA6E8);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FA6E8);
break;
case STATUS_SLEEPLESS:
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FA708);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FA708);
break;
case STATUS_NIGHTMARE:
isAsleep = TRUE;
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FA70C);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FA70C);
if (param_4) {
DealDamageToEntity(target,gNightmareDmgValue,RESIDUAL_DAMAGE_NIGHTMARE,DUNGEON_EXIT_FAINTED_WHILE_IN_NIGHTMARE);
DealDamageToEntity_Async(target,gNightmareDmgValue,RESIDUAL_DAMAGE_NIGHTMARE,DUNGEON_EXIT_FAINTED_WHILE_IN_NIGHTMARE);
}
break;
case STATUS_NAPPING:
isAsleep = TRUE;
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FA710);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FA710);
HealTargetHP(pokemon,target,gNappingHpHealValue, 0, FALSE);
entityInfo->sleepClassStatus.status = 0;
sub_8079F20(pokemon,target,1,1);
@ -174,7 +174,7 @@ void EndSleepClassStatus(Entity * pokemon, Entity * target, bool8 param_3, bool8
SleepStatusTarget(pokemon,target,CalculateStatusTurns(target, gSleepFromYawnTurnRange, TRUE) + 1, TRUE);
return;
}
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FA734);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FA734);
break;
}
entityInfo->sleepClassStatus.status = STATUS_NONE;
@ -199,13 +199,13 @@ void EndBurnClassStatus(Entity * pokemon, Entity * target)
break;
case STATUS_POISONED:
case STATUS_BADLY_POISONED:
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FA8A8);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FA8A8);
break;
case STATUS_PARALYSIS:
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FA868);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FA868);
break;
case STATUS_BURN:
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FA888);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FA888);
break;
}
@ -229,23 +229,23 @@ void EndFrozenClassStatus(Entity * pokemon, Entity *target)
case 8:
break;
case STATUS_FROZEN:
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FA8BC);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FA8BC);
isFrozen = TRUE;
break;
case STATUS_CONSTRICTION:
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FA820);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FA820);
break;
case STATUS_SHADOW_HOLD:
case STATUS_INGRAIN:
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FA824);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FA824);
break;
case STATUS_WRAP:
case STATUS_WRAPPED:
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FA81C);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FA81C);
sub_8076CB4(entityInfo->unk9C);
break;
case STATUS_PETRIFIED:
TryDisplayDungeonLoggableMessage3(pokemon,target, gPtrMonNoLongerPetrifiedMessage);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target, gPtrMonNoLongerPetrifiedMessage);
break;
}
entityInfo->frozenClassStatus.status = STATUS_NONE;
@ -269,25 +269,25 @@ void EndCringeClassStatus(Entity * pokemon, Entity *target)
case 8:
break;
case STATUS_CONFUSED:
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FA800);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FA800);
break;
case STATUS_COWERING:
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FA97C);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FA97C);
break;
case STATUS_TAUNTED:
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FA9DC);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FA9DC);
break;
case STATUS_PAUSED:
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FAC38);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FAC38);
break;
case STATUS_INFATUATED:
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FAB90);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FAB90);
break;
case STATUS_ENCORE:
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FAAAC);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FAAAC);
break;
case STATUS_CRINGE:
TryDisplayDungeonLoggableMessage3(pokemon,target, gPtrMonNoLongerCringingMessage);
TryDisplayDungeonLoggableMessage3_Async(pokemon,target, gPtrMonNoLongerCringingMessage);
break;
}
entityInfo->cringeClassStatus.status = STATUS_NONE;
@ -309,44 +309,44 @@ void EndReflectClassStatus(Entity * pokemon, Entity *target)
case 0xF:
break;
case STATUS_REFLECT:
LogMessageByIdWithPopupCheckUser(target,gUnknown_80FA638);
LogMessageByIdWithPopupCheckUser_Async(target,gUnknown_80FA638);
break;
case STATUS_SAFEGUARD:
LogMessageByIdWithPopupCheckUser(target,gUnknown_80FA69C);
LogMessageByIdWithPopupCheckUser_Async(target,gUnknown_80FA69C);
break;
case STATUS_LIGHT_SCREEN:
LogMessageByIdWithPopupCheckUser(target,gUnknown_80FA658);
LogMessageByIdWithPopupCheckUser_Async(target,gUnknown_80FA658);
break;
case STATUS_COUNTER:
case STATUS_MINI_COUNTER:
LogMessageByIdWithPopupCheckUser(target,gUnknown_80FA67C);
LogMessageByIdWithPopupCheckUser_Async(target,gUnknown_80FA67C);
break;
case STATUS_MAGIC_COAT:
LogMessageByIdWithPopupCheckUser(target,gUnknown_80FA6BC);
LogMessageByIdWithPopupCheckUser_Async(target,gUnknown_80FA6BC);
break;
case STATUS_WISH:
LogMessageByIdWithPopupCheckUser(target,gUnknown_80FA6D4);
LogMessageByIdWithPopupCheckUser_Async(target,gUnknown_80FA6D4);
break;
case STATUS_PROTECT:
LogMessageByIdWithPopupCheckUser(target,gUnknown_80FA9C0);
LogMessageByIdWithPopupCheckUser_Async(target,gUnknown_80FA9C0);
break;
case STATUS_MIRROR_COAT:
LogMessageByIdWithPopupCheckUser(target,gUnknown_80FAA68);
LogMessageByIdWithPopupCheckUser_Async(target,gUnknown_80FAA68);
break;
case STATUS_ENDURING:
LogMessageByIdWithPopupCheckUser(target, gPtrMonStoppedEnduringMessage);
LogMessageByIdWithPopupCheckUser_Async(target, gPtrMonStoppedEnduringMessage);
break;
case STATUS_MIRROR_MOVE:
LogMessageByIdWithPopupCheckUser(target,gPtrMonMirrorMoveFadedMessage);
LogMessageByIdWithPopupCheckUser_Async(target,gPtrMonMirrorMoveFadedMessage);
break;
case STATUS_CONVERSION2:
LogMessageByIdWithPopupCheckUser(target, gPtrMonConversion2FailedMessage);
LogMessageByIdWithPopupCheckUser_Async(target, gPtrMonConversion2FailedMessage);
break;
case STATUS_VITAL_THROW:
LogMessageByIdWithPopupCheckUser(target, gPtrMonGaveUpVitalThrowMessage);
LogMessageByIdWithPopupCheckUser_Async(target, gPtrMonGaveUpVitalThrowMessage);
break;
case STATUS_MIST:
LogMessageByIdWithPopupCheckUser(target,gUnknown_80FAB40);
LogMessageByIdWithPopupCheckUser_Async(target,gUnknown_80FAB40);
break;
}
entityInfo->reflectClassStatus.status = STATUS_NONE;
@ -367,12 +367,12 @@ void EndCurseClassStatus(Entity * pokemon, Entity * target, u8 curseClassStatus)
break;
case STATUS_CURSED:
if (curseClassStatus != STATUS_CURSED) {
LogMessageByIdWithPopupCheckUser(target,gUnknown_80FA7BC);
LogMessageByIdWithPopupCheckUser_Async(target,gUnknown_80FA7BC);
}
break;
case STATUS_SNATCH:
if (curseClassStatus != STATUS_SNATCH) {
LogMessageByIdWithPopupCheckUser(target,gUnknown_80FA7DC);
LogMessageByIdWithPopupCheckUser_Async(target,gUnknown_80FA7DC);
}
gDungeon->snatchPokemon = NULL;
gDungeon->unk17B3C = 0;
@ -384,7 +384,7 @@ void EndCurseClassStatus(Entity * pokemon, Entity * target, u8 curseClassStatus)
gDungeon->decoyIsActive = FALSE;
if (curseClassStatus != STATUS_DECOY) {
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
LogMessageByIdWithPopupCheckUser(target,gUnknown_80FA9A0);
LogMessageByIdWithPopupCheckUser_Async(target,gUnknown_80FA9A0);
}
break;
}
@ -405,10 +405,10 @@ void EndLeechSeedClassStatus(Entity * pokemon, Entity * target)
case STATUS_NONE:
break;
case STATUS_LEECH_SEED:
LogMessageByIdWithPopupCheckUser(target,gUnknown_80FA79C);
LogMessageByIdWithPopupCheckUser_Async(target,gUnknown_80FA79C);
break;
case STATUS_DESTINY_BOND:
LogMessageByIdWithPopupCheckUser(target,gUnknown_80FAA8C);
LogMessageByIdWithPopupCheckUser_Async(target,gUnknown_80FAA8C);
break;
}
entityInfo->leechSeedClassStatus.status = STATUS_NONE;
@ -431,16 +431,16 @@ void SendMoveEndMessage(Entity * pokemon, Entity * target)
case 5:
break;
case STATUS_SURE_SHOT:
LogMessageByIdWithPopupCheckUser(target,gUnknown_80FA8E0);
LogMessageByIdWithPopupCheckUser_Async(target,gUnknown_80FA8E0);
break;
case STATUS_WHIFFER:
LogMessageByIdWithPopupCheckUser(target,gUnknown_80FA90C);
LogMessageByIdWithPopupCheckUser_Async(target,gUnknown_80FA90C);
break;
case STATUS_SET_DAMAGE:
LogMessageByIdWithPopupCheckUser(target,gUnknown_80FA934);
LogMessageByIdWithPopupCheckUser_Async(target,gUnknown_80FA934);
break;
case STATUS_FOCUS_ENERGY:
LogMessageByIdWithPopupCheckUser(target,gUnknown_80FA95C);
LogMessageByIdWithPopupCheckUser_Async(target,gUnknown_80FA95C);
break;
}
entityInfo->sureShotClassStatus.status = STATUS_NONE;
@ -465,17 +465,17 @@ void SendTransformEndMessage(Entity * pokemon, Entity *target)
break;
case STATUS_INVISIBLE:
isInvisible = TRUE;
LogMessageByIdWithPopupCheckUser(target,gUnknown_80FA9F4);
LogMessageByIdWithPopupCheckUser_Async(target,gUnknown_80FA9F4);
break;
case STATUS_MOBILE:
LogMessageByIdWithPopupCheckUser(target,gUnknown_80FABBC);
LogMessageByIdWithPopupCheckUser_Async(target,gUnknown_80FABBC);
break;
case STATUS_TRANSFORMED:
entityInfo->apparentID = GetMonsterApparentID(target, entityInfo->id);
target->axObj.spriteFile = GetSpriteData(entityInfo->apparentID);
uVar3 = sub_806CEBC(target);
sub_806CCB4(target,uVar3);
LogMessageByIdWithPopupCheckUser(target,gUnknown_80FAB6C);
LogMessageByIdWithPopupCheckUser_Async(target,gUnknown_80FAB6C);
break;
}
entityInfo->invisibleClassStatus.status = STATUS_NONE;
@ -499,13 +499,13 @@ void SendEyesightEndMessage(Entity * pokemon,Entity * target)
case 4:
break;
case STATUS_BLINKER:
LogMessageByIdWithPopupCheckUser(target,gUnknown_80FAA0C);
LogMessageByIdWithPopupCheckUser_Async(target,gUnknown_80FAA0C);
break;
case STATUS_CROSS_EYED:
LogMessageByIdWithPopupCheckUser(target,gUnknown_80FAA2C);
LogMessageByIdWithPopupCheckUser_Async(target,gUnknown_80FAA2C);
break;
case STATUS_EYEDROPS:
LogMessageByIdWithPopupCheckUser(target,gUnknown_80FAA48);
LogMessageByIdWithPopupCheckUser_Async(target,gUnknown_80FAA48);
break;
}
entityInfo->blinkerClassStatus.status = STATUS_NONE;
@ -531,7 +531,7 @@ void SendMuzzledEndMessage(Entity * pokemon, Entity * target)
case 2:
break;
case TRUE:
LogMessageByIdWithPopupCheckUser(target,gUnknown_80FABC0);
LogMessageByIdWithPopupCheckUser_Async(target,gUnknown_80FABC0);
break;
}
entityInfo->muzzled.muzzled = FALSE;
@ -576,7 +576,7 @@ void SendThawedMessage(Entity *pokemon, Entity *target)
entityInfo->frozenClassStatus.turns = 0;
entityInfo->frozenClassStatus.damageCountdown = 0;
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],target,0);
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FA8BC); // $m0 thawed out!
TryDisplayDungeonLoggableMessage3_Async(pokemon,target,gUnknown_80FA8BC); // $m0 thawed out!
UpdateStatusIconFlags(target);
}
}

View File

@ -37,17 +37,17 @@ void HandleOneRoomOrb(Entity *pokemon, Entity *target)
bool8 isMonsterHouse;
if (gDungeon->forceMonsterHouse != 0) {
LogMessageByIdWithPopupCheckUser(pokemon,gUnknown_80FD3C8);
LogMessageByIdWithPopupCheckUser_Async(pokemon,gUnknown_80FD3C8);
return;
}
if (gDungeon->unk3A0B != 0) {
LogMessageByIdWithPopupCheckUser(pokemon,gUnknown_80FD3CC);
LogMessageByIdWithPopupCheckUser_Async(pokemon,gUnknown_80FD3CC);
return;
}
if (IsFloorwideFixedRoom()) {
LogMessageByIdWithPopupCheckUser(pokemon,gUnknown_80FD3D0);
LogMessageByIdWithPopupCheckUser_Async(pokemon,gUnknown_80FD3D0);
return;
}
isMonsterHouse = FALSE;
@ -130,9 +130,9 @@ void HandleOneRoomOrb(Entity *pokemon, Entity *target)
DetermineAllMonsterShadow();
UpdateMinimap();
UpdateTrapsVisibility();
LogMessageByIdWithPopupCheckUser(pokemon,gUnknown_80FD3A0);
LogMessageByIdWithPopupCheckUser_Async(pokemon,gUnknown_80FD3A0);
sub_803E708(0x28,0x2b);
TryTriggerMonsterHouseWithMsg(pokemon,1);
TryTriggerMonsterHouseWithMsg_Async(pokemon,1);
for(index = 0; index < DUNGEON_MAX_POKEMON; index++)
{
entity = gDungeon->activePokemon[index];

View File

@ -354,7 +354,7 @@ static void sub_8037748(void)
if ((sUnknown_203B35C->unk14 & 8) != 0)
AddSprite(&sUnknown_203B35C->unkC, 0x100, NULL, NULL);
DrawDialogueBoxString();
DrawDialogueBoxString_Async();
sUnknown_203B35C->unk14++;
}

Some files were not shown because too many files have changed in this diff Show More