mirror of
https://github.com/pret/pmd-red.git
synced 2026-08-25 10:14:36 -05:00
Merge pull request #438 from ElectroDeoxys/master
Some checks failed
GithubCI / build (push) Has been cancelled
Some checks failed
GithubCI / build (push) Has been cancelled
Document dungeon belly functions/exit reasons, identify struct fields
This commit is contained in:
72
include/constants/dungeon_exit.h
Normal file
72
include/constants/dungeon_exit.h
Normal file
@@ -0,0 +1,72 @@
|
||||
#ifndef GUARD_CONSTANTS_DUNGEON_EXIT_H
|
||||
#define GUARD_CONSTANTS_DUNGEON_EXIT_H
|
||||
|
||||
// constants start at this value
|
||||
#define DUNGEON_EXIT_REASON_START 500
|
||||
|
||||
// reasons after this value are considered successful exits
|
||||
#define DUNGEON_EXIT_REASON_SUCCESS 550
|
||||
|
||||
enum DungeonExitReason
|
||||
{
|
||||
DUNGEON_EXIT_TRANSFORMED_INTO_FRIEND = DUNGEON_EXIT_REASON_START,
|
||||
DUNGEON_EXIT_LEFT_WITHOUT_BEING_BEFRIENDED,
|
||||
DUNGEON_EXIT_FAINTED_FROM_DEBUG_ATTACK,
|
||||
DUNGEON_EXIT_MISSED_JUMP_KICK,
|
||||
DUNGEON_EXIT_MISSED_HI_JUMP_KICK,
|
||||
DUNGEON_EXIT_FAINTED_FROM_DESTINY_BOND,
|
||||
DUNGEON_EXIT_FAINTED_COVERED_IN_SLUDGE,
|
||||
DUNGEON_EXIT_UNUSED_507,
|
||||
DUNGEON_EXIT_UNUSED_508,
|
||||
DUNGEON_EXIT_FAINTED_FROM_RECOIL,
|
||||
DUNGEON_EXIT_FAINTED_FROM_DAMAGE_BOUNCING,
|
||||
DUNGEON_EXIT_DEFEATED_PENT_UP_ENERGY,
|
||||
DUNGEON_EXIT_UNUSED_512,
|
||||
DUNGEON_EXIT_UNUSED_513,
|
||||
DUNGEON_EXIT_UNUSED_514,
|
||||
DUNGEON_EXIT_UNUSED_515,
|
||||
DUNGEON_EXIT_UNUSED_516,
|
||||
DUNGEON_EXIT_UNUSED_517,
|
||||
DUNGEON_EXIT_FAINTED_FROM_SPIKES,
|
||||
DUNGEON_EXIT_DEBUG_DAMAGE,
|
||||
DUNGEON_EXIT_FAINTED_FROM_BURN,
|
||||
DUNGEON_EXIT_FAINTED_FROM_CONSTRICTION,
|
||||
DUNGEON_EXIT_FAINTED_FROM_POISON,
|
||||
DUNGEON_EXIT_FAINTED_FROM_WRAP,
|
||||
DUNGEON_EXIT_FELLED_BY_CURSE,
|
||||
DUNGEON_EXIT_DRAINED_BY_LEECH_SEED,
|
||||
DUNGEON_EXIT_FAINTED_FROM_PERISH_SONG,
|
||||
DUNGEON_EXIT_FAINTED_WHILE_IN_NIGHTMARE,
|
||||
DUNGEON_EXIT_FELLED_BY_THROWN_ROCK,
|
||||
DUNGEON_EXIT_FAINTED_FROM_HUNGER,
|
||||
DUNGEON_EXIT_DISAPPEARED_IN_EXPLOSION,
|
||||
DUNGEON_EXIT_TRIPPED_CHESTNUT_TRAP,
|
||||
DUNGEON_EXIT_FAINTED_DUE_TO_TRAP,
|
||||
DUNGEON_EXIT_FELL_INTO_PITFALL,
|
||||
DUNGEON_EXIT_DEFEATED_BLAST_SEED,
|
||||
DUNGEON_EXIT_FELLED_BY_THROWN_ITEM,
|
||||
DUNGEON_EXIT_TRANSFORMED_INTO_ITEM,
|
||||
DUNGEON_EXIT_FAINTED_FROM_BEING_KNOCKED,
|
||||
DUNGEON_EXIT_FELLED_BY_POKEMON_FLYING,
|
||||
DUNGEON_EXIT_GAVE_UP_EXPLORATION,
|
||||
DUNGEON_EXIT_DELETED_FOR_EVENT,
|
||||
DUNGEON_EXIT_WENT_AWAY,
|
||||
DUNGEON_EXIT_BLOWN_OUT_UNSEEN_FORCE,
|
||||
DUNGEON_EXIT_RETURNED_WITH_FALLEN_PARTNER,
|
||||
DUNGEON_EXIT_FAINTED_DUE_TO_WEATHER,
|
||||
DUNGEON_EXIT_WAS_POSSESSED,
|
||||
DUNGEON_EXIT_FAILED_TO_PROTECT_CLIENT,
|
||||
DUNGEON_EXIT_FAINTED_FROM_WONDER_ORB,
|
||||
DUNGEON_EXIT_FAINTED_FROM_ITEM,
|
||||
DUNGEON_EXIT_UNUSED_549,
|
||||
|
||||
DUNGEON_EXIT_ESCAPED_MIDDLE_OF_EXPLORATION = DUNGEON_EXIT_REASON_SUCCESS,
|
||||
DUNGEON_EXIT_CLEARED_DUNGEON,
|
||||
DUNGEON_EXIT_SUCCEEDED_IN_RESCUE_MISSION,
|
||||
DUNGEON_EXIT_IMPRESSIVELY_COMPLETED_MISSION,
|
||||
DUNGEON_EXIT_BEFRIENDED_MEW,
|
||||
};
|
||||
|
||||
#define NUM_DUNGEON_EXIT_REASONS 55
|
||||
|
||||
#endif
|
||||
31
include/constants/residual_damage.h
Normal file
31
include/constants/residual_damage.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#ifndef GUARD_CONSTANTS_RESIDUAL_DAMAGE_H
|
||||
#define GUARD_CONSTANTS_RESIDUAL_DAMAGE_H
|
||||
|
||||
enum ResidualDamageType
|
||||
{
|
||||
RESIDUAL_DAMAGE_REGULAR,
|
||||
RESIDUAL_DAMAGE_BURN,
|
||||
RESIDUAL_DAMAGE_CONSTRICT,
|
||||
RESIDUAL_DAMAGE_POISON,
|
||||
RESIDUAL_DAMAGE_UNUSED_4,
|
||||
RESIDUAL_DAMAGE_WRAP,
|
||||
RESIDUAL_DAMAGE_COUNTERATTACK,
|
||||
RESIDUAL_DAMAGE_CURSE,
|
||||
RESIDUAL_DAMAGE_NIGHTMARE,
|
||||
RESIDUAL_DAMAGE_LEECH_SEED,
|
||||
RESIDUAL_DAMAGE_SPIKES,
|
||||
RESIDUAL_DAMAGE_PERISH_SONG,
|
||||
RESIDUAL_DAMAGE_DESTINY_BOND,
|
||||
RESIDUAL_DAMAGE_LIQUID_OOZE,
|
||||
RESIDUAL_DAMAGE_HUNGER,
|
||||
RESIDUAL_DAMAGE_CHESTNUT_TRAP,
|
||||
RESIDUAL_DAMAGE_UNUSED_16,
|
||||
RESIDUAL_DAMAGE_PITFALL,
|
||||
RESIDUAL_DAMAGE_BAD_WEATHER,
|
||||
RESIDUAL_DAMAGE_MOVE_FAIL,
|
||||
RESIDUAL_DAMAGE_RECOIL,
|
||||
|
||||
NUM_RESIDUAL_DAMAGE_TYPES
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
#include "structs/dungeon_entity.h"
|
||||
|
||||
void sub_8083AB0(s16 param_0, Entity *target, Entity *entity);
|
||||
bool8 sub_8083C24(void);
|
||||
void sub_8083AB0(s16 dungeonExitReason, Entity *target, Entity *entity);
|
||||
bool8 IsUnsuccessfulDungeonExit(void);
|
||||
bool8 sub_8083C50(void);
|
||||
bool8 sub_8083C88(u8 param_1);
|
||||
|
||||
|
||||
@@ -248,6 +248,12 @@ extern const s32 gEffectivenessChart[NUM_EFFECTIVENESS][NUM_EFFECTIVENESS];
|
||||
#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 MAX_EMPTY_BELLY_ALERT_STEPS 10
|
||||
|
||||
#define WARP_SCARF_ACTIVATION_CHANCES_COUNT 20
|
||||
extern const s16 gWarpScarfActivationChances[WARP_SCARF_ACTIVATION_CHANCES_COUNT];
|
||||
|
||||
@@ -291,6 +297,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
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -35,7 +35,7 @@ void sub_8068A84(Pokemon *pokemon);
|
||||
void sub_8068BDC(bool8 a0);
|
||||
void sub_8068F28(void);
|
||||
void sub_8068F80(void);
|
||||
void HandleFaint(Entity *entity, s32 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);
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "structs/str_dungeon.h"
|
||||
|
||||
void PrintOnDungeonFinishedWindow(u32 windowId, const u8 *headerText, UnkDungeonGlobal_unk1CE98_sub *param_3);
|
||||
s16 sub_8094828(u16 moveID, u8 id);
|
||||
void PrintOnDungeonFinishedWindow(u32 windowId, const u8 *headerText, DungeonExitSummary *param_3);
|
||||
s16 GetDungeonExitReasonFromMoveOrItemID(u16 moveID, u8 id);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define GUARD_DUNGEON_STRINGS_H
|
||||
|
||||
#include "structs/str_item_text.h"
|
||||
#include "constants/residual_damage.h"
|
||||
#include "constants/trap.h"
|
||||
#include "constants/weather.h"
|
||||
|
||||
@@ -134,7 +135,7 @@ extern const u8 *const gUnknown_80F970C;
|
||||
extern const u8 *const gUnknown_80F9728;
|
||||
extern const u8 *const gUnknown_80F9740;
|
||||
extern const u8 *const gUnknown_80F9760;
|
||||
extern const u8 *const gUnknown_80F9764[];
|
||||
extern const u8 *const gResidualDamageMessages[NUM_RESIDUAL_DAMAGE_TYPES];
|
||||
extern const u8 *const gWeatherNames[WEATHER_COUNT];
|
||||
extern const u8 *const gUnknown_80F9ACC;
|
||||
extern const u8 *const gUnknown_80F9AEC;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 */
|
||||
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "constants/type.h"
|
||||
#include "constants/ability.h"
|
||||
#include "constants/dungeon.h"
|
||||
#include "constants/dungeon_exit.h"
|
||||
#include "constants/iq_skill.h"
|
||||
#include "constants/tactic.h"
|
||||
#include "constants/friend_area.h"
|
||||
@@ -19,7 +20,7 @@ typedef struct DungeonName
|
||||
|
||||
struct unkStruct_8113080
|
||||
{
|
||||
u8 unk0;
|
||||
bool8 defeatedByPrefix;
|
||||
const u8 *text;
|
||||
};
|
||||
|
||||
@@ -77,7 +78,7 @@ extern const u8 *const gIQSkillNames[NUM_IQ_SKILLS];
|
||||
extern const u8 *const gIQSkillDescriptions[NUM_IQ_SKILLS];
|
||||
extern const u8 *const gTacticsNames[NUM_TACTICS];
|
||||
extern const u8 *const gTacticsDescriptions[NUM_TACTICS + 12];
|
||||
extern const struct unkStruct_8113080 gSpecialDeathTexts[55];
|
||||
extern const struct unkStruct_8113080 gDungeonExitReasonTexts[NUM_DUNGEON_EXIT_REASONS];
|
||||
extern const u8 *const gText_DeathToMove;
|
||||
extern const u8 *const gText_AlignPlaceX;
|
||||
extern const u8 *const gText_Pokemon1WasDefeatedBy;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -35,11 +35,11 @@ typedef struct Weather // 0xE264
|
||||
} Weather;
|
||||
|
||||
// size: 0x30
|
||||
typedef struct UnkDungeonGlobal_unk1CE98_sub
|
||||
typedef struct DungeonExitSummary
|
||||
{
|
||||
/* 0x0 */ u8 buffer1[10];
|
||||
/* 0xA */ u8 buffer2[10];
|
||||
/* 0x14 */ s16 moveID;
|
||||
/* 0x14 */ s16 exitReason; // which move knocked out player, or reason to exit dungeon
|
||||
/* 0x16 */ u8 fill16[0x2];
|
||||
/* 0x18 */ DungeonLocation dungeonLocation;
|
||||
/* 0x1C */ Item heldItem;
|
||||
@@ -55,7 +55,7 @@ typedef struct UnkDungeonGlobal_unk1CE98_sub
|
||||
/* 0x2D */ u8 defBoost;
|
||||
/* 0x2E */ u8 spDefBoost;
|
||||
u8 unk2F; // speedBoost?
|
||||
} UnkDungeonGlobal_unk1CE98_sub;
|
||||
} DungeonExitSummary;
|
||||
|
||||
// size: 0x10
|
||||
typedef struct DungeonMusicPlayer
|
||||
@@ -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;
|
||||
@@ -482,7 +482,7 @@ typedef struct Dungeon
|
||||
/* 0x1C590 */ ItemSpawns itemSpawns[ITEM_SPAWN_TYPES_COUNT];
|
||||
/* 0x1CD70 */ u16 trapSpawnChances[NUM_TRAPS];
|
||||
SpawnPokemonData fileMonsterSpawns[MONSTER_SPAWNS_ARR_COUNT]; // Taken directly from "mapparam" which corresponds to available monsters on given dungeon's floor.
|
||||
UnkDungeonGlobal_unk1CE98_sub unk1CE98; // TODO: not sure how large this is
|
||||
DungeonExitSummary exitSummary; // TODO: not sure how large this is
|
||||
u8 unk1CEC8;
|
||||
/* 0x1CECC */ DungeonMusicPlayer musPlayer;
|
||||
} Dungeon;
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
#include "globaldata.h"
|
||||
#include "blow_away.h"
|
||||
#include "constants/ability.h"
|
||||
#include "constants/dungeon_exit.h"
|
||||
#include "constants/residual_damage.h"
|
||||
#include "constants/weather.h"
|
||||
#include "dungeon_vram.h"
|
||||
#include "dungeon_message.h"
|
||||
@@ -109,7 +111,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 +120,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()) {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "global.h"
|
||||
#include "globaldata.h"
|
||||
#include "constants/dungeon.h"
|
||||
#include "constants/dungeon_exit.h"
|
||||
#include "constants/item.h"
|
||||
#include "constants/move_id.h"
|
||||
#include "dungeon_vram.h"
|
||||
@@ -733,7 +734,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);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "global.h"
|
||||
#include "globaldata.h"
|
||||
#include "constants/dungeon_exit.h"
|
||||
#include "constants/type.h"
|
||||
#include "structs/str_pokemon.h"
|
||||
#include "dungeon_main.h"
|
||||
@@ -271,7 +272,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 +439,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;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "global.h"
|
||||
#include "globaldata.h"
|
||||
#include "constants/dungeon_exit.h"
|
||||
#include "dungeon_8083AB0.h"
|
||||
#include "dungeon_info.h"
|
||||
#include "dungeon_util.h"
|
||||
@@ -9,7 +10,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;
|
||||
@@ -18,11 +19,11 @@ void sub_8083AB0(s16 param_0, Entity *target, Entity *entity)
|
||||
EntityInfo * targetEntityInfo;
|
||||
u8 *spAttPtr;
|
||||
u8 buffer [0x14];
|
||||
UnkDungeonGlobal_unk1CE98_sub *temp;
|
||||
DungeonExitSummary *exitSummary;
|
||||
u8 *id;
|
||||
s32 param_0_s32 = param_0;
|
||||
s32 dungeonExitReason = dungeonExitReason_;
|
||||
|
||||
temp = &gDungeon->unk1CE98;
|
||||
exitSummary = &gDungeon->exitSummary;
|
||||
targetEntityInfo = NULL;
|
||||
if ((EntityIsValid(target)) && (GetEntityType(target) == ENTITY_MONSTER)) {
|
||||
targetEntityInfo = GetEntInfo(target);
|
||||
@@ -30,30 +31,30 @@ void sub_8083AB0(s16 param_0, Entity *target, Entity *entity)
|
||||
entityInfo = GetEntInfo(entity);
|
||||
if (targetEntityInfo != NULL) {
|
||||
sub_80709C8(buffer, targetEntityInfo);
|
||||
CopyStringtoBuffer(temp->buffer1, buffer);
|
||||
CopyStringtoBuffer(exitSummary->buffer1, buffer);
|
||||
}
|
||||
else {
|
||||
CopyStringtoBuffer(temp->buffer1, gUnknown_80FE6F4); // Someone
|
||||
CopyStringtoBuffer(exitSummary->buffer1, gUnknown_80FE6F4); // Someone
|
||||
}
|
||||
sub_80709C8(buffer,entityInfo);
|
||||
CopyStringtoBuffer(temp->buffer2, buffer);
|
||||
temp->moveID = param_0_s32;
|
||||
temp->heldItem = entityInfo->heldItem;
|
||||
temp->exp = entityInfo->exp;
|
||||
temp->level = entityInfo->level;
|
||||
temp->maxHPStat = entityInfo->maxHPStat;
|
||||
temp->atk = entityInfo->atk[0];
|
||||
temp->spAtk = entityInfo->atk[1];
|
||||
temp->def = entityInfo->def[0];
|
||||
temp->spDef = entityInfo->def[1];
|
||||
temp->dungeonLocation = gDungeon->unk644.dungeonLocation;
|
||||
attackPtr = &temp->attBoost;
|
||||
CopyStringtoBuffer(exitSummary->buffer2, buffer);
|
||||
exitSummary->exitReason = dungeonExitReason;
|
||||
exitSummary->heldItem = entityInfo->heldItem;
|
||||
exitSummary->exp = entityInfo->exp;
|
||||
exitSummary->level = entityInfo->level;
|
||||
exitSummary->maxHPStat = entityInfo->maxHPStat;
|
||||
exitSummary->atk = entityInfo->atk[0];
|
||||
exitSummary->spAtk = entityInfo->atk[1];
|
||||
exitSummary->def = entityInfo->def[0];
|
||||
exitSummary->spDef = entityInfo->def[1];
|
||||
exitSummary->dungeonLocation = gDungeon->unk644.dungeonLocation;
|
||||
attackPtr = &exitSummary->attBoost;
|
||||
*attackPtr = 0;
|
||||
spAttPtr = &temp->spAttBoost;
|
||||
spAttPtr = &exitSummary->spAttBoost;
|
||||
*spAttPtr = 0;
|
||||
defPtr = &temp->defBoost;
|
||||
defPtr = &exitSummary->defBoost;
|
||||
*defPtr = 0;
|
||||
spDefPtr = &temp->spDefBoost;
|
||||
spDefPtr = &exitSummary->spDefBoost;
|
||||
*spDefPtr = 0;
|
||||
if ((entityInfo->heldItem.flags & ITEM_FLAG_EXISTS) && !(entityInfo->heldItem.flags & ITEM_FLAG_STICKY)) {
|
||||
id = &entityInfo->heldItem.id;
|
||||
@@ -78,11 +79,11 @@ void sub_8083AB0(s16 param_0, Entity *target, Entity *entity)
|
||||
}
|
||||
}
|
||||
|
||||
bool8 sub_8083C24(void)
|
||||
bool8 IsUnsuccessfulDungeonExit(void)
|
||||
{
|
||||
UnkDungeonGlobal_unk1CE98_sub *temp = &gDungeon->unk1CE98;
|
||||
DungeonExitSummary *exitSummary = &gDungeon->exitSummary;
|
||||
|
||||
if (temp->moveID < 0x226)
|
||||
if (exitSummary->exitReason < DUNGEON_EXIT_REASON_SUCCESS)
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
@@ -90,9 +91,11 @@ bool8 sub_8083C24(void)
|
||||
|
||||
bool8 sub_8083C50(void)
|
||||
{
|
||||
UnkDungeonGlobal_unk1CE98_sub *temp = &gDungeon->unk1CE98;
|
||||
DungeonExitSummary *exitSummary = &gDungeon->exitSummary;
|
||||
|
||||
if (temp->moveID == 0x227 || temp->moveID == 0x22A || temp->moveID == 0x228)
|
||||
if (exitSummary->exitReason == DUNGEON_EXIT_CLEARED_DUNGEON
|
||||
|| exitSummary->exitReason == DUNGEON_EXIT_BEFRIENDED_MEW
|
||||
|| exitSummary->exitReason == DUNGEON_EXIT_SUCCEEDED_IN_RESCUE_MISSION)
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
@@ -100,10 +103,10 @@ bool8 sub_8083C50(void)
|
||||
|
||||
bool8 sub_8083C88(u8 param_1)
|
||||
{
|
||||
UnkDungeonGlobal_unk1CE98_sub *temp = &gDungeon->unk1CE98;
|
||||
DungeonExitSummary *exitSummary = &gDungeon->exitSummary;
|
||||
|
||||
if ((!HasCheckpoint(gDungeon->unk644.dungeonLocation.id) && (gDungeon->unk644.unk18 != 0 || param_1 != 0))
|
||||
|| temp->moveID != 0x227) {
|
||||
|| exitSummary->exitReason != DUNGEON_EXIT_CLEARED_DUNGEON) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
@@ -37,13 +37,13 @@ void ShowDungeonClearedWindow(void)
|
||||
header.f3 = 0;
|
||||
windows.id[0].pos.y = 20;
|
||||
DungeonShowWindows(&windows, TRUE);
|
||||
if (gDungeon->unk1CE98.moveID > 549) {
|
||||
if (gDungeon->exitSummary.exitReason > 549) {
|
||||
PlayDungeonCompleteBGM();
|
||||
}
|
||||
else {
|
||||
PlayDungeonFailBGM();
|
||||
}
|
||||
PrintOnDungeonFinishedWindow(0, gText_TheLastOuting,&gDungeon->unk1CE98);
|
||||
PrintOnDungeonFinishedWindow(0, gText_TheLastOuting,&gDungeon->exitSummary);
|
||||
while(1) {
|
||||
sub_803E668(0x36);
|
||||
UpdateDungeonMusic();
|
||||
|
||||
@@ -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
|
||||
};
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "constants/dungeon.h"
|
||||
#include "constants/direction.h"
|
||||
#include "constants/dungeon.h"
|
||||
#include "constants/dungeon_exit.h"
|
||||
#include "structs/str_dungeon.h"
|
||||
#include "structs/sprite_oam.h"
|
||||
#include "dungeon_cutscenes.h"
|
||||
@@ -533,7 +534,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 +966,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "code_806CD90.h"
|
||||
#include "constants/bg_music.h"
|
||||
#include "constants/direction.h"
|
||||
#include "constants/dungeon_exit.h"
|
||||
#include "constants/friend_area.h"
|
||||
#include "constants/weather.h"
|
||||
#include "dungeon_items.h"
|
||||
@@ -88,7 +89,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);
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "code_806CD90.h"
|
||||
#include "constants/bg_music.h"
|
||||
#include "constants/direction.h"
|
||||
#include "constants/dungeon_exit.h"
|
||||
#include "constants/friend_area.h"
|
||||
#include "constants/weather.h"
|
||||
#include "dungeon_items.h"
|
||||
@@ -79,7 +80,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);
|
||||
// .........
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "code_806CD90.h"
|
||||
#include "constants/bg_music.h"
|
||||
#include "constants/direction.h"
|
||||
#include "constants/dungeon_exit.h"
|
||||
#include "constants/friend_area.h"
|
||||
#include "constants/weather.h"
|
||||
#include "dungeon_items.h"
|
||||
@@ -134,7 +135,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)
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "code_806CD90.h"
|
||||
#include "constants/bg_music.h"
|
||||
#include "constants/direction.h"
|
||||
#include "constants/dungeon_exit.h"
|
||||
#include "constants/friend_area.h"
|
||||
#include "constants/weather.h"
|
||||
#include "dungeon_items.h"
|
||||
@@ -66,7 +67,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);
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "code_806CD90.h"
|
||||
#include "constants/bg_music.h"
|
||||
#include "constants/direction.h"
|
||||
#include "constants/dungeon_exit.h"
|
||||
#include "constants/friend_area.h"
|
||||
#include "constants/weather.h"
|
||||
#include "dungeon_items.h"
|
||||
@@ -85,7 +86,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 +110,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 +180,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);
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "code_806CD90.h"
|
||||
#include "constants/bg_music.h"
|
||||
#include "constants/direction.h"
|
||||
#include "constants/dungeon_exit.h"
|
||||
#include "constants/friend_area.h"
|
||||
#include "constants/weather.h"
|
||||
#include "dungeon_items.h"
|
||||
@@ -72,7 +73,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);
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "code_806CD90.h"
|
||||
#include "constants/bg_music.h"
|
||||
#include "constants/direction.h"
|
||||
#include "constants/dungeon_exit.h"
|
||||
#include "constants/friend_area.h"
|
||||
#include "constants/weather.h"
|
||||
#include "dungeon_items.h"
|
||||
@@ -84,7 +85,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);
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "code_806CD90.h"
|
||||
#include "constants/bg_music.h"
|
||||
#include "constants/direction.h"
|
||||
#include "constants/dungeon_exit.h"
|
||||
#include "constants/friend_area.h"
|
||||
#include "constants/weather.h"
|
||||
#include "dungeon_items.h"
|
||||
@@ -58,7 +59,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;
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "code_806CD90.h"
|
||||
#include "constants/bg_music.h"
|
||||
#include "constants/direction.h"
|
||||
#include "constants/dungeon_exit.h"
|
||||
#include "constants/friend_area.h"
|
||||
#include "constants/weather.h"
|
||||
#include "dungeon_items.h"
|
||||
@@ -84,7 +85,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);
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "code_806CD90.h"
|
||||
#include "constants/bg_music.h"
|
||||
#include "constants/direction.h"
|
||||
#include "constants/dungeon_exit.h"
|
||||
#include "constants/friend_area.h"
|
||||
#include "constants/weather.h"
|
||||
#include "dungeon_items.h"
|
||||
@@ -56,7 +57,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;
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "code_806CD90.h"
|
||||
#include "constants/bg_music.h"
|
||||
#include "constants/direction.h"
|
||||
#include "constants/dungeon_exit.h"
|
||||
#include "constants/friend_area.h"
|
||||
#include "constants/weather.h"
|
||||
#include "dungeon_items.h"
|
||||
@@ -79,8 +80,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);
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "code_806CD90.h"
|
||||
#include "constants/bg_music.h"
|
||||
#include "constants/direction.h"
|
||||
#include "constants/dungeon_exit.h"
|
||||
#include "constants/friend_area.h"
|
||||
#include "constants/weather.h"
|
||||
#include "dungeon_items.h"
|
||||
@@ -150,7 +151,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)
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "code_806CD90.h"
|
||||
#include "constants/bg_music.h"
|
||||
#include "constants/direction.h"
|
||||
#include "constants/dungeon_exit.h"
|
||||
#include "constants/friend_area.h"
|
||||
#include "constants/weather.h"
|
||||
#include "dungeon_items.h"
|
||||
@@ -101,7 +102,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 +117,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);
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "code_806CD90.h"
|
||||
#include "constants/bg_music.h"
|
||||
#include "constants/direction.h"
|
||||
#include "constants/dungeon_exit.h"
|
||||
#include "constants/friend_area.h"
|
||||
#include "constants/weather.h"
|
||||
#include "dungeon_items.h"
|
||||
@@ -72,7 +73,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;
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "code_806CD90.h"
|
||||
#include "constants/bg_music.h"
|
||||
#include "constants/direction.h"
|
||||
#include "constants/dungeon_exit.h"
|
||||
#include "constants/friend_area.h"
|
||||
#include "constants/weather.h"
|
||||
#include "dungeon_items.h"
|
||||
@@ -79,7 +80,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);
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "code_806CD90.h"
|
||||
#include "constants/bg_music.h"
|
||||
#include "constants/direction.h"
|
||||
#include "constants/dungeon_exit.h"
|
||||
#include "constants/friend_area.h"
|
||||
#include "constants/weather.h"
|
||||
#include "dungeon_items.h"
|
||||
@@ -82,7 +83,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);
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "code_806CD90.h"
|
||||
#include "constants/bg_music.h"
|
||||
#include "constants/direction.h"
|
||||
#include "constants/dungeon_exit.h"
|
||||
#include "constants/friend_area.h"
|
||||
#include "constants/weather.h"
|
||||
#include "dungeon_items.h"
|
||||
@@ -72,7 +73,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);
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "code_806CD90.h"
|
||||
#include "constants/bg_music.h"
|
||||
#include "constants/direction.h"
|
||||
#include "constants/dungeon_exit.h"
|
||||
#include "constants/friend_area.h"
|
||||
#include "constants/weather.h"
|
||||
#include "dungeon_items.h"
|
||||
@@ -51,7 +52,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 +79,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 +107,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);
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "code_806CD90.h"
|
||||
#include "constants/bg_music.h"
|
||||
#include "constants/direction.h"
|
||||
#include "constants/dungeon_exit.h"
|
||||
#include "constants/friend_area.h"
|
||||
#include "constants/weather.h"
|
||||
#include "dungeon_items.h"
|
||||
@@ -71,8 +72,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);
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "code_806CD90.h"
|
||||
#include "constants/bg_music.h"
|
||||
#include "constants/direction.h"
|
||||
#include "constants/dungeon_exit.h"
|
||||
#include "constants/friend_area.h"
|
||||
#include "constants/weather.h"
|
||||
#include "dungeon_items.h"
|
||||
@@ -107,7 +108,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 +124,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);
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "code_806CD90.h"
|
||||
#include "constants/bg_music.h"
|
||||
#include "constants/direction.h"
|
||||
#include "constants/dungeon_exit.h"
|
||||
#include "constants/friend_area.h"
|
||||
#include "constants/weather.h"
|
||||
#include "dungeon_items.h"
|
||||
@@ -84,7 +85,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);
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "code_806CD90.h"
|
||||
#include "constants/bg_music.h"
|
||||
#include "constants/direction.h"
|
||||
#include "constants/dungeon_exit.h"
|
||||
#include "constants/friend_area.h"
|
||||
#include "constants/weather.h"
|
||||
#include "dungeon_items.h"
|
||||
@@ -82,7 +83,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);
|
||||
|
||||
@@ -8,8 +8,10 @@
|
||||
#include "pokemon_types.h"
|
||||
#include "dungeon_message.h"
|
||||
#include "string_format.h"
|
||||
#include "constants/dungeon_exit.h"
|
||||
#include "constants/move_id.h"
|
||||
#include "constants/monster.h"
|
||||
#include "constants/residual_damage.h"
|
||||
#include "constants/status.h"
|
||||
#include "constants/type.h"
|
||||
#include "constants/iq_skill.h"
|
||||
@@ -72,7 +74,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 +91,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 +154,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 +248,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 +259,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 +285,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);
|
||||
@@ -366,7 +368,7 @@ static bool8 HandleDealingDamageInternal(Entity *attacker, Entity *target, struc
|
||||
const u8 *str;
|
||||
|
||||
gFormatArgs[0] = dmgStruct->dmg;
|
||||
str = gUnknown_80F9764[dmgStruct->residualDmgType];
|
||||
str = gResidualDamageMessages[dmgStruct->residualDmgType];
|
||||
|
||||
ASM_MATCH_TRICK(dmgStruct);
|
||||
|
||||
@@ -375,7 +377,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 +391,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 +483,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 +541,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 +588,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 +598,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 +653,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 +739,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 +996,7 @@ s32 WeightWeakTypePicker(Entity *user, Entity *target, u8 moveType)
|
||||
weight /= 2;
|
||||
if (weight == 0)
|
||||
{
|
||||
// BUG: If the Pok<EFBFBD>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 +1186,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 +1450,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 +1471,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 +1526,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;
|
||||
}
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
#include "dungeon_random.h"
|
||||
#include "constants/dungeon_action.h"
|
||||
#include "constants/dungeon.h"
|
||||
#include "constants/dungeon_exit.h"
|
||||
#include "constants/residual_damage.h"
|
||||
#include "constants/iq_skill.h"
|
||||
#include "constants/status.h"
|
||||
#include "constants/type.h"
|
||||
@@ -135,7 +137,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 +153,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 +358,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 +388,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 +592,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 +615,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 +926,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);
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include "pokemon.h"
|
||||
#include "structs/str_dungeon.h"
|
||||
#include "constants/dungeon.h"
|
||||
#include "constants/dungeon_exit.h"
|
||||
|
||||
extern void sub_8042A34(DungeonPos *r0);
|
||||
extern void sub_804178C(u32);
|
||||
@@ -127,7 +128,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 +187,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) {
|
||||
|
||||
@@ -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++) {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "global.h"
|
||||
#include "globaldata.h"
|
||||
#include "code_803D110.h"
|
||||
#include "constants/dungeon_exit.h"
|
||||
#include "dungeon_vram.h"
|
||||
#include "dungeon_tilemap.h"
|
||||
#include "dungeon_action.h"
|
||||
@@ -16,6 +17,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 +443,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;
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "constants/friend_area.h"
|
||||
#include "constants/status.h"
|
||||
#include "constants/ability.h"
|
||||
#include "constants/dungeon_exit.h"
|
||||
#include "constants/iq_skill.h"
|
||||
#include "constants/type.h"
|
||||
#include "constants/weather.h"
|
||||
@@ -466,12 +467,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 +522,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 +551,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 +598,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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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 < MAX_MON_MOVES) {
|
||||
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)
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#include "global.h"
|
||||
#include "globaldata.h"
|
||||
#include "dungeon_misc.h"
|
||||
#include "dungeon_run_end.h"
|
||||
#include "constants/dungeon_exit.h"
|
||||
#include "structs/str_dungeon.h"
|
||||
#include "data_serializer.h"
|
||||
#include "dungeon_info.h"
|
||||
@@ -14,36 +16,38 @@
|
||||
|
||||
#define TEXT_BUFFER_LEN 200
|
||||
|
||||
static void WriteDeathText(s16 moveID, u8 *buffer)
|
||||
static void WriteDeathText(s16 dungeonExitReason, u8 *buffer)
|
||||
{
|
||||
u16 moveID_u16;
|
||||
s32 moveID_s32 = moveID;
|
||||
u16 dungeonExitReason_u16;
|
||||
s32 dungeonExitReason_s32 = dungeonExitReason;
|
||||
Move move;
|
||||
|
||||
if (moveID_s32 < 0x1F4) {
|
||||
if (dungeonExitReason_s32 < DUNGEON_EXIT_REASON_START) {
|
||||
// Needed this cast/variable to match
|
||||
moveID_u16 = moveID_s32;
|
||||
InitPokemonMoveOrNullObject(&move, moveID_u16);
|
||||
dungeonExitReason_u16 = dungeonExitReason_s32;
|
||||
InitPokemonMoveOrNullObject(&move, dungeonExitReason_u16);
|
||||
BufferMoveName(gFormatBuffer_Items[0], &move, NULL);
|
||||
FormatString(gText_DeathToMove, buffer, buffer + TEXT_BUFFER_LEN, 0); // $m0's $i0
|
||||
} else {
|
||||
strncpy(buffer, gSpecialDeathTexts[moveID - 0x1F4].text, TEXT_BUFFER_LEN);
|
||||
strncpy(buffer, gDungeonExitReasonTexts[dungeonExitReason - DUNGEON_EXIT_REASON_START].text, TEXT_BUFFER_LEN);
|
||||
}
|
||||
}
|
||||
|
||||
static bool8 WasDefeatedByMove(s16 moveID)
|
||||
static bool8 HasDefeatedByPrefix(s16 dungeonExitReason)
|
||||
{
|
||||
if(moveID < 0x1F4)
|
||||
if (dungeonExitReason < DUNGEON_EXIT_REASON_START)
|
||||
{
|
||||
// all moves are prefixed by "was defeated by..."
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
return gSpecialDeathTexts[moveID - 0x1F4].unk0;
|
||||
// some exit reason texts are to be put after "was defeated by..."
|
||||
return gDungeonExitReasonTexts[dungeonExitReason - DUNGEON_EXIT_REASON_START].defeatedByPrefix;
|
||||
}
|
||||
}
|
||||
|
||||
void PrintOnDungeonFinishedWindow(u32 windowId, const u8 *headerText, UnkDungeonGlobal_unk1CE98_sub *param_3)
|
||||
void PrintOnDungeonFinishedWindow(u32 windowId, const u8 *headerText, DungeonExitSummary *exitSummary)
|
||||
{
|
||||
u8 buffer[TEXT_BUFFER_LEN];
|
||||
s32 x, y;
|
||||
@@ -51,12 +55,12 @@ void PrintOnDungeonFinishedWindow(u32 windowId, const u8 *headerText, UnkDungeon
|
||||
|
||||
sub_80073B8(windowId);
|
||||
PrintFormattedStringOnWindow(16,0,headerText,windowId,0);
|
||||
PrintYellowDungeonNametoBuffer(gFormatBuffer_Monsters[0], ¶m_3->dungeonLocation);
|
||||
PrintYellowDungeonNametoBuffer(gFormatBuffer_Monsters[0], &exitSummary->dungeonLocation);
|
||||
PrintFormattedStringOnWindow(4,16,gText_AlignPlaceX,windowId,0); // #+Place: $m0
|
||||
y = 26;
|
||||
StrncpyCustom(gFormatBuffer_Monsters[0], param_3->buffer1, POKEMON_NAME_LENGTH);
|
||||
StrncpyCustom(gFormatBuffer_Monsters[1], param_3->buffer2, POKEMON_NAME_LENGTH);
|
||||
if (WasDefeatedByMove(param_3->moveID) != 0) {
|
||||
StrncpyCustom(gFormatBuffer_Monsters[0], exitSummary->buffer1, POKEMON_NAME_LENGTH);
|
||||
StrncpyCustom(gFormatBuffer_Monsters[1], exitSummary->buffer2, POKEMON_NAME_LENGTH);
|
||||
if (HasDefeatedByPrefix(exitSummary->exitReason)) {
|
||||
// $m1 was defeated by
|
||||
FormatString(gText_Pokemon1WasDefeatedBy,buffer, buffer + sizeof(buffer),0);
|
||||
}
|
||||
@@ -69,14 +73,14 @@ void PrintOnDungeonFinishedWindow(u32 windowId, const u8 *headerText, UnkDungeon
|
||||
PrintFormattedStringOnWindow(x,y,buffer,windowId,0);
|
||||
|
||||
y += 10;
|
||||
WriteDeathText(param_3->moveID, buffer);
|
||||
WriteDeathText(exitSummary->exitReason, buffer);
|
||||
|
||||
x = (176 - GetStringLineWidth(buffer)) / 2;
|
||||
PrintFormattedStringOnWindow(x,y,buffer,windowId,0);
|
||||
|
||||
y += 16;
|
||||
gFormatArgs[0] = param_3->exp;
|
||||
gFormatArgs[1] = param_3->level;
|
||||
gFormatArgs[0] = exitSummary->exp;
|
||||
gFormatArgs[1] = exitSummary->level;
|
||||
if (gFormatArgs[1] >= 100) {
|
||||
PrintFormattedStringOnWindow(4,y,gUnknown_81138C0,windowId,0);
|
||||
}
|
||||
@@ -84,45 +88,45 @@ void PrintOnDungeonFinishedWindow(u32 windowId, const u8 *headerText, UnkDungeon
|
||||
PrintFormattedStringOnWindow(4,y,gUnknown_8113898,windowId,0);
|
||||
}
|
||||
y += 10;
|
||||
gFormatArgs[0] = param_3->maxHPStat;
|
||||
gFormatArgs[0] = exitSummary->maxHPStat;
|
||||
PrintFormattedStringOnWindow(4,y,gUnknown_81138D0,windowId,0);
|
||||
y += 10;
|
||||
gFormatArgs[0] = param_3->atk;
|
||||
gFormatArgs[1] = param_3->def;
|
||||
if (param_3->attBoost) {
|
||||
gFormatArgs[0] = gFormatArgs[0] + param_3->attBoost;
|
||||
gFormatArgs[0] = exitSummary->atk;
|
||||
gFormatArgs[1] = exitSummary->def;
|
||||
if (exitSummary->attBoost) {
|
||||
gFormatArgs[0] = gFormatArgs[0] + exitSummary->attBoost;
|
||||
PrintFormattedStringOnWindow(4,y,gUnknown_8113950,windowId,0);
|
||||
}
|
||||
else {
|
||||
PrintFormattedStringOnWindow(4,y,gUnknown_81138E4,windowId,0);
|
||||
}
|
||||
if (param_3->defBoost) {
|
||||
gFormatArgs[1] = gFormatArgs[1] + param_3->defBoost;
|
||||
if (exitSummary->defBoost) {
|
||||
gFormatArgs[1] = gFormatArgs[1] + exitSummary->defBoost;
|
||||
PrintFormattedStringOnWindow(4,y,gUnknown_8113974,windowId,0);
|
||||
}
|
||||
else {
|
||||
PrintFormattedStringOnWindow(4,y,gUnknown_8113900,windowId,0);
|
||||
}
|
||||
y += 10;
|
||||
gFormatArgs[0] = param_3->spAtk;
|
||||
gFormatArgs[1] = param_3->spDef;
|
||||
if (param_3->spAttBoost) {
|
||||
gFormatArgs[0] = gFormatArgs[0] + param_3->spAttBoost;
|
||||
gFormatArgs[0] = exitSummary->spAtk;
|
||||
gFormatArgs[1] = exitSummary->spDef;
|
||||
if (exitSummary->spAttBoost) {
|
||||
gFormatArgs[0] = gFormatArgs[0] + exitSummary->spAttBoost;
|
||||
PrintFormattedStringOnWindow(4,y,gUnknown_8113990,windowId,0);
|
||||
}
|
||||
else {
|
||||
PrintFormattedStringOnWindow(4,y,gUnknown_8113918,windowId,0);
|
||||
}
|
||||
if (param_3->spDefBoost) {
|
||||
gFormatArgs[1] = gFormatArgs[1] + param_3->spDefBoost;
|
||||
if (exitSummary->spDefBoost) {
|
||||
gFormatArgs[1] = gFormatArgs[1] + exitSummary->spDefBoost;
|
||||
PrintFormattedStringOnWindow(4,y,gUnknown_81139B4,windowId,0);
|
||||
}
|
||||
else {
|
||||
PrintFormattedStringOnWindow(4,y,gUnknown_8113934,windowId,0);
|
||||
}
|
||||
y += 16;
|
||||
item = &(param_3->heldItem);
|
||||
if ((param_3->heldItem.flags & ITEM_FLAG_EXISTS)) {
|
||||
item = &(exitSummary->heldItem);
|
||||
if ((exitSummary->heldItem.flags & ITEM_FLAG_EXISTS)) {
|
||||
sub_8090E14(gFormatBuffer_Items[0],item,0);
|
||||
}
|
||||
else {
|
||||
@@ -132,14 +136,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
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -260,28 +260,29 @@ const u8 *const gUnknown_80F970C = _("{POKEMON_0} fell into the pitfall!");
|
||||
const u8 *const gUnknown_80F9728 = _("Avoided the pitfall!");
|
||||
const u8 *const gUnknown_80F9740 = _("{POKEMON_0} is famished.");
|
||||
const u8 *const gUnknown_80F9760 = _("{POKEMON_0} is already famished.");
|
||||
const u8 *const gUnknown_80F9764[] = {
|
||||
[0] = _("{POKEMON_1} took {VALUE_0} damage!"),
|
||||
[1] = _("{POKEMON_1}'s burn inflicted\n{VALUE_0} damage!"),
|
||||
[2] = _("{POKEMON_1} was squeezed for\n{VALUE_0} damage!"),
|
||||
[3] = _("{POKEMON_1} took {VALUE_0} damage\nfrom poison!"),
|
||||
[4] = _("{POKEMON_1} took {VALUE_0} damage!"),
|
||||
[5] = _("{POKEMON_1} was wrapped for\n{VALUE_0} damage!"),
|
||||
[6] = _("{POKEMON_1} took {VALUE_0} damage\nfrom the counterattack!"),
|
||||
[7] = _("{POKEMON_1} was cursed for\n{VALUE_0} damage!"),
|
||||
[8] = _("{POKEMON_1} awoke from its nightmare\nand took {VALUE_0} damage!"),
|
||||
[9] = _("{POKEMON_1} took {VALUE_0} damage\nfrom Leech Seed!"),
|
||||
[10] = _("{POKEMON_1} stepped on spikes for\n{VALUE_0} damage!"),
|
||||
[11] = _("{POKEMON_1} took {VALUE_0} damage\nfrom Perish Song!"),
|
||||
[12] = _("{POKEMON_1} took {VALUE_0} damage\nfrom Destiny Bond!"),
|
||||
[13] = _("{POKEMON_1} was showered with sludge\nfor {VALUE_0} damage!"),
|
||||
[14] = NULL,
|
||||
[15] = _("The Chestnut Trap hit {POKEMON_1}\nfor {VALUE_0} damage!"),
|
||||
[16] = _("The Chestnut Trap hit {POKEMON_1}\nfor {VALUE_0} damage!"),
|
||||
[17] = _("{POKEMON_1} took {VALUE_0} damage!"),
|
||||
[18] = _("The bad weather inflicted {VALUE_0} damage\non {POKEMON_1}!"),
|
||||
[19] = _("The move failed!\n{POKEMON_1} took {VALUE_0} damage!"),
|
||||
[20] = _("The recoil hit {POKEMON_1} for\n{VALUE_0} damage!"),
|
||||
|
||||
const u8 *const gResidualDamageMessages[NUM_RESIDUAL_DAMAGE_TYPES] = {
|
||||
[RESIDUAL_DAMAGE_REGULAR] = _("{POKEMON_1} took {VALUE_0} damage!"),
|
||||
[RESIDUAL_DAMAGE_BURN] = _("{POKEMON_1}'s burn inflicted\n{VALUE_0} damage!"),
|
||||
[RESIDUAL_DAMAGE_CONSTRICT] = _("{POKEMON_1} was squeezed for\n{VALUE_0} damage!"),
|
||||
[RESIDUAL_DAMAGE_POISON] = _("{POKEMON_1} took {VALUE_0} damage\nfrom poison!"),
|
||||
[RESIDUAL_DAMAGE_UNUSED_4] = _("{POKEMON_1} took {VALUE_0} damage!"),
|
||||
[RESIDUAL_DAMAGE_WRAP] = _("{POKEMON_1} was wrapped for\n{VALUE_0} damage!"),
|
||||
[RESIDUAL_DAMAGE_COUNTERATTACK] = _("{POKEMON_1} took {VALUE_0} damage\nfrom the counterattack!"),
|
||||
[RESIDUAL_DAMAGE_CURSE] = _("{POKEMON_1} was cursed for\n{VALUE_0} damage!"),
|
||||
[RESIDUAL_DAMAGE_NIGHTMARE] = _("{POKEMON_1} awoke from its nightmare\nand took {VALUE_0} damage!"),
|
||||
[RESIDUAL_DAMAGE_LEECH_SEED] = _("{POKEMON_1} took {VALUE_0} damage\nfrom Leech Seed!"),
|
||||
[RESIDUAL_DAMAGE_SPIKES] = _("{POKEMON_1} stepped on spikes for\n{VALUE_0} damage!"),
|
||||
[RESIDUAL_DAMAGE_PERISH_SONG] = _("{POKEMON_1} took {VALUE_0} damage\nfrom Perish Song!"),
|
||||
[RESIDUAL_DAMAGE_DESTINY_BOND] = _("{POKEMON_1} took {VALUE_0} damage\nfrom Destiny Bond!"),
|
||||
[RESIDUAL_DAMAGE_LIQUID_OOZE] = _("{POKEMON_1} was showered with sludge\nfor {VALUE_0} damage!"),
|
||||
[RESIDUAL_DAMAGE_HUNGER] = NULL,
|
||||
[RESIDUAL_DAMAGE_CHESTNUT_TRAP] = _("The Chestnut Trap hit {POKEMON_1}\nfor {VALUE_0} damage!"),
|
||||
[RESIDUAL_DAMAGE_UNUSED_16] = _("The Chestnut Trap hit {POKEMON_1}\nfor {VALUE_0} damage!"),
|
||||
[RESIDUAL_DAMAGE_PITFALL] = _("{POKEMON_1} took {VALUE_0} damage!"),
|
||||
[RESIDUAL_DAMAGE_BAD_WEATHER] = _("The bad weather inflicted {VALUE_0} damage\non {POKEMON_1}!"),
|
||||
[RESIDUAL_DAMAGE_MOVE_FAIL] = _("The move failed!\n{POKEMON_1} took {VALUE_0} damage!"),
|
||||
[RESIDUAL_DAMAGE_RECOIL] = _("The recoil hit {POKEMON_1} for\n{VALUE_0} damage!"),
|
||||
};
|
||||
|
||||
const u8 *const gWeatherNames[WEATHER_COUNT] = {
|
||||
|
||||
@@ -18,7 +18,9 @@
|
||||
#include "moves.h"
|
||||
#include "dungeon_random.h"
|
||||
#include "constants/dungeon.h"
|
||||
#include "constants/dungeon_exit.h"
|
||||
#include "constants/iq_skill.h"
|
||||
#include "constants/residual_damage.h"
|
||||
#include "constants/status.h"
|
||||
#include "constants/ability.h"
|
||||
#include "constants/type.h"
|
||||
@@ -33,6 +35,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 +57,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 +77,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 +103,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;
|
||||
// here baseBellyDecrementValue is 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 +130,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 < MAX_EMPTY_BELLY_ALERT_STEPS)
|
||||
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 +168,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 +211,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 +224,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 +243,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 +257,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 +269,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 +295,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 +324,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 +353,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 +410,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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "code_804267C.h"
|
||||
#include "dungeon_message.h"
|
||||
#include "constants/ability.h"
|
||||
#include "constants/dungeon_exit.h"
|
||||
#include "constants/type.h"
|
||||
#include "dungeon_ai.h"
|
||||
#include "dungeon_range.h"
|
||||
@@ -79,7 +80,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "globaldata.h"
|
||||
#include "explosion.h"
|
||||
#include "constants/ability.h"
|
||||
#include "constants/residual_damage.h"
|
||||
#include "constants/weather.h"
|
||||
#include "dungeon_vram.h"
|
||||
#include "dungeon_message.h"
|
||||
@@ -81,9 +82,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 +96,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 +144,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 +155,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 +172,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 +202,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
#include "code_806CD90.h"
|
||||
#include "code_8077274_1.h"
|
||||
#include "constants/ability.h"
|
||||
#include "constants/dungeon_exit.h"
|
||||
#include "constants/monster.h"
|
||||
#include "constants/residual_damage.h"
|
||||
#include "constants/type.h"
|
||||
#include "constants/weather.h"
|
||||
#include "dungeon_info.h"
|
||||
@@ -215,14 +217,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);
|
||||
}
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
#include "code_8077274_1.h"
|
||||
#include "dungeon_random.h"
|
||||
#include "constants/ability.h"
|
||||
#include "constants/dungeon_exit.h"
|
||||
#include "constants/residual_damage.h"
|
||||
#include "constants/status.h"
|
||||
#include "constants/targeting.h"
|
||||
#include "constants/type.h"
|
||||
@@ -34,12 +36,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 +52,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 +109,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 +120,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 +142,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 +152,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 +172,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 +193,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 +204,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 +227,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 +284,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 +316,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 +336,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 +362,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 +371,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 +402,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 +429,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 +438,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 +453,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 +465,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 +480,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 +510,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 +524,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 +548,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 +571,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 +587,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 +595,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 +611,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 +650,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 +666,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 +687,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 +702,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 +717,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 +732,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 +746,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 +765,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 +776,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 +795,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 +810,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 +819,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 +830,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 +839,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 +858,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 +890,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 +916,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 +952,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 +978,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);
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
#include "code_8077274_1.h"
|
||||
#include "dungeon_random.h"
|
||||
#include "constants/ability.h"
|
||||
#include "constants/dungeon_exit.h"
|
||||
#include "constants/residual_damage.h"
|
||||
#include "constants/status.h"
|
||||
#include "constants/targeting.h"
|
||||
#include "constants/type.h"
|
||||
@@ -39,13 +41,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 +62,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 +77,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 +95,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 +122,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 +135,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 +148,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 +168,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 +193,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 +221,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 +239,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 +264,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 +285,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 +304,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 +337,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 +361,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 +382,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 +397,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 +409,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 +420,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 +451,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 +490,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 +505,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 +522,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 +538,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 +559,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 +580,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 +592,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 +610,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 +620,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 +646,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 +661,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 +671,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 +686,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 +701,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 +711,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 +727,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 +738,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 +784,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 +840,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 +862,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 +889,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 +910,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))
|
||||
{
|
||||
|
||||
@@ -7,7 +7,9 @@
|
||||
#include "code_8077274_1.h"
|
||||
#include "dungeon_random.h"
|
||||
#include "constants/ability.h"
|
||||
#include "constants/dungeon_exit.h"
|
||||
#include "constants/move_id.h"
|
||||
#include "constants/residual_damage.h"
|
||||
#include "constants/status.h"
|
||||
#include "constants/targeting.h"
|
||||
#include "constants/type.h"
|
||||
@@ -47,12 +49,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 +64,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 +75,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 +88,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 +114,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 +125,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 +138,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 +171,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 +227,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 +249,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 +264,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 +295,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 +323,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 +332,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 +359,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 +386,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 +419,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 +467,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 +482,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 +497,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 +561,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 +612,10 @@ _0805A8C2:
|
||||
if (GetEntityType(entity) == ENTITY_MONSTER) {
|
||||
InitPokemonMove(&stackMove,MOVE_REGULAR_ATTACK);
|
||||
if (sub_80571F0(entity,&stackMove) == 0) {
|
||||
sub_806F370(pokemon,entity,gSplashDmgValue,0,0,TYPE_NONE,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 +659,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 +684,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 +733,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 +747,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 +755,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 +805,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 +828,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 +843,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 +860,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 +893,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 +916,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 +930,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 +960,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 +982,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 +991,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 +1029,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 +1046,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;
|
||||
|
||||
@@ -11,7 +11,9 @@
|
||||
#include "code_8077274_1.h"
|
||||
#include "dungeon_random.h"
|
||||
#include "constants/ability.h"
|
||||
#include "constants/dungeon_exit.h"
|
||||
#include "constants/move_id.h"
|
||||
#include "constants/residual_damage.h"
|
||||
#include "constants/status.h"
|
||||
#include "constants/targeting.h"
|
||||
#include "constants/type.h"
|
||||
@@ -48,30 +50,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 +82,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 +107,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 +123,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 +173,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 +187,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 +208,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 +222,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 +233,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 +248,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 +287,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 +325,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 +340,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 +358,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 +384,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 +401,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 +442,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 +499,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 +521,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 +538,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 +600,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 +644,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 +706,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 +737,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;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "global.h"
|
||||
#include "globaldata.h"
|
||||
#include "constants/dungeon_exit.h"
|
||||
#include "dungeon_info.h"
|
||||
#include "dungeon_move_util.h"
|
||||
#include "run_dungeon.h"
|
||||
@@ -21,7 +22,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 +72,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 +80,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 +95,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;
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
#include "code_8077274_1.h"
|
||||
#include "dungeon_random.h"
|
||||
#include "constants/ability.h"
|
||||
#include "constants/dungeon_exit.h"
|
||||
#include "constants/item.h"
|
||||
#include "constants/residual_damage.h"
|
||||
#include "constants/status.h"
|
||||
#include "constants/type.h"
|
||||
#include "dungeon_items.h"
|
||||
@@ -27,14 +29,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 +189,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:
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "globaldata.h"
|
||||
#include "run_dungeon.h"
|
||||
#include "constants/dungeon.h"
|
||||
#include "constants/dungeon_exit.h"
|
||||
#include "constants/monster.h"
|
||||
#include "constants/trap.h"
|
||||
#include "structs/rgb.h"
|
||||
@@ -290,7 +291,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 +518,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 +551,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 +598,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.
|
||||
@@ -623,7 +624,7 @@ void RunDungeon_Async(DungeonSetupStruct *setupPtr)
|
||||
ShowDungeonClearedWindow();
|
||||
}
|
||||
|
||||
if (sub_8083C24()) {
|
||||
if (IsUnsuccessfulDungeonExit()) {
|
||||
if (gDungeon->unk6 != 0) {
|
||||
setupPtr->info.unk7C = -2;
|
||||
memset(&setupPtr->info.unk84, 0, sizeof(setupPtr->info.unk84));
|
||||
@@ -728,7 +729,7 @@ void sub_8043D60(void)
|
||||
unk = FALSE;
|
||||
|
||||
if (unk) {
|
||||
HandleFaint(mon, 0x207, mon);
|
||||
HandleFaint(mon, DUNGEON_EXIT_DEBUG_DAMAGE, mon);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -787,7 +788,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 +800,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 +812,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;
|
||||
}
|
||||
}
|
||||
|
||||
112
src/strings.c
112
src/strings.c
@@ -859,62 +859,62 @@ const u8 *const gTacticsDescriptions[NUM_TACTICS + 12] = {
|
||||
[NUM_TACTICS ... NUM_TACTICS + 11] = NULL // Used for testing?
|
||||
};
|
||||
|
||||
const struct unkStruct_8113080 gSpecialDeathTexts[55] = {
|
||||
[0] = { 0, _("was transformed into a friend.")},
|
||||
[1] = { 0, _("left without being befriended.")},
|
||||
[2] = { 0, _("fainted from a debug attack.")},
|
||||
[3] = { 0, _("missed a Jump Kick and wiped out.")},
|
||||
[4] = { 0, _("missed a Hi Jump Kick and wiped out.")},
|
||||
[5] = { 0, _("fainted from the foe's Destiny Bond.")},
|
||||
[6] = { 0, _("fainted, covered in sludge.")},
|
||||
[7] = { 1, _("was defeated by a powerful move.")},
|
||||
[8] = { 1, _("was defeated by a powerful move.")},
|
||||
[9] = { 0, _("fainted from a move's recoil damage.")},
|
||||
[10] = { 0, _("fainted from damage it took bouncing.")},
|
||||
[11] = { 1, _("a foe's pent-up energy.")},
|
||||
[12] = { 1, _("was defeated by a powerful move.")},
|
||||
[13] = { 1, _("was defeated by a powerful move.")},
|
||||
[14] = { 1, _("was defeated by a powerful move.")},
|
||||
[15] = { 1, _("was defeated by a powerful move.")},
|
||||
[16] = { 1, _("was defeated by a powerful move.")},
|
||||
[17] = { 1, _("was defeated by a powerful move.")},
|
||||
[18] = { 0, _("fainted from stepping on spikes.")},
|
||||
[19] = { 0, _("debug damage.")},
|
||||
[20] = { 0, _("fainted from a bad burn.")},
|
||||
[21] = { 0, _("fainted, unable to bear constriction.")},
|
||||
[22] = { 0, _("fainted after the poison spread.")},
|
||||
[23] = { 0, _("fainted while still being wrapped.")},
|
||||
[24] = { 0, _("was felled by a curse.")},
|
||||
[25] = { 0, _("was drained to nothing by Leech Seed.")},
|
||||
[26] = { 0, _("fainted from hearing Perish Song.")},
|
||||
[27] = { 0, _("fainted while in a nightmare.")},
|
||||
[28] = { 0, _("was felled by a thrown rock.")},
|
||||
[29] = { 0, _("fainted from hunger.")},
|
||||
[30] = { 0, _("disappeared in an explosion.")},
|
||||
[31] = { 0, _("tripped a Chestnut Trap and fainted.")},
|
||||
[32] = { 0, _("fainted due to a trap's damage.")},
|
||||
[33] = { 0, _("fell into a Pitfall Trap and fainted.")},
|
||||
[34] = { 1, _("a Blast Seed's damage.")},
|
||||
[35] = { 0, _("was felled by a thrown item.")},
|
||||
[36] = { 0, _("was transformed into an item.")},
|
||||
[37] = { 0, _("fainted from being knocked flying.")},
|
||||
[38] = { 0, _("was felled by a Pokémon sent flying.")},
|
||||
[39] = { 0, _("gave up the exploration.")},
|
||||
[40] = { 0, _("was deleted for the sake of an event.")},
|
||||
[41] = { 0, _("went away.")},
|
||||
[42] = { 0, _("was blown out by an unseen force.")},
|
||||
[43] = { 0, _("returned with the fallen partner.")},
|
||||
[44] = { 0, _("fainted due to the weather.")},
|
||||
[45] = { 0, _("was possessed.")},
|
||||
[46] = { 0, _("failed to protect the client Pokémon.")},
|
||||
[47] = { 0, _("fainted from a Wonder Orb.")},
|
||||
[48] = { 0, _("fainted from an item.")},
|
||||
[49] = { 0, _("- ")},
|
||||
[50] = { 0, _("escaped in the middle of exploration.")},
|
||||
[51] = { 0, _("cleared the dungeon.")},
|
||||
[52] = { 0, _("succeeded in the rescue mission.")},
|
||||
[53] = { 0, _("impressively completed a mission.")},
|
||||
[54] = { 0, _("befriended Mew!")},
|
||||
const struct unkStruct_8113080 gDungeonExitReasonTexts[NUM_DUNGEON_EXIT_REASONS] = {
|
||||
[DUNGEON_EXIT_TRANSFORMED_INTO_FRIEND - DUNGEON_EXIT_REASON_START] = { FALSE, _("was transformed into a friend.")},
|
||||
[DUNGEON_EXIT_LEFT_WITHOUT_BEING_BEFRIENDED - DUNGEON_EXIT_REASON_START] = { FALSE, _("left without being befriended.")},
|
||||
[DUNGEON_EXIT_FAINTED_FROM_DEBUG_ATTACK - DUNGEON_EXIT_REASON_START] = { FALSE, _("fainted from a debug attack.")},
|
||||
[DUNGEON_EXIT_MISSED_JUMP_KICK - DUNGEON_EXIT_REASON_START] = { FALSE, _("missed a Jump Kick and wiped out.")},
|
||||
[DUNGEON_EXIT_MISSED_HI_JUMP_KICK - DUNGEON_EXIT_REASON_START] = { FALSE, _("missed a Hi Jump Kick and wiped out.")},
|
||||
[DUNGEON_EXIT_FAINTED_FROM_DESTINY_BOND - DUNGEON_EXIT_REASON_START] = { FALSE, _("fainted from the foe's Destiny Bond.")},
|
||||
[DUNGEON_EXIT_FAINTED_COVERED_IN_SLUDGE - DUNGEON_EXIT_REASON_START] = { FALSE, _("fainted, covered in sludge.")},
|
||||
[DUNGEON_EXIT_UNUSED_507 - DUNGEON_EXIT_REASON_START] = { TRUE, _("was defeated by a powerful move.")},
|
||||
[DUNGEON_EXIT_UNUSED_508 - DUNGEON_EXIT_REASON_START] = { TRUE, _("was defeated by a powerful move.")},
|
||||
[DUNGEON_EXIT_FAINTED_FROM_RECOIL - DUNGEON_EXIT_REASON_START] = { FALSE, _("fainted from a move's recoil damage.")},
|
||||
[DUNGEON_EXIT_FAINTED_FROM_DAMAGE_BOUNCING - DUNGEON_EXIT_REASON_START] = { FALSE, _("fainted from damage it took bouncing.")},
|
||||
[DUNGEON_EXIT_DEFEATED_PENT_UP_ENERGY - DUNGEON_EXIT_REASON_START] = { TRUE, _("a foe's pent-up energy.")},
|
||||
[DUNGEON_EXIT_UNUSED_512 - DUNGEON_EXIT_REASON_START] = { TRUE, _("was defeated by a powerful move.")},
|
||||
[DUNGEON_EXIT_UNUSED_513 - DUNGEON_EXIT_REASON_START] = { TRUE, _("was defeated by a powerful move.")},
|
||||
[DUNGEON_EXIT_UNUSED_514 - DUNGEON_EXIT_REASON_START] = { TRUE, _("was defeated by a powerful move.")},
|
||||
[DUNGEON_EXIT_UNUSED_515 - DUNGEON_EXIT_REASON_START] = { TRUE, _("was defeated by a powerful move.")},
|
||||
[DUNGEON_EXIT_UNUSED_516 - DUNGEON_EXIT_REASON_START] = { TRUE, _("was defeated by a powerful move.")},
|
||||
[DUNGEON_EXIT_UNUSED_517 - DUNGEON_EXIT_REASON_START] = { TRUE, _("was defeated by a powerful move.")},
|
||||
[DUNGEON_EXIT_FAINTED_FROM_SPIKES - DUNGEON_EXIT_REASON_START] = { FALSE, _("fainted from stepping on spikes.")},
|
||||
[DUNGEON_EXIT_DEBUG_DAMAGE - DUNGEON_EXIT_REASON_START] = { FALSE, _("debug damage.")},
|
||||
[DUNGEON_EXIT_FAINTED_FROM_BURN - DUNGEON_EXIT_REASON_START] = { FALSE, _("fainted from a bad burn.")},
|
||||
[DUNGEON_EXIT_FAINTED_FROM_CONSTRICTION - DUNGEON_EXIT_REASON_START] = { FALSE, _("fainted, unable to bear constriction.")},
|
||||
[DUNGEON_EXIT_FAINTED_FROM_POISON - DUNGEON_EXIT_REASON_START] = { FALSE, _("fainted after the poison spread.")},
|
||||
[DUNGEON_EXIT_FAINTED_FROM_WRAP - DUNGEON_EXIT_REASON_START] = { FALSE, _("fainted while still being wrapped.")},
|
||||
[DUNGEON_EXIT_FELLED_BY_CURSE - DUNGEON_EXIT_REASON_START] = { FALSE, _("was felled by a curse.")},
|
||||
[DUNGEON_EXIT_DRAINED_BY_LEECH_SEED - DUNGEON_EXIT_REASON_START] = { FALSE, _("was drained to nothing by Leech Seed.")},
|
||||
[DUNGEON_EXIT_FAINTED_FROM_PERISH_SONG - DUNGEON_EXIT_REASON_START] = { FALSE, _("fainted from hearing Perish Song.")},
|
||||
[DUNGEON_EXIT_FAINTED_WHILE_IN_NIGHTMARE - DUNGEON_EXIT_REASON_START] = { FALSE, _("fainted while in a nightmare.")},
|
||||
[DUNGEON_EXIT_FELLED_BY_THROWN_ROCK - DUNGEON_EXIT_REASON_START] = { FALSE, _("was felled by a thrown rock.")},
|
||||
[DUNGEON_EXIT_FAINTED_FROM_HUNGER - DUNGEON_EXIT_REASON_START] = { FALSE, _("fainted from hunger.")},
|
||||
[DUNGEON_EXIT_DISAPPEARED_IN_EXPLOSION - DUNGEON_EXIT_REASON_START] = { FALSE, _("disappeared in an explosion.")},
|
||||
[DUNGEON_EXIT_TRIPPED_CHESTNUT_TRAP - DUNGEON_EXIT_REASON_START] = { FALSE, _("tripped a Chestnut Trap and fainted.")},
|
||||
[DUNGEON_EXIT_FAINTED_DUE_TO_TRAP - DUNGEON_EXIT_REASON_START] = { FALSE, _("fainted due to a trap's damage.")},
|
||||
[DUNGEON_EXIT_FELL_INTO_PITFALL - DUNGEON_EXIT_REASON_START] = { FALSE, _("fell into a Pitfall Trap and fainted.")},
|
||||
[DUNGEON_EXIT_DEFEATED_BLAST_SEED - DUNGEON_EXIT_REASON_START] = { TRUE, _("a Blast Seed's damage.")},
|
||||
[DUNGEON_EXIT_FELLED_BY_THROWN_ITEM - DUNGEON_EXIT_REASON_START] = { FALSE, _("was felled by a thrown item.")},
|
||||
[DUNGEON_EXIT_TRANSFORMED_INTO_ITEM - DUNGEON_EXIT_REASON_START] = { FALSE, _("was transformed into an item.")},
|
||||
[DUNGEON_EXIT_FAINTED_FROM_BEING_KNOCKED - DUNGEON_EXIT_REASON_START] = { FALSE, _("fainted from being knocked flying.")},
|
||||
[DUNGEON_EXIT_FELLED_BY_POKEMON_FLYING - DUNGEON_EXIT_REASON_START] = { FALSE, _("was felled by a Pokémon sent flying.")},
|
||||
[DUNGEON_EXIT_GAVE_UP_EXPLORATION - DUNGEON_EXIT_REASON_START] = { FALSE, _("gave up the exploration.")},
|
||||
[DUNGEON_EXIT_DELETED_FOR_EVENT - DUNGEON_EXIT_REASON_START] = { FALSE, _("was deleted for the sake of an event.")},
|
||||
[DUNGEON_EXIT_WENT_AWAY - DUNGEON_EXIT_REASON_START] = { FALSE, _("went away.")},
|
||||
[DUNGEON_EXIT_BLOWN_OUT_UNSEEN_FORCE - DUNGEON_EXIT_REASON_START] = { FALSE, _("was blown out by an unseen force.")},
|
||||
[DUNGEON_EXIT_RETURNED_WITH_FALLEN_PARTNER - DUNGEON_EXIT_REASON_START] = { FALSE, _("returned with the fallen partner.")},
|
||||
[DUNGEON_EXIT_FAINTED_DUE_TO_WEATHER - DUNGEON_EXIT_REASON_START] = { FALSE, _("fainted due to the weather.")},
|
||||
[DUNGEON_EXIT_WAS_POSSESSED - DUNGEON_EXIT_REASON_START] = { FALSE, _("was possessed.")},
|
||||
[DUNGEON_EXIT_FAILED_TO_PROTECT_CLIENT - DUNGEON_EXIT_REASON_START] = { FALSE, _("failed to protect the client Pokémon.")},
|
||||
[DUNGEON_EXIT_FAINTED_FROM_WONDER_ORB - DUNGEON_EXIT_REASON_START] = { FALSE, _("fainted from a Wonder Orb.")},
|
||||
[DUNGEON_EXIT_FAINTED_FROM_ITEM - DUNGEON_EXIT_REASON_START] = { FALSE, _("fainted from an item.")},
|
||||
[DUNGEON_EXIT_UNUSED_549 - DUNGEON_EXIT_REASON_START] = { FALSE, _("- ")},
|
||||
[DUNGEON_EXIT_ESCAPED_MIDDLE_OF_EXPLORATION - DUNGEON_EXIT_REASON_START] = { FALSE, _("escaped in the middle of exploration.")},
|
||||
[DUNGEON_EXIT_CLEARED_DUNGEON - DUNGEON_EXIT_REASON_START] = { FALSE, _("cleared the dungeon.")},
|
||||
[DUNGEON_EXIT_SUCCEEDED_IN_RESCUE_MISSION - DUNGEON_EXIT_REASON_START] = { FALSE, _("succeeded in the rescue mission.")},
|
||||
[DUNGEON_EXIT_IMPRESSIVELY_COMPLETED_MISSION - DUNGEON_EXIT_REASON_START] = { FALSE, _("impressively completed a mission.")},
|
||||
[DUNGEON_EXIT_BEFRIENDED_MEW - DUNGEON_EXIT_REASON_START] = { FALSE, _("befriended Mew!")},
|
||||
};
|
||||
|
||||
const u8 *const gText_DeathToMove = _("{POKEMON_0}'s {MOVE_ITEM_0}.");
|
||||
|
||||
14
src/trap.c
14
src/trap.c
@@ -7,6 +7,8 @@
|
||||
#include "code_8077274_1.h"
|
||||
#include "dungeon_random.h"
|
||||
#include "code_806CD90.h"
|
||||
#include "constants/dungeon_exit.h"
|
||||
#include "constants/residual_damage.h"
|
||||
#include "constants/trap.h"
|
||||
#include "constants/type.h"
|
||||
#include "run_dungeon.h"
|
||||
@@ -382,7 +384,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 +396,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 +511,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 +592,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 +607,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);
|
||||
|
||||
Reference in New Issue
Block a user