2017-12-08 21:50:59 -08:00
|
|
|
; significant level values
|
2013-06-10 18:56:34 -07:00
|
|
|
MAX_LEVEL EQU 100
|
2014-12-26 11:31:55 -08:00
|
|
|
MIN_LEVEL EQU 2
|
2015-02-14 12:08:32 -08:00
|
|
|
EGG_LEVEL EQU 5
|
2017-12-08 21:50:59 -08:00
|
|
|
|
|
|
|
; maximum moves known per mon
|
2013-06-10 18:56:34 -07:00
|
|
|
NUM_MOVES EQU 4
|
|
|
|
|
2017-12-08 21:50:59 -08:00
|
|
|
; significant stat values
|
2015-11-06 17:55:16 -08:00
|
|
|
BASE_STAT_LEVEL EQU 7
|
2017-12-08 21:50:59 -08:00
|
|
|
MAX_STAT_LEVEL EQU 13
|
2014-06-13 21:18:14 -07:00
|
|
|
|
2017-12-25 10:40:10 -08:00
|
|
|
; minimum damage before type effectiveness
|
|
|
|
MIN_NEUTRAL_DAMAGE EQU 2
|
|
|
|
|
|
|
|
; turns that sleep lasts
|
|
|
|
REST_SLEEP_TURNS EQU 2
|
|
|
|
TREEMON_SLEEP_TURNS EQU 7
|
2017-12-08 21:50:59 -08:00
|
|
|
|
2018-01-09 12:39:48 -08:00
|
|
|
; default move priority
|
|
|
|
BASE_PRIORITY EQU 1
|
|
|
|
|
2018-01-10 14:30:27 -08:00
|
|
|
; type effectiveness factors, scaled by 10
|
|
|
|
SUPER_EFFECTIVE EQU 20
|
2018-01-10 19:53:42 -08:00
|
|
|
MORE_EFFECTIVE EQU 15
|
2018-01-10 14:30:27 -08:00
|
|
|
EFFECTIVE EQU 10
|
|
|
|
NOT_VERY_EFFECTIVE EQU 05
|
|
|
|
NO_EFFECT EQU 00
|
|
|
|
|
2018-01-23 14:39:09 -08:00
|
|
|
; wPlayerStatLevels and wEnemyStatLevels indexes (see wram.asm)
|
2018-01-10 14:30:27 -08:00
|
|
|
; GetStatName arguments (see data/battle/stat_names.asm)
|
2015-07-12 22:37:11 -07:00
|
|
|
const_def
|
|
|
|
const ATTACK
|
|
|
|
const DEFENSE
|
|
|
|
const SPEED
|
|
|
|
const SP_ATTACK
|
|
|
|
const SP_DEFENSE
|
|
|
|
const ACCURACY
|
|
|
|
const EVASION
|
2017-12-08 21:50:59 -08:00
|
|
|
const ABILITY ; used for BattleCommand_Curse
|
2015-11-06 17:55:16 -08:00
|
|
|
NUM_LEVEL_STATS EQU const_value
|
2013-06-13 13:10:39 -07:00
|
|
|
|
2017-12-26 14:47:05 -08:00
|
|
|
; move struct members (see data/moves/moves.asm)
|
2015-07-12 22:37:11 -07:00
|
|
|
const_def
|
2017-12-26 09:50:32 -08:00
|
|
|
const MOVE_ANIM ; 0
|
|
|
|
const MOVE_EFFECT ; 1
|
|
|
|
const MOVE_POWER ; 2
|
|
|
|
const MOVE_TYPE ; 3
|
|
|
|
const MOVE_ACC ; 4
|
|
|
|
const MOVE_PP ; 5
|
|
|
|
const MOVE_CHANCE ; 6
|
|
|
|
MOVE_LENGTH EQU const_value
|
2013-06-10 18:56:34 -07:00
|
|
|
|
|
|
|
; stat constants
|
2017-12-08 21:50:59 -08:00
|
|
|
; indexes for:
|
2018-01-23 14:39:09 -08:00
|
|
|
; - wPlayerStats and wEnemyStats (see wram.asm)
|
2017-12-08 21:50:59 -08:00
|
|
|
; - party_struct and battle_struct members (see macros/wram.asm)
|
2018-01-31 08:38:45 -08:00
|
|
|
const_def 1
|
2015-07-12 22:37:11 -07:00
|
|
|
const STAT_HP
|
|
|
|
const STAT_ATK
|
|
|
|
const STAT_DEF
|
|
|
|
const STAT_SPD
|
|
|
|
const STAT_SATK
|
2018-07-11 12:40:09 -07:00
|
|
|
NUM_EXP_STATS EQU const_value + -1
|
2015-07-12 22:37:11 -07:00
|
|
|
const STAT_SDEF
|
2018-07-28 16:27:34 -07:00
|
|
|
NUM_STATS EQU const_value + -1
|
|
|
|
NUM_BATTLE_STATS EQU NUM_STATS + -1 ; don't count HP
|
2017-12-08 21:50:59 -08:00
|
|
|
|
|
|
|
; stat formula constants
|
2013-06-10 18:56:34 -07:00
|
|
|
STAT_MIN_NORMAL EQU 5
|
|
|
|
STAT_MIN_HP EQU 10
|
|
|
|
|
2017-12-24 16:49:57 -08:00
|
|
|
MAX_STAT_VALUE EQU 999
|
|
|
|
|
2013-06-10 18:56:34 -07:00
|
|
|
; shiny dvs
|
|
|
|
ATKDEFDV_SHINY EQU $EA
|
|
|
|
SPDSPCDV_SHINY EQU $AA
|
|
|
|
|
2017-12-08 21:50:59 -08:00
|
|
|
; battle classes (wBattleMode values)
|
2018-01-31 08:38:45 -08:00
|
|
|
const_def 1
|
2015-07-12 22:37:11 -07:00
|
|
|
const WILD_BATTLE
|
|
|
|
const TRAINER_BATTLE
|
2013-06-10 18:56:34 -07:00
|
|
|
|
2018-01-23 14:39:09 -08:00
|
|
|
; battle types (wBattleType values)
|
2015-07-12 22:37:11 -07:00
|
|
|
const_def
|
|
|
|
const BATTLETYPE_NORMAL
|
|
|
|
const BATTLETYPE_CANLOSE
|
|
|
|
const BATTLETYPE_DEBUG
|
|
|
|
const BATTLETYPE_TUTORIAL
|
|
|
|
const BATTLETYPE_FISH
|
|
|
|
const BATTLETYPE_ROAMING
|
|
|
|
const BATTLETYPE_CONTEST
|
|
|
|
const BATTLETYPE_SHINY
|
|
|
|
const BATTLETYPE_TREE
|
|
|
|
const BATTLETYPE_TRAP
|
|
|
|
const BATTLETYPE_FORCEITEM
|
|
|
|
const BATTLETYPE_CELEBI
|
|
|
|
const BATTLETYPE_SUICUNE
|
2013-06-10 18:56:34 -07:00
|
|
|
|
2018-01-25 15:10:41 -08:00
|
|
|
; BattleVarPairs indexes (see home/battle.asm)
|
2015-07-12 22:37:11 -07:00
|
|
|
const_def
|
|
|
|
const BATTLE_VARS_SUBSTATUS1
|
|
|
|
const BATTLE_VARS_SUBSTATUS2
|
|
|
|
const BATTLE_VARS_SUBSTATUS3
|
|
|
|
const BATTLE_VARS_SUBSTATUS4
|
|
|
|
const BATTLE_VARS_SUBSTATUS5
|
|
|
|
const BATTLE_VARS_SUBSTATUS1_OPP
|
|
|
|
const BATTLE_VARS_SUBSTATUS2_OPP
|
|
|
|
const BATTLE_VARS_SUBSTATUS3_OPP
|
|
|
|
const BATTLE_VARS_SUBSTATUS4_OPP
|
|
|
|
const BATTLE_VARS_SUBSTATUS5_OPP
|
|
|
|
const BATTLE_VARS_STATUS
|
|
|
|
const BATTLE_VARS_STATUS_OPP
|
|
|
|
const BATTLE_VARS_MOVE_ANIM
|
|
|
|
const BATTLE_VARS_MOVE_EFFECT
|
|
|
|
const BATTLE_VARS_MOVE_POWER
|
|
|
|
const BATTLE_VARS_MOVE_TYPE
|
|
|
|
const BATTLE_VARS_MOVE
|
|
|
|
const BATTLE_VARS_LAST_COUNTER_MOVE
|
|
|
|
const BATTLE_VARS_LAST_COUNTER_MOVE_OPP
|
|
|
|
const BATTLE_VARS_LAST_MOVE
|
|
|
|
const BATTLE_VARS_LAST_MOVE_OPP
|
2013-06-10 18:56:34 -07:00
|
|
|
|
2018-01-25 15:10:41 -08:00
|
|
|
; BattleVarLocations indexes (see home/battle.asm)
|
2017-12-08 21:50:59 -08:00
|
|
|
const_def
|
|
|
|
const PLAYER_SUBSTATUS_1
|
|
|
|
const ENEMY_SUBSTATUS_1
|
|
|
|
const PLAYER_SUBSTATUS_2
|
|
|
|
const ENEMY_SUBSTATUS_2
|
|
|
|
const PLAYER_SUBSTATUS_3
|
|
|
|
const ENEMY_SUBSTATUS_3
|
|
|
|
const PLAYER_SUBSTATUS_4
|
|
|
|
const ENEMY_SUBSTATUS_4
|
|
|
|
const PLAYER_SUBSTATUS_5
|
|
|
|
const ENEMY_SUBSTATUS_5
|
|
|
|
const PLAYER_STATUS
|
|
|
|
const ENEMY_STATUS
|
|
|
|
const PLAYER_MOVE_ANIMATION
|
|
|
|
const ENEMY_MOVE_ANIMATION
|
|
|
|
const PLAYER_MOVE_EFFECT
|
|
|
|
const ENEMY_MOVE_EFFECT
|
|
|
|
const PLAYER_MOVE_POWER
|
|
|
|
const ENEMY_MOVE_POWER
|
|
|
|
const PLAYER_MOVE_TYPE
|
|
|
|
const ENEMY_MOVE_TYPE
|
|
|
|
const PLAYER_CUR_MOVE
|
|
|
|
const ENEMY_CUR_MOVE
|
|
|
|
const PLAYER_COUNTER_MOVE
|
|
|
|
const ENEMY_COUNTER_MOVE
|
|
|
|
const PLAYER_LAST_MOVE
|
|
|
|
const ENEMY_LAST_MOVE
|
|
|
|
|
|
|
|
; status condition bit flags
|
|
|
|
SLP EQU %111 ; 0-7 turns
|
2018-01-31 08:38:45 -08:00
|
|
|
const_def 3
|
2015-07-12 22:37:11 -07:00
|
|
|
const PSN
|
|
|
|
const BRN
|
|
|
|
const FRZ
|
|
|
|
const PAR
|
2013-06-10 18:56:34 -07:00
|
|
|
|
2018-04-05 08:44:02 -07:00
|
|
|
ALL_STATUS EQU (1 << PSN) | (1 << BRN) | (1 << FRZ) | (1 << PAR) | SLP
|
2015-11-08 10:27:26 -08:00
|
|
|
|
2018-01-23 14:39:09 -08:00
|
|
|
; wPlayerSubStatus1 or wEnemySubStatus1 bit flags
|
2015-07-12 22:37:11 -07:00
|
|
|
enum_start 7, -1
|
2015-07-18 20:45:39 -07:00
|
|
|
enum SUBSTATUS_IN_LOVE
|
|
|
|
enum SUBSTATUS_ROLLOUT
|
|
|
|
enum SUBSTATUS_ENDURE
|
|
|
|
enum SUBSTATUS_PERISH
|
|
|
|
enum SUBSTATUS_IDENTIFIED
|
|
|
|
enum SUBSTATUS_PROTECT
|
|
|
|
enum SUBSTATUS_CURSE
|
|
|
|
enum SUBSTATUS_NIGHTMARE
|
2013-06-10 18:56:34 -07:00
|
|
|
|
2018-01-23 14:39:09 -08:00
|
|
|
; wPlayerSubStatus2 or wEnemySubStatus2 bit flags
|
2017-12-08 21:50:59 -08:00
|
|
|
SUBSTATUS_CURLED EQU 0
|
2013-06-10 18:56:34 -07:00
|
|
|
|
2018-01-23 14:39:09 -08:00
|
|
|
; wPlayerSubStatus3 or wEnemySubStatus3 bit flags
|
2015-07-12 22:37:11 -07:00
|
|
|
enum_start 7, -1
|
2015-07-18 20:45:39 -07:00
|
|
|
enum SUBSTATUS_CONFUSED
|
|
|
|
enum SUBSTATUS_FLYING
|
|
|
|
enum SUBSTATUS_UNDERGROUND
|
|
|
|
enum SUBSTATUS_CHARGED
|
|
|
|
enum SUBSTATUS_FLINCHED
|
|
|
|
enum SUBSTATUS_IN_LOOP
|
|
|
|
enum SUBSTATUS_RAMPAGE
|
|
|
|
enum SUBSTATUS_BIDE
|
2013-06-10 18:56:34 -07:00
|
|
|
|
2018-01-23 14:39:09 -08:00
|
|
|
; wPlayerSubStatus4 or wEnemySubStatus4 bit flags
|
2015-07-12 22:37:11 -07:00
|
|
|
enum_start 7, -1
|
2015-07-18 20:45:39 -07:00
|
|
|
enum SUBSTATUS_LEECH_SEED
|
|
|
|
enum SUBSTATUS_RAGE
|
|
|
|
enum SUBSTATUS_RECHARGE
|
|
|
|
enum SUBSTATUS_SUBSTITUTE
|
|
|
|
enum SUBSTATUS_UNKNOWN_1
|
2015-07-12 22:37:11 -07:00
|
|
|
enum SUBSTATUS_FOCUS_ENERGY
|
2015-07-18 20:45:39 -07:00
|
|
|
enum SUBSTATUS_MIST
|
|
|
|
enum SUBSTATUS_X_ACCURACY
|
2013-06-10 18:56:34 -07:00
|
|
|
|
2018-01-23 14:39:09 -08:00
|
|
|
; wPlayerSubStatus5 or wEnemySubStatus5 bit flags
|
2015-07-12 22:37:11 -07:00
|
|
|
enum_start 7, -1
|
2015-07-18 20:45:39 -07:00
|
|
|
enum SUBSTATUS_CANT_RUN
|
2015-07-12 22:37:11 -07:00
|
|
|
enum SUBSTATUS_DESTINY_BOND
|
2015-07-18 20:45:39 -07:00
|
|
|
enum SUBSTATUS_LOCK_ON
|
|
|
|
enum SUBSTATUS_ENCORED
|
|
|
|
enum SUBSTATUS_TRANSFORMED
|
|
|
|
enum SUBSTATUS_UNKNOWN_2
|
|
|
|
enum SUBSTATUS_UNKNOWN_3
|
|
|
|
enum SUBSTATUS_TOXIC
|
2013-06-10 18:56:34 -07:00
|
|
|
|
2018-01-23 14:39:09 -08:00
|
|
|
; wPlayerScreens or wEnemyScreens bit flags
|
2015-07-12 22:37:11 -07:00
|
|
|
enum_start 4, -1
|
2015-07-18 20:45:39 -07:00
|
|
|
enum SCREENS_REFLECT
|
2015-07-12 22:37:11 -07:00
|
|
|
enum SCREENS_LIGHT_SCREEN
|
2015-07-18 20:45:39 -07:00
|
|
|
enum SCREENS_SAFEGUARD
|
2015-07-12 22:37:11 -07:00
|
|
|
enum SCREENS_UNUSED
|
2015-07-18 20:45:39 -07:00
|
|
|
enum SCREENS_SPIKES
|
2013-06-10 18:56:34 -07:00
|
|
|
|
2018-01-23 13:45:34 -08:00
|
|
|
; values in wBattleWeather
|
2015-07-12 22:37:11 -07:00
|
|
|
const_def
|
|
|
|
const WEATHER_NONE
|
|
|
|
const WEATHER_RAIN
|
|
|
|
const WEATHER_SUN
|
|
|
|
const WEATHER_SANDSTORM
|
|
|
|
const WEATHER_RAIN_END
|
|
|
|
const WEATHER_SUN_END
|
|
|
|
const WEATHER_SANDSTORM_END
|
2013-06-10 18:56:34 -07:00
|
|
|
|
2015-11-06 06:04:27 -08:00
|
|
|
; wBattleAction
|
|
|
|
const_def
|
|
|
|
const BATTLEACTION_MOVE1
|
|
|
|
const BATTLEACTION_MOVE2
|
|
|
|
const BATTLEACTION_MOVE3
|
|
|
|
const BATTLEACTION_MOVE4
|
|
|
|
const BATTLEACTION_SWITCH1
|
|
|
|
const BATTLEACTION_SWITCH2
|
|
|
|
const BATTLEACTION_SWITCH3
|
|
|
|
const BATTLEACTION_SWITCH4
|
|
|
|
const BATTLEACTION_SWITCH5
|
|
|
|
const BATTLEACTION_SWITCH6
|
|
|
|
const BATTLEACTION_A
|
|
|
|
const BATTLEACTION_B
|
|
|
|
const BATTLEACTION_C
|
|
|
|
const BATTLEACTION_D
|
|
|
|
const BATTLEACTION_E
|
|
|
|
const BATTLEACTION_FORFEIT
|
|
|
|
|
2018-07-28 16:27:34 -07:00
|
|
|
; wBattlePlayerAction
|
|
|
|
const_def
|
|
|
|
const BATTLEPLAYERACTION_USEMOVE
|
|
|
|
const BATTLEPLAYERACTION_USEITEM
|
|
|
|
const BATTLEPLAYERACTION_SWITCH
|
|
|
|
|
2017-12-08 21:50:59 -08:00
|
|
|
; wBattleResult
|
2015-11-06 06:04:27 -08:00
|
|
|
const_def
|
|
|
|
const WIN
|
|
|
|
const LOSE
|
|
|
|
const DRAW
|
2018-04-05 08:44:02 -07:00
|
|
|
|
|
|
|
BATTLERESULT_CAUGHT_CELEBI EQU 6
|
|
|
|
BATTLERESULT_BOX_FULL EQU 7
|
|
|
|
BATTLERESULT_BITMASK EQU (1 << BATTLERESULT_CAUGHT_CELEBI) | (1 << BATTLERESULT_BOX_FULL)
|