mirror of
https://github.com/pret/pmd-red.git
synced 2026-10-01 13:28:04 -05:00
Decomped CanUseOnTargetWithStatusChecker()
This commit is contained in:
@@ -7,10 +7,20 @@
|
||||
#include "position.h"
|
||||
|
||||
#define MAX_STAT_STAGE 20
|
||||
#define STAT_MULTIPLIER_THRESHOLD 63
|
||||
#define DEFAULT_STAT_STAGE 10
|
||||
#define DEFAULT_STAT_MULTIPLIER 256
|
||||
#define MAX_MOVEMENT_SPEED 4
|
||||
#define MAX_STOCKPILE_COUNT 3
|
||||
#define NUM_SPEED_TURN_COUNTERS 5
|
||||
|
||||
#define STAT_STAGE_ATTACK 0
|
||||
#define STAT_STAGE_SPECIAL_ATTACK 1
|
||||
#define STAT_STAGE_DEFENSE 0
|
||||
#define STAT_STAGE_SPECIAL_DEFENSE 1
|
||||
#define STAT_STAGE_ACCURACY 0
|
||||
#define STAT_STAGE_EVASION 1
|
||||
|
||||
struct DungeonActionContainer
|
||||
{
|
||||
/* 0x0 */ u16 action;
|
||||
@@ -52,20 +62,20 @@ struct DungeonEntityData
|
||||
/* 0x18 */ u32 expPoints;
|
||||
// Temporary stat boosts/drops from effects like Growl or Swords Dance.
|
||||
// These start at 10 and are in the range [1, 19].
|
||||
/* 0x1C */ s16 attackStage;
|
||||
/* 0x1E */ s16 specialAttackStage;
|
||||
/* 0x20 */ s16 defenseStage;
|
||||
/* 0x22 */ s16 specialDefenseStage;
|
||||
/* 0x24 */ s16 accuracyStage;
|
||||
/* 0x26 */ s16 evasionStage;
|
||||
// Index 0 is Attack. Index 1 is Special Attack.
|
||||
/* 0x1C */ s16 attackStages[2];
|
||||
// Index 0 is Defense. Index 1 is Special Defense.
|
||||
/* 0x20 */ s16 defenseStages[2];
|
||||
// Index 0 is accuracy. Index 1 is evasion.
|
||||
/* 0x24 */ s16 accuracyStages[2];
|
||||
// // When a Fire-type move is used on a Pokémon with Flash Fire, this value increases the power of the Pokémon's Fire-type moves.
|
||||
/* 0x28 */ s16 flashFireBoost;
|
||||
u8 fill2A[0x2C - 0x2A];
|
||||
// These start at 0x1000, and are halved by certain moves like Screech to lower the corresponding stat.
|
||||
/* 0x2C */ s32 attackMultiplier;
|
||||
/* 0x30 */ s32 specialAttackMultiplier;
|
||||
/* 0x34 */ s32 defenseMultiplier;
|
||||
/* 0x38 */ s32 specialDefenseMultiplier;
|
||||
// Index 0 is Attack. Index 1 is Special Attack.
|
||||
/* 0x2C */ s32 attackMultipliers[2];
|
||||
// Index 0 is Defense. Index 1 is Special Defense.
|
||||
/* 0x34 */ s32 defenseMultipliers[2];
|
||||
/* 0x3C */ s16 hiddenPowerPower;
|
||||
/* 0x3E */ u8 hiddenPowerType;
|
||||
u8 fill3F;
|
||||
@@ -77,8 +87,7 @@ struct DungeonEntityData
|
||||
/* 0x58 */ struct Position itemTargetPosition;
|
||||
/* 0x5C */ u8 type1;
|
||||
/* 0x5D */ u8 type2;
|
||||
/* 0x5E */ u8 ability1;
|
||||
/* 0x5F */ u8 ability2;
|
||||
/* 0x5E */ u8 abilities[2];
|
||||
/* 0x60 */ struct ItemSlot heldItem;
|
||||
u8 fill64[0x68 - 0x64];
|
||||
/* 0x68 */ struct Position previousPosition1;
|
||||
|
||||
@@ -18,7 +18,7 @@ s32 GetMoveAccuracy(struct PokemonMove *move, u32 accuracyType);
|
||||
u32 GetMoveMaxPP(struct PokemonMove *move);
|
||||
u8 GetMoveUnk12(struct PokemonMove *move);
|
||||
u8 GetMoveCriticalHitChance(struct PokemonMove *move);
|
||||
u8 GetMoveCannotHitFrozen(struct PokemonMove *move);
|
||||
u8 MoveCannotHitFrozen(struct PokemonMove *move);
|
||||
u8 MoveDealsDirectDamage(struct PokemonMove *move);
|
||||
u32 GetMoveRangeType(struct PokemonMove *move);
|
||||
void sub_8092C84(u8 *buffer, u16 moveID);
|
||||
|
||||
@@ -6,5 +6,7 @@
|
||||
|
||||
// 0x5C498
|
||||
bool8 CanUseOnSelfWithStatusChecker(struct DungeonEntity *pokemon, struct PokemonMove *move);
|
||||
// 0x5CEB8
|
||||
bool8 CanUseOnTargetWithStatusChecker(struct DungeonEntity *user, struct DungeonEntity *target, struct PokemonMove *move);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user