Expansion releases (#8393)

This commit is contained in:
Alex 2025-11-30 16:33:08 +01:00 committed by GitHub
commit b29325a238
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
482 changed files with 43273 additions and 13288 deletions

View File

@ -43,17 +43,15 @@ body:
label: Version
description: What version of pokeemerald-expansion are you using?
options:
- 1.13.3 (Latest release)
- 1.14.0 (Latest release)
- master (default, unreleased bugfixes)
- upcoming (Edge)
- 1.13.4
- 1.13.3
- 1.13.2
- 1.13.1
- 1.13.0
- 1.12.3
- 1.12.2
- 1.12.1
- 1.12.0
- pre-1.12.0
- pre-1.13.0
validations:
required: true
- type: input

View File

@ -43,17 +43,15 @@ body:
label: Version
description: What version of pokeemerald-expansion are you using?
options:
- 1.13.3 (Latest release)
- 1.14.0 (Latest release)
- master (default, unreleased bugfixes)
- upcoming (Edge)
- 1.13.4
- 1.13.3
- 1.13.2
- 1.13.1
- 1.13.0
- 1.12.3
- 1.12.2
- 1.12.1
- 1.12.0
- pre-1.12.0
- pre-1.13.0
validations:
required: true
- type: input

View File

@ -43,17 +43,15 @@ body:
label: Version
description: What version of pokeemerald-expansion are you using?
options:
- 1.13.3 (Latest release)
- 1.14.0 (Latest release)
- master (default, unreleased bugfixes)
- upcoming (Edge)
- 1.13.4
- 1.13.3
- 1.13.2
- 1.13.1
- 1.13.0
- 1.12.3
- 1.12.2
- 1.12.1
- 1.12.0
- pre-1.12.0
- pre-1.13.0
validations:
required: true
- type: input

View File

@ -1,12 +1,32 @@
GAME_VERSION ?= EMERALD
TITLE ?= POKEMON EMER
GAME_CODE ?= BPEE
BUILD_NAME ?= emerald
MAP_VERSION ?= emerald
ifeq (firered,$(MAKECMDGOALS))
GAME_VERSION := FIRERED
TITLE := POKEMON FIRE
GAME_CODE := BPRE
BUILD_NAME := firered
MAP_VERSION := firered
else
ifeq (leafgreen,$(MAKECMDGOALS))
GAME_VERSION := LEAFGREEN
TITLE := POKEMON LEAF
GAME_CODE := BPGE
BUILD_NAME := leafgreen
MAP_VERSION := firered
endif
endif
# GBA rom header
TITLE := POKEMON EMER
GAME_CODE := BPEE
MAKER_CODE := 01
REVISION := 0
KEEP_TEMPS ?= 0
# `File name`.gba
FILE_NAME := pokeemerald
FILE_NAME := poke$(BUILD_NAME)
BUILD_DIR := build
# Compares the ROM to a checksum of the original - only makes sense using when non-modern
@ -21,6 +41,9 @@ UNUSED_ERROR ?= 0
DEBUG ?= 0
# Adds -flto flag, which increases link time but results in a more efficient binary (especially in audio processing)
LTO ?= 0
# Makes an optimized build for release, also enabling NDEBUG macro and disabling other debugging features
# Enables LTO by default, but can be changed in the config.mk file
RELEASE ?= 0
ifeq (compare,$(MAKECMDGOALS))
COMPARE := 1
@ -31,6 +54,11 @@ endif
ifeq (debug,$(MAKECMDGOALS))
DEBUG := 1
endif
ifneq (,$(filter release tidyrelease,$(MAKECMDGOALS)))
RELEASE := 1
endif
include config.mk
# Default make rule
all: rom
@ -62,10 +90,15 @@ endif
CPP := $(PREFIX)cpp
ifeq ($(RELEASE),1)
FILE_NAME := $(FILE_NAME)-release
endif
ROM_NAME := $(FILE_NAME).gba
OBJ_DIR_NAME := $(BUILD_DIR)/modern
OBJ_DIR_NAME_TEST := $(BUILD_DIR)/modern-test
OBJ_DIR_NAME_DEBUG := $(BUILD_DIR)/modern-debug
OBJ_DIR_NAME := $(BUILD_DIR)/$(BUILD_NAME)
OBJ_DIR_NAME_TEST := $(BUILD_DIR)/$(BUILD_NAME)-test
OBJ_DIR_NAME_DEBUG := $(BUILD_DIR)/$(BUILD_NAME)-debug
OBJ_DIR_NAME_RELEASE := $(BUILD_DIR)/$(BUILD_NAME)-release
ELF_NAME := $(ROM_NAME:.gba=.elf)
MAP_NAME := $(ROM_NAME:.gba=.map)
@ -85,6 +118,9 @@ endif
ifeq ($(DEBUG),1)
OBJ_DIR := $(OBJ_DIR_NAME_DEBUG)
endif
ifeq ($(RELEASE),1)
OBJ_DIR := $(OBJ_DIR_NAME_RELEASE)
endif
ELF := $(ROM:.gba=.elf)
MAP := $(ROM:.gba=.map)
SYM := $(ROM:.gba=.sym)
@ -108,7 +144,7 @@ TEST_BUILDDIR = $(OBJ_DIR)/$(TEST_SUBDIR)
SHELL := bash -o pipefail
# Set flags for tools
ASFLAGS := -mcpu=arm7tdmi -march=armv4t -meabi=5 --defsym MODERN=1
ASFLAGS := -mcpu=arm7tdmi -march=armv4t -meabi=5 --defsym MODERN=1 --defsym $(GAME_VERSION)=1
INCLUDE_DIRS := include
INCLUDE_CPP_ARGS := $(INCLUDE_DIRS:%=-iquote %)
@ -119,7 +155,13 @@ O_LEVEL ?= g
else
O_LEVEL ?= 2
endif
CPPFLAGS := $(INCLUDE_CPP_ARGS) -Wno-trigraphs -DMODERN=1 -DTESTING=$(TEST) -std=gnu17
CPPFLAGS := $(INCLUDE_CPP_ARGS) -Wno-trigraphs -DMODERN=1 -DTESTING=$(TEST) -D$(GAME_VERSION) -std=gnu17
ifeq ($(RELEASE),1)
override CPPFLAGS += -DRELEASE
ifeq ($(USE_LTO_ON_RELEASE),1)
LTO := 1
endif
endif
ARMCC := $(PREFIX)gcc
PATH_ARMCC := PATH="$(PATH)" $(ARMCC)
CC1 := $(shell $(PATH_ARMCC) --print-prog-name=cc1) -quiet
@ -199,7 +241,7 @@ MISC_TOOL_DIR := $(TOOLS_DIR)/misc
AUTO_GEN_TARGETS += $(INCLUDE_DIRS)/constants/script_commands.h
$(DATA_SRC_SUBDIR)/wild_encounters.h: $(DATA_SRC_SUBDIR)/wild_encounters.json $(WILD_ENCOUNTERS_TOOL_DIR)/wild_encounters_to_header.py $(INCLUDE_DIRS)/config/overworld.h $(INCLUDE_DIRS)/config/dexnav.h
python3 $(WILD_ENCOUNTERS_TOOL_DIR)/wild_encounters_to_header.py > $@
python3 $(WILD_ENCOUNTERS_TOOL_DIR)/wild_encounters_to_header.py
$(INCLUDE_DIRS)/constants/script_commands.h: $(MISC_TOOL_DIR)/make_scr_cmd_constants.py $(DATA_ASM_SUBDIR)/script_cmd_table.inc
python3 $(MISC_TOOL_DIR)/make_scr_cmd_constants.py
@ -220,8 +262,8 @@ MAKEFLAGS += --no-print-directory
# Delete files that weren't built properly
.DELETE_ON_ERROR:
RULES_NO_SCAN += libagbsyscall clean clean-assets tidy tidymodern tidycheck generated clean-generated
.PHONY: all rom agbcc modern compare check debug
RULES_NO_SCAN += libagbsyscall clean clean-assets tidy tidymodern tidycheck tidyrelease generated clean-generated
.PHONY: all rom agbcc modern compare check debug release
.PHONY: $(RULES_NO_SCAN)
infoshell = $(foreach line, $(shell $1 | sed "s/ /__SPACE__/g"), $(info $(subst __SPACE__, ,$(line))))
@ -248,7 +290,7 @@ ifeq ($(SETUP_PREREQS),1)
$(error Errors occurred while building tools. See error messages above for more details)
endif
# Oh and also generate mapjson sources before we use `SCANINC`.
$(foreach line, $(shell $(MAKE) generated | sed "s/ /__SPACE__/g"), $(info $(subst __SPACE__, ,$(line))))
$(foreach line, $(shell $(MAKE) MAP_VERSION=$(MAP_VERSION) generated | sed "s/ /__SPACE__/g"), $(info $(subst __SPACE__, ,$(line))))
ifneq ($(.SHELLSTATUS),0)
$(error Errors occurred while generating map-related sources. See error messages above for more details)
endif
@ -292,6 +334,7 @@ $(shell mkdir -p $(SUBDIRS))
modern: all
compare: all
debug: all
release: all
# Uncomment the next line, and then comment the 4 lines after it to reenable agbcc.
#agbcc: all
agbcc:
@ -340,7 +383,7 @@ clean-assets:
find . \( -iname '*.1bpp' -o -iname '*.4bpp' -o -iname '*.8bpp' -o -iname '*.gbapal' -o -iname '*.lz' -o -iname '*.smol' -o -iname '*.fastSmol' -o -iname '*.smolTM' -o -iname '*.rl' -o -iname '*.latfont' -o -iname '*.hwjpnfont' -o -iname '*.fwjpnfont' \) -exec rm {} +
find $(DATA_ASM_SUBDIR)/maps \( -iname 'connections.inc' -o -iname 'events.inc' -o -iname 'header.inc' \) -exec rm {} +
tidy: tidymodern tidycheck tidydebug
tidy: tidymodern tidycheck tidydebug tidyrelease
tidymodern:
rm -f $(ROM_NAME) $(ELF_NAME) $(MAP_NAME)
@ -353,6 +396,14 @@ tidycheck:
tidydebug:
rm -rf $(DEBUG_OBJ_DIR_NAME)
tidyrelease:
ifeq ($(RELEASE),1)
rm -f $(ROM_NAME) $(ELF_NAME) $(MAP_NAME)
else # Manually remove the release files on clean/tidy
rm -f $(FILE_NAME)-release.gba $(FILE_NAME)-release.elf $(FILE_NAME)-release.map
endif
rm -rf $(OBJ_DIR_NAME_RELEASE)
# Other rules
include graphics_file_rules.mk
include map_data_rules.mk
@ -449,7 +500,7 @@ ifneq ($(NODEP),1)
endif
$(C_BUILDDIR)/%.o: $(C_SUBDIR)/%.s
$(PREPROC) $< charmap.txt | $(CPP) $(INCLUDE_SCANINC_ARGS) - | $(PREPROC) -ie $< charmap.txt | $(AS) $(ASFLAGS) -o $@
$(PREPROC) $< charmap.txt | $(CPP) $(CPPFLAGS) $(INCLUDE_SCANINC_ARGS) - | $(PREPROC) -ie $< charmap.txt | $(AS) $(ASFLAGS) -o $@
$(C_BUILDDIR)/%.d: $(C_SUBDIR)/%.s
$(SCANINC) -M $@ $(INCLUDE_SCANINC_ARGS) -I "" $<
@ -459,7 +510,7 @@ ifneq ($(NODEP),1)
endif
$(DATA_ASM_BUILDDIR)/%.o: $(DATA_ASM_SUBDIR)/%.s
$(PREPROC) $< charmap.txt | $(CPP) $(INCLUDE_SCANINC_ARGS) - | $(PREPROC) -ie $< charmap.txt | $(AS) $(ASFLAGS) -o $@
$(PREPROC) $< charmap.txt | $(CPP) $(CPPFLAGS) $(INCLUDE_SCANINC_ARGS) - | $(PREPROC) -ie $< charmap.txt | $(AS) $(ASFLAGS) -o $@
$(DATA_ASM_BUILDDIR)/%.d: $(DATA_ASM_SUBDIR)/%.s
$(SCANINC) -M $@ $(INCLUDE_SCANINC_ARGS) -I "" $<
@ -518,6 +569,9 @@ $(ROM): $(ELF)
$(OBJCOPY) -O binary $< $@
$(FIX) $@ -p --silent
emerald: all
firered: all
leafgreen: all
# Symbol file (`make syms`)
$(SYM): $(ELF)
$(OBJDUMP) -t $< | sort -u | grep -E "^0[2389]" | $(PERL) -p -e 's/^(\w{8}) (\w).{6} \S+\t(\w{8}) (\S+)$$/\1 \2 \3 \4/g' > $@

View File

@ -17,7 +17,7 @@
If you use **`pokeemerald-expansion`**, please credit **RHH (Rom Hacking Hideout)**. Optionally, include the version number for clarity.
```
Based off RHH's pokeemerald-expansion 1.13.3 https://github.com/rh-hideout/pokeemerald-expansion/
Based off RHH's pokeemerald-expansion 1.14.0 https://github.com/rh-hideout/pokeemerald-expansion/
```
Please consider [crediting all contributors](CREDITS.md) involved in the project!

View File

@ -9,11 +9,11 @@
.2byte \move
.endm
.macro attackstring
.macro printattackstring
.byte 0x2
.endm
.macro ppreduce
.macro unused_0x3
.byte 0x3
.endm
@ -45,14 +45,16 @@
.byte 0xa
.endm
.macro healthbarupdate battler:req
.macro healthbarupdate battler:req updateState:req
.byte 0xb
.byte \battler
.byte \updateState
.endm
.macro datahpupdate battler:req
.macro datahpupdate battler:req updateState:req
.byte 0xc
.byte \battler
.byte \updateState
.endm
.macro critmessage
@ -363,9 +365,8 @@
.byte 0x3a
.endm
.macro absorbhealthbarupdate battler:req
.macro isdmgblockedbydisguise
.byte 0x3b
.byte \battler
.endm
.macro return
@ -678,10 +679,8 @@
.byte 0x75
.endm
.macro various battler:req, id:req
.macro unused_0x78
.byte 0x76
.byte \battler
.byte \id
.endm
.macro setprotectlike
@ -701,10 +700,10 @@
.4byte \jumpInstr
.endm
.macro tryhealhalfhealth failInstr:req, battler:req
.macro tryhealhalfhealth battler:req, failInstr:req
.byte 0x7b
.4byte \failInstr
.byte \battler
.4byte \failInstr
.endm
.macro trymirrormove
@ -729,14 +728,12 @@
.byte \mode
.endm
.macro trysetrest failInstr:req
.macro trysetrest
.byte 0x81
.4byte \failInstr
.endm
.macro jumpifnotfirstturn jumpInstr:req
.macro unused_0x82
.byte 0x82
.4byte \jumpInstr
.endm
.macro unused_0x83
@ -753,9 +750,8 @@
.byte \id
.endm
.macro stockpiletobasedamage failInstr:req
.macro stockpiletobasedamage
.byte 0x86
.4byte \failInstr
.endm
.macro stockpiletohpheal failInstr:req
@ -767,7 +763,7 @@
callnative BS_RemoveStockpileCounters
.endm
.macro setdrainedhp
.macro unused_0x88
.byte 0x88
.endm
@ -882,7 +878,7 @@
.4byte \failInstr
.endm
.macro metronome
.macro setcalledmove
.byte 0x9e
.endm
@ -943,7 +939,7 @@
.4byte \failInstr
.endm
.macro trysetdestinybondtohappen
.macro unused_0xab
.byte 0xab
.endm
@ -1019,8 +1015,10 @@
.4byte \jumpInstr
.endm
.macro tryrestorehpberry
.macro tryactivateitem battler:req, flag:req
.byte 0xbb
.byte \battler
.byte \flag
.endm
.macro halvehp failInstr:req
@ -1050,9 +1048,8 @@
.byte 0xc2
.endm
.macro trysetfutureattack failInstr:req
.macro setfutureattack
.byte 0xc3
.4byte \failInstr
.endm
.macro trydobeatup endInstr:req, failInstr:req
@ -1102,7 +1099,7 @@
.byte 0xca
.endm
.macro setcharge battler:req
.macro unused_0xcb battler:req
.byte 0xcb
.byte \battler
.endm
@ -1229,10 +1226,8 @@
.4byte \jumpInstr
.endm
.macro jumpifnotcurrentmoveargtype battler:req, failInstr:req
.macro unused_0xE4
.byte 0xe4
.byte \battler
.4byte \failInstr
.endm
.macro pickup
@ -1302,7 +1297,7 @@
.byte 0xf3
.endm
.macro subattackerhpbydmg
.macro unused_0xf4
.byte 0xf4
.endm
@ -1348,7 +1343,7 @@
.byte \trigger
.endm
.macro tryworryseed failInstr:req
.macro tryoverwriteability failInstr:req
.byte 0xfe
.4byte \failInstr
.endm
@ -1383,17 +1378,6 @@
.4byte \failInstr
.endm
.macro jumpifcantfling battler:req, jumpInstr:req
callnative BS_JumpIfCantFling
.byte \battler
.4byte \jumpInstr
.endm
.macro itemstatchangeeffects battler:req
callnative BS_RunStatChangeItems
.byte \battler
.endm
.macro allyswitchswapbattlers
callnative BS_AllySwitchSwapBattler
.endm
@ -1444,26 +1428,17 @@
.4byte \failInstr
.endm
.macro setglaiverush
callnative BS_SetGlaiveRush
.endm
.macro setpledge jumpInstr:req
callnative BS_SetPledge
.4byte \jumpInstr
.endm
.macro setpledgestatus battler:req sidestatus:req
.macro setpledgestatus battler:req, sidestatus:req
callnative BS_SetPledgeStatus
.byte \battler
.4byte \sidestatus
.endm
.macro trycopycat failInstr:req
callnative BS_TryCopycat
.4byte \failInstr
.endm
.macro setzeffect
callnative BS_SetZEffect
.endm
@ -1646,14 +1621,6 @@
.4byte \failInstr
.endm
.macro tryupdaterecoiltracker
callnative BS_TryUpdateRecoilTracker
.endm
.macro tryupdateleaderscresttracker
callnative BS_TryUpdateLeadersCrestTracker
.endm
.macro trytidyup clear:req, jumpInstr:req
callnative BS_TryTidyUp
.byte \clear
@ -1789,6 +1756,10 @@
.2byte \flags
.endm
.macro clearspecialstatuses
callnative BS_ClearSpecialStatuses
.endm
.macro clearmoveresultflags flags:req
callnative BS_ClearMoveResultFlags
.2byte \flags
@ -1811,11 +1782,8 @@
.4byte \jumpInstr
.endm
.macro jumpiflastuseditemholdeffect holdEffect:req, secondaryId:req, jumpInstr:req
callnative BS_JumpIfLastUsedItemHoldEffect
.byte \holdEffect
.2byte \secondaryId
.4byte \jumpInstr
.macro tryflingholdeffect
callnative BS_TryFlingHoldEffect
.endm
.macro swapsidestatuses
@ -2178,16 +2146,6 @@
.4byte \failInstr
.endm
.macro suckerpunchcheck failInstr:req
callnative BS_SuckerPunchCheck
.4byte \failInstr
.endm
.macro setsimplebeam failInstr:req
callnative BS_SetSimpleBeam
.4byte \failInstr
.endm
.macro tryentrainment failInstr:req
callnative BS_TryEntrainment
.4byte \failInstr
@ -2201,11 +2159,6 @@
callnative BS_InvertStatStages
.endm
.macro trymefirst failInstr:req
callnative BS_TryMeFirst
.4byte \failInstr
.endm
.macro tryelectrify failInstr:req
callnative BS_TryElectrify
.4byte \failInstr
@ -2222,11 +2175,6 @@
.byte \case_
.endm
.macro trylastresort failInstr:req
callnative BS_TryLastResort
.4byte \failInstr
.endm
.macro tryautotomize failInstr:req
callnative BS_TryAutotomize
.4byte \failInstr
@ -2415,20 +2363,11 @@
.4byte \failInstr
.endm
.macro checkpoltergeist failInstr:req
callnative BS_CheckPoltergeist
.macro setpoltergeistmessage failInstr:req
callnative BS_SetPoltergeistMessage
.4byte \failInstr
.endm
.macro trynoretreat failInstr:req
callnative BS_TryNoRetreat
.4byte \failInstr
.endm
.macro curecertainstatuses
callnative BS_CureCertainStatuses
.endm
.macro tryresetnegativestatstages
callnative BS_TryResetNegativeStatStages
.endm

View File

@ -2332,6 +2332,11 @@
callnative ScriptSetDoubleBattleFlag, requests_effects=1
.endm
@ Stop using the ORAS dowsing machine.
.macro stoporasdowsing
callnative EndORASDowsing
.endm
@ ============================ @
@ FAKE RTC MACROS
@ Will only function if OW_USE_FAKE_RTC is true. If it has any additional requirements, it will be listed accordingly.
@ -2674,8 +2679,34 @@
.2byte \battlePartner
.endm
@ Manually buffer a string as the speaker's name for namebox.
@ The next shown message/msgbox will include a namebox, if the provided string is not NULL.
@ An SP_NAME_* constant can also be used, it'll take the name from gSpeakerNamesTable instead.
.macro setspeaker name:req
callnative SetSpeaker
.4byte \name
.endm
@ VS Seeker
.macro vsseeker_rematchid rematchId:req
callnative NativeVsSeekerRematchId, requests_effects=1
.2byte \rematchId
.endm
@ Sets the move relearner state
.macro setmoverelearnerstate state:req
callnative ScrCmd_setmoverelearnerstate, requests_effects=1
.2byte \state
.endm
@ Retrieves the move relearner state and stores it in the specified var
.macro getmoverelearnerstate varId:req
callnative ScrCmd_getmoverelearnerstate, requests_effects=1
.4byte \varId
.endm
@ Execute script if bag has TMs and/or HMs
.macro istmrelearneractive destination:req
callnative ScrCmd_istmrelearneractive, requests_effects=1
.4byte \destination
.endm

View File

@ -459,6 +459,13 @@ JPN = FC 15
ENG = FC 16
PAUSE_MUSIC = FC 17
RESUME_MUSIC = FC 18
SPEAKER = FC 19
@ Speaker names, the order must be matching with include/constants/speaker_names.h
NAME_NONE = 00
NAME_MOM = 01
NAME_PLAYER = 02
NAME_COUNT = 03
@ fonts

2
config.mk Normal file
View File

@ -0,0 +1,2 @@
# Enable LTO when making a release build. Disable by setting to 0.
USE_LTO_ON_RELEASE ?= 1

View File

@ -3361,6 +3361,7 @@ gBattleAnimMove_AquaJet::
visible ANIM_ATTACKER
clearmonbg ANIM_DEF_PARTNER
blendoff
setarg 7, 0x1000
end
gBattleAnimMove_AttackOrder::
@ -31083,6 +31084,17 @@ gBattleAnimStatus_Nightmare::
clearmonbg ANIM_DEF_PARTNER
end
gBattleAnimStatus_Frostbite::
playsewithpan SE_M_ICY_WIND, 0
loadspritegfx ANIM_TAG_ICE_CRYSTALS
monbg ANIM_DEF_PARTNER
splitbgprio ANIM_TARGET
call IceCrystalEffectShort
createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, F_PAL_TARGET, 5, 7, 0, RGB(0, 20, 31)
waitforvisualfinish
clearmonbg ANIM_DEF_PARTNER
end
gBattleAnimGeneral_StatsChange::
createvisualtask AnimTask_StatsChange, 5
waitforvisualfinish

File diff suppressed because it is too large Load Diff

View File

@ -49,9 +49,8 @@ BattleScript_UseItemMessage:
BattleScript_ItemRestoreHPRet:
clearmoveresultflags MOVE_RESULT_NO_EFFECT
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE
healthbarupdate BS_SCRIPTING
datahpupdate BS_SCRIPTING
healthbarupdate BS_SCRIPTING, PASSIVE_HP_UPDATE
datahpupdate BS_SCRIPTING, PASSIVE_HP_UPDATE
printstring STRINGID_ITEMRESTOREDSPECIESHEALTH
waitmessage B_WAIT_TIME_LONG
return

View File

@ -3,6 +3,7 @@
#include "config/item.h"
#include "constants/global.h"
#include "constants/apprentice.h"
#include "constants/apricorn_tree.h"
#include "constants/battle.h"
#include "constants/battle_arena.h"
#include "constants/battle_dome.h"
@ -43,6 +44,7 @@
#include "constants/maps.h"
#include "constants/mauville_old_man.h"
#include "constants/metatile_labels.h"
#include "constants/move_relearner.h"
#include "constants/moves.h"
#include "constants/party_menu.h"
#include "constants/pokedex.h"
@ -62,6 +64,7 @@
#include "constants/union_room.h"
#include "constants/vars.h"
#include "constants/weather.h"
#include "constants/speaker_names.h"
.include "asm/macros.inc"
.include "asm/macros/event.inc"
.include "constants/constants.inc"
@ -695,6 +698,7 @@ EventScript_SetBrineyLocation_Route109::
.include "data/scripts/obtain_item.inc"
.include "data/scripts/record_mix.inc"
.include "data/scripts/pc.inc"
.include "data/scripts/move_relearner.inc"
@ scripts/notices.inc? signs.inc? See comment about text/notices.inc
Common_EventScript_ShowPokemartSign::
@ -880,6 +884,7 @@ Common_EventScript_PlayerHandedOverTheItem::
.include "data/text/pkmn_center_nurse.inc"
.include "data/text/mart_clerk.inc"
.include "data/text/obtain_item.inc"
.include "data/text/move_relearner.inc"
@ The below and surf.inc could be split into some text/notices.inc
gText_PokemartSign::
@ -1112,9 +1117,6 @@ EventScript_VsSeekerChargingDone::
.include "data/scripts/cable_club.inc"
.include "data/text/cable_club.inc"
.include "data/scripts/contest_hall.inc"
.include "data/text/contest_strings.inc"
.include "data/text/contest_link.inc"
.include "data/text/contest_painting.inc"
.include "data/scripts/tv.inc"
.include "data/text/tv.inc"
.include "data/scripts/interview.inc"
@ -1158,3 +1160,5 @@ EventScript_VsSeekerChargingDone::
.include "data/text/save.inc"
.include "data/text/birch_speech.inc"
.include "data/scripts/dexnav.inc"
.include "data/scripts/battle_frontier.inc"
.include "data/scripts/apricorn_tree.inc"

View File

@ -83,6 +83,7 @@ gFieldEffectScriptPointers::
.4byte gFieldEffectScript_Defog @ FLDEFF_DEFOG
.4byte gFieldEffectScript_UseRockClimb @ FLDEFF_USE_ROCK_CLIMB
.4byte gFieldEffectScript_RockClimbDust @ FLDEFF_ROCK_CLIMB_DUST
.4byte gFieldEffectScript_ORASDowse @ FLDEFF_ORAS_DOWSE
gFieldEffectScript_ExclamationMarkIcon1::
field_eff_callnative FldEff_ExclamationMarkIcon
@ -386,6 +387,7 @@ gFieldEffectScript_CaveDust::
gFieldEffectScript_Defog::
field_eff_callnative FldEff_Defog
field_eff_end
gFieldEffectScript_UseRockClimb:: @ 82DBC3F
field_eff_callnative FldEff_UseRockClimb
field_eff_end
@ -394,3 +396,7 @@ gFieldEffectScript_RockClimbDust:: @ 82DBB28
field_eff_loadfadedpal_callnative gSpritePalette_BigDust, FldEff_RockClimbDust
field_eff_end
gFieldEffectScript_ORASDowse::
field_eff_callnative FldEff_ORASDowsing
field_eff_end

View File

@ -13,6 +13,7 @@
#include "constants/trainer_types.h"
#include "constants/berry.h"
#include "constants/species.h"
#include "constants/apricorn_tree.h"
.include "asm/macros.inc"
.include "constants/constants.inc"

View File

@ -182,10 +182,14 @@ BattleFrontier_BattleArenaLobby_EventScript_NotEnoughValidMons::
BattleFrontier_BattleArenaLobby_EventScript_NotEnoughValidMonsLv50::
msgbox BattleFrontier_BattleArenaLobby_Text_NotEnoughValidMonsLv50, MSGBOX_DEFAULT
call BattleFrontier_ShowCaughtBannedSpecies
msgbox BattleFrontier_BattleArenaLobby_Text_NotEnoughValidMonsEnd, MSGBOX_DEFAULT
goto BattleFrontier_BattleArenaLobby_EventScript_EndCancelChallenge
BattleFrontier_BattleArenaLobby_EventScript_NotEnoughValidMonsLvOpen::
msgbox BattleFrontier_BattleArenaLobby_Text_NotEnoughValidMonsLvOpen, MSGBOX_DEFAULT
call BattleFrontier_ShowCaughtBannedSpecies
msgbox BattleFrontier_BattleArenaLobby_Text_NotEnoughValidMonsEnd, MSGBOX_DEFAULT
goto BattleFrontier_BattleArenaLobby_EventScript_EndCancelChallenge
BattleFrontier_BattleArenaLobby_EventScript_CancelChallengeSaveFailed::
@ -409,7 +413,9 @@ BattleFrontier_BattleArenaLobby_Text_NotEnoughValidMonsLvOpen:
.string "different kinds of POKéMON.\p"
.string "They also must not hold the same\n"
.string "kinds of items.\p"
.string "EGGS{STR_VAR_1} ineligible.\p"
.string "EGGS{STR_VAR_1}.$"
BattleFrontier_BattleArenaLobby_Text_NotEnoughValidMonsEnd:
.string "When you have made your preparations,\n"
.string "please do return.$"
@ -423,9 +429,7 @@ BattleFrontier_BattleArenaLobby_Text_NotEnoughValidMonsLv50:
.string "must all be Level 50 or lower.\p"
.string "They also must not hold the same\n"
.string "kinds of items.\p"
.string "EGGS{STR_VAR_1} ineligible.\p"
.string "When you have made your preparations,\n"
.string "please do return.$"
.string "EGGS{STR_VAR_1}.$"
BattleFrontier_BattleArenaLobby_Text_GuideYouToArena:
.string "I shall now guide you to\n"

View File

@ -210,10 +210,14 @@ BattleFrontier_BattleDomeLobby_EventScript_NotEnoughValidMons::
BattleFrontier_BattleDomeLobby_EventScript_NotEnoughValidMonsLv50::
msgbox BattleFrontier_BattleDomeLobby_Text_NotEnoughValidMonsLv50, MSGBOX_DEFAULT
call BattleFrontier_ShowCaughtBannedSpecies
msgbox BattleFrontier_BattleDomeLobby_Text_NotEnoughValidMonsEnd, MSGBOX_DEFAULT
goto BattleFrontier_BattleDomeLobby_EventScript_EndCancelChallenge
BattleFrontier_BattleDomeLobby_EventScript_NotEnoughValidMonsLvOpen::
msgbox BattleFrontier_BattleDomeLobby_Text_NotEnoughValidMonsLvOpen, MSGBOX_DEFAULT
call BattleFrontier_ShowCaughtBannedSpecies
msgbox BattleFrontier_BattleDomeLobby_Text_NotEnoughValidMonsEnd, MSGBOX_DEFAULT
goto BattleFrontier_BattleDomeLobby_EventScript_EndCancelChallenge
BattleFrontier_BattleDomeLobby_EventScript_CancelChallengeSaveFailed::
@ -486,7 +490,9 @@ BattleFrontier_BattleDomeLobby_Text_NotEnoughValidMonsLvOpen:
.string "You don't have three eligible POKéMON.\p"
.string "Also, the POKéMON must be holding\n"
.string "different kinds of items.\p"
.string "EGGS{STR_VAR_1} ineligible.\p"
.string "EGGS{STR_VAR_1}.$"
BattleFrontier_BattleDomeLobby_Text_NotEnoughValidMonsEnd:
.string "Please come see me when you are ready.$"
BattleFrontier_BattleDomeLobby_Text_NotEnoughValidMonsLv50:
@ -496,8 +502,7 @@ BattleFrontier_BattleDomeLobby_Text_NotEnoughValidMonsLv50:
.string "of Level 50 or less to enter.\p"
.string "They also must be holding different\n"
.string "kinds of items.\p"
.string "EGGS{STR_VAR_1} ineligible.\p"
.string "Please come see me when you are ready.$"
.string "EGGS{STR_VAR_1}.$"
BattleFrontier_BattleDomeLobby_Text_ShowYouToBattleDome:
.string "I will now show you to\n"

View File

@ -202,10 +202,14 @@ BattleFrontier_BattlePalaceLobby_EventScript_NotEnoughValidMons::
BattleFrontier_BattlePalaceLobby_EventScript_NotEnoughValidMonsLv50::
msgbox BattleFrontier_BattlePalaceLobby_Text_NotEnoughValidMonsLv50, MSGBOX_DEFAULT
call BattleFrontier_ShowCaughtBannedSpecies
msgbox BattleFrontier_BattlePalaceLobby_Text_NotEnoughValidMonsEnd, MSGBOX_DEFAULT
goto BattleFrontier_BattlePalaceLobby_EventScript_EndCancelChallenge
BattleFrontier_BattlePalaceLobby_EventScript_NotEnoughValidMonsLvOpen::
msgbox BattleFrontier_BattlePalaceLobby_Text_NotEnoughValidMonsLvOpen, MSGBOX_DEFAULT
call BattleFrontier_ShowCaughtBannedSpecies
msgbox BattleFrontier_BattlePalaceLobby_Text_NotEnoughValidMonsEnd, MSGBOX_DEFAULT
goto BattleFrontier_BattlePalaceLobby_EventScript_EndCancelChallenge
BattleFrontier_BattlePalaceLobby_EventScript_CancelChallengeSaveFailed::
@ -427,7 +431,9 @@ BattleFrontier_BattlePalaceLobby_Text_NotEnoughValidMonsLv50:
.string "Level 50 or lower.\p"
.string "They also must not be holding\n"
.string "the same kinds of items.\p"
.string "EGGS{STR_VAR_1} ineligible.\p"
.string "EGGS{STR_VAR_1}.$"
BattleFrontier_BattlePalaceLobby_Text_NotEnoughValidMonsEnd:
.string "Come back when you have made\n"
.string "your preparations.$"
@ -439,9 +445,7 @@ BattleFrontier_BattlePalaceLobby_Text_NotEnoughValidMonsLvOpen:
.string "different kinds of POKéMON.\p"
.string "They also must not be holding\n"
.string "the same kinds of items.\p"
.string "EGGS{STR_VAR_1} ineligible.\p"
.string "Come back when you have made\n"
.string "your preparations.$"
.string "EGGS{STR_VAR_1}.$"
BattleFrontier_BattlePalaceLobby_Text_NowSelectThreeMons:
.string "Good. Now, you must select your\n"

View File

@ -172,10 +172,14 @@ BattleFrontier_BattlePikeLobby_EventScript_NotEnoughValidMons::
BattleFrontier_BattlePikeLobby_EventScript_NotEnoughValidMonsLv50::
msgbox BattleFrontier_BattlePikeLobby_Text_NotEnoughValidMonsLv50, MSGBOX_DEFAULT
call BattleFrontier_ShowCaughtBannedSpecies
msgbox BattleFrontier_BattlePikeLobby_Text_NotEnoughValidMonsEnd, MSGBOX_DEFAULT
goto BattleFrontier_BattlePikeLobby_EventScript_EndCancelChallenge
BattleFrontier_BattlePikeLobby_EventScript_NotEnoughValidMonsLvOpen::
msgbox BattleFrontier_BattlePikeLobby_Text_NotEnoughValidMonsLvOpen, MSGBOX_DEFAULT
call BattleFrontier_ShowCaughtBannedSpecies
msgbox BattleFrontier_BattlePikeLobby_Text_NotEnoughValidMonsEnd, MSGBOX_DEFAULT
goto BattleFrontier_BattlePikeLobby_EventScript_EndCancelChallenge
BattleFrontier_BattlePikeLobby_EventScript_CancelChallengeSaveFailed::
@ -315,7 +319,9 @@ BattleFrontier_BattlePikeLobby_Text_NotEnoughValidMonsLv50:
.string "of Level 50 or less to enter.\p"
.string "They also must be holding different\n"
.string "kinds of items.\p"
.string "EGGS{STR_VAR_1} ineligible.\p"
.string "EGGS{STR_VAR_1}.$"
BattleFrontier_BattlePikeLobby_Text_NotEnoughValidMonsEnd:
.string "Please come see me when\n"
.string "you are ready…$"
@ -327,9 +333,7 @@ BattleFrontier_BattlePikeLobby_Text_NotEnoughValidMonsLvOpen:
.string "POKéMON to enter.\p"
.string "They also must be holding different\n"
.string "kinds of items.\p"
.string "EGGS{STR_VAR_1} ineligible.\p"
.string "Please come see me when\n"
.string "you are ready…$"
.string "EGGS{STR_VAR_1}.$"
BattleFrontier_BattlePikeLobby_Text_PleaseChooseThreeMons:
.string "Please choose the three POKéMON\n"

View File

@ -184,10 +184,14 @@ BattleFrontier_BattlePyramidLobby_EventScript_NotEnoughValidMons::
BattleFrontier_BattlePyramidLobby_EventScript_NotEnoughValidMonsLv50::
msgbox BattleFrontier_BattlePyramidLobby_Text_NotEnoughValidMonsLv50, MSGBOX_DEFAULT
call BattleFrontier_ShowCaughtBannedSpecies
msgbox BattleFrontier_BattlePyramidLobby_Text_NotEnoughValidMonsEnd, MSGBOX_DEFAULT
goto BattleFrontier_BattlePyramidLobby_EventScript_EndCancelChallenge
BattleFrontier_BattlePyramidLobby_EventScript_NotEnoughValidMonsLvOpen::
msgbox BattleFrontier_BattlePyramidLobby_Text_NotEnoughValidMonsLvOpen, MSGBOX_DEFAULT
call BattleFrontier_ShowCaughtBannedSpecies
msgbox BattleFrontier_BattlePyramidLobby_Text_NotEnoughValidMonsEnd, MSGBOX_DEFAULT
goto BattleFrontier_BattlePyramidLobby_EventScript_EndCancelChallenge
BattleFrontier_BattlePyramidLobby_EventScript_CancelChallengeSaveFailed::
@ -573,9 +577,7 @@ BattleFrontier_BattlePyramidLobby_Text_NotEnoughValidMonsLvOpen:
.string "POKéMON qualified for the challenge.\p"
.string "Please also remember to take all\n"
.string "items from your POKéMON.\p"
.string "EGGS{STR_VAR_1} ineligible.\p"
.string "When you are ready, please have\n"
.string "a word with me.$"
.string "EGGS{STR_VAR_1}.$"
BattleFrontier_BattlePyramidLobby_Text_NotEnoughValidMonsLv50:
.string "A slight problem, adventurer!\p"
@ -585,7 +587,9 @@ BattleFrontier_BattlePyramidLobby_Text_NotEnoughValidMonsLv50:
.string "and each no higher than Level 50.\p"
.string "Please also remember to take all\n"
.string "items from your POKéMON.\p"
.string "EGGS{STR_VAR_1} ineligible.\p"
.string "EGGS{STR_VAR_1}.$"
BattleFrontier_BattlePyramidLobby_Text_NotEnoughValidMonsEnd:
.string "When you are ready, please have\n"
.string "a word with me.$"

View File

@ -543,16 +543,22 @@ BattleFrontier_BattleTowerLobby_EventScript_NotEnoughValidMonsLv50::
case FRONTIER_MODE_SINGLES, BattleFrontier_BattleTowerLobby_EventScript_NotEnoughValidMonsLv50Singles
case FRONTIER_MODE_DOUBLES, BattleFrontier_BattleTowerLobby_EventScript_NotEnoughValidMonsLv50Doubles
msgbox BattleFrontier_BattleTowerLobby_Text_NotEnoughValidMonsLv50Multis, MSGBOX_DEFAULT
call BattleFrontier_ShowCaughtBannedSpecies
msgbox BattleFrontier_BattleTowerLobby_Text_NotEnoughValidMonsEnd, MSGBOX_DEFAULT
goto BattleFrontier_BattleTowerLobby_EventScript_EndCancelChallenge
end
BattleFrontier_BattleTowerLobby_EventScript_NotEnoughValidMonsLv50Singles::
msgbox BattleFrontier_BattleTowerLobby_Text_NotEnoughValidMonsLv50Singles, MSGBOX_DEFAULT
call BattleFrontier_ShowCaughtBannedSpecies
msgbox BattleFrontier_BattleTowerLobby_Text_NotEnoughValidMonsEnd, MSGBOX_DEFAULT
goto BattleFrontier_BattleTowerLobby_EventScript_EndCancelChallenge
end
BattleFrontier_BattleTowerLobby_EventScript_NotEnoughValidMonsLv50Doubles::
msgbox BattleFrontier_BattleTowerLobby_Text_NotEnoughValidMonsLv50Doubles, MSGBOX_DEFAULT
call BattleFrontier_ShowCaughtBannedSpecies
msgbox BattleFrontier_BattleTowerLobby_Text_NotEnoughValidMonsEnd, MSGBOX_DEFAULT
goto BattleFrontier_BattleTowerLobby_EventScript_EndCancelChallenge
end
@ -561,16 +567,22 @@ BattleFrontier_BattleTowerLobby_EventScript_NotEnoughValidMonsLvOpen::
case FRONTIER_MODE_SINGLES, BattleFrontier_BattleTowerLobby_EventScript_NotEnoughValidMonsLvOpenSingles
case FRONTIER_MODE_DOUBLES, BattleFrontier_BattleTowerLobby_EventScript_NotEnoughValidMonsLvOpenDoubles
msgbox BattleFrontier_BattleTowerLobby_Text_NotEnoughValidMonsLvOpenMultis, MSGBOX_DEFAULT
call BattleFrontier_ShowCaughtBannedSpecies
msgbox BattleFrontier_BattleTowerLobby_Text_NotEnoughValidMonsEnd, MSGBOX_DEFAULT
goto BattleFrontier_BattleTowerLobby_EventScript_EndCancelChallenge
end
BattleFrontier_BattleTowerLobby_EventScript_NotEnoughValidMonsLvOpenSingles::
msgbox BattleFrontier_BattleTowerLobby_Text_NotEnoughValidMonsLvOpenSingles, MSGBOX_DEFAULT
call BattleFrontier_ShowCaughtBannedSpecies
msgbox BattleFrontier_BattleTowerLobby_Text_NotEnoughValidMonsEnd, MSGBOX_DEFAULT
goto BattleFrontier_BattleTowerLobby_EventScript_EndCancelChallenge
end
BattleFrontier_BattleTowerLobby_EventScript_NotEnoughValidMonsLvOpenDoubles::
msgbox BattleFrontier_BattleTowerLobby_Text_NotEnoughValidMonsLvOpenDoubles, MSGBOX_DEFAULT
call BattleFrontier_ShowCaughtBannedSpecies
msgbox BattleFrontier_BattleTowerLobby_Text_NotEnoughValidMonsEnd, MSGBOX_DEFAULT
goto BattleFrontier_BattleTowerLobby_EventScript_EndCancelChallenge
end
@ -1083,7 +1095,9 @@ BattleFrontier_BattleTowerLobby_Text_NotEnoughValidMonsLv50:
.string "of Level 50 or less to enter.\p"
.string "They also must be holding different\n"
.string "kinds of items.\p"
.string "EGGS{STR_VAR_1} ineligible.\p"
.string "EGGS{STR_VAR_1}.$"
BattleFrontier_BattleTowerLobby_Text_NotEnoughValidMonsEnd:
.string "Please come see me when you are ready.$"
@ Unused
@ -1094,8 +1108,7 @@ BattleFrontier_BattleTowerLobby_Text_NotEnoughValidMonsLvOpen:
.string "to enter.\p"
.string "They also must be holding different\n"
.string "kinds of items.\p"
.string "EGGS{STR_VAR_1} ineligible.\p"
.string "Please come see me when you are ready.$"
.string "EGGS{STR_VAR_1}.$"
BattleFrontier_BattleTowerLobby_Text_NotEnoughValidMonsLv50Singles:
.string "Excuse me!\p"
@ -1104,8 +1117,7 @@ BattleFrontier_BattleTowerLobby_Text_NotEnoughValidMonsLv50Singles:
.string "of Level 50 or less to enter.\p"
.string "They also must be holding different\n"
.string "kinds of items.\p"
.string "EGGS{STR_VAR_1} ineligible.\p"
.string "Please come see me when you are ready.$"
.string "EGGS{STR_VAR_1}.$"
BattleFrontier_BattleTowerLobby_Text_NotEnoughValidMonsLvOpenSingles:
.string "Excuse me!\p"
@ -1114,8 +1126,7 @@ BattleFrontier_BattleTowerLobby_Text_NotEnoughValidMonsLvOpenSingles:
.string "to enter.\p"
.string "They also must be holding different\n"
.string "kinds of items.\p"
.string "EGGS{STR_VAR_1} ineligible.\p"
.string "Please come see me when you are ready.$"
.string "EGGS{STR_VAR_1}.$"
BattleFrontier_BattleTowerLobby_Text_NotEnoughValidMonsLv50Doubles:
.string "Excuse me!\p"
@ -1124,8 +1135,7 @@ BattleFrontier_BattleTowerLobby_Text_NotEnoughValidMonsLv50Doubles:
.string "of Level 50 or less to enter.\p"
.string "They also must be holding different\n"
.string "kinds of items.\p"
.string "EGGS{STR_VAR_1} ineligible.\p"
.string "Please come see me when you are ready.$"
.string "EGGS{STR_VAR_1}.$"
BattleFrontier_BattleTowerLobby_Text_NotEnoughValidMonsLvOpenDoubles:
.string "Excuse me!\p"
@ -1134,8 +1144,7 @@ BattleFrontier_BattleTowerLobby_Text_NotEnoughValidMonsLvOpenDoubles:
.string "to enter.\p"
.string "They also must be holding different\n"
.string "kinds of items.\p"
.string "EGGS{STR_VAR_1} ineligible.\p"
.string "Please come see me when you are ready.$"
.string "EGGS{STR_VAR_1}.$"
BattleFrontier_BattleTowerLobby_Text_NotEnoughValidMonsLv50Multis:
.string "Excuse me!\p"
@ -1144,8 +1153,7 @@ BattleFrontier_BattleTowerLobby_Text_NotEnoughValidMonsLv50Multis:
.string "of Level 50 or less to enter.\p"
.string "They also must be holding different\n"
.string "kinds of items.\p"
.string "EGGS{STR_VAR_1} ineligible.\p"
.string "Please come see me when you are ready.$"
.string "EGGS{STR_VAR_1}.$"
BattleFrontier_BattleTowerLobby_Text_NotEnoughValidMonsLvOpenMultis:
.string "Excuse me!\p"
@ -1154,8 +1162,7 @@ BattleFrontier_BattleTowerLobby_Text_NotEnoughValidMonsLvOpenMultis:
.string "to enter.\p"
.string "They also must be holding different\n"
.string "kinds of items.\p"
.string "EGGS{STR_VAR_1} ineligible.\p"
.string "Please come see me when you are ready.$"
.string "EGGS{STR_VAR_1}.$"
BattleFrontier_BattleTowerLobby_Text_WelcomSingleBattle:
.string "Where the talents of TRAINERS\n"

View File

@ -22,6 +22,7 @@ FallarborTown_MoveRelearnersHouse_EventScript_AskTeachMove::
FallarborTown_MoveRelearnersHouse_EventScript_ChooseMon::
msgbox FallarborTown_MoveRelearnersHouse_Text_TutorWhichMon, MSGBOX_DEFAULT
setmoverelearnerstate MOVE_RELEARNER_LEVEL_UP_MOVES @ Specifically supposed to teach level up moves
special ChooseMonForMoveRelearner
waitstate
goto_if_eq VAR_0x8004, PARTY_NOTHING_CHOSEN, FallarborTown_MoveRelearnersHouse_EventScript_ComeBackWithHeartScale

View File

@ -620,72 +620,5 @@
],
"gMapGroup_IndoorRoute124": [
"Route124_DivingTreasureHuntersHouse"
],
"connections_include_order": [
"LittlerootTown",
"OldaleTown",
"DewfordTown",
"LavaridgeTown",
"FallarborTown",
"VerdanturfTown",
"PacifidlogTown",
"PetalburgCity",
"SlateportCity",
"MauvilleCity",
"RustboroCity",
"FortreeCity",
"LilycoveCity",
"MossdeepCity",
"SootopolisCity",
"EverGrandeCity",
"Route101",
"Route102",
"Route103",
"Route104",
"Route105",
"Route106",
"Route107",
"Route108",
"Route109",
"Route110",
"Route111",
"Route112",
"Route113",
"Route114",
"Route115",
"Route116",
"Route117",
"Route118",
"Route119",
"Route120",
"Route121",
"Route122",
"Route123",
"Route124",
"Route125",
"Route126",
"Route127",
"Route128",
"Route129",
"Route130",
"Route131",
"Route132",
"Route133",
"Route134",
"Underwater_Route105",
"Underwater_Route124",
"Underwater_Route125",
"Underwater_Route126",
"Underwater_Route127",
"Underwater_Route128",
"Underwater_Route129",
"SafariZone_Northwest",
"SafariZone_North",
"SafariZone_Southwest",
"SafariZone_South",
"SafariZone_Northeast",
"SafariZone_Southeast",
"BattleFrontier_OutsideWest",
"BattleFrontier_OutsideEast"
]
}

View File

@ -0,0 +1,89 @@
ApricornTreeScript::
lock
faceplayer
message ApricornTree_Text_Intro
waitmessage
special ObjectEventInteractionGetApricornTreeData
goto_if_gt VAR_0x8005, 0, ApricornTree_EventScript_WantToPick
message ApricornTree_Text_Empty
waitmessage
waitbuttonpress
release
end
ApricornTree_EventScript_WantToPick::
buffernumberstring STR_VAR_2, VAR_0x8005
msgbox ApricornTree_Text_WantToPick, MSGBOX_YESNO
goto_if_eq VAR_RESULT, YES, ApricornTree_EventScript_PickApricorn
goto_if_eq VAR_RESULT, NO, ApricornTree_EventScript_CancelPickingApricorn
.set APRICORN_NORMAL_BAG_FULL, 0
.set APRICORN_NORMAL_SPACE_IN_BAG, 1
ApricornTree_EventScript_PickApricorn::
special ObjectEventInteractionPickApricornTree
call EventScript_BufferPocketNameAndTryFanfare
goto_if_eq VAR_0x8006, APRICORN_NORMAL_BAG_FULL, ApricornTree_EventScript_PocketFull
message ApricornTree_Text_PickedTheApricorn
.if OW_SHOW_ITEM_DESCRIPTIONS != OW_ITEM_DESCRIPTIONS_OFF
copyvar VAR_0x8006 VAR_0x8004
.endif
delay 10
.if OW_SHOW_ITEM_DESCRIPTIONS != OW_ITEM_DESCRIPTIONS_OFF
showberrydescription
.endif
playfanfare MUS_OBTAIN_BERRY
waitmessage
waitfanfare
waitbuttonpress
message ApricornTree_Text_PutAwayApricorn
waitmessage
waitbuttonpress
.if OW_SHOW_ITEM_DESCRIPTIONS != OW_ITEM_DESCRIPTIONS_OFF
hideitemdescription
.endif
release
end
ApricornTree_EventScript_PocketFull::
message ApricornTree_Text_PocketFull
waitmessage
waitbuttonpress
release
end
ApricornTree_EventScript_CancelPickingApricorn::
message ApricornTree_Text_ApricornLeftUnpicked
waitmessage
waitbuttonpress
release
end
ApricornTree_Text_Intro:
.string "It's an Apricorn Tree!$"
ApricornTree_Text_Empty:
.string "There are no Apricorns…$"
ApricornTree_Text_WantToPick:
.string "…It's {STR_VAR_2} {STR_VAR_1}!\p"
.string "Do you want to pick the\n"
.string "{STR_VAR_1}?$"
ApricornTree_Text_PickedTheApricorn:
.string "{PLAYER} obtained\n"
.string "{STR_VAR_2} {STR_VAR_1}.$"
ApricornTree_Text_PutAwayApricorn:
.string "{PLAYER} put away the\n"
.string "{STR_VAR_1} in\l"
.string "the BAG's {STR_VAR_3} POCKET.$"
ApricornTree_Text_PocketFull:
.string "The BAG's {STR_VAR_3} POCKET is full.\p"
.string "{PLAYER} gave up on the\p"
.string "{STR_VAR_1}…$"
ApricornTree_Text_ApricornLeftUnpicked:
.string "{PLAYER} gave up on the\p"
.string "{STR_VAR_1}…$"

View File

@ -0,0 +1,13 @@
BattleFrontier_ShowCaughtBannedSpecies::
goto_if_eq VAR_0x8005, 0, BattleFrontier_ShowCaughtBannedSpeciesEnd
msgbox BattleFrontier_DoYouWantToSeeTheListOfCaughtBannedSpecies, MSGBOX_YESNO
goto_if_eq VAR_RESULT, NO, BattleFrontier_ShowCaughtBannedSpeciesEnd
callnative ShowBattleFrontierCaughtBannedSpecies
waitstate
BattleFrontier_ShowCaughtBannedSpeciesEnd:
return
BattleFrontier_DoYouWantToSeeTheListOfCaughtBannedSpecies:
.string "Do you want to see the list of\n"
.string "POKéMON species you can't bring?$"

View File

@ -87,6 +87,15 @@ Debug_FlagsNotSetBattleConfigMessage_Text:
.string "Please define a usable flag in:\l"
.string "'include/config/battle.h'!$"
Debug_VarsNotSetBattleConfigMessage::
message Debug_VarsNotSetBattleConfigMessage_Text
goto Debug_MessageEnd
Debug_VarsNotSetBattleConfigMessage_Text:
.string "Feature unavailable!\n"
.string "Please define a usable var in:\l"
.string "'include/config/battle.h'!$"
Debug_BoxFilledMessage::
message Debug_BoxFilledMessage_Text
goto Debug_MessageEnd
@ -387,7 +396,29 @@ Debug_EventScript_SetHiddenNature::
dynmultistack 0, 0, TRUE, 7, FALSE, 0, NULL
switch VAR_RESULT
case MULTI_B_PRESSED, Debug_EventScript_InflictStatus1_Close
special SetHiddenNature
special SetHiddenNature
releaseall
end
Debug_EventScript_SetAbility::
special ChoosePartyMon
waitstate
callnative DebugNative_GetAbilityNames
dynmultipush gStringVar1, 0
dynmultipush gStringVar2, 1
dynmultipush gStringVar3, 2
dynmultistack 0, 0, FALSE, 3 FALSE, 0, NULL
switch VAR_RESULT
case MULTI_B_PRESSED, Debug_EventScript_SetAbilityClose
special SetAbility
Debug_EventScript_SetAbilityClose:
releaseall
end
Debug_EventScript_SetFriendship::
special ChoosePartyMon
waitstate
callnative DebugNative_Party_SetFriendship
releaseall
end

View File

@ -0,0 +1,105 @@
Common_EventScript_MoveRelearner::
lockall
faceplayer
message MoveRelearner_Text_WouldLearnNewMoves
waitmessage
goto Common_EventScript_MoveRelearnerDynMultiChoice
end
Common_EventScript_MoveRelearnerDynMultiChoice::
dynmultipush MoveRelearner_Text_LevelUpMoves, 0
.if P_ENABLE_MOVE_RELEARNERS == TRUE
dynmultipush MoveRelearner_Text_EggMoves, 1
dynmultipush MoveRelearner_Text_TMMoves, 2
dynmultipush MoveRelearner_Text_TutormoveMoves, 3
.else
call_if_set P_FLAG_EGG_MOVES, MoveRelearner_EventScript_PushEggMoves
istmrelearneractive MoveRelearner_EventScript_PushTMMoves
call_if_set P_FLAG_TUTOR_MOVES, MoveRelearner_EventScript_PushTutorMoves
.endif @ P_ENABLE_MOVE_RELEARNERS
dynmultipush MoveRelearner_Text_SeeYa, 4
dynmultistack 0, 0, FALSE, 5, 0, 0, DYN_MULTICHOICE_CB_NONE
closemessage
switch VAR_RESULT
case 0, MoveRelearner_EventScript_TeachLevelUpMoves
case 1, MoveRelearner_EventScript_TeachEggMoves
case 2, MoveRelearner_EventScript_TeachTMMoves
case 3, MoveRelearner_EventScript_TeachTutorMoves
case 4, MoveRelearner_EventScript_PleaseComeAgain
MoveRelearner_EventScript_PleaseComeAgain:
msgbox MoveRelearner_Text_ThankYouComeAgain, MSGBOX_DEFAULT
releaseall
end
MoveRelearner_EventScript_PushEggMoves:
dynmultipush MoveRelearner_Text_EggMoves, 1
return
MoveRelearner_EventScript_PushTMMoves:
dynmultipush MoveRelearner_Text_TMMoves, 2
return
MoveRelearner_EventScript_PushTutorMoves:
dynmultipush MoveRelearner_Text_TutormoveMoves, 3
return
MoveRelearner_EventScript_TeachLevelUpMoves:
setmoverelearnerstate MOVE_RELEARNER_LEVEL_UP_MOVES
bufferstring STR_VAR_3, MoveRelearner_Text_LevelUpMoveLWR
goto MoveRelearner_EventScript_TeachMove
end
MoveRelearner_EventScript_TeachEggMoves:
setmoverelearnerstate MOVE_RELEARNER_EGG_MOVES
bufferstring STR_VAR_3, MoveRelearner_Text_EggMoveLWR
goto MoveRelearner_EventScript_TeachMove
end
MoveRelearner_EventScript_TeachTMMoves:
setmoverelearnerstate MOVE_RELEARNER_TM_MOVES
bufferstring STR_VAR_3, MoveRelearner_Text_TMMoveLWR
goto MoveRelearner_EventScript_TeachMove
end
MoveRelearner_EventScript_TeachTutorMoves:
setmoverelearnerstate MOVE_RELEARNER_TUTOR_MOVES
bufferstring STR_VAR_3, MoveRelearner_Text_TutorMoveLWR
goto MoveRelearner_EventScript_TeachMove
end
MoveRelearner_EventScript_TeachMove::
getpartysize
goto_if_eq VAR_RESULT, 0, MoveRelearner_EventScript_NoPkmn
msgbox MoveRelearner_Text_ChoosePkmn, MSGBOX_DEFAULT
special ChooseMonForMoveRelearner
waitstate
call_if_eq VAR_0x8004, PARTY_NOTHING_CHOSEN, MoveRelearner_EventScript_AnythingElse
special IsSelectedMonEgg
call_if_eq VAR_RESULT, YES, MoveRelearner_EventScript_CantTeachMoveToEgg
call_if_eq VAR_0x8005, NO, MoveRelearner_EventScript_CantTeachMoveToPkmn
msgbox MoveRelearner_Text_WhichXmoveShouldTeach, MSGBOX_DEFAULT
special TeachMoveRelearnerMove
waitstate
goto MoveRelearner_EventScript_AnythingElse
end
MoveRelearner_EventScript_NoPkmn:
msgbox MoveRelearner_Text_HaveNoPkmn, MSGBOX_AUTOCLOSE
releaseall
end
MoveRelearner_EventScript_CantTeachMoveToEgg:
msgbox MoveRelearner_Text_CantTeachMoveToEgg, MSGBOX_AUTOCLOSE
goto MoveRelearner_EventScript_AnythingElse
end
MoveRelearner_EventScript_CantTeachMoveToPkmn:
msgbox MoveRelearner_Text_CantTeachMoveToPkmn, MSGBOX_AUTOCLOSE
goto MoveRelearner_EventScript_AnythingElse
end
MoveRelearner_EventScript_AnythingElse::
message MoveRelearner_Text_AnythingElse
waitmessage
goto Common_EventScript_MoveRelearnerDynMultiChoice
end

View File

@ -205,6 +205,7 @@ EventScript_FoundHiddenItem::
end
EventScript_PutHiddenItemInPocket::
callnative Script_ClearDowsingColor
delay 10
showitemdescription
waitmessage
@ -215,6 +216,7 @@ EventScript_PutHiddenItemInPocket::
hideitemdescription
special TryPutTreasureInvestigatorsOnAir
special SetHiddenItemFlag
callnative Script_UpdateDowseState
releaseall
end

View File

@ -564,3 +564,6 @@ gSpecials::
def_special EnterCode
def_special GetCodeFeedback
def_special SetHiddenNature
def_special SetAbility
def_special ObjectEventInteractionGetApricornTreeData
def_special ObjectEventInteractionPickApricornTree

View File

@ -1,38 +0,0 @@
@ With the exception of Link standby, none of the below texts are used
gTest_MissedTurn::
.string "Missed turn$"
gText_LinkStandby4::
.string "Link standby!$"
gText_WinnerIsPlayersMonCongrats::
.string "The winner is {STR_VAR_1}'s {STR_VAR_2}!\n"
.string "Congratulations!$"
gText_WinnerIsPlayersMon::
.string "The winner is {STR_VAR_1}'s {STR_VAR_2}!{PAUSE_UNTIL_PRESS}$"
gText_PrimaryJudgingNumX::
.string "Primary judging: No. {STR_VAR_1}{PAUSE_UNTIL_PRESS}$"
gText_SecondaryJudgingNumX::
.string "Secondary judging: No. {STR_VAR_1}{PAUSE_UNTIL_PRESS}$"
gText_SetEventNumX::
.string "Set event: No. {STR_VAR_1}{PAUSE_UNTIL_PRESS}$"
gText_MoveUsedMostOften::
.string "The move used most often:\n"
.string "{STR_VAR_1}{PAUSE_UNTIL_PRESS}$"
gText_MostImpressiveMon::
.string "The most impressive POKéMON:\n"
.string "{STR_VAR_1}'s {STR_VAR_2}{PAUSE_UNTIL_PRESS}$"
gText_SetEventNumX2::
.string "Set event: No. {STR_VAR_1}{PAUSE_UNTIL_PRESS}$"
gText_LinkTVProgramWillNotBeMadeTrainerLost::
.string "A link TV program will not be made\n"
.string "because the TRAINER lost.{PAUSE_UNTIL_PRESS}$"

View File

@ -1,96 +0,0 @@
gContestHallPaintingCaption::
.string "{STR_VAR_1}\n"
.string "{STR_VAR_2}'s {STR_VAR_3}$"
@ Unused
gContestPaintingContest::
.string "CONTEST$"
gContestRankNormal::
.string "NORMAL RANK$"
gContestRankSuper::
.string "SUPER RANK$"
gContestRankHyper::
.string "HYPER RANK$"
gContestRankMaster::
.string "MASTER RANK$"
gContestLink::
.string "LINK$"
gContestCoolness::
.string "COOLNESS$"
gContestBeauty::
.string "BEAUTY$"
gContestCuteness::
.string "CUTENESS$"
gContestSmartness::
.string "SMARTNESS$"
gContestToughness::
.string "TOUGHNESS$"
gContestPaintingCool1::
.string "Nonstop supercool--\n"
.string "the inestimable {STR_VAR_1}$"
gContestPaintingCool2::
.string "Hey, there!\n"
.string "The good-looking POKéMON {STR_VAR_1}$"
gContestPaintingCool3::
.string "The marvelous, wonderful, and\n"
.string "very great {STR_VAR_1}$"
gContestPaintingBeauty1::
.string "This century's last Venus--\n"
.string "the beautiful {STR_VAR_1}$"
gContestPaintingBeauty2::
.string "{STR_VAR_1}'s dazzling,\n"
.string "glittering smile$"
gContestPaintingBeauty3::
.string "POKéMON CENTER's super idol--\n"
.string "the incomparable {STR_VAR_1}$"
gContestPaintingCute1::
.string "The lovely and sweet {STR_VAR_1}$"
gContestPaintingCute2::
.string "The pretty {STR_VAR_1}'s\n"
.string "winning portrait$"
gContestPaintingCute3::
.string "Give us a wink!\n"
.string "The cutie POKéMON {STR_VAR_1}$"
gContestPaintingSmart1::
.string "The smartness maestro--\n"
.string "the wise POKéMON {STR_VAR_1}$"
gContestPaintingSmart2::
.string "{STR_VAR_1}--the one chosen\n"
.string "above all POKéMON$"
gContestPaintingSmart3::
.string "The excellent {STR_VAR_1}'s\n"
.string "moment of elegance$"
gContestPaintingTough1::
.string "The powerfully muscular\n"
.string "speedster {STR_VAR_1}$"
gContestPaintingTough2::
.string "The strong, stronger, and\n"
.string "strongest {STR_VAR_1}$"
gContestPaintingTough3::
.string "The mighty tough\n"
.string "hyper POKéMON {STR_VAR_1}$"

View File

@ -1,314 +0,0 @@
gText_AppealNumWhichMoveWillBePlayed::
.string "Appeal no. {STR_VAR_1}!\n"
.string "Which move will be played?$"
gText_AppealNumButItCantParticipate::
.string "Appeal no. {STR_VAR_1}!\n"
.string "But it can't participate!$"
gText_MonAppealedWithMove::
.string "{STR_VAR_1} appealed with\n"
.string "{STR_VAR_2}!$"
gText_MonWasWatchingOthers::
.string "{STR_VAR_1} was watching\n"
.string "the others.{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}$"
gText_AllOutOfAppealTime::
.string "We're all out of\n"
.string "Appeal Time!{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}$"
@ Appeal result texts
gText_BecameMoreConsciousOfOtherMons::
.string "It became more conscious\n"
.string "of the other POKéMON.{PAUSE 15}{PAUSE 15}{PAUSE 15}{PAUSE 15}$"
gText_MonCantMakeAnAppealAfterThis::
.string "{STR_VAR_1} can't make an\n"
.string "appeal after this.{PAUSE 15}{PAUSE 15}{PAUSE 15}{PAUSE 15}$"
gText_SettledDownJustLittleBit::
.string "It settled down just a\n"
.string "little bit.{PAUSE 15}{PAUSE 15}{PAUSE 15}{PAUSE 15}$"
gText_BecameObliviousToOtherMons::
.string "It became oblivious to\n"
.string "the other POKéMON.{PAUSE 15}{PAUSE 15}{PAUSE 15}{PAUSE 15}$"
gText_BecameLessAwareOfOtherMons::
.string "It became less aware of\n"
.string "the other POKéMON.{PAUSE 15}{PAUSE 15}{PAUSE 15}{PAUSE 15}$"
gText_StoppedCaringAboutOtherMons::
.string "It stopped caring about\n"
.string "other POKéMON much.{PAUSE 15}{PAUSE 15}{PAUSE 15}{PAUSE 15}$"
gText_TriedToStartleOtherMons::
.string "It tried to startle the\n"
.string "other POKéMON.{PAUSE 15}{PAUSE 15}{PAUSE 15}{PAUSE 15}$"
gText_TriedToDazzleOthers::
.string "It tried to dazzle the\n"
.string "others.{PAUSE 15}{PAUSE 15}{PAUSE 15}{PAUSE 15}$"
gText_JudgeLookedAwayFromMon::
.string "The JUDGE looked away\n"
.string "from {STR_VAR_1}.{PAUSE 15}{PAUSE 15}{PAUSE 15}{PAUSE 15}$"
gText_TriedToUnnerveNextMon::
.string "It tried to unnerve the\n"
.string "next POKéMON.{PAUSE 15}{PAUSE 15}{PAUSE 15}{PAUSE 15}$"
gText_MonBecameNervous::
.string "{STR_VAR_1} became\n"
.string "nervous.{PAUSE 15}{PAUSE 15}{PAUSE 15}{PAUSE 15}$"
gText_AppealTriedToUnnerveWaitingMons::
.string "The appeal tried to\n"
.string "unnerve waiting POKéMON.{PAUSE 15}{PAUSE 15}{PAUSE 15}{PAUSE 15}$"
gText_TauntedMonsDoingWell::
.string "It taunted POKéMON\n"
.string "doing well.{PAUSE 15}{PAUSE 15}{PAUSE 15}{PAUSE 15}$"
gText_MonRegainedItsForm::
.string "{STR_VAR_1} regained its\n"
.string "form.{PAUSE 15}{PAUSE 15}{PAUSE 15}{PAUSE 15}$"
gText_TriedToJamMonDoingWell::
.string "It tried to jam POKéMON\n"
.string "doing well.{PAUSE 15}{PAUSE 15}{PAUSE 15}{PAUSE 15}$"
gText_StandoutMonHustledEvenMore::
.string "The standout {STR_VAR_1}\n"
.string "hustled even more.{PAUSE 15}{PAUSE 15}{PAUSE 15}{PAUSE 15}$"
gText_LargelyUnnoticedMonWorkedHard::
.string "The largely unnoticed\n"
.string "{STR_VAR_1} worked hard.{PAUSE 15}{PAUSE 15}{PAUSE 15}{PAUSE 15}$"
gText_WorkedAsMuchAsMonBefore::
.string "It worked as much as\n"
.string "POKéMON before it.{PAUSE 15}{PAUSE 15}{PAUSE 15}{PAUSE 15}$"
gText_MonsAppealDidNotGoWell::
.string "{STR_VAR_1}'s appeal did\n"
.string "not go well.{PAUSE 15}{PAUSE 15}{PAUSE 15}{PAUSE 15}$"
gText_WorkedAsMuchAsPrecedingMon::
.string "It worked as much as the\n"
.string "preceding POKéMON.{PAUSE 15}{PAUSE 15}{PAUSE 15}{PAUSE 15}$"
gText_MonsAppealDidNotGoWell2::
.string "{STR_VAR_1}'s appeal did\n"
.string "not go well.{PAUSE 15}{PAUSE 15}{PAUSE 15}{PAUSE 15}$"
gText_MonsAppealDidNotGoWell3::
.string "{STR_VAR_1}'s appeal did\n"
.string "not go well.{PAUSE 15}{PAUSE 15}{PAUSE 15}{PAUSE 15}$"
gText_MonsAppealWentSlightlyWell::
.string "{STR_VAR_1}'s appeal\n"
.string "went slightly well.{PAUSE 15}{PAUSE 15}{PAUSE 15}{PAUSE 15}$"
gText_MonsAppealWentPrettyWell::
.string "{STR_VAR_1}'s appeal\n"
.string "went pretty well.{PAUSE 15}{PAUSE 15}{PAUSE 15}{PAUSE 15}$"
gText_MonsAppealWentExcellently::
.string "{STR_VAR_1}'s appeal\n"
.string "went excellently.{PAUSE 15}{PAUSE 15}{PAUSE 15}{PAUSE 15}$"
gText_MonsAppealWasDud::
.string "{STR_VAR_1}'s appeal was\n"
.string "a dud.{PAUSE 15}{PAUSE 15}{PAUSE 15}{PAUSE 15}$"
gText_MonsAppealDidNotWorkVeryWell::
.string "{STR_VAR_1}'s appeal did\n"
.string "not work very well.{PAUSE 15}{PAUSE 15}{PAUSE 15}{PAUSE 15}$"
gText_MonsAppealWentSlightlyWell2::
.string "{STR_VAR_1}'s appeal\n"
.string "went slightly well.{PAUSE 15}{PAUSE 15}{PAUSE 15}{PAUSE 15}$"
gText_MonsAppealWentPrettyWell2::
.string "{STR_VAR_1}'s appeal\n"
.string "went pretty well.{PAUSE 15}{PAUSE 15}{PAUSE 15}{PAUSE 15}$"
gText_MonsAppealWentVeryWell::
.string "{STR_VAR_1}'s appeal\n"
.string "went very well.{PAUSE 15}{PAUSE 15}{PAUSE 15}{PAUSE 15}$"
gText_MonsAppealWentExcellently2::
.string "{STR_VAR_1}'s appeal\n"
.string "went excellently.{PAUSE 15}{PAUSE 15}{PAUSE 15}{PAUSE 15}$"
gText_SameTypeAsOneBeforeGood::
.string "It's the same type as the\n"
.string "POKéMON before--good!{PAUSE 15}{PAUSE 15}{PAUSE 15}{PAUSE 15}$"
gText_NotSameTypeAsOneBeforeGood::
.string "It's not the same type as\n"
.string "the one before--good!{PAUSE 15}{PAUSE 15}{PAUSE 15}{PAUSE 15}$"
gText_StoodOutMuchMoreThanMonBefore::
.string "It stood out much more\n"
.string "than the POKéMON before.{PAUSE 15}{PAUSE 15}{PAUSE 15}{PAUSE 15}$"
gText_DidntDoAsWellAsMonBefore::
.string "It didn't do as well as the\n"
.string "POKéMON before.{PAUSE 15}{PAUSE 15}{PAUSE 15}{PAUSE 15}$"
gText_MonsConditionRoseAboveUsual::
.string "{STR_VAR_1}'s condition\n"
.string "rose above usual.{PAUSE 15}{PAUSE 15}{PAUSE 15}{PAUSE 15}$"
gText_MonsHotStatusMadeGreatAppeal::
.string "{STR_VAR_1}'s hot status\n"
.string "made it a great appeal!{PAUSE 15}{PAUSE 15}{PAUSE 15}{PAUSE 15}$"
gText_MovedUpInLineForNextAppeal::
.string "It moved up in line for\n"
.string "the next appeal.{PAUSE 15}{PAUSE 15}{PAUSE 15}{PAUSE 15}$"
gText_MovedBackInLineForNextAppeal::
.string "It moved back in line once\n"
.string "for the next appeal.{PAUSE 15}{PAUSE 15}{PAUSE 15}{PAUSE 15}$"
gText_ScrambledUpOrderForNextTurn::
.string "It scrambled up the\n"
.string "order for the next turn.{PAUSE 15}{PAUSE 15}{PAUSE 15}{PAUSE 15}$"
gText_JudgeLookedAtMonExpectantly::
.string "The JUDGE looked at\n"
.string "{STR_VAR_1} expectantly.{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}$"
gText_AppealComboWentOverWell::
.string "The appeal combo went\n"
.string "over well.{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}$"
gText_AppealComboWentOverVeryWell::
.string "The appeal combo went\n"
.string "over very well.{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}$"
gText_AppealComboWentOverExcellently::
.string "The appeal combo went\n"
.string "over excellently.{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}$"
gText_MonManagedToAvertGaze::
.string "{STR_VAR_1} managed to\n"
.string "avert its gaze.{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}$"
gText_MonManagedToAvoidSeeingIt::
.string "{STR_VAR_1} managed to\n"
.string "avoid seeing it.{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}$"
gText_MonIsntFazedByThatSortOfThing::
.string "{STR_VAR_1} isn't fazed\n"
.string "by that sort of thing.{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}$"
gText_MonBecameALittleDistracted::
.string "{STR_VAR_1} became a\n"
.string "little distracted.{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}$"
gText_TriedToStartleOtherPokemon::
.string "It tried to startle the\n"
.string "other POKéMON.{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}$"
gText_MonLookedDownOutOfDistraction::
.string "{STR_VAR_1} looked down\n"
.string "out of distraction.{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}$"
gText_MonTurnedBackOutOfDistraction::
.string "{STR_VAR_1} turned back\n"
.string "out of distraction.{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}$"
gText_MonCouldntHelpUtteringCry::
.string "{STR_VAR_1} couldn't help\n"
.string "uttering a cry.{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}$"
gText_MonCouldntHelpLeapingUp::
.string "{STR_VAR_1} couldn't help\n"
.string "leaping up.{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}$"
gText_MonTrippedOutOfDistraction::
.string "{STR_VAR_1} tripped over\n"
.string "out of distraction.{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}$"
gText_MonWasTooNervousToMove::
.string "{STR_VAR_1} was too\n"
.string "nervous to move.{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}$"
gText_ButItMessedUp2::
.string "But it messed up.{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}$"
gText_ButItFailedToMakeTargetNervous::
.string "But it failed to make\n"
.string "the target nervous.{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}$"
gText_ButItFailedToMakeAnyoneNervous::
.string "But it failed to make\n"
.string "anyone nervous.{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}$"
gText_ButItWasIgnored::
.string "But it was ignored…{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}$"
gText_CouldntImproveItsCondition::
.string "But it couldn't improve\n"
.string "its condition…{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}$"
gText_BadConditionResultedInWeakAppeal::
.string "Its bad condition\n"
.string "resulted in a weak appeal.{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}$"
gText_MonWasUnaffected::
.string "{STR_VAR_1} was\n"
.string "unaffected.{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}$"
gText_RepeatedAppeal::
.string "{STR_VAR_1} disappointed\n"
.string "by repeating an appeal.{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}$"
gText_MonsXWentOverGreat::
.string "{STR_VAR_1}'s {STR_VAR_3}\n"
.string "went over great.{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}$"
gText_MonsXDidntGoOverWell::
.string "{STR_VAR_1}'s {STR_VAR_3}\n"
.string "didn't go over well here…{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}$"
gText_MonsXGotTheCrowdGoing::
.string "{STR_VAR_1}'s {STR_VAR_3}\n"
.string "got the crowd going.{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}$"
gText_MonCantAppealNextTurn::
.string "{STR_VAR_1} can't appeal\n"
.string "next turn…{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}$"
gText_AttractedCrowdsAttention::
.string "It attracted the crowd's\n"
.string "attention.{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}$"
gText_CrowdContinuesToWatchMon::
.string "The crowd continues to\n"
.string "watch {STR_VAR_3}.{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}$"
gText_MonsMoveIsIgnored::
.string "{STR_VAR_1}'s\n"
.string "{STR_VAR_2} is ignored.{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}{PAUSE 0x0F}$"
gText_Contest_Shyness::
.string "shyness$"
gText_Contest_Anxiety::
.string "anxiety$"
gText_Contest_Laziness::
.string "laziness$"
gText_Contest_Hesitancy::
.string "hesitancy$"
gText_Contest_Fear::
.string "fear$"

View File

@ -0,0 +1,55 @@
MoveRelearner_Text_WouldLearnNewMoves:
.string "Hi, I'm the Move Relearner.\n"
.string "Would you like to learn new moves?$"
MoveRelearner_Text_LevelUpMoves:
.string "Level Up Moves$"
MoveRelearner_Text_EggMoves:
.string "Egg Moves$"
MoveRelearner_Text_TMMoves:
.string "TM Moves$"
MoveRelearner_Text_TutormoveMoves:
.string "Tutor Moves$"
MoveRelearner_Text_SeeYa:
.string "See ya!$"
MoveRelearner_Text_AnythingElse:
.string "Is there anything else I may do for you?$"
MoveRelearner_Text_ChoosePkmn:
.string "Please choose your Pokémon.$"
MoveRelearner_Text_HaveNoPkmn:
.string "You have no Pokémon.$"
MoveRelearner_Text_CantTeachMoveToEgg:
.string "Sorry…\n"
.string "But an Egg can't learn moves.$"
MoveRelearner_Text_CantTeachMoveToPkmn:
.string "Sorry…\p"
.string "It doesn't appear as if I have any move\n"
.string "I can teach that Pokémon.$"
MoveRelearner_Text_LevelUpMoveLWR::
.string "level up move$"
MoveRelearner_Text_EggMoveLWR::
.string "egg move$"
MoveRelearner_Text_TMMoveLWR::
.string "TM move$"
MoveRelearner_Text_TutorMoveLWR::
.string "tutor move$"
MoveRelearner_Text_WhichXmoveShouldTeach:
.string "Which {STR_VAR_3} should I teach?$"
MoveRelearner_Text_ThankYouComeAgain:
.string "Thank you for using our services.\n"
.string "Please come again!$"

View File

@ -39,7 +39,10 @@
- [How to use Trainer Party Pools](tutorials/how_to_trainer_party_pool.md)
- [Vs. Seeker](tutorials/vs_seeker.md)
- [Changelog](./CHANGELOG.md)
- [1.14.x]()
- [Version 1.14.0](changelogs/1.14.x/1.14.0.md)
- [1.13.x]()
- [Version 1.13.4](changelogs/1.13.x/1.13.4.md)
- [Version 1.13.3](changelogs/1.13.x/1.13.3.md)
- [Version 1.13.2](changelogs/1.13.x/1.13.2.md)
- [Version 1.13.1](changelogs/1.13.x/1.13.1.md)

View File

@ -0,0 +1,213 @@
```md
## How to update
- If you haven't set up a remote, run the command `git remote add RHH https://github.com/rh-hideout/pokeemerald-expansion`.
- Once you have your remote set up, run the command `git pull RHH expansion/1.13.4
`.
```
## 🧬 General 🧬
### Changed
* 1.13.3 release by @hedara90 in [#8109](https://github.com/rh-hideout/pokeemerald-expansion/pull/8109)
* Adds an auto-generated include file of script commands by @FosterProgramming in [#8156](https://github.com/rh-hideout/pokeemerald-expansion/pull/8156)
* Adjust label workflow to only run if PR is approved by @hedara90 in [#8183](https://github.com/rh-hideout/pokeemerald-expansion/pull/8183)
* Add include/constants/script_commands.h to gitignore by @AlexOn1ine in [#8169](https://github.com/rh-hideout/pokeemerald-expansion/pull/8169)
* add fdeblasio as a contributor for code by @allcontributors[bot] in [#8200](https://github.com/rh-hideout/pokeemerald-expansion/pull/8200)
* Adjust Canceler naming to contain only one l by @AlexOn1ine in [#8258](https://github.com/rh-hideout/pokeemerald-expansion/pull/8258)
* Pret merge (16th of November, 2025) by @AlexOn1ine in [#8262](https://github.com/rh-hideout/pokeemerald-expansion/pull/8262)
* *.party: text with lfs by @mrgriffin in [#8320](https://github.com/rh-hideout/pokeemerald-expansion/pull/8320)
* Fedora install instructions by @estellarc in [#8355](https://github.com/rh-hideout/pokeemerald-expansion/pull/8355)
* Indent unintented if statement by @hedara90 in [#8367](https://github.com/rh-hideout/pokeemerald-expansion/pull/8367)
### Fixed
* Update mdbook to v0.5.0-beta.1 by @rayrobdod in [#8133](https://github.com/rh-hideout/pokeemerald-expansion/pull/8133)
* Fix wild_encounters script not closing arrays properly by @FosterProgramming in [#8123](https://github.com/rh-hideout/pokeemerald-expansion/pull/8123)
* Fix missing FREE_MATCH_CALL by @FosterProgramming in [#8171](https://github.com/rh-hideout/pokeemerald-expansion/pull/8171)
* Fix scroll prompt sometimes being off-screen with automatic line breaks by @hedara90 in [#8182](https://github.com/rh-hideout/pokeemerald-expansion/pull/8182)
* Fix gcc11 again by @AsparagusEduardo in [#8188](https://github.com/rh-hideout/pokeemerald-expansion/pull/8188)
* Fixed decompression error reporter OOB window creation by @hedara90 in [#8199](https://github.com/rh-hideout/pokeemerald-expansion/pull/8199)
* Fix error when compiling with P_FUSION_FORMS disabled by @cawtds in [#8298](https://github.com/rh-hideout/pokeemerald-expansion/pull/8298)
* Fix compile on gcc11 by @AlexOn1ine in [#8300](https://github.com/rh-hideout/pokeemerald-expansion/pull/8300)
* Fix debug battle flag never being cleared by @FosterProgramming in [#8357](https://github.com/rh-hideout/pokeemerald-expansion/pull/8357)
## 🗺️ Overworld 🗺️
### Changed
* Add additional comment explaing map name popup transparency side-effects by @FosterProgramming in [#8117](https://github.com/rh-hideout/pokeemerald-expansion/pull/8117)
### Fixed
* Fix berry blender not computing flavor correctly by @FosterProgramming in [#8113](https://github.com/rh-hideout/pokeemerald-expansion/pull/8113)
* Allow vs seekers to work with script not starting with trainerbattle by @FosterProgramming in [#8062](https://github.com/rh-hideout/pokeemerald-expansion/pull/8062)
- VS seeker now work with trainers who don't start with trainer_battle. You can use `vsseeker_rematchid TRAINER_ID` to indicate that this NPC is a battling trainer and the game will fetch the appropriate rematch if necessary. ` vsseeker_rematchid` work like a `cant_see_if_trainerflag_set` with additional functionality to handle vs seeker.
All NPCs who don't start with either `vsseeker_rematchid` or `trainerbattle` will show as "X"/unmatchable by the vs seeker, so non-rematchable trainer who do not start with `trainerbattle may "lie" and not show an excalmation mark showing they haven't been fought yet. This can be fixed by including a `vsseeker_rematchid` for them too.
* Fix grade in summary screen not accounting for 26 IV by @FosterProgramming in [#8157](https://github.com/rh-hideout/pokeemerald-expansion/pull/8157)
* Fix match call regression by @FosterProgramming in [#8227](https://github.com/rh-hideout/pokeemerald-expansion/pull/8227)
* Fix mew sprite not appearing correctly by @FosterProgramming in [#8235](https://github.com/rh-hideout/pokeemerald-expansion/pull/8235)
* Fix wrong palette for types sprites in hgss dex after catching mon by @FosterProgramming in [#8153](https://github.com/rh-hideout/pokeemerald-expansion/pull/8153)
* Fix mirage tower ceiling crumble color by @FosterProgramming in [#8081](https://github.com/rh-hideout/pokeemerald-expansion/pull/8081)
* Fix light flickering when different types of light sprite are present by @FosterProgramming in [#8043](https://github.com/rh-hideout/pokeemerald-expansion/pull/8043)
- Light intensity of neon signs was reduced to avoid conflicts with other light sources
- Fix flickering when both neon signs and light ball are present on screen
* Bug Fix: NPC Followers not working on slow sideways stairs by @Bivurnum in [#8257](https://github.com/rh-hideout/pokeemerald-expansion/pull/8257)
* Fix not enough memory being allocated when moves load background in contests by @FosterProgramming in [#8284](https://github.com/rh-hideout/pokeemerald-expansion/pull/8284)
* Make MON_DATA_NICKNAME10 return a 10 character string by @FosterProgramming in [#8291](https://github.com/rh-hideout/pokeemerald-expansion/pull/8291)
- Fix bug where interviews would print bad data in their string
* Fix game freeze when trainers try to walk on sideway stairs by @FosterProgramming in [#8316](https://github.com/rh-hideout/pokeemerald-expansion/pull/8316)
* Fix tossing items applying to the wrong stack by @FosterProgramming in [#8282](https://github.com/rh-hideout/pokeemerald-expansion/pull/8282)
* Prevent moves to be changed when choosing half party by @FosterProgramming in [#8336](https://github.com/rh-hideout/pokeemerald-expansion/pull/8336)
## 🐉 Pokémon 🐉
### Changed
* Fix Kyurem typo in swap move tables by @Bassoonian in [#8139](https://github.com/rh-hideout/pokeemerald-expansion/pull/8139)
* Fix typo in Voltorb-Hisui pokedex entry by @PhallenTree in [#8143](https://github.com/rh-hideout/pokeemerald-expansion/pull/8143)
* Fix some followers sprites by @estellarc in [#8208](https://github.com/rh-hideout/pokeemerald-expansion/pull/8208)
## ⚔️ Battle General ⚔️
### Changed
* Clean up redundant todo by @AlexOn1ine in [#8094](https://github.com/rh-hideout/pokeemerald-expansion/pull/8094)
* Powder Move blocking cleanup by @PhallenTree in [#8194](https://github.com/rh-hideout/pokeemerald-expansion/pull/8194)
* Restored encourageEncore flag to non-volatile status effects by @AsparagusEduardo in [#8387](https://github.com/rh-hideout/pokeemerald-expansion/pull/8387)
### Fixed
* Allow to send active mon to PC when capturing a Pokemon by @FosterProgramming in [#8111](https://github.com/rh-hideout/pokeemerald-expansion/pull/8111)
* Fix transform not loading the correct sprites when facing shiny or unown by @FosterProgramming in [#8146](https://github.com/rh-hideout/pokeemerald-expansion/pull/8146)
* Fixes Receiver not immediately activating copied abilities by @PhallenTree in [#8162](https://github.com/rh-hideout/pokeemerald-expansion/pull/8162)
* Fix destiny knot behavior and add tests by @FosterProgramming in [#8174](https://github.com/rh-hideout/pokeemerald-expansion/pull/8174)
* Fix recharge moves + add recharge move tests by @FosterProgramming in [#8181](https://github.com/rh-hideout/pokeemerald-expansion/pull/8181)
* Fixes Magician for spread moves by @AlexOn1ine in [#8170](https://github.com/rh-hideout/pokeemerald-expansion/pull/8170)
* Fix tera tint not applying on activation by @FosterProgramming in [#8135](https://github.com/rh-hideout/pokeemerald-expansion/pull/8135)
* Fixes wrongly assigned count for Semi Invulnerable state by @AlexOn1ine in [#8175](https://github.com/rh-hideout/pokeemerald-expansion/pull/8175)
* Fixes Drain Punch / Parental Bond / Scale Shot interaction by @AlexOn1ine in [#8198](https://github.com/rh-hideout/pokeemerald-expansion/pull/8198)
* Fix wrong ditto sprite on capture by @FosterProgramming in [#8226](https://github.com/rh-hideout/pokeemerald-expansion/pull/8226)
* Fixed an issue related to same turn Encore targeting by @LinathanZel in [#8230](https://github.com/rh-hideout/pokeemerald-expansion/pull/8230)
* Fixes Shell Trap not activating on contact but no damage by @AlexOn1ine in [#8243](https://github.com/rh-hideout/pokeemerald-expansion/pull/8243)
* Fix Magic Coat reflecting hazard moves incorrectly when used by a partner by @moostoet in [#8272](https://github.com/rh-hideout/pokeemerald-expansion/pull/8272)
- Magic Coat now properly reflects hazard moves from either slot in double battles.
* Shell Trap tests and Fix for Encore interaction by @AlexOn1ine in [#8268](https://github.com/rh-hideout/pokeemerald-expansion/pull/8268)
* Fix max mushroom unable to be selected when one stat is maxed by @FosterProgramming in [#8287](https://github.com/rh-hideout/pokeemerald-expansion/pull/8287)
* Block selecting x items when contrary pokemon are at minimum stages by @FosterProgramming in [#8288](https://github.com/rh-hideout/pokeemerald-expansion/pull/8288)
* Fix Fur Coat affecting confusion self-damage by @moostoet in [#8267](https://github.com/rh-hideout/pokeemerald-expansion/pull/8267)
- Fix confusion self-damage ignoring defense/attack abilities such as Fur Coat.
* Fixes End Turn Speed Order by @AlexOn1ine in [#8289](https://github.com/rh-hideout/pokeemerald-expansion/pull/8289)
* Make switchout abilities trigger after a pokemon has returned to its ball by @FosterProgramming in [#8304](https://github.com/rh-hideout/pokeemerald-expansion/pull/8304)
* Fix Shed Shell allowing fleeing/teleporting and Smoke Ball failing to guarantee escape by @moostoet in [#8286](https://github.com/rh-hideout/pokeemerald-expansion/pull/8286)
* Fix bug where defiant/competitive would pass their stat change to the next target by @FosterProgramming in [#8312](https://github.com/rh-hideout/pokeemerald-expansion/pull/8312)
* Fix max move message against semi invulnerable target by @FosterProgramming in [#8313](https://github.com/rh-hideout/pokeemerald-expansion/pull/8313)
* Fixes Neutralizing Gas displaying message when exiting with multiple users by @PhallenTree in [#8318](https://github.com/rh-hideout/pokeemerald-expansion/pull/8318)
* Fix Kings Rock not being ignored by flinch moves by @AlexOn1ine in [#8327](https://github.com/rh-hideout/pokeemerald-expansion/pull/8327)
* Fix Protosynthesis stat boosts ignoring speed drops by @moostoet in [#8277](https://github.com/rh-hideout/pokeemerald-expansion/pull/8277)
- Protosynthesis and Quark Drive now recalculate their boosted stat when Speed is lowered or Neutralizing Gas temporarily disables the ability.
* Fix switch-in abilities not triggering on revive by @FosterProgramming in [#8293](https://github.com/rh-hideout/pokeemerald-expansion/pull/8293)
* More Neutralizing Gas cleanup by @PhallenTree in [#8335](https://github.com/rh-hideout/pokeemerald-expansion/pull/8335)
* Fix cure status item effect not working properly in doubles by @FosterProgramming in [#8339](https://github.com/rh-hideout/pokeemerald-expansion/pull/8339)
* Fix infinite confusion (berserk gene) not being cured by cure_status bag items by @FosterProgramming in [#8343](https://github.com/rh-hideout/pokeemerald-expansion/pull/8343)
* Fix `B_PHYSICAL_SPECIAL_SPLIT` when set to Gen 4 by @AsparagusEduardo in [#8348](https://github.com/rh-hideout/pokeemerald-expansion/pull/8348)
* Refactor Beat Up handling for Gen 3/4 defaults, fix crit check, and expand test coverage by @moostoet in [#8307](https://github.com/rh-hideout/pokeemerald-expansion/pull/8307)
- BUGFIX: Beat Up (`GEN =< 5`) now no longer doubles its damage on every non-critical hit
- Beat Up now precomputes eligible party members/strikers for consistent multi-hit resolution and expanded tests covering both pre-Gen5 and Gen5+ rules
* Fix substitute graphic not disappearing after using a pivor move by @FosterProgramming in [#8340](https://github.com/rh-hideout/pokeemerald-expansion/pull/8340)
* Fixes Beak Blast burning after Beak Blast was already used by @PhallenTree in [#8361](https://github.com/rh-hideout/pokeemerald-expansion/pull/8361)
* Fix Roar not being recorded for LastUsedMove by @AlexOn1ine in [#8362](https://github.com/rh-hideout/pokeemerald-expansion/pull/8362)
* Fixes Neutralizing Gas / Mold Breaker / Dragon Darts interaction by @AlexOn1ine in [#8389](https://github.com/rh-hideout/pokeemerald-expansion/pull/8389)
* Fixes battle tv overwriting damage values by @AlexOn1ine in [#8378](https://github.com/rh-hideout/pokeemerald-expansion/pull/8378)
* Fix ball cycling not working properly when the same ball take multiple bag slots by @FosterProgramming in [#8163](https://github.com/rh-hideout/pokeemerald-expansion/pull/8163)
- Two new defines added to items.h `FIRST_BALL_INDEX` and `LAST_BALL_INDEX`
- We now assume the indexes of all regular ball usable in wild battle have consecutive indexes and some features (throw ball shortcut in battle) might break if not true
## 🤹 Moves 🤹
### Changed
* Fixed Uproar's description and spacing by @fdeblasio in [#8187](https://github.com/rh-hideout/pokeemerald-expansion/pull/8187)
* Clean usage of gMovesInfo by @AsparagusEduardo in [#8234](https://github.com/rh-hideout/pokeemerald-expansion/pull/8234)
- Also, fixed an OOB in `HasMoveThatChangesKOThreshold`
* Make tailwind anim mirror based on side by @FosterProgramming in [#8249](https://github.com/rh-hideout/pokeemerald-expansion/pull/8249)
* Make rainbow effect anim change based on side by @FosterProgramming in [#8269](https://github.com/rh-hideout/pokeemerald-expansion/pull/8269)
- Art assets by [SonikkuA-DatH](https://github.com/SonikkuA-DatH)
* Update Lash Out description to clarify its effect by @PhallenTree in [#8372](https://github.com/rh-hideout/pokeemerald-expansion/pull/8372)
### Fixed
* Fix some move animations leaking VRAM and freeing already freed tags by @hedara90 in [#7977](https://github.com/rh-hideout/pokeemerald-expansion/pull/7977)
## 🧶 Items 🧶
### Fixed
* Allow vs seekers to work with script not starting with trainerbattle by @FosterProgramming in [#8062](https://github.com/rh-hideout/pokeemerald-expansion/pull/8062)
- VS seeker now work with trainers who don't start with trainer_battle. You can use `vsseeker_rematchid TRAINER_ID` to indicate that this NPC is a battling trainer and the game will fetch the appropriate rematch if necessary. ` vsseeker_rematchid` work like a `cant_see_if_trainerflag_set` with additional functionality to handle vs seeker.
All NPCs who don't start with either `vsseeker_rematchid` or `trainerbattle` will show as "X"/unmatchable by the vs seeker, so non-rematchable trainer who do not start with `trainerbattle may "lie" and not show an excalmation mark showing they haven't been fought yet. This can be fixed by including a `vsseeker_rematchid` for them too.
## 🤖 Battle AI 🤖
### Fixed
* fix (AI scoring): shield dust considerations, IsMoveEffectInMinus self effect edge case, hitsToKO zero-case consideration by @ghostyboyy97 in [#8126](https://github.com/rh-hideout/pokeemerald-expansion/pull/8126)
- The AI now sees Shield Dust on the player's Pokemon correctly
- The AI now sees self-targeted positive effect boosts correctly
* fix (contrary): Contrary stat down handling in MoveEffectInPlus by @ghostyboyy97 in [#8165](https://github.com/rh-hideout/pokeemerald-expansion/pull/8165)
- When comparing positive move effects in damaging move comparison, the AI will correctly see moves like Leaf Storm as beneficial if their Pokemon has Contrary.
* Added check for parental bond killing through sturdy by @MaximeGr00 in [#8206](https://github.com/rh-hideout/pokeemerald-expansion/pull/8206)
AI now accounts for Parental Bond when checking if a move can ko the player through sturdy/focus sash.
* Fix AI_FLAG_DOUBLE_ACE_POKEMON sending duplicate Pokémon in doubles by @moostoet in [#8279](https://github.com/rh-hideout/pokeemerald-expansion/pull/8279)
- Fixed AI_FLAG_DOUBLE_ACE_POKEMON trainers resending the same Pokémon after a KO instead of their two Ace Pokémon in double battles.
* Fix switchin KO threshold logic by @Pawkkie in [#8370](https://github.com/rh-hideout/pokeemerald-expansion/pull/8370)
## 🧹 Other Cleanup 🧹
* Clean up redundant todo by @AlexOn1ine in [#8094](https://github.com/rh-hideout/pokeemerald-expansion/pull/8094)
* Fix Kyurem typo in swap move tables by @Bassoonian in [#8139](https://github.com/rh-hideout/pokeemerald-expansion/pull/8139)
* Fix typo in Voltorb-Hisui pokedex entry by @PhallenTree in [#8143](https://github.com/rh-hideout/pokeemerald-expansion/pull/8143)
* Fixed Uproar's description and spacing by @fdeblasio in [#8187](https://github.com/rh-hideout/pokeemerald-expansion/pull/8187)
* Add include/constants/script_commands.h to gitignore by @AlexOn1ine in [#8169](https://github.com/rh-hideout/pokeemerald-expansion/pull/8169)
* Powder Move blocking cleanup by @PhallenTree in [#8194](https://github.com/rh-hideout/pokeemerald-expansion/pull/8194)
* Clean usage of gMovesInfo by @AsparagusEduardo in [#8234](https://github.com/rh-hideout/pokeemerald-expansion/pull/8234)
- Also, fixed an OOB in `HasMoveThatChangesKOThreshold`
* Adjust Canceler naming to contain only one l by @AlexOn1ine in [#8258](https://github.com/rh-hideout/pokeemerald-expansion/pull/8258)
* Fix wrongly renamed logs by @AlexOn1ine in [#8264](https://github.com/rh-hideout/pokeemerald-expansion/pull/8264)
* Tests for Max Moves already exist by @AlexOn1ine in [#8314](https://github.com/rh-hideout/pokeemerald-expansion/pull/8314)
* Use MAP_OFFSET by @estellarc in [#8328](https://github.com/rh-hideout/pokeemerald-expansion/pull/8328)
* Fixed broken friendship from items in battle test and added new test for opposite case by @pkmnsnfrn in [#7872](https://github.com/rh-hideout/pokeemerald-expansion/pull/7872)
* Indent unintented if statement by @hedara90 in [#8367](https://github.com/rh-hideout/pokeemerald-expansion/pull/8367)
* Update Lash Out description to clarify its effect by @PhallenTree in [#8372](https://github.com/rh-hideout/pokeemerald-expansion/pull/8372)
* Restored encourageEncore flag to non-volatile status effects by @AsparagusEduardo in [#8387](https://github.com/rh-hideout/pokeemerald-expansion/pull/8387)
## 🧪 Test Runner 🧪
### Added
* Prevent EXPECT functions from casting negative numbers into unsigned by @FosterProgramming in [#7866](https://github.com/rh-hideout/pokeemerald-expansion/pull/7866)
### Changed
* Added Soundproof and Bulletproof tests by @AsparagusEduardo in [#8189](https://github.com/rh-hideout/pokeemerald-expansion/pull/8189)
* Wrote some missing tests by @AsparagusEduardo in [#8203](https://github.com/rh-hideout/pokeemerald-expansion/pull/8203)
* A couple more tests by @AsparagusEduardo in [#8209](https://github.com/rh-hideout/pokeemerald-expansion/pull/8209)
* Fixed some failing tests with GEN_LATEST = GEN_5 by @AsparagusEduardo in [#8241](https://github.com/rh-hideout/pokeemerald-expansion/pull/8241)
* Add test for mold breaker/ice scales interaction by @FosterProgramming in [#8240](https://github.com/rh-hideout/pokeemerald-expansion/pull/8240)
* Yet more tests by @AsparagusEduardo in [#8228](https://github.com/rh-hideout/pokeemerald-expansion/pull/8228)
- Added tests for:
- Dark Aura
- Fairy Aura
- Flare Boost
- Toxic Boost
- Added test names for Flying Press.
* Slightly increase headless test speed by modifying animations by @AsparagusEduardo in [#8299](https://github.com/rh-hideout/pokeemerald-expansion/pull/8299)
* Make `gTestRunnerHeadless` into a constant outside of tests by @hedara90 in [#8306](https://github.com/rh-hideout/pokeemerald-expansion/pull/8306)
* Tests for Max Moves already exist by @AlexOn1ine in [#8314](https://github.com/rh-hideout/pokeemerald-expansion/pull/8314)
* Finished fixing tests when setting `GEN_LATEST` to `GEN_5` by @AsparagusEduardo in [#8263](https://github.com/rh-hideout/pokeemerald-expansion/pull/8263)
* Wrote missing Fling tests by @AsparagusEduardo in [#8383](https://github.com/rh-hideout/pokeemerald-expansion/pull/8383)
### Fixed
* Fixes difficulty not being restored after tests by @grintoul1 in [#8129](https://github.com/rh-hideout/pokeemerald-expansion/pull/8129)
* Reset saveblock data between test runs by @hedara90 in [#8145](https://github.com/rh-hideout/pokeemerald-expansion/pull/8145)
* Fix ohko moves ai tests by @FosterProgramming in [#8309](https://github.com/rh-hideout/pokeemerald-expansion/pull/8309)
* Fixed broken friendship from items in battle test and added new test for opposite case by @pkmnsnfrn in [#7872](https://github.com/rh-hideout/pokeemerald-expansion/pull/7872)
* Add tests to verify aromatherapy is not affected by heal bell config by @FosterProgramming in [#8344](https://github.com/rh-hideout/pokeemerald-expansion/pull/8344)
* Pre gen 5 encored move now signals the test engine a move is happening by @FosterProgramming in [#8338](https://github.com/rh-hideout/pokeemerald-expansion/pull/8338)
* Refactor Beat Up handling for Gen 3/4 defaults, fix crit check, and expand test coverage by @moostoet in [#8307](https://github.com/rh-hideout/pokeemerald-expansion/pull/8307)
- BUGFIX: Beat Up (`GEN =< 5`) now no longer doubles its damage on every non-critical hit
- Beat Up now precomputes eligible party members/strikers for consistent multi-hit resolution and expanded tests covering both pre-Gen5 and Gen5+ rules
* Fix known failing AI trace test by @FosterProgramming in [#8337](https://github.com/rh-hideout/pokeemerald-expansion/pull/8337)
## 📚 Documentation 📚
* Lock mdbook to v0.4.35 to fix docs not building by @grintoul1 in [#8130](https://github.com/rh-hideout/pokeemerald-expansion/pull/8130)
* Add additional comment explaing map name popup transparency side-effects by @FosterProgramming in [#8117](https://github.com/rh-hideout/pokeemerald-expansion/pull/8117)
* Fix wrongly renamed logs by @AlexOn1ine in [#8264](https://github.com/rh-hideout/pokeemerald-expansion/pull/8264)
* Use MAP_OFFSET by @estellarc in [#8328](https://github.com/rh-hideout/pokeemerald-expansion/pull/8328)
* Fedora install instructions by @estellarc in [#8355](https://github.com/rh-hideout/pokeemerald-expansion/pull/8355)
**Full Changelog**: https://github.com/rh-hideout/pokeemerald-expansion/compare/expansion/1.13.3...expansion/1.13.4
<!--Last PR: 8391-->
<!--Used to keep track of the last PR merged in case new ones come in before the changelog is done.-->

View File

@ -0,0 +1,534 @@
```md
## How to update
- If you haven't set up a remote, run the command `git remote add RHH https://github.com/rh-hideout/pokeemerald-expansion`.
- Once you have your remote set up, run the command `git pull RHH expansion/1.14.0
`.
```
## 🌋 *REFACTORS* 🌋
📜 = Uses a migration script.
* Refactors Attackstring and PP deduction by @AlexOn1ine in [#7402](https://github.com/rh-hideout/pokeemerald-expansion/pull/7402)
* Attackcanceller fixes and improvements by @AlexOn1ine in [#7698](https://github.com/rh-hideout/pokeemerald-expansion/pull/7698)
* Fixes activation order for a couple abilities by @AlexOn1ine in [#7732](https://github.com/rh-hideout/pokeemerald-expansion/pull/7732)
* feat: change defines in `constants/abilities.h` to an enum by @khbsd in [#7006](https://github.com/rh-hideout/pokeemerald-expansion/pull/7006)
* Item battle effect refactor by @AlexOn1ine in [#7857](https://github.com/rh-hideout/pokeemerald-expansion/pull/7857)
* Optimize GetWhichBattlerFasterOrTies by @AlexOn1ine in [#7953](https://github.com/rh-hideout/pokeemerald-expansion/pull/7953)
* Decouple passive hp updates from move damage updates by @AlexOn1ine in [#7942](https://github.com/rh-hideout/pokeemerald-expansion/pull/7942)
* Make movelist calculations happen during compilation instead of runtime by @FosterProgramming in [#7967](https://github.com/rh-hideout/pokeemerald-expansion/pull/7967)
- tmIlliterate flag in speciesInfo changed to teachingType. The options are `DEFAULT_LEARNING`, `TM_ILLITERATE` and `ALL_TEACHABLES`. The first two options match the tmIlliterate = false and tmIlliterate = true while the third one allow a pokemon to learn all teachables similarly to Mew
- Reduce EWRAM usage of HGSS dex
- Fix pokemon.c needing to be recompiled everytime a .inc file was changed
- P_TUTOR_MOVES_ARRAY has been removed (now always true when HGSS dex is enabled)
- Mew move teaching exception and univeral moves are now coded in the JSON file `src/data/pokemon/special_movesets.json` under the name signatureTeachables and universalMoves
* Grudge, Destiny Bond and FaintBattler refactor by @AlexOn1ine in [#8072](https://github.com/rh-hideout/pokeemerald-expansion/pull/8072)
* Increase number of additional move effects by @AlexOn1ine in [#8149](https://github.com/rh-hideout/pokeemerald-expansion/pull/8149)
* 📜 update: time-based encounters system tuneup and @cawtds' header script by @khbsd in [#8158](https://github.com/rh-hideout/pokeemerald-expansion/pull/8158)
* Refactor random functions to be runner specific by @FosterProgramming in [#7816](https://github.com/rh-hideout/pokeemerald-expansion/pull/7816)
## 🧬 General 🧬
### Added
* Battle debug menu: highlight chosen action and change separator by @grintoul1 in [#7709](https://github.com/rh-hideout/pokeemerald-expansion/pull/7709)
* Implement `field_name_box` by @mudskipper13 in [#7697](https://github.com/rh-hideout/pokeemerald-expansion/pull/7697)
* Add new actions to Debug Menu by @FosterProgramming in [#7837](https://github.com/rh-hideout/pokeemerald-expansion/pull/7837)
- Adds an action to change a Pokemon ability in the party side of the Debug Menu
- Adds an action to set the friendship of a Pokemon in the party side of the Debug Menu
* Display TM/HM's move name in the debug menu by @estellarc in [#7994](https://github.com/rh-hideout/pokeemerald-expansion/pull/7994)
### Changed
* Text rendering optimizations by @mrgriffin in [#7497](https://github.com/rh-hideout/pokeemerald-expansion/pull/7497)
* Battle debug menu now checks correct parties depending on battler party by @grintoul1 in [#7652](https://github.com/rh-hideout/pokeemerald-expansion/pull/7652)
* Add make release target by @jschoeny in [#7296](https://github.com/rh-hideout/pokeemerald-expansion/pull/7296)
- Most of what's above. But most importantly, that normal `make` will have all the debug stuff enabled and so releases should be done with `make release`.
* Add pool rules for Mega Stones and Z-Crystals by @hedara90 in [#7720](https://github.com/rh-hideout/pokeemerald-expansion/pull/7720)
* `field_name_box` smol followup by @mudskipper13 in [#7762](https://github.com/rh-hideout/pokeemerald-expansion/pull/7762)
* Added COMPOUND_STRINGs to region_map_entries.h by @fdeblasio in [#7669](https://github.com/rh-hideout/pokeemerald-expansion/pull/7669)
* Improve ability/heldEffect access for IsBattlerGrounded func by @AlexOn1ine in [#7753](https://github.com/rh-hideout/pokeemerald-expansion/pull/7753)
* Removed `SAVE_TYPE_ERROR_SCREEN` config by @AsparagusEduardo in [#7836](https://github.com/rh-hideout/pokeemerald-expansion/pull/7836)
* Give the Coin Case when coins are maxed by @estellarc in [#7973](https://github.com/rh-hideout/pokeemerald-expansion/pull/7973)
* Revert HGSS dex and movelist changes by @FosterProgramming in [#8016](https://github.com/rh-hideout/pokeemerald-expansion/pull/8016)
* Converts some defines to enums and name unnamed enums by @Bassoonian in [#8019](https://github.com/rh-hideout/pokeemerald-expansion/pull/8019)
* Some more documentation and cleanup by @Bassoonian in [#8020](https://github.com/rh-hideout/pokeemerald-expansion/pull/8020)
* Even more enums and documentation by @Bassoonian in [#8029](https://github.com/rh-hideout/pokeemerald-expansion/pull/8029)
* Add type enum by @Bassoonian in [#8054](https://github.com/rh-hideout/pokeemerald-expansion/pull/8054)
* Minor clean up in menu.c by @estellarc in [#8060](https://github.com/rh-hideout/pokeemerald-expansion/pull/8060)
* Adds an auto-generated include file of script commands by @FosterProgramming in [#8156](https://github.com/rh-hideout/pokeemerald-expansion/pull/8156)
* Master to upcoming merge 20251107 by @grintoul1 in [#8167](https://github.com/rh-hideout/pokeemerald-expansion/pull/8167)
* porymap default settings by @FosterProgramming in [#8038](https://github.com/rh-hideout/pokeemerald-expansion/pull/8038)
- WARNING: A change was made for new projects map files to match poymap output. This change might break people's projects with existing versions of those files. The files affected are ` data/maps/map_groups.json`, `src/data/heal_locations.json`, `src/data/region_map/region_map_sections.json` and `src/data/wild_encounters.json`
If you have an issue with one of those files during the merging process, you should run this command
`git checkout HEAD -- <filename>`
which will reset the file to the version before you initiated the merge
* Adjust label workflow to only run if PR is approved by @hedara90 in [#8183](https://github.com/rh-hideout/pokeemerald-expansion/pull/8183)
* Add include/constants/script_commands.h to gitignore by @AlexOn1ine in [#8169](https://github.com/rh-hideout/pokeemerald-expansion/pull/8169)
* Converted landmarks to COMPOUND_STRINGs by @fdeblasio in [#8205](https://github.com/rh-hideout/pokeemerald-expansion/pull/8205)
* Added contest config and cleaned up contest category variables by @fdeblasio in [#8178](https://github.com/rh-hideout/pokeemerald-expansion/pull/8178)
* Moves name box configs into a new file by @AlexOn1ine in [#8250](https://github.com/rh-hideout/pokeemerald-expansion/pull/8250)
* Converted options text into COMPOUND_STRINGs by @fdeblasio in [#8248](https://github.com/rh-hideout/pokeemerald-expansion/pull/8248)
* Adjust Canceler naming to contain only one l by @AlexOn1ine in [#8258](https://github.com/rh-hideout/pokeemerald-expansion/pull/8258)
* Pret merge (16th of November, 2025) by @AlexOn1ine in [#8262](https://github.com/rh-hideout/pokeemerald-expansion/pull/8262)
* Fixed bKGD for last_used_ball_r_cycle.png by @montmoguri in [#8261](https://github.com/rh-hideout/pokeemerald-expansion/pull/8261)
* Small bg drawing optimization by @estellarc in [#8259](https://github.com/rh-hideout/pokeemerald-expansion/pull/8259)
* Added missing 'coolness' string by @fdeblasio in [#8274](https://github.com/rh-hideout/pokeemerald-expansion/pull/8274)
* *.party: text with lfs by @mrgriffin in [#8320](https://github.com/rh-hideout/pokeemerald-expansion/pull/8320)
* Fedora install instructions by @estellarc in [#8355](https://github.com/rh-hideout/pokeemerald-expansion/pull/8355)
* Indent unintented if statement by @hedara90 in [#8367](https://github.com/rh-hideout/pokeemerald-expansion/pull/8367)
### Fixed
* Added brackets where needed by @hedara90 in [#7781](https://github.com/rh-hideout/pokeemerald-expansion/pull/7781)
* Fix shiny stars being freed before shiny animation was played by @FosterProgramming in [#7917](https://github.com/rh-hideout/pokeemerald-expansion/pull/7917)
- Fixes shiny sparks in battle not appearing properly in rare circumstances (more common with various speedup options)
* Make movelist calculations happen during compilation instead of runtime by @FosterProgramming in [#7967](https://github.com/rh-hideout/pokeemerald-expansion/pull/7967)
- tmIlliterate flag in speciesInfo changed to teachingType. The options are `DEFAULT_LEARNING`, `TM_ILLITERATE` and `ALL_TEACHABLES`. The first two options match the tmIlliterate = false and tmIlliterate = true while the third one allow a pokemon to learn all teachables similarly to Mew
- Reduce EWRAM usage of HGSS dex
- Fix pokemon.c needing to be recompiled everytime a .inc file was changed
- P_TUTOR_MOVES_ARRAY has been removed (now always true when HGSS dex is enabled)
- Mew move teaching exception and univeral moves are now coded in the JSON file `src/data/pokemon/special_movesets.json` under the name signatureTeachables and universalMoves
* Fix unhandled config in hgss dex by @FosterProgramming in [#7999](https://github.com/rh-hideout/pokeemerald-expansion/pull/7999)
* Fixes compilation error due to #8002 by @AlexOn1ine in [#8050](https://github.com/rh-hideout/pokeemerald-expansion/pull/8050)
* Fix compile issue in gcc 11 by @AsparagusEduardo in [#8095](https://github.com/rh-hideout/pokeemerald-expansion/pull/8095)
* Update mdbook to v0.5.0-beta.1 by @rayrobdod in [#8133](https://github.com/rh-hideout/pokeemerald-expansion/pull/8133)
* Fix build failing with NOOPT=1 due to discarding static data. by @Ultimate-Bob in [#8053](https://github.com/rh-hideout/pokeemerald-expansion/pull/8053)
* Fix wild_encounters script not closing arrays properly by @FosterProgramming in [#8123](https://github.com/rh-hideout/pokeemerald-expansion/pull/8123)
* Fix missing FREE_MATCH_CALL by @FosterProgramming in [#8171](https://github.com/rh-hideout/pokeemerald-expansion/pull/8171)
* Again fixed compiling in GCC11 by @AsparagusEduardo in [#8184](https://github.com/rh-hideout/pokeemerald-expansion/pull/8184)
* Fix scroll prompt sometimes being off-screen with automatic line breaks by @hedara90 in [#8182](https://github.com/rh-hideout/pokeemerald-expansion/pull/8182)
* Fix gcc11 again by @AsparagusEduardo in [#8188](https://github.com/rh-hideout/pokeemerald-expansion/pull/8188)
* Fixed decompression error reporter OOB window creation by @hedara90 in [#8199](https://github.com/rh-hideout/pokeemerald-expansion/pull/8199)
* Fix error when compiling with P_FUSION_FORMS disabled by @cawtds in [#8298](https://github.com/rh-hideout/pokeemerald-expansion/pull/8298)
* Fix compile on gcc11 by @AlexOn1ine in [#8300](https://github.com/rh-hideout/pokeemerald-expansion/pull/8300)
* Fix debug battle flag never being cleared by @FosterProgramming in [#8357](https://github.com/rh-hideout/pokeemerald-expansion/pull/8357)
## 🗺️ Overworld 🗺️
### Added
* New Feature: ORAS Dowsing by @Bivurnum in [#7211](https://github.com/rh-hideout/pokeemerald-expansion/pull/7211)
- Added ORAS Dowsing Machine mechanics.
* feat: adds stevebeller's instant text and MandL27's faster text printing by @khbsd in [#8063](https://github.com/rh-hideout/pokeemerald-expansion/pull/8063)
* Implement GSC berry/apricorn tree functionality. by @GraionDilach in [#7777](https://github.com/rh-hideout/pokeemerald-expansion/pull/7777)
- Implement GSC berry/apricorn tree functionality.
### Changed
* Trainers trigger in local id order by @grintoul1 in [#7424](https://github.com/rh-hideout/pokeemerald-expansion/pull/7424)
* Added regional form evolution condition by @AsparagusEduardo in [#6990](https://github.com/rh-hideout/pokeemerald-expansion/pull/6990)
* Update fishing odds to match official games by @FosterProgramming in [#7574](https://github.com/rh-hideout/pokeemerald-expansion/pull/7574)
- (BREAKING!) Fishing config has been moved to a new file. If you did not use default config fishing, make sure to reapply your config settings in the new file.
- (WARNING!) If you wrote custom code that calls one the following function, you may need to include `fishing.h` to get access to them(their functionaly was not affected):
- `StartFishing`previously defined in `field_player_avatar.h`
- `CalculateChainFishingShinyRolls` previously_defined in `wild_encounter.h`
- Adds a new config option to increase fish bite chance in morning and evening to match XY
- Modifies the way fishing "proximity boost" is calculated to match XY
- Fix Sticky Hold / Suction Cups bug which were increasing odds the wrong way
* Add additional comment explaing map name popup transparency side-effects by @FosterProgramming in [#8117](https://github.com/rh-hideout/pokeemerald-expansion/pull/8117)
* update: time-based encounters system tuneup and @cawtds' header script by @khbsd in [#8158](https://github.com/rh-hideout/pokeemerald-expansion/pull/8158)
* Sets instant text speed flag to false by default by @khbsd in [#8179](https://github.com/rh-hideout/pokeemerald-expansion/pull/8179)
* Follower NPCs no longer move if the player would be forced back onto the same tile. by @Bivurnum in [#8260](https://github.com/rh-hideout/pokeemerald-expansion/pull/8260)
- Follower NPCs no longer move if the player would be forced back onto the same tile
### Fixed
* CheckForTrainersWantingBattle trainerObjects array now initialized to zero and loop now starts at zero by @grintoul1 in [#7765](https://github.com/rh-hideout/pokeemerald-expansion/pull/7765)
* Bugfix `setspeaker` Namebox not beign drawn correctly by @estellarc in [#7771](https://github.com/rh-hideout/pokeemerald-expansion/pull/7771)
* Banned species list by @FosterProgramming in [#8003](https://github.com/rh-hideout/pokeemerald-expansion/pull/8003)
- Add a window displaying caught banned species list in the Battle Frontier instead of the string detailing all the is
* Fix namebox bug when reloading the map mid-script by @FosterProgramming in [#8073](https://github.com/rh-hideout/pokeemerald-expansion/pull/8073)
* Fix copyvar instead of setvar causing issue with LTO by @FosterProgramming in [#8097](https://github.com/rh-hideout/pokeemerald-expansion/pull/8097)
* Fix berry blender not computing flavor correctly by @FosterProgramming in [#8113](https://github.com/rh-hideout/pokeemerald-expansion/pull/8113)
* Allow vs seekers to work with script not starting with trainerbattle by @FosterProgramming in [#8062](https://github.com/rh-hideout/pokeemerald-expansion/pull/8062)
- VS seeker now work with trainers who don't start with trainer_battle. You can use `vsseeker_rematchid TRAINER_ID` to indicate that this NPC is a battling trainer and the game will fetch the appropriate rematch if necessary. ` vsseeker_rematchid` work like a `cant_see_if_trainerflag_set` with additional functionality to handle vs seeker.
- All NPCs who don't start with either `vsseeker_rematchid` or `trainerbattle` will show as "X"/unmatchable by the vs seeker, so non-rematchable trainer who do not start with `trainerbattle may "lie" and not show an excalmation mark showing they haven't been fought yet. This can be fixed by including a `vsseeker_rematchid` for them too.
* Fix grade in summary screen not accounting for 26 IV by @FosterProgramming in [#8157](https://github.com/rh-hideout/pokeemerald-expansion/pull/8157)
* Fix match call regression by @FosterProgramming in [#8227](https://github.com/rh-hideout/pokeemerald-expansion/pull/8227)
* Fix mew sprite not appearing correctly by @FosterProgramming in [#8235](https://github.com/rh-hideout/pokeemerald-expansion/pull/8235)
* Fix wrong palette for types sprites in hgss dex after catching mon by @FosterProgramming in [#8153](https://github.com/rh-hideout/pokeemerald-expansion/pull/8153)
* Fix Apricorns with OW_SHOW_ITEM_DESCRIPTIONS not off by @hedara90 in [#8253](https://github.com/rh-hideout/pokeemerald-expansion/pull/8253)
* Fix mirage tower ceiling crumble color by @FosterProgramming in [#8081](https://github.com/rh-hideout/pokeemerald-expansion/pull/8081)
* Fix light flickering when different types of light sprite are present by @FosterProgramming in [#8043](https://github.com/rh-hideout/pokeemerald-expansion/pull/8043)
- Light intensity of neon signs was reduced to avoid conflicts with other light sources
- Fix flickering when both neon signs and light ball are present on screen
* Bug Fix: NPC Followers not working on slow sideways stairs by @Bivurnum in [#8257](https://github.com/rh-hideout/pokeemerald-expansion/pull/8257)
- Fixed NPC followers on slow sideways stairs
* Fix not enough memory being allocated when moves load background in contests by @FosterProgramming in [#8284](https://github.com/rh-hideout/pokeemerald-expansion/pull/8284)
* Make MON_DATA_NICKNAME10 return a 10 character string by @FosterProgramming in [#8291](https://github.com/rh-hideout/pokeemerald-expansion/pull/8291)
- Fix bug where interviews would print bad data in their string
* Fix game freeze when trainers try to walk on sideway stairs by @FosterProgramming in [#8316](https://github.com/rh-hideout/pokeemerald-expansion/pull/8316)
* Fix tossing items applying to the wrong stack by @FosterProgramming in [#8282](https://github.com/rh-hideout/pokeemerald-expansion/pull/8282)
* Prevent moves to be changed when choosing half party by @FosterProgramming in [#8336](https://github.com/rh-hideout/pokeemerald-expansion/pull/8336)
## 🐉 Pokémon 🐉
### Added
* Add Legends Z-A content by @Bassoonian in [#7935](https://github.com/rh-hideout/pokeemerald-expansion/pull/7935)
* To retain compatibility with your new items and species, make sure to move the new additions behind your own additions.
* The save block will shift if you have enabled `USE_DEXNAV_SEARCH_LEVELS` (due to the new species) or if `OW_SHOW_ITEM_DESCRIPTIONS` is set to `OW_ITEM_DESCRIPTIONS_FIRST_TIME` (due to the new items).
* Move Relearners for TMs, Tutors and Egg moves by @PCG06 in [#8040](https://github.com/rh-hideout/pokeemerald-expansion/pull/8040)
- Increased the size of `MAX_RELEARNER_MOVES` to 60 to prevent crashes when viewing Mew.
### Changed
* Nickit & Thievul visual revamp by @purrfectdoodle in [#7689](https://github.com/rh-hideout/pokeemerald-expansion/pull/7689)
* Fix Kyurem typo in swap move tables by @Bassoonian in [#8139](https://github.com/rh-hideout/pokeemerald-expansion/pull/8139)
* Fix typo in Voltorb-Hisui pokedex entry by @PhallenTree in [#8143](https://github.com/rh-hideout/pokeemerald-expansion/pull/8143)
* Fix some followers sprites by @estellarc in [#8208](https://github.com/rh-hideout/pokeemerald-expansion/pull/8208)
### Fixed
* Fix gba sprites trying load non existent female versions by @FosterProgramming in [#7996](https://github.com/rh-hideout/pokeemerald-expansion/pull/7996)
- Fixes issues with pokemon getting gender differences in later gens when using gen3 sprite config
* GetEggSpecies: Only enabled species by @mrgriffin in [#8221](https://github.com/rh-hideout/pokeemerald-expansion/pull/8221)
* Fix compiling using `make debug` by @PCG06 in [#8380](https://github.com/rh-hideout/pokeemerald-expansion/pull/8380)
## ⚔️ Battle General ⚔️
### Added
* Config for capture to appear critical if the pokemon is already caught by @FosterProgramming in [#7730](https://github.com/rh-hideout/pokeemerald-expansion/pull/7730)
### Changed
* Separates FRB and FRZ animations by @grintoul1 in [#7611](https://github.com/rh-hideout/pokeemerald-expansion/pull/7611)
* Update multiple battle messages by @AsparagusEduardo in [#7529](https://github.com/rh-hideout/pokeemerald-expansion/pull/7529)
- Removed unused messages
- Changed ability "X prevents Y" to "It doesn't affect X..."
- Eg. `"The opposing Snorlax's Immunity prevents poisoning!"`
- Removed `B_ABILITY_POP_UP`. Revert commit `b501fe7354bcd957396465c621ae7af5959ac5b0` to undo this.
* Refactors Attackstring and PP deduction by @AlexOn1ine in [#7402](https://github.com/rh-hideout/pokeemerald-expansion/pull/7402)
* Remove Uproar attack battle script by @AlexOn1ine in [#7715](https://github.com/rh-hideout/pokeemerald-expansion/pull/7715)
* Fix up end turn scripts plus small documentation by @AlexOn1ine in [#7758](https://github.com/rh-hideout/pokeemerald-expansion/pull/7758)
* Remove redundant function call by @AlexOn1ine in [#7752](https://github.com/rh-hideout/pokeemerald-expansion/pull/7752)
* Minor White Herb and Neutralizing Gas clean up by @AlexOn1ine in [#7754](https://github.com/rh-hideout/pokeemerald-expansion/pull/7754)
* Minor clean up for Lightning Rod / Storm Drain by @AlexOn1ine in [#7778](https://github.com/rh-hideout/pokeemerald-expansion/pull/7778)
* Improve ability/heldEffect access for IsBattlerGrounded func by @AlexOn1ine in [#7753](https://github.com/rh-hideout/pokeemerald-expansion/pull/7753)
* Add func GetChosenMoveFromPosition by @AlexOn1ine in [#7810](https://github.com/rh-hideout/pokeemerald-expansion/pull/7810)
* GetBattlerHoldEffect clean up by @AlexOn1ine in [#7819](https://github.com/rh-hideout/pokeemerald-expansion/pull/7819)
* Remove unused gBattleStruct fields by @Bassoonian in [#7822](https://github.com/rh-hideout/pokeemerald-expansion/pull/7822)
* feat: change defines in `constants/abilities.h` to an enum by @khbsd in [#7006](https://github.com/rh-hideout/pokeemerald-expansion/pull/7006)
* Streamline tryheal macros by @Bassoonian in [#7830](https://github.com/rh-hideout/pokeemerald-expansion/pull/7830)
* No bag use flag changed to a varable by @FosterProgramming in [#7780](https://github.com/rh-hideout/pokeemerald-expansion/pull/7780)
- IMPORTANT: The config flag B_FLAG_NO_BAG_USE has been removed
- A config var B_VAR_NO_BAG_USE has been added to replace it. It allows you to choose between:
bag available in battle, bag available in wild battle only, and unavailable bag
* Remove two unused bits from battle structs by @Bassoonian in [#7835](https://github.com/rh-hideout/pokeemerald-expansion/pull/7835)
* Removes a few redundant hitmarkers by @AlexOn1ine in [#7915](https://github.com/rh-hideout/pokeemerald-expansion/pull/7915)
* Remove EffectHitSetTerrain script to use moveeffect by @AlexOn1ine in [#7938](https://github.com/rh-hideout/pokeemerald-expansion/pull/7938)
* Clean up follow up for AtkCanceller refactor by @AlexOn1ine in [#7951](https://github.com/rh-hideout/pokeemerald-expansion/pull/7951)
* Optimize GetWhichBattlerFasterOrTies by @AlexOn1ine in [#7953](https://github.com/rh-hideout/pokeemerald-expansion/pull/7953)
* Decouple passive hp updates from move damage updates by @AlexOn1ine in [#7942](https://github.com/rh-hideout/pokeemerald-expansion/pull/7942)
* Remove appearedInBattle bitfield & redundant use of sentOut partyState by @Nopinou in [#8011](https://github.com/rh-hideout/pokeemerald-expansion/pull/8011)
* Volatile cleared in a redundant spot by @AlexOn1ine in [#8015](https://github.com/rh-hideout/pokeemerald-expansion/pull/8015)
* Moved usedHeldItem to Party State struct by @AlexOn1ine in [#8006](https://github.com/rh-hideout/pokeemerald-expansion/pull/8006)
* Remove usage of gBattlerTarget for MirrorHerb/Opportunist by @AlexOn1ine in [#8033](https://github.com/rh-hideout/pokeemerald-expansion/pull/8033)
* Fixed test "Revival Blessing cannot revive a partner's party member" by @grintoul1 in [#8031](https://github.com/rh-hideout/pokeemerald-expansion/pull/8031)
* Decouple (Overworld) Statuses from ability function by @AlexOn1ine in [#8002](https://github.com/rh-hideout/pokeemerald-expansion/pull/8002)
* Combine Simple Beam and Worry Seed into one effect by @AlexOn1ine in [#8039](https://github.com/rh-hideout/pokeemerald-expansion/pull/8039)
* Clean up for item hold effect refactor by @AlexOn1ine in [#8014](https://github.com/rh-hideout/pokeemerald-expansion/pull/8014)
* Grudge, Destiny Bond and FaintBattler refactor by @AlexOn1ine in [#8072](https://github.com/rh-hideout/pokeemerald-expansion/pull/8072)
* Parametrized Ice Face's weather form change by @AsparagusEduardo in [#8115](https://github.com/rh-hideout/pokeemerald-expansion/pull/8115)
* Clean up redundant todo by @AlexOn1ine in [#8094](https://github.com/rh-hideout/pokeemerald-expansion/pull/8094)
* Deprecate various macro by @AlexOn1ine in [#8092](https://github.com/rh-hideout/pokeemerald-expansion/pull/8092)
* Fixes hacky SetMoveEffect script calls by @AlexOn1ine in [#7987](https://github.com/rh-hideout/pokeemerald-expansion/pull/7987)
* Create BattleStruct sub struct for event states by @AlexOn1ine in [#8131](https://github.com/rh-hideout/pokeemerald-expansion/pull/8131)
* Attackstring hitmarker clean up by @AlexOn1ine in [#8136](https://github.com/rh-hideout/pokeemerald-expansion/pull/8136)
* Clean up ability effect hitmarker by @AlexOn1ine in [#8138](https://github.com/rh-hideout/pokeemerald-expansion/pull/8138)
* Increase number of additional move effects by @AlexOn1ine in [#8149](https://github.com/rh-hideout/pokeemerald-expansion/pull/8149)
* Remove redundant Future Sight flag by @AlexOn1ine in [#8185](https://github.com/rh-hideout/pokeemerald-expansion/pull/8185)
* Powder Move blocking cleanup by @PhallenTree in [#8194](https://github.com/rh-hideout/pokeemerald-expansion/pull/8194)
* Micro clean up in BattleStruct by @AlexOn1ine in [#8177](https://github.com/rh-hideout/pokeemerald-expansion/pull/8177)
* HandleAction_UseMove minor cleanup by @mrgriffin in [#8214](https://github.com/rh-hideout/pokeemerald-expansion/pull/8214)
* Revert gBattleTurnCounter change by @AlexOn1ine in [#8197](https://github.com/rh-hideout/pokeemerald-expansion/pull/8197)
* Canceller -> Canceler rename by @AlexOn1ine in [#8294](https://github.com/rh-hideout/pokeemerald-expansion/pull/8294)
* Remove leftover scrtipt redirection by @AlexOn1ine in [#8317](https://github.com/rh-hideout/pokeemerald-expansion/pull/8317)
* Expand usage of FaintedActions enum in HandleFaintedMonActions by @PhallenTree in [#8346](https://github.com/rh-hideout/pokeemerald-expansion/pull/8346)
* Move end clear bits clean up by @AlexOn1ine in [#8354](https://github.com/rh-hideout/pokeemerald-expansion/pull/8354)
* Restored encourageEncore flag to non-volatile status effects by @AsparagusEduardo in [#8387](https://github.com/rh-hideout/pokeemerald-expansion/pull/8387)
### Fixed
* Fixes Weak Armor and items not displaying stat change attributes by @PhallenTree in [#7701](https://github.com/rh-hideout/pokeemerald-expansion/pull/7701)
* Refactors ruin ability checks into a field effect by @AlexOn1ine in [#7711](https://github.com/rh-hideout/pokeemerald-expansion/pull/7711)
* Attackcanceller fixes and improvements by @AlexOn1ine in [#7698](https://github.com/rh-hideout/pokeemerald-expansion/pull/7698)
* Fix Critical Capture RNG and Catching Charm boost by @kittenchilly in [#7534](https://github.com/rh-hideout/pokeemerald-expansion/pull/7534)
* Fixes activation order for a couple abilities by @AlexOn1ine in [#7732](https://github.com/rh-hideout/pokeemerald-expansion/pull/7732)
* More White Herb fixes/clean up by @AlexOn1ine in [#7826](https://github.com/rh-hideout/pokeemerald-expansion/pull/7826)
* Missing IsBattlerAlive checks in Opportunist/Mirror Herb by @AlexOn1ine in [#7829](https://github.com/rh-hideout/pokeemerald-expansion/pull/7829)
* Item battle effect refactor by @AlexOn1ine in [#7857](https://github.com/rh-hideout/pokeemerald-expansion/pull/7857)
* Fix Fling Mental Herb message by @AlexOn1ine in [#7984](https://github.com/rh-hideout/pokeemerald-expansion/pull/7984)
* Fixes Ruin field statuses negation conditions + upcoming cleanup by @PhallenTree in [#8042](https://github.com/rh-hideout/pokeemerald-expansion/pull/8042)
* Fix nature power string and add support for evnvironment in tests by @FosterProgramming in [#8068](https://github.com/rh-hideout/pokeemerald-expansion/pull/8068)
- Add option to choose an environment when setting up a battle test
* Corrects battler position checks in battle_message.c by @grintoul1 in [#8070](https://github.com/rh-hideout/pokeemerald-expansion/pull/8070)
* Emergency Exit on hazards activation + fix end of turn activation by @PhallenTree in [#8075](https://github.com/rh-hideout/pokeemerald-expansion/pull/8075)
* Improve sBattleIntroSlideFuncs bounds check by @hedara90 in [#8084](https://github.com/rh-hideout/pokeemerald-expansion/pull/8084)
* Fixes Sticky Barb never getting transferred to attacker + tests by @PhallenTree in [#8108](https://github.com/rh-hideout/pokeemerald-expansion/pull/8108)
* Fixes flung items sometimes being blocked by Unnerve by @PhallenTree in [#8114](https://github.com/rh-hideout/pokeemerald-expansion/pull/8114)
* Adjust faint battler script by @AlexOn1ine in [#8137](https://github.com/rh-hideout/pokeemerald-expansion/pull/8137)
* Allow to send active mon to PC when capturing a Pokemon by @FosterProgramming in [#8111](https://github.com/rh-hideout/pokeemerald-expansion/pull/8111)
* Fix transform not loading the correct sprites when facing shiny or unown by @FosterProgramming in [#8146](https://github.com/rh-hideout/pokeemerald-expansion/pull/8146)
* Fixes Receiver not immediately activating copied abilities by @PhallenTree in [#8162](https://github.com/rh-hideout/pokeemerald-expansion/pull/8162)
* Fix destiny knot behavior and add tests by @FosterProgramming in [#8174](https://github.com/rh-hideout/pokeemerald-expansion/pull/8174)
* Fix recharge moves + add recharge move tests by @FosterProgramming in [#8181](https://github.com/rh-hideout/pokeemerald-expansion/pull/8181)
* Fixes Magician for spread moves by @AlexOn1ine in [#8170](https://github.com/rh-hideout/pokeemerald-expansion/pull/8170)
* Fix tera tint not applying on activation by @FosterProgramming in [#8135](https://github.com/rh-hideout/pokeemerald-expansion/pull/8135)
* Fixes wrongly assigned count for Semi Invulnerable state by @AlexOn1ine in [#8175](https://github.com/rh-hideout/pokeemerald-expansion/pull/8175)
* Fixes Drain Punch / Parental Bond / Scale Shot interaction by @AlexOn1ine in [#8198](https://github.com/rh-hideout/pokeemerald-expansion/pull/8198)
* Avoid illegal GetBattlerAtPosition by @mrgriffin in [#8225](https://github.com/rh-hideout/pokeemerald-expansion/pull/8225)
* DamageContext: chosenMove by @mrgriffin in [#8224](https://github.com/rh-hideout/pokeemerald-expansion/pull/8224)
* AccuracyCheck: Avoid calling GetMoveEffect with NO_ACC_CALC_CHECK_LOC… by @mrgriffin in [#8222](https://github.com/rh-hideout/pokeemerald-expansion/pull/8222)
* moveend: Handle MOVE_UNAVAILABLE in MOVEEND_THIRD_MOVE_BLOCK by @mrgriffin in [#8215](https://github.com/rh-hideout/pokeemerald-expansion/pull/8215)
* Fix wrong ditto sprite on capture by @FosterProgramming in [#8226](https://github.com/rh-hideout/pokeemerald-expansion/pull/8226)
* SpriteCB_EnemyShadow: Avoid use-after-free by @mrgriffin in [#8220](https://github.com/rh-hideout/pokeemerald-expansion/pull/8220)
* trysethelpinghand avoid illegal target by @mrgriffin in [#8218](https://github.com/rh-hideout/pokeemerald-expansion/pull/8218)
* Fixed an issue related to same turn Encore targeting by @LinathanZel in [#8230](https://github.com/rh-hideout/pokeemerald-expansion/pull/8230)
* Avoid illegal move retargeting in singles by @mrgriffin in [#8217](https://github.com/rh-hideout/pokeemerald-expansion/pull/8217)
* Fixes Shell Trap not activating on contact but no damage by @AlexOn1ine in [#8243](https://github.com/rh-hideout/pokeemerald-expansion/pull/8243)
* Fix Magic Coat reflecting hazard moves incorrectly when used by a partner by @moostoet in [#8272](https://github.com/rh-hideout/pokeemerald-expansion/pull/8272)
- Magic Coat now properly reflects hazard moves from either slot in double battles.
* Shell Trap tests and Fix for Encore interaction by @AlexOn1ine in [#8268](https://github.com/rh-hideout/pokeemerald-expansion/pull/8268)
* Fix max mushroom unable to be selected when one stat is maxed by @FosterProgramming in [#8287](https://github.com/rh-hideout/pokeemerald-expansion/pull/8287)
* Block selecting x items when contrary pokemon are at minimum stages by @FosterProgramming in [#8288](https://github.com/rh-hideout/pokeemerald-expansion/pull/8288)
* Fix Fur Coat affecting confusion self-damage by @moostoet in [#8267](https://github.com/rh-hideout/pokeemerald-expansion/pull/8267)
- Fix confusion self-damage ignoring defense/attack abilities such as Fur Coat.
* Fixes End Turn Speed Order by @AlexOn1ine in [#8289](https://github.com/rh-hideout/pokeemerald-expansion/pull/8289)
* Make switchout abilities trigger after a pokemon has returned to its ball by @FosterProgramming in [#8304](https://github.com/rh-hideout/pokeemerald-expansion/pull/8304)
* Fix Shed Shell allowing fleeing/teleporting and Smoke Ball failing to guarantee escape by @moostoet in [#8286](https://github.com/rh-hideout/pokeemerald-expansion/pull/8286)
* Fix bug where defiant/competitive would pass their stat change to the next target by @FosterProgramming in [#8312](https://github.com/rh-hideout/pokeemerald-expansion/pull/8312)
* Fix max move message against semi invulnerable target by @FosterProgramming in [#8313](https://github.com/rh-hideout/pokeemerald-expansion/pull/8313)
* Fixes Neutralizing Gas displaying message when exiting with multiple users by @PhallenTree in [#8318](https://github.com/rh-hideout/pokeemerald-expansion/pull/8318)
* Fix Kings Rock not being ignored by flinch moves by @AlexOn1ine in [#8327](https://github.com/rh-hideout/pokeemerald-expansion/pull/8327)
* Fix Upper Hand failure still activating Protean by @AlexOn1ine in [#8329](https://github.com/rh-hideout/pokeemerald-expansion/pull/8329)
* Fix Protosynthesis stat boosts ignoring speed drops by @moostoet in [#8277](https://github.com/rh-hideout/pokeemerald-expansion/pull/8277)
- Protosynthesis and Quark Drive now recalculate their boosted stat when Speed is lowered or Neutralizing Gas temporarily disables the ability.
* Fix switch-in abilities not triggering on revive by @FosterProgramming in [#8293](https://github.com/rh-hideout/pokeemerald-expansion/pull/8293)
* More Neutralizing Gas cleanup by @PhallenTree in [#8335](https://github.com/rh-hideout/pokeemerald-expansion/pull/8335)
* Clear Destiny Bond/Grudge bits when not activated by @PhallenTree in [#8334](https://github.com/rh-hideout/pokeemerald-expansion/pull/8334)
* Fix cure status item effect not working properly in doubles by @FosterProgramming in [#8339](https://github.com/rh-hideout/pokeemerald-expansion/pull/8339)
* Fix infinite confusion (berserk gene) not being cured by cure_status bag items by @FosterProgramming in [#8343](https://github.com/rh-hideout/pokeemerald-expansion/pull/8343)
* Fix `B_PHYSICAL_SPECIAL_SPLIT` when set to Gen 4 by @AsparagusEduardo in [#8348](https://github.com/rh-hideout/pokeemerald-expansion/pull/8348)
* Refactor Beat Up handling for Gen 3/4 defaults, fix crit check, and expand test coverage by @moostoet in [#8307](https://github.com/rh-hideout/pokeemerald-expansion/pull/8307)
- BUGFIX: Beat Up (`GEN =< 5`) now no longer doubles its damage on every non-critical hit
- Beat Up now precomputes eligible party members/strikers for consistent multi-hit resolution and expanded tests covering both pre-Gen5 and Gen5+ rules
* Fix substitute graphic not disappearing after using a pivor move by @FosterProgramming in [#8340](https://github.com/rh-hideout/pokeemerald-expansion/pull/8340)
* Fixes Beak Blast burning after Beak Blast was already used by @PhallenTree in [#8361](https://github.com/rh-hideout/pokeemerald-expansion/pull/8361)
* Fix Roar not being recorded for LastUsedMove by @AlexOn1ine in [#8362](https://github.com/rh-hideout/pokeemerald-expansion/pull/8362)
* Fixes Neutralizing Gas / Mold Breaker / Dragon Darts interaction by @AlexOn1ine in [#8389](https://github.com/rh-hideout/pokeemerald-expansion/pull/8389)
* Fixes battle tv overwriting damage values by @AlexOn1ine in [#8378](https://github.com/rh-hideout/pokeemerald-expansion/pull/8378)
* Fix ball cycling not working properly when the same ball take multiple bag slots by @FosterProgramming in [#8163](https://github.com/rh-hideout/pokeemerald-expansion/pull/8163)
- Two new defines added to items.h `FIRST_BALL_INDEX` and `LAST_BALL_INDEX`
- We now assume the indexes of all regular ball usable in wild battle have consecutive indexes and some features (throw ball shortcut in battle) might break if not true
* Prevent double Dynamax for single-trainer 2v1 multi battles by @moostoet in [#8323](https://github.com/rh-hideout/pokeemerald-expansion/pull/8323)
- Fixed AI 2v1 multibattles incorrectly allowing both opponent leads to Dynamax in the same turn.
## 🤹 Moves 🤹
### Changed
* Separates FRB and FRZ animations by @grintoul1 in [#7611](https://github.com/rh-hideout/pokeemerald-expansion/pull/7611)
* Fixed test "Revival Blessing cannot revive a partner's party member" by @grintoul1 in [#8031](https://github.com/rh-hideout/pokeemerald-expansion/pull/8031)
* Fixed Uproar's description and spacing by @fdeblasio in [#8187](https://github.com/rh-hideout/pokeemerald-expansion/pull/8187)
* Clean usage of gMovesInfo by @AsparagusEduardo in [#8234](https://github.com/rh-hideout/pokeemerald-expansion/pull/8234)
- Also, fixed an OOB in `HasMoveThatChangesKOThreshold`
* Added Gen 6 contest combos by @fdeblasio in [#8251](https://github.com/rh-hideout/pokeemerald-expansion/pull/8251)
* Make tailwind anim mirror based on side by @FosterProgramming in [#8249](https://github.com/rh-hideout/pokeemerald-expansion/pull/8249)
* Make rainbow effect anim change based on side by @FosterProgramming in [#8269](https://github.com/rh-hideout/pokeemerald-expansion/pull/8269)
- Art assets by [SonikkuA-DatH](https://github.com/SonikkuA-DatH)
* Update Lash Out description to clarify its effect by @PhallenTree in [#8372](https://github.com/rh-hideout/pokeemerald-expansion/pull/8372)
### Fixed
* Fix some move animations leaking VRAM and freeing already freed tags by @hedara90 in [#7977](https://github.com/rh-hideout/pokeemerald-expansion/pull/7977)
## 🎭 Abilities 🎭
### Changed
* followup: AbilityBattleEffects return type is incorrect by @khbsd in [#7827](https://github.com/rh-hideout/pokeemerald-expansion/pull/7827)
## 🧶 Items 🧶
### Fixed
* Allow vs seekers to work with script not starting with trainerbattle by @FosterProgramming in [#8062](https://github.com/rh-hideout/pokeemerald-expansion/pull/8062)
- VS seeker now work with trainers who don't start with trainer_battle. You can use `vsseeker_rematchid TRAINER_ID` to indicate that this NPC is a battling trainer and the game will fetch the appropriate rematch if necessary. ` vsseeker_rematchid` work like a `cant_see_if_trainerflag_set` with additional functionality to handle vs seeker.
- All NPCs who don't start with either `vsseeker_rematchid` or `trainerbattle` will show as "X"/unmatchable by the vs seeker, so non-rematchable trainer who do not start with `trainerbattle may "lie" and not show an excalmation mark showing they haven't been fought yet. This can be fixed by including a `vsseeker_rematchid` for them too.
* Removed extra period in Pokéshi Doll description by @montmoguri in [#8252](https://github.com/rh-hideout/pokeemerald-expansion/pull/8252)
## 🤖 Battle AI 🤖
### Added
* Improved move additional effect handling; now accounts for Shield Dust. by @surskitty in [#7650](https://github.com/rh-hideout/pokeemerald-expansion/pull/7650)
* Adjusted AI handling for Gravity; AI for weather/field status additional effects. by @surskitty in [#7651](https://github.com/rh-hideout/pokeemerald-expansion/pull/7651)
* Improved AI for status curing; trainer items, Purify, Smelling Salts, Sparkling Aria by @surskitty in [#7853](https://github.com/rh-hideout/pokeemerald-expansion/pull/7853)
### Changed
* AI uses Magnetic Flux. by @surskitty in [#7642](https://github.com/rh-hideout/pokeemerald-expansion/pull/7642)
* AI uses Flower Shield. by @surskitty in [#7640](https://github.com/rh-hideout/pokeemerald-expansion/pull/7640)
* AI uses Life Dew. by @surskitty in [#7643](https://github.com/rh-hideout/pokeemerald-expansion/pull/7643)
* AI uses Gear Up. by @surskitty in [#7641](https://github.com/rh-hideout/pokeemerald-expansion/pull/7641)
* Correcting test AI won't use status moves if partner chose Helping Hand by @surskitty in [#7649](https://github.com/rh-hideout/pokeemerald-expansion/pull/7649)
* IncreaseStatUpScore adjustments for Simple, +3 moves, Acupressure, max move effects by @surskitty in [#7662](https://github.com/rh-hideout/pokeemerald-expansion/pull/7662)
* AI handling for Coaching. by @surskitty in [#7661](https://github.com/rh-hideout/pokeemerald-expansion/pull/7661)
* Simplifying calls to IsBattlerTrapped; treats being unable to switch as trappedness by @surskitty in [#7671](https://github.com/rh-hideout/pokeemerald-expansion/pull/7671)
* AI Tests: Gimmick Support by @mrgriffin in [#7694](https://github.com/rh-hideout/pokeemerald-expansion/pull/7694)
* AI can use Z-status moves by @surskitty in [#7666](https://github.com/rh-hideout/pokeemerald-expansion/pull/7666)
* Move some checks out of IncreaseStatUpScore to ShouldRaiseAnyStat by @surskitty in [#7722](https://github.com/rh-hideout/pokeemerald-expansion/pull/7722)
* Moving additional effects out of AI_CalcMoveEffectScore and into AI_CalcMoveAdditionalEffectScore by @surskitty in [#7727](https://github.com/rh-hideout/pokeemerald-expansion/pull/7727)
* AI sees dynamic moves and Nature Power as correct types for weather, terrain by @surskitty in [#7759](https://github.com/rh-hideout/pokeemerald-expansion/pull/7759)
* Fix abusable two-turn-move switch behaviour by @Pawkkie in [#7770](https://github.com/rh-hideout/pokeemerald-expansion/pull/7770)
* Z Status move handling: Conversion, Detect, Nature Power, Transform by @surskitty in [#7721](https://github.com/rh-hideout/pokeemerald-expansion/pull/7721)
* Use stored values for ai switch-in effectiveness checks by @AlexOn1ine in [#7794](https://github.com/rh-hideout/pokeemerald-expansion/pull/7794)
* Changing all HasBattlerSideAbility to AI_IsAbilityOnSide. by @surskitty in [#7927](https://github.com/rh-hideout/pokeemerald-expansion/pull/7927)
* Weather/Terrain AI touch-ups. by @surskitty in [#7933](https://github.com/rh-hideout/pokeemerald-expansion/pull/7933)
* Improving the checks for the AI to avoid Encore; adding RISK_ENCORE_CHANCE config. by @surskitty in [#7929](https://github.com/rh-hideout/pokeemerald-expansion/pull/7929)
* Fixes CanUseLastResort and resolves 3 KNOWN_FAILING Last Resort tests by @grintoul1 in [#8032](https://github.com/rh-hideout/pokeemerald-expansion/pull/8032)
* Add AI flag AI_FLAG_KNOW_OPPONENT_PARTY to know all species in party by @moostoet in [#8290](https://github.com/rh-hideout/pokeemerald-expansion/pull/8290)
### Fixed
* Score adjustments towards guaranteed stat drops. by @surskitty in [#7670](https://github.com/rh-hideout/pokeemerald-expansion/pull/7670)
* AI uses Extreme Evoboost. by @surskitty in [#7706](https://github.com/rh-hideout/pokeemerald-expansion/pull/7706)
* Fixes AI scoring when Priority moves are blocked by @PhallenTree in [#7745](https://github.com/rh-hideout/pokeemerald-expansion/pull/7745)
* fix (AI scoring): shield dust considerations, IsMoveEffectInMinus self effect edge case, hitsToKO zero-case consideration by @ghostyboyy97 in [#8126](https://github.com/rh-hideout/pokeemerald-expansion/pull/8126)
- The AI now sees Shield Dust on the player's Pokemon correctly
- The AI now sees self-targeted positive effect boosts correctly
* fix (contrary): Contrary stat down handling in MoveEffectInPlus by @ghostyboyy97 in [#8165](https://github.com/rh-hideout/pokeemerald-expansion/pull/8165)
- When comparing positive move effects in damaging move comparison, the AI will correctly see moves like Leaf Storm as beneficial if their Pokemon has Contrary.
* Added check for parental bond killing through sturdy by @MaximeGr00 in [#8206](https://github.com/rh-hideout/pokeemerald-expansion/pull/8206)
- AI now accounts for Parental Bond when checking if a move can ko the player through sturdy/focus sash.
* AI: Handle MOVE_UNAVAILABLE in last used moves by @mrgriffin in [#8219](https://github.com/rh-hideout/pokeemerald-expansion/pull/8219)
* Fix AI_FLAG_DOUBLE_ACE_POKEMON sending duplicate Pokémon in doubles by @moostoet in [#8279](https://github.com/rh-hideout/pokeemerald-expansion/pull/8279)
- Fixed AI_FLAG_DOUBLE_ACE_POKEMON trainers resending the same Pokémon after a KO instead of their two Ace Pokémon in double battles.
* Rework switch AI and add more tests for ace pokemon flags by @FosterProgramming in [#8321](https://github.com/rh-hideout/pokeemerald-expansion/pull/8321)
- All remaining issues with the AI flags Ace Pokemon and Double Ace pokemon should be fixed
- The smart switching AI should be less likely to switch a pokemon about to die if it doesn't have a pokemon with a good matchup to replace it
* Fix switchin KO threshold logic by @Pawkkie in [#8370](https://github.com/rh-hideout/pokeemerald-expansion/pull/8370)
## 🧹 Other Cleanup 🧹
* Update multiple battle messages by @AsparagusEduardo in [#7529](https://github.com/rh-hideout/pokeemerald-expansion/pull/7529)
- Removed unused messages
- Changed ability "X prevents Y" to "It doesn't affect X..."
- Eg. `"The opposing Snorlax's Immunity prevents poisoning!"`
- Removed `B_ABILITY_POP_UP`. Revert commit `b501fe7354bcd957396465c621ae7af5959ac5b0` to undo this.
* Battle debug menu now checks correct parties depending on battler party by @grintoul1 in [#7652](https://github.com/rh-hideout/pokeemerald-expansion/pull/7652)
* Correcting test AI won't use status moves if partner chose Helping Hand by @surskitty in [#7649](https://github.com/rh-hideout/pokeemerald-expansion/pull/7649)
* Remove Uproar attack battle script by @AlexOn1ine in [#7715](https://github.com/rh-hideout/pokeemerald-expansion/pull/7715)
* Fix up end turn scripts plus small documentation by @AlexOn1ine in [#7758](https://github.com/rh-hideout/pokeemerald-expansion/pull/7758)
* `field_name_box` smol followup by @mudskipper13 in [#7762](https://github.com/rh-hideout/pokeemerald-expansion/pull/7762)
* Remove redundant function call by @AlexOn1ine in [#7752](https://github.com/rh-hideout/pokeemerald-expansion/pull/7752)
* Minor White Herb and Neutralizing Gas clean up by @AlexOn1ine in [#7754](https://github.com/rh-hideout/pokeemerald-expansion/pull/7754)
* Minor clean up for Lightning Rod / Storm Drain by @AlexOn1ine in [#7778](https://github.com/rh-hideout/pokeemerald-expansion/pull/7778)
* Add func GetChosenMoveFromPosition by @AlexOn1ine in [#7810](https://github.com/rh-hideout/pokeemerald-expansion/pull/7810)
* GetBattlerHoldEffect clean up by @AlexOn1ine in [#7819](https://github.com/rh-hideout/pokeemerald-expansion/pull/7819)
* Remove unused gBattleStruct fields by @Bassoonian in [#7822](https://github.com/rh-hideout/pokeemerald-expansion/pull/7822)
* followup: AbilityBattleEffects return type is incorrect by @khbsd in [#7827](https://github.com/rh-hideout/pokeemerald-expansion/pull/7827)
* Streamline tryheal macros by @Bassoonian in [#7830](https://github.com/rh-hideout/pokeemerald-expansion/pull/7830)
* Remove two unused bits from battle structs by @Bassoonian in [#7835](https://github.com/rh-hideout/pokeemerald-expansion/pull/7835)
* Removes a few redundant hitmarkers by @AlexOn1ine in [#7915](https://github.com/rh-hideout/pokeemerald-expansion/pull/7915)
* Remove EffectHitSetTerrain script to use moveeffect by @AlexOn1ine in [#7938](https://github.com/rh-hideout/pokeemerald-expansion/pull/7938)
* Clean up follow up for AtkCanceller refactor by @AlexOn1ine in [#7951](https://github.com/rh-hideout/pokeemerald-expansion/pull/7951)
* Remove appearedInBattle bitfield & redundant use of sentOut partyState by @Nopinou in [#8011](https://github.com/rh-hideout/pokeemerald-expansion/pull/8011)
* Some more documentation and cleanup by @Bassoonian in [#8020](https://github.com/rh-hideout/pokeemerald-expansion/pull/8020)
* Volatile cleared in a redundant spot by @AlexOn1ine in [#8015](https://github.com/rh-hideout/pokeemerald-expansion/pull/8015)
* Moved usedHeldItem to Party State struct by @AlexOn1ine in [#8006](https://github.com/rh-hideout/pokeemerald-expansion/pull/8006)
* Remove usage of gBattlerTarget for MirrorHerb/Opportunist by @AlexOn1ine in [#8033](https://github.com/rh-hideout/pokeemerald-expansion/pull/8033)
* Even more enums and documentation by @Bassoonian in [#8029](https://github.com/rh-hideout/pokeemerald-expansion/pull/8029)
* Decouple (Overworld) Statuses from ability function by @AlexOn1ine in [#8002](https://github.com/rh-hideout/pokeemerald-expansion/pull/8002)
* Fixes Ruin field statuses negation conditions + upcoming cleanup by @PhallenTree in [#8042](https://github.com/rh-hideout/pokeemerald-expansion/pull/8042)
* Minor clean up in menu.c by @estellarc in [#8060](https://github.com/rh-hideout/pokeemerald-expansion/pull/8060)
* Clean up for item hold effect refactor by @AlexOn1ine in [#8014](https://github.com/rh-hideout/pokeemerald-expansion/pull/8014)
* Parametrized Ice Face's weather form change by @AsparagusEduardo in [#8115](https://github.com/rh-hideout/pokeemerald-expansion/pull/8115)
* Clean up redundant todo by @AlexOn1ine in [#8094](https://github.com/rh-hideout/pokeemerald-expansion/pull/8094)
* Deprecate various macro by @AlexOn1ine in [#8092](https://github.com/rh-hideout/pokeemerald-expansion/pull/8092)
* Fixes hacky SetMoveEffect script calls by @AlexOn1ine in [#7987](https://github.com/rh-hideout/pokeemerald-expansion/pull/7987)
* Create BattleStruct sub struct for event states by @AlexOn1ine in [#8131](https://github.com/rh-hideout/pokeemerald-expansion/pull/8131)
* Attackstring hitmarker clean up by @AlexOn1ine in [#8136](https://github.com/rh-hideout/pokeemerald-expansion/pull/8136)
* Clean up ability effect hitmarker by @AlexOn1ine in [#8138](https://github.com/rh-hideout/pokeemerald-expansion/pull/8138)
* Fix Kyurem typo in swap move tables by @Bassoonian in [#8139](https://github.com/rh-hideout/pokeemerald-expansion/pull/8139)
* Fix typo in Voltorb-Hisui pokedex entry by @PhallenTree in [#8143](https://github.com/rh-hideout/pokeemerald-expansion/pull/8143)
* porymap default settings by @FosterProgramming in [#8038](https://github.com/rh-hideout/pokeemerald-expansion/pull/8038)
- WARNING: A change was made for new projects map files to match poymap output. This change might break people's projects with existing versions of those files. The files affected are ` data/maps/map_groups.json`, `src/data/heal_locations.json`, `src/data/region_map/region_map_sections.json` and `src/data/wild_encounters.json`
If you have an issue with one of those files during the merging process, you should run this command
`git checkout HEAD -- <filename>`
which will reset the file to the version before you initiated the merge
* Sets instant text speed flag to false by default by @khbsd in [#8179](https://github.com/rh-hideout/pokeemerald-expansion/pull/8179)
* Remove redundant Future Sight flag by @AlexOn1ine in [#8185](https://github.com/rh-hideout/pokeemerald-expansion/pull/8185)
* Fix incorrect comments by @AlexOn1ine in [#8193](https://github.com/rh-hideout/pokeemerald-expansion/pull/8193)
* Fixed Uproar's description and spacing by @fdeblasio in [#8187](https://github.com/rh-hideout/pokeemerald-expansion/pull/8187)
* Add include/constants/script_commands.h to gitignore by @AlexOn1ine in [#8169](https://github.com/rh-hideout/pokeemerald-expansion/pull/8169)
* Powder Move blocking cleanup by @PhallenTree in [#8194](https://github.com/rh-hideout/pokeemerald-expansion/pull/8194)
* Converted landmarks to COMPOUND_STRINGs by @fdeblasio in [#8205](https://github.com/rh-hideout/pokeemerald-expansion/pull/8205)
* Micro clean up in BattleStruct by @AlexOn1ine in [#8177](https://github.com/rh-hideout/pokeemerald-expansion/pull/8177)
* Clean usage of gMovesInfo by @AsparagusEduardo in [#8234](https://github.com/rh-hideout/pokeemerald-expansion/pull/8234)
- Also, fixed an OOB in `HasMoveThatChangesKOThreshold`
* HandleAction_UseMove minor cleanup by @mrgriffin in [#8214](https://github.com/rh-hideout/pokeemerald-expansion/pull/8214)
* Revert gBattleTurnCounter change by @AlexOn1ine in [#8197](https://github.com/rh-hideout/pokeemerald-expansion/pull/8197)
* Added contest config and cleaned up contest category variables by @fdeblasio in [#8178](https://github.com/rh-hideout/pokeemerald-expansion/pull/8178)
* Adjust Canceler naming to contain only one l by @AlexOn1ine in [#8258](https://github.com/rh-hideout/pokeemerald-expansion/pull/8258)
* Fix wrongly renamed logs by @AlexOn1ine in [#8264](https://github.com/rh-hideout/pokeemerald-expansion/pull/8264)
* Test type enum indentation by @AsparagusEduardo in [#8273](https://github.com/rh-hideout/pokeemerald-expansion/pull/8273)
* Added missing 'coolness' string by @fdeblasio in [#8274](https://github.com/rh-hideout/pokeemerald-expansion/pull/8274)
* Canceller -> Canceler rename by @AlexOn1ine in [#8294](https://github.com/rh-hideout/pokeemerald-expansion/pull/8294)
* Tests for Max Moves already exist by @AlexOn1ine in [#8314](https://github.com/rh-hideout/pokeemerald-expansion/pull/8314)
* Documentation clean up for MoveCanceler by @AlexOn1ine in [#8297](https://github.com/rh-hideout/pokeemerald-expansion/pull/8297)
* Use MAP_OFFSET by @estellarc in [#8328](https://github.com/rh-hideout/pokeemerald-expansion/pull/8328)
* Remove leftover scrtipt redirection by @AlexOn1ine in [#8317](https://github.com/rh-hideout/pokeemerald-expansion/pull/8317)
* Fixed broken friendship from items in battle test and added new test for opposite case by @pkmnsnfrn in [#7872](https://github.com/rh-hideout/pokeemerald-expansion/pull/7872)
* Expand usage of FaintedActions enum in HandleFaintedMonActions by @PhallenTree in [#8346](https://github.com/rh-hideout/pokeemerald-expansion/pull/8346)
* Move end clear bits clean up by @AlexOn1ine in [#8354](https://github.com/rh-hideout/pokeemerald-expansion/pull/8354)
* Indent unintented if statement by @hedara90 in [#8367](https://github.com/rh-hideout/pokeemerald-expansion/pull/8367)
* Update Lash Out description to clarify its effect by @PhallenTree in [#8372](https://github.com/rh-hideout/pokeemerald-expansion/pull/8372)
* Slight Protect moveend cleanup by @AsparagusEduardo in [#8385](https://github.com/rh-hideout/pokeemerald-expansion/pull/8385)
* Restored encourageEncore flag to non-volatile status effects by @AsparagusEduardo in [#8387](https://github.com/rh-hideout/pokeemerald-expansion/pull/8387)
## 🧪 Test Runner 🧪
### Added
* Multibattle testing system by @grintoul1 in [#7257](https://github.com/rh-hideout/pokeemerald-expansion/pull/7257)
* Prevent EXPECT functions from casting negative numbers into unsigned by @FosterProgramming in [#7866](https://github.com/rh-hideout/pokeemerald-expansion/pull/7866)
### Changed
* AI Tests: Gimmick Support by @mrgriffin in [#7694](https://github.com/rh-hideout/pokeemerald-expansion/pull/7694)
* Some tests for future Dynamax AI behavior. by @surskitty in [#7707](https://github.com/rh-hideout/pokeemerald-expansion/pull/7707)
* Add some missing move animations to the move animation tests by @FosterProgramming in [#7507](https://github.com/rh-hideout/pokeemerald-expansion/pull/7507)
* Fixes CanUseLastResort and resolves 3 KNOWN_FAILING Last Resort tests by @grintoul1 in [#8032](https://github.com/rh-hideout/pokeemerald-expansion/pull/8032)
* Fixed test "Revival Blessing cannot revive a partner's party member" by @grintoul1 in [#8031](https://github.com/rh-hideout/pokeemerald-expansion/pull/8031)
* Added Soundproof and Bulletproof tests by @AsparagusEduardo in [#8189](https://github.com/rh-hideout/pokeemerald-expansion/pull/8189)
* Wrote some missing tests by @AsparagusEduardo in [#8203](https://github.com/rh-hideout/pokeemerald-expansion/pull/8203)
* Refactor random functions to be runner specific by @FosterProgramming in [#7816](https://github.com/rh-hideout/pokeemerald-expansion/pull/7816)
* A couple more tests by @AsparagusEduardo in [#8209](https://github.com/rh-hideout/pokeemerald-expansion/pull/8209)
* Fixed some failing tests with GEN_LATEST = GEN_5 by @AsparagusEduardo in [#8241](https://github.com/rh-hideout/pokeemerald-expansion/pull/8241)
* Add test for mold breaker/ice scales interaction by @FosterProgramming in [#8240](https://github.com/rh-hideout/pokeemerald-expansion/pull/8240)
* Yet more tests by @AsparagusEduardo in [#8228](https://github.com/rh-hideout/pokeemerald-expansion/pull/8228)
- Added tests for:
- Dark Aura
- Fairy Aura
- Flare Boost
- Toxic Boost
- Added test names for Flying Press.
* Test type enum indentation by @AsparagusEduardo in [#8273](https://github.com/rh-hideout/pokeemerald-expansion/pull/8273)
* Slightly increase headless test speed by modifying animations by @AsparagusEduardo in [#8299](https://github.com/rh-hideout/pokeemerald-expansion/pull/8299)
* Make `gTestRunnerHeadless` into a constant outside of tests by @hedara90 in [#8306](https://github.com/rh-hideout/pokeemerald-expansion/pull/8306)
* Tests for Max Moves already exist by @AlexOn1ine in [#8314](https://github.com/rh-hideout/pokeemerald-expansion/pull/8314)
* Finished fixing tests when setting `GEN_LATEST` to `GEN_5` by @AsparagusEduardo in [#8263](https://github.com/rh-hideout/pokeemerald-expansion/pull/8263)
* Wrote missing Fling tests by @AsparagusEduardo in [#8383](https://github.com/rh-hideout/pokeemerald-expansion/pull/8383)
### Fixed
* Corrects ONE_VS_TWO_BATTLE_TEST to use BATTLE_TEST_ARGS_ONE_VS_TWO by @grintoul1 in [#8061](https://github.com/rh-hideout/pokeemerald-expansion/pull/8061)
* Fixes difficulty not being restored after tests by @grintoul1 in [#8129](https://github.com/rh-hideout/pokeemerald-expansion/pull/8129)
* Reset saveblock data between test runs by @hedara90 in [#8145](https://github.com/rh-hideout/pokeemerald-expansion/pull/8145)
* Sheer force test fix by @grintoul1 in [#8142](https://github.com/rh-hideout/pokeemerald-expansion/pull/8142)
* Test only enabled species by @mrgriffin in [#8216](https://github.com/rh-hideout/pokeemerald-expansion/pull/8216)
* Fix ohko moves ai tests by @FosterProgramming in [#8309](https://github.com/rh-hideout/pokeemerald-expansion/pull/8309)
* Fixed broken friendship from items in battle test and added new test for opposite case by @pkmnsnfrn in [#7872](https://github.com/rh-hideout/pokeemerald-expansion/pull/7872)
* Add tests to verify aromatherapy is not affected by heal bell config by @FosterProgramming in [#8344](https://github.com/rh-hideout/pokeemerald-expansion/pull/8344)
* Pre gen 5 encored move now signals the test engine a move is happening by @FosterProgramming in [#8338](https://github.com/rh-hideout/pokeemerald-expansion/pull/8338)
* Refactor Beat Up handling for Gen 3/4 defaults, fix crit check, and expand test coverage by @moostoet in [#8307](https://github.com/rh-hideout/pokeemerald-expansion/pull/8307)
- BUGFIX: Beat Up (`GEN =< 5`) now no longer doubles its damage on every non-critical hit
- Beat Up now precomputes eligible party members/strikers for consistent multi-hit resolution and expanded tests covering both pre-Gen5 and Gen5+ rules
* Fix player and partner trainer sprite palettes to 8 and 9, preventing unwanted palette changes by @grintoul1 in [#8127](https://github.com/rh-hideout/pokeemerald-expansion/pull/8127)
* Fix known failing AI trace test by @FosterProgramming in [#8337](https://github.com/rh-hideout/pokeemerald-expansion/pull/8337)
## 📚 Documentation 📚
* Converts some defines to enums and name unnamed enums by @Bassoonian in [#8019](https://github.com/rh-hideout/pokeemerald-expansion/pull/8019)
* Some more documentation and cleanup by @Bassoonian in [#8020](https://github.com/rh-hideout/pokeemerald-expansion/pull/8020)
* Even more enums and documentation by @Bassoonian in [#8029](https://github.com/rh-hideout/pokeemerald-expansion/pull/8029)
* Add type enum by @Bassoonian in [#8054](https://github.com/rh-hideout/pokeemerald-expansion/pull/8054)
* Revert reversion by @AlexOn1ine in [#8112](https://github.com/rh-hideout/pokeemerald-expansion/pull/8112)
* Lock mdbook to v0.4.35 to fix docs not building by @grintoul1 in [#8130](https://github.com/rh-hideout/pokeemerald-expansion/pull/8130)
* Add additional comment explaing map name popup transparency side-effects by @FosterProgramming in [#8117](https://github.com/rh-hideout/pokeemerald-expansion/pull/8117)
* Fix incorrect comments by @AlexOn1ine in [#8193](https://github.com/rh-hideout/pokeemerald-expansion/pull/8193)
* Moves name box configs into a new file by @AlexOn1ine in [#8250](https://github.com/rh-hideout/pokeemerald-expansion/pull/8250)
* Fix wrongly renamed logs by @AlexOn1ine in [#8264](https://github.com/rh-hideout/pokeemerald-expansion/pull/8264)
* Documentation clean up for MoveCanceler by @AlexOn1ine in [#8297](https://github.com/rh-hideout/pokeemerald-expansion/pull/8297)
* Use MAP_OFFSET by @estellarc in [#8328](https://github.com/rh-hideout/pokeemerald-expansion/pull/8328)
* Fedora install instructions by @estellarc in [#8355](https://github.com/rh-hideout/pokeemerald-expansion/pull/8355)
## New Contributors
* @purrfectdoodle made their first contribution in [#7689](https://github.com/rh-hideout/pokeemerald-expansion/pull/7689)
* @montmoguri made their first contribution in [#8252](https://github.com/rh-hideout/pokeemerald-expansion/pull/8252)
**Full Changelog**: https://github.com/rh-hideout/pokeemerald-expansion/compare/expansion/1.13.3...expansion/1.14.0
<!--Last PR: 8392-->
<!--Used to keep track of the last PR merged in case new ones come in before the changelog is done.-->

View File

@ -0,0 +1,58 @@
# How to interact with Apricorn Trees
![apricorn-tree](/docs/tutorials/img/apricorn_tree/apricorn-tree.gif)
### Adding a new apricorn tree
To add a new tree, first increase the tree count and expand the tree list in `include/constants/apricorn_tree.h`.
Note that each tree will take a bit in the savegame's `SaveBlock3` struct so increasing `APRICORN_TREE_COUNT` **breaks the savegame**.
Due to this, pokeemerald-expansion doesn't have any trees set up by default to prevent breaking downstream savegames.
The trees support random yields and properly use plural case on plural yields.
```diff
#define APRICORN_TREE_NONE 0
-#define APRICORN_TREE_COUNT 0
+#define APRICORN_TREE_ROUTE101_RED_TREE 1
+
+#define APRICORN_TREE_COUNT 32
```
Then list its data in `src/data/apricorns.h`.
```diff
const struct ApricornTree gApricornTrees[APRICORN_TREE_COUNT] =
{
[APRICORN_TREE_NONE] =
{
.minimum = 1,
.maximum = 1,
.apricornType = APRICORN_RED,
},
+ [APRICORN_TREE_ROUTE101_RED_TREE] =
+ {
+ .minimum = 1,
+ .maximum = 1,
+ .apricornType = APRICORN_RED,
+ },
};
```
Finally, just place your new tree using Porymap.
Similarly to berries, the Sight Radius / Berry Tree ID field is used for the tree's ID.
![apricorn-tree-porymap](/docs/tutorials/img/apricorn_tree/apricorn-tree-porymap.png)
### Add a new apricorn type
After you created your new item, simply expand the `ApricornType` enum in `include/constants/apricorn_tree.h`.
```diff
enum ApricornType
{
[...]
APRICORN_BERRY_MARANGA = ITEM_MARANGA_BERRY,
+ APRICORN_BROWN = ITEM_BROWN_APRICORN,
};
```

View File

@ -0,0 +1,100 @@
# How to Use Namebox
_New implementation made by mudskipper13, originally made by Tustin2121._
## Overview
![Npc Trainers](/docs/tutorials/img/namebox/npc_trainers.gif)
![Pokenav](/docs/tutorials/img/namebox/pokenav.gif)
![Messagebox](/docs/tutorials/img/namebox/msgbox.gif)
This is a broad and self-contained implementation of Tustin2121's namebox feature branch [here](https://github.com/tustin2121/pokeemerald/tree/feature/namebox), which includes the following:
- Cleaner implementation of namebox onto both the field message box _and_ the field PokéNav textbox.
- New configs:
- `OW_NAME_BOX_USE_DYNAMIC_WIDTH` lets the namebox use dynamic window width depending on the speaker's string length.
- When disabled and/or the speaker name is too long, `OW_NAME_BOX_DEFAULT_WIDTH` will be used as the maximum width.
- `OW_NAME_BOX_NPC_TRAINER` lets any approaching NPC trainers shows a namebox in their dialogue automagically.
- `OW_NAME_BOX_DEFAULT_WIDTH` and `OW_NAME_BOX_DEFAULT_HEIGHT` sets the default width and height.
- `OW_NAME_BOX_FOREGROUND_COLOR` and `OW_NAME_BOX_SHADOW_COLOR` sets the default text colors, the background color is handled by the engine.
- `OW_FLAG_SUPPRESS_NAME_BOX` lets you enable/disable the namebox globally, assign a flag from [`include/constants/flags.h`](/include/constants/flags.h) onto this config to be able to use it.
- Added a Speaker Name table, frequently-used names can be stored into `gSpeakerNamesTable` in [`src/data/speaker_names.h`](/src/data/speaker_names.h) and they can accessed by using a `SP_NAME_*` constant defined in [`include/constants/speaker_names.h`](/include/constants/speaker_names.h).
- Added a new scripting macro `setspeaker ([textPointer]/[SP_NAME_*])`.
- Besides a text pointer, it is possible to use the Speaker Name table to set the textPointer with the `gSpeakerNamesTable` array instead.
- Feed it either `NULL` or `SP_NAME_NONE` will remove the namebox instead.
- `release`, `releaseall`, and `closemessage` will automatically remove the namebox, together with the messagebox.
- Added a new text control code/inline text `{SPEAKER NAME_*}`.
- Unlike the `setspeaker` macro, you can only use the `SP_NAME_*` constants for this. It is partly due to the text engine's limitation itself.
- You'll need to add the constants into `charmap.txt` to be able to use them for the same reason as above.
- Feed it `SP_NAME_NONE` to remove the namebox manually.
- Similarly, `release`, `releaseall`, and `closemessage` will automatically remove the namebox, together with the message box.
## Usage
### `setspeaker`
#### Using a text pointer
First, define your speaker's string.
```
Speaker_Jeremy:
.string "Jeremy$"
```
And then in your script, add the `setspeaker` with the speaker's name earlier.
```
...
setspeaker Speaker_Jeremy
...
```
If you are using poryscript, you can also include the string right there with the `setspeaker` aka inline.
```
...
setspeaker("Jeremy")
...
```
#### Using a `SP_NAME_*` constant
Add the `setspeaker` with your constant.
```
setspeaker SP_NAME_JEREMY
```
For instruction on how to add a new Speaker Name, continue [here](#adding-a-new-speaker-name).
### `SPEAKER` inline
The usage is identical to using `setspeaker` with `SP_NAME_*` constant, but instead it's within your _text_ script and uses the constant you added to `charmap.txt`.
```
"{SPEAKER NAME_JEREMY}Yo wassup!"
```
For instruction on how to add a new Speaker Name, continue [here](#adding-a-new-speaker-name).
### Adding a new Speaker Name
1. Add a new constant to [`include/constants/speaker_names.h`](/include/constants/speaker_names.h) just after `SP_NAME_NONE` _and_ before `SP_NAME_COUNT`.
```diff
enum SpeakerNames {
SP_NAME_NONE = 0,
SP_NAME_MOM,
SP_NAME_PLAYER,
+ SP_NAME_JEREMY,
SP_NAME_COUNT
};
```
2. Add an entry to `gSpeakerNamesTable` in [`src/data/speaker_names.h`](/src/data/speaker_names.h) with your newly added constant as the array index.
```diff
const u8 *const gSpeakerNamesTable[SP_NAME_COUNT] =
{
[SP_NAME_MOM] = COMPOUND_STRING("MOM"),
[SP_NAME_PLAYER] = COMPOUND_STRING("{PLAYER}"),
+ [SP_NAME_JEREMY] = COMPOUND_STRING("JEREMY"),
};
```
3. In order for this constant to be usable for `{SPEAKER}` inline, you'll need to add your constant onto [`charmap.txt`](/charmap.txt). **Do note that the order here MUST match with the one in [`include/constants/speaker_names.h`](/include/constants/speaker_names.h)!**
```diff
@ Speaker names, the order must be matching with include/constants/speaker_names.h
NAME_NONE = 00
NAME_MOM = 01
NAME_PLAYER = 02
-NAME_COUNT = 03
+NAME_JEREMY = 03
+NAME_COUNT = 04
```

View File

@ -93,14 +93,21 @@ Contains more fundamental functions that control the flow of the battle. Functio
### data/battle_scripts_1.s
Each move's effect is governed by a script defined here. For a simple example, let's look at the script for Fake Out/First Impression:
TODO: New Script
```
BattleScript_EffectFirstTurnOnly::
BattleScript_EffectTaunt::
attackcanceler
jumpifnotfirstturn BattleScript_FailedFromAtkString
goto BattleScript_EffectHit
jumpifability BS_TARGET_SIDE, ABILITY_AROMA_VEIL, BattleScript_AromaVeilProtects
accuracycheck BattleScript_ButItFailed, ACC_CURR_MOVE
settaunt BattleScript_ButItFailed
attackanimation
waitanimation
printstring STRINGID_PKMNFELLFORTAUNT
waitmessage B_WAIT_TIME_LONG
goto BattleScript_MoveEnd
```
`attackcanceler` is a command that covers all the cases that could cause a move to fail before it's even attempted (e.g. paralysis). And as we can tell from the commands, if it's not the first turn, we go to `BattleScript_FailedFromAtkString` which evidently causes us to print the `attackstring` ("POKEMON used MOVE") then fail ("But it failed!"). Otherwise, we go to the generic "hit" effect which is the same script for moves that just deal damage and nothing else.
`attackcanceler` is a command that covers all cases that could cause a move to fail before it's even attempted (e.g. paralysis). The next command is a jump command. A jump command can check anything and usually comes with a jump instruction. Usually it jumps to a place from where the move should pick up because of certain conditions. The next one is an accuracy check. Accuracy checks happen after all prior move failure checks happened. The next set of commands are unique to a certain move, they are mostly the same for damaging moves but can widely differ for status moves. Lastly there is `BattleScript_MoveEnd` which the move after a succesful hit. An ability activation or specific move effect like Burn, Freeze, Absorb etc.
This is the most advanced part of the ROM. There are dozens upon dozens of commands and hundreds of scripts so this guide would go on forever if I were to go into more detail. To learn how these scripts work, it's best to look at a few examples of moves you know.

View File

@ -164,17 +164,17 @@ ASSUMPTIONS
```
### `SINGLE_BATTLE_TEST`
`SINGLE_BATTLE_TEST(name, results...)` and `DOUBLE_BATTLE_TEST(name, results...)`
Define single- and double- battles. The names should start with the name of the mechanic being tested so that it is easier to run all the related tests. `results` contains variable declarations to be placed into the `results` array which is available in tests using `PARAMETRIZE` commands.
The main differences for doubles are:
`SINGLE_BATTLE_TEST(name, results...)`, `DOUBLE_BATTLE_TEST(name, results...)`, `MULTI_BATTLE_TEST(name, results...)`, `TWO_VS_ONE_BATTLE_TEST(name, results...)`, and `ONE_VS_TWO_BATTLE_TEST(name, results...)`
Define single-, double-, 2v2-multi-, 2v1-multi-, and 1v2- battles. The names should start with the name of the mechanic being tested so that it is easier to run all the related tests. `results` contains variable declarations to be placed into the `results` array which is available in tests using `PARAMETRIZE` commands.
The main differences for doubles, 2v2, 2v1, and 1v2 are:
- Move targets sometimes need to be explicit.
- Instead of `player` and `opponent` there is `playerLeft`, `playerRight`, `opponentLeft`, and `opponentRight`.
### `AI_SINGLE_BATTLE_TEST`
`AI_SINGLE_BATTLE_TEST(name, results...)` and `AI_DOUBLE_BATTLE_TEST(name, results...)`
`AI_SINGLE_BATTLE_TEST(name, results...)`, `AI_DOUBLE_BATTLE_TEST(name, results...)`, `AI_MULTI_BATTLE_TEST(name, results...)`, `AI_TWO_VS_ONE_BATTLE_TEST(name, results...)`, and `AI_ONE_VS_TWO_BATTLE_TEST(name, results...)`
Define battles where opponent mons are controlled by AI, the same that runs
when battling regular Trainers. The flags for AI should be specified by the `AI_FLAGS` command.
The rules remain the same as with the `SINGLE` and `DOUBLE` battle tests with some differences:
The rules remain the same as with the `SINGLE`, `DOUBLE`, `MULTI`, `TWO_VS_ONE`, and `ONE_VS_TWO` battle tests with some differences:
- opponent's action is specified by the `EXPECT_MOVE` / `EXPECT_SEND_OUT` / `EXPECT_SWITCH` commands
- we don't control what opponent actually does, instead we make sure the opponent does what we expect it to do
- we still control the player's action the same way
@ -268,7 +268,7 @@ GIVEN {
```
### `PLAYER` and `OPPONENT`
`PLAYER(species)` and `OPPONENT(species`
`PLAYER(species)` and `OPPONENT(species)`
Adds the species to the player's or opponent's party respectively.
The Pokémon can be further customized with the following functions:
- `Gender(MON_MALE | MON_FEMALE)`
@ -285,11 +285,29 @@ For example to create a level 42 Wobbuffet that is poisoned:
**Note if Speed is specified for any Pokémon then it must be specified for all Pokémon.**
**Note if Moves is specified then MOVE will not automatically add moves to the moveset.**
### `MULTI_PLAYER`, `MULTI_PARTNER`, `MULTI_OPPONENT_A`, and `MULTI_OPPONENT_B`
For tests using `MULTI_BATTLE_TEST`, `AI_MULTI_BATTLE_TEST`, `TWO_VS_ONE_BATTLE_TEST`, `AI_TWO_VS_ONE_BATTLE_TEST`, `ONE_VS_TWO_BATTLE_TEST`, and `AI_ONE_VS_TWO_BATTLE_TEST`, the below must be used instead of `PLAYER(species)` and `OPPONENT(species)`.
`MULTI_PLAYER(species)`, `MULTI_PARTNER(species)`, `MULTI_OPPONENT_A(species)`, and `MULTI_OPPONENT_B(species)`
Adds the species to the player's, player partner's, opponent A's, or opponent B's party, respectively.
Pokemon can be customised as per the guidance for `PLAYER(species)` and `OPPONENT(species)`.
The functions assign the Pokémon to the party of the trainer at `B_POSITION_PLAYER_LEFT`, `B_POSITION_PLAYER_RIGHT`, `B_POSITION_OPPONENT_LEFT`, and `B_POSITION_OPPONENT_RIGHT`, respectively.
`MULTI_PLAYER(species)` and `MULTI_OPPONENT_A(species)` set Pokémon starting at party index 0, while `MULTI_PARTNER(species)` and `MULTI_OPPONENT_B(species)` set Pokémon starting at party index 3.
For `ONE_VS_TWO` tests, `MULTI_PLAYER(species)` must be used for all player-side Pokémon, and for `TWO_VS_ONE` tests, `MULTI_OPPONENT_A(species)` must be used for all opponent-side Pokémon.
All `MULTI_PLAYER(species)` Pokémon must be set before any `MULTI_PARTNER(species)` Pokémon, and all `MULTI_OPPONENT_A(species)` must be set before any `MULTI_OPPONENT_B(species)` Pokémon, else Pokémon will be set in the incorrect parties in the test.
**Note where a side in a test has two trainers, the test setup manages the assigning of correct multi-party orders, therefore when using functions such as SEND_OUT, Player and Opponent A Pokémon may be referenced using indexes 0, 1, and 2, and Player's Partner and Opponent B Pokémon may be referenced using indexes 3, 4, and 5.**
### `AI_FLAGS`
`AI_FLAGS(flags)`
Specifies which AI flags are run during the test. Has use only for AI tests.
Specifies which AI flags are run for all battlers during the test. Has use only for AI tests.
The most common combination is `AI_FLAGS(AI_FLAG_CHECK_BAD_MOVE | AI_FLAG_CHECK_VIABILITY | AI_FLAG_TRY_TO_FAINT)` which is the general 'smart' AI.
### `BATTLER_AI_FLAGS`
`BATTLER_AI_FLAGS(battler, flags)`
Specifies additional AI flags to be applied to specific battlers (battler 0/1/2/3). Has use only for AI tests.
Must be used strictly after `AI_FLAGS(flags)`, which overwrites all existing flags.
Example: `BATTLER_AI_FLAGS(3, AI_FLAG_RISKY)` used after `AI_FLAGS(AI_FLAG_CHECK_BAD_MOVE | AI_FLAG_CHECK_VIABILITY | AI_FLAG_TRY_TO_FAINT)`
will set `AI_FLAG_RISKY` to only `battler3` (Opponent B), in addition to the flags set by `AI_FLAGS`.
### `WHEN`
```
...

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 540 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 784 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 344 B

After

Width:  |  Height:  |  Size: 247 B

View File

@ -0,0 +1,19 @@
JASC-PAL
0100
16
115 197 164
0 0 0
255 255 255
255 255 255
255 255 255
255 255 255
255 255 255
255 255 255
255 255 255
255 255 255
255 255 255
255 255 255
255 255 255
255 255 255
255 255 255
255 0 255

Binary file not shown.

After

Width:  |  Height:  |  Size: 313 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 345 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 647 B

After

Width:  |  Height:  |  Size: 4.6 KiB

View File

@ -5,12 +5,12 @@ JASC-PAL
40 40 32
64 64 48
16 16 16
136 64 48
136 64 62
64 24 16
192 80 24
193 108 65
216 216 224
136 120 136
200 184 0
159 147 159
197 148 0
0 0 0
0 0 0
0 0 0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 671 B

After

Width:  |  Height:  |  Size: 600 B

View File

@ -1,19 +1,19 @@
JASC-PAL
0100
16
255 0 25
128 196 156
8 8 7
0 0 0
52 51 48
21 20 18
121 53 31
185 90 59
36 14 7
255 255 255
210 184 61
91 41 25
92 92 92
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
136 59 35
185 90 59
210 184 61
159 147 159
223 218 223
255 255 255
255 0 0
255 0 0
255 0 0
255 0 0
255 0 0

View File

@ -1,19 +1,19 @@
JASC-PAL
0100
16
152 208 160
0 0 24
0 0 0
8 41 115
0 16 74
115 106 98
164 148 139
24 24 24
128 196 156
8 8 7
51 76 95
82 75 73
92 92 92
122 112 109
167 154 149
210 184 61
159 147 159
223 218 223
255 255 255
213 189 57
90 90 90
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
255 0 0
255 0 0
255 0 0
255 0 0
255 0 0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 669 B

After

Width:  |  Height:  |  Size: 599 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 828 B

After

Width:  |  Height:  |  Size: 772 B

View File

@ -2,18 +2,18 @@ JASC-PAL
0100
16
152 208 160
24 24 16
40 40 32
64 64 48
16 16 16
104 56 48
136 64 62
64 24 16
192 80 24
136 120 136
136 64 48
193 108 65
216 216 224
216 136 0
176 160 184
80 72 80
159 147 159
197 148 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 940 B

After

Width:  |  Height:  |  Size: 796 B

View File

@ -1,19 +1,19 @@
JASC-PAL
0100
16
238 255 0
128 196 156
8 8 7
52 51 48
0 0 0
121 53 31
21 20 18
185 90 59
36 14 7
255 255 255
210 184 61
91 41 25
92 92 92
176 176 176
0 0 0
0 0 0
0 0 0
0 0 0
136 59 35
185 90 59
210 184 61
159 147 159
223 218 223
255 255 255
255 0 0
255 0 0
255 0 0
255 0 0
255 0 0

View File

@ -1,19 +1,19 @@
JASC-PAL
0100
16
238 255 0
8 8 0
8 41 115
0 0 0
115 106 98
0 16 74
164 148 139
24 24 24
128 196 156
8 8 7
56 76 139
78 73 71
92 92 92
117 108 106
159 148 145
210 184 61
159 147 159
223 218 223
255 255 255
213 189 57
90 90 90
180 180 180
0 0 0
0 0 0
0 0 0
0 0 0
255 0 0
255 0 0
255 0 0
255 0 0
255 0 0

View File

@ -2,14 +2,14 @@ JASC-PAL
0100
16
152 208 160
8 24 40
16 40 64
37 73 109
14 62 109
16 16 16
88 80 80
40 40 32
168 160 152
144 144 120
128 120 112
228 228 228
175 180 191
216 216 200
216 136 0
184 184 168

Binary file not shown.

After

Width:  |  Height:  |  Size: 205 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 213 B

15
include/apricorn_tree.h Normal file
View File

@ -0,0 +1,15 @@
#ifndef GUARD_APRICORN_TREE_H
#define GUARD_APRICORN_TREE_H
#include "constants/apricorn_tree.h"
bool8 IsApricornTreePicked(u32 id);
void SetApricornTreePicked(u32 id);
void DailyResetApricornTrees(void);
void ObjectEventInteractionGetApricornTreeData(void);
void ObjectEventInteractionPickApricornTree(void);
enum ApricornType GetApricornTypeByApricornTreeId(u32 id);
u8 GetApricornCountByApricornTreeId(u32 id);
#endif //GUARD_APRICORN_TREE_H

View File

@ -2,8 +2,12 @@
#define GUARD_BATTLE_H
// should they be included here or included individually by every file?
#include "constants/battle_end_turn.h"
#include "constants/abilities.h"
#include "constants/battle.h"
#include "constants/form_change_types.h"
#include "constants/hold_effects.h"
#include "constants/moves.h"
#include "battle_main.h"
#include "battle_message.h"
#include "battle_util.h"
@ -98,8 +102,7 @@ struct DisableStruct
u8 battlerWithSureHit;
u8 isFirstTurn;
u8 mimickedMoves:4;
u8 chargeTimer:4;
u8 rechargeTimer;
u8 rechargeTimer:4;
u8 autotomizeCount;
u16 slowStartTimer;
u16 embargoTimer;
@ -114,7 +117,6 @@ struct DisableStruct
u8 usedMoves:4;
u8 truantCounter:1;
u8 truantSwitchInHack:1;
u8 noRetreat:1;
u8 tarShot:1;
u8 octolock:1;
u8 cudChew:1;
@ -124,6 +126,7 @@ struct DisableStruct
u8 usedProteanLibero:1;
u8 flashFireBoosted:1;
u8 boosterEnergyActivated:1;
u8 padding1:1;
u16 overwrittenAbility; // abilities overwritten during battle (keep separate from battle history in case of switching)
u8 roostActive:1;
u8 unburdenActive:1;
@ -132,9 +135,10 @@ struct DisableStruct
u8 unnerveActivated:1; // Unnerve and As One (Unnerve part) activate only once per switch in
u8 hazardsDone:1;
u8 endured:1;
u8 octolockedBy:3;
u8 tryEjectPack:1;
u8 octolockedBy:3;
u8 paradoxBoostedStat:4;
u8 padding2:1;
};
// Fully Cleared each turn after end turn effects are done. A few things are cleared before end turn effects
@ -149,9 +153,8 @@ struct ProtectStruct
u32 chargingTurn:1;
u32 fleeType:2; // 0: Normal, 1: FLEE_ITEM, 2: FLEE_ABILITY
u32 unableToUseMove:1; // Not to be confused with HITMARKER_UNABLE_TO_USE_MOVE (It is questionable though if there is a difference. Needs further research)
u32 notFirstStrike:1;
u32 laggingTail:1;
u32 palaceUnableToUseMove:1;
u32 powderSelfDmg:1;
u32 statRaised:1;
u32 usedCustapBerry:1; // also quick claw
u32 touchedProtectLike:1;
@ -165,11 +168,10 @@ struct ProtectStruct
u16 usedAllySwitch:1;
u16 lashOutAffected:1;
// End of 32-bit bitfield
u32 helpingHand:3;
u16 helpingHand:3;
u16 assuranceDoubled:1;
u16 myceliumMight:1;
u16 laggingTail:1;
u16 padding:10;
u16 padding:11;
// End of 16-bit bitfield
u16 physicalDmg;
u16 specialDmg;
@ -184,20 +186,20 @@ struct SpecialStatus
s32 specialDmg;
u8 changedStatsBattlerId; // Battler that was responsible for the latest stat change. Can be self.
u8 statLowered:1;
u8 lightningRodRedirected:1;
u8 abilityRedirected:1;
u8 restoredBattlerSprite: 1;
u8 faintedHasReplacement:1;
u8 preventLifeOrbDamage:1; // So that Life Orb doesn't activate various effects.
u8 afterYou:1;
u8 enduredDamage:1;
u8 stormDrainRedirected:1;
u8 dancerUsedMove:1;
u8 padding1:1;
// End of byte
u8 switchInAbilityDone:1;
u8 switchInItemDone:1;
u8 instructedChosenTarget:3;
u8 berryReduced:1;
u8 neutralizingGasRemoved:1; // See VARIOUS_TRY_END_NEUTRALIZING_GAS
u8 padding:1;
u8 padding2:1;
// End of byte
u8 gemParam;
// End of byte
@ -209,9 +211,8 @@ struct SpecialStatus
u8 teraShellAbilityDone:1;
u8 criticalHit:1;
// End of byte
u8 dancerUsedMove:1;
u8 dancerOriginalTarget:3;
u8 unused:4;
u8 padding3:5;
// End of byte
};
@ -234,7 +235,7 @@ struct SideTimer
u8 followmePowder:1; // Rage powder, does not affect grass type pokemon.
u8 retaliateTimer;
u16 damageNonTypesTimer;
u8 damageNonTypesType;
enum Type damageNonTypesType;
u16 rainbowTimer;
u16 seaOfFireTimer;
u16 swampTimer;
@ -266,12 +267,12 @@ struct WishFutureKnock
struct AI_SavedBattleMon
{
u16 ability;
enum Ability ability;
u16 moves[MAX_MON_MOVES];
u16 heldItem;
u16 species:15;
u16 saved:1;
u8 types[3];
enum Type types[3];
};
struct AiPartyMon
@ -279,7 +280,7 @@ struct AiPartyMon
u16 species;
u16 item;
u16 heldEffect;
u16 ability;
enum Ability ability;
u16 level;
u16 moves[MAX_MON_MOVES];
u32 status;
@ -312,7 +313,7 @@ struct SimulatedDamage
// Ai Data used when deciding which move to use, computed only once before each turn's start.
struct AiLogicData
{
u16 abilities[MAX_BATTLERS_COUNT];
enum Ability abilities[MAX_BATTLERS_COUNT];
u16 items[MAX_BATTLERS_COUNT];
u16 holdEffects[MAX_BATTLERS_COUNT];
u8 holdEffectParams[MAX_BATTLERS_COUNT];
@ -356,7 +357,7 @@ struct AiThinkingStruct
struct BattleHistory
{
u16 abilities[MAX_BATTLERS_COUNT];
enum Ability abilities[MAX_BATTLERS_COUNT];
u8 itemEffects[MAX_BATTLERS_COUNT];
u16 usedMoves[MAX_BATTLERS_COUNT][MAX_MON_MOVES];
u16 moveHistory[MAX_BATTLERS_COUNT][AI_MOVE_HISTORY_COUNT]; // 3 last used moves for each battler
@ -583,10 +584,11 @@ struct BattlerState
u32 pursuitTarget:1;
u32 stompingTantrumTimer:2;
u32 canPickupItem:1;
u32 itemCanBeKnockedOff:1;
u32 ateBoost:1;
u32 wasAboveHalfHp:1; // For Berserk, Emergency Exit, Wimp Out and Anger Shell.
u32 commanderSpecies:11;
u32 padding:4;
u32 selectionScriptFinished:1;
u32 padding:3;
// End of Word
};
@ -602,6 +604,23 @@ struct PartyState
u32 changedSpecies:11; // For forms when multiple mons can change into the same pokemon.
u32 sentOut:1;
u32 padding:9;
u16 usedHeldItem;
};
struct EventStates
{
enum EndTurnResolutionOrder endTurn:8;
u32 endTurnBlock:8; // FirstEventBlock, SecondEventBlock, ThirdEventBlock
enum BattlerId endTurnBattler:4;
u32 arenaTurn:8;
enum BattleSide battlerSide:4;
enum BattlerId moveEndBattler:4;
enum FirstTurnEventsStates beforeFristTurn:8;
enum FaintedActions faintedAction:8;
enum BattlerId faintedActionBattler:4;
enum MoveSuccessOrder atkCanceler:8;
enum BattleIntroStates battleIntro:8;
u32 padding:24;
};
// Cleared at the beginning of the battle. Fields need to be cleared when needed manually otherwise.
@ -609,10 +628,7 @@ struct BattleStruct
{
struct BattlerState battlerState[MAX_BATTLERS_COUNT];
struct PartyState partyState[NUM_BATTLE_SIDES][PARTY_SIZE];
u8 eventBlockCounter;
u8 turnEffectsBattlerId;
u8 endTurnEventsCounter;
u16 wrappedMove[MAX_BATTLERS_COUNT];
struct EventStates eventState;
u16 moveTarget[MAX_BATTLERS_COUNT];
u32 expShareExpValue;
u32 expValue;
@ -624,18 +640,13 @@ struct BattleStruct
u8 givenExpMons; // Bits for enemy party's pokemon that gave exp to player's party.
u8 expSentInMons; // As bits for player party mons - not including exp share mons.
u8 wildVictorySong;
u8 dynamicMoveType;
u8 wrappedBy[MAX_BATTLERS_COUNT];
enum Type dynamicMoveType;
u8 battlerPreventingSwitchout;
u8 moneyMultiplier:6;
u8 moneyMultiplierItem:1;
u8 moneyMultiplierMove:1;
u8 savedTurnActionNumber;
u8 eventsBeforeFirstTurnState;
u8 faintedActionsState;
u8 faintedActionsBattlerId;
u8 scriptPartyIdx; // for printing the nickname
bool8 selectionScriptFinished[MAX_BATTLERS_COUNT];
u8 battlerPartyIndexes[MAX_BATTLERS_COUNT];
u8 monToSwitchIntoId[MAX_BATTLERS_COUNT];
u8 battlerPartyOrders[MAX_BATTLERS_COUNT][PARTY_SIZE / 2];
@ -667,32 +678,26 @@ struct BattleStruct
u8 multipleSwitchInState:2;
u8 multipleSwitchInCursor:3;
u8 sleepClauseNotBlocked:1;
u8 moldBreakerActive:1;
u8 isSkyBattle:1;
u8 multipleSwitchInSortedBattlers[MAX_BATTLERS_COUNT];
void (*savedCallback)(void);
u16 usedHeldItems[PARTY_SIZE][NUM_BATTLE_SIDES]; // For each party member and side. For harvest, recycle
u16 chosenItem[MAX_BATTLERS_COUNT];
u16 choicedMove[MAX_BATTLERS_COUNT];
u16 changedItems[MAX_BATTLERS_COUNT];
u8 switchInBattlerCounter;
u8 arenaTurnCounter;
u8 turnSideTracker;
u16 lastTakenMoveFrom[MAX_BATTLERS_COUNT][MAX_BATTLERS_COUNT]; // a 2-D array [target][attacker]
union {
struct LinkBattlerHeader linkBattlerHeader;
struct BattleVideo battleVideo;
} multiBuffer;
u8 startingStatus:6; // status to apply at battle start. defined in constants/battle.h
u8 startingStatusDone:1;
u8 terrainDone:1;
u8 overworldWeatherDone:1;
u8 startingStatus; // status to apply at battle start. defined in constants/battle.h
u8 battlerKOAnimsRunning:3;
u8 isAtkCancelerForCalledMove:1; // Certain cases in atk canceler should only be checked once, when the original move is called, however others need to be checked the twice.
u8 friskedAbility:1; // If identifies two mons, show the ability pop-up only once.
u8 fickleBeamBoosted:1;
u8 poisonPuppeteerConfusion:1;
u8 toxicChainPriority:1; // If Toxic Chain will trigger on target, all other non volatiles will be blocked
u8 moldBreakerActive:1;
u16 startingStatusTimer;
u8 atkCancelerTracker;
struct BattleTvMovePoints tvMovePoints;
struct BattleTv tv;
u8 AI_monToSwitchIntoId[MAX_BATTLERS_COUNT];
@ -704,7 +709,6 @@ struct BattleStruct
u8 debugBattler;
u8 magnitudeBasePower;
u8 presentBasePower;
u8 roostTypes[MAX_BATTLERS_COUNT][NUM_BATTLE_SIDES];
u8 savedBattlerTarget[5];
u8 savedBattlerAttacker[5];
u8 savedTargetCount:4;
@ -714,11 +718,9 @@ struct BattleStruct
struct DynamaxData dynamax;
struct BattleGimmickData gimmick;
const u8 *trainerSlideMsg;
enum BattleIntroStates introState:8;
u8 stolenStats[NUM_BATTLE_STATS]; // hp byte is used for which stats to raise, other inform about by how many stages
u8 lastMoveTarget[MAX_BATTLERS_COUNT]; // The last target on which each mon used a move, for the sake of Instruct
u16 tracedAbility[MAX_BATTLERS_COUNT];
u16 hpBefore[MAX_BATTLERS_COUNT]; // Hp of battlers before using a move. For Berserk and Anger Shell.
enum Ability tracedAbility[MAX_BATTLERS_COUNT];
struct Illusion illusion[MAX_BATTLERS_COUNT];
u8 soulheartBattlerId;
u8 friskedBattler; // Frisk needs to identify 2 battlers in double battles.
@ -735,7 +737,6 @@ struct BattleStruct
u8 throwingPokeBall:1;
u8 ballSpriteIds[2]; // item gfx, window gfx
u8 moveInfoSpriteId; // move info, window gfx
u8 appearedInBattle; // Bitfield to track which Pokemon appeared in battle. Used for Burmy's form change
u8 skyDropTargets[MAX_BATTLERS_COUNT]; // For Sky Drop, to account for if multiple Pokemon use Sky Drop in a double battle.
// When using a move which hits multiple opponents which is then bounced by a target, we need to make sure, the move hits both opponents, the one with bounce, and the one without.
u16 beatUpSpecies[PARTY_SIZE]; // Species for Gen5+ Beat Up, otherwise party indexes
@ -747,11 +748,9 @@ struct BattleStruct
u8 bonusCritStages[MAX_BATTLERS_COUNT]; // G-Max Chi Strike boosts crit stages of allies.
u8 itemPartyIndex[MAX_BATTLERS_COUNT];
u8 itemMoveIndex[MAX_BATTLERS_COUNT];
u8 isSkyBattle:1;
s32 aiDelayTimer; // Counts number of frames AI takes to choose an action.
s32 aiDelayFrames; // Number of frames it took to choose an action.
s32 aiDelayCycles; // Number of cycles it took to choose an action.
u8 stickySyrupdBy[MAX_BATTLERS_COUNT];
u8 supremeOverlordCounter[MAX_BATTLERS_COUNT];
u8 shellSideArmCategory[MAX_BATTLERS_COUNT][MAX_BATTLERS_COUNT];
u8 speedTieBreaks; // MAX_BATTLERS_COUNT! values.
@ -764,6 +763,7 @@ struct BattleStruct
u8 pursuitStoredSwitch; // Stored id for the Pursuit target's switch
s32 battlerExpReward;
u16 prevTurnSpecies[MAX_BATTLERS_COUNT]; // Stores species the AI has in play at start of turn
s16 passiveHpUpdate[MAX_BATTLERS_COUNT]; // non-move damage and healing
s16 moveDamage[MAX_BATTLERS_COUNT];
s16 critChance[MAX_BATTLERS_COUNT];
u16 moveResultFlags[MAX_BATTLERS_COUNT];
@ -775,15 +775,19 @@ struct BattleStruct
u8 printedStrongWindsWeakenedAttack:1;
u8 numSpreadTargets:2;
u8 noTargetPresent:1;
u8 cheekPouchActivated:1;
s16 savedcheekPouchDamage; // Cheek Pouch can happen in the middle of an attack execution so we need to store the current dmg
u8 padding2:1;
struct MessageStatus slideMessageStatus;
u8 trainerSlideSpriteIds[MAX_BATTLERS_COUNT];
u8 hazardsQueue[NUM_BATTLE_SIDES][HAZARDS_MAX_COUNT];
u8 numHazards[NUM_BATTLE_SIDES];
u8 hazardsCounter:4; // Counter for applying hazard on switch in
enum SubmoveState submoveAnnouncement:2;
u8 tryDestinyBond:1;
u8 tryGrudge:1;
u16 flingItem;
u8 incrementEchoedVoice:1;
u8 echoedVoiceCounter:3;
u8 padding3:4;
};
struct AiBattleData
@ -827,7 +831,7 @@ static inline bool32 IsBattleMoveStatus(u32 move)
* times with one type because it shares the 'GetBattlerTypes' result. */
#define _IS_BATTLER_ANY_TYPE(battler, ignoreTera, ...) \
({ \
u32 types[3]; \
enum Type types[3]; \
GetBattlerTypes(battler, ignoreTera, types); \
RECURSIVELY(R_FOR_EACH(_IS_BATTLER_ANY_TYPE_HELPER, __VA_ARGS__)) FALSE; \
})
@ -841,7 +845,7 @@ static inline bool32 IsBattleMoveStatus(u32 move)
#define IS_BATTLER_TYPELESS(battlerId) \
({ \
u32 types[3]; \
enum Type types[3]; \
GetBattlerTypes(battlerId, FALSE, types); \
types[0] == TYPE_MYSTERY && types[1] == TYPE_MYSTERY && types[2] == TYPE_MYSTERY; \
})
@ -905,7 +909,7 @@ struct BattleScripting
s32 savedDmg;
u16 unused_0x2c;
u16 moveEffect;
u16 multihitMoveEffect;
u16 unused_0x30;
u8 illusionNickHack; // To properly display nick in STRINGID_ENEMYABOUTTOSWITCHPKMN.
bool8 fixedPopup; // Force ability popup to stick until manually called back
u16 abilityPopupOverwrite;
@ -1052,7 +1056,7 @@ extern u16 gChosenMove;
extern u16 gCalledMove;
extern s32 gBideDmg[MAX_BATTLERS_COUNT];
extern u16 gLastUsedItem;
extern u16 gLastUsedAbility;
extern enum Ability gLastUsedAbility;
extern u8 gBattlerAttacker;
extern u8 gBattlerTarget;
extern u8 gBattlerFainted;
@ -1188,7 +1192,7 @@ static inline u32 GetBattlerSide(u32 battler)
return GetBattlerPosition(battler) & BIT_SIDE;
}
static inline u32 IsOnPlayerSide(u32 battler)
static inline bool32 IsOnPlayerSide(u32 battler)
{
return GetBattlerSide(battler) == B_SIDE_PLAYER;
}
@ -1209,7 +1213,7 @@ static inline struct Pokemon* GetBattlerMon(u32 battler)
return !IsOnPlayerSide(battler) ? &gEnemyParty[index] : &gPlayerParty[index];
}
static inline struct Pokemon *GetSideParty(u32 side)
static inline struct Pokemon *GetSideParty(enum BattleSide side)
{
return side == B_SIDE_PLAYER ? gPlayerParty : gEnemyParty;
}
@ -1226,7 +1230,7 @@ static inline struct PartyState *GetBattlerPartyState(u32 battler)
static inline bool32 IsDoubleBattle(void)
{
return gBattleTypeFlags & BATTLE_TYPE_DOUBLE;
return (gBattleTypeFlags & BATTLE_TYPE_MORE_THAN_TWO_BATTLERS);
}
static inline bool32 IsSpreadMove(u32 moveTarget)
@ -1237,7 +1241,7 @@ static inline bool32 IsSpreadMove(u32 moveTarget)
static inline bool32 IsDoubleSpreadMove(void)
{
return gBattleStruct->numSpreadTargets > 1
&& !(gHitMarker & (HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_HP_UPDATE | HITMARKER_UNABLE_TO_USE_MOVE))
&& !(gHitMarker & HITMARKER_UNABLE_TO_USE_MOVE)
&& IsSpreadMove(GetBattlerMoveTargetType(gBattlerAttacker, gCurrentMove));
}
@ -1253,4 +1257,18 @@ static inline u32 GetChosenMoveFromPosition(u32 battler)
return gBattleMons[battler].moves[gBattleStruct->chosenMovePositions[battler]];
}
static inline void SetPassiveDamageAmount(u32 battler, s32 value)
{
if (value == 0)
value = 1;
gBattleStruct->passiveHpUpdate[battler] = value;
}
static inline void SetHealAmount(u32 battler, s32 value)
{
if (value == 0)
value = 1;
gBattleStruct->passiveHpUpdate[battler] = -1 * value;
}
#endif // GUARD_BATTLE_H

View File

@ -23,6 +23,11 @@ enum StatChange
STAT_CHANGE_SPEED_2,
STAT_CHANGE_SPATK_2,
STAT_CHANGE_SPDEF_2,
STAT_CHANGE_ATK_3,
STAT_CHANGE_DEF_3,
STAT_CHANGE_SPEED_3,
STAT_CHANGE_SPATK_3,
STAT_CHANGE_SPDEF_3,
STAT_CHANGE_ACC,
STAT_CHANGE_EVASION
};

View File

@ -38,14 +38,15 @@ enum ShouldSwitchScenario
enum SwitchType
{
SWITCH_AFTER_KO,
SWITCH_MID_BATTLE,
SWITCH_MID_BATTLE_FORCED,
SWITCH_MID_BATTLE_OPTIONAL,
};
void GetAIPartyIndexes(u32 battlerId, s32 *firstId, s32 *lastId);
void AI_TrySwitchOrUseItem(u32 battler);
u32 GetMostSuitableMonToSwitchInto(u32 battler, enum SwitchType switchType);
bool32 ShouldSwitch(u32 battler);
bool32 IsMonGrounded(u16 heldItemEffect, u32 ability, u8 type1, u8 type2);
bool32 IsMonGrounded(enum HoldEffect heldItemEffect, enum Ability ability, enum Type type1, enum Type type2);
void ModifySwitchAfterMoveScoring(u32 battler);
#endif // GUARD_BATTLE_AI_SWITCH_ITEMS_H

View File

@ -4,8 +4,6 @@
#include "battle_ai_main.h"
#include "battle_ai_field_statuses.h"
#define FOE(battler) ((BATTLE_OPPOSITE(battler)) & BIT_SIDE)
// Roll boundaries used by AI when scoring. Doesn't affect actual damage dealt.
#define MAX_ROLL_PERCENTAGE DMG_ROLL_PERCENT_HI
#define MIN_ROLL_PERCENTAGE DMG_ROLL_PERCENT_LO
@ -76,6 +74,7 @@ bool32 AI_IsSlower(u32 battlerAi, u32 battlerDef, u32 aiMove, u32 playerMove, en
bool32 AI_IsPartyMonFaster(u32 battlerAi, u32 battlerDef, struct BattlePokemon switchinCandidate, u32 aiMove, u32 playerMove, enum ConsiderPriority considerPriority);
bool32 AI_IsPartyMonSlower(u32 battlerAi, u32 battlerDef, struct BattlePokemon switchinCandidate, u32 aiMove, u32 playerMove, enum ConsiderPriority considerPriority);
bool32 AI_RandLessThan(u32 val);
bool32 AI_IsBattlerGrounded(u32 battler);
u32 AI_GetDamage(u32 battlerAtk, u32 battlerDef, u32 moveIndex, enum DamageCalcContext calcContext, struct AiLogicData *aiData);
bool32 IsAiVsAiBattle(void);
bool32 BattlerHasAi(u32 battlerId);
@ -88,9 +87,9 @@ void ClearBattlerMoveHistory(u32 battlerId);
void RecordLastUsedMoveBy(u32 battlerId, u32 move);
void RecordAllMoves(u32 battler);
void RecordKnownMove(u32 battlerId, u32 move);
void RecordAbilityBattle(u32 battlerId, u32 abilityId);
void RecordAbilityBattle(u32 battlerId, enum Ability abilityId);
void ClearBattlerAbilityHistory(u32 battlerId);
void RecordItemEffectBattle(u32 battlerId, u32 itemEffect);
void RecordItemEffectBattle(u32 battlerId, enum HoldEffect itemEffect);
void ClearBattlerItemEffectHistory(u32 battlerId);
void SaveBattlerData(u32 battlerId);
void SetBattlerData(u32 battlerId);
@ -110,32 +109,35 @@ u32 GetBestDmgMoveFromBattler(u32 battlerAtk, u32 battlerDef, enum DamageCalcCon
u32 GetBestDmgFromBattler(u32 battler, u32 battlerTarget, enum DamageCalcContext calcContext);
bool32 CanTargetMoveFaintAi(u32 move, u32 battlerDef, u32 battlerAtk, u32 nHits);
bool32 CanTargetFaintAiWithMod(u32 battlerDef, u32 battlerAtk, s32 hpMod, s32 dmgMod);
s32 AI_DecideKnownAbilityForTurn(u32 battlerId);
enum ItemHoldEffect AI_DecideHoldEffectForTurn(u32 battlerId);
bool32 DoesBattlerIgnoreAbilityChecks(u32 battlerAtk, u32 atkAbility, u32 move);
enum Ability AI_DecideKnownAbilityForTurn(u32 battlerId);
enum HoldEffect AI_DecideHoldEffectForTurn(u32 battlerId);
bool32 DoesBattlerIgnoreAbilityChecks(u32 battlerAtk, enum Ability atkAbility, u32 move);
u32 AI_GetWeather(void);
u32 AI_GetSwitchinWeather(struct BattlePokemon battleMon);
enum WeatherState IsWeatherActive(u32 flags);
bool32 CanAIFaintTarget(u32 battlerAtk, u32 battlerDef, u32 numHits);
bool32 CanIndexMoveFaintTarget(u32 battlerAtk, u32 battlerDef, u32 index, enum DamageCalcContext calcContext);
bool32 HasDamagingMove(u32 battlerId);
bool32 HasDamagingMoveOfType(u32 battlerId, u32 type);
bool32 HasDamagingMove(u32 battler);
bool32 HasDamagingMoveOfType(u32 battler, enum Type type);
u32 GetBattlerSecondaryDamage(u32 battlerId);
bool32 BattlerWillFaintFromWeather(u32 battler, u32 ability);
bool32 BattlerWillFaintFromSecondaryDamage(u32 battler, u32 ability);
bool32 ShouldTryOHKO(u32 battlerAtk, u32 battlerDef, u32 atkAbility, u32 defAbility, u32 move);
bool32 BattlerWillFaintFromWeather(u32 battler, enum Ability ability);
bool32 BattlerWillFaintFromSecondaryDamage(u32 battler, enum Ability ability);
bool32 ShouldTryOHKO(u32 battlerAtk, u32 battlerDef, enum Ability atkAbility, enum Ability defAbility, u32 move);
bool32 ShouldUseRecoilMove(u32 battlerAtk, u32 battlerDef, u32 recoilDmg, u32 moveIndex);
bool32 ShouldAbsorb(u32 battlerAtk, u32 battlerDef, u32 move, s32 damage);
bool32 ShouldRecover(u32 battlerAtk, u32 battlerDef, u32 move, u32 healPercent);
bool32 ShouldSetScreen(u32 battlerAtk, u32 battlerDef, enum BattleMoveEffects moveEffect);
enum AIPivot ShouldPivot(u32 battlerAtk, u32 battlerDef, u32 defAbility, u32 move, u32 moveIndex);
bool32 ShouldCureStatus(u32 battlerAtk, u32 battlerDef, struct AiLogicData *aiData);
bool32 ShouldCureStatusWithItem(u32 battlerAtk, u32 battlerDef, struct AiLogicData *aiData);
enum AIPivot ShouldPivot(u32 battlerAtk, u32 battlerDef, enum Ability defAbility, u32 move, u32 moveIndex);
bool32 IsRecycleEncouragedItem(u32 item);
bool32 ShouldRestoreHpBerry(u32 battlerAtk, u32 item);
bool32 IsStatBoostingBerry(u32 item);
bool32 CanKnockOffItem(u32 battler, u32 item);
bool32 IsAbilityOfRating(u32 ability, s8 rating);
bool32 AI_IsAbilityOnSide(u32 battlerId, u32 ability);
bool32 AI_MoveMakesContact(u32 ability, enum ItemHoldEffect holdEffect, u32 move);
bool32 IsAbilityOfRating(enum Ability ability, s8 rating);
bool32 AI_IsAbilityOnSide(u32 battlerId, enum Ability ability);
bool32 AI_MoveMakesContact(enum Ability ability, enum HoldEffect holdEffect, u32 move);
bool32 IsConsideringZMove(u32 battlerAtk, u32 battlerDef, u32 move);
bool32 ShouldUseZMove(u32 battlerAtk, u32 battlerDef, u32 chosenMove);
void SetAIUsingGimmick(u32 battler, enum AIConsiderGimmick use);
bool32 IsAIUsingGimmick(u32 battler);
@ -144,13 +146,14 @@ bool32 CanEndureHit(u32 battler, u32 battlerTarget, u32 move);
// stat stage checks
bool32 AnyStatIsRaised(u32 battlerId);
bool32 CanLowerStat(u32 battlerAtk, u32 battlerDef, struct AiLogicData *aiData, u32 stat);
bool32 BattlerStatCanRise(u32 battler, u32 battlerAbility, u32 stat);
bool32 CanLowerStat(u32 battlerAtk, u32 battlerDef, struct AiLogicData *aiData, enum Stat stat);
bool32 BattlerStatCanRise(u32 battler, enum Ability battlerAbility, enum Stat stat);
bool32 AreBattlersStatsMaxed(u32 battler);
u32 CountPositiveStatStages(u32 battlerId);
u32 CountNegativeStatStages(u32 battlerId);
// move checks
bool32 Ai_IsPriorityBlocked(u32 battlerAtk, u32 battlerDef, u32 move, struct AiLogicData *aiData);
bool32 MovesWithCategoryUnusable(u32 attacker, u32 target, enum DamageCategory category);
enum MoveComparisonResult AI_WhichMoveBetter(u32 move1, u32 move2, u32 battlerAtk, u32 battlerDef, s32 noOfHitsToKo);
struct SimulatedDamage AI_CalcDamageSaveBattlers(u32 move, u32 battlerAtk, u32 battlerDef, uq4_12_t *typeEffectiveness, enum AIConsiderGimmick considerGimmickAtk, enum AIConsiderGimmick considerGimmickDef);
@ -166,9 +169,10 @@ uq4_12_t AI_GetMoveEffectiveness(u32 move, u32 battlerAtk, u32 battlerDef);
u16 *GetMovesArray(u32 battler);
bool32 IsConfusionMoveEffect(enum BattleMoveEffects moveEffect);
bool32 HasMove(u32 battlerId, u32 move);
u32 GetIndexInMoveArray(u32 battler, u32 move);
bool32 HasOnlyMovesWithCategory(u32 battlerId, enum DamageCategory category, bool32 onlyOffensive);
bool32 HasMoveWithCategory(u32 battler, enum DamageCategory category);
bool32 HasMoveWithType(u32 battler, u32 type);
bool32 HasMoveWithType(u32 battler, enum Type type);
bool32 HasMoveWithEffect(u32 battler, enum BattleMoveEffects moveEffect);
bool32 HasMoveWithAIEffect(u32 battler, u32 aiEffect);
bool32 HasBattlerSideMoveWithEffect(u32 battler, u32 effect);
@ -181,15 +185,16 @@ bool32 HasBattlerSideMoveWithAdditionalEffect(u32 battler, u32 moveEffect);
bool32 HasMoveWithCriticalHitChance(u32 battlerId);
bool32 HasMoveWithMoveEffectExcept(u32 battlerId, u32 moveEffect, enum BattleMoveEffects exception);
bool32 HasMoveThatLowersOwnStats(u32 battlerId);
bool32 HasMoveWithLowAccuracy(u32 battlerAtk, u32 battlerDef, u32 accCheck, bool32 ignoreStatus, u32 atkAbility, u32 defAbility, u32 atkHoldEffect, u32 defHoldEffect);
bool32 HasMoveWithLowAccuracy(u32 battlerAtk, u32 battlerDef, u32 accCheck, bool32 ignoreStatus);
bool32 HasAnyKnownMove(u32 battlerId);
bool32 IsAromaVeilProtectedEffect(enum BattleMoveEffects moveEffect);
bool32 IsNonVolatileStatusMove(u32 moveEffect);
bool32 IsMoveRedirectionPrevented(u32 battlerAtk, u32 move, u32 atkAbility);
bool32 IsMoveRedirectionPrevented(u32 battlerAtk, u32 move, enum Ability atkAbility);
bool32 IsHazardMove(u32 move);
bool32 IsTwoTurnNotSemiInvulnerableMove(u32 battlerAtk, u32 move);
bool32 IsBattlerDamagedByStatus(u32 battler);
s32 ProtectChecks(u32 battlerAtk, u32 battlerDef, u32 move, u32 predictedMove);
bool32 ShouldRaiseAnyStat(u32 battlerAtk, u32 battlerDef);
bool32 ShouldSetWeather(u32 battler, u32 weather);
bool32 ShouldClearWeather(u32 battler, u32 weather);
bool32 ShouldSetFieldStatus(u32 battler, u32 fieldStatus);
@ -215,38 +220,38 @@ bool32 IsHazardClearingMove(u32 move);
bool32 IsSubstituteEffect(enum BattleMoveEffects effect);
// status checks
bool32 AI_CanBeConfused(u32 battlerAtk, u32 battlerDef, u32 move, u32 ability);
bool32 IsBattlerIncapacitated(u32 battler, u32 ability);
bool32 AI_CanPutToSleep(u32 battlerAtk, u32 battlerDef, u32 defAbility, u32 move, u32 partnerMove);
bool32 AI_CanBeConfused(u32 battlerAtk, u32 battlerDef, u32 move, enum Ability ability);
bool32 IsBattlerIncapacitated(u32 battler, enum Ability ability);
bool32 AI_CanPutToSleep(u32 battlerAtk, u32 battlerDef, enum Ability defAbility, u32 move, u32 partnerMove);
bool32 ShouldPoison(u32 battlerAtk, u32 battlerDef);
bool32 AI_CanPoison(u32 battlerAtk, u32 battlerDef, u32 defAbility, u32 move, u32 partnerMove);
bool32 AI_CanParalyze(u32 battlerAtk, u32 battlerDef, u32 defAbility, u32 move, u32 partnerMove);
bool32 AI_CanConfuse(u32 battlerAtk, u32 battlerDef, u32 defAbility, u32 battlerAtkPartner, u32 move, u32 partnerMove);
bool32 ShouldBurn(u32 battlerAtk, u32 battlerDef, u32 abilityDef);
bool32 ShouldFreezeOrFrostbite(u32 battlerAtk, u32 battlerDef, u32 abilityDef);
bool32 ShouldParalyze(u32 battlerAtk, u32 battlerDef, u32 abilityDef);
bool32 AI_CanBurn(u32 battlerAtk, u32 battlerDef, u32 defAbility, u32 battlerAtkPartner, u32 move, u32 partnerMove);
bool32 AI_CanGiveFrostbite(u32 battlerAtk, u32 battlerDef, u32 defAbility, u32 battlerAtkPartner, u32 move, u32 partnerMove);
bool32 AI_CanBeInfatuated(u32 battlerAtk, u32 battlerDef, u32 defAbility);
bool32 AI_CanPoison(u32 battlerAtk, u32 battlerDef, enum Ability defAbility, u32 move, u32 partnerMove);
bool32 AI_CanParalyze(u32 battlerAtk, u32 battlerDef, enum Ability defAbility, u32 move, u32 partnerMove);
bool32 AI_CanConfuse(u32 battlerAtk, u32 battlerDef, enum Ability defAbility, u32 battlerAtkPartner, u32 move, u32 partnerMove);
bool32 ShouldBurn(u32 battlerAtk, u32 battlerDef, enum Ability abilityDef);
bool32 ShouldFreezeOrFrostbite(u32 battlerAtk, u32 battlerDef, enum Ability abilityDef);
bool32 ShouldParalyze(u32 battlerAtk, u32 battlerDef, enum Ability abilityDef);
bool32 AI_CanBurn(u32 battlerAtk, u32 battlerDef, enum Ability defAbility, u32 battlerAtkPartner, u32 move, u32 partnerMove);
bool32 AI_CanGiveFrostbite(u32 battlerAtk, u32 battlerDef, enum Ability defAbility, u32 battlerAtkPartner, u32 move, u32 partnerMove);
bool32 AI_CanBeInfatuated(u32 battlerAtk, u32 battlerDef, enum Ability defAbility);
bool32 AnyPartyMemberStatused(u32 battlerId, bool32 checkSoundproof);
u32 ShouldTryToFlinch(u32 battlerAtk, u32 battlerDef, u32 atkAbility, u32 defAbility, u32 move);
u32 ShouldTryToFlinch(u32 battlerAtk, u32 battlerDef, enum Ability atkAbility, enum Ability defAbility, u32 move);
bool32 ShouldTrap(u32 battlerAtk, u32 battlerDef, u32 move);
bool32 IsWakeupTurn(u32 battler);
bool32 AI_IsBattlerAsleepOrComatose(u32 battlerId);
// ability logic
bool32 IsMoxieTypeAbility(u32 ability);
bool32 DoesAbilityRaiseStatsWhenLowered(u32 ability);
bool32 ShouldTriggerAbility(u32 battlerAtk, u32 battlerDef, u32 ability);
bool32 CanEffectChangeAbility(u32 battlerAtk, u32 battlerDef, u32 effect, struct AiLogicData *aiData);
void AbilityChangeScore(u32 battlerAtk, u32 battlerDef, u32 effect, s32 *score, struct AiLogicData *aiData);
s32 BattlerBenefitsFromAbilityScore(u32 battler, u32 ability, struct AiLogicData *aiData);
bool32 IsMoxieTypeAbility(enum Ability ability);
bool32 DoesAbilityRaiseStatsWhenLowered(enum Ability ability);
bool32 ShouldTriggerAbility(u32 battlerAtk, u32 battlerDef, enum Ability ability);
bool32 CanEffectChangeAbility(u32 battlerAtk, u32 battlerDef, u32 move, struct AiLogicData *aiData);
void AbilityChangeScore(u32 battlerAtk, u32 battlerDef, u32 move, s32 *score, struct AiLogicData *aiData);
s32 BattlerBenefitsFromAbilityScore(u32 battler, enum Ability ability, struct AiLogicData *aiData);
// partner logic
bool32 IsTargetingPartner(u32 battlerAtk, u32 battlerDef);
// IsTargetingPartner includes a check to make sure the adjacent pokemon is truly a partner.
u32 GetAllyChosenMove(u32 battlerId);
bool32 IsBattle1v1();
bool32 IsBattle1v1(void);
// IsBattle1v1 is distinct from !IsDoubleBattle. If the player is fighting Maxie and Tabitha, with Steven as their partner, and both Tabitha and Steven have run out of Pokemon, the battle is 1v1, even though mechanically it is a Double Battle for how battlers and flags are set.
// Most AI checks should be using IsBattle1v1; most engine checks should be using !IsDoubleBattle
bool32 HasTwoOpponents(u32 battler);
@ -277,7 +282,7 @@ bool32 SideHasMoveCategory(u32 battlerId, enum DamageCategory category);
// score increases
u32 IncreaseStatUpScore(u32 battlerAtk, u32 battlerDef, enum StatChange statId);
u32 IncreaseStatUpScoreContrary(u32 battlerAtk, u32 battlerDef, enum StatChange statId);
u32 IncreaseStatDownScore(u32 battlerAtk, u32 battlerDef, u32 stat);
u32 IncreaseStatDownScore(u32 battlerAtk, u32 battlerDef, enum Stat stat);
void IncreasePoisonScore(u32 battlerAtk, u32 battlerDef, u32 move, s32 *score);
void IncreaseBurnScore(u32 battlerAtk, u32 battlerDef, u32 move, s32 *score);
void IncreaseParalyzeScore(u32 battlerAtk, u32 battlerDef, u32 move, s32 *score);
@ -285,7 +290,7 @@ void IncreaseSleepScore(u32 battlerAtk, u32 battlerDef, u32 move, s32 *score);
void IncreaseConfusionScore(u32 battlerAtk, u32 battlerDef, u32 move, s32 *score);
void IncreaseFrostbiteScore(u32 battlerAtk, u32 battlerDef, u32 move, s32 *score);
s32 AI_CalcPartyMonDamage(u32 move, u32 battlerAtk, u32 battlerDef, struct BattlePokemon switchinCandidate, enum DamageCalcContext calcContext);
s32 AI_CalcPartyMonDamage(u32 move, u32 battlerAtk, u32 battlerDef, struct BattlePokemon switchinCandidate, uq4_12_t *effectiveness, enum DamageCalcContext calcContext);
u32 AI_WhoStrikesFirstPartyMon(u32 battlerAtk, u32 battlerDef, struct BattlePokemon switchinCandidate, u32 aiMoveConsidered, u32 playerMoveConsidered, enum ConsiderPriority ConsiderPriority);
s32 AI_TryToClearStats(u32 battlerAtk, u32 battlerDef, bool32 isDoubleBattle);
bool32 AI_ShouldCopyStatChanges(u32 battlerAtk, u32 battlerDef);
@ -297,8 +302,6 @@ bool32 IsBattlerItemEnabled(u32 battler);
bool32 IsBattlerPredictedToSwitch(u32 battler);
u32 GetIncomingMove(u32 battler, u32 opposingBattler, struct AiLogicData *aiData);
u32 GetIncomingMoveSpeedCheck(u32 battler, u32 opposingBattler, struct AiLogicData *aiData);
bool32 HasLowAccuracyMove(u32 battlerAtk, u32 battlerDef);
bool32 HasBattlerSideAbility(u32 battlerDef, u32 ability, struct AiLogicData *aiData);
bool32 IsNaturalEnemy(u32 speciesAttacker, u32 speciesTarget);
// These are for the purpose of not doubling up on moves during double battles.
@ -308,7 +311,7 @@ bool32 IsNaturalEnemy(u32 speciesAttacker, u32 speciesTarget);
#define AI_EFFECT_TERRAIN (1 << 1)
#define AI_EFFECT_CLEAR_HAZARDS (1 << 2)
#define AI_EFFECT_BREAK_SCREENS (1 << 3)
#define AI_EFFECT_RESET_STATS (1 << 4)
#define AI_EFFECT_RESET_STATS (1 << 4)
#define AI_EFFECT_FORCE_SWITCH (1 << 5)
#define AI_EFFECT_TORMENT (1 << 6)
#define AI_EFFECT_LIGHT_SCREEN (1 << 7)

View File

@ -211,7 +211,8 @@ u8 GetSubstituteSpriteDefault_Y(u8 battler);
#define STAT_ANIM_MULTIPLE_MINUS1 57
#define STAT_ANIM_MULTIPLE_MINUS2 58
enum {
enum StatAnimPal
{
STAT_ANIM_PAL_ATK,
STAT_ANIM_PAL_DEF,
STAT_ANIM_PAL_ACC,

View File

@ -948,6 +948,7 @@ extern const u8 gBattleAnimStatus_Paralysis[];
extern const u8 gBattleAnimStatus_Freeze[];
extern const u8 gBattleAnimStatus_Curse[];
extern const u8 gBattleAnimStatus_Nightmare[];
extern const u8 gBattleAnimStatus_Frostbite[];
// general animations
extern const u8 gBattleAnimGeneral_StatsChange[];

View File

@ -203,7 +203,7 @@ struct ChooseMoveStruct
u8 currentPp[MAX_MON_MOVES];
u8 maxPp[MAX_MON_MOVES];
u16 species;
u8 monTypes[3];
enum Type monTypes[3];
struct ZMoveData zmove;
};
@ -364,7 +364,7 @@ void BtlController_HandleSpriteInvisibility(u32 battler);
bool32 TwoPlayerIntroMons(u32 battlerId); // Double battle with both player pokemon active.
bool32 TwoOpponentIntroMons(u32 battlerId); // Double battle with both opponent pokemon active.
void BtlController_HandleIntroTrainerBallThrow(u32 battler, u16 tagTrainerPal, const u16 *trainerPal, s16 framesToWait, void (*controllerCallback)(u32 battler));
void BtlController_HandleDrawPartyStatusSummary(u32 battler, u32 side, bool32 considerDelay);
void BtlController_HandleDrawPartyStatusSummary(u32 battler, enum BattleSide side, bool32 considerDelay);
void BtlController_HandleHidePartyStatusSummary(u32 battler);
void BtlController_HandleBattleAnimation(u32 battler);
@ -395,6 +395,10 @@ void HandleChooseMoveAfterDma3(u32 battler);
void SetControllerToRecordedPlayer(u32 battler);
void RecordedPlayerBufferExecCompleted(u32 battler);
// recorded partner controller
void SetControllerToRecordedPartner(u32 battler);
void RecordedPartnerBufferExecCompleted(u32 battler);
// opponent controller
void SetControllerToOpponent(u32 battler);
void OpponentBufferExecCompleted(u32 battler);
@ -437,4 +441,7 @@ void BtlController_HandleSwitchInTryShinyAnim(u32 battler);
void BtlController_HandleSwitchInSoundAndEnd(u32 battler);
void BtlController_HandleSwitchInShowSubstitute(u32 battler);
bool32 ShouldBattleRestrictionsApply(u32 battler);
void FreeShinyStars(void);
#endif // GUARD_BATTLE_CONTROLLERS_H

View File

@ -5,18 +5,17 @@
bool32 CanDynamax(u32 battler);
bool32 IsGigantamaxed(u32 battler);
void ApplyDynamaxHPMultiplier(struct Pokemon* mon);
void ApplyDynamaxHPMultiplier(struct Pokemon *mon);
void ActivateDynamax(u32 battler);
u16 GetNonDynamaxHP(u32 battler);
u16 GetNonDynamaxMaxHP(u32 battler);
void UndoDynamax(u32 battler);
bool32 IsMoveBlockedByMaxGuard(u32 move);
bool32 IsMoveBlockedByDynamax(u32 move);
u16 GetMaxMove(u32 battler, u32 baseMove);
u32 GetMaxMovePower(u32 move);
bool32 IsMaxMove(u32 move);
void ChooseDamageNonTypesString(u8 type);
void ChooseDamageNonTypesString(enum Type type);
void BS_UpdateDynamax(void);
void BS_SetSteelsurge(void);

View File

@ -4,11 +4,11 @@
#include "constants/battle.h"
#include "battle_bg.h"
struct BattleEnvironment {
u8 name[26];
struct BattleEnvironment
{
u16 naturePower;
u16 secretPowerEffect;
u8 camouflageType;
enum Type camouflageType;
struct BattleBackground background;
};

View File

@ -0,0 +1,52 @@
#ifndef GUARD_BATTLE_HOLD_EFFECTS
#define GUARD_BATTLE_HOLD_EFFECTS
struct HoldEffectInfo
{
u32 onSwitchIn:1;
u32 onSwitchInFirstTurn:1;
u32 mirrorHerb:1;
u32 mirrorHerbFirstTurn:1;
u32 whiteHerb:1;
u32 whiteHerbFirstTurn:1;
u32 whiteHerbEndTurn:1;
u32 onStatusChange:1;
u32 onHpThreshold:1;
u32 keeMarangaBerry:1;
u32 MentalHerb:1;
u32 onTargetAfterHit:1;
u32 onAttackerAfterHit:1;
u32 lifeOrbShellBell:1;
u32 leftovers:1;
u32 orbs:1;
u32 onEffect:1;
u32 onFling:1;
u32 padding:14;
};
extern const struct HoldEffectInfo gHoldEffectsInfo[];
typedef bool32 (*ActivationTiming)(enum HoldEffect holdEffect);
enum ItemEffect ItemBattleEffects(u32 primaryBattler, u32 secondaryBattler, enum HoldEffect holdEffect, ActivationTiming timing);
bool32 IsOnSwitchInActivation(enum HoldEffect holdEffect);
bool32 IsOnSwitchInFirstTurnActivation(enum HoldEffect holdEffect);
bool32 IsMirrorHerbActivation(enum HoldEffect holdEffect);
bool32 IsMirrorHerbFirstTurnActivation(enum HoldEffect holdEffect);
bool32 IsWhiteHerbActivation(enum HoldEffect holdEffect);
bool32 IsWhiteHerbFirstTurnActivation(enum HoldEffect holdEffect);
bool32 IsWhiteHerbEndTurnActivation(enum HoldEffect holdEffect);
bool32 IsOnStatusChangeActivation(enum HoldEffect holdEffect);
bool32 IsOnHpThresholdActivation(enum HoldEffect holdEffect);
bool32 IsKeeMarangaBerryActivation(enum HoldEffect holdEffect);
bool32 IsOnTargetHitActivation(enum HoldEffect holdEffect);
bool32 IsOnAttackerAfterHitActivation(enum HoldEffect holdEffect);
bool32 IsLifeOrbShellBellActivation(enum HoldEffect holdEffect);
bool32 IsLeftoversActivation(enum HoldEffect holdEffect);
bool32 IsOrbsActivation(enum HoldEffect holdEffect);
bool32 IsOnEffectActivation(enum HoldEffect holdEffect);
bool32 IsForceTriggerItemActivation(enum HoldEffect holdEffect);
bool32 IsOnBerryActivation(enum HoldEffect holdEffect);
bool32 IsOnFlingActivation(enum HoldEffect holdEffect);
#endif // GUARD_BATTLE_HOLD_EFFECTS

View File

@ -126,7 +126,7 @@ void UpdateHealthboxAttribute(u8 healthboxSpriteId, struct Pokemon *mon, u8 elem
s32 MoveBattleBar(u8 battler, u8 healthboxSpriteId, u8 whichBar, u8 unused);
u8 GetScaledHPFraction(s16 hp, s16 maxhp, u8 scale);
u8 GetHPBarLevel(s16 hp, s16 maxhp);
void CreateAbilityPopUp(u8 battlerId, u32 ability, bool32 isDoubleBattle);
void CreateAbilityPopUp(u8 battlerId, enum Ability ability, bool32 isDoubleBattle);
void DestroyAbilityPopUp(u8 battlerId);
bool32 CanThrowLastUsedBall(void);
void TryHideLastUsedBall(void);

View File

@ -1,6 +1,7 @@
#ifndef GUARD_BATTLE_MAIN_H
#define GUARD_BATTLE_MAIN_H
#include "battle_util.h"
#include "pokemon.h"
#include "data.h"
#include "constants/hold_effects.h"
@ -57,9 +58,10 @@ enum FirstTurnEventsStates
FIRST_TURN_EVENTS_TOTEM_BOOST,
FIRST_TURN_EVENTS_NEUTRALIZING_GAS,
FIRST_TURN_EVENTS_SWITCH_IN_ABILITIES,
FIRST_TURN_EVENTS_OPPORTUNIST_1,
FIRST_TURN_EVENTS_ITEM_EFFECTS,
FIRST_TURN_EVENTS_OPPORTUNIST_2,
FIRST_TURN_EVENTS_WHITE_HERB,
FIRST_TURN_EVENTS_OPPORTUNIST,
FIRST_TURN_EVENTS_MIRROR_HERB,
FIRST_TURN_EVENTS_EJECT_PACK,
FIRST_TURN_EVENTS_END,
};
@ -96,18 +98,15 @@ u8 IsRunningFromBattleImpossible(u32 battler);
void SwitchTwoBattlersInParty(u32 battler, u32 battler2);
void SwitchPartyOrder(u32 battler);
void SwapTurnOrder(u8 id1, u8 id2);
u32 GetBattlerTotalSpeedStatArgs(u32 battler, u32 ability, enum ItemHoldEffect holdEffect);
u32 GetBattlerTotalSpeedStat(u32 battler);
s32 GetChosenMovePriority(u32 battler, u32 ability);
s32 GetBattleMovePriority(u32 battler, u32 ability, u32 move);
s32 GetWhichBattlerFasterArgs(u32 battler1, u32 battler2, bool32 ignoreChosenMoves, u32 ability1, u32 ability2,
enum ItemHoldEffect holdEffectBattler1, enum ItemHoldEffect holdEffectBattler2, u32 speedBattler1, u32 speedBattler2, s32 priority1, s32 priority2);
s32 GetWhichBattlerFasterOrTies(u32 battler1, u32 battler2, bool32 ignoreChosenMoves);
s32 GetWhichBattlerFaster(u32 battler1, u32 battler2, bool32 ignoreChosenMoves);
u32 GetBattlerTotalSpeedStat(u32 battler, enum Ability ability, enum HoldEffect holdEffect);
s32 GetChosenMovePriority(u32 battler, enum Ability ability);
s32 GetBattleMovePriority(u32 battler, enum Ability ability, u32 move);
s32 GetWhichBattlerFasterArgs(struct BattleContext *ctx, bool32 ignoreChosenMoves, u32 speedBattler1, u32 speedBattler2, s32 priority1, s32 priority2);
s32 GetWhichBattlerFasterOrTies(struct BattleContext *ctx, bool32 ignoreChosenMoves);
s32 GetWhichBattlerFaster(struct BattleContext *ctx, bool32 ignoreChosenMoves);
void RunBattleScriptCommands_PopCallbacksStack(void);
void RunBattleScriptCommands(void);
void SpecialStatusesClear(void);
u32 GetDynamicMoveType(struct Pokemon *mon, u32 move, u32 battler, enum MonState monInBattle);
enum Type GetDynamicMoveType(struct Pokemon *mon, u32 move, u32 battler, enum MonState monInBattle);
void SetTypeBeforeUsingMove(u32 move, u32 battlerAtk);
bool32 IsWildMonSmart(void);
u8 CreateNPCTrainerPartyFromTrainer(struct Pokemon *party, const struct Trainer *trainer, bool32 firstTrainer, u32 battleTypeFlags);

View File

@ -1,6 +1,7 @@
#ifndef GUARD_BATTLE_MESSAGE_H
#define GUARD_BATTLE_MESSAGE_H
#include "constants/abilities.h"
#include "constants/battle.h"
#include "constants/battle_string_ids.h"
@ -238,13 +239,13 @@ struct BattleMsgData
u16 currentMove;
u16 originallyUsedMove;
u16 lastItem;
u16 lastAbility;
enum Ability lastAbility;
u8 scrActive;
u8 bakScriptPartyIdx;
u8 hpScale;
u8 itemEffectBattler;
u8 moveType;
u16 abilities[MAX_BATTLERS_COUNT];
enum Type moveType;
enum Ability abilities[MAX_BATTLERS_COUNT];
u8 textBuffs[3][TEXT_BUFF_ARRAY_COUNT];
};
@ -334,5 +335,6 @@ extern const u8 gText_BattleTourney[];
extern const u16 gMissStringIds[];
extern const u16 gStatUpStringIds[];
extern const u16 gStatDownStringIds[];
#endif // GUARD_BATTLE_MESSAGE_H

View File

@ -40,16 +40,15 @@ union TRANSPARENT StatChangeFlags
};
};
s32 CalcCritChanceStage(u32 battlerAtk, u32 battlerDef, u32 move, bool32 recordAbility, u32 abilityAtk, u32 abilityDef, enum ItemHoldEffect holdEffectAtk);
s32 CalcCritChanceStageGen1(u32 battlerAtk, u32 battlerDef, u32 move, bool32 recordAbility, u32 abilityAtk, u32 abilityDef, enum ItemHoldEffect holdEffectAtk);
s32 CalcCritChanceStage(u32 battlerAtk, u32 battlerDef, u32 move, bool32 recordAbility, enum Ability abilityAtk, enum Ability abilityDef, enum HoldEffect holdEffectAtk);
s32 CalcCritChanceStageGen1(u32 battlerAtk, u32 battlerDef, u32 move, bool32 recordAbility, enum Ability abilityAtk, enum Ability abilityDef, enum HoldEffect holdEffectAtk);
s32 GetCritHitOdds(s32 critChanceIndex);
u32 GetTotalAccuracy(u32 battlerAtk, u32 battlerDef, u32 move, u32 atkAbility, u32 defAbility, u32 atkHoldEffect, u32 defHoldEffect);
bool32 HasBattlerActedThisTurn(u32 battler);
u32 GetBattlerTurnOrderNum(u32 battler);
bool32 NoAliveMonsForBattlerSide(u32 battler);
bool32 NoAliveMonsForPlayer(void);
bool32 NoAliveMonsForEitherParty(void);
void SetMoveEffect(u32 battler, u32 effectBattler, bool32 primary, bool32 certain);
void SetMoveEffect(u32 battler, u32 effectBattler, enum MoveEffect moveEffect, const u8 *battleScript, enum SetMoveEffectFlags effectFlags);
bool32 CanBattlerSwitch(u32 battlerId);
void BattleDestroyYesNoCursorAt(u8 cursorPosition);
void BattleCreateYesNoCursorAt(u8 cursorPosition);
@ -60,18 +59,14 @@ bool32 DoesSubstituteBlockMove(u32 battlerAtk, u32 battlerDef, u32 move);
bool32 DoesDisguiseBlockMove(u32 battler, u32 move);
bool32 CanUseLastResort(u8 battlerId);
u32 IsFlowerVeilProtected(u32 battler);
u32 IsLeafGuardProtected(u32 battler, u32 ability);
bool32 IsShieldsDownProtected(u32 battler, u32 ability);
u32 IsAbilityStatusProtected(u32 battler, u32 ability);
u32 IsLeafGuardProtected(u32 battler, enum Ability ability);
bool32 IsShieldsDownProtected(u32 battler, enum Ability ability);
u32 IsAbilityStatusProtected(u32 battler, enum Ability ability);
bool32 TryResetBattlerStatChanges(u8 battler);
bool32 CanCamouflage(u8 battlerId);
u32 GetNaturePowerMove(u32 battler);
void StealTargetItem(u8 battlerStealer, u8 battlerItem);
u8 GetCatchingBattler(void);
u32 GetHighestStatId(u32 battlerId);
u32 GetParadoxHighestStatId(u32 battlerId);
u32 GetParadoxBoostedStatId(u32 battlerId);
bool32 ProteanTryChangeType(u32 battler, u32 ability, u32 move, u32 moveType);
bool32 ProteanTryChangeType(u32 battler, enum Ability ability, u32 move, enum Type moveType);
bool32 IsMoveNotAllowedInSkyBattles(u32 move);
bool32 DoSwitchInAbilities(u32 battlerId);
u8 GetFirstFaintedPartyIndex(u8 battlerId);
@ -79,6 +74,7 @@ bool32 IsMoveAffectedByParentalBond(u32 move, u32 battler);
void SaveBattlerTarget(u32 battler);
void SaveBattlerAttacker(u32 battler);
bool32 CanBurnHitThaw(u16 move);
bool32 EmergencyExitCanBeTriggered(u32 battler);
extern void (*const gBattleScriptingCommandsTable[])(void);
extern const struct StatFractions gAccuracyStageRatios[];

View File

@ -3,17 +3,18 @@
extern const u8 BattleScript_SupersweetSyrupActivates[];
extern const u8 BattleScript_OpportunistCopyStatChange[];
extern const u8 BattleScript_OpportunistCopyStatChangeEnd3[];
extern const u8 BattleScript_MirrorHerbCopyStatChange[];
extern const u8 BattleScript_MirrorHerbCopyStatChangeEnd2[];
extern const u8 BattleScript_NotAffected[];
extern const u8 BattleScript_HitFromCritCalc[];
extern const u8 BattleScript_MoveEnd[];
extern const u8 BattleScript_MakeMoveMissed[];
extern const u8 BattleScript_PrintMoveMissed[];
extern const u8 BattleScript_MoveMissedPause[];
extern const u8 BattleScript_MoveMissedPause[];
extern const u8 BattleScript_MoveMissed[];
extern const u8 BattleScript_FlingFailConsumeItem[];
extern const u8 BattleScript_FailedFromAtkString[];
extern const u8 BattleScript_FlingBlockedByShieldDust[];
extern const u8 BattleScript_FailedFromAtkCanceler[];
extern const u8 BattleScript_ButItFailed[];
extern const u8 BattleScript_StatUp[];
@ -21,8 +22,7 @@ extern const u8 BattleScript_StatDown[];
extern const u8 BattleScript_AlreadyAtFullHp[];
extern const u8 BattleScript_PresentHealTarget[];
extern const u8 BattleScript_MoveUsedMustRecharge[];
extern const u8 BattleScript_FaintAttacker[];
extern const u8 BattleScript_FaintTarget[];
extern const u8 BattleScript_FaintBattler[];
extern const u8 BattleScript_GiveExp[];
extern const u8 BattleScript_HandleFaintedMon[];
extern const u8 BattleScript_LocalTrainerBattleWon[];
@ -168,7 +168,6 @@ extern const u8 BattleScript_DoRecoil33[];
extern const u8 BattleScript_Recoil33End[];
extern const u8 BattleScript_ItemSteal[];
extern const u8 BattleScript_DrizzleActivates[];
extern const u8 BattleScript_SpeedBoostActivates[];
extern const u8 BattleScript_TraceActivates[];
extern const u8 BattleScript_RainDishActivates[];
extern const u8 BattleScript_SandstreamActivates[];
@ -180,11 +179,8 @@ extern const u8 BattleScript_DroughtActivates[];
extern const u8 BattleScript_TookAttack[];
extern const u8 BattleScript_SturdyPreventsOHKO[];
extern const u8 BattleScript_DampStopsExplosion[];
extern const u8 BattleScript_MoveHPDrain_PPLoss[];
extern const u8 BattleScript_MoveHPDrain[];
extern const u8 BattleScript_MonMadeMoveUseless_PPLoss[];
extern const u8 BattleScript_MonMadeMoveUseless[];
extern const u8 BattleScript_FlashFireBoost_PPLoss[];
extern const u8 BattleScript_FlashFireBoost[];
extern const u8 BattleScript_AbilityNoStatLoss[];
extern const u8 BattleScript_ItemNoStatLoss[];
@ -195,6 +191,7 @@ extern const u8 BattleScript_OwnTempoPrevents[];
extern const u8 BattleScript_SoundproofProtected[];
extern const u8 BattleScript_AbilityNoSpecificStatLoss[];
extern const u8 BattleScript_StickyHoldActivates[];
extern const u8 BattleScript_StickyHoldActivatesRet[];
extern const u8 BattleScript_ColorChangeActivates[];
extern const u8 BattleScript_RoughSkinActivates[];
extern const u8 BattleScript_CuteCharmActivates[];
@ -210,22 +207,10 @@ extern const u8 BattleScript_TruantLoafingAround[];
extern const u8 BattleScript_IgnoresAndFallsAsleep[];
extern const u8 BattleScript_IgnoresAndHitsItself[];
extern const u8 BattleScript_SubstituteFade[];
extern const u8 BattleScript_BerryCurePrlzEnd2[];
extern const u8 BattleScript_BerryCureParRet[];
extern const u8 BattleScript_BerryCurePsnEnd2[];
extern const u8 BattleScript_BerryCurePsnRet[];
extern const u8 BattleScript_BerryCureBrnEnd2[];
extern const u8 BattleScript_BerryCureBrnRet[];
extern const u8 BattleScript_BerryCureFrzEnd2[];
extern const u8 BattleScript_BerryCureFrzRet[];
extern const u8 BattleScript_BerryCureFrbEnd2[];
extern const u8 BattleScript_BerryCureFrbRet[];
extern const u8 BattleScript_BerryCureSlpEnd2[];
extern const u8 BattleScript_BerryCureSlpRet[];
extern const u8 BattleScript_BerryCureStatusEnd2[];
extern const u8 BattleScript_BerryCureStatusRet[];
extern const u8 BattleScript_BerryCureConfusionEnd2[];
extern const u8 BattleScript_BerryCureConfusionRet[];
extern const u8 BattleScript_BerryCureChosenStatusEnd2[];
extern const u8 BattleScript_BerryCureChosenStatusRet[];
extern const u8 BattleScript_WhiteHerbEnd2[];
extern const u8 BattleScript_WhiteHerbRet[];
extern const u8 BattleScript_ItemHealHP_RemoveItemRet[];
@ -280,13 +265,14 @@ extern const u8 BattleScript_WaterSportEnds[];
extern const u8 BattleScript_SturdiedMsg[];
extern const u8 BattleScript_GravityEnds[];
extern const u8 BattleScript_MoveStatDrain[];
extern const u8 BattleScript_MoveStatDrain_PPLoss[];
extern const u8 BattleScript_TargetsStatWasMaxedOut[];
extern const u8 BattleScript_AttackerAbilityStatRaise[];
extern const u8 BattleScript_AttackerAbilityStatRaiseEnd3[];
extern const u8 BattleScript_AttackerAbilityStatRaiseEnd2[];
extern const u8 BattleScript_PoisonHealActivates[];
extern const u8 BattleScript_BadDreamsActivates[];
extern const u8 BattleScript_SwitchInAbilityMsg[];
extern const u8 BattleScript_SwitchInAbilityMsgRet[];
extern const u8 BattleScript_ToxicSpikesPoisoned[];
extern const u8 BattleScript_ToxicSpikesBadlyPoisoned[];
extern const u8 BattleScript_ToxicSpikesAbsorbed[];
@ -328,7 +314,6 @@ extern const u8 BattleScript_ProteanActivates[];
extern const u8 BattleScript_DazzlingProtected[];
extern const u8 BattleScript_MoveUsedPsychicTerrainPrevents[];
extern const u8 BattleScript_MoveUsedPowder[];
extern const u8 BattleScript_ZMoveActivatePowder[];
extern const u8 BattleScript_SelectingNotAllowedStuffCheeks[];
extern const u8 BattleScript_SelectingNotAllowedStuffCheeksInPalace[];
extern const u8 BattleScript_SelectingNotAllowedBelch[];
@ -339,7 +324,6 @@ extern const u8 BattleScript_MistySurgeActivates[];
extern const u8 BattleScript_ElectricSurgeActivates[];
extern const u8 BattleScript_EffectSpectralThief[];
extern const u8 BattleScript_EffectLifeDew[];
extern const u8 BattleScript_EffectSteelRoller[];
extern const u8 BattleScript_AbilityRaisesDefenderStat[];
extern const u8 BattleScript_PowderMoveNoEffect[];
extern const u8 BattleScript_GrassyTerrainHeals[];
@ -360,8 +344,9 @@ extern const u8 BattleScript_WeaknessPolicy[];
extern const u8 BattleScript_TargetItemStatRaise[];
extern const u8 BattleScript_RockyHelmetActivates[];
extern const u8 BattleScript_ItemHurtEnd2[];
extern const u8 BattleScript_AirBaloonMsgIn[];
extern const u8 BattleScript_AirBaloonMsgPop[];
extern const u8 BattleScript_AirBalloonMsgIn[];
extern const u8 BattleScript_AirBalloonMsgInRet[];
extern const u8 BattleScript_AirBalloonMsgPop[];
extern const u8 BattleScript_ItemHurtRet[];
extern const u8 BattleScript_ToxicOrb[];
extern const u8 BattleScript_FlameOrb[];
@ -373,6 +358,7 @@ extern const u8 BattleScript_IllusionOffAndTerastallization[];
extern const u8 BattleScript_DancerActivates[];
extern const u8 BattleScript_AftermathDmg[];
extern const u8 BattleScript_BattlerFormChange[];
extern const u8 BattleScript_BattlerFormChangeEnd2[];
extern const u8 BattleScript_BattlerFormChangeEnd3[];
extern const u8 BattleScript_AttackerFormChangeWithString[];
extern const u8 BattleScript_BattlerFormChangeWithStringEnd3[];
@ -467,6 +453,7 @@ extern const u8 BattleScript_RemoveFireType[];
extern const u8 BattleScript_TargetAbilityStatRaiseRet[];
extern const u8 BattleScript_RemoveElectricType[];
extern const u8 BattleScript_SeedSowerActivates[];
extern const u8 BattleScript_BerserkActivates[];
extern const u8 BattleScript_AngerShellActivates[];
extern const u8 BattleScript_WellBakedBodyActivates[];
extern const u8 BattleScript_WindRiderActivatesMoveEnd[];
@ -582,7 +569,6 @@ extern const u8 BattleScript_EffectAbsorb[];
extern const u8 BattleScript_EffectAbsorbLiquidOoze[];
extern const u8 BattleScript_EffectExplosion[];
extern const u8 BattleScript_EffectDreamEater[];
extern const u8 BattleScript_EffectMirrorMove[];
extern const u8 BattleScript_EffectAttackUp[];
extern const u8 BattleScript_EffectDefenseUp[];
extern const u8 BattleScript_EffectSpeedUp[];
@ -606,6 +592,8 @@ extern const u8 BattleScript_EffectConversion[];
extern const u8 BattleScript_EffectRestoreHp[];
extern const u8 BattleScript_EffectLightScreen[];
extern const u8 BattleScript_EffectRest[];
extern const u8 BattleScript_RestIsAlreadyAsleep[];
extern const u8 BattleScript_InsomniaProtects[];
extern const u8 BattleScript_EffectOHKO[];
extern const u8 BattleScript_EffectHealBlock[];
extern const u8 BattleScript_RecoilIfMiss[];
@ -632,7 +620,6 @@ extern const u8 BattleScript_EffectTwoTurnsAttack[];
extern const u8 BattleScript_EffectSubstitute[];
extern const u8 BattleScript_EffectRage[];
extern const u8 BattleScript_EffectMimic[];
extern const u8 BattleScript_EffectMetronome[];
extern const u8 BattleScript_EffectLeechSeed[];
extern const u8 BattleScript_EffectDoNothing[];
extern const u8 BattleScript_EffectHoldHands[];
@ -646,7 +633,6 @@ extern const u8 BattleScript_EffectSnore[];
extern const u8 BattleScript_EffectConversion2[];
extern const u8 BattleScript_EffectLockOn[];
extern const u8 BattleScript_EffectSketch[];
extern const u8 BattleScript_EffectSleepTalk[];
extern const u8 BattleScript_EffectDestinyBond[];
extern const u8 BattleScript_EffectSpite[];
extern const u8 BattleScript_EffectHealBell[];
@ -688,12 +674,10 @@ extern const u8 BattleScript_EffectBeatUp[];
extern const u8 BattleScript_EffectSemiInvulnerable[];
extern const u8 BattleScript_EffectDefenseCurl[];
extern const u8 BattleScript_EffectSoftboiled[];
extern const u8 BattleScript_EffectFirstTurnOnly[];
extern const u8 BattleScript_EffectUproar[];
extern const u8 BattleScript_EffectStockpile[];
extern const u8 BattleScript_EffectSpitUp[];
extern const u8 BattleScript_EffectSwallow[];
extern const u8 BattleScript_EffectWorrySeed[];
extern const u8 BattleScript_EffectOverwriteAbility[];
extern const u8 BattleScript_EffectHail[];
extern const u8 BattleScript_EffectTorment[];
extern const u8 BattleScript_EffectFlatter[];
@ -701,14 +685,12 @@ extern const u8 BattleScript_EffectNonVolatileStatus[];
extern const u8 BattleScript_EffectMemento[];
extern const u8 BattleScript_EffectFocusPunch[];
extern const u8 BattleScript_EffectFollowMe[];
extern const u8 BattleScript_EffectNaturePower[];
extern const u8 BattleScript_EffectCharge[];
extern const u8 BattleScript_EffectTaunt[];
extern const u8 BattleScript_EffectHelpingHand[];
extern const u8 BattleScript_EffectTrick[];
extern const u8 BattleScript_EffectRolePlay[];
extern const u8 BattleScript_EffectWish[];
extern const u8 BattleScript_EffectAssist[];
extern const u8 BattleScript_EffectIngrain[];
extern const u8 BattleScript_EffectMagicCoat[];
extern const u8 BattleScript_EffectRecycle[];
@ -756,8 +738,6 @@ extern const u8 BattleScript_EffectGuardSplit[];
extern const u8 BattleScript_EffectStickyWeb[];
extern const u8 BattleScript_EffectMetalBurst[];
extern const u8 BattleScript_EffectLuckyChant[];
extern const u8 BattleScript_EffectSuckerPunch[];
extern const u8 BattleScript_EffectSimpleBeam[];
extern const u8 BattleScript_EffectEntrainment[];
extern const u8 BattleScript_EffectHealPulse[];
extern const u8 BattleScript_EffectQuash[];
@ -769,14 +749,12 @@ extern const u8 BattleScript_EffectElectricTerrain[];
extern const u8 BattleScript_EffectPsychicTerrain[];
extern const u8 BattleScript_EffectAttackAccUp[];
extern const u8 BattleScript_EffectAttackSpAttackUp[];
extern const u8 BattleScript_EffectMeFirst[];
extern const u8 BattleScript_EffectQuiverDance[];
extern const u8 BattleScript_EffectCoil[];
extern const u8 BattleScript_EffectElectrify[];
extern const u8 BattleScript_EffectReflectType[];
extern const u8 BattleScript_EffectSoak[];
extern const u8 BattleScript_EffectGrowth[];
extern const u8 BattleScript_EffectLastResort[];
extern const u8 BattleScript_EffectShellSmash[];
extern const u8 BattleScript_EffectShiftGear[];
extern const u8 BattleScript_EffectDefenseUp3[];
@ -789,7 +767,6 @@ extern const u8 BattleScript_AbilityPreventsPhasingOutRet[];
extern const u8 BattleScript_PrintMonIsRootedRet[];
extern const u8 BattleScript_FinalGambit[];
extern const u8 BattleScript_EffectAutotomize[];
extern const u8 BattleScript_EffectCopycat[];
extern const u8 BattleScript_EffectDefog[];
extern const u8 BattleScript_EffectHitEnemyHealAlly[];
extern const u8 BattleScript_EffectSynchronoise[];
@ -806,14 +783,12 @@ extern const u8 BattleScript_EffectAcupressure[];
extern const u8 BattleScript_EffectAromaticMist[];
extern const u8 BattleScript_EffectPowder[];
extern const u8 BattleScript_EffectPartingShot[];
extern const u8 BattleScript_EffectMatBlock[];
extern const u8 BattleScript_EffectInstruct[];
extern const u8 BattleScript_EffectLaserFocus[];
extern const u8 BattleScript_EffectMagneticFlux[];
extern const u8 BattleScript_EffectGearUp[];
extern const u8 BattleScript_EffectStrengthSap[];
extern const u8 BattleScript_EffectPurify[];
extern const u8 BattleScript_FailIfNotArgType[];
extern const u8 BattleScript_EffectShoreUp[];
extern const u8 BattleScript_EffectGeomancy[];
extern const u8 BattleScript_EffectFairyLock[];
@ -830,7 +805,6 @@ extern const u8 BattleScript_MoveEffectLeechSeed[];
extern const u8 BattleScript_MoveEffectHaze[];
extern const u8 BattleScript_MoveEffectIonDeluge[];
extern const u8 BattleScript_EffectHyperspaceFury[];
extern const u8 BattleScript_EffectAuraWheel[];
extern const u8 BattleScript_EffectNoRetreat[];
extern const u8 BattleScript_EffectTarShot[];
extern const u8 BattleScript_EffectPoltergeist[];
@ -840,7 +814,6 @@ extern const u8 BattleScript_EffectSkyDrop[];
extern const u8 BattleScript_EffectMeteorBeam[];
extern const u8 BattleScript_EffectCourtChange[];
extern const u8 BattleScript_EffectExtremeEvoboost[];
extern const u8 BattleScript_EffectHitSetTerrain[];
extern const u8 BattleScript_EffectDarkVoid[];
extern const u8 BattleScript_EffectVictoryDance[];
extern const u8 BattleScript_EffectTeatime[];
@ -858,7 +831,6 @@ extern const u8 BattleScript_EffectBrickBreak[];
extern const u8 BattleScript_EffectDoodle[];
extern const u8 BattleScript_EffectFilletAway[];
extern const u8 BattleScript_EffectShedTail[];
extern const u8 BattleScript_EffectUpperHand[];
extern const u8 BattleScript_EffectTidyUp[];
extern const u8 BattleScript_EffectSpicyExtract[];
extern const u8 BattleScript_EffectFickleBeam[];
@ -866,5 +838,11 @@ extern const u8 BattleScript_FickleBeamDoubled[];
extern const u8 BattleScript_QuestionForfeitBattle[];
extern const u8 BattleScript_ForfeitBattleGaveMoney[];
extern const u8 BattleScript_AbilityPopUp[];
extern const u8 BattleScript_Attackstring[];
extern const u8 BattleScript_SubmoveAttackstring[];
extern const u8 BattleScript_MetronomeAttackstring[];
extern const u8 BattleScript_SleepTalkAttackstring[];
extern const u8 BattleScript_NaturePowerAttackstring[];
extern const u8 BattleScript_PokemonCantUseTheMove[];
#endif // GUARD_BATTLE_SCRIPTS_H

View File

@ -1,6 +1,7 @@
#ifndef GUARD_BATTLE_SETUP_H
#define GUARD_BATTLE_SETUP_H
#include "battle_transition.h"
#include "gym_leader_rematch.h"
#define REMATCHES_COUNT 5
@ -61,9 +62,9 @@ void BattleSetup_StartLegendaryBattle(void);
void StartGroudonKyogreBattle(void);
void StartRegiBattle(void);
enum BattleEnvironments BattleSetup_GetEnvironmentId(void);
u8 GetWildBattleTransition(void);
u8 GetTrainerBattleTransition(void);
u8 GetSpecialBattleTransition(s32 id);
enum BattleTransition GetWildBattleTransition(void);
enum BattleTransition GetTrainerBattleTransition(void);
enum BattleTransition GetSpecialBattleTransition(enum BattleTransitionGroup id);
void ChooseStarter(void);
void ResetTrainerOpponentIds(void);
void SetMapVarsToTrainerA(void);

View File

@ -4,11 +4,11 @@
void ActivateTera(u32 battler);
void ApplyBattlerVisualsForTeraAnim(u32 battler);
bool32 CanTerastallize(u32 battler);
u32 GetBattlerTeraType(u32 battler);
void ExpendTypeStellarBoost(u32 battler, u32 type);
bool32 IsTypeStellarBoosted(u32 battler, u32 type);
uq4_12_t GetTeraMultiplier(u32 battler, u32 type);
enum Type GetBattlerTeraType(u32 battler);
void ExpendTypeStellarBoost(u32 battler, enum Type type);
bool32 IsTypeStellarBoosted(u32 battler, enum Type type);
uq4_12_t GetTeraMultiplier(struct DamageContext *ctx);
u16 GetTeraTypeRGB(u32 type);
u16 GetTeraTypeRGB(enum Type type);
#endif

View File

@ -10,7 +10,8 @@ void GetBg0TilesDst(u16 **tilemap, u16 **tileset);
extern const struct SpritePalette gSpritePalette_Pokeball;
enum {
enum MugshotColor
{
MUGSHOT_COLOR_NONE,
MUGSHOT_COLOR_PURPLE,
MUGSHOT_COLOR_GREEN,
@ -20,7 +21,8 @@ enum {
MUGSHOT_COLOR_COUNT
};
enum {
enum BattleTransition
{
B_TRANSITION_BLUR,
B_TRANSITION_SWIRL,
B_TRANSITION_SHUFFLE,
@ -63,7 +65,8 @@ enum {
};
// IDs for GetSpecialBattleTransition
enum {
enum BattleTransitionGroup
{
B_TRANSITION_GROUP_B_TOWER,
B_TRANSITION_GROUP_B_DOME = 3,
B_TRANSITION_GROUP_B_PALACE,

View File

@ -3,6 +3,7 @@
#include "move.h"
#include "constants/battle_string_ids.h"
#include "constants/hold_effects.h"
#define MOVE_LIMITATION_ZEROMOVE (1 << 0)
#define MOVE_LIMITATION_PP (1 << 1)
@ -39,42 +40,33 @@ enum MoveAbsorbed
MOVE_ABSORBED_BY_BOOST_FLASH_FIRE,
};
enum {
enum FieldEffectCases
{
FIELD_EFFECT_TRAINER_STATUSES,
FIELD_EFFECT_OVERWORLD_TERRAIN,
FIELD_EFFECT_OVERWORLD_WEATHER,
};
enum AbilityEffect
{
ABILITYEFFECT_ON_SWITCHIN,
ABILITYEFFECT_ENDTURN,
ABILITYEFFECT_MOVE_END_ATTACKER,
ABILITYEFFECT_COLOR_CHANGE, // Color Change, Berserk, Anger Shell
ABILITYEFFECT_MOVE_END,
ABILITYEFFECT_IMMUNITY,
ABILITYEFFECT_SYNCHRONIZE,
ABILITYEFFECT_ATK_SYNCHRONIZE,
ABILITYEFFECT_MOVE_END_OTHER,
ABILITYEFFECT_NEUTRALIZINGGAS,
ABILITYEFFECT_NEUTRALIZINGGAS_FIRST_TURN,
ABILITYEFFECT_ON_WEATHER,
ABILITYEFFECT_ON_TERRAIN,
ABILITYEFFECT_SWITCH_IN_TERRAIN,
ABILITYEFFECT_SWITCH_IN_WEATHER,
ABILITYEFFECT_OPPORTUNIST,
ABILITYEFFECT_SWITCH_IN_STATUSES,
ABILITYEFFECT_OPPORTUNIST_FIRST_TURN,
ABILITYEFFECT_ON_SWITCHIN_IMMUNITIES,
};
// For the first argument of ItemBattleEffects, to deteremine which block of item effects to try
enum ItemCaseId
{
ITEMEFFECT_NONE,
ITEMEFFECT_ON_SWITCH_IN,
ITEMEFFECT_ON_SWITCH_IN_FIRST_TURN,
ITEMEFFECT_NORMAL,
ITEMEFFECT_TRY_HEALING,
ITEMEFFECT_MOVE_END,
ITEMEFFECT_KINGSROCK,
ITEMEFFECT_TARGET,
ITEMEFFECT_ORBS,
ITEMEFFECT_LIFEORB_SHELLBELL,
ITEMEFFECT_USE_LAST_ITEM, // move end effects for just the battler, not whole field
ITEMEFFECT_STATS_CHANGED, // For White Herb and Eject Pack
};
enum ItemEffect
{
ITEM_NO_EFFECT,
@ -99,40 +91,44 @@ enum ItemEffect
// for Natural Gift and Fling
struct TypePower
{
u8 type;
enum Type type;
u8 power;
u16 effect;
};
enum MoveSuccessOrder
{
CANCELER_FLAGS,
CANCELER_STANCE_CHANGE_1,
CANCELER_CLEAR_FLAGS,
CANCELER_SKY_DROP,
CANCELER_RECHARGE,
CANCELER_ASLEEP_OR_FROZEN,
CANCELER_POWER_POINTS,
CANCELER_OBEDIENCE,
CANCELER_TRUANT,
CANCELER_FLINCH,
CANCELER_DISABLED,
CANCELER_VOLATILE_BLOCKED,
CANCELER_VOLATILE_BLOCKED, // Gravity / Heal Block / Throat Chop
CANCELER_TAUNTED,
CANCELER_IMPRISONED,
CANCELER_CONFUSED,
CANCELER_PARALYZED,
CANCELER_INFATUATION,
CANCELER_BIDE,
CANCELER_Z_MOVES,
CANCELER_CHOICE_LOCK,
CANCELER_CALLSUBMOVE,
CANCELER_THAW,
CANCELER_STANCE_CHANGE_2,
CANCELER_CHOICE_LOCK,
CANCELER_ATTACKSTRING,
CANCELER_PPDEDUCTION,
CANCELER_WEATHER_PRIMAL,
CANCELER_DYNAMAX_BLOCKED,
CANCELER_MOVE_FAILURE,
CANCELER_POWDER_STATUS,
CANCELER_PRIORITY_BLOCK,
CANCELER_PROTEAN,
CANCELER_PSYCHIC_TERRAIN,
CANCELER_EXPLODING_DAMP,
CANCELER_MULTIHIT_MOVES,
CANCELER_Z_MOVES,
CANCELER_MULTI_TARGET_MOVES,
CANCELER_END,
};
@ -150,7 +146,8 @@ enum Obedience
enum MoveCanceler
{
MOVE_STEP_SUCCESS,
MOVE_STEP_BREAK,
MOVE_STEP_BREAK, // Breaks out of the function to run a script
MOVE_STEP_FAILURE, // Same as break but breaks out of it due to move failure and jumps to script that handles the failure
MOVE_STEP_REMOVES_STATUS,
};
@ -161,7 +158,7 @@ struct DamageContext
u32 battlerAtk:3;
u32 battlerDef:3;
u32 move:16;
u32 moveType:5;
enum Type moveType:5;
u32 isCrit:1;
u32 randomFactor:1;
u32 updateFlags:1;
@ -170,11 +167,23 @@ struct DamageContext
u32 weather:16;
u32 fixedBasePower:8;
u32 padding2:8;
u32 chosenMove:16; // May be different to 'move', e.g. for Z moves.
u32 padding3:16;
uq4_12_t typeEffectivenessModifier;
u32 abilityAtk:16;
u32 abilityDef:16;
enum ItemHoldEffect holdEffectAtk:16;
enum ItemHoldEffect holdEffectDef:16;
enum Ability abilityAtk;
enum Ability abilityDef;
enum HoldEffect holdEffectAtk;
enum HoldEffect holdEffectDef;
};
struct BattleContext
{
u32 battlerAtk:3;
u32 battlerDef:3;
u32 currentMove:16;
u32 padding:10;
enum Ability abilities[MAX_BATTLERS_COUNT];
enum HoldEffect holdEffects[MAX_BATTLERS_COUNT];
};
enum SleepClauseBlock
@ -196,9 +205,17 @@ enum SkyDropState
#define SKY_DROP_NO_TARGET 0xFF
#define SKY_DROP_RELEASED_TARGET 0xFE
enum EjectPackTiming
{
FIRST_TURN,
END_TURN,
OTHER,
};
void HandleAction_ThrowBall(void);
u32 GetCurrentBattleWeather(void);
bool32 EndOrContinueWeather(void);
bool32 IsUnnerveBlocked(u32 battler, u32 itemId);
bool32 IsAffectedByFollowMe(u32 battlerAtk, u32 defSide, u32 move);
bool32 HandleMoveTargetRedirection(void);
void HandleAction_UseMove(void);
@ -221,7 +238,7 @@ void MarkBattlerForControllerExec(u32 battler);
void MarkBattlerReceivedLinkData(u32 battler);
const u8 *CancelMultiTurnMoves(u32 battler, enum SkyDropState skyDropState);
bool32 WasUnableToUseMove(u32 battler);
bool32 ShouldDefiantCompetitiveActivate(u32 battler, u32 ability);
bool32 ShouldDefiantCompetitiveActivate(u32 battler, enum Ability ability);
void PrepareStringBattle(enum StringID stringId, u32 battler);
void ResetSentPokesToOpponentValue(void);
void OpponentSwitchInResetSentPokesToOpponentValue(u32 battler);
@ -235,48 +252,48 @@ u32 CheckMoveLimitations(u32 battler, u8 unusableMoves, u16 check);
bool32 AreAllMovesUnusable(u32 battler);
u8 GetImprisonedMovesCount(u32 battler, u16 move);
s32 GetDrainedBigRootHp(u32 battler, s32 hp);
bool32 IsAbilityAndRecord(u32 battler, u32 battlerAbility, u32 abilityToCheck);
bool32 IsAbilityAndRecord(u32 battler, enum Ability battlerAbility, enum Ability abilityToCheck);
u32 DoEndTurnEffects(void);
bool32 HandleFaintedMonActions(void);
void TryClearRageAndFuryCutter(void);
enum MoveCanceler AtkCanceler_MoveSuccessOrder(void);
void SetAtkCancelerForCalledMove(void);
enum MoveCanceler AtkCanceler_MoveSuccessOrder(struct BattleContext *ctx);
bool32 HasNoMonsToSwitch(u32 battler, u8 partyIdBattlerOn1, u8 partyIdBattlerOn2);
bool32 TryChangeBattleWeather(u32 battler, u32 battleWeatherId, u32 ability);
bool32 TryChangeBattleTerrain(u32 battler, u32 statusFlag);
bool32 CanAbilityBlockMove(u32 battlerAtk, u32 battlerDef, u32 abilityAtk, u32 abilityDef, u32 move, enum FunctionCallOption option);
bool32 CanAbilityAbsorbMove(u32 battlerAtk, u32 battlerDef, u32 abilityDef, u32 move, u32 moveType, enum FunctionCallOption option);
u32 AbilityBattleEffects(u32 caseID, u32 battler, u32 ability, u32 special, u32 moveArg);
bool32 CanAbilityBlockMove(u32 battlerAtk, u32 battlerDef, enum Ability abilityAtk, enum Ability abilityDef, u32 move, enum FunctionCallOption option);
bool32 CanAbilityAbsorbMove(u32 battlerAtk, u32 battlerDef, enum Ability abilityDef, u32 move, enum Type moveType, enum FunctionCallOption option);
bool32 TryFieldEffects(enum FieldEffectCases caseId);
u32 AbilityBattleEffects(enum AbilityEffect caseID, u32 battler, enum Ability ability, u32 special, u32 moveArg);
bool32 TryPrimalReversion(u32 battler);
bool32 IsNeutralizingGasOnField(void);
bool32 IsMoldBreakerTypeAbility(u32 battler, u32 ability);
bool32 IsMoldBreakerTypeAbility(u32 battler, enum Ability ability);
u32 GetBattlerAbilityIgnoreMoldBreaker(u32 battler);
u32 GetBattlerAbilityNoAbilityShield(u32 battler);
u32 GetBattlerAbilityInternal(u32 battler, u32 ignoreMoldBreaker, u32 noAbilityShield);
u32 GetBattlerAbility(u32 battler);
u32 IsAbilityOnSide(u32 battler, u32 ability);
u32 IsAbilityOnOpposingSide(u32 battler, u32 ability);
u32 IsAbilityOnField(u32 ability);
u32 IsAbilityOnFieldExcept(u32 battler, u32 ability);
enum Ability GetBattlerAbility(u32 battler);
u32 IsAbilityOnSide(u32 battler, enum Ability ability);
u32 IsAbilityOnOpposingSide(u32 battler, enum Ability ability);
u32 IsAbilityOnField(enum Ability ability);
u32 IsAbilityOnFieldExcept(u32 battler, enum Ability ability);
u32 IsAbilityPreventingEscape(u32 battler);
bool32 IsBattlerProtected(u32 battlerAtk, u32 battlerDef, u32 move);
u32 GetProtectType(enum ProtectMethod method);
bool32 CanBattlerEscape(u32 battler); // no ability check
void BattleScriptExecute(const u8 *BS_ptr);
void BattleScriptPushCursorAndCallback(const u8 *BS_ptr);
u32 ItemBattleEffects(enum ItemCaseId, u32 battler);
void ClearVariousBattlerFlags(u32 battler);
void HandleAction_RunBattleScript(void);
u32 SetRandomTarget(u32 battler);
u32 GetBattleMoveTarget(u16 move, u8 setTarget);
u8 GetAttackerObedienceForAction();
enum ItemHoldEffect GetBattlerHoldEffect(u32 battler, bool32 checkNegating);
enum ItemHoldEffect GetBattlerHoldEffectIgnoreAbility(u32 battler, bool32 checkNegating);
enum ItemHoldEffect GetBattlerHoldEffectInternal(u32 battler, bool32 checkNegating, bool32 checkAbility);
enum HoldEffect GetBattlerHoldEffect(u32 battler);
enum HoldEffect GetBattlerHoldEffectIgnoreAbility(u32 battler);
enum HoldEffect GetBattlerHoldEffectIgnoreNegation(u32 battler);
enum HoldEffect GetBattlerHoldEffectInternal(u32 battler, u32 ability);
u32 GetBattlerHoldEffectParam(u32 battler);
bool32 CanBattlerAvoidContactEffects(u32 battlerAtk, u32 battlerDef, u32 abilityAtk, enum ItemHoldEffect holdEffectAtk, u32 move);
bool32 IsMoveMakingContact(u32 battlerAtk, u32 battlerDef, u32 abilityAtk, enum ItemHoldEffect holdEffectAtk, u32 move);
bool32 IsBattlerGrounded(u32 battler);
bool32 CanBattlerAvoidContactEffects(u32 battlerAtk, u32 battlerDef, enum Ability abilityAtk, enum HoldEffect holdEffectAtk, u32 move);
bool32 IsMoveMakingContact(u32 battlerAtk, u32 battlerDef, enum Ability abilityAtk, enum HoldEffect holdEffectAtk, u32 move);
bool32 IsBattlerGrounded(u32 battler, enum Ability ability, enum HoldEffect holdEffect);
u32 GetMoveSlot(u16 *moves, u32 move);
u32 GetBattlerWeight(u32 battler);
u32 CalcRolloutBasePower(u32 battlerAtk, u32 basePower, u32 rolloutTimer);
@ -286,12 +303,12 @@ s32 CalculateMoveDamageVars(struct DamageContext *ctx);
s32 DoFixedDamageMoveCalc(struct DamageContext *ctx);
s32 ApplyModifiersAfterDmgRoll(struct DamageContext *ctx, s32 dmg);
uq4_12_t CalcTypeEffectivenessMultiplier(struct DamageContext *ctx);
uq4_12_t CalcPartyMonTypeEffectivenessMultiplier(u16 move, u16 speciesDef, u16 abilityDef);
uq4_12_t GetTypeModifier(u32 atkType, u32 defType);
uq4_12_t GetOverworldTypeEffectiveness(struct Pokemon *mon, u8 moveType);
uq4_12_t CalcPartyMonTypeEffectivenessMultiplier(u16 move, u16 speciesDef, enum Ability abilityDef);
uq4_12_t GetTypeModifier(enum Type atkType, enum Type defType);
uq4_12_t GetOverworldTypeEffectiveness(struct Pokemon *mon, enum Type moveType);
void UpdateMoveResultFlags(uq4_12_t modifier, u16 *resultFlags);
s32 GetStealthHazardDamage(enum TypeSideHazard hazardType, u32 battler);
s32 GetStealthHazardDamageByTypesAndHP(enum TypeSideHazard hazardType, u8 type1, u8 type2, u32 maxHp);
s32 GetStealthHazardDamageByTypesAndHP(enum TypeSideHazard hazardType, enum Type type1, enum Type type2, u32 maxHp);
bool32 CanMegaEvolve(u32 battler);
bool32 CanUltraBurst(u32 battler);
void ActivateMegaEvolution(u32 battler);
@ -305,13 +322,13 @@ bool32 TryBattleFormChange(u32 battler, enum FormChanges method);
bool32 DoBattlersShareType(u32 battler1, u32 battler2);
bool32 CanBattlerGetOrLoseItem(u32 battler, u16 itemId);
u32 GetBattlerVisualSpecies(u32 battler);
bool32 TryClearIllusion(u32 battler, u32 caseID);
bool32 TryClearIllusion(u32 battler, enum AbilityEffect caseID);
u32 GetIllusionMonSpecies(u32 battler);
struct Pokemon *GetIllusionMonPtr(u32 battler);
void ClearIllusionMon(u32 battler);
u32 GetIllusionMonPartyId(struct Pokemon *party, struct Pokemon *mon, struct Pokemon *partnerMon, u32 battler);
bool32 SetIllusionMon(struct Pokemon *mon, u32 battler);
u32 TryImmunityAbilityHealStatus(u32 battler, u32 caseID);
u32 TryImmunityAbilityHealStatus(u32 battler, enum AbilityEffect caseID);
bool32 ShouldGetStatBadgeBoost(u16 flagId, u32 battler);
uq4_12_t GetBadgeBoostModifier(void);
enum DamageCategory GetBattleMoveCategory(u32 move);
@ -320,7 +337,7 @@ bool32 CanFling(u32 battler);
bool32 IsTelekinesisBannedSpecies(u16 species);
bool32 IsHealBlockPreventingMove(u32 battler, u32 move);
bool32 IsBelchPreventingMove(u32 battler, u32 move);
bool32 HasEnoughHpToEatBerry(u32 battler, u32 hpFraction, u32 itemId);
bool32 HasEnoughHpToEatBerry(u32 battler, enum Ability ability, u32 hpFraction, u32 itemId);
bool32 IsPartnerMonFromSameTrainer(u32 battler);
enum DamageCategory GetCategoryBasedOnStats(u32 battler);
void SetShellSideArmCategory(void);
@ -330,14 +347,10 @@ void TryRestoreHeldItems(void);
bool32 CanStealItem(u32 battlerStealing, u32 battlerItem, u16 item);
void TrySaveExchangedItem(u32 battler, u16 stolenItem);
bool32 IsPartnerMonFromSameTrainer(u32 battler);
enum ItemEffect TryHandleSeed(u32 battler, u32 terrainFlag, u32 statId, u32 itemId, enum ItemCaseId caseID);
bool32 IsBattlerAffectedByHazards(u32 battler, bool32 toxicSpikes);
void SortBattlersBySpeed(u8 *battlers, bool32 slowToFast);
bool32 CompareStat(u32 battler, u8 statId, u8 cmpTo, u8 cmpKind, u32 ability);
bool32 TryRoomService(u32 battler);
void BufferStatChange(u32 battler, u8 statId, enum StringID stringId);
bool32 CompareStat(u32 battler, enum Stat statId, u8 cmpTo, u8 cmpKind, enum Ability ability);
bool32 BlocksPrankster(u16 move, u32 battlerPrankster, u32 battlerDef, bool32 checkTarget);
u16 GetUsedHeldItem(u32 battler);
bool32 PickupHasValidTarget(u32 battler);
bool32 CantPickupItem(u32 battler);
bool32 IsBattlerWeatherAffected(u32 battler, u32 weatherFlags);
@ -356,16 +369,19 @@ bool32 CanTargetPartner(u32 battlerAtk, u32 battlerDef);
bool32 TargetFullyImmuneToCurrMove(u32 battlerAtk, u32 battlerDef);
bool32 MoodyCantRaiseStat(u32 stat);
bool32 MoodyCantLowerStat(u32 stat);
bool32 IsBattlerTerrainAffected(u32 battler, enum Ability ability, enum HoldEffect holdEffect, u32 terrainFlag);
u32 GetHighestStatId(u32 battler);
u32 GetParadoxHighestStatId(u32 battler);
u32 GetParadoxBoostedStatId(u32 battler);
bool32 CanBeSlept(u32 battlerAtk, u32 battlerDef, u32 abilityDef, enum SleepClauseBlock isBlockedBySleepClause);
bool32 CanBePoisoned(u32 battlerAtk, u32 battlerDef, u32 abilityAtk, u32 abilityDef);
bool32 CanBeBurned(u32 battlerAtk, u32 battlerDef, u32 ability);
bool32 CanBeParalyzed(u32 battlerAtk, u32 battlerDef, u32 abilityDef);
bool32 CanBeFrozen(u32 battlerAtk, u32 battlerDef, u32 abilityDef);
bool32 CanGetFrostbite(u32 battlerAtk, u32 battlerDef, u32 abilityDef);
bool32 CanSetNonVolatileStatus(u32 battlerAtk, u32 battlerDef, u32 abilityAtk, u32 abilityDef, enum MoveEffect secondaryMoveEffect, enum FunctionCallOption option);
bool32 CanBeSlept(u32 battlerAtk, u32 battlerDef, enum Ability abilityDef, enum SleepClauseBlock isBlockedBySleepClause);
bool32 CanBePoisoned(u32 battlerAtk, u32 battlerDef, enum Ability abilityAtk, enum Ability abilityDef);
bool32 CanBeBurned(u32 battlerAtk, u32 battlerDef, enum Ability ability);
bool32 CanBeParalyzed(u32 battlerAtk, u32 battlerDef, enum Ability abilityDef);
bool32 CanBeFrozen(u32 battlerAtk, u32 battlerDef, enum Ability abilityDef);
bool32 CanGetFrostbite(u32 battlerAtk, u32 battlerDef, enum Ability abilityDef);
bool32 CanSetNonVolatileStatus(u32 battlerAtk, u32 battlerDef, enum Ability abilityAtk, enum Ability abilityDef, enum MoveEffect secondaryMoveEffect, enum FunctionCallOption option);
bool32 CanBeConfused(u32 battler);
bool32 IsBattlerTerrainAffected(u32 battler, u32 terrainFlag);
u32 GetBattlerAffectionHearts(u32 battler);
void TryToRevertMimicryAndFlags(void);
bool32 BattleArenaTurnEnd(void);
@ -375,35 +391,32 @@ void RemoveConfusionStatus(u32 battler);
u8 GetBattlerGender(u32 battler);
bool32 AreBattlersOfOppositeGender(u32 battler1, u32 battler2);
bool32 AreBattlersOfSameGender(u32 battler1, u32 battler2);
u32 CalcSecondaryEffectChance(u32 battler, u32 battlerAbility, const struct AdditionalEffect *additionalEffect);
bool32 MoveEffectIsGuaranteed(u32 battler, u32 battlerAbility, const struct AdditionalEffect *additionalEffect);
void GetBattlerTypes(u32 battler, bool32 ignoreTera, u32 types[static 3]);
u32 GetBattlerType(u32 battler, u32 typeIndex, bool32 ignoreTera);
u32 CalcSecondaryEffectChance(u32 battler, enum Ability battlerAbility, const struct AdditionalEffect *additionalEffect);
bool32 MoveEffectIsGuaranteed(u32 battler, enum Ability battlerAbility, const struct AdditionalEffect *additionalEffect);
void GetBattlerTypes(u32 battler, bool32 ignoreTera, enum Type types[static 3]);
enum Type GetBattlerType(u32 battler, u32 typeIndex, bool32 ignoreTera);
bool8 CanMonParticipateInSkyBattle(struct Pokemon *mon);
bool8 IsMonBannedFromSkyBattles(u16 species);
void RemoveBattlerType(u32 battler, u8 type);
u32 GetBattleMoveType(u32 move);
void RemoveBattlerType(u32 battler, enum Type type);
enum Type GetBattleMoveType(u32 move);
void TryActivateSleepClause(u32 battler, u32 indexInParty);
void TryDeactivateSleepClause(u32 battlerSide, u32 indexInParty);
bool32 IsSleepClauseActiveForSide(u32 battlerSide);
bool32 IsSleepClauseEnabled();
void ClearDamageCalcResults(void);
u32 DoesDestinyBondFail(u32 battler);
bool32 IsMoveEffectBlockedByTarget(u32 ability);
bool32 IsMoveEffectBlockedByTarget(enum Ability ability);
bool32 IsPursuitTargetSet(void);
void ClearPursuitValuesIfSet(u32 battler);
void ClearPursuitValues(void);
bool32 HasWeatherEffect(void);
bool32 IsAnyTargetAffected(u32 battlerAtk);
u32 RestoreWhiteHerbStats(u32 battler);
bool32 IsFutureSightAttackerInParty(u32 battlerAtk, u32 battlerDef, u32 move);
bool32 HadMoreThanHalfHpNowDoesnt(u32 battler);
void ChooseStatBoostAnimation(u32 battler);
void UpdateStallMons(void);
bool32 TryRestoreHPBerries(u32 battler, enum ItemCaseId caseId);
bool32 TrySwitchInEjectPack(enum ItemCaseId caseID);
bool32 TrySwitchInEjectPack(enum EjectPackTiming timing);
u32 GetBattlerVolatile(u32 battler, enum Volatile _volatile);
void SetMonVolatile(u32 battler, enum Volatile _volatile, u32 newValue);
u32 TryBoosterEnergy(u32 battler, u32 ability, enum ItemCaseId caseID);
bool32 ItemHealMonVolatile(u32 battler, u16 itemId);
void PushHazardTypeToQueue(u32 side, enum Hazards hazardType);
bool32 IsHazardOnSide(u32 side, enum Hazards hazardType);
@ -411,11 +424,18 @@ bool32 AreAnyHazardsOnSide(u32 side);
void RemoveAllHazardsFromField(u32 side);
bool32 IsHazardOnSideAndClear(u32 side, enum Hazards hazardType);
void RemoveHazardFromField(u32 side, enum Hazards hazardType);
bool32 CanMoveSkipAccuracyCalc(u32 battlerAtk, u32 battlerDef, u32 abilityAtk, u32 abilityDef, u32 move, enum FunctionCallOption option);
u32 GetTotalAccuracy(u32 battlerAtk, u32 battlerDef, u32 move, u32 atkAbility, u32 defAbility, u32 atkHoldEffect, u32 defHoldEffect);
bool32 CanMoveSkipAccuracyCalc(u32 battlerAtk, u32 battlerDef, enum Ability abilityAtk, enum Ability abilityDef, u32 move, enum FunctionCallOption option);
u32 GetTotalAccuracy(u32 battlerAtk, u32 battlerDef, u32 move, enum Ability atkAbility, enum Ability defAbility, enum HoldEffect atkHoldEffect, enum HoldEffect defHoldEffect);
bool32 IsSemiInvulnerable(u32 battler, enum SemiInvulnerableExclusion excludeCommander);
bool32 BreaksThroughSemiInvulnerablity(u32 battler, u32 move);
bool32 HasPartnerTrainer(u32 battler);
bool32 IsAffectedByPowderMove(u32 battler, u32 ability, enum ItemHoldEffect holdEffect);
bool32 IsAffectedByPowderMove(u32 battler, u32 ability, enum HoldEffect holdEffect);
u32 GetNaturePowerMove(u32 battler);
u32 GetNaturePowerMove(u32 battler);
void RemoveAbilityFlags(u32 battler);
bool32 IsDazzlingAbility(enum Ability ability);
bool32 IsAllowedToUseBag(void);
bool32 IsAnyTargetTurnDamaged(u32 battlerAtk);
bool32 IsMimikyuDisguised(u32 battler);
#endif // GUARD_BATTLE_UTIL_H

View File

@ -15,7 +15,7 @@
#define SHOULD_SWITCH_ABSORBS_MOVE_PERCENTAGE 100
#define SHOULD_SWITCH_ABSORBS_HIDDEN_POWER_PERCENTAGE 50
#define SHOULD_SWITCH_TRAPPER_PERCENTAGE 100
#define SHOULD_SWITCH_FREE_TURN_PERCENTAGE 100
#define SHOULD_SWITCH_FREE_TURN_PERCENTAGE 50
#define STAY_IN_ABSORBING_PERCENTAGE 66 // Chance to stay in if outgoing mon has super effective move against player, will prevent switching out for an absorber with this likelihood
#define SHOULD_SWITCH_HASBADODDS_PERCENTAGE 50
#define SHOULD_SWITCH_ENCORE_STATUS_PERCENTAGE 100
@ -110,4 +110,9 @@
#define POWER_SPLIT_ALLY_PERCENTAGE 150
#define POWER_SPLIT_ENEMY_PERCENTAGE 50
// HP thresholds to use a status z-move.
#define Z_EFFECT_FOLLOW_ME_THRESHOLD 30
#define Z_EFFECT_RESTORE_HP_LOWER_THRESHOLD ENABLE_RECOVERY_THRESHOLD // threshold used for moves you could conceivably use more than once
#define Z_EFFECT_RESTORE_HP_HIGHER_THRESHOLD 90 // these moves are one-time use or drop your HP
#endif // GUARD_CONFIG_AI_H

View File

@ -169,8 +169,6 @@
#define B_POWDER_OVERCOAT GEN_LATEST // In Gen6+, Overcoat blocks powder and spore moves from affecting the user.
// Item settings
#define B_HP_BERRIES GEN_LATEST // In Gen4+, berries which restore HP activate immediately after HP drops to half. In Gen3, the effect occurs at the end of the turn.
#define B_BERRIES_INSTANT GEN_LATEST // In Gen4+, most berries activate on battle start/switch-in if applicable. In Gen3, they only activate either at the move end or turn end.
#define B_CONFUSE_BERRIES_HEAL GEN_LATEST // Before Gen7, Figy and similar berries restore 1/8th of HP and trigger at half HP. In Gen7 they restore half HP, triggering at 25% HP. In Gen8 they heal 1/3rd of HP.
#define B_X_ITEMS_BUFF GEN_LATEST // In Gen7+, the X Items raise a stat by 2 stages instead of 1.
#define B_MENTAL_HERB GEN_LATEST // In Gen5+, the Mental Herb cures Taunt, Encore, Torment, Heal Block, and Disable in addition to Infatuation from before.
@ -209,7 +207,6 @@
#define B_FLAG_INVERSE_BATTLE 0 // If this flag is set, the battle's type effectiveness are inversed. For example, fire is super effective against water.
#define B_FLAG_FORCE_DOUBLE_WILD 0 // If this flag is set, all land and surfing wild battles will be double battles.
#define B_SMART_WILD_AI_FLAG 0 // If this flag is set, wild Pokémon will become smart, with all AI flags enabled.
#define B_FLAG_NO_BAG_USE 0 // If this flag is set, the ability to use the bag in battle is disabled.
#define B_FLAG_NO_CATCHING 0 // If this flag is set, the ability to catch wild Pokémon is disabled.
#define B_FLAG_NO_RUNNING 0 // If this flag is set, the ability to escape from wild battles is disabled. Also makes Roar/Whirlwind and Teleport (under Gen8) fail.
#define B_FLAG_AI_VS_AI_BATTLE 0 // If this flag is set, the player's mons will be controlled by the ai next battles.
@ -231,6 +228,13 @@
#define B_VAR_DIFFICULTY 0 // If not 0, you can use this var to control which difficulty version of a Trainer is loaded. This should be manually set by the developer using Script_SetDifficulty AFTER NewGameInitData has run.
// No bag settings
#define NO_BAG_RESTRICTION 0
#define NO_BAG_AGAINST_TRAINER 1
#define NO_BAG_IN_BATTLE 2
#define B_VAR_NO_BAG_USE 0 // If 1, the ability to use the bag in battle is disabled in trainer battles. If 2, it is also disabled in wild battles.
// Sky Battles
#define B_FLAG_SKY_BATTLE 0 // If this flag has a value, the player will be able to engage in scripted Sky Battles.
#define B_VAR_SKY_BATTLE 0 // If this var has a value, the game will remember the positions of Pokémon used in Sky Battles.
@ -269,7 +273,6 @@
#define B_NEW_TERRAIN_BACKGROUNDS FALSE // If set to TRUE, uses new terrain backgrounds for Electric, Misty, Grassy and Psychic Terrain.
// Interface settings
#define B_ABILITY_POP_UP TRUE // In Gen5+, the Pokémon abilities are displayed in a pop-up, when they activate in battle.
#define B_FAST_INTRO_PKMN_TEXT TRUE // If set to TRUE, battle intro texts print at the same time as animation of a Pokémon, as opposing to waiting for the animation to end.
#define B_FAST_INTRO_NO_SLIDE FALSE // If set to TRUE, the slide animation that happens at the beginning of the battle is skipped.
#define B_FAST_HP_DRAIN TRUE // If set to TRUE, HP bars will move faster.
@ -288,9 +291,10 @@
// Catching settings
#define B_SEMI_INVULNERABLE_CATCH GEN_LATEST // In Gen4+, you cannot throw a ball against a Pokemon that is in a semi-invulnerable state (dig/fly/etc)
#define B_CATCHING_CHARM_BOOST 20 // % boost in Critical Capture odds if player has the Catching Charm.
#define B_CATCHING_CHARM_BOOST 100 // % boost in Critical Capture odds if player has the Catching Charm.
#define B_CRITICAL_CAPTURE TRUE // If set to TRUE, Critical Capture will be enabled.
#define B_CRITICAL_CAPTURE_LOCAL_DEX TRUE // If set to FALSE, Critical Capture % is based off of the National Pokedex estimated by enabled generations.
#define B_CRITICAL_CAPTURE_IF_OWNED GEN_LATEST // In Gen9, a capture appear critical if the pokemon you are trying to catch already has a dex entry (has already been caught)
#define B_LAST_USED_BALL TRUE // If TRUE, the "last used ball" feature from Gen 7 will be implemented
#define B_LAST_USED_BALL_BUTTON R_BUTTON // If last used ball is implemented, this button (or button combo) will trigger throwing the last used ball.
@ -367,5 +371,7 @@
#define B_POOL_RULE_EXCLUDE_FORMS FALSE // Exclude different forms from the Species Clause
#define B_POOL_RULE_ITEM_CLAUSE FALSE // Only allow each item to be picked once
#define B_POOL_RULES_USE_ITEM_EXCLUSIONS FALSE // Exclude items listed in poolItemClauseExclusions
#define B_POOL_RULE_MEGA_STONE_CLAUSE FALSE // Pick only 1 mon with mega stone
#define B_POOL_RULE_Z_CRYSTAL_CLAUSE FALSE // Pick only 1 mon with Z-crystal
#endif // GUARD_CONFIG_BATTLE_H

8
include/config/contest.h Normal file
View File

@ -0,0 +1,8 @@
#ifndef GUARD_CONFIG_CONTEST_H
#define GUARD_CONFIG_CONTEST_H
// Move data settings
#define C_UPDATED_MOVE_CATEGORIES GEN_LATEST // Updates contest category.
#define C_UPDATED_MOVE_EFFECTS GEN_LATEST // Updates contest effects.
#endif // GUARD_CONFIG_CONTEST_H

View File

@ -2,16 +2,16 @@
#define GUARD_CONFIG_DEBUG_H
// Overworld Debug
#define DEBUG_OVERWORLD_MENU TRUE // Enables an overworld debug menu to change flags, variables, giving pokemon and more, accessed by holding R and pressing START while in the overworld by default.
#define DEBUG_OVERWORLD_MENU DISABLED_ON_RELEASE // Enables an overworld debug menu to change flags, variables, giving pokemon and more, accessed by holding R and pressing START while in the overworld by default.
#define DEBUG_OVERWORLD_HELD_KEYS (R_BUTTON) // The keys required to be held to open the debug menu.
#define DEBUG_OVERWORLD_TRIGGER_EVENT pressedStartButton // The event that opens the menu when holding the key(s) defined in DEBUG_OVERWORLD_HELD_KEYS.
#define DEBUG_OVERWORLD_IN_MENU FALSE // Replaces the overworld debug menu button combination with a start menu entry (above Pokédex).
// Battle Debug Menu
#define DEBUG_BATTLE_MENU TRUE // If set to TRUE, enables a debug menu to use in battles by pressing the Select button.
#define DEBUG_BATTLE_MENU DISABLED_ON_RELEASE // If set to TRUE, enables a debug menu to use in battles by pressing the Select button.
#define DEBUG_AI_DELAY_TIMER FALSE // If set to TRUE, displays the number of frames it takes for the AI to choose a move. Replaces the "What will PKMN do" text. Useful for devs or anyone who modifies the AI code and wants to see if it doesn't take too long to run.
// Pokémon Debug
#define DEBUG_POKEMON_SPRITE_VISUALIZER TRUE // Enables a debug menu for Pokémon sprites and icons, accessed by pressing Select in the summary screen.
#define DEBUG_POKEMON_SPRITE_VISUALIZER DISABLED_ON_RELEASE // Enables a debug menu for Pokémon sprites and icons, accessed by pressing Select in the summary screen.
#endif // GUARD_CONFIG_DEBUG_H

13
include/config/fishing.h Normal file
View File

@ -0,0 +1,13 @@
#ifndef GUARD_CONFIG_FISHING_H
#define GUARD_CONFIG_FISHING_H
#define I_FISHING_BITE_ODDS GEN_LATEST // In Gen 1 and Gen 2, the Old Rod has a 100% chance for a bite, Good Rod has a 66% chance for a bite, and Super Rod has a 50% chance for a bite. In Gen 3, all rods have a base 50% chance for a bite. In Gen 4 onwards, the Old Rod has a base 25% chance for a bite, Good Rod has a 50% chance for a bite, and Super Rod has a 75% chance for a bite.
#define I_FISHING_MINIGAME GEN_3 // Each generation uses a variation of reeling in Pokémon once they have been hooked. NOTE: Only the Gen 1/2 and Gen 3 minigames are implemented right now!
#define I_FISHING_ENVIRONMENT GEN_LATEST // In Gen 3, the battle environment when fighting a hooked Pokémon is based on the tile the player is standing on. In Gen 4 onwards, the environment is based on tile that is being fished in, resulting in it usually being a water environment.
#define I_FISHING_STICKY_BOOST GEN_LATEST // In Gen 3, a Pokemon with Suction Cups or Sticky Hold in the first slot of the party causes the chance for a bite to increase by about 35%. In Gen 4 onwards, it doubles the base bite chance.
#define I_FISHING_FOLLOWER_BOOST FALSE // In HGSS, fishing bite odds are increased depending on the friendship of the current following Pokémon.
#define I_FISHING_CHAIN FALSE // Introduced in XY, hooking the same Pokémon repeatedly will increase the odds of that mon being shiny. NOTE: This implementation is an approximation of the actual feature, as XY have not been throughoutly documented or datamined.
#define I_FISHING_PROXIMITY FALSE // In XY, bite chance is boosted by the number of adjacent non-surfable tiles next to your fishing line
#define I_FISHING_TIME_OF_DAY_BOOST FALSE // In XY, bite chance is boosted during morning and evening
#endif // GUARD_CONFIG_FISHING_H

View File

@ -6,11 +6,16 @@
// still has them in the ROM. This is because the developers forgot
// to define NDEBUG before release, however this has been changed as
// Ruby's actual debug build does not use the AGBPrint features.
//
// Use `make release` to automatically enable NDEBUG.
#ifdef RELEASE
#define NDEBUG
#endif
// To enable printf debugging, comment out "#define NDEBUG". This allows
// printf debugging is now enabled by default. This allows
// the various AGBPrint functions to be used. (See include/gba/isagbprint.h).
// See below for enabling different pretty printing versions.
// To disable printf debugging, build a release build using `make release`.
#ifndef NDEBUG
@ -69,8 +74,6 @@
// General settings
#define EXPANSION_INTRO TRUE // If TRUE, a custom RHH intro will play after the vanilla copyright screen.
#define HQ_RANDOM TRUE // If TRUE, replaces the default RNG with an implementation of SFC32 RNG. May break code that relies on RNG.
#define AUTO_SCROLL_TEXT FALSE // If TRUE, text will automatically scroll to the next line after NUM_FRAMES_AUTO_SCROLL_DELAY. Players can still press A_BUTTON or B_BUTTON to scroll on their own.
#define NUM_FRAMES_AUTO_SCROLL_DELAY 49
#define PHONEMES_SHARED FALSE // If TRUE, bard phonemes all reference the same sound (sound/direct_sound_samples/phonemes/shared.bin) to save ROM space.
// Measurement system constants to be used for UNITS
@ -83,5 +86,4 @@
// Naming Screen
#define AUTO_LOWERCASE_KEYBOARD GEN_LATEST // Starting in GEN_6, after entering the first uppercase character, the keyboard switches to lowercase letters.
#define SAVE_TYPE_ERROR_SCREEN FALSE // When enabled, this shows an error message when the game is loaded on a cart without a flash chip or on an emulator with the wrong save type setting instead of crashing.
#endif // GUARD_CONFIG_GENERAL_H

View File

@ -38,13 +38,15 @@
// Vs. Seeker
#define I_VS_SEEKER_CHARGING 0 // If this flag is assigned, the Vs Seeker functionality will be enabled. When the player has the Vs. Seeker, Match Call rematch functions will stop working. Documentation for the Vs. Seeker can be found in docs/tutorials/vs_seeker.md.
// Fishing
#define I_FISHING_BITE_ODDS GEN_LATEST // In Gen 1 and Gen 2, the Old Rod has a 100% chance for a bite, Good Rod has a 66% chance for a bite, and Super Rod has a 50% chance for a bite. In Gen 3, all rods have a base 50% chance for a bite. In Gen 4 onwards, the Old Rod has a base 25% chance for a bite, Good Rod has a 50% chance for a bite, and Super Rod has a 75% chance for a bite.
#define I_FISHING_MINIGAME GEN_3 // Each generation uses a variation of reeling in Pokémon once they have been hooked. NOTE: Only the Gen 1/2 and Gen 3 minigames are implemented right now!
#define I_FISHING_ENVIRONMENT GEN_LATEST // In Gen 3, the battle environment when fighting a hooked Pokémon is based on the tile the player is standing on. In Gen 4 onwards, the environment is based on tile that is being fished in, resulting in it usually being a water environment.
#define I_FISHING_STICKY_BOOST GEN_LATEST // In Gen 3, a Pokemon with Suction Cups or Sticky Hold in the first slot of the party causes the chance for a bite to increase by about 35%. In Gen 4 onwards, it doubles the base bite chance.
#define I_FISHING_FOLLOWER_BOOST FALSE // In HGSS, fishing bite odds are increased depending on the friendship of the current following Pokémon.
#define I_FISHING_CHAIN FALSE // Introduced in XY, hooking the same Pokémon repeatedly will increase the odds of that mon being shiny. NOTE: This implementation is an approximation of the actual feature, as XY have not been throughoutly documented or datamined.
#define I_FISHING_PROXIMITY FALSE // Introduced in XY, fishing away from other people in enclosed areas will increase the chances of a Pokémon being hooked. NOTE: This implementation is an approximation of the actual feature, as XY have not been throughoutly documented or datamined.
// ORAS Dowsing Machine
#define I_ORAS_DOWSING_FLAG 0 // Replace 0 with an unused flag to enable the Dowsing Machine mechanic from ORAS.
#define I_ORAS_DOWSING_SOUNDS TRUE // If TRUE, the Dowsing Machine will make sounds based on how far away the hidden item is.
#define I_ORAS_DOWSING_COLOR_PAL 15 // The color within the palette that will change based on proximity to the item.
// Color values for the ORAS dowsing distances/anims
#define I_ORAS_DOWSING_COLOR_NONE RGB_GRAY
#define I_ORAS_DOWSING_COLOR_SLOW RGB2GBA(56, 120, 255)
#define I_ORAS_DOWSING_COLOR_NORMAL RGB2GBA(24, 216, 24)
#define I_ORAS_DOWSING_COLOR_FAST RGB2GBA(255, 255, 40)
#define I_ORAS_DOWSING_COLOR_FASTER RGB_RED
#endif // GUARD_CONFIG_ITEM_H

17
include/config/name_box.h Normal file
View File

@ -0,0 +1,17 @@
#ifndef GUARD_CONFIG_NAME_BOX_H
#define GUARD_CONFIG_NAME_BOX_H
#define OW_FLAG_SUPPRESS_NAME_BOX 0 // If this flag is set, any namebox (whether its from a macro or a code) will not show up until this flag is unset.
// Namebox Speaker configs
#define OW_NAME_BOX_USE_DYNAMIC_WIDTH TRUE // When TRUE, the namebox window can use different width depending on the length of the speaker's name.
#define OW_NAME_BOX_NPC_TRAINER FALSE // When TRUE, any approaching NPC trainers will have a namebox shown automagically. The name will be taken from their trainer data.
#define OW_NAME_BOX_DEFAULT_WIDTH 8 // Maximum width of what OW_NAME_BOX_USE_DYNAMIC_WIDTH can set. Also the default width when the config above is set to FALSE (or the dynamic width exceeds this value).
#define OW_NAME_BOX_DEFAULT_HEIGHT 2 // Maximum height of the namebox window.
// Text colors of Namebox. The numbers corresponds to the palette index.
// The BG color is not provided as it always needs to be 0.
#define OW_NAME_BOX_FOREGROUND_COLOR 1
#define OW_NAME_BOX_SHADOW_COLOR 2
#endif // GUARD_CONFIG_NAME_BOX_H

View File

@ -86,13 +86,13 @@
#define GEN_8_PLA GEN_LATEST + 2
#define TIME_DEBUG GEN_LATEST + 3
//Time
// Time
#define OW_TIMES_OF_DAY GEN_LATEST // Different generations have the times of day change at different times.
#define OW_USE_FAKE_RTC FALSE // When TRUE, seconds on the in-game clock will only advance once every 60 playTimeVBlanks (every 60 frames).
#define OW_ALTERED_TIME_RATIO GEN_LATEST // In GEN_8_PLA, the time in game moves forward 60 seconds for every second in the RTC. In GEN_9, it is 20 seconds. TIME_DEBUG is 1:1, and meant for debugging purposes. This has no effect if OW_USE_FAKE_RTC is FALSE.
#define OW_TIME_OF_DAY_ENCOUNTERS FALSE // If TRUE, will allow the user to define and use different encounter tables based on the time of day.
#define OW_TIME_OF_DAY_DISABLE_FALLBACK FALSE // If TRUE, if the encounter table for a specific map and time is empty, the area will have no encounters instead of falling back to the vanilla map and time.
#define OW_TIME_OF_DAY_FALLBACK TIME_MORNING // The time of day that encounter tables fall back to.
#define OW_TIME_OF_DAY_FALLBACK TIME_MORNING // The time of day that encounter tables fall back to. If you set OW_TIMES_OF_DAY to GEN_3, change this to TIME_DAY or you won't have any encounters!
// Lighting
#define OW_SHADOW_INTENSITY 4 // Ranges from 0 to 16, where 0 is fully transparent and 16 is black.

View File

@ -29,6 +29,8 @@
#define P_GIGANTAMAX_FORMS TRUE
#define P_TERA_FORMS TRUE
#define P_GEN_9_MEGA_EVOLUTIONS P_MEGA_EVOLUTIONS // Mega Evolutions introduced in Z-A and its DLC
// Fusion forms
#define P_FUSION_FORMS TRUE

View File

@ -2,16 +2,16 @@
#define GUARD_CONFIG_SUMMARY_SCREEN_H
// Settings
#define P_SUMMARY_SCREEN_MOVE_RELEARNER TRUE // If TRUE, shows an option for Pokémon to relearn moves on the summary screen moves page.
#define P_SUMMARY_SCREEN_NATURE_COLORS TRUE // If TRUE, nature-based stat boosts and reductions will be red and blue in the summary screen.
#define P_SUMMARY_MOVE_RELEARNER_FULL_PP TRUE // If TRUE, the move relearner in the summary screen restores relearned moves' PP to full.
#define P_SUMMARY_SCREEN_NATURE_COLORS TRUE // If TRUE, nature-based stat boosts and reductions will be red and blue in the summary screen.
#define P_SUMMARY_SCREEN_RENAME TRUE // If TRUE, an option to change Pokémon nicknames replaces the cancel prompt on the summary screen info page.
// IV/EV settings
#define P_SUMMARY_SCREEN_IV_EV_INFO FALSE // If TRUE, will allow player to cycle through the Stats, IVs, and EVs in the summary screen skills page.
#define P_SUMMARY_SCREEN_IV_EV_BOX_ONLY FALSE // If TRUE, will allow player to cycle through the Stats, IVs, and EVs in the summary screen skills page, but only in the PC storage box.
#define P_SUMMARY_SCREEN_IV_HYPERTRAIN TRUE // If TRUE, stats that have been hyper trained will show as 31/S when viewing them in the summary screen
#define P_SUMMARY_SCREEN_IV_EV_TILESET FALSE // If TRUE, loads an alternate tileset to allow changing the "STATS" label in the summary screen skills page. Note: if it's still loading the alternate tileset after changing this and recompiling, you may need a `make clean` before compilation.
#define P_SUMMARY_SCREEN_IV_EV_VALUES FALSE // If TRUE, will show the actual IV value instead of the letter grade.
/*
/*
LETTER GRADE GUIDE:
F = 0
@ -26,7 +26,32 @@ Info taken from https://bulbapedia.bulbagarden.net/wiki/Stats_judge.
#define P_SUMMARY_SCREEN_IV_ONLY FALSE // If TRUE, will only show IV info in the summary screen.
#define P_SUMMARY_SCREEN_EV_ONLY FALSE // If TRUE, will only show EV info in the summary screen.
// Flags
// IV/EV flags
#define P_FLAG_SUMMARY_SCREEN_IV_EV_INFO 0 // If this flag is set, will allow player to cycle through the Stats, IVs, and EVs in the summary screen skills page. Note: if P_SUMMARY_SCREEN_IV_EV_INFO is TRUE, this flag does nothing.
// Move Relearner settings
#define P_ENABLE_MOVE_RELEARNERS FALSE // If TRUE, it enables move relearners for egg, TM and tutor. (see below for specific configs /flags)
#define P_SORT_MOVES FALSE // If TRUE, sorts all moves alphabetically in the relearner's list.
// Level up Relearner
#define P_PRE_EVO_MOVES FALSE // If TRUE, it enables the Pokémon to learn moves from it's pre evolution.
#define P_ENABLE_ALL_LEVEL_UP_MOVES FALSE // If TRUE, it enables the Pokémon to learn all level up moves, regardless of its level.
// TM Relearner
#define P_TM_MOVES_RELEARNER TRUE // If TRUE, enables machine move relearner.
#define P_ENABLE_ALL_TM_MOVES FALSE // If TRUE, it enables the Pokémon to learn all TMs its compatible with, regardless of it being in the bag.
// Relearner flags - Redundant if P_ENABLE_MOVE_RELEARNERS is TRUE, but still added here incase you don't want all relearners unlocked at the same time.
// To use the following features in scripting, replace the 0s with the flag ID you're assigning it to.
// Eg: Replace with FLAG_UNUSED_0x264 so you can use that flag to toggle the feature.
#define P_FLAG_EGG_MOVES 0 // If this flag is set, enables egg move relearner.
#define P_FLAG_TUTOR_MOVES 0 // If this flag is set, enables tutor move relearner.
// Move Relearner summary screen
#define P_SUMMARY_SCREEN_MOVE_RELEARNER TRUE // If TRUE, shows an option for Pokémon to relearn moves on the summary screen moves page.
#define P_SUMMARY_MOVE_RELEARNER_FULL_PP TRUE // If TRUE, the move relearner in the summary screen restores relearned moves' PP to full.
// Move Relearner party menu
#define P_PARTY_MOVE_RELEARNER FALSE // If TRUE, it enables the move relearner in the party menu.
#endif // GUARD_CONFIG_SUMMARY_SCREEN_H

19
include/config/text.h Normal file
View File

@ -0,0 +1,19 @@
#ifndef GUARD_CONFIG_TEXT_H
#define GUARD_CONFIG_TEXT_H
// Text settings:
#define AUTO_SCROLL_TEXT FALSE // If TRUE, text will automatically scroll to the next line after NUM_FRAMES_AUTO_SCROLL_DELAY. Players can still press A_BUTTON or B_BUTTON to scroll on their own.
#define NUM_FRAMES_AUTO_SCROLL_DELAY 49
// A note on the modifiers: they are roughly multiplicative, so having them set at 1 is vanilla speed. They also are used to calculate frame delays for the speed of the scroll effect and the animated down arrow, so to that end, they are capped at 31 to prevent the text printing from desyncing with A/B button inputs.
// From testing, a value of 18 to 20 is essentially equivalent to instant text.
#define TEXT_SPEED_SLOW_MODIFIER 1 // How fast the SLOW text speed option prints
#define TEXT_SPEED_MEDIUM_MODIFIER 1 // How fast the MID text speed option prints
#define TEXT_SPEED_FAST_MODIFIER 1 // How fast the FAST text speed option prints
#define TEXT_SPEED_INSTANT_MODIFIER 12 // Needed only for the animation delays
#define TEXT_SPEED_INSTANT FALSE // Renders all text as fast as it can, basically instant. Overrides FLAG_TEXT_SPEED_INSTANT and in-game player options menu setting.
// Text speed flag:
#define FLAG_TEXT_SPEED_INSTANT 0 // Use this if you want to toggle instant text speed
#endif // GUARD_CONFIG_TEXT_H

View File

@ -1,344 +1,339 @@
#ifndef GUARD_CONSTANTS_ABILITIES_H
#define GUARD_CONSTANTS_ABILITIES_H
#define ABILITY_NONE 0
#define ABILITY_STENCH 1
#define ABILITY_DRIZZLE 2
#define ABILITY_SPEED_BOOST 3
#define ABILITY_BATTLE_ARMOR 4
#define ABILITY_STURDY 5
#define ABILITY_DAMP 6
#define ABILITY_LIMBER 7
#define ABILITY_SAND_VEIL 8
#define ABILITY_STATIC 9
#define ABILITY_VOLT_ABSORB 10
#define ABILITY_WATER_ABSORB 11
#define ABILITY_OBLIVIOUS 12
#define ABILITY_CLOUD_NINE 13
#define ABILITY_COMPOUND_EYES 14
#define ABILITY_INSOMNIA 15
#define ABILITY_COLOR_CHANGE 16
#define ABILITY_IMMUNITY 17
#define ABILITY_FLASH_FIRE 18
#define ABILITY_SHIELD_DUST 19
#define ABILITY_OWN_TEMPO 20
#define ABILITY_SUCTION_CUPS 21
#define ABILITY_INTIMIDATE 22
#define ABILITY_SHADOW_TAG 23
#define ABILITY_ROUGH_SKIN 24
#define ABILITY_WONDER_GUARD 25
#define ABILITY_LEVITATE 26
#define ABILITY_EFFECT_SPORE 27
#define ABILITY_SYNCHRONIZE 28
#define ABILITY_CLEAR_BODY 29
#define ABILITY_NATURAL_CURE 30
#define ABILITY_LIGHTNING_ROD 31
#define ABILITY_SERENE_GRACE 32
#define ABILITY_SWIFT_SWIM 33
#define ABILITY_CHLOROPHYLL 34
#define ABILITY_ILLUMINATE 35
#define ABILITY_TRACE 36
#define ABILITY_HUGE_POWER 37
#define ABILITY_POISON_POINT 38
#define ABILITY_INNER_FOCUS 39
#define ABILITY_MAGMA_ARMOR 40
#define ABILITY_WATER_VEIL 41
#define ABILITY_MAGNET_PULL 42
#define ABILITY_SOUNDPROOF 43
#define ABILITY_RAIN_DISH 44
#define ABILITY_SAND_STREAM 45
#define ABILITY_PRESSURE 46
#define ABILITY_THICK_FAT 47
#define ABILITY_EARLY_BIRD 48
#define ABILITY_FLAME_BODY 49
#define ABILITY_RUN_AWAY 50
#define ABILITY_KEEN_EYE 51
#define ABILITY_HYPER_CUTTER 52
#define ABILITY_PICKUP 53
#define ABILITY_TRUANT 54
#define ABILITY_HUSTLE 55
#define ABILITY_CUTE_CHARM 56
#define ABILITY_PLUS 57
#define ABILITY_MINUS 58
#define ABILITY_FORECAST 59
#define ABILITY_STICKY_HOLD 60
#define ABILITY_SHED_SKIN 61
#define ABILITY_GUTS 62
#define ABILITY_MARVEL_SCALE 63
#define ABILITY_LIQUID_OOZE 64
#define ABILITY_OVERGROW 65
#define ABILITY_BLAZE 66
#define ABILITY_TORRENT 67
#define ABILITY_SWARM 68
#define ABILITY_ROCK_HEAD 69
#define ABILITY_DROUGHT 70
#define ABILITY_ARENA_TRAP 71
#define ABILITY_VITAL_SPIRIT 72
#define ABILITY_WHITE_SMOKE 73
#define ABILITY_PURE_POWER 74
#define ABILITY_SHELL_ARMOR 75
#define ABILITY_AIR_LOCK 76
enum __attribute__((packed)) Ability
{
ABILITY_NONE = 0,
ABILITY_STENCH = 1,
ABILITY_DRIZZLE = 2,
ABILITY_SPEED_BOOST = 3,
ABILITY_BATTLE_ARMOR = 4,
ABILITY_STURDY = 5,
ABILITY_DAMP = 6,
ABILITY_LIMBER = 7,
ABILITY_SAND_VEIL = 8,
ABILITY_STATIC = 9,
ABILITY_VOLT_ABSORB = 10,
ABILITY_WATER_ABSORB = 11,
ABILITY_OBLIVIOUS = 12,
ABILITY_CLOUD_NINE = 13,
ABILITY_COMPOUND_EYES = 14,
ABILITY_INSOMNIA = 15,
ABILITY_COLOR_CHANGE = 16,
ABILITY_IMMUNITY = 17,
ABILITY_FLASH_FIRE = 18,
ABILITY_SHIELD_DUST = 19,
ABILITY_OWN_TEMPO = 20,
ABILITY_SUCTION_CUPS = 21,
ABILITY_INTIMIDATE = 22,
ABILITY_SHADOW_TAG = 23,
ABILITY_ROUGH_SKIN = 24,
ABILITY_WONDER_GUARD = 25,
ABILITY_LEVITATE = 26,
ABILITY_EFFECT_SPORE = 27,
ABILITY_SYNCHRONIZE = 28,
ABILITY_CLEAR_BODY = 29,
ABILITY_NATURAL_CURE = 30,
ABILITY_LIGHTNING_ROD = 31,
ABILITY_SERENE_GRACE = 32,
ABILITY_SWIFT_SWIM = 33,
ABILITY_CHLOROPHYLL = 34,
ABILITY_ILLUMINATE = 35,
ABILITY_TRACE = 36,
ABILITY_HUGE_POWER = 37,
ABILITY_POISON_POINT = 38,
ABILITY_INNER_FOCUS = 39,
ABILITY_MAGMA_ARMOR = 40,
ABILITY_WATER_VEIL = 41,
ABILITY_MAGNET_PULL = 42,
ABILITY_SOUNDPROOF = 43,
ABILITY_RAIN_DISH = 44,
ABILITY_SAND_STREAM = 45,
ABILITY_PRESSURE = 46,
ABILITY_THICK_FAT = 47,
ABILITY_EARLY_BIRD = 48,
ABILITY_FLAME_BODY = 49,
ABILITY_RUN_AWAY = 50,
ABILITY_KEEN_EYE = 51,
ABILITY_HYPER_CUTTER = 52,
ABILITY_PICKUP = 53,
ABILITY_TRUANT = 54,
ABILITY_HUSTLE = 55,
ABILITY_CUTE_CHARM = 56,
ABILITY_PLUS = 57,
ABILITY_MINUS = 58,
ABILITY_FORECAST = 59,
ABILITY_STICKY_HOLD = 60,
ABILITY_SHED_SKIN = 61,
ABILITY_GUTS = 62,
ABILITY_MARVEL_SCALE = 63,
ABILITY_LIQUID_OOZE = 64,
ABILITY_OVERGROW = 65,
ABILITY_BLAZE = 66,
ABILITY_TORRENT = 67,
ABILITY_SWARM = 68,
ABILITY_ROCK_HEAD = 69,
ABILITY_DROUGHT = 70,
ABILITY_ARENA_TRAP = 71,
ABILITY_VITAL_SPIRIT = 72,
ABILITY_WHITE_SMOKE = 73,
ABILITY_PURE_POWER = 74,
ABILITY_SHELL_ARMOR = 75,
ABILITY_AIR_LOCK = 76,
ABILITIES_COUNT_GEN3,
#define ABILITIES_COUNT_GEN3 77
// Gen 4
ABILITY_TANGLED_FEET = ABILITIES_COUNT_GEN3,
ABILITY_MOTOR_DRIVE = 78,
ABILITY_RIVALRY = 79,
ABILITY_STEADFAST = 80,
ABILITY_SNOW_CLOAK = 81,
ABILITY_GLUTTONY = 82,
ABILITY_ANGER_POINT = 83,
ABILITY_UNBURDEN = 84,
ABILITY_HEATPROOF = 85,
ABILITY_SIMPLE = 86,
ABILITY_DRY_SKIN = 87,
ABILITY_DOWNLOAD = 88,
ABILITY_IRON_FIST = 89,
ABILITY_POISON_HEAL = 90,
ABILITY_ADAPTABILITY = 91,
ABILITY_SKILL_LINK = 92,
ABILITY_HYDRATION = 93,
ABILITY_SOLAR_POWER = 94,
ABILITY_QUICK_FEET = 95,
ABILITY_NORMALIZE = 96,
ABILITY_SNIPER = 97,
ABILITY_MAGIC_GUARD = 98,
ABILITY_NO_GUARD = 99,
ABILITY_STALL = 100,
ABILITY_TECHNICIAN = 101,
ABILITY_LEAF_GUARD = 102,
ABILITY_KLUTZ = 103,
ABILITY_MOLD_BREAKER = 104,
ABILITY_SUPER_LUCK = 105,
ABILITY_AFTERMATH = 106,
ABILITY_ANTICIPATION = 107,
ABILITY_FOREWARN = 108,
ABILITY_UNAWARE = 109,
ABILITY_TINTED_LENS = 110,
ABILITY_FILTER = 111,
ABILITY_SLOW_START = 112,
ABILITY_SCRAPPY = 113,
ABILITY_STORM_DRAIN = 114,
ABILITY_ICE_BODY = 115,
ABILITY_SOLID_ROCK = 116,
ABILITY_SNOW_WARNING = 117,
ABILITY_HONEY_GATHER = 118,
ABILITY_FRISK = 119,
ABILITY_RECKLESS = 120,
ABILITY_MULTITYPE = 121,
ABILITY_FLOWER_GIFT = 122,
ABILITY_BAD_DREAMS = 123,
ABILITIES_COUNT_GEN4,
// Gen 4
#define ABILITY_TANGLED_FEET 77
#define ABILITY_MOTOR_DRIVE 78
#define ABILITY_RIVALRY 79
#define ABILITY_STEADFAST 80
#define ABILITY_SNOW_CLOAK 81
#define ABILITY_GLUTTONY 82
#define ABILITY_ANGER_POINT 83
#define ABILITY_UNBURDEN 84
#define ABILITY_HEATPROOF 85
#define ABILITY_SIMPLE 86
#define ABILITY_DRY_SKIN 87
#define ABILITY_DOWNLOAD 88
#define ABILITY_IRON_FIST 89
#define ABILITY_POISON_HEAL 90
#define ABILITY_ADAPTABILITY 91
#define ABILITY_SKILL_LINK 92
#define ABILITY_HYDRATION 93
#define ABILITY_SOLAR_POWER 94
#define ABILITY_QUICK_FEET 95
#define ABILITY_NORMALIZE 96
#define ABILITY_SNIPER 97
#define ABILITY_MAGIC_GUARD 98
#define ABILITY_NO_GUARD 99
#define ABILITY_STALL 100
#define ABILITY_TECHNICIAN 101
#define ABILITY_LEAF_GUARD 102
#define ABILITY_KLUTZ 103
#define ABILITY_MOLD_BREAKER 104
#define ABILITY_SUPER_LUCK 105
#define ABILITY_AFTERMATH 106
#define ABILITY_ANTICIPATION 107
#define ABILITY_FOREWARN 108
#define ABILITY_UNAWARE 109
#define ABILITY_TINTED_LENS 110
#define ABILITY_FILTER 111
#define ABILITY_SLOW_START 112
#define ABILITY_SCRAPPY 113
#define ABILITY_STORM_DRAIN 114
#define ABILITY_ICE_BODY 115
#define ABILITY_SOLID_ROCK 116
#define ABILITY_SNOW_WARNING 117
#define ABILITY_HONEY_GATHER 118
#define ABILITY_FRISK 119
#define ABILITY_RECKLESS 120
#define ABILITY_MULTITYPE 121
#define ABILITY_FLOWER_GIFT 122
#define ABILITY_BAD_DREAMS 123
// Gen 5
ABILITY_PICKPOCKET = ABILITIES_COUNT_GEN4,
ABILITY_SHEER_FORCE = 125,
ABILITY_CONTRARY = 126,
ABILITY_UNNERVE = 127,
ABILITY_DEFIANT = 128,
ABILITY_DEFEATIST = 129,
ABILITY_CURSED_BODY = 130,
ABILITY_HEALER = 131,
ABILITY_FRIEND_GUARD = 132,
ABILITY_WEAK_ARMOR = 133,
ABILITY_HEAVY_METAL = 134,
ABILITY_LIGHT_METAL = 135,
ABILITY_MULTISCALE = 136,
ABILITY_TOXIC_BOOST = 137,
ABILITY_FLARE_BOOST = 138,
ABILITY_HARVEST = 139,
ABILITY_TELEPATHY = 140,
ABILITY_MOODY = 141,
ABILITY_OVERCOAT = 142,
ABILITY_POISON_TOUCH = 143,
ABILITY_REGENERATOR = 144,
ABILITY_BIG_PECKS = 145,
ABILITY_SAND_RUSH = 146,
ABILITY_WONDER_SKIN = 147,
ABILITY_ANALYTIC = 148,
ABILITY_ILLUSION = 149,
ABILITY_IMPOSTER = 150,
ABILITY_INFILTRATOR = 151,
ABILITY_MUMMY = 152,
ABILITY_MOXIE = 153,
ABILITY_JUSTIFIED = 154,
ABILITY_RATTLED = 155,
ABILITY_MAGIC_BOUNCE = 156,
ABILITY_SAP_SIPPER = 157,
ABILITY_PRANKSTER = 158,
ABILITY_SAND_FORCE = 159,
ABILITY_IRON_BARBS = 160,
ABILITY_ZEN_MODE = 161,
ABILITY_VICTORY_STAR = 162,
ABILITY_TURBOBLAZE = 163,
ABILITY_TERAVOLT = 164,
ABILITIES_COUNT_GEN5,
#define ABILITIES_COUNT_GEN4 124
// Gen 6
ABILITY_AROMA_VEIL = ABILITIES_COUNT_GEN5,
ABILITY_FLOWER_VEIL = 166,
ABILITY_CHEEK_POUCH = 167,
ABILITY_PROTEAN = 168,
ABILITY_FUR_COAT = 169,
ABILITY_MAGICIAN = 170,
ABILITY_BULLETPROOF = 171,
ABILITY_COMPETITIVE = 172,
ABILITY_STRONG_JAW = 173,
ABILITY_REFRIGERATE = 174,
ABILITY_SWEET_VEIL = 175,
ABILITY_STANCE_CHANGE = 176,
ABILITY_GALE_WINGS = 177,
ABILITY_MEGA_LAUNCHER = 178,
ABILITY_GRASS_PELT = 179,
ABILITY_SYMBIOSIS = 180,
ABILITY_TOUGH_CLAWS = 181,
ABILITY_PIXILATE = 182,
ABILITY_GOOEY = 183,
ABILITY_AERILATE = 184,
ABILITY_PARENTAL_BOND = 185,
ABILITY_DARK_AURA = 186,
ABILITY_FAIRY_AURA = 187,
ABILITY_AURA_BREAK = 188,
ABILITY_PRIMORDIAL_SEA = 189,
ABILITY_DESOLATE_LAND = 190,
ABILITY_DELTA_STREAM = 191,
ABILITIES_COUNT_GEN6,
// Gen 5
#define ABILITY_PICKPOCKET 124
#define ABILITY_SHEER_FORCE 125
#define ABILITY_CONTRARY 126
#define ABILITY_UNNERVE 127
#define ABILITY_DEFIANT 128
#define ABILITY_DEFEATIST 129
#define ABILITY_CURSED_BODY 130
#define ABILITY_HEALER 131
#define ABILITY_FRIEND_GUARD 132
#define ABILITY_WEAK_ARMOR 133
#define ABILITY_HEAVY_METAL 134
#define ABILITY_LIGHT_METAL 135
#define ABILITY_MULTISCALE 136
#define ABILITY_TOXIC_BOOST 137
#define ABILITY_FLARE_BOOST 138
#define ABILITY_HARVEST 139
#define ABILITY_TELEPATHY 140
#define ABILITY_MOODY 141
#define ABILITY_OVERCOAT 142
#define ABILITY_POISON_TOUCH 143
#define ABILITY_REGENERATOR 144
#define ABILITY_BIG_PECKS 145
#define ABILITY_SAND_RUSH 146
#define ABILITY_WONDER_SKIN 147
#define ABILITY_ANALYTIC 148
#define ABILITY_ILLUSION 149
#define ABILITY_IMPOSTER 150
#define ABILITY_INFILTRATOR 151
#define ABILITY_MUMMY 152
#define ABILITY_MOXIE 153
#define ABILITY_JUSTIFIED 154
#define ABILITY_RATTLED 155
#define ABILITY_MAGIC_BOUNCE 156
#define ABILITY_SAP_SIPPER 157
#define ABILITY_PRANKSTER 158
#define ABILITY_SAND_FORCE 159
#define ABILITY_IRON_BARBS 160
#define ABILITY_ZEN_MODE 161
#define ABILITY_VICTORY_STAR 162
#define ABILITY_TURBOBLAZE 163
#define ABILITY_TERAVOLT 164
// Gen 7
ABILITY_STAMINA = ABILITIES_COUNT_GEN6,
ABILITY_WIMP_OUT = 193,
ABILITY_EMERGENCY_EXIT = 194,
ABILITY_WATER_COMPACTION = 195,
ABILITY_MERCILESS = 196,
ABILITY_SHIELDS_DOWN = 197,
ABILITY_STAKEOUT = 198,
ABILITY_WATER_BUBBLE = 199,
ABILITY_STEELWORKER = 200,
ABILITY_BERSERK = 201,
ABILITY_SLUSH_RUSH = 202,
ABILITY_LONG_REACH = 203,
ABILITY_LIQUID_VOICE = 204,
ABILITY_TRIAGE = 205,
ABILITY_GALVANIZE = 206,
ABILITY_SURGE_SURFER = 207,
ABILITY_SCHOOLING = 208,
ABILITY_DISGUISE = 209,
ABILITY_BATTLE_BOND = 210,
ABILITY_POWER_CONSTRUCT = 211,
ABILITY_CORROSION = 212,
ABILITY_COMATOSE = 213,
ABILITY_QUEENLY_MAJESTY = 214,
ABILITY_INNARDS_OUT = 215,
ABILITY_DANCER = 216,
ABILITY_BATTERY = 217,
ABILITY_FLUFFY = 218,
ABILITY_DAZZLING = 219,
ABILITY_SOUL_HEART = 220,
ABILITY_TANGLING_HAIR = 221,
ABILITY_RECEIVER = 222,
ABILITY_POWER_OF_ALCHEMY = 223,
ABILITY_BEAST_BOOST = 224,
ABILITY_RKS_SYSTEM = 225,
ABILITY_ELECTRIC_SURGE = 226,
ABILITY_PSYCHIC_SURGE = 227,
ABILITY_MISTY_SURGE = 228,
ABILITY_GRASSY_SURGE = 229,
ABILITY_FULL_METAL_BODY = 230,
ABILITY_SHADOW_SHIELD = 231,
ABILITY_PRISM_ARMOR = 232,
ABILITY_NEUROFORCE = 233,
ABILITIES_COUNT_GEN7,
#define ABILITIES_COUNT_GEN5 165
// Gen 8
ABILITY_INTREPID_SWORD = ABILITIES_COUNT_GEN7,
ABILITY_DAUNTLESS_SHIELD = 235,
ABILITY_LIBERO = 236,
ABILITY_BALL_FETCH = 237,
ABILITY_COTTON_DOWN = 238,
ABILITY_PROPELLER_TAIL = 239,
ABILITY_MIRROR_ARMOR = 240,
ABILITY_GULP_MISSILE = 241,
ABILITY_STALWART = 242,
ABILITY_STEAM_ENGINE = 243,
ABILITY_PUNK_ROCK = 244,
ABILITY_SAND_SPIT = 245,
ABILITY_ICE_SCALES = 246,
ABILITY_RIPEN = 247,
ABILITY_ICE_FACE = 248,
ABILITY_POWER_SPOT = 249,
ABILITY_MIMICRY = 250,
ABILITY_SCREEN_CLEANER = 251,
ABILITY_STEELY_SPIRIT = 252,
ABILITY_PERISH_BODY = 253,
ABILITY_WANDERING_SPIRIT = 254,
ABILITY_GORILLA_TACTICS = 255,
ABILITY_NEUTRALIZING_GAS = 256,
ABILITY_PASTEL_VEIL = 257,
ABILITY_HUNGER_SWITCH = 258,
ABILITY_QUICK_DRAW = 259,
ABILITY_UNSEEN_FIST = 260,
ABILITY_CURIOUS_MEDICINE = 261,
ABILITY_TRANSISTOR = 262,
ABILITY_DRAGONS_MAW = 263,
ABILITY_CHILLING_NEIGH = 264,
ABILITY_GRIM_NEIGH = 265,
ABILITY_AS_ONE_ICE_RIDER = 266,
ABILITY_AS_ONE_SHADOW_RIDER = 267,
ABILITIES_COUNT_GEN8,
// Gen 6
#define ABILITY_AROMA_VEIL 165
#define ABILITY_FLOWER_VEIL 166
#define ABILITY_CHEEK_POUCH 167
#define ABILITY_PROTEAN 168
#define ABILITY_FUR_COAT 169
#define ABILITY_MAGICIAN 170
#define ABILITY_BULLETPROOF 171
#define ABILITY_COMPETITIVE 172
#define ABILITY_STRONG_JAW 173
#define ABILITY_REFRIGERATE 174
#define ABILITY_SWEET_VEIL 175
#define ABILITY_STANCE_CHANGE 176
#define ABILITY_GALE_WINGS 177
#define ABILITY_MEGA_LAUNCHER 178
#define ABILITY_GRASS_PELT 179
#define ABILITY_SYMBIOSIS 180
#define ABILITY_TOUGH_CLAWS 181
#define ABILITY_PIXILATE 182
#define ABILITY_GOOEY 183
#define ABILITY_AERILATE 184
#define ABILITY_PARENTAL_BOND 185
#define ABILITY_DARK_AURA 186
#define ABILITY_FAIRY_AURA 187
#define ABILITY_AURA_BREAK 188
#define ABILITY_PRIMORDIAL_SEA 189
#define ABILITY_DESOLATE_LAND 190
#define ABILITY_DELTA_STREAM 191
#define ABILITIES_COUNT_GEN6 192
// Gen 7
#define ABILITY_STAMINA 192
#define ABILITY_WIMP_OUT 193
#define ABILITY_EMERGENCY_EXIT 194
#define ABILITY_WATER_COMPACTION 195
#define ABILITY_MERCILESS 196
#define ABILITY_SHIELDS_DOWN 197
#define ABILITY_STAKEOUT 198
#define ABILITY_WATER_BUBBLE 199
#define ABILITY_STEELWORKER 200
#define ABILITY_BERSERK 201
#define ABILITY_SLUSH_RUSH 202
#define ABILITY_LONG_REACH 203
#define ABILITY_LIQUID_VOICE 204
#define ABILITY_TRIAGE 205
#define ABILITY_GALVANIZE 206
#define ABILITY_SURGE_SURFER 207
#define ABILITY_SCHOOLING 208
#define ABILITY_DISGUISE 209
#define ABILITY_BATTLE_BOND 210
#define ABILITY_POWER_CONSTRUCT 211
#define ABILITY_CORROSION 212
#define ABILITY_COMATOSE 213
#define ABILITY_QUEENLY_MAJESTY 214
#define ABILITY_INNARDS_OUT 215
#define ABILITY_DANCER 216
#define ABILITY_BATTERY 217
#define ABILITY_FLUFFY 218
#define ABILITY_DAZZLING 219
#define ABILITY_SOUL_HEART 220
#define ABILITY_TANGLING_HAIR 221
#define ABILITY_RECEIVER 222
#define ABILITY_POWER_OF_ALCHEMY 223
#define ABILITY_BEAST_BOOST 224
#define ABILITY_RKS_SYSTEM 225
#define ABILITY_ELECTRIC_SURGE 226
#define ABILITY_PSYCHIC_SURGE 227
#define ABILITY_MISTY_SURGE 228
#define ABILITY_GRASSY_SURGE 229
#define ABILITY_FULL_METAL_BODY 230
#define ABILITY_SHADOW_SHIELD 231
#define ABILITY_PRISM_ARMOR 232
#define ABILITY_NEUROFORCE 233
#define ABILITIES_COUNT_GEN7 234
// Gen 8
#define ABILITY_INTREPID_SWORD 234
#define ABILITY_DAUNTLESS_SHIELD 235
#define ABILITY_LIBERO 236
#define ABILITY_BALL_FETCH 237
#define ABILITY_COTTON_DOWN 238
#define ABILITY_PROPELLER_TAIL 239
#define ABILITY_MIRROR_ARMOR 240
#define ABILITY_GULP_MISSILE 241
#define ABILITY_STALWART 242
#define ABILITY_STEAM_ENGINE 243
#define ABILITY_PUNK_ROCK 244
#define ABILITY_SAND_SPIT 245
#define ABILITY_ICE_SCALES 246
#define ABILITY_RIPEN 247
#define ABILITY_ICE_FACE 248
#define ABILITY_POWER_SPOT 249
#define ABILITY_MIMICRY 250
#define ABILITY_SCREEN_CLEANER 251
#define ABILITY_STEELY_SPIRIT 252
#define ABILITY_PERISH_BODY 253
#define ABILITY_WANDERING_SPIRIT 254
#define ABILITY_GORILLA_TACTICS 255
#define ABILITY_NEUTRALIZING_GAS 256
#define ABILITY_PASTEL_VEIL 257
#define ABILITY_HUNGER_SWITCH 258
#define ABILITY_QUICK_DRAW 259
#define ABILITY_UNSEEN_FIST 260
#define ABILITY_CURIOUS_MEDICINE 261
#define ABILITY_TRANSISTOR 262
#define ABILITY_DRAGONS_MAW 263
#define ABILITY_CHILLING_NEIGH 264
#define ABILITY_GRIM_NEIGH 265
#define ABILITY_AS_ONE_ICE_RIDER 266
#define ABILITY_AS_ONE_SHADOW_RIDER 267
#define ABILITIES_COUNT_GEN8 268
// Gen 9
#define ABILITY_LINGERING_AROMA 268
#define ABILITY_SEED_SOWER 269
#define ABILITY_THERMAL_EXCHANGE 270
#define ABILITY_ANGER_SHELL 271
#define ABILITY_PURIFYING_SALT 272
#define ABILITY_WELL_BAKED_BODY 273
#define ABILITY_WIND_RIDER 274
#define ABILITY_GUARD_DOG 275
#define ABILITY_ROCKY_PAYLOAD 276
#define ABILITY_WIND_POWER 277
#define ABILITY_ZERO_TO_HERO 278
#define ABILITY_COMMANDER 279
#define ABILITY_ELECTROMORPHOSIS 280
#define ABILITY_PROTOSYNTHESIS 281
#define ABILITY_QUARK_DRIVE 282
#define ABILITY_GOOD_AS_GOLD 283
#define ABILITY_VESSEL_OF_RUIN 284
#define ABILITY_SWORD_OF_RUIN 285
#define ABILITY_TABLETS_OF_RUIN 286
#define ABILITY_BEADS_OF_RUIN 287
#define ABILITY_ORICHALCUM_PULSE 288
#define ABILITY_HADRON_ENGINE 289
#define ABILITY_OPPORTUNIST 290
#define ABILITY_CUD_CHEW 291
#define ABILITY_SHARPNESS 292
#define ABILITY_SUPREME_OVERLORD 293
#define ABILITY_COSTAR 294
#define ABILITY_TOXIC_DEBRIS 295
#define ABILITY_ARMOR_TAIL 296
#define ABILITY_EARTH_EATER 297
#define ABILITY_MYCELIUM_MIGHT 298
#define ABILITY_HOSPITALITY 299
#define ABILITY_MINDS_EYE 300
#define ABILITY_EMBODY_ASPECT_TEAL_MASK 301
#define ABILITY_EMBODY_ASPECT_HEARTHFLAME_MASK 302
#define ABILITY_EMBODY_ASPECT_WELLSPRING_MASK 303
#define ABILITY_EMBODY_ASPECT_CORNERSTONE_MASK 304
#define ABILITY_TOXIC_CHAIN 305
#define ABILITY_SUPERSWEET_SYRUP 306
#define ABILITY_TERA_SHIFT 307
#define ABILITY_TERA_SHELL 308
#define ABILITY_TERAFORM_ZERO 309
#define ABILITY_POISON_PUPPETEER 310
#define ABILITIES_COUNT_GEN9 311
#define ABILITIES_COUNT ABILITIES_COUNT_GEN9
// Gen 9
ABILITY_LINGERING_AROMA = ABILITIES_COUNT_GEN8,
ABILITY_SEED_SOWER = 269,
ABILITY_THERMAL_EXCHANGE = 270,
ABILITY_ANGER_SHELL = 271,
ABILITY_PURIFYING_SALT = 272,
ABILITY_WELL_BAKED_BODY = 273,
ABILITY_WIND_RIDER = 274,
ABILITY_GUARD_DOG = 275,
ABILITY_ROCKY_PAYLOAD = 276,
ABILITY_WIND_POWER = 277,
ABILITY_ZERO_TO_HERO = 278,
ABILITY_COMMANDER = 279,
ABILITY_ELECTROMORPHOSIS = 280,
ABILITY_PROTOSYNTHESIS = 281,
ABILITY_QUARK_DRIVE = 282,
ABILITY_GOOD_AS_GOLD = 283,
ABILITY_VESSEL_OF_RUIN = 284,
ABILITY_SWORD_OF_RUIN = 285,
ABILITY_TABLETS_OF_RUIN = 286,
ABILITY_BEADS_OF_RUIN = 287,
ABILITY_ORICHALCUM_PULSE = 288,
ABILITY_HADRON_ENGINE = 289,
ABILITY_OPPORTUNIST = 290,
ABILITY_CUD_CHEW = 291,
ABILITY_SHARPNESS = 292,
ABILITY_SUPREME_OVERLORD = 293,
ABILITY_COSTAR = 294,
ABILITY_TOXIC_DEBRIS = 295,
ABILITY_ARMOR_TAIL = 296,
ABILITY_EARTH_EATER = 297,
ABILITY_MYCELIUM_MIGHT = 298,
ABILITY_HOSPITALITY = 299,
ABILITY_MINDS_EYE = 300,
ABILITY_EMBODY_ASPECT_TEAL_MASK = 301,
ABILITY_EMBODY_ASPECT_HEARTHFLAME_MASK = 302,
ABILITY_EMBODY_ASPECT_WELLSPRING_MASK = 303,
ABILITY_EMBODY_ASPECT_CORNERSTONE_MASK = 304,
ABILITY_TOXIC_CHAIN = 305,
ABILITY_SUPERSWEET_SYRUP = 306,
ABILITY_TERA_SHIFT = 307,
ABILITY_TERA_SHELL = 308,
ABILITY_TERAFORM_ZERO = 309,
ABILITY_POISON_PUPPETEER = 310,
ABILITIES_COUNT_GEN9,
ABILITIES_COUNT = ABILITIES_COUNT_GEN9,
};
#endif // GUARD_CONSTANTS_ABILITIES_H

View File

@ -0,0 +1,90 @@
#ifndef GUARD_CONSTANTS_APRICORN_TREE_H
#define GUARD_CONSTANTS_APRICORN_TREE_H
#include "constants/items.h"
// Apricorn lookup table, added to allow adding new apricorns without being forced to rearrange the item constants.
enum ApricornType
{
APRICORN_RED = ITEM_RED_APRICORN,
APRICORN_BLUE = ITEM_BLUE_APRICORN,
APRICORN_YELLOW = ITEM_YELLOW_APRICORN,
APRICORN_GREEN = ITEM_GREEN_APRICORN,
APRICORN_PINK = ITEM_PINK_APRICORN,
APRICORN_WHITE = ITEM_WHITE_APRICORN,
APRICORN_BLACK = ITEM_BLACK_APRICORN,
APRICORN_BERRY_CHERI = ITEM_CHERI_BERRY,
APRICORN_BERRY_CHESTO = ITEM_CHESTO_BERRY,
APRICORN_BERRY_PECHA = ITEM_PECHA_BERRY,
APRICORN_BERRY_RAWST = ITEM_RAWST_BERRY,
APRICORN_BERRY_ASPEAR = ITEM_ASPEAR_BERRY,
APRICORN_BERRY_LEPPA = ITEM_LEPPA_BERRY,
APRICORN_BERRY_ORAN = ITEM_ORAN_BERRY,
APRICORN_BERRY_PERSIM = ITEM_PERSIM_BERRY,
APRICORN_BERRY_LUM = ITEM_LUM_BERRY,
APRICORN_BERRY_SITRUS = ITEM_SITRUS_BERRY,
APRICORN_BERRY_FIGY = ITEM_FIGY_BERRY,
APRICORN_BERRY_WIKI = ITEM_WIKI_BERRY,
APRICORN_BERRY_MAGO = ITEM_MAGO_BERRY,
APRICORN_BERRY_AGUAV = ITEM_AGUAV_BERRY,
APRICORN_BERRY_IAPAPA = ITEM_IAPAPA_BERRY,
APRICORN_BERRY_RAZZ = ITEM_RAZZ_BERRY,
APRICORN_BERRY_BLUK = ITEM_BLUK_BERRY,
APRICORN_BERRY_NANAB = ITEM_NANAB_BERRY,
APRICORN_BERRY_WEPEAR = ITEM_WEPEAR_BERRY,
APRICORN_BERRY_PINAP = ITEM_PINAP_BERRY,
APRICORN_BERRY_POMEG = ITEM_POMEG_BERRY,
APRICORN_BERRY_KELPSY = ITEM_KELPSY_BERRY,
APRICORN_BERRY_QUALOT = ITEM_QUALOT_BERRY,
APRICORN_BERRY_HONDEW = ITEM_HONDEW_BERRY,
APRICORN_BERRY_GREPA = ITEM_GREPA_BERRY,
APRICORN_BERRY_TAMATO = ITEM_TAMATO_BERRY,
APRICORN_BERRY_CORNN = ITEM_CORNN_BERRY,
APRICORN_BERRY_MAGOST = ITEM_MAGOST_BERRY,
APRICORN_BERRY_RABUTA = ITEM_RABUTA_BERRY,
APRICORN_BERRY_NOMEL = ITEM_NOMEL_BERRY,
APRICORN_BERRY_SPELON = ITEM_SPELON_BERRY,
APRICORN_BERRY_PAMTRE = ITEM_PAMTRE_BERRY,
APRICORN_BERRY_WATMEL = ITEM_WATMEL_BERRY,
APRICORN_BERRY_DURIN = ITEM_DURIN_BERRY,
APRICORN_BERRY_BELUE = ITEM_BELUE_BERRY,
APRICORN_BERRY_OCCA = ITEM_OCCA_BERRY,
APRICORN_BERRY_PASSHO = ITEM_PASSHO_BERRY,
APRICORN_BERRY_WACAN = ITEM_WACAN_BERRY,
APRICORN_BERRY_RINDO = ITEM_RINDO_BERRY,
APRICORN_BERRY_YACHE = ITEM_YACHE_BERRY,
APRICORN_BERRY_CHOPLE = ITEM_CHOPLE_BERRY,
APRICORN_BERRY_KEBIA = ITEM_KEBIA_BERRY,
APRICORN_BERRY_SHUCA = ITEM_SHUCA_BERRY,
APRICORN_BERRY_COBA = ITEM_COBA_BERRY,
APRICORN_BERRY_PAYAPA = ITEM_PAYAPA_BERRY,
APRICORN_BERRY_TANGA = ITEM_TANGA_BERRY,
APRICORN_BERRY_CHARTI = ITEM_CHARTI_BERRY,
APRICORN_BERRY_KASIB = ITEM_KASIB_BERRY,
APRICORN_BERRY_HABAN = ITEM_HABAN_BERRY,
APRICORN_BERRY_COLBUR = ITEM_COLBUR_BERRY,
APRICORN_BERRY_BABIRI = ITEM_BABIRI_BERRY,
APRICORN_BERRY_CHILAN = ITEM_CHILAN_BERRY,
APRICORN_BERRY_LIECHI = ITEM_LIECHI_BERRY,
APRICORN_BERRY_GANLON = ITEM_GANLON_BERRY,
APRICORN_BERRY_SALAC = ITEM_SALAC_BERRY,
APRICORN_BERRY_PETAYA = ITEM_PETAYA_BERRY,
APRICORN_BERRY_APICOT = ITEM_APICOT_BERRY,
APRICORN_BERRY_LANSAT = ITEM_LANSAT_BERRY,
APRICORN_BERRY_STARF = ITEM_STARF_BERRY,
APRICORN_BERRY_ENIGMA = ITEM_ENIGMA_BERRY,
APRICORN_BERRY_MICLE = ITEM_MICLE_BERRY,
APRICORN_BERRY_CUSTAP = ITEM_CUSTAP_BERRY,
APRICORN_BERRY_JABOCA = ITEM_JABOCA_BERRY,
APRICORN_BERRY_ROWAP = ITEM_ROWAP_BERRY,
APRICORN_BERRY_ROSELI = ITEM_ROSELI_BERRY,
APRICORN_BERRY_KEE = ITEM_KEE_BERRY,
APRICORN_BERRY_MARANGA = ITEM_MARANGA_BERRY,
};
// Trees
#define APRICORN_TREE_NONE 0
#define APRICORN_TREE_COUNT 0
#endif //GUARD_CONSTANTS_APRICORN_TREE_H

View File

@ -1,6 +1,8 @@
#ifndef GUARD_CONSTANTS_BATTLE_H
#define GUARD_CONSTANTS_BATTLE_H
#include "constants/moves.h"
/*
* A battler may be in one of four positions on the field. The first bit determines
* what side the battler is on, either the player's side or the opponent's side.
@ -45,9 +47,17 @@ enum BattlerId
#define BATTLE_OPPOSITE(id) ((id) ^ BIT_SIDE)
#define BATTLE_PARTNER(id) ((id) ^ BIT_FLANK)
#define B_SIDE_PLAYER 0
#define B_SIDE_OPPONENT 1
#define NUM_BATTLE_SIDES 2
// Left and right are determined by how they're referred to in tests and everywhere else.
// Left is battlers 0 and 1, right 2 and 3; if you assume the battler referencing them is south, left is to the northeast and right to the northwest.
#define LEFT_FOE(battler) ((BATTLE_OPPOSITE(battler)) & BIT_SIDE)
#define RIGHT_FOE(battler) (((BATTLE_OPPOSITE(battler)) & BIT_SIDE) | BIT_FLANK)
enum BattleSide
{
B_SIDE_PLAYER = 0,
B_SIDE_OPPONENT = 1,
NUM_BATTLE_SIDES = 2,
};
#define B_FLANK_LEFT 0
#define B_FLANK_RIGHT 1
@ -95,12 +105,17 @@ enum BattlerId
| BATTLE_TYPE_LEGENDARY \
| BATTLE_TYPE_RECORDED | BATTLE_TYPE_TRAINER_HILL | BATTLE_TYPE_SECRET_BASE))
#define WILD_DOUBLE_BATTLE ((gBattleTypeFlags & BATTLE_TYPE_DOUBLE && !(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_TRAINER))))
#define RECORDED_WILD_BATTLE ((gBattleTypeFlags & BATTLE_TYPE_RECORDED) && !(gBattleTypeFlags & (BATTLE_TYPE_TRAINER | BATTLE_TYPE_FRONTIER)))
#define BATTLE_TWO_VS_ONE_OPPONENT ((gBattleTypeFlags & BATTLE_TYPE_INGAME_PARTNER && TRAINER_BATTLE_PARAM.opponentB == 0xFFFF))
#define BATTLE_TYPE_HAS_AI (BATTLE_TYPE_TRAINER | BATTLE_TYPE_FIRST_BATTLE | BATTLE_TYPE_SAFARI | BATTLE_TYPE_ROAMER | BATTLE_TYPE_INGAME_PARTNER)
#define WILD_DOUBLE_BATTLE ((gBattleTypeFlags & BATTLE_TYPE_DOUBLE && !(gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_TRAINER))))
#define RECORDED_WILD_BATTLE ((gBattleTypeFlags & BATTLE_TYPE_RECORDED) && !(gBattleTypeFlags & (BATTLE_TYPE_TRAINER | BATTLE_TYPE_FRONTIER)))
#define BATTLE_TWO_VS_ONE_OPPONENT ((gBattleTypeFlags & BATTLE_TYPE_INGAME_PARTNER && TRAINER_BATTLE_PARAM.opponentB == 0xFFFF))
#define BATTLE_TYPE_HAS_AI (BATTLE_TYPE_TRAINER | BATTLE_TYPE_FIRST_BATTLE | BATTLE_TYPE_SAFARI | BATTLE_TYPE_ROAMER | BATTLE_TYPE_INGAME_PARTNER)
#define BATTLE_TYPE_MORE_THAN_TWO_BATTLERS (BATTLE_TYPE_DOUBLE | BATTLE_TYPE_MULTI | BATTLE_TYPE_INGAME_PARTNER | BATTLE_TYPE_TWO_OPPONENTS)
#define BATTLE_TYPE_PLAYER_HAS_PARTNER (BATTLE_TYPE_MULTI | BATTLE_TYPE_INGAME_PARTNER | BATTLE_TYPE_TOWER_LINK_MULTI)
// Multibattle test composite flags
#define BATTLE_MULTI_TEST (BATTLE_TYPE_IS_MASTER | BATTLE_TYPE_TRAINER | BATTLE_TYPE_INGAME_PARTNER | BATTLE_TYPE_MULTI | BATTLE_TYPE_TWO_OPPONENTS)
#define BATTLE_TWO_VS_ONE_TEST (BATTLE_TYPE_IS_MASTER | BATTLE_TYPE_TRAINER | BATTLE_TYPE_INGAME_PARTNER | BATTLE_TYPE_MULTI)
// Battle Outcome defines
#define B_OUTCOME_WON 1
#define B_OUTCOME_LOST 2
@ -155,6 +170,8 @@ enum VolatileFlags
F(VOLATILE_LOCK_CONFUSE, lockConfusionTurns, (u32, 3)) \
F(VOLATILE_MULTIPLETURNS, multipleTurns, (u32, 1)) \
F(VOLATILE_WRAPPED, wrapped, (u32, 1)) \
F(VOLATILE_WRAPPED_BY, wrappedBy, (enum BattlerId, MAX_BITS(4))) \
F(VOLATILE_WRAPPED_MOVE, wrappedMove, (u32, MOVES_COUNT_ALL - 1)) \
F(VOLATILE_POWDER, powder, (u32, 1)) \
F(VOLATILE_UNUSED, padding, (u32, 1)) \
F(VOLATILE_INFATUATION, infatuation, (enum BattlerId, MAX_BITS(4))) \
@ -162,7 +179,7 @@ enum VolatileFlags
F(VOLATILE_TRANSFORMED, transformed, (u32, 1)) \
F(VOLATILE_RAGE, rage, (u32, 1)) \
F(VOLATILE_SUBSTITUTE, substitute, (u32, 1), V_BATON_PASSABLE) \
F(VOLATILE_DESTINY_BOND, destinyBond, (u32, 1)) \
F(VOLATILE_DESTINY_BOND, destinyBond, (u32, 2)) \
F(VOLATILE_ESCAPE_PREVENTION, escapePrevention, (u32, 1), V_BATON_PASSABLE) \
F(VOLATILE_NIGHTMARE, nightmare, (u32, 1)) \
F(VOLATILE_CURSED, cursed, (u32, 1), V_BATON_PASSABLE) \
@ -176,12 +193,13 @@ enum VolatileFlags
F(VOLATILE_INFINITE_CONFUSION, infiniteConfusion, (u32, 1), V_BATON_PASSABLE) \
F(VOLATILE_SALT_CURE, saltCure, (u32, 1)) \
F(VOLATILE_SYRUP_BOMB, syrupBomb, (u32, 1)) \
F(VOLATILE_STICKY_SYRUPED_BY, stickySyrupedBy, (enum BattlerId, MAX_BITS(4))) \
F(VOLATILE_GLAIVE_RUSH, glaiveRush, (u32, 1)) \
F(VOLATILE_LEECH_SEED, leechSeed, (enum BattlerId, MAX_BITS(4)), V_BATON_PASSABLE) \
F(VOLATILE_LOCK_ON, lockOn, (u32, 2), V_BATON_PASSABLE) \
F(VOLATILE_PERISH_SONG, perishSong, (u32, 1), V_BATON_PASSABLE) \
F(VOLATILE_MINIMIZE, minimize, (u32, 1)) \
F(VOLATILE_CHARGE, charge, (u32, 1)) \
F(VOLATILE_CHARGE_TIMER, chargeTimer, (u32, 2)) \
F(VOLATILE_ROOT, root, (u32, 1), V_BATON_PASSABLE) \
F(VOLATILE_YAWN, yawn, (u32, 2)) \
F(VOLATILE_IMPRISON, imprison, (u32, 1)) \
@ -195,7 +213,12 @@ enum VolatileFlags
F(VOLATILE_HEAL_BLOCK, healBlock, (u32, 1), V_BATON_PASSABLE) \
F(VOLATILE_AQUA_RING, aquaRing, (u32, 1), V_BATON_PASSABLE) \
F(VOLATILE_LASER_FOCUS, laserFocus, (u32, 1)) \
F(VOLATILE_POWER_TRICK, powerTrick, (u32, 1), V_BATON_PASSABLE)
F(VOLATILE_POWER_TRICK, powerTrick, (u32, 1), V_BATON_PASSABLE) \
F(VOLATILE_NO_RETREAT, noRetreat, (u32, 1), V_BATON_PASSABLE) \
F(VOLATILE_VESSEL_OF_RUIN, vesselOfRuin, (u32, 1)) \
F(VOLATILE_SWORD_OF_RUIN, swordOfRuin, (u32, 1)) \
F(VOLATILE_TABLETS_OF_RUIN, tabletsOfRuin, (u32, 1)) \
F(VOLATILE_BEADS_OF_RUIN, beadsOfRuin, (u32, 1))
/* Use within a macro to get the maximum allowed value for a volatile. Requires _typeMaxValue as input. */
@ -233,46 +256,41 @@ enum SemiInvulnerableExclusion
EXCLUDE_COMMANDER,
};
#define HITMARKER_STRING_PRINTED (1 << 4)
#define HITMARKER_IGNORE_BIDE (1 << 5)
#define HITMARKER_DESTINYBOND (1 << 6)
#define HITMARKER_NO_ANIMATIONS (1 << 7) // set from battleSceneOff. Never changed during battle
#define HITMARKER_IGNORE_SUBSTITUTE (1 << 8)
#define HITMARKER_NO_ATTACKSTRING (1 << 9)
#define HITMARKER_ATTACKSTRING_PRINTED (1 << 10)
#define HITMARKER_NO_PPDEDUCT (1 << 11)
#define HITMARKER_UNUSED_8 (1 << 8)
#define HITMARKER_UNUSED_9 (1 << 9)
#define HITMARKER_UNUSED_10 (1 << 10)
#define HITMARKER_UNUSED_11 (1 << 11)
#define HITMARKER_UNUSED_12 (1 << 12)
#define HITMARKER_STATUS_ABILITY_EFFECT (1 << 13)
#define HITMARKER_UNUSED_13 (1 << 13)
#define HITMARKER_UNUSED_14 (1 << 14)
#define HITMARKER_RUN (1 << 15)
#define HITMARKER_IGNORE_DISGUISE (1 << 16)
#define HITMARKER_UNUSED_16 (1 << 16)
#define HITMARKER_DISABLE_ANIMATION (1 << 17) // disable animations during battle scripts, e.g. for Bug Bite
#define HITMARKER_UNUSED_18 (1 << 18)
#define HITMARKER_UNABLE_TO_USE_MOVE (1 << 19)
#define HITMARKER_PASSIVE_HP_UPDATE (1 << 20)
#define HITMARKER_UNUSED_20 (1 << 20)
#define HITMARKER_UNUSED_21 (1 << 21)
#define HITMARKER_PLAYER_FAINTED (1 << 22)
#define HITMARKER_ALLOW_NO_PP (1 << 23)
#define HITMARKER_GRUDGE (1 << 24)
#define HITMARKER_UNUSED_23 (1 << 23)
#define HITMARKER_UNUSED_24 (1 << 24)
#define HITMARKER_OBEYS (1 << 25)
#define HITMARKER_UNUSED_26 (1 << 26)
#define HITMARKER_UNUSED_27 (1 << 27)
#define HITMARKER_FAINTED(battler) (1u << (battler + 28))
#define HITMARKER_FAINTED2(battler) HITMARKER_FAINTED(battler)
#define HITMARKER_FAINTED(battler) (1u << (battler + 28)) // Also uses bits 29, 30 and 31
// Per-side statuses that affect an entire party
#define SIDE_STATUS_REFLECT (1 << 0)
#define SIDE_STATUS_LIGHTSCREEN (1 << 1)
#define SIDE_STATUS_SAFEGUARD (1 << 2)
#define SIDE_STATUS_FUTUREATTACK (1 << 3)
#define SIDE_STATUS_MIST (1 << 4)
#define SIDE_STATUS_TAILWIND (1 << 5)
#define SIDE_STATUS_AURORA_VEIL (1 << 6)
#define SIDE_STATUS_LUCKY_CHANT (1 << 7)
#define SIDE_STATUS_DAMAGE_NON_TYPES (1 << 8)
#define SIDE_STATUS_RAINBOW (1 << 9)
#define SIDE_STATUS_SEA_OF_FIRE (1 << 10)
#define SIDE_STATUS_SWAMP (1 << 11)
#define SIDE_STATUS_MIST (1 << 3)
#define SIDE_STATUS_TAILWIND (1 << 4)
#define SIDE_STATUS_AURORA_VEIL (1 << 5)
#define SIDE_STATUS_LUCKY_CHANT (1 << 6)
#define SIDE_STATUS_DAMAGE_NON_TYPES (1 << 7)
#define SIDE_STATUS_RAINBOW (1 << 8)
#define SIDE_STATUS_SEA_OF_FIRE (1 << 9)
#define SIDE_STATUS_SWAMP (1 << 10)
#define SIDE_STATUS_SCREEN_ANY (SIDE_STATUS_REFLECT | SIDE_STATUS_LIGHTSCREEN | SIDE_STATUS_AURORA_VEIL)
#define SIDE_STATUS_PLEDGE_ANY (SIDE_STATUS_RAINBOW | SIDE_STATUS_SEA_OF_FIRE | SIDE_STATUS_SWAMP)
@ -639,6 +657,17 @@ enum BattleEnvironments
// Constants for Torment
#define PERMANENT_TORMENT 0xF
enum FaintedActions
{
FAINTED_ACTIONS_NO_MONS_TO_SWITCH,
FAINTED_ACTIONS_GIVE_EXP,
FAINTED_ACTIONS_SET_ABSENT_FLAGS,
FAINTED_ACTIONS_WAIT_STATE,
FAINTED_ACTIONS_HANDLE_FAINTED_MON,
FAINTED_ACTIONS_HANDLE_NEXT_BATTLER,
FAINTED_ACTIONS_MAX_CASE,
};
// Constants for B_VAR_STARTING_STATUS
// Timer value controlled by B_VAR_STARTING_STATUS_TIMER
enum StartingStatus
@ -680,4 +709,11 @@ enum __attribute__((packed)) CalcDamageState
CHECK_ACCURACY,
};
enum SubmoveState
{
SUBMOVE_NO_EFFECT,
SUBMOVE_SUCCESS,
SUBMOVE_FAILURE,
};
#endif // GUARD_CONSTANTS_BATTLE_H

Some files were not shown because too many files have changed in this diff Show More