From 68145cd002e43a42194ce6fe8c9a5d390402e622 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sun, 29 Jul 2018 15:33:16 +0200 Subject: Document atk48 --- include/battle.h | 2 +- include/constants/battle_script_commands.h | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/battle.h b/include/battle.h index f6c50ea8a..073b16147 100644 --- a/include/battle.h +++ b/include/battle.h @@ -592,7 +592,7 @@ struct BattleScripting u8 animTurn; u8 animTargetsHit; u8 statChanger; - u8 field_1B; + bool8 statAnimPlayed; u8 atk23_state; u8 battleStyle; u8 atk6C_state; diff --git a/include/constants/battle_script_commands.h b/include/constants/battle_script_commands.h index c820a1114..84ec9d512 100644 --- a/include/constants/battle_script_commands.h +++ b/include/constants/battle_script_commands.h @@ -17,7 +17,7 @@ #define sB_ANIM_TURN gBattleScripting + 0x18 #define sB_ANIM_TARGETS_HIT gBattleScripting + 0x19 #define sSTATCHANGER gBattleScripting + 0x1A -#define sFIELD_1B gBattleScripting + 0x1B +#define sSTAT_ANIM_PLAYED gBattleScripting + 0x1B #define sGIVEEXP_STATE gBattleScripting + 0x1C #define sBATTLE_STYLE gBattleScripting + 0x1D #define sLVLBOX_STATE gBattleScripting + 0x1E @@ -91,7 +91,16 @@ // atk48 #define ATK48_STAT_NEGATIVE 0x1 #define ATK48_STAT_BY_TWO 0x2 -#define ATK48_BIT_x4 0x4 +#define ATK48_ONLY_MULTIPLE 0x4 #define ATK48_DONT_CHECK_LOWER 0x8 +#define BIT_HP 0x1 +#define BIT_ATK 0x2 +#define BIT_DEF 0x4 +#define BIT_SPEED 0x8 +#define BIT_SPATK 0x10 +#define BIT_SPDEF 0x20 +#define BIT_ACC 0x40 +#define BIT_EVASION 0x80 + #endif // GUARD_CONSTANTS_BATTLE_SCRIPT_COMMANDS_H -- cgit v1.2.3 From 9febcd3a0ad794f4531b56bb7d312b766261fc45 Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sun, 29 Jul 2018 15:51:08 +0200 Subject: Document a bit of atk47 --- include/battle.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/battle.h b/include/battle.h index 073b16147..fae21908b 100644 --- a/include/battle.h +++ b/include/battle.h @@ -568,10 +568,11 @@ struct BattleStruct } #define GET_STAT_BUFF_ID(n)((n & 0xF)) // first four bits 0x1, 0x2, 0x4, 0x8 +#define GET_STAT_BUFF_VALUE2(n)((n & 0xF0)) #define GET_STAT_BUFF_VALUE(n)(((n >> 4) & 7)) // 0x10, 0x20, 0x40 #define STAT_BUFF_NEGATIVE 0x80 // 0x80, the sign bit -#define SET_STAT_BUFF_VALUE(n)(((s8)(((s8)(n) << 4)) & 0xF0)) +#define SET_STAT_BUFF_VALUE(n)((((n) << 4) & 0xF0)) #define SET_STATCHANGER(statId, stage, goesDown)(gBattleScripting.statChanger = (statId) + (stage << 4) + (goesDown << 7)) -- cgit v1.2.3