Merge branch 'master' of https://github.com/rh-hideout/pokeemerald-expansion into rh-hideout-master
@ -43,17 +43,14 @@ body:
|
|||||||
label: Version
|
label: Version
|
||||||
description: What version of pokeemerald-expansion are you using?
|
description: What version of pokeemerald-expansion are you using?
|
||||||
options:
|
options:
|
||||||
- 1.12.2 (Latest release)
|
- 1.13.0 (Latest release)
|
||||||
- master (default, unreleased bugfixes)
|
- master (default, unreleased bugfixes)
|
||||||
- upcoming (Edge)
|
- upcoming (Edge)
|
||||||
|
- 1.12.3
|
||||||
|
- 1.12.2
|
||||||
- 1.12.1
|
- 1.12.1
|
||||||
- 1.12.0
|
- 1.12.0
|
||||||
- 1.11.4
|
- pre-1.12.0
|
||||||
- 1.11.3
|
|
||||||
- 1.11.2
|
|
||||||
- 1.11.1
|
|
||||||
- 1.11.0
|
|
||||||
- pre-1.11.0
|
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
- type: input
|
- type: input
|
||||||
|
|||||||
11
.github/ISSUE_TEMPLATE/02_battle_ai_issues.yaml
vendored
@ -43,17 +43,14 @@ body:
|
|||||||
label: Version
|
label: Version
|
||||||
description: What version of pokeemerald-expansion are you using?
|
description: What version of pokeemerald-expansion are you using?
|
||||||
options:
|
options:
|
||||||
- 1.12.2 (Latest release)
|
- 1.13.0 (Latest release)
|
||||||
- master (default, unreleased bugfixes)
|
- master (default, unreleased bugfixes)
|
||||||
- upcoming (Edge)
|
- upcoming (Edge)
|
||||||
|
- 1.12.3
|
||||||
|
- 1.12.2
|
||||||
- 1.12.1
|
- 1.12.1
|
||||||
- 1.12.0
|
- 1.12.0
|
||||||
- 1.11.4
|
- pre-1.12.0
|
||||||
- 1.11.3
|
|
||||||
- 1.11.2
|
|
||||||
- 1.11.1
|
|
||||||
- 1.11.0
|
|
||||||
- pre-1.11.0
|
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
- type: input
|
- type: input
|
||||||
|
|||||||
10
.github/ISSUE_TEMPLATE/04_other_errors.yaml
vendored
@ -43,16 +43,14 @@ body:
|
|||||||
label: Version
|
label: Version
|
||||||
description: What version of pokeemerald-expansion are you using?
|
description: What version of pokeemerald-expansion are you using?
|
||||||
options:
|
options:
|
||||||
- 1.12.2 (Latest release)
|
- 1.13.0 (Latest release)
|
||||||
- master (default, unreleased bugfixes)
|
- master (default, unreleased bugfixes)
|
||||||
- upcoming (Edge)
|
- upcoming (Edge)
|
||||||
|
- 1.12.3
|
||||||
|
- 1.12.2
|
||||||
- 1.12.1
|
- 1.12.1
|
||||||
- 1.12.0
|
- 1.12.0
|
||||||
- 1.11.4
|
- pre-1.12.0
|
||||||
- 1.11.3
|
|
||||||
- 1.11.1
|
|
||||||
- 1.11.0
|
|
||||||
- pre-1.11.0
|
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
- type: input
|
- type: input
|
||||||
|
|||||||
6
.github/workflows/build.yml
vendored
@ -31,6 +31,12 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
COMPARE: 0
|
COMPARE: 0
|
||||||
run: make -j${nproc} -O all
|
run: make -j${nproc} -O all
|
||||||
|
|
||||||
|
- name: LTO
|
||||||
|
run: |
|
||||||
|
make tidy
|
||||||
|
make -j${nproc} LTO=1
|
||||||
|
# make tidy to purge previous build
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
env:
|
env:
|
||||||
|
|||||||
8
.gitignore
vendored
@ -13,6 +13,9 @@
|
|||||||
*.8bpp
|
*.8bpp
|
||||||
*.gbapal
|
*.gbapal
|
||||||
*.lz
|
*.lz
|
||||||
|
*.smol
|
||||||
|
*.fastSmol
|
||||||
|
*.smolTM
|
||||||
*.rl
|
*.rl
|
||||||
*.latfont
|
*.latfont
|
||||||
*.hwjpnfont
|
*.hwjpnfont
|
||||||
@ -40,7 +43,12 @@ prefabs.json
|
|||||||
*.js
|
*.js
|
||||||
/pokeemerald-*.png
|
/pokeemerald-*.png
|
||||||
src/data/map_group_count.h
|
src/data/map_group_count.h
|
||||||
|
include/constants/heal_locations.h
|
||||||
tools/trainerproc/trainerproc
|
tools/trainerproc/trainerproc
|
||||||
|
src/data/battle_partners.h
|
||||||
|
src/data/trainers.h
|
||||||
|
src/data/debug_trainers.h
|
||||||
|
test/battle/trainer_control.h
|
||||||
tools/compresSmol/compresSmol
|
tools/compresSmol/compresSmol
|
||||||
tools/compresSmol/compresSmolTilemap
|
tools/compresSmol/compresSmolTilemap
|
||||||
*.Identifier
|
*.Identifier
|
||||||
|
|||||||
66
Makefile
@ -19,6 +19,8 @@ ANALYZE ?= 0
|
|||||||
UNUSED_ERROR ?= 0
|
UNUSED_ERROR ?= 0
|
||||||
# Adds -Og and -g flags, which optimize the build for debugging and include debug info respectively
|
# Adds -Og and -g flags, which optimize the build for debugging and include debug info respectively
|
||||||
DEBUG ?= 0
|
DEBUG ?= 0
|
||||||
|
# Adds -flto flag, which increases link time but results in a more efficient binary (especially in audio processing)
|
||||||
|
LTO ?= 0
|
||||||
|
|
||||||
ifeq (compare,$(MAKECMDGOALS))
|
ifeq (compare,$(MAKECMDGOALS))
|
||||||
COMPARE := 1
|
COMPARE := 1
|
||||||
@ -108,7 +110,7 @@ TEST_BUILDDIR = $(OBJ_DIR)/$(TEST_SUBDIR)
|
|||||||
SHELL := bash -o pipefail
|
SHELL := bash -o pipefail
|
||||||
|
|
||||||
# Set flags for tools
|
# Set flags for tools
|
||||||
ASFLAGS := -mcpu=arm7tdmi --defsym MODERN=1
|
ASFLAGS := -mcpu=arm7tdmi -march=armv4t -meabi=5 --defsym MODERN=1
|
||||||
|
|
||||||
INCLUDE_DIRS := include
|
INCLUDE_DIRS := include
|
||||||
INCLUDE_CPP_ARGS := $(INCLUDE_DIRS:%=-iquote %)
|
INCLUDE_CPP_ARGS := $(INCLUDE_DIRS:%=-iquote %)
|
||||||
@ -123,7 +125,15 @@ CPPFLAGS := $(INCLUDE_CPP_ARGS) -Wno-trigraphs -DMODERN=1 -DTESTING=$(TEST) -std
|
|||||||
ARMCC := $(PREFIX)gcc
|
ARMCC := $(PREFIX)gcc
|
||||||
PATH_ARMCC := PATH="$(PATH)" $(ARMCC)
|
PATH_ARMCC := PATH="$(PATH)" $(ARMCC)
|
||||||
CC1 := $(shell $(PATH_ARMCC) --print-prog-name=cc1) -quiet
|
CC1 := $(shell $(PATH_ARMCC) --print-prog-name=cc1) -quiet
|
||||||
override CFLAGS += -mthumb -mthumb-interwork -O$(O_LEVEL) -mabi=apcs-gnu -mtune=arm7tdmi -march=armv4t -Wno-pointer-to-int-cast -std=gnu17 -Werror -Wall -Wno-strict-aliasing -Wno-attribute-alias -Woverride-init
|
|
||||||
|
override CFLAGS += -mthumb -mthumb-interwork -O$(O_LEVEL) -mabi=apcs-gnu -mtune=arm7tdmi -march=armv4t -Wno-pointer-to-int-cast -std=gnu17 -Werror -Wall -Wno-strict-aliasing -Wno-attribute-alias -Woverride-init -Wnonnull -Wenum-conversion
|
||||||
|
|
||||||
|
ifneq ($(LTO),0)
|
||||||
|
ifneq ($(TEST),1)
|
||||||
|
override CFLAGS += -flto=auto -fno-fat-lto-objects -fno-asynchronous-unwind-tables -ffunction-sections -fdata-sections
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(ANALYZE),1)
|
ifeq ($(ANALYZE),1)
|
||||||
override CFLAGS += -fanalyzer
|
override CFLAGS += -fanalyzer
|
||||||
endif
|
endif
|
||||||
@ -153,6 +163,8 @@ endif
|
|||||||
AUTO_GEN_TARGETS :=
|
AUTO_GEN_TARGETS :=
|
||||||
include make_tools.mk
|
include make_tools.mk
|
||||||
# Tool executables
|
# Tool executables
|
||||||
|
SMOLTM := $(TOOLS_DIR)/compresSmol/compresSmolTilemap$(EXE)
|
||||||
|
SMOL := $(TOOLS_DIR)/compresSmol/compresSmol$(EXE)
|
||||||
GFX := $(TOOLS_DIR)/gbagfx/gbagfx$(EXE)
|
GFX := $(TOOLS_DIR)/gbagfx/gbagfx$(EXE)
|
||||||
AIF := $(TOOLS_DIR)/aif2pcm/aif2pcm$(EXE)
|
AIF := $(TOOLS_DIR)/aif2pcm/aif2pcm$(EXE)
|
||||||
MID := $(TOOLS_DIR)/mid2agb/mid2agb$(EXE)
|
MID := $(TOOLS_DIR)/mid2agb/mid2agb$(EXE)
|
||||||
@ -283,14 +295,14 @@ agbcc:
|
|||||||
|
|
||||||
LD_SCRIPT_TEST := ld_script_test.ld
|
LD_SCRIPT_TEST := ld_script_test.ld
|
||||||
|
|
||||||
$(OBJ_DIR)/ld_script_test.ld: $(LD_SCRIPT_TEST) $(LD_SCRIPT_DEPS)
|
$(OBJ_DIR)/ld_script_test.ld: $(LD_SCRIPT_TEST)
|
||||||
cd $(OBJ_DIR) && sed "s#tools/#../../tools/#g" ../../$(LD_SCRIPT_TEST) > ld_script_test.ld
|
cd $(OBJ_DIR) && sed "s#tools/#../../tools/#g" ../../$(LD_SCRIPT_TEST) > ld_script_test.ld
|
||||||
|
|
||||||
$(TESTELF): $(OBJ_DIR)/ld_script_test.ld $(OBJS) $(TEST_OBJS) libagbsyscall tools check-tools
|
$(TESTELF): $(OBJ_DIR)/ld_script_test.ld $(OBJS) $(TEST_OBJS) libagbsyscall tools check-tools
|
||||||
@echo "cd $(OBJ_DIR) && $(LD) -T ld_script_test.ld -o ../../$@ <objects> <test-objects> <lib>"
|
@echo "cd $(OBJ_DIR) && $(LD) -T ld_script_test.ld -o ../../$@ <objects> <test-objects> <lib>"
|
||||||
@cd $(OBJ_DIR) && $(LD) $(TESTLDFLAGS) -T ld_script_test.ld -o ../../$@ $(OBJS_REL) $(TEST_OBJS_REL) $(LIB)
|
@cd $(OBJ_DIR) && $(LD) $(TESTLDFLAGS) -T ld_script_test.ld -o ../../$@ $(OBJS_REL) $(TEST_OBJS_REL) $(LIB)
|
||||||
$(FIX) $@ -t"$(TITLE)" -c$(GAME_CODE) -m$(MAKER_CODE) -r$(REVISION) -d0 --silent
|
$(FIX) $@ -t"$(TITLE)" -c$(GAME_CODE) -m$(MAKER_CODE) -r$(REVISION) -d0 --silent
|
||||||
$(PATCHELF) $(TESTELF) gTestRunnerArgv "$(TESTS)\0"
|
$(PATCHELF) $(TESTELF) gTestRunnerArgv "$(TESTS:%*=%)\0"
|
||||||
|
|
||||||
ifeq ($(GITHUB_REPOSITORY_OWNER),rh-hideout)
|
ifeq ($(GITHUB_REPOSITORY_OWNER),rh-hideout)
|
||||||
TEST_SKIP_IS_FAIL := \x01
|
TEST_SKIP_IS_FAIL := \x01
|
||||||
@ -321,7 +333,7 @@ clean-assets:
|
|||||||
rm -f $(DATA_ASM_SUBDIR)/layouts/layouts.inc $(DATA_ASM_SUBDIR)/layouts/layouts_table.inc
|
rm -f $(DATA_ASM_SUBDIR)/layouts/layouts.inc $(DATA_ASM_SUBDIR)/layouts/layouts_table.inc
|
||||||
rm -f $(DATA_ASM_SUBDIR)/maps/connections.inc $(DATA_ASM_SUBDIR)/maps/events.inc $(DATA_ASM_SUBDIR)/maps/groups.inc $(DATA_ASM_SUBDIR)/maps/headers.inc $(DATA_SRC_SUBDIR)/map_group_count.h
|
rm -f $(DATA_ASM_SUBDIR)/maps/connections.inc $(DATA_ASM_SUBDIR)/maps/events.inc $(DATA_ASM_SUBDIR)/maps/groups.inc $(DATA_ASM_SUBDIR)/maps/headers.inc $(DATA_SRC_SUBDIR)/map_group_count.h
|
||||||
find sound -iname '*.bin' -exec rm {} +
|
find sound -iname '*.bin' -exec rm {} +
|
||||||
find . \( -iname '*.1bpp' -o -iname '*.4bpp' -o -iname '*.8bpp' -o -iname '*.gbapal' -o -iname '*.lz' -o -iname '*.rl' -o -iname '*.latfont' -o -iname '*.hwjpnfont' -o -iname '*.fwjpnfont' \) -exec rm {} +
|
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 {} +
|
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
|
||||||
@ -343,6 +355,7 @@ include map_data_rules.mk
|
|||||||
include spritesheet_rules.mk
|
include spritesheet_rules.mk
|
||||||
include json_data_rules.mk
|
include json_data_rules.mk
|
||||||
include audio_rules.mk
|
include audio_rules.mk
|
||||||
|
include trainer_rules.mk
|
||||||
|
|
||||||
# NOTE: Tools must have been built prior (FIXME)
|
# NOTE: Tools must have been built prior (FIXME)
|
||||||
# so you can't really call this rule directly
|
# so you can't really call this rule directly
|
||||||
@ -355,13 +368,16 @@ generated: $(AUTO_GEN_TARGETS)
|
|||||||
%.pal: ;
|
%.pal: ;
|
||||||
%.aif: ;
|
%.aif: ;
|
||||||
|
|
||||||
%.1bpp: %.png ; $(GFX) $< $@
|
%.1bpp: %.png ; $(GFX) $< $@
|
||||||
%.4bpp: %.png ; $(GFX) $< $@
|
%.4bpp: %.png ; $(GFX) $< $@
|
||||||
%.8bpp: %.png ; $(GFX) $< $@
|
%.8bpp: %.png ; $(GFX) $< $@
|
||||||
%.gbapal: %.pal ; $(GFX) $< $@
|
%.gbapal: %.pal ; $(GFX) $< $@
|
||||||
%.gbapal: %.png ; $(GFX) $< $@
|
%.gbapal: %.png ; $(GFX) $< $@
|
||||||
%.lz: % ; $(GFX) $< $@
|
%.lz: % ; $(GFX) $< $@
|
||||||
%.rl: % ; $(GFX) $< $@
|
%.smolTM: % ; $(SMOLTM) $< $@
|
||||||
|
%.fastSmol: % ; $(SMOL) -w $< $@ false false false
|
||||||
|
%.smol: % ; $(SMOL) -w $< $@
|
||||||
|
%.rl: % ; $(GFX) $< $@
|
||||||
|
|
||||||
clean-generated:
|
clean-generated:
|
||||||
@rm -f $(AUTO_GEN_TARGETS)
|
@rm -f $(AUTO_GEN_TARGETS)
|
||||||
@ -369,11 +385,6 @@ clean-generated:
|
|||||||
@rm -f $(ALL_LEARNABLES_JSON)
|
@rm -f $(ALL_LEARNABLES_JSON)
|
||||||
@echo "rm -f <ALL_LEARNABLES_JSON>"
|
@echo "rm -f <ALL_LEARNABLES_JSON>"
|
||||||
|
|
||||||
COMPETITIVE_PARTY_SYNTAX := $(shell PATH="$(PATH)"; echo 'COMPETITIVE_PARTY_SYNTAX' | $(CPP) $(CPPFLAGS) -imacros include/gba/defines.h -imacros include/config/general.h | tail -n1)
|
|
||||||
ifeq ($(COMPETITIVE_PARTY_SYNTAX),1)
|
|
||||||
%.h: %.party ; $(CPP) $(CPPFLAGS) -traditional-cpp - < $< | $(TRAINERPROC) -o $@ -i $< -
|
|
||||||
endif
|
|
||||||
|
|
||||||
$(C_BUILDDIR)/librfu_intr.o: CFLAGS := -mthumb-interwork -O2 -mabi=apcs-gnu -mtune=arm7tdmi -march=armv4t -fno-toplevel-reorder -Wno-pointer-to-int-cast
|
$(C_BUILDDIR)/librfu_intr.o: CFLAGS := -mthumb-interwork -O2 -mabi=apcs-gnu -mtune=arm7tdmi -march=armv4t -fno-toplevel-reorder -Wno-pointer-to-int-cast
|
||||||
$(C_BUILDDIR)/berry_crush.o: override CFLAGS += -Wno-address-of-packed-member
|
$(C_BUILDDIR)/berry_crush.o: override CFLAGS += -Wno-address-of-packed-member
|
||||||
$(C_BUILDDIR)/agb_flash.o: override CFLAGS += -fno-toplevel-reorder
|
$(C_BUILDDIR)/agb_flash.o: override CFLAGS += -fno-toplevel-reorder
|
||||||
@ -475,19 +486,28 @@ $(DATA_SRC_SUBDIR)/pokemon/teachable_learnsets.h: $(TEACHABLE_DEPS)
|
|||||||
|
|
||||||
# Linker script
|
# Linker script
|
||||||
LD_SCRIPT := ld_script_modern.ld
|
LD_SCRIPT := ld_script_modern.ld
|
||||||
LD_SCRIPT_DEPS :=
|
|
||||||
|
|
||||||
# Final rules
|
# Final rules
|
||||||
|
|
||||||
libagbsyscall:
|
libagbsyscall:
|
||||||
@$(MAKE) -C libagbsyscall TOOLCHAIN=$(TOOLCHAIN) MODERN=1
|
@$(MAKE) -C libagbsyscall TOOLCHAIN=$(TOOLCHAIN) MODERN=1
|
||||||
|
|
||||||
# Elf from object files
|
# Enable LTO LDFLAGS if set
|
||||||
LDFLAGS = -Map ../../$(MAP)
|
ifneq ($(LTO),0)
|
||||||
$(ELF): $(LD_SCRIPT) $(LD_SCRIPT_DEPS) $(OBJS) libagbsyscall
|
LDFLAGS := -march=armv4t -mabi=apcs-gnu -mcpu=arm7tdmi -Xlinker -Map=../../$(MAP) -Xlinker --print-memory-usage -Xassembler -meabi=5 -Xassembler -march=armv4t -Xassembler -mcpu=arm7tdmi -Xlinker --gc-sections
|
||||||
@cd $(OBJ_DIR) && $(LD) $(LDFLAGS) -T ../../$< --print-memory-usage -o ../../$@ $(OBJS_REL) $(LIB) | cat
|
LDFLAGS += -Xlinker -flto=auto
|
||||||
@echo "cd $(OBJ_DIR) && $(LD) $(LDFLAGS) -T ../../$< --print-memory-usage -o ../../$@ <objs> <libs> | cat"
|
$(ELF): $(LD_SCRIPT) $(OBJS) libagbsyscall
|
||||||
|
@echo "cd $(OBJ_DIR) && $(ARMCC) $(LDFLAGS) -T ../../$< -o ../../$@ <objs> <libs>"
|
||||||
|
+@cd $(OBJ_DIR) && $(ARMCC) $(LDFLAGS) -T ../../$< -o ../../$@ $(OBJS_REL) $(LIB)
|
||||||
$(FIX) $@ -t"$(TITLE)" -c$(GAME_CODE) -m$(MAKER_CODE) -r$(REVISION) --silent
|
$(FIX) $@ -t"$(TITLE)" -c$(GAME_CODE) -m$(MAKER_CODE) -r$(REVISION) --silent
|
||||||
|
else
|
||||||
|
# Output .map file, memory usage readout and gc sections to clean-up unused data
|
||||||
|
LDFLAGS = -Map ../../$(MAP) --print-memory-usage --gc-sections
|
||||||
|
$(ELF): $(LD_SCRIPT) $(OBJS) libagbsyscall
|
||||||
|
@cd $(OBJ_DIR) && $(LD) $(LDFLAGS) -T ../../$< -o ../../$@ $(OBJS_REL) $(LIB) | cat
|
||||||
|
@echo "cd $(OBJ_DIR) && $(LD) $(LDFLAGS) -T ../../$< -o ../../$@ <objs> <libs> | cat"
|
||||||
|
$(FIX) $@ -t"$(TITLE)" -c$(GAME_CODE) -m$(MAKER_CODE) -r$(REVISION) --silent
|
||||||
|
endif
|
||||||
|
|
||||||
# Builds the rom from the elf file
|
# Builds the rom from the elf file
|
||||||
$(ROM): $(ELF)
|
$(ROM): $(ELF)
|
||||||
|
|||||||
10
README.md
@ -1,6 +1,6 @@
|
|||||||
# About `pokeemerald-expansion`
|
# About `pokeemerald-expansion`
|
||||||
|
|
||||||
  
|
  
|
||||||
|
|
||||||
<!-- If you want to re-record or change these gifs, here are some notes that I used: https://files.catbox.moe/05001g.md -->
|
<!-- If you want to re-record or change these gifs, here are some notes that I used: https://files.catbox.moe/05001g.md -->
|
||||||
|
|
||||||
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
# [Features](FEATURES.md)
|
# [Features](FEATURES.md)
|
||||||
|
|
||||||
**`pokeemerald-expansion`** offers hundreds of features from various [core series Pokémon games](https://bulbapedia.bulbagarden.net/wiki/Core_series), along with popular quality-of-life enhancements designed to streamline development and improve the player experience. A full list of those featues can be found in [`FEATURES.md`](FEATURES.md).
|
**`pokeemerald-expansion`** offers hundreds of features from various [core series Pokémon games](https://bulbapedia.bulbagarden.net/wiki/Core_series), along with popular quality-of-life enhancements designed to streamline development and improve the player experience. A full list of those features can be found in [`FEATURES.md`](FEATURES.md).
|
||||||
|
|
||||||
# [Credits](CREDITS.md)
|
# [Credits](CREDITS.md)
|
||||||
|
|
||||||
@ -17,7 +17,7 @@
|
|||||||
If you use **`pokeemerald-expansion`**, please credit **RHH (Rom Hacking Hideout)**. Optionally, include the version number for clarity.
|
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.12.2 https://github.com/rh-hideout/pokeemerald-expansion/
|
Based off RHH's pokeemerald-expansion 1.13.0 https://github.com/rh-hideout/pokeemerald-expansion/
|
||||||
```
|
```
|
||||||
|
|
||||||
Please consider [crediting all contributors](CREDITS.md) involved in the project!
|
Please consider [crediting all contributors](CREDITS.md) involved in the project!
|
||||||
@ -32,7 +32,7 @@ Please consider [crediting all contributors](CREDITS.md) involved in the project
|
|||||||
|
|
||||||
❗❗ **Important**: Do not use GitHub's "Download Zip" option as it will not include commit history. This is necessary if you want to update or merge other feature branches.
|
❗❗ **Important**: Do not use GitHub's "Download Zip" option as it will not include commit history. This is necessary if you want to update or merge other feature branches.
|
||||||
|
|
||||||
If you're new to git and GitHub, [Team Aqua's Asset Repo](https://github.com/Pawkkie/Team-Aquas-Asset-Repo/) has a [guide on forking and cloning the repository](https://github.com/Pawkkie/Team-Aquas-Asset-Repo/wiki/The-Basics-of-GitHub). Then you can follow one of the following guides:
|
If you're new to git and GitHub, [Team Aqua's Asset Repo](https://github.com/Pawkkie/Team-Aquas-Asset-Repo/) has a [guide to forking and cloning the repository](https://github.com/Pawkkie/Team-Aquas-Asset-Repo/wiki/The-Basics-of-GitHub). Then you can follow one of the following guides:
|
||||||
|
|
||||||
## 📥 [Installing **`pokeemerald-expansion`**](INSTALL.md)
|
## 📥 [Installing **`pokeemerald-expansion`**](INSTALL.md)
|
||||||
## 🏗️ [Building **`pokeemerald-expansion`**](INSTALL.md#Building-pokeemerald-expansion)
|
## 🏗️ [Building **`pokeemerald-expansion`**](INSTALL.md#Building-pokeemerald-expansion)
|
||||||
@ -50,4 +50,4 @@ If you are looking to [report a bug](CONTRIBUTING.md#Bug-Report), [open a pull r
|
|||||||
|
|
||||||
[](https://discord.gg/6CzjAG6GZk)
|
[](https://discord.gg/6CzjAG6GZk)
|
||||||
|
|
||||||
Our community uses the [Rom Hacking Hideout (RHH) Discord server](https://discord.gg/6CzjAG6GZk) to communicate and organize. Most of our discussions take place there, and we welcome anybody to join us!
|
Our community uses the [ROM Hacking Hideout (RHH) Discord server](https://discord.gg/6CzjAG6GZk) to communicate and organize. Most of our discussions take place there, and we welcome anybody to join us!
|
||||||
|
|||||||
@ -1125,12 +1125,13 @@
|
|||||||
.2byte \move
|
.2byte \move
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
@ Checks if at least one Pokemon in the player's party knows the specified move. If so, VAR_RESULT is set to the
|
@ Checks if at least one Pokemon in the player's party knows the specified field move and if the field move is unlocked. If so, VAR_RESULT is set to the
|
||||||
@ (zero-indexed) slot number of the first Pokemon that knows the move. If not, VAR_RESULT is set to PARTY_SIZE.
|
@ (zero-indexed) slot number of the first Pokemon that knows the move. If not, VAR_RESULT is set to PARTY_SIZE.
|
||||||
@ VAR_0x8004 is also set to this Pokemon's species.
|
@ VAR_0x8004 is also set to this Pokemon's species.
|
||||||
.macro checkpartymove move:req
|
.macro checkfieldmove fieldMove:req, checkUnlocked=FALSE
|
||||||
.byte SCR_OP_CHECKPARTYMOVE
|
.byte SCR_OP_CHECKFIELDMOVE
|
||||||
.2byte \move
|
.byte \fieldMove
|
||||||
|
.byte \checkUnlocked
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
@ Converts STR_VAR_1, STR_VAR_2, or STR_VAR_3 to its corresponding index into sScriptStringVars (0, 1, or 2).
|
@ Converts STR_VAR_1, STR_VAR_2, or STR_VAR_3 to its corresponding index into sScriptStringVars (0, 1, or 2).
|
||||||
@ -2175,7 +2176,7 @@
|
|||||||
setvar VAR_0x8000, \evoMethod
|
setvar VAR_0x8000, \evoMethod
|
||||||
setvar VAR_0x8001, \canStopEvo
|
setvar VAR_0x8001, \canStopEvo
|
||||||
setvar VAR_0x8002, \tryMultiple
|
setvar VAR_0x8002, \tryMultiple
|
||||||
special TrySpecialOverworldEvo
|
special TrySpecialScriptEvolution
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro ai_vs_ai_battle trainer1:req, trainer2:req
|
.macro ai_vs_ai_battle trainer1:req, trainer2:req
|
||||||
@ -2570,7 +2571,7 @@
|
|||||||
|
|
||||||
@ Follower NPCs
|
@ Follower NPCs
|
||||||
|
|
||||||
@ Sets an NPC up to follow the player.
|
@ Sets an existing NPC up to follow the player.
|
||||||
@ Follower flags are defined in include/constants/follower_npc.h
|
@ Follower flags are defined in include/constants/follower_npc.h
|
||||||
@ If you want to specify a battle partner without specifying a custom script, you can set the script parameter to 0.
|
@ If you want to specify a battle partner without specifying a custom script, you can set the script parameter to 0.
|
||||||
.macro setfollowernpc localId:req, flags:req, script=0, battlePartner=0
|
.macro setfollowernpc localId:req, flags:req, script=0, battlePartner=0
|
||||||
@ -2598,6 +2599,19 @@
|
|||||||
.endif
|
.endif
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
|
@ Creates a new follower NPC with the specified graphics id.
|
||||||
|
.macro createfollowernpc gfx:req, flags:req, script=0, battlePartner=0
|
||||||
|
.if FNPC_ENABLE_NPC_FOLLOWERS
|
||||||
|
callnative ScriptCreateFollowerNPC
|
||||||
|
.2byte \gfx
|
||||||
|
.2byte \flags
|
||||||
|
.4byte \script
|
||||||
|
.2byte \battlePartner
|
||||||
|
.else
|
||||||
|
.error "createfollowernpc unavailable with FNPC_ENABLE_NPC_FOLLOWERS defined as FALSE"
|
||||||
|
.endif
|
||||||
|
.endm
|
||||||
|
|
||||||
@ Remove the follower NPC (assumes there will only ever be one).
|
@ Remove the follower NPC (assumes there will only ever be one).
|
||||||
.macro destroyfollowernpc
|
.macro destroyfollowernpc
|
||||||
.if FNPC_ENABLE_NPC_FOLLOWERS
|
.if FNPC_ENABLE_NPC_FOLLOWERS
|
||||||
|
|||||||
@ -376,7 +376,7 @@ B_LAST_ITEM = FD 16
|
|||||||
B_LAST_ABILITY = FD 17
|
B_LAST_ABILITY = FD 17
|
||||||
B_ATK_ABILITY = FD 18
|
B_ATK_ABILITY = FD 18
|
||||||
B_DEF_ABILITY = FD 19
|
B_DEF_ABILITY = FD 19
|
||||||
B_SCR_ACTIVE_ABILITY = FD 1A
|
B_SCR_ABILITY = FD 1A
|
||||||
B_EFF_ABILITY = FD 1B
|
B_EFF_ABILITY = FD 1B
|
||||||
B_TRAINER1_CLASS = FD 1C
|
B_TRAINER1_CLASS = FD 1C
|
||||||
B_TRAINER1_NAME = FD 1D
|
B_TRAINER1_NAME = FD 1D
|
||||||
|
|||||||
@ -104,9 +104,7 @@ BattleScript_ItemHealAndCureStatusEnd::
|
|||||||
BattleScript_ItemIncreaseStat::
|
BattleScript_ItemIncreaseStat::
|
||||||
call BattleScript_UseItemMessage
|
call BattleScript_UseItemMessage
|
||||||
itemincreasestat
|
itemincreasestat
|
||||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_NOT_PROTECT_AFFECTED | STAT_CHANGE_ALLOW_PTR, BattleScript_ItemEnd
|
statbuffchange BS_ATTACKER, STAT_CHANGE_NOT_PROTECT_AFFECTED | STAT_CHANGE_ALLOW_PTR, BattleScript_ItemEnd
|
||||||
setgraphicalstatchangevalues
|
|
||||||
playanimation BS_ATTACKER, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
|
|
||||||
printfromtable gStatUpStringIds
|
printfromtable gStatUpStringIds
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
end
|
end
|
||||||
@ -133,7 +131,7 @@ BattleScript_PokeFluteEnd::
|
|||||||
BattleScript_ItemSetMist::
|
BattleScript_ItemSetMist::
|
||||||
call BattleScript_UseItemMessage
|
call BattleScript_UseItemMessage
|
||||||
setmist
|
setmist
|
||||||
playmoveanimation BS_ATTACKER, MOVE_MIST
|
playmoveanimation MOVE_MIST
|
||||||
waitanimation
|
waitanimation
|
||||||
printfromtable gMistUsedStringIds
|
printfromtable gMistUsedStringIds
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
@ -141,9 +139,10 @@ BattleScript_ItemSetMist::
|
|||||||
|
|
||||||
BattleScript_ItemSetFocusEnergy::
|
BattleScript_ItemSetFocusEnergy::
|
||||||
call BattleScript_UseItemMessage
|
call BattleScript_UseItemMessage
|
||||||
jumpifstatus2 BS_ATTACKER, STATUS2_FOCUS_ENERGY_ANY, BattleScript_ButItFailed
|
jumpifvolatile BS_ATTACKER, VOLATILE_DRAGON_CHEER, BattleScript_ButItFailed
|
||||||
|
jumpifvolatile BS_ATTACKER, VOLATILE_FOCUS_ENERGY, BattleScript_ButItFailed
|
||||||
setfocusenergy BS_ATTACKER
|
setfocusenergy BS_ATTACKER
|
||||||
playmoveanimation BS_ATTACKER, MOVE_FOCUS_ENERGY
|
playmoveanimation MOVE_FOCUS_ENERGY
|
||||||
waitanimation
|
waitanimation
|
||||||
copybyte sBATTLER, gBattlerAttacker
|
copybyte sBATTLER, gBattlerAttacker
|
||||||
printstring STRINGID_PKMNUSEDXTOGETPUMPED
|
printstring STRINGID_PKMNUSEDXTOGETPUMPED
|
||||||
@ -212,6 +211,9 @@ BattleScript_WallyBallThrow::
|
|||||||
finishturn
|
finishturn
|
||||||
|
|
||||||
BattleScript_ShakeBallThrow::
|
BattleScript_ShakeBallThrow::
|
||||||
|
animatewildpokemonafterfailedpokeball BS_TARGET
|
||||||
|
waitstate
|
||||||
|
waitmessage B_WAIT_TIME_LONG
|
||||||
printfromtable gBallEscapeStringIds
|
printfromtable gBallEscapeStringIds
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
jumpifword CMP_NO_COMMON_BITS, gBattleTypeFlags, BATTLE_TYPE_SAFARI, BattleScript_ShakeBallThrowEnd
|
jumpifword CMP_NO_COMMON_BITS, gBattleTypeFlags, BATTLE_TYPE_SAFARI, BattleScript_ShakeBallThrowEnd
|
||||||
|
|||||||
@ -25,6 +25,7 @@
|
|||||||
#include "constants/event_objects.h"
|
#include "constants/event_objects.h"
|
||||||
#include "constants/event_object_movement.h"
|
#include "constants/event_object_movement.h"
|
||||||
#include "constants/field_effects.h"
|
#include "constants/field_effects.h"
|
||||||
|
#include "constants/field_move.h"
|
||||||
#include "constants/field_poison.h"
|
#include "constants/field_poison.h"
|
||||||
#include "constants/field_specials.h"
|
#include "constants/field_specials.h"
|
||||||
#include "constants/field_tasks.h"
|
#include "constants/field_tasks.h"
|
||||||
|
|||||||
@ -81,6 +81,8 @@ gFieldEffectScriptPointers::
|
|||||||
.4byte gFieldEffectScript_TracksSpot @ FLDEFF_TRACKS_SPOT
|
.4byte gFieldEffectScript_TracksSpot @ FLDEFF_TRACKS_SPOT
|
||||||
.4byte gFieldEffectScript_CaveDust @ FLDEFF_CAVE_DUST
|
.4byte gFieldEffectScript_CaveDust @ FLDEFF_CAVE_DUST
|
||||||
.4byte gFieldEffectScript_Defog @ FLDEFF_DEFOG
|
.4byte gFieldEffectScript_Defog @ FLDEFF_DEFOG
|
||||||
|
.4byte gFieldEffectScript_UseRockClimb @ FLDEFF_USE_ROCK_CLIMB
|
||||||
|
.4byte gFieldEffectScript_RockClimbDust @ FLDEFF_ROCK_CLIMB_DUST
|
||||||
|
|
||||||
gFieldEffectScript_ExclamationMarkIcon1::
|
gFieldEffectScript_ExclamationMarkIcon1::
|
||||||
field_eff_callnative FldEff_ExclamationMarkIcon
|
field_eff_callnative FldEff_ExclamationMarkIcon
|
||||||
@ -384,3 +386,11 @@ gFieldEffectScript_CaveDust::
|
|||||||
gFieldEffectScript_Defog::
|
gFieldEffectScript_Defog::
|
||||||
field_eff_callnative FldEff_Defog
|
field_eff_callnative FldEff_Defog
|
||||||
field_eff_end
|
field_eff_end
|
||||||
|
gFieldEffectScript_UseRockClimb:: @ 82DBC3F
|
||||||
|
field_eff_callnative FldEff_UseRockClimb
|
||||||
|
field_eff_end
|
||||||
|
|
||||||
|
gFieldEffectScript_RockClimbDust:: @ 82DBB28
|
||||||
|
field_eff_loadfadedpal_callnative gSpritePalette_BigDust, FldEff_RockClimbDust
|
||||||
|
field_eff_end
|
||||||
|
|
||||||
|
|||||||
@ -146,7 +146,7 @@ gScriptCmdTable::
|
|||||||
script_cmd_table_entry SCR_OP_GIVEMON ScrCmd_nop1, requests_effects=1 @ 0x79
|
script_cmd_table_entry SCR_OP_GIVEMON ScrCmd_nop1, requests_effects=1 @ 0x79
|
||||||
script_cmd_table_entry SCR_OP_GIVEEGG ScrCmd_giveegg, requests_effects=1 @ 0x7a
|
script_cmd_table_entry SCR_OP_GIVEEGG ScrCmd_giveegg, requests_effects=1 @ 0x7a
|
||||||
script_cmd_table_entry SCR_OP_SETMONMOVE ScrCmd_setmonmove, requests_effects=1 @ 0x7b
|
script_cmd_table_entry SCR_OP_SETMONMOVE ScrCmd_setmonmove, requests_effects=1 @ 0x7b
|
||||||
script_cmd_table_entry SCR_OP_CHECKPARTYMOVE ScrCmd_checkpartymove, requests_effects=1 @ 0x7c
|
script_cmd_table_entry SCR_OP_CHECKFIELDMOVE ScrCmd_checkfieldmove, requests_effects=1 @ 0x7c
|
||||||
script_cmd_table_entry SCR_OP_BUFFERSPECIESNAME ScrCmd_bufferspeciesname, requests_effects=1 @ 0x7d
|
script_cmd_table_entry SCR_OP_BUFFERSPECIESNAME ScrCmd_bufferspeciesname, requests_effects=1 @ 0x7d
|
||||||
script_cmd_table_entry SCR_OP_BUFFERLEADMONSPECIESNAME ScrCmd_bufferleadmonspeciesname, requests_effects=1 @ 0x7e
|
script_cmd_table_entry SCR_OP_BUFFERLEADMONSPECIESNAME ScrCmd_bufferleadmonspeciesname, requests_effects=1 @ 0x7e
|
||||||
script_cmd_table_entry SCR_OP_BUFFERPARTYMONNICK ScrCmd_bufferpartymonnick, requests_effects=1 @ 0x7f
|
script_cmd_table_entry SCR_OP_BUFFERPARTYMONNICK ScrCmd_bufferpartymonnick, requests_effects=1 @ 0x7f
|
||||||
|
|||||||
@ -270,6 +270,24 @@ Debug_ShowExpansionVersion::
|
|||||||
Debug_ExpansionVersion:
|
Debug_ExpansionVersion:
|
||||||
.string "pokeemerald-expansion {STR_VAR_1}$"
|
.string "pokeemerald-expansion {STR_VAR_1}$"
|
||||||
|
|
||||||
|
Debug_Follower_NPC_Not_Enabled::
|
||||||
|
msgbox Debug_Enable_To_Use_Follower_NPCs, MSGBOX_DEFAULT
|
||||||
|
release
|
||||||
|
end
|
||||||
|
|
||||||
|
Debug_Enable_To_Use_Follower_NPCs:
|
||||||
|
.string "Feature unavailable.\nSet FNPC_ENABLE_NPC_FOLLOWERS to\lTRUE in 'include/config/follower_npc.h'.$"
|
||||||
|
|
||||||
|
Debug_Follower_NPC_Event_Script::
|
||||||
|
lock
|
||||||
|
facefollowernpc
|
||||||
|
msgbox Debug_Follower_NPC_Test_Message, MSGBOX_DEFAULT
|
||||||
|
releaseall
|
||||||
|
end
|
||||||
|
|
||||||
|
Debug_Follower_NPC_Test_Message:
|
||||||
|
.string "This is a Follower NPC test.$"
|
||||||
|
|
||||||
Debug_EventScript_Steven_Multi::
|
Debug_EventScript_Steven_Multi::
|
||||||
call MossdeepCity_SpaceCenter_2F_EventScript_ChoosePartyForMultiBattle
|
call MossdeepCity_SpaceCenter_2F_EventScript_ChoosePartyForMultiBattle
|
||||||
release
|
release
|
||||||
@ -335,6 +353,44 @@ Debug_EventScript_InflictStatus1_Single:
|
|||||||
releaseall
|
releaseall
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Debug_EventScript_SetHiddenNature::
|
||||||
|
special ChoosePartyMon
|
||||||
|
waitstate
|
||||||
|
goto_if_ge VAR_0x8004, PARTY_SIZE, Debug_EventScript_InflictStatus1_Close
|
||||||
|
specialvar VAR_RESULT, ScriptGetPartyMonSpecies
|
||||||
|
goto_if_eq VAR_RESULT, SPECIES_EGG, Debug_EventScript_InflictStatus1_Close
|
||||||
|
dynmultipush Debug_EventScript_ChangeNature_Text_Hardy, 0
|
||||||
|
dynmultipush Debug_EventScript_ChangeNature_Text_Lonely, 1
|
||||||
|
dynmultipush Debug_EventScript_ChangeNature_Text_Brave, 2
|
||||||
|
dynmultipush Debug_EventScript_ChangeNature_Text_Adamant, 3
|
||||||
|
dynmultipush Debug_EventScript_ChangeNature_Text_Naughty, 4
|
||||||
|
dynmultipush Debug_EventScript_ChangeNature_Text_Bold, 5
|
||||||
|
dynmultipush Debug_EventScript_ChangeNature_Text_Docile, 6
|
||||||
|
dynmultipush Debug_EventScript_ChangeNature_Text_Relaxed, 7
|
||||||
|
dynmultipush Debug_EventScript_ChangeNature_Text_Impish, 8
|
||||||
|
dynmultipush Debug_EventScript_ChangeNature_Text_Lax, 9
|
||||||
|
dynmultipush Debug_EventScript_ChangeNature_Text_Timid, 10
|
||||||
|
dynmultipush Debug_EventScript_ChangeNature_Text_Hasty, 11
|
||||||
|
dynmultipush Debug_EventScript_ChangeNature_Text_Serious, 12
|
||||||
|
dynmultipush Debug_EventScript_ChangeNature_Text_Jolly, 13
|
||||||
|
dynmultipush Debug_EventScript_ChangeNature_Text_Naive, 14
|
||||||
|
dynmultipush Debug_EventScript_ChangeNature_Text_Modest, 15
|
||||||
|
dynmultipush Debug_EventScript_ChangeNature_Text_Mild, 16
|
||||||
|
dynmultipush Debug_EventScript_ChangeNature_Text_Quiet, 17
|
||||||
|
dynmultipush Debug_EventScript_ChangeNature_Text_Bashful, 18
|
||||||
|
dynmultipush Debug_EventScript_ChangeNature_Text_Rash, 19
|
||||||
|
dynmultipush Debug_EventScript_ChangeNature_Text_Calm, 20
|
||||||
|
dynmultipush Debug_EventScript_ChangeNature_Text_Gentle, 21
|
||||||
|
dynmultipush Debug_EventScript_ChangeNature_Text_Sassy, 22
|
||||||
|
dynmultipush Debug_EventScript_ChangeNature_Text_Careful, 23
|
||||||
|
dynmultipush Debug_EventScript_ChangeNature_Text_Quirky, 24
|
||||||
|
dynmultistack 0, 0, TRUE, 7, FALSE, 0, NULL
|
||||||
|
switch VAR_RESULT
|
||||||
|
case MULTI_B_PRESSED, Debug_EventScript_InflictStatus1_Close
|
||||||
|
special SetHiddenNature
|
||||||
|
releaseall
|
||||||
|
end
|
||||||
|
|
||||||
Debug_EventScript_InflictStatus1_Single_Poison:
|
Debug_EventScript_InflictStatus1_Single_Poison:
|
||||||
setstatus1 STATUS1_POISON, VAR_0x8004
|
setstatus1 STATUS1_POISON, VAR_0x8004
|
||||||
releaseall
|
releaseall
|
||||||
@ -443,6 +499,57 @@ Debug_EventScript_InflictStatus1_Text_Freeze:
|
|||||||
Debug_EventScript_InflictStatus1_Text_Frostbite:
|
Debug_EventScript_InflictStatus1_Text_Frostbite:
|
||||||
.string "冻伤$"
|
.string "冻伤$"
|
||||||
|
|
||||||
|
Debug_EventScript_ChangeNature_Text_Hardy:
|
||||||
|
.string "Hardy$"
|
||||||
|
Debug_EventScript_ChangeNature_Text_Lonely:
|
||||||
|
.string "Lonely$"
|
||||||
|
Debug_EventScript_ChangeNature_Text_Brave:
|
||||||
|
.string "Brave$"
|
||||||
|
Debug_EventScript_ChangeNature_Text_Adamant:
|
||||||
|
.string "Adamant$"
|
||||||
|
Debug_EventScript_ChangeNature_Text_Naughty:
|
||||||
|
.string "Naughty$"
|
||||||
|
Debug_EventScript_ChangeNature_Text_Bold:
|
||||||
|
.string "Bold$"
|
||||||
|
Debug_EventScript_ChangeNature_Text_Docile:
|
||||||
|
.string "Docile$"
|
||||||
|
Debug_EventScript_ChangeNature_Text_Relaxed:
|
||||||
|
.string "Relaxed$"
|
||||||
|
Debug_EventScript_ChangeNature_Text_Impish:
|
||||||
|
.string "Impish$"
|
||||||
|
Debug_EventScript_ChangeNature_Text_Lax:
|
||||||
|
.string "Lax$"
|
||||||
|
Debug_EventScript_ChangeNature_Text_Timid:
|
||||||
|
.string "Timid$"
|
||||||
|
Debug_EventScript_ChangeNature_Text_Hasty:
|
||||||
|
.string "Hasty$"
|
||||||
|
Debug_EventScript_ChangeNature_Text_Serious:
|
||||||
|
.string "Serious$"
|
||||||
|
Debug_EventScript_ChangeNature_Text_Jolly:
|
||||||
|
.string "Jolly$"
|
||||||
|
Debug_EventScript_ChangeNature_Text_Naive:
|
||||||
|
.string "Naive$"
|
||||||
|
Debug_EventScript_ChangeNature_Text_Modest:
|
||||||
|
.string "Modest$"
|
||||||
|
Debug_EventScript_ChangeNature_Text_Mild:
|
||||||
|
.string "Mild$"
|
||||||
|
Debug_EventScript_ChangeNature_Text_Quiet:
|
||||||
|
.string "Quiet$"
|
||||||
|
Debug_EventScript_ChangeNature_Text_Bashful:
|
||||||
|
.string "Bashful$"
|
||||||
|
Debug_EventScript_ChangeNature_Text_Rash:
|
||||||
|
.string "Rash$"
|
||||||
|
Debug_EventScript_ChangeNature_Text_Calm:
|
||||||
|
.string "Calm$"
|
||||||
|
Debug_EventScript_ChangeNature_Text_Gentle:
|
||||||
|
.string "Gentle$"
|
||||||
|
Debug_EventScript_ChangeNature_Text_Sassy:
|
||||||
|
.string "Sassy$"
|
||||||
|
Debug_EventScript_ChangeNature_Text_Careful:
|
||||||
|
.string "Careful$"
|
||||||
|
Debug_EventScript_ChangeNature_Text_Quirky:
|
||||||
|
.string "Quirky$"
|
||||||
|
|
||||||
Debug_EventScript_EWRAMCounters::
|
Debug_EventScript_EWRAMCounters::
|
||||||
callnative CheckEWRAMCounters
|
callnative CheckEWRAMCounters
|
||||||
msgbox Debug_EventScript_EWRAMCounters_Text, MSGBOX_DEFAULT
|
msgbox Debug_EventScript_EWRAMCounters_Text, MSGBOX_DEFAULT
|
||||||
|
|||||||
@ -1,8 +1,7 @@
|
|||||||
@ Interact with cuttable tree
|
@ Interact with cuttable tree
|
||||||
EventScript_CutTree::
|
EventScript_CutTree::
|
||||||
lockall
|
lockall
|
||||||
goto_if_unset FLAG_BADGE01_GET, EventScript_CheckTreeCantCut
|
checkfieldmove FIELD_MOVE_CUT, TRUE
|
||||||
checkpartymove MOVE_CUT
|
|
||||||
goto_if_eq VAR_RESULT, PARTY_SIZE, EventScript_CheckTreeCantCut
|
goto_if_eq VAR_RESULT, PARTY_SIZE, EventScript_CheckTreeCantCut
|
||||||
setfieldeffectargument 0, VAR_RESULT
|
setfieldeffectargument 0, VAR_RESULT
|
||||||
bufferpartymonnick STR_VAR_1, VAR_RESULT
|
bufferpartymonnick STR_VAR_1, VAR_RESULT
|
||||||
@ -63,8 +62,7 @@ EventScript_UseRockSmash::
|
|||||||
@ Interact with smashable rock
|
@ Interact with smashable rock
|
||||||
EventScript_RockSmash::
|
EventScript_RockSmash::
|
||||||
lockall
|
lockall
|
||||||
goto_if_unset FLAG_BADGE03_GET, EventScript_CantSmashRock
|
checkfieldmove FIELD_MOVE_ROCK_SMASH, TRUE
|
||||||
checkpartymove MOVE_ROCK_SMASH
|
|
||||||
goto_if_eq VAR_RESULT, PARTY_SIZE, EventScript_CantSmashRock
|
goto_if_eq VAR_RESULT, PARTY_SIZE, EventScript_CantSmashRock
|
||||||
setfieldeffectargument 0, VAR_RESULT
|
setfieldeffectargument 0, VAR_RESULT
|
||||||
bufferpartymonnick STR_VAR_1, VAR_RESULT
|
bufferpartymonnick STR_VAR_1, VAR_RESULT
|
||||||
@ -224,9 +222,8 @@ Text_CantSmash:
|
|||||||
|
|
||||||
EventScript_StrengthBoulder::
|
EventScript_StrengthBoulder::
|
||||||
lockall
|
lockall
|
||||||
goto_if_unset FLAG_BADGE04_GET, EventScript_CantStrength
|
|
||||||
goto_if_set FLAG_SYS_USE_STRENGTH, EventScript_CheckActivatedBoulder
|
goto_if_set FLAG_SYS_USE_STRENGTH, EventScript_CheckActivatedBoulder
|
||||||
checkpartymove MOVE_STRENGTH
|
checkfieldmove FIELD_MOVE_STRENGTH, TRUE
|
||||||
goto_if_eq VAR_RESULT, PARTY_SIZE, EventScript_CantStrength
|
goto_if_eq VAR_RESULT, PARTY_SIZE, EventScript_CantStrength
|
||||||
setfieldeffectargument 0, VAR_RESULT
|
setfieldeffectargument 0, VAR_RESULT
|
||||||
msgbox Text_WantToStrength, MSGBOX_YESNO
|
msgbox Text_WantToStrength, MSGBOX_YESNO
|
||||||
@ -285,7 +282,7 @@ Text_StrengthActivated:
|
|||||||
|
|
||||||
EventScript_UseWaterfall::
|
EventScript_UseWaterfall::
|
||||||
lockall
|
lockall
|
||||||
checkpartymove MOVE_WATERFALL
|
checkfieldmove FIELD_MOVE_WATERFALL
|
||||||
goto_if_eq VAR_RESULT, PARTY_SIZE, EventScript_CantWaterfall
|
goto_if_eq VAR_RESULT, PARTY_SIZE, EventScript_CantWaterfall
|
||||||
bufferpartymonnick STR_VAR_1, VAR_RESULT
|
bufferpartymonnick STR_VAR_1, VAR_RESULT
|
||||||
setfieldeffectargument 0, VAR_RESULT
|
setfieldeffectargument 0, VAR_RESULT
|
||||||
@ -321,7 +318,7 @@ Text_MonUsedWaterfall:
|
|||||||
|
|
||||||
EventScript_UseDive::
|
EventScript_UseDive::
|
||||||
lockall
|
lockall
|
||||||
checkpartymove MOVE_DIVE
|
checkfieldmove FIELD_MOVE_DIVE
|
||||||
goto_if_eq VAR_RESULT, PARTY_SIZE, EventScript_CantDive
|
goto_if_eq VAR_RESULT, PARTY_SIZE, EventScript_CantDive
|
||||||
copyvar 0x8004 VAR_RESULT
|
copyvar 0x8004 VAR_RESULT
|
||||||
bufferpartymonnick STR_VAR_1, VAR_RESULT
|
bufferpartymonnick STR_VAR_1, VAR_RESULT
|
||||||
@ -348,7 +345,7 @@ EventScript_EndDive::
|
|||||||
|
|
||||||
EventScript_UseDiveUnderwater::
|
EventScript_UseDiveUnderwater::
|
||||||
lockall
|
lockall
|
||||||
checkpartymove MOVE_DIVE
|
checkfieldmove FIELD_MOVE_DIVE
|
||||||
goto_if_eq VAR_RESULT, PARTY_SIZE, EventScript_CantSurface
|
goto_if_eq VAR_RESULT, PARTY_SIZE, EventScript_CantSurface
|
||||||
bufferpartymonnick STR_VAR_1, VAR_RESULT
|
bufferpartymonnick STR_VAR_1, VAR_RESULT
|
||||||
setfieldeffectargument 0, VAR_RESULT
|
setfieldeffectargument 0, VAR_RESULT
|
||||||
@ -444,3 +441,36 @@ EventScript_UseDefog::
|
|||||||
waitstate
|
waitstate
|
||||||
releaseall
|
releaseall
|
||||||
end
|
end
|
||||||
|
|
||||||
|
EventScript_UseRockClimb::
|
||||||
|
lockall
|
||||||
|
checkfieldmove FIELD_MOVE_ROCK_CLIMB
|
||||||
|
goto_if_eq VAR_RESULT, PARTY_SIZE, EventScript_CantRockClimb
|
||||||
|
bufferpartymonnick STR_VAR_1, VAR_RESULT
|
||||||
|
setfieldeffectargument 0, VAR_RESULT
|
||||||
|
msgbox Text_WantToRockClimb, MSGBOX_YESNO
|
||||||
|
goto_if_eq VAR_RESULT, NO, EventScript_EndRockClimb
|
||||||
|
msgbox Text_MonUsedRockClimb, MSGBOX_DEFAULT
|
||||||
|
closemessage
|
||||||
|
dofieldeffect FLDEFF_USE_ROCK_CLIMB
|
||||||
|
waitstate
|
||||||
|
goto EventScript_EndRockClimb
|
||||||
|
end
|
||||||
|
|
||||||
|
EventScript_CantRockClimb::
|
||||||
|
msgbox Text_CantRockClimb, MSGBOX_DEFAULT
|
||||||
|
|
||||||
|
EventScript_EndRockClimb::
|
||||||
|
releaseall
|
||||||
|
end
|
||||||
|
|
||||||
|
Text_WantToRockClimb:
|
||||||
|
.string "The cliff is steep.\n"
|
||||||
|
.string "Would you like to use Rock Climb?$"
|
||||||
|
|
||||||
|
Text_MonUsedRockClimb:
|
||||||
|
.string "{STR_VAR_1} used Rock Climb!$"
|
||||||
|
|
||||||
|
Text_CantRockClimb:
|
||||||
|
.string "The cliff is steep.\n"
|
||||||
|
.string "A Pokémon may be able to climb it.$"
|
||||||
|
|||||||
@ -28,7 +28,7 @@ SecretBase_EventScript_CheckEntrance::
|
|||||||
special GetSecretBaseTypeInFrontOfPlayer
|
special GetSecretBaseTypeInFrontOfPlayer
|
||||||
special CheckPlayerHasSecretBase
|
special CheckPlayerHasSecretBase
|
||||||
goto_if_eq VAR_RESULT, TRUE, SecretBase_EventScript_AlreadyHasSecretBase
|
goto_if_eq VAR_RESULT, TRUE, SecretBase_EventScript_AlreadyHasSecretBase
|
||||||
checkpartymove MOVE_SECRET_POWER
|
checkfieldmove FIELD_MOVE_SECRET_POWER
|
||||||
setfieldeffectargument 0, VAR_RESULT
|
setfieldeffectargument 0, VAR_RESULT
|
||||||
buffermovename STR_VAR_2, MOVE_SECRET_POWER
|
buffermovename STR_VAR_2, MOVE_SECRET_POWER
|
||||||
goto_if_eq VAR_0x8007, SECRET_BASE_RED_CAVE, SecretBase_EventScript_Cave
|
goto_if_eq VAR_0x8007, SECRET_BASE_RED_CAVE, SecretBase_EventScript_Cave
|
||||||
@ -186,7 +186,7 @@ SecretBase_EventScript_EnterPlayersBase::
|
|||||||
end
|
end
|
||||||
|
|
||||||
SecretBase_EventScript_AlreadyHasSecretBase::
|
SecretBase_EventScript_AlreadyHasSecretBase::
|
||||||
checkpartymove MOVE_SECRET_POWER
|
checkfieldmove FIELD_MOVE_SECRET_POWER
|
||||||
goto_if_eq VAR_RESULT, PARTY_SIZE, SecretBase_EventScript_NoSecretPower
|
goto_if_eq VAR_RESULT, PARTY_SIZE, SecretBase_EventScript_NoSecretPower
|
||||||
setfieldeffectargument 0, VAR_RESULT
|
setfieldeffectargument 0, VAR_RESULT
|
||||||
setorcopyvar VAR_0x8004, VAR_RESULT
|
setorcopyvar VAR_0x8004, VAR_RESULT
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
EventScript_UseSurf::
|
EventScript_UseSurf::
|
||||||
checkpartymove MOVE_SURF
|
checkfieldmove FIELD_MOVE_SURF
|
||||||
goto_if_eq VAR_RESULT, PARTY_SIZE, EventScript_EndUseSurf
|
goto_if_eq VAR_RESULT, PARTY_SIZE, EventScript_EndUseSurf
|
||||||
bufferpartymonnick STR_VAR_1, VAR_RESULT
|
bufferpartymonnick STR_VAR_1, VAR_RESULT
|
||||||
setfieldeffectargument 0, VAR_RESULT
|
setfieldeffectargument 0, VAR_RESULT
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
.include "asm/macros/m4a.inc"
|
.include "asm/macros/m4a.inc"
|
||||||
.include "asm/macros/music_voice.inc"
|
.include "asm/macros/music_voice.inc"
|
||||||
|
.include "include/config/general.h"
|
||||||
.include "include/config/pokemon.h"
|
.include "include/config/pokemon.h"
|
||||||
.include "sound/voice_groups.inc"
|
.include "sound/voice_groups.inc"
|
||||||
.include "sound/keysplit_tables.inc"
|
.include "sound/keysplit_tables.inc"
|
||||||
|
|||||||
@ -563,3 +563,4 @@ gSpecials::
|
|||||||
def_special UseBlankMessageToCancelPokemonPic
|
def_special UseBlankMessageToCancelPokemonPic
|
||||||
def_special EnterCode
|
def_special EnterCode
|
||||||
def_special GetCodeFeedback
|
def_special GetCodeFeedback
|
||||||
|
def_special SetHiddenNature
|
||||||
|
|||||||
@ -19,7 +19,10 @@
|
|||||||
- [How to add new Trainer Slides](tutorials/how_to_new_trainer_slide.md)
|
- [How to add new Trainer Slides](tutorials/how_to_new_trainer_slide.md)
|
||||||
- [Day/Night System FAQ](tutorials/dns.md)
|
- [Day/Night System FAQ](tutorials/dns.md)
|
||||||
- [Changelog](./CHANGELOG.md)
|
- [Changelog](./CHANGELOG.md)
|
||||||
|
- [1.13.x]()
|
||||||
|
- [Version 1.13.0](changelogs/1.13.x/1.13.0.md)
|
||||||
- [1.12.x]()
|
- [1.12.x]()
|
||||||
|
- [Version 1.12.3](changelogs/1.12.x/1.12.3.md)
|
||||||
- [Version 1.12.2](changelogs/1.12.x/1.12.2.md)
|
- [Version 1.12.2](changelogs/1.12.x/1.12.2.md)
|
||||||
- [Version 1.12.1](changelogs/1.12.x/1.12.1.md)
|
- [Version 1.12.1](changelogs/1.12.x/1.12.1.md)
|
||||||
- [Version 1.12.0](changelogs/1.12.x/1.12.0.md)
|
- [Version 1.12.0](changelogs/1.12.x/1.12.0.md)
|
||||||
|
|||||||
118
docs/changelogs/1.12.x/1.12.3.md
Normal file
@ -0,0 +1,118 @@
|
|||||||
|
```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.12.3
|
||||||
|
`.
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## 🧬 General 🧬
|
||||||
|
### Changed
|
||||||
|
* Restore git history check by @ravepossum in [#7463](https://github.com/rh-hideout/pokeemerald-expansion/pull/7463)
|
||||||
|
* Moved summary screen nature colors to summary_screen.h by @RubyRaven6 in [#7560](https://github.com/rh-hideout/pokeemerald-expansion/pull/7560)
|
||||||
|
* Added comment in event.inc for simple menus in dynmultichoice by @RubyRaven6 in [#7568](https://github.com/rh-hideout/pokeemerald-expansion/pull/7568)
|
||||||
|
* Changed default print level for DebugPrintf for mGBA to MGBA_LOG_WARN by @hedara90 in [#7567](https://github.com/rh-hideout/pokeemerald-expansion/pull/7567)
|
||||||
|
* Fixed Teleport's description not being updated based on `B_TELEPORT_BEHAVIOR` by @AsparagusEduardo in [#7580](https://github.com/rh-hideout/pokeemerald-expansion/pull/7580)
|
||||||
|
* Minor Clean up in battle_ai_main.c by @AlexOn1ine in [#7551](https://github.com/rh-hideout/pokeemerald-expansion/pull/7551)
|
||||||
|
|
||||||
|
## 🗺️ Overworld 🗺️
|
||||||
|
### Changed
|
||||||
|
* fix: remove unused wild_encounters.json.txt jinja file by @khbsd in [#7581](https://github.com/rh-hideout/pokeemerald-expansion/pull/7581)
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
* Bug fix: add handling for forced movements into/after ledge jumps with follower NPCs by @Bivurnum in [#7055](https://github.com/rh-hideout/pokeemerald-expansion/pull/7055)
|
||||||
|
* Fixed compile issue `OW_TIMES_OF_DAY` is `GEN_3` by @AsparagusEduardo in [#7499](https://github.com/rh-hideout/pokeemerald-expansion/pull/7499)
|
||||||
|
* Remove shadow and hide follower on stair warp by @cornixsenex in [#7368](https://github.com/rh-hideout/pokeemerald-expansion/pull/7368)
|
||||||
|
* Fix Form Change Item Task Data and Clean Up Field Use Funcs by @ravepossum in [#7535](https://github.com/rh-hideout/pokeemerald-expansion/pull/7535)
|
||||||
|
* Fix Vs Seeker Trainer Battle script issue by @pkmnsnfrn in [#7615](https://github.com/rh-hideout/pokeemerald-expansion/pull/7615)
|
||||||
|
|
||||||
|
## ⚔️ Battle General ⚔️
|
||||||
|
### Changed
|
||||||
|
* Remove unused function by @AlexOn1ine in [#7617](https://github.com/rh-hideout/pokeemerald-expansion/pull/7617)
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
* Fixes Magnet Rise when user is Rooted/Smacked Down by @PhallenTree in [#7449](https://github.com/rh-hideout/pokeemerald-expansion/pull/7449)
|
||||||
|
* Fixes Leech Seed recovery not applying behind Sub by @AlexOn1ine in [#7468](https://github.com/rh-hideout/pokeemerald-expansion/pull/7468)
|
||||||
|
* Fixes Round and Fusion moves doubling power from previous turn's move by @PhallenTree in [#7476](https://github.com/rh-hideout/pokeemerald-expansion/pull/7476)
|
||||||
|
* Fixes shadows and mon animations for transformed battlers by @AsparagusEduardo in [#7500](https://github.com/rh-hideout/pokeemerald-expansion/pull/7500)
|
||||||
|
* Fixes Life Orb still activating if move was absorbed by @AlexOn1ine in [#7521](https://github.com/rh-hideout/pokeemerald-expansion/pull/7521)
|
||||||
|
* Fix Mimicry Only Activating Once per Turn by @ghoulslash in [#7537](https://github.com/rh-hideout/pokeemerald-expansion/pull/7537)
|
||||||
|
* Fixes Knock Off still activating when there is no Item by @AlexOn1ine in [#7496](https://github.com/rh-hideout/pokeemerald-expansion/pull/7496)
|
||||||
|
* Fixed `B_PSYWAVE_DMG` by @AsparagusEduardo in [#7557](https://github.com/rh-hideout/pokeemerald-expansion/pull/7557)
|
||||||
|
* Fixes Counter / Mirror Coat / Metal Burst damage assignment by @AlexOn1ine in [#7538](https://github.com/rh-hideout/pokeemerald-expansion/pull/7538)
|
||||||
|
* Fix in-game partner battles always causing a whiteout by @ravepossum in [#7587](https://github.com/rh-hideout/pokeemerald-expansion/pull/7587)
|
||||||
|
* Fix B_ANIMATE_MON_AFTER_KO with a new counter by @hedara90 in [#7531](https://github.com/rh-hideout/pokeemerald-expansion/pull/7531)
|
||||||
|
* Fixes Rage Fist counter increment by @AlexOn1ine in [#7582](https://github.com/rh-hideout/pokeemerald-expansion/pull/7582)
|
||||||
|
* Fixes moveend_absorb hitmarker by @AlexOn1ine in [#7591](https://github.com/rh-hideout/pokeemerald-expansion/pull/7591)
|
||||||
|
* switchinabilities also runs ON_WEATHER and ON_TERRAIN by @ghoulslash in [#7612](https://github.com/rh-hideout/pokeemerald-expansion/pull/7612)
|
||||||
|
* Fixes Explosion behavior when 3 mons can endure hit by @AlexOn1ine in [#7594](https://github.com/rh-hideout/pokeemerald-expansion/pull/7594)
|
||||||
|
* Fixes octolock not ending after user switched out by @AlexOn1ine in [#7556](https://github.com/rh-hideout/pokeemerald-expansion/pull/7556)
|
||||||
|
* The original attacker wasn't restored for Doodle by @AlexOn1ine in [#7620](https://github.com/rh-hideout/pokeemerald-expansion/pull/7620)
|
||||||
|
* Restore X item friendship increase by @ravepossum in [#7583](https://github.com/rh-hideout/pokeemerald-expansion/pull/7583)
|
||||||
|
* Fixes Wonder Room interactions with Defense/Special Defense boosting effects by @PhallenTree in [#7626](https://github.com/rh-hideout/pokeemerald-expansion/pull/7626)
|
||||||
|
* Ally Switch attract battler swapping, test for leech seed by @ghoulslash in [#7634](https://github.com/rh-hideout/pokeemerald-expansion/pull/7634)
|
||||||
|
|
||||||
|
## 🤹 Moves 🤹
|
||||||
|
### Fixed
|
||||||
|
* Clear gScanlineEffect to fix timeout in acid downpour animation by @FosterProgramming in [#7442](https://github.com/rh-hideout/pokeemerald-expansion/pull/7442)
|
||||||
|
* Fix terastallization anims flickering by @ravepossum in [#7613](https://github.com/rh-hideout/pokeemerald-expansion/pull/7613)
|
||||||
|
|
||||||
|
## 🧶 Items 🧶
|
||||||
|
### Changed
|
||||||
|
* Fix using town map as registered item by @ravepossum in [#7482](https://github.com/rh-hideout/pokeemerald-expansion/pull/7482)
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
* Implement using party menu items from field by @ravepossum in [#7481](https://github.com/rh-hideout/pokeemerald-expansion/pull/7481)
|
||||||
|
|
||||||
|
## 🤖 Battle AI 🤖
|
||||||
|
### Changed
|
||||||
|
* Macro-for-AI-Flag-definitions by @grintoul1 in [#7471](https://github.com/rh-hideout/pokeemerald-expansion/pull/7471)
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
* Incorrect call in Rest by @surskitty in [#7569](https://github.com/rh-hideout/pokeemerald-expansion/pull/7569)
|
||||||
|
* Fix duplicate switch in after faint by @AlexOn1ine in [#7600](https://github.com/rh-hideout/pokeemerald-expansion/pull/7600)
|
||||||
|
|
||||||
|
## 🧹 Other Cleanup 🧹
|
||||||
|
* Macro-for-AI-Flag-definitions by @grintoul1 in [#7471](https://github.com/rh-hideout/pokeemerald-expansion/pull/7471)
|
||||||
|
* Moved summary screen nature colors to summary_screen.h by @RubyRaven6 in [#7560](https://github.com/rh-hideout/pokeemerald-expansion/pull/7560)
|
||||||
|
* fix: remove unused wild_encounters.json.txt jinja file by @khbsd in [#7581](https://github.com/rh-hideout/pokeemerald-expansion/pull/7581)
|
||||||
|
* Fix Form Change Item Task Data and Clean Up Field Use Funcs by @ravepossum in [#7535](https://github.com/rh-hideout/pokeemerald-expansion/pull/7535)
|
||||||
|
* Fixed Teleport's description not being updated based on `B_TELEPORT_BEHAVIOR` by @AsparagusEduardo in [#7580](https://github.com/rh-hideout/pokeemerald-expansion/pull/7580)
|
||||||
|
* Fixed typo in test name by @hedara90 in [#7610](https://github.com/rh-hideout/pokeemerald-expansion/pull/7610)
|
||||||
|
* Minor Clean up in battle_ai_main.c by @AlexOn1ine in [#7551](https://github.com/rh-hideout/pokeemerald-expansion/pull/7551)
|
||||||
|
* Remove unused function by @AlexOn1ine in [#7617](https://github.com/rh-hideout/pokeemerald-expansion/pull/7617)
|
||||||
|
* Fix Vs Seeker Trainer Battle script issue by @pkmnsnfrn in [#7615](https://github.com/rh-hideout/pokeemerald-expansion/pull/7615)
|
||||||
|
|
||||||
|
## 🧪 Test Runner 🧪
|
||||||
|
### Changed
|
||||||
|
* Clean up some Normalize tests to make them make sense by @hedara90 in [#7461](https://github.com/rh-hideout/pokeemerald-expansion/pull/7461)
|
||||||
|
* Add Synthesis + Utililty Umbrella test by @ghoulslash in [#7472](https://github.com/rh-hideout/pokeemerald-expansion/pull/7472)
|
||||||
|
* Add test for BoxPokemon integrity by @hedara90 in [#7487](https://github.com/rh-hideout/pokeemerald-expansion/pull/7487)
|
||||||
|
* Re-order moves in fling test by @hedara90 in [#7559](https://github.com/rh-hideout/pokeemerald-expansion/pull/7559)
|
||||||
|
* Wrote some tests by @AsparagusEduardo in [#7563](https://github.com/rh-hideout/pokeemerald-expansion/pull/7563)
|
||||||
|
* Added Ability TODO tests - Volume C by @AsparagusEduardo in [#7562](https://github.com/rh-hideout/pokeemerald-expansion/pull/7562)
|
||||||
|
* Added missing Move Effect TODO tests - Volume F by @AsparagusEduardo in [#7605](https://github.com/rh-hideout/pokeemerald-expansion/pull/7605)
|
||||||
|
* Fixed typo in test name by @hedara90 in [#7610](https://github.com/rh-hideout/pokeemerald-expansion/pull/7610)
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
* Clear out parties between battle tests by @hedara90 in [#7460](https://github.com/rh-hideout/pokeemerald-expansion/pull/7460)
|
||||||
|
* Fixed most failed tests with `GEN_LATEST GEN_8` by @AsparagusEduardo in [#7498](https://github.com/rh-hideout/pokeemerald-expansion/pull/7498)
|
||||||
|
* Corrected Liquid Ooze test by @AsparagusEduardo in [#7527](https://github.com/rh-hideout/pokeemerald-expansion/pull/7527)
|
||||||
|
* switchinabilities also runs ON_WEATHER and ON_TERRAIN by @ghoulslash in [#7612](https://github.com/rh-hideout/pokeemerald-expansion/pull/7612)
|
||||||
|
* Ally Switch attract battler swapping, test for leech seed by @ghoulslash in [#7634](https://github.com/rh-hideout/pokeemerald-expansion/pull/7634)
|
||||||
|
|
||||||
|
## 📚 Documentation 📚
|
||||||
|
* Update how_to_new_pokemon.md by @kevinwklawrence in [#7440](https://github.com/rh-hideout/pokeemerald-expansion/pull/7440)
|
||||||
|
* Updating a link to porytiles in INSTALL.md by @ThePeeps191 in [#7490](https://github.com/rh-hideout/pokeemerald-expansion/pull/7490)
|
||||||
|
* Added comment in event.inc for simple menus in dynmultichoice by @RubyRaven6 in [#7568](https://github.com/rh-hideout/pokeemerald-expansion/pull/7568)
|
||||||
|
|
||||||
|
## New Contributors
|
||||||
|
* @kevinwklawrence made their first contribution in [#7440](https://github.com/rh-hideout/pokeemerald-expansion/pull/7440)
|
||||||
|
* @ThePeeps191 made their first contribution in [#7490](https://github.com/rh-hideout/pokeemerald-expansion/pull/7490)
|
||||||
|
* @cornixsenex made their first contribution in [#7368](https://github.com/rh-hideout/pokeemerald-expansion/pull/7368)
|
||||||
|
|
||||||
|
**Full Changelog**: https://github.com/rh-hideout/pokeemerald-expansion/compare/expansion/1.12.2...expansion/1.12.3
|
||||||
|
|
||||||
|
|
||||||
|
<!--Last PR: 7634-->
|
||||||
|
<!--Used to keep track of the last PR merged in case new ones come in before the changelog is done.-->
|
||||||
483
docs/changelogs/1.13.x/1.13.0.md
Normal file
@ -0,0 +1,483 @@
|
|||||||
|
```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.0
|
||||||
|
`.
|
||||||
|
```
|
||||||
|
|
||||||
|
## 🌋 *REFACTORS* 🌋
|
||||||
|
📜 = Uses a migration script.
|
||||||
|
* Refactor field moves by @cawtds in [#6660](https://github.com/rh-hideout/pokeemerald-expansion/pull/6660)
|
||||||
|
* Refactors Final Gambit + Tests by @AlexOn1ine in [#7005](https://github.com/rh-hideout/pokeemerald-expansion/pull/7005)
|
||||||
|
* Combines Super Fang and Guardian of Alola effects by @AlexOn1ine in [#7048](https://github.com/rh-hideout/pokeemerald-expansion/pull/7048)
|
||||||
|
* Refactor damage calculations aruguments by using a struct context by @AlexOn1ine in [#7108](https://github.com/rh-hideout/pokeemerald-expansion/pull/7108)
|
||||||
|
* Add damage context to effectiveness multiplier by @AlexOn1ine in [#7111](https://github.com/rh-hideout/pokeemerald-expansion/pull/7111)
|
||||||
|
* Decouple Status set by ability from SetMoveEffect by @AlexOn1ine in [#7125](https://github.com/rh-hideout/pokeemerald-expansion/pull/7125)
|
||||||
|
* Converted Relic Song into a proper form change by @AsparagusEduardo in [#7139](https://github.com/rh-hideout/pokeemerald-expansion/pull/7139)
|
||||||
|
- Added `FORM_CHANGE_BATTLE_AFTER_MOVE` to parametrize Relic Song's form change
|
||||||
|
* Removed Mind Blown effect in favor of move flag by @AsparagusEduardo in [#7138](https://github.com/rh-hideout/pokeemerald-expansion/pull/7138)
|
||||||
|
* Volatile status refactoring by @cfmnephrite in [#6983](https://github.com/rh-hideout/pokeemerald-expansion/pull/6983)
|
||||||
|
* Bag refactor (groundwork for expansion) by @cfmnephrite in [#7018](https://github.com/rh-hideout/pokeemerald-expansion/pull/7018)
|
||||||
|
- If you're using @ghoulslash's bag sort branch, this PR will break it
|
||||||
|
* Stat Change (Animation) Refactor by @PhallenTree in [#7144](https://github.com/rh-hideout/pokeemerald-expansion/pull/7144)
|
||||||
|
`setgraphicalstatchangevalues` and `playstatchangeanimation` have been removed and now Stat Change Animations are handled in `statbuffchange`.
|
||||||
|
- To update your custom battle scripts:
|
||||||
|
`setgraphicalstatchangevalues` is often accompanied by `playanimation X, B_ANIM_STATS_CHANGE`. When I refer to deleting `setgraphicalstatchangevalues` below, that command should also be deleted.
|
||||||
|
1. If `statbuffchange` is before `setgraphicalstatchangevalues`/`playstatchangeanimation` and there is something in between them (for example, `attackanimation` and `waitanimation`), add the flag `STAT_CHANGE_ONLY_CHECKING` and replace the command (`setgraphicalstatchangevalues`/`playstatchangeanimation`) with a copy of the original `statbuffchange`.
|
||||||
|
2. If `statbuffchange` is after `setgraphicalstatchangevalues`/`playstatchangeanimation` or there is nothing in between, you should delete those commands (`setgraphicalstatchangevalues`/`playstatchangeanimation`) and no further changes other than those in _3._ should be required.
|
||||||
|
3. If `playstatchangeanimation` had bits assigned to them (`BIT_ATK | BIT_SPATK`, for example), add ", " followed by those bits to the first `statbuffchange`; for the following `statbuffchange`s, remove stats that have already been increased/decreased.
|
||||||
|
* Untangle `InitBtlControllers` functions by @AsparagusEduardo in [#6748](https://github.com/rh-hideout/pokeemerald-expansion/pull/6748)
|
||||||
|
* Use battler arguments for SetMoveEffect by @AlexOn1ine in [#7156](https://github.com/rh-hideout/pokeemerald-expansion/pull/7156)
|
||||||
|
* Easier expandability of debug menu by @AsparagusEduardo in [#6910](https://github.com/rh-hideout/pokeemerald-expansion/pull/6910)
|
||||||
|
* Use dedicated functions for Mud/Water Sport by @AlexOn1ine in [#7248](https://github.com/rh-hideout/pokeemerald-expansion/pull/7248)
|
||||||
|
* Expanding and Refactoring Skill Swap and other ability-changing moves by @surskitty in [#7238](https://github.com/rh-hideout/pokeemerald-expansion/pull/7238)
|
||||||
|
* Refactor move Synchronise by @AlexOn1ine in [#7271](https://github.com/rh-hideout/pokeemerald-expansion/pull/7271)
|
||||||
|
* Adds hazard queue by @AlexOn1ine in [#7295](https://github.com/rh-hideout/pokeemerald-expansion/pull/7295)
|
||||||
|
* Changes AccuracyCalcHelper into CanMoveSkipAccuracyCalc by @AlexOn1ine in [#7303](https://github.com/rh-hideout/pokeemerald-expansion/pull/7303)
|
||||||
|
* battle_interface: overhaul ability pop up by @mudskipper13 in [#7227](https://github.com/rh-hideout/pokeemerald-expansion/pull/7227)
|
||||||
|
- The layout of the ability pop up's image (`graphics/battle_interface/ability_pop_up.png`) has been changed.
|
||||||
|
* Bag refactor 2 by @cfmnephrite in [#7166](https://github.com/rh-hideout/pokeemerald-expansion/pull/7166)
|
||||||
|
* Replaces STATUS2 usage with volatiles in code by @cfmnephrite in [#7262](https://github.com/rh-hideout/pokeemerald-expansion/pull/7262)
|
||||||
|
- Replaced all references to STATUS2 in the code with volatiles (but left the old bitfield behind for compatibility with downstream users). The list of volatiles is in `include/constants/battle.h` and includes information such as an enum, a field name, type and max size, and whether or not the move is Baton Passable. Users can use VOLATILE_X with any function that previously took STATUS2_X in scripts, and can check/set volatiles in C with `gBattleMons[battler].volatiles.{field name}` syntax instead of checking a flag in a bitfield.
|
||||||
|
* Refactor battle environment by @fdeblasio in [#4891](https://github.com/rh-hideout/pokeemerald-expansion/pull/4891)
|
||||||
|
* Convert various to callnatives by @AlexOn1ine in [#7355](https://github.com/rh-hideout/pokeemerald-expansion/pull/7355)
|
||||||
|
* AI refactor for weather-setting, terrain-setting, Trick Room behaviors; doubles-focused by @surskitty in [#7319](https://github.com/rh-hideout/pokeemerald-expansion/pull/7319)
|
||||||
|
- AI is more likely to use Trick Room in double battles and Terrains in general.
|
||||||
|
* Convert Status4 to volatiles by @AlexOn1ine in [#7411](https://github.com/rh-hideout/pokeemerald-expansion/pull/7411)
|
||||||
|
* Split Sheer Force tests by gen instead of by four by @AlexOn1ine in [#7260](https://github.com/rh-hideout/pokeemerald-expansion/pull/7260)
|
||||||
|
* Modify move prediction to work in doubles by @AlexOn1ine in [#7087](https://github.com/rh-hideout/pokeemerald-expansion/pull/7087)
|
||||||
|
* Convert statuses3 to volatiles by @AlexOn1ine in [#7514](https://github.com/rh-hideout/pokeemerald-expansion/pull/7514)
|
||||||
|
* Added trainerBackPic to Trainer struct to de-couple trainer pic and trainer back pic defines by @grintoul1 in [#7425](https://github.com/rh-hideout/pokeemerald-expansion/pull/7425)
|
||||||
|
|
||||||
|
## 🧬 General 🧬
|
||||||
|
### Added
|
||||||
|
* New sprite compressor by @hedara90, @DizzyEggg Improved performance massively for the instruction decoding., @mrgriffin, SBird and @tertu-m who has done even more optimization and answered questions about the GBA hardware whenever I had them. and @rayrobdod for the better migration script. in [#5627](https://github.com/rh-hideout/pokeemerald-expansion/pull/5627)
|
||||||
|
- `LZDecompressVram` and `LZDecompressWram` has been deprecated. All calls do decompress LZ compressed data should be using the wrapper functions `DecompressDataWithHeaderVram` or `DecompressDataWithHeaderWram`.
|
||||||
|
- A new sprite compression format has been introduced. To use it, replace files with `.4bpp.lz` with `.4bpp.smol` or `.4bpp.fastSmol`.
|
||||||
|
- `.smol` is a compression format utilizing entropy encoding in the form of tabled Asymmetric Numeral Systems (tANS) and a modified LZ style RLE/Dictionary encoding scheme specialized for the sprites used in Pokemon games. This is approximately 25% smaller than the default LZ77 compression.
|
||||||
|
- `.fastSmol` skips the entropy encoding and is therefore slightly larger than the default LZ77 compression, but decoding sprites is faster than the default LZ77 compression.
|
||||||
|
- `.smolTM` is a compression scheme for tilemaps.
|
||||||
|
- Might have unexpected behavior if user introduced decompression during hardware interrupts.
|
||||||
|
- Has a migration script that handles all files under `src/`, `migration_scripts/1.12/convert_compressed_files.py`.
|
||||||
|
* Adds FRLG asserts to Alloc/Free by @cawtds in [#7025](https://github.com/rh-hideout/pokeemerald-expansion/pull/7025)
|
||||||
|
* Debug parties and battles by @SBird1337 in [#6884](https://github.com/rh-hideout/pokeemerald-expansion/pull/6884)
|
||||||
|
- Adds options to set debug parties and battles using the debug menu
|
||||||
|
* Added naive line break by @hedara90 in [#7076](https://github.com/rh-hideout/pokeemerald-expansion/pull/7076)
|
||||||
|
* Disable unowned evo methods by @Bolt-Strike in [#7103](https://github.com/rh-hideout/pokeemerald-expansion/pull/7103)
|
||||||
|
* lto support by @DizzyEggg in [#7182](https://github.com/rh-hideout/pokeemerald-expansion/pull/7182)
|
||||||
|
* Improve trainer back pic-related data and code (+ smol documentation) by @mudskipper13 in [#6821](https://github.com/rh-hideout/pokeemerald-expansion/pull/6821)
|
||||||
|
* Add Set Hidden Nature option to the debug menu by @AlexOn1ine in [#7281](https://github.com/rh-hideout/pokeemerald-expansion/pull/7281)
|
||||||
|
* Instant Win option in Battle Debug by @AlexOn1ine in [#7333](https://github.com/rh-hideout/pokeemerald-expansion/pull/7333)
|
||||||
|
* `trainerproc` copy other trainer party by @hedara90 in [#7251](https://github.com/rh-hideout/pokeemerald-expansion/pull/7251)
|
||||||
|
- Adds the `Copy Pool` command to `trainerproc` which copies the party/pool from another trainer.
|
||||||
|
* Show chosen move in the battle debug menu by @AlexOn1ine in [#7382](https://github.com/rh-hideout/pokeemerald-expansion/pull/7382)
|
||||||
|
* Rock climb by ghoulslash by @pokesidv in [#7432](https://github.com/rh-hideout/pokeemerald-expansion/pull/7432)
|
||||||
|
- Added rock climb field effect
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
* Restore git history check by @ravepossum in [#7463](https://github.com/rh-hideout/pokeemerald-expansion/pull/7463)
|
||||||
|
* Moved summary screen nature colors to summary_screen.h by @RubyRaven6 in [#7560](https://github.com/rh-hideout/pokeemerald-expansion/pull/7560)
|
||||||
|
* Added comment in event.inc for simple menus in dynmultichoice by @RubyRaven6 in [#7568](https://github.com/rh-hideout/pokeemerald-expansion/pull/7568)
|
||||||
|
* Changed default print level for DebugPrintf for mGBA to MGBA_LOG_WARN by @hedara90 in [#7567](https://github.com/rh-hideout/pokeemerald-expansion/pull/7567)
|
||||||
|
* Fixed Teleport's description not being updated based on `B_TELEPORT_BEHAVIOR` by @AsparagusEduardo in [#7580](https://github.com/rh-hideout/pokeemerald-expansion/pull/7580)
|
||||||
|
* Minor Clean up in battle_ai_main.c by @AlexOn1ine in [#7551](https://github.com/rh-hideout/pokeemerald-expansion/pull/7551)
|
||||||
|
* Refactor field moves by @cawtds in [#6660](https://github.com/rh-hideout/pokeemerald-expansion/pull/6660)
|
||||||
|
* Replace all usages of lz compression with smol by @hedara90 in [#7032](https://github.com/rh-hideout/pokeemerald-expansion/pull/7032)
|
||||||
|
* `BtlController_EmitTwoReturnValues` cleanup by @AsparagusEduardo in [#6855](https://github.com/rh-hideout/pokeemerald-expansion/pull/6855)
|
||||||
|
* Put the gen 1 compression tests behind a config by @hedara90 in [#7033](https://github.com/rh-hideout/pokeemerald-expansion/pull/7033)
|
||||||
|
* Converts a bunch of defines to enums by @Bassoonian in [#7041](https://github.com/rh-hideout/pokeemerald-expansion/pull/7041)
|
||||||
|
* chore: remove unused section from credits by @Emiliasky in [#7085](https://github.com/rh-hideout/pokeemerald-expansion/pull/7085)
|
||||||
|
* Simplify white out messages by @kittenchilly in [#6961](https://github.com/rh-hideout/pokeemerald-expansion/pull/6961)
|
||||||
|
* Improve music/se macros and fix names by @cawtds in [#7030](https://github.com/rh-hideout/pokeemerald-expansion/pull/7030)
|
||||||
|
* Bag refactor (groundwork for expansion) by @cfmnephrite in [#7018](https://github.com/rh-hideout/pokeemerald-expansion/pull/7018)
|
||||||
|
- If you're using @ghoulslash's bag sort branch, this PR will break it
|
||||||
|
* Converts more defines to enums and name unnamed enums by @Bassoonian in [#7071](https://github.com/rh-hideout/pokeemerald-expansion/pull/7071)
|
||||||
|
* Add config options for removing bard phoneme audio to save ROM space by @poetahto in [#7155](https://github.com/rh-hideout/pokeemerald-expansion/pull/7155)
|
||||||
|
* Fix debug text order by @hedara90 in [#7149](https://github.com/rh-hideout/pokeemerald-expansion/pull/7149)
|
||||||
|
* More battle controller function consolidation. by @AsparagusEduardo in [#6877](https://github.com/rh-hideout/pokeemerald-expansion/pull/6877)
|
||||||
|
* Easier expandability of debug menu by @AsparagusEduardo in [#6910](https://github.com/rh-hideout/pokeemerald-expansion/pull/6910)
|
||||||
|
* Update .gitignore to add heal locations by @Bassoonian in [#7050](https://github.com/rh-hideout/pokeemerald-expansion/pull/7050)
|
||||||
|
* Add 'Give Decoration' function to overworld debug menu by @rayrobdod in [#7219](https://github.com/rh-hideout/pokeemerald-expansion/pull/7219)
|
||||||
|
* Changes pre-proc to a normal if for Item Desc Header by @AlexOn1ine in [#7231](https://github.com/rh-hideout/pokeemerald-expansion/pull/7231)
|
||||||
|
* Use compound strings in battle debug menu by @AsparagusEduardo in [#7282](https://github.com/rh-hideout/pokeemerald-expansion/pull/7282)
|
||||||
|
* Remove competitive syntax config by @hedara90 in [#7154](https://github.com/rh-hideout/pokeemerald-expansion/pull/7154)
|
||||||
|
- This change can be reverted by doing `git revert 14dbbf63d454073dbb198b941cc3566168c89f11`.
|
||||||
|
* Turn `OW_FRLG_WHITEOUT` into `OW_WHITEOUT_CUTSCENE` and make it generational by @kittenchilly in [#6962](https://github.com/rh-hideout/pokeemerald-expansion/pull/6962)
|
||||||
|
* Add `Macro` key to trainerproc by @hedara90 in [#7157](https://github.com/rh-hideout/pokeemerald-expansion/pull/7157)
|
||||||
|
* preproc: Support __attribute__ in enums by @mrgriffin in [#7344](https://github.com/rh-hideout/pokeemerald-expansion/pull/7344)
|
||||||
|
* Enum conversion for `enum MoveEffects` and `enum BattleMoveEffects` by @hedara90 in [#7366](https://github.com/rh-hideout/pokeemerald-expansion/pull/7366)
|
||||||
|
- This enables `-Wenum-conversion`, additional compilation errors can occur
|
||||||
|
* Get/SetMonData optimisation by @cfmnephrite in [#7313](https://github.com/rh-hideout/pokeemerald-expansion/pull/7313)
|
||||||
|
* Bag refactor3 + Ghoulslash's sorting feature port by @cfmnephrite in [#7330](https://github.com/rh-hideout/pokeemerald-expansion/pull/7330)
|
||||||
|
* Replace all usages of rl compression with smol by @rayrobdod in [#7458](https://github.com/rh-hideout/pokeemerald-expansion/pull/7458)
|
||||||
|
* Bag sorting cleanup by @mrgriffin in [#7489](https://github.com/rh-hideout/pokeemerald-expansion/pull/7489)
|
||||||
|
* Adds ghouls Rock Climb git history by @AlexOn1ine in [#7493](https://github.com/rh-hideout/pokeemerald-expansion/pull/7493)
|
||||||
|
* Changed item name/pluralName to a compound string by @cfmnephrite in [#7359](https://github.com/rh-hideout/pokeemerald-expansion/pull/7359)
|
||||||
|
* Added trainerBackPic to Trainer struct to de-couple trainer pic and trainer back pic defines by @grintoul1 in [#7425](https://github.com/rh-hideout/pokeemerald-expansion/pull/7425)
|
||||||
|
* Suppress trainerproc compile warning for unused func by @AlexOn1ine in [#7592](https://github.com/rh-hideout/pokeemerald-expansion/pull/7592)
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
* Fix .smol compression in debug builds by @hedara90 in [#7090](https://github.com/rh-hideout/pokeemerald-expansion/pull/7090)
|
||||||
|
* Improve smol compressor by @hedara90 in [#7073](https://github.com/rh-hideout/pokeemerald-expansion/pull/7073)
|
||||||
|
* Increased heap by 768 bytes by @hedara90 in [#7097](https://github.com/rh-hideout/pokeemerald-expansion/pull/7097)
|
||||||
|
* Fix healthbox when blending effects happen by @AsparagusEduardo in [#7203](https://github.com/rh-hideout/pokeemerald-expansion/pull/7203)
|
||||||
|
* Fixed Fake RTC debug menu by @AsparagusEduardo in [#7218](https://github.com/rh-hideout/pokeemerald-expansion/pull/7218)
|
||||||
|
* Added missing braces by @cfmnephrite in [#7288](https://github.com/rh-hideout/pokeemerald-expansion/pull/7288)
|
||||||
|
* Fixed Flag Vars menu keeping artifacts from bag menu + cleanup by @AsparagusEduardo in [#7226](https://github.com/rh-hideout/pokeemerald-expansion/pull/7226)
|
||||||
|
* Fix HGSS dex running out of heap by @hedara90 in [#7317](https://github.com/rh-hideout/pokeemerald-expansion/pull/7317)
|
||||||
|
* battle intro: fix issues with follower slide-in and wild shiny mon by @mudskipper13 in [#7325](https://github.com/rh-hideout/pokeemerald-expansion/pull/7325)
|
||||||
|
* Fix sorting bag by type by @mrgriffin in [#7488](https://github.com/rh-hideout/pokeemerald-expansion/pull/7488)
|
||||||
|
* Hacky support for enums in C asm statements by @mrgriffin in [#7494](https://github.com/rh-hideout/pokeemerald-expansion/pull/7494)
|
||||||
|
* Fixed compile issue in gcc 11 by @AsparagusEduardo in [#7579](https://github.com/rh-hideout/pokeemerald-expansion/pull/7579)
|
||||||
|
* Fix overlap between spin evolution and script evolution by @FosterProgramming in [#7593](https://github.com/rh-hideout/pokeemerald-expansion/pull/7593)
|
||||||
|
|
||||||
|
## 🗺️ Overworld 🗺️
|
||||||
|
### Added
|
||||||
|
* Added createfollowernpc macro to make a new follower from a gfx id by @Bivurnum in [#7196](https://github.com/rh-hideout/pokeemerald-expansion/pull/7196)
|
||||||
|
- Follower NPCs can now be created without using an existing NPC, using the `createfollowernpc` macro.
|
||||||
|
* feat: separate water and rock smash encounter rate checks by @khbsd in [#7293](https://github.com/rh-hideout/pokeemerald-expansion/pull/7293)
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
* fix: remove unused wild_encounters.json.txt jinja file by @khbsd in [#7581](https://github.com/rh-hideout/pokeemerald-expansion/pull/7581)
|
||||||
|
* added Ash Greninja overworld sprites by @wiz1989 in [#6976](https://github.com/rh-hideout/pokeemerald-expansion/pull/6976)
|
||||||
|
* Update FRLG whiteouts to new pret system by @Bassoonian in [#7040](https://github.com/rh-hideout/pokeemerald-expansion/pull/7040)
|
||||||
|
- Make sure to migrate your changes to the now deleted `heal_locations_pkm_center.h` to the json file.
|
||||||
|
* Use CanAbilityAbsorbMove in GetOverworldTypeEffectiveness by @AlexOn1ine in [#7115](https://github.com/rh-hideout/pokeemerald-expansion/pull/7115)
|
||||||
|
* Add config options for removing bard phoneme audio to save ROM space by @poetahto in [#7155](https://github.com/rh-hideout/pokeemerald-expansion/pull/7155)
|
||||||
|
* Add debug options for follower NPCs by @Bivurnum in [#7215](https://github.com/rh-hideout/pokeemerald-expansion/pull/7215)
|
||||||
|
* Better system for Follower NPC running frames by @Bivurnum in [#7222](https://github.com/rh-hideout/pokeemerald-expansion/pull/7222)
|
||||||
|
* Update follower NPC tutorial doc for createfollowernpc macro by @Bivurnum in [#7230](https://github.com/rh-hideout/pokeemerald-expansion/pull/7230)
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
* Bug fix: add handling for forced movements into/after ledge jumps with follower NPCs by @Bivurnum in [#7055](https://github.com/rh-hideout/pokeemerald-expansion/pull/7055)
|
||||||
|
* Fixed compile issue `OW_TIMES_OF_DAY` is `GEN_3` by @AsparagusEduardo in [#7499](https://github.com/rh-hideout/pokeemerald-expansion/pull/7499)
|
||||||
|
* Remove shadow and hide follower on stair warp by @cornixsenex in [#7368](https://github.com/rh-hideout/pokeemerald-expansion/pull/7368)
|
||||||
|
* Fix Form Change Item Task Data and Clean Up Field Use Funcs by @ravepossum in [#7535](https://github.com/rh-hideout/pokeemerald-expansion/pull/7535)
|
||||||
|
* Fix Vs Seeker Trainer Battle script issue by @pkmnsnfrn in [#7615](https://github.com/rh-hideout/pokeemerald-expansion/pull/7615)
|
||||||
|
* Fix follower compression by @hedara90 in [#7038](https://github.com/rh-hideout/pokeemerald-expansion/pull/7038)
|
||||||
|
* Changing P_ONLY_OBTAINABLE_SHINIES to truly be Only Obtainable Shinies by @surskitty in [#7275](https://github.com/rh-hideout/pokeemerald-expansion/pull/7275)
|
||||||
|
|
||||||
|
## 🐉 Pokémon 🐉
|
||||||
|
### Added
|
||||||
|
* Add P_ASK_MOVE_CONFIRMATION by @pkmnsnfrn in [#7132](https://github.com/rh-hideout/pokeemerald-expansion/pull/7132)
|
||||||
|
- This will change the behavior of the game for players, as a new default is being set.
|
||||||
|
* Added `CRY_MODE_DYNAMAX` by @AsparagusEduardo in [#6933](https://github.com/rh-hideout/pokeemerald-expansion/pull/6933)
|
||||||
|
* Wild Pokémon animate after breaking out of Poké Ball by @LinathanZel in [#7339](https://github.com/rh-hideout/pokeemerald-expansion/pull/7339)
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
* Add dedicated getter functions for Pokémon types and abilities by @Bassoonian in [#7043](https://github.com/rh-hideout/pokeemerald-expansion/pull/7043)
|
||||||
|
* added Ash Greninja overworld sprites by @wiz1989 in [#6976](https://github.com/rh-hideout/pokeemerald-expansion/pull/6976)
|
||||||
|
* Get/SetMonData optimisation by @cfmnephrite in [#7313](https://github.com/rh-hideout/pokeemerald-expansion/pull/7313)
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
* fixes #7129: 'add to full party' feature in the safari zone by @fakuzatsu in [#7147](https://github.com/rh-hideout/pokeemerald-expansion/pull/7147)
|
||||||
|
* Fix substruct offsets from #7313 by @mrgriffin in [#7431](https://github.com/rh-hideout/pokeemerald-expansion/pull/7431)
|
||||||
|
* Fixes refusing to replace a move on evolution causing a softlock by @PhallenTree in [#7585](https://github.com/rh-hideout/pokeemerald-expansion/pull/7585)
|
||||||
|
|
||||||
|
## ⚔️ Battle General ⚔️
|
||||||
|
### Added
|
||||||
|
* Add Gen 2 Moonlight, Morning Sun, Synthesis configuration by @i0brendan0 in [#7209](https://github.com/rh-hideout/pokeemerald-expansion/pull/7209)
|
||||||
|
* Add a heal animation to Hospitality recovery by @AlexOn1ine in [#7426](https://github.com/rh-hideout/pokeemerald-expansion/pull/7426)
|
||||||
|
* Updated Dream Eater/Liquid Ooze's interaction to Gen 5 standards by @AsparagusEduardo in [#7528](https://github.com/rh-hideout/pokeemerald-expansion/pull/7528)
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
* Remove unused function by @AlexOn1ine in [#7617](https://github.com/rh-hideout/pokeemerald-expansion/pull/7617)
|
||||||
|
* Clean up battlescript calls with func BattleScriptCall by @AlexOn1ine in [#6873](https://github.com/rh-hideout/pokeemerald-expansion/pull/6873)
|
||||||
|
* Refactors Final Gambit + Tests by @AlexOn1ine in [#7005](https://github.com/rh-hideout/pokeemerald-expansion/pull/7005)
|
||||||
|
* `GetBattlerMon` cleanup by @AsparagusEduardo in [#6967](https://github.com/rh-hideout/pokeemerald-expansion/pull/6967)
|
||||||
|
* Change GetZMaxMoveAgainstProtectionModifier to prevent regressions by @AlexOn1ine in [#7047](https://github.com/rh-hideout/pokeemerald-expansion/pull/7047)
|
||||||
|
* Combines Super Fang and Guardian of Alola effects by @AlexOn1ine in [#7048](https://github.com/rh-hideout/pokeemerald-expansion/pull/7048)
|
||||||
|
* Remove more instances of hard-coded Move IDs by @AsparagusEduardo in [#7056](https://github.com/rh-hideout/pokeemerald-expansion/pull/7056)
|
||||||
|
- Added `EFFECT_SHEER_COLD` to parametrize Sheer Cold's interactions with Ice types
|
||||||
|
* Deprecate sStatusFlagsForMoveEffects by @AlexOn1ine in [#7063](https://github.com/rh-hideout/pokeemerald-expansion/pull/7063)
|
||||||
|
* Removes duplicate AI ability func by @AlexOn1ine in [#7045](https://github.com/rh-hideout/pokeemerald-expansion/pull/7045)
|
||||||
|
* Deprecate absent member from battlerState by @AlexOn1ine in [#7091](https://github.com/rh-hideout/pokeemerald-expansion/pull/7091)
|
||||||
|
* Refactor damage calculations aruguments by using a struct context by @AlexOn1ine in [#7108](https://github.com/rh-hideout/pokeemerald-expansion/pull/7108)
|
||||||
|
* Add damage context to effectiveness multiplier by @AlexOn1ine in [#7111](https://github.com/rh-hideout/pokeemerald-expansion/pull/7111)
|
||||||
|
* Decouple Status set by ability from SetMoveEffect by @AlexOn1ine in [#7125](https://github.com/rh-hideout/pokeemerald-expansion/pull/7125)
|
||||||
|
* Removed redundant Damp check by @AsparagusEduardo in [#7134](https://github.com/rh-hideout/pokeemerald-expansion/pull/7134)
|
||||||
|
* Converted Relic Song into a proper form change by @AsparagusEduardo in [#7139](https://github.com/rh-hideout/pokeemerald-expansion/pull/7139)
|
||||||
|
- Added `FORM_CHANGE_BATTLE_AFTER_MOVE` to parametrize Relic Song's form change
|
||||||
|
* Removed Mind Blown effect in favor of move flag by @AsparagusEduardo in [#7138](https://github.com/rh-hideout/pokeemerald-expansion/pull/7138)
|
||||||
|
* Volatile status refactoring by @cfmnephrite in [#6983](https://github.com/rh-hideout/pokeemerald-expansion/pull/6983)
|
||||||
|
* Repurposes IsMagicGuardProtected into a general function by @AlexOn1ine in [#7114](https://github.com/rh-hideout/pokeemerald-expansion/pull/7114)
|
||||||
|
* Stat Change (Animation) Refactor by @PhallenTree in [#7144](https://github.com/rh-hideout/pokeemerald-expansion/pull/7144)
|
||||||
|
-`setgraphicalstatchangevalues` and `playstatchangeanimation` have been removed and now Stat Change Animations are handled in `statbuffchange`.
|
||||||
|
- To update your custom battle scripts:
|
||||||
|
`setgraphicalstatchangevalues` is often accompanied by `playanimation X, B_ANIM_STATS_CHANGE`. When I refer to deleting `setgraphicalstatchangevalues` below, that command should also be deleted.
|
||||||
|
1. If `statbuffchange` is before `setgraphicalstatchangevalues`/`playstatchangeanimation` and there is something in between them (for example, `attackanimation` and `waitanimation`), add the flag `STAT_CHANGE_ONLY_CHECKING` and replace the command (`setgraphicalstatchangevalues`/`playstatchangeanimation`) with a copy of the original `statbuffchange`.
|
||||||
|
2. If `statbuffchange` is after `setgraphicalstatchangevalues`/`playstatchangeanimation` or there is nothing in between, you should delete those commands (`setgraphicalstatchangevalues`/`playstatchangeanimation`) and no further changes other than those in _3._ should be required.
|
||||||
|
3. If `playstatchangeanimation` had bits assigned to them (`BIT_ATK | BIT_SPATK`, for example), add ", " followed by those bits to the first `statbuffchange`; for the following `statbuffchange`s, remove stats that have already been increased/decreased.
|
||||||
|
* Use `argument.type` for `EFFECT_SOAK` by @AsparagusEduardo in [#7141](https://github.com/rh-hideout/pokeemerald-expansion/pull/7141)
|
||||||
|
* Untangle `InitBtlControllers` functions by @AsparagusEduardo in [#6748](https://github.com/rh-hideout/pokeemerald-expansion/pull/6748)
|
||||||
|
* Increase party action limit by @cawtds in [#7119](https://github.com/rh-hideout/pokeemerald-expansion/pull/7119)
|
||||||
|
* Adds Gen5+ Encore config by @AlexOn1ine in [#7051](https://github.com/rh-hideout/pokeemerald-expansion/pull/7051)
|
||||||
|
* Attackcanceller clean up by @AlexOn1ine in [#7210](https://github.com/rh-hideout/pokeemerald-expansion/pull/7210)
|
||||||
|
* Remove redundant move result flag checks by @AlexOn1ine in [#7223](https://github.com/rh-hideout/pokeemerald-expansion/pull/7223)
|
||||||
|
* Use dedicated functions for Mud/Water Sport by @AlexOn1ine in [#7248](https://github.com/rh-hideout/pokeemerald-expansion/pull/7248)
|
||||||
|
* Script clean up for Flame Burst and Costar by @AlexOn1ine in [#7264](https://github.com/rh-hideout/pokeemerald-expansion/pull/7264)
|
||||||
|
* Renaming STATUS1_REFRESH and adding more constants for common STATUS1 checks. by @surskitty in [#7284](https://github.com/rh-hideout/pokeemerald-expansion/pull/7284)
|
||||||
|
* Refactor move Synchronise by @AlexOn1ine in [#7271](https://github.com/rh-hideout/pokeemerald-expansion/pull/7271)
|
||||||
|
* Adds hazard queue by @AlexOn1ine in [#7295](https://github.com/rh-hideout/pokeemerald-expansion/pull/7295)
|
||||||
|
* Removed all instances of .chance = 100, SHEER_FORCE_NO_BOOST by @cfmnephrite in [#7300](https://github.com/rh-hideout/pokeemerald-expansion/pull/7300)
|
||||||
|
* Changes AccuracyCalcHelper into CanMoveSkipAccuracyCalc by @AlexOn1ine in [#7303](https://github.com/rh-hideout/pokeemerald-expansion/pull/7303)
|
||||||
|
* Replaces STATUS2 usage with volatiles in code by @cfmnephrite in [#7262](https://github.com/rh-hideout/pokeemerald-expansion/pull/7262)
|
||||||
|
- Replaced all references to STATUS2 in the code with volatiles (but left the old bitfield behind for compatibility with downstream users). The list of volatiles is in `include/constants/battle.h` and includes information such as an enum, a field name, type and max size, and whether or not the move is Baton Passable. Users can use VOLATILE_X with any function that previously took STATUS2_X in scripts, and can check/set volatiles in C with `gBattleMons[battler].volatiles.{field name}` syntax instead of checking a flag in a bitfield.
|
||||||
|
* Refactor battle environment by @fdeblasio in [#4891](https://github.com/rh-hideout/pokeemerald-expansion/pull/4891)
|
||||||
|
* Convert various to callnatives by @AlexOn1ine in [#7355](https://github.com/rh-hideout/pokeemerald-expansion/pull/7355)
|
||||||
|
* Remove leftover code by @AlexOn1ine in [#7397](https://github.com/rh-hideout/pokeemerald-expansion/pull/7397)
|
||||||
|
* Moved some fields to BattlerState/PartyState by @AsparagusEduardo in [#7409](https://github.com/rh-hideout/pokeemerald-expansion/pull/7409)
|
||||||
|
* Additional effects tweak by @cfmnephrite in [#7392](https://github.com/rh-hideout/pokeemerald-expansion/pull/7392)
|
||||||
|
* Clean up noResultString by @AlexOn1ine in [#7408](https://github.com/rh-hideout/pokeemerald-expansion/pull/7408)
|
||||||
|
* Convert Status4 to volatiles by @AlexOn1ine in [#7411](https://github.com/rh-hideout/pokeemerald-expansion/pull/7411)
|
||||||
|
* Convert statuses3 to volatiles by @AlexOn1ine in [#7514](https://github.com/rh-hideout/pokeemerald-expansion/pull/7514)
|
||||||
|
* Prevents a regression for custom abilties by @AlexOn1ine in [#7616](https://github.com/rh-hideout/pokeemerald-expansion/pull/7616)
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
* Fixes Magnet Rise when user is Rooted/Smacked Down by @PhallenTree in [#7449](https://github.com/rh-hideout/pokeemerald-expansion/pull/7449)
|
||||||
|
* Fixes Leech Seed recovery not applying behind Sub by @AlexOn1ine in [#7468](https://github.com/rh-hideout/pokeemerald-expansion/pull/7468)
|
||||||
|
* Fixes Round and Fusion moves doubling power from previous turn's move by @PhallenTree in [#7476](https://github.com/rh-hideout/pokeemerald-expansion/pull/7476)
|
||||||
|
* Fixes shadows and mon animations for transformed battlers by @AsparagusEduardo in [#7500](https://github.com/rh-hideout/pokeemerald-expansion/pull/7500)
|
||||||
|
* Fixes Life Orb still activating if move was absorbed by @AlexOn1ine in [#7521](https://github.com/rh-hideout/pokeemerald-expansion/pull/7521)
|
||||||
|
* Fix Mimicry Only Activating Once per Turn by @ghoulslash in [#7537](https://github.com/rh-hideout/pokeemerald-expansion/pull/7537)
|
||||||
|
* Fixes Knock Off still activating when there is no Item by @AlexOn1ine in [#7496](https://github.com/rh-hideout/pokeemerald-expansion/pull/7496)
|
||||||
|
* Fixed `B_PSYWAVE_DMG` by @AsparagusEduardo in [#7557](https://github.com/rh-hideout/pokeemerald-expansion/pull/7557)
|
||||||
|
* Fixes Counter / Mirror Coat / Metal Burst damage assignment by @AlexOn1ine in [#7538](https://github.com/rh-hideout/pokeemerald-expansion/pull/7538)
|
||||||
|
* Fix in-game partner battles always causing a whiteout by @ravepossum in [#7587](https://github.com/rh-hideout/pokeemerald-expansion/pull/7587)
|
||||||
|
* Fix B_ANIMATE_MON_AFTER_KO with a new counter by @hedara90 in [#7531](https://github.com/rh-hideout/pokeemerald-expansion/pull/7531)
|
||||||
|
* Fixes Rage Fist counter increment by @AlexOn1ine in [#7582](https://github.com/rh-hideout/pokeemerald-expansion/pull/7582)
|
||||||
|
* Fixes moveend_absorb hitmarker by @AlexOn1ine in [#7591](https://github.com/rh-hideout/pokeemerald-expansion/pull/7591)
|
||||||
|
* switchinabilities also runs ON_WEATHER and ON_TERRAIN by @ghoulslash in [#7612](https://github.com/rh-hideout/pokeemerald-expansion/pull/7612)
|
||||||
|
* Fixes Explosion behavior when 3 mons can endure hit by @AlexOn1ine in [#7594](https://github.com/rh-hideout/pokeemerald-expansion/pull/7594)
|
||||||
|
* Fixes octolock not ending after user switched out by @AlexOn1ine in [#7556](https://github.com/rh-hideout/pokeemerald-expansion/pull/7556)
|
||||||
|
* The original attacker wasn't restored for Doodle by @AlexOn1ine in [#7620](https://github.com/rh-hideout/pokeemerald-expansion/pull/7620)
|
||||||
|
* Restore X item friendship increase by @ravepossum in [#7583](https://github.com/rh-hideout/pokeemerald-expansion/pull/7583)
|
||||||
|
* Fixes Wonder Room interactions with Defense/Special Defense boosting effects by @PhallenTree in [#7626](https://github.com/rh-hideout/pokeemerald-expansion/pull/7626)
|
||||||
|
* Ally Switch attract battler swapping, test for leech seed by @ghoulslash in [#7634](https://github.com/rh-hideout/pokeemerald-expansion/pull/7634)
|
||||||
|
* Fixes Defiant/Competitive not resetting stat change animations and stat change related cleanup by @PhallenTree in [#7004](https://github.com/rh-hideout/pokeemerald-expansion/pull/7004)
|
||||||
|
* Use battler arguments for SetMoveEffect by @AlexOn1ine in [#7156](https://github.com/rh-hideout/pokeemerald-expansion/pull/7156)
|
||||||
|
* Fixes Booster Energy timing activation + Clean up by @AlexOn1ine in [#7175](https://github.com/rh-hideout/pokeemerald-expansion/pull/7175)
|
||||||
|
* Fixes Eject Pack not resolving correctly during switch in effects by @AlexOn1ine in [#7002](https://github.com/rh-hideout/pokeemerald-expansion/pull/7002)
|
||||||
|
* Adds Ability Shield activation message by @PhallenTree in [#7224](https://github.com/rh-hideout/pokeemerald-expansion/pull/7224)
|
||||||
|
* Fix incorrect type input by @hedara90 in [#7228](https://github.com/rh-hideout/pokeemerald-expansion/pull/7228)
|
||||||
|
* Set correct Instruction by @AlexOn1ine in [#7236](https://github.com/rh-hideout/pokeemerald-expansion/pull/7236)
|
||||||
|
* Fixes Life Dew playing anim when it is not supposed to + tests by @AlexOn1ine in [#7239](https://github.com/rh-hideout/pokeemerald-expansion/pull/7239)
|
||||||
|
* Fixes instances of battler mutation for abilities by @AlexOn1ine in [#7250](https://github.com/rh-hideout/pokeemerald-expansion/pull/7250)
|
||||||
|
* Fix Psych Up message and cleanup and don't allow switching to self in tests by @PhallenTree in [#7277](https://github.com/rh-hideout/pokeemerald-expansion/pull/7277)
|
||||||
|
* Fix incorrect status in beneficial ability Guts check by @grintoul1 in [#7285](https://github.com/rh-hideout/pokeemerald-expansion/pull/7285)
|
||||||
|
* battle_interface: overhaul ability pop up by @mudskipper13 in [#7227](https://github.com/rh-hideout/pokeemerald-expansion/pull/7227)
|
||||||
|
- The layout of the ability pop up's image (`graphics/battle_interface/ability_pop_up.png`) has been changed.
|
||||||
|
* Fixes Status overwrites and Effect Spore wrong func args by @AlexOn1ine in [#7340](https://github.com/rh-hideout/pokeemerald-expansion/pull/7340)
|
||||||
|
* Fixes various Choice lock issues by @AlexOn1ine in [#7383](https://github.com/rh-hideout/pokeemerald-expansion/pull/7383)
|
||||||
|
* Fixes draining moves recovering 1 HP when dealing 0 damage by @LinathanZel in [#7523](https://github.com/rh-hideout/pokeemerald-expansion/pull/7523)
|
||||||
|
|
||||||
|
## 🤹 Moves 🤹
|
||||||
|
### Changed
|
||||||
|
* New Attack Animations: 25w20a by @ShinyVolcarona in [#6886](https://github.com/rh-hideout/pokeemerald-expansion/pull/6886)
|
||||||
|
- Added move animations for multiple moves by @LinathanZel
|
||||||
|
- Dynamax Cannon, Behemoth Blade, Behemoth Bash, Eternabeam, Glaive Rush, Triple Dive, Doodle, Ruination, Collision Course, Electro Drift, Blazing Torque, Wicked Torque, Noxious Torque, Combat Torque, Magical Torque, Psyblade, Mighty Cleave, Supercell Slam
|
||||||
|
* Documented usage of `delay X` by @AsparagusEduardo in [#6951](https://github.com/rh-hideout/pokeemerald-expansion/pull/6951)
|
||||||
|
* Animation documentation by @AsparagusEduardo in [#7052](https://github.com/rh-hideout/pokeemerald-expansion/pull/7052)
|
||||||
|
* New and polished battle animations by @LinathanZel in [#7074](https://github.com/rh-hideout/pokeemerald-expansion/pull/7074)
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
* Clear gScanlineEffect to fix timeout in acid downpour animation by @FosterProgramming in [#7442](https://github.com/rh-hideout/pokeemerald-expansion/pull/7442)
|
||||||
|
* Fix terastallization anims flickering by @ravepossum in [#7613](https://github.com/rh-hideout/pokeemerald-expansion/pull/7613)
|
||||||
|
|
||||||
|
## 🧶 Items 🧶
|
||||||
|
### Changed
|
||||||
|
* Fix using town map as registered item by @ravepossum in [#7482](https://github.com/rh-hideout/pokeemerald-expansion/pull/7482)
|
||||||
|
* Compound strings for hold effect names by @AsparagusEduardo in [#7140](https://github.com/rh-hideout/pokeemerald-expansion/pull/7140)
|
||||||
|
* Untangled TMs and HMs from item ids by @cfmnephrite in [#7173](https://github.com/rh-hideout/pokeemerald-expansion/pull/7173)
|
||||||
|
* Bag refactor 2 by @cfmnephrite in [#7166](https://github.com/rh-hideout/pokeemerald-expansion/pull/7166)
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
* Implement using party menu items from field by @ravepossum in [#7481](https://github.com/rh-hideout/pokeemerald-expansion/pull/7481)
|
||||||
|
* Fixed TM and Berries disappearing when sorting by @AsparagusEduardo in [#7168](https://github.com/rh-hideout/pokeemerald-expansion/pull/7168)
|
||||||
|
* Fixed item swapping bug (#7428) by @cfmnephrite in [#7430](https://github.com/rh-hideout/pokeemerald-expansion/pull/7430)
|
||||||
|
* Fixes some Ability Shield interactions by @PhallenTree in [#7532](https://github.com/rh-hideout/pokeemerald-expansion/pull/7532)
|
||||||
|
* Fix tossing a stack of berries hiding following berries by @hedara90 in [#7571](https://github.com/rh-hideout/pokeemerald-expansion/pull/7571)
|
||||||
|
|
||||||
|
## 🤖 Battle AI 🤖
|
||||||
|
### Added
|
||||||
|
* AI: Add AI_SMART_TERA flag to make smarter decisions about when to terastalize. by @jfb1337 in [#6705](https://github.com/rh-hideout/pokeemerald-expansion/pull/6705)
|
||||||
|
- Only single battles are currently supported.
|
||||||
|
* Haze Boosting AI Followup by @Pawkkie in [#6966](https://github.com/rh-hideout/pokeemerald-expansion/pull/6966)
|
||||||
|
* Improved logic for Guard Split and Power Split. by @surskitty in [#7298](https://github.com/rh-hideout/pokeemerald-expansion/pull/7298)
|
||||||
|
* Add AI_FLAG_ASSUME_STAB by @Pawkkie in [#6797](https://github.com/rh-hideout/pokeemerald-expansion/pull/6797)
|
||||||
|
* AI checks the partner's moves for Flatter, Swagger, and Soak. by @surskitty in [#7306](https://github.com/rh-hideout/pokeemerald-expansion/pull/7306)
|
||||||
|
* AI uses After You to help set up Trick Room. by @surskitty in [#7310](https://github.com/rh-hideout/pokeemerald-expansion/pull/7310)
|
||||||
|
* AI assumes Magnitude / Present damage by @Pawkkie in [#7334](https://github.com/rh-hideout/pokeemerald-expansion/pull/7334)
|
||||||
|
* AI_FLAG_ASSUME_STATUS_MOVES -- AI flag to randomly know some of the player's status moves by @surskitty in [#7324](https://github.com/rh-hideout/pokeemerald-expansion/pull/7324)
|
||||||
|
* Improve AI's setup logic by @Pawkkie in [#7345](https://github.com/rh-hideout/pokeemerald-expansion/pull/7345)
|
||||||
|
* Improve AI's ShouldRecover by @Pawkkie in [#7342](https://github.com/rh-hideout/pokeemerald-expansion/pull/7342)
|
||||||
|
* Switch AI can see weather abilities of switchin candidates during damage calcs by @Pawkkie in [#7373](https://github.com/rh-hideout/pokeemerald-expansion/pull/7373)
|
||||||
|
* AI refactor for weather-setting, terrain-setting, Trick Room behaviors; doubles-focused by @surskitty in [#7319](https://github.com/rh-hideout/pokeemerald-expansion/pull/7319)
|
||||||
|
- AI is more likely to use Trick Room in double battles and Terrains in general.
|
||||||
|
* Improve AI type matchup calcs by @Pawkkie in [#7364](https://github.com/rh-hideout/pokeemerald-expansion/pull/7364)
|
||||||
|
* Multibattle Partner AI Flags and 2vs1 battler3 AI Flags fix by @grintoul1 in [#7378](https://github.com/rh-hideout/pokeemerald-expansion/pull/7378)
|
||||||
|
* Improve AI's Sucker Punch handling by @Pawkkie in [#7389](https://github.com/rh-hideout/pokeemerald-expansion/pull/7389)
|
||||||
|
* Improve AI's priority handling by @Pawkkie in [#7337](https://github.com/rh-hideout/pokeemerald-expansion/pull/7337)
|
||||||
|
* Fix dynamic move types in switching by @Pawkkie in [#7415](https://github.com/rh-hideout/pokeemerald-expansion/pull/7415)
|
||||||
|
* Adds AI_FLAG_ASSUMPTIONS as a constant for semi-omniscience by @surskitty in [#7435](https://github.com/rh-hideout/pokeemerald-expansion/pull/7435)
|
||||||
|
* AI_FLAG_ATTACKS_PARTNER with a config for bloodthirstiness by @surskitty in [#7401](https://github.com/rh-hideout/pokeemerald-expansion/pull/7401)
|
||||||
|
* Improved Guaranteed Flinch logic (fake out et al) by @surskitty in [#7501](https://github.com/rh-hideout/pokeemerald-expansion/pull/7501)
|
||||||
|
* AI uses Court Change. by @surskitty in [#7525](https://github.com/rh-hideout/pokeemerald-expansion/pull/7525)
|
||||||
|
* AI uses Tailwind. by @surskitty in [#7515](https://github.com/rh-hideout/pokeemerald-expansion/pull/7515)
|
||||||
|
* AI should not use Dark Void or Hyperspace Fury while wrong species by @surskitty in [#7540](https://github.com/rh-hideout/pokeemerald-expansion/pull/7540)
|
||||||
|
* AI uses Rototiller. by @surskitty in [#7542](https://github.com/rh-hideout/pokeemerald-expansion/pull/7542)
|
||||||
|
* Helping Hand logic by @surskitty in [#7504](https://github.com/rh-hideout/pokeemerald-expansion/pull/7504)
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
* Macro-for-AI-Flag-definitions by @grintoul1 in [#7471](https://github.com/rh-hideout/pokeemerald-expansion/pull/7471)
|
||||||
|
* Remove redundancy for ShouldLowerStat functions by @AlexOn1ine in [#6577](https://github.com/rh-hideout/pokeemerald-expansion/pull/6577)
|
||||||
|
* Expanding and Refactoring Skill Swap and other ability-changing moves by @surskitty in [#7238](https://github.com/rh-hideout/pokeemerald-expansion/pull/7238)
|
||||||
|
* Changes AccuracyCalcHelper into CanMoveSkipAccuracyCalc by @AlexOn1ine in [#7303](https://github.com/rh-hideout/pokeemerald-expansion/pull/7303)
|
||||||
|
* AI Tests + accompanying bugfixes for Skill Swap, Worry Seed, weather setting in double battles, and Discharging into an ally's lightningrod by @surskitty in [#7297](https://github.com/rh-hideout/pokeemerald-expansion/pull/7297)
|
||||||
|
* Fix AI resisted move scoring by @Pawkkie in [#7350](https://github.com/rh-hideout/pokeemerald-expansion/pull/7350)
|
||||||
|
* Fiddling with CanLowerStat. by @surskitty in [#7510](https://github.com/rh-hideout/pokeemerald-expansion/pull/7510)
|
||||||
|
* Improved hazards logic and Mycelium Might ignores ability checks by @surskitty in [#7509](https://github.com/rh-hideout/pokeemerald-expansion/pull/7509)
|
||||||
|
* AI handling for similar utility moves by @surskitty in [#7513](https://github.com/rh-hideout/pokeemerald-expansion/pull/7513)
|
||||||
|
* Modify move prediction to work in doubles by @AlexOn1ine in [#7087](https://github.com/rh-hideout/pokeemerald-expansion/pull/7087)
|
||||||
|
* Uncommenting out No Retreat, Clangorous Soul, and Extreme Evoboost from CheckBadMove by @surskitty in [#7541](https://github.com/rh-hideout/pokeemerald-expansion/pull/7541)
|
||||||
|
* AI Tailwind singles fix correction. by @surskitty in [#7543](https://github.com/rh-hideout/pokeemerald-expansion/pull/7543)
|
||||||
|
* Remove funcResult from AiThinkingStruct by @Pawkkie in [#7545](https://github.com/rh-hideout/pokeemerald-expansion/pull/7545)
|
||||||
|
* AI handling for Autotomize. by @surskitty in [#7550](https://github.com/rh-hideout/pokeemerald-expansion/pull/7550)
|
||||||
|
* AI uses Stuff Cheeks; treating it simply as a def +2 move for now. by @surskitty in [#7554](https://github.com/rh-hideout/pokeemerald-expansion/pull/7554)
|
||||||
|
* Slight Purify adjustment for targeting ally; test that AI can use Purify. by @surskitty in [#7553](https://github.com/rh-hideout/pokeemerald-expansion/pull/7553)
|
||||||
|
* AI handling for Howl. by @surskitty in [#7549](https://github.com/rh-hideout/pokeemerald-expansion/pull/7549)
|
||||||
|
* Test that AI uses Dragon Cheer. by @surskitty in [#7552](https://github.com/rh-hideout/pokeemerald-expansion/pull/7552)
|
||||||
|
* Tests to see that the AI uses moves. by @surskitty in [#7555](https://github.com/rh-hideout/pokeemerald-expansion/pull/7555)
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
* Incorrect call in Rest by @surskitty in [#7569](https://github.com/rh-hideout/pokeemerald-expansion/pull/7569)
|
||||||
|
* Fix duplicate switch in after faint by @AlexOn1ine in [#7600](https://github.com/rh-hideout/pokeemerald-expansion/pull/7600)
|
||||||
|
* Feature/ai/wide guard quick guard singles by @Emiliasky in [#7086](https://github.com/rh-hideout/pokeemerald-expansion/pull/7086)
|
||||||
|
* Add missing break by @Pawkkie in [#7356](https://github.com/rh-hideout/pokeemerald-expansion/pull/7356)
|
||||||
|
* fixed-damage-move-ai-calc-fix by @grintoul1 in [#7385](https://github.com/rh-hideout/pokeemerald-expansion/pull/7385)
|
||||||
|
* Avoid doubling up on status moves in double battles. by @surskitty in [#7452](https://github.com/rh-hideout/pokeemerald-expansion/pull/7452)
|
||||||
|
* Fix doubles switch AI to use new type matchup system by @Pawkkie in [#7495](https://github.com/rh-hideout/pokeemerald-expansion/pull/7495)
|
||||||
|
* Fix Bad Odds not seeing damage properly by @Pawkkie in [#7492](https://github.com/rh-hideout/pokeemerald-expansion/pull/7492)
|
||||||
|
* Fix GetSwitchinHitsToKO one shot heal calcs by @Pawkkie in [#7502](https://github.com/rh-hideout/pokeemerald-expansion/pull/7502)
|
||||||
|
* Fix AI's KO evaluation getting messed up by priority by @Pawkkie in [#7533](https://github.com/rh-hideout/pokeemerald-expansion/pull/7533)
|
||||||
|
* Fixing Refresh AI scoring by @surskitty in [#7539](https://github.com/rh-hideout/pokeemerald-expansion/pull/7539)
|
||||||
|
* Fix switch AI not seeing its own move PP by @Pawkkie in [#7578](https://github.com/rh-hideout/pokeemerald-expansion/pull/7578)
|
||||||
|
* Fix wrong battler argument in `GetBattleMovePriority` call by @Pawkkie in [#7576](https://github.com/rh-hideout/pokeemerald-expansion/pull/7576)
|
||||||
|
* Restore AI: Basic Trainer to PARTNER_STEVEN by @grintoul1 in [#7586](https://github.com/rh-hideout/pokeemerald-expansion/pull/7586)
|
||||||
|
|
||||||
|
## 🧹 Other Cleanup 🧹
|
||||||
|
* Macro-for-AI-Flag-definitions by @grintoul1 in [#7471](https://github.com/rh-hideout/pokeemerald-expansion/pull/7471)
|
||||||
|
* Moved summary screen nature colors to summary_screen.h by @RubyRaven6 in [#7560](https://github.com/rh-hideout/pokeemerald-expansion/pull/7560)
|
||||||
|
* fix: remove unused wild_encounters.json.txt jinja file by @khbsd in [#7581](https://github.com/rh-hideout/pokeemerald-expansion/pull/7581)
|
||||||
|
* Fix Form Change Item Task Data and Clean Up Field Use Funcs by @ravepossum in [#7535](https://github.com/rh-hideout/pokeemerald-expansion/pull/7535)
|
||||||
|
* Fixed Teleport's description not being updated based on `B_TELEPORT_BEHAVIOR` by @AsparagusEduardo in [#7580](https://github.com/rh-hideout/pokeemerald-expansion/pull/7580)
|
||||||
|
* Fixed typo in test name by @hedara90 in [#7610](https://github.com/rh-hideout/pokeemerald-expansion/pull/7610)
|
||||||
|
* Minor Clean up in battle_ai_main.c by @AlexOn1ine in [#7551](https://github.com/rh-hideout/pokeemerald-expansion/pull/7551)
|
||||||
|
* Remove unused function by @AlexOn1ine in [#7617](https://github.com/rh-hideout/pokeemerald-expansion/pull/7617)
|
||||||
|
* Fix Vs Seeker Trainer Battle script issue by @pkmnsnfrn in [#7615](https://github.com/rh-hideout/pokeemerald-expansion/pull/7615)
|
||||||
|
* Clean up battlescript calls with func BattleScriptCall by @AlexOn1ine in [#6873](https://github.com/rh-hideout/pokeemerald-expansion/pull/6873)
|
||||||
|
* Replace all usages of lz compression with smol by @hedara90 in [#7032](https://github.com/rh-hideout/pokeemerald-expansion/pull/7032)
|
||||||
|
* `BtlController_EmitTwoReturnValues` cleanup by @AsparagusEduardo in [#6855](https://github.com/rh-hideout/pokeemerald-expansion/pull/6855)
|
||||||
|
* `GetBattlerMon` cleanup by @AsparagusEduardo in [#6967](https://github.com/rh-hideout/pokeemerald-expansion/pull/6967)
|
||||||
|
* Converts a bunch of defines to enums by @Bassoonian in [#7041](https://github.com/rh-hideout/pokeemerald-expansion/pull/7041)
|
||||||
|
* Change GetZMaxMoveAgainstProtectionModifier to prevent regressions by @AlexOn1ine in [#7047](https://github.com/rh-hideout/pokeemerald-expansion/pull/7047)
|
||||||
|
* Remove more instances of hard-coded Move IDs by @AsparagusEduardo in [#7056](https://github.com/rh-hideout/pokeemerald-expansion/pull/7056)
|
||||||
|
- Added `EFFECT_SHEER_COLD` to parametrize Sheer Cold's interactions with Ice types
|
||||||
|
* Animation documentation by @AsparagusEduardo in [#7052](https://github.com/rh-hideout/pokeemerald-expansion/pull/7052)
|
||||||
|
* Deprecate sStatusFlagsForMoveEffects by @AlexOn1ine in [#7063](https://github.com/rh-hideout/pokeemerald-expansion/pull/7063)
|
||||||
|
* chore: remove unused section from credits by @Emiliasky in [#7085](https://github.com/rh-hideout/pokeemerald-expansion/pull/7085)
|
||||||
|
* Removes duplicate AI ability func by @AlexOn1ine in [#7045](https://github.com/rh-hideout/pokeemerald-expansion/pull/7045)
|
||||||
|
* Remove redundancy for ShouldLowerStat functions by @AlexOn1ine in [#6577](https://github.com/rh-hideout/pokeemerald-expansion/pull/6577)
|
||||||
|
* Deprecate absent member from battlerState by @AlexOn1ine in [#7091](https://github.com/rh-hideout/pokeemerald-expansion/pull/7091)
|
||||||
|
* Use CanAbilityAbsorbMove in GetOverworldTypeEffectiveness by @AlexOn1ine in [#7115](https://github.com/rh-hideout/pokeemerald-expansion/pull/7115)
|
||||||
|
* Removed redundant Damp check by @AsparagusEduardo in [#7134](https://github.com/rh-hideout/pokeemerald-expansion/pull/7134)
|
||||||
|
* Improve music/se macros and fix names by @cawtds in [#7030](https://github.com/rh-hideout/pokeemerald-expansion/pull/7030)
|
||||||
|
* Compound strings for hold effect names by @AsparagusEduardo in [#7140](https://github.com/rh-hideout/pokeemerald-expansion/pull/7140)
|
||||||
|
* Repurposes IsMagicGuardProtected into a general function by @AlexOn1ine in [#7114](https://github.com/rh-hideout/pokeemerald-expansion/pull/7114)
|
||||||
|
* Converts more defines to enums and name unnamed enums by @Bassoonian in [#7071](https://github.com/rh-hideout/pokeemerald-expansion/pull/7071)
|
||||||
|
* Use `argument.type` for `EFFECT_SOAK` by @AsparagusEduardo in [#7141](https://github.com/rh-hideout/pokeemerald-expansion/pull/7141)
|
||||||
|
* More battle controller function consolidation. by @AsparagusEduardo in [#6877](https://github.com/rh-hideout/pokeemerald-expansion/pull/6877)
|
||||||
|
* Add assumes for bag tests by @Bassoonian in [#7188](https://github.com/rh-hideout/pokeemerald-expansion/pull/7188)
|
||||||
|
* Fixes Booster Energy timing activation + Clean up by @AlexOn1ine in [#7175](https://github.com/rh-hideout/pokeemerald-expansion/pull/7175)
|
||||||
|
* Update .gitignore to add heal locations by @Bassoonian in [#7050](https://github.com/rh-hideout/pokeemerald-expansion/pull/7050)
|
||||||
|
* Attackcanceller clean up by @AlexOn1ine in [#7210](https://github.com/rh-hideout/pokeemerald-expansion/pull/7210)
|
||||||
|
* Remove redundant move result flag checks by @AlexOn1ine in [#7223](https://github.com/rh-hideout/pokeemerald-expansion/pull/7223)
|
||||||
|
* Add P_ASK_MOVE_CONFIRMATION by @pkmnsnfrn in [#7132](https://github.com/rh-hideout/pokeemerald-expansion/pull/7132)
|
||||||
|
- This will change the behavior of the game for players, as a new default is being set.
|
||||||
|
* Script clean up for Flame Burst and Costar by @AlexOn1ine in [#7264](https://github.com/rh-hideout/pokeemerald-expansion/pull/7264)
|
||||||
|
* Use compound strings in battle debug menu by @AsparagusEduardo in [#7282](https://github.com/rh-hideout/pokeemerald-expansion/pull/7282)
|
||||||
|
* Renaming STATUS1_REFRESH and adding more constants for common STATUS1 checks. by @surskitty in [#7284](https://github.com/rh-hideout/pokeemerald-expansion/pull/7284)
|
||||||
|
* Removed all instances of .chance = 100, SHEER_FORCE_NO_BOOST by @cfmnephrite in [#7300](https://github.com/rh-hideout/pokeemerald-expansion/pull/7300)
|
||||||
|
* AI Tests + accompanying bugfixes for Skill Swap, Worry Seed, weather setting in double battles, and Discharging into an ally's lightningrod by @surskitty in [#7297](https://github.com/rh-hideout/pokeemerald-expansion/pull/7297)
|
||||||
|
* Turn `OW_FRLG_WHITEOUT` into `OW_WHITEOUT_CUTSCENE` and make it generational by @kittenchilly in [#6962](https://github.com/rh-hideout/pokeemerald-expansion/pull/6962)
|
||||||
|
* Fix AI resisted move scoring by @Pawkkie in [#7350](https://github.com/rh-hideout/pokeemerald-expansion/pull/7350)
|
||||||
|
* Convert various to callnatives by @AlexOn1ine in [#7355](https://github.com/rh-hideout/pokeemerald-expansion/pull/7355)
|
||||||
|
* Remove leftover code by @AlexOn1ine in [#7397](https://github.com/rh-hideout/pokeemerald-expansion/pull/7397)
|
||||||
|
* Moved some fields to BattlerState/PartyState by @AsparagusEduardo in [#7409](https://github.com/rh-hideout/pokeemerald-expansion/pull/7409)
|
||||||
|
* Additional effects tweak by @cfmnephrite in [#7392](https://github.com/rh-hideout/pokeemerald-expansion/pull/7392)
|
||||||
|
* Clean up noResultString by @AlexOn1ine in [#7408](https://github.com/rh-hideout/pokeemerald-expansion/pull/7408)
|
||||||
|
* Bag sorting cleanup by @mrgriffin in [#7489](https://github.com/rh-hideout/pokeemerald-expansion/pull/7489)
|
||||||
|
* Convert statuses3 to volatiles by @AlexOn1ine in [#7514](https://github.com/rh-hideout/pokeemerald-expansion/pull/7514)
|
||||||
|
* Uncommenting out No Retreat, Clangorous Soul, and Extreme Evoboost from CheckBadMove by @surskitty in [#7541](https://github.com/rh-hideout/pokeemerald-expansion/pull/7541)
|
||||||
|
* AI Tailwind singles fix correction. by @surskitty in [#7543](https://github.com/rh-hideout/pokeemerald-expansion/pull/7543)
|
||||||
|
* Remove funcResult from AiThinkingStruct by @Pawkkie in [#7545](https://github.com/rh-hideout/pokeemerald-expansion/pull/7545)
|
||||||
|
* Suppress trainerproc compile warning for unused func by @AlexOn1ine in [#7592](https://github.com/rh-hideout/pokeemerald-expansion/pull/7592)
|
||||||
|
* Prevents a regression for custom abilties by @AlexOn1ine in [#7616](https://github.com/rh-hideout/pokeemerald-expansion/pull/7616)
|
||||||
|
|
||||||
|
## 🧪 Test Runner 🧪
|
||||||
|
### Changed
|
||||||
|
* Clean up some Normalize tests to make them make sense by @hedara90 in [#7461](https://github.com/rh-hideout/pokeemerald-expansion/pull/7461)
|
||||||
|
* Add Synthesis + Utililty Umbrella test by @ghoulslash in [#7472](https://github.com/rh-hideout/pokeemerald-expansion/pull/7472)
|
||||||
|
* Add test for BoxPokemon integrity by @hedara90 in [#7487](https://github.com/rh-hideout/pokeemerald-expansion/pull/7487)
|
||||||
|
* Re-order moves in fling test by @hedara90 in [#7559](https://github.com/rh-hideout/pokeemerald-expansion/pull/7559)
|
||||||
|
* Wrote some tests by @AsparagusEduardo in [#7563](https://github.com/rh-hideout/pokeemerald-expansion/pull/7563)
|
||||||
|
* Added Ability TODO tests - Volume C by @AsparagusEduardo in [#7562](https://github.com/rh-hideout/pokeemerald-expansion/pull/7562)
|
||||||
|
* Added missing Move Effect TODO tests - Volume F by @AsparagusEduardo in [#7605](https://github.com/rh-hideout/pokeemerald-expansion/pull/7605)
|
||||||
|
* Fixed typo in test name by @hedara90 in [#7610](https://github.com/rh-hideout/pokeemerald-expansion/pull/7610)
|
||||||
|
* Add assumes for bag tests by @Bassoonian in [#7188](https://github.com/rh-hideout/pokeemerald-expansion/pull/7188)
|
||||||
|
* Split Sheer Force tests by gen instead of by four by @AlexOn1ine in [#7260](https://github.com/rh-hideout/pokeemerald-expansion/pull/7260)
|
||||||
|
* make check TESTS="..." support for filenames and infix matches by @mrgriffin in [#7536](https://github.com/rh-hideout/pokeemerald-expansion/pull/7536)
|
||||||
|
* Fix shell side arm rng in battle tests moves by @FosterProgramming in [#7548](https://github.com/rh-hideout/pokeemerald-expansion/pull/7548)
|
||||||
|
* Test that AI uses Dragon Cheer. by @surskitty in [#7552](https://github.com/rh-hideout/pokeemerald-expansion/pull/7552)
|
||||||
|
* Tests to see that the AI uses moves. by @surskitty in [#7555](https://github.com/rh-hideout/pokeemerald-expansion/pull/7555)
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
* Clear out parties between battle tests by @hedara90 in [#7460](https://github.com/rh-hideout/pokeemerald-expansion/pull/7460)
|
||||||
|
* Fixed most failed tests with `GEN_LATEST GEN_8` by @AsparagusEduardo in [#7498](https://github.com/rh-hideout/pokeemerald-expansion/pull/7498)
|
||||||
|
* Corrected Liquid Ooze test by @AsparagusEduardo in [#7527](https://github.com/rh-hideout/pokeemerald-expansion/pull/7527)
|
||||||
|
* switchinabilities also runs ON_WEATHER and ON_TERRAIN by @ghoulslash in [#7612](https://github.com/rh-hideout/pokeemerald-expansion/pull/7612)
|
||||||
|
* Ally Switch attract battler swapping, test for leech seed by @ghoulslash in [#7634](https://github.com/rh-hideout/pokeemerald-expansion/pull/7634)
|
||||||
|
* Fixed changed effect for Sheer Cold by @hedara90 in [#7099](https://github.com/rh-hideout/pokeemerald-expansion/pull/7099)
|
||||||
|
* Fixed Transistor damage calculation test failing when `GEN_LATEST` is less than `GEN_9` by @AsparagusEduardo in [#7577](https://github.com/rh-hideout/pokeemerald-expansion/pull/7577)
|
||||||
|
|
||||||
|
## 📚 Documentation 📚
|
||||||
|
* Update how_to_new_pokemon.md by @kevinwklawrence in [#7440](https://github.com/rh-hideout/pokeemerald-expansion/pull/7440)
|
||||||
|
* Updating a link to porytiles in INSTALL.md by @ThePeeps191 in [#7490](https://github.com/rh-hideout/pokeemerald-expansion/pull/7490)
|
||||||
|
* Added comment in event.inc for simple menus in dynmultichoice by @RubyRaven6 in [#7568](https://github.com/rh-hideout/pokeemerald-expansion/pull/7568)
|
||||||
|
* Documented usage of `delay X` by @AsparagusEduardo in [#6951](https://github.com/rh-hideout/pokeemerald-expansion/pull/6951)
|
||||||
|
* Update follower NPC tutorial doc for createfollowernpc macro by @Bivurnum in [#7230](https://github.com/rh-hideout/pokeemerald-expansion/pull/7230)
|
||||||
|
* Improve trainer back pic-related data and code (+ smol documentation) by @mudskipper13 in [#6821](https://github.com/rh-hideout/pokeemerald-expansion/pull/6821)
|
||||||
|
* Update trainer.h usage warning by @hedara90 in [#7439](https://github.com/rh-hideout/pokeemerald-expansion/pull/7439)
|
||||||
|
|
||||||
|
## New Contributors
|
||||||
|
* @kevinwklawrence made their first contribution in [#7440](https://github.com/rh-hideout/pokeemerald-expansion/pull/7440)
|
||||||
|
* @ThePeeps191 made their first contribution in [#7490](https://github.com/rh-hideout/pokeemerald-expansion/pull/7490)
|
||||||
|
* @cornixsenex made their first contribution in [#7368](https://github.com/rh-hideout/pokeemerald-expansion/pull/7368)
|
||||||
|
|
||||||
|
**Full Changelog**: https://github.com/rh-hideout/pokeemerald-expansion/compare/expansion/1.12.2...expansion/1.12.3
|
||||||
|
|
||||||
|
## New Contributors
|
||||||
|
* @ShinyVolcarona made their first contribution in [#6886](https://github.com/rh-hideout/pokeemerald-expansion/pull/6886)
|
||||||
|
* @Emiliasky made their first contribution in [#7085](https://github.com/rh-hideout/pokeemerald-expansion/pull/7085)
|
||||||
|
* @poetahto made their first contribution in [#7155](https://github.com/rh-hideout/pokeemerald-expansion/pull/7155)
|
||||||
|
* @Bolt-Strike made their first contribution in [#7103](https://github.com/rh-hideout/pokeemerald-expansion/pull/7103)
|
||||||
|
* @kevinwklawrence made their first contribution in [#7440](https://github.com/rh-hideout/pokeemerald-expansion/pull/7440)
|
||||||
|
* @FosterProgramming made their first contribution in [#7442](https://github.com/rh-hideout/pokeemerald-expansion/pull/7442)
|
||||||
|
* @ThePeeps191 made their first contribution in [#7490](https://github.com/rh-hideout/pokeemerald-expansion/pull/7490)
|
||||||
|
* @cornixsenex made their first contribution in [#7368](https://github.com/rh-hideout/pokeemerald-expansion/pull/7368)
|
||||||
|
|
||||||
|
**Full Changelog**: https://github.com/rh-hideout/pokeemerald-expansion/compare/expansion/1.12.2...expansion/1.13.0
|
||||||
|
|
||||||
|
|
||||||
|
<!--Last PR: 7635-->
|
||||||
|
<!--Used to keep track of the last PR merged in case new ones come in before the changelog is done.-->
|
||||||
@ -33,7 +33,7 @@ Expansion has a few "composite" AI flags. This means that these flags have no un
|
|||||||
|
|
||||||
`AI_FLAG_BASIC_TRAINER` is expansion's version of generic, normal AI behaviour. It includes `AI_FLAG_CHECK_BAD_MOVE` (don't use bad moves), `AI_FLAG_TRY_TO_FAINT` (faint the player where possible), and `AI_FLAG_CHECK_VIABILITY` (choose the most effective move to use in the current context). Trainers with this flag will still be smarter than they are in vanilla as there have been dramatic improvements made to move selection, but not incredibly so. Trainers with this flag should feel like normal trainers. In general we recommend these three flags be used in all cases, unless you specifically want a trainer who makes obvious mistakes in battle.
|
`AI_FLAG_BASIC_TRAINER` is expansion's version of generic, normal AI behaviour. It includes `AI_FLAG_CHECK_BAD_MOVE` (don't use bad moves), `AI_FLAG_TRY_TO_FAINT` (faint the player where possible), and `AI_FLAG_CHECK_VIABILITY` (choose the most effective move to use in the current context). Trainers with this flag will still be smarter than they are in vanilla as there have been dramatic improvements made to move selection, but not incredibly so. Trainers with this flag should feel like normal trainers. In general we recommend these three flags be used in all cases, unless you specifically want a trainer who makes obvious mistakes in battle.
|
||||||
|
|
||||||
`AI_FLAG_SMART_TRAINER` is expansion's version of a "smart AI". It includes everything in `AI_FLAG_BASIC_TRAINER` along with `AI_FLAG_SMART_SWITCHING` (make smart decisions about when to switch), `AI_FLAG_SMART_MON_CHOICES` (make smart decisions about what mon to send in after a switch / KO), and `AI_FLAG_OMNISCIENT` (awareness of what moves, items, and abilities the player's mons have to better inform decisions). Expansion will keep this updated to represent the most objectively intelligent behaviour our flags are capable of producing.
|
`AI_FLAG_SMART_TRAINER` is expansion's version of a "smart AI". It includes everything in `AI_FLAG_BASIC_TRAINER` along with `AI_FLAG_SMART_SWITCHING` (make smart decisions about when to switch), `AI_FLAG_SMART_MON_CHOICES` (make smart decisions about what mon to send in after a switch / KO), `AI_FLAG_OMNISCIENT` (awareness of what moves, items, and abilities the player's mons have to better inform decisions), and `AI_FLAG_SMART_TERA` (make smart decisions about when to terastalize). Expansion will keep this updated to represent the most objectively intelligent behaviour our flags are capable of producing.
|
||||||
|
|
||||||
`AI_FLAG_PREDICTION` will enable all of the prediction flags at once, so the AI can perform as well as possible. It is best paired with the flags in `AI_FLAG_SMART_TRAINER` for optimal behaviour. This currently includes `AI_FLAG_PREDICT_SWITCH` and `AI_FLAG_PREDICT_INCOMING_MON`, but will likely be expanded in the future.
|
`AI_FLAG_PREDICTION` will enable all of the prediction flags at once, so the AI can perform as well as possible. It is best paired with the flags in `AI_FLAG_SMART_TRAINER` for optimal behaviour. This currently includes `AI_FLAG_PREDICT_SWITCH` and `AI_FLAG_PREDICT_INCOMING_MON`, but will likely be expanded in the future.
|
||||||
|
|
||||||
@ -54,6 +54,9 @@ This flag is divided into two components to calculate the best available move fo
|
|||||||
|
|
||||||
This is different to `AI_FLAG_CHECK_BAD_MOVE` as it calculates how poor a move is and not whether it will fail or not.
|
This is different to `AI_FLAG_CHECK_BAD_MOVE` as it calculates how poor a move is and not whether it will fail or not.
|
||||||
|
|
||||||
|
## `AI_FLAG_ATTACKS_PARTNER`
|
||||||
|
This flag is meant for double battles where both of the opponents hate each other. They prioritize damage to their 'partner' over the player.
|
||||||
|
|
||||||
## `AI_FLAG_FORCE_SETUP_FIRST_TURN`
|
## `AI_FLAG_FORCE_SETUP_FIRST_TURN`
|
||||||
AI will prioritize using setup moves on the first turn at the expense of all else. These include stat buffs, field effects, status moves, etc. AI_FLAG_CHECK_VIABILITY will instead do this when the AI determines it makes sense.
|
AI will prioritize using setup moves on the first turn at the expense of all else. These include stat buffs, field effects, status moves, etc. AI_FLAG_CHECK_VIABILITY will instead do this when the AI determines it makes sense.
|
||||||
|
|
||||||
@ -144,6 +147,16 @@ Marks the last two Pokémon in the party as Ace Pokémon, with the same behaviou
|
|||||||
## `AI_FLAG_OMNISCIENT`
|
## `AI_FLAG_OMNISCIENT`
|
||||||
AI has full knowledge of player moves, abilities, and hold items, and can use this knowledge when making decisions.
|
AI has full knowledge of player moves, abilities, and hold items, and can use this knowledge when making decisions.
|
||||||
|
|
||||||
|
## `AI_FLAG_ASSUME_STAB`
|
||||||
|
A significantly more restricted version of `AI_FLAG_OMNISCIENT`, the AI only knows the player's STAB moves, as their existence would be reasonable to assume in almost any case.
|
||||||
|
|
||||||
|
## `AI_FLAG_ASSUME_STATUS_MOVES`
|
||||||
|
A more restricted version of `AI_FLAG_OMNISCIENT`. The AI has a _chance_ to know what status moves the player has, plus additionally Fake Out and fixed percentage moves like Super Fang. The intention is so that if the AI has a counterplay implemented, it will seem to have guessed if the player's pokemon has a move, without giving the AI perfect information. For example, with Omniscient set, the AI will not usually put a pokemon to sleep if it has Sleep Talk; with neither Assume Powerful Status nor Omniscient set, the AI will always assume the pokemon does not have Sleep Talk.
|
||||||
|
|
||||||
|
By default, there are three groups of higher likelihood status moves defined in `include/config/ai.h` under `ASSUME_STATUS_HIGH_ODDS`, `ASSUME_STATUS_MEDIUM_ODDS`, and `ASSUME_STATUS_LOW_ODDS`. Moves are sorted in `src/battle_ai_util.c` within `ShouldRecordStatusMove()`.
|
||||||
|
|
||||||
|
Any move that is not special cased is then potentially caught by `ASSUME_ALL_STATUS_ODDS`.
|
||||||
|
|
||||||
## `AI_FLAG_SMART_MON_CHOICES`
|
## `AI_FLAG_SMART_MON_CHOICES`
|
||||||
Affects what the AI chooses to send out after a switch. AI will make smarter decisions when choosing which mon to send out mid-battle and after a KO, which are handled separately. Automatically included when `AI_FLAG_SMART_SWITCHING` is enabled.
|
Affects what the AI chooses to send out after a switch. AI will make smarter decisions when choosing which mon to send out mid-battle and after a KO, which are handled separately. Automatically included when `AI_FLAG_SMART_SWITCHING` is enabled.
|
||||||
|
|
||||||
@ -180,6 +193,9 @@ AI will determine whether it would switch out in the player's situation or not,
|
|||||||
## `AI_FLAG_PREDICT_INCOMING_MON`
|
## `AI_FLAG_PREDICT_INCOMING_MON`
|
||||||
This flag requires `AI_FLAG_PREDICT_SWITCH` to function. If the AI predicts that the player will switch, this flag allows the AI to run its move scoring calculation against the Pokémon it expects the player to switch into, instead of the Pokémon that it expects to switch out.
|
This flag requires `AI_FLAG_PREDICT_SWITCH` to function. If the AI predicts that the player will switch, this flag allows the AI to run its move scoring calculation against the Pokémon it expects the player to switch into, instead of the Pokémon that it expects to switch out.
|
||||||
|
|
||||||
|
## `AI_FLAG_SMART_TERA`
|
||||||
|
AI will make smarter decisions about when to terastalize (over the default behaviour to always tera when available). This considers factors such as whether tera allows the AI to KO the opponent, whether it can save itself from a KO or a big hit, and how many remaining pokemon could terastalize. This behavior is not currently supported in double battles.
|
||||||
|
|
||||||
## `AI_FLAG_PREDICT_MOVE`
|
## `AI_FLAG_PREDICT_MOVE`
|
||||||
AI will predict what move the player is going to use based on what move it would use in the same situation. Generally works best if also using `AI_FLAG_OMNISCIENT`.
|
AI will predict what move the player is going to use based on what move it would use in the same situation. Generally works best if also using `AI_FLAG_OMNISCIENT`.
|
||||||
|
|
||||||
|
|||||||
@ -12,36 +12,33 @@ In general, `gBattlescriptCurrInstr` tracks the current battle script position a
|
|||||||
```
|
```
|
||||||
`callnative` uses the last battle script command ID in order to pass a native function as an argument. Additional optional arguments are added recursively via a macro, so no need to worry about how they need to align to the amount of instructions to skip.
|
`callnative` uses the last battle script command ID in order to pass a native function as an argument. Additional optional arguments are added recursively via a macro, so no need to worry about how they need to align to the amount of instructions to skip.
|
||||||
|
|
||||||
Now, how might we add a custom `callnative` command? Here are the steps. We will use `BS_TrySetOctolock` as an example.
|
Now, how might we add a custom `callnative` command? Here are the steps. We will use `BS_JumpIfTerrainAffected` as an example.
|
||||||
### 1. Create a macro in `asm/macros/battle_script.inc`. For example:
|
### 1. Create a macro in `asm/macros/battle_script.inc`. For example:
|
||||||
```c
|
```c
|
||||||
.macro trysetoctolock battler:req, failInstr:req
|
.macro jumpifterrainaffected battler:req, terrainFlags:req, jumpInstr:req
|
||||||
callnative BS_TrySetOctolock
|
callnative BS_JumpIfTerrainAffected
|
||||||
.byte \battler
|
.byte \battler
|
||||||
.4byte \failInstr
|
.4byte \terrainFlags
|
||||||
|
.4byte \jumpInstr
|
||||||
.endm
|
.endm
|
||||||
```
|
```
|
||||||
### 2. Add your new callnative command ID to `src/battle_script_commands.c`. For example:
|
### 2. Add your new callnative command ID to `src/battle_script_commands.c`. For example:
|
||||||
```c
|
```c
|
||||||
void BS_TrySetOctolock(void)
|
void BS_JumpIfTerrainAffected(void)
|
||||||
{
|
{
|
||||||
NATIVE_ARGS(u8 battler, const u8 *failInstr);
|
NATIVE_ARGS(u8 battler, u32 flags, const u8 *jumpInstr);
|
||||||
u32 battler = GetBattlerForBattleScript(cmd->battler);
|
u32 battler = GetBattlerForBattleScript(cmd->battler);
|
||||||
|
|
||||||
if (gDisableStructs[battler].octolock)
|
if (IsBattlerTerrainAffected(battler, cmd->flags))
|
||||||
{
|
gBattlescriptCurrInstr = cmd->jumpInstr;
|
||||||
gBattlescriptCurrInstr = cmd->failInstr;
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
gDisableStructs[battler].octolock = TRUE;
|
|
||||||
gBattleMons[battler].status2 |= STATUS2_ESCAPE_PREVENTION;
|
|
||||||
gDisableStructs[battler].battlerPreventingEscape = gBattlerAttacker;
|
|
||||||
gBattlescriptCurrInstr = cmd->nextInstr;
|
gBattlescriptCurrInstr = cmd->nextInstr;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
Each of the arguments defined in the macro (`battler`, `failInstr`) need to be called at the start of the command using `NATIVE_ARGS`.
|
Each of the arguments defined in the macro (`battler`, `flags`, `failInstr`) need to be called at the start of the command using `NATIVE_ARGS`.
|
||||||
The byte count in the macro should correspond to the type that will be used for the command (eg, `u8` is `byte`, while the pointer are `4byte`).
|
The byte count in the macro should correspond to the type that will be used for the command (eg, `u8` is `byte`, while the pointer are `4byte`).
|
||||||
These arguments can then be accessed as `cmd->battler` and `cmd->battler`.
|
These arguments can then be accessed as `cmd->battler`, `cmd->flags` and `cmd->failInstr`.
|
||||||
`gBattlescriptCurrInstr = cmd->nextInstr;` advances to the next instruction.
|
Note that for `cmd->battler` we need to use `GetBattlerForBattleScript` to fetch the correct battler because with the macro we are accessing a scripting command that doesn't corresponds to `gBattlerTarget`, `gBattlerAttacker`, etc.
|
||||||
|
For the battler argument specifically, most of the time the battler is accessed through `gBattlerAttacker`, `gBattlerTarget` and the battler argument left out.
|
||||||
|
In the majority of cases, this is fine since the script commands are mostly used for moves and the interaction is usually between an attacker and target.
|
||||||
|
A script command usually ends with either a jump or next instruction `gBattlescriptCurrInstr = cmd->nextInstr / cmd->nextInstr;` advancing to the next instruction.
|
||||||
|
|||||||
@ -24,11 +24,14 @@ This would turn object number 3 on the current map into an NPC follower, give th
|
|||||||
|
|
||||||
The object ***MUST*** have an event flag or the NPC follower will not be created!
|
The object ***MUST*** have an event flag or the NPC follower will not be created!
|
||||||
|
|
||||||
|
## Create a Follower
|
||||||
|
The `createfollowernpc` macro will create a new follower without needing to convert an existing NPC. It works similarly to `setfollowernpc`, but instead of providing an object id, you give it a GFX id. For example, if you wanted to create a follower with the May sprite, you could do something like this:
|
||||||
|
`createfollowernpc OBJ_EVENT_GFX_RIVAL_MAY_NORMAL, FNPC_ALL, EventScript_MayFollow`
|
||||||
|
The created follower NPC will initially be invisible until the player takes a step.
|
||||||
|
|
||||||
## Follower Flags
|
## Follower Flags
|
||||||
These are required to tell the game what behavior you want the NPC follower to have. They are defined in [include/constants/follower_npc.h](https://github.com/rh-hideout/pokeemerald-expansion/blob/upcoming/include/constants/follower_npc.h). The second list of flags is the same as the first, but with shortened names to make them easier to type when scripting. The first 7 flags in the list are individual behaviors, whereas the remaining three are bundles of flags. For example, if you use `FNPC_SURF` in `setfollowernpc`, the NPC follower will be able to Surf behind the player. If you use `FNPC_ALL_WATER` instead, the NPC follower will be able to Dive and go up Waterfalls in addition to being able to Surf. Feel free to add your own custom bundles of flags to the file to meet your needs.
|
These are required to tell the game what behavior you want the NPC follower to have. They are defined in [include/constants/follower_npc.h](https://github.com/rh-hideout/pokeemerald-expansion/blob/upcoming/include/constants/follower_npc.h). The second list of flags is the same as the first, but with shortened names to make them easier to type when scripting. The first 7 flags in the list are individual behaviors, whereas the remaining three are bundles of flags. For example, if you use `FNPC_SURF` in `setfollowernpc`, the NPC follower will be able to Surf behind the player. If you use `FNPC_ALL_WATER` instead, the NPC follower will be able to Dive and go up Waterfalls in addition to being able to Surf. Feel free to add your own custom bundles of flags to the file to meet your needs.
|
||||||
|
|
||||||
If the NPC doesn't have unique running frames, you should not use the `FOLLOWER_NPC_FLAG_HAS_RUNNING_FRAMES`(`FNPC_RUNNING`) flag for them, as this will cause visual glitching. If the flag is not used, the follower will simply use their regular walking animation frames, just sped up. The only objects currently in the game that have unique running frames are the player and rival characters, so the running frames flag should be used for those.
|
|
||||||
|
|
||||||
To make sure the NPC follower uses the correct animation frames, you should add an entry to `gFollowerAlternateSprites` in [include/follower_npc_alternate_sprites.h](https://github.com/rh-hideout/pokeemerald-expansion/blob/upcoming/include/follower_npc_alternate_sprites.h). Only do this if your object has distinct animation frames for different behaviors (running, biking, surfing, etc). Follow the templates for Rival May and Rival Brendan that already exist there.
|
To make sure the NPC follower uses the correct animation frames, you should add an entry to `gFollowerAlternateSprites` in [include/follower_npc_alternate_sprites.h](https://github.com/rh-hideout/pokeemerald-expansion/blob/upcoming/include/follower_npc_alternate_sprites.h). Only do this if your object has distinct animation frames for different behaviors (running, biking, surfing, etc). Follow the templates for Rival May and Rival Brendan that already exist there.
|
||||||
|
|
||||||
## Follower Movements
|
## Follower Movements
|
||||||
|
|||||||
@ -40,7 +40,6 @@ Let's look at an example:
|
|||||||
.target = MOVE_TARGET_SELECTED,
|
.target = MOVE_TARGET_SELECTED,
|
||||||
.priority = 0,
|
.priority = 0,
|
||||||
.category = DAMAGE_CATEGORY_SPECIAL,
|
.category = DAMAGE_CATEGORY_SPECIAL,
|
||||||
.sheerForceBoost = TRUE,
|
|
||||||
.additionalEffects = ADDITIONAL_EFFECTS({
|
.additionalEffects = ADDITIONAL_EFFECTS({
|
||||||
.moveEffect = MOVE_EFFECT_PARALYSIS,
|
.moveEffect = MOVE_EFFECT_PARALYSIS,
|
||||||
.chance = 10,
|
.chance = 10,
|
||||||
@ -140,7 +139,18 @@ If you look at the example [here](#srcdatamoves_infoh), you can see that Thunder
|
|||||||
|
|
||||||
All additional effects with a defined chance (even 100%) are treated as "secondary effects". This means that they are nullified by Sheer Force, blocked by Shield Dust or the Covert Cloak, and have their chance modified by Serene Grace. Additional effects without a chance field (effectively setting it to 0) are treated as "primary effects", which means that they cannot be blocked by the aforementioned items and abilities and their chance to occur cannot be modified; they will *always* happen.
|
All additional effects with a defined chance (even 100%) are treated as "secondary effects". This means that they are nullified by Sheer Force, blocked by Shield Dust or the Covert Cloak, and have their chance modified by Serene Grace. Additional effects without a chance field (effectively setting it to 0) are treated as "primary effects", which means that they cannot be blocked by the aforementioned items and abilities and their chance to occur cannot be modified; they will *always* happen.
|
||||||
|
|
||||||
Each move can have up to 15 additional effects, allowing you to construct monstrosities like this:
|
Depending on the move effect, it is possible to also set a `multistring` value. For example:
|
||||||
|
|
||||||
|
```
|
||||||
|
.additionalEffects = ADDITIONAL_EFFECTS({
|
||||||
|
.moveEffect = MOVE_EFFECT_WRAP,
|
||||||
|
.multistring = B_MSG_WRAPPED_MAGMA_STORM,
|
||||||
|
}),
|
||||||
|
```
|
||||||
|
|
||||||
|
For Magma Storm, we not only want the wrapping move effect, we want to give it a unique string when it activates. The index is an enum defined in `battle_string_ids.h` and it corresponds to an entry (for this move effect) in the `gWrappedStringIds` list in battle_message.c. For custom strings, you need to add an enum and an entry respectively. For new custom move effects, you will have to add a new set of enums and a new table of strings.
|
||||||
|
|
||||||
|
Each move can have up to 3 additional effects, allowing you to construct monstrosities like this:
|
||||||
```
|
```
|
||||||
[MOVE_POUND] =
|
[MOVE_POUND] =
|
||||||
{
|
{
|
||||||
@ -165,13 +175,6 @@ Each move can have up to 15 additional effects, allowing you to construct monstr
|
|||||||
},{
|
},{
|
||||||
.moveEffect = MOVE_EFFECT_FLINCH,
|
.moveEffect = MOVE_EFFECT_FLINCH,
|
||||||
.chance = 30,
|
.chance = 30,
|
||||||
},{
|
|
||||||
.moveEffect = MOVE_EFFECT_ALL_STATS_UP,
|
|
||||||
.chance = 40,
|
|
||||||
.self = TRUE,
|
|
||||||
},{
|
|
||||||
.moveEffect = MOVE_EFFECT_DEF_MINUS_2,
|
|
||||||
.chance = 50,
|
|
||||||
}),
|
}),
|
||||||
.makesContact = TRUE,
|
.makesContact = TRUE,
|
||||||
.ignoresKingsRock = B_UPDATED_MOVE_FLAGS == GEN_4,
|
.ignoresKingsRock = B_UPDATED_MOVE_FLAGS == GEN_4,
|
||||||
|
|||||||
@ -314,7 +314,8 @@ Cry_Pecharunt::
|
|||||||
Then we add the cry ID to [include/constants/cries.h](https://github.com/rh-hideout/pokeemerald-expansion/blob/master/include/constants/cries.h):
|
Then we add the cry ID to [include/constants/cries.h](https://github.com/rh-hideout/pokeemerald-expansion/blob/master/include/constants/cries.h):
|
||||||
|
|
||||||
```diff
|
```diff
|
||||||
enum {
|
enum PokemonCry
|
||||||
|
{
|
||||||
CRY_NONE,
|
CRY_NONE,
|
||||||
...
|
...
|
||||||
#if P_FAMILY_TERAPAGOS
|
#if P_FAMILY_TERAPAGOS
|
||||||
@ -371,7 +372,8 @@ Edit [include/constants/pokedex.h](https://github.com/rh-hideout/pokeemerald-exp
|
|||||||
|
|
||||||
```diff
|
```diff
|
||||||
// National Pokedex order
|
// National Pokedex order
|
||||||
enum {
|
enum NationalDexOrder
|
||||||
|
{
|
||||||
NATIONAL_DEX_NONE,
|
NATIONAL_DEX_NONE,
|
||||||
// Kanto
|
// Kanto
|
||||||
NATIONAL_DEX_BULBASAUR,
|
NATIONAL_DEX_BULBASAUR,
|
||||||
@ -394,7 +396,8 @@ Do keep in mind that if you intend to add your new species to the Hoenn Dex, you
|
|||||||
|
|
||||||
```diff
|
```diff
|
||||||
// Hoenn Pokedex order
|
// Hoenn Pokedex order
|
||||||
enum {
|
enum HoennDexOrder
|
||||||
|
{
|
||||||
HOENN_DEX_NONE,
|
HOENN_DEX_NONE,
|
||||||
HOENN_DEX_TREECKO,
|
HOENN_DEX_TREECKO,
|
||||||
...
|
...
|
||||||
|
|||||||
@ -79,7 +79,7 @@ SINGLE_BATTLE_TEST("Stun Spore does not affect Grass-types")
|
|||||||
{
|
{
|
||||||
GIVEN {
|
GIVEN {
|
||||||
ASSUME(IsPowderMove(MOVE_STUN_SPORE));
|
ASSUME(IsPowderMove(MOVE_STUN_SPORE));
|
||||||
ASSUME(gSpeciesInfo[SPECIES_ODDISH].types[0] == TYPE_GRASS);
|
ASSUME(GetSpeciesType(SPECIES_ODDISH, 0) == TYPE_GRASS);
|
||||||
PLAYER(SPECIES_ODDISH); // 1.
|
PLAYER(SPECIES_ODDISH); // 1.
|
||||||
OPPONENT(SPECIES_ODDISH); // 2.
|
OPPONENT(SPECIES_ODDISH); // 2.
|
||||||
} WHEN {
|
} WHEN {
|
||||||
@ -428,7 +428,7 @@ Spaces in pattern match newlines (\n, \l, and \p) in the message.
|
|||||||
Often used to check that a battler took its turn but it failed, e.g.:
|
Often used to check that a battler took its turn but it failed, e.g.:
|
||||||
```
|
```
|
||||||
MESSAGE("Wobbuffet used Dream Eater!");
|
MESSAGE("Wobbuffet used Dream Eater!");
|
||||||
MESSAGE("The opposing Wobbuffet wasn't affected!");
|
MESSAGE("It doesn't affect the opposing Wobbuffet…");
|
||||||
```
|
```
|
||||||
|
|
||||||
### `STATUS_ICON`
|
### `STATUS_ICON`
|
||||||
|
|||||||
93
docs/tutorials/how_to_trainer_back_pic.md
Normal file
@ -0,0 +1,93 @@
|
|||||||
|
# How to add a new trainer back pic
|
||||||
|
|
||||||
|
## Content
|
||||||
|
* [Quick Summary](#quick-summary)
|
||||||
|
* [The Graphics](#the-graphics)
|
||||||
|
* [1. Edit the sprites](#2-edit-the-sprites)
|
||||||
|
* [2. Register the sprites](#2-register-the-sprites)
|
||||||
|
* [3. Connecting pictures to the data](#2-connecting-pictures-to-the-data)
|
||||||
|
* [The Data](#the-data)
|
||||||
|
* [4. Defining the trainer back pic](#2-defining-the-trainer-back-pic)
|
||||||
|
* [Usage](#usage)
|
||||||
|
|
||||||
|
## Quick Summary
|
||||||
|
If you've done this before and just need a quick lookup, here's what files you need:
|
||||||
|
1. Place graphics in [`graphics/trainers/back_pics`](./graphics/trainers/back_pics).
|
||||||
|
2. Point game to where graphic files are found: [`src/data/graphics/trainers`](./src/data/graphics/trainers.h).
|
||||||
|
3. Add trainer to [`include/constants/trainers.h`](./include/constants/trainers.h),
|
||||||
|
|
||||||
|
## The Graphics
|
||||||
|
|
||||||
|
### 1. Add the sprites
|
||||||
|
We will start with a graphic that we want to use for our new trainer pic. Unlike with adding Pokémon, the trainer sprites aren't sorted in individual folders, but rather in one folder: [`graphics/trainers/back_pics`](./graphics/trainers/back_pics). **Trainers sprites cannot be more than 16 - this includes the color that will be transparent, which is the first slot of the palette.**
|
||||||
|
|
||||||
|
### 2. Register the sprites
|
||||||
|
Sadly, just putting the image files into the graphics folder is not enough. To use the sprites we have to register them by linking the graphic files in [`src/data/graphics/trainers.h`](./src/data/graphics/trainers.h):
|
||||||
|
```diff
|
||||||
|
const u8 gTrainerBackPic_Wally[] = INCBIN_U8("graphics/trainers/back_pics/wally.4bpp");
|
||||||
|
const u8 gTrainerBackPic_Steven[] = INCBIN_U8("graphics/trainers/back_pics/steven.4bpp");
|
||||||
|
+const u8 gTrainerBackPic_NewOne[] = INCBIN_U8("graphics/trainers/back_pics/new_one.4bpp");
|
||||||
|
|
||||||
|
const u16 gTrainerBackPicPalette_Red[] = INCBIN_U16("graphics/trainers/back_pics/red.gbapal");
|
||||||
|
const u16 gTrainerBackPicPalette_Leaf[] = INCBIN_U16("graphics/trainers/back_pics/leaf.gbapal");
|
||||||
|
+const u16 gTrainerBackPicPalette_NewOne[] = INCBIN_U16("graphics/trainers/back_pics/new_one.gbapal");
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3. Connecting the Pictures to the Data
|
||||||
|
The last few things we have to do is prepare the graphics for usage. In [`src/data/graphics/trainers.h`](./src/data/graphics/trainers.h) you'll find the `gTrainerBacksprites` struct, we need to add the trainer to this. You can just copy the last trainer type defined and edit it, but this is what it does: Connects the new trainer with the image we defined earlier.
|
||||||
|
|
||||||
|
So, finally, it needs to look like this:
|
||||||
|
```diff
|
||||||
|
#define TRAINER_BACK_SPRITE(trainerPic, yOffset, sprite, pal, anim) \
|
||||||
|
[trainerPic] = \
|
||||||
|
{ \
|
||||||
|
.coordinates = {.size = 8, .y_offset = yOffset}, \
|
||||||
|
.backPic = {.data = sprite, .size = TRAINER_PIC_SIZE, .relativeFrames = TRUE}, \
|
||||||
|
.palette = {.data = pal, .tag = trainerPic}, \
|
||||||
|
.animation = anim, \
|
||||||
|
}
|
||||||
|
|
||||||
|
const struct TrainerBacksprite gTrainerBacksprites[] =
|
||||||
|
{
|
||||||
|
TRAINER_BACK_SPRITE(TRAINER_BACK_PIC_BRENDAN, 4, gTrainerBackPic_Brendan, gTrainerPalette_Brendan, sBackAnims_Hoenn),
|
||||||
|
...
|
||||||
|
TRAINER_BACK_SPRITE(TRAINER_BACK_PIC_STEVEN, 4, gTrainerBackPic_Steven, gTrainerPalette_Steven, sBackAnims_Hoenn),
|
||||||
|
+ TRAINER_BACK_SPRITE(TRAINER_BACK_PIC_NEW_ONE, 4, gTrainerBackPic_NewOne, gTrainerBackPicPalette_NewOne, sBackAnims_Hoenn),
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
**Note**: Trainer back pics can have 4 or 5 frames of animation. Trainers with 5 frames must have their `yOffset` set to 5, and their `anim` set to `sBackAnims_Kanto`.
|
||||||
|
|
||||||
|
### The Data
|
||||||
|
#### 4. Defining the trainer back pic
|
||||||
|
Finally, let's bring it all together by defining our new trainer pic in [`include/constants/trainers.h`](./include/constants/trainers.h):
|
||||||
|
|
||||||
|
```diff
|
||||||
|
#define TRAINER_BACK_PIC_WALLY 6
|
||||||
|
#define TRAINER_BACK_PIC_STEVEN 7
|
||||||
|
+#define TRAINER_BACK_PIC_NEW_ONE 8
|
||||||
|
```
|
||||||
|
Remember to count the number next to the trainer pic up by one!
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
You can test your new trainer back pic by going to [`src/data/battle_partners.party`](./src/data/battle_partners.party) and change the `Pic` field. The syntax should match the constant (`TRAINER_BACK_PIC_NEW_ONE`) with the underscore replaced by spaces. For example:
|
||||||
|
```diff
|
||||||
|
=== PARTNER_STEVEN ===
|
||||||
|
Name: STEVEN
|
||||||
|
Class: Rival
|
||||||
|
-Pic: Steven
|
||||||
|
+Pic: New One
|
||||||
|
Gender: Male
|
||||||
|
Music: Male
|
||||||
|
```
|
||||||
|
|
||||||
|
Otherwise if you use [`src/data/battle_partners.h`](./src/data/battle_partners.h), change the `trainerPic` field instead. For example:
|
||||||
|
```diff
|
||||||
|
[DIFFICULTY_NORMAL][PARTNER_STEVEN] =
|
||||||
|
{
|
||||||
|
.trainerName = _("STEVEN"),
|
||||||
|
.trainerClass = TRAINER_CLASS_RIVAL,
|
||||||
|
- .trainerPic = TRAINER_BACK_PIC_STEVEN,
|
||||||
|
+ .trainerPic = TRAINER_BACK_PIC_NEW_ONE,
|
||||||
|
.encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE,
|
||||||
|
```
|
||||||
97
docs/tutorials/how_to_trainer_front_pic.md
Normal file
@ -0,0 +1,97 @@
|
|||||||
|
# How to add a new trainer front pic
|
||||||
|
|
||||||
|
## Content
|
||||||
|
* [Quick Summary](#quick-summary)
|
||||||
|
* [The Graphics](#the-graphics)
|
||||||
|
* [1. Edit the sprites](#2-edit-the-sprites)
|
||||||
|
* [2. Register the sprites](#2-register-the-sprites)
|
||||||
|
* [3. Connecting pictures to the data](#2-connecting-pictures-to-the-data)
|
||||||
|
* [The Data](#the-data)
|
||||||
|
* [4. Defining the trainer pic](#2-defining-the-trainer-pic)
|
||||||
|
* [Usage](#usage)
|
||||||
|
|
||||||
|
## Quick Summary
|
||||||
|
If you've done this before and just need a quick lookup, here's what files you need:
|
||||||
|
1. Place graphics into [`graphics/trainers/front_pics`](./graphics/trainers/front_pics).
|
||||||
|
2. Point game to where graphic files are found: [`src/data/graphics/trainers`](./src/data/graphics/trainers.h).
|
||||||
|
3. Add trainer to [`include/constants/trainers.h`](./include/constants/trainers.h).
|
||||||
|
|
||||||
|
## The Graphics
|
||||||
|
|
||||||
|
### 1. Edit the sprites
|
||||||
|
We will start with a graphic that we want to use for our new trainer pic. Unlike with adding Pokémon, the trainer sprites aren't sorted in individual folders, but rather in one folder: [`graphics/trainers/front_pics`](./graphics/trainers/front_pics). **Trainers sprites cannot be more than 16 - this includes the color that will be transparent, which is the first slot of the palette.**
|
||||||
|
|
||||||
|
### 2. Register the sprites
|
||||||
|
Sadly, just putting the image files into the graphics folder is not enough. To use the sprites we have to register them by linking the graphic files in [`src/data/graphics/trainers`](./data/graphics/trainers.h):
|
||||||
|
```diff
|
||||||
|
const u16 gTrainerPalette_RubySapphireBrendan[] = INCBIN_U16("graphics/trainers/palettes/brendan_rs.gbapal");
|
||||||
|
|
||||||
|
const u32 gTrainerFrontPic_RubySapphireMay[] = INCBIN_U32("graphics/trainers/front_pics/may_rs.4bpp.smol");
|
||||||
|
const u16 gTrainerPalette_RubySapphireMay[] = INCBIN_U16("graphics/trainers/palettes/may_rs.gbapal");
|
||||||
|
+
|
||||||
|
+const u32 gTrainerFrontPic_NewOne[] = INCBIN_U32("graphics/trainers/front_pics/new_one.4bpp.smol");
|
||||||
|
+const u16 gTrainerPalette_NewOne[] = INCBIN_U16("graphics/trainers/front_pics/new_one.gbapal");
|
||||||
|
|
||||||
|
const u8 gTrainerBackPic_Brendan[] = INCBIN_U8("graphics/trainers/back_pics/brendan.4bpp");
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3. Connecting the Pictures to the Data
|
||||||
|
The last few things we have to do is prepare the graphics for usage. In [`src/data/graphics/trainers.h`](./src/data/graphics/trainers.h) you'll find the `gTrainerSprites` struct, we need to add the trainer to this. You can just copy the last trainer type defined and edit it, but this is what it does: Connects the new trainer with the image we defined earlier.
|
||||||
|
|
||||||
|
So, finally, it needs to look like this:
|
||||||
|
```diff
|
||||||
|
#define TRAINER_SPRITE(trainerPic, picFile, paletteFile, ...) \
|
||||||
|
[trainerPic] = \
|
||||||
|
{ \
|
||||||
|
.frontPic = {picFile, TRAINER_PIC_SIZE, trainerPic}, \
|
||||||
|
.palette = {paletteFile, trainerPic}, \
|
||||||
|
.mugshotCoords = {DEFAULT(0, __VA_ARGS__), DEFAULT_2(0, __VA_ARGS__)}, \
|
||||||
|
.mugshotRotation = DEFAULT_3(0x200, __VA_ARGS__), \
|
||||||
|
}
|
||||||
|
|
||||||
|
const struct TrainerSprite gTrainerSprites[] =
|
||||||
|
{
|
||||||
|
TRAINER_SPRITE(TRAINER_PIC_HIKER, gTrainerFrontPic_Hiker, gTrainerPalette_Hiker),
|
||||||
|
TRAINER_SPRITE(TRAINER_PIC_AQUA_GRUNT_M, gTrainerFrontPic_AquaGruntM, gTrainerPalette_AquaGruntM),
|
||||||
|
...
|
||||||
|
TRAINER_SPRITE(TRAINER_PIC_RS_MAY, gTrainerFrontPic_RubySapphireMay, gTrainerPalette_RubySapphireMay),
|
||||||
|
+ TRAINER_SPRITE(TRAINER_PIC_NEW_ONE, gTrainerFrontPic_NewOne, gTrainerPalette_NewOne),
|
||||||
|
};
|
||||||
|
```
|
||||||
|
### The Data
|
||||||
|
#### 4. Defining the trainer pic
|
||||||
|
Finally, let's bring it all together by defining our new trainer pic in [`include/constants/trainers.h`](./include/constants/trainers.h):
|
||||||
|
|
||||||
|
```diff
|
||||||
|
#define TRAINER_PIC_RS_MAY 92
|
||||||
|
+#define TRAINER_PIC_NEW_ONE 93
|
||||||
|
|
||||||
|
#define TRAINER_BACK_PIC_BRENDAN 0
|
||||||
|
#define TRAINER_BACK_PIC_MAY 1
|
||||||
|
```
|
||||||
|
Remember to count the number next to the trainer pic up by one!
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
You can test your trainer type by going to [`src/data/trainers.party`](./src/data/trainers.party) and change the `Pic` field. The syntax should match the constant (`TRAINER_PIC_NEW_ONE`) with the underscore replaced by spaces. For example:
|
||||||
|
```diff
|
||||||
|
=== TRAINER_BRENDAN_PLACEHOLDER ===
|
||||||
|
Name: BRENDAN
|
||||||
|
Class: RS Protag
|
||||||
|
-Pic: RS Brendan
|
||||||
|
+Pic: New One
|
||||||
|
Gender: Male
|
||||||
|
Music: Male
|
||||||
|
Double Battle: No
|
||||||
|
```
|
||||||
|
|
||||||
|
Otherwise if you use [`src/data/trainers.h`](./src/data/trainers.h), change the `.trainerPic` field instead. For example:
|
||||||
|
```diff
|
||||||
|
[DIFFICULTY_NORMAL][TRAINER_BRENDAN_PLACEHOLDER] =
|
||||||
|
{
|
||||||
|
.trainerName = _("BRENDAN"),
|
||||||
|
.trainerClass = TRAINER_CLASS_RS_PROTAG,
|
||||||
|
- .trainerPic = TRAINER_PIC_RS_BRENDAN,
|
||||||
|
+ .trainerPic = TRAINER_PIC_NEW_ONE,
|
||||||
|
.encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE,
|
||||||
|
.doubleBattle = FALSE,
|
||||||
|
```
|
||||||
@ -52,6 +52,11 @@ By default, only `Default<position>PickFunction` and `PickLowest` are implemente
|
|||||||
- `Pool Prune` (`.poolPruneIndex`) controls if members in the pool should be removed before party members are picked from the pool.
|
- `Pool Prune` (`.poolPruneIndex`) controls if members in the pool should be removed before party members are picked from the pool.
|
||||||
By default, only `POOL_PRUNE_NONE`, which doesn't remove anything from the pool, and `POOL_PRUNE_TEST`, which removes Wobbuffet from the pool, are implemented. Must be an `enum` value in `enum PoolPruneOptions`.
|
By default, only `POOL_PRUNE_NONE`, which doesn't remove anything from the pool, and `POOL_PRUNE_TEST`, which removes Wobbuffet from the pool, are implemented. Must be an `enum` value in `enum PoolPruneOptions`.
|
||||||
|
|
||||||
|
## Pool copy
|
||||||
|
The `Copy Pool` option can be used to have the trainer use the party or pool from a different trainer.
|
||||||
|
If you for example want some other trainer to have the same team/pool as Tiana, you'd use `Copy Pool: TRAINER_TIANA`.
|
||||||
|
If `Party Size` isn't defined for the current trainer, it will inherit from the copied trainer.
|
||||||
|
|
||||||
## Example pool
|
## Example pool
|
||||||
```
|
```
|
||||||
=== TRAINER_TIANA ===
|
=== TRAINER_TIANA ===
|
||||||
|
|||||||
@ -1,98 +0,0 @@
|
|||||||
# How to add a new trainer pic
|
|
||||||
|
|
||||||
## Content
|
|
||||||
* [Quick Summary](#quick-summary)
|
|
||||||
* [The Graphics](#the-graphics)
|
|
||||||
* [1. Edit the sprites](#2-edit-the-sprites)
|
|
||||||
* [2. Register the sprites](#2-register-the-sprites)
|
|
||||||
* [3. Connecting pictures to the data](#2-connecting-pictures-to-the-data)
|
|
||||||
* [The Data](#the-data)
|
|
||||||
* [4. Defining the trainer pic](#2-defining-the-trainer-pic)
|
|
||||||
* [Usage](#usage)
|
|
||||||
|
|
||||||
## Quick Summary
|
|
||||||
If you've done this before and just need a quick lookup, here's what files you need:
|
|
||||||
1. GFX into [graphics/trainers/front_pics](https://github.com/rh-hideout/pokeemerald-expansion/blob/master/graphics/trainers/front_pics)
|
|
||||||
2. Palette into [graphics/trainers/palettes](https://github.com/rh-hideout/pokeemerald-expansion/blob/master/graphics/trainers/palettes)
|
|
||||||
3. Point game to where graphic files are found: [src/data/graphics/trainers](https://github.com/rh-hideout/pokeemerald-expansion/blob/master/src/data/graphics/trainers.h)
|
|
||||||
4. Add trainer to [include/constants/trainers.h](https://github.com/rh-hideout/pokeemerald-expansion/blob/master/include/constants/trainers.h)
|
|
||||||
|
|
||||||
## The Graphics
|
|
||||||
|
|
||||||
### 1. Edit the sprites
|
|
||||||
We will start with a graphic that we want to use for our new trainer pic. Unlike with adding Pokémon, the trainer sprites aren't sorted in individual folders, but rather in one folder:
|
|
||||||
[graphics/trainers/front_pics](https://github.com/rh-hideout/pokeemerald-expansion/blob/master/graphics/trainers/front_pics)
|
|
||||||
|
|
||||||
**Remember to limit yourself to 16 colors including transparency in the first slot!**
|
|
||||||
|
|
||||||
Export the palette and place into the same folder.
|
|
||||||
|
|
||||||
### 2. Register the sprites
|
|
||||||
Sadly, just putting the image files into the graphics folder is not enough. To use the sprites we have to register them by linking the graphic files.
|
|
||||||
[src/data/graphics/trainers](https://github.com/rh-hideout/pokeemerald-expansion/blob/master/src/data/graphics/trainers.h):
|
|
||||||
```diff
|
|
||||||
const u16 gTrainerPalette_RubySapphireBrendan[] = INCBIN_U16("graphics/trainers/palettes/ruby_sapphire_brendan.gbapal");
|
|
||||||
|
|
||||||
const u32 gTrainerFrontPic_RubySapphireMay[] = INCBIN_U32("graphics/trainers/front_pics/ruby_sapphire.4bpp.lz");
|
|
||||||
const u16 gTrainerPalette_RubySapphireMay[] = INCBIN_U16("graphics/trainers/palettes/ruby_sapphire_may.gbapal");
|
|
||||||
|
|
||||||
+ const u32 gTrainerFrontPic_myTrainerClass[] = INCBIN_U32("graphics/trainers/front_pics/myTrainerClass.4bpp.lz");
|
|
||||||
+ const u16 gTrainerPalette_myTrainerClass[] = INCBIN_U16("graphics/trainers/palettes/myTrainerClass.gbapal");
|
|
||||||
|
|
||||||
const u8 gTrainerBackPic_Brendan[] = INCBIN_U8("graphics/trainers/back_pics/brendan.4bpp");
|
|
||||||
```
|
|
||||||
|
|
||||||
### 3. Connecting the Pictures to the Data
|
|
||||||
The last few things we have to do is prepare the graphics for usage. In [src/data/graphics/trainers.h](https://github.com/rh-hideout/pokeemerald-expansion/blob/master/src/data/graphics/trainers.h) you'll find the gTrainerSprites struct, we need to add the trainer to this. You can just copy the last trainer type defined and edit it, but this is what it does: Connects the trainer type with the image we defined earlier.
|
|
||||||
|
|
||||||
So, finally, it needs to look like this:
|
|
||||||
```diff
|
|
||||||
define TRAINER_SPRITE(trainerPic, picFile, paletteFile, ...) \
|
|
||||||
[trainerPic] = \
|
|
||||||
{ \
|
|
||||||
.frontPic = {picFile, TRAINER_PIC_SIZE, trainerPic}, \
|
|
||||||
.palette = {paletteFile, trainerPic}, \
|
|
||||||
.mugshotCoords = {DEFAULT(0, __VA_ARGS__), DEFAULT_2(0, __VA_ARGS__)}, \
|
|
||||||
.mugshotRotation = DEFAULT_3(0x200, __VA_ARGS__), \
|
|
||||||
}
|
|
||||||
|
|
||||||
const struct TrainerSprite gTrainerSprites[] =
|
|
||||||
{
|
|
||||||
TRAINER_SPRITE(TRAINER_PIC_HIKER, gTrainerFrontPic_Hiker, gTrainerPalette_Hiker),
|
|
||||||
TRAINER_SPRITE(TRAINER_PIC_AQUA_GRUNT_M, gTrainerFrontPic_AquaGruntM, gTrainerPalette_AquaGruntM),
|
|
||||||
...
|
|
||||||
TRAINER_SPRITE(TRAINER_PIC_RS_MAY, gTrainerFrontPic_RubySapphireMay, gTrainerPalette_RubySapphireMay),
|
|
||||||
TRAINER_SPRITE(TRAINER_PIC_MY_TRAINER_CLASS, gTrainerFrontPic_myTrainerClass, gTrainerPalette_myTrainerClass)
|
|
||||||
};
|
|
||||||
```
|
|
||||||
### The Data
|
|
||||||
#### 4. Defining the trainer pic
|
|
||||||
Finally, let's bring it all together by defining our new trainer pic in [include/constants/trainers.h](https://github.com/rh-hideout/pokeemerald-expansion/blob/master/include/constants/trainers.h):
|
|
||||||
|
|
||||||
```diff
|
|
||||||
#define TRAINER_PIC_RS_MAY 92
|
|
||||||
+ #define TRAINER_PIC_MY_TRAINER_CLASS 93
|
|
||||||
|
|
||||||
#define TRAINER_BACK_PIC_BRENDAN 0
|
|
||||||
#define TRAINER_BACK_PIC_MAY 1
|
|
||||||
```
|
|
||||||
Remember to count the number next to the trainer pic up by one!
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
You can test your trainer type by going to [src/data/trainers](https://github.com/rh-hideout/pokeemerald-expansion/blob/master/src/data/trainers.h) and changing a trainer type. For example:
|
|
||||||
```diff
|
|
||||||
[TRAINER_BRENDAN_PLACEHOLDER] =
|
|
||||||
{
|
|
||||||
.partyFlags = 0,
|
|
||||||
.trainerClass = TRAINER_CLASS_RS_PROTAG,
|
|
||||||
.encounterMusic_gender = TRAINER_ENCOUNTER_MUSIC_MALE,
|
|
||||||
- .trainerPic = TRAINER_PIC_RS_BRENDAN,
|
|
||||||
+ .trainerPic = TRAINER_PIC_MY_TRAINER_CLASS,
|
|
||||||
.trainerName = _("BRENDAN"),
|
|
||||||
.items = {},
|
|
||||||
.doubleBattle = FALSE,
|
|
||||||
.aiFlags = 0,
|
|
||||||
.partySize = ARRAY_COUNT(sParty_BrendanLinkPlaceholder),
|
|
||||||
.party = {.NoItemDefaultMoves = sParty_BrendanLinkPlaceholder},
|
|
||||||
},
|
|
||||||
```
|
|
||||||
BIN
graphics/battle_anims/sprites/tatsugiri_curly.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
graphics/battle_anims/sprites/tatsugiri_droopy.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
graphics/battle_anims/sprites/tatsugiri_stretchy.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
graphics/battle_anims/sprites/tera_symbol.png
Normal file
|
After Width: | Height: | Size: 320 B |
|
Before Width: | Height: | Size: 284 B After Width: | Height: | Size: 234 B |
19
graphics/field_effects/palettes/big_dust.pal
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
JASC-PAL
|
||||||
|
0100
|
||||||
|
16
|
||||||
|
98 172 238
|
||||||
|
198 181 156
|
||||||
|
165 140 115
|
||||||
|
181 165 140
|
||||||
|
148 123 99
|
||||||
|
206 198 173
|
||||||
|
189 173 148
|
||||||
|
82 74 57
|
||||||
|
222 180 148
|
||||||
|
140 123 82
|
||||||
|
173 156 123
|
||||||
|
238 213 180
|
||||||
|
0 0 0
|
||||||
|
0 0 0
|
||||||
|
0 0 0
|
||||||
|
0 0 0
|
||||||
BIN
graphics/field_effects/pics/rock_climb_blob.png
Normal file
|
After Width: | Height: | Size: 383 B |
BIN
graphics/field_effects/pics/rock_climb_dust.png
Normal file
|
After Width: | Height: | Size: 558 B |
BIN
graphics/pokemon/greninja/ash/overworld.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
19
graphics/pokemon/greninja/ash/overworld_normal.pal
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
JASC-PAL
|
||||||
|
0100
|
||||||
|
16
|
||||||
|
152 208 160
|
||||||
|
46 56 55
|
||||||
|
68 84 82
|
||||||
|
20 20 20
|
||||||
|
220 212 133
|
||||||
|
234 152 208
|
||||||
|
72 95 157
|
||||||
|
245 103 190
|
||||||
|
62 141 206
|
||||||
|
136 186 226
|
||||||
|
184 62 48
|
||||||
|
176 97 134
|
||||||
|
186 214 237
|
||||||
|
233 85 88
|
||||||
|
241 174 219
|
||||||
|
100 33 26
|
||||||
19
graphics/pokemon/greninja/ash/overworld_shiny.pal
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
JASC-PAL
|
||||||
|
0100
|
||||||
|
16
|
||||||
|
152 208 160
|
||||||
|
46 56 55
|
||||||
|
68 84 82
|
||||||
|
20 20 20
|
||||||
|
184 152 83
|
||||||
|
234 152 208
|
||||||
|
46 56 55
|
||||||
|
245 103 190
|
||||||
|
68 84 82
|
||||||
|
136 186 226
|
||||||
|
184 62 48
|
||||||
|
176 97 134
|
||||||
|
186 214 237
|
||||||
|
233 85 88
|
||||||
|
241 174 219
|
||||||
|
100 33 26
|
||||||
@ -345,6 +345,9 @@ $(UNUSEDGFXDIR)/color_frames.4bpp: %.4bpp: %.png
|
|||||||
$(BATINTGFXDIR)/unused_window2bar.4bpp: %.4bpp: %.png
|
$(BATINTGFXDIR)/unused_window2bar.4bpp: %.4bpp: %.png
|
||||||
$(GFX) $< $@ -num_tiles 5 -Wnum_tiles
|
$(GFX) $< $@ -num_tiles 5 -Wnum_tiles
|
||||||
|
|
||||||
|
$(BATINTGFXDIR)/ability_pop_up.4bpp: %.4bpp: %.png
|
||||||
|
$(GFX) $< $@ -mwidth 8 -mheight 4
|
||||||
|
|
||||||
$(JPCONTESTGFXDIR)/composite_1.4bpp: $(JPCONTESTGFXDIR)/frame_1.4bpp \
|
$(JPCONTESTGFXDIR)/composite_1.4bpp: $(JPCONTESTGFXDIR)/frame_1.4bpp \
|
||||||
$(JPCONTESTGFXDIR)/floor.4bpp \
|
$(JPCONTESTGFXDIR)/floor.4bpp \
|
||||||
$(JPCONTESTGFXDIR)/frame_2.4bpp \
|
$(JPCONTESTGFXDIR)/frame_2.4bpp \
|
||||||
|
|||||||
@ -44,7 +44,7 @@
|
|||||||
|
|
||||||
// Used to exclude moves learned temporarily by Transform or Mimic
|
// Used to exclude moves learned temporarily by Transform or Mimic
|
||||||
#define MOVE_IS_PERMANENT(battler, moveSlot) \
|
#define MOVE_IS_PERMANENT(battler, moveSlot) \
|
||||||
(!(gBattleMons[battler].status2 & STATUS2_TRANSFORMED) \
|
(!(gBattleMons[battler].volatiles.transformed) \
|
||||||
&& !(gDisableStructs[battler].mimickedMoves & (1u << moveSlot)))
|
&& !(gDisableStructs[battler].mimickedMoves & (1u << moveSlot)))
|
||||||
|
|
||||||
// Battle Actions
|
// Battle Actions
|
||||||
@ -64,6 +64,7 @@
|
|||||||
#define B_ACTION_FINISHED 12
|
#define B_ACTION_FINISHED 12
|
||||||
#define B_ACTION_CANCEL_PARTNER 12 // when choosing an action
|
#define B_ACTION_CANCEL_PARTNER 12 // when choosing an action
|
||||||
#define B_ACTION_NOTHING_FAINTED 13 // when choosing an action
|
#define B_ACTION_NOTHING_FAINTED 13 // when choosing an action
|
||||||
|
#define B_ACTION_UNK_14 14
|
||||||
#define B_ACTION_DEBUG 20
|
#define B_ACTION_DEBUG 20
|
||||||
#define B_ACTION_THROW_BALL 21 // R to throw last used ball
|
#define B_ACTION_THROW_BALL 21 // R to throw last used ball
|
||||||
#define B_ACTION_NONE 0xFF
|
#define B_ACTION_NONE 0xFF
|
||||||
@ -116,24 +117,22 @@ struct DisableStruct
|
|||||||
u8 tarShot:1;
|
u8 tarShot:1;
|
||||||
u8 octolock:1;
|
u8 octolock:1;
|
||||||
u8 cudChew:1;
|
u8 cudChew:1;
|
||||||
u8 spikesDone:1;
|
|
||||||
u8 toxicSpikesDone:1;
|
|
||||||
u8 stickyWebDone:1;
|
|
||||||
u8 stealthRockDone:1;
|
|
||||||
u8 weatherAbilityDone:1;
|
u8 weatherAbilityDone:1;
|
||||||
u8 terrainAbilityDone:1;
|
u8 terrainAbilityDone:1;
|
||||||
u8 syrupBombIsShiny:1;
|
u8 syrupBombIsShiny:1;
|
||||||
u8 steelSurgeDone:1;
|
|
||||||
u8 usedProteanLibero:1;
|
u8 usedProteanLibero:1;
|
||||||
u8 flashFireBoosted:1;
|
u8 flashFireBoosted:1;
|
||||||
|
u8 boosterEnergyActivated:1;
|
||||||
u16 overwrittenAbility; // abilities overwritten during battle (keep separate from battle history in case of switching)
|
u16 overwrittenAbility; // abilities overwritten during battle (keep separate from battle history in case of switching)
|
||||||
u8 boosterEnergyActivates:1;
|
|
||||||
u8 roostActive:1;
|
u8 roostActive:1;
|
||||||
u8 unburdenActive:1;
|
u8 unburdenActive:1;
|
||||||
u8 neutralizingGas:1;
|
u8 neutralizingGas:1;
|
||||||
u8 iceFaceActivationPrevention:1; // fixes hit escape move edge case
|
u8 iceFaceActivationPrevention:1; // fixes hit escape move edge case
|
||||||
u8 unnerveActivated:1; // Unnerve and As One (Unnerve part) activate only once per switch in
|
u8 unnerveActivated:1; // Unnerve and As One (Unnerve part) activate only once per switch in
|
||||||
u8 padding:3;
|
u8 hazardsDone:1;
|
||||||
|
u8 padding1:1;
|
||||||
|
u8 octolockedBy:3;
|
||||||
|
u8 padding2:5;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Fully Cleared each turn after end turn effects are done. A few things are cleared before end turn effects
|
// Fully Cleared each turn after end turn effects are done. A few things are cleared before end turn effects
|
||||||
@ -159,7 +158,7 @@ struct ProtectStruct
|
|||||||
u32 unused:8;
|
u32 unused:8;
|
||||||
// End of 32-bit bitfield
|
// End of 32-bit bitfield
|
||||||
u16 disableEjectPack:1;
|
u16 disableEjectPack:1;
|
||||||
u16 statFell:1;
|
u16 tryEjectPack:1;
|
||||||
u16 pranksterElevated:1;
|
u16 pranksterElevated:1;
|
||||||
u16 quickDraw:1;
|
u16 quickDraw:1;
|
||||||
u16 beakBlastCharge:1;
|
u16 beakBlastCharge:1;
|
||||||
@ -222,21 +221,18 @@ struct SideTimer
|
|||||||
u16 lightscreenTimer;
|
u16 lightscreenTimer;
|
||||||
u16 mistTimer;
|
u16 mistTimer;
|
||||||
u16 safeguardTimer;
|
u16 safeguardTimer;
|
||||||
u16 spikesAmount; // debug menu complains. might be better to solve there instead if possible
|
u8 spikesAmount:4;
|
||||||
u16 toxicSpikesAmount;
|
u8 toxicSpikesAmount:4;
|
||||||
u16 stealthRockAmount;
|
|
||||||
u16 stickyWebAmount;
|
|
||||||
u8 stickyWebBattlerId;
|
u8 stickyWebBattlerId;
|
||||||
u8 stickyWebBattlerSide; // Used for Court Change
|
u8 stickyWebBattlerSide; // Used for Court Change
|
||||||
u16 auroraVeilTimer;
|
u16 auroraVeilTimer;
|
||||||
u16 tailwindTimer;
|
u16 tailwindTimer;
|
||||||
u16 luckyChantTimer;
|
u16 luckyChantTimer;
|
||||||
u16 steelsurgeAmount;
|
|
||||||
// Timers below this point are not swapped by Court Change
|
// Timers below this point are not swapped by Court Change
|
||||||
u16 followmeTimer;
|
u8 followmeTimer:4;
|
||||||
u8 followmeTarget:3;
|
u8 followmeTarget:3;
|
||||||
u8 followmePowder:1; // Rage powder, does not affect grass type pokemon.
|
u8 followmePowder:1; // Rage powder, does not affect grass type pokemon.
|
||||||
u16 retaliateTimer;
|
u8 retaliateTimer;
|
||||||
u16 damageNonTypesTimer;
|
u16 damageNonTypesTimer;
|
||||||
u8 damageNonTypesType;
|
u8 damageNonTypesType;
|
||||||
u16 rainbowTimer;
|
u16 rainbowTimer;
|
||||||
@ -335,12 +331,12 @@ struct AiLogicData
|
|||||||
u8 ejectButtonSwitch:1; // Tracks whether current switch out was from Eject Button
|
u8 ejectButtonSwitch:1; // Tracks whether current switch out was from Eject Button
|
||||||
u8 ejectPackSwitch:1; // Tracks whether current switch out was from Eject Pack
|
u8 ejectPackSwitch:1; // Tracks whether current switch out was from Eject Pack
|
||||||
u8 predictingSwitch:1; // Determines whether AI will use switch predictions this turn or not
|
u8 predictingSwitch:1; // Determines whether AI will use switch predictions this turn or not
|
||||||
u8 predictingMove:1; // Determines whether AI will use move predictions this turn or not
|
|
||||||
u8 aiPredictionInProgress:1; // Tracks whether the AI is in the middle of running prediction calculations
|
u8 aiPredictionInProgress:1; // Tracks whether the AI is in the middle of running prediction calculations
|
||||||
u8 padding:2;
|
|
||||||
u8 shouldSwitch; // Stores result of ShouldSwitch, which decides whether a mon should be switched out
|
|
||||||
u8 aiCalcInProgress:1;
|
u8 aiCalcInProgress:1;
|
||||||
u8 battlerDoingPrediction; // Stores which battler is currently running its prediction calcs
|
u8 predictingMove:1; // Determines whether AI will use move predictions this turn or not
|
||||||
|
u8 padding1:1;
|
||||||
|
u8 shouldSwitch:4; // Stores result of ShouldSwitch, which decides whether a mon should be switched out
|
||||||
|
u8 padding2:4;
|
||||||
u16 predictedMove[MAX_BATTLERS_COUNT];
|
u16 predictedMove[MAX_BATTLERS_COUNT];
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -350,7 +346,6 @@ struct AiThinkingStruct
|
|||||||
u8 movesetIndex;
|
u8 movesetIndex;
|
||||||
u16 moveConsidered;
|
u16 moveConsidered;
|
||||||
s32 score[MAX_MON_MOVES];
|
s32 score[MAX_MON_MOVES];
|
||||||
u32 funcResult;
|
|
||||||
u64 aiFlags[MAX_BATTLERS_COUNT];
|
u64 aiFlags[MAX_BATTLERS_COUNT];
|
||||||
u8 aiAction;
|
u8 aiAction;
|
||||||
u8 aiLogicId;
|
u8 aiLogicId;
|
||||||
@ -575,7 +570,6 @@ struct BattlerState
|
|||||||
u8 targetsDone[MAX_BATTLERS_COUNT];
|
u8 targetsDone[MAX_BATTLERS_COUNT];
|
||||||
|
|
||||||
u32 commandingDondozo:1;
|
u32 commandingDondozo:1;
|
||||||
u32 absent:1;
|
|
||||||
u32 focusPunchBattlers:1;
|
u32 focusPunchBattlers:1;
|
||||||
u32 multipleSwitchInBattlers:1;
|
u32 multipleSwitchInBattlers:1;
|
||||||
u32 alreadyStatusedMoveAttempt:1; // For example when using Thunder Wave on an already paralyzed Pokémon.
|
u32 alreadyStatusedMoveAttempt:1; // For example when using Thunder Wave on an already paralyzed Pokémon.
|
||||||
@ -590,7 +584,9 @@ struct BattlerState
|
|||||||
u32 stompingTantrumTimer:2;
|
u32 stompingTantrumTimer:2;
|
||||||
u32 canPickupItem:1;
|
u32 canPickupItem:1;
|
||||||
u32 itemCanBeKnockedOff:1;
|
u32 itemCanBeKnockedOff:1;
|
||||||
u32 padding:15;
|
u32 ateBoost:1;
|
||||||
|
u32 commanderSpecies:11;
|
||||||
|
u32 padding:4;
|
||||||
// End of Word
|
// End of Word
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -602,7 +598,9 @@ struct PartyState
|
|||||||
u32 battleBondBoost:1;
|
u32 battleBondBoost:1;
|
||||||
u32 transformZeroToHero:1;
|
u32 transformZeroToHero:1;
|
||||||
u32 supersweetSyrup:1;
|
u32 supersweetSyrup:1;
|
||||||
u32 padding:26;
|
u32 timesGotHit:5;
|
||||||
|
u32 changedSpecies:11; // For forms when multiple mons can change into the same pokemon.
|
||||||
|
u32 padding:10;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Cleared at the beginning of the battle. Fields need to be cleared when needed manually otherwise.
|
// Cleared at the beginning of the battle. Fields need to be cleared when needed manually otherwise.
|
||||||
@ -710,7 +708,6 @@ struct BattleStruct
|
|||||||
u8 savedBattlerAttacker[5];
|
u8 savedBattlerAttacker[5];
|
||||||
u8 savedTargetCount:4;
|
u8 savedTargetCount:4;
|
||||||
u8 savedAttackerCount:4;
|
u8 savedAttackerCount:4;
|
||||||
bool8 ateBoost[MAX_BATTLERS_COUNT];
|
|
||||||
u8 abilityPopUpSpriteIds[MAX_BATTLERS_COUNT][NUM_BATTLE_SIDES]; // two per battler
|
u8 abilityPopUpSpriteIds[MAX_BATTLERS_COUNT][NUM_BATTLE_SIDES]; // two per battler
|
||||||
struct ZMoveData zmove;
|
struct ZMoveData zmove;
|
||||||
struct DynamaxData dynamax;
|
struct DynamaxData dynamax;
|
||||||
@ -725,7 +722,6 @@ struct BattleStruct
|
|||||||
u8 soulheartBattlerId;
|
u8 soulheartBattlerId;
|
||||||
u8 friskedBattler; // Frisk needs to identify 2 battlers in double battles.
|
u8 friskedBattler; // Frisk needs to identify 2 battlers in double battles.
|
||||||
u8 sameMoveTurns[MAX_BATTLERS_COUNT]; // For Metronome, number of times the same moves has been SUCCESFULLY used.
|
u8 sameMoveTurns[MAX_BATTLERS_COUNT]; // For Metronome, number of times the same moves has been SUCCESFULLY used.
|
||||||
u16 changedSpecies[NUM_BATTLE_SIDES][PARTY_SIZE]; // For forms when multiple mons can change into the same pokemon.
|
|
||||||
u8 quickClawBattlerId;
|
u8 quickClawBattlerId;
|
||||||
struct LostItem itemLost[NUM_BATTLE_SIDES][PARTY_SIZE]; // Pokemon that had items consumed or stolen (two bytes per party member per side)
|
struct LostItem itemLost[NUM_BATTLE_SIDES][PARTY_SIZE]; // Pokemon that had items consumed or stolen (two bytes per party member per side)
|
||||||
u8 blunderPolicy:1; // should blunder policy activate
|
u8 blunderPolicy:1; // should blunder policy activate
|
||||||
@ -753,19 +749,16 @@ struct BattleStruct
|
|||||||
s32 aiDelayTimer; // Counts number of frames AI takes to choose an action.
|
s32 aiDelayTimer; // Counts number of frames AI takes to choose an action.
|
||||||
s32 aiDelayFrames; // Number of frames it took 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.
|
s32 aiDelayCycles; // Number of cycles it took to choose an action.
|
||||||
u8 timesGotHit[NUM_BATTLE_SIDES][PARTY_SIZE];
|
|
||||||
u8 stickySyrupdBy[MAX_BATTLERS_COUNT];
|
u8 stickySyrupdBy[MAX_BATTLERS_COUNT];
|
||||||
u8 supremeOverlordCounter[MAX_BATTLERS_COUNT];
|
u8 supremeOverlordCounter[MAX_BATTLERS_COUNT];
|
||||||
u8 shellSideArmCategory[MAX_BATTLERS_COUNT][MAX_BATTLERS_COUNT];
|
u8 shellSideArmCategory[MAX_BATTLERS_COUNT][MAX_BATTLERS_COUNT];
|
||||||
u8 speedTieBreaks; // MAX_BATTLERS_COUNT! values.
|
u8 speedTieBreaks; // MAX_BATTLERS_COUNT! values.
|
||||||
u8 categoryOverride; // for Z-Moves and Max Moves
|
enum DamageCategory categoryOverride:8; // for Z-Moves and Max Moves
|
||||||
u16 commanderActive[MAX_BATTLERS_COUNT];
|
|
||||||
u32 stellarBoostFlags[NUM_BATTLE_SIDES]; // stored as a bitfield of flags for all types for each side
|
u32 stellarBoostFlags[NUM_BATTLE_SIDES]; // stored as a bitfield of flags for all types for each side
|
||||||
u8 monCausingSleepClause[NUM_BATTLE_SIDES]; // Stores which pokemon on a given side is causing Sleep Clause to be active as the mon's index in the party
|
u8 monCausingSleepClause[NUM_BATTLE_SIDES]; // Stores which pokemon on a given side is causing Sleep Clause to be active as the mon's index in the party
|
||||||
u8 additionalEffectsCounter:4; // A counter for the additionalEffects applied by the current move in Cmd_setadditionaleffects
|
u16 opponentMonCanTera:6;
|
||||||
s16 savedcheekPouchDamage; // Cheek Pouch can happen in the middle of an attack execution so we need to store the current dmg
|
u16 opponentMonCanDynamax:6;
|
||||||
u8 cheekPouchActivated:1;
|
u16 additionalEffectsCounter:4; // A counter for the additionalEffects applied by the current move in Cmd_setadditionaleffects
|
||||||
u8 padding2:3;
|
|
||||||
u8 pursuitStoredSwitch; // Stored id for the Pursuit target's switch
|
u8 pursuitStoredSwitch; // Stored id for the Pursuit target's switch
|
||||||
s32 battlerExpReward;
|
s32 battlerExpReward;
|
||||||
u16 prevTurnSpecies[MAX_BATTLERS_COUNT]; // Stores species the AI has in play at start of turn
|
u16 prevTurnSpecies[MAX_BATTLERS_COUNT]; // Stores species the AI has in play at start of turn
|
||||||
@ -773,19 +766,21 @@ struct BattleStruct
|
|||||||
s16 critChance[MAX_BATTLERS_COUNT];
|
s16 critChance[MAX_BATTLERS_COUNT];
|
||||||
u16 moveResultFlags[MAX_BATTLERS_COUNT];
|
u16 moveResultFlags[MAX_BATTLERS_COUNT];
|
||||||
u8 missStringId[MAX_BATTLERS_COUNT];
|
u8 missStringId[MAX_BATTLERS_COUNT];
|
||||||
u8 noResultString[MAX_BATTLERS_COUNT];
|
enum CalcDamageState noResultString[MAX_BATTLERS_COUNT];
|
||||||
u8 doneDoublesSpreadHit:1;
|
u8 doneDoublesSpreadHit:1;
|
||||||
u8 calculatedDamageDone:1;
|
u8 calculatedDamageDone:1;
|
||||||
u8 calculatedSpreadMoveAccuracy:1;
|
u8 calculatedSpreadMoveAccuracy:1;
|
||||||
u8 printedStrongWindsWeakenedAttack:1;
|
u8 printedStrongWindsWeakenedAttack:1;
|
||||||
u8 numSpreadTargets:2;
|
u8 numSpreadTargets:2;
|
||||||
u8 bypassMoldBreakerChecks:1; // for ABILITYEFFECT_IMMUNITY
|
|
||||||
u8 noTargetPresent:1;
|
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
|
||||||
struct MessageStatus slideMessageStatus;
|
struct MessageStatus slideMessageStatus;
|
||||||
u8 trainerSlideSpriteIds[MAX_BATTLERS_COUNT];
|
u8 trainerSlideSpriteIds[MAX_BATTLERS_COUNT];
|
||||||
u16 opponentMonCanTera:6;
|
u8 hazardsQueue[NUM_BATTLE_SIDES][HAZARDS_MAX_COUNT];
|
||||||
u16 opponentMonCanDynamax:6;
|
u8 numHazards[NUM_BATTLE_SIDES];
|
||||||
u16 padding:4;
|
u8 hazardsCounter:4; // Counter for applying hazard on switch in
|
||||||
|
u8 padding2:4;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct AiBattleData
|
struct AiBattleData
|
||||||
@ -794,6 +789,7 @@ struct AiBattleData
|
|||||||
u8 playerStallMons[PARTY_SIZE];
|
u8 playerStallMons[PARTY_SIZE];
|
||||||
u8 chosenMoveIndex[MAX_BATTLERS_COUNT];
|
u8 chosenMoveIndex[MAX_BATTLERS_COUNT];
|
||||||
u8 chosenTarget[MAX_BATTLERS_COUNT];
|
u8 chosenTarget[MAX_BATTLERS_COUNT];
|
||||||
|
u16 aiUsingGimmick:6;
|
||||||
u8 actionFlee:1;
|
u8 actionFlee:1;
|
||||||
u8 choiceWatch:1;
|
u8 choiceWatch:1;
|
||||||
u8 padding:6;
|
u8 padding:6;
|
||||||
@ -854,11 +850,11 @@ static inline bool32 IsBattleMoveStatus(u32 move)
|
|||||||
gBattleMons[battler].types[2] = TYPE_MYSTERY; \
|
gBattleMons[battler].types[2] = TYPE_MYSTERY; \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define RESTORE_BATTLER_TYPE(battler) \
|
#define RESTORE_BATTLER_TYPE(battler) \
|
||||||
{ \
|
{ \
|
||||||
gBattleMons[battler].types[0] = gSpeciesInfo[gBattleMons[battler].species].types[0]; \
|
gBattleMons[battler].types[0] = GetSpeciesType(gBattleMons[battler].species, 0); \
|
||||||
gBattleMons[battler].types[1] = gSpeciesInfo[gBattleMons[battler].species].types[1]; \
|
gBattleMons[battler].types[1] = GetSpeciesType(gBattleMons[battler].species, 1); \
|
||||||
gBattleMons[battler].types[2] = TYPE_MYSTERY; \
|
gBattleMons[battler].types[2] = TYPE_MYSTERY; \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define GET_STAT_BUFF_ID(n) ((n & 7)) // first three bits 0x1, 0x2, 0x4
|
#define GET_STAT_BUFF_ID(n) ((n & 7)) // first three bits 0x1, 0x2, 0x4
|
||||||
@ -871,8 +867,6 @@ static inline bool32 IsBattleMoveStatus(u32 move)
|
|||||||
#define SET_STATCHANGER(statId, stage, goesDown) (gBattleScripting.statChanger = (statId) + ((stage) << 3) + (goesDown << 7))
|
#define SET_STATCHANGER(statId, stage, goesDown) (gBattleScripting.statChanger = (statId) + ((stage) << 3) + (goesDown << 7))
|
||||||
#define SET_STATCHANGER2(dst, statId, stage, goesDown)(dst = (statId) + ((stage) << 3) + (goesDown << 7))
|
#define SET_STATCHANGER2(dst, statId, stage, goesDown)(dst = (statId) + ((stage) << 3) + (goesDown << 7))
|
||||||
|
|
||||||
#define DO_ACCURACY_CHECK 2 // Don't skip the accuracy check before the move might be absorbed
|
|
||||||
|
|
||||||
// NOTE: The members of this struct have hard-coded offsets
|
// NOTE: The members of this struct have hard-coded offsets
|
||||||
// in include/constants/battle_script_commands.h
|
// in include/constants/battle_script_commands.h
|
||||||
struct BattleScripting
|
struct BattleScripting
|
||||||
@ -1081,8 +1075,6 @@ extern u32 gHitMarker;
|
|||||||
extern u8 gBideTarget[MAX_BATTLERS_COUNT];
|
extern u8 gBideTarget[MAX_BATTLERS_COUNT];
|
||||||
extern u32 gSideStatuses[NUM_BATTLE_SIDES];
|
extern u32 gSideStatuses[NUM_BATTLE_SIDES];
|
||||||
extern struct SideTimer gSideTimers[NUM_BATTLE_SIDES];
|
extern struct SideTimer gSideTimers[NUM_BATTLE_SIDES];
|
||||||
extern u32 gStatuses3[MAX_BATTLERS_COUNT];
|
|
||||||
extern u32 gStatuses4[MAX_BATTLERS_COUNT];
|
|
||||||
extern struct DisableStruct gDisableStructs[MAX_BATTLERS_COUNT];
|
extern struct DisableStruct gDisableStructs[MAX_BATTLERS_COUNT];
|
||||||
extern u16 gPauseCounterBattle;
|
extern u16 gPauseCounterBattle;
|
||||||
extern u16 gPaydayMoney;
|
extern u16 gPaydayMoney;
|
||||||
@ -1224,6 +1216,11 @@ static inline struct Pokemon *GetBattlerParty(u32 battler)
|
|||||||
return GetSideParty(GetBattlerSide(battler));
|
return GetSideParty(GetBattlerSide(battler));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline struct PartyState *GetBattlerPartyState(u32 battler)
|
||||||
|
{
|
||||||
|
return &gBattleStruct->partyState[GetBattlerSide(battler)][gBattlerPartyIndexes[battler]];
|
||||||
|
}
|
||||||
|
|
||||||
static inline bool32 IsDoubleBattle(void)
|
static inline bool32 IsDoubleBattle(void)
|
||||||
{
|
{
|
||||||
return gBattleTypeFlags & BATTLE_TYPE_DOUBLE;
|
return gBattleTypeFlags & BATTLE_TYPE_DOUBLE;
|
||||||
|
|||||||
18
include/battle_ai_field_statuses.h
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#ifndef GUARD_BATTLE_AI_FIELD_STATUSES_H
|
||||||
|
#define GUARD_BATTLE_AI_FIELD_STATUSES_H
|
||||||
|
|
||||||
|
#include "battle_ai_main.h"
|
||||||
|
#include "battle_ai_util.h"
|
||||||
|
|
||||||
|
enum FieldEffectOutcome
|
||||||
|
{
|
||||||
|
FIELD_EFFECT_POSITIVE,
|
||||||
|
FIELD_EFFECT_NEUTRAL,
|
||||||
|
FIELD_EFFECT_NEGATIVE,
|
||||||
|
FIELD_EFFECT_BLOCKED,
|
||||||
|
};
|
||||||
|
|
||||||
|
bool32 WeatherChecker(u32 battler, u32 weather, enum FieldEffectOutcome desiredResult);
|
||||||
|
bool32 FieldStatusChecker(u32 battler, u32 fieldStatus, enum FieldEffectOutcome desiredResult);
|
||||||
|
|
||||||
|
#endif //GUARD_BATTLE_AI_FIELD_STATUSES_H
|
||||||
@ -38,7 +38,18 @@ enum AIScore
|
|||||||
WEAK_EFFECT = 1,
|
WEAK_EFFECT = 1,
|
||||||
DECENT_EFFECT = 2,
|
DECENT_EFFECT = 2,
|
||||||
GOOD_EFFECT = 3,
|
GOOD_EFFECT = 3,
|
||||||
BEST_EFFECT = 4
|
BEST_EFFECT = 4,
|
||||||
|
PERFECT_EFFECT = 10,
|
||||||
|
BAD_EFFECT = -1,
|
||||||
|
AWFUL_EFFECT = -3,
|
||||||
|
WORST_EFFECT = -10
|
||||||
|
};
|
||||||
|
|
||||||
|
enum MoveComparisonResult
|
||||||
|
{
|
||||||
|
MOVE_NEUTRAL_COMPARISON,
|
||||||
|
MOVE_WON_COMPARISON,
|
||||||
|
MOVE_LOST_COMPARISON,
|
||||||
};
|
};
|
||||||
|
|
||||||
// AI_TryToFaint
|
// AI_TryToFaint
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
#define GUARD_BATTLE_AI_UTIL_H
|
#define GUARD_BATTLE_AI_UTIL_H
|
||||||
|
|
||||||
#include "battle_ai_main.h"
|
#include "battle_ai_main.h"
|
||||||
|
#include "battle_ai_field_statuses.h"
|
||||||
|
|
||||||
#define FOE(battler) ((BATTLE_OPPOSITE(battler)) & BIT_SIDE)
|
#define FOE(battler) ((BATTLE_OPPOSITE(battler)) & BIT_SIDE)
|
||||||
|
|
||||||
@ -28,8 +29,10 @@ enum DamageCalcContext
|
|||||||
enum AiCompareMovesPriority
|
enum AiCompareMovesPriority
|
||||||
{
|
{
|
||||||
PRIORITY_EFFECT,
|
PRIORITY_EFFECT,
|
||||||
|
PRIORITY_GUARANTEE,
|
||||||
PRIORITY_ACCURACY,
|
PRIORITY_ACCURACY,
|
||||||
PRIORITY_NOT_CHARGING
|
PRIORITY_NOT_CHARGING,
|
||||||
|
PRIORITY_SPEED,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum AIPivot
|
enum AIPivot
|
||||||
@ -47,6 +50,18 @@ enum WeatherState
|
|||||||
WEATHER_INACTIVE_AND_BLOCKED,
|
WEATHER_INACTIVE_AND_BLOCKED,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum AIConsiderGimmick
|
||||||
|
{
|
||||||
|
NO_GIMMICK,
|
||||||
|
USE_GIMMICK,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum ConsiderPriority
|
||||||
|
{
|
||||||
|
DONT_CONSIDER_PRIORITY,
|
||||||
|
CONSIDER_PRIORITY,
|
||||||
|
};
|
||||||
|
|
||||||
static inline bool32 IsMoveUnusable(u32 moveIndex, u32 move, u32 moveLimitations)
|
static inline bool32 IsMoveUnusable(u32 moveIndex, u32 move, u32 moveLimitations)
|
||||||
{
|
{
|
||||||
return move == MOVE_NONE
|
return move == MOVE_NONE
|
||||||
@ -56,13 +71,19 @@ static inline bool32 IsMoveUnusable(u32 moveIndex, u32 move, u32 moveLimitations
|
|||||||
|
|
||||||
typedef bool32 (*MoveFlag)(u32 move);
|
typedef bool32 (*MoveFlag)(u32 move);
|
||||||
|
|
||||||
bool32 AI_IsFaster(u32 battlerAi, u32 battlerDef, u32 move);
|
bool32 AI_IsFaster(u32 battlerAi, u32 battlerDef, u32 aiMove, u32 playerMove, enum ConsiderPriority considerPriority);
|
||||||
bool32 AI_IsSlower(u32 battlerAi, u32 battlerDef, u32 move);
|
bool32 AI_IsSlower(u32 battlerAi, u32 battlerDef, u32 aiMove, u32 playerMove, enum ConsiderPriority considerPriority);
|
||||||
|
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_RandLessThan(u32 val);
|
||||||
u32 AI_GetDamage(u32 battlerAtk, u32 battlerDef, u32 moveIndex, enum DamageCalcContext calcContext, struct AiLogicData *aiData);
|
u32 AI_GetDamage(u32 battlerAtk, u32 battlerDef, u32 moveIndex, enum DamageCalcContext calcContext, struct AiLogicData *aiData);
|
||||||
bool32 IsAiVsAiBattle(void);
|
bool32 IsAiVsAiBattle(void);
|
||||||
bool32 BattlerHasAi(u32 battlerId);
|
bool32 BattlerHasAi(u32 battlerId);
|
||||||
bool32 IsAiBattlerAware(u32 battlerId);
|
bool32 IsAiBattlerAware(u32 battlerId);
|
||||||
|
bool32 CanAiPredictMove(void);
|
||||||
|
bool32 IsAiBattlerAssumingStab(void);
|
||||||
|
bool32 IsAiBattlerAssumingStatusMoves(void);
|
||||||
|
bool32 ShouldRecordStatusMove(u32 move);
|
||||||
void ClearBattlerMoveHistory(u32 battlerId);
|
void ClearBattlerMoveHistory(u32 battlerId);
|
||||||
void RecordLastUsedMoveBy(u32 battlerId, u32 move);
|
void RecordLastUsedMoveBy(u32 battlerId, u32 move);
|
||||||
void RecordAllMoves(u32 battler);
|
void RecordAllMoves(u32 battler);
|
||||||
@ -82,9 +103,9 @@ bool32 AI_BattlerAtMaxHp(u32 battler);
|
|||||||
u32 GetHealthPercentage(u32 battler);
|
u32 GetHealthPercentage(u32 battler);
|
||||||
bool32 AI_CanBattlerEscape(u32 battler);
|
bool32 AI_CanBattlerEscape(u32 battler);
|
||||||
bool32 IsBattlerTrapped(u32 battlerAtk, u32 battlerDef);
|
bool32 IsBattlerTrapped(u32 battlerAtk, u32 battlerDef);
|
||||||
s32 AI_WhoStrikesFirst(u32 battlerAI, u32 battler2, u32 moveConsidered);
|
s32 AI_WhoStrikesFirst(u32 battlerAI, u32 battler2, u32 aiMoveConsidered, u32 playerMoveConsidered, enum ConsiderPriority considerPriority);
|
||||||
bool32 CanTargetFaintAi(u32 battlerDef, u32 battlerAtk);
|
bool32 CanTargetFaintAi(u32 battlerDef, u32 battlerAtk);
|
||||||
u32 NoOfHitsForTargetToFaintAI(u32 battlerDef, u32 battlerAtk);
|
u32 NoOfHitsForTargetToFaintBattler(u32 battlerDef, u32 battlerAtk);
|
||||||
u32 GetBestDmgMoveFromBattler(u32 battlerAtk, u32 battlerDef, enum DamageCalcContext calcContext);
|
u32 GetBestDmgMoveFromBattler(u32 battlerAtk, u32 battlerDef, enum DamageCalcContext calcContext);
|
||||||
u32 GetBestDmgFromBattler(u32 battler, u32 battlerTarget, enum DamageCalcContext calcContext);
|
u32 GetBestDmgFromBattler(u32 battler, u32 battlerTarget, enum DamageCalcContext calcContext);
|
||||||
bool32 CanTargetMoveFaintAi(u32 move, u32 battlerDef, u32 battlerAtk, u32 nHits);
|
bool32 CanTargetMoveFaintAi(u32 move, u32 battlerDef, u32 battlerAtk, u32 nHits);
|
||||||
@ -93,10 +114,10 @@ s32 AI_DecideKnownAbilityForTurn(u32 battlerId);
|
|||||||
enum ItemHoldEffect AI_DecideHoldEffectForTurn(u32 battlerId);
|
enum ItemHoldEffect AI_DecideHoldEffectForTurn(u32 battlerId);
|
||||||
bool32 DoesBattlerIgnoreAbilityChecks(u32 battlerAtk, u32 atkAbility, u32 move);
|
bool32 DoesBattlerIgnoreAbilityChecks(u32 battlerAtk, u32 atkAbility, u32 move);
|
||||||
u32 AI_GetWeather(void);
|
u32 AI_GetWeather(void);
|
||||||
|
u32 AI_GetSwitchinWeather(struct BattlePokemon battleMon);
|
||||||
enum WeatherState IsWeatherActive(u32 flags);
|
enum WeatherState IsWeatherActive(u32 flags);
|
||||||
bool32 CanAIFaintTarget(u32 battlerAtk, u32 battlerDef, u32 numHits);
|
bool32 CanAIFaintTarget(u32 battlerAtk, u32 battlerDef, u32 numHits);
|
||||||
bool32 CanIndexMoveFaintTarget(u32 battlerAtk, u32 battlerDef, u32 index, enum DamageCalcContext calcContext);
|
bool32 CanIndexMoveFaintTarget(u32 battlerAtk, u32 battlerDef, u32 index, enum DamageCalcContext calcContext);
|
||||||
bool32 CanIndexMoveGuaranteeFaintTarget(u32 battlerAtk, u32 battlerDef, u32 index);
|
|
||||||
bool32 HasDamagingMove(u32 battlerId);
|
bool32 HasDamagingMove(u32 battlerId);
|
||||||
bool32 HasDamagingMoveOfType(u32 battlerId, u32 type);
|
bool32 HasDamagingMoveOfType(u32 battlerId, u32 type);
|
||||||
u32 GetBattlerSecondaryDamage(u32 battlerId);
|
u32 GetBattlerSecondaryDamage(u32 battlerId);
|
||||||
@ -104,9 +125,8 @@ bool32 BattlerWillFaintFromWeather(u32 battler, u32 ability);
|
|||||||
bool32 BattlerWillFaintFromSecondaryDamage(u32 battler, u32 ability);
|
bool32 BattlerWillFaintFromSecondaryDamage(u32 battler, u32 ability);
|
||||||
bool32 ShouldTryOHKO(u32 battlerAtk, u32 battlerDef, u32 atkAbility, u32 defAbility, u32 move);
|
bool32 ShouldTryOHKO(u32 battlerAtk, u32 battlerDef, u32 atkAbility, u32 defAbility, u32 move);
|
||||||
bool32 ShouldUseRecoilMove(u32 battlerAtk, u32 battlerDef, u32 recoilDmg, u32 moveIndex);
|
bool32 ShouldUseRecoilMove(u32 battlerAtk, u32 battlerDef, u32 recoilDmg, u32 moveIndex);
|
||||||
u32 GetBattlerSideSpeedAverage(u32 battler);
|
|
||||||
bool32 ShouldAbsorb(u32 battlerAtk, u32 battlerDef, u32 move, s32 damage);
|
bool32 ShouldAbsorb(u32 battlerAtk, u32 battlerDef, u32 move, s32 damage);
|
||||||
bool32 ShouldRecover(u32 battlerAtk, u32 battlerDef, u32 move, u32 healPercent, enum DamageCalcContext calcContext);
|
bool32 ShouldRecover(u32 battlerAtk, u32 battlerDef, u32 move, u32 healPercent);
|
||||||
bool32 ShouldSetScreen(u32 battlerAtk, u32 battlerDef, enum BattleMoveEffects moveEffect);
|
bool32 ShouldSetScreen(u32 battlerAtk, u32 battlerDef, enum BattleMoveEffects moveEffect);
|
||||||
enum AIPivot ShouldPivot(u32 battlerAtk, u32 battlerDef, u32 defAbility, u32 move, u32 moveIndex);
|
enum AIPivot ShouldPivot(u32 battlerAtk, u32 battlerDef, u32 defAbility, u32 move, u32 moveIndex);
|
||||||
bool32 IsRecycleEncouragedItem(u32 item);
|
bool32 IsRecycleEncouragedItem(u32 item);
|
||||||
@ -117,45 +137,47 @@ bool32 IsAbilityOfRating(u32 ability, s8 rating);
|
|||||||
bool32 AI_IsAbilityOnSide(u32 battlerId, u32 ability);
|
bool32 AI_IsAbilityOnSide(u32 battlerId, u32 ability);
|
||||||
bool32 AI_MoveMakesContact(u32 ability, enum ItemHoldEffect holdEffect, u32 move);
|
bool32 AI_MoveMakesContact(u32 ability, enum ItemHoldEffect holdEffect, u32 move);
|
||||||
bool32 ShouldUseZMove(u32 battlerAtk, u32 battlerDef, u32 chosenMove);
|
bool32 ShouldUseZMove(u32 battlerAtk, u32 battlerDef, u32 chosenMove);
|
||||||
u32 AI_GetBattlerAbility(u32 battler);
|
void SetAIUsingGimmick(u32 battler, enum AIConsiderGimmick use);
|
||||||
|
bool32 IsAIUsingGimmick(u32 battler);
|
||||||
|
void DecideTerastal(u32 battler);
|
||||||
|
bool32 CanEndureHit(u32 battler, u32 battlerTarget, u32 move);
|
||||||
|
|
||||||
// stat stage checks
|
// stat stage checks
|
||||||
bool32 AnyStatIsRaised(u32 battlerId);
|
bool32 AnyStatIsRaised(u32 battlerId);
|
||||||
bool32 ShouldLowerStat(u32 battlerAtk, u32 battlerDef, u32 abilityDef, u32 stat);
|
bool32 CanLowerStat(u32 battlerAtk, u32 battlerDef, struct AiLogicData *aiData, u32 stat);
|
||||||
bool32 BattlerStatCanRise(u32 battler, u32 battlerAbility, u32 stat);
|
bool32 BattlerStatCanRise(u32 battler, u32 battlerAbility, u32 stat);
|
||||||
bool32 AreBattlersStatsMaxed(u32 battler);
|
bool32 AreBattlersStatsMaxed(u32 battler);
|
||||||
u32 CountPositiveStatStages(u32 battlerId);
|
u32 CountPositiveStatStages(u32 battlerId);
|
||||||
u32 CountNegativeStatStages(u32 battlerId);
|
u32 CountNegativeStatStages(u32 battlerId);
|
||||||
bool32 ShouldLowerAttack(u32 battlerAtk, u32 battlerDef, u32 defAbility);
|
|
||||||
bool32 ShouldLowerDefense(u32 battlerAtk, u32 battlerDef, u32 defAbility);
|
|
||||||
bool32 ShouldLowerSpeed(u32 battlerAtk, u32 battlerDef, u32 defAbility);
|
|
||||||
bool32 ShouldLowerSpAtk(u32 battlerAtk, u32 battlerDef, u32 defAbility);
|
|
||||||
bool32 ShouldLowerSpDef(u32 battlerAtk, u32 battlerDef, u32 defAbility);
|
|
||||||
bool32 ShouldLowerAccuracy(u32 battlerAtk, u32 battlerDef, u32 defAbility);
|
|
||||||
bool32 ShouldLowerEvasion(u32 battlerAtk, u32 battlerDef, u32 defAbility);
|
|
||||||
|
|
||||||
// move checks
|
// move checks
|
||||||
bool32 IsAffectedByPowder(u32 battler, u32 ability, enum ItemHoldEffect holdEffect);
|
bool32 IsAffectedByPowder(u32 battler, u32 ability, enum ItemHoldEffect holdEffect);
|
||||||
bool32 MovesWithCategoryUnusable(u32 attacker, u32 target, u32 category);
|
bool32 MovesWithCategoryUnusable(u32 attacker, u32 target, enum DamageCategory category);
|
||||||
s32 AI_WhichMoveBetter(u32 move1, u32 move2, u32 battlerAtk, u32 battlerDef, s32 noOfHitsToKo);
|
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, bool32 considerZPower);
|
struct SimulatedDamage AI_CalcDamageSaveBattlers(u32 move, u32 battlerAtk, u32 battlerDef, uq4_12_t *typeEffectiveness, enum AIConsiderGimmick considerGimmickAtk, enum AIConsiderGimmick considerGimmickDef);
|
||||||
struct SimulatedDamage AI_CalcDamage(u32 move, u32 battlerAtk, u32 battlerDef, uq4_12_t *typeEffectiveness, bool32 considerZPower, u32 weather);
|
struct SimulatedDamage AI_CalcDamage(u32 move, u32 battlerAtk, u32 battlerDef, uq4_12_t *typeEffectiveness, enum AIConsiderGimmick considerGimmickAtk, enum AIConsiderGimmick considerGimmickDef, u32 weather);
|
||||||
bool32 AI_IsDamagedByRecoil(u32 battler);
|
bool32 AI_IsDamagedByRecoil(u32 battler);
|
||||||
u32 GetNoOfHitsToKO(u32 dmg, s32 hp);
|
u32 GetNoOfHitsToKO(u32 dmg, s32 hp);
|
||||||
u32 GetNoOfHitsToKOBattlerDmg(u32 dmg, u32 battlerDef);
|
u32 GetNoOfHitsToKOBattlerDmg(u32 dmg, u32 battlerDef);
|
||||||
u32 GetNoOfHitsToKOBattler(u32 battlerAtk, u32 battlerDef, u32 moveIndex, enum DamageCalcContext calcContext);
|
u32 GetNoOfHitsToKOBattler(u32 battlerAtk, u32 battlerDef, u32 moveIndex, enum DamageCalcContext calcContext);
|
||||||
|
u32 GetBestNoOfHitsToKO(u32 battlerAtk, u32 battlerDef, enum DamageCalcContext calcContext);
|
||||||
u32 GetCurrDamageHpPercent(u32 battlerAtk, u32 battlerDef, enum DamageCalcContext calcContext);
|
u32 GetCurrDamageHpPercent(u32 battlerAtk, u32 battlerDef, enum DamageCalcContext calcContext);
|
||||||
uq4_12_t AI_GetMoveEffectiveness(u32 move, u32 battlerAtk, u32 battlerDef);
|
uq4_12_t AI_GetMoveEffectiveness(u32 move, u32 battlerAtk, u32 battlerDef);
|
||||||
u16 *GetMovesArray(u32 battler);
|
u16 *GetMovesArray(u32 battler);
|
||||||
bool32 IsConfusionMoveEffect(enum BattleMoveEffects moveEffect);
|
bool32 IsConfusionMoveEffect(enum BattleMoveEffects moveEffect);
|
||||||
bool32 HasMove(u32 battlerId, u32 move);
|
bool32 HasMove(u32 battlerId, u32 move);
|
||||||
bool32 HasOnlyMovesWithCategory(u32 battlerId, u32 category, bool32 onlyOffensive);
|
bool32 HasOnlyMovesWithCategory(u32 battlerId, enum DamageCategory category, bool32 onlyOffensive);
|
||||||
bool32 HasMoveWithCategory(u32 battler, u32 category);
|
bool32 HasMoveWithCategory(u32 battler, enum DamageCategory category);
|
||||||
bool32 HasMoveWithType(u32 battler, u32 type);
|
bool32 HasMoveWithType(u32 battler, u32 type);
|
||||||
bool32 HasMoveWithEffect(u32 battlerId, enum BattleMoveEffects moveEffect);
|
bool32 HasMoveWithEffect(u32 battler, enum BattleMoveEffects moveEffect);
|
||||||
|
bool32 HasMoveWithAIEffect(u32 battler, u32 aiEffect);
|
||||||
|
bool32 HasBattlerSideMoveWithEffect(u32 battler, u32 effect);
|
||||||
|
bool32 HasBattlerSideMoveWithAIEffect(u32 battler, u32 effect);
|
||||||
|
bool32 HasBattlerSideUsedMoveWithEffect(u32 battler, u32 effect);
|
||||||
bool32 HasNonVolatileMoveEffect(u32 battlerId, u32 effect);
|
bool32 HasNonVolatileMoveEffect(u32 battlerId, u32 effect);
|
||||||
bool32 IsPowerBasedOnStatus(u32 battlerId, enum BattleMoveEffects effect, u32 argument);
|
bool32 IsPowerBasedOnStatus(u32 battlerId, enum BattleMoveEffects effect, u32 argument);
|
||||||
bool32 HasMoveWithAdditionalEffect(u32 battlerId, u32 moveEffect);
|
bool32 HasMoveWithAdditionalEffect(u32 battlerId, u32 moveEffect);
|
||||||
|
bool32 HasBattlerSideMoveWithAdditionalEffect(u32 battler, u32 moveEffect);
|
||||||
bool32 HasMoveWithCriticalHitChance(u32 battlerId);
|
bool32 HasMoveWithCriticalHitChance(u32 battlerId);
|
||||||
bool32 HasMoveWithMoveEffectExcept(u32 battlerId, u32 moveEffect, enum BattleMoveEffects exception);
|
bool32 HasMoveWithMoveEffectExcept(u32 battlerId, u32 moveEffect, enum BattleMoveEffects exception);
|
||||||
bool32 HasMoveThatLowersOwnStats(u32 battlerId);
|
bool32 HasMoveThatLowersOwnStats(u32 battlerId);
|
||||||
@ -164,30 +186,30 @@ bool32 HasAnyKnownMove(u32 battlerId);
|
|||||||
bool32 IsAromaVeilProtectedEffect(enum BattleMoveEffects moveEffect);
|
bool32 IsAromaVeilProtectedEffect(enum BattleMoveEffects moveEffect);
|
||||||
bool32 IsNonVolatileStatusMove(u32 moveEffect);
|
bool32 IsNonVolatileStatusMove(u32 moveEffect);
|
||||||
bool32 IsMoveRedirectionPrevented(u32 battlerAtk, u32 move, u32 atkAbility);
|
bool32 IsMoveRedirectionPrevented(u32 battlerAtk, u32 move, u32 atkAbility);
|
||||||
bool32 IsMoveEncouragedToHit(u32 battlerAtk, u32 battlerDef, u32 move);
|
|
||||||
bool32 IsHazardMove(u32 move);
|
bool32 IsHazardMove(u32 move);
|
||||||
bool32 IsTwoTurnNotSemiInvulnerableMove(u32 battlerAtk, u32 move);
|
bool32 IsTwoTurnNotSemiInvulnerableMove(u32 battlerAtk, u32 move);
|
||||||
void ProtectChecks(u32 battlerAtk, u32 battlerDef, u32 move, u32 predictedMove, s32 *score);
|
bool32 IsBattlerDamagedByStatus(u32 battler);
|
||||||
bool32 ShouldSetSandstorm(u32 battler, u32 ability, enum ItemHoldEffect holdEffect);
|
s32 ProtectChecks(u32 battlerAtk, u32 battlerDef, u32 move, u32 predictedMove);
|
||||||
bool32 ShouldSetHail(u32 battler, u32 ability, enum ItemHoldEffect holdEffect);
|
bool32 ShouldSetWeather(u32 battler, u32 weather);
|
||||||
bool32 ShouldSetSnow(u32 battler, u32 ability, enum ItemHoldEffect holdEffect);
|
bool32 ShouldClearWeather(u32 battler, u32 weather);
|
||||||
bool32 ShouldSetRain(u32 battlerAtk, u32 ability, enum ItemHoldEffect holdEffect);
|
bool32 ShouldSetFieldStatus(u32 battler, u32 fieldStatus);
|
||||||
bool32 ShouldSetSun(u32 battlerAtk, u32 atkAbility, enum ItemHoldEffect holdEffect);
|
bool32 ShouldClearFieldStatus(u32 battler, u32 fieldStatus);
|
||||||
bool32 HasSleepMoveWithLowAccuracy(u32 battlerAtk, u32 battlerDef);
|
bool32 HasSleepMoveWithLowAccuracy(u32 battlerAtk, u32 battlerDef);
|
||||||
bool32 IsHealingMove(u32 move);
|
bool32 IsHealingMove(u32 move);
|
||||||
bool32 HasHealingEffect(u32 battler);
|
bool32 HasHealingEffect(u32 battler);
|
||||||
bool32 IsTrappingMove(u32 move);
|
bool32 IsTrappingMove(u32 move);
|
||||||
bool32 HasTrappingMoveEffect(u32 battler);
|
bool32 HasTrappingMoveEffect(u32 battler);
|
||||||
bool32 ShouldFakeOut(u32 battlerAtk, u32 battlerDef, u32 move);
|
bool32 IsFlinchGuaranteed(u32 battlerAtk, u32 battlerDef, u32 move);
|
||||||
|
bool32 HasChoiceEffect(u32 battler);
|
||||||
bool32 HasThawingMove(u32 battler);
|
bool32 HasThawingMove(u32 battler);
|
||||||
bool32 IsStatRaisingEffect(enum BattleMoveEffects effect);
|
bool32 IsStatRaisingEffect(enum BattleMoveEffects effect);
|
||||||
bool32 IsStatLoweringEffect(enum BattleMoveEffects effect);
|
bool32 IsStatLoweringEffect(enum BattleMoveEffects effect);
|
||||||
bool32 IsSelfStatLoweringEffect(enum BattleMoveEffects effect);
|
bool32 IsSelfStatLoweringEffect(enum MoveEffect effect);
|
||||||
|
bool32 IsSelfStatRaisingEffect(enum MoveEffect effect);
|
||||||
bool32 IsSwitchOutEffect(enum BattleMoveEffects effect);
|
bool32 IsSwitchOutEffect(enum BattleMoveEffects effect);
|
||||||
bool32 IsChaseEffect(enum BattleMoveEffects effect);
|
bool32 IsChaseEffect(enum BattleMoveEffects effect);
|
||||||
bool32 IsAttackBoostMoveEffect(enum BattleMoveEffects effect);
|
bool32 IsAttackBoostMoveEffect(enum BattleMoveEffects effect);
|
||||||
bool32 IsUngroundingEffect(enum BattleMoveEffects effect);
|
bool32 IsUngroundingEffect(enum BattleMoveEffects effect);
|
||||||
bool32 IsSemiInvulnerable(u32 battlerDef, u32 move);
|
|
||||||
bool32 HasMoveWithFlag(u32 battler, MoveFlag getFlag);
|
bool32 HasMoveWithFlag(u32 battler, MoveFlag getFlag);
|
||||||
bool32 IsHazardClearingMove(u32 move);
|
bool32 IsHazardClearingMove(u32 move);
|
||||||
bool32 IsSubstituteEffect(enum BattleMoveEffects effect);
|
bool32 IsSubstituteEffect(enum BattleMoveEffects effect);
|
||||||
@ -214,17 +236,27 @@ bool32 AI_IsBattlerAsleepOrComatose(u32 battlerId);
|
|||||||
|
|
||||||
// ability logic
|
// ability logic
|
||||||
bool32 IsMoxieTypeAbility(u32 ability);
|
bool32 IsMoxieTypeAbility(u32 ability);
|
||||||
bool32 ShouldTriggerAbility(u32 battler, 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);
|
||||||
|
|
||||||
// partner logic
|
// partner logic
|
||||||
#define IS_TARGETING_PARTNER(battlerAtk, battlerDef)((battlerAtk) == (battlerDef ^ BIT_FLANK))
|
bool32 IsTargetingPartner(u32 battlerAtk, u32 battlerDef);
|
||||||
|
// IsTargetingPartner includes a check to make sure the adjacent pokemon is truly a partner.
|
||||||
u32 GetAllyChosenMove(u32 battlerId);
|
u32 GetAllyChosenMove(u32 battlerId);
|
||||||
bool32 IsValidDoubleBattle(u32 battlerAtk);
|
bool32 IsBattle1v1();
|
||||||
|
// 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);
|
||||||
|
// HasTwoOpponents checks if the opposing side has two pokemon. Partner state is irrelevant. e.g., Dragon Darts hits one time with two opponents and twice with one opponent.
|
||||||
|
bool32 HasPartner(u32 battler);
|
||||||
|
bool32 HasPartnerIgnoreFlags(u32 battler);
|
||||||
|
// HasPartner respects the Attacks Partner AI flag; HasPartnerIgnoreFlags checks only if a live pokemon is adjacent.
|
||||||
|
bool32 AreMovesEquivalent(u32 battlerAtk, u32 battlerAtkPartner, u32 move, u32 partnerMove);
|
||||||
bool32 DoesPartnerHaveSameMoveEffect(u32 battlerAtkPartner, u32 battlerDef, u32 move, u32 partnerMove);
|
bool32 DoesPartnerHaveSameMoveEffect(u32 battlerAtkPartner, u32 battlerDef, u32 move, u32 partnerMove);
|
||||||
bool32 PartnerHasSameMoveEffectWithoutTarget(u32 battlerAtkPartner, u32 move, u32 partnerMove);
|
|
||||||
bool32 PartnerMoveEffectIsStatusSameTarget(u32 battlerAtkPartner, u32 battlerDef, u32 partnerMove);
|
bool32 PartnerMoveEffectIsStatusSameTarget(u32 battlerAtkPartner, u32 battlerDef, u32 partnerMove);
|
||||||
bool32 IsMoveEffectWeather(u32 move);
|
|
||||||
bool32 PartnerMoveEffectIsTerrain(u32 battlerAtkPartner, u32 partnerMove);
|
|
||||||
bool32 PartnerMoveEffectIs(u32 battlerAtkPartner, u32 partnerMove, enum BattleMoveEffects effectCheck);
|
bool32 PartnerMoveEffectIs(u32 battlerAtkPartner, u32 partnerMove, enum BattleMoveEffects effectCheck);
|
||||||
bool32 PartnerMoveIs(u32 battlerAtkPartner, u32 partnerMove, u32 moveCheck);
|
bool32 PartnerMoveIs(u32 battlerAtkPartner, u32 partnerMove, u32 moveCheck);
|
||||||
bool32 PartnerMoveIsSameAsAttacker(u32 battlerAtkPartner, u32 battlerDef, u32 move, u32 partnerMove);
|
bool32 PartnerMoveIsSameAsAttacker(u32 battlerAtkPartner, u32 battlerDef, u32 move, u32 partnerMove);
|
||||||
@ -239,12 +271,13 @@ struct BattlePokemon *AllocSaveBattleMons(void);
|
|||||||
void FreeRestoreBattleMons(struct BattlePokemon *savedBattleMons);
|
void FreeRestoreBattleMons(struct BattlePokemon *savedBattleMons);
|
||||||
s32 CountUsablePartyMons(u32 battlerId);
|
s32 CountUsablePartyMons(u32 battlerId);
|
||||||
bool32 IsPartyFullyHealedExceptBattler(u32 battler);
|
bool32 IsPartyFullyHealedExceptBattler(u32 battler);
|
||||||
bool32 PartyHasMoveCategory(u32 battlerId, u32 category);
|
bool32 PartyHasMoveCategory(u32 battlerId, enum DamageCategory category);
|
||||||
bool32 SideHasMoveCategory(u32 battlerId, u32 category);
|
bool32 SideHasMoveCategory(u32 battlerId, enum DamageCategory category);
|
||||||
|
|
||||||
// score increases
|
// score increases
|
||||||
u32 IncreaseStatUpScore(u32 battlerAtk, u32 battlerDef, enum StatChange statId);
|
u32 IncreaseStatUpScore(u32 battlerAtk, u32 battlerDef, enum StatChange statId);
|
||||||
u32 IncreaseStatUpScoreContrary(u32 battlerAtk, u32 battlerDef, enum StatChange statId);
|
u32 IncreaseStatUpScoreContrary(u32 battlerAtk, u32 battlerDef, enum StatChange statId);
|
||||||
|
u32 IncreaseStatDownScore(u32 battlerAtk, u32 battlerDef, u32 stat);
|
||||||
void IncreasePoisonScore(u32 battlerAtk, u32 battlerDef, u32 move, s32 *score);
|
void IncreasePoisonScore(u32 battlerAtk, u32 battlerDef, u32 move, s32 *score);
|
||||||
void IncreaseBurnScore(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);
|
void IncreaseParalyzeScore(u32 battlerAtk, u32 battlerDef, u32 move, s32 *score);
|
||||||
@ -253,18 +286,37 @@ void IncreaseConfusionScore(u32 battlerAtk, u32 battlerDef, u32 move, s32 *score
|
|||||||
void IncreaseFrostbiteScore(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, enum DamageCalcContext calcContext);
|
||||||
u32 AI_WhoStrikesFirstPartyMon(u32 battlerAtk, u32 battlerDef, struct BattlePokemon switchinCandidate, u32 moveConsidered);
|
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);
|
s32 AI_TryToClearStats(u32 battlerAtk, u32 battlerDef, bool32 isDoubleBattle);
|
||||||
bool32 AI_ShouldCopyStatChanges(u32 battlerAtk, u32 battlerDef);
|
bool32 AI_ShouldCopyStatChanges(u32 battlerAtk, u32 battlerDef);
|
||||||
bool32 AI_ShouldSetUpHazards(u32 battlerAtk, u32 battlerDef, struct AiLogicData *aiData);
|
bool32 AI_ShouldSetUpHazards(u32 battlerAtk, u32 battlerDef, u32 move, struct AiLogicData *aiData);
|
||||||
void IncreaseTidyUpScore(u32 battlerAtk, u32 battlerDef, u32 move, s32 *score);
|
void IncreaseTidyUpScore(u32 battlerAtk, u32 battlerDef, u32 move, s32 *score);
|
||||||
bool32 AI_ShouldSpicyExtract(u32 battlerAtk, u32 battlerAtkPartner, u32 move, struct AiLogicData *aiData);
|
bool32 AI_ShouldSpicyExtract(u32 battlerAtk, u32 battlerAtkPartner, u32 move, struct AiLogicData *aiData);
|
||||||
u32 IncreaseSubstituteMoveScore(u32 battlerAtk, u32 battlerDef, u32 move);
|
u32 IncreaseSubstituteMoveScore(u32 battlerAtk, u32 battlerDef, u32 move);
|
||||||
bool32 IsBattlerItemEnabled(u32 battler);
|
bool32 IsBattlerItemEnabled(u32 battler);
|
||||||
bool32 IsBattlerPredictedToSwitch(u32 battler);
|
bool32 IsBattlerPredictedToSwitch(u32 battler);
|
||||||
u32 GetIncomingMove(u32 battler, u32 opposingBattler, struct AiLogicData *aiData);
|
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 HasLowAccuracyMove(u32 battlerAtk, u32 battlerDef);
|
||||||
bool32 HasBattlerSideAbility(u32 battlerDef, u32 ability, struct AiLogicData *aiData);
|
bool32 HasBattlerSideAbility(u32 battlerDef, u32 ability, struct AiLogicData *aiData);
|
||||||
u32 GetThinkingBattler(u32 battler);
|
bool32 IsNaturalEnemy(u32 speciesAttacker, u32 speciesTarget);
|
||||||
|
|
||||||
|
// These are for the purpose of not doubling up on moves during double battles.
|
||||||
|
// Used in GetAIEffectGroup for move effects and GetAIEffectGroupFromMove for additional effects
|
||||||
|
#define AI_EFFECT_NONE 0
|
||||||
|
#define AI_EFFECT_WEATHER (1 << 0)
|
||||||
|
#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_FORCE_SWITCH (1 << 5)
|
||||||
|
#define AI_EFFECT_TORMENT (1 << 6)
|
||||||
|
#define AI_EFFECT_LIGHT_SCREEN (1 << 7)
|
||||||
|
#define AI_EFFECT_REFLECT (1 << 8)
|
||||||
|
#define AI_EFFECT_GRAVITY (1 << 9)
|
||||||
|
#define AI_EFFECT_CHANGE_ABILITY (1 << 10)
|
||||||
|
|
||||||
|
// As Aurora Veil should almost never be used alongside the other screens, we save the bit.
|
||||||
|
#define AI_EFFECT_AURORA_VEIL (AI_EFFECT_LIGHT_SCREEN | AI_EFFECT_REFLECT)
|
||||||
|
|
||||||
#endif //GUARD_BATTLE_AI_UTIL_H
|
#endif //GUARD_BATTLE_AI_UTIL_H
|
||||||
|
|||||||
@ -93,6 +93,7 @@ void AnimWeatherBallUp(struct Sprite *sprite);
|
|||||||
void AnimWeatherBallDown(struct Sprite *sprite);
|
void AnimWeatherBallDown(struct Sprite *sprite);
|
||||||
void AnimSpinningSparkle(struct Sprite *sprite);
|
void AnimSpinningSparkle(struct Sprite *sprite);
|
||||||
void SetAverageBattlerPositions(u8 battler, bool8 respectMonPicOffsets, s16 *x, s16 *y);
|
void SetAverageBattlerPositions(u8 battler, bool8 respectMonPicOffsets, s16 *x, s16 *y);
|
||||||
|
void SetToPartnerPositions(u8 battler, bool8 respectMonPicOffsets, s16 *x, s16 *y);
|
||||||
void DestroySpriteAndMatrix(struct Sprite *sprite);
|
void DestroySpriteAndMatrix(struct Sprite *sprite);
|
||||||
void TranslateSpriteLinearFixedPoint(struct Sprite *sprite);
|
void TranslateSpriteLinearFixedPoint(struct Sprite *sprite);
|
||||||
void InitSpritePosToAnimAttacker(struct Sprite *sprite, bool8 respectMonPicOffsets);
|
void InitSpritePosToAnimAttacker(struct Sprite *sprite, bool8 respectMonPicOffsets);
|
||||||
@ -230,6 +231,8 @@ void AnimMudSportDirt(struct Sprite *sprite);
|
|||||||
void AnimDirtScatter(struct Sprite *sprite);
|
void AnimDirtScatter(struct Sprite *sprite);
|
||||||
void AnimMudSportDirtRising(struct Sprite *sprite);
|
void AnimMudSportDirtRising(struct Sprite *sprite);
|
||||||
void AnimDirtPlumeParticle(struct Sprite *);
|
void AnimDirtPlumeParticle(struct Sprite *);
|
||||||
|
void AnimBoneHitProjectile(struct Sprite *sprite);
|
||||||
|
extern const union AnimCmd *const sAnims_MudSlapMud[];
|
||||||
extern const union AffineAnimCmd *const gAffineAnims_SpinningBone[];
|
extern const union AffineAnimCmd *const gAffineAnims_SpinningBone[];
|
||||||
|
|
||||||
// battle_anim_throw.c
|
// battle_anim_throw.c
|
||||||
@ -268,6 +271,7 @@ void AnimTranslateLinearSingleSineWave(struct Sprite *sprite);
|
|||||||
void AnimTeraStarstormStars(struct Sprite *sprite);
|
void AnimTeraStarstormStars(struct Sprite *sprite);
|
||||||
void AnimGrantingStars(struct Sprite *sprite);
|
void AnimGrantingStars(struct Sprite *sprite);
|
||||||
void AnimFollowMeFinger(struct Sprite *sprite);
|
void AnimFollowMeFinger(struct Sprite *sprite);
|
||||||
|
void AnimPoisonJabProjectile(struct Sprite *sprite);
|
||||||
extern const union AnimCmd *const gRazorLeafParticleAnimTable[];
|
extern const union AnimCmd *const gRazorLeafParticleAnimTable[];
|
||||||
extern const union AnimCmd *const gPowerAbsorptionOrbAnimTable[];
|
extern const union AnimCmd *const gPowerAbsorptionOrbAnimTable[];
|
||||||
extern const union AffineAnimCmd *const gPowerAbsorptionOrbAffineAnimTable[];
|
extern const union AffineAnimCmd *const gPowerAbsorptionOrbAffineAnimTable[];
|
||||||
@ -466,6 +470,7 @@ void AnimElectricity(struct Sprite *);
|
|||||||
void AnimTask_VoltSwitch(struct Sprite* sprite);
|
void AnimTask_VoltSwitch(struct Sprite* sprite);
|
||||||
extern const union AffineAnimCmd *const gAffineAnims_GrowingElectricOrb[];
|
extern const union AffineAnimCmd *const gAffineAnims_GrowingElectricOrb[];
|
||||||
extern const union AffineAnimCmd *const gAffineAnims_FlashingSpark[];
|
extern const union AffineAnimCmd *const gAffineAnims_FlashingSpark[];
|
||||||
|
extern const union AnimCmd *const sAnims_CirclingElectricShock[];
|
||||||
extern const union AnimCmd *const gAnims_ThunderboltOrb[];
|
extern const union AnimCmd *const gAnims_ThunderboltOrb[];
|
||||||
extern const union AnimCmd *const gAnims_ElectricPuff[];
|
extern const union AnimCmd *const gAnims_ElectricPuff[];
|
||||||
extern const union AnimCmd *const gAnims_ElectricChargingParticles[];
|
extern const union AnimCmd *const gAnims_ElectricChargingParticles[];
|
||||||
@ -490,6 +495,8 @@ extern const union AnimCmd *const gAnims_FlyingRock[];
|
|||||||
extern const union AffineAnimCmd *const gAffineAnims_Whirlpool[];
|
extern const union AffineAnimCmd *const gAffineAnims_Whirlpool[];
|
||||||
extern const union AffineAnimCmd *const gAffineAnims_BasicRock[];
|
extern const union AffineAnimCmd *const gAffineAnims_BasicRock[];
|
||||||
extern const union AnimCmd *const gAnims_FlyingRock[];
|
extern const union AnimCmd *const gAnims_FlyingRock[];
|
||||||
|
extern const union AnimCmd *const sAnims_BasicRock[];
|
||||||
|
void AnimRockTomb(struct Sprite *sprite);
|
||||||
void AnimParticleInVortex(struct Sprite *sprite);
|
void AnimParticleInVortex(struct Sprite *sprite);
|
||||||
void AnimFallingRock(struct Sprite *sprite);
|
void AnimFallingRock(struct Sprite *sprite);
|
||||||
void AnimRaiseSprite(struct Sprite *sprite);
|
void AnimRaiseSprite(struct Sprite *sprite);
|
||||||
@ -557,6 +564,9 @@ void InitSpritePosToAnimTargetsCentre(struct Sprite *sprite, bool32 respectMonPi
|
|||||||
extern const union AffineAnimCmd *const gSpriteAffineAnimTable_PrimalSymbol[];
|
extern const union AffineAnimCmd *const gSpriteAffineAnimTable_PrimalSymbol[];
|
||||||
extern const union AffineAnimCmd *const gSpriteAffineAnimTable_MegaSymbol[];
|
extern const union AffineAnimCmd *const gSpriteAffineAnimTable_MegaSymbol[];
|
||||||
|
|
||||||
|
// battle_anim_ice.c
|
||||||
|
void AnimIceBeamParticle(struct Sprite *sprite);
|
||||||
|
|
||||||
// battle_anim_bug.c
|
// battle_anim_bug.c
|
||||||
void AnimTranslateStinger(struct Sprite *sprite);
|
void AnimTranslateStinger(struct Sprite *sprite);
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,8 @@
|
|||||||
#ifndef GUARD_BATTLE_CONTROLLERS_H
|
#ifndef GUARD_BATTLE_CONTROLLERS_H
|
||||||
#define GUARD_BATTLE_CONTROLLERS_H
|
#define GUARD_BATTLE_CONTROLLERS_H
|
||||||
|
|
||||||
|
typedef void (*BattleControllerFunc)(u32 battler);
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
REQUEST_ALL_BATTLE,
|
REQUEST_ALL_BATTLE,
|
||||||
REQUEST_SPECIES_BATTLE,
|
REQUEST_SPECIES_BATTLE,
|
||||||
@ -277,6 +279,7 @@ void InitBattleControllers(void);
|
|||||||
bool32 IsValidForBattle(struct Pokemon *mon);
|
bool32 IsValidForBattle(struct Pokemon *mon);
|
||||||
void TryReceiveLinkBattleData(void);
|
void TryReceiveLinkBattleData(void);
|
||||||
void PrepareBufferDataTransferLink(u32 battler, u32 bufferId, u16 size, u8 *data);
|
void PrepareBufferDataTransferLink(u32 battler, u32 bufferId, u16 size, u8 *data);
|
||||||
|
void UpdateFriendshipFromXItem(u32 battler);
|
||||||
|
|
||||||
// emitters
|
// emitters
|
||||||
void BtlController_EmitGetMonData(u32 battler, u32 bufferId, u8 requestId, u8 monToCheck);
|
void BtlController_EmitGetMonData(u32 battler, u32 bufferId, u8 requestId, u8 monToCheck);
|
||||||
@ -296,11 +299,11 @@ void BtlController_EmitChooseAction(u32 battler, u32 bufferId, u8 action, u16 it
|
|||||||
void BtlController_EmitYesNoBox(u32 battler, u32 bufferId);
|
void BtlController_EmitYesNoBox(u32 battler, u32 bufferId);
|
||||||
void BtlController_EmitChooseMove(u32 battler, u32 bufferId, bool8 isDoubleBattle, bool8 NoPpNumber, struct ChooseMoveStruct *movePpData);
|
void BtlController_EmitChooseMove(u32 battler, u32 bufferId, bool8 isDoubleBattle, bool8 NoPpNumber, struct ChooseMoveStruct *movePpData);
|
||||||
void BtlController_EmitChooseItem(u32 battler, u32 bufferId, u8 *battlePartyOrder);
|
void BtlController_EmitChooseItem(u32 battler, u32 bufferId, u8 *battlePartyOrder);
|
||||||
void BtlController_EmitChoosePokemon(u32 battler, u32 bufferId, u8 caseId, u8 slotId, u16 abilityId, u8 *data);
|
void BtlController_EmitChoosePokemon(u32 battler, u32 bufferId, u8 caseId, u8 slotId, u16 abilityId, u8 battlerPreventingSwitchout, u8 *data);
|
||||||
void BtlController_EmitHealthBarUpdate(u32 battler, u32 bufferId, u16 hpValue);
|
void BtlController_EmitHealthBarUpdate(u32 battler, u32 bufferId, u16 hpValue);
|
||||||
void BtlController_EmitExpUpdate(u32 battler, u32 bufferId, u8 partyId, s32 expPoints);
|
void BtlController_EmitExpUpdate(u32 battler, u32 bufferId, u8 partyId, s32 expPoints);
|
||||||
void BtlController_EmitStatusIconUpdate(u32 battler, u32 bufferId, u32 status1, u32 status2);
|
void BtlController_EmitStatusIconUpdate(u32 battler, u32 bufferId, u32 status);
|
||||||
void BtlController_EmitStatusAnimation(u32 battler, u32 bufferId, bool8 status2, u32 status);
|
void BtlController_EmitStatusAnimation(u32 battler, u32 bufferId, bool8 isVolatile, u32 status);
|
||||||
void BtlController_EmitDataTransfer(u32 battler, u32 bufferId, u16 size, void *data);
|
void BtlController_EmitDataTransfer(u32 battler, u32 bufferId, u16 size, void *data);
|
||||||
void BtlController_EmitTwoReturnValues(u32 battler, u32 bufferId, u8 ret8, u32 ret32);
|
void BtlController_EmitTwoReturnValues(u32 battler, u32 bufferId, u8 ret8, u32 ret32);
|
||||||
void BtlController_EmitChosenMonReturnValue(u32 battler, u32 bufferId, u8 partyId, u8 *battlePartyOrder);
|
void BtlController_EmitChosenMonReturnValue(u32 battler, u32 bufferId, u8 partyId, u8 *battlePartyOrder);
|
||||||
@ -323,7 +326,7 @@ void BtlController_EmitResetActionMoveSelection(u32 battler, u32 bufferId, u8 ca
|
|||||||
void BtlController_EmitEndLinkBattle(u32 battler, u32 bufferId, u8 battleOutcome);
|
void BtlController_EmitEndLinkBattle(u32 battler, u32 bufferId, u8 battleOutcome);
|
||||||
void BtlController_EmitDebugMenu(u32 battler, u32 bufferId);
|
void BtlController_EmitDebugMenu(u32 battler, u32 bufferId);
|
||||||
|
|
||||||
void BattleControllerComplete(u32 battler); // Can be used for all the controllers.
|
void BtlController_Complete(u32 battler); // Can be used for all the controllers.
|
||||||
void BtlController_Empty(u32 battler); // Empty command, does nothing, only completes the execution.
|
void BtlController_Empty(u32 battler); // Empty command, does nothing, only completes the execution.
|
||||||
void BtlController_TerminatorNop(u32 battler); // Dummy function at the end of the table.
|
void BtlController_TerminatorNop(u32 battler); // Dummy function at the end of the table.
|
||||||
void BattleControllerDummy(u32 battler);
|
void BattleControllerDummy(u32 battler);
|
||||||
@ -336,8 +339,8 @@ void BtlController_HandleGetMonData(u32 battler);
|
|||||||
void BtlController_HandleGetRawMonData(u32 battler);
|
void BtlController_HandleGetRawMonData(u32 battler);
|
||||||
void BtlController_HandleSetMonData(u32 battler);
|
void BtlController_HandleSetMonData(u32 battler);
|
||||||
void BtlController_HandleSetRawMonData(u32 battler);
|
void BtlController_HandleSetRawMonData(u32 battler);
|
||||||
void BtlController_HandleLoadMonSprite(u32 battler, void (*controllerCallback)(u32 battler));
|
void BtlController_HandleLoadMonSprite(u32 battler);
|
||||||
void BtlController_HandleSwitchInAnim(u32 battler, bool32 isPlayerSide, void (*controllerCallback)(u32 battler));
|
void BtlController_HandleSwitchInAnim(u32 battler);
|
||||||
void BtlController_HandleReturnMonToBall(u32 battler);
|
void BtlController_HandleReturnMonToBall(u32 battler);
|
||||||
void BtlController_HandleDrawTrainerPic(u32 battlerId, u32 trainerPicId, bool32 isFrontPic, s16 xPos, s16 yPos, s32 subpriority);
|
void BtlController_HandleDrawTrainerPic(u32 battlerId, u32 trainerPicId, bool32 isFrontPic, s16 xPos, s16 yPos, s32 subpriority);
|
||||||
void BtlController_HandleTrainerSlide(u32 battler, u32 trainerPicId);
|
void BtlController_HandleTrainerSlide(u32 battler, u32 trainerPicId);
|
||||||
@ -345,9 +348,10 @@ void BtlController_HandleTrainerSlideBack(u32 battlerId, s16 data0, bool32 start
|
|||||||
void BtlController_HandleFaintAnimation(u32 battler);
|
void BtlController_HandleFaintAnimation(u32 battler);
|
||||||
void BtlController_HandleSuccessBallThrowAnim(u32 battler, u32 target, u32 animId, bool32 allowCriticalCapture);
|
void BtlController_HandleSuccessBallThrowAnim(u32 battler, u32 target, u32 animId, bool32 allowCriticalCapture);
|
||||||
void BtlController_HandleBallThrowAnim(u32 battler, u32 target, u32 animId, bool32 allowCriticalCapture);
|
void BtlController_HandleBallThrowAnim(u32 battler, u32 target, u32 animId, bool32 allowCriticalCapture);
|
||||||
void BtlController_HandleMoveAnimation(u32 battler, bool32 updateTvData);
|
void BtlController_HandleMoveAnimation(u32 battler);
|
||||||
void BtlController_HandlePrintString(u32 battler, bool32 updateTvData, bool32 arenaPtsDeduct);
|
void BtlController_HandlePrintString(u32 battler);
|
||||||
void BtlController_HandleHealthBarUpdate(u32 battler, bool32 updateHpText);
|
void BtlController_HandlePrintStringPlayerOnly(u32 battler);
|
||||||
|
void BtlController_HandleHealthBarUpdate(u32 battler);
|
||||||
void DoStatusIconUpdate(u32 battler);
|
void DoStatusIconUpdate(u32 battler);
|
||||||
void BtlController_HandleStatusIconUpdate(u32 battler);
|
void BtlController_HandleStatusIconUpdate(u32 battler);
|
||||||
void BtlController_HandleStatusAnimation(u32 battler);
|
void BtlController_HandleStatusAnimation(u32 battler);
|
||||||
@ -362,10 +366,11 @@ bool32 TwoOpponentIntroMons(u32 battlerId); // Double battle with both opponent
|
|||||||
void BtlController_HandleIntroTrainerBallThrow(u32 battler, u16 tagTrainerPal, const u16 *trainerPal, s16 framesToWait, void (*controllerCallback)(u32 battler));
|
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, u32 side, bool32 considerDelay);
|
||||||
void BtlController_HandleHidePartyStatusSummary(u32 battler);
|
void BtlController_HandleHidePartyStatusSummary(u32 battler);
|
||||||
void BtlController_HandleBattleAnimation(u32 battler, bool32 ignoreSE, bool32 updateTvData);
|
void BtlController_HandleBattleAnimation(u32 battler);
|
||||||
|
|
||||||
// player controller
|
// player controller
|
||||||
void SetControllerToPlayer(u32 battler);
|
void SetControllerToPlayer(u32 battler);
|
||||||
|
void PlayerBufferExecCompleted(u32 battler);
|
||||||
void SetBattleEndCallbacks(u32 battler);
|
void SetBattleEndCallbacks(u32 battler);
|
||||||
void PlayerHandleBallThrowAnim(u32 battler);
|
void PlayerHandleBallThrowAnim(u32 battler);
|
||||||
void PlayerHandleExpUpdate(u32 battler);
|
void PlayerHandleExpUpdate(u32 battler);
|
||||||
@ -388,37 +393,48 @@ void HandleChooseMoveAfterDma3(u32 battler);
|
|||||||
|
|
||||||
// recorded player controller
|
// recorded player controller
|
||||||
void SetControllerToRecordedPlayer(u32 battler);
|
void SetControllerToRecordedPlayer(u32 battler);
|
||||||
|
void RecordedPlayerBufferExecCompleted(u32 battler);
|
||||||
|
|
||||||
// opponent controller
|
// opponent controller
|
||||||
void SetControllerToOpponent(u32 battler);
|
void SetControllerToOpponent(u32 battler);
|
||||||
|
void OpponentBufferExecCompleted(u32 battler);
|
||||||
void OpponentHandleTrainerSlide(u32 battler);
|
void OpponentHandleTrainerSlide(u32 battler);
|
||||||
|
|
||||||
// player partner controller
|
// player partner controller
|
||||||
void Controller_PlayerPartnerShowIntroHealthbox(u32 battler); // Also used by the link partner.
|
void Controller_PlayerPartnerShowIntroHealthbox(u32 battler); // Also used by the link partner.
|
||||||
void SetControllerToPlayerPartner(u32 battler);
|
void SetControllerToPlayerPartner(u32 battler);
|
||||||
|
void PlayerPartnerBufferExecCompleted(u32 battler);
|
||||||
|
|
||||||
// safari controller
|
// safari controller
|
||||||
void SetControllerToSafari(u32 battler);
|
void SetControllerToSafari(u32 battler);
|
||||||
|
void SafariBufferExecCompleted(u32 battler);
|
||||||
|
|
||||||
// wally controller
|
// wally controller
|
||||||
void SetControllerToWally(u32 battler);
|
void SetControllerToWally(u32 battler);
|
||||||
|
void WallyBufferExecCompleted(u32 battler);
|
||||||
|
|
||||||
// recorded opponent controller
|
// recorded opponent controller
|
||||||
void SetControllerToRecordedOpponent(u32 battler);
|
void SetControllerToRecordedOpponent(u32 battler);
|
||||||
|
void RecordedOpponentBufferExecCompleted(u32 battler);
|
||||||
|
|
||||||
// link opponent
|
// link opponent
|
||||||
void SetControllerToLinkOpponent(u32 battler);
|
void SetControllerToLinkOpponent(u32 battler);
|
||||||
|
void LinkOpponentBufferExecCompleted(u32 battler);
|
||||||
|
|
||||||
// link partner
|
// link partner
|
||||||
void SetControllerToLinkPartner(u32 battler);
|
void SetControllerToLinkPartner(u32 battler);
|
||||||
|
void LinkPartnerBufferExecCompleted(u32 battler);
|
||||||
|
|
||||||
void TrySetBattlerShadowSpriteCallback(u32 battler);
|
void TrySetBattlerShadowSpriteCallback(u32 battler);
|
||||||
|
|
||||||
bool32 TryShinyAnimAfterMonAnimUtil(u32 battler);
|
void AnimateMonAfterPokeBallFail(u32 battler);
|
||||||
bool32 SwitchIn_ShowSubstituteUtil(u32 battler);
|
void TryShinyAnimAfterMonAnim(u32 battler);
|
||||||
bool32 SwitchIn_WaitAndEndUtil(u32 battler);
|
void WaitForMonAnimAfterLoad(u32 battler);
|
||||||
bool32 SwitchIn_HandleSoundAndEndUtil(u32 battler);
|
void BtlController_HandleSwitchInWaitAndEnd(u32 battler);
|
||||||
bool32 SwitchIn_ShowHealthboxUtil(u32 battler);
|
void BtlController_Intro_DelayAndEnd(u32 battler);
|
||||||
bool32 SwitchIn_TryShinyAnimUtil(u32 battler);
|
void BtlController_HandleSwitchInShowHealthbox(u32 battler);
|
||||||
|
void BtlController_HandleSwitchInTryShinyAnim(u32 battler);
|
||||||
|
void BtlController_HandleSwitchInSoundAndEnd(u32 battler);
|
||||||
|
void BtlController_HandleSwitchInShowSubstitute(u32 battler);
|
||||||
|
|
||||||
#endif // GUARD_BATTLE_CONTROLLERS_H
|
#endif // GUARD_BATTLE_CONTROLLERS_H
|
||||||
|
|||||||
17
include/battle_environment.h
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
#ifndef GUARD_BATTLE_ENVIRONMENT_H
|
||||||
|
#define GUARD_BATTLE_ENVIRONMENT_H
|
||||||
|
|
||||||
|
#include "constants/battle.h"
|
||||||
|
#include "battle_bg.h"
|
||||||
|
|
||||||
|
struct BattleEnvironment {
|
||||||
|
u8 name[26];
|
||||||
|
u16 naturePower;
|
||||||
|
u16 secretPowerEffect;
|
||||||
|
u8 camouflageType;
|
||||||
|
struct BattleBackground background;
|
||||||
|
};
|
||||||
|
|
||||||
|
extern const struct BattleEnvironment gBattleEnvironmentInfo[BATTLE_ENVIRONMENT_COUNT];
|
||||||
|
|
||||||
|
#endif // GUARD_BATTLE_ENVIRONMENT_H
|
||||||
@ -7,7 +7,7 @@ u16 ChooseMoveAndTargetInBattlePalace(u32 battler);
|
|||||||
void SpriteCB_WaitForBattlerBallReleaseAnim(struct Sprite *sprite);
|
void SpriteCB_WaitForBattlerBallReleaseAnim(struct Sprite *sprite);
|
||||||
void SpriteCB_TrainerSlideIn(struct Sprite *sprite);
|
void SpriteCB_TrainerSlideIn(struct Sprite *sprite);
|
||||||
void SpriteCB_TrainerSpawn(struct Sprite *sprite);
|
void SpriteCB_TrainerSpawn(struct Sprite *sprite);
|
||||||
void InitAndLaunchChosenStatusAnimation(u32 battler, bool32 isStatus2, u32 status);
|
void InitAndLaunchChosenStatusAnimation(u32 battler, bool32 isVolatile, u32 status);
|
||||||
bool8 TryHandleLaunchBattleTableAnimation(u8 activeBattlerId, u8 attacker, u8 target, u8 tableId, u16 argument);
|
bool8 TryHandleLaunchBattleTableAnimation(u8 activeBattlerId, u8 attacker, u8 target, u8 tableId, u16 argument);
|
||||||
void InitAndLaunchSpecialAnimation(u8 activeBattlerId, u8 attacker, u8 target, u8 tableId);
|
void InitAndLaunchSpecialAnimation(u8 activeBattlerId, u8 attacker, u8 target, u8 tableId);
|
||||||
bool8 IsBattleSEPlaying(u8 battler);
|
bool8 IsBattleSEPlaying(u8 battler);
|
||||||
|
|||||||
@ -60,6 +60,7 @@ enum FirstTurnEventsStates
|
|||||||
FIRST_TURN_EVENTS_OPPORTUNIST_1,
|
FIRST_TURN_EVENTS_OPPORTUNIST_1,
|
||||||
FIRST_TURN_EVENTS_ITEM_EFFECTS,
|
FIRST_TURN_EVENTS_ITEM_EFFECTS,
|
||||||
FIRST_TURN_EVENTS_OPPORTUNIST_2,
|
FIRST_TURN_EVENTS_OPPORTUNIST_2,
|
||||||
|
FIRST_TURN_EVENTS_EJECT_PACK,
|
||||||
FIRST_TURN_EVENTS_END,
|
FIRST_TURN_EVENTS_END,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -88,7 +89,7 @@ void SpriteCB_TrainerThrowObject(struct Sprite *sprite);
|
|||||||
void AnimSetCenterToCornerVecX(struct Sprite *sprite);
|
void AnimSetCenterToCornerVecX(struct Sprite *sprite);
|
||||||
void BeginBattleIntroDummy(void);
|
void BeginBattleIntroDummy(void);
|
||||||
void BeginBattleIntro(void);
|
void BeginBattleIntro(void);
|
||||||
void SwitchInClearSetData(u32 battler);
|
void SwitchInClearSetData(u32 battler, struct Volatiles *volatilesCopy);
|
||||||
const u8* FaintClearSetData(u32 battler);
|
const u8* FaintClearSetData(u32 battler);
|
||||||
void BattleTurnPassed(void);
|
void BattleTurnPassed(void);
|
||||||
u8 IsRunningFromBattleImpossible(u32 battler);
|
u8 IsRunningFromBattleImpossible(u32 battler);
|
||||||
@ -115,6 +116,7 @@ u32 GeneratePersonalityForGender(u32 gender, u32 species);
|
|||||||
void CustomTrainerPartyAssignMoves(struct Pokemon *mon, const struct TrainerMon *partyEntry);
|
void CustomTrainerPartyAssignMoves(struct Pokemon *mon, const struct TrainerMon *partyEntry);
|
||||||
bool32 CanPlayerForfeitNormalTrainerBattle(void);
|
bool32 CanPlayerForfeitNormalTrainerBattle(void);
|
||||||
bool32 DidPlayerForfeitNormalTrainerBattle(void);
|
bool32 DidPlayerForfeitNormalTrainerBattle(void);
|
||||||
|
void BattleDebug_WonBattle(void);
|
||||||
|
|
||||||
extern struct MultiPartnerMenuPokemon gMultiPartnerParty[MULTI_PARTY_SIZE];
|
extern struct MultiPartnerMenuPokemon gMultiPartnerParty[MULTI_PARTY_SIZE];
|
||||||
|
|
||||||
|
|||||||
@ -22,6 +22,24 @@ struct PickupItem
|
|||||||
u8 percentage[10];
|
u8 percentage[10];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
union TRANSPARENT StatChangeFlags
|
||||||
|
{
|
||||||
|
int raw;
|
||||||
|
u32 raw_u32;
|
||||||
|
u16 raw_u16;
|
||||||
|
u8 raw_u8;
|
||||||
|
struct {
|
||||||
|
bool32 allowPtr:1; // STAT_CHANGE_ALLOW_PTR
|
||||||
|
bool32 mirrorArmored:1; // STAT_CHANGE_MIRROR_ARMOR
|
||||||
|
bool32 onlyChecking:1; // STAT_CHANGE_ONLY_CHECKING
|
||||||
|
bool32 notProtectAffected:1; // STAT_CHANGE_NOT_PROTECT_AFFECTED
|
||||||
|
bool32 updateMoveEffect:1; // STAT_CHANGE_UPDATE_MOVE_EFFECT
|
||||||
|
bool32 statDropPrevention:1; // STAT_CHANGE_CHECK_PREVENTION
|
||||||
|
bool32 certain:1; // STAT_CHANGE_CERTAIN
|
||||||
|
bool32 padding:25;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
s32 CalcCritChanceStage(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, 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 CalcCritChanceStageGen1(u32 battlerAtk, u32 battlerDef, u32 move, bool32 recordAbility, u32 abilityAtk, u32 abilityDef, enum ItemHoldEffect holdEffectAtk);
|
||||||
s32 GetCritHitOdds(s32 critChanceIndex);
|
s32 GetCritHitOdds(s32 critChanceIndex);
|
||||||
@ -30,7 +48,7 @@ u8 GetBattlerTurnOrderNum(u8 battler);
|
|||||||
bool32 NoAliveMonsForBattlerSide(u32 battler);
|
bool32 NoAliveMonsForBattlerSide(u32 battler);
|
||||||
bool32 NoAliveMonsForPlayer(void);
|
bool32 NoAliveMonsForPlayer(void);
|
||||||
bool32 NoAliveMonsForEitherParty(void);
|
bool32 NoAliveMonsForEitherParty(void);
|
||||||
void SetMoveEffect(bool32 primary, bool32 certain);
|
void SetMoveEffect(u32 battler, u32 effectBattler, bool32 primary, bool32 certain);
|
||||||
bool32 CanBattlerSwitch(u32 battlerId);
|
bool32 CanBattlerSwitch(u32 battlerId);
|
||||||
void BattleDestroyYesNoCursorAt(u8 cursorPosition);
|
void BattleDestroyYesNoCursorAt(u8 cursorPosition);
|
||||||
void BattleCreateYesNoCursorAt(u8 cursorPosition);
|
void BattleCreateYesNoCursorAt(u8 cursorPosition);
|
||||||
@ -58,7 +76,6 @@ bool32 IsMoveAffectedByParentalBond(u32 move, u32 battler);
|
|||||||
void SaveBattlerTarget(u32 battler);
|
void SaveBattlerTarget(u32 battler);
|
||||||
void SaveBattlerAttacker(u32 battler);
|
void SaveBattlerAttacker(u32 battler);
|
||||||
bool32 CanBurnHitThaw(u16 move);
|
bool32 CanBurnHitThaw(u16 move);
|
||||||
void SetNonVolatileStatusCondition(u32 target, enum MoveEffects effect);
|
|
||||||
|
|
||||||
extern void (*const gBattleScriptingCommandsTable[])(void);
|
extern void (*const gBattleScriptingCommandsTable[])(void);
|
||||||
extern const struct StatFractions gAccuracyStageRatios[];
|
extern const struct StatFractions gAccuracyStageRatios[];
|
||||||
|
|||||||
@ -72,6 +72,8 @@ extern const u8 BattleScript_RoarSuccessSwitch[];
|
|||||||
extern const u8 BattleScript_RoarSuccessEndBattle[];
|
extern const u8 BattleScript_RoarSuccessEndBattle[];
|
||||||
extern const u8 BattleScript_MistProtected[];
|
extern const u8 BattleScript_MistProtected[];
|
||||||
extern const u8 BattleScript_RageIsBuilding[];
|
extern const u8 BattleScript_RageIsBuilding[];
|
||||||
|
extern const u8 BattleScript_EncoredMoveInPalace[];
|
||||||
|
extern const u8 BattleScript_EncoredMove[];
|
||||||
extern const u8 BattleScript_MoveUsedIsDisabled[];
|
extern const u8 BattleScript_MoveUsedIsDisabled[];
|
||||||
extern const u8 BattleScript_SelectingDisabledMove[];
|
extern const u8 BattleScript_SelectingDisabledMove[];
|
||||||
extern const u8 BattleScript_DisabledNoMore[];
|
extern const u8 BattleScript_DisabledNoMore[];
|
||||||
@ -90,7 +92,7 @@ extern const u8 BattleScript_AllStatsUp[];
|
|||||||
extern const u8 BattleScript_RapidSpinAway[];
|
extern const u8 BattleScript_RapidSpinAway[];
|
||||||
extern const u8 BattleScript_WrapFree[];
|
extern const u8 BattleScript_WrapFree[];
|
||||||
extern const u8 BattleScript_LeechSeedFree[];
|
extern const u8 BattleScript_LeechSeedFree[];
|
||||||
extern const u8 BattleScript_SpikesFree[];
|
extern const u8 BattleScript_SpinHazardsAway[];
|
||||||
extern const u8 BattleScript_MonTookFutureAttack[];
|
extern const u8 BattleScript_MonTookFutureAttack[];
|
||||||
extern const u8 BattleScript_NoMovesLeft[];
|
extern const u8 BattleScript_NoMovesLeft[];
|
||||||
extern const u8 BattleScript_SelectingMoveWithNoPP[];
|
extern const u8 BattleScript_SelectingMoveWithNoPP[];
|
||||||
@ -241,6 +243,8 @@ extern const u8 BattleScript_ConsumableStatRaiseRet[];
|
|||||||
extern const u8 BattleScript_BerryFocusEnergyRet[];
|
extern const u8 BattleScript_BerryFocusEnergyRet[];
|
||||||
extern const u8 BattleScript_BerryFocusEnergyEnd2[];
|
extern const u8 BattleScript_BerryFocusEnergyEnd2[];
|
||||||
extern const u8 BattleScript_ActionSelectionItemsCantBeUsed[];
|
extern const u8 BattleScript_ActionSelectionItemsCantBeUsed[];
|
||||||
|
extern const u8 BattleScript_AbilityAvoidsDamage[];
|
||||||
|
extern const u8 BattleScript_AbilityShieldProtects[];
|
||||||
extern const u8 BattleScript_ArenaTurnBeginning[];
|
extern const u8 BattleScript_ArenaTurnBeginning[];
|
||||||
extern const u8 BattleScript_PalacePrintFlavorText[];
|
extern const u8 BattleScript_PalacePrintFlavorText[];
|
||||||
extern const u8 BattleScript_ArenaDoJudgment[];
|
extern const u8 BattleScript_ArenaDoJudgment[];
|
||||||
@ -308,13 +312,7 @@ extern const u8 BattleScript_SelectingNotAllowedMoveGravityInPalace[];
|
|||||||
extern const u8 BattleScript_SelectingNotAllowedMoveHealBlock[];
|
extern const u8 BattleScript_SelectingNotAllowedMoveHealBlock[];
|
||||||
extern const u8 BattleScript_MoveUsedHealBlockPrevents[];
|
extern const u8 BattleScript_MoveUsedHealBlockPrevents[];
|
||||||
extern const u8 BattleScript_SelectingNotAllowedMoveHealBlockInPalace[];
|
extern const u8 BattleScript_SelectingNotAllowedMoveHealBlockInPalace[];
|
||||||
extern const u8 BattleScript_ToxicSpikesFree[];
|
extern const u8 BattleScript_DefogClearHazards[];
|
||||||
extern const u8 BattleScript_StickyWebFree[];
|
|
||||||
extern const u8 BattleScript_StealthRockFree[];
|
|
||||||
extern const u8 BattleScript_SpikesDefog[];
|
|
||||||
extern const u8 BattleScript_ToxicSpikesDefog[];
|
|
||||||
extern const u8 BattleScript_StickyWebDefog[];
|
|
||||||
extern const u8 BattleScript_StealthRockDefog[];
|
|
||||||
extern const u8 BattleScript_MegaEvolution[];
|
extern const u8 BattleScript_MegaEvolution[];
|
||||||
extern const u8 BattleScript_WishMegaEvolution[];
|
extern const u8 BattleScript_WishMegaEvolution[];
|
||||||
extern const u8 BattleScript_MoveEffectClearSmog[];
|
extern const u8 BattleScript_MoveEffectClearSmog[];
|
||||||
@ -340,8 +338,8 @@ extern const u8 BattleScript_GrassySurgeActivates[];
|
|||||||
extern const u8 BattleScript_MistySurgeActivates[];
|
extern const u8 BattleScript_MistySurgeActivates[];
|
||||||
extern const u8 BattleScript_ElectricSurgeActivates[];
|
extern const u8 BattleScript_ElectricSurgeActivates[];
|
||||||
extern const u8 BattleScript_EffectSpectralThief[];
|
extern const u8 BattleScript_EffectSpectralThief[];
|
||||||
|
extern const u8 BattleScript_EffectLifeDew[];
|
||||||
extern const u8 BattleScript_EffectSteelRoller[];
|
extern const u8 BattleScript_EffectSteelRoller[];
|
||||||
extern const u8 BattleScript_StatUpMsg[];
|
|
||||||
extern const u8 BattleScript_AbilityRaisesDefenderStat[];
|
extern const u8 BattleScript_AbilityRaisesDefenderStat[];
|
||||||
extern const u8 BattleScript_PowderMoveNoEffect[];
|
extern const u8 BattleScript_PowderMoveNoEffect[];
|
||||||
extern const u8 BattleScript_GrassyTerrainHeals[];
|
extern const u8 BattleScript_GrassyTerrainHeals[];
|
||||||
@ -421,13 +419,14 @@ extern const u8 BattleScript_RedCardActivates[];
|
|||||||
extern const u8 BattleScript_EjectButtonActivates[];
|
extern const u8 BattleScript_EjectButtonActivates[];
|
||||||
extern const u8 BattleScript_EjectPackActivate_Ret[];
|
extern const u8 BattleScript_EjectPackActivate_Ret[];
|
||||||
extern const u8 BattleScript_EjectPackActivate_End2[];
|
extern const u8 BattleScript_EjectPackActivate_End2[];
|
||||||
|
extern const u8 BattleScript_EjectPackActivate_End3[];
|
||||||
extern const u8 BattleScript_EjectPackActivates[];
|
extern const u8 BattleScript_EjectPackActivates[];
|
||||||
extern const u8 BattleScript_MentalHerbCureRet[];
|
extern const u8 BattleScript_MentalHerbCureRet[];
|
||||||
extern const u8 BattleScript_MentalHerbCureEnd2[];
|
extern const u8 BattleScript_MentalHerbCureEnd2[];
|
||||||
extern const u8 BattleScript_TerrainPreventsEnd2[];
|
extern const u8 BattleScript_TerrainPreventsEnd2[];
|
||||||
extern const u8 BattleScript_MistyTerrainPrevents[];
|
extern const u8 BattleScript_MistyTerrainPrevents[];
|
||||||
extern const u8 BattleScript_ElectricTerrainPrevents[];
|
extern const u8 BattleScript_ElectricTerrainPrevents[];
|
||||||
extern const u8 BattleScript_DarkTypePreventsPrankster[];
|
extern const u8 BattleScript_DoesntAffectTargetAtkString[];
|
||||||
extern const u8 BattleScript_GulpMissileGorging[];
|
extern const u8 BattleScript_GulpMissileGorging[];
|
||||||
extern const u8 BattleScript_GulpMissileGulping[];
|
extern const u8 BattleScript_GulpMissileGulping[];
|
||||||
extern const u8 BattleScript_GulpMissileFormChange[];
|
extern const u8 BattleScript_GulpMissileFormChange[];
|
||||||
@ -450,7 +449,6 @@ extern const u8 BattleScript_MirrorArmorReflect[];
|
|||||||
extern const u8 BattleScript_GooeyActivates[];
|
extern const u8 BattleScript_GooeyActivates[];
|
||||||
extern const u8 BattleScript_PastelVeilActivates[];
|
extern const u8 BattleScript_PastelVeilActivates[];
|
||||||
extern const u8 BattleScript_BattlerFormChangeEnd3NoPopup[];
|
extern const u8 BattleScript_BattlerFormChangeEnd3NoPopup[];
|
||||||
extern const u8 BattleScript_AttackerFormChangeWithStringEnd3NoPopup[];
|
|
||||||
extern const u8 BattleScript_AttackerFormChangeMoveEffect[];
|
extern const u8 BattleScript_AttackerFormChangeMoveEffect[];
|
||||||
extern const u8 BattleScript_BothCanNoLongerEscape[];
|
extern const u8 BattleScript_BothCanNoLongerEscape[];
|
||||||
extern const u8 BattleScript_OctolockEndTurn[];
|
extern const u8 BattleScript_OctolockEndTurn[];
|
||||||
@ -522,7 +520,6 @@ extern const u8 BattleScript_TeraShellDistortingTypeMatchups[];
|
|||||||
extern const u8 BattleScript_TeraFormChange[];
|
extern const u8 BattleScript_TeraFormChange[];
|
||||||
extern const u8 BattleScript_SleepClausePreventsEnd[];
|
extern const u8 BattleScript_SleepClausePreventsEnd[];
|
||||||
extern const u8 BattleScript_PowerConstruct[];
|
extern const u8 BattleScript_PowerConstruct[];
|
||||||
|
|
||||||
extern const u8 BattleScript_AbilityProtectsDoesntAffect[];
|
extern const u8 BattleScript_AbilityProtectsDoesntAffect[];
|
||||||
extern const u8 BattleScript_ImmunityProtected[];
|
extern const u8 BattleScript_ImmunityProtected[];
|
||||||
extern const u8 BattleScript_SafeguardProtected[];
|
extern const u8 BattleScript_SafeguardProtected[];
|
||||||
@ -534,6 +531,7 @@ extern const u8 BattleScript_AlreadyPoisoned[];
|
|||||||
extern const u8 BattleScript_AlreadyParalyzed[];
|
extern const u8 BattleScript_AlreadyParalyzed[];
|
||||||
extern const u8 BattleScript_AlreadyBurned[];
|
extern const u8 BattleScript_AlreadyBurned[];
|
||||||
extern const u8 BattleScript_PrintAbilityMadeIneffective[];
|
extern const u8 BattleScript_PrintAbilityMadeIneffective[];
|
||||||
|
extern const u8 BattleScript_ItDoesntAffectFoe[];
|
||||||
|
|
||||||
// zmoves
|
// zmoves
|
||||||
extern const u8 BattleScript_ZMoveActivateDamaging[];
|
extern const u8 BattleScript_ZMoveActivateDamaging[];
|
||||||
@ -551,8 +549,6 @@ extern const u8 BattleScript_EffectSetWeather[];
|
|||||||
extern const u8 BattleScript_EffectSetTerrain[];
|
extern const u8 BattleScript_EffectSetTerrain[];
|
||||||
extern const u8 BattleScript_EffectStonesurge[];
|
extern const u8 BattleScript_EffectStonesurge[];
|
||||||
extern const u8 BattleScript_EffectSteelsurge[];
|
extern const u8 BattleScript_EffectSteelsurge[];
|
||||||
extern const u8 BattleScript_SteelsurgeFree[];
|
|
||||||
extern const u8 BattleScript_SteelsurgeDefog[];
|
|
||||||
extern const u8 BattleScript_DamageNonTypesStarts[];
|
extern const u8 BattleScript_DamageNonTypesStarts[];
|
||||||
extern const u8 BattleScript_DamageNonTypesContinues[];
|
extern const u8 BattleScript_DamageNonTypesContinues[];
|
||||||
extern const u8 BattleScript_DefogTryHazards[];
|
extern const u8 BattleScript_DefogTryHazards[];
|
||||||
@ -790,7 +786,7 @@ extern const u8 BattleScript_TryHitSwitchTarget[];
|
|||||||
extern const u8 BattleScript_HitSwitchTargetDynamaxed[];
|
extern const u8 BattleScript_HitSwitchTargetDynamaxed[];
|
||||||
extern const u8 BattleScript_AbilityPreventsPhasingOutRet[];
|
extern const u8 BattleScript_AbilityPreventsPhasingOutRet[];
|
||||||
extern const u8 BattleScript_PrintMonIsRootedRet[];
|
extern const u8 BattleScript_PrintMonIsRootedRet[];
|
||||||
extern const u8 BattleScript_EffectFinalGambit[];
|
extern const u8 BattleScript_FinalGambit[];
|
||||||
extern const u8 BattleScript_EffectAutotomize[];
|
extern const u8 BattleScript_EffectAutotomize[];
|
||||||
extern const u8 BattleScript_EffectCopycat[];
|
extern const u8 BattleScript_EffectCopycat[];
|
||||||
extern const u8 BattleScript_EffectDefog[];
|
extern const u8 BattleScript_EffectDefog[];
|
||||||
@ -821,7 +817,6 @@ extern const u8 BattleScript_EffectShoreUp[];
|
|||||||
extern const u8 BattleScript_EffectGeomancy[];
|
extern const u8 BattleScript_EffectGeomancy[];
|
||||||
extern const u8 BattleScript_EffectFairyLock[];
|
extern const u8 BattleScript_EffectFairyLock[];
|
||||||
extern const u8 BattleScript_EffectAllySwitch[];
|
extern const u8 BattleScript_EffectAllySwitch[];
|
||||||
extern const u8 BattleScript_EffectRelicSong[];
|
|
||||||
extern const u8 BattleScript_MoveEffectEerieSpell[];
|
extern const u8 BattleScript_MoveEffectEerieSpell[];
|
||||||
extern const u8 BattleScript_EffectJungleHealing[];
|
extern const u8 BattleScript_EffectJungleHealing[];
|
||||||
extern const u8 BattleScript_EffectCoaching[];
|
extern const u8 BattleScript_EffectCoaching[];
|
||||||
@ -865,7 +860,6 @@ extern const u8 BattleScript_EffectShedTail[];
|
|||||||
extern const u8 BattleScript_EffectUpperHand[];
|
extern const u8 BattleScript_EffectUpperHand[];
|
||||||
extern const u8 BattleScript_EffectTidyUp[];
|
extern const u8 BattleScript_EffectTidyUp[];
|
||||||
extern const u8 BattleScript_EffectSpicyExtract[];
|
extern const u8 BattleScript_EffectSpicyExtract[];
|
||||||
extern const u8 BattleScript_DamageToQuarterTargetHP[];
|
|
||||||
extern const u8 BattleScript_EffectFickleBeam[];
|
extern const u8 BattleScript_EffectFickleBeam[];
|
||||||
extern const u8 BattleScript_FickleBeamDoubled[];
|
extern const u8 BattleScript_FickleBeamDoubled[];
|
||||||
extern const u8 BattleScript_QuestionForfeitBattle[];
|
extern const u8 BattleScript_QuestionForfeitBattle[];
|
||||||
|
|||||||
@ -60,7 +60,7 @@ void BattleSetup_StartLatiBattle(void);
|
|||||||
void BattleSetup_StartLegendaryBattle(void);
|
void BattleSetup_StartLegendaryBattle(void);
|
||||||
void StartGroudonKyogreBattle(void);
|
void StartGroudonKyogreBattle(void);
|
||||||
void StartRegiBattle(void);
|
void StartRegiBattle(void);
|
||||||
u8 BattleSetup_GetEnvironmentId(void);
|
enum BattleEnvironments BattleSetup_GetEnvironmentId(void);
|
||||||
u8 GetWildBattleTransition(void);
|
u8 GetWildBattleTransition(void);
|
||||||
u8 GetTrainerBattleTransition(void);
|
u8 GetTrainerBattleTransition(void);
|
||||||
u8 GetSpecialBattleTransition(s32 id);
|
u8 GetSpecialBattleTransition(s32 id);
|
||||||
|
|||||||
@ -49,7 +49,7 @@ void SetEReaderTrainerGfxId(void);
|
|||||||
u16 GetBattleFacilityTrainerGfxId(u16 trainerId);
|
u16 GetBattleFacilityTrainerGfxId(u16 trainerId);
|
||||||
void PutNewBattleTowerRecord(struct EmeraldBattleTowerRecord *newRecordEm);
|
void PutNewBattleTowerRecord(struct EmeraldBattleTowerRecord *newRecordEm);
|
||||||
u8 GetFrontierTrainerFrontSpriteId(u16 trainerId);
|
u8 GetFrontierTrainerFrontSpriteId(u16 trainerId);
|
||||||
u8 GetFrontierOpponentClass(u16 trainerId);
|
enum TrainerClassID GetFrontierOpponentClass(u16 trainerId);
|
||||||
void GetFrontierTrainerName(u8 *dst, u16 trainerId);
|
void GetFrontierTrainerName(u8 *dst, u16 trainerId);
|
||||||
void FillFrontierTrainerParty(u8 monsCount);
|
void FillFrontierTrainerParty(u8 monsCount);
|
||||||
void FillFrontierTrainersParties(u8 monsCount);
|
void FillFrontierTrainersParties(u8 monsCount);
|
||||||
@ -60,7 +60,7 @@ void CalcEmeraldBattleTowerChecksum(struct EmeraldBattleTowerRecord *record);
|
|||||||
void CalcRubyBattleTowerChecksum(struct RSBattleTowerRecord *record);
|
void CalcRubyBattleTowerChecksum(struct RSBattleTowerRecord *record);
|
||||||
u16 GetCurrentBattleTowerWinStreak(u8 lvlMode, u8 battleMode);
|
u16 GetCurrentBattleTowerWinStreak(u8 lvlMode, u8 battleMode);
|
||||||
u8 GetEreaderTrainerFrontSpriteId(void);
|
u8 GetEreaderTrainerFrontSpriteId(void);
|
||||||
u8 GetEreaderTrainerClassId(void);
|
enum TrainerClassID GetEreaderTrainerClassId(void);
|
||||||
void GetEreaderTrainerName(u8 *dst);
|
void GetEreaderTrainerName(u8 *dst);
|
||||||
void ValidateEReaderTrainer(void);
|
void ValidateEReaderTrainer(void);
|
||||||
void ClearEReaderTrainer(struct BattleTowerEReaderTrainer *ereaderTrainer);
|
void ClearEReaderTrainer(struct BattleTowerEReaderTrainer *ereaderTrainer);
|
||||||
|
|||||||
@ -23,17 +23,12 @@
|
|||||||
#define MOVE_LIMITATION_PLACEHOLDER (1 << 15)
|
#define MOVE_LIMITATION_PLACEHOLDER (1 << 15)
|
||||||
#define MOVE_LIMITATIONS_ALL 0xFFFF
|
#define MOVE_LIMITATIONS_ALL 0xFFFF
|
||||||
|
|
||||||
enum NonVolatileStatus
|
// Switches between simulated battle calc and actual battle combat
|
||||||
|
enum FunctionCallOption
|
||||||
{
|
{
|
||||||
STATUS_CHECK_TRIGGER,
|
CHECK_TRIGGER, // Check the function without running scripts / setting any flags.
|
||||||
STATUS_RUN_SCRIPT,
|
AI_CHECK, // Check the function without running scripts / setting any flags. Same as CHECK_TRIGGER but only used when additional data has to be fetched during ai calcs
|
||||||
};
|
RUN_SCRIPT, // Used during actual combat where a script has to be run / flags need to be set
|
||||||
|
|
||||||
enum AbilityEffectOptions
|
|
||||||
{
|
|
||||||
ABILITY_CHECK_TRIGGER,
|
|
||||||
ABILITY_CHECK_TRIGGER_AI,
|
|
||||||
ABILITY_RUN_SCRIPT,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
enum MoveAbsorbed
|
enum MoveAbsorbed
|
||||||
@ -54,7 +49,6 @@ enum {
|
|||||||
ABILITYEFFECT_ATK_SYNCHRONIZE,
|
ABILITYEFFECT_ATK_SYNCHRONIZE,
|
||||||
ABILITYEFFECT_MOVE_END_OTHER,
|
ABILITYEFFECT_MOVE_END_OTHER,
|
||||||
ABILITYEFFECT_NEUTRALIZINGGAS,
|
ABILITYEFFECT_NEUTRALIZINGGAS,
|
||||||
ABILITYEFFECT_FIELD_SPORT, // Only used if B_SPORT_TURNS >= GEN_6
|
|
||||||
ABILITYEFFECT_ON_WEATHER,
|
ABILITYEFFECT_ON_WEATHER,
|
||||||
ABILITYEFFECT_ON_TERRAIN,
|
ABILITYEFFECT_ON_TERRAIN,
|
||||||
ABILITYEFFECT_SWITCH_IN_TERRAIN,
|
ABILITYEFFECT_SWITCH_IN_TERRAIN,
|
||||||
@ -63,10 +57,6 @@ enum {
|
|||||||
ABILITYEFFECT_SWITCH_IN_STATUSES,
|
ABILITYEFFECT_SWITCH_IN_STATUSES,
|
||||||
};
|
};
|
||||||
|
|
||||||
// Special cases
|
|
||||||
#define ABILITYEFFECT_MUD_SPORT 252 // Only used if B_SPORT_TURNS >= GEN_6
|
|
||||||
#define ABILITYEFFECT_WATER_SPORT 253 // Only used if B_SPORT_TURNS >= GEN_6
|
|
||||||
|
|
||||||
// For the first argument of ItemBattleEffects, to deteremine which block of item effects to try
|
// For the first argument of ItemBattleEffects, to deteremine which block of item effects to try
|
||||||
enum ItemCaseId
|
enum ItemCaseId
|
||||||
{
|
{
|
||||||
@ -113,29 +103,27 @@ struct TypePower
|
|||||||
u16 effect;
|
u16 effect;
|
||||||
};
|
};
|
||||||
|
|
||||||
enum
|
enum MoveSuccessOrder
|
||||||
{
|
{
|
||||||
CANCELLER_FLAGS,
|
CANCELLER_FLAGS,
|
||||||
CANCELLER_STANCE_CHANGE_1,
|
CANCELLER_STANCE_CHANGE_1,
|
||||||
CANCELLER_SKY_DROP,
|
CANCELLER_SKY_DROP,
|
||||||
CANCELLER_RECHARGE,
|
CANCELLER_RECHARGE,
|
||||||
CANCELLER_ASLEEP,
|
CANCELLER_ASLEEP_OR_FROZEN,
|
||||||
CANCELLER_FROZEN,
|
|
||||||
CANCELLER_OBEDIENCE,
|
CANCELLER_OBEDIENCE,
|
||||||
CANCELLER_TRUANT,
|
CANCELLER_TRUANT,
|
||||||
CANCELLER_FLINCH,
|
CANCELLER_FLINCH,
|
||||||
CANCELLER_IN_LOVE,
|
|
||||||
CANCELLER_DISABLED,
|
CANCELLER_DISABLED,
|
||||||
CANCELLER_HEAL_BLOCKED,
|
CANCELLER_VOLATILE_BLOCKED,
|
||||||
CANCELLER_GRAVITY,
|
|
||||||
CANCELLER_THROAT_CHOP,
|
|
||||||
CANCELLER_TAUNTED,
|
CANCELLER_TAUNTED,
|
||||||
CANCELLER_IMPRISONED,
|
CANCELLER_IMPRISONED,
|
||||||
CANCELLER_CONFUSED,
|
CANCELLER_CONFUSED,
|
||||||
CANCELLER_PARALYSED,
|
CANCELLER_PARALYSED,
|
||||||
|
CANCELLER_INFATUATION,
|
||||||
CANCELLER_BIDE,
|
CANCELLER_BIDE,
|
||||||
CANCELLER_THAW,
|
CANCELLER_THAW,
|
||||||
CANCELLER_STANCE_CHANGE_2,
|
CANCELLER_STANCE_CHANGE_2,
|
||||||
|
CANCELLER_CHOICE_LOCK,
|
||||||
CANCELLER_WEATHER_PRIMAL,
|
CANCELLER_WEATHER_PRIMAL,
|
||||||
CANCELLER_DYNAMAX_BLOCKED,
|
CANCELLER_DYNAMAX_BLOCKED,
|
||||||
CANCELLER_POWDER_STATUS,
|
CANCELLER_POWDER_STATUS,
|
||||||
@ -148,7 +136,8 @@ enum
|
|||||||
CANCELLER_END,
|
CANCELLER_END,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum {
|
enum Obedience
|
||||||
|
{
|
||||||
OBEYS,
|
OBEYS,
|
||||||
DISOBEYS_LOAFS,
|
DISOBEYS_LOAFS,
|
||||||
DISOBEYS_HITS_SELF,
|
DISOBEYS_HITS_SELF,
|
||||||
@ -157,9 +146,16 @@ enum {
|
|||||||
DISOBEYS_RANDOM_MOVE,
|
DISOBEYS_RANDOM_MOVE,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum MoveCanceller
|
||||||
|
{
|
||||||
|
MOVE_STEP_SUCCESS,
|
||||||
|
MOVE_STEP_BREAK,
|
||||||
|
MOVE_STEP_REMOVES_STATUS,
|
||||||
|
};
|
||||||
|
|
||||||
extern const struct TypePower gNaturalGiftTable[];
|
extern const struct TypePower gNaturalGiftTable[];
|
||||||
|
|
||||||
struct DamageCalculationData
|
struct DamageContext
|
||||||
{
|
{
|
||||||
u32 battlerAtk:3;
|
u32 battlerAtk:3;
|
||||||
u32 battlerDef:3;
|
u32 battlerDef:3;
|
||||||
@ -168,9 +164,16 @@ struct DamageCalculationData
|
|||||||
u32 isCrit:1;
|
u32 isCrit:1;
|
||||||
u32 randomFactor:1;
|
u32 randomFactor:1;
|
||||||
u32 updateFlags:1;
|
u32 updateFlags:1;
|
||||||
u32 padding:2;
|
u32 padding1:2;
|
||||||
|
u32 weather:16;
|
||||||
|
u32 fixedBasePower:8;
|
||||||
|
u32 padding2:8;
|
||||||
|
uq4_12_t typeEffectivenessModifier;
|
||||||
|
u32 abilityAtk:16;
|
||||||
|
u32 abilityDef:16;
|
||||||
|
enum ItemHoldEffect holdEffectAtk:16;
|
||||||
|
enum ItemHoldEffect holdEffectDef:16;
|
||||||
};
|
};
|
||||||
STATIC_ASSERT(sizeof(struct DamageCalculationData) <= 4, StructExceedsFourBytes);
|
|
||||||
|
|
||||||
enum SleepClauseBlock
|
enum SleepClauseBlock
|
||||||
{
|
{
|
||||||
@ -216,32 +219,37 @@ void MarkBattlerForControllerExec(u32 battler);
|
|||||||
void MarkBattlerReceivedLinkData(u32 battler);
|
void MarkBattlerReceivedLinkData(u32 battler);
|
||||||
const u8 *CancelMultiTurnMoves(u32 battler, enum SkyDropState skyDropState);
|
const u8 *CancelMultiTurnMoves(u32 battler, enum SkyDropState skyDropState);
|
||||||
bool32 WasUnableToUseMove(u32 battler);
|
bool32 WasUnableToUseMove(u32 battler);
|
||||||
|
bool32 ShouldDefiantCompetitiveActivate(u32 battler, u32 ability);
|
||||||
void PrepareStringBattle(enum StringID stringId, u32 battler);
|
void PrepareStringBattle(enum StringID stringId, u32 battler);
|
||||||
void ResetSentPokesToOpponentValue(void);
|
void ResetSentPokesToOpponentValue(void);
|
||||||
void OpponentSwitchInResetSentPokesToOpponentValue(u32 battler);
|
void OpponentSwitchInResetSentPokesToOpponentValue(u32 battler);
|
||||||
void UpdateSentPokesToOpponentValue(u32 battler);
|
void UpdateSentPokesToOpponentValue(u32 battler);
|
||||||
void BattleScriptPush(const u8 *bsPtr);
|
void BattleScriptPush(const u8 *bsPtr);
|
||||||
void BattleScriptPushCursor(void);
|
void BattleScriptPushCursor(void);
|
||||||
|
void BattleScriptCall(const u8 *bsPtr);
|
||||||
void BattleScriptPop(void);
|
void BattleScriptPop(void);
|
||||||
u32 TrySetCantSelectMoveBattleScript(u32 battler);
|
u32 TrySetCantSelectMoveBattleScript(u32 battler);
|
||||||
u8 CheckMoveLimitations(u32 battler, u8 unusableMoves, u16 check);
|
u32 CheckMoveLimitations(u32 battler, u8 unusableMoves, u16 check);
|
||||||
bool32 AreAllMovesUnusable(u32 battler);
|
bool32 AreAllMovesUnusable(u32 battler);
|
||||||
u8 GetImprisonedMovesCount(u32 battler, u16 move);
|
u8 GetImprisonedMovesCount(u32 battler, u16 move);
|
||||||
s32 GetDrainedBigRootHp(u32 battler, s32 hp);
|
s32 GetDrainedBigRootHp(u32 battler, s32 hp);
|
||||||
bool32 IsMagicGuardProtected(u32 battler, u32 ability);
|
bool32 IsAbilityAndRecord(u32 battler, u32 battlerAbility, u32 abilityToCheck);
|
||||||
u32 DoEndTurnEffects(void);
|
u32 DoEndTurnEffects(void);
|
||||||
bool32 HandleFaintedMonActions(void);
|
bool32 HandleFaintedMonActions(void);
|
||||||
void TryClearRageAndFuryCutter(void);
|
void TryClearRageAndFuryCutter(void);
|
||||||
u32 AtkCanceller_MoveSuccessOrder(void);
|
enum MoveCanceller AtkCanceller_MoveSuccessOrder(void);
|
||||||
void SetAtkCancellerForCalledMove(void);
|
void SetAtkCancellerForCalledMove(void);
|
||||||
bool32 HasNoMonsToSwitch(u32 battler, u8 partyIdBattlerOn1, u8 partyIdBattlerOn2);
|
bool32 HasNoMonsToSwitch(u32 battler, u8 partyIdBattlerOn1, u8 partyIdBattlerOn2);
|
||||||
bool32 TryChangeBattleWeather(u32 battler, u32 battleWeatherId, bool32 viaAbility);
|
bool32 TryChangeBattleWeather(u32 battler, u32 battleWeatherId, bool32 viaAbility);
|
||||||
bool32 CanAbilityBlockMove(u32 battlerAtk, u32 battlerDef, u32 abilityAtk, u32 abilityDef, u32 move, enum AbilityEffectOptions option);
|
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 AbilityEffectOptions 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);
|
u32 AbilityBattleEffects(u32 caseID, u32 battler, u32 ability, u32 special, u32 moveArg);
|
||||||
bool32 TryPrimalReversion(u32 battler);
|
bool32 TryPrimalReversion(u32 battler);
|
||||||
bool32 IsNeutralizingGasOnField(void);
|
bool32 IsNeutralizingGasOnField(void);
|
||||||
bool32 IsMoldBreakerTypeAbility(u32 battler, u32 ability);
|
bool32 IsMoldBreakerTypeAbility(u32 battler, u32 ability);
|
||||||
|
u32 GetBattlerAbilityIgnoreMoldBreaker(u32 battler);
|
||||||
|
u32 GetBattlerAbilityNoAbilityShield(u32 battler);
|
||||||
|
u32 GetBattlerAbilityInternal(u32 battler, u32 ignoreMoldBreaker, u32 noAbilityShield);
|
||||||
u32 GetBattlerAbility(u32 battler);
|
u32 GetBattlerAbility(u32 battler);
|
||||||
u32 IsAbilityOnSide(u32 battler, u32 ability);
|
u32 IsAbilityOnSide(u32 battler, u32 ability);
|
||||||
u32 IsAbilityOnOpposingSide(u32 battler, u32 ability);
|
u32 IsAbilityOnOpposingSide(u32 battler, u32 ability);
|
||||||
@ -253,7 +261,7 @@ u32 GetProtectType(enum ProtectMethod method);
|
|||||||
bool32 CanBattlerEscape(u32 battler); // no ability check
|
bool32 CanBattlerEscape(u32 battler); // no ability check
|
||||||
void BattleScriptExecute(const u8 *BS_ptr);
|
void BattleScriptExecute(const u8 *BS_ptr);
|
||||||
void BattleScriptPushCursorAndCallback(const u8 *BS_ptr);
|
void BattleScriptPushCursorAndCallback(const u8 *BS_ptr);
|
||||||
u32 ItemBattleEffects(enum ItemCaseId, u32 battler, bool32 moveTurn);
|
u32 ItemBattleEffects(enum ItemCaseId, u32 battler);
|
||||||
void ClearVariousBattlerFlags(u32 battler);
|
void ClearVariousBattlerFlags(u32 battler);
|
||||||
void HandleAction_RunBattleScript(void);
|
void HandleAction_RunBattleScript(void);
|
||||||
u32 SetRandomTarget(u32 battler);
|
u32 SetRandomTarget(u32 battler);
|
||||||
@ -270,11 +278,11 @@ u32 GetMoveSlot(u16 *moves, u32 move);
|
|||||||
u32 GetBattlerWeight(u32 battler);
|
u32 GetBattlerWeight(u32 battler);
|
||||||
u32 CalcRolloutBasePower(u32 battlerAtk, u32 basePower, u32 rolloutTimer);
|
u32 CalcRolloutBasePower(u32 battlerAtk, u32 basePower, u32 rolloutTimer);
|
||||||
u32 CalcFuryCutterBasePower(u32 basePower, u32 furyCutterCounter);
|
u32 CalcFuryCutterBasePower(u32 basePower, u32 furyCutterCounter);
|
||||||
s32 CalculateMoveDamage(struct DamageCalculationData *damageCalcData, u32 fixedBasePower);
|
s32 CalculateMoveDamage(struct DamageContext *ctx);
|
||||||
s32 CalculateMoveDamageVars(struct DamageCalculationData *damageCalcData, u32 fixedBasePower, uq4_12_t typeEffectivenessModifier,
|
s32 CalculateMoveDamageVars(struct DamageContext *ctx);
|
||||||
u32 weather, enum ItemHoldEffect holdEffectAtk, enum ItemHoldEffect holdEffectDef, u32 abilityAtk, u32 abilityDef);
|
s32 DoFixedDamageMoveCalc(struct DamageContext *ctx);
|
||||||
s32 ApplyModifiersAfterDmgRoll(s32 dmg, struct DamageCalculationData *damageCalcData, uq4_12_t typeEffectivenessModifier, u32 abilityAtk, u32 abilityDef, enum ItemHoldEffect holdEffectAtk, enum ItemHoldEffect holdEffectDef);
|
s32 ApplyModifiersAfterDmgRoll(struct DamageContext *ctx, s32 dmg);
|
||||||
uq4_12_t CalcTypeEffectivenessMultiplier(u32 move, u32 moveType, u32 battlerAtk, u32 battlerDef, u32 defAbility, bool32 recordAbilities);
|
uq4_12_t CalcTypeEffectivenessMultiplier(struct DamageContext *ctx);
|
||||||
uq4_12_t CalcPartyMonTypeEffectivenessMultiplier(u16 move, u16 speciesDef, u16 abilityDef);
|
uq4_12_t CalcPartyMonTypeEffectivenessMultiplier(u16 move, u16 speciesDef, u16 abilityDef);
|
||||||
uq4_12_t GetTypeModifier(u32 atkType, u32 defType);
|
uq4_12_t GetTypeModifier(u32 atkType, u32 defType);
|
||||||
uq4_12_t GetOverworldTypeEffectiveness(struct Pokemon *mon, u8 moveType);
|
uq4_12_t GetOverworldTypeEffectiveness(struct Pokemon *mon, u8 moveType);
|
||||||
@ -300,7 +308,7 @@ void ClearIllusionMon(u32 battler);
|
|||||||
u32 GetIllusionMonPartyId(struct Pokemon *party, struct Pokemon *mon, struct Pokemon *partnerMon, u32 battler);
|
u32 GetIllusionMonPartyId(struct Pokemon *party, struct Pokemon *mon, struct Pokemon *partnerMon, u32 battler);
|
||||||
bool32 SetIllusionMon(struct Pokemon *mon, u32 battler);
|
bool32 SetIllusionMon(struct Pokemon *mon, u32 battler);
|
||||||
bool32 ShouldGetStatBadgeBoost(u16 flagId, u32 battler);
|
bool32 ShouldGetStatBadgeBoost(u16 flagId, u32 battler);
|
||||||
u32 GetBattleMoveCategory(u32 move);
|
enum DamageCategory GetBattleMoveCategory(u32 move);
|
||||||
void SetDynamicMoveCategory(u32 battlerAtk, u32 battlerDef, u32 move);
|
void SetDynamicMoveCategory(u32 battlerAtk, u32 battlerDef, u32 move);
|
||||||
bool32 CanFling(u32 battler);
|
bool32 CanFling(u32 battler);
|
||||||
bool32 IsTelekinesisBannedSpecies(u16 species);
|
bool32 IsTelekinesisBannedSpecies(u16 species);
|
||||||
@ -308,7 +316,7 @@ bool32 IsHealBlockPreventingMove(u32 battler, u32 move);
|
|||||||
bool32 IsBelchPreventingMove(u32 battler, u32 move);
|
bool32 IsBelchPreventingMove(u32 battler, u32 move);
|
||||||
bool32 HasEnoughHpToEatBerry(u32 battler, u32 hpFraction, u32 itemId);
|
bool32 HasEnoughHpToEatBerry(u32 battler, u32 hpFraction, u32 itemId);
|
||||||
bool32 IsPartnerMonFromSameTrainer(u32 battler);
|
bool32 IsPartnerMonFromSameTrainer(u32 battler);
|
||||||
u8 GetCategoryBasedOnStats(u32 battler);
|
enum DamageCategory GetCategoryBasedOnStats(u32 battler);
|
||||||
void SetShellSideArmCategory(void);
|
void SetShellSideArmCategory(void);
|
||||||
bool32 MoveIsAffectedBySheerForce(u32 move);
|
bool32 MoveIsAffectedBySheerForce(u32 move);
|
||||||
bool32 TestIfSheerForceAffected(u32 battler, u16 move);
|
bool32 TestIfSheerForceAffected(u32 battler, u16 move);
|
||||||
@ -349,7 +357,7 @@ bool32 CanBeBurned(u32 battlerAtk, u32 battlerDef, u32 ability);
|
|||||||
bool32 CanBeParalyzed(u32 battlerAtk, u32 battlerDef, u32 abilityDef);
|
bool32 CanBeParalyzed(u32 battlerAtk, u32 battlerDef, u32 abilityDef);
|
||||||
bool32 CanBeFrozen(u32 battlerAtk, u32 battlerDef, u32 abilityDef);
|
bool32 CanBeFrozen(u32 battlerAtk, u32 battlerDef, u32 abilityDef);
|
||||||
bool32 CanGetFrostbite(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 MoveEffects secondaryMoveEffect, enum NonVolatileStatus option);
|
bool32 CanSetNonVolatileStatus(u32 battlerAtk, u32 battlerDef, u32 abilityAtk, u32 abilityDef, enum MoveEffect secondaryMoveEffect, enum FunctionCallOption option);
|
||||||
bool32 CanBeConfused(u32 battler);
|
bool32 CanBeConfused(u32 battler);
|
||||||
bool32 IsBattlerTerrainAffected(u32 battler, u32 terrainFlag);
|
bool32 IsBattlerTerrainAffected(u32 battler, u32 terrainFlag);
|
||||||
u32 GetBattlerAffectionHearts(u32 battler);
|
u32 GetBattlerAffectionHearts(u32 battler);
|
||||||
@ -385,5 +393,20 @@ bool32 IsFutureSightAttackerInParty(u32 battlerAtk, u32 battlerDef, u32 move);
|
|||||||
bool32 HadMoreThanHalfHpNowDoesnt(u32 battler);
|
bool32 HadMoreThanHalfHpNowDoesnt(u32 battler);
|
||||||
void UpdateStallMons(void);
|
void UpdateStallMons(void);
|
||||||
bool32 TryRestoreHPBerries(u32 battler, enum ItemCaseId caseId);
|
bool32 TryRestoreHPBerries(u32 battler, enum ItemCaseId caseId);
|
||||||
|
bool32 TrySwitchInEjectPack(enum ItemCaseId caseID);
|
||||||
|
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);
|
||||||
|
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 IsSemiInvulnerable(u32 battler, enum SemiInvulnerableExclusion excludeCommander);
|
||||||
|
bool32 BreaksThroughSemiInvulnerablity(u32 battler, u32 move);
|
||||||
|
|
||||||
#endif // GUARD_BATTLE_UTIL_H
|
#endif // GUARD_BATTLE_UTIL_H
|
||||||
|
|||||||
@ -13,6 +13,7 @@
|
|||||||
|
|
||||||
// AI smart switching chances; if you want more complex behaviour, modify GetSwitchChance
|
// AI smart switching chances; if you want more complex behaviour, modify GetSwitchChance
|
||||||
#define SHOULD_SWITCH_ABSORBS_MOVE_PERCENTAGE 100
|
#define SHOULD_SWITCH_ABSORBS_MOVE_PERCENTAGE 100
|
||||||
|
#define SHOULD_SWITCH_ABSORBS_HIDDEN_POWER_PERCENTAGE 50
|
||||||
#define SHOULD_SWITCH_TRAPPER_PERCENTAGE 100
|
#define SHOULD_SWITCH_TRAPPER_PERCENTAGE 100
|
||||||
#define SHOULD_SWITCH_FREE_TURN_PERCENTAGE 100
|
#define SHOULD_SWITCH_FREE_TURN_PERCENTAGE 100
|
||||||
#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 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
|
||||||
@ -51,10 +52,16 @@
|
|||||||
#define AI_GOOD_SCORE_THRESHOLD 100 // Move scores above this threshold are considered "good" when deciding switching
|
#define AI_GOOD_SCORE_THRESHOLD 100 // Move scores above this threshold are considered "good" when deciding switching
|
||||||
|
|
||||||
// AI held item-based move scoring
|
// AI held item-based move scoring
|
||||||
#define LOW_ACCURACY_THRESHOLD 75 // Moves with accuracy equal OR below this value are considered low accuracy
|
#define LOW_ACCURACY_THRESHOLD 75 // Moves with accuracy equal OR below this value are considered low accuracy
|
||||||
|
|
||||||
// AI move scoring
|
// AI move scoring
|
||||||
#define STATUS_MOVE_FOCUS_PUNCH_CHANCE 50 // Chance the AI will use a status move if the player's best move is Focus Punch
|
#define STATUS_MOVE_FOCUS_PUNCH_CHANCE 50 // Chance the AI will use a status move if the player's best move is Focus Punch
|
||||||
|
#define BOOST_INTO_HAZE_CHANCE 0 // Chance the AI will use a stat boosting move if the player has used Haze
|
||||||
|
#define SHOULD_RECOVER_CHANCE 50 // Chance the AI will give recovery moves score increase if less than ENABLE_RECOVERY_THRESHOLD and in no immediate danger
|
||||||
|
#define ENABLE_RECOVERY_THRESHOLD 60 // HP percentage beneath which SHOULD_RECOVER_CHANCE is active
|
||||||
|
#define SUCKER_PUNCH_CHANCE 50 // Chance for the AI to not use Sucker Punch if the player has a status move
|
||||||
|
#define SUCKER_PUNCH_PREDICTION_CHANCE 50 // Additional chance for the AI to not use Sucker Punch if actively predicting a status move if SUCKER_PUNCH_CHANCE fails
|
||||||
|
#define PRIORITIZE_LAST_CHANCE_CHANCE 50 // Chance the AI will prioritize Last Chance (priority move in the face of being outsped and KO'd) over Slow KO
|
||||||
|
|
||||||
// AI damage calc considerations
|
// AI damage calc considerations
|
||||||
#define RISKY_AI_CRIT_STAGE_THRESHOLD 2 // Stat stages at which Risky will assume it gets a crit
|
#define RISKY_AI_CRIT_STAGE_THRESHOLD 2 // Stat stages at which Risky will assume it gets a crit
|
||||||
@ -64,14 +71,43 @@
|
|||||||
#define PREDICT_SWITCH_CHANCE 50
|
#define PREDICT_SWITCH_CHANCE 50
|
||||||
#define PREDICT_MOVE_CHANCE 100
|
#define PREDICT_MOVE_CHANCE 100
|
||||||
|
|
||||||
// AI PP Stall detection chance per roll
|
// AI Terastalization chances
|
||||||
#define PP_STALL_DISREGARD_MOVE_PERCENTAGE 50
|
#define AI_CONSERVE_TERA_CHANCE_PER_MON 10 // Chance for AI with smart tera flag to decide not to tera before considering defensive benefit is this*(X-1), where X is the number of alive pokemon that could tera
|
||||||
// Score reduction if any roll for PP stall detection passes
|
#define AI_TERA_PREDICT_CHANCE 40 // Chance for AI with smart tera flag to tera in the situation where tera would save it from a KO, but could be punished by a KO from a different move.
|
||||||
#define PP_STALL_SCORE_REDUCTION 20
|
|
||||||
|
|
||||||
// AI's acceptable number of hits to KO the partner via friendly fire in a double battle.
|
// AI_FLAG_PP_STALL_PREVENTION settings
|
||||||
#define FRIENDLY_FIRE_RISKY_THRESHOLD 2
|
#define PP_STALL_DISREGARD_MOVE_PERCENTAGE 50 // Detection chance per roll
|
||||||
#define FRIENDLY_FIRE_NORMAL_THRESHOLD 3
|
#define PP_STALL_SCORE_REDUCTION 20 // Score reduction if any roll for PP stall detection passes
|
||||||
#define FRIENDLY_FIRE_CONSERVATIVE_THRESHOLD 4
|
|
||||||
|
// AI_FLAG_ASSUME_STAB settings
|
||||||
|
#define ASSUME_STAB_SEES_ABILITY FALSE // Flag also gives omniscience for player's ability. Can use AI_FLAG_WEIGH_ABILITY_PREDICTION instead for smarter prediction without omniscience.
|
||||||
|
|
||||||
|
// AI_FLAG_ASSUME_STATUS_MOVES settings
|
||||||
|
#define ASSUME_STATUS_MOVES_HAS_TUNING TRUE // Flag has varying rates for different kinds of status move.
|
||||||
|
// Setting to false also means it will not alert on Fake Out or Super Fang.
|
||||||
|
#define ASSUME_STATUS_HIGH_ODDS 90 // Chance for AI to see extremely likely moves for a pokemon to have, like Spore
|
||||||
|
#define ASSUME_STATUS_MEDIUM_ODDS 70 // Chance for AI to see moderately likely moves for a pokemon to have, like Protect
|
||||||
|
#define ASSUME_STATUS_LOW_ODDS 40 // Chance for AI to see niche moves a pokemon may have but probably won't, like Entrainment
|
||||||
|
#define ASSUME_ALL_STATUS_ODDS 25 // Chance for the AI to see any kind of status move.
|
||||||
|
|
||||||
|
// AI_FLAG_SMART_SWITCHING settings
|
||||||
|
#define SMART_SWITCHING_OMNISCIENT FALSE // AI will use omniscience for switching calcs, regardless of omniscience setting otherwise
|
||||||
|
|
||||||
|
// Configurations specifically for AI_FLAG_DOUBLE_BATTLE.
|
||||||
|
#define FRIENDLY_FIRE_RISKY_THRESHOLD 2 // AI_FLAG_RISKY acceptable number of hits to KO the partner via friendly fire
|
||||||
|
#define FRIENDLY_FIRE_NORMAL_THRESHOLD 3 // typical acceptable number of hits to KO the partner via friendly fire
|
||||||
|
#define FRIENDLY_FIRE_CONSERVATIVE_THRESHOLD 4 // AI_FLAG_CONSERVATIVE acceptable number of hits to KO the partner via friendly fire
|
||||||
|
// Counterplay on the assumption of opponents Protecting.
|
||||||
|
#define DOUBLE_TRICK_ROOM_ON_LAST_TURN_CHANCE 35 // both pokemon use Trick Room on turn Trick Room expires in the hopes both opponents used Protect to stall, getting a free refresh on the timer
|
||||||
|
#define TAILWIND_IN_TRICK_ROOM_CHANCE 35 // use Tailwind on turn Trick Room expires in the hopes both opponents used Protect to stall
|
||||||
|
|
||||||
|
#define AI_FLAG_ATTACKS_PARTNER_FOCUSES_PARTNER FALSE // if TRUE, AI_FLAG_ATTACKS_PARTNER prefers attacking the partner over the ally.
|
||||||
|
// This is treated as true regardless during wild battles with AI.
|
||||||
|
|
||||||
|
// AI's desired stat changes for Guard Split and Power Split, treated as %
|
||||||
|
#define GUARD_SPLIT_ALLY_PERCENTAGE 200
|
||||||
|
#define GUARD_SPLIT_ENEMY_PERCENTAGE 50
|
||||||
|
#define POWER_SPLIT_ALLY_PERCENTAGE 150
|
||||||
|
#define POWER_SPLIT_ENEMY_PERCENTAGE 50
|
||||||
|
|
||||||
#endif // GUARD_CONFIG_AI_H
|
#endif // GUARD_CONFIG_AI_H
|
||||||
|
|||||||
@ -129,6 +129,10 @@
|
|||||||
#define B_DESTINY_BOND_FAIL GEN_LATEST // In Gen7+, Destiny Bond fails if used repeatedly.
|
#define B_DESTINY_BOND_FAIL GEN_LATEST // In Gen7+, Destiny Bond fails if used repeatedly.
|
||||||
#define B_PURSUIT_TARGET GEN_LATEST // In Gen4+, Pursuit attacks a switching opponent even if they weren't targeting them. Before Gen4, Pursuit only attacks a switching opponent that it originally targeted.
|
#define B_PURSUIT_TARGET GEN_LATEST // In Gen4+, Pursuit attacks a switching opponent even if they weren't targeting them. Before Gen4, Pursuit only attacks a switching opponent that it originally targeted.
|
||||||
#define B_SKIP_RECHARGE GEN_LATEST // In Gen1, recharging moves such as Hyper Beam skip the recharge if the target gets KO'd
|
#define B_SKIP_RECHARGE GEN_LATEST // In Gen1, recharging moves such as Hyper Beam skip the recharge if the target gets KO'd
|
||||||
|
#define B_ENCORE_TARGET GEN_LATEST // In Gen5+, encored moves are allowed to choose a target
|
||||||
|
#define B_TIME_OF_DAY_HEALING_MOVES GEN_LATEST // In Gen2, Morning Sun, Moonlight, and Synthesis heal twice as much HP based off the time of day. Also changes how much they heal. Evening affects Moonlight.
|
||||||
|
// If OW_TIMES_OF_DAY is set to Gen 3, then Morning Sun is boosted during the day.
|
||||||
|
#define B_DREAM_EATER_LIQUID_OOZE GEN_LATEST // In Gen5+, Dream Eater is affected by Liquid Ooze.
|
||||||
|
|
||||||
// Ability settings
|
// Ability settings
|
||||||
#define B_GALE_WINGS GEN_LATEST // In Gen7+ requires full HP to trigger.
|
#define B_GALE_WINGS GEN_LATEST // In Gen7+ requires full HP to trigger.
|
||||||
@ -161,6 +165,7 @@
|
|||||||
#define B_MAGIC_GUARD GEN_LATEST // In Gen4 only, Magic Guard ignores immobilization caused by paralysis
|
#define B_MAGIC_GUARD GEN_LATEST // In Gen4 only, Magic Guard ignores immobilization caused by paralysis
|
||||||
#define B_BATTLE_BOND GEN_LATEST // In Gen9+, Battle Bond increases Atk, SpAtk and Speed by one stage, once per battle
|
#define B_BATTLE_BOND GEN_LATEST // In Gen9+, Battle Bond increases Atk, SpAtk and Speed by one stage, once per battle
|
||||||
#define B_ATE_MULTIPLIER GEN_LATEST // In Gen7+, -ate abilities (Aerilate, Galvanize, Normalize, Pixilate, Refrigerate) multiply damage by 1.2. Otherwise, it's 1.3, except Normalize which has no multiplier.
|
#define B_ATE_MULTIPLIER GEN_LATEST // In Gen7+, -ate abilities (Aerilate, Galvanize, Normalize, Pixilate, Refrigerate) multiply damage by 1.2. Otherwise, it's 1.3, except Normalize which has no multiplier.
|
||||||
|
#define B_DEFIANT_STICKY_WEB GEN_LATEST // In Gen9+, Defiant activates on Sticky Web regardless of who set it up. In Gen8, Defiant does not activate on Sticky Web set up by an ally after Court Change swaps its side.
|
||||||
|
|
||||||
// Item settings
|
// 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_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.
|
||||||
@ -258,26 +263,27 @@
|
|||||||
#define B_TERRAIN_TYPE_BOOST GEN_LATEST // In Gen8, damage is boosted by 30% instead of 50%.
|
#define B_TERRAIN_TYPE_BOOST GEN_LATEST // In Gen8, damage is boosted by 30% instead of 50%.
|
||||||
#define B_SECRET_POWER_EFFECT GEN_LATEST // Secret Power's effects change depending on terrain and generation. See MOVE_EFFECT_SECRET_POWER's case in `SetMoveEffect`.
|
#define B_SECRET_POWER_EFFECT GEN_LATEST // Secret Power's effects change depending on terrain and generation. See MOVE_EFFECT_SECRET_POWER's case in `SetMoveEffect`.
|
||||||
#define B_SECRET_POWER_ANIMATION GEN_LATEST // Secret Power's animations change depending on terrain and generation.
|
#define B_SECRET_POWER_ANIMATION GEN_LATEST // Secret Power's animations change depending on terrain and generation.
|
||||||
#define B_NATURE_POWER_MOVES GEN_LATEST // Nature Power calls different moves depending on terrain and generation. See sNaturePowerMoves.
|
#define B_NATURE_POWER_MOVES GEN_LATEST // Nature Power calls different moves depending on terrain and generation. See gBattleEnvironmentInfo.
|
||||||
#define B_CAMOUFLAGE_TYPES GEN_LATEST // Camouflage changes the user to different types depending on terrain and generation. See sTerrainToType.
|
#define B_CAMOUFLAGE_TYPES GEN_LATEST // Camouflage changes the user to different types depending on terrain and generation. See sTerrainToType.
|
||||||
#define B_NEW_TERRAIN_BACKGROUNDS FALSE // If set to TRUE, uses new terrain backgrounds for Electric, Misty, Grassy and Psychic Terrain.
|
#define B_NEW_TERRAIN_BACKGROUNDS FALSE // If set to TRUE, uses new terrain backgrounds for Electric, Misty, Grassy and Psychic Terrain.
|
||||||
|
|
||||||
// Interface settings
|
// 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_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_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_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.
|
#define B_FAST_HP_DRAIN TRUE // If set to TRUE, HP bars will move faster.
|
||||||
#define B_FAST_EXP_GROW TRUE // If set to TRUE, EXP bars will move faster.
|
#define B_FAST_EXP_GROW TRUE // If set to TRUE, EXP bars will move faster.
|
||||||
#define B_SHOW_TARGETS TRUE // If set to TRUE, all available targets, for moves hitting 2 or 3 Pokémon, will be shown before selecting a move.
|
#define B_SHOW_TARGETS TRUE // If set to TRUE, all available targets, for moves hitting 2 or 3 Pokémon, will be shown before selecting a move.
|
||||||
#define B_SHOW_CATEGORY_ICON TRUE // If set to TRUE, it will show an icon in the summary and move relearner showing the move's category.
|
#define B_SHOW_CATEGORY_ICON TRUE // If set to TRUE, it will show an icon in the summary and move relearner showing the move's category.
|
||||||
#define B_HIDE_HEALTHBOX_IN_ANIMS TRUE // If set to TRUE, hides healthboxes during move animations.
|
#define B_HIDE_HEALTHBOX_IN_ANIMS TRUE // If set to TRUE, hides healthboxes during move animations.
|
||||||
#define B_WAIT_TIME_MULTIPLIER 16 // This determines how long text pauses in battle last. Vanilla is 16. Lower values result in faster battles.
|
#define B_WAIT_TIME_MULTIPLIER 16 // This determines how long text pauses in battle last. Vanilla is 16. Lower values result in faster battles.
|
||||||
#define B_QUICK_MOVE_CURSOR_TO_RUN FALSE // If set to TRUE, pushing B in the battle options against a wild encounter will move the cursor to the run option
|
#define B_QUICK_MOVE_CURSOR_TO_RUN FALSE // If set to TRUE, pushing B in the battle options against a wild encounter will move the cursor to the run option
|
||||||
#define B_RUN_TRAINER_BATTLE TRUE // If set to TRUE, players can run from Trainer battles. This is treated as a whiteout.
|
#define B_RUN_TRAINER_BATTLE TRUE // If set to TRUE, players can run from Trainer battles. This is treated as a whiteout.
|
||||||
#define B_MOVE_DESCRIPTION_BUTTON L_BUTTON // If set to a button other than B_LAST_USED_BALL_BUTTON, pressing this button will open the move description menu
|
#define B_MOVE_DESCRIPTION_BUTTON L_BUTTON // If set to a button other than B_LAST_USED_BALL_BUTTON, pressing this button will open the move description menu
|
||||||
#define B_SHOW_USELESS_Z_MOVE_INFO FALSE // If set to TRUE, Z-moves without additional effects like newer gen status moves will say "no additional effect"
|
#define B_SHOW_USELESS_Z_MOVE_INFO FALSE // If set to TRUE, Z-moves without additional effects like newer gen status moves will say "no additional effect"
|
||||||
#define B_ANIMATE_MON_AFTER_KO TRUE // If set to TRUE, if a Pokémon on the opposite site faints, the non-fainted Pokemon will display a victory animation.
|
#define B_ANIMATE_MON_AFTER_KO TRUE // If set to TRUE, if a Pokémon on the opposite site faints, the non-fainted Pokemon will display a victory animation.
|
||||||
#define B_SHOW_DYNAMAX_MESSAGE FALSE // If set to TRUE, an additional battle message is shown after completing Dynamaxing/Gigantamaxing.
|
#define B_ANIMATE_MON_AFTER_FAILED_POKEBALL TRUE // If set to TRUE, if a Pokémon on the opposite side breaks out of a thrown Poké Ball, the wild Pokémon will display its animation.
|
||||||
|
#define B_SHOW_DYNAMAX_MESSAGE FALSE // If set to TRUE, an additional battle message is shown after completing Dynamaxing/Gigantamaxing.
|
||||||
|
|
||||||
// Catching settings
|
// 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_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)
|
||||||
|
|||||||
@ -69,9 +69,9 @@
|
|||||||
// General settings
|
// General settings
|
||||||
#define EXPANSION_INTRO TRUE // If TRUE, a custom RHH intro will play after the vanilla copyright screen.
|
#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 HQ_RANDOM TRUE // If TRUE, replaces the default RNG with an implementation of SFC32 RNG. May break code that relies on RNG.
|
||||||
#define COMPETITIVE_PARTY_SYNTAX TRUE // If TRUE, parties are defined in "competitive syntax".
|
|
||||||
#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 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 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
|
// Measurement system constants to be used for UNITS
|
||||||
#define UNITS_IMPERIAL 0 // Inches, feet, pounds
|
#define UNITS_IMPERIAL 0 // Inches, feet, pounds
|
||||||
|
|||||||
@ -9,8 +9,9 @@
|
|||||||
#define OW_POISON_DAMAGE GEN_LATEST // In Gen4, Pokémon no longer faint from Poison in the overworld. In Gen5+, they no longer take damage at all.
|
#define OW_POISON_DAMAGE GEN_LATEST // In Gen4, Pokémon no longer faint from Poison in the overworld. In Gen5+, they no longer take damage at all.
|
||||||
#define OW_DOUBLE_APPROACH_WITH_ONE_MON FALSE // If enabled, you can be spotted by two trainers at the same time even if you only have one eligible Pokémon in your party.
|
#define OW_DOUBLE_APPROACH_WITH_ONE_MON FALSE // If enabled, you can be spotted by two trainers at the same time even if you only have one eligible Pokémon in your party.
|
||||||
#define OW_HIDE_REPEAT_MAP_POPUP FALSE // If enabled, map popups will not appear if entering a map with the same Map Section Id as the last.
|
#define OW_HIDE_REPEAT_MAP_POPUP FALSE // If enabled, map popups will not appear if entering a map with the same Map Section Id as the last.
|
||||||
#define OW_FRLG_WHITEOUT FALSE // If enabled, shows an additional whiteout message and post whiteout event script with healing NPC.
|
#define OW_WHITEOUT_CUTSCENE GEN_LATEST // In Gen4+, whiting out shows an additional message and post whiteout event script cutscene with a healing NPC. (While this change was also in FRLG, for the sake of simplicity, setting this to GEN_3 will result in RSE behavior.)
|
||||||
#define OW_DEFOG_FIELD_MOVE FALSE // If enabled, Defog can be used as a Field Move as seen in DPPt.
|
#define OW_DEFOG_FIELD_MOVE FALSE // If enabled, Defog can be used as a Field Move as seen in DPPt.
|
||||||
|
#define OW_ROCK_CLIMB_FIELD_MOVE FALSE // If enabled, Rock Climb can be used as a Field Move as seen in DPPt.
|
||||||
|
|
||||||
// Item Obtain Description Box
|
// Item Obtain Description Box
|
||||||
#define OW_ITEM_DESCRIPTIONS_OFF 0 // never show descriptions
|
#define OW_ITEM_DESCRIPTIONS_OFF 0 // never show descriptions
|
||||||
|
|||||||
@ -1,11 +1,12 @@
|
|||||||
#ifndef GUARD_CONFIG_POKEDEX_PLUS_HGSS_H
|
#ifndef GUARD_CONFIG_POKEDEX_PLUS_HGSS_H
|
||||||
#define GUARD_CONFIG_POKEDEX_PLUS_HGSS_H
|
#define GUARD_CONFIG_POKEDEX_PLUS_HGSS_H
|
||||||
|
|
||||||
#define POKEDEX_PLUS_HGSS TRUE // If TRUE, enables the custom HGSS style Pokedex.
|
#define POKEDEX_PLUS_HGSS TRUE // If TRUE, enables the custom HGSS style Pokedex.
|
||||||
#define HGSS_DECAPPED FALSE // If TRUE, uses decapped gfx and strings.
|
#define HGSS_DECAPPED FALSE // If TRUE, uses decapped gfx and strings.
|
||||||
#define HGSS_DARK_MODE FALSE // If TRUE, enables dark mode.
|
#define HGSS_DARK_MODE FALSE // If TRUE, enables dark mode.
|
||||||
#define HGSS_HIDE_UNSEEN_EVOLUTION_NAMES FALSE // If TRUE, hides evolution mon names.
|
#define HGSS_HIDE_UNSEEN_EVOLUTION_NAMES FALSE // If TRUE, hides evolution mon names.
|
||||||
#define HGSS_SORT_TMS_BY_NUM TRUE // If TRUE, sorts the TMS in HGSS Dex by TM number, rather than alphabetically.
|
#define HGSS_HIDE_UNOWNED_EVOLUTION_METHODS FALSE // If TRUE, hides evolution methods.
|
||||||
#define HGSS_SHOW_EGG_MOVES_FOR_EVOS FALSE // If TRUE, shows Egg Moves for evolved Pokémon too.
|
#define HGSS_SORT_TMS_BY_NUM FALSE // If TRUE, sorts the TMS in HGSS Dex by TM number, rather than alphabetically.
|
||||||
|
#define HGSS_SHOW_EGG_MOVES_FOR_EVOS FALSE // If TRUE, shows Egg Moves for evolved Pokémon too.
|
||||||
|
|
||||||
#endif // GUARD_CONFIG_POKEDEX_PLUS_HGSS_H
|
#endif // GUARD_CONFIG_POKEDEX_PLUS_HGSS_H
|
||||||
|
|||||||
@ -56,8 +56,9 @@
|
|||||||
#define P_SHOW_TERA_TYPE GEN_8 // Since Gen 9, the Tera Type is shown on the summary screen.
|
#define P_SHOW_TERA_TYPE GEN_8 // Since Gen 9, the Tera Type is shown on the summary screen.
|
||||||
#define P_TM_LITERACY GEN_LATEST // Since Gen 6, TM illiterate Pokémon can learn TMs that teach moves that are in their level-up learnsets.
|
#define P_TM_LITERACY GEN_LATEST // Since Gen 6, TM illiterate Pokémon can learn TMs that teach moves that are in their level-up learnsets.
|
||||||
#define P_CAN_FORGET_HIDDEN_MOVE FALSE // If TRUE, Pokémon can forget any move, even if it is a Hidden Move.
|
#define P_CAN_FORGET_HIDDEN_MOVE FALSE // If TRUE, Pokémon can forget any move, even if it is a Hidden Move.
|
||||||
|
#define P_ASK_MOVE_CONFIRMATION FALSE // If FALSE, when a player decides not to learn a Move, the game does not ask the player for confirmation.
|
||||||
#define P_EGG_CYCLE_LENGTH GEN_LATEST // Since Gen 8, egg cycles take half as many steps as before. Previous Gens have some varied step counts around 255.
|
#define P_EGG_CYCLE_LENGTH GEN_LATEST // Since Gen 8, egg cycles take half as many steps as before. Previous Gens have some varied step counts around 255.
|
||||||
#define P_ONLY_OBTAINABLE_SHINIES FALSE // If TRUE, Pokémon encountered in the Battle Pyramid won't be shiny.
|
#define P_ONLY_OBTAINABLE_SHINIES FALSE // If TRUE, Pokémon encountered in the Battle Pyramid or while catching is disabled won't be shiny.
|
||||||
#define P_NO_SHINIES_WITHOUT_POKEBALLS FALSE // If TRUE, Pokémon encountered when the player is out of Poké Balls won't be shiny
|
#define P_NO_SHINIES_WITHOUT_POKEBALLS FALSE // If TRUE, Pokémon encountered when the player is out of Poké Balls won't be shiny
|
||||||
#define P_SHOW_DYNAMIC_TYPES FALSE // If TRUE, all moves with dynamic type changes will be reflected as their current type in battle/summary screens instead of just select ones like in vanilla.
|
#define P_SHOW_DYNAMIC_TYPES FALSE // If TRUE, all moves with dynamic type changes will be reflected as their current type in battle/summary screens instead of just select ones like in vanilla.
|
||||||
|
|
||||||
|
|||||||
@ -1143,6 +1143,9 @@
|
|||||||
#undef B_FLAG_INVERSE_BATTLE
|
#undef B_FLAG_INVERSE_BATTLE
|
||||||
#define B_FLAG_INVERSE_BATTLE TESTING_FLAG_INVERSE_BATTLE
|
#define B_FLAG_INVERSE_BATTLE TESTING_FLAG_INVERSE_BATTLE
|
||||||
|
|
||||||
|
// Compression DebugPrintf switch
|
||||||
|
#define T_COMPRESSION_SHOULD_PRINT FALSE
|
||||||
|
|
||||||
// Move animation testing
|
// Move animation testing
|
||||||
#define T_SHOULD_RUN_MOVE_ANIM FALSE // If TRUE, enables the move animation tests, these are very computationally heavy and takes a long time to run.
|
#define T_SHOULD_RUN_MOVE_ANIM FALSE // If TRUE, enables the move animation tests, these are very computationally heavy and takes a long time to run.
|
||||||
|
|
||||||
|
|||||||
@ -132,82 +132,107 @@ enum BattlerId
|
|||||||
#define STATUS1_PSN_ANY (STATUS1_POISON | STATUS1_TOXIC_POISON)
|
#define STATUS1_PSN_ANY (STATUS1_POISON | STATUS1_TOXIC_POISON)
|
||||||
#define STATUS1_ANY (STATUS1_SLEEP | STATUS1_POISON | STATUS1_BURN | STATUS1_FREEZE | STATUS1_PARALYSIS | STATUS1_TOXIC_POISON | STATUS1_FROSTBITE)
|
#define STATUS1_ANY (STATUS1_SLEEP | STATUS1_POISON | STATUS1_BURN | STATUS1_FREEZE | STATUS1_PARALYSIS | STATUS1_TOXIC_POISON | STATUS1_FROSTBITE)
|
||||||
|
|
||||||
#define STATUS1_REFRESH (STATUS1_POISON | STATUS1_BURN | STATUS1_PARALYSIS | STATUS1_TOXIC_POISON | STATUS1_FROSTBITE)
|
#define STATUS1_CAN_MOVE (STATUS1_POISON | STATUS1_BURN | STATUS1_PARALYSIS | STATUS1_TOXIC_POISON | STATUS1_FROSTBITE)
|
||||||
|
#define STATUS1_INCAPACITATED (STATUS1_SLEEP | STATUS1_FREEZE)
|
||||||
|
#define STATUS1_ICY_ANY (STATUS1_FREEZE | STATUS1_FROSTBITE)
|
||||||
|
#define STATUS1_DAMAGING (STATUS1_PSN_ANY | STATUS1_BURN | STATUS1_FROSTBITE)
|
||||||
|
|
||||||
// Volatile status ailments
|
enum VolatileFlags
|
||||||
// These are removed after exiting the battle or switching out
|
{
|
||||||
#define STATUS2_CONFUSION (1 << 0 | 1 << 1 | 1 << 2)
|
V_BATON_PASSABLE = (1 << 0),
|
||||||
#define STATUS2_CONFUSION_TURN(num) ((num) << 0)
|
};
|
||||||
#define STATUS2_FLINCHED (1 << 3)
|
|
||||||
#define STATUS2_UPROAR (1 << 4 | 1 << 5 | 1 << 6)
|
|
||||||
#define STATUS2_UPROAR_TURN(num) ((num) << 4)
|
|
||||||
#define STATUS2_TORMENT (1 << 7)
|
|
||||||
#define STATUS2_BIDE (1 << 8 | 1 << 9)
|
|
||||||
#define STATUS2_BIDE_TURN(num) (((num) << 8) & STATUS2_BIDE)
|
|
||||||
#define STATUS2_LOCK_CONFUSE (1 << 10 | 1 << 11) // e.g. Thrash
|
|
||||||
#define STATUS2_LOCK_CONFUSE_TURN(num)((num) << 10)
|
|
||||||
#define STATUS2_MULTIPLETURNS (1 << 12)
|
|
||||||
#define STATUS2_WRAPPED (1 << 13)
|
|
||||||
#define STATUS2_POWDER (1 << 14)
|
|
||||||
#define STATUS2_INFATUATION (1 << 16 | 1 << 17 | 1 << 18 | 1 << 19) // 4 bits, one for every battler
|
|
||||||
#define STATUS2_INFATUATED_WITH(battler) (1u << (battler + 16))
|
|
||||||
#define STATUS2_DEFENSE_CURL (1 << 20)
|
|
||||||
#define STATUS2_TRANSFORMED (1 << 21)
|
|
||||||
#define STATUS2_RECHARGE (1 << 22)
|
|
||||||
#define STATUS2_RAGE (1 << 23)
|
|
||||||
#define STATUS2_SUBSTITUTE (1 << 24)
|
|
||||||
#define STATUS2_DESTINY_BOND (1 << 25)
|
|
||||||
#define STATUS2_ESCAPE_PREVENTION (1 << 26)
|
|
||||||
#define STATUS2_NIGHTMARE (1 << 27)
|
|
||||||
#define STATUS2_CURSED (1 << 28)
|
|
||||||
#define STATUS2_FORESIGHT (1 << 29)
|
|
||||||
#define STATUS2_DRAGON_CHEER (1 << 30)
|
|
||||||
#define STATUS2_FOCUS_ENERGY (1 << 31)
|
|
||||||
#define STATUS2_FOCUS_ENERGY_ANY (STATUS2_DRAGON_CHEER | STATUS2_FOCUS_ENERGY)
|
|
||||||
|
|
||||||
#define STATUS3_LEECHSEED_BATTLER (1 << 0 | 1 << 1) // The battler to receive HP from Leech Seed
|
/* Volatile status ailments
|
||||||
#define STATUS3_LEECHSEED (1 << 2)
|
* These are removed after exiting the battle or switching
|
||||||
#define STATUS3_ALWAYS_HITS (1 << 3 | 1 << 4)
|
* Enum, Type Type, max value, flags */
|
||||||
#define STATUS3_ALWAYS_HITS_TURN(num) (((num) << 3) & STATUS3_ALWAYS_HITS) // "Always Hits" is set as a 2 turn timer, i.e. next turn is the last turn when it's active
|
#define VOLATILE_DEFINITIONS(F) \
|
||||||
#define STATUS3_PERISH_SONG (1 << 5)
|
F(VOLATILE_CONFUSION, confusionTurns, (u32, 6), V_BATON_PASSABLE) \
|
||||||
#define STATUS3_ON_AIR (1 << 6)
|
F(VOLATILE_FLINCHED, flinched, (u32, 1)) \
|
||||||
#define STATUS3_UNDERGROUND (1 << 7)
|
F(VOLATILE_UPROAR, uproarTurns, (u32, 5)) \
|
||||||
#define STATUS3_MINIMIZED (1 << 8)
|
F(VOLATILE_TORMENT, torment, (u32, 1)) \
|
||||||
#define STATUS3_CHARGED_UP (1 << 9)
|
F(VOLATILE_BIDE, bideTurns, (u32, 3)) \
|
||||||
#define STATUS3_ROOTED (1 << 10)
|
F(VOLATILE_LOCK_CONFUSE, lockConfusionTurns, (u32, 3)) \
|
||||||
#define STATUS3_YAWN (1 << 11 | 1 << 12) // Number of turns to sleep
|
F(VOLATILE_MULTIPLETURNS, multipleTurns, (u32, 1)) \
|
||||||
#define STATUS3_YAWN_TURN(num) (((num) << 11) & STATUS3_YAWN)
|
F(VOLATILE_WRAPPED, wrapped, (u32, 1)) \
|
||||||
#define STATUS3_IMPRISONED_OTHERS (1 << 13)
|
F(VOLATILE_POWDER, powder, (u32, 1)) \
|
||||||
#define STATUS3_GRUDGE (1 << 14)
|
F(VOLATILE_UNUSED, padding, (u32, 1)) \
|
||||||
#define STATUS3_COMMANDER (1 << 15)
|
F(VOLATILE_INFATUATION, infatuation, (enum BattlerId, MAX_BITS(4))) \
|
||||||
#define STATUS3_GASTRO_ACID (1 << 16)
|
F(VOLATILE_DEFENSE_CURL, defenseCurl, (u32, 1)) \
|
||||||
#define STATUS3_EMBARGO (1 << 17)
|
F(VOLATILE_TRANSFORMED, transformed, (u32, 1)) \
|
||||||
#define STATUS3_UNDERWATER (1 << 18)
|
F(VOLATILE_RECHARGE, recharge, (u32, 1)) \
|
||||||
#define STATUS3_UNUSED_19 (1 << 19)
|
F(VOLATILE_RAGE, rage, (u32, 1)) \
|
||||||
#define STATUS3_UNUSED_20 (1 << 20)
|
F(VOLATILE_SUBSTITUTE, substitute, (u32, 1), V_BATON_PASSABLE) \
|
||||||
#define STATUS3_SMACKED_DOWN (1 << 21)
|
F(VOLATILE_DESTINY_BOND, destinyBond, (u32, 1)) \
|
||||||
#define STATUS3_UNUSED_22 (1 << 22)
|
F(VOLATILE_ESCAPE_PREVENTION, escapePrevention, (u32, 1), V_BATON_PASSABLE) \
|
||||||
#define STATUS3_TELEKINESIS (1 << 23)
|
F(VOLATILE_NIGHTMARE, nightmare, (u32, 1)) \
|
||||||
#define STATUS3_PHANTOM_FORCE (1 << 24)
|
F(VOLATILE_CURSED, cursed, (u32, 1), V_BATON_PASSABLE) \
|
||||||
#define STATUS3_MIRACLE_EYED (1 << 25)
|
F(VOLATILE_FORESIGHT, foresight, (u32, 1)) \
|
||||||
#define STATUS3_MAGNET_RISE (1 << 26)
|
F(VOLATILE_DRAGON_CHEER, dragonCheer, (u32, 1), V_BATON_PASSABLE) \
|
||||||
#define STATUS3_HEAL_BLOCK (1 << 27)
|
F(VOLATILE_FOCUS_ENERGY, focusEnergy, (u32, 1), V_BATON_PASSABLE) \
|
||||||
#define STATUS3_AQUA_RING (1 << 28)
|
F(VOLATILE_SEMI_INVULNERABLE, semiInvulnerable, (u32, 5)) \
|
||||||
#define STATUS3_LASER_FOCUS (1 << 29)
|
F(VOLATILE_ELECTRIFIED, electrified, (u32, 1)) \
|
||||||
#define STATUS3_POWER_TRICK (1 << 30)
|
F(VOLATILE_MUD_SPORT, mudSport, (u32, 1), V_BATON_PASSABLE) \
|
||||||
#define STATUS3_SKY_DROPPED (1 << 31) // Target of Sky Drop
|
F(VOLATILE_WATER_SPORT, waterSport, (u32, 1), V_BATON_PASSABLE) \
|
||||||
#define STATUS3_SEMI_INVULNERABLE_NO_COMMANDER (STATUS3_UNDERGROUND | STATUS3_ON_AIR | STATUS3_UNDERWATER | STATUS3_PHANTOM_FORCE) // Exception for Transform / Imposter
|
F(VOLATILE_INFINITE_CONFUSION, infiniteConfusion, (u32, 1), V_BATON_PASSABLE) \
|
||||||
#define STATUS3_SEMI_INVULNERABLE (STATUS3_SEMI_INVULNERABLE_NO_COMMANDER | STATUS3_COMMANDER)
|
F(VOLATILE_SALT_CURE, saltCure, (u32, 1)) \
|
||||||
|
F(VOLATILE_SYRUP_BOMB, syrupBomb, (u32, 1)) \
|
||||||
|
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_ROOT, root, (u32, 1), V_BATON_PASSABLE) \
|
||||||
|
F(VOLATILE_YAWN, yawn, (u32, 2)) \
|
||||||
|
F(VOLATILE_IMPRISON, imprison, (u32, 1)) \
|
||||||
|
F(VOLATILE_GRUDGE, grudge, (u32, 1)) \
|
||||||
|
F(VOLATILE_GASTRO_ACID, gastroAcid, (u32, 1), V_BATON_PASSABLE) \
|
||||||
|
F(VOLATILE_EMBARGO, embargo, (u32, 1), V_BATON_PASSABLE) \
|
||||||
|
F(VOLATILE_SMACK_DOWN, smackDown, (u32, 1)) \
|
||||||
|
F(VOLATILE_TELEKINESIS, telekinesis, (u32, 1), V_BATON_PASSABLE) \
|
||||||
|
F(VOLATILE_MIRACLE_EYE, miracleEye, (u32, 1)) \
|
||||||
|
F(VOLATILE_MAGNET_RISE, magnetRise, (u32, 1), V_BATON_PASSABLE) \
|
||||||
|
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)
|
||||||
|
|
||||||
#define STATUS4_ELECTRIFIED (1 << 0)
|
|
||||||
#define STATUS4_MUD_SPORT (1 << 1) // Only used if B_SPORT_TURNS < GEN_6
|
|
||||||
#define STATUS4_WATER_SPORT (1 << 2) // Only used if B_SPORT_TURNS < GEN_6
|
|
||||||
#define STATUS4_INFINITE_CONFUSION (1 << 3) // Used for Berserk Gene
|
|
||||||
#define STATUS4_SALT_CURE (1 << 4)
|
|
||||||
#define STATUS4_SYRUP_BOMB (1 << 5)
|
|
||||||
#define STATUS4_GLAIVE_RUSH (1 << 6)
|
|
||||||
|
|
||||||
#define HITMARKER_UNUSED_1 (1 << 4)
|
/* Use within a macro to get the maximum allowed value for a volatile. Requires _typeMaxValue as input. */
|
||||||
|
#define GET_VOLATILE_MAXIMUM(_typeMaxValue, ...) INVOKE_WITH_B(GET_VOLATILE_MAXIMUM_, _typeMaxValue)
|
||||||
|
#define GET_VOLATILE_MAXIMUM_(_type, ...) FIRST(__VA_OPT__(FIRST(__VA_ARGS__),) MAX_BITS((sizeof(_type) * 8)))
|
||||||
|
|
||||||
|
#define UNPACK_VOLATILE_ENUMS(_enum, ...) _enum,
|
||||||
|
|
||||||
|
enum Volatile
|
||||||
|
{
|
||||||
|
VOLATILE_NONE,
|
||||||
|
VOLATILE_DEFINITIONS(UNPACK_VOLATILE_ENUMS)
|
||||||
|
/* Expands to VOLATILE_CONFUSION, VOLATILE_FLINCHED, etc. */
|
||||||
|
};
|
||||||
|
|
||||||
|
// Helper macros
|
||||||
|
#define INFATUATED_WITH(battler) (battler + 1)
|
||||||
|
#define LEECHSEEDED_BY(battler) (battler + 1)
|
||||||
|
|
||||||
|
enum SemiInvulnerableState
|
||||||
|
{
|
||||||
|
STATE_NONE,
|
||||||
|
STATE_UNDERGROUND,
|
||||||
|
STATE_UNDERWATER,
|
||||||
|
STATE_ON_AIR,
|
||||||
|
STATE_PHANTOM_FORCE,
|
||||||
|
STATE_SKY_DROP,
|
||||||
|
STATE_COMMANDER,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum SemiInvulnerableExclusion
|
||||||
|
{
|
||||||
|
CHECK_ALL,
|
||||||
|
EXCLUDE_COMMANDER,
|
||||||
|
};
|
||||||
|
|
||||||
|
#define HITMARKER_STRING_PRINTED (1 << 4)
|
||||||
#define HITMARKER_IGNORE_BIDE (1 << 5)
|
#define HITMARKER_IGNORE_BIDE (1 << 5)
|
||||||
#define HITMARKER_DESTINYBOND (1 << 6)
|
#define HITMARKER_DESTINYBOND (1 << 6)
|
||||||
#define HITMARKER_NO_ANIMATIONS (1 << 7) // set from battleSceneOff. Never changed during battle
|
#define HITMARKER_NO_ANIMATIONS (1 << 7) // set from battleSceneOff. Never changed during battle
|
||||||
@ -215,50 +240,55 @@ enum BattlerId
|
|||||||
#define HITMARKER_NO_ATTACKSTRING (1 << 9)
|
#define HITMARKER_NO_ATTACKSTRING (1 << 9)
|
||||||
#define HITMARKER_ATTACKSTRING_PRINTED (1 << 10)
|
#define HITMARKER_ATTACKSTRING_PRINTED (1 << 10)
|
||||||
#define HITMARKER_NO_PPDEDUCT (1 << 11)
|
#define HITMARKER_NO_PPDEDUCT (1 << 11)
|
||||||
#define HITMARKER_UNUSED_2 (1 << 12)
|
#define HITMARKER_UNUSED_12 (1 << 12)
|
||||||
#define HITMARKER_STATUS_ABILITY_EFFECT (1 << 13)
|
#define HITMARKER_STATUS_ABILITY_EFFECT (1 << 13)
|
||||||
#define HITMARKER_SYNCHRONIZE_EFFECT (1 << 14)
|
#define HITMARKER_UNUSED_14 (1 << 14)
|
||||||
#define HITMARKER_RUN (1 << 15)
|
#define HITMARKER_RUN (1 << 15)
|
||||||
#define HITMARKER_IGNORE_DISGUISE (1 << 16)
|
#define HITMARKER_IGNORE_DISGUISE (1 << 16)
|
||||||
#define HITMARKER_DISABLE_ANIMATION (1 << 17) // disable animations during battle scripts, e.g. for Bug Bite
|
#define HITMARKER_DISABLE_ANIMATION (1 << 17) // disable animations during battle scripts, e.g. for Bug Bite
|
||||||
#define HITMARKER_UNUSED_3 (1 << 18)
|
#define HITMARKER_UNUSED_18 (1 << 18)
|
||||||
#define HITMARKER_UNABLE_TO_USE_MOVE (1 << 19)
|
#define HITMARKER_UNABLE_TO_USE_MOVE (1 << 19)
|
||||||
#define HITMARKER_PASSIVE_HP_UPDATE (1 << 20)
|
#define HITMARKER_PASSIVE_HP_UPDATE (1 << 20)
|
||||||
#define HITMARKER_UNUSED_4 (1 << 21)
|
#define HITMARKER_UNUSED_21 (1 << 21)
|
||||||
#define HITMARKER_PLAYER_FAINTED (1 << 22)
|
#define HITMARKER_PLAYER_FAINTED (1 << 22)
|
||||||
#define HITMARKER_ALLOW_NO_PP (1 << 23)
|
#define HITMARKER_ALLOW_NO_PP (1 << 23)
|
||||||
#define HITMARKER_GRUDGE (1 << 24)
|
#define HITMARKER_GRUDGE (1 << 24)
|
||||||
#define HITMARKER_OBEYS (1 << 25)
|
#define HITMARKER_OBEYS (1 << 25)
|
||||||
#define HITMARKER_UNUSED_5 (1 << 26)
|
#define HITMARKER_UNUSED_26 (1 << 26)
|
||||||
#define HITMARKER_CHARGING (1 << 27)
|
#define HITMARKER_UNUSED_27 (1 << 27)
|
||||||
#define HITMARKER_FAINTED(battler) (1u << (battler + 28))
|
#define HITMARKER_FAINTED(battler) (1u << (battler + 28))
|
||||||
#define HITMARKER_FAINTED2(battler) HITMARKER_FAINTED(battler)
|
#define HITMARKER_FAINTED2(battler) HITMARKER_FAINTED(battler)
|
||||||
#define HITMARKER_STRING_PRINTED (1 << 29)
|
|
||||||
|
|
||||||
// Per-side statuses that affect an entire party
|
// Per-side statuses that affect an entire party
|
||||||
#define SIDE_STATUS_REFLECT (1 << 0)
|
#define SIDE_STATUS_REFLECT (1 << 0)
|
||||||
#define SIDE_STATUS_LIGHTSCREEN (1 << 1)
|
#define SIDE_STATUS_LIGHTSCREEN (1 << 1)
|
||||||
#define SIDE_STATUS_STICKY_WEB (1 << 2)
|
#define SIDE_STATUS_SAFEGUARD (1 << 2)
|
||||||
#define SIDE_STATUS_SPIKES (1 << 4)
|
#define SIDE_STATUS_FUTUREATTACK (1 << 3)
|
||||||
#define SIDE_STATUS_SAFEGUARD (1 << 5)
|
#define SIDE_STATUS_MIST (1 << 4)
|
||||||
#define SIDE_STATUS_FUTUREATTACK (1 << 6)
|
#define SIDE_STATUS_TAILWIND (1 << 5)
|
||||||
#define SIDE_STATUS_MIST (1 << 8)
|
#define SIDE_STATUS_AURORA_VEIL (1 << 6)
|
||||||
// (1 << 9) previously was SIDE_STATUS_SPIKES_DAMAGED
|
#define SIDE_STATUS_LUCKY_CHANT (1 << 7)
|
||||||
#define SIDE_STATUS_TAILWIND (1 << 10)
|
#define SIDE_STATUS_DAMAGE_NON_TYPES (1 << 8)
|
||||||
#define SIDE_STATUS_AURORA_VEIL (1 << 11)
|
#define SIDE_STATUS_RAINBOW (1 << 9)
|
||||||
#define SIDE_STATUS_LUCKY_CHANT (1 << 12)
|
#define SIDE_STATUS_SEA_OF_FIRE (1 << 10)
|
||||||
#define SIDE_STATUS_TOXIC_SPIKES (1 << 13)
|
#define SIDE_STATUS_SWAMP (1 << 11)
|
||||||
#define SIDE_STATUS_STEALTH_ROCK (1 << 14)
|
|
||||||
// Missing flags previously were SIDE_STATUS_TOXIC_SPIKES_DAMAGED, SIDE_STATUS_STEALTH_ROCK_DAMAGED, SIDE_STATUS_STICKY_WEB_DAMAGED
|
|
||||||
#define SIDE_STATUS_STEELSURGE (1 << 18)
|
|
||||||
#define SIDE_STATUS_DAMAGE_NON_TYPES (1 << 19)
|
|
||||||
#define SIDE_STATUS_RAINBOW (1 << 20)
|
|
||||||
#define SIDE_STATUS_SEA_OF_FIRE (1 << 21)
|
|
||||||
#define SIDE_STATUS_SWAMP (1 << 22)
|
|
||||||
|
|
||||||
#define SIDE_STATUS_HAZARDS_ANY (SIDE_STATUS_SPIKES | SIDE_STATUS_STICKY_WEB | SIDE_STATUS_TOXIC_SPIKES | SIDE_STATUS_STEALTH_ROCK | SIDE_STATUS_STEELSURGE)
|
|
||||||
#define SIDE_STATUS_SCREEN_ANY (SIDE_STATUS_REFLECT | SIDE_STATUS_LIGHTSCREEN | SIDE_STATUS_AURORA_VEIL)
|
#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)
|
#define SIDE_STATUS_PLEDGE_ANY (SIDE_STATUS_RAINBOW | SIDE_STATUS_SEA_OF_FIRE | SIDE_STATUS_SWAMP)
|
||||||
|
#define SIDE_STATUS_GOOD_FOG (SIDE_STATUS_SCREEN_ANY | SIDE_STATUS_SAFEGUARD | SIDE_STATUS_MIST)
|
||||||
|
#define SIDE_STATUS_GOOD_COURT (SIDE_STATUS_GOOD_FOG | SIDE_STATUS_TAILWIND | SIDE_STATUS_LUCKY_CHANT | SIDE_STATUS_RAINBOW)
|
||||||
|
#define SIDE_STATUS_BAD_COURT (SIDE_STATUS_DAMAGE_NON_TYPES | SIDE_STATUS_SEA_OF_FIRE | SIDE_STATUS_SWAMP)
|
||||||
|
|
||||||
|
enum Hazards
|
||||||
|
{
|
||||||
|
HAZARDS_NONE,
|
||||||
|
HAZARDS_SPIKES,
|
||||||
|
HAZARDS_STICKY_WEB,
|
||||||
|
HAZARDS_TOXIC_SPIKES,
|
||||||
|
HAZARDS_STEALTH_ROCK,
|
||||||
|
HAZARDS_STEELSURGE,
|
||||||
|
HAZARDS_MAX_COUNT,
|
||||||
|
};
|
||||||
|
|
||||||
// Used for damaging entry hazards based on type
|
// Used for damaging entry hazards based on type
|
||||||
enum TypeSideHazard
|
enum TypeSideHazard
|
||||||
@ -294,6 +324,7 @@ enum TypeSideHazard
|
|||||||
#define MOVE_RESULT_FOE_HUNG_ON (1 << 7)
|
#define MOVE_RESULT_FOE_HUNG_ON (1 << 7)
|
||||||
#define MOVE_RESULT_STURDIED (1 << 8)
|
#define MOVE_RESULT_STURDIED (1 << 8)
|
||||||
#define MOVE_RESULT_FOE_ENDURED_AFFECTION (1 << 9)
|
#define MOVE_RESULT_FOE_ENDURED_AFFECTION (1 << 9)
|
||||||
|
#define MOVE_RESULT_SYNCHRONOISE_AFFECTED (1 << 10)
|
||||||
#define MOVE_RESULT_NO_EFFECT (MOVE_RESULT_MISSED | MOVE_RESULT_DOESNT_AFFECT_FOE | MOVE_RESULT_FAILED)
|
#define MOVE_RESULT_NO_EFFECT (MOVE_RESULT_MISSED | MOVE_RESULT_DOESNT_AFFECT_FOE | MOVE_RESULT_FAILED)
|
||||||
|
|
||||||
enum BattleWeather
|
enum BattleWeather
|
||||||
@ -327,24 +358,27 @@ enum BattleWeather
|
|||||||
#define B_WEATHER_STRONG_WINDS (1 << BATTLE_WEATHER_STRONG_WINDS)
|
#define B_WEATHER_STRONG_WINDS (1 << BATTLE_WEATHER_STRONG_WINDS)
|
||||||
|
|
||||||
#define B_WEATHER_ANY (B_WEATHER_RAIN | B_WEATHER_SANDSTORM | B_WEATHER_SUN | B_WEATHER_HAIL | B_WEATHER_STRONG_WINDS | B_WEATHER_SNOW | B_WEATHER_FOG)
|
#define B_WEATHER_ANY (B_WEATHER_RAIN | B_WEATHER_SANDSTORM | B_WEATHER_SUN | B_WEATHER_HAIL | B_WEATHER_STRONG_WINDS | B_WEATHER_SNOW | B_WEATHER_FOG)
|
||||||
|
#define B_WEATHER_DAMAGING_ANY (B_WEATHER_HAIL | B_WEATHER_SANDSTORM)
|
||||||
|
#define B_WEATHER_ICY_ANY (B_WEATHER_HAIL | B_WEATHER_SNOW)
|
||||||
|
#define B_WEATHER_LOW_LIGHT (B_WEATHER_FOG | B_WEATHER_ICY_ANY | B_WEATHER_RAIN | B_WEATHER_SANDSTORM)
|
||||||
#define B_WEATHER_PRIMAL_ANY (B_WEATHER_RAIN_PRIMAL | B_WEATHER_SUN_PRIMAL | B_WEATHER_STRONG_WINDS)
|
#define B_WEATHER_PRIMAL_ANY (B_WEATHER_RAIN_PRIMAL | B_WEATHER_SUN_PRIMAL | B_WEATHER_STRONG_WINDS)
|
||||||
|
|
||||||
enum MoveEffects
|
// Explicit numbers until frostbite because those shouldn't be shifted
|
||||||
|
enum __attribute__((packed)) MoveEffect
|
||||||
{
|
{
|
||||||
MOVE_EFFECT_NONE,
|
MOVE_EFFECT_NONE = 0,
|
||||||
MOVE_EFFECT_SLEEP,
|
MOVE_EFFECT_SLEEP = 1,
|
||||||
MOVE_EFFECT_POISON,
|
MOVE_EFFECT_POISON = 2,
|
||||||
MOVE_EFFECT_BURN,
|
MOVE_EFFECT_BURN = 3,
|
||||||
MOVE_EFFECT_FREEZE,
|
MOVE_EFFECT_FREEZE = 4,
|
||||||
MOVE_EFFECT_PARALYSIS,
|
MOVE_EFFECT_PARALYSIS = 5,
|
||||||
MOVE_EFFECT_TOXIC,
|
MOVE_EFFECT_TOXIC = 6,
|
||||||
MOVE_EFFECT_FROSTBITE,
|
MOVE_EFFECT_FROSTBITE = 7,
|
||||||
MOVE_EFFECT_CONFUSION,
|
MOVE_EFFECT_CONFUSION,
|
||||||
MOVE_EFFECT_FLINCH,
|
MOVE_EFFECT_FLINCH,
|
||||||
MOVE_EFFECT_TRI_ATTACK,
|
MOVE_EFFECT_TRI_ATTACK,
|
||||||
MOVE_EFFECT_UPROAR,
|
MOVE_EFFECT_UPROAR,
|
||||||
MOVE_EFFECT_PAYDAY,
|
MOVE_EFFECT_PAYDAY,
|
||||||
MOVE_EFFECT_CHARGING,
|
|
||||||
MOVE_EFFECT_WRAP,
|
MOVE_EFFECT_WRAP,
|
||||||
MOVE_EFFECT_ATK_PLUS_1,
|
MOVE_EFFECT_ATK_PLUS_1,
|
||||||
MOVE_EFFECT_DEF_PLUS_1,
|
MOVE_EFFECT_DEF_PLUS_1,
|
||||||
@ -468,43 +502,55 @@ enum MoveEffects
|
|||||||
NUM_MOVE_EFFECTS
|
NUM_MOVE_EFFECTS
|
||||||
};
|
};
|
||||||
|
|
||||||
#define PRIMARY_STATUS_MOVE_EFFECT MOVE_EFFECT_FROSTBITE // All above move effects apply primary status
|
|
||||||
#if B_USE_FROSTBITE == TRUE
|
#if B_USE_FROSTBITE == TRUE
|
||||||
#define MOVE_EFFECT_FREEZE_OR_FROSTBITE MOVE_EFFECT_FROSTBITE
|
#define MOVE_EFFECT_FREEZE_OR_FROSTBITE MOVE_EFFECT_FROSTBITE
|
||||||
#else
|
#else
|
||||||
#define MOVE_EFFECT_FREEZE_OR_FROSTBITE MOVE_EFFECT_FREEZE
|
#define MOVE_EFFECT_FREEZE_OR_FROSTBITE MOVE_EFFECT_FREEZE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define MOVE_EFFECT_AFFECTS_USER 0x2000
|
|
||||||
#define MOVE_EFFECT_CERTAIN 0x4000
|
|
||||||
#define MOVE_EFFECT_CONTINUE 0x8000
|
#define MOVE_EFFECT_CONTINUE 0x8000
|
||||||
|
|
||||||
// Battle environment defines for gBattleEnvironment.
|
// Battle environment defines for gBattleEnvironment.
|
||||||
#define BATTLE_ENVIRONMENT_GRASS 0
|
enum BattleEnvironments
|
||||||
#define BATTLE_ENVIRONMENT_LONG_GRASS 1
|
{
|
||||||
#define BATTLE_ENVIRONMENT_SAND 2
|
BATTLE_ENVIRONMENT_GRASS,
|
||||||
#define BATTLE_ENVIRONMENT_UNDERWATER 3
|
BATTLE_ENVIRONMENT_LONG_GRASS,
|
||||||
#define BATTLE_ENVIRONMENT_WATER 4
|
BATTLE_ENVIRONMENT_SAND,
|
||||||
#define BATTLE_ENVIRONMENT_POND 5
|
BATTLE_ENVIRONMENT_UNDERWATER,
|
||||||
#define BATTLE_ENVIRONMENT_MOUNTAIN 6
|
BATTLE_ENVIRONMENT_WATER,
|
||||||
#define BATTLE_ENVIRONMENT_CAVE 7
|
BATTLE_ENVIRONMENT_POND,
|
||||||
#define BATTLE_ENVIRONMENT_BUILDING 8
|
BATTLE_ENVIRONMENT_MOUNTAIN,
|
||||||
#define BATTLE_ENVIRONMENT_PLAIN 9
|
BATTLE_ENVIRONMENT_CAVE,
|
||||||
// New battle environments are used for Secret Power but not fully implemented.
|
BATTLE_ENVIRONMENT_BUILDING,
|
||||||
#define BATTLE_ENVIRONMENT_SOARING 10
|
BATTLE_ENVIRONMENT_PLAIN,
|
||||||
#define BATTLE_ENVIRONMENT_SKY_PILLAR 11
|
BATTLE_ENVIRONMENT_FRONTIER,
|
||||||
#define BATTLE_ENVIRONMENT_BURIAL_GROUND 12
|
BATTLE_ENVIRONMENT_GYM,
|
||||||
#define BATTLE_ENVIRONMENT_PUDDLE 13
|
BATTLE_ENVIRONMENT_LEADER,
|
||||||
#define BATTLE_ENVIRONMENT_MARSH 14
|
BATTLE_ENVIRONMENT_MAGMA,
|
||||||
#define BATTLE_ENVIRONMENT_SWAMP 15
|
BATTLE_ENVIRONMENT_AQUA,
|
||||||
#define BATTLE_ENVIRONMENT_SNOW 16
|
BATTLE_ENVIRONMENT_SIDNEY,
|
||||||
#define BATTLE_ENVIRONMENT_ICE 17
|
BATTLE_ENVIRONMENT_PHOEBE,
|
||||||
#define BATTLE_ENVIRONMENT_VOLCANO 18
|
BATTLE_ENVIRONMENT_GLACIA,
|
||||||
#define BATTLE_ENVIRONMENT_DISTORTION_WORLD 19
|
BATTLE_ENVIRONMENT_DRAKE,
|
||||||
#define BATTLE_ENVIRONMENT_SPACE 20
|
BATTLE_ENVIRONMENT_CHAMPION,
|
||||||
#define BATTLE_ENVIRONMENT_ULTRA_SPACE 21
|
BATTLE_ENVIRONMENT_GROUDON,
|
||||||
|
BATTLE_ENVIRONMENT_KYOGRE,
|
||||||
#define BATTLE_ENVIRONMENT_COUNT 22
|
BATTLE_ENVIRONMENT_RAYQUAZA,
|
||||||
|
// New battle environments are used for Secret Power but not fully implemented.
|
||||||
|
BATTLE_ENVIRONMENT_SOARING,
|
||||||
|
BATTLE_ENVIRONMENT_SKY_PILLAR,
|
||||||
|
BATTLE_ENVIRONMENT_BURIAL_GROUND,
|
||||||
|
BATTLE_ENVIRONMENT_PUDDLE,
|
||||||
|
BATTLE_ENVIRONMENT_MARSH,
|
||||||
|
BATTLE_ENVIRONMENT_SWAMP,
|
||||||
|
BATTLE_ENVIRONMENT_SNOW,
|
||||||
|
BATTLE_ENVIRONMENT_ICE,
|
||||||
|
BATTLE_ENVIRONMENT_VOLCANO,
|
||||||
|
BATTLE_ENVIRONMENT_DISTORTION_WORLD,
|
||||||
|
BATTLE_ENVIRONMENT_SPACE,
|
||||||
|
BATTLE_ENVIRONMENT_ULTRA_SPACE,
|
||||||
|
BATTLE_ENVIRONMENT_COUNT,
|
||||||
|
};
|
||||||
|
|
||||||
#define B_WAIT_TIME_LONG (B_WAIT_TIME_MULTIPLIER * 4)
|
#define B_WAIT_TIME_LONG (B_WAIT_TIME_MULTIPLIER * 4)
|
||||||
#define B_WAIT_TIME_MED (B_WAIT_TIME_MULTIPLIER * 3)
|
#define B_WAIT_TIME_MED (B_WAIT_TIME_MULTIPLIER * 3)
|
||||||
@ -626,4 +672,11 @@ enum MonState
|
|||||||
MON_OUTSIDE_BATTLE,
|
MON_OUTSIDE_BATTLE,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum __attribute__((packed)) CalcDamageState
|
||||||
|
{
|
||||||
|
CAN_DAMAGE,
|
||||||
|
WILL_FAIL,
|
||||||
|
CHECK_ACCURACY,
|
||||||
|
};
|
||||||
|
|
||||||
#endif // GUARD_CONSTANTS_BATTLE_H
|
#endif // GUARD_CONSTANTS_BATTLE_H
|
||||||
|
|||||||
@ -34,14 +34,16 @@
|
|||||||
#define AI_FLAG_PREDICT_INCOMING_MON AI_FLAG(24) // AI will score against the predicting incoming mon if it predicts the player to switch. Requires AI_FLAG_PREDICT_SWITCH
|
#define AI_FLAG_PREDICT_INCOMING_MON AI_FLAG(24) // AI will score against the predicting incoming mon if it predicts the player to switch. Requires AI_FLAG_PREDICT_SWITCH
|
||||||
#define AI_FLAG_PP_STALL_PREVENTION AI_FLAG(25) // AI keeps track of the player's switches where the incoming mon is immune to the chosen move
|
#define AI_FLAG_PP_STALL_PREVENTION AI_FLAG(25) // AI keeps track of the player's switches where the incoming mon is immune to the chosen move
|
||||||
#define AI_FLAG_PREDICT_MOVE AI_FLAG(26) // AI will predict the player's move based on what move it would use in the same situation. Recommend using AI_FLAG_OMNISCIENT
|
#define AI_FLAG_PREDICT_MOVE AI_FLAG(26) // AI will predict the player's move based on what move it would use in the same situation. Recommend using AI_FLAG_OMNISCIENT
|
||||||
|
#define AI_FLAG_SMART_TERA AI_FLAG(27) // AI will make smarter decisions when choosing whether to terrastalize (default is to always tera whenever available).
|
||||||
|
#define AI_FLAG_ASSUME_STAB AI_FLAG(28) // AI knows player's STAB moves, but nothing else. Restricted version of AI_FLAG_OMNISCIENT.
|
||||||
#define AI_FLAG_COUNT 27
|
#define AI_FLAG_ASSUME_STATUS_MOVES AI_FLAG(29) // AI has a chance to know certain non-damaging moves, and also Fake Out and Super Fang. Restricted version of AI_FLAG_OMNISCIENT.
|
||||||
|
#define AI_FLAG_ATTACKS_PARTNER AI_FLAG(30) // AI specific to double battles; AI can deliberately attack its 'partner.'
|
||||||
|
|
||||||
// The following options are enough to have a basic/smart trainer. Any other addtion could make the trainer worse/better depending on the flag
|
// The following options are enough to have a basic/smart trainer. Any other addtion could make the trainer worse/better depending on the flag
|
||||||
#define AI_FLAG_BASIC_TRAINER (AI_FLAG_CHECK_BAD_MOVE | AI_FLAG_TRY_TO_FAINT | AI_FLAG_CHECK_VIABILITY)
|
#define AI_FLAG_BASIC_TRAINER (AI_FLAG_CHECK_BAD_MOVE | AI_FLAG_TRY_TO_FAINT | AI_FLAG_CHECK_VIABILITY)
|
||||||
#define AI_FLAG_SMART_TRAINER (AI_FLAG_BASIC_TRAINER | AI_FLAG_OMNISCIENT | AI_FLAG_SMART_SWITCHING | AI_FLAG_SMART_MON_CHOICES | AI_FLAG_PP_STALL_PREVENTION)
|
#define AI_FLAG_SMART_TRAINER (AI_FLAG_BASIC_TRAINER | AI_FLAG_OMNISCIENT | AI_FLAG_SMART_SWITCHING | AI_FLAG_SMART_MON_CHOICES | AI_FLAG_PP_STALL_PREVENTION | AI_FLAG_SMART_TERA)
|
||||||
#define AI_FLAG_PREDICTION (AI_FLAG_PREDICT_SWITCH | AI_FLAG_PREDICT_INCOMING_MON | AI_FLAG_PREDICT_MOVE)
|
#define AI_FLAG_PREDICTION (AI_FLAG_PREDICT_SWITCH | AI_FLAG_PREDICT_INCOMING_MON | AI_FLAG_PREDICT_MOVE)
|
||||||
|
#define AI_FLAG_ASSUMPTIONS (AI_FLAG_ASSUME_STAB | AI_FLAG_ASSUME_STATUS_MOVES | AI_FLAG_WEIGH_ABILITY_PREDICTION)
|
||||||
|
|
||||||
// 'other' ai logic flags
|
// 'other' ai logic flags
|
||||||
#define AI_FLAG_DYNAMIC_FUNC AI_FLAG(60) // Create custom AI functions for specific battles via "setdynamicaifunc" cmd
|
#define AI_FLAG_DYNAMIC_FUNC AI_FLAG(60) // Create custom AI functions for specific battles via "setdynamicaifunc" cmd
|
||||||
|
|||||||
@ -419,6 +419,10 @@
|
|||||||
#define ANIM_TAG_PINKVIO_ORB (ANIM_SPRITES_START + 405)
|
#define ANIM_TAG_PINKVIO_ORB (ANIM_SPRITES_START + 405)
|
||||||
#define ANIM_TAG_STARSTORM (ANIM_SPRITES_START + 406)
|
#define ANIM_TAG_STARSTORM (ANIM_SPRITES_START + 406)
|
||||||
#define ANIM_TAG_SALT_PARTICLE (ANIM_SPRITES_START + 407)
|
#define ANIM_TAG_SALT_PARTICLE (ANIM_SPRITES_START + 407)
|
||||||
|
#define ANIM_TAG_TERA_SYMBOL (ANIM_SPRITES_START + 408)
|
||||||
|
#define ANIM_TAG_TATSUGIRI_CURLY (ANIM_SPRITES_START + 409)
|
||||||
|
#define ANIM_TAG_TATSUGIRI_DROOPY (ANIM_SPRITES_START + 410)
|
||||||
|
#define ANIM_TAG_TATSUGIRI_STRETCHY (ANIM_SPRITES_START + 411)
|
||||||
|
|
||||||
// battlers
|
// battlers
|
||||||
#define ANIM_ATTACKER 0
|
#define ANIM_ATTACKER 0
|
||||||
@ -657,6 +661,12 @@
|
|||||||
#define ANIM_SURF_PAL_MUDDY_WATER 1
|
#define ANIM_SURF_PAL_MUDDY_WATER 1
|
||||||
#define ANIM_SURF_PAL_SLUDGE_WAVE 2
|
#define ANIM_SURF_PAL_SLUDGE_WAVE 2
|
||||||
|
|
||||||
|
// Order Up palettes for Commander
|
||||||
|
#define ANIM_ORDER_UP_NONE 0
|
||||||
|
#define ANIM_ORDER_UP_CURLY 1
|
||||||
|
#define ANIM_ORDER_UP_DROOPY 2
|
||||||
|
#define ANIM_ORDER_UP_STRETCHY 3
|
||||||
|
|
||||||
// Flags given to various functions to indicate which palettes to consider.
|
// Flags given to various functions to indicate which palettes to consider.
|
||||||
// Handled by UnpackSelectedBattlePalettes
|
// Handled by UnpackSelectedBattlePalettes
|
||||||
#define F_PAL_BG (1 << 0)
|
#define F_PAL_BG (1 << 0)
|
||||||
|
|||||||
@ -1,14 +1,15 @@
|
|||||||
#ifndef GUARD_CONSTANTS_BATTLE_MOVE_EFFECTS_H
|
#ifndef GUARD_CONSTANTS_BATTLE_MOVE_EFFECTS_H
|
||||||
#define GUARD_CONSTANTS_BATTLE_MOVE_EFFECTS_H
|
#define GUARD_CONSTANTS_BATTLE_MOVE_EFFECTS_H
|
||||||
|
|
||||||
enum BattleMoveEffects
|
enum __attribute__((packed)) BattleMoveEffects
|
||||||
{
|
{
|
||||||
EFFECT_PLACEHOLDER,
|
EFFECT_PLACEHOLDER,
|
||||||
EFFECT_HIT,
|
EFFECT_HIT,
|
||||||
EFFECT_NON_VOLATILE_STATUS,
|
EFFECT_NON_VOLATILE_STATUS,
|
||||||
EFFECT_ABSORB,
|
EFFECT_ABSORB,
|
||||||
EFFECT_EXPLOSION,
|
EFFECT_EXPLOSION,
|
||||||
EFFECT_DREAM_EATER,
|
EFFECT_MISTY_EXPLOSION, // Same as EFFECT_EXPLOSION but it's boosted on Misty Terrain
|
||||||
|
EFFECT_DREAM_EATER, // Same as EFFECT_ABSORB but it can only be used on sleeping targets
|
||||||
EFFECT_MIRROR_MOVE,
|
EFFECT_MIRROR_MOVE,
|
||||||
EFFECT_ATTACK_UP,
|
EFFECT_ATTACK_UP,
|
||||||
EFFECT_DEFENSE_UP,
|
EFFECT_DEFENSE_UP,
|
||||||
@ -34,9 +35,10 @@ enum BattleMoveEffects
|
|||||||
EFFECT_LIGHT_SCREEN,
|
EFFECT_LIGHT_SCREEN,
|
||||||
EFFECT_REST,
|
EFFECT_REST,
|
||||||
EFFECT_OHKO,
|
EFFECT_OHKO,
|
||||||
|
EFFECT_SHEER_COLD, // Same as EFFECT_OHKO but Ice-types are immune to it and has decreased accuracy for non Ice-type users.
|
||||||
EFFECT_FUSION_COMBO,
|
EFFECT_FUSION_COMBO,
|
||||||
EFFECT_SUPER_FANG,
|
EFFECT_FIXED_PERCENT_DAMAGE,
|
||||||
EFFECT_FIXED_DAMAGE_ARG,
|
EFFECT_FIXED_HP_DAMAGE,
|
||||||
EFFECT_HEAL_BLOCK,
|
EFFECT_HEAL_BLOCK,
|
||||||
EFFECT_RECOIL_IF_MISS,
|
EFFECT_RECOIL_IF_MISS,
|
||||||
EFFECT_MIST,
|
EFFECT_MIST,
|
||||||
@ -280,7 +282,6 @@ enum BattleMoveEffects
|
|||||||
EFFECT_GEOMANCY,
|
EFFECT_GEOMANCY,
|
||||||
EFFECT_FAIRY_LOCK,
|
EFFECT_FAIRY_LOCK,
|
||||||
EFFECT_ALLY_SWITCH,
|
EFFECT_ALLY_SWITCH,
|
||||||
EFFECT_RELIC_SONG,
|
|
||||||
EFFECT_BODY_PRESS,
|
EFFECT_BODY_PRESS,
|
||||||
EFFECT_JUNGLE_HEALING,
|
EFFECT_JUNGLE_HEALING,
|
||||||
EFFECT_COACHING,
|
EFFECT_COACHING,
|
||||||
@ -308,7 +309,6 @@ enum BattleMoveEffects
|
|||||||
EFFECT_BEAK_BLAST,
|
EFFECT_BEAK_BLAST,
|
||||||
EFFECT_COURT_CHANGE,
|
EFFECT_COURT_CHANGE,
|
||||||
EFFECT_MAX_HP_50_RECOIL,
|
EFFECT_MAX_HP_50_RECOIL,
|
||||||
EFFECT_MIND_BLOWN, // Same as EFFECT_MAX_HP_50_RECOIL but is cancelled by Damp
|
|
||||||
EFFECT_CHLOROBLAST, // Same effect as EFFECT_MAX_HP_50_RECOIL but follows the same rules as EFFECT_RECOIL
|
EFFECT_CHLOROBLAST, // Same effect as EFFECT_MAX_HP_50_RECOIL but follows the same rules as EFFECT_RECOIL
|
||||||
EFFECT_EXTREME_EVOBOOST,
|
EFFECT_EXTREME_EVOBOOST,
|
||||||
EFFECT_HIT_SET_TERRAIN,
|
EFFECT_HIT_SET_TERRAIN,
|
||||||
@ -343,13 +343,13 @@ enum BattleMoveEffects
|
|||||||
EFFECT_TERA_BLAST,
|
EFFECT_TERA_BLAST,
|
||||||
EFFECT_TERA_STARSTORM,
|
EFFECT_TERA_STARSTORM,
|
||||||
EFFECT_DRAGON_DARTS,
|
EFFECT_DRAGON_DARTS,
|
||||||
EFFECT_GUARDIAN_OF_ALOLA,
|
|
||||||
EFFECT_SHELL_SIDE_ARM,
|
EFFECT_SHELL_SIDE_ARM,
|
||||||
EFFECT_ORDER_UP,
|
EFFECT_ORDER_UP,
|
||||||
EFFECT_RAPID_SPIN,
|
EFFECT_RAPID_SPIN,
|
||||||
EFFECT_SPECTRAL_THIEF,
|
EFFECT_SPECTRAL_THIEF,
|
||||||
EFFECT_RECOIL,
|
EFFECT_RECOIL,
|
||||||
EFFECT_SMACK_DOWN,
|
EFFECT_SMACK_DOWN,
|
||||||
|
EFFECT_LIFE_DEW,
|
||||||
EFFECT_ICE_SPINNER, // Removes terrain unless attacker is removed from field either by fainting or ejected out
|
EFFECT_ICE_SPINNER, // Removes terrain unless attacker is removed from field either by fainting or ejected out
|
||||||
EFFECT_STEEL_ROLLER, // Will fail if there is no terrain up but removes it regardless if attacker is removed from field or not
|
EFFECT_STEEL_ROLLER, // Will fail if there is no terrain up but removes it regardless if attacker is removed from field or not
|
||||||
EFFECT_STONE_AXE, // Not to be confused with MOVE_EFFECT_STEALTH_ROCK. They have two different activation timings.
|
EFFECT_STONE_AXE, // Not to be confused with MOVE_EFFECT_STEALTH_ROCK. They have two different activation timings.
|
||||||
|
|||||||
@ -88,124 +88,10 @@
|
|||||||
#define CMP_COMMON_BITS 4
|
#define CMP_COMMON_BITS 4
|
||||||
#define CMP_NO_COMMON_BITS 5
|
#define CMP_NO_COMMON_BITS 5
|
||||||
|
|
||||||
|
// Veriouses have been deprecated but the enum and function will be supported for one more release cycle
|
||||||
enum CmdVarious
|
enum CmdVarious
|
||||||
{
|
{
|
||||||
VARIOUS_CANCEL_MULTI_TURN_MOVES,
|
VARIOUS_NONE,
|
||||||
VARIOUS_IS_RUNNING_IMPOSSIBLE,
|
|
||||||
VARIOUS_GET_MOVE_TARGET,
|
|
||||||
VARIOUS_GET_BATTLER_FAINTED,
|
|
||||||
VARIOUS_RESET_SWITCH_IN_ABILITY_BITS,
|
|
||||||
VARIOUS_UPDATE_CHOICE_MOVE_ON_LVL_UP,
|
|
||||||
VARIOUS_RESET_PLAYER_FAINTED,
|
|
||||||
VARIOUS_PALACE_FLAVOR_TEXT,
|
|
||||||
VARIOUS_ARENA_JUDGMENT_WINDOW,
|
|
||||||
VARIOUS_ARENA_OPPONENT_MON_LOST,
|
|
||||||
VARIOUS_ARENA_PLAYER_MON_LOST,
|
|
||||||
VARIOUS_ARENA_BOTH_MONS_LOST,
|
|
||||||
VARIOUS_EMIT_YESNOBOX,
|
|
||||||
VARIOUS_DRAW_ARENA_REF_TEXT_BOX,
|
|
||||||
VARIOUS_ERASE_ARENA_REF_TEXT_BOX,
|
|
||||||
VARIOUS_ARENA_JUDGMENT_STRING,
|
|
||||||
VARIOUS_ARENA_WAIT_STRING,
|
|
||||||
VARIOUS_WAIT_CRY,
|
|
||||||
VARIOUS_RETURN_OPPONENT_MON1,
|
|
||||||
VARIOUS_RETURN_OPPONENT_MON2,
|
|
||||||
VARIOUS_VOLUME_DOWN,
|
|
||||||
VARIOUS_VOLUME_UP,
|
|
||||||
VARIOUS_SET_ALREADY_STATUS_MOVE_ATTEMPT,
|
|
||||||
VARIOUS_PALACE_TRY_ESCAPE_STATUS,
|
|
||||||
VARIOUS_SET_TELEPORT_OUTCOME,
|
|
||||||
VARIOUS_PLAY_TRAINER_DEFEATED_MUSIC,
|
|
||||||
VARIOUS_STAT_TEXT_BUFFER,
|
|
||||||
VARIOUS_SWITCHIN_ABILITIES,
|
|
||||||
VARIOUS_INSTANT_HP_DROP,
|
|
||||||
VARIOUS_CLEAR_STATUS,
|
|
||||||
VARIOUS_RESTORE_PP,
|
|
||||||
VARIOUS_PLAY_MOVE_ANIMATION,
|
|
||||||
VARIOUS_SET_LUCKY_CHANT,
|
|
||||||
VARIOUS_SUCKER_PUNCH_CHECK,
|
|
||||||
VARIOUS_SET_SIMPLE_BEAM,
|
|
||||||
VARIOUS_TRY_ENTRAINMENT,
|
|
||||||
VARIOUS_SET_LAST_USED_ABILITY,
|
|
||||||
VARIOUS_INVERT_STAT_STAGES,
|
|
||||||
VARIOUS_TRY_ME_FIRST,
|
|
||||||
VARIOUS_JUMP_IF_BATTLE_END,
|
|
||||||
VARIOUS_TRY_ELECTRIFY,
|
|
||||||
VARIOUS_TRY_SOAK,
|
|
||||||
VARIOUS_TRY_LAST_RESORT,
|
|
||||||
VARIOUS_TRY_AUTOTOMIZE,
|
|
||||||
VARIOUS_ABILITY_POPUP,
|
|
||||||
VARIOUS_JUMP_IF_TARGET_ALLY,
|
|
||||||
VARIOUS_TRY_SYNCHRONOISE,
|
|
||||||
VARIOUS_PSYCHO_SHIFT,
|
|
||||||
VARIOUS_CURE_STATUS,
|
|
||||||
VARIOUS_POWER_TRICK,
|
|
||||||
VARIOUS_AFTER_YOU,
|
|
||||||
VARIOUS_BESTOW,
|
|
||||||
VARIOUS_JUMP_IF_NOT_GROUNDED,
|
|
||||||
VARIOUS_HANDLE_TRAINER_SLIDE_MSG,
|
|
||||||
VARIOUS_TRY_TRAINER_SLIDE_MSG_FIRST_OFF,
|
|
||||||
VARIOUS_TRY_TRAINER_SLIDE_MSG_LAST_ON,
|
|
||||||
VARIOUS_SET_AURORA_VEIL,
|
|
||||||
VARIOUS_TRY_THIRD_TYPE,
|
|
||||||
VARIOUS_ACUPRESSURE,
|
|
||||||
VARIOUS_SET_POWDER,
|
|
||||||
VARIOUS_GRAVITY_ON_AIRBORNE_MONS,
|
|
||||||
VARIOUS_CHECK_IF_GRASSY_TERRAIN_HEALS,
|
|
||||||
VARIOUS_JUMP_IF_ROAR_FAILS,
|
|
||||||
VARIOUS_TRY_INSTRUCT,
|
|
||||||
VARIOUS_JUMP_IF_NOT_BERRY,
|
|
||||||
VARIOUS_TRACE_ABILITY,
|
|
||||||
VARIOUS_UPDATE_NICK,
|
|
||||||
VARIOUS_TRY_ILLUSION_OFF,
|
|
||||||
VARIOUS_SET_SPRITEIGNORE0HP,
|
|
||||||
VARIOUS_HANDLE_FORM_CHANGE,
|
|
||||||
VARIOUS_GET_STAT_VALUE,
|
|
||||||
VARIOUS_JUMP_IF_FULL_HP,
|
|
||||||
VARIOUS_LOSE_TYPE,
|
|
||||||
VARIOUS_TRY_ACTIVATE_SOULHEART,
|
|
||||||
VARIOUS_TRY_ACTIVATE_RECEIVER,
|
|
||||||
VARIOUS_TRY_FRISK,
|
|
||||||
VARIOUS_JUMP_IF_SHIELDS_DOWN_PROTECTED,
|
|
||||||
VARIOUS_TRY_FAIRY_LOCK,
|
|
||||||
VARIOUS_JUMP_IF_NO_ALLY,
|
|
||||||
VARIOUS_JUMP_IF_HOLD_EFFECT,
|
|
||||||
VARIOUS_INFATUATE_WITH_BATTLER,
|
|
||||||
VARIOUS_SET_LAST_USED_ITEM,
|
|
||||||
VARIOUS_JUMP_IF_ABSENT,
|
|
||||||
VARIOUS_DESTROY_ABILITY_POPUP,
|
|
||||||
VARIOUS_TOTEM_BOOST,
|
|
||||||
VARIOUS_MOVEEND_ITEM_EFFECTS,
|
|
||||||
VARIOUS_TERRAIN_SEED,
|
|
||||||
VARIOUS_MAKE_INVISIBLE,
|
|
||||||
VARIOUS_ROOM_SERVICE,
|
|
||||||
VARIOUS_JUMP_IF_TEAM_HEALTHY,
|
|
||||||
VARIOUS_TRY_HEAL_QUARTER_HP,
|
|
||||||
VARIOUS_JUMP_IF_PRANKSTER_BLOCKED,
|
|
||||||
VARIOUS_TRY_TO_CLEAR_PRIMAL_WEATHER,
|
|
||||||
VARIOUS_GET_ROTOTILLER_TARGETS,
|
|
||||||
VARIOUS_JUMP_IF_NOT_ROTOTILLER_AFFECTED,
|
|
||||||
VARIOUS_CONSUME_BERRY,
|
|
||||||
VARIOUS_JUMP_IF_CANT_REVERT_TO_PRIMAL,
|
|
||||||
VARIOUS_JUMP_IF_SPECIES,
|
|
||||||
VARIOUS_UPDATE_ABILITY_POPUP,
|
|
||||||
VARIOUS_JUMP_IF_WEATHER_AFFECTED,
|
|
||||||
VARIOUS_JUMP_IF_LEAF_GUARD_PROTECTED,
|
|
||||||
VARIOUS_SET_ATTACKER_STICKY_WEB_USER,
|
|
||||||
VARIOUS_TRY_NO_RETREAT,
|
|
||||||
VARIOUS_CHECK_POLTERGEIST,
|
|
||||||
VARIOUS_CUT_1_3_HP_RAISE_STATS,
|
|
||||||
VARIOUS_TRY_END_NEUTRALIZING_GAS,
|
|
||||||
VARIOUS_JUMP_IF_UNDER_200,
|
|
||||||
VARIOUS_SET_SKY_DROP,
|
|
||||||
VARIOUS_CLEAR_SKY_DROP,
|
|
||||||
VARIOUS_SKY_DROP_YAWN,
|
|
||||||
VARIOUS_CURE_CERTAIN_STATUSES,
|
|
||||||
VARIOUS_TRY_RESET_NEGATIVE_STAT_STAGES,
|
|
||||||
VARIOUS_JUMP_IF_LAST_USED_ITEM_BERRY,
|
|
||||||
VARIOUS_SAVE_BATTLER_ITEM,
|
|
||||||
VARIOUS_RESTORE_BATTLER_ITEM,
|
|
||||||
VARIOUS_BATTLER_ITEM_TO_LAST_USED_ITEM,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Cmd_manipulatedamage
|
// Cmd_manipulatedamage
|
||||||
@ -213,25 +99,21 @@ enum CmdVarious
|
|||||||
#define DMG_DOUBLED 2
|
#define DMG_DOUBLED 2
|
||||||
#define DMG_1_8_TARGET_HP 3
|
#define DMG_1_8_TARGET_HP 3
|
||||||
#define DMG_FULL_ATTACKER_HP 4
|
#define DMG_FULL_ATTACKER_HP 4
|
||||||
#define DMG_CURR_ATTACKER_HP 5
|
#define DMG_BIG_ROOT 5
|
||||||
#define DMG_BIG_ROOT 6
|
|
||||||
|
|
||||||
// Cmd_jumpifcantswitch
|
// Cmd_jumpifcantswitch
|
||||||
#define SWITCH_IGNORE_ESCAPE_PREVENTION (1 << 7)
|
#define SWITCH_IGNORE_ESCAPE_PREVENTION (1 << 7)
|
||||||
|
|
||||||
// Cmd_statbuffchange
|
// Cmd_statbuffchange
|
||||||
#define STAT_CHANGE_ALLOW_PTR (1 << 0) // If set, allow use of jumpptr. Set in every use of statbuffchange
|
#define STAT_CHANGE_ALLOW_PTR (1 << 0) // If set, allow use of jumpptr. If not set and unable to raise/lower stats, jump to failInstr.
|
||||||
#define STAT_CHANGE_MIRROR_ARMOR (1 << 1) // Stat change redirection caused by Mirror Armor ability.
|
#define STAT_CHANGE_MIRROR_ARMOR (1 << 1) // Stat change redirection caused by Mirror Armor ability.
|
||||||
#define STAT_CHANGE_NOT_PROTECT_AFFECTED (1 << 5)
|
#define STAT_CHANGE_ONLY_CHECKING (1 << 2) // Checks if the stat change can occur. Does not change stats or play stat change animation.
|
||||||
#define STAT_CHANGE_UPDATE_MOVE_EFFECT (1 << 6)
|
#define STAT_CHANGE_NOT_PROTECT_AFFECTED (1 << 3)
|
||||||
|
#define STAT_CHANGE_UPDATE_MOVE_EFFECT (1 << 4)
|
||||||
|
#define STAT_CHANGE_CHECK_PREVENTION (1 << 5)
|
||||||
|
#define STAT_CHANGE_CERTAIN (1 << 6)
|
||||||
|
|
||||||
// stat change flags for Cmd_playstatchangeanimation
|
// stat flags for TryPlayStatChangeAnimation
|
||||||
#define STAT_CHANGE_NEGATIVE (1 << 0)
|
|
||||||
#define STAT_CHANGE_BY_TWO (1 << 1)
|
|
||||||
#define STAT_CHANGE_MULTIPLE_STATS (1 << 2)
|
|
||||||
#define STAT_CHANGE_CANT_PREVENT (1 << 3)
|
|
||||||
|
|
||||||
// stat flags for Cmd_playstatchangeanimation
|
|
||||||
#define BIT_HP (1 << 0)
|
#define BIT_HP (1 << 0)
|
||||||
#define BIT_ATK (1 << 1)
|
#define BIT_ATK (1 << 1)
|
||||||
#define BIT_DEF (1 << 2)
|
#define BIT_DEF (1 << 2)
|
||||||
@ -255,7 +137,6 @@ enum MoveEndEffects
|
|||||||
MOVEEND_ABILITIES_ATTACKER,
|
MOVEEND_ABILITIES_ATTACKER,
|
||||||
MOVEEND_STATUS_IMMUNITY_ABILITIES,
|
MOVEEND_STATUS_IMMUNITY_ABILITIES,
|
||||||
MOVEEND_SYNCHRONIZE_ATTACKER,
|
MOVEEND_SYNCHRONIZE_ATTACKER,
|
||||||
MOVEEND_CHOICE_MOVE,
|
|
||||||
MOVEEND_ATTACKER_INVISIBLE,
|
MOVEEND_ATTACKER_INVISIBLE,
|
||||||
MOVEEND_ATTACKER_VISIBLE,
|
MOVEEND_ATTACKER_VISIBLE,
|
||||||
MOVEEND_TARGET_VISIBLE,
|
MOVEEND_TARGET_VISIBLE,
|
||||||
@ -277,6 +158,7 @@ enum MoveEndEffects
|
|||||||
MOVEEND_RED_CARD, // Red Card triggers before Eject Pack
|
MOVEEND_RED_CARD, // Red Card triggers before Eject Pack
|
||||||
MOVEEND_EJECT_BUTTON,
|
MOVEEND_EJECT_BUTTON,
|
||||||
MOVEEND_LIFEORB_SHELLBELL, // Includes shell bell, throat spray, etc
|
MOVEEND_LIFEORB_SHELLBELL, // Includes shell bell, throat spray, etc
|
||||||
|
MOVEEND_FORM_CHANGE,
|
||||||
MOVEEND_EMERGENCY_EXIT,
|
MOVEEND_EMERGENCY_EXIT,
|
||||||
MOVEEND_EJECT_PACK,
|
MOVEEND_EJECT_PACK,
|
||||||
MOVEEND_HIT_ESCAPE,
|
MOVEEND_HIT_ESCAPE,
|
||||||
@ -297,4 +179,18 @@ enum MoveEndEffects
|
|||||||
#define B_SWITCH_HIT 1 // dragon tail, circle throw
|
#define B_SWITCH_HIT 1 // dragon tail, circle throw
|
||||||
#define B_SWITCH_RED_CARD 2
|
#define B_SWITCH_RED_CARD 2
|
||||||
|
|
||||||
|
enum StatusTrigger
|
||||||
|
{
|
||||||
|
TRIGGER_ON_MOVE,
|
||||||
|
TRIGGER_ON_ABILITY,
|
||||||
|
TRIGGER_ON_PROTECT,
|
||||||
|
};
|
||||||
|
|
||||||
|
enum TriggerOnFieldStatus
|
||||||
|
{
|
||||||
|
ON_ANY,
|
||||||
|
ON_TERRAIN,
|
||||||
|
ON_WEATHER,
|
||||||
|
};
|
||||||
|
|
||||||
#endif // GUARD_CONSTANTS_BATTLE_SCRIPT_COMMANDS_H
|
#endif // GUARD_CONSTANTS_BATTLE_SCRIPT_COMMANDS_H
|
||||||
|
|||||||
@ -32,14 +32,15 @@ enum StringID
|
|||||||
STRINGID_TARGETFAINTED,
|
STRINGID_TARGETFAINTED,
|
||||||
STRINGID_PLAYERGOTMONEY,
|
STRINGID_PLAYERGOTMONEY,
|
||||||
STRINGID_PLAYERWHITEOUT,
|
STRINGID_PLAYERWHITEOUT,
|
||||||
STRINGID_PLAYERWHITEOUT2,
|
STRINGID_PLAYERWHITEOUT2_WILD,
|
||||||
|
STRINGID_PLAYERWHITEOUT2_TRAINER,
|
||||||
|
STRINGID_PLAYERWHITEOUT3,
|
||||||
STRINGID_PREVENTSESCAPE,
|
STRINGID_PREVENTSESCAPE,
|
||||||
STRINGID_HITXTIMES,
|
STRINGID_HITXTIMES,
|
||||||
STRINGID_PKMNFELLASLEEP,
|
STRINGID_PKMNFELLASLEEP,
|
||||||
STRINGID_PKMNMADESLEEP,
|
STRINGID_PKMNMADESLEEP,
|
||||||
STRINGID_PKMNALREADYASLEEP,
|
STRINGID_PKMNALREADYASLEEP,
|
||||||
STRINGID_PKMNALREADYASLEEP2,
|
STRINGID_PKMNALREADYASLEEP2,
|
||||||
STRINGID_PKMNWASNTAFFECTED,
|
|
||||||
STRINGID_PKMNWASPOISONED,
|
STRINGID_PKMNWASPOISONED,
|
||||||
STRINGID_PKMNPOISONEDBY,
|
STRINGID_PKMNPOISONEDBY,
|
||||||
STRINGID_PKMNHURTBYPOISON,
|
STRINGID_PKMNHURTBYPOISON,
|
||||||
@ -136,6 +137,7 @@ enum StringID
|
|||||||
STRINGID_PKMNMOVEISDISABLED,
|
STRINGID_PKMNMOVEISDISABLED,
|
||||||
STRINGID_PKMNMOVEDISABLEDNOMORE,
|
STRINGID_PKMNMOVEDISABLEDNOMORE,
|
||||||
STRINGID_PKMNGOTENCORE,
|
STRINGID_PKMNGOTENCORE,
|
||||||
|
STRINGID_PKMNGOTENCOREDMOVE,
|
||||||
STRINGID_PKMNENCOREENDED,
|
STRINGID_PKMNENCOREENDED,
|
||||||
STRINGID_PKMNTOOKAIM,
|
STRINGID_PKMNTOOKAIM,
|
||||||
STRINGID_PKMNSKETCHEDMOVE,
|
STRINGID_PKMNSKETCHEDMOVE,
|
||||||
@ -611,8 +613,6 @@ enum StringID
|
|||||||
STRINGID_METEORBEAMCHARGING,
|
STRINGID_METEORBEAMCHARGING,
|
||||||
STRINGID_HEATUPBEAK,
|
STRINGID_HEATUPBEAK,
|
||||||
STRINGID_COURTCHANGE,
|
STRINGID_COURTCHANGE,
|
||||||
STRINGID_PLAYERLOSTTOENEMYTRAINER,
|
|
||||||
STRINGID_PLAYERPAIDPRIZEMONEY,
|
|
||||||
STRINGID_ZPOWERSURROUNDS,
|
STRINGID_ZPOWERSURROUNDS,
|
||||||
STRINGID_ZMOVEUNLEASHED,
|
STRINGID_ZMOVEUNLEASHED,
|
||||||
STRINGID_ZMOVERESETSSTATS,
|
STRINGID_ZMOVERESETSSTATS,
|
||||||
@ -734,10 +734,10 @@ enum StringID
|
|||||||
STRINGID_TIMETODYNAMAX,
|
STRINGID_TIMETODYNAMAX,
|
||||||
STRINGID_TIMETOGIGANTAMAX,
|
STRINGID_TIMETOGIGANTAMAX,
|
||||||
STRINGID_QUESTIONFORFEITBATTLE,
|
STRINGID_QUESTIONFORFEITBATTLE,
|
||||||
STRINGID_FORFEITBATTLEGAVEMONEY,
|
|
||||||
STRINGID_TOXICSPIKESBADLYPOISONED,
|
STRINGID_TOXICSPIKESBADLYPOISONED,
|
||||||
STRINGID_POWERCONSTRUCTPRESENCEOFMANY,
|
STRINGID_POWERCONSTRUCTPRESENCEOFMANY,
|
||||||
STRINGID_POWERCONSTRUCTTRANSFORM,
|
STRINGID_POWERCONSTRUCTTRANSFORM,
|
||||||
|
STRINGID_ABILITYSHIELDPROTECTS,
|
||||||
STRINGID_COUNT
|
STRINGID_COUNT
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1166,8 +1166,7 @@ enum StartingStatusStringID
|
|||||||
};
|
};
|
||||||
|
|
||||||
// gWrappedStringIds
|
// gWrappedStringIds
|
||||||
// These correspond in order to sTrappingMoves!
|
enum __attribute__((packed)) WrappedStringID
|
||||||
enum WrappedStringID
|
|
||||||
{
|
{
|
||||||
B_MSG_WRAPPED_BIND,
|
B_MSG_WRAPPED_BIND,
|
||||||
B_MSG_WRAPPED_WRAP,
|
B_MSG_WRAPPED_WRAP,
|
||||||
|
|||||||
@ -1,7 +1,8 @@
|
|||||||
#ifndef GUARD_CONSTANTS_CRIES_H
|
#ifndef GUARD_CONSTANTS_CRIES_H
|
||||||
#define GUARD_CONSTANTS_CRIES_H
|
#define GUARD_CONSTANTS_CRIES_H
|
||||||
|
|
||||||
enum {
|
enum PokemonCry
|
||||||
|
{
|
||||||
CRY_NONE,
|
CRY_NONE,
|
||||||
#if P_FAMILY_BULBASAUR
|
#if P_FAMILY_BULBASAUR
|
||||||
CRY_BULBASAUR,
|
CRY_BULBASAUR,
|
||||||
|
|||||||
@ -259,6 +259,11 @@
|
|||||||
#define MOVEMENT_ACTION_SURF_STILL_UP 0xAB
|
#define MOVEMENT_ACTION_SURF_STILL_UP 0xAB
|
||||||
#define MOVEMENT_ACTION_SURF_STILL_LEFT 0xAC
|
#define MOVEMENT_ACTION_SURF_STILL_LEFT 0xAC
|
||||||
#define MOVEMENT_ACTION_SURF_STILL_RIGHT 0xAD
|
#define MOVEMENT_ACTION_SURF_STILL_RIGHT 0xAD
|
||||||
|
//fast diagonal movement
|
||||||
|
#define MOVEMENT_ACTION_WALK_FAST_DIAGONAL_UP_LEFT 0xAE
|
||||||
|
#define MOVEMENT_ACTION_WALK_FAST_DIAGONAL_UP_RIGHT 0xAF
|
||||||
|
#define MOVEMENT_ACTION_WALK_FAST_DIAGONAL_DOWN_LEFT 0xB0
|
||||||
|
#define MOVEMENT_ACTION_WALK_FAST_DIAGONAL_DOWN_RIGHT 0xB1
|
||||||
|
|
||||||
#define MOVEMENT_ACTION_STEP_END 0xFE
|
#define MOVEMENT_ACTION_STEP_END 0xFE
|
||||||
#define MOVEMENT_ACTION_NONE 0xFF
|
#define MOVEMENT_ACTION_NONE 0xFF
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
#ifndef GUARD_CONSTANTS_EXPANSION_H
|
#ifndef GUARD_CONSTANTS_EXPANSION_H
|
||||||
#define GUARD_CONSTANTS_EXPANSION_H
|
#define GUARD_CONSTANTS_EXPANSION_H
|
||||||
|
|
||||||
// Last version: 1.12.2
|
// Last version: 1.13.0
|
||||||
#define EXPANSION_VERSION_MAJOR 1
|
#define EXPANSION_VERSION_MAJOR 1
|
||||||
#define EXPANSION_VERSION_MINOR 12
|
#define EXPANSION_VERSION_MINOR 13
|
||||||
#define EXPANSION_VERSION_PATCH 3
|
#define EXPANSION_VERSION_PATCH 1
|
||||||
|
|
||||||
// FALSE if this this version of Expansion is not a tagged commit, i.e.
|
// FALSE if this this version of Expansion is not a tagged commit, i.e.
|
||||||
// it contains unreleased changes.
|
// it contains unreleased changes.
|
||||||
|
|||||||
@ -77,6 +77,8 @@
|
|||||||
#define FLDEFF_TRACKS_BUG 72
|
#define FLDEFF_TRACKS_BUG 72
|
||||||
#define FLDEFF_CAVE_DUST 73
|
#define FLDEFF_CAVE_DUST 73
|
||||||
#define FLDEFF_DEFOG 74
|
#define FLDEFF_DEFOG 74
|
||||||
|
#define FLDEFF_USE_ROCK_CLIMB 75
|
||||||
|
#define FLDEFF_ROCK_CLIMB_DUST 76
|
||||||
|
|
||||||
#define FLDEFFOBJ_SHADOW_S 0
|
#define FLDEFFOBJ_SHADOW_S 0
|
||||||
#define FLDEFFOBJ_SHADOW_M 1
|
#define FLDEFFOBJ_SHADOW_M 1
|
||||||
@ -119,6 +121,8 @@
|
|||||||
#define FLDEFFOBJ_TRACKS_SPOT 38
|
#define FLDEFFOBJ_TRACKS_SPOT 38
|
||||||
#define FLDEFFOBJ_TRACKS_BUG 39
|
#define FLDEFFOBJ_TRACKS_BUG 39
|
||||||
#define FLDEFFOBJ_CAVE_DUST 40
|
#define FLDEFFOBJ_CAVE_DUST 40
|
||||||
|
#define FLDEFFOBJ_ROCK_CLIMB_BLOB 41
|
||||||
|
#define FLDEFFOBJ_ROCK_CLIMB_DUST 42
|
||||||
|
|
||||||
#define FLDEFF_PAL_TAG_CUT_GRASS 0x1000
|
#define FLDEFF_PAL_TAG_CUT_GRASS 0x1000
|
||||||
#define FLDEFF_PAL_TAG_SECRET_POWER_TREE 0x1003
|
#define FLDEFF_PAL_TAG_SECRET_POWER_TREE 0x1003
|
||||||
@ -133,6 +137,7 @@
|
|||||||
#define FLDEFF_PAL_TAG_HOF_MONITOR 0x1010
|
#define FLDEFF_PAL_TAG_HOF_MONITOR 0x1010
|
||||||
#define FLDEFF_PAL_TAG_UNKNOWN 0x1011
|
#define FLDEFF_PAL_TAG_UNKNOWN 0x1011
|
||||||
#define FLDEFF_PAL_TAG_CAVE_DUST 0x1012
|
#define FLDEFF_PAL_TAG_CAVE_DUST 0x1012
|
||||||
|
#define FLDEFF_PAL_TAG_DUST_CLOUD 0x1013
|
||||||
#define FLDEFF_PAL_TAG_FIELD_MOVE_MON 0x8400
|
#define FLDEFF_PAL_TAG_FIELD_MOVE_MON 0x8400
|
||||||
|
|
||||||
// tile tags, for field effects that may have many copies on screen at once
|
// tile tags, for field effects that may have many copies on screen at once
|
||||||
|
|||||||
31
include/constants/field_move.h
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
#ifndef GUARD_CONSTANTS_FIELD_MOVE_H
|
||||||
|
#define GUARD_CONSTANTS_FIELD_MOVE_H
|
||||||
|
|
||||||
|
|
||||||
|
enum FieldMove
|
||||||
|
{
|
||||||
|
FIELD_MOVE_CUT,
|
||||||
|
FIELD_MOVE_FLASH,
|
||||||
|
FIELD_MOVE_ROCK_SMASH,
|
||||||
|
FIELD_MOVE_STRENGTH,
|
||||||
|
FIELD_MOVE_SURF,
|
||||||
|
FIELD_MOVE_FLY,
|
||||||
|
FIELD_MOVE_DIVE,
|
||||||
|
FIELD_MOVE_WATERFALL,
|
||||||
|
FIELD_MOVE_TELEPORT,
|
||||||
|
FIELD_MOVE_DIG,
|
||||||
|
FIELD_MOVE_SECRET_POWER,
|
||||||
|
FIELD_MOVE_MILK_DRINK,
|
||||||
|
FIELD_MOVE_SOFT_BOILED,
|
||||||
|
FIELD_MOVE_SWEET_SCENT,
|
||||||
|
#if OW_ROCK_CLIMB_FIELD_MOVE == TRUE
|
||||||
|
FIELD_MOVE_ROCK_CLIMB,
|
||||||
|
#endif
|
||||||
|
#if OW_DEFOG_FIELD_MOVE == TRUE
|
||||||
|
FIELD_MOVE_DEFOG,
|
||||||
|
#endif
|
||||||
|
FIELD_MOVES_COUNT
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif //GUARD_CONSTANTS_FIELD_MOVE_H
|
||||||
@ -2,7 +2,6 @@
|
|||||||
#define GUARD_CONSTANTS_FOLLOWER_NPC_H
|
#define GUARD_CONSTANTS_FOLLOWER_NPC_H
|
||||||
|
|
||||||
// NPC Follower Flags
|
// NPC Follower Flags
|
||||||
#define FOLLOWER_NPC_FLAG_HAS_RUNNING_FRAMES 0x1 // Only use this if the NPC has running anim frames. Part of FOLLOWER_NPC_FLAG_ALL_LAND.
|
|
||||||
#define FOLLOWER_NPC_FLAG_CAN_BIKE 0x2 // Player is allowed to use the Bike. Part of FOLLOWER_NPC_FLAG_ALL_LAND.
|
#define FOLLOWER_NPC_FLAG_CAN_BIKE 0x2 // Player is allowed to use the Bike. Part of FOLLOWER_NPC_FLAG_ALL_LAND.
|
||||||
#define FOLLOWER_NPC_FLAG_CAN_LEAVE_ROUTE 0x4 // Player is allowed to use Fly/Teleport/EscapeRope/etc. Part of FOLLOWER_NPC_FLAG_ALL_LAND.
|
#define FOLLOWER_NPC_FLAG_CAN_LEAVE_ROUTE 0x4 // Player is allowed to use Fly/Teleport/EscapeRope/etc. Part of FOLLOWER_NPC_FLAG_ALL_LAND.
|
||||||
#define FOLLOWER_NPC_FLAG_CAN_SURF 0x8 // Player is allowed to Surf. Part of FOLLOWER_NPC_FLAG_ALL_WATER.
|
#define FOLLOWER_NPC_FLAG_CAN_SURF 0x8 // Player is allowed to Surf. Part of FOLLOWER_NPC_FLAG_ALL_WATER.
|
||||||
@ -10,12 +9,11 @@
|
|||||||
#define FOLLOWER_NPC_FLAG_CAN_DIVE 0x20 // Player is allowed to use Dive. Part of FOLLOWER_NPC_FLAG_ALL_WATER.
|
#define FOLLOWER_NPC_FLAG_CAN_DIVE 0x20 // Player is allowed to use Dive. Part of FOLLOWER_NPC_FLAG_ALL_WATER.
|
||||||
#define FOLLOWER_NPC_FLAG_CLEAR_ON_WHITE_OUT 0x80 // The NPC follower will be destroyed if the player whites out.
|
#define FOLLOWER_NPC_FLAG_CLEAR_ON_WHITE_OUT 0x80 // The NPC follower will be destroyed if the player whites out.
|
||||||
|
|
||||||
#define FOLLOWER_NPC_FLAG_ALL_LAND FOLLOWER_NPC_FLAG_HAS_RUNNING_FRAMES | FOLLOWER_NPC_FLAG_CAN_BIKE | FOLLOWER_NPC_FLAG_CAN_LEAVE_ROUTE
|
#define FOLLOWER_NPC_FLAG_ALL_LAND FOLLOWER_NPC_FLAG_CAN_BIKE | FOLLOWER_NPC_FLAG_CAN_LEAVE_ROUTE
|
||||||
#define FOLLOWER_NPC_FLAG_ALL_WATER FOLLOWER_NPC_FLAG_CAN_SURF | FOLLOWER_NPC_FLAG_CAN_WATERFALL | FOLLOWER_NPC_FLAG_CAN_DIVE
|
#define FOLLOWER_NPC_FLAG_ALL_WATER FOLLOWER_NPC_FLAG_CAN_SURF | FOLLOWER_NPC_FLAG_CAN_WATERFALL | FOLLOWER_NPC_FLAG_CAN_DIVE
|
||||||
#define FOLLOWER_NPC_FLAG_ALL FOLLOWER_NPC_FLAG_ALL_LAND | FOLLOWER_NPC_FLAG_ALL_WATER | FOLLOWER_NPC_FLAG_CLEAR_ON_WHITE_OUT
|
#define FOLLOWER_NPC_FLAG_ALL FOLLOWER_NPC_FLAG_ALL_LAND | FOLLOWER_NPC_FLAG_ALL_WATER | FOLLOWER_NPC_FLAG_CLEAR_ON_WHITE_OUT
|
||||||
|
|
||||||
// Shorter flag names for ease of use in setfollowernpc script macro
|
// Shorter flag names for ease of use in setfollowernpc script macro
|
||||||
#define FNPC_RUNNING FOLLOWER_NPC_FLAG_HAS_RUNNING_FRAMES
|
|
||||||
#define FNPC_BIKE FOLLOWER_NPC_FLAG_CAN_BIKE
|
#define FNPC_BIKE FOLLOWER_NPC_FLAG_CAN_BIKE
|
||||||
#define FNPC_LEAVE_ROUTE FOLLOWER_NPC_FLAG_CAN_LEAVE_ROUTE
|
#define FNPC_LEAVE_ROUTE FOLLOWER_NPC_FLAG_CAN_LEAVE_ROUTE
|
||||||
#define FNPC_SURF FOLLOWER_NPC_FLAG_CAN_SURF
|
#define FNPC_SURF FOLLOWER_NPC_FLAG_CAN_SURF
|
||||||
@ -27,8 +25,4 @@
|
|||||||
#define FNPC_ALL_WATER FOLLOWER_NPC_FLAG_ALL_WATER
|
#define FNPC_ALL_WATER FOLLOWER_NPC_FLAG_ALL_WATER
|
||||||
#define FNPC_ALL FOLLOWER_NPC_FLAG_ALL
|
#define FNPC_ALL FOLLOWER_NPC_FLAG_ALL
|
||||||
|
|
||||||
|
|
||||||
#define FNPC_NONE 0
|
|
||||||
#define FNPC_ALWAYS 2
|
|
||||||
|
|
||||||
#endif // GUARD_CONSTANTS_FOLLOWER_NPC_H
|
#endif // GUARD_CONSTANTS_FOLLOWER_NPC_H
|
||||||
|
|||||||
@ -48,7 +48,7 @@ enum FormChanges
|
|||||||
FORM_CHANGE_WITHDRAW,
|
FORM_CHANGE_WITHDRAW,
|
||||||
// Form change that activates when the Pokémon faints, either in battle or in the overworld by poison.
|
// Form change that activates when the Pokémon faints, either in battle or in the overworld by poison.
|
||||||
// If species is not specified and it's on the player's side, it will try to use the value
|
// If species is not specified and it's on the player's side, it will try to use the value
|
||||||
// saved in gBattleStruct->changedSpecies from a previous form change.
|
// saved in gBattleStruct->partyState[x][y].changedSpecies from a previous form change.
|
||||||
// - No parameters.
|
// - No parameters.
|
||||||
FORM_CHANGE_FAINT,
|
FORM_CHANGE_FAINT,
|
||||||
// Form change that activates when the Pokémon is sent out at the beginning of a battle
|
// Form change that activates when the Pokémon is sent out at the beginning of a battle
|
||||||
@ -56,14 +56,14 @@ enum FormChanges
|
|||||||
// param2: a move that will be replaced, optional
|
// param2: a move that will be replaced, optional
|
||||||
// param3: a new move to replace it with, optional
|
// param3: a new move to replace it with, optional
|
||||||
FORM_CHANGE_BEGIN_BATTLE,
|
FORM_CHANGE_BEGIN_BATTLE,
|
||||||
// Form change that activates at the end of a battle. If species is not specified and it's on the player's side, it will try to use the value saved in gBattleStruct->changedSpecies from a previous form change.
|
// Form change that activates at the end of a battle. If species is not specified and it's on the player's side, it will try to use the value saved in gBattleStruct->partyState[x][y].changedSpecies from a previous form change.
|
||||||
// param1: item to hold, optional
|
// param1: item to hold, optional
|
||||||
// param2: a move that will be replaced, optional
|
// param2: a move that will be replaced, optional
|
||||||
// param3: a new move to replace it with, optional
|
// param3: a new move to replace it with, optional
|
||||||
FORM_CHANGE_END_BATTLE,
|
FORM_CHANGE_END_BATTLE,
|
||||||
// Form change that activates at the end of a battle based on the terrain if it participated in the battle and hasn't fainted. Takes priority over FORM_CHANGE_END_BATTLE.
|
// Form change that activates at the end of a battle based on the environment if it participated in the battle and hasn't fainted. Takes priority over FORM_CHANGE_END_BATTLE.
|
||||||
// param1: battle terrain to check.
|
// param1: battle environment to check.
|
||||||
FORM_CHANGE_END_BATTLE_TERRAIN,
|
FORM_CHANGE_END_BATTLE_ENVIRONMENT,
|
||||||
// Form change that activates when the Pokémon is switched out in battle.
|
// Form change that activates when the Pokémon is switched out in battle.
|
||||||
// param1: ability to check, optional
|
// param1: ability to check, optional
|
||||||
FORM_CHANGE_BATTLE_SWITCH,
|
FORM_CHANGE_BATTLE_SWITCH,
|
||||||
@ -125,6 +125,9 @@ enum FormChanges
|
|||||||
// param1: move to check
|
// param1: move to check
|
||||||
// param2: ability to check, optional
|
// param2: ability to check, optional
|
||||||
FORM_CHANGE_BATTLE_BEFORE_MOVE,
|
FORM_CHANGE_BATTLE_BEFORE_MOVE,
|
||||||
|
// Form change that activates after using a move.
|
||||||
|
// param1: move to check
|
||||||
|
FORM_CHANGE_BATTLE_AFTER_MOVE,
|
||||||
// Form change that activates before using a specific move category.
|
// Form change that activates before using a specific move category.
|
||||||
// param1: move category to check
|
// param1: move category to check
|
||||||
// param2: ability to check, optional
|
// param2: ability to check, optional
|
||||||
|
|||||||
@ -17,6 +17,9 @@ enum GenConfigTag
|
|||||||
GEN_CONFIG_BATTLE_BOND,
|
GEN_CONFIG_BATTLE_BOND,
|
||||||
GEN_CONFIG_ATE_MULTIPLIER,
|
GEN_CONFIG_ATE_MULTIPLIER,
|
||||||
GEN_CONFIG_FELL_STINGER_STAT_RAISE,
|
GEN_CONFIG_FELL_STINGER_STAT_RAISE,
|
||||||
|
GEN_CONFIG_DEFIANT_STICKY_WEB,
|
||||||
|
GEN_CONFIG_ENCORE_TARGET,
|
||||||
|
GEN_CONFIG_TIME_OF_DAY_HEALING_MOVES,
|
||||||
GEN_PICKUP_WILD,
|
GEN_PICKUP_WILD,
|
||||||
GEN_PROTEAN_LIBERO,
|
GEN_PROTEAN_LIBERO,
|
||||||
GEN_INTREPID_SWORD,
|
GEN_INTREPID_SWORD,
|
||||||
@ -25,6 +28,8 @@ enum GenConfigTag
|
|||||||
GEN_STEAL_WILD_ITEMS,
|
GEN_STEAL_WILD_ITEMS,
|
||||||
GEN_SNOW_WARNING,
|
GEN_SNOW_WARNING,
|
||||||
GEN_ALLY_SWITCH_FAIL_CHANCE,
|
GEN_ALLY_SWITCH_FAIL_CHANCE,
|
||||||
|
GEN_DREAM_EATER_LIQUID_OOZE,
|
||||||
|
GEN_CONFIG_TRANSISTOR_BOOST,
|
||||||
GEN_CONFIG_COUNT
|
GEN_CONFIG_COUNT
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -63,11 +63,6 @@
|
|||||||
#define SECRET_BASES_COUNT 20
|
#define SECRET_BASES_COUNT 20
|
||||||
#define POKE_NEWS_COUNT 16
|
#define POKE_NEWS_COUNT 16
|
||||||
#define PC_ITEMS_COUNT 50
|
#define PC_ITEMS_COUNT 50
|
||||||
#define BAG_ITEMS_COUNT 30
|
|
||||||
#define BAG_KEYITEMS_COUNT 30
|
|
||||||
#define BAG_POKEBALLS_COUNT 16
|
|
||||||
#define BAG_TMHM_COUNT 64
|
|
||||||
#define BAG_BERRIES_COUNT 46
|
|
||||||
#define OBJECT_EVENT_TEMPLATES_COUNT 64
|
#define OBJECT_EVENT_TEMPLATES_COUNT 64
|
||||||
#define DECOR_MAX_SECRET_BASE 16
|
#define DECOR_MAX_SECRET_BASE 16
|
||||||
#define DECOR_MAX_PLAYERS_HOUSE 12
|
#define DECOR_MAX_PLAYERS_HOUSE 12
|
||||||
@ -81,6 +76,13 @@
|
|||||||
#define PYRAMID_BAG_ITEMS_COUNT 10
|
#define PYRAMID_BAG_ITEMS_COUNT 10
|
||||||
#define ROAMER_COUNT 1 // Number of maximum concurrent active roamers
|
#define ROAMER_COUNT 1 // Number of maximum concurrent active roamers
|
||||||
|
|
||||||
|
// Bag constants
|
||||||
|
#define BAG_ITEMS_COUNT 30
|
||||||
|
#define BAG_KEYITEMS_COUNT 30
|
||||||
|
#define BAG_POKEBALLS_COUNT 16
|
||||||
|
#define BAG_TMHM_COUNT 64
|
||||||
|
#define BAG_BERRIES_COUNT 46
|
||||||
|
|
||||||
// Number of facilities for Ranking Hall.
|
// Number of facilities for Ranking Hall.
|
||||||
// 7 facilities for single mode + tower double mode + tower multi mode.
|
// 7 facilities for single mode + tower double mode + tower multi mode.
|
||||||
// Excludes link modes. See RANKING_HALL_* in include/constants/battle_frontier.h
|
// Excludes link modes. See RANKING_HALL_* in include/constants/battle_frontier.h
|
||||||
|
|||||||
@ -142,10 +142,9 @@ enum ItemHoldEffect
|
|||||||
HOLD_EFFECT_OGERPON_MASK,
|
HOLD_EFFECT_OGERPON_MASK,
|
||||||
// Gen2 hold effect
|
// Gen2 hold effect
|
||||||
HOLD_EFFECT_BERSERK_GENE,
|
HOLD_EFFECT_BERSERK_GENE,
|
||||||
|
HOLD_EFFECT_COUNT
|
||||||
};
|
};
|
||||||
|
|
||||||
#define HOLD_EFFECT_CHOICE(holdEffect) ((holdEffect == HOLD_EFFECT_CHOICE_BAND || holdEffect == HOLD_EFFECT_CHOICE_SCARF || holdEffect == HOLD_EFFECT_CHOICE_SPECS))
|
|
||||||
|
|
||||||
// Terrain seed params
|
// Terrain seed params
|
||||||
#define HOLD_EFFECT_PARAM_ELECTRIC_TERRAIN 0
|
#define HOLD_EFFECT_PARAM_ELECTRIC_TERRAIN 0
|
||||||
#define HOLD_EFFECT_PARAM_GRASSY_TERRAIN 1
|
#define HOLD_EFFECT_PARAM_GRASSY_TERRAIN 1
|
||||||
|
|||||||
@ -1,20 +1,16 @@
|
|||||||
#ifndef GUARD_ITEM_CONSTANTS_H
|
#ifndef GUARD_ITEM_CONSTANTS_H
|
||||||
#define GUARD_ITEM_CONSTANTS_H
|
#define GUARD_ITEM_CONSTANTS_H
|
||||||
|
|
||||||
// These constants are used in gItemsInfo
|
enum Pocket
|
||||||
#define POCKET_NONE 0
|
{
|
||||||
#define POCKET_ITEMS 1
|
POCKET_ITEMS,
|
||||||
#define POCKET_POKE_BALLS 2
|
POCKET_POKE_BALLS,
|
||||||
#define POCKET_TM_HM 3
|
POCKET_TM_HM,
|
||||||
#define POCKET_BERRIES 4
|
POCKET_BERRIES,
|
||||||
#define POCKET_KEY_ITEMS 5
|
POCKET_KEY_ITEMS,
|
||||||
|
POCKETS_COUNT,
|
||||||
#define ITEMS_POCKET 0
|
POCKET_DUMMY = POCKETS_COUNT,
|
||||||
#define BALLS_POCKET 1
|
};
|
||||||
#define TMHM_POCKET 2
|
|
||||||
#define BERRIES_POCKET 3
|
|
||||||
#define KEYITEMS_POCKET 4
|
|
||||||
#define POCKETS_COUNT 5
|
|
||||||
|
|
||||||
#define REPEL_LURE_MASK (1 << 15)
|
#define REPEL_LURE_MASK (1 << 15)
|
||||||
#define IS_LAST_USED_LURE(var) (var & REPEL_LURE_MASK)
|
#define IS_LAST_USED_LURE(var) (var & REPEL_LURE_MASK)
|
||||||
|
|||||||
@ -93,4 +93,8 @@
|
|||||||
#define ITEM_EFFECT_HEAL_PP 21
|
#define ITEM_EFFECT_HEAL_PP 21
|
||||||
#define ITEM_EFFECT_NONE 22
|
#define ITEM_EFFECT_NONE 22
|
||||||
|
|
||||||
|
// Since X item stat increases are now handled by battle scripts, the friendship increase effect is now handled by the battle controller in HandleAction_UseItem.
|
||||||
|
#define X_ITEM_FRIENDSHIP_INCREASE 1 // The amount of friendship gained by using an X item on a Pokémon in battle.
|
||||||
|
#define X_ITEM_MAX_FRIENDSHIP 200 // Friendship threshold at which Pokémon stop receiving a friendship increase from using X items on them in battle.
|
||||||
|
|
||||||
#endif // GUARD_CONSTANTS_ITEM_EFFECTS_H
|
#endif // GUARD_CONSTANTS_ITEM_EFFECTS_H
|
||||||
|
|||||||
@ -1027,9 +1027,6 @@
|
|||||||
#define MAIL_NONE 0xFF
|
#define MAIL_NONE 0xFF
|
||||||
#define ITEM_TO_MULCH(itemId)(((itemId) - ITEM_GROWTH_MULCH) + 1)
|
#define ITEM_TO_MULCH(itemId)(((itemId) - ITEM_GROWTH_MULCH) + 1)
|
||||||
|
|
||||||
#define NUM_TECHNICAL_MACHINES 100
|
|
||||||
#define NUM_HIDDEN_MACHINES 8
|
|
||||||
|
|
||||||
#define MAX_BAG_ITEM_CAPACITY 999
|
#define MAX_BAG_ITEM_CAPACITY 999
|
||||||
#define MAX_PC_ITEM_CAPACITY 999
|
#define MAX_PC_ITEM_CAPACITY 999
|
||||||
#define MAX_PYRAMID_BAG_ITEM_CAPACITY 99 // Values higher than 255 require free SaveBlock2 space.
|
#define MAX_PYRAMID_BAG_ITEM_CAPACITY 99 // Values higher than 255 require free SaveBlock2 space.
|
||||||
|
|||||||
@ -1,25 +1,31 @@
|
|||||||
#ifndef GUARD_CONSTANTS_MAP_TYPES_H
|
#ifndef GUARD_CONSTANTS_MAP_TYPES_H
|
||||||
#define GUARD_CONSTANTS_MAP_TYPES_H
|
#define GUARD_CONSTANTS_MAP_TYPES_H
|
||||||
|
|
||||||
#define MAP_TYPE_NONE 0
|
enum MapType
|
||||||
#define MAP_TYPE_TOWN 1
|
{
|
||||||
#define MAP_TYPE_CITY 2
|
MAP_TYPE_NONE,
|
||||||
#define MAP_TYPE_ROUTE 3
|
MAP_TYPE_TOWN,
|
||||||
#define MAP_TYPE_UNDERGROUND 4
|
MAP_TYPE_CITY,
|
||||||
#define MAP_TYPE_UNDERWATER 5
|
MAP_TYPE_ROUTE,
|
||||||
#define MAP_TYPE_OCEAN_ROUTE 6
|
MAP_TYPE_UNDERGROUND,
|
||||||
#define MAP_TYPE_UNKNOWN 7 // Not used by any map.
|
MAP_TYPE_UNDERWATER,
|
||||||
#define MAP_TYPE_INDOOR 8
|
MAP_TYPE_OCEAN_ROUTE,
|
||||||
#define MAP_TYPE_SECRET_BASE 9
|
MAP_TYPE_UNKNOWN, // Not used by any map.
|
||||||
|
MAP_TYPE_INDOOR,
|
||||||
|
MAP_TYPE_SECRET_BASE,
|
||||||
|
};
|
||||||
|
|
||||||
#define MAP_BATTLE_SCENE_NORMAL 0
|
enum MapBattleScene
|
||||||
#define MAP_BATTLE_SCENE_GYM 1
|
{
|
||||||
#define MAP_BATTLE_SCENE_MAGMA 2
|
MAP_BATTLE_SCENE_NORMAL,
|
||||||
#define MAP_BATTLE_SCENE_AQUA 3
|
MAP_BATTLE_SCENE_GYM,
|
||||||
#define MAP_BATTLE_SCENE_SIDNEY 4
|
MAP_BATTLE_SCENE_MAGMA,
|
||||||
#define MAP_BATTLE_SCENE_PHOEBE 5
|
MAP_BATTLE_SCENE_AQUA,
|
||||||
#define MAP_BATTLE_SCENE_GLACIA 6
|
MAP_BATTLE_SCENE_SIDNEY,
|
||||||
#define MAP_BATTLE_SCENE_DRAKE 7
|
MAP_BATTLE_SCENE_PHOEBE,
|
||||||
#define MAP_BATTLE_SCENE_FRONTIER 8
|
MAP_BATTLE_SCENE_GLACIA,
|
||||||
|
MAP_BATTLE_SCENE_DRAKE,
|
||||||
|
MAP_BATTLE_SCENE_FRONTIER,
|
||||||
|
};
|
||||||
|
|
||||||
#endif // GUARD_CONSTANTS_MAP_TYPES_H
|
#endif // GUARD_CONSTANTS_MAP_TYPES_H
|
||||||
|
|||||||
@ -241,7 +241,7 @@ enum {
|
|||||||
MB_UP_LEFT_STAIR_WARP,
|
MB_UP_LEFT_STAIR_WARP,
|
||||||
MB_DOWN_RIGHT_STAIR_WARP,
|
MB_DOWN_RIGHT_STAIR_WARP,
|
||||||
MB_DOWN_LEFT_STAIR_WARP,
|
MB_DOWN_LEFT_STAIR_WARP,
|
||||||
MB_UNUSED_EF,
|
MB_ROCK_CLIMB,
|
||||||
NUM_METATILE_BEHAVIORS
|
NUM_METATILE_BEHAVIORS
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,8 @@
|
|||||||
|
|
||||||
// National Pokédex order
|
// National Pokédex order
|
||||||
// These constants are NOT disabled by P_GEN_X_POKEMON to keep pokedex_orders.h clean.
|
// These constants are NOT disabled by P_GEN_X_POKEMON to keep pokedex_orders.h clean.
|
||||||
enum {
|
enum NationalDexOrder
|
||||||
|
{
|
||||||
NATIONAL_DEX_NONE,
|
NATIONAL_DEX_NONE,
|
||||||
// Kanto
|
// Kanto
|
||||||
NATIONAL_DEX_BULBASAUR,
|
NATIONAL_DEX_BULBASAUR,
|
||||||
@ -1063,7 +1064,8 @@ enum {
|
|||||||
#define POKEMON_SLOTS_NUMBER (NATIONAL_DEX_COUNT + 1)
|
#define POKEMON_SLOTS_NUMBER (NATIONAL_DEX_COUNT + 1)
|
||||||
|
|
||||||
// Hoenn Pokédex order
|
// Hoenn Pokédex order
|
||||||
enum {
|
enum HoennDexOrder
|
||||||
|
{
|
||||||
HOENN_DEX_NONE,
|
HOENN_DEX_NONE,
|
||||||
HOENN_DEX_TREECKO,
|
HOENN_DEX_TREECKO,
|
||||||
HOENN_DEX_GROVYLE,
|
HOENN_DEX_GROVYLE,
|
||||||
|
|||||||
@ -218,29 +218,38 @@
|
|||||||
#define EV_ITEM_RAISE_LIMIT ((I_VITAMIN_EV_CAP >= GEN_8) ? MAX_PER_STAT_EVS : 100)
|
#define EV_ITEM_RAISE_LIMIT ((I_VITAMIN_EV_CAP >= GEN_8) ? MAX_PER_STAT_EVS : 100)
|
||||||
|
|
||||||
// Move category defines.
|
// Move category defines.
|
||||||
#define DAMAGE_CATEGORY_PHYSICAL 0
|
enum DamageCategory
|
||||||
#define DAMAGE_CATEGORY_SPECIAL 1
|
{
|
||||||
#define DAMAGE_CATEGORY_STATUS 2
|
DAMAGE_CATEGORY_PHYSICAL,
|
||||||
|
DAMAGE_CATEGORY_SPECIAL,
|
||||||
|
DAMAGE_CATEGORY_STATUS
|
||||||
|
};
|
||||||
|
|
||||||
// Growth rates
|
// Growth rates
|
||||||
#define GROWTH_MEDIUM_FAST 0
|
enum GrowthRate
|
||||||
#define GROWTH_ERRATIC 1
|
{
|
||||||
#define GROWTH_FLUCTUATING 2
|
GROWTH_MEDIUM_FAST,
|
||||||
#define GROWTH_MEDIUM_SLOW 3
|
GROWTH_ERRATIC,
|
||||||
#define GROWTH_FAST 4
|
GROWTH_FLUCTUATING,
|
||||||
#define GROWTH_SLOW 5
|
GROWTH_MEDIUM_SLOW,
|
||||||
|
GROWTH_FAST,
|
||||||
|
GROWTH_SLOW,
|
||||||
|
};
|
||||||
|
|
||||||
// Body colors for Pokédex search
|
// Body colors for Pokédex search
|
||||||
#define BODY_COLOR_RED 0
|
enum BodyColor
|
||||||
#define BODY_COLOR_BLUE 1
|
{
|
||||||
#define BODY_COLOR_YELLOW 2
|
BODY_COLOR_RED,
|
||||||
#define BODY_COLOR_GREEN 3
|
BODY_COLOR_BLUE,
|
||||||
#define BODY_COLOR_BLACK 4
|
BODY_COLOR_YELLOW,
|
||||||
#define BODY_COLOR_BROWN 5
|
BODY_COLOR_GREEN,
|
||||||
#define BODY_COLOR_PURPLE 6
|
BODY_COLOR_BLACK,
|
||||||
#define BODY_COLOR_GRAY 7
|
BODY_COLOR_BROWN,
|
||||||
#define BODY_COLOR_WHITE 8
|
BODY_COLOR_PURPLE,
|
||||||
#define BODY_COLOR_PINK 9
|
BODY_COLOR_GRAY,
|
||||||
|
BODY_COLOR_WHITE,
|
||||||
|
BODY_COLOR_PINK,
|
||||||
|
};
|
||||||
|
|
||||||
#define F_SUMMARY_SCREEN_FLIP_SPRITE 0x80
|
#define F_SUMMARY_SCREEN_FLIP_SPRITE 0x80
|
||||||
|
|
||||||
@ -313,6 +322,7 @@ enum EvolutionMode {
|
|||||||
EVO_MODE_ITEM_CHECK, // If an Everstone is being held, still want to show that the stone *could* be used on that Pokémon to evolve
|
EVO_MODE_ITEM_CHECK, // If an Everstone is being held, still want to show that the stone *could* be used on that Pokémon to evolve
|
||||||
EVO_MODE_BATTLE_SPECIAL,
|
EVO_MODE_BATTLE_SPECIAL,
|
||||||
EVO_MODE_OVERWORLD_SPECIAL,
|
EVO_MODE_OVERWORLD_SPECIAL,
|
||||||
|
EVO_MODE_SCRIPT_TRIGGER,
|
||||||
EVO_MODE_BATTLE_ONLY, // This mode is only used in battles to support Tandemaus' unique requirement
|
EVO_MODE_BATTLE_ONLY, // This mode is only used in battles to support Tandemaus' unique requirement
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -33,6 +33,7 @@
|
|||||||
#define CRY_MODE_GROWL_2 10 // For 2nd cry used by the move Growl
|
#define CRY_MODE_GROWL_2 10 // For 2nd cry used by the move Growl
|
||||||
#define CRY_MODE_WEAK 11 // Used when a Pokémon is unhealthy
|
#define CRY_MODE_WEAK 11 // Used when a Pokémon is unhealthy
|
||||||
#define CRY_MODE_WEAK_DOUBLES 12 // Equivalent to CRY_MODE_DOUBLES for CRY_MODE_WEAK
|
#define CRY_MODE_WEAK_DOUBLES 12 // Equivalent to CRY_MODE_DOUBLES for CRY_MODE_WEAK
|
||||||
|
#define CRY_MODE_DYNAMAX 13 // Used during Dynamax
|
||||||
|
|
||||||
// Given to SoundTask_PlayDoubleCry to determine which cry mode to use. Values are arbitrary
|
// Given to SoundTask_PlayDoubleCry to determine which cry mode to use. Values are arbitrary
|
||||||
#define DOUBLE_CRY_ROAR 2
|
#define DOUBLE_CRY_ROAR 2
|
||||||
|
|||||||
@ -5,10 +5,13 @@
|
|||||||
#define TRADE_PARTNER 1
|
#define TRADE_PARTNER 1
|
||||||
|
|
||||||
// In-game Trade IDs
|
// In-game Trade IDs
|
||||||
#define INGAME_TRADE_SEEDOT 0
|
enum InGameTradeID
|
||||||
#define INGAME_TRADE_PLUSLE 1
|
{
|
||||||
#define INGAME_TRADE_HORSEA 2
|
INGAME_TRADE_SEEDOT,
|
||||||
#define INGAME_TRADE_MEOWTH 3
|
INGAME_TRADE_PLUSLE,
|
||||||
|
INGAME_TRADE_HORSEA,
|
||||||
|
INGAME_TRADE_MEOWTH,
|
||||||
|
};
|
||||||
|
|
||||||
// Return values for CanTradeSelectedMon and CanSpinTradeMon
|
// Return values for CanTradeSelectedMon and CanSpinTradeMon
|
||||||
#define CAN_TRADE_MON 0
|
#define CAN_TRADE_MON 0
|
||||||
|
|||||||
@ -285,73 +285,76 @@
|
|||||||
|
|
||||||
#define RS_FACILITY_CLASSES_COUNT 0x4D
|
#define RS_FACILITY_CLASSES_COUNT 0x4D
|
||||||
|
|
||||||
#define TRAINER_CLASS_PKMN_TRAINER_1 0x0 // Unused
|
enum TrainerClassID
|
||||||
#define TRAINER_CLASS_PKMN_TRAINER_2 0x1 // Unused
|
{
|
||||||
#define TRAINER_CLASS_HIKER 0x2
|
TRAINER_CLASS_PKMN_TRAINER_1, // Unused
|
||||||
#define TRAINER_CLASS_TEAM_AQUA 0x3
|
TRAINER_CLASS_PKMN_TRAINER_2, // Unused
|
||||||
#define TRAINER_CLASS_PKMN_BREEDER 0x4
|
TRAINER_CLASS_HIKER,
|
||||||
#define TRAINER_CLASS_COOLTRAINER 0x5
|
TRAINER_CLASS_TEAM_AQUA,
|
||||||
#define TRAINER_CLASS_BIRD_KEEPER 0x6
|
TRAINER_CLASS_PKMN_BREEDER,
|
||||||
#define TRAINER_CLASS_COLLECTOR 0x7
|
TRAINER_CLASS_COOLTRAINER,
|
||||||
#define TRAINER_CLASS_SWIMMER_M 0x8
|
TRAINER_CLASS_BIRD_KEEPER,
|
||||||
#define TRAINER_CLASS_TEAM_MAGMA 0x9
|
TRAINER_CLASS_COLLECTOR,
|
||||||
#define TRAINER_CLASS_EXPERT 0xa
|
TRAINER_CLASS_SWIMMER_M,
|
||||||
#define TRAINER_CLASS_AQUA_ADMIN 0xb
|
TRAINER_CLASS_TEAM_MAGMA,
|
||||||
#define TRAINER_CLASS_BLACK_BELT 0xc
|
TRAINER_CLASS_EXPERT,
|
||||||
#define TRAINER_CLASS_AQUA_LEADER 0xd
|
TRAINER_CLASS_AQUA_ADMIN,
|
||||||
#define TRAINER_CLASS_HEX_MANIAC 0xe
|
TRAINER_CLASS_BLACK_BELT,
|
||||||
#define TRAINER_CLASS_AROMA_LADY 0xf
|
TRAINER_CLASS_AQUA_LEADER,
|
||||||
#define TRAINER_CLASS_RUIN_MANIAC 0x10
|
TRAINER_CLASS_HEX_MANIAC,
|
||||||
#define TRAINER_CLASS_INTERVIEWER 0x11
|
TRAINER_CLASS_AROMA_LADY,
|
||||||
#define TRAINER_CLASS_TUBER_F 0x12
|
TRAINER_CLASS_RUIN_MANIAC,
|
||||||
#define TRAINER_CLASS_TUBER_M 0x13
|
TRAINER_CLASS_INTERVIEWER,
|
||||||
#define TRAINER_CLASS_LADY 0x14
|
TRAINER_CLASS_TUBER_F,
|
||||||
#define TRAINER_CLASS_BEAUTY 0x15
|
TRAINER_CLASS_TUBER_M,
|
||||||
#define TRAINER_CLASS_RICH_BOY 0x16
|
TRAINER_CLASS_LADY,
|
||||||
#define TRAINER_CLASS_POKEMANIAC 0x17
|
TRAINER_CLASS_BEAUTY,
|
||||||
#define TRAINER_CLASS_GUITARIST 0x18
|
TRAINER_CLASS_RICH_BOY,
|
||||||
#define TRAINER_CLASS_KINDLER 0x19
|
TRAINER_CLASS_POKEMANIAC,
|
||||||
#define TRAINER_CLASS_CAMPER 0x1a
|
TRAINER_CLASS_GUITARIST,
|
||||||
#define TRAINER_CLASS_PICNICKER 0x1b
|
TRAINER_CLASS_KINDLER,
|
||||||
#define TRAINER_CLASS_BUG_MANIAC 0x1c
|
TRAINER_CLASS_CAMPER,
|
||||||
#define TRAINER_CLASS_PSYCHIC 0x1d
|
TRAINER_CLASS_PICNICKER,
|
||||||
#define TRAINER_CLASS_GENTLEMAN 0x1e
|
TRAINER_CLASS_BUG_MANIAC,
|
||||||
#define TRAINER_CLASS_ELITE_FOUR 0x1f
|
TRAINER_CLASS_PSYCHIC,
|
||||||
#define TRAINER_CLASS_LEADER 0x20
|
TRAINER_CLASS_GENTLEMAN,
|
||||||
#define TRAINER_CLASS_SCHOOL_KID 0x21
|
TRAINER_CLASS_ELITE_FOUR,
|
||||||
#define TRAINER_CLASS_SR_AND_JR 0x22
|
TRAINER_CLASS_LEADER,
|
||||||
#define TRAINER_CLASS_WINSTRATE 0x23
|
TRAINER_CLASS_SCHOOL_KID,
|
||||||
#define TRAINER_CLASS_POKEFAN 0x24
|
TRAINER_CLASS_SR_AND_JR,
|
||||||
#define TRAINER_CLASS_YOUNGSTER 0x25
|
TRAINER_CLASS_WINSTRATE,
|
||||||
#define TRAINER_CLASS_CHAMPION 0x26
|
TRAINER_CLASS_POKEFAN,
|
||||||
#define TRAINER_CLASS_FISHERMAN 0x27
|
TRAINER_CLASS_YOUNGSTER,
|
||||||
#define TRAINER_CLASS_TRIATHLETE 0x28
|
TRAINER_CLASS_CHAMPION,
|
||||||
#define TRAINER_CLASS_DRAGON_TAMER 0x29
|
TRAINER_CLASS_FISHERMAN,
|
||||||
#define TRAINER_CLASS_NINJA_BOY 0x2a
|
TRAINER_CLASS_TRIATHLETE,
|
||||||
#define TRAINER_CLASS_BATTLE_GIRL 0x2b
|
TRAINER_CLASS_DRAGON_TAMER,
|
||||||
#define TRAINER_CLASS_PARASOL_LADY 0x2c
|
TRAINER_CLASS_NINJA_BOY,
|
||||||
#define TRAINER_CLASS_SWIMMER_F 0x2d
|
TRAINER_CLASS_BATTLE_GIRL,
|
||||||
#define TRAINER_CLASS_TWINS 0x2e
|
TRAINER_CLASS_PARASOL_LADY,
|
||||||
#define TRAINER_CLASS_SAILOR 0x2f
|
TRAINER_CLASS_SWIMMER_F,
|
||||||
#define TRAINER_CLASS_COOLTRAINER_2 0x30 // Used for only one trainer.
|
TRAINER_CLASS_TWINS,
|
||||||
#define TRAINER_CLASS_MAGMA_ADMIN 0x31
|
TRAINER_CLASS_SAILOR,
|
||||||
#define TRAINER_CLASS_RIVAL 0x32
|
TRAINER_CLASS_COOLTRAINER_2, // Used for only one trainer.
|
||||||
#define TRAINER_CLASS_BUG_CATCHER 0x33
|
TRAINER_CLASS_MAGMA_ADMIN,
|
||||||
#define TRAINER_CLASS_PKMN_RANGER 0x34
|
TRAINER_CLASS_RIVAL,
|
||||||
#define TRAINER_CLASS_MAGMA_LEADER 0x35
|
TRAINER_CLASS_BUG_CATCHER,
|
||||||
#define TRAINER_CLASS_LASS 0x36
|
TRAINER_CLASS_PKMN_RANGER,
|
||||||
#define TRAINER_CLASS_YOUNG_COUPLE 0x37
|
TRAINER_CLASS_MAGMA_LEADER,
|
||||||
#define TRAINER_CLASS_OLD_COUPLE 0x38
|
TRAINER_CLASS_LASS,
|
||||||
#define TRAINER_CLASS_SIS_AND_BRO 0x39
|
TRAINER_CLASS_YOUNG_COUPLE,
|
||||||
#define TRAINER_CLASS_SALON_MAIDEN 0x3a
|
TRAINER_CLASS_OLD_COUPLE,
|
||||||
#define TRAINER_CLASS_DOME_ACE 0x3b
|
TRAINER_CLASS_SIS_AND_BRO,
|
||||||
#define TRAINER_CLASS_PALACE_MAVEN 0x3c
|
TRAINER_CLASS_SALON_MAIDEN,
|
||||||
#define TRAINER_CLASS_ARENA_TYCOON 0x3d
|
TRAINER_CLASS_DOME_ACE,
|
||||||
#define TRAINER_CLASS_FACTORY_HEAD 0x3e
|
TRAINER_CLASS_PALACE_MAVEN,
|
||||||
#define TRAINER_CLASS_PIKE_QUEEN 0x3f
|
TRAINER_CLASS_ARENA_TYCOON,
|
||||||
#define TRAINER_CLASS_PYRAMID_KING 0x40
|
TRAINER_CLASS_FACTORY_HEAD,
|
||||||
#define TRAINER_CLASS_RS_PROTAG 0x41
|
TRAINER_CLASS_PIKE_QUEEN,
|
||||||
#define TRAINER_CLASS_COUNT 0x42
|
TRAINER_CLASS_PYRAMID_KING,
|
||||||
|
TRAINER_CLASS_RS_PROTAG,
|
||||||
|
TRAINER_CLASS_COUNT,
|
||||||
|
};
|
||||||
|
|
||||||
#define TRAINER_ENCOUNTER_MUSIC_MALE 0 // standard male encounter music
|
#define TRAINER_ENCOUNTER_MUSIC_MALE 0 // standard male encounter music
|
||||||
#define TRAINER_ENCOUNTER_MUSIC_FEMALE 1 // standard female encounter music
|
#define TRAINER_ENCOUNTER_MUSIC_FEMALE 1 // standard female encounter music
|
||||||
|
|||||||
@ -5,6 +5,7 @@
|
|||||||
#include "constants/trainers.h"
|
#include "constants/trainers.h"
|
||||||
#include "constants/battle.h"
|
#include "constants/battle.h"
|
||||||
#include "difficulty.h"
|
#include "difficulty.h"
|
||||||
|
#include "debug.h"
|
||||||
|
|
||||||
#define MAX_TRAINER_ITEMS 4
|
#define MAX_TRAINER_ITEMS 4
|
||||||
|
|
||||||
@ -41,9 +42,9 @@ struct TrainerSprite
|
|||||||
|
|
||||||
struct TrainerBacksprite
|
struct TrainerBacksprite
|
||||||
{
|
{
|
||||||
struct MonCoords coordinates;
|
const struct MonCoords coordinates;
|
||||||
struct CompressedSpriteSheet backPic;
|
const struct SpriteFrameImage backPic;
|
||||||
struct SpritePalette palette;
|
const struct SpritePalette palette;
|
||||||
const union AnimCmd *const *const animation;
|
const union AnimCmd *const *const animation;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -104,6 +105,8 @@ struct Trainer
|
|||||||
/*0x22*/ u8 poolRuleIndex;
|
/*0x22*/ u8 poolRuleIndex;
|
||||||
/*0x23*/ u8 poolPickIndex;
|
/*0x23*/ u8 poolPickIndex;
|
||||||
/*0x24*/ u8 poolPruneIndex;
|
/*0x24*/ u8 poolPruneIndex;
|
||||||
|
/*0x25*/ u16 overrideTrainer;
|
||||||
|
/*0x26*/ u8 trainerBackPic;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct TrainerClass
|
struct TrainerClass
|
||||||
@ -176,7 +179,6 @@ extern const union AnimCmd *const gAnims_MonPic[];
|
|||||||
extern const union AnimCmd *const gAnims_Trainer[];
|
extern const union AnimCmd *const gAnims_Trainer[];
|
||||||
extern const struct TrainerSprite gTrainerSprites[];
|
extern const struct TrainerSprite gTrainerSprites[];
|
||||||
extern const struct TrainerBacksprite gTrainerBacksprites[];
|
extern const struct TrainerBacksprite gTrainerBacksprites[];
|
||||||
extern const u16 gTrainerPicToTrainerBackPic[];
|
|
||||||
|
|
||||||
extern const struct Trainer gTrainers[DIFFICULTY_COUNT][TRAINERS_COUNT];
|
extern const struct Trainer gTrainers[DIFFICULTY_COUNT][TRAINERS_COUNT];
|
||||||
extern const struct Trainer gBattlePartners[DIFFICULTY_COUNT][PARTNER_COUNT];
|
extern const struct Trainer gBattlePartners[DIFFICULTY_COUNT][PARTNER_COUNT];
|
||||||
@ -196,27 +198,38 @@ extern const struct FollowerMsgInfo gFollowerCuriousMessages[];
|
|||||||
extern const struct FollowerMsgInfo gFollowerMusicMessages[];
|
extern const struct FollowerMsgInfo gFollowerMusicMessages[];
|
||||||
extern const struct FollowerMsgInfo gFollowerPoisonedMessages[];
|
extern const struct FollowerMsgInfo gFollowerPoisonedMessages[];
|
||||||
|
|
||||||
|
static inline bool8 IsPartnerTrainerId(u16 trainerId)
|
||||||
|
{
|
||||||
|
if (trainerId >= TRAINER_PARTNER(PARTNER_NONE) && trainerId < TRAINER_PARTNER(PARTNER_COUNT))
|
||||||
|
return TRUE;
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
static inline u16 SanitizeTrainerId(u16 trainerId)
|
static inline u16 SanitizeTrainerId(u16 trainerId)
|
||||||
{
|
{
|
||||||
if (trainerId >= TRAINERS_COUNT)
|
if (trainerId >= TRAINERS_COUNT && !IsPartnerTrainerId(trainerId))
|
||||||
return TRAINER_NONE;
|
return TRAINER_NONE;
|
||||||
return trainerId;
|
return trainerId;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline const struct Trainer *GetTrainerStructFromId(u16 trainerId)
|
static inline const struct Trainer *GetTrainerStructFromId(u16 trainerId)
|
||||||
{
|
{
|
||||||
u32 sanitizedTrainerId = SanitizeTrainerId(trainerId);
|
u32 sanitizedTrainerId = 0;
|
||||||
|
if (gIsDebugBattle) return GetDebugAiTrainer();
|
||||||
|
sanitizedTrainerId = SanitizeTrainerId(trainerId);
|
||||||
enum DifficultyLevel difficulty = GetTrainerDifficultyLevel(sanitizedTrainerId);
|
enum DifficultyLevel difficulty = GetTrainerDifficultyLevel(sanitizedTrainerId);
|
||||||
|
|
||||||
return &gTrainers[difficulty][sanitizedTrainerId];
|
if (IsPartnerTrainerId(trainerId))
|
||||||
|
return &gBattlePartners[difficulty][sanitizedTrainerId - TRAINER_PARTNER(PARTNER_NONE)];
|
||||||
|
else
|
||||||
|
return &gTrainers[difficulty][sanitizedTrainerId];
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline const u8 GetTrainerClassFromId(u16 trainerId)
|
static inline const enum TrainerClassID GetTrainerClassFromId(u16 trainerId)
|
||||||
{
|
{
|
||||||
u32 sanitizedTrainerId = SanitizeTrainerId(trainerId);
|
const struct Trainer *trainer = GetTrainerStructFromId(trainerId);
|
||||||
enum DifficultyLevel difficulty = GetTrainerDifficultyLevel(sanitizedTrainerId);
|
|
||||||
|
|
||||||
return gTrainers[difficulty][sanitizedTrainerId].trainerClass;
|
return trainer->trainerClass;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline const u8 *GetTrainerClassNameFromId(u16 trainerId)
|
static inline const u8 *GetTrainerClassNameFromId(u16 trainerId)
|
||||||
@ -230,82 +243,72 @@ static inline const u8 *GetTrainerClassNameFromId(u16 trainerId)
|
|||||||
|
|
||||||
static inline const u8 *GetTrainerNameFromId(u16 trainerId)
|
static inline const u8 *GetTrainerNameFromId(u16 trainerId)
|
||||||
{
|
{
|
||||||
u32 sanitizedTrainerId = SanitizeTrainerId(trainerId);
|
|
||||||
|
|
||||||
enum DifficultyLevel difficulty = GetTrainerDifficultyLevel(sanitizedTrainerId);
|
|
||||||
|
|
||||||
enum DifficultyLevel partnerDifficulty = GetBattlePartnerDifficultyLevel(trainerId);
|
|
||||||
|
|
||||||
if (trainerId > TRAINER_PARTNER(PARTNER_NONE))
|
if (trainerId > TRAINER_PARTNER(PARTNER_NONE))
|
||||||
|
{
|
||||||
|
enum DifficultyLevel partnerDifficulty = GetBattlePartnerDifficultyLevel(trainerId);
|
||||||
return gBattlePartners[partnerDifficulty][trainerId - TRAINER_PARTNER(PARTNER_NONE)].trainerName;
|
return gBattlePartners[partnerDifficulty][trainerId - TRAINER_PARTNER(PARTNER_NONE)].trainerName;
|
||||||
return gTrainers[difficulty][sanitizedTrainerId].trainerName;
|
}
|
||||||
|
return GetTrainerStructFromId(trainerId)->trainerName;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline const u8 GetTrainerPicFromId(u16 trainerId)
|
static inline const u8 GetTrainerPicFromId(u16 trainerId)
|
||||||
{
|
{
|
||||||
u32 sanitizedTrainerId = SanitizeTrainerId(trainerId);
|
|
||||||
enum DifficultyLevel difficulty = GetTrainerDifficultyLevel(sanitizedTrainerId);
|
|
||||||
enum DifficultyLevel partnerDifficulty = GetBattlePartnerDifficultyLevel(trainerId);
|
enum DifficultyLevel partnerDifficulty = GetBattlePartnerDifficultyLevel(trainerId);
|
||||||
|
|
||||||
if (trainerId > TRAINER_PARTNER(PARTNER_NONE))
|
if (trainerId > TRAINER_PARTNER(PARTNER_NONE))
|
||||||
return gBattlePartners[partnerDifficulty][trainerId - TRAINER_PARTNER(PARTNER_NONE)].trainerPic;
|
return gBattlePartners[partnerDifficulty][trainerId - TRAINER_PARTNER(PARTNER_NONE)].trainerPic;
|
||||||
|
|
||||||
return gTrainers[difficulty][sanitizedTrainerId].trainerPic;
|
return GetTrainerStructFromId(trainerId)->trainerPic;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline const u8 GetTrainerBackPicFromId(u16 trainerId)
|
||||||
|
{
|
||||||
|
enum DifficultyLevel partnerDifficulty = GetBattlePartnerDifficultyLevel(trainerId);
|
||||||
|
|
||||||
|
if (trainerId > TRAINER_PARTNER(PARTNER_NONE))
|
||||||
|
return gBattlePartners[partnerDifficulty][trainerId - TRAINER_PARTNER(PARTNER_NONE)].trainerBackPic;
|
||||||
|
|
||||||
|
return GetTrainerStructFromId(trainerId)->trainerBackPic;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline const u8 GetTrainerStartingStatusFromId(u16 trainerId)
|
static inline const u8 GetTrainerStartingStatusFromId(u16 trainerId)
|
||||||
{
|
{
|
||||||
return gTrainers[GetCurrentDifficultyLevel()][SanitizeTrainerId(trainerId)].startingStatus;
|
return GetTrainerStructFromId(trainerId)->startingStatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline const enum TrainerBattleType GetTrainerBattleType(u16 trainerId)
|
static inline const enum TrainerBattleType GetTrainerBattleType(u16 trainerId)
|
||||||
{
|
{
|
||||||
u32 sanitizedTrainerId = SanitizeTrainerId(trainerId);
|
return GetTrainerStructFromId(trainerId)->battleType;
|
||||||
enum DifficultyLevel difficulty = GetTrainerDifficultyLevel(sanitizedTrainerId);
|
|
||||||
|
|
||||||
return gTrainers[difficulty][sanitizedTrainerId].battleType;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline const u8 GetTrainerPartySizeFromId(u16 trainerId)
|
static inline const u8 GetTrainerPartySizeFromId(u16 trainerId)
|
||||||
{
|
{
|
||||||
u32 sanitizedTrainerId = SanitizeTrainerId(trainerId);
|
return GetTrainerStructFromId(trainerId)->partySize;
|
||||||
enum DifficultyLevel difficulty = GetTrainerDifficultyLevel(sanitizedTrainerId);
|
|
||||||
|
|
||||||
return gTrainers[difficulty][sanitizedTrainerId].partySize;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline const bool32 DoesTrainerHaveMugshot(u16 trainerId)
|
static inline const bool32 DoesTrainerHaveMugshot(u16 trainerId)
|
||||||
{
|
{
|
||||||
return gTrainers[GetCurrentDifficultyLevel()][SanitizeTrainerId(trainerId)].mugshotColor;
|
return GetTrainerStructFromId(trainerId)->mugshotColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline const u8 GetTrainerMugshotColorFromId(u16 trainerId)
|
static inline const u8 GetTrainerMugshotColorFromId(u16 trainerId)
|
||||||
{
|
{
|
||||||
return gTrainers[GetCurrentDifficultyLevel()][SanitizeTrainerId(trainerId)].mugshotColor;
|
return GetTrainerStructFromId(trainerId)->mugshotColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline const u16 *GetTrainerItemsFromId(u16 trainerId)
|
static inline const u16 *GetTrainerItemsFromId(u16 trainerId)
|
||||||
{
|
{
|
||||||
u32 sanitizedTrainerId = SanitizeTrainerId(trainerId);
|
return GetTrainerStructFromId(trainerId)->items;
|
||||||
enum DifficultyLevel difficulty = GetTrainerDifficultyLevel(sanitizedTrainerId);
|
|
||||||
|
|
||||||
return gTrainers[difficulty][sanitizedTrainerId].items;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline const struct TrainerMon *GetTrainerPartyFromId(u16 trainerId)
|
static inline const struct TrainerMon *GetTrainerPartyFromId(u16 trainerId)
|
||||||
{
|
{
|
||||||
u32 sanitizedTrainerId = SanitizeTrainerId(trainerId);
|
return GetTrainerStructFromId(trainerId)->party;
|
||||||
enum DifficultyLevel difficulty = GetTrainerDifficultyLevel(sanitizedTrainerId);
|
|
||||||
|
|
||||||
return gTrainers[difficulty][sanitizedTrainerId].party;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline const u64 GetTrainerAIFlagsFromId(u16 trainerId)
|
static inline const u64 GetTrainerAIFlagsFromId(u16 trainerId)
|
||||||
{
|
{
|
||||||
u32 sanitizedTrainerId = SanitizeTrainerId(trainerId);
|
return GetTrainerStructFromId(trainerId)->aiFlags;
|
||||||
enum DifficultyLevel difficulty = GetTrainerDifficultyLevel(sanitizedTrainerId);
|
|
||||||
|
|
||||||
return gTrainers[difficulty][sanitizedTrainerId].aiFlags;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // GUARD_DATA_H
|
#endif // GUARD_DATA_H
|
||||||
|
|||||||
@ -4,6 +4,7 @@
|
|||||||
void Debug_ShowMainMenu(void);
|
void Debug_ShowMainMenu(void);
|
||||||
extern const u8 Debug_FlagsAndVarNotSetBattleConfigMessage[];
|
extern const u8 Debug_FlagsAndVarNotSetBattleConfigMessage[];
|
||||||
const u8 *GetWeatherName(u32 weatherId);
|
const u8 *GetWeatherName(u32 weatherId);
|
||||||
|
const struct Trainer* GetDebugAiTrainer(void);
|
||||||
|
|
||||||
extern EWRAM_DATA bool8 gIsDebugBattle;
|
extern EWRAM_DATA bool8 gIsDebugBattle;
|
||||||
extern EWRAM_DATA u64 gDebugAIFlags;
|
extern EWRAM_DATA u64 gDebugAIFlags;
|
||||||
|
|||||||
@ -5,9 +5,68 @@
|
|||||||
|
|
||||||
#define MAX_DECOMPRESSION_BUFFER_SIZE 0x4000
|
#define MAX_DECOMPRESSION_BUFFER_SIZE 0x4000
|
||||||
|
|
||||||
void LZDecompressWram(const u32 *src, void *dest);
|
#define TANS_TABLE_SIZE 64
|
||||||
void LZDecompressVram(const u32 *src, void *dest);
|
#define PACKED_FREQ_MASK 0x3F
|
||||||
|
#define PARTIAL_FREQ_MASK 0xC0000000
|
||||||
|
|
||||||
|
#define FIRST_LO_MASK 0x7f
|
||||||
|
#define CONTINUE_BIT 0x80
|
||||||
|
|
||||||
|
#define SMOL_IMAGE_SIZE_MULTIPLIER 4
|
||||||
|
|
||||||
|
struct LZ77Header {
|
||||||
|
u32 lz77IdBits:5;
|
||||||
|
u32 padding:3;
|
||||||
|
u32 size:24;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct SmolHeader {
|
||||||
|
u32 mode:4;
|
||||||
|
u32 imageSize:14;
|
||||||
|
u32 symSize:14;
|
||||||
|
u32 initialState:6;
|
||||||
|
u32 bitstreamSize:13;
|
||||||
|
u32 loSize:13;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct SpriteSheetHeader {
|
||||||
|
u32 mode:4;
|
||||||
|
u32 numComponents:12;
|
||||||
|
u32 framesPerComponent:16;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct SmolTilemapHeader {
|
||||||
|
u32 mode:4;
|
||||||
|
u32 tilemapSize:14;
|
||||||
|
u32 symSize:14;
|
||||||
|
u32 tileNumberSize;
|
||||||
|
};
|
||||||
|
|
||||||
|
union CompressionHeader {
|
||||||
|
struct LZ77Header lz77;
|
||||||
|
struct SmolHeader smol;
|
||||||
|
struct SmolTilemapHeader smolTilemap;
|
||||||
|
};
|
||||||
|
|
||||||
|
enum CompressionMode {
|
||||||
|
MODE_LZ77 = 0,
|
||||||
|
BASE_ONLY = 1,
|
||||||
|
ENCODE_SYMS = 2,
|
||||||
|
ENCODE_DELTA_SYMS = 3,
|
||||||
|
ENCODE_LO = 4,
|
||||||
|
ENCODE_BOTH = 5,
|
||||||
|
ENCODE_BOTH_DELTA_SYMS = 6,
|
||||||
|
IS_FRAME_CONTAINER = 7,
|
||||||
|
IS_TILEMAP = 8,
|
||||||
|
};
|
||||||
|
|
||||||
|
void DecompressDataWithHeaderVram(const u32 *src, void *dest);
|
||||||
|
void DecompressDataWithHeaderWram(const u32 *src, void *dest);
|
||||||
|
|
||||||
|
// Lucky's fast lz decompression function
|
||||||
|
void FastLZ77UnCompWram(const u32 *src, void *dest);
|
||||||
|
|
||||||
|
// Default Decompression functions are below here
|
||||||
u32 IsLZ77Data(const void *ptr, u32 minSize, u32 maxSize);
|
u32 IsLZ77Data(const void *ptr, u32 minSize, u32 maxSize);
|
||||||
|
|
||||||
u32 LoadCompressedSpriteSheet(const struct CompressedSpriteSheet *src);
|
u32 LoadCompressedSpriteSheet(const struct CompressedSpriteSheet *src);
|
||||||
@ -22,5 +81,6 @@ void HandleLoadSpecialPokePic(bool32 isFrontPic, void *dest, s32 species, u32 pe
|
|||||||
void LoadSpecialPokePic(void *dest, s32 species, u32 personality, bool8 isFrontPic);
|
void LoadSpecialPokePic(void *dest, s32 species, u32 personality, bool8 isFrontPic);
|
||||||
|
|
||||||
u32 GetDecompressedDataSize(const u32 *ptr);
|
u32 GetDecompressedDataSize(const u32 *ptr);
|
||||||
|
bool32 IsCompressedData(const u32 *ptr);
|
||||||
|
|
||||||
#endif // GUARD_DECOMPRESS_H
|
#endif // GUARD_DECOMPRESS_H
|
||||||
|
|||||||
15
include/decompress_error_handler.h
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
#ifndef GUARD_DECOMPRESS_ERROR_HANDLER_H
|
||||||
|
#define GUARD_DECOMPRESS_ERROR_HANDLER_H
|
||||||
|
|
||||||
|
#include "gba/types.h"
|
||||||
|
|
||||||
|
enum CompressionError {
|
||||||
|
NO_COMPRESSION_ERROR,
|
||||||
|
HEADER_ERROR,
|
||||||
|
};
|
||||||
|
|
||||||
|
void DoDecompressionError(void);
|
||||||
|
void DecompressionError_CB2(void);
|
||||||
|
void DecompressionError(const u32 *src, enum CompressionError error);
|
||||||
|
|
||||||
|
#endif // GUARD_DECOMPRESS_ERROR_HANDLER_H
|
||||||
@ -573,6 +573,7 @@ extern const u8 EventScript_UseWaterfall[];
|
|||||||
extern const u8 EventScript_CannotUseWaterfall[];
|
extern const u8 EventScript_CannotUseWaterfall[];
|
||||||
extern const u8 EventScript_UseDive[];
|
extern const u8 EventScript_UseDive[];
|
||||||
extern const u8 EventScript_UseDiveUnderwater[];
|
extern const u8 EventScript_UseDiveUnderwater[];
|
||||||
|
extern const u8 EventScript_UseRockClimb[];
|
||||||
extern const u8 EventScript_FallDownHole[];
|
extern const u8 EventScript_FallDownHole[];
|
||||||
extern const u8 EventScript_FieldPoison[];
|
extern const u8 EventScript_FieldPoison[];
|
||||||
extern const u8 EventScript_EggHatch[];
|
extern const u8 EventScript_EggHatch[];
|
||||||
|
|||||||
@ -50,5 +50,5 @@ void FreeResourcesAndDestroySprite(struct Sprite *sprite, u8 spriteId);
|
|||||||
u8 CreateMonSprite_PicBox(u16 species, s16 x, s16 y, u8 subpriority);
|
u8 CreateMonSprite_PicBox(u16 species, s16 x, s16 y, u8 subpriority);
|
||||||
void StartEscapeRopeFieldEffect(void);
|
void StartEscapeRopeFieldEffect(void);
|
||||||
void FieldEffectFreeGraphicsResources(struct Sprite *sprite);
|
void FieldEffectFreeGraphicsResources(struct Sprite *sprite);
|
||||||
|
bool8 IsRockClimbActive(void);
|
||||||
#endif // GUARD_FIELD_EFFECTS_H
|
#endif // GUARD_FIELD_EFFECTS_H
|
||||||
|
|||||||