Document dungeon belly functions/exit reasons, identify struct fields

This commit is contained in:
ElectroDeoxys 2025-09-02 22:18:15 +01:00
parent e29136c878
commit 333be4720d
69 changed files with 972 additions and 873 deletions

View File

@ -3,7 +3,7 @@
#include "structs/dungeon_entity.h"
void sub_8083AB0(s16 param_0, Entity *target, Entity *entity);
void sub_8083AB0(s16 dungeonExitReason, Entity *target, Entity *entity);
bool8 sub_8083C24(void);
bool8 sub_8083C50(void);
bool8 sub_8083C88(u8 param_1);

View File

@ -245,9 +245,35 @@ extern const struct CastformWeatherData gCastformByWeather[WEATHER_COUNT];
extern const s16 gTypeEffectivenessChart[NUM_TYPES][NUM_TYPES];
extern const s32 gEffectivenessChart[NUM_EFFECTIVENESS][NUM_EFFECTIVENESS];
#define RESIDUAL_DAMAGE_REGULAR 0
#define RESIDUAL_DAMAGE_BURN 1
#define RESIDUAL_DAMAGE_CONSTRICT 2
#define RESIDUAL_DAMAGE_POISON 3
#define RESIDUAL_DAMAGE_UNUSED_4 4
#define RESIDUAL_DAMAGE_WRAP 5
#define RESIDUAL_DAMAGE_COUNTERATTACK 6
#define RESIDUAL_DAMAGE_CURSE 7
#define RESIDUAL_DAMAGE_NIGHTMARE 8
#define RESIDUAL_DAMAGE_LEECH_SEED 9
#define RESIDUAL_DAMAGE_SPIKES 10
#define RESIDUAL_DAMAGE_PERISH_SONG 11
#define RESIDUAL_DAMAGE_DESTINY_BOND 12
#define RESIDUAL_DAMAGE_LIQUID_OOZE 13
#define RESIDUAL_DAMAGE_HUNGER 14
#define RESIDUAL_DAMAGE_CHESTNUT_TRAP 15
#define RESIDUAL_DAMAGE_UNUSED_16 16
#define RESIDUAL_DAMAGE_PITFALL 17
#define RESIDUAL_DAMAGE_BAD_WEATHER 18
#define RESIDUAL_DAMAGE_MOVE_FAIL 19
#define RESIDUAL_DAMAGE_RECOIL 20
#define BELLY_GO_DOWN_VALUES_COUNT 20
extern const s48_16 gBellyGoDownValues[BELLY_GO_DOWN_VALUES_COUNT];
#define EMPTY_BELLY_ALERT_YOUR_BELLYS_EMPTY 1
#define EMPTY_BELLY_ALERT_HURRY_EAT_SOMETHING 2
#define EMPTY_BELLY_ALERT_YOULL_FAINT 3
#define WARP_SCARF_ACTIVATION_CHANCES_COUNT 20
extern const s16 gWarpScarfActivationChances[WARP_SCARF_ACTIVATION_CHANCES_COUNT];
@ -291,6 +317,6 @@ extern const struct CalledMove gNaturePowerCalledMoves[];
extern const u16 gUnknown_80F5F70[UNK12A18_ARR_COUNT];
extern const s32 gUnknown_80F5FAC[76];
extern const s32 gUnknown_80F60DC[5];
extern const s32 gLinkedMovesBellyGoDownValues[5];
#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, u8 param_3);
void sub_8084E00(Entity *entity, u8 param_2, bool8 param_3);
void sub_8085140(void);
bool8 sub_808529C(s32 speciesId_);
void sub_8085374(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 arg4, bool32 arg8, s32 argC);
void HandleDealingDamage(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 r6, s32 r4);
void sub_806F370(Entity *pokemon, Entity *target, s32 dmg, s32 giveExp, bool8 *tookNoDamage, u8 moveType, s16 arg_8, s32 residualDmgType, s32 arg_10, s32 arg_14);
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 SetShopkeeperAggression(Entity *pokemon, Entity *target);
void sub_806F480(Entity *pokemon, bool8 attackEnemies);
u8 sub_806F4A4(Entity *pokemon, u8 type);

View File

