Skip to content

Commit

Permalink
Merge pull request #86 from lhearachel/battle-dev
Browse files Browse the repository at this point in the history
Document SetupMultiHit, SetVarValue, and ChangeStatStage commands
  • Loading branch information
lhearachel authored Oct 21, 2023
2 parents 584e2df + 37f7d89 commit 8f7a8f7
Show file tree
Hide file tree
Showing 5 changed files with 356 additions and 225 deletions.
23 changes: 21 additions & 2 deletions include/battle/btlcmd.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,18 +99,37 @@ enum BattleScriptVars {
#define BTLSCR_SWITCHED_MON_AFTER 22
#define BTLSCR_MSG_TEMP (0xFF)

enum IfOp {
enum OpCode {
IFOP_EQU = 0,
IFOP_NEQ,
IFOP_LTE,
IFOP_GT,
IFOP_FLAG_SET,
IFOP_FLAG_NOT,
IFOP_AND,

VALOP_SET,
VALOP_ADD,
VALOP_SUB,
VALOP_FLAG_ON,
VALOP_FLAG_OFF,
VALOP_MUL,
VALOP_DIV,
VALOP_LSH,
VALOP_RSH,
VALOP_FLAG_INDEX,
VALOP_GET,
VALOP_SUB_TO_ZERO,
VALOP_XOR,
VALOP_AND,
};

enum StatusEffect {
STATUS_EFFECT_LEVEL_UP = 8,

STATUS_EFFECT_STAGE_UP = 12,
STATUS_EFFECT_STAGE_DOWN,
};

#endif // POKEPLATINUM_BATTLE_BTLCMD_H
#endif // POKEPLATINUM_BATTLE_BTLCMD_H

5 changes: 3 additions & 2 deletions include/constants/battle/message_tags.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ enum MessageTags {
TAG_NICKNAME_POKE,
TAG_NICKNAME_ITEM,
TAG_NICKNAME_POFFIN,
TAG_NICKNAME_NUM = 17,
TAG_NICKNAME_NUM,
TAG_NICKNAME_TRNAME,
TAG_NICKNAME_BOX,
TAG_MOVE_SIDE,
Expand Down Expand Up @@ -74,4 +74,5 @@ enum MessageTags {
TAG_TRCLASS_TRNAME_NICKNAME_TRCLASS_TRNAME_NICKNAME,
};

#endif // POKEPLATINUM_CONSTANTS_BATTLE_MESSAGE_TAGS_H
#endif // POKEPLATINUM_CONSTANTS_BATTLE_MESSAGE_TAGS_H

33 changes: 32 additions & 1 deletion include/constants/battle/side_effects.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,36 @@
#ifndef POKEPLATINUM_CONSTANTS_BATTLE_SIDE_EFFECTS_H
#define POKEPLATINUM_CONSTANTS_BATTLE_SIDE_EFFECTS_H

#define MOVE_SIDE_EFFECT_ATTACK_UP_1_STAGE 0x0000000F
#define MOVE_SIDE_EFFECT_DEFENSE_UP_1_STAGE 0x00000010
#define MOVE_SIDE_EFFECT_SPEED_UP_1_STAGE 0x00000011
#define MOVE_SIDE_EFFECT_SP_ATTACK_UP_1_STAGE 0x00000012
#define MOVE_SIDE_EFFECT_SP_DEFENSE_UP_1_STAGE 0x00000013
#define MOVE_SIDE_EFFECT_ACCURACY_UP_1_STAGE 0x00000014
#define MOVE_SIDE_EFFECT_EVASION_UP_1_STAGE 0x00000015
#define MOVE_SIDE_EFFECT_ATTACK_DOWN_1_STAGE 0x00000016
#define MOVE_SIDE_EFFECT_DEFENSE_DOWN_1_STAGE 0x00000017
#define MOVE_SIDE_EFFECT_SPEED_DOWN_1_STAGE 0x00000018
#define MOVE_SIDE_EFFECT_SP_ATTACK_DOWN_1_STAGE 0x00000019
#define MOVE_SIDE_EFFECT_SP_DEFENSE_DOWN_1_STAGE 0x0000001A
#define MOVE_SIDE_EFFECT_ACCURACY_DOWN_1_STAGE 0x0000001B
#define MOVE_SIDE_EFFECT_EVASION_DOWN_1_STAGE 0x0000001C

#define MOVE_SIDE_EFFECT_ATTACK_UP_2_STAGES 0x00000027
#define MOVE_SIDE_EFFECT_DEFENSE_UP_2_STAGES 0x00000028
#define MOVE_SIDE_EFFECT_SPEED_UP_2_STAGES 0x00000029
#define MOVE_SIDE_EFFECT_SP_ATTACK_UP_2_STAGES 0x0000002A
#define MOVE_SIDE_EFFECT_SP_DEFENSE_UP_2_STAGES 0x0000002B
#define MOVE_SIDE_EFFECT_ACCURACY_UP_2_STAGES 0x0000002C
#define MOVE_SIDE_EFFECT_EVASION_UP_2_STAGES 0x0000002D
#define MOVE_SIDE_EFFECT_ATTACK_DOWN_2_STAGES 0x0000002E
#define MOVE_SIDE_EFFECT_DEFENSE_DOWN_2_STAGES 0x0000002F
#define MOVE_SIDE_EFFECT_SPEED_DOWN_2_STAGES 0x00000030
#define MOVE_SIDE_EFFECT_SP_ATTACK_DOWN_2_STAGES 0x00000031
#define MOVE_SIDE_EFFECT_SP_DEFENSE_DOWN_2_STAGES 0x00000032
#define MOVE_SIDE_EFFECT_ACCURACY_DOWN_2_STAGES 0x00000033
#define MOVE_SIDE_EFFECT_EVASION_DOWN_2_STAGES 0x00000034

#define MOVE_SIDE_EFFECT_BREAK_SCREENS (1 << 23)
#define MOVE_SIDE_EFFECT_CHECK_SUBSTITUTE (1 << 24)
#define MOVE_SIDE_EFFECT_CHECK_HP_AND_SUBSTITUTE (1 << 25)
Expand All @@ -22,4 +52,5 @@ enum {
SIDE_EFFECT_SOURCE_DISOBEDIENCE,
};

#endif // POKEPLATINUM_CONSTANTS_BATTLE_SIDE_EFFECTS_H
#endif // POKEPLATINUM_CONSTANTS_BATTLE_SIDE_EFFECTS_H

2 changes: 2 additions & 0 deletions include/constants/battle/system_control.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#define SYSCTL_MOVE_HIT (1 << 13) // this indicates that the move hit its target(s)
#define SYSCTL_PLAYED_MOVE_ANIMATION (1 << 14)
#define SYSCTL_SKIP_TYPE_CHECK (1 << 15)
#define SYSCTL_FAIL_STAT_STAGE_CHANGE (1 << 17)
#define SYSCTL_HIT_DURING_SHADOW_FORCE (1 << 19)
#define SYSCTL_REUSE_LAST_MOVE (1 << 20)
#define SYSCTL_APPLY_SECONDARY_EFFECT (1 << 22)
Expand Down Expand Up @@ -49,3 +50,4 @@
#define BATTLER_STATUS_SWITCHING 1

#endif // POKEPLATINUM_CONSTANTS_BATTLE_SYSTEM_CONTROL_H

Loading

0 comments on commit 8f7a8f7

Please sign in to comment.