summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/battle.h5
-rw-r--r--include/battle_util.h4
-rw-r--r--include/constants/battle_script_commands.h13
-rw-r--r--include/contest.h15
4 files changed, 31 insertions, 6 deletions
diff --git a/include/battle.h b/include/battle.h
index f6c50ea8a..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))
@@ -592,7 +593,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/battle_util.h b/include/battle_util.h
index 0531966df..be9b5f1fe 100644
--- a/include/battle_util.h
+++ b/include/battle_util.h
@@ -59,8 +59,8 @@ u8 TrySetCantSelectMoveBattleScript(void);
u8 CheckMoveLimitations(u8 battlerId, u8 unusableMoves, u8 check);
bool8 AreAllMovesUnusable(void);
u8 GetImprisonedMovesCount(u8 battlerId, u16 move);
-u8 UpdateTurnCounters(void);
-u8 TurnBasedEffects(void);
+u8 DoFieldEndTurnEffects(void);
+u8 DoBattlerEndTurnEffects(void);
bool8 HandleWishPerishSongOnTurnEnd(void);
bool8 HandleFaintedMonActions(void);
void TryClearRageStatuses(void);
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
diff --git a/include/contest.h b/include/contest.h
index d920117f3..c263882eb 100644
--- a/include/contest.h
+++ b/include/contest.h
@@ -1,6 +1,21 @@
#ifndef GUARD_CONTEST_H
#define GUARD_CONTEST_H
+struct ContestMove
+{
+ u8 effect;
+ u8 contestCategory:3;
+ u8 comboStarterId;
+ u8 comboMoves[4];
+};
+
+struct ContestEffect
+{
+ u8 effectType;
+ u8 appeal;
+ u8 jam;
+};
+
struct ContestStruct_02039E00
{
u16 unk_00;