@ -22,6 +22,62 @@ struct unkStruct_8069D4C
HiddenPower hiddenPower;
};
#define DUNGEON_EXIT_TRANSFORMED_INTO_FRIEND 0x1f4
#define DUNGEON_EXIT_LEFT_WITHOUT_BEING_BEFRIENDED 0x1f5
#define DUNGEON_EXIT_FAINTED_FROM_DEBUG_ATTACK 0x1f6
#define DUNGEON_EXIT_MISSED_JUMP_KICK 0x1f7
#define DUNGEON_EXIT_MISSED_HI_JUMP_KICK 0x1f8
#define DUNGEON_EXIT_FAINTED_FROM_DESTINY_BOND 0x1f9
#define DUNGEON_EXIT_FAINTED_COVERED_IN_SLUDGE 0x1fa
#define DUNGEON_EXIT_UNUSED_507 0x1fb
#define DUNGEON_EXIT_UNUSED_508 0x1fc
#define DUNGEON_EXIT_FAINTED_FROM_RECOIL 0x1fd
#define DUNGEON_EXIT_FAINTED_FROM_DAMAGE_BOUNCING 0x1fe
#define DUNGEON_EXIT_DEFEATED_PENT_UP_ENERGY 0x1ff
#define DUNGEON_EXIT_UNUSED_512 0x200
#define DUNGEON_EXIT_UNUSED_513 0x201
#define DUNGEON_EXIT_UNUSED_514 0x202
#define DUNGEON_EXIT_UNUSED_515 0x203
#define DUNGEON_EXIT_UNUSED_516 0x204
#define DUNGEON_EXIT_UNUSED_517 0x205
#define DUNGEON_EXIT_FAINTED_FROM_SPIKES 0x206
#define DUNGEON_EXIT_DEBUG_DAMAGE 0x207
#define DUNGEON_EXIT_FAINTED_FROM_BURN 0x208
#define DUNGEON_EXIT_FAINTED_FROM_CONSTRICTION 0x209
#define DUNGEON_EXIT_FAINTED_FROM_POISON 0x20a
#define DUNGEON_EXIT_FAINTED_FROM_WRAP 0x20b
#define DUNGEON_EXIT_FELLED_BY_CURSE 0x20c
#define DUNGEON_EXIT_DRAINED_BY_LEECH_SEED 0x20d
#define DUNGEON_EXIT_FAINTED_FROM_PERISH_SONG 0x20e
#define DUNGEON_EXIT_FAINTED_WHILE_IN_NIGHTMARE 0x20f
#define DUNGEON_EXIT_FELLED_BY_THROWN_ROCK 0x210
#define DUNGEON_EXIT_FAINTED_FROM_HUNGER 0x211
#define DUNGEON_EXIT_DISAPPEARED_IN_EXPLOSION 0x212
#define DUNGEON_EXIT_TRIPPED_CHESTNUT_TRAP 0x213
#define DUNGEON_EXIT_FAINTED_DUE_TO_TRAP 0x214
#define DUNGEON_EXIT_FELL_INTO_PITFALL 0x215
#define DUNGEON_EXIT_DEFEATED_BLAST_SEED 0x216
#define DUNGEON_EXIT_FELLED_BY_THROWN_ITEM 0x217
#define DUNGEON_EXIT_TRANSFORMED_INTO_ITEM 0x218
#define DUNGEON_EXIT_FAINTED_FROM_BEING_KNOCKED 0x219
#define DUNGEON_EXIT_FELLED_BY_POKEMON_FLYING 0x21a
#define DUNGEON_EXIT_GAVE_UP_EXPLORATION 0x21b
#define DUNGEON_EXIT_DELETED_FOR_EVENT 0x21c
#define DUNGEON_EXIT_WENT_AWAY 0x21d
#define DUNGEON_EXIT_BLOWN_OUT_UNSEEN_FORCE 0x21e
#define DUNGEON_EXIT_RETURNED_WITH_FALLEN_PARTNER 0x21f
#define DUNGEON_EXIT_FAINTED_DUE_TO_WEATHER 0x220
#define DUNGEON_EXIT_WAS_POSSESSED 0x221
#define DUNGEON_EXIT_FAILED_TO_PROTECT_CLIENT 0x222
#define DUNGEON_EXIT_FAINTED_FROM_WONDER_ORB 0x223
#define DUNGEON_EXIT_FAINTED_FROM_ITEM 0x224
#define DUNGEON_EXIT_UNK 0x225
#define DUNGEON_EXIT_ESCAPED_MIDDLE_OF_EXPLORATION 0x226
#define DUNGEON_EXIT_CLEARED_DUNGEON 0x227
#define DUNGEON_EXIT_SUCCEEDED_IN_RESCUE_MISSION 0x228
#define DUNGEON_EXIT_IMPRESSIVELY_COMPLETED_MISSION 0x229
#define DUNGEON_EXIT_BEFRIENDED_MEW 0x22a
void OpenDungeonPaletteFile(void);
void CloseDungeonPaletteFile(void);
void LoadDungeonPokemonSprites(void);
@ -35,7 +91,7 @@ void sub_8068A84(Pokemon *pokemon);
void sub_8068BDC(bool8 a0);
void sub_8068F28(void);
void sub_8068F80(void);
void HandleFaint(Entity *entity, s32 param_2, Entity *param_3);
void HandleFaint(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

@ -27,6 +27,6 @@ bool8 sub_805744C(Entity * pokemon, Move *move, bool8 param_3);
void SortTargets(Entity **targetsArray, Entity *attacker);
bool8 MoveRequiresCharging(Entity* pokemon, u16 moveID);
void sub_8057588(Entity * pokemon, u8 param_2);
s16 sub_8057600(Move *move, s32 itemID);
s16 GetDungeonExitReasonFromMoveOrItem(Move *move, s32 itemID);
#endif

View File

@ -4,6 +4,6 @@
#include "structs/str_dungeon.h"
void PrintOnDungeonFinishedWindow(u32 windowId, const u8 *headerText, UnkDungeonGlobal_unk1CE98_sub *param_3);
s16 sub_8094828(u16 moveID, u8 id);
s16 GetDungeonExitReasonFromMoveOrItemID(u16 moveID, u8 id);
#endif

View File

@ -4,6 +4,6 @@
#include "structs/str_position.h"
#include "structs/dungeon_entity.h"
void HandleExplosion(Entity *pokemon,Entity *target,DungeonPos *param_3,s32 param_4,u8 moveType,s16 param_6);
void HandleExplosion(Entity *pokemon,Entity *target,DungeonPos *param_3,s32 param_4,u8 moveType,s16 dungeonExitReason);
#endif // GUARD_EXPLOSION_H

View File

@ -3,81 +3,81 @@
#include "structs/dungeon_entity.h"
bool8 IronTailMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 sub_805768C(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 YawnMoveAction(Entity * pokemon, Entity *target, Move *move, s32 param_4);
bool8 BasicSleepMoveAction(Entity * pokemon, Entity *target, Move *move, s32 param_4);
bool8 NightmareMoveAction(Entity * pokemon, Entity *target, Move *move, s32 param_4);
bool8 MorningSunMoveAction(Entity * pokemon,Entity * target, Move *move, s32 param_4);
bool8 VitalThrowMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4);
bool8 DigMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4);
bool8 SweetScentMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 CharmMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 RainDanceMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 HailMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 sub_80578EC(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 BubbleMoveAction(Entity *pokemon, Entity *target, Move * move, s32 param_4);
bool8 EncoreMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 RageMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 SuperFangMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 PainSplitMoveAction(Entity *attacker, Entity *target, Move *move, s32 param_4);
bool8 TormentMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 StringShotMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 SwaggerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 SnoreMoveAction(Entity *pokemon, Entity *target, Move * move, s32 param_4);
bool8 ScreechMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 RockSlideMoveAction(Entity *pokemon, Entity *target, Move * move, s32 param_4);
bool32 WeatherBallMoveAction(Entity * pokemon, Entity * target, Move * move, s32 param_4);
bool8 WhirlpoolMoveAction(Entity * pokemon, Entity * target, Move * move, s32 param_4);
bool8 FakeTearsMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4);
bool8 SpiteMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4);
bool8 FocusEnergyMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4);
bool8 SmokescreenMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 MirrorMoveMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 OverheatMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 AuroraBeamMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 MementoMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 OctazookaMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 FlatterMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 WillOWispMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 ReturnMoveAction(Entity * pokemon,Entity * target,Move * move,s32 param_4);
bool8 GrudgeMoveAction(Entity *pokemon, Entity * target, Move *move, s32 param_4);
bool8 CounterMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 FlameWheelMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 BasicFireMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 ExposeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 DoubleTeamMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 GustMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 BasicRaiseDefenseMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 DisableMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 BasicRaiseAttackMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 RazorWindMoveAction(Entity * pokemon, Entity * target, Move * move, s32 param_4);
bool8 BideMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 Bide2MoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 ShadowBallMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 BiteMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 ThunderMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 EndeavorMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 FacadeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 sub_8058580(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 BrickBreakMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 RockTombMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 FocusPunchMoveAction(Entity * pokemon, Entity * target, Move * move, s32 param_4);
bool8 GigaDrainMoveAction(Entity * pokemon, Entity * target, Move * move, s32 param_4);
bool8 ReversalMoveAction(Entity * pokemon, Entity * target, Move * move, s32 param_4);
bool8 SmellingSaltMoveAction(Entity * pokemon, Entity * target, Move * move, s32 param_4);
bool8 MetalSoundMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 TickleMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 sub_805889C(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 HazeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 OutrageMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 LowKickMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 AncientPowerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 SynthesisMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 AgilityMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 RapidSpinMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 SureShotMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 CosmicPowerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 IronTailMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 sub_805768C(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 YawnMoveAction(Entity * pokemon, Entity *target, Move *move, s32 itemId);
bool8 BasicSleepMoveAction(Entity * pokemon, Entity *target, Move *move, s32 itemId);
bool8 NightmareMoveAction(Entity * pokemon, Entity *target, Move *move, s32 itemId);
bool8 MorningSunMoveAction(Entity * pokemon,Entity * target, Move *move, s32 itemId);
bool8 VitalThrowMoveAction(Entity * pokemon, Entity * target, Move *move, s32 itemId);
bool8 DigMoveAction(Entity * pokemon, Entity * target, Move *move, s32 itemId);
bool8 SweetScentMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 CharmMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 RainDanceMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 HailMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 sub_80578EC(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 BubbleMoveAction(Entity *pokemon, Entity *target, Move * move, s32 itemId);
bool8 EncoreMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 RageMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 SuperFangMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 PainSplitMoveAction(Entity *attacker, Entity *target, Move *move, s32 itemId);
bool8 TormentMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 StringShotMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 SwaggerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 SnoreMoveAction(Entity *pokemon, Entity *target, Move * move, s32 itemId);
bool8 ScreechMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 RockSlideMoveAction(Entity *pokemon, Entity *target, Move * move, s32 itemId);
bool32 WeatherBallMoveAction(Entity * pokemon, Entity * target, Move * move, s32 itemId);
bool8 WhirlpoolMoveAction(Entity * pokemon, Entity * target, Move * move, s32 itemId);
bool8 FakeTearsMoveAction(Entity * pokemon, Entity * target, Move *move, s32 itemId);
bool8 SpiteMoveAction(Entity * pokemon, Entity * target, Move *move, s32 itemId);
bool8 FocusEnergyMoveAction(Entity * pokemon, Entity * target, Move *move, s32 itemId);
bool8 SmokescreenMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 MirrorMoveMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 OverheatMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 AuroraBeamMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 MementoMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 OctazookaMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 FlatterMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 WillOWispMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 ReturnMoveAction(Entity * pokemon,Entity * target,Move * move,s32 itemId);
bool8 GrudgeMoveAction(Entity *pokemon, Entity * target, Move *move, s32 itemId);
bool8 CounterMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 FlameWheelMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 BasicFireMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 ExposeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 DoubleTeamMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 GustMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 BasicRaiseDefenseMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 DisableMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 BasicRaiseAttackMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 RazorWindMoveAction(Entity * pokemon, Entity * target, Move * move, s32 itemId);
bool8 BideMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 Bide2MoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 ShadowBallMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 BiteMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 ThunderMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 EndeavorMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 FacadeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 sub_8058580(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 BrickBreakMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 RockTombMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 FocusPunchMoveAction(Entity * pokemon, Entity * target, Move * move, s32 itemId);
bool8 GigaDrainMoveAction(Entity * pokemon, Entity * target, Move * move, s32 itemId);
bool8 ReversalMoveAction(Entity * pokemon, Entity * target, Move * move, s32 itemId);
bool8 SmellingSaltMoveAction(Entity * pokemon, Entity * target, Move * move, s32 itemId);
bool8 MetalSoundMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 TickleMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 sub_805889C(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 HazeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 OutrageMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 LowKickMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 AncientPowerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 SynthesisMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 AgilityMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 RapidSpinMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 SureShotMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 CosmicPowerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
extern const s32 gStatIndexAtkDef;
extern const s32 gStatIndexSpecial;

View File

@ -3,72 +3,72 @@
#include "structs/dungeon_entity.h"
bool8 SkyAttackMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 BasicIceMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 MeteorMashMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 ScaryFaceMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 sub_8058E5C(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 LickMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 FissureMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 ExtrasensoryMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 AbsorbMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 SkillSwapMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 HeadbuttMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 DoubleEdgeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 sub_8059528(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 SmogMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 SacredFireMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 sub_80595EC(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 MuddyWaterMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 TwisterMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 TwineedleMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 sub_8059A2C(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 SupersonicMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 TauntMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 HornDrillMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 ThundershockMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 ThunderWaveMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 BlockMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 PoisonGasMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 ToxicMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 PoisonFangMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool32 EarthquakeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 UproarMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 SandstormMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 Conversion2MoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 PsychUpMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 ConversionMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 SketchMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 NaturePowerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 HelpingHandMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 EndureMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 sub_8058C98(Entity *pokemon, Entity *target, Move *move, s32 param_4, u32 param_5);
bool8 SonicboomMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 SelfDestructMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 ExplosionMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 ChargeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 WaterSpoutMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 StockpileMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 SkyAttackMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 BasicIceMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 MeteorMashMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 ScaryFaceMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 sub_8058E5C(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 LickMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 FissureMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 ExtrasensoryMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 AbsorbMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 SkillSwapMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 HeadbuttMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 DoubleEdgeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 sub_8059528(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 SmogMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 SacredFireMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 sub_80595EC(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 MuddyWaterMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 TwisterMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 TwineedleMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 sub_8059A2C(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 SupersonicMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 TauntMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 HornDrillMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 ThundershockMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 ThunderWaveMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 BlockMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 PoisonGasMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 ToxicMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 PoisonFangMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool32 EarthquakeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 UproarMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 SandstormMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 Conversion2MoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 PsychUpMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 ConversionMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 SketchMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 NaturePowerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 HelpingHandMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 EndureMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 sub_8058C98(Entity *pokemon, Entity *target, Move *move, s32 itemId, u32 param_5);
bool8 SonicboomMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 SelfDestructMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 ExplosionMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 ChargeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 WaterSpoutMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 StockpileMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
void sub_80783C4(Entity * pokemon, Entity * target, bool8 param_3);
bool8 StunSporeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 sub_8058C00(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 sub_8059CD8(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 ThunderboltMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 ZapCannonMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 MinimizeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 SwordsDanceMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 GrowthMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 PsychoBoostMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 SafeguardMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 MistMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 MoonlightMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 SolarBeamMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 sub_80599EC(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 sub_8058EE0(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 PsywaveMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 WarpMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 FlyMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 DiveMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 StunSporeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 sub_8058C00(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 sub_8059CD8(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 ThunderboltMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 ZapCannonMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 MinimizeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 SwordsDanceMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 GrowthMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 PsychoBoostMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 SafeguardMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 MistMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 MoonlightMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 SolarBeamMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 sub_80599EC(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 sub_8058EE0(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 PsywaveMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 WarpMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 FlyMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 DiveMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
#endif /* ifndef GUARD_MOVE_ORB_ACTIONS_2_H */

View File

@ -3,63 +3,63 @@
#include "structs/dungeon_entity.h"
bool8 PoisonStingMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 TriAttackMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 TrickMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 TripleKickMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 MudSlapMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 ThiefMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 RolePlayMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 LeerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 PayDayMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 CurseMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 sub_805A568(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 SuperpowerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 DynamicPunchMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 KnockOffMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 SecretPowerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 sub_805AC90(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 ObserverOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 FeatherDanceMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 BeatUpMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 BlastBurnMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 CrushClawMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 BlazeKickMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 PresentMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 EruptionMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 GlareMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 PoisonTailMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 RoarMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 sub_805B17C(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 WrapMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 MagnitudeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 FakeOutMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 TailGlowMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 SurfMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 PerishSongMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 SunnyDayMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 BellyDrumMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 HiJumpKickMoveAction(Entity * pokemon,Entity * target,Move * move,s32 param_4,u8 param_5);
bool8 JumpKickMoveAction(Entity * pokemon,Entity * target,Move * move,s32 param_4,u8 param_5);
bool8 SteelWingMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4, u32 param_5);
bool8 BulkUpMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 AmnesiaMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 HandleColorChange(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 TransformMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 SplashMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 SpitUpMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 SwallowMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 GrowlMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 LightScreenMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 RestMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 sub_805A450(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 MudWaterSportMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 IngrainMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 MagicCoatMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 SpikesMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 WishMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 BounceMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 AssistMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 sub_805AAD0(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 PoisonStingMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 TriAttackMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 TrickMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 TripleKickMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 MudSlapMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 ThiefMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 RolePlayMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 LeerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 PayDayMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 CurseMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 sub_805A568(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 SuperpowerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 DynamicPunchMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 KnockOffMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 SecretPowerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 sub_805AC90(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 ObserverOrbAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 FeatherDanceMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 BeatUpMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 BlastBurnMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 CrushClawMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 BlazeKickMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 PresentMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 EruptionMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 GlareMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 PoisonTailMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 RoarMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 sub_805B17C(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 WrapMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 MagnitudeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 FakeOutMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 TailGlowMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 SurfMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 PerishSongMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 SunnyDayMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 BellyDrumMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 HiJumpKickMoveAction(Entity * pokemon,Entity * target,Move * move,s32 itemId,u8 param_5);
bool8 JumpKickMoveAction(Entity * pokemon,Entity * target,Move * move,s32 itemId,u8 param_5);
bool8 SteelWingMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId, u32 param_5);
bool8 BulkUpMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 AmnesiaMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 HandleColorChange(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 TransformMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 SplashMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 SpitUpMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 SwallowMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 GrowlMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 LightScreenMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 RestMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 sub_805A450(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 MudWaterSportMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 IngrainMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 MagicCoatMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 SpikesMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 WishMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 BounceMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 AssistMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 sub_805AAD0(Entity *pokemon, Entity *target, Move *move, s32 itemId);
#endif /* ifndef GUARD_MOVE_ORB_ACTIONS_3_H */

View File

@ -3,63 +3,63 @@
#include "structs/dungeon_entity.h"
bool8 DreamEaterMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 sub_805B734(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 RecycleMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 ReflectMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 DragonRageMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 DragonDanceMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 SkullBashMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 LusterPurgeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 StruggleMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 RockSmashMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 sub_805BA44(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 ThiefAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 sub_805BB64(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 SwitcherOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 StayawayOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 CleanseOrbAction(Entity *pokemon,Entity *target, Move *move, s32 param_4);
bool8 SlumberOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 TwoEdgeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 SilenceOrbAction(Entity *pokemon,Entity *target, Move *move, s32 param_4);
bool8 ScannerOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 RadarOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 TransferOrbAction(Entity *pokemon,Entity *target, Move *move, s32 param_4);
bool8 SlowDownMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 LuminousOrbAction(Entity *pokemon,Entity *target, Move *move, s32 param_4);
bool8 PetrifyOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 PounceOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 TrawlOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 EscapeOrbAction(Entity *pokemon,Entity *target, Move *move, s32 param_4);
bool8 DroughtOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 TrapbustOrbAction(Entity *pokemon,Entity *target, Move *move, s32 param_4);
bool8 RollcallOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 OneShotOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 IdentifyOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 VacuumCutMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 ReviverOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 ShockerOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 sub_805C208(Entity *pokemon, Entity *target, Move *move, u32 param_4);
bool8 sub_805C288(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 OneRoomOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 MistBallMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 DestinyBondMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 FalseSwipeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 HiddenPowerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 AttractMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 MimicMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 FrustrationMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 LeechSeedMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 MetalClawMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4, s32 param_5);
bool8 InvisifyOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 CalmMindMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 DefenseCurlMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 SnatchMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 MetronomeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 ReboundOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 sub_805B314(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 ProtectMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 MirrorCoatMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 DreamEaterMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 sub_805B734(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 RecycleMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 ReflectMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 DragonRageMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 DragonDanceMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 SkullBashMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 LusterPurgeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 StruggleMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 RockSmashMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 sub_805BA44(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 ThiefAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 sub_805BB64(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 SwitcherOrbAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 StayawayOrbAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 CleanseOrbAction(Entity *pokemon,Entity *target, Move *move, s32 itemId);
bool8 SlumberOrbAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 TwoEdgeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 SilenceOrbAction(Entity *pokemon,Entity *target, Move *move, s32 itemId);
bool8 ScannerOrbAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 RadarOrbAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 TransferOrbAction(Entity *pokemon,Entity *target, Move *move, s32 itemId);
bool8 SlowDownMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 LuminousOrbAction(Entity *pokemon,Entity *target, Move *move, s32 itemId);
bool8 PetrifyOrbAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 PounceOrbAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 TrawlOrbAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 EscapeOrbAction(Entity *pokemon,Entity *target, Move *move, s32 itemId);
bool8 DroughtOrbAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 TrapbustOrbAction(Entity *pokemon,Entity *target, Move *move, s32 itemId);
bool8 RollcallOrbAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 OneShotOrbAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 IdentifyOrbAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 VacuumCutMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 ReviverOrbAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 ShockerOrbAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 sub_805C208(Entity *pokemon, Entity *target, Move *move, u32 itemId);
bool8 sub_805C288(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 OneRoomOrbAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 MistBallMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 DestinyBondMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 FalseSwipeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 HiddenPowerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 AttractMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 MimicMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 FrustrationMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 LeechSeedMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 MetalClawMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId, s32 param_5);
bool8 InvisifyOrbAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 CalmMindMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 DefenseCurlMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 SnatchMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 MetronomeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 ReboundOrbAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 sub_805B314(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 ProtectMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 MirrorCoatMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
#endif /* ifndef MOVE_ORB_ACTIONS_4_H */

View File

@ -3,13 +3,13 @@
#include "structs/dungeon_entity.h"
bool8 FillInOrbAction(Entity *pokemon,Entity *target, Move *move, s32 param_4);
bool8 ItemizeOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 HurlOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 MobileOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 StairsOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 LongtossOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 PierceOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 TrapperOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
bool8 FillInOrbAction(Entity *pokemon,Entity *target, Move *move, s32 itemId);
bool8 ItemizeOrbAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 HurlOrbAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 MobileOrbAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 StairsOrbAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 LongtossOrbAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 PierceOrbAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
bool8 TrapperOrbAction(Entity *pokemon, Entity *target, Move *move, s32 itemId);
#endif /* ifndef MOVE_ORB_ACTIONS_5_H */

View File

@ -40,13 +40,15 @@ typedef struct s48_16
#define F4816_ONE ((s48_16){0, 0x10000})
#define F4816_MAX ((s48_16){0x7FFFFFFF, 0xFFFFFFFF})
#define S48_16(x) ((s48_16){ ((x) * (1 >> 0x10)), (((x) * (1 << 0x10))) })
FixedPoint FixedPoint_Add(FixedPoint a, FixedPoint b);
FixedPoint FixedPoint_Subtract(FixedPoint a, FixedPoint b);
FixedPoint FixedPoint_Min(FixedPoint a, FixedPoint b);
FixedPoint FixedPoint_Max(FixedPoint a, FixedPoint b);
FixedPoint sub_8094370(FixedPoint param_1, FixedPoint param_2);
FixedPoint IntToFixedPoint(s32 a);
FixedPoint FixedPoint_SetFromUnk(s48_16* param_1);
FixedPoint FixedPoint_SetFromS48_16(s48_16* param_1);
FixedPoint FixedPoint_Div(FixedPoint a, FixedPoint b);
s32 FixedPointToInt(FixedPoint a); // Always rounded up

View File

@ -292,7 +292,7 @@ typedef struct EntityInfo
/* 0x140 */ FixedPoint maxBelly;
/* 0x144 */ bool8 aiAllySkip; // True if an AI Pokémon is following another Pokémon and is already adjacent to them.
/* 0x145 */ bool8 recalculateFollow; // Used by the AI to defer a movement decision until after all other Pokémon have moved.
/* 0x146 */ u8 unk146;
/* 0x146 */ bool8 bellyEmpty;
/* 0x147 */ bool8 waiting; // True if an AI Pokémon decided to do nothing this turn.
/* 0x148 */ bool8 attacking;
/* 0x149 */ u8 unk149;
@ -303,7 +303,7 @@ typedef struct EntityInfo
/* 0x14E */ u16 visualFlags;
/* 0x150 */ u16 previousVisualFlags;
/* 0x152 */ u8 unk152;
u8 unk153;
/* 0x153 */ u8 usedLinkedMovesCounter; // how many linked moves were used this turn.
u8 unk154;
u8 unk155;
u8 unk156;

View File

@ -271,7 +271,7 @@ typedef struct unkDungeon644
/* 0x32 */ bool8 itemHoldersIdentified;
/* 0x33 */ u8 unk33;
/* 0x34 */ u8 unk34;
/* 0x35 */ u8 unk35;
/* 0x35 */ u8 emptyBellyAlert; // which alert message to show when belly gets empty.
/* 0x36 */ u8 unk36;
/* 0x37 */ s8 unk37;
/* 0x38 */ u32 unk38;

View File

@ -109,7 +109,7 @@ void BlowAwayTarget(Entity *pokemon, Entity *target, u32 direction)
_0807CF26:
sub_807D068(target,&target->pos);
sub_806F370(pokemon,target,gBlowAwayDmgValue,0,0,0,0x219,0,0,0);
sub_806F370(pokemon,target,gBlowAwayDmgValue,0,0,0,DUNGEON_EXIT_FAINTED_FROM_BEING_KNOCKED,RESIDUAL_DAMAGE_REGULAR,0,0);
}
if (IsFloorOver()) {
return;
@ -118,7 +118,7 @@ void BlowAwayTarget(Entity *pokemon, Entity *target, u32 direction)
InitPokemonMove(&move,0x163);
if (!sub_80571F0(entity,&move)) {
TrySendImmobilizeSleepEndMsg(pokemon,entity);
sub_806F370(pokemon,entity,gBlowAwayDmgValue,0,0,0,0x21a,0,0,0);
sub_806F370(pokemon,entity,gBlowAwayDmgValue,0,0,0,DUNGEON_EXIT_FELLED_BY_POKEMON_FLYING,RESIDUAL_DAMAGE_REGULAR,0,0);
}
}
if (IsFloorOver()) {

View File

@ -733,7 +733,7 @@ void sub_8067794(Entity *entity, Entity *targetEntity, s32 a2)
u8 tempText[64];
strncpy(tempText, gFormatBuffer_Monsters[0], sizeof(tempText));
HandleFaint(targetEntity, 0x21D, 0);
HandleFaint(targetEntity, DUNGEON_EXIT_WENT_AWAY, 0);
strncpy(gFormatBuffer_Monsters[0], tempText, sizeof(tempText));
DisplayDungeonMessage(NULL, stringPtr2, TRUE);
}

View File

@ -271,7 +271,7 @@ bool8 sub_806FA5C(Entity *entity1, Entity *entity2, struct unkStruct_8069D4C *pa
UnlockFriendArea(friendArea);
flag = TRUE;
}
HandleFaint(entity2,500,entity1);
HandleFaint(entity2,DUNGEON_EXIT_TRANSFORMED_INTO_FRIEND,entity1);
pokeStruct2 = &gRecruitedPokemonRef->dungeonTeam[pokeIndex];
pokeStruct2->flags = 3;
pokeStruct2->isTeamLeader = FALSE;
@ -438,7 +438,7 @@ bool8 sub_806FDF4(Entity *entity1,Entity *entity2,Entity **entityPtr)
flag = TRUE;
}
IncrementAdventureNumJoined();
HandleFaint(entity2,500,entity1);
HandleFaint(entity2,DUNGEON_EXIT_TRANSFORMED_INTO_FRIEND,entity1);
if (SpawnTeamMember(local_74.id,local_74.pos.x,local_74.pos.y,pokeStruct2,&local_2c,0,0) == 0) {
pokeStruct2->flags = 0;
}

View File

@ -9,7 +9,7 @@
#include "dungeon_strings.h"
#include "run_dungeon.h"
void sub_8083AB0(s16 param_0, Entity *target, Entity *entity)
void sub_8083AB0(s16 dungeonExitReason_, Entity *target, Entity *entity)
{
u8 *defPtr;
u8 *attackPtr;
@ -20,7 +20,7 @@ void sub_8083AB0(s16 param_0, Entity *target, Entity *entity)
u8 buffer [0x14];
UnkDungeonGlobal_unk1CE98_sub *temp;
u8 *id;
s32 param_0_s32 = param_0;
s32 dungeonExitReason = dungeonExitReason_;
temp = &gDungeon->unk1CE98;
targetEntityInfo = NULL;
@ -37,7 +37,7 @@ void sub_8083AB0(s16 param_0, Entity *target, Entity *entity)
}
sub_80709C8(buffer,entityInfo);
CopyStringtoBuffer(temp->buffer2, buffer);
temp->moveID = param_0_s32;
temp->moveID = dungeonExitReason;
temp->heldItem = entityInfo->heldItem;
temp->exp = entityInfo->exp;
temp->level = entityInfo->level;

View File

@ -428,29 +428,28 @@ const s32 gEffectivenessChart[NUM_EFFECTIVENESS][NUM_EFFECTIVENESS] = {
},
};
// Todo: change to readable format
const s48_16 gBellyGoDownValues[BELLY_GO_DOWN_VALUES_COUNT] =
{
{0, 0},
{0, 0},
{0, 0},
{0, 0},
{0, 0},
{0, 0},
{0, 0x199A},
{0, 0x4000},
{0, 0x8000},
{0, 0xC000},
{0, 0x10000},
{0, 0x20000},
{0, 0x40000},
{0, 0x80000},
{0, 0x100000},
{0, 0x200000},
{0, 0x400000},
{0, 0x800000},
{0, 0x800000},
{0, 0x800000},
S48_16(0.0),
S48_16(0.0),
S48_16(0.0),
S48_16(0.0),
S48_16(0.0),
S48_16(0.0),
S48_16(0.10001),
S48_16(0.25),
S48_16(0.5),
S48_16(0.75),
S48_16(1.0),
S48_16(2.0),
S48_16(4.0),
S48_16(8.0),
S48_16(16.0),
S48_16(32.0),
S48_16(64.0),
S48_16(128.0),
S48_16(128.0),
S48_16(128.0)
};
const s16 gWarpScarfActivationChances[WARP_SCARF_ACTIVATION_CHANCES_COUNT] = {0, 6, 12, 30, 50, 70, 90, 110, 130, 150, 170, 190, 210, 230, 250, 270, 290, 310, 999, 0};
@ -1036,4 +1035,12 @@ const s32 gUnknown_80F5FAC[76] = {
1, 1, 2, 1, 1, 4, 4, 1
};
const s32 gUnknown_80F60DC[5] = {1, 1, 1, 2, 4};
// belly will go down by this amount after using linked moves
// value depends on number of moves that are linked
const s32 gLinkedMovesBellyGoDownValues[5] = {
1, // 0 moves
1, // 1 move
1, // 2 moves
2, // 3 moves
4 // 4 moves
};

View File

@ -533,7 +533,7 @@ void DisplayPreFightDialogue(void)
sub_8097FF8();
}
void sub_8084E00(Entity *entity, u8 param_2, u8 param_3)
void sub_8084E00(Entity *entity, u8 param_2, bool8 param_3)
{
if (param_2 != 0) {
switch(gDungeon->unk3A0D) {
@ -965,7 +965,7 @@ static void sub_8085764(void)
{
entity = gDungeon->wildPokemon[index];
if ((EntityIsValid(entity)) && (GetEntInfo(entity)->monsterBehavior == BEHAVIOR_ALLY)) {
HandleFaint(entity,0x207,&stackEntity);
HandleFaint(entity,DUNGEON_EXIT_DEBUG_DAMAGE,&stackEntity);
}
}
}

View File

@ -88,7 +88,7 @@ void sub_8087FF8(void)
sub_8085930(DIRECTION_NORTH);
sub_80855E4(sub_8086A3C);
if (sub_8086AE4(MONSTER_ARTICUNO)) {
HandleFaint(articunoEntity,0x21c,0);
HandleFaint(articunoEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
}
else {
LevelUpTarget(articunoEntity,articunoEntity,gArticunoConfigLevel,0,0);

View File

@ -79,7 +79,7 @@ void CelebiJoinDialogue(void)
celebiEntity = GetEntityFromMonsterBehavior(BEHAVIOR_CELEBI);
if ((HasRecruitedMon(MONSTER_CELEBI)) || (!sub_806FD18(celebiEntity)))
{
HandleFaint(celebiEntity,0x21c,0);
HandleFaint(celebiEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
SpriteLookAroundEffect(leaderEntity);
sub_803E708(10,0x46);
// .........

View File

@ -134,7 +134,7 @@ static void sub_808C550(void)
static void sub_808C590(Entity *r0)
{
HandleFaint(r0, 0x21C, 0);
HandleFaint(r0, DUNGEON_EXIT_DELETED_FOR_EVENT, 0);
}
static void SetupDeoxysFacingDirection(Entity *deoxysEntity)

View File

@ -66,7 +66,7 @@ void sub_8089C90(void)
sub_80854D4();
sub_8085930(DIRECTION_NORTH);
if (HasRecruitedMon(MONSTER_ENTEI)) {
HandleFaint(EnteiEntity,0x21c,0);
HandleFaint(EnteiEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
}
else {
SetFacingDirection(EnteiEntity, DIRECTION_SOUTH);

View File

@ -85,7 +85,7 @@ void sub_80886C4(void)
sub_8085374();
sub_80854D4();
sub_8085930(DIRECTION_NORTH);
HandleFaint(alakazamEntity,0x21c,0);
HandleFaint(alakazamEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
SetFacingDirection(groudonEntity, DIRECTION_SOUTH);
sub_8086A3C(groudonEntity);
sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y);
@ -109,9 +109,9 @@ void sub_808875C(void)
sub_80854D4();
sub_8085930(DIRECTION_NORTH);
sub_80855E4(sub_8086A3C);
HandleFaint(alakazamEntity,0x21c,0);
HandleFaint(alakazamEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
if (sub_8086AE4(MONSTER_GROUDON)) {
HandleFaint(groudonEntity,0x21c,0);
HandleFaint(groudonEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
}
else {
LevelUpTarget(groudonEntity,groudonEntity,gGroudonConfigLevel,0,0);
@ -179,7 +179,7 @@ void GroudonPreFightDialogue(void)
sub_80861B8(alakazamEntity,6,DIRECTION_NORTH);
PlaySoundEffect(0x205);
sub_8086738();
HandleFaint(alakazamEntity,0x21c,0);
HandleFaint(alakazamEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
DisplayDungeonDialogue(&GroudonPreFightDialogue_8);
sub_803E708(10,0x46);
DisplayDungeonDialogue(&GroudonPreFightDialogue_9);

View File

@ -72,7 +72,7 @@ void sub_808A668(void)
sub_80854D4();
sub_8085930(DIRECTION_NORTH);
if (HasRecruitedMon(MONSTER_HO_OH)) {
HandleFaint(HoOhEntity,0x21c,0);
HandleFaint(HoOhEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
}
else {
SetFacingDirection(HoOhEntity, DIRECTION_SOUTH);

View File

@ -84,7 +84,7 @@ void sub_808B35C(void)
sub_8085930(DIRECTION_NORTH);
sub_80855E4(sub_8086A3C);
if (HasRecruitedMon(MONSTER_JIRACHI)) {
HandleFaint(jirachiEntity,0x21c,0);
HandleFaint(jirachiEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
}
else {
SetFacingDirection(jirachiEntity, DIRECTION_SOUTH);

View File

@ -58,7 +58,7 @@ void sub_808C10C(void)
sub_80854D4();
sub_8085930(DIRECTION_NORTH);
if (HasRecruitedMon(MONSTER_KYOGRE)) {
HandleFaint(kyogreEntity,0x21c,0);
HandleFaint(kyogreEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
}
else {
gDungeon->unk7 = 1;

View File

@ -84,7 +84,7 @@ void sub_808AA94(void)
sub_80854D4();
sub_8085930(DIRECTION_NORTH);
sub_80855E4(sub_8086A3C);
HandleFaint(LatiosEntity,0x21c,0);
HandleFaint(LatiosEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y - 3);
CopyMonsterNameToBuffer(gFormatBuffer_Monsters[2], MONSTER_LATIOS);
}

View File

@ -56,7 +56,7 @@ void sub_808BDEC(void)
sub_80855E4(sub_8086A3C);
if (HasRecruitedMon(MONSTER_LUGIA)) {
DungeonStartNewBGM(MUS_FRIEND_AREA_CRYPTIC_CAVE);
HandleFaint(lugiaEntity,0x21c,0);
HandleFaint(lugiaEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
}
else {
gDungeon->unk7 = 1;

View File

@ -79,8 +79,8 @@ void sub_8088E5C(void)
sub_80854D4();
sub_8085930(DIRECTION_NORTH);
sub_80855E4(sub_8086A3C);
HandleFaint(groudonEntity,0x21c,0);
HandleFaint(alakazamEntity,0x21c,0);
HandleFaint(groudonEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
HandleFaint(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);

View File

@ -150,7 +150,7 @@ void sub_80898E4(void)
static void sub_80898F8(Entity *r0)
{
HandleFaint(r0, 0x21C, 0);
HandleFaint(r0, DUNGEON_EXIT_DELETED_FOR_EVENT, 0);
}
static void sub_8089908(Entity *r0)

View File

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

View File

@ -72,7 +72,7 @@ void sub_8089978(void)
sub_80855E4(sub_8086A3C);
if(HasRecruitedMon(MONSTER_MEWTWO)){
DungeonStartNewBGM(MUS_FRIEND_AREA_CRYPTIC_CAVE);
HandleFaint(MewtwoEntity,0x21c,0);
HandleFaint(MewtwoEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
}
else {
gDungeon->unk7 = 1;

View File

@ -79,7 +79,7 @@ void sub_8087848(void)
sub_8085930(DIRECTION_WEST);
sub_80855E4(sub_8086A3C);
if (sub_8086AE4(MONSTER_MOLTRES)) {
HandleFaint(moltresEntity,0x21c,0);
HandleFaint(moltresEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
}
else {
LevelUpTarget(moltresEntity,moltresEntity,gMoltresConfigLevel,0,0);

View File

@ -82,7 +82,7 @@ void sub_8089F8C(void)
sub_80854D4();
sub_8085930(DIRECTION_NORTH);
if (HasRecruitedMon(MONSTER_RAIKOU)) {
HandleFaint(RaikouEntity,0x21c,0);
HandleFaint(RaikouEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
}
else {
SetFacingDirection(RaikouEntity, DIRECTION_SOUTH);

View File

@ -72,7 +72,7 @@ void sub_8089328(void)
sub_8085930(DIRECTION_NORTH);
sub_80855E4(sub_8086A3C);
if (sub_8086AE4(MONSTER_RAYQUAZA)) {
HandleFaint(rayquazaEntity,0x21c,0);
HandleFaint(rayquazaEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
}
else {
LevelUpTarget(rayquazaEntity,rayquazaEntity,gRayquazaConfigLevel,0,0);

View File

@ -51,7 +51,7 @@ void sub_808ACC0(void)
if (HasRecruitedMon(MONSTER_REGIROCK)) {
entity = GetEntityFromMonsterBehavior(BEHAVIOR_REGIROCK);
HandleFaint(entity,0x21c,0);
HandleFaint(entity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
sub_8097FA8(0x22);
sub_8097FA8(0x1d);
sub_808B1CC(ITEM_ROCK_PART);
@ -78,7 +78,7 @@ void sub_808AD48(void)
if (HasRecruitedMon(MONSTER_REGICE)) {
entity = GetEntityFromMonsterBehavior(BEHAVIOR_REGICE);
HandleFaint(entity,0x21c,0);
HandleFaint(entity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
sub_8097FA8(0x22);
sub_8097FA8(0x1d);
sub_808B1CC(ITEM_ICE_PART);
@ -106,7 +106,7 @@ void sub_808ADCC(void)
if (HasRecruitedMon(MONSTER_REGISTEEL)) {
entity = GetEntityFromMonsterBehavior(BEHAVIOR_REGISTEEL);
HandleFaint(entity,0x21c,0);
HandleFaint(entity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
sub_8097FA8(0x22);
sub_8097FA8(0x1d);
sub_808B1CC(ITEM_STEEL_PART);

View File

@ -71,8 +71,8 @@ void sub_8086B94(void)
diglettEntity = GetEntityFromMonsterBehavior(BEHAVIOR_DIGLETT);
skarmoryEntity = GetEntityFromMonsterBehavior(BEHAVIOR_SKARMORY);
HandleFaint(skarmoryEntity,0x21c,0);
HandleFaint(diglettEntity,0x21c,0);
HandleFaint(skarmoryEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
HandleFaint(diglettEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
sub_80854D4();
sub_8085930(DIRECTION_NORTH);
sub_8085860(leaderEntity->pos.x,leaderEntity->pos.y);

View File

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

View File

@ -84,7 +84,7 @@ void sub_808A308(void)
sub_80854D4();
sub_8085930(DIRECTION_NORTH);
if (HasRecruitedMon(MONSTER_SUICUNE)) {
HandleFaint(SuicuneEntity,0x21c,0);
HandleFaint(SuicuneEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
}
else {
SetFacingDirection(SuicuneEntity, DIRECTION_SOUTH);

View File

@ -82,7 +82,7 @@ void sub_808729C(void)
sub_8085930(4);
sub_80855E4(sub_8086A3C);
if (sub_8086AE4(0x91) != 0) {
HandleFaint(zapdosEntity,0x21c,0);
HandleFaint(zapdosEntity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
}
else {
LevelUpTarget(zapdosEntity,zapdosEntity,gZapdosConfigLevel,0,0);

View File

@ -72,7 +72,7 @@ extern void sub_8042978(Entity *);
extern void sub_804298C(Entity *);
extern void sub_80428EC(Entity *);
static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struct DamageStruct *r5, bool32 isFalseSwipe, bool32 giveExp, s16 arg4_, s32 arg8);
static bool8 HandleDealingDamageInternal(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);
@ -89,14 +89,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 arg4, bool32 arg8, s32 argC)
void HandleDealingDamage(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 arg4 again
s32 r10 = arg4;
// 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, r10, argC))
if (HandleDealingDamageInternal(attacker, target, dmgStruct, isFalseSwipe, giveExp, dungeonExitReason, argC))
return;
if (dmgStruct->tookNoDamage)
return;
@ -152,12 +152,12 @@ void HandleDealingDamage(Entity *attacker, Entity *target, struct DamageStruct *
TryDisplayDungeonLoggableMessage3(attacker, target, gUnknown_80FCFA4);
sp.dmg = (dmgStruct->dmg * returnDmg) / 4;
sp.type = dmgStruct->type;
sp.residualDmgType = 6;
sp.residualDmgType = RESIDUAL_DAMAGE_COUNTERATTACK;
sp.typeEffectiveness = 2;
sp.isCrit = FALSE;
sp.unkE = 0;
sp.tookNoDamage = FALSE;
HandleDealingDamageInternal(target, attacker, &sp, FALSE, giveExp, r10, argC);
HandleDealingDamageInternal(target, attacker, &sp, FALSE, giveExp, dungeonExitReason, argC);
}
}
if (!EntityIsValid(attacker) || !EntityIsValid(target))
@ -246,7 +246,7 @@ void HandleDealingDamage(Entity *attacker, Entity *target, struct DamageStruct *
}
else {
sub_8041D00(destBondTarget, target);
DealDamageToEntity(destBondTarget, dmgStruct->dmg, 0xC, 0x1F9);
DealDamageToEntity(destBondTarget, dmgStruct->dmg, RESIDUAL_DAMAGE_DESTINY_BOND, DUNGEON_EXIT_FAINTED_FROM_DESTINY_BOND);
}
}
}
@ -257,11 +257,11 @@ static inline u32 ItemId(Item *item)
return item->id;
}
static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struct DamageStruct *dmgStruct, bool32 isFalseSwipe, bool32 giveExp, s16 arg4_, s32 arg8)
static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struct DamageStruct *dmgStruct, bool32 isFalseSwipe, bool32 giveExp, s16 dungeonExitReason_, s32 arg8)
{
s32 hpBefore, hpChange;
EntityInfo *targetData;
s32 arg4 = arg4_;
s32 dungeonExitReason = dungeonExitReason_;
bool32 var_24 = FALSE;
bool32 r10 = FALSE;
s32 r8 = 0;
@ -283,7 +283,7 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc
dmgStruct->dmg = gSetDamageDmgValue;
}
if (arg4 != 0x20E && AbilityIsActive(target, ABILITY_STURDY) && dmgStruct->dmg == 9999) {
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);
sub_8042238(attacker, target);
@ -375,7 +375,7 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc
targetData->unkA0 = 999;
if (ShouldDisplayEntity(target)) {
if (dmgStruct->residualDmgType != 14) {
if (dmgStruct->residualDmgType != RESIDUAL_DAMAGE_HUNGER) {
sub_803ED30(-dmgStruct->dmg, target, 1, -1);
}
if (targetData->unk152 == 0 && str != NULL) {
@ -389,7 +389,7 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc
}
}
if ((dmgStruct->residualDmgType != 14 || targetData->HP <= 1) && unkTile == NULL && ShouldDisplayEntity(target)) {
if ((dmgStruct->residualDmgType != RESIDUAL_DAMAGE_HUNGER || targetData->HP <= 1) && unkTile == NULL && ShouldDisplayEntity(target)) {
if ((attacker->pos.x != target->pos.x || attacker->pos.y != target->pos.y) && GetEntityType(attacker) == ENTITY_MONSTER) {
bool32 unkBool = FALSE;
if (targetData->isTeamLeader) {
@ -481,7 +481,7 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc
targetData->unk14C = 0;
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0], attacker, 0);
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[1], target, 0);
if (dmgStruct->residualDmgType == 19 || dmgStruct->residualDmgType == 20) {
if (dmgStruct->residualDmgType == RESIDUAL_DAMAGE_MOVE_FAIL || dmgStruct->residualDmgType == RESIDUAL_DAMAGE_RECOIL) {
if (targetData->isNotTeamMember) {
TryDisplayDungeonLoggableMessage3(attacker, target, gUnknown_80F9E44);
}
@ -539,7 +539,7 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc
targetData->unk14C = 1;
targetData->belly = targetData->maxBelly;
if (targetData->isTeamLeader) {
gDungeon->unk644.unk35 = 0;
gDungeon->unk644.emptyBellyAlert = 0;
gDungeon->unk644.itemHoldersIdentified = 0;
}
ZeroOutItem(&targetData->heldItem);
@ -586,7 +586,7 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc
sub_8042148(target);
monPos = teamMember->pos;
HandleFaint(teamMember, 0x221, target);
HandleFaint(teamMember, DUNGEON_EXIT_WAS_POSSESSED, target);
sub_80694C0(target, monPos.x, monPos.y, 1);
UpdateEntityPixelPos(target, NULL);
target->unk22 = 0;
@ -596,7 +596,7 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc
targetData->unk14C = 1;
targetData->belly = targetData->maxBelly;
if (targetData->isTeamLeader) {
gDungeon->unk644.unk35 = 0;
gDungeon->unk644.emptyBellyAlert = 0;
gDungeon->unk644.itemHoldersIdentified = 0;
}
ZeroOutItem(heldItem);
@ -651,7 +651,7 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc
targetData->unk14C = 1;
targetData->belly = targetData->maxBelly;
if (targetData->isTeamLeader) {
gDungeon->unk644.unk35 = 0;
gDungeon->unk644.emptyBellyAlert = 0;
gDungeon->unk644.itemHoldersIdentified = 0;
}
if (targetData->curseClassStatus.status == STATUS_SNATCH) {
@ -737,18 +737,18 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc
sub_8069D4C(&sp, target);
if (sub_806F660(attacker, target)) {
if (!sub_806FA5C(attacker, target, &sp)) {
HandleFaint(target, 0x1F5, attacker);
HandleFaint(target, DUNGEON_EXIT_LEFT_WITHOUT_BEING_BEFRIENDED, attacker);
}
else {
gUnknown_202F221 = 1;
}
}
else {
HandleFaint(target, arg4, attacker);
HandleFaint(target, dungeonExitReason, attacker);
}
}
else {
HandleFaint(target, arg4, attacker);
HandleFaint(target, dungeonExitReason, attacker);
}
return TRUE;
@ -994,7 +994,7 @@ s32 WeightWeakTypePicker(Entity *user, Entity *target, u8 moveType)
weight /= 2;
if (weight == 0)
{
// BUG: If the Pokémon's first type resists the move, the second type is ignored.
// BUG: If the Pokémon's first type resists the move, the second type is ignored.
// This calculates type effectiveness incorrectly if the first type resists the move and the second type is weak to the move.
// For example, a Fire-type move is considered not very effective against a Rock/Bug-type like Anorith.
return 2;
@ -1184,7 +1184,7 @@ static void ApplyAtkDefStatBoosts(Entity *attacker, Entity *target, u8 moveType,
static inline void SetDamageOne(struct DamageStruct *dmgStruct, u8 moveType)
{
dmgStruct->dmg = 1;
dmgStruct->residualDmgType = 0;
dmgStruct->residualDmgType = RESIDUAL_DAMAGE_REGULAR;
dmgStruct->typeEffectiveness = EFFECTIVENESS_NEUTRAL;
dmgStruct->type = moveType;
dmgStruct->isCrit = FALSE;
@ -1448,7 +1448,7 @@ void CalcDamage(Entity *attacker, Entity *target, u8 moveType, s32 movePower, s3
gDungeon->unk134.unk158 = FP48_16_ToS32(&unkSp9);
dmgStruct->dmg = FP48_16_ToS32(&unkSp8);
dmgStruct->residualDmgType = 0;
dmgStruct->residualDmgType = RESIDUAL_DAMAGE_REGULAR;
if (dmgStruct->dmg == 0) {
dmgStruct->isCrit = FALSE;
}
@ -1469,31 +1469,31 @@ void sub_806F2BC(Entity *attacker, Entity *target, u8 moveType, s32 a2, struct D
FP48_16_FromS32(&unkSp2, a2New);
F48_16_SMul(&unkSp2, &unkSp2, &unkSp1);
dmgStruct->dmg = FP48_16_ToS32(&unkSp2);
dmgStruct->residualDmgType = 0;
dmgStruct->residualDmgType = RESIDUAL_DAMAGE_REGULAR;
}
void DealDamageToEntity(Entity *entity, s32 dmg, s32 r6, s32 r4)
void DealDamageToEntity(Entity *entity, s32 dmg, s32 residualDmgType, s32 dungeonExitReason_)
{
Entity spEntity;
struct DamageStruct dmgStruct;
s32 r4_ = (s16) r4;
s32 dungeonExitReason = (s16) dungeonExitReason_;
sub_80457DC(&spEntity);
dmgStruct.dmg = dmg;
dmgStruct.typeEffectiveness = EFFECTIVENESS_NEUTRAL;
dmgStruct.type = TYPE_NONE;
dmgStruct.residualDmgType = r6;
dmgStruct.residualDmgType = residualDmgType;
dmgStruct.isCrit = FALSE;
dmgStruct.unkE = 0;
dmgStruct.tookNoDamage = FALSE;
HandleDealingDamage(&spEntity, entity, &dmgStruct, FALSE, FALSE, r4_, FALSE, 0);
HandleDealingDamage(&spEntity, entity, &dmgStruct, FALSE, FALSE, dungeonExitReason, FALSE, 0);
}
void sub_806F370(Entity *pokemon, Entity *target, s32 dmg, s32 giveExp, bool8 *tookNoDamage, u8 moveType, s16 arg_8, s32 residualDmgType, s32 arg_10, s32 arg_14)
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)
{
s32 i;
struct DamageStruct dmgStruct;
s32 arg_8_ = arg_8;
s32 dungeonExitReason = dungeonExitReason_;
s32 dmgNew = dmg;
dmgStruct.typeEffectiveness = EFFECTIVENESS_NEUTRAL;
@ -1524,7 +1524,7 @@ void sub_806F370(Entity *pokemon, Entity *target, s32 dmg, s32 giveExp, bool8 *t
dmgStruct.tookNoDamage = FALSE;
}
HandleDealingDamage(pokemon, target, &dmgStruct, FALSE, giveExp, arg_8_, arg_10, arg_14);
HandleDealingDamage(pokemon, target, &dmgStruct, FALSE, giveExp, dungeonExitReason, arg_10, arg_14);
if (tookNoDamage != NULL) {
*tookNoDamage = dmgStruct.tookNoDamage;
}

View File

@ -135,7 +135,7 @@ void sub_80479B8(char param_1, char param_2, u8 param_3, Entity *pokemon, Entity
sub_8045BF8(gFormatBuffer_Items[0],item);
TryDisplayDungeonLoggableMessage3(pokemon,target,gItemStickyDoesntWorkText);
if (param_1 != '\0') {
sub_806F370(pokemon,target,gUnknown_80F4FAE,1,&uStack_24,0,0x217,0,0,0);
sub_806F370(pokemon,target,gUnknown_80F4FAE,1,&uStack_24,0,DUNGEON_EXIT_FELLED_BY_THROWN_ITEM,RESIDUAL_DAMAGE_REGULAR,0,0);
EnemyEvolution(pokemon);
return;
}
@ -151,7 +151,7 @@ _jump:
}
if ((GetItemCategory(item->id) == CATEGORY_TMS_HMS) || (GetItemCategory(item->id) == CATEGORY_LINK_BOX)) {
if (param_1 != '\0') {
sub_806F370(pokemon,target,gUnknown_80F4FAC,1,&uStack_23,0,0x217,0,0,0);
sub_806F370(pokemon,target,gUnknown_80F4FAC,1,&uStack_23,0,DUNGEON_EXIT_FELLED_BY_THROWN_ITEM,RESIDUAL_DAMAGE_REGULAR,0,0);
goto _080482B4;
}
else
@ -356,7 +356,7 @@ _jump:
break;
default:
if (param_1 != '\0') {
sub_806F370(pokemon,target,gUnknown_80F4FAC,1,&auStack_22,0,0x217,0,0,0);
sub_806F370(pokemon,target,gUnknown_80F4FAC,1,&auStack_22,0,DUNGEON_EXIT_FELLED_BY_THROWN_ITEM,RESIDUAL_DAMAGE_REGULAR,0,0);
}
else
{
@ -386,7 +386,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, 528, 0, 0, 0);
sub_806F370(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)
@ -590,7 +590,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, 0x216, 0, 0, 0);
sub_806F370(pokemon, target, dmg, 1, auStack28, 0, DUNGEON_EXIT_DEFEATED_BLAST_SEED, RESIDUAL_DAMAGE_REGULAR, 0, 0);
}
else
{
@ -613,7 +613,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, 0x216, 0, 0, 0);
sub_806F370(pokemon, entity, dmg, 1, auStack28, 0, DUNGEON_EXIT_DEFEATED_BLAST_SEED, RESIDUAL_DAMAGE_REGULAR, 0, 0);
}
}
}
@ -924,7 +924,7 @@ static void KeyItemAction(Entity *pokemon, Entity *target, u8 r2)
{
u8 temp;
if(r2 != 0)
sub_806F370(pokemon, target, gUnknown_80F4FAC, 1, &temp, 0, 0x217, 0, 0, 0);
sub_806F370(pokemon, target, gUnknown_80F4FAC, 1, &temp, 0, DUNGEON_EXIT_FELLED_BY_THROWN_ITEM, RESIDUAL_DAMAGE_REGULAR, 0, 0);
else
sub_8051E7C(pokemon);
}

View File

@ -127,7 +127,7 @@ void sub_8084448(Entity *pokemon)
sub_80843BC(entInfo->id);
sub_8042A34(&pokemon->pos);
HandleFaint(pokemon,0x21c,0);
HandleFaint(pokemon,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
sub_804178C(1);
while(1) {
if (DisplayDungeonYesNoMessage(0,str,1) == 1) {
@ -186,8 +186,8 @@ void sub_80845E0(Entity *pokemon)
info2->joinedAt.id = gDungeon->unk644.dungeonLocation.id;
sub_8042A34(&pokemon->pos);
sub_8042A34(&entity->pos);
HandleFaint(pokemon,0x21c,0);
HandleFaint(entity,0x21c,0);
HandleFaint(pokemon,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
HandleFaint(entity,DUNGEON_EXIT_DELETED_FOR_EVENT,0);
sub_804178C(1);
while(1) {
if (DisplayDungeonYesNoMessage(0,gUnknown_80FA4D8,1) == 1) {

View File

@ -1056,7 +1056,7 @@ void sub_805F02C(void)
DisplayDungeonLoggableMessageTrue(r7, gUnknown_80F9C2C);
}
else {
gDungeon->unk644.unk35 = 0;
gDungeon->unk644.emptyBellyAlert = 0;
r8->isTeamLeader = TRUE;
leaderInfo->isTeamLeader = FALSE;
for (i = 0; i < 4; i++) {

View File

@ -16,6 +16,7 @@
#include "dungeon_menu_recruitment.h"
#include "dungeon_message.h"
#include "dungeon_message_log.h"
#include "dungeon_misc.h"
#include "dungeon_music.h"
#include "dungeon_strings.h"
#include "dungeon_submenu.h"
@ -441,7 +442,7 @@ static bool8 AskToGiveUp(void)
return TRUE;
}
SetMonsterActionFields(GetLeaderActionContainer(), ACTION_GIVE_UP);
sub_8083AB0(0x21B, NULL, GetLeader());
sub_8083AB0(DUNGEON_EXIT_GAVE_UP_EXPLORATION, NULL, GetLeader());
gDungeon->unk644.unk10 = 1;
return FALSE;
}

View File

@ -466,12 +466,12 @@ static inline void ClearMonItemId(Pokemon *mon)
mon->heldItem.id = ITEM_NOTHING;
}
void HandleFaint(Entity *entity, s32 param_2, Entity *param_3)
void HandleFaint(Entity *entity, s32 dungeonExitReason_, Entity *param_3)
{
u16 joinId;
Entity EStack_a4;
s32 i;
s32 unkArg = (s16) param_2;
s32 dungeonExitReason = (s16) dungeonExitReason_;
EntityInfo *entInfo = GetEntInfo(entity);
Tile *tile = GetTileAtEntitySafe(entity);
if (param_3 == NULL) {
@ -521,9 +521,9 @@ void HandleFaint(Entity *entity, s32 param_2, Entity *param_3)
DisplayMessageLog();
if (gDungeon->unk6 == 0) {
if (gDungeon->unk644.unk2A == 0
&& unkArg != 0x21c
&& unkArg != 0x222
&& unkArg != 0x21e
&& dungeonExitReason != DUNGEON_EXIT_DELETED_FOR_EVENT
&& dungeonExitReason != DUNGEON_EXIT_FAILED_TO_PROTECT_CLIENT
&& dungeonExitReason != DUNGEON_EXIT_BLOWN_OUT_UNSEEN_FORCE
&& gDungeon->unk3A0D == 0
&& gDungeon->unk644.unk37 >= 0
&& gDungeon->unk644.unk34 != TRUE)
@ -550,8 +550,8 @@ void HandleFaint(Entity *entity, s32 param_2, Entity *param_3)
return;
}
sub_8083AB0(unkArg,param_3,entity);
if (unkArg == 0x21f) {
sub_8083AB0(dungeonExitReason,param_3,entity);
if (dungeonExitReason == DUNGEON_EXIT_RETURNED_WITH_FALLEN_PARTNER) {
EntityInfo *partnerInfo = NULL;
for (i = 0; i < MAX_TEAM_MEMBERS; i++) {
Entity *teamMon = gDungeon->teamPokemon[i];
@ -597,8 +597,8 @@ void HandleFaint(Entity *entity, s32 param_2, Entity *param_3)
SubstitutePlaceholderStringTags(gDungeon->faintStringBuffer,entity,0);
}
if (GetLeader() != NULL && unkArg != 0x21c && !entInfo->isTeamLeader && !gDungeon->unk10) {
sub_8084E00(entity,entInfo->monsterBehavior, unkArg == 500);
if (GetLeader() != NULL && dungeonExitReason != DUNGEON_EXIT_DELETED_FOR_EVENT && !entInfo->isTeamLeader && !gDungeon->unk10) {
sub_8084E00(entity,entInfo->monsterBehavior, dungeonExitReason == DUNGEON_EXIT_TRANSFORMED_INTO_FRIEND);
if (IS_DEOXYS_FORM_MONSTER(entInfo->apparentID) && !IsBossFight() && entInfo->isNotTeamMember) {
gDungeon->deoxysDefeat = 1;
DisplayDungeonLoggableMessageTrue(entity,gUnknown_80FA580);

View File

@ -786,7 +786,7 @@ static void InitEntityFromSpawnInfo(bool8 a0, Entity *entity, struct MonSpawnInf
entInfo->unk165 = 0xFF;
entInfo->expGainedInTurn = 0;
entInfo->waiting = 0;
entInfo->unk146 = 0;
entInfo->bellyEmpty = FALSE;
entInfo->unk166 = 0;
entInfo->unk1F8 = 0;
entInfo->mobileTurnTimer = 0;
@ -800,7 +800,7 @@ static void InitEntityFromSpawnInfo(bool8 a0, Entity *entity, struct MonSpawnInf
entInfo->visualFlags = 0;
entInfo->previousVisualFlags = 0;
entInfo->unk152 = 0;
entInfo->unk153 = 0;
entInfo->usedLinkedMovesCounter = 0;
entInfo->unk154 = 0;
entInfo->unk155 = 0;
entInfo->turnsSinceWarpScarfActivation = 0;

View File

@ -46,7 +46,7 @@
#include "warp_target.h"
extern void sub_80429C8(Entity *r0);
extern s16 sub_8057600(Move *move, s32 itemID);
extern s16 GetDungeonExitReasonFromMoveOrItem(Move *move, s32 itemID);
extern void sub_8042238(Entity *pokemon, Entity *target);
extern void sub_806A1E8(Entity *pokemon);
extern void sub_804178C(u32);
@ -1353,31 +1353,31 @@ bool8 HandleRegularDamagingMove(Entity *attacker, Entity *target, Move *move, s3
s32 HandleDamagingMove(Entity *attacker, Entity *target, Move *move, s24_8 modifier, s32 itemId)
{
struct DamageStruct dmgStruct;
s16 unk;
s16 dungeonExitReason;
s32 moveType = GetMoveTypeForMonster(attacker, move);
s32 movePower = GetMovePower(attacker, move);
s32 critChance = GetMoveCritChance(move);
CalcDamage(attacker, target, moveType, movePower, critChance, &dmgStruct, modifier, move->id, 1);
unk = sub_8057600(move, itemId);
return TryHitTarget(attacker, target, move, &dmgStruct, unk);
dungeonExitReason = GetDungeonExitReasonFromMoveOrItem(move, itemId);
return TryHitTarget(attacker, target, move, &dmgStruct, dungeonExitReason);
}
s32 sub_80556BC(Entity *attacker, Entity *target, u8 moveType, Move *move, s24_8 modifier, s32 itemId)
{
struct DamageStruct dmgStruct;
s16 unk;
s16 dungeonExitReason;
s32 movePower = GetMovePower(attacker, move);
s32 critChance = GetMoveCritChance(move);
CalcDamage(attacker, target, moveType, movePower, critChance, &dmgStruct, modifier, move->id, 1);
unk = sub_8057600(move, itemId);
return TryHitTarget(attacker, target, move, &dmgStruct, unk);
dungeonExitReason = GetDungeonExitReasonFromMoveOrItem(move, itemId);
return TryHitTarget(attacker, target, move, &dmgStruct, dungeonExitReason);
}
static s32 TryHitTarget(Entity *attacker, Entity *target, Move *move, struct DamageStruct *dmgStruct, s16 unk_)
static s32 TryHitTarget(Entity *attacker, Entity *target, Move *move, struct DamageStruct *dmgStruct, s16 dungeonExitReason_)
{
s32 unk = unk_; // It's happening again...
s32 dungeonExitReason = dungeonExitReason_; // It's happening again...
if (AccuracyCalc(attacker, target, move, ACCURACY_2, TRUE)) { // Move hits
bool32 isFalseSwipe = (move->id == MOVE_FALSE_SWIPE);
@ -1387,7 +1387,7 @@ static s32 TryHitTarget(Entity *attacker, Entity *target, Move *move, struct Dam
gDungeon->unk17B40 = target->spawnGenID;
}
HandleDealingDamage(attacker, target, dmgStruct, isFalseSwipe, TRUE, unk, TRUE, 0);
HandleDealingDamage(attacker, target, dmgStruct, isFalseSwipe, TRUE, dungeonExitReason, TRUE, 0);
}
else {
SetMessageArgument_2(gFormatBuffer_Monsters[1], GetEntInfo(target), 0);
@ -1419,7 +1419,7 @@ s32 sub_8055864(Entity *attacker, Entity *target, Move *move, s32 param_4, s32 i
s32 moveType = GetMoveTypeForMonster(attacker, move);
sub_806F2BC(attacker, target, moveType, param_4, &dmgStruct);
HandleDealingDamage(attacker, target, &dmgStruct, FALSE, TRUE, sub_8057600(move, itemId), TRUE, 0);
HandleDealingDamage(attacker, target, &dmgStruct, FALSE, TRUE, GetDungeonExitReasonFromMoveOrItem(move, itemId), TRUE, 0);
if (dmgStruct.tookNoDamage) {
return 0;
}

View File

@ -394,8 +394,8 @@ bool8 TryUseChosenMove(struct Entity *attacker, u32 r6, s32 itemId, u32 var_30,
gUnknown_202F21A = 0;
gUnknown_202F21C = 0;
gUnknown_202F220 = 0;
if (isLinkedMove && GetEntInfo(attacker)->unk153 <= 3) {
GetEntInfo(attacker)->unk153++;
if (isLinkedMove && GetEntInfo(attacker)->usedLinkedMovesCounter <= 3) {
GetEntInfo(attacker)->usedLinkedMovesCounter++;
}
var_2C = sub_8057070(move);
@ -1398,9 +1398,9 @@ void sub_8057588(Entity * pokemon, u8 param_2)
}
}
s16 sub_8057600(Move *move, s32 itemID)
s16 GetDungeonExitReasonFromMoveOrItem(Move *move, s32 itemID)
{
return sub_8094828(move->id, ToItemID(itemID));
return GetDungeonExitReasonFromMoveOrItemID(move->id, ToItemID(itemID));
}
static u8 ToItemID(u32 itemID)

View File

@ -1,5 +1,6 @@
#include "global.h"
#include "globaldata.h"
#include "dungeon_misc.h"
#include "dungeon_run_end.h"
#include "structs/str_dungeon.h"
#include "data_serializer.h"
@ -132,14 +133,14 @@ void PrintOnDungeonFinishedWindow(u32 windowId, const u8 *headerText, UnkDungeon
sub_80073E0(windowId);
}
s16 sub_8094828(u16 moveID, u8 id)
s16 GetDungeonExitReasonFromMoveOrItemID(u16 moveID, u8 id)
{
if(id != 0)
{
if(GetItemCategory(id) == CATEGORY_ORBS)
return 0x223;
return DUNGEON_EXIT_FAINTED_FROM_WONDER_ORB;
else
return 0x224;
return DUNGEON_EXIT_FAINTED_FROM_ITEM;
}
else
{

View File

@ -363,7 +363,7 @@ static void WriteMonster(DataSerializer *seri, Entity *src)
WriteBool8(seri, info->aiAllySkip);
WriteBool8(seri, info->recalculateFollow);
WriteBool8(seri, info->waiting);
WriteBool8(seri, info->unk146);
WriteBool8(seri, info->bellyEmpty);
WriteBool8(seri, info->attacking);
WriteBool8(seri, info->unk149);
WriteBool8(seri, info->unk14A);
@ -372,7 +372,7 @@ static void WriteMonster(DataSerializer *seri, Entity *src)
WriteU16(seri, info->visualFlags);
WriteU16(seri, info->previousVisualFlags);
WriteBool8(seri, info->unk152);
WriteU8(seri, info->unk153);
WriteU8(seri, info->usedLinkedMovesCounter);
WriteBool8(seri, info->unk154);
WriteBool8(seri, info->unk155);
WriteBool8(seri, info->unk156);
@ -1047,7 +1047,7 @@ static void ReadMonster(DataSerializer *seri, bool8 isTeamMember, s32 index)
entInfo.aiAllySkip = ReadBool8(seri);
entInfo.recalculateFollow = ReadBool8(seri);
entInfo.waiting = ReadBool8(seri);
entInfo.unk146 = ReadBool8(seri);
entInfo.bellyEmpty = ReadBool8(seri);
entInfo.attacking = ReadBool8(seri);
entInfo.unk149 = ReadBool8(seri);
entInfo.unk14A = ReadBool8(seri);
@ -1056,7 +1056,7 @@ static void ReadMonster(DataSerializer *seri, bool8 isTeamMember, s32 index)
entInfo.visualFlags = ReadU16(seri);
entInfo.previousVisualFlags = ReadU16(seri);
entInfo.unk152 = ReadBool8(seri);
entInfo.unk153 = ReadU8(seri);
entInfo.usedLinkedMovesCounter = ReadU8(seri);
entInfo.unk154 = ReadBool8(seri);
entInfo.unk155 = ReadBool8(seri);
entInfo.unk156 = ReadBool8(seri);

View File

@ -33,6 +33,7 @@
#include "dungeon_strings.h"
#include "dungeon_engine.h"
#include "dungeon_damage.h"
#include "dungeon_misc.h"
#include "dungeon_range.h"
#include "dungeon_move_util.h"
#include "warp_target.h"
@ -54,7 +55,7 @@ void ApplyEndOfTurnEffects(Entity *entity)
return;
entityInfo = GetEntInfo(entity);
entityInfo->unk146 = 0;
entityInfo->bellyEmpty = FALSE;
sub_805229C();
sub_807E8F0(entity);
if (HasHeldItem(entity, ITEM_WARP_SCARF)) {
@ -74,9 +75,9 @@ void ApplyEndOfTurnEffects(Entity *entity)
}
}
// handle belly decrease
if (entityInfo->isTeamLeader) {
s48_16 sp8, sp10;
FixedPoint var_38;
s48_16 baseBellyDecrementValue, modifiedBellyDecrementValue;
FixedPoint bellyBefore;
bool8 sound;
@ -100,16 +101,16 @@ void ApplyEndOfTurnEffects(Entity *entity)
if (arrIndex >= BELLY_GO_DOWN_VALUES_COUNT)
arrIndex = BELLY_GO_DOWN_VALUES_COUNT - 1;
sp8.hi = 0;
sp8.lo = 6554;
F48_16_SMul(&sp10, &sp8, &gBellyGoDownValues[arrIndex]);
if (entityInfo->unk153 > 1)
sp10.lo += (gUnknown_80F60DC[entityInfo->unk153] << 0x10);
entityInfo->unk153 = 0;
baseBellyDecrementValue.hi = 0;
baseBellyDecrementValue.lo = 6554;
// baseBellyDecrementValue = 0.1;
F48_16_SMul(&modifiedBellyDecrementValue, &baseBellyDecrementValue, &gBellyGoDownValues[arrIndex]);
if (entityInfo->usedLinkedMovesCounter > 1)
modifiedBellyDecrementValue.lo += (gLinkedMovesBellyGoDownValues[entityInfo->usedLinkedMovesCounter] << 0x10);
entityInfo->usedLinkedMovesCounter = 0;
bellyBefore = entityInfo->belly;
var_38 = FixedPoint_SetFromUnk(&sp10);
entityInfo->belly = FixedPoint_Subtract(bellyBefore, var_38);
entityInfo->belly = FixedPoint_Subtract(bellyBefore, FixedPoint_SetFromS48_16(&modifiedBellyDecrementValue));
sound = TRUE;
if (FixedPointToInt(bellyBefore) > 19 && FixedPointToInt(entityInfo->belly) <= 19)
str = gUnknown_80FD594;
@ -127,30 +128,36 @@ void ApplyEndOfTurnEffects(Entity *entity)
DisplayActions(NULL);
if (!EntityIsValid(entity) || IsFloorOver())
return;
if (gDungeon->unk644.unk35 < 10)
gDungeon->unk644.unk35++;
if (gDungeon->unk644.unk35 == 1)
str = gUnknown_80FD5DC;
if (gDungeon->unk644.unk35 == 2)
str = gUnknown_80FD608, sound = FALSE;
if (gDungeon->unk644.unk35 == 3)
str = gUnknown_80FD628, sound = FALSE;
if (gDungeon->unk644.emptyBellyAlert < 10)
gDungeon->unk644.emptyBellyAlert++;
if (gDungeon->unk644.emptyBellyAlert == EMPTY_BELLY_ALERT_YOUR_BELLYS_EMPTY)
str = gUnknown_80FD5DC; // "Oh, no! Your Belly's empty!"
if (gDungeon->unk644.emptyBellyAlert == EMPTY_BELLY_ALERT_HURRY_EAT_SOMETHING)
{
str = gUnknown_80FD608; // "Hurry! You've got to eat something!"
sound = FALSE;
}
if (gDungeon->unk644.emptyBellyAlert == EMPTY_BELLY_ALERT_YOULL_FAINT)
{
str = gUnknown_80FD628; // "You'll faint from hunger!"
sound = FALSE;
}
TrySendImmobilizeSleepEndMsg(entity, entity);
DealDamageToEntity(entity, 1, 0xE, 0x211);
entityInfo->unk146 = 1;
DealDamageToEntity(entity, 1, RESIDUAL_DAMAGE_HUNGER, DUNGEON_EXIT_FAINTED_FROM_HUNGER);
entityInfo->bellyEmpty = TRUE;
if (FixedPointToInt(entityInfo->belly) != 0)
str = NULL;
}
else {
gDungeon->unk644.unk35 = 0;
gDungeon->unk644.emptyBellyAlert = 0;
}
if (str != NULL) {
if (sound)
PlaySoundEffect(0x153);
LogMessageByIdWithPopupCheckUser(entity, str);
sub_803E708(0x1E, 0x32);
sub_803E708(30, 0x32);
}
}
@ -159,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, 0x12, 0x220);
DealDamageToEntity(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, 0x12, 0x220);
DealDamageToEntity(entity, gHailSandstormDmgValue, RESIDUAL_DAMAGE_BAD_WEATHER, DUNGEON_EXIT_FAINTED_DUE_TO_WEATHER);
}
}
if (!EntityIsValid(entity) || IsFloorOver())
@ -202,7 +209,7 @@ void ApplyEndOfTurnEffects(Entity *entity)
return;
entityInfo->burnClassStatus.damageCountdown = gBurnDmgCountdown;
TrySendImmobilizeSleepEndMsg(entity, entity);
DealDamageToEntity(entity, gBurnDmgValue, 1, 0x208);
DealDamageToEntity(entity, gBurnDmgValue, RESIDUAL_DAMAGE_BURN, DUNGEON_EXIT_FAINTED_FROM_BURN);
}
if (!EntityIsValid(entity) || IsFloorOver())
return;
@ -215,7 +222,7 @@ void ApplyEndOfTurnEffects(Entity *entity)
return;
entityInfo->burnClassStatus.damageCountdown = gPoisonDmgCountdown;
TrySendImmobilizeSleepEndMsg(entity, entity);
DealDamageToEntity(entity, gPoisonDmgValue, 3, 0x20A);
DealDamageToEntity(entity, gPoisonDmgValue, RESIDUAL_DAMAGE_POISON, DUNGEON_EXIT_FAINTED_FROM_POISON);
}
if (!EntityIsValid(entity) || IsFloorOver())
return;
@ -234,7 +241,7 @@ void ApplyEndOfTurnEffects(Entity *entity)
return;
TrySendImmobilizeSleepEndMsg(entity, entity);
DealDamageToEntity(entity, gBadPoisonDmgValuesByTurn[turns], 3, 0x20A);
DealDamageToEntity(entity, gBadPoisonDmgValuesByTurn[turns], RESIDUAL_DAMAGE_POISON, DUNGEON_EXIT_FAINTED_FROM_POISON);
}
if (!EntityIsValid(entity) || IsFloorOver())
return;
@ -248,7 +255,7 @@ void ApplyEndOfTurnEffects(Entity *entity)
entityInfo->frozenClassStatus.damageCountdown = gConstrictionDmgCountdown;
TrySendImmobilizeSleepEndMsg(entity, entity);
sub_8041C4C(entity, entityInfo->frozenClassStatus.unk4);
DealDamageToEntity(entity, gConstrictionDmgValue, 2, 0x209);
DealDamageToEntity(entity, gConstrictionDmgValue, RESIDUAL_DAMAGE_CONSTRICT, DUNGEON_EXIT_FAINTED_FROM_CONSTRICTION);
}
if (!EntityIsValid(entity) || IsFloorOver())
return;
@ -260,7 +267,7 @@ void ApplyEndOfTurnEffects(Entity *entity)
return;
entityInfo->frozenClassStatus.damageCountdown = gWrapDmgCountdown;
TrySendImmobilizeSleepEndMsg(entity, entity);
DealDamageToEntity(entity, gWrapDmgValue, 5, 0x20B);
DealDamageToEntity(entity, gWrapDmgValue, RESIDUAL_DAMAGE_WRAP, DUNGEON_EXIT_FAINTED_FROM_WRAP);
}
if (!EntityIsValid(entity) || IsFloorOver())
return;
@ -286,7 +293,7 @@ void ApplyEndOfTurnEffects(Entity *entity)
return;
TrySendImmobilizeSleepEndMsg(entity, entity);
DealDamageToEntity(entity, dmg, 7, 0x20C);
DealDamageToEntity(entity, dmg, RESIDUAL_DAMAGE_CURSE, DUNGEON_EXIT_FELLED_BY_CURSE);
}
if (!EntityIsValid(entity) || IsFloorOver())
return;
@ -315,10 +322,10 @@ void ApplyEndOfTurnEffects(Entity *entity)
if (entityInfo->frozenClassStatus.status != STATUS_FROZEN) {
TrySendImmobilizeSleepEndMsg(entity, entity);
DealDamageToEntity(entity, hp, 9, 0x20D);
DealDamageToEntity(entity, hp, RESIDUAL_DAMAGE_LEECH_SEED, DUNGEON_EXIT_DRAINED_BY_LEECH_SEED);
if (dmgUser) {
TrySendImmobilizeSleepEndMsg(target, target);
DealDamageToEntity(target, hp, 0xD, 0x1FA);
DealDamageToEntity(target, hp, RESIDUAL_DAMAGE_LIQUID_OOZE, DUNGEON_EXIT_FAINTED_COVERED_IN_SLUDGE);
}
else {
HealTargetHP(target, target, hp, 0, TRUE);
@ -344,7 +351,7 @@ void ApplyEndOfTurnEffects(Entity *entity)
LogMessageByIdWithPopupCheckUser(entity, gPtrProtectSavedItMessage);
}
else {
DealDamageToEntity(entity, 0x270F, 0xB, 0x20E);
DealDamageToEntity(entity, 9999, RESIDUAL_DAMAGE_PERISH_SONG, DUNGEON_EXIT_FAINTED_FROM_PERISH_SONG);
}
if (!EntityIsValid(entity) || IsFloorOver())
return;
@ -401,7 +408,7 @@ void TickStatusAndHealthRegen(Entity *entity)
entityInfo = GetEntInfo(entity);
// HP heal
if (entityInfo->unk146 == 0 && entityInfo->burnClassStatus.status != STATUS_POISONED && entityInfo->burnClassStatus.status != STATUS_BADLY_POISONED) {
if (!entityInfo->bellyEmpty && entityInfo->burnClassStatus.status != STATUS_POISONED && entityInfo->burnClassStatus.status != STATUS_BADLY_POISONED) {
s32 regenSpeed = 0;
if (!entityInfo->isNotTeamMember)

View File

@ -275,7 +275,7 @@ void sub_803E724(s32 r0)
do
{
DungeonRunFrameActions(r0);
} while (gRealInputs.held & 0xF0);
} while (gRealInputs.held & DPAD_ANY);
}
void sub_803E748(void)

View File

@ -79,7 +79,7 @@ void sub_807E378(void)
LogMessageByIdWithPopupCheckUser(leader,gUnknown_80F9CBC);
sub_80426C8(gUnknown_80F5FAC[gDungeon->tileset],3);
gDungeon->unk644.unk36 = 4;
HandleFaint(leader,0x21e,leader);
HandleFaint(leader,DUNGEON_EXIT_BLOWN_OUT_UNSEEN_FORCE,leader);
}
}
}

View File

@ -81,9 +81,9 @@ static const DungeonPos *const gUnknown_8107178[3] = {
gUnknown_8107110
};
static void sub_807E1A0(Entity *pokemon,Entity *target,u8 moveType,s32 param_4,s32 param_5);
static void sub_807E1A0(Entity *pokemon,Entity *target,u8 moveType,s32 dungeonExitReason,s32 param_5);
void HandleExplosion(Entity *pokemon,Entity *target,DungeonPos *param_3,s32 param_4,u8 moveType,s16 param_6)
void HandleExplosion(Entity *pokemon,Entity *target,DungeonPos *param_3,s32 param_4,u8 moveType,s16 dungeonExitReason_)
{
bool8 flag;
const DungeonPos *posPtr;
@ -95,9 +95,9 @@ void HandleExplosion(Entity *pokemon,Entity *target,DungeonPos *param_3,s32 para
int index;
DungeonPos pos;
u32 uStack_2c;
u32 dungeonExitReason;
uStack_2c = param_6;
dungeonExitReason = dungeonExitReason_;
for (index = 0; index < DUNGEON_MAX_POKEMON; index++) {
entity1 = gDungeon->activePokemon[index];
if ((EntityIsValid(entity1)) && (AbilityIsActive(entity1, ABILITY_DAMP))) break;
@ -143,7 +143,7 @@ void HandleExplosion(Entity *pokemon,Entity *target,DungeonPos *param_3,s32 para
}
entity2 = tile->monster;
if (((entity2 != NULL) && (entity2 != target)) && (GetEntityType(entity2) == ENTITY_MONSTER)) {
sub_807E1A0(pokemon,entity2,moveType,uStack_2c,gUnknown_203B444[param_4]);
sub_807E1A0(pokemon,entity2,moveType,dungeonExitReason,gUnknown_203B444[param_4]);
if (IsFloorOver()) break;
}
}
@ -154,7 +154,7 @@ void HandleExplosion(Entity *pokemon,Entity *target,DungeonPos *param_3,s32 para
return;
}
if (GetEntityType(target) == ENTITY_MONSTER) {
sub_807E1A0(pokemon,target,moveType,uStack_2c,gUnknown_203B444[param_4]);
sub_807E1A0(pokemon,target,moveType,dungeonExitReason,gUnknown_203B444[param_4]);
}
if (!flag) {
return;
@ -171,15 +171,15 @@ void HandleExplosion(Entity *pokemon,Entity *target,DungeonPos *param_3,s32 para
}
}
static void sub_807E1A0(Entity *pokemon,Entity *target,u8 moveType,s32 param_4,s32 param_5)
static void sub_807E1A0(Entity *pokemon,Entity *target,u8 moveType,s32 dungeonExitReason_,s32 param_5)
{
EntityInfo *targetInfo;
u8 flag;
Move move;
s32 newHP;
s32 param_4_s32;
s32 dungeonExitReason;
param_4_s32 = (s16) param_4;
dungeonExitReason = (s16) dungeonExitReason_;
if (EntityIsValid(target)) {
targetInfo = GetEntInfo(target);
@ -201,7 +201,7 @@ static void sub_807E1A0(Entity *pokemon,Entity *target,u8 moveType,s32 param_4,s
newHP /= 2;
}
}
sub_806F370(pokemon,target,newHP,0,&flag,moveType,param_4_s32,0,0,0);
sub_806F370(pokemon,target,newHP,0,&flag,moveType,dungeonExitReason,RESIDUAL_DAMAGE_REGULAR,0,0);
}
}
}

View File

@ -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, 0x21A, 0, 0, 0);
sub_806F370(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, 0x219, 0, 0, 0);
sub_806F370(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);
}

View File

@ -34,12 +34,12 @@
#include "dungeon_damage.h"
#include "move_util.h"
bool8 IronTailMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 IronTailMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
bool8 flag;
flag = FALSE;
if (HandleDamagingMove(pokemon, target, move, IntToF248_2(1), param_4) != 0) {
if (HandleDamagingMove(pokemon, target, move, IntToF248_2(1), itemId) != 0) {
flag = TRUE;
if (sub_805727C(pokemon, target, gIronTailSecondaryChance)) {
LowerDefenseStageTarget(pokemon, target, gStatIndexAtkDef, 1, 1, FALSE);
@ -50,52 +50,52 @@ bool8 IronTailMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_
static const s24_8 sRolloutModifiers[];
bool8 sub_805768C(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 sub_805768C(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
bool8 flag;
flag = FALSE;
gUnknown_202F21C++;
if (HandleDamagingMove(pokemon, target, move, sRolloutModifiers[gUnknown_202F21C], param_4) == 0)
if (HandleDamagingMove(pokemon, target, move, sRolloutModifiers[gUnknown_202F21C], itemId) == 0)
gUnknown_202F220 = 1;
else
flag = TRUE;
return flag;
}
bool8 YawnMoveAction(Entity * pokemon, Entity *target, Move *move, s32 param_4)
bool8 YawnMoveAction(Entity * pokemon, Entity *target, Move *move, s32 itemId)
{
YawnedStatusTarget(pokemon, target, CalculateStatusTurns(target,gYawnTurnRange,TRUE) + 1);
return TRUE;
}
// NOTE: Is there a better name for this?
bool8 BasicSleepMoveAction(Entity * pokemon, Entity *target, Move *move, s32 param_4)
bool8 BasicSleepMoveAction(Entity * pokemon, Entity *target, Move *move, s32 itemId)
{
SleepStatusTarget(pokemon, target, CalculateStatusTurns(target, gSleepTurnRange, TRUE), TRUE);
return TRUE;
}
bool8 NightmareMoveAction(Entity * pokemon, Entity *target, Move *move, s32 param_4)
bool8 NightmareMoveAction(Entity * pokemon, Entity *target, Move *move, s32 itemId)
{
NightmareStatusTarget(pokemon, target, CalculateStatusTurns(target,gNightmareTurnRange,TRUE));
return TRUE;
}
bool8 MorningSunMoveAction(Entity * pokemon,Entity * target, Move *move, s32 param_4)
bool8 MorningSunMoveAction(Entity * pokemon,Entity * target, Move *move, s32 itemId)
{
HealTargetHP(pokemon, target, gMorningSunHealValueByWeather[GetApparentWeather(pokemon)], 0, TRUE);
return TRUE;
}
bool8 VitalThrowMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
bool8 VitalThrowMoveAction(Entity * pokemon, Entity * target, Move *move, s32 itemId)
{
VitalThrowStatusTarget(pokemon, target);
return TRUE;
}
bool8 DigMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
bool8 DigMoveAction(Entity * pokemon, Entity * target, Move *move, s32 itemId)
{
Tile *tile;
bool8 flag;
@ -107,7 +107,7 @@ bool8 DigMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
}
else {
if (MoveMatchesBideClassStatus(pokemon,move)) {
HandleDamagingMove(pokemon,target,move,gDigModifier,param_4);
HandleDamagingMove(pokemon,target,move,gDigModifier,itemId);
sub_8079764(pokemon);
}
else {
@ -118,19 +118,19 @@ bool8 DigMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
return flag;
}
bool8 SweetScentMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 SweetScentMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
LowerAccuracyStageTarget(pokemon,target,gStatIndexSpecial,TRUE);
return TRUE;
}
bool8 CharmMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 CharmMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
ChangeAttackMultiplierTarget(pokemon,target,gStatIndexAtkDef,FloatToF248(0.5),TRUE);
return TRUE;
}
bool8 RainDanceMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 RainDanceMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
gDungeon->weather.unkE267[WEATHER_RAIN] = gMoveWeatherDuration;
if (sub_807EAA0(1,0) == 0) {
@ -140,7 +140,7 @@ bool8 RainDanceMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param
return TRUE;
}
bool8 HailMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 HailMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
gDungeon->weather.unkE267[WEATHER_HAIL] = gMoveWeatherDuration;
if (sub_807EAA0(1,0) == 0) {
@ -150,18 +150,18 @@ bool8 HailMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
return TRUE;
}
bool8 sub_80578EC(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 sub_80578EC(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
sub_8079F20(pokemon, target, 1, 0);
return TRUE;
}
bool8 BubbleMoveAction(Entity *pokemon, Entity *target, Move * move, s32 param_4)
bool8 BubbleMoveAction(Entity *pokemon, Entity *target, Move * move, s32 itemId)
{
bool8 flag;
flag = FALSE;
if (HandleDamagingMove(pokemon, target, move, IntToF248_2(1), param_4) != 0) {
if (HandleDamagingMove(pokemon, target, move, IntToF248_2(1), itemId) != 0) {
flag = TRUE;
if (sub_805727C(pokemon,target, gBubbleSecondaryChance)) {
LowerMovementSpeedTarget(pokemon, target, 1, FALSE);
@ -170,20 +170,20 @@ bool8 BubbleMoveAction(Entity *pokemon, Entity *target, Move * move, s32 param_4
return flag;
}
bool8 EncoreMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 EncoreMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
EncoreStatusTarget(pokemon, target);
return TRUE;
}
bool8 RageMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 RageMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
// {POKEMON_0} is enraged
SetChargeStatusTarget(pokemon,target,STATUS_ENRAGED,move,gUnknown_80FAC88);
return TRUE;
}
bool8 SuperFangMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 SuperFangMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
s32 newHP;
bool8 local_24;
@ -191,7 +191,7 @@ bool8 SuperFangMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param
newHP = GetEntInfo(target)->HP / 2;
local_24 = FALSE;
if (newHP != 0) {
sub_806F370(pokemon,target,newHP,1,&local_24,GetMoveType(move),sub_8057600(move,param_4),0,1,0);
sub_806F370(pokemon,target,newHP,1,&local_24,GetMoveType(move),GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,1,0);
local_24 = local_24 == 0;
}
else
@ -202,7 +202,7 @@ bool8 SuperFangMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param
return local_24;
}
bool8 PainSplitMoveAction(Entity *attacker, Entity *target, Move *move, s32 param_4)
bool8 PainSplitMoveAction(Entity *attacker, Entity *target, Move *move, s32 itemId)
{
EntityInfo *attackerInfo = GetEntInfo(attacker);
EntityInfo *targetInfo = GetEntInfo(target);
@ -225,7 +225,7 @@ bool8 PainSplitMoveAction(Entity *attacker, Entity *target, Move *move, s32 para
return TRUE;
}
bool8 TormentMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 TormentMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
Move *movePtr;
s32 iVar4;
@ -282,26 +282,26 @@ bool8 TormentMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4
return isTormented;
}
bool8 StringShotMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 StringShotMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
LowerMovementSpeedTarget(pokemon, target, 1, TRUE);
return TRUE;
}
bool8 SwaggerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 SwaggerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
ConfuseStatusTarget(pokemon, target, TRUE);
RaiseAttackStageTarget(pokemon, target, gStatIndexAtkDef, 2);
return TRUE;
}
bool8 SnoreMoveAction(Entity *pokemon, Entity *target, Move * move, s32 param_4)
bool8 SnoreMoveAction(Entity *pokemon, Entity *target, Move * move, s32 itemId)
{
bool8 flag;
flag = FALSE;
if (IsSleeping(pokemon)) {
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0) {
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),itemId) != 0) {
flag = TRUE;
if (sub_805727C(pokemon,target,gSnoreSecondaryChance)) {
CringeStatusTarget(pokemon,target,FALSE);
@ -314,18 +314,18 @@ bool8 SnoreMoveAction(Entity *pokemon, Entity *target, Move * move, s32 param_4)
return flag;
}
bool8 ScreechMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 ScreechMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
ChangeDefenseMultiplierTarget(pokemon, target, gStatIndexAtkDef, FloatToF248(0.25), 1);
return TRUE;
}
bool8 RockSlideMoveAction(Entity *pokemon, Entity *target, Move * move, s32 param_4)
bool8 RockSlideMoveAction(Entity *pokemon, Entity *target, Move * move, s32 itemId)
{
bool8 flag;
flag = FALSE;
if (HandleDamagingMove(pokemon, target, move, IntToF248_2(1), param_4) != 0) {
if (HandleDamagingMove(pokemon, target, move, IntToF248_2(1), itemId) != 0) {
flag = TRUE;
if (sub_805727C(pokemon,target,gRockSlideSecondaryChance)) {
CringeStatusTarget(pokemon,target,FALSE);
@ -334,21 +334,21 @@ bool8 RockSlideMoveAction(Entity *pokemon, Entity *target, Move * move, s32 para
return flag;
}
bool32 WeatherBallMoveAction(Entity * pokemon, Entity * target, Move * move, s32 param_4)
bool32 WeatherBallMoveAction(Entity * pokemon, Entity * target, Move * move, s32 itemId)
{
u32 weather;
s32 flag;
weather = GetApparentWeather(pokemon);
flag = sub_80556BC(pokemon,target,gWeatherBallTypes[weather],move,
gWeatherBallModifiers[weather],param_4);
gWeatherBallModifiers[weather],itemId);
if (flag) {
flag = TRUE;
}
return flag;
}
bool8 WhirlpoolMoveAction(Entity * pokemon, Entity * target, Move * move, s32 param_4)
bool8 WhirlpoolMoveAction(Entity * pokemon, Entity * target, Move * move, s32 itemId)
{
s24_8 modifier;
bool8 flag;
@ -360,7 +360,7 @@ bool8 WhirlpoolMoveAction(Entity * pokemon, Entity * target, Move * move, s32 pa
if (chargeStatus == STATUS_DIVING) {
modifier = IntToF248_2(2);
}
if (HandleDamagingMove(pokemon,target,move,modifier,param_4) != 0) {
if (HandleDamagingMove(pokemon,target,move,modifier,itemId) != 0) {
flag = TRUE;
if (sub_805727C(pokemon,target,gMovesConstrictionChance)) {
SqueezedStatusTarget(pokemon,target,0x3b,FALSE);
@ -369,13 +369,13 @@ bool8 WhirlpoolMoveAction(Entity * pokemon, Entity * target, Move * move, s32 pa
return flag;
}
bool8 FakeTearsMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
bool8 FakeTearsMoveAction(Entity * pokemon, Entity * target, Move *move, s32 itemId)
{
LowerDefenseStageTarget(pokemon, target, gStatIndexSpecial, 2, 1, TRUE);
return TRUE;
}
bool8 SpiteMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
bool8 SpiteMoveAction(Entity * pokemon, Entity * target, Move *move, s32 itemId)
{
s32 i;
EntityInfo *targetInfo = GetEntInfo(target);
@ -400,26 +400,26 @@ bool8 SpiteMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4
return flag;
}
bool8 FocusEnergyMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
bool8 FocusEnergyMoveAction(Entity * pokemon, Entity * target, Move *move, s32 itemId)
{
FocusEnergyStatusTarget(pokemon, target);
return TRUE;
}
bool8 SmokescreenMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 SmokescreenMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
WhifferStatusTarget(pokemon, target, CalculateStatusTurns(target, gWhifferTurnRange, TRUE));
return TRUE;
}
bool8 MirrorMoveMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 MirrorMoveMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
SendThawedMessage(pokemon, target);
MirrorMoveStatusTarget(pokemon, target);
return TRUE;
}
bool8 OverheatMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 OverheatMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
EntityInfo *entityInfo;
bool8 flag;
@ -427,7 +427,7 @@ bool8 OverheatMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_
flag = FALSE;
entityInfo = GetEntInfo(pokemon);
SendThawedMessage(pokemon,target);
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0) {
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),itemId) != 0) {
flag = TRUE;
if (RollSecondaryEffect(pokemon, 0)) {
entityInfo->unk155 = 1;
@ -436,12 +436,12 @@ bool8 OverheatMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_
return flag;
}
bool8 AuroraBeamMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 AuroraBeamMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
bool8 flag;
flag = FALSE;
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0) {
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),itemId) != 0) {
flag = TRUE;
if(sub_805727C(pokemon, target, gAuroraBeamAtkLowerChance))
{
@ -451,7 +451,7 @@ bool8 AuroraBeamMoveAction(Entity *pokemon, Entity *target, Move *move, s32 para
return flag;
}
bool8 MementoMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 MementoMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
EntityInfo *entityInfo;
@ -463,12 +463,12 @@ bool8 MementoMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4
return TRUE;
}
bool8 OctazookaMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 OctazookaMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
bool8 flag;
flag = FALSE;
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0) {
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),itemId) != 0) {
flag = TRUE;
if(sub_805727C(pokemon, target, gOctazookaAccLowerChance))
{
@ -478,14 +478,14 @@ bool8 OctazookaMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param
return flag;
}
bool8 FlatterMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 FlatterMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
ConfuseStatusTarget(pokemon, target, TRUE);
RaiseAttackStageTarget(pokemon, target, gStatIndexSpecial, 1);
return TRUE;
}
bool8 WillOWispMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 WillOWispMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
u8 flashFireStatus;
@ -508,7 +508,7 @@ bool8 WillOWispMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param
return TRUE;
}
bool8 ReturnMoveAction(Entity * pokemon,Entity * target,Move * move,s32 param_4)
bool8 ReturnMoveAction(Entity * pokemon,Entity * target,Move * move,s32 itemId)
{
s32 i;
bool8 local_24;
@ -522,12 +522,12 @@ bool8 ReturnMoveAction(Entity * pokemon,Entity * target,Move * move,s32 param_4)
}
}
sub_806F370(pokemon,target,dmg,1,&local_24,GetMoveType(move),sub_8057600(move,param_4),0,1,0);
sub_806F370(pokemon,target,dmg,1,&local_24,GetMoveType(move),GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,1,0);
local_24 = (local_24 == 0);
return local_24;
}
bool8 GrudgeMoveAction(Entity *pokemon, Entity * target, Move *move, s32 param_4)
bool8 GrudgeMoveAction(Entity *pokemon, Entity * target, Move *move, s32 itemId)
{
EntityInfo *entityInfo;
bool8 hasGrudge;
@ -546,19 +546,19 @@ bool8 GrudgeMoveAction(Entity *pokemon, Entity * target, Move *move, s32 param_4
return hasGrudge;
}
bool8 CounterMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 CounterMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
CounterStatusTarget(pokemon, target, STATUS_COUNTER);
return TRUE;
}
bool8 FlameWheelMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 FlameWheelMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
bool8 flag;
flag = FALSE;
SendThawedMessage(pokemon, target);
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0) {
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),itemId) != 0) {
flag = TRUE;
if(sub_805727C(pokemon, target, gFlameWheelSecondaryChance))
{
@ -569,13 +569,13 @@ bool8 FlameWheelMoveAction(Entity *pokemon, Entity *target, Move *move, s32 para
}
// NOTE: Do we have a better name for this??
bool8 BasicFireMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 BasicFireMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
bool8 flag;
flag = FALSE;
SendThawedMessage(pokemon, target);
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0) {
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),itemId) != 0) {
flag = TRUE;
if(sub_805727C(pokemon, target, gFireMoveBurnSecondaryChance))
{
@ -585,7 +585,7 @@ bool8 BasicFireMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param
return flag;
}
bool8 ExposeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 ExposeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
u16 uVar1;
uVar1 = (move->id == MOVE_FORESIGHT) ? 0x7A : 0x51;
@ -593,13 +593,13 @@ bool8 ExposeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
return TRUE;
}
bool8 DoubleTeamMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 DoubleTeamMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
RaiseAccuracyStageTarget(pokemon, target, gStatIndexSpecial);
return TRUE;
}
bool8 GustMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 GustMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
bool8 flag;
s32 modifierInt;
@ -609,36 +609,36 @@ bool8 GustMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
targetInfo = GetEntInfo(target);
if(targetInfo->bideClassStatus.status == STATUS_FLYING || targetInfo->bideClassStatus.status == STATUS_BOUNCING)
modifierInt = 2;
flag = HandleDamagingMove(pokemon,target,move,IntToF248_2(modifierInt),param_4) ? TRUE : FALSE;
flag = HandleDamagingMove(pokemon,target,move,IntToF248_2(modifierInt),itemId) ? TRUE : FALSE;
return flag;
}
// NOTE: Is there a better name for this?
bool8 BasicRaiseDefenseMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 BasicRaiseDefenseMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
RaiseDefenseStageTarget(pokemon, target, gStatIndexAtkDef, 1);
return TRUE;
}
bool8 DisableMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 DisableMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
ParalyzeStatusTarget(pokemon, target, TRUE);
return TRUE;
}
// NOTE: Is there a better name for this?
bool8 BasicRaiseAttackMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 BasicRaiseAttackMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
RaiseAttackStageTarget(pokemon, target, gStatIndexAtkDef, 1);
return TRUE;
}
bool8 RazorWindMoveAction(Entity * pokemon, Entity * target, Move * move, s32 param_4)
bool8 RazorWindMoveAction(Entity * pokemon, Entity * target, Move * move, s32 itemId)
{
bool8 flag;
if (MoveMatchesBideClassStatus(pokemon,move)) {
flag = HandleDamagingMove(pokemon,target,move,gRazorWindModifier,param_4) ? TRUE : FALSE;
flag = HandleDamagingMove(pokemon,target,move,gRazorWindModifier,itemId) ? TRUE : FALSE;
sub_8079764(pokemon);
}
else {
@ -648,13 +648,13 @@ bool8 RazorWindMoveAction(Entity * pokemon, Entity * target, Move * move, s32 pa
return flag;
}
bool8 BideMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 BideMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
SetChargeStatusTarget(pokemon, target, STATUS_BIDE, move, gUnknown_80FAC74);
return TRUE;
}
bool8 Bide2MoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 Bide2MoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
s32 iVar2;
bool8 local_18;
@ -664,18 +664,18 @@ bool8 Bide2MoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
if (999 < iVar2) {
iVar2 = 999;
}
sub_806F370(pokemon,target,iVar2,1,&local_18, GetMoveType(move),0x1ff,0,1,0);
sub_806F370(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;
}
bool8 ShadowBallMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 ShadowBallMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
bool8 flag;
flag = FALSE;
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0) {
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),itemId) != 0) {
flag = TRUE;
if(sub_805727C(pokemon, target, gShadowBallSecondaryChance))
{
@ -685,12 +685,12 @@ bool8 ShadowBallMoveAction(Entity *pokemon, Entity *target, Move *move, s32 para
return flag;
}
bool8 BiteMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 BiteMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
bool8 flag;
flag = FALSE;
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0) {
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),itemId) != 0) {
flag = TRUE;
if(sub_805727C(pokemon, target, gBiteSecondaryChance))
{
@ -700,12 +700,12 @@ bool8 BiteMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
return flag;
}
bool8 ThunderMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 ThunderMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
bool8 flag;
flag = FALSE;
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0) {
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),itemId) != 0) {
flag = TRUE;
if(sub_805727C(pokemon, target, gThunderSecondaryChance))
{
@ -715,7 +715,7 @@ bool8 ThunderMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4
return flag;
}
bool8 EndeavorMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 EndeavorMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
s32 diffHP;
bool8 local_24;
@ -730,13 +730,13 @@ bool8 EndeavorMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_
if (diffHP < 0) {
diffHP = 0;
}
sub_806F370(pokemon,target,diffHP,0,&local_24,GetMoveType(move),sub_8057600(move,param_4),0,1,0);
sub_806F370(pokemon,target,diffHP,0,&local_24,GetMoveType(move),GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,1,0);
local_24 = local_24 == 0;
return local_24;
}
bool8 FacadeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 FacadeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
bool8 flag;
s24_8 modifier;
@ -744,16 +744,16 @@ bool8 FacadeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
modifier = IntToF248_2(1);
if((GetEntInfo(pokemon)->burnClassStatus.status) != STATUS_NONE)
modifier = gFacadeModifier;
flag = HandleDamagingMove(pokemon,target,move,modifier,param_4) ? TRUE : FALSE;
flag = HandleDamagingMove(pokemon,target,move,modifier,itemId) ? TRUE : FALSE;
return flag;
}
bool8 sub_8058580(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 sub_8058580(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
bool8 flag;
flag = FALSE;
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0) {
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),itemId) != 0) {
flag = TRUE;
if(sub_805727C(pokemon, target, gConstrictBubblebeamSecondaryChance))
{
@ -763,7 +763,7 @@ bool8 sub_8058580(Entity *pokemon, Entity *target, Move *move, s32 param_4)
return flag;
}
bool8 BrickBreakMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 BrickBreakMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
bool8 flag;
@ -774,16 +774,16 @@ bool8 BrickBreakMoveAction(Entity *pokemon, Entity *target, Move *move, s32 para
flag = TRUE;
}
flag |= (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0);
flag |= (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),itemId) != 0);
return flag;
}
bool8 RockTombMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 RockTombMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
bool8 flag;
flag = FALSE;
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0) {
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),itemId) != 0) {
flag = TRUE;
if(sub_805727C(pokemon, target, 0))
{
@ -793,12 +793,12 @@ bool8 RockTombMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_
return flag;
}
bool8 FocusPunchMoveAction(Entity * pokemon, Entity * target, Move * move, s32 param_4)
bool8 FocusPunchMoveAction(Entity * pokemon, Entity * target, Move * move, s32 itemId)
{
bool8 flag;
if (MoveMatchesBideClassStatus(pokemon,move)) {
flag = HandleDamagingMove(pokemon,target,move,gFocusPunchModifier,param_4) ? TRUE : FALSE;
flag = HandleDamagingMove(pokemon,target,move,gFocusPunchModifier,itemId) ? TRUE : FALSE;
sub_8079764(pokemon);
}
else {
@ -808,7 +808,7 @@ bool8 FocusPunchMoveAction(Entity * pokemon, Entity * target, Move * move, s32 p
return flag;
}
bool8 GigaDrainMoveAction(Entity * pokemon, Entity * target, Move * move, s32 param_4)
bool8 GigaDrainMoveAction(Entity * pokemon, Entity * target, Move * move, s32 itemId)
{
bool8 hasLiquidOoze;
s32 uVar3;
@ -817,7 +817,7 @@ bool8 GigaDrainMoveAction(Entity * pokemon, Entity * target, Move * move, s32 pa
EntityInfo *entityInfo;
hasLiquidOoze = AbilityIsActive(target, ABILITY_LIQUID_OOZE);
uVar3 = HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4);
uVar3 = HandleDamagingMove(pokemon,target,move,IntToF248_2(1),itemId);
flag = uVar3 != 0 ? TRUE : FALSE;
if (flag && RollSecondaryEffect(pokemon, 0)) {
newHP = uVar3 / 2;
@ -828,7 +828,7 @@ bool8 GigaDrainMoveAction(Entity * pokemon, Entity * target, Move * move, s32 pa
}
SetExpMultplier(entityInfo);
if (hasLiquidOoze) {
DealDamageToEntity(pokemon, newHP, 0xd, 0x1fa);
DealDamageToEntity(pokemon, newHP, RESIDUAL_DAMAGE_LIQUID_OOZE, DUNGEON_EXIT_FAINTED_COVERED_IN_SLUDGE);
}
else {
HealTargetHP(pokemon, pokemon, newHP, 0, TRUE);
@ -837,7 +837,7 @@ bool8 GigaDrainMoveAction(Entity * pokemon, Entity * target, Move * move, s32 pa
return flag;
}
bool8 ReversalMoveAction(Entity * pokemon, Entity * target, Move * move, s32 param_4)
bool8 ReversalMoveAction(Entity * pokemon, Entity * target, Move * move, s32 itemId)
{
s32 index;
bool8 flag;
@ -856,31 +856,31 @@ bool8 ReversalMoveAction(Entity * pokemon, Entity * target, Move * move, s32 par
index = 3;
}
flag = HandleDamagingMove(pokemon,target,move,gReversalModifiers[index],param_4) ? TRUE : FALSE;
flag = HandleDamagingMove(pokemon,target,move,gReversalModifiers[index],itemId) ? TRUE : FALSE;
return flag;
}
bool8 SmellingSaltMoveAction(Entity * pokemon, Entity * target, Move * move, s32 param_4)
bool8 SmellingSaltMoveAction(Entity * pokemon, Entity * target, Move * move, s32 itemId)
{
bool8 flag;
if (GetEntInfo(target)->burnClassStatus.status == STATUS_PARALYSIS) {
flag = HandleDamagingMove(pokemon,target,move,IntToF248_2(2),param_4) ? TRUE : FALSE;
flag = HandleDamagingMove(pokemon,target,move,IntToF248_2(2),itemId) ? TRUE : FALSE;
EndBurnClassStatus(pokemon, target);
}
else {
flag = HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) ? TRUE : FALSE;
flag = HandleDamagingMove(pokemon,target,move,IntToF248_2(1),itemId) ? TRUE : FALSE;
}
return flag;
}
bool8 MetalSoundMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 MetalSoundMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
LowerDefenseStageTarget(pokemon, target, gStatIndexSpecial, 3, 1, TRUE);
return TRUE;
}
bool8 TickleMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 TickleMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
s32 index = gStatIndexAtkDef;
LowerAttackStageTarget(pokemon, target, index, 1, 1, TRUE);
@ -888,22 +888,22 @@ bool8 TickleMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
return TRUE;
}
bool8 sub_805889C(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 sub_805889C(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
ImmobilizedStatusTarget(pokemon, target);
return TRUE;
}
bool8 HazeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 HazeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
sub_8079E34(pokemon, target, TRUE);
return TRUE;
}
bool8 OutrageMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 OutrageMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
bool8 flag = FALSE;
if(HandleDamagingMove(pokemon, target, move, IntToF248_2(1), param_4) != 0)
if(HandleDamagingMove(pokemon, target, move, IntToF248_2(1), itemId) != 0)
{
flag = TRUE;
if(RollSecondaryEffect(pokemon, 0))
@ -914,24 +914,24 @@ bool8 OutrageMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4
return flag;
}
bool8 LowKickMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 LowKickMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
s24_8 weight;
bool8 flag;
EntityInfo *entityInfo = GetEntInfo(target);
weight.raw = GetWeight(entityInfo->apparentID);
flag = HandleDamagingMove(pokemon, target, move, weight, param_4) != 0 ? TRUE: FALSE;
flag = HandleDamagingMove(pokemon, target, move, weight, itemId) != 0 ? TRUE: FALSE;
return flag;
}
bool8 AncientPowerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 AncientPowerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
bool8 flag = FALSE;
EntityInfo *entityInfo;
s32 index1;
s32 index2;
if(HandleDamagingMove(pokemon, target, move, IntToF248_2(1), param_4) != 0)
if(HandleDamagingMove(pokemon, target, move, IntToF248_2(1), itemId) != 0)
{
flag = TRUE;
if(RollSecondaryEffect(pokemon, gAncientPowerSecondaryChance))
@ -950,22 +950,22 @@ bool8 AncientPowerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 pa
return flag;
}
bool8 SynthesisMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 SynthesisMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
HealTargetHP(pokemon, target, gSynthesisHealValueByWeather[GetApparentWeather(pokemon)], 0, TRUE);
return TRUE;
}
bool8 AgilityMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 AgilityMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
RaiseMovementSpeedTarget(pokemon, target, 0, TRUE);
return TRUE;
}
bool8 RapidSpinMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 RapidSpinMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
bool8 flag = FALSE;
if(HandleDamagingMove(pokemon, target, move, IntToF248_2(1), param_4) != 0)
if(HandleDamagingMove(pokemon, target, move, IntToF248_2(1), itemId) != 0)
{
flag = TRUE;
if(RollSecondaryEffect(pokemon, 0))
@ -976,13 +976,13 @@ bool8 RapidSpinMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param
return flag;
}
bool8 SureShotMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 SureShotMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
SureShotStatusTarget(pokemon, target, CalculateStatusTurns(target, gSureShotTurnRange, FALSE));
return TRUE;
}
bool8 CosmicPowerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 CosmicPowerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
RaiseDefenseStageTarget(pokemon, target, gStatIndexAtkDef, 1);
RaiseDefenseStageTarget(pokemon, target, gStatIndexSpecial, 1);

View File

@ -39,13 +39,13 @@
extern void nullsub_92(Entity *);
bool8 SkyAttackMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 SkyAttackMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
bool8 flag = FALSE;
if(MoveMatchesBideClassStatus(pokemon, move))
{
if (HandleDamagingMove(pokemon, target, move, gSkyAttackModifier, param_4) != 0) {
if (HandleDamagingMove(pokemon, target, move, gSkyAttackModifier, itemId) != 0) {
flag = TRUE;
if(sub_805727C(pokemon, target, gSkyAttackSecondaryChance))
CringeStatusTarget(pokemon, target, FALSE);
@ -60,12 +60,12 @@ bool8 SkyAttackMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param
}
// NOTE: Is there a better name for this?
bool8 BasicIceMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 BasicIceMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
bool8 flag;
flag = FALSE;
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0) {
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),itemId) != 0) {
flag = TRUE;
if(sub_805727C(pokemon, target, gIceMoveFreezeSecondaryChance))
{
@ -75,13 +75,13 @@ bool8 BasicIceMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_
return flag;
}
bool8 MeteorMashMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 MeteorMashMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
bool8 flag;
EntityInfo *entityInfo;
flag = FALSE;
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0) {
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),itemId) != 0) {
flag = TRUE;
if(sub_805727C(pokemon, pokemon, gMeteorMashSecondaryChance))
{
@ -93,24 +93,24 @@ bool8 MeteorMashMoveAction(Entity *pokemon, Entity *target, Move *move, s32 para
return flag;
}
bool8 EndureMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 EndureMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
EndureStatusTarget(pokemon, pokemon);
return TRUE;
}
bool8 ScaryFaceMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 ScaryFaceMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
LowerMovementSpeedTarget(pokemon, target, 1, TRUE);
return TRUE;
}
bool8 sub_8058C00(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 sub_8058C00(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
bool8 flag;
flag = FALSE;
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0) {
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),itemId) != 0) {
flag = TRUE;
if(sub_805727C(pokemon, target, gMovesConfusionSecondaryChance))
{
@ -120,7 +120,7 @@ bool8 sub_8058C00(Entity *pokemon, Entity *target, Move *move, s32 param_4)
return flag;
}
bool8 PsywaveMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 PsywaveMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
s32 rand;
bool8 flag;
@ -133,11 +133,11 @@ bool8 PsywaveMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4
if (199 < rand) {
rand = 199;
}
flag = sub_8055864(pokemon,target,move,rand,param_4) != 0 ? TRUE: FALSE;
flag = sub_8055864(pokemon,target,move,rand,itemId) != 0 ? TRUE: FALSE;
return flag;
}
bool8 sub_8058C98(Entity *pokemon, Entity *target, Move *move, s32 param_4, u32 param_5)
bool8 sub_8058C98(Entity *pokemon, Entity *target, Move *move, s32 itemId, u32 param_5)
{
bool8 flag;
@ -146,16 +146,16 @@ bool8 sub_8058C98(Entity *pokemon, Entity *target, Move *move, s32 param_4, u32
flag = TRUE;
if(sub_805727C(pokemon, target, gPsychicSecondaryChance))
{
LowerDefenseStageTarget(pokemon, target, param_4, 1, 1, FALSE);
LowerDefenseStageTarget(pokemon, target, itemId, 1, 1, FALSE);
}
}
return flag;
}
bool8 PsychoBoostMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 PsychoBoostMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
bool8 flag = FALSE;
if(HandleDamagingMove(pokemon, target, move, IntToF248_2(1), param_4) != 0)
if(HandleDamagingMove(pokemon, target, move, IntToF248_2(1), itemId) != 0)
{
flag = TRUE;
if(RollSecondaryEffect(pokemon, 0))
@ -166,13 +166,13 @@ bool8 PsychoBoostMoveAction(Entity *pokemon, Entity *target, Move *move, s32 par
return flag;
}
bool8 UproarMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 UproarMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
SleeplessStatusTarget(pokemon, target);
return TRUE;
}
bool8 WaterSpoutMoveAction(Entity * pokemon, Entity * target, Move * move, s32 param_4)
bool8 WaterSpoutMoveAction(Entity * pokemon, Entity * target, Move * move, s32 itemId)
{
s32 index;
bool8 flag;
@ -191,11 +191,11 @@ bool8 WaterSpoutMoveAction(Entity * pokemon, Entity * target, Move * move, s32 p
index = 3;
}
flag = HandleDamagingMove(pokemon,target,move,gWaterSpoutModifiers[index],param_4) ? TRUE : FALSE;
flag = HandleDamagingMove(pokemon,target,move,gWaterSpoutModifiers[index],itemId) ? TRUE : FALSE;
return flag;
}
bool8 PsychUpMoveAction(Entity * pokemon, Entity * target, Move * move, s32 param_4)
bool8 PsychUpMoveAction(Entity * pokemon, Entity * target, Move * move, s32 itemId)
{
s32 index;
EntityInfo *iVar3;
@ -219,14 +219,14 @@ bool8 PsychUpMoveAction(Entity * pokemon, Entity * target, Move * move, s32 para
return TRUE;
}
bool8 sub_8058E5C(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 sub_8058E5C(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
int iVar2;
int iVar3;
bool8 flag;
flag = FALSE;
if ((HandleDamagingMove(pokemon, target, move, IntToF248_2(1), param_4) != 0) && (EntityIsValid(pokemon))) {
if ((HandleDamagingMove(pokemon, target, move, IntToF248_2(1), itemId) != 0) && (EntityIsValid(pokemon))) {
iVar2 = GetEntInfo(pokemon)->maxHPStat;
if (iVar2 < 0) {
iVar2 = iVar2 + 7;
@ -237,19 +237,19 @@ bool8 sub_8058E5C(Entity *pokemon, Entity *target, Move *move, s32 param_4)
}
flag = TRUE;
if ((!AbilityIsActive(pokemon, ABILITY_ROCK_HEAD)) && RollSecondaryEffect(pokemon, 0)) {
sub_806F370(pokemon,pokemon,iVar3,0,0,0,0x1fd,0x14,1,0);
sub_806F370(pokemon,pokemon,iVar3,0,0,0,DUNGEON_EXIT_FAINTED_FROM_RECOIL,RESIDUAL_DAMAGE_RECOIL,1,0);
}
}
return flag;
}
bool8 sub_8058EE0(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 sub_8058EE0(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
HealTargetHP(pokemon, target, GetEntInfo(target)->maxHPStat / 2, 0, TRUE);
return TRUE;
}
bool32 EarthquakeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool32 EarthquakeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
bool32 flag;
EntityInfo *entityInfo;
@ -262,14 +262,14 @@ bool32 EarthquakeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 par
if (entityInfo->bideClassStatus.status == STATUS_DIGGING) {
modifierInt = 2;
}
flag = HandleDamagingMove(pokemon,target,move,IntToF248_2(modifierInt),param_4);
flag = HandleDamagingMove(pokemon,target,move,IntToF248_2(modifierInt),itemId);
if (flag != 0) {
flag = TRUE;
}
return flag;
}
bool8 NaturePowerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 NaturePowerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
bool8 flag;
s32 tileset;
@ -283,16 +283,16 @@ bool8 NaturePowerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 par
tileset = 0x4a;
}
InitPokemonMove(&natureMove, gNaturePowerCalledMoves[tileset].moveID);
flag = gNaturePowerCalledMoves[tileset].callback(pokemon,target,&natureMove,param_4);
flag = gNaturePowerCalledMoves[tileset].callback(pokemon,target,&natureMove,itemId);
return flag;
}
bool8 LickMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 LickMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
bool8 flag;
flag = FALSE;
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0) {
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),itemId) != 0) {
flag = TRUE;
if(sub_805727C(pokemon, target, gLickSecondaryChance))
{
@ -302,30 +302,30 @@ bool8 LickMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
return flag;
}
bool8 SelfDestructMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 SelfDestructMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
HandleExplosion(pokemon, target, &target->pos, 1, GetMoveType(move), sub_8057600(move, param_4));
HandleExplosion(pokemon, target, &target->pos, 1, GetMoveType(move), GetDungeonExitReasonFromMoveOrItem(move, itemId));
return TRUE;
}
bool8 StunSporeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 StunSporeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
ParalyzeStatusTarget(pokemon, target, TRUE);
return TRUE;
}
bool8 ChargeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 ChargeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
SetChargeStatusTarget(pokemon, target, STATUS_CHARGING, move, gUnknown_80FAD6C);
return TRUE;
}
bool8 ThunderboltMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 ThunderboltMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
bool8 flag;
flag = FALSE;
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0) {
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),itemId) != 0) {
flag = TRUE;
if(sub_805727C(pokemon, target, gThunderboltSecondaryChance))
{
@ -335,13 +335,13 @@ bool8 ThunderboltMoveAction(Entity *pokemon, Entity *target, Move *move, s32 par
return flag;
}
bool8 MistMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 MistMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
MistStatusTarget(pokemon, target);
return TRUE;
}
bool8 FissureMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 FissureMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
u8 moveType;
bool8 uVar5;
@ -359,18 +359,18 @@ bool8 FissureMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FEB88);
}
else {
sub_806F370(pokemon,target,9999,1,&flag,GetMoveType(move),sub_8057600(move,param_4),0,1,1);
sub_806F370(pokemon,target,9999,1,&flag,GetMoveType(move),GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,1,1);
flag = flag == 0;
}
return flag;
}
bool8 ExtrasensoryMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 ExtrasensoryMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
bool8 flag;
flag = FALSE;
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0) {
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),itemId) != 0) {
flag = TRUE;
if(sub_805727C(pokemon, target, gExtrasensorySecondaryChance))
{
@ -380,13 +380,13 @@ bool8 ExtrasensoryMoveAction(Entity *pokemon, Entity *target, Move *move, s32 pa
return flag;
}
bool8 SafeguardMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 SafeguardMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
SafeguardStatusTarget(pokemon, target);
return TRUE;
}
bool8 AbsorbMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 AbsorbMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
bool8 hasLiquidOoze;
s32 iVar3;
@ -395,7 +395,7 @@ bool8 AbsorbMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
flag = FALSE;
hasLiquidOoze = AbilityIsActive(target, ABILITY_LIQUID_OOZE);
iVar3 = HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4);
iVar3 = HandleDamagingMove(pokemon,target,move,IntToF248_2(1),itemId);
if (iVar3 != 0) {
iVar4 = iVar3 / 2;
if (iVar4 < 1) {
@ -407,7 +407,7 @@ bool8 AbsorbMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
SetExpMultplier(entityInfo);
if (RollSecondaryEffect(pokemon,0)) {
if (hasLiquidOoze) {
DealDamageToEntity(pokemon,iVar4,0xd,0x1fa);
DealDamageToEntity(pokemon,iVar4,RESIDUAL_DAMAGE_LIQUID_OOZE,DUNGEON_EXIT_FAINTED_COVERED_IN_SLUDGE);
}
else {
HealTargetHP(pokemon,pokemon,iVar4,0,1);
@ -418,7 +418,7 @@ bool8 AbsorbMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
return flag;
}
bool8 SkillSwapMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 SkillSwapMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
bool32 flag;
@ -449,7 +449,7 @@ bool8 SkillSwapMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param
return flag;
}
bool8 SketchMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 SketchMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
s32 i;
bool8 ret = FALSE;
@ -488,12 +488,12 @@ bool8 SketchMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
return ret;
}
bool8 HeadbuttMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 HeadbuttMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
bool8 flag;
flag = FALSE;
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0) {
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),itemId) != 0) {
flag = TRUE;
if(sub_805727C(pokemon, target, gHeadbuttSecondaryChance))
{
@ -503,13 +503,13 @@ bool8 HeadbuttMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_
return flag;
}
bool8 DoubleEdgeMoveAction(Entity * pokemon,Entity * target,Move * move,s32 param_4)
bool8 DoubleEdgeMoveAction(Entity * pokemon,Entity * target,Move * move,s32 itemId)
{
s32 HP;
bool8 flag;
flag = FALSE;
if (HandleDamagingMove(pokemon, target, move, IntToF248_2(1), param_4) != 0) {
if (HandleDamagingMove(pokemon, target, move, IntToF248_2(1), itemId) != 0) {
flag = TRUE;
if ((!AbilityIsActive(pokemon, ABILITY_ROCK_HEAD)) && (RollSecondaryEffect(pokemon,0) != 0)) {
HP = GetEntInfo(pokemon)->maxHPStat;
@ -520,13 +520,13 @@ bool8 DoubleEdgeMoveAction(Entity * pokemon,Entity * target,Move * move,s32 para
if (HP == 0) {
HP = 1;
}
sub_806F370(pokemon,pokemon,HP,0,0,0,0x1fd,0x14,1,0);
sub_806F370(pokemon,pokemon,HP,0,0,0,DUNGEON_EXIT_FAINTED_FROM_RECOIL,RESIDUAL_DAMAGE_RECOIL,1,0);
}
}
return flag;
}
bool8 SandstormMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 SandstormMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
gDungeon->weather.unkE267[WEATHER_SANDSTORM] = gMoveWeatherDuration;
if(sub_807EAA0(1, 0) == 0)
@ -536,18 +536,18 @@ bool8 SandstormMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param
return TRUE;
}
bool8 sub_8059528(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 sub_8059528(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
LowerAccuracyStageTarget(pokemon, target, gStatIndexAtkDef, TRUE);
return TRUE;
}
bool8 SmogMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 SmogMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
bool8 flag;
flag = FALSE;
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0) {
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),itemId) != 0) {
flag = TRUE;
if(sub_805727C(pokemon, target, gSmogSecondaryChance))
{
@ -557,18 +557,18 @@ bool8 SmogMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
return flag;
}
bool8 GrowthMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 GrowthMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
RaiseAttackStageTarget(pokemon, target, gStatIndexSpecial, 1);
return TRUE;
}
bool8 SacredFireMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 SacredFireMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
bool8 flag;
flag = FALSE;
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0) {
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),itemId) != 0) {
flag = TRUE;
if(sub_805727C(pokemon, target, gSacredFireSecondaryChance))
{
@ -578,7 +578,7 @@ bool8 SacredFireMoveAction(Entity *pokemon, Entity *target, Move *move, s32 para
return flag;
}
bool8 sub_80595EC(Entity * pokemon,Entity * target,Move * move,s32 param_4)
bool8 sub_80595EC(Entity * pokemon,Entity * target,Move * move,s32 itemId)
{
u8 moveType;
u8 local_20;
@ -590,13 +590,13 @@ bool8 sub_80595EC(Entity * pokemon,Entity * target,Move * move,s32 param_4)
}
else {
moveType = GetMoveType(move);
sub_806F370(pokemon,target,9999,1,&local_20,moveType,sub_8057600(move,param_4),0,1,0);
sub_806F370(pokemon,target,9999,1,&local_20,moveType,GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,1,0);
local_20 = (local_20 == 0);
return local_20;
}
}
bool8 SolarBeamMoveAction(Entity * pokemon,Entity * target,Move * move,s32 param_4)
bool8 SolarBeamMoveAction(Entity * pokemon,Entity * target,Move * move,s32 itemId)
{
u8 weather; // weather and flag are reused in same variable
s24_8 modifier;
@ -608,7 +608,7 @@ bool8 SolarBeamMoveAction(Entity * pokemon,Entity * target,Move * move,s32 param
if (((weather == WEATHER_SANDSTORM) || (weather == WEATHER_RAIN)) || weather == WEATHER_HAIL) {
modifier.raw /= 2;
}
weather = HandleDamagingMove(pokemon,target,move,modifier,param_4) != 0 ? TRUE : FALSE;
weather = HandleDamagingMove(pokemon,target,move,modifier,itemId) != 0 ? TRUE : FALSE;
sub_8079764(pokemon);
}
else {
@ -618,23 +618,23 @@ bool8 SolarBeamMoveAction(Entity * pokemon,Entity * target,Move * move,s32 param
return weather;
}
bool8 SonicboomMoveAction(Entity * pokemon,Entity * target,Move * move,s32 param_4)
bool8 SonicboomMoveAction(Entity * pokemon,Entity * target,Move * move,s32 itemId)
{
u8 local_20;
local_20 = 0;
sub_806F370(pokemon,target,gSonicboomDmgValue,1,&local_20,GetMoveType(move),sub_8057600(move,param_4),0,1,0);
sub_806F370(pokemon,target,gSonicboomDmgValue,1,&local_20,GetMoveType(move),GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,1,0);
local_20 = local_20 == 0;
return local_20;
}
bool8 FlyMoveAction(Entity * pokemon, Entity * target, Move * move, s32 param_4)
bool8 FlyMoveAction(Entity * pokemon, Entity * target, Move * move, s32 itemId)
{
bool8 flag;
flag = FALSE;
if (MoveMatchesBideClassStatus(pokemon,move)) {
flag = HandleDamagingMove(pokemon,target,move,gFlyModifier,param_4) != 0 ? TRUE : FALSE;
flag = HandleDamagingMove(pokemon,target,move,gFlyModifier,itemId) != 0 ? TRUE : FALSE;
sub_8079764(pokemon);
}
else {
@ -644,13 +644,13 @@ bool8 FlyMoveAction(Entity * pokemon, Entity * target, Move * move, s32 param_4)
return flag;
}
bool8 ExplosionMoveAction(Entity * pokemon,Entity * target,Move * move,s32 param_4)
bool8 ExplosionMoveAction(Entity * pokemon,Entity * target,Move * move,s32 itemId)
{
HandleExplosion(pokemon,target,&target->pos,2,GetMoveType(move),sub_8057600(move,param_4));
HandleExplosion(pokemon,target,&target->pos,2,GetMoveType(move),GetDungeonExitReasonFromMoveOrItem(move,itemId));
return TRUE;
}
bool8 DiveMoveAction(Entity * pokemon, Entity * target, Move * move, s32 param_4)
bool8 DiveMoveAction(Entity * pokemon, Entity * target, Move * move, s32 itemId)
{
bool8 flag;
@ -659,7 +659,7 @@ bool8 DiveMoveAction(Entity * pokemon, Entity * target, Move * move, s32 param_4
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FD128);
}
else if (MoveMatchesBideClassStatus(pokemon,move)) {
flag = HandleDamagingMove(pokemon,target,move,gDiveModifier,param_4) != 0 ? TRUE : FALSE;
flag = HandleDamagingMove(pokemon,target,move,gDiveModifier,itemId) != 0 ? TRUE : FALSE;
sub_8079764(pokemon);
}
else {
@ -669,12 +669,12 @@ bool8 DiveMoveAction(Entity * pokemon, Entity * target, Move * move, s32 param_4
return flag;
}
bool8 MuddyWaterMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 MuddyWaterMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
bool8 flag;
flag = FALSE;
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0) {
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),itemId) != 0) {
flag = TRUE;
if(sub_805727C(pokemon, target, gMuddyWaterAccLowerChance))
{
@ -684,13 +684,13 @@ bool8 MuddyWaterMoveAction(Entity *pokemon, Entity *target, Move *move, s32 para
return flag;
}
bool8 StockpileMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 StockpileMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
HandleStockpile(pokemon, target);
return TRUE;
}
bool8 TwisterMoveAction(Entity * pokemon,Entity * target,Move * move,s32 param_4)
bool8 TwisterMoveAction(Entity * pokemon,Entity * target,Move * move,s32 itemId)
{
s32 modifierInt = 1;
bool8 flag = FALSE;
@ -699,7 +699,7 @@ bool8 TwisterMoveAction(Entity * pokemon,Entity * target,Move * move,s32 param_4
if (entInfo->bideClassStatus.status == STATUS_FLYING || entInfo->bideClassStatus.status == STATUS_BOUNCING) {
modifierInt = 2;
}
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(modifierInt),param_4) != 0)
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(modifierInt),itemId) != 0)
{
flag = TRUE;
if(sub_805727C(pokemon,target,gTwisterSecondaryChance) != 0) {
@ -709,12 +709,12 @@ bool8 TwisterMoveAction(Entity * pokemon,Entity * target,Move * move,s32 param_4
return flag;
}
bool8 TwineedleMoveAction(Entity * pokemon,Entity * target,Move * move,s32 param_4)
bool8 TwineedleMoveAction(Entity * pokemon,Entity * target,Move * move,s32 itemId)
{
bool8 flag;
flag = FALSE;
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0) {
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),itemId) != 0) {
flag = TRUE;
gUnknown_202F218 = 1;
}
@ -725,7 +725,7 @@ bool8 TwineedleMoveAction(Entity * pokemon,Entity * target,Move * move,s32 param
return flag;
}
bool8 sub_80599EC(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 sub_80599EC(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
s32 HP;
@ -736,43 +736,43 @@ bool8 sub_80599EC(Entity *pokemon, Entity *target, Move *move, s32 param_4)
return TRUE;
}
bool8 MinimizeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 MinimizeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
RaiseAccuracyStageTarget(pokemon, target, gStatIndexSpecial);
return TRUE;
}
bool8 sub_8059A2C(Entity * pokemon,Entity * target,Move * move,s32 param_4)
bool8 sub_8059A2C(Entity * pokemon,Entity * target,Move * move,s32 itemId)
{
u8 local_20;
u32 level;
local_20 = 0;
level = GetEntInfo(pokemon)->level;
sub_806F370(pokemon,target,level,1,&local_20,GetMoveType(move),sub_8057600(move,param_4),0,1,0);
sub_806F370(pokemon,target,level,1,&local_20,GetMoveType(move),GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,1,0);
local_20 = local_20 == 0;
return local_20;
}
bool8 SupersonicMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 SupersonicMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
ConfuseStatusTarget(pokemon, target, TRUE);
return TRUE;
}
bool8 TauntMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 TauntMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
TauntStatusTarget(pokemon, target);
return TRUE;
}
bool8 MoonlightMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 MoonlightMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
HealTargetHP(pokemon, target, gMoonlightHealValueByWeather[GetApparentWeather(pokemon)], 0, TRUE);
return TRUE;
}
bool8 HornDrillMoveAction(Entity * pokemon,Entity * target,Move * move,s32 param_4)
bool8 HornDrillMoveAction(Entity * pokemon,Entity * target,Move * move,s32 itemId)
{
u8 local_20;
@ -782,19 +782,19 @@ bool8 HornDrillMoveAction(Entity * pokemon,Entity * target,Move * move,s32 param
return FALSE;
}
else {
sub_806F370(pokemon,target,9999,1,&local_20,GetMoveType(move),sub_8057600(move,param_4),0,0,0);
sub_806F370(pokemon,target,9999,1,&local_20,GetMoveType(move),GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,0,0);
local_20 = local_20 == 0;
return local_20;
}
}
bool8 SwordsDanceMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 SwordsDanceMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
RaiseAttackStageTarget(pokemon, target, gStatIndexAtkDef, 2);
return TRUE;
}
bool8 ConversionMoveAction(Entity * pokemon,Entity * target,Move * move,s32 param_4)
bool8 ConversionMoveAction(Entity * pokemon,Entity * target,Move * move,s32 itemId)
{
u8 moveType;
Move *movePtr;
@ -838,13 +838,13 @@ bool8 ConversionMoveAction(Entity * pokemon,Entity * target,Move * move,s32 para
}
}
bool8 Conversion2MoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 Conversion2MoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
Conversion2StatusTarget(pokemon, target);
return TRUE;
}
bool8 HelpingHandMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 HelpingHandMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
bool8 flag;
flag = FALSE;
@ -860,24 +860,24 @@ bool8 HelpingHandMoveAction(Entity *pokemon, Entity *target, Move *move, s32 par
return flag;
}
bool8 sub_8059CD8(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 sub_8059CD8(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
RaiseDefenseStageTarget(pokemon, target, gStatIndexAtkDef, 2);
return TRUE;
}
bool8 WarpMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 WarpMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
WarpTarget(pokemon, target, 0, NULL);
return TRUE;
}
bool8 ThundershockMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 ThundershockMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
bool8 flag;
flag = FALSE;
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0) {
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),itemId) != 0) {
flag = TRUE;
if(sub_805727C(pokemon, target, gThundershockSecondaryChance))
{
@ -887,18 +887,18 @@ bool8 ThundershockMoveAction(Entity *pokemon, Entity *target, Move *move, s32 pa
return flag;
}
bool8 ThunderWaveMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 ThunderWaveMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
ParalyzeStatusTarget(pokemon, target, TRUE);
return TRUE;
}
bool8 ZapCannonMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 ZapCannonMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
bool8 flag;
flag = FALSE;
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0) {
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),itemId) != 0) {
flag = TRUE;
if(sub_805727C(pokemon, target, 0))
{
@ -908,30 +908,30 @@ bool8 ZapCannonMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param
return flag;
}
bool8 BlockMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 BlockMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
ImmobilizedStatusTarget(pokemon, target);
return TRUE;
}
bool8 PoisonGasMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 PoisonGasMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
PoisonedStatusTarget(pokemon, target, TRUE);
return TRUE;
}
bool8 ToxicMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 ToxicMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
BadlyPoisonedStatusTarget(pokemon, target, TRUE);
return TRUE;
}
bool8 PoisonFangMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 PoisonFangMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
bool8 flag;
flag = FALSE;
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0) {
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),itemId) != 0) {
flag = TRUE;
if(sub_805727C(pokemon, target, gPoisonFangSecondaryChance))
{

View File

@ -47,12 +47,12 @@
static void sub_805A7D4(Entity *, Entity *, Item *, DungeonPos *);
bool8 PoisonStingMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 PoisonStingMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
bool8 flag;
flag = FALSE;
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0) {
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),itemId) != 0) {
flag = TRUE;
if(sub_805727C(pokemon, target, gPoisonStingSecondaryChance))
{
@ -62,7 +62,7 @@ bool8 PoisonStingMoveAction(Entity *pokemon, Entity *target, Move *move, s32 par
return flag;
}
bool8 JumpKickMoveAction(Entity * pokemon,Entity * target,Move * move,s32 param_4,u8 param_5)
bool8 JumpKickMoveAction(Entity * pokemon,Entity * target,Move * move,s32 itemId,u8 param_5)
{
u8 moveType;
u32 movePower;
@ -73,7 +73,7 @@ bool8 JumpKickMoveAction(Entity * pokemon,Entity * target,Move * move,s32 param_
flag = FALSE;
if (param_5 == 0) {
flag = HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0 ? TRUE : FALSE;
flag = HandleDamagingMove(pokemon,target,move,IntToF248_2(1),itemId) != 0 ? TRUE : FALSE;
}
if (!flag) {
moveType = GetMoveTypeForMonster(pokemon,move);
@ -86,18 +86,18 @@ bool8 JumpKickMoveAction(Entity * pokemon,Entity * target,Move * move,s32 param_
if (dmgStruct.dmg == 0) {
dmgStruct.dmg = 1;
}
sub_806F370(pokemon,pokemon,dmgStruct.dmg,0,&auStack_20,0,0x1f7,0x13,1,0);
sub_806F370(pokemon,pokemon,dmgStruct.dmg,0,&auStack_20,0,DUNGEON_EXIT_MISSED_JUMP_KICK,RESIDUAL_DAMAGE_MOVE_FAIL,1,0);
}
return flag;
}
bool8 BounceMoveAction(Entity * pokemon,Entity * target,Move * move,s32 param_4)
bool8 BounceMoveAction(Entity * pokemon,Entity * target,Move * move,s32 itemId)
{
bool8 flag;
flag = FALSE;
if (MoveMatchesBideClassStatus(pokemon, move)) {
if (HandleDamagingMove(pokemon, target, move, gBounceModifier, param_4) != 0) {
if (HandleDamagingMove(pokemon, target, move, gBounceModifier, itemId) != 0) {
flag = TRUE;
if (sub_805727C(pokemon, target, gBounceSecondaryChance) != 0) {
ParalyzeStatusTarget(pokemon, target, FALSE);
@ -112,7 +112,7 @@ bool8 BounceMoveAction(Entity * pokemon,Entity * target,Move * move,s32 param_4)
return flag;
}
bool8 HiJumpKickMoveAction(Entity * pokemon,Entity * target,Move * move,s32 param_4,u8 param_5)
bool8 HiJumpKickMoveAction(Entity * pokemon,Entity * target,Move * move,s32 itemId,u8 param_5)
{
u8 moveType;
u32 movePower;
@ -123,7 +123,7 @@ bool8 HiJumpKickMoveAction(Entity * pokemon,Entity * target,Move * move,s32 para
flag = FALSE;
if (param_5 == 0) {
flag = HandleDamagingMove(pokemon,target,move,IntToF248_2(2),param_4) != 0 ? TRUE : FALSE;
flag = HandleDamagingMove(pokemon,target,move,IntToF248_2(2),itemId) != 0 ? TRUE : FALSE;
}
if (!flag) {
moveType = GetMoveTypeForMonster(pokemon,move);
@ -136,17 +136,17 @@ bool8 HiJumpKickMoveAction(Entity * pokemon,Entity * target,Move * move,s32 para
if (dmgStruct.dmg == 0) {
dmgStruct.dmg = 1;
}
sub_806F370(pokemon,pokemon,dmgStruct.dmg,0,&auStack_20,0,0x1f8,0x13,1,0);
sub_806F370(pokemon,pokemon,dmgStruct.dmg,0,&auStack_20,0,DUNGEON_EXIT_MISSED_HI_JUMP_KICK,RESIDUAL_DAMAGE_MOVE_FAIL,1,0);
}
return flag;
}
bool8 TriAttackMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
bool8 TriAttackMoveAction(Entity * pokemon, Entity * target, Move *move, s32 itemId)
{
bool8 flag;
flag = FALSE;
if(HandleDamagingMove(pokemon, target, move, IntToF248_2(1), param_4))
if(HandleDamagingMove(pokemon, target, move, IntToF248_2(1), itemId))
{
flag = TRUE;
if(sub_805727C(pokemon, target, gTriAttackSecondaryChance))
@ -169,7 +169,7 @@ bool8 TriAttackMoveAction(Entity * pokemon, Entity * target, Move *move, s32 par
return flag;
}
bool8 TrickMoveAction(Entity * pokemon,Entity * target, Move *move, s32 param_4)
bool8 TrickMoveAction(Entity * pokemon,Entity * target, Move *move, s32 itemId)
{
EntityInfo *r9;
EntityInfo *r8;
@ -225,16 +225,16 @@ bool8 TrickMoveAction(Entity * pokemon,Entity * target, Move *move, s32 param_4)
}
}
bool8 TripleKickMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
bool8 TripleKickMoveAction(Entity * pokemon, Entity * target, Move *move, s32 itemId)
{
bool8 flag;
gUnknown_202F210++;
flag = HandleDamagingMove(pokemon, target, move, IntToF248_2(gUnknown_202F210), param_4) ? TRUE : FALSE;
flag = HandleDamagingMove(pokemon, target, move, IntToF248_2(gUnknown_202F210), itemId) ? TRUE : FALSE;
return flag;
}
bool8 MudWaterSportMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
bool8 MudWaterSportMoveAction(Entity * pokemon, Entity * target, Move *move, s32 itemId)
{
if(move->id == MOVE_MUD_SPORT)
{
@ -247,12 +247,12 @@ bool8 MudWaterSportMoveAction(Entity * pokemon, Entity * target, Move *move, s32
return TRUE;
}
bool8 MudSlapMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 MudSlapMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
bool8 flag;
flag = FALSE;
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0) {
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),itemId) != 0) {
flag = TRUE;
if(sub_805727C(pokemon, target, 0))
{
@ -262,24 +262,24 @@ bool8 MudSlapMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4
return flag;
}
bool8 ThiefMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 ThiefMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
return ThiefAction(pokemon, target, move, param_4);
return ThiefAction(pokemon, target, move, itemId);
}
bool8 AmnesiaMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 AmnesiaMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
RaiseDefenseStageTarget(pokemon, target, gStatIndexSpecial, 2);
return TRUE;
}
bool8 GrowlMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 GrowlMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
LowerAttackStageTarget(pokemon, target, gStatIndexAtkDef, 1, 1, TRUE);
return TRUE;
}
bool8 SurfMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 SurfMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
bool8 flag;
s32 modifierInt;
@ -293,12 +293,12 @@ bool8 SurfMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
modifierInt = IntToF248_2(1).raw;
}
modifier.raw = modifierInt;
if(HandleDamagingMove(pokemon,target,move,modifier,param_4) != 0)
if(HandleDamagingMove(pokemon,target,move,modifier,itemId) != 0)
flag = TRUE;
return flag;
}
bool8 RolePlayMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 RolePlayMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
EntityInfo * entityInfo;
EntityInfo * targetEntityInfo;
@ -321,7 +321,7 @@ bool8 RolePlayMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_
}
}
bool8 SunnyDayMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 SunnyDayMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
gDungeon->weather.unkE267[WEATHER_SUNNY] = gMoveWeatherDuration;
if (sub_807EAA0(1,0) == 0) {
@ -330,24 +330,24 @@ bool8 SunnyDayMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_
return TRUE;
}
bool8 LeerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 LeerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
LowerDefenseStageTarget(pokemon, target, gStatIndexAtkDef, 1, 1, TRUE);
return TRUE;
}
bool8 WishMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 WishMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
WishStatusTarget(pokemon, target);
return TRUE;
}
bool8 FakeOutMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 FakeOutMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
bool8 flag;
flag = FALSE;
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0) {
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),itemId) != 0) {
flag = TRUE;
if(sub_805727C(pokemon, target, gFakeOutSecondaryChance))
{
@ -357,20 +357,20 @@ bool8 FakeOutMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4
return flag;
}
bool8 sub_805A450(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 sub_805A450(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC730);
return FALSE;
}
bool8 PayDayMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 PayDayMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
bool8 flag;
Item item;
DungeonPos pos;
flag = FALSE;
if (HandleDamagingMove(pokemon, target, move, IntToF248_2(1), param_4) != 0) {
if (HandleDamagingMove(pokemon, target, move, IntToF248_2(1), itemId) != 0) {
flag = TRUE;
if (RollSecondaryEffect(pokemon, 0) != 0) {
if (!EntityIsValid(target)) {
@ -384,25 +384,25 @@ bool8 PayDayMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
return flag;
}
bool8 AssistMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 AssistMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FC74C);
return FALSE;
}
bool8 RestMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 RestMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
NappingStatusTarget(pokemon, target, CalculateStatusTurns(target, gNappingTurnRange, FALSE));
return TRUE;
}
bool8 IngrainMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 IngrainMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
IngrainedStatusTarget(pokemon, target);
return TRUE;
}
bool8 SwallowMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 SwallowMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
u8 *stockpileStage;
@ -417,27 +417,27 @@ bool8 SwallowMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4
return TRUE;
}
bool8 CurseMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 CurseMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
CurseStatusTarget(pokemon, target);
return TRUE;
}
bool8 sub_805A568(Entity * pokemon, Entity * target, Move *move, s32 param_4)
bool8 sub_805A568(Entity * pokemon, Entity * target, Move *move, s32 itemId)
{
bool8 flag;
flag = HandleDamagingMove(pokemon, target, move, IntToF248_2(1), param_4) ? TRUE : FALSE;
flag = HandleDamagingMove(pokemon, target, move, IntToF248_2(1), itemId) ? TRUE : FALSE;
return flag;
}
bool8 SuperpowerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 SuperpowerMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
u32 stat;
bool8 flag;
flag = FALSE;
if (HandleDamagingMove(pokemon, target, move, IntToF248_2(1), param_4) != 0) {
if (HandleDamagingMove(pokemon, target, move, IntToF248_2(1), itemId) != 0) {
flag = TRUE;
if (sub_805727C(pokemon,pokemon,0) != 0) {
stat = gStatIndexAtkDef;
@ -465,13 +465,13 @@ bool8 SteelWingMoveAction(Entity *pokemon, Entity *target, Move *move, s32 stat,
return flag;
}
bool8 SpitUpMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 SpitUpMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
u8 *stockpileStage;
stockpileStage = &GetEntInfo(pokemon)->stockpileStage;
if (*stockpileStage != 0) {
HandleDamagingMove(pokemon,target,move,IntToF248_2(*stockpileStage),param_4);
HandleDamagingMove(pokemon,target,move,IntToF248_2(*stockpileStage),itemId);
*stockpileStage = 0;
}
else {
@ -480,12 +480,12 @@ bool8 SpitUpMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
return TRUE;
}
bool8 DynamicPunchMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 DynamicPunchMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
bool8 flag;
flag = FALSE;
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0) {
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),itemId) != 0) {
flag = TRUE;
if(sub_805727C(pokemon, target, 0))
{
@ -495,7 +495,7 @@ bool8 DynamicPunchMoveAction(Entity *pokemon, Entity *target, Move *move, s32 pa
return flag;
}
bool8 KnockOffMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 KnockOffMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
EntityInfo *entityInfo;
EntityInfo *targetEntityInfo;
@ -559,7 +559,7 @@ static void sub_805A7D4(Entity * pokemon, Entity * target, Item *item,
SpawnDroppedItem(pokemon,&stackEntity,item,1,0);
}
bool8 SplashMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
bool8 SplashMoveAction(Entity * pokemon, Entity * target, Move *move, s32 itemId)
{
int x;
int y;
@ -610,10 +610,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,sub_8057600(move, param_4),0,1,0);
sub_806F370(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,0x1fe,0,0,0);
sub_806F370(pokemon,pokemon,gSplashDmgValue,0,0,0,DUNGEON_EXIT_FAINTED_FROM_DAMAGE_BOUNCING,RESIDUAL_DAMAGE_REGULAR,0,0);
if ((IsFloorOver() == 0) && (EntityIsValid(pokemon))) goto _0805A9FE;
}
}
@ -657,13 +657,13 @@ _0805AA5E:
return TRUE;
}
bool8 sub_805AAD0(Entity * pokemon, Entity * target, Move *move, s32 param_4)
bool8 sub_805AAD0(Entity * pokemon, Entity * target, Move *move, s32 itemId)
{
FixedDamageStatusTarget(pokemon, pokemon);
return TRUE;
}
bool8 BellyDrumMoveAction(Entity * pokemon,Entity * target, Move *move, s32 param_4)
bool8 BellyDrumMoveAction(Entity * pokemon,Entity * target, Move *move, s32 itemId)
{
EntityInfo *info;
bool8 flag;
@ -682,18 +682,18 @@ bool8 BellyDrumMoveAction(Entity * pokemon,Entity * target, Move *move, s32 para
return flag;
}
bool8 LightScreenMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
bool8 LightScreenMoveAction(Entity * pokemon, Entity * target, Move *move, s32 itemId)
{
LightScreenStatusTarget(pokemon, target);
return TRUE;
}
bool8 SecretPowerMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
bool8 SecretPowerMoveAction(Entity * pokemon, Entity * target, Move *move, s32 itemId)
{
bool8 flag;
flag = FALSE;
if ( HandleDamagingMove(pokemon, target, move, IntToF248_2(1), param_4) != 0) {
if ( HandleDamagingMove(pokemon, target, move, IntToF248_2(1), itemId) != 0) {
flag = TRUE;
if (sub_805727C(pokemon,target,gSecretPowerSecondaryEffectChance) != 0) {
switch(gSecretPowerTable[gDungeon->tileset]) {
@ -731,12 +731,12 @@ bool8 SecretPowerMoveAction(Entity * pokemon, Entity * target, Move *move, s32 p
return flag;
}
bool8 sub_805AC90(Entity * pokemon, Entity * target, Move *move, s32 param_4)
bool8 sub_805AC90(Entity * pokemon, Entity * target, Move *move, s32 itemId)
{
bool8 flag;
flag = FALSE;
if ( HandleDamagingMove(pokemon, target, move, IntToF248_2(1), param_4) != 0) {
if ( HandleDamagingMove(pokemon, target, move, IntToF248_2(1), itemId) != 0) {
flag = TRUE;
if (sub_805727C(pokemon,target,gDizzyPunchSecondaryChance) != 0) {
ConfuseStatusTarget(pokemon, target, FALSE);
@ -745,7 +745,7 @@ bool8 sub_805AC90(Entity * pokemon, Entity * target, Move *move, s32 param_4)
return flag;
}
bool8 BulkUpMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 BulkUpMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
s32 stat = gStatIndexAtkDef;
RaiseAttackStageTarget(pokemon, target, stat, 1);
@ -753,19 +753,19 @@ bool8 BulkUpMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
return TRUE;
}
bool8 ObserverOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 ObserverOrbAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
PausedStatusTarget(pokemon, target, 1, CalculateStatusTurns(target, gObserverOrbPausedTurnRange, TRUE), TRUE);
return TRUE;
}
bool8 FeatherDanceMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 FeatherDanceMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
LowerAttackStageTarget(pokemon, target, gStatIndexAtkDef, 2, 1, TRUE);
return TRUE;
}
bool8 BeatUpMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
bool8 BeatUpMoveAction(Entity * pokemon, Entity * target, Move *move, s32 itemId)
{
s32 numPossibleTargets;
s32 i;
@ -803,21 +803,21 @@ bool8 BeatUpMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_
return flag;
}
bool8 BlastBurnMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 BlastBurnMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
bool8 flag;
SendThawedMessage(pokemon, target);
flag = HandleDamagingMove(pokemon,target,move,IntToF248_2(2),param_4) != 0 ? TRUE : FALSE;
flag = HandleDamagingMove(pokemon,target,move,IntToF248_2(2),itemId) != 0 ? TRUE : FALSE;
return flag;
}
bool8 CrushClawMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
bool8 CrushClawMoveAction(Entity * pokemon, Entity * target, Move *move, s32 itemId)
{
bool8 flag;
flag = FALSE;
if ( HandleDamagingMove(pokemon, target, move, IntToF248_2(1), param_4) != 0) {
if ( HandleDamagingMove(pokemon, target, move, IntToF248_2(1), itemId) != 0) {
flag = TRUE;
if (sub_805727C(pokemon,target,gCrushClawSecondaryChance) != 0) {
LowerDefenseStageTarget(pokemon, target, gStatIndexAtkDef, 1, 1, FALSE);
@ -826,13 +826,13 @@ bool8 CrushClawMoveAction(Entity * pokemon, Entity * target, Move *move, s32 par
return flag;
}
bool8 BlazeKickMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
bool8 BlazeKickMoveAction(Entity * pokemon, Entity * target, Move *move, s32 itemId)
{
bool8 flag;
flag = FALSE;
SendThawedMessage(pokemon, target);
if ( HandleDamagingMove(pokemon, target, move, IntToF248_2(1), param_4) != 0) {
if ( HandleDamagingMove(pokemon, target, move, IntToF248_2(1), itemId) != 0) {
flag = TRUE;
if (sub_805727C(pokemon,target,gBlazeKickSecondaryChance) != 0) {
BurnedStatusTarget(pokemon, target, 0, FALSE);
@ -841,14 +841,14 @@ bool8 BlazeKickMoveAction(Entity * pokemon, Entity * target, Move *move, s32 par
return flag;
}
bool8 PresentMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
bool8 PresentMoveAction(Entity * pokemon, Entity * target, Move *move, s32 itemId)
{
bool8 flag;
s32 rand1 = DungeonRandInt(100);
s32 rand2 = rand1;
if (rand1 < 10) {
flag = (sub_8055864(pokemon,target,move,0x78,param_4) != 0);
flag = (sub_8055864(pokemon,target,move,0x78,itemId) != 0);
return flag;
}
else {
@ -858,17 +858,17 @@ bool8 PresentMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param
return TRUE;
}
else if (rand2 >= 60) {
flag = (sub_8055864(pokemon,target,move,0x28,param_4) != 0);
flag = (sub_8055864(pokemon,target,move,0x28,itemId) != 0);
return flag;
}
else {
flag = (sub_8055864(pokemon,target,move,0x50,param_4) != 0);
flag = (sub_8055864(pokemon,target,move,0x50,itemId) != 0);
return flag;
}
}
}
bool8 EruptionMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
bool8 EruptionMoveAction(Entity * pokemon, Entity * target, Move *move, s32 itemId)
{
EntityInfo *entityInfo;
s32 maxHp;
@ -891,17 +891,17 @@ bool8 EruptionMoveAction(Entity * pokemon, Entity * target, Move *move, s32 para
index = 3;
}
flag = HandleDamagingMove(pokemon,target,move,gEruptionModifiers[index],param_4) ? TRUE : FALSE;
flag = HandleDamagingMove(pokemon,target,move,gEruptionModifiers[index],itemId) ? TRUE : FALSE;
return flag;
}
bool8 GlareMoveAction(Entity * pokemon,Entity * target,Move *move,s32 param_4)
bool8 GlareMoveAction(Entity * pokemon,Entity * target,Move *move,s32 itemId)
{
ParalyzeStatusTarget(pokemon,target, TRUE);
return TRUE;
}
bool8 TransformMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
bool8 TransformMoveAction(Entity * pokemon, Entity * target, Move *move, s32 itemId)
{
if (IsBossFight()) {
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FEFF4);
@ -914,12 +914,12 @@ bool8 TransformMoveAction(Entity * pokemon, Entity * target, Move *move, s32 par
}
}
bool8 PoisonTailMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
bool8 PoisonTailMoveAction(Entity * pokemon, Entity * target, Move *move, s32 itemId)
{
bool8 flag;
flag = FALSE;
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0) {
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),itemId) != 0) {
flag = TRUE;
if (sub_805727C(pokemon,target,gPoisonTailSecondaryChance) != 0) {
PoisonedStatusTarget(pokemon,target,FALSE);
@ -928,13 +928,13 @@ bool8 PoisonTailMoveAction(Entity * pokemon, Entity * target, Move *move, s32 pa
return flag;
}
bool8 RoarMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
bool8 RoarMoveAction(Entity * pokemon, Entity * target, Move *move, s32 itemId)
{
BlowAwayTarget(pokemon, target, GetEntInfo(pokemon)->action.direction);
return TRUE;
}
bool8 HandleColorChange(Entity * pokemon, Entity * target, Move *move, s32 param_4)
bool8 HandleColorChange(Entity * pokemon, Entity * target, Move *move, s32 itemId)
{
u8 newType;
const char *typeString;
@ -958,13 +958,13 @@ bool8 HandleColorChange(Entity * pokemon, Entity * target, Move *move, s32 param
}
}
bool8 TailGlowMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
bool8 TailGlowMoveAction(Entity * pokemon, Entity * target, Move *move, s32 itemId)
{
RaiseAttackStageTarget(pokemon,target,gStatIndexSpecial, 2);
return TRUE;
}
bool8 sub_805B17C(Entity * pokemon, Entity * target, Move *move, s32 param_4)
bool8 sub_805B17C(Entity * pokemon, Entity * target, Move *move, s32 itemId)
{
s32 uVar4;
bool8 flag;
@ -980,7 +980,7 @@ bool8 sub_805B17C(Entity * pokemon, Entity * target, Move *move, s32 param_4)
uVar4 = 0x7e;
}
}
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0) {
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),itemId) != 0) {
flag = TRUE;
if (sub_805727C(pokemon,target,gMovesConstrictionChance) != 0) {
SqueezedStatusTarget(pokemon,target,uVar4,0);
@ -989,19 +989,19 @@ bool8 sub_805B17C(Entity * pokemon, Entity * target, Move *move, s32 param_4)
return flag;
}
bool8 PerishSongMoveAction(Entity * pokemon,Entity * target,Move *move, s32 param_4)
bool8 PerishSongMoveAction(Entity * pokemon,Entity * target,Move *move, s32 itemId)
{
PerishSongTarget(pokemon, target);
return TRUE;
}
bool8 WrapMoveAction(Entity * pokemon,Entity * target,Move *move, s32 param_4)
bool8 WrapMoveAction(Entity * pokemon,Entity * target,Move *move, s32 itemId)
{
WrapTarget(pokemon, target);
return TRUE;
}
bool8 SpikesMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
bool8 SpikesMoveAction(Entity * pokemon, Entity * target, Move *move, s32 itemId)
{
bool8 trapLaid;
u8 uVar2;
@ -1027,7 +1027,7 @@ bool8 SpikesMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_
const s32 gUnknown_8106A8C[] = {6, 12, 18, 20, 24, 30, 30};
bool8 MagnitudeMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
bool8 MagnitudeMoveAction(Entity * pokemon, Entity * target, Move *move, s32 itemId)
{
s32 r3;
bool8 r6;
@ -1044,11 +1044,11 @@ bool8 MagnitudeMoveAction(Entity * pokemon, Entity * target, Move *move, s32 par
if (entityInfo->bideClassStatus.status == STATUS_DIGGING) {
magnitudeDmgVal *= 2;
}
r6 = sub_8055864(pokemon,target,move,magnitudeDmgVal,param_4) ? TRUE : FALSE;
r6 = sub_8055864(pokemon,target,move,magnitudeDmgVal,itemId) ? TRUE : FALSE;
return r6;
}
bool8 MagicCoatMoveAction(Entity * pokemon,Entity * target,Move *move, s32 param_4)
bool8 MagicCoatMoveAction(Entity * pokemon,Entity * target,Move *move, s32 itemId)
{
MagicCoatStatusTarget(pokemon, target);
return TRUE;

View File

@ -48,30 +48,30 @@
#include "switcher_orb.h"
#include "trawl_orb.h"
bool8 ProtectMoveAction(Entity * pokemon,Entity * target,Move *move, s32 param_4)
bool8 ProtectMoveAction(Entity * pokemon,Entity * target,Move *move, s32 itemId)
{
ProtectStatusTarget(pokemon, target);
return TRUE;
}
bool8 DefenseCurlMoveAction(Entity * pokemon,Entity * target,Move *move, s32 param_4)
bool8 DefenseCurlMoveAction(Entity * pokemon,Entity * target,Move *move, s32 itemId)
{
RaiseDefenseStageTarget(pokemon,target,gStatIndexAtkDef,1);
return TRUE;
}
bool8 sub_805B314(Entity * pokemon,Entity * target,Move *move, s32 param_4)
bool8 sub_805B314(Entity * pokemon,Entity * target,Move *move, s32 itemId)
{
sub_80783C4(pokemon, target, TRUE);
return TRUE;
}
bool8 MistBallMoveAction(Entity * pokemon,Entity * target,Move *move, s32 param_4)
bool8 MistBallMoveAction(Entity * pokemon,Entity * target,Move *move, s32 itemId)
{
bool8 flag;
flag = FALSE;
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0) {
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),itemId) != 0) {
flag = TRUE;
if (sub_805727C(pokemon,target,gMistBallSecondaryChance) != 0) {
LowerAttackStageTarget(pokemon,target,gStatIndexSpecial,1,1,0);
@ -80,24 +80,24 @@ bool8 MistBallMoveAction(Entity * pokemon,Entity * target,Move *move, s32 param_
return flag;
}
bool8 DestinyBondMoveAction(Entity * pokemon,Entity * target,Move *move, s32 param_4)
bool8 DestinyBondMoveAction(Entity * pokemon,Entity * target,Move *move, s32 itemId)
{
DestinyBondStatusTarget(pokemon, target);
return TRUE;
}
bool8 FalseSwipeMoveAction(Entity * pokemon,Entity * target,Move *move, s32 param_4)
bool8 FalseSwipeMoveAction(Entity * pokemon,Entity * target,Move *move, s32 itemId)
{
return (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4)) ? TRUE : FALSE;
return (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),itemId)) ? TRUE : FALSE;
}
bool8 MirrorCoatMoveAction(Entity * pokemon,Entity * target,Move *move, s32 param_4)
bool8 MirrorCoatMoveAction(Entity * pokemon,Entity * target,Move *move, s32 itemId)
{
MirrorCoatStatusTarget(pokemon, target);
return TRUE;
}
bool8 CalmMindMoveAction(Entity * pokemon,Entity * target,Move *move, s32 param_4)
bool8 CalmMindMoveAction(Entity * pokemon,Entity * target,Move *move, s32 itemId)
{
u32 stat = gStatIndexSpecial;
RaiseAttackStageTarget(pokemon,target,stat,1);
@ -105,13 +105,13 @@ bool8 CalmMindMoveAction(Entity * pokemon,Entity * target,Move *move, s32 param_
return TRUE;
}
bool8 HiddenPowerMoveAction(Entity * pokemon,Entity * target,Move *move, s32 param_4)
bool8 HiddenPowerMoveAction(Entity * pokemon,Entity * target,Move *move, s32 itemId)
{
HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4);
HandleDamagingMove(pokemon,target,move,IntToF248_2(1),itemId);
return TRUE;
}
bool8 MetalClawMoveAction(Entity * pokemon,Entity * target,Move *move, s32 param_4, s32 param_5)
bool8 MetalClawMoveAction(Entity * pokemon,Entity * target,Move *move, s32 itemId, s32 param_5)
{
EntityInfo *entityInfo;
bool8 flag;
@ -121,20 +121,20 @@ bool8 MetalClawMoveAction(Entity * pokemon,Entity * target,Move *move, s32 param
flag = TRUE;
if (sub_805727C(pokemon,pokemon,gMetalClawSecondaryChance) != 0) {
entityInfo = GetEntInfo(pokemon);
RaiseAttackStageTarget(pokemon,pokemon,param_4,1);
RaiseAttackStageTarget(pokemon,pokemon,itemId,1);
SetExpMultplier(entityInfo);
}
}
return flag;
}
bool8 AttractMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
bool8 AttractMoveAction(Entity * pokemon, Entity * target, Move *move, s32 itemId)
{
InfatuateStatusTarget(pokemon, target, TRUE);
return TRUE;
}
bool8 MimicMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
bool8 MimicMoveAction(Entity * pokemon, Entity * target, Move *move, s32 itemId)
{
EntityInfo *entityInfo;
EntityInfo *targetEntityInfo;
@ -171,7 +171,7 @@ bool8 MimicMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4
return mimicSuccess;
}
bool8 FrustrationMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
bool8 FrustrationMoveAction(Entity * pokemon, Entity * target, Move *move, s32 itemId)
{
s32 i;
bool8 local_24 = FALSE;
@ -185,19 +185,19 @@ bool8 FrustrationMoveAction(Entity * pokemon, Entity * target, Move *move, s32 p
}
}
sub_806F370(pokemon,target,dmg,1,&local_24,GetMoveType(move),sub_8057600(move,param_4),0,1,0);
sub_806F370(pokemon,target,dmg,1,&local_24,GetMoveType(move),GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,1,0);
local_24 = (local_24 == 0);
return local_24;
}
bool8 LeechSeedMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
bool8 LeechSeedMoveAction(Entity * pokemon, Entity * target, Move *move, s32 itemId)
{
HandleLeechSeed(pokemon, target, TRUE);
SetExpMultplier(GetEntInfo(pokemon));
return TRUE;
}
bool8 MetronomeMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
bool8 MetronomeMoveAction(Entity * pokemon, Entity * target, Move *move, s32 itemId)
{
bool8 flag;
Move natureMove;
@ -206,11 +206,11 @@ bool8 MetronomeMoveAction(Entity * pokemon, Entity * target, Move *move, s32 par
index = gMetronomeCalledArrayId;
InitPokemonMove(&natureMove, gMetronomeCalledMoves[index].moveID);
flag = gMetronomeCalledMoves[index].callback(pokemon, target, &natureMove, param_4);
flag = gMetronomeCalledMoves[index].callback(pokemon, target, &natureMove, itemId);
return flag;
}
bool8 DreamEaterMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
bool8 DreamEaterMoveAction(Entity * pokemon, Entity * target, Move *move, s32 itemId)
{
bool8 hasLiquidOoze;
s32 iVar3;
@ -220,7 +220,7 @@ bool8 DreamEaterMoveAction(Entity * pokemon, Entity * target, Move *move, s32 pa
flag = FALSE;
hasLiquidOoze = AbilityIsActive(target, ABILITY_LIQUID_OOZE);
if (IsSleeping(target)) {
iVar3 = HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4);
iVar3 = HandleDamagingMove(pokemon,target,move,IntToF248_2(1),itemId);
if (iVar3 != 0) {
flag = TRUE;
newHP = iVar3 / 2;
@ -231,7 +231,7 @@ bool8 DreamEaterMoveAction(Entity * pokemon, Entity * target, Move *move, s32 pa
SetExpMultplier(GetEntInfo(pokemon));
if (RollSecondaryEffect(pokemon,0) != 0) {
if (hasLiquidOoze) {
DealDamageToEntity(pokemon,newHP,0xd,0x1fa);
DealDamageToEntity(pokemon,newHP,RESIDUAL_DAMAGE_LIQUID_OOZE,DUNGEON_EXIT_FAINTED_COVERED_IN_SLUDGE);
}
else {
HealTargetHP(pokemon,pokemon,newHP,0,TRUE);
@ -246,13 +246,13 @@ bool8 DreamEaterMoveAction(Entity * pokemon, Entity * target, Move *move, s32 pa
return flag;
}
bool8 SnatchMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
bool8 SnatchMoveAction(Entity * pokemon, Entity * target, Move *move, s32 itemId)
{
SnatchStatusTarget(pokemon, target);
return TRUE;
}
bool8 RecycleMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
bool8 RecycleMoveAction(Entity * pokemon, Entity * target, Move *move, s32 itemId)
{
s32 i;
EntityInfo *entityInfo = GetEntInfo(target);
@ -285,35 +285,35 @@ bool8 RecycleMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param
return isTMRecycled;
}
bool8 ReflectMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
bool8 ReflectMoveAction(Entity * pokemon, Entity * target, Move *move, s32 itemId)
{
ReflectStatusTarget(pokemon, target);
return TRUE;
}
bool8 DragonRageMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
bool8 DragonRageMoveAction(Entity * pokemon, Entity * target, Move *move, s32 itemId)
{
u8 local_20;
local_20 = 0;
sub_806F370(pokemon,target,gDragonRageDmgValue,1,&local_20,GetMoveType(move),sub_8057600(move,param_4),0,1,0);
sub_806F370(pokemon,target,gDragonRageDmgValue,1,&local_20,GetMoveType(move),GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,1,0);
local_20 = (local_20 == 0);
return local_20;
}
bool8 DragonDanceMoveAction( Entity * pokemon, Entity * target, Move *move, s32 param_4)
bool8 DragonDanceMoveAction( Entity * pokemon, Entity * target, Move *move, s32 itemId)
{
RaiseAttackStageTarget(pokemon, target, gStatIndexAtkDef, 1);
RaiseMovementSpeedTarget(pokemon, target, 0, TRUE);
return TRUE;
}
bool8 SkullBashMoveAction(Entity * pokemon, Entity * target, Move * move, s32 param_4)
bool8 SkullBashMoveAction(Entity * pokemon, Entity * target, Move * move, s32 itemId)
{
bool8 flag;
if (MoveMatchesBideClassStatus(pokemon,move)) {
flag = HandleDamagingMove(pokemon,target,move,gSkullBashModifier,param_4) != 0 ? 1 : 0;
flag = HandleDamagingMove(pokemon,target,move,gSkullBashModifier,itemId) != 0 ? 1 : 0;
sub_8079764(pokemon);
}
else {
@ -323,12 +323,12 @@ bool8 SkullBashMoveAction(Entity * pokemon, Entity * target, Move * move, s32 pa
return flag;
}
bool8 LusterPurgeMoveAction(Entity * pokemon, Entity * target, Move * move, s32 param_4)
bool8 LusterPurgeMoveAction(Entity * pokemon, Entity * target, Move * move, s32 itemId)
{
bool8 flag;
flag = FALSE;
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0) {
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),itemId) != 0) {
flag = TRUE;
if(sub_805727C(pokemon, target, gLusterPurgeSecondaryChance))
{
@ -338,14 +338,14 @@ bool8 LusterPurgeMoveAction(Entity * pokemon, Entity * target, Move * move, s32
return flag;
}
bool8 StruggleMoveAction(Entity * pokemon, Entity * target, Move * move, s32 param_4)
bool8 StruggleMoveAction(Entity * pokemon, Entity * target, Move * move, s32 itemId)
{
s32 entityHP;
s32 newHP;
bool8 flag;
flag = FALSE;
if (HandleDamagingMove(pokemon, target, move, IntToF248_2(1), param_4) != 0) {
if (HandleDamagingMove(pokemon, target, move, IntToF248_2(1), itemId) != 0) {
flag = TRUE;
if (RollSecondaryEffect(pokemon, 0) != 0) {
entityHP = GetEntInfo(pokemon)->maxHPStat;
@ -356,14 +356,14 @@ bool8 StruggleMoveAction(Entity * pokemon, Entity * target, Move * move, s32 par
if (newHP < 1) {
newHP = 1;
}
sub_806F370(pokemon, pokemon, newHP, 0, 0, 0, sub_8057600(move, param_4), 0, 1, 0);
sub_806F370(pokemon, pokemon, newHP, 0, 0, 0, GetDungeonExitReasonFromMoveOrItem(move, itemId), RESIDUAL_DAMAGE_REGULAR, 1, 0);
}
}
return flag;
}
// overlay_0005.bin::0216AF44
bool8 RockSmashMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 RockSmashMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
DungeonPos pos;
bool8 flag = FALSE;
@ -382,13 +382,13 @@ bool8 RockSmashMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param
return flag;
}
bool8 sub_805BA44(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 sub_805BA44(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
sub_807D3CC(pokemon);
return TRUE;
}
bool8 ThiefAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 ThiefAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
EntityInfo *pokemonInfo1;
EntityInfo *pokemonInfo2;
@ -399,7 +399,7 @@ bool8 ThiefAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
Item *targetItem;
flag = FALSE;
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),param_4) != 0) {
if (HandleDamagingMove(pokemon,target,move,IntToF248_2(1),itemId) != 0) {
flag = TRUE;
if (sub_805727C(pokemon,target, 0) != 0) {
pokemonInfo1 = GetEntInfo(pokemon);
@ -440,26 +440,26 @@ bool8 ThiefAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
return flag;
}
bool8 ReboundOrbAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
bool8 ReboundOrbAction(Entity * pokemon, Entity * target, Move *move, s32 itemId)
{
CounterStatusTarget(pokemon, target, STATUS_MINI_COUNTER);
return TRUE;
}
bool8 SwitcherOrbAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
bool8 SwitcherOrbAction(Entity * pokemon, Entity * target, Move *move, s32 itemId)
{
SetExpMultplier(GetEntInfo(pokemon));
HandleSwitcherOrb(pokemon, target, TRUE);
return TRUE;
}
bool8 StayawayOrbAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
bool8 StayawayOrbAction(Entity * pokemon, Entity * target, Move *move, s32 itemId)
{
WarpTarget(pokemon, target, 1, NULL);
return TRUE;
}
bool8 CleanseOrbAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
bool8 CleanseOrbAction(Entity * pokemon, Entity * target, Move *move, s32 itemId)
{
s32 i;
EntityInfo *entityInfo = GetEntInfo(target);
@ -497,13 +497,13 @@ bool8 CleanseOrbAction(Entity * pokemon, Entity * target, Move *move, s32 param_
return isItemCleaned;
}
bool8 SlumberOrbAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
bool8 SlumberOrbAction(Entity * pokemon, Entity * target, Move *move, s32 itemId)
{
SleepStatusTarget(pokemon,target,CalculateStatusTurns(target, gSleepTurnRange, TRUE), TRUE);
return TRUE;
}
bool8 TwoEdgeMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
bool8 TwoEdgeMoveAction(Entity * pokemon, Entity * target, Move *move, s32 itemId)
{
EntityInfo *entityInfo;
bool8 flag;
@ -519,12 +519,12 @@ bool8 TwoEdgeMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param
if (targetHP < 0) {
targetHP = 0;
}
sub_806F370(pokemon,target,targetHP,0,&local_28,0,sub_8057600(move,param_4),0,0,0);
sub_806F370(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,sub_8057600(move,param_4),0,0,0);
sub_806F370(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);
@ -536,25 +536,25 @@ bool8 TwoEdgeMoveAction(Entity * pokemon, Entity * target, Move *move, s32 param
return flag;
}
bool8 SilenceOrbAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
bool8 SilenceOrbAction(Entity * pokemon, Entity * target, Move *move, s32 itemId)
{
MuzzleTarget(pokemon, target);
return TRUE;
}
bool8 ScannerOrbAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
bool8 ScannerOrbAction(Entity * pokemon, Entity * target, Move *move, s32 itemId)
{
HandleScannerOrb(pokemon, target);
return TRUE;
}
bool8 RadarOrbAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
bool8 RadarOrbAction(Entity * pokemon, Entity * target, Move *move, s32 itemId)
{
HandleRadarOrb(pokemon, target);
return TRUE;
}
bool8 TransferOrbAction(Entity *pokemon, Entity * target, Move *move, s32 param_4)
bool8 TransferOrbAction(Entity *pokemon, Entity * target, Move *move, s32 itemId)
{
EntityInfo *entityInfo;
s32 oldID; //r8
@ -598,37 +598,37 @@ bool8 TransferOrbAction(Entity *pokemon, Entity * target, Move *move, s32 param_
return didTransfer;
}
bool8 SlowDownMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 SlowDownMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
LowerMovementSpeedTarget(pokemon, target, 1, TRUE);
return TRUE;
}
bool8 LuminousOrbAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
bool8 LuminousOrbAction(Entity * pokemon, Entity * target, Move *move, s32 itemId)
{
HandleLuminousOrbAction(pokemon);
return TRUE;
}
bool8 PetrifyOrbAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
bool8 PetrifyOrbAction(Entity * pokemon, Entity * target, Move *move, s32 itemId)
{
PetrifiedStatusTarget(pokemon, target);
return TRUE;
}
bool8 PounceOrbAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
bool8 PounceOrbAction(Entity * pokemon, Entity * target, Move *move, s32 itemId)
{
HandlePounceOrb(pokemon, target, 8);
return TRUE;
}
bool8 TrawlOrbAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
bool8 TrawlOrbAction(Entity * pokemon, Entity * target, Move *move, s32 itemId)
{
HandleTrawlOrb(pokemon, target);
return TRUE;
}
bool8 EscapeOrbAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
bool8 EscapeOrbAction(Entity * pokemon, Entity * target, Move *move, s32 itemId)
{
SubstitutePlaceholderStringTags(gFormatBuffer_Monsters[0],pokemon,0);
if (gDungeon->unk644.unk2A != 0) {
@ -642,13 +642,13 @@ bool8 EscapeOrbAction(Entity * pokemon, Entity * target, Move *move, s32 param_4
return FALSE;
}
bool8 DroughtOrbAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
bool8 DroughtOrbAction(Entity * pokemon, Entity * target, Move *move, s32 itemId)
{
HandleDroughtOrb(pokemon, target);
return TRUE;
}
bool8 TrapbustOrbAction(Entity * pokemon,Entity * target, Move *move, s32 param_4)
bool8 TrapbustOrbAction(Entity * pokemon,Entity * target, Move *move, s32 itemId)
{
const Tile *tile;
Entity *object;
@ -704,7 +704,7 @@ bool8 TrapbustOrbAction(Entity * pokemon,Entity * target, Move *move, s32 param_
return foundTrap;
}
bool8 RollcallOrbAction(Entity * pokemon, Entity *target, Move *move, s32 param_4)
bool8 RollcallOrbAction(Entity * pokemon, Entity *target, Move *move, s32 itemId)
{
Entity **possibleTargets;
s32 numPossibleTargets;
@ -735,68 +735,68 @@ bool8 RollcallOrbAction(Entity * pokemon, Entity *target, Move *move, s32 param_
return foundTarget;
}
bool8 InvisifyOrbAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
bool8 InvisifyOrbAction(Entity * pokemon, Entity * target, Move *move, s32 itemId)
{
InvisibleStatusTarget(pokemon, pokemon);
return TRUE;
}
bool8 OneShotOrbAction(Entity * pokemon, Entity * target, Move *move, s32 param_4)
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),sub_8057600(move,param_4),0,1,0);
sub_806F370(pokemon,target,9999,1,&local_20,GetMoveType(move),GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,1,0);
local_20 = (local_20 == 0);
return local_20;
}
bool8 IdentifyOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 IdentifyOrbAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
IdentityItemHolders(pokemon, target);
return TRUE;
}
bool8 VacuumCutMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 VacuumCutMoveAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
bool8 flag;
flag = sub_8055864(pokemon, target, move, gVacuumCutDmgValue, param_4) != 0 ? TRUE : FALSE;
flag = sub_8055864(pokemon, target, move, gVacuumCutDmgValue, itemId) != 0 ? TRUE : FALSE;
return flag;
}
bool8 ReviverOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 ReviverOrbAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
TryDisplayDungeonLoggableMessage3(pokemon, target, gUnknown_80FD454);
return FALSE;
}
bool8 ShockerOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 ShockerOrbAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
CowerStatusTarget(pokemon, target, TRUE);
return TRUE;
}
bool8 sub_805C208(Entity *pokemon, Entity *target, Move *move, u32 param_4)
bool8 sub_805C208(Entity *pokemon, Entity *target, Move *move, u32 itemId)
{
u32 targetSize;
u8 local_24;
local_24 = 0;
targetSize = GetSize(GetEntInfo(target)->apparentID);
sub_806F370(pokemon,target,targetSize,1,&local_24,GetMoveType(move),sub_8057600(move,param_4),0,1,0);
sub_806F370(pokemon,target,targetSize,1,&local_24,GetMoveType(move),GetDungeonExitReasonFromMoveOrItem(move,itemId),RESIDUAL_DAMAGE_REGULAR,1,0);
local_24 = local_24 == 0;
return local_24;
}
bool8 sub_805C288(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 sub_805C288(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
sub_8078A58(pokemon, target, gFamishBellyDownValue, 0);
return TRUE;
}
bool8 OneRoomOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 OneRoomOrbAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
HandleOneRoomOrb(pokemon, target);
return TRUE;

View File

@ -21,7 +21,7 @@ extern void sub_807FC3C(DungeonPos *, u32, u32);
extern void sub_8042A54(DungeonPos *);
extern void sub_8042A64(DungeonPos *);
bool8 FillInOrbAction(Entity *pokemon,Entity *target, Move *move, s32 param_4)
bool8 FillInOrbAction(Entity *pokemon,Entity *target, Move *move, s32 itemId)
{
Tile *tileToFill;
EntityInfo *targetInfo;
@ -71,7 +71,7 @@ bool8 FillInOrbAction(Entity *pokemon,Entity *target, Move *move, s32 param_4)
}
}
bool8 TrapperOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 TrapperOrbAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
u32 var;
var = (GetEntInfo(target)->isNotTeamMember ? 2 : 1);
@ -79,7 +79,7 @@ bool8 TrapperOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
return TRUE;
}
bool8 ItemizeOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 ItemizeOrbAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
Item stack;
DungeonPos posStruct = target->pos;
@ -94,36 +94,36 @@ bool8 ItemizeOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
target->isVisible = FALSE;
CreateItemWithStickyChance(&stack, GetRandomFloorItem(0), 0);
SpawnDroppedItemWrapper(pokemon, &posStruct, &stack);
HandleFaint(target, 0x218, pokemon);
HandleFaint(target, DUNGEON_EXIT_TRANSFORMED_INTO_ITEM, pokemon);
return TRUE;
}
}
bool8 HurlOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 HurlOrbAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
HandleHurlOrb(pokemon, target);
return TRUE;
}
bool8 MobileOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 MobileOrbAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
MobileStatusTarget(pokemon, target);
return TRUE;
}
bool8 StairsOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 StairsOrbAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
HandleStairsOrb(pokemon, target);
return TRUE;
}
bool8 LongtossOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 LongtossOrbAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
LongTossStatusTarget(pokemon, target);
return TRUE;
}
bool8 PierceOrbAction(Entity *pokemon, Entity *target, Move *move, s32 param_4)
bool8 PierceOrbAction(Entity *pokemon, Entity *target, Move *move, s32 itemId)
{
PierceStatusTarget(pokemon, target);
return TRUE;

View File

@ -27,14 +27,13 @@
#include "dungeon_strings.h"
#include "dungeon_pos_data.h"
#include "dungeon_damage.h"
#include "dungeon_misc.h"
#include "dungeon_mon_spawn.h"
#include "dungeon_kecleon_shop.h"
extern void UpdateMinimap();
extern void EntityUpdateStatusSprites(Entity *);
extern void sub_8042A74(Entity *r0);
extern s32 GetMonsterApparentID(Entity *param_1, s16 param_2);
extern void sub_806A898(Entity *, u32, u32);
extern void HealTargetHP(Entity *pokemon, Entity *r1, s16, s16, u32);
extern void sub_80420C8(Entity *r0);
extern void nullsub_68(Entity *);
@ -188,7 +187,7 @@ void EndSleepClassStatus(Entity * pokemon, Entity * target, bool8 param_3, bool8
isAsleep = TRUE;
TryDisplayDungeonLoggableMessage3(pokemon,target,gUnknown_80FA70C);
if (param_4) {
DealDamageToEntity(target,gNightmareDmgValue,8,0x20f);
DealDamageToEntity(target,gNightmareDmgValue,RESIDUAL_DAMAGE_NIGHTMARE,DUNGEON_EXIT_FAINTED_WHILE_IN_NIGHTMARE);
}
break;
case STATUS_NAPPING:

View File

@ -83,7 +83,7 @@ FixedPoint IntToFixedPoint(s32 a)
return p;
}
FixedPoint FixedPoint_SetFromUnk(s48_16* param_1)
FixedPoint FixedPoint_SetFromS48_16(s48_16* param_1)
{
FixedPoint s;

View File

@ -290,7 +290,7 @@ void RunDungeon_Async(DungeonSetupStruct *setupPtr)
gDungeon->unkE = 0;
gDungeon->unk1BDD4.unk1C05E = 0;
if (!r6) {
gDungeon->unk644.unk35 = 0;
gDungeon->unk644.emptyBellyAlert = 0;
gDungeon->unk644.unk48 = 0;
gDungeon->unk644.unk4C = 0;
gDungeon->unk644.unk50 = 0;
@ -517,7 +517,7 @@ void RunDungeon_Async(DungeonSetupStruct *setupPtr)
leader = GetLeader();
DisplayDungeonMessage(0, gPtrClientFaintedMessage, 1);
gDungeon->unk6 = 0;
sub_8083AB0(0x222, leader, leader);
sub_8083AB0(DUNGEON_EXIT_FAILED_TO_PROTECT_CLIENT, leader, leader);
}
CloseAllSpriteFiles();
sub_8049820();
@ -550,30 +550,30 @@ void RunDungeon_Async(DungeonSetupStruct *setupPtr)
check = TRUE;
}
else if (gDungeon->unk11 == 1) {
sub_8083AB0(0x226, NULL, GetLeader());
sub_8083AB0(DUNGEON_EXIT_ESCAPED_MIDDLE_OF_EXPLORATION, NULL, GetLeader());
check = TRUE;
}
else if (gDungeon->unk11 == 2) {
sub_8083AB0(0x229, NULL, GetLeader());
sub_8083AB0(DUNGEON_EXIT_IMPRESSIVELY_COMPLETED_MISSION, NULL, GetLeader());
if (gDungeon->unk644.unk2A != 0) {
IncrementThievingSuccesses();
}
check = TRUE;
}
else if (gDungeon->unk11 == 3) {
sub_8083AB0(0x22A, NULL, GetLeader());
sub_8083AB0(DUNGEON_EXIT_BEFRIENDED_MEW, NULL, GetLeader());
if (gDungeon->unk644.unk2A != 0) {
IncrementThievingSuccesses();
}
check = TRUE;
}
else if (gDungeon->unk11 == 4) {
var = 0x227;
var = DUNGEON_EXIT_CLEARED_DUNGEON;
sub_8083AB0(var, NULL, GetLeader());
check = TRUE;
}
else if (gDungeon->unk644.unk34 == 1 && GetFloorType() == FLOOR_TYPE_RESCUE && gDungeon->unk644.unk10 == 2) {
sub_8083AB0(0x228, NULL, GetLeader());
sub_8083AB0(DUNGEON_EXIT_SUCCEEDED_IN_RESCUE_MISSION, NULL, GetLeader());
if (gDungeon->unk644.unk2A != 0) {
IncrementThievingSuccesses();
}
@ -597,7 +597,7 @@ void RunDungeon_Async(DungeonSetupStruct *setupPtr)
continue;
}
else {
var = 0x227;
var = DUNGEON_EXIT_CLEARED_DUNGEON;
sub_8083AB0(var, NULL, GetLeader());
check = TRUE;
// This goto is a fakematch I had to create in order to generate matching code.
@ -728,7 +728,7 @@ void sub_8043D60(void)
unk = FALSE;
if (unk) {
HandleFaint(mon, 0x207, mon);
HandleFaint(mon, DUNGEON_EXIT_DEBUG_DAMAGE, mon);
}
}
}
@ -787,7 +787,7 @@ bool8 TryForcedLoss(bool8 a0)
DisplayDungeonMessage(0, gUnknown_80F89B4, 1);
}
sub_8042B0C(leader);
HandleFaint(leader, 0x21F, leader);
HandleFaint(leader, DUNGEON_EXIT_RETURNED_WITH_FALLEN_PARTNER, leader);
ret = TRUE;
}
}
@ -799,7 +799,7 @@ bool8 TryForcedLoss(bool8 a0)
DisplayDungeonMessage(0, gUnknown_80F89D4, 1);
}
sub_8042B0C(leader);
HandleFaint(leader, 0x222, leader);
HandleFaint(leader, DUNGEON_EXIT_FAILED_TO_PROTECT_CLIENT, leader);
ret = TRUE;
}
}
@ -811,7 +811,7 @@ bool8 TryForcedLoss(bool8 a0)
DisplayDungeonMessage(0, gUnknown_80F89D8, 1);
}
sub_8042B0C(leader);
HandleFaint(leader, 0x222, leader);
HandleFaint(leader, DUNGEON_EXIT_FAILED_TO_PROTECT_CLIENT, leader);
ret = TRUE;
}
}

View File

@ -382,7 +382,7 @@ void TryTriggerTrap(Entity *pokemon, DungeonPos *pos, int param_3, char param_4)
break;
case TRAP_CHESTNUT_TRAP:
if (target != NULL) {
DealDamageToEntity(target,gChestnutTrapDmgValue,0xf,0x213);
DealDamageToEntity(target,gChestnutTrapDmgValue,RESIDUAL_DAMAGE_CHESTNUT_TRAP,DUNGEON_EXIT_TRIPPED_CHESTNUT_TRAP);
}
break;
case TRAP_WONDER_TILE:
@ -394,7 +394,7 @@ void TryTriggerTrap(Entity *pokemon, DungeonPos *pos, int param_3, char param_4)
break;
case TRAP_SPIKE_TRAP:
if (target != NULL) {
DealDamageToEntity(target,gSpikeTrapDmgValue,10,0x206);
DealDamageToEntity(target,gSpikeTrapDmgValue,RESIDUAL_DAMAGE_SPIKES,DUNGEON_EXIT_FAINTED_FROM_SPIKES);
}
}
if (EntityIsValid(target)) {
@ -509,12 +509,12 @@ void HandlePoisonTrap(Entity *pokemon, Entity *target)
void HandleSelfdestructTrap(Entity *pokemon, Entity *target)
{
HandleExplosion(pokemon, target, &target->pos, 1, TYPE_NONE, 0x212);
HandleExplosion(pokemon, target, &target->pos, 1, TYPE_NONE, DUNGEON_EXIT_DISAPPEARED_IN_EXPLOSION);
}
void HandleExplosionTrap(Entity *pokemon, Entity *target)
{
HandleExplosion(pokemon, target, &target->pos, 2, TYPE_NONE, 0x212);
HandleExplosion(pokemon, target, &target->pos, 2, TYPE_NONE, DUNGEON_EXIT_DISAPPEARED_IN_EXPLOSION);
}
void HandleGrimyTrap(Entity *pokemon, Entity *target)
@ -590,7 +590,7 @@ void HandlePitfallTrap(Entity *pokemon, Entity *target, Tile *tile)
info->unk15C = 1;
info->unk15E = 1;
sub_803E708(0x28,0x4b);
DealDamageToEntity(target,gPitfallTrapDmgValue,0x11,0x215);
DealDamageToEntity(target,gPitfallTrapDmgValue,RESIDUAL_DAMAGE_PITFALL,DUNGEON_EXIT_FELL_INTO_PITFALL);
gDungeon->unk2 = 2;
return;
}
@ -605,7 +605,7 @@ void HandlePitfallTrap(Entity *pokemon, Entity *target, Tile *tile)
else {
DisplayDungeonLoggableMessageTrue(pokemon,gUnknown_80F970C); // $m0 fell into the pitfall!
}
HandleFaint(target,0x215,pokemon);
HandleFaint(target,DUNGEON_EXIT_FELL_INTO_PITFALL,pokemon);
}
if (flag) {
SetTrap(tile, TRAP_PITFALL_TRAP);