Merge branch 'upcoming' of https://github.com/rh-hideout/pokeemerald-expansion into rhh/sideways_stairs

This commit is contained in:
ghoulslash 2024-08-04 12:26:20 -04:00
commit d2f3d319a7
1280 changed files with 26116 additions and 19081 deletions

View File

@ -23,19 +23,17 @@ body:
label: Version
description: What version of pokeemerald-expansion are you using as a base?
options:
- 1.8.4 (Latest release)
- 1.9.0 (Latest release)
- master (default, unreleased bugfixes)
- upcoming (Edge)
- 1.8.6
- 1.8.5
- 1.8.4
- 1.8.3
- 1.8.2
- 1.8.1
- 1.8.0
- 1.7.4
- 1.7.3
- 1.7.2
- 1.7.1
- 1.7.0
- pre-1.7.0
- pre-1.8.0
validations:
required: true
- type: input

View File

@ -23,18 +23,17 @@ body:
label: Version
description: What version of pokeemerald-expansion are you using as a base?
options:
- 1.8.4 (Latest release)
- 1.9.0 (Latest release)
- master (default, unreleased bugfixes)
- upcoming (Edge)
- 1.8.6
- 1.8.5
- 1.8.4
- 1.8.3
- 1.8.2
- 1.8.1
- 1.8.0
- 1.7.4
- 1.7.3
- 1.7.2
- 1.7.1
- 1.7.0
- pre-1.7.0
- pre-1.8.0
validations:
required: true
- type: input

View File

@ -23,18 +23,17 @@ body:
label: Version
description: What version of pokeemerald-expansion are you using as a base?
options:
- 1.8.4 (Latest release)
- 1.9.0 (Latest release)
- master (default, unreleased bugfixes)
- upcoming (Edge)
- 1.8.6
- 1.8.5
- 1.8.4
- 1.8.3
- 1.8.2
- 1.8.1
- 1.8.0
- 1.7.4
- 1.7.3
- 1.7.2
- 1.7.1
- 1.7.0
- pre-1.7.0
- pre-1.8.0
validations:
required: true
- type: input

View File

@ -26,8 +26,18 @@ jobs:
run: |
cd docs
mdbook build
- name: Check if Pages is enabled
uses: octokit/request-action@v2.x
id: check_pages
continue-on-error: true
with:
route: GET /repos/{repo}/pages
repo: ${{ github.repository }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Pages
uses: actions/configure-pages@v4
if: steps.check_pages.outcome == 'success'
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
@ -35,3 +45,4 @@ jobs:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
if: steps.check_pages.outcome == 'success'

View File

@ -1,48 +1,53 @@
# Pokeemerald-Expansion Changelogs
## 1.9.x
- **[Version 1.9.0](docs/changelogs/1.9.x/1.9.0.md) - ✨ Feature Release**
## 1.8.x
- ### [Version 1.8.4](docs/changelogs/1.8.x/1.8.4.md) - Bugfix Release 🧹
- ### [Version 1.8.3](docs/changelogs/1.8.x/1.8.3.md) - Bugfix Release 🧹
- ### [Version 1.8.2](docs/changelogs/1.8.x/1.8.2.md) - Bugfix Release 🧹
- ### [Version 1.8.1](docs/changelogs/1.8.x/1.8.1.md) - HOTFIX Release 🔥
- ### [Version 1.8.0](docs/changelogs/1.8.x/1.8.0.md) - Feature Release ✨
- **[Version 1.8.6](docs/changelogs/1.8.x/1.8.6.md) - 🧹 Bugfix Release**
- **[Version 1.8.5](docs/changelogs/1.8.x/1.8.5.md) - 🧹 Bugfix Release**
- **[Version 1.8.4](docs/changelogs/1.8.x/1.8.4.md) - 🧹 Bugfix Release**
- **[Version 1.8.3](docs/changelogs/1.8.x/1.8.3.md) - 🧹 Bugfix Release**
- **[Version 1.8.2](docs/changelogs/1.8.x/1.8.2.md) - 🧹 Bugfix Release**
- **[Version 1.8.1](docs/changelogs/1.8.x/1.8.1.md) - 🔥 HOTFIX Release**
- **[Version 1.8.0](docs/changelogs/1.8.x/1.8.0.md) - ✨ Feature Release**
## 1.7.x
- ### [Version 1.7.4](docs/changelogs/1.7.x/1.7.4.md) - Bugfix Release 🧹
- ### [Version 1.7.3](docs/changelogs/1.7.x/1.7.3.md) - Bugfix Release 🧹
- ### [Version 1.7.2](docs/changelogs/1.7.x/1.7.2.md) - Bugfix Release 🧹
- ### [Version 1.7.1](docs/changelogs/1.7.x/1.7.1.md) - Bugfix Release 🧹
- ### [Version 1.7.0](docs/changelogs/1.7.x/1.7.0.md) - Feature Release ✨
- **[Version 1.7.4](docs/changelogs/1.7.x/1.7.4.md) - 🧹 Bugfix Release**
- **[Version 1.7.3](docs/changelogs/1.7.x/1.7.3.md) - 🧹 Bugfix Release**
- **[Version 1.7.2](docs/changelogs/1.7.x/1.7.2.md) - 🧹 Bugfix Release**
- **[Version 1.7.1](docs/changelogs/1.7.x/1.7.1.md) - 🧹 Bugfix Release**
- **[Version 1.7.0](docs/changelogs/1.7.x/1.7.0.md) - ✨ Feature Release**
## 1.6.x
- ### [Version 1.6.2](docs/changelogs/1.6.x/1.6.2.md) - Bugfix Release 🧹
- ### [Version 1.6.1](docs/changelogs/1.6.x/1.6.1.md) - HOTFIX Release 🔥
- ### [Version 1.6.0](docs/changelogs/1.6.x/1.6.0.md) - Feature Release ✨
- **[Version 1.6.2](docs/changelogs/1.6.x/1.6.2.md) - 🧹 Bugfix Release**
- **[Version 1.6.1](docs/changelogs/1.6.x/1.6.1.md) - 🔥 HOTFIX Release**
- **[Version 1.6.0](docs/changelogs/1.6.x/1.6.0.md) - ✨ Feature Release**
## 1.5.x
- ### [Version 1.5.3](docs/changelogs/1.5.x/1.5.3.md) - HOTFIX Release 🔥
- ### [Version 1.5.2](docs/changelogs/1.5.x/1.5.2.md) - Bugfix Release 🧹
- ### [Version 1.5.1](docs/changelogs/1.5.x/1.5.1.md) - Bugfix Release 🧹
- ### [Version 1.5.0](docs/changelogs/1.5.x/1.5.0.md) - Feature Release ✨
- **[Version 1.5.3](docs/changelogs/1.5.x/1.5.3.md) - 🔥 HOTFIX Release**
- **[Version 1.5.2](docs/changelogs/1.5.x/1.5.2.md) - 🧹 Bugfix Release**
- **[Version 1.5.1](docs/changelogs/1.5.x/1.5.1.md) - 🧹 Bugfix Release**
- **[Version 1.5.0](docs/changelogs/1.5.x/1.5.0.md) - ✨ Feature Release**
## 1.4.x
- ### [Version 1.4.3](docs/changelogs/1.4.x/1.4.3.md) - Bugfix Release 🧹
- ### [Version 1.4.2](docs/changelogs/1.4.x/1.4.2.md) - Bugfix Release 🧹
- ### [Version 1.4.1](docs/changelogs/1.4.x/1.4.1.md) - HOTFIX Release 🔥
- ### [Version 1.4.0](docs/changelogs/1.4.x/1.4.0.md) - Feature Release ✨
- **[Version 1.4.3](docs/changelogs/1.4.x/1.4.3.md) - 🧹 Bugfix Release**
- **[Version 1.4.2](docs/changelogs/1.4.x/1.4.2.md) - 🧹 Bugfix Release**
- **[Version 1.4.1](docs/changelogs/1.4.x/1.4.1.md) - 🔥 HOTFIX Release**
- **[Version 1.4.0](docs/changelogs/1.4.x/1.4.0.md) - ✨ Feature Release**
## 1.3.x
- ### [Version 1.3.0](docs/changelogs/1.3.x/1.3.0.md) - Feature Release ✨
- **[Version 1.3.0](docs/changelogs/1.3.x/1.3.0.md) - ✨ Feature Release**
## 1.2.x
- ### [Version 1.2.0](docs/changelogs/1.2.x/1.2.0.md) - Feature Release ✨
- **[Version 1.2.0](docs/changelogs/1.2.x/1.2.0.md) - ✨ Feature Release**
## 1.1.x
- ### [Version 1.1.1](docs/changelogs/1.1.x/1.1.1.md) - Bugfix Release 🧹
- ### [Version 1.1.0](docs/changelogs/1.1.x/1.1.0.md) - Feature Release ✨
- **[Version 1.1.1](docs/changelogs/1.1.x/1.1.1.md) - 🧹 Bugfix Release**
- **[Version 1.1.0](docs/changelogs/1.1.x/1.1.0.md) - ✨ Feature Release**
## 1.0.x
- ### [Version 1.0.0](docs/changelogs/1.0.x/1.0.0.md) - Feature Release ✨
- **[Version 1.0.0](docs/changelogs/1.0.x/1.0.0.md) - ✨ Feature Release**
## Pre-1.0.x:
- ### [Version 0.9.0](docs/changelogs/0.9.x/0.9.0.md) - Retroactive Version 🦕
- **[Version 0.9.0](docs/changelogs/0.9.x/0.9.0.md) - 🦕 Retroactive Version**

View File

@ -33,27 +33,23 @@ WSL1 is the preferred terminal to build **pokeemerald Expansion**. The following
- Otherwise, **open WSL** and go to [Choosing where to store pokeemerald Expansion (WSL1)](#Choosing-where-to-store-pokeemerald-expansion-WSL1).
### Installing WSL1
1. Open [Windows Powershell **as Administrator**](https://i.imgur.com/QKmVbP9.png), and run the following command (Right Click or Shift+Insert is paste in the Powershell).
1. Open [Windows Powershell **as Administrator**](https://i.imgur.com/QKmVbP9.png), and run the following commands (Right Click or Shift+Insert is paste in the Powershell).
```powershell
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
wsl --install -d Ubuntu --enable-wsl1
```
2. Once the process finishes, restart your machine.
3. The next step is to choose and install a Linux distribution from the Microsoft Store. The following instructions will assume Ubuntu as the Linux distribution of choice.
3. Open Windows Powershell **as Administrator** again (after restarting), and run the following command to configure Ubuntu to use WSL1.
```powershell
wsl --set-version Ubuntu 1
```
<details>
<summary><i>Note for advanced users...</i></summary>
<summary><i>Note...</i></summary>
> You can pick a preferred Linux distribution, but setup instructions may differ. Debian should work with the given instructions, but has not been tested.
</details>
4. Open the [Microsoft Store Linux Selection](https://aka.ms/wslstore), click Ubuntu, then click Get, which will install the Ubuntu distribution.
<details>
<summary><i>Notes...</i></summary>
> Note 1: If a dialog pops up asking for you to sign into a Microsoft Account, then just close the dialog.
> Note 2: If the link does not work, then open the Microsoft Store manually, and search for the Ubuntu app (choose the one with no version number).
> WSL may open automatically after restarting, but you can ignore it for now.
</details>
### Setting up WSL1
@ -475,6 +471,20 @@ devkitARM is now installed.
Then proceed to [Choosing where to store pokeemerald Expansion (Linux)](#choosing-where-to-store-pokeemerald-expansion-linux).
### NixOS
Run the following command to start an interactive shell with the necessary packages:
```bash
nix-shell -p pkgsCross.arm-embedded.stdenv.cc git pkg-config libpng
```
Then proceed to [Choosing where to store pokeemerald Expansion (Linux)](#choosing-where-to-store-pokeemerald-expansion-linux).
### NixOS
Run the following command to start an interactive shell with the necessary packages:
```bash
nix-shell -p pkgsCross.arm-embedded.stdenv.cc git pkg-config libpng
```
Then proceed to [Choosing where to store pokeemerald Expansion (Linux)](#choosing-where-to-store-pokeemerald-expansion-linux).
### Other distributions
_(Specific instructions for other distributions would be greatly appreciated!)_

View File

@ -80,7 +80,7 @@ MODERN_ELF_NAME := $(MODERN_ROM_NAME:.gba=.elf)
MODERN_MAP_NAME := $(MODERN_ROM_NAME:.gba=.map)
MODERN_OBJ_DIR_NAME := build/modern
SHELL := /bin/bash -o pipefail
SHELL := bash -o pipefail
ELF = $(ROM:.gba=.elf)
MAP = $(ROM:.gba=.map)
@ -346,7 +346,7 @@ sound/%.bin: sound/%.aif ; $(AIF) $< $@
COMPETITIVE_PARTY_SYNTAX := $(shell PATH="$(PATH)"; echo 'COMPETITIVE_PARTY_SYNTAX' | $(CPP) $(CPPFLAGS) -imacros include/global.h | tail -n1)
ifeq ($(COMPETITIVE_PARTY_SYNTAX),1)
%.h: %.party tools ; $(CPP) $(CPPFLAGS) - < $< | sed '/#[^p]/d' | $(TRAINERPROC) -o $@ -i $< -
%.h: %.party tools ; $(CPP) $(CPPFLAGS) -traditional-cpp - < $< | sed '/#[^p]/d' | $(TRAINERPROC) -o $@ -i $< -
endif
ifeq ($(MODERN),0)
@ -384,7 +384,7 @@ ifeq ($(NODEP),1)
$(C_BUILDDIR)/%.o: $(C_SUBDIR)/%.c
ifeq (,$(KEEP_TEMPS))
@echo "$(CC1) <flags> -o $@ $<"
@$(CPP) $(CPPFLAGS) $< | $(PREPROC) $< charmap.txt -i | $(CC1) $(CFLAGS) -o - - | cat - <(echo -e ".text\n\t.align\t2, 0") | $(AS) $(ASFLAGS) -o $@ -
@$(CPP) $(CPPFLAGS) $< | $(PREPROC) -i $< charmap.txt | $(CC1) $(CFLAGS) -o - - | cat - <(echo -e ".text\n\t.align\t2, 0") | $(AS) $(ASFLAGS) -o $@ -
else
@$(CPP) $(CPPFLAGS) $< -o $(C_BUILDDIR)/$*.i
@$(PREPROC) $(C_BUILDDIR)/$*.i charmap.txt | $(CC1) $(CFLAGS) -o $(C_BUILDDIR)/$*.s
@ -396,7 +396,7 @@ define C_DEP
$1: $2 $$(shell $(SCANINC) -I include -I tools/agbcc/include -I gflib $2)
ifeq (,$$(KEEP_TEMPS))
@echo "$$(CC1) <flags> -o $$@ $$<"
@$$(CPP) $$(CPPFLAGS) $$< | $$(PREPROC) $$< charmap.txt -i | $$(CC1) $$(CFLAGS) -o - - | cat - <(echo -e ".text\n\t.align\t2, 0") | $$(AS) $$(ASFLAGS) -o $$@ -
@$$(CPP) $$(CPPFLAGS) $$< | $$(PREPROC) -i $$< charmap.txt | $$(CC1) $$(CFLAGS) -o - - | cat - <(echo -e ".text\n\t.align\t2, 0") | $$(AS) $$(ASFLAGS) -o $$@ -
else
@$$(CPP) $$(CPPFLAGS) $$< -o $$(C_BUILDDIR)/$3.i
@$$(PREPROC) $$(C_BUILDDIR)/$3.i charmap.txt | $$(CC1) $$(CFLAGS) -o $$(C_BUILDDIR)/$3.s
@ -411,7 +411,7 @@ ifeq ($(NODEP),1)
$(GFLIB_BUILDDIR)/%.o: $(GFLIB_SUBDIR)/%.c $$(c_dep)
ifeq (,$(KEEP_TEMPS))
@echo "$(CC1) <flags> -o $@ $<"
@$(CPP) $(CPPFLAGS) $< | $(PREPROC) $< charmap.txt -i | $(CC1) $(CFLAGS) -o - - | cat - <(echo -e ".text\n\t.align\t2, 0") | $(AS) $(ASFLAGS) -o $@ -
@$(CPP) $(CPPFLAGS) $< | $(PREPROC) -i $< charmap.txt | $(CC1) $(CFLAGS) -o - - | cat - <(echo -e ".text\n\t.align\t2, 0") | $(AS) $(ASFLAGS) -o $@ -
else
@$(CPP) $(CPPFLAGS) $< -o $(GFLIB_BUILDDIR)/$*.i
@$(PREPROC) $(GFLIB_BUILDDIR)/$*.i charmap.txt | $(CC1) $(CFLAGS) -o $(GFLIB_BUILDDIR)/$*.s
@ -423,7 +423,7 @@ define GFLIB_DEP
$1: $2 $$(shell $(SCANINC) -I include -I tools/agbcc/include -I gflib $2)
ifeq (,$$(KEEP_TEMPS))
@echo "$$(CC1) <flags> -o $$@ $$<"
@$$(CPP) $$(CPPFLAGS) $$< | $$(PREPROC) $$< charmap.txt -i | $$(CC1) $$(CFLAGS) -o - - | cat - <(echo -e ".text\n\t.align\t2, 0") | $$(AS) $$(ASFLAGS) -o $$@ -
@$$(CPP) $$(CPPFLAGS) $$< | $$(PREPROC) -i $$< charmap.txt | $$(CC1) $$(CFLAGS) -o - - | cat - <(echo -e ".text\n\t.align\t2, 0") | $$(AS) $$(ASFLAGS) -o $$@ -
else
@$$(CPP) $$(CPPFLAGS) $$< -o $$(GFLIB_BUILDDIR)/$3.i
@$$(PREPROC) $$(GFLIB_BUILDDIR)/$3.i charmap.txt | $$(CC1) $$(CFLAGS) -o $$(GFLIB_BUILDDIR)/$3.s
@ -436,11 +436,11 @@ endif
ifeq ($(NODEP),1)
$(C_BUILDDIR)/%.o: $(C_SUBDIR)/%.s
$(PREPROC) $< charmap.txt | $(CPP) -I include - | $(AS) $(ASFLAGS) -o $@
$(PREPROC) $< charmap.txt | $(CPP) -I include - | $(PREPROC) -i $$< charmap.txt | $(AS) $(ASFLAGS) -o $@
else
define SRC_ASM_DATA_DEP
$1: $2 $$(shell $(SCANINC) -I include -I "" $2)
$$(PREPROC) $$< charmap.txt | $$(CPP) -I include - | $$(AS) $$(ASFLAGS) -o $$@
$$(PREPROC) $$< charmap.txt | $$(CPP) -I include - | $$(PREPROC) -ie $$< charmap.txt | $$(AS) $$(ASFLAGS) -o $$@
endef
$(foreach src, $(C_ASM_SRCS), $(eval $(call SRC_ASM_DATA_DEP,$(patsubst $(C_SUBDIR)/%.s,$(C_BUILDDIR)/%.o, $(src)),$(src))))
endif
@ -458,7 +458,7 @@ endif
ifeq ($(NODEP),1)
$(DATA_ASM_BUILDDIR)/%.o: $(DATA_ASM_SUBDIR)/%.s
$(PREPROC) $< charmap.txt | $(CPP) -I include - | $(AS) $(ASFLAGS) -o $@
$(PREPROC) $< charmap.txt | $(CPP) -I include - | $(PREPROC) -ie $$< charmap.txt | $(AS) $(ASFLAGS) -o $@
else
$(foreach src, $(REGULAR_DATA_ASM_SRCS), $(eval $(call SRC_ASM_DATA_DEP,$(patsubst $(DATA_ASM_SUBDIR)/%.s,$(DATA_ASM_BUILDDIR)/%.o, $(src)),$(src))))
endif
@ -484,7 +484,7 @@ $(DATA_SRC_SUBDIR)/pokemon/teachable_learnsets.h: $(DATA_ASM_BUILDDIR)/event_scr
define TEST_DEP
$1: $2 $$(shell $(SCANINC) -I include -I tools/agbcc/include -I gflib $2)
@echo "$$(CC1) <flags> -o $$@ $$<"
@$$(CPP) $$(CPPFLAGS) $$< | $$(PREPROC) $$< charmap.txt -i | $$(CC1) $$(CFLAGS) -o - - | cat - <(echo -e ".text\n\t.align\t2, 0") | $$(AS) $$(ASFLAGS) -o $$@ -
@$$(CPP) $$(CPPFLAGS) $$< | $$(PREPROC) -i $$< charmap.txt | $$(CC1) $$(CFLAGS) -o - - | cat - <(echo -e ".text\n\t.align\t2, 0") | $$(AS) $$(ASFLAGS) -o $$@ -
endef
$(foreach src, $(TEST_SRCS), $(eval $(call TEST_DEP,$(patsubst $(TEST_SUBDIR)/%.c,$(TEST_BUILDDIR)/%.o,$(src)),$(src),$(patsubst $(TEST_SUBDIR)/%.c,%,$(src)))))
@ -509,7 +509,12 @@ $(ROM): $(ELF)
$(OBJCOPY) -O binary $< $@
$(FIX) $@ -p --silent
agbcc: all
# Uncomment the next line, and then comment the 4 lines after it to reenable agbcc.
#agbcc: all
agbcc:
@echo "'make agbcc' is deprecated as of pokeemerald-expansion 1.9 and will be removed in 1.10."
@echo "Search for 'agbcc: all' in Makefile to reenable agbcc."
@exit 1
modern: all

View File

@ -9,7 +9,7 @@ pokeemerald-expansion is a decomp hack base project based off pret's [pokeemeral
If you use pokeemerald-expansion in your hack, please add RHH (Rom Hacking Hideout) to your credits list. Optionally, you can list the version used, so it can help players know what features to expect.
You can phrase it as the following:
```
Based off RHH's pokeemerald-expansion v1.8.0 https://github.com/rh-hideout/pokeemerald-expansion/
Based off RHH's pokeemerald-expansion 1.9.0 https://github.com/rh-hideout/pokeemerald-expansion/
```
## What features are included?

View File

@ -315,8 +315,14 @@
.Lsprite_\@_2:
.endm
.macro createdragondartsprite anim_battler:req, subpriority_offset:req, argv:vararg
.macro jumpifmovetypeequal type:req, jumpInstr:req
.byte 0x33
.byte \type
.4byte \jumpInstr
.endm
.macro createdragondartsprite anim_battler:req, subpriority_offset:req, argv:vararg
.byte 0x34
.if \anim_battler == ANIM_TARGET
.byte ANIMSPRITE_IS_TARGET | (\subpriority_offset & 0x7F)
.else

View File

@ -838,7 +838,7 @@
.byte 0x95
.endm
.macro weatherdamage
.macro unused_96
.byte 0x96
.endm
@ -1359,15 +1359,15 @@
.macro restoretarget
callnative BS_RestoreTarget
.endm
.macro saveattacker
callnative BS_SaveAttacker
.endm
.macro restoreattacker
callnative BS_RestoreAttacker
.endm
.macro metalburstdamagecalculator failInstr:req
callnative BS_CalcMetalBurstDmg
.4byte \failInstr
@ -1520,18 +1520,10 @@
.4byte \jumpInstr
.endm
.macro jumpifrodaffected battler:req, jumpInstr:req
callnative BS_JumpIfRod
.4byte \jumpInstr
.endm
.macro jumpifabsorbaffected battler:req, jumpInstr:req
callnative BS_JumpIfAbsorb
.4byte \jumpInstr
.endm
.macro jumpifmotoraffected battler:req, jumpInstr:req
callnative BS_JumpIfMotor
.macro jumpifelectricabilityaffected battler:req, ability:req, jumpInstr:req
callnative BS_JumpIfElectricAbilityAffected
.byte \battler
.2byte \ability
.4byte \jumpInstr
.endm
@ -1568,10 +1560,6 @@
.4byte \failInstr
.endm
.macro damagenontypes
callnative BS_DamageNonTypes
.endm
.macro trysetstatus1, ptr:req
callnative BS_TrySetStatus1
.4byte \ptr
@ -1664,14 +1652,24 @@
.4byte \failInstr
.endm
.macro copyfoesstatincrease battler:req, failInstr:req
callnative BS_CopyFoesStatIncrease
.byte \battler
.4byte \failInstr
.endm
.macro removeweather
callnative BS_RemoveWeather
.endm
.macro applyterastallization
callnative BS_ApplyTerastallization
.endm
.macro damagetoquartertargethp
callnative BS_DamageToQuarterTargetHP
.endm
@ various command changed to more readable macros
.macro cancelmultiturnmoves battler:req
various \battler, VARIOUS_CANCEL_MULTI_TURN_MOVES

View File

@ -1055,7 +1055,7 @@
.endm
@ creates a mon for a given party and slot
@ otherwise
@ otherwise
.macro createmon side:req, slot:req, species:req, level:req, item, ball, nature, abilityNum, gender, hpEv, atkEv, defEv, speedEv, spAtkEv, spDefEv, hpIv, atkIv, defIv, speedIv, spAtkIv, spDefIv, move1, move2, move3, move4, isShiny, ggMaxFactor, teraType
callnative ScrCmd_createmon
.byte \side @ 0 - player, 1 - opponent
@ -2095,6 +2095,11 @@
special CreateEnemyEventMon
.endm
.macro setdynamicaifunc func:req
callnative ScriptSetDynamicAiFunc
.4byte \func
.endm
@ Set up a totem boost for the next battle.
@ 'battler' is the position of the mon you want to gain a boost. see B_POSITION_xx in include/constants/battle.h.
@ The rest of the arguments are the stat change values to each stat.
@ -2295,9 +2300,24 @@
.byte \sourceId
.byte \targetId
.endm
@ set the wild double battle flag
@ can be used in conjunection with createmon to set up a wild battle with 2 player mons vs. 1 enemy mon
.macro setwilddoubleflag
callnative ScriptSetDoubleBattleFlag
.endm
@ When OW_USE_FAKE_RTC and OW_FLAG_PAUSE_TIME is assigned, this macro will stop the flow of time.
.macro pausefakertc
callnative Script_PauseFakeRtc
.endm
@ When OW_USE_FAKE_RTC and OW_FLAG_PAUSE_TIME is assigned, this macro will resume the flow of time.
.macro resumefakertc
callnative Script_ResumeFakeRtc
.endm
@ When OW_USE_FAKE_RTC and OW_FLAG_PAUSE_TIME is assigned, this macro will resume the flow of time if paused, and stop the flow of time otherwise.
.macro togglefakertc
callnative Script_ToggleFakeRtc
.endm

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
if [[ -d "$DEVKITARM/bin/" ]]; then
OBJDUMP_BIN="$DEVKITARM/bin/arm-none-eabi-objdump"

View File

@ -85,6 +85,7 @@ gBattleAnims_General::
.4byte General_Fog @ B_ANIM_FOG_CONTINUES
.4byte General_TeraCharge @ B_ANIM_TERA_CHARGE
.4byte General_TeraActivate @ B_ANIM_TERA_ACTIVATE
.4byte General_SimpleHeal @ B_ANIM_SIMPLE_HEAL
.align 2
gBattleAnims_Special::
@ -16899,6 +16900,59 @@ ElectroShotUnleash:
blendoff
end
Move_IVY_CUDGEL::
loadspritegfx ANIM_TAG_IVY_CUDGEL_GRASS
loadspritegfx ANIM_TAG_WOOD_HAMMER
loadspritegfx ANIM_TAG_WOOD_HAMMER_HAMMER
loadspritegfx ANIM_TAG_IMPACT
playsewithpan SE_M_SWAGGER, SOUND_PAN_ATTACKER
createvisualtask AnimTask_TranslateMonEllipticalRespectSide, 2, ANIM_ATTACKER, 12, 4, 2, 4
jumpifmovetypeequal TYPE_FIRE, IvyCudgelFire
jumpifmovetypeequal TYPE_ROCK, IvyCudgelRock
jumpifmovetypeequal TYPE_WATER, IvyCudgelWater
createsprite gIvyCudgelSpriteTemplate, ANIM_TARGET, 2
delay 60
createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_ATTACKER, 3, 0, 12, 4
delay 18
createvisualtask AnimTask_SquishTarget, 0x2
delay 6
call WoodHammerImpact
waitforvisualfinish
end
IvyCudgelFire:
loadspritegfx ANIM_TAG_IVY_CUDGEL_FIRE
createsprite gIvyCudgelFireSpriteTemplate, ANIM_TARGET, 2
delay 60
createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_ATTACKER, 3, 0, 12, 4
delay 18
createvisualtask AnimTask_SquishTarget, 0x2
delay 6
call WoodHammerImpact
waitforvisualfinish
end
IvyCudgelRock:
loadspritegfx ANIM_TAG_IVY_CUDGEL_ROCK
createsprite gIvyCudgelRockSpriteTemplate, ANIM_TARGET, 2
delay 60
createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_ATTACKER, 3, 0, 12, 4
delay 18
createvisualtask AnimTask_SquishTarget, 0x2
delay 6
call WoodHammerImpact
waitforvisualfinish
end
IvyCudgelWater:
loadspritegfx ANIM_TAG_IVY_CUDGEL_WATER
createsprite gIvyCudgelWaterSpriteTemplate, ANIM_TARGET, 2
delay 60
createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_ATTACKER, 3, 0, 12, 4
delay 18
createvisualtask AnimTask_SquishTarget, 0x2
delay 6
call WoodHammerImpact
waitforvisualfinish
end
Move_SPICY_EXTRACT::
loadspritegfx ANIM_TAG_SMALL_EMBER
loadspritegfx ANIM_TAG_POISON_BUBBLE
@ -16944,8 +16998,22 @@ Move_SPICY_EXTRACT::
waitforvisualfinish
end
Move_TERA_BLAST::
Move_AXE_KICK::
loadspritegfx ANIM_TAG_HANDS_AND_FEET
loadspritegfx ANIM_TAG_IMPACT
playsewithpan SE_M_JUMP_KICK, SOUND_PAN_ATTACKER
createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, 0, 20, 0, 0, 4
delay 7
createsprite gAxeKickSpriteTemplate, ANIM_TARGET, 3
delay 2
playsewithpan SE_M_COMET_PUNCH, SOUND_PAN_TARGET
createsprite gBasicHitSplatSpriteTemplate, ANIM_ATTACKER, 1, 0, 0, ANIM_TARGET, 1
createvisualtask AnimTask_SquishTargetShort, 2
waitforvisualfinish
createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, 0, 1, 4
end
Move_TERA_BLAST::
Move_ORDER_UP::
Move_SPIN_OUT::
Move_POPULATION_BOMB::
@ -16974,7 +17042,6 @@ Move_MAGICAL_TORQUE::
Move_PSYBLADE::
Move_BLOOD_MOON::
Move_MATCHA_GOTCHA::
Move_IVY_CUDGEL::
Move_TERA_STARSTORM::
Move_FICKLE_BEAM::
Move_THUNDERCLAP::
@ -27347,6 +27414,12 @@ General_WishHeal:
createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, F_PAL_BG, 3, 10, 0, RGB_BLACK
end
General_SimpleHeal:
loadspritegfx ANIM_TAG_BLUE_STAR
call HealingEffect
waitforvisualfinish
end
General_IllusionOff:
monbg ANIM_TARGET
createvisualtask AnimTask_TransformMon, 2, 1, 0

View File

@ -20,6 +20,16 @@
.section script_data, "aw", %progbits
BattleScript_DamageToQuarterTargetHP::
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
typecalc
bichalfword gMoveResultFlags, MOVE_RESULT_SUPER_EFFECTIVE | MOVE_RESULT_NOT_VERY_EFFECTIVE
damagetoquartertargethp
goto BattleScript_HitFromAtkAnimation
BattleScript_Terastallization::
@ TODO: no string prints in S/V, but right now this helps with clarity
printstring STRINGID_PKMNSTORINGENERGY
@ -517,9 +527,9 @@ BattleScript_EffectTeatime::
waitanimation
setbyte gBattlerTarget, 0
BattleScript_TeatimeLoop:
jumpifrodaffected BS_TARGET, BattleScript_Teatimerod
jumpifabsorbaffected BS_TARGET, BattleScript_Teatimesorb
jumpifmotoraffected BS_TARGET, BattleScript_Teatimemotor
jumpifelectricabilityaffected BS_TARGET, ABILITY_LIGHTNING_ROD, BattleScript_Teatimerod
jumpifelectricabilityaffected BS_TARGET, ABILITY_VOLT_ABSORB, BattleScript_Teatimesorb
jumpifelectricabilityaffected BS_TARGET, ABILITY_MOTOR_DRIVE, BattleScript_Teatimemotor
jumpifteainvulnerable BS_TARGET, BattleScript_Teatimevul @ in semi-invulnerable state OR held item is not a Berry
orword gHitMarker, HITMARKER_DISABLE_ANIMATION | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_IGNORE_DISGUISE
setbyte sBERRY_OVERRIDE, TRUE @ override the requirements for eating berries
@ -843,13 +853,11 @@ BattleScript_OctolockEndTurn::
playstatchangeanimation BS_ATTACKER, BIT_DEF | BIT_SPDEF, STAT_CHANGE_NEGATIVE
setstatchanger STAT_DEF, 1, TRUE
statbuffchange STAT_CHANGE_ALLOW_PTR | STAT_CHANGE_NOT_PROTECT_AFFECTED, BattleScript_OctolockTryLowerSpDef
BattleScript_OctolockTryLowerDef:
printfromtable gStatDownStringIds
waitmessage B_WAIT_TIME_LONG
BattleScript_OctolockTryLowerSpDef:
setstatchanger STAT_SPDEF, 1, TRUE
statbuffchange STAT_CHANGE_ALLOW_PTR | STAT_CHANGE_NOT_PROTECT_AFFECTED, BattleScript_OctlockTurnDmgEnd
BattleScript_OctolockTurnDmgPrintMsg:
printfromtable gStatDownStringIds
waitmessage B_WAIT_TIME_LONG
BattleScript_OctlockTurnDmgEnd:
@ -989,7 +997,6 @@ BattleScript_EffectStuffCheeks::
jumpifnotberry BS_ATTACKER, BattleScript_ButItFailed
attackanimation
waitanimation
BattleScript_StuffCheeksEatBerry:
setbyte sBERRY_OVERRIDE, 1
orword gHitMarker, HITMARKER_DISABLE_ANIMATION
consumeberry BS_ATTACKER, TRUE
@ -1201,10 +1208,6 @@ BattleScript_StrengthSapLower:
waitmessage B_WAIT_TIME_LONG
goto BattleScript_StrengthSapHp
@ Drain HP without lowering a stat
BattleScript_StrengthSapTryHp:
jumpiffullhp BS_ATTACKER, BattleScript_ButItFailed
attackanimation
waitanimation
BattleScript_StrengthSapHp:
jumpifability BS_TARGET, ABILITY_LIQUID_OOZE, BattleScript_StrengthSapManipulateDmg
jumpifstatus3 BS_ATTACKER, STATUS3_HEAL_BLOCK, BattleScript_MoveEnd
@ -1335,8 +1338,6 @@ BattleScript_EffectPartingShotTrySpAtk:
BattleScript_EffectPartingShotSwitch:
moveendall
goto BattleScript_MoveSwitch
BattleScript_PartingShotEnd:
end
BattleScript_EffectPowder::
attackcanceler
@ -1539,7 +1540,6 @@ BattleScript_RototillerLoop:
jumpifstat BS_TARGET, CMP_EQUAL, STAT_SPATK, MAX_STAT_STAGE, BattleScript_RototillerCantRaiseMultipleStats
BattleScript_RototillerCheckAffected:
jumpifnotrototilleraffected BS_TARGET, BattleScript_RototillerNoEffect
BattleScript_RototillerAffected:
setbyte sSTAT_ANIM_PLAYED, FALSE
playstatchangeanimation BS_TARGET, BIT_ATK | BIT_SPATK, 0
setstatchanger STAT_ATK, 1, FALSE
@ -1604,6 +1604,7 @@ BattleScript_MoveEffectFlameBurst::
waitmessage B_WAIT_TIME_LONG
savetarget
copybyte gBattlerTarget, sSAVED_BATTLER
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE
healthbarupdate BS_TARGET
datahpupdate BS_TARGET
tryfaintmon BS_TARGET
@ -1769,7 +1770,6 @@ BattleScript_EffectAutotomize::
BattleScript_AutotomizeAttackAnim::
attackanimation
waitanimation
BattleScript_AutotomizeDoAnim::
setgraphicalstatchangevalues
playanimation BS_ATTACKER, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
BattleScript_AutotomizePrintString::
@ -2680,7 +2680,6 @@ BattleScript_TryTailwindAbilitiesLoop_Iter:
BattleScript_TryTailwindAbilitiesLoop_Increment:
addbyte gBattlerTarget, 0x1
jumpifbytenotequal gBattlerTarget, gBattlersCount, BattleScript_TryTailwindAbilitiesLoop_Iter
BattleScript_TryTailwindAbilitiesLoop_Ret:
restoretarget
return
@ -2781,7 +2780,6 @@ BattleScript_EffectPlaceholder::
goto BattleScript_MoveEnd
BattleScript_EffectHit::
BattleScript_HitFromAtkCanceler::
attackcanceler
BattleScript_HitFromAccCheck::
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
@ -3274,14 +3272,6 @@ BattleScript_RoarBlockedByDynamax:
waitmessage B_WAIT_TIME_LONG
goto BattleScript_MoveEnd
BattleScript_EffectMultiHit::
attackcanceler
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
setmultihitcounter 0
initmultihitstring
sethword sMULTIHIT_EFFECT, 0
BattleScript_MultiHitLoop::
jumpifhasnohp BS_ATTACKER, BattleScript_MultiHitEnd
jumpifhasnohp BS_TARGET, BattleScript_MultiHitPrintStrings
@ -3694,10 +3684,9 @@ BattleScript_EffectParalyze::
jumpifshieldsdown BS_TARGET, BattleScript_AbilityProtectsDoesntAffect
jumpifsubstituteblocks BattleScript_ButItFailed
typecalc
BattleScript_BattleScript_EffectParalyzeNoTypeCalc:
jumpifmovehadnoeffect BattleScript_ButItFailed
jumpifstatus BS_TARGET, STATUS1_PARALYSIS, BattleScript_AlreadyParalyzed
jumpifabsorbaffected BS_TARGET, BattleScript_VoltAbsorbHeal
jumpifelectricabilityaffected BS_TARGET, ABILITY_VOLT_ABSORB, BattleScript_VoltAbsorbHeal
tryparalyzetype BS_ATTACKER, BS_TARGET, BattleScript_NotAffected
jumpifstatus BS_TARGET, STATUS1_ANY, BattleScript_ButItFailed
jumpifterrainaffected BS_TARGET, STATUS_FIELD_MISTY_TERRAIN, BattleScript_MistyTerrainPrevents
@ -4621,7 +4610,6 @@ BattleScript_EffectTeleport::
.else
jumpifbattletype BATTLE_TYPE_TRAINER, BattleScript_FailedFromAtkCanceler
.endif
BattleScript_EffectTeleportTryToRunAway:
attackcanceler
attackstring
ppreduce
@ -5496,7 +5484,7 @@ BattleScript_GiveExp::
BattleScript_HandleFaintedMon::
setbyte sSHIFT_SWITCHED, 0
checkteamslost BattleScript_LinkHandleFaintedMonMultiple
checkteamslost BattleScript_HandleFaintedMonMultiple
jumpifbyte CMP_NOT_EQUAL, gBattleOutcome, 0, BattleScript_FaintedMonEnd
jumpifbattletype BATTLE_TYPE_TRAINER | BATTLE_TYPE_DOUBLE, BattleScript_FaintedMonTryChoose
jumpifword CMP_NO_COMMON_BITS, gHitMarker, HITMARKER_PLAYER_FAINTED, BattleScript_FaintedMonTryChoose
@ -5577,13 +5565,13 @@ BattleScript_FaintedMonShiftSwitched:
copybyte gBattlerTarget, sSAVED_BATTLER
goto BattleScript_FaintedMonSendOutNewEnd
BattleScript_LinkHandleFaintedMonMultiple::
openpartyscreen BS_FAINTED_LINK_MULTIPLE_1, BattleScript_LinkHandleFaintedMonMultipleStart
BattleScript_LinkHandleFaintedMonMultipleStart::
BattleScript_HandleFaintedMonMultiple::
openpartyscreen BS_FAINTED_MULTIPLE_1, BattleScript_HandleFaintedMonMultipleStart
BattleScript_HandleFaintedMonMultipleStart::
switchhandleorder BS_FAINTED, 0
openpartyscreen BS_FAINTED_LINK_MULTIPLE_2, BattleScript_LinkHandleFaintedMonMultipleEnd
openpartyscreen BS_FAINTED_MULTIPLE_2, BattleScript_HandleFaintedMonMultipleEnd
switchhandleorder BS_FAINTED, 0
BattleScript_LinkHandleFaintedMonLoop::
BattleScript_HandleFaintedMonLoop::
switchhandleorder BS_FAINTED, 3
drawpartystatussummary BS_FAINTED
getswitchedmondata BS_FAINTED
@ -5595,9 +5583,10 @@ BattleScript_LinkHandleFaintedMonLoop::
hidepartystatussummary BS_FAINTED
switchinanim BS_FAINTED, FALSE
waitstate
switchineffects BS_FAINTED_LINK_MULTIPLE_1
jumpifbytenotequal gBattlerFainted, gBattlersCount, BattleScript_LinkHandleFaintedMonLoop
BattleScript_LinkHandleFaintedMonMultipleEnd::
switchineffects BS_FAINTED_MULTIPLE_1
jumpifbytenotequal gBattlerFainted, gBattlersCount, BattleScript_HandleFaintedMonLoop
BattleScript_HandleFaintedMonMultipleEnd::
switchineffects BS_FAINTED_MULTIPLE_2
end2
BattleScript_LocalTrainerBattleWon::
@ -5909,33 +5898,22 @@ BattleScript_DamagingWeatherContinues::
waitmessage B_WAIT_TIME_LONG
playanimation_var BS_ATTACKER, sB_ANIM_ARG1
setbyte gBattleCommunication, 0
BattleScript_DamagingWeatherLoop::
copyarraywithindex gBattlerAttacker, gBattlerByTurnOrder, gBattleCommunication, 1
weatherdamage
jumpifword CMP_EQUAL, gBattleMoveDamage, 0, BattleScript_DamagingWeatherLoopIncrement
jumpifword CMP_COMMON_BITS gBattleMoveDamage, 1 << 31, BattleScript_DamagingWeatherHeal
end2
BattleScript_DamagingWeather::
printfromtable gSandStormHailDmgStringIds
waitmessage B_WAIT_TIME_LONG
effectivenesssound
hitanimation BS_ATTACKER
goto BattleScript_DamagingWeatherHpChange
BattleScript_DamagingWeatherHeal:
call BattleScript_AbilityPopUp
hitanimation BS_SCRIPTING
goto BattleScript_DoTurnDmg
BattleScript_IceBodyHeal::
call BattleScript_AbilityPopUpScripting
playanimation BS_SCRIPTING, B_ANIM_SIMPLE_HEAL
healthbarupdate BS_SCRIPTING
datahpupdate BS_SCRIPTING
printstring STRINGID_ICEBODYHPGAIN
waitmessage B_WAIT_TIME_LONG
BattleScript_DamagingWeatherHpChange:
orword gHitMarker, HITMARKER_IGNORE_BIDE | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE | HITMARKER_GRUDGE
healthbarupdate BS_ATTACKER
datahpupdate BS_ATTACKER
tryfaintmon BS_ATTACKER
checkteamslost BattleScript_DamagingWeatherLoopIncrement
BattleScript_DamagingWeatherLoopIncrement::
jumpifbyte CMP_NOT_EQUAL, gBattleOutcome, 0, BattleScript_DamagingWeatherContinuesEnd
addbyte gBattleCommunication, 1
jumpifbytenotequal gBattleCommunication, gBattlersCount, BattleScript_DamagingWeatherLoop
BattleScript_DamagingWeatherContinuesEnd::
bicword gHitMarker, HITMARKER_IGNORE_BIDE | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE | HITMARKER_GRUDGE
call BattleScript_ActivateWeatherAbilities
end2
BattleScript_SandStormHailSnowEnds::
@ -6036,6 +6014,10 @@ BattleScript_MagicRoomEnds::
waitmessage B_WAIT_TIME_LONG
end2
BattleScript_GrassyTerrainEnds::
call BattleScript_GrassyTerrainHeals_Ret
goto BattleScript_TerrainEnds
BattleScript_TerrainEnds_Ret::
printfromtable gTerrainStringIds
waitmessage B_WAIT_TIME_LONG
@ -6496,7 +6478,6 @@ BattleScript_WindPowerActivates::
setcharge BS_TARGET
printstring STRINGID_BEINGHITCHARGEDPKMNWITHPOWER
waitmessage B_WAIT_TIME_LONG
BattleScript_WindPowerActivates_Ret:
return
BattleScript_ToxicDebrisActivates::
@ -6528,6 +6509,9 @@ BattleScript_PerishSongCountGoesDown::
waitmessage B_WAIT_TIME_LONG
end2
BattleScript_AllStatsUpZMove::
printfromtable gZEffectStringIds
waitmessage B_WAIT_TIME_LONG
BattleScript_AllStatsUp::
jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_ATK, MAX_STAT_STAGE, BattleScript_AllStatsUpAtk
jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_DEF, MAX_STAT_STAGE, BattleScript_AllStatsUpAtk
@ -6986,13 +6970,13 @@ BattleScript_MegaEvolution::
BattleScript_MegaEvolutionAfterString:
waitmessage B_WAIT_TIME_LONG
setbyte gIsCriticalHit, 0
handlemegaevo BS_ATTACKER, 0
playanimation BS_ATTACKER, B_ANIM_MEGA_EVOLUTION
handlemegaevo BS_SCRIPTING, 0
playanimation BS_SCRIPTING, B_ANIM_MEGA_EVOLUTION
waitanimation
handlemegaevo BS_ATTACKER, 1
handlemegaevo BS_SCRIPTING, 1
printstring STRINGID_MEGAEVOEVOLVED
waitmessage B_WAIT_TIME_LONG
switchinabilities BS_ATTACKER
switchinabilities BS_SCRIPTING
end3
BattleScript_WishMegaEvolution::
@ -7029,13 +7013,13 @@ BattleScript_UltraBurst::
printstring STRINGID_ULTRABURSTREACTING
waitmessage B_WAIT_TIME_LONG
setbyte gIsCriticalHit, 0
handleultraburst BS_ATTACKER, 0
playanimation BS_ATTACKER, B_ANIM_ULTRA_BURST
handleultraburst BS_SCRIPTING, 0
playanimation BS_SCRIPTING, B_ANIM_ULTRA_BURST
waitanimation
handleultraburst BS_ATTACKER, 1
handleultraburst BS_SCRIPTING, 1
printstring STRINGID_ULTRABURSTCOMPLETED
waitmessage B_WAIT_TIME_LONG
switchinabilities BS_ATTACKER
switchinabilities BS_SCRIPTING
end3
BattleScript_GulpMissileFormChange::
@ -7195,7 +7179,6 @@ BattleScript_CottonDownTargetSpeedCantGoLower:
BattleScript_CottonDownLoopIncrement:
addbyte gBattlerTarget, 1
jumpifbytenotequal gBattlerTarget, gBattlersCount, BattleScript_CottonDownLoop
BattleScript_CottonDownReturn:
swapattackerwithtarget
copybyte gBattlerAttacker, sSAVED_BATTLER
return
@ -7814,7 +7797,6 @@ BattleScript_ActivateWeatherAbilities:
BattleScript_ActivateWeatherAbilities_Loop:
copybyte sBATTLER, gBattlerTarget
activateweatherchangeabilities BS_TARGET
BattleScript_ActivateWeatherAbilities_Increment:
addbyte gBattlerTarget, 1
jumpifbytenotequal gBattlerTarget, gBattlersCount, BattleScript_ActivateWeatherAbilities_Loop
restoretarget
@ -7873,7 +7855,6 @@ BattleScript_IntimidateEffect_WaitString:
BattleScript_IntimidateLoopIncrement:
addbyte gBattlerTarget, 1
jumpifbytenotequal gBattlerTarget, gBattlersCount, BattleScript_IntimidateLoop
BattleScript_IntimidateEnd:
copybyte sBATTLER, gBattlerAttacker
destroyabilitypopup
restoretarget
@ -7939,7 +7920,6 @@ BattleScript_SupersweetSyrupEffect_WaitString:
BattleScript_SupersweetSyrupLoopIncrement:
addbyte gBattlerTarget, 1
jumpifbytenotequal gBattlerTarget, gBattlersCount, BattleScript_SupersweetSyrupLoop
BattleScript_SupersweetSyrupEnd:
copybyte sBATTLER, gBattlerAttacker
destroyabilitypopup
restoretarget
@ -8098,7 +8078,6 @@ BattleScript_ActivateTerrainSeed:
removeitem BS_TARGET
BattleScript_ActivateTerrainAbility:
activateterrainchangeabilities BS_TARGET
BattleScript_ActivateTerrainEffects_Increment:
addbyte gBattlerTarget, 0x1
jumpifbytenotequal gBattlerTarget, gBattlersCount, BattleScript_ActivateTerrainSeed
restoretarget
@ -8344,29 +8323,30 @@ BattleScript_MoveUsedPsychicTerrainPrevents::
goto BattleScript_MoveEnd
BattleScript_GrassyTerrainHeals::
call BattleScript_GrassyTerrainHeals_Ret
end2
BattleScript_GrassyTerrainHeals_Ret::
setbyte gBattleCommunication, 0
BattleScript_GrassyTerrainLoop:
copyarraywithindex gBattlerAttacker, gBattlerByTurnOrder, gBattleCommunication, 1
checkgrassyterrainheal BS_ATTACKER, BattleScript_GrassyTerrainLoopIncrement
printstring STRINGID_GRASSYTERRAINHEALS
waitmessage B_WAIT_TIME_LONG
BattleScript_GrassyTerrainHpChange:
orword gHitMarker, HITMARKER_IGNORE_BIDE | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE
healthbarupdate BS_ATTACKER
datahpupdate BS_ATTACKER
BattleScript_GrassyTerrainLoopIncrement::
addbyte gBattleCommunication, 1
jumpifbytenotequal gBattleCommunication, gBattlersCount, BattleScript_GrassyTerrainLoop
BattleScript_GrassyTerrainLoopEnd::
bicword gHitMarker, HITMARKER_IGNORE_BIDE | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE
jumpifword CMP_COMMON_BITS, gFieldStatuses, STATUS_FIELD_TERRAIN_PERMANENT, BattleScript_GrassyTerrainHealEnd
BattleScript_GrassyTerrainHealEnd:
end2
return
BattleScript_AbilityNoSpecificStatLoss::
pause B_WAIT_TIME_SHORT
call BattleScript_AbilityPopUp
BattleScript_AbilityNoSpecificStatLossPrint:
printstring STRINGID_PKMNSXPREVENTSYLOSS
waitmessage B_WAIT_TIME_LONG
setbyte cMULTISTRING_CHOOSER, B_MSG_STAT_FELL_EMPTY
@ -8702,7 +8682,7 @@ BattleScript_SynchronizeActivates::
return
BattleScript_NoItemSteal::
pause B_WAIT_TIME_SHORT
call BattleScript_AbilityPopUpTarget
printstring STRINGID_PKMNSXMADEYINEFFECTIVE
waitmessage B_WAIT_TIME_LONG
return
@ -9153,16 +9133,6 @@ BattleScript_ArenaTurnBeginning::
volumeup
end2
@ Unused
BattleScript_ArenaNothingDecided::
playse SE_DING_DONG
arenadrawreftextbox
arenajudgmentstring B_MSG_REF_NOTHING_IS_DECIDED
arenawaitmessage B_MSG_REF_NOTHING_IS_DECIDED
pause B_WAIT_TIME_LONG
arenaerasereftextbox
end2
BattleScript_ArenaDoJudgment::
makevisible BS_PLAYER1
waitstate
@ -9262,7 +9232,6 @@ BattleScript_TotemFlaredToLife::
call BattleScript_ApplyTotemVarBoost
end2
@ remove the mirror herb, do totem loop
BattleScript_MirrorHerbCopyStatChangeEnd2::
call BattleScript_MirrorHerbCopyStatChange
end2
@ -9272,16 +9241,24 @@ BattleScript_MirrorHerbCopyStatChange::
printstring STRINGID_MIRRORHERBCOPIED
waitmessage B_WAIT_TIME_LONG
removeitem BS_SCRIPTING
call BattleScript_TotemVar_Ret
copybyte gBattlerAttacker, sSAVED_BATTLER @ restore the original attacker just to be safe
playanimation BS_SCRIPTING, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
BattleScript_MirrorHerbStartCopyStats:
copyfoesstatincrease BS_SCRIPTING, BattleScript_MirrorHerbStartReturn
statbuffchange STAT_CHANGE_ALLOW_PTR, BattleScript_MirrorHerbStartReturn
goto BattleScript_MirrorHerbStartCopyStats
BattleScript_MirrorHerbStartReturn:
return
BattleScript_OpportunistCopyStatChange::
call BattleScript_AbilityPopUp
printstring STRINGID_OPPORTUNISTCOPIED
call BattleScript_AbilityPopUpScripting
playanimation BS_SCRIPTING, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
BattleScript_OpportunistStartCopyStats:
copyfoesstatincrease BS_SCRIPTING, BattleScript_OpportunistCopyStatChangeEnd
statbuffchange STAT_CHANGE_ALLOW_PTR, BattleScript_OpportunistCopyStatChangeEnd
printfromtable gStatUpStringIds
waitmessage B_WAIT_TIME_LONG
call BattleScript_TotemVar_Ret
copybyte gBattlerAttacker, sSAVED_BATTLER @ restore the original attacker just to be safe
goto BattleScript_OpportunistStartCopyStats
BattleScript_OpportunistCopyStatChangeEnd:
end3
BattleScript_TotemVar::
@ -9455,7 +9432,6 @@ BattleScript_EffectExtremeEvoboost::
BattleScript_ExtremeEvoboostAnim:
attackanimation
waitanimation
BattleScript_ExtremeEvoboostAtk::
setbyte sSTAT_ANIM_PLAYED, FALSE
playstatchangeanimation BS_ATTACKER, BIT_ATK | BIT_DEF | BIT_SPEED | BIT_SPATK | BIT_SPDEF, 0x0
setstatchanger STAT_ATK, 2, FALSE
@ -9811,27 +9787,11 @@ BattleScript_DamageNonTypesStarts::
goto BattleScript_MoveEnd
BattleScript_DamageNonTypesContinues::
setbyte gBattleCommunication, 0
BattleScript_DamageNonTypesLoop::
copyarraywithindex gBattlerAttacker, gBattlerByTurnOrder, gBattleCommunication, 1
damagenontypes
jumpifword CMP_EQUAL, gBattleMoveDamage, 0, BattleScript_DamageNonTypesLoopIncrement
printfromtable gDamageNonTypesDmgStringIds
waitmessage B_WAIT_TIME_LONG
effectivenesssound
hitanimation BS_ATTACKER
orword gHitMarker, HITMARKER_IGNORE_BIDE | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE | HITMARKER_GRUDGE
healthbarupdate BS_ATTACKER
datahpupdate BS_ATTACKER
tryfaintmon BS_ATTACKER
checkteamslost BattleScript_DamageNonTypesLoopIncrement
BattleScript_DamageNonTypesLoopIncrement::
jumpifbyte CMP_NOT_EQUAL, gBattleOutcome, 0, BattleScript_DamageNonTypesContinuesEnd
addbyte gBattleCommunication, 1
jumpifbytenotequal gBattleCommunication, gBattlersCount, BattleScript_DamageNonTypesLoop
BattleScript_DamageNonTypesContinuesEnd::
bicword gHitMarker, HITMARKER_IGNORE_BIDE | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE | HITMARKER_GRUDGE
end2
hitanimation BS_SCRIPTING
goto BattleScript_DoTurnDmg
BattleScript_EffectTryReducePP::
tryspiteppreduce BattleScript_MoveEnd
@ -10029,7 +9989,6 @@ BattleScript_CouldntFullyProtect::
return
BattleScript_BerserkGeneRet::
BattleScript_BerserkGeneRet_Anim:
savetarget
copybyte gBattlerTarget, sBATTLER
statbuffchange STAT_CHANGE_ALLOW_PTR, BattleScript_BerserkGeneRet_TryConfuse

View File

@ -159,7 +159,6 @@ BattleScript_SafariBallThrow::
BattleScript_SuccessBallThrow::
setbyte sMON_CAUGHT, TRUE
incrementgamestat GAME_STAT_POKEMON_CAPTURES
BattleScript_PrintCaughtMonInfo::
printstring STRINGID_GOTCHAPKMNCAUGHTPLAYER
jumpifbyte CMP_NOT_EQUAL, sEXP_CATCH, TRUE, BattleScript_TryPrintCaughtMonInfo
setbyte sGIVEEXP_STATE, 0

View File

@ -587,6 +587,37 @@ EventScript_WhiteOut::
goto EventScript_ResetMrBriney
end
EventScript_AfterWhiteOutHeal::
lockall
msgbox gText_FirstShouldRestoreMonsHealth
call EventScript_PkmnCenterNurse_TakeAndHealPkmn
call_if_unset FLAG_DEFEATED_RUSTBORO_GYM, EventScript_AfterWhiteOutHealMsgPreRoxanne
call_if_set FLAG_DEFEATED_RUSTBORO_GYM, EventScript_AfterWhiteOutHealMsg
applymovement VAR_LAST_TALKED, Movement_PkmnCenterNurse_Bow
waitmovement 0
fadedefaultbgm
releaseall
end
EventScript_AfterWhiteOutHealMsgPreRoxanne::
msgbox gText_MonsHealedShouldBuyPotions
return
EventScript_AfterWhiteOutHealMsg::
msgbox gText_MonsHealed
return
EventScript_AfterWhiteOutMomHeal::
lockall
applymovement LOCALID_MOM, Common_Movement_WalkInPlaceFasterDown
waitmovement 0
msgbox gText_HadQuiteAnExperienceTakeRest
call Common_EventScript_OutOfCenterPartyHeal
msgbox gText_MomExplainHPGetPotions
fadedefaultbgm
releaseall
end
EventScript_ResetMrBriney::
goto_if_eq VAR_BRINEY_LOCATION, 1, EventScript_MoveMrBrineyToHouse
goto_if_eq VAR_BRINEY_LOCATION, 2, EventScript_MoveMrBrineyToDewford
@ -887,6 +918,48 @@ gText_PlayerWhitedOut::
.string "{PLAYER} is out of usable\n"
.string "POKéMON!\p{PLAYER} whited out!$"
gText_FirstShouldRestoreMonsHealth::
.string "First, you should restore your\n"
.string "POKéMON to full health.$"
gText_MonsHealedShouldBuyPotions::
.string "Your POKéMON have been healed\n"
.string "to perfect health.\p"
.string "If your POKéMON's energy, HP,\n"
.string "is down, please come see us.\p"
.string "If you're planning to go far in the\n"
.string "field, you should buy some POTIONS\l"
.string "at the POKéMON MART.\p"
.string "We hope you excel!$"
gText_MonsHealed::
.string "Your POKéMON have been healed\n"
.string "to perfect health.\p"
.string "We hope you excel!$"
gText_HadQuiteAnExperienceTakeRest::
.string "MOM: {PLAYER}!\n"
.string "Welcome home.\p"
.string "It sounds like you had quite\n"
.string "an experience.\p"
.string "Maybe you should take a quick\n"
.string "rest.$"
gText_MomExplainHPGetPotions::
.string "MOM: Oh, good! You and your\n"
.string "POKéMON are looking great.\p"
.string "I just heard from PROF. BIRCH.\p"
.string "He said that POKéMON's energy is\n"
.string "measured in HP.\p"
.string "If your POKéMON lose their HP,\n"
.string "you can restore them at any\l"
.string "POKéMON CENTER.\p"
.string "If you're going to travel far away,\n"
.string "the smart TRAINER stocks up on\l"
.string "POTIONS at the POKéMON MART.\p"
.string "Make me proud, honey!\p"
.string "Take care!$"
gText_RegisteredTrainerinPokeNav::
.string "Registered {STR_VAR_1} {STR_VAR_2}\n"
.string "in the POKéNAV.$"

View File

@ -439,4 +439,14 @@ Debug_EventScript_InflictStatus1_Text_Freeze:
Debug_EventScript_InflictStatus1_Text_Frostbite:
.string "Frostbite$"
Debug_EventScript_EWRAMCounters::
callnative CheckEWRAMCounters
msgbox Debug_EventScript_EWRAMCounters_Text, MSGBOX_DEFAULT
release
end
Debug_EventScript_EWRAMCounters_Text::
.string "Follower Steps: {STR_VAR_1}.\n"
.string "Fishing Chain: {STR_VAR_2}.$"
.endif

View File

@ -3,8 +3,13 @@
- [README](./README.md)
- [Installation](./INSTALL.md)
- [Setting up WSL1 (Legacy Portion)](./legacy_WSL1_INSTALL.md)
- [AI Flags](./ai_flags.md)
- [Changelog](./CHANGELOG.md)
- [1.9.x]()
- [Version 1.9.0](changelogs/1.9.x/1.9.0.md)
- [1.8.x]()
- [Version 1.8.6](changelogs/1.8.x/1.8.6.md)
- [Version 1.8.5](changelogs/1.8.x/1.8.5.md)
- [Version 1.8.4](changelogs/1.8.x/1.8.4.md)
- [Version 1.8.3](changelogs/1.8.x/1.8.3.md)
- [Version 1.8.2](changelogs/1.8.x/1.8.2.md)

154
docs/ai_flags.md Normal file
View File

@ -0,0 +1,154 @@
# What are AI Flags?
AI flags alter the behavior of AI controlled trainers. These flags affect what moves the AI chooses to use, what Pokémon the AI sends out and when they decide to switch, overarching strategic choices the AI prefers to make, and more.
The AI flags can be found in [`include/constants/battle_ai.h`](https://github.com/rh-hideout/pokeemerald-expansion/blob/master/include/constants/battle_ai.h). Some flags have their own dedicated functions that affect how the AI scores its options when choosing what to do in battle, and those functions can be found in [`src/battle_ai_main.c`](https://github.com/rh-hideout/pokeemerald-expansion/blob/master/src/battle_ai_main.c). Other flags are used in conditional checks to gate certain behaviour behind certain flags, which you can typically find by searching the codebase for the flag name and browsing from there.
# What flags should you use?
When adding new AI flags it is recommended to use `AI_FLAG_CHECK_BAD_MOVE`, `AI_FLAG_CHECK_VIABILITY`, `AI_FLAG_TRY_TO_FAINT` to make sure the AI makes good decisions. It is especially important to use `AI_FLAG_CHECK_BAD_MOVE` in combination with any added flags otherwise the AI will use moves that can fail.
Other flags should be used with consideration to the circumstances.
# How do you use them?
Adding an AI flag to a trainer is straightforward, but the process is different depending on how trainers are being defined.
## `COMPETITIVE_PARTY_SYNTAX == TRUE`
If you are using competitive syntax parties, navigate to the trainer data in [`src/data/trainers.party`](https://github.com/rh-hideout/pokeemerald-expansion/blob/upcoming/src/data/trainers.party), find the trainer youd like to change, and add flags like so:
AI: Check Bad Move / Try to Faint / Check Viability. The name of each flag is just the constant, but without AI_FLAG at the beginning. For example, to add `AI_FLAG_SEQUENCE_SWITCHING`, any of the following will work:
* AI_FLAG_SEQUENCE_SWITCHING
* SEQUENCE_SWITCHING
* SEQUENCE SWITCHING
* Sequence_Switching
* Sequence Switching
## `COMPETITIVE_PARTY_SYNTAX != TRUE` / Not Found
If you are not using competitive syntax parties, instead access the trainer data directly in [`src/data/trainers.h`](https://github.com/rh-hideout/pokeemerald-expansion/blob/master/src/data/trainers.h), and add flags like so, typed exactly the same as the flag names themselves:
`.aiFlags = AI_FLAG_CHECK_BAD_MOVE | AI_FLAG_TRY_TO_FAINT | AI_FLAG_CHECK_VIABILITY`
# What AI Flags does pokeemerald-expansion have?
This section lists all of expansions AI Flags and briefly describes the effect they have on the AIs behaviour. In all cases, please check the corresponding function or surrounding code around their implementation for more details. Some of these functions are vanilla, some share a name with vanilla but have been modified to varying degrees, and some are completely new.
## `AI_FLAG_CHECK_BAD_MOVE`
The AI will avoid using moves that are likely to fail in the current situation. This flag helps prevent the AI from making ineffective choices, such as using moves into immunities, into invulnerable states, or when the moves are otherwise hindered by abilities, terrain, or status conditions.
## `AI_FLAG_TRY_TO_FAINT`
AI will prioritize KOing the player if able rather than using status moves. Will prioritize using a move that can OHKO the player. If the player can KO the AIs mon and the AIs mon is slower, prioritize priority moves (this does not prevent the AI from switching out instead).
This flag handles scoring for OHKOs but does not handle 2HKOs at all, `AI_FLAG_STRONGEST_MOVE` should be used for 2HKO scoring.
## `AI_FLAG_CHECK_VIABILITY`
This flag is divided into two components to calculate the best available move for the current context:
- **`AI_CompareDamagingMoves`**: This function compares damaging moves against each other and picks the best one.
- **`AI_CalcMoveEffectScore`**: This function checks every move effect (status or damaging move effect) and increases the score accordingly.
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_SETUP_FIRST_TURN`
AI will prioritize using setup moves on the first turn. These include stat buffs, field effects, status moves, etc.
This is just a flat increase without any consideration of whether it makes sense to use the move or not. For better move choice quality for those moves, `AI_FLAG_CHECK_VIABILITY` should be used.
## `AI_FLAG_RISKY`
AI will generally behave more recklessly. This AI enables the following behaviour:
* Always assume the highest damage roll when scoring moves
* Blindly Mirror Coat / Counter based on the player mons species higher attacking stat
* Moves with Recoil if they miss are not treated differently even if accuracy is lowered
* Prioritize maximizing damage from moves at the cost of accuracy
* Prioritize moves with low change strong effects (Ancient Power etc., check `AI_Risky` function for full list)
* Switch offensively mid battle rather than defensively (if using `AI_FLAG_SMART_MON_CHOICES`)
* Prioritize Explosion moves
## `AI_FLAG_PREFER_STRONGEST_MOVE`
Adds score bonus to any move the AI has that either OHKOs or 2HKOs the player.
Keep in mind that this is a weaker form of `AI_FLAG_TRY_TO_FAINT` at scoring OHKOs as it does not take into account who is attacking first, it does however handle 2HKOs.
## `AI_FLAG_PREFER_BATON_PASS`
AI prefers raising its own stats if it has >= 60% HP, as well as Ingrain, Aqua Ring, and Protect. Prioritizes Baton Bass if the mon is rooted (Ingrain) or has the Aqua Ring effect, and doesnt if it has been Leech Seeded.
## `AI_FLAG_DOUBLE_BATTLE`
This flag is automatically set in double battles, and controls much of the doubles-specific scoring. Ill summarize some of its scoring as follows:
* Dont use Helping Hand if partner is, dont Perish Trap your partner, dont change the weather if they are, dont buff stats if partner will trigger Anger Point for us
* Collaborate with partner to Perish Trap opponent, Magnet Rise to protect partner, Dragon Cheer partner if applicable
* Prioritize using weather move if it benefits partner
* Prioritize triggering partners good abilities if possible (Motor Drive, Storm Drain, Beat Up -> Justified, etc.)
* Handle Skill Swap smartly, both with the partner and against the player
## `AI_FLAG_HP_AWARE`
Lets the AI make decisions based on how much remaining HP its mon(s) and the players mon(s) have.
With respect to the AIs mons, in doubles:
* Allows the AI to attack its partner with a move it can absorb if its low on HP (ie. Electric move on partner with Volt Absorb)
* Prioritizes healing its partner if its HP is <= 50% if able
In both singles and doubles:
* Prioritizes not using moves that require the user fainting (Destiny Bond, Explosion etc.) and healing moves while on >= 70% HP.
* Prioritize not using moves that require the user fainting or losing significant HP (Belly Drum etc) while between 30% and 70% HP
* Prioritize not using setup moves (Light Screen etc.) and Bide while on <= 30% HP
With respect to the players mons:
* Prioritize not using many status moves (stat buffs, Poison, Pain Split) if the player has between 30% and 70% HP
* Prioritize not using any status moves if the player is has <= 30% HP
## `AI_FLAG_POWERFUL_STATUS`
AI prioritizes setting up field effects (Trick Room, Rain Dance, etc.) and side statuses (Tailwind, Spikes, etc.), even if it could faint the target.
## `AI_FLAG_NEGATE_UNAWARE`
AI does not understand ability suppression (Mold Breaker etc., weather suppression (Air Lock etc.), redirection abilities (Lightningrod etc.) being temporarily removed due to move effects (Sky Drop etc.), or item suppression (Magic Room etc.) and will ignore them. This is a handicap flag.
## `AI_FLAG_WILL_SUICIDE`
AI prioritizes self destruction moves (Explosion, Memento).
## `AI_FLAG_PREFER_STATUS_MOVES`
AI gets a score bonus for status moves. This should be combined with `AI_FLAG_CHECK_BAD_MOVE` to prevent using only status moves.
## `AI_FLAG_STALL`
AI prefers simple classically "stalling" behaviour. It will prioritize:
* Mean Look, Fairy Lock, and Wrap for trapping
* Increasing its defense and special defense
* Moves that inflict Poison if it also has a Protect move
* Copying defense and special defense buffs
## `AI_FLAG_SMART_SWITCHING`
Affects when the AI chooses to switch. AI will make smarter decisions about when to switch out mid-battle. Automatically enables `AI_FLAG_SMART_MON_CHOICES`, which is required as the vanilla mon selection AI is not smart enough to handle several switch-triggering situations appropriately, leading to bizarre behaviour. Many of these checks have intentional failure rates, so the AI wont switch out 100% of the time in these cases to keep the player from being able to predict perfectly. Some of these also only apply to singles, and many of them are being simplified for the sake of brevity. This flag lets the AI trigger switches when:
* It cant hit Wonder Guard and has another mon in the party that can (switch that mon in)
* Its going to die to Perish Song, cant KO the player and is affected by Yawn, is being severely affected by a status condition that switching helps (Curse, Toxic, Leech Seed)
* It has a mon that can trap the players mon and win the 1v1 (switch that mon in)
* It has a mon in the party that can absorb the players next expected attack (switch that mon in)
* It will not switch if the current mon will die to hazards on re-entry and it has no means of clearing them in its party
* All its moves are bad
* It can take advantage of Natural Cure or Regenerator
* Its Encored into something bad
* Its primary attacking stats are sufficiently lowered
* Its "odds are bad", which is a generic "try to make smart, player-like decisions generally speaking" check. Switches can be triggered if the player has a good switchin candidate (`AI_FLAG_SMART_MON_CHOICES`), and:
* The current mon has a bad type matchup and doesnt have a super effective move and has at least ½ HP, or ¼ HP and Regenerator, or
* The current mon loses the 1v1 quickly and has at least ½ HP, or ¼ and Regenerator
## `AI_FLAG_ACE_POKEMON`
Marks the last Pokemon in the party as the Ace Pokemon. It will not be used unless it is the last one remaining, or is forced to be switched in (Roar, U-Turn with 1 mon remaining, etc.)
## `AI_FLAG_OMNISCIENT`
AI has full knowledge of player moves, abilities, and hold items, and can use this knowledge when making decisions.
## `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.
With this flag enabled, the AI will prioritize choosing mons after a KO prioritizing the following criteria:
* Trapper (can trap the players mon and win the 1v1)
* Revenge killer (outspeeds an OHKOs / is outsped and OHKOs, is not OHKOd/ outspeeds and 2HKOs, is not OHKOd / is outsped and 2HKOs, is not 2HKOd)
* Has good type matchup and a super effective move
* Has good type matchup and does not have a super effective move
* Has Baton Pass
* If no mons meet any of the above criteria, choose the one that does the most damage
And will choose mons after a mid-battle switch prioritizing the following criteria:
* Trapper (can trap the players mon and win the 1v1)
* Has good type matchup and a super effective move
* Has good type matchup and does not have a super effective move
* Is not 3HKOd by the player
* Has Baton Pass
## `AI_FLAG_CONSERVATIVE`
AI always assumes it will roll the lowest possible result when comparing damage in scoring.
## `AI_FLAG_SEQUENCE_SWITCHING`
AI will always switch out after a KO in exactly party order as defined in the trainer data (ie. slot 1, then 2, then 3, etc.). The AI will never switch out mid-battle unless forced to (Roar etc.). If the AI uses a move that requires a switch where it makes a decision about what to send in (U-Turn etc.), it will always switch out into the lowest available party index.

View File

@ -0,0 +1,219 @@
# Version 1.8.5
```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.8.5`.
```
## 🌋 *IMPORTANT CHANGES AND REFACTORS* 🌋
* Small `ABILITYEFFECT_MOVES_BLOCK` refactor for readability by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4635
* Removed redundant `partnerPicId` arguments in macros by @Bassoonian in https://github.com/rh-hideout/pokeemerald-expansion/pull/4736
* Renamed some labels from "critical hit chance" to "critical hit odds" by @Sneed69 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4751
* `sCriticalHitChance` => `sCriticalHitOdds`.
* `GetCritHitChance` => `GetCritHitOdds`.
* Renamed `BS_FAINTED_LINK_MULTIPLE_1/2` to `BS_FAINTED_MULTIPLE_1/2` by @DizzyEggg in https://github.com/rh-hideout/pokeemerald-expansion/pull/4851
* Remove Duplicate ai code from battle_ai_util.c by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4883
* `AI_CanBeBurned` is now handled by `CanBeBurned`.
* `CanSleep` renamed to `CanBeSlept`.
* `AI_CanSleep` is now handled by `CanBeSlept` and added `defAbility` argument.
* Added `defAbility` argument for `CanBePoisoned`.
* Added `defAbility` argument for `CanBeBurned`.
* Added `defAbility` argument for `CanBeParalyzed`.
* Got rid of hardcoded stat raise anim values by @DizzyEggg in https://github.com/rh-hideout/pokeemerald-expansion/pull/4825
* Added parentheses to `SPECIES_EGG` macro to avoid issues by @DizzyEggg in https://github.com/rh-hideout/pokeemerald-expansion/pull/4899
* `IsFinalStrikeEffect` uses effect instead of move by @Sneed69 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4917
## 💥 *Softlock/Crash fixes* 💥
* Fixed Baton Pass hardlocking on Memento by @DizzyEggg in https://github.com/rh-hideout/pokeemerald-expansion/pull/4773
* Fixed Revive in Double Battles causing a softlock by @DizzyEggg in https://github.com/rh-hideout/pokeemerald-expansion/pull/4784
* Fixed Tectonic Rage causing a freeze after leveling up by @DizzyEggg in https://github.com/rh-hideout/pokeemerald-expansion/pull/4787
* Fixed Smack Down's animation softlocking the game after around 13 uses by @DizzyEggg in https://github.com/rh-hideout/pokeemerald-expansion/pull/4774
* Fixed softlock caused by using Covet/Thief on a Pokémon with Sticky Hold by @Sneed69 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4885
## 🧬 General 🧬
### Added
* Added regional form breeding mechanics by @cawtds in https://github.com/rh-hideout/pokeemerald-expansion/pull/4695
* Convert docs/ folder to mdBook by @leo60228 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4684
* Go [here to see the new documentation page](https://rh-hideout.github.io/pokeemerald-expansion/). Feel free to contribute via PRs!
* Cleanup by @leo60228 in:
* https://github.com/rh-hideout/pokeemerald-expansion/pull/4711
* https://github.com/rh-hideout/pokeemerald-expansion/pull/4715
* https://github.com/rh-hideout/pokeemerald-expansion/pull/4716
* https://github.com/rh-hideout/pokeemerald-expansion/pull/4809
* Added forbidden status parameter to `FORM_CHANGE_ITEM_USE` by @Bassoonian in https://github.com/rh-hideout/pokeemerald-expansion/pull/4738
* Used for Shaymin's form change via Gracidea being prevented if it's frozen or frostbitten.
### Fixed
* Fixed Poké Ball inheritance into actually working by @cawtds in https://github.com/rh-hideout/pokeemerald-expansion/pull/4695
* Daycare fixes by @Sneed69 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4479
* Fixed Evolved mons not copying moves as they do not have their own egg move table.
* Fixed forms of the same species not copying egg moves from each other.
* Fixed Roamer Frostbite status not carrying over between battles by @Sneed69 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4822
* Fixed Partners getting the wrong nature defined by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4926
* Fixed Shop menu lists not properly displaying 6-digit item prices by @DizzyEggg in https://github.com/rh-hideout/pokeemerald-expansion/pull/4929
## 🐉 Pokémon 🐉
### Changed
* PokeCommunity sprites batch (May) by @kittenchilly in https://github.com/rh-hideout/pokeemerald-expansion/pull/4714
* Pawmi (Front by KingOfThe-X-Roads, back by Vent, QC by leParagon)
* Pawmo (By vent, qc by leParagon)
* Okidogi (Front by KingOfThe-X-Roads + by leParagon, back by Lykeron + QC by Alexandrev2. 0)
* Backported @hedara90's Terapagos from https://github.com/rh-hideout/pokeemerald-expansion/pull/4691
* Updated wild held items to Gen 9 by @kittenchilly in https://github.com/rh-hideout/pokeemerald-expansion/pull/4769
* Teddiursa (Common: None_> Honey)
* Bisharp (Rare: None -> Leader's Crest)
* All Oricorio: (Rare: Honey -> Corresponding Nectar)
* Toedscool, Toedscruel: (Common: Tiny Mushroom, Rare: Big Mushroom)
* All Paradox Mon: (Rare: Booster Energy)
### Fixed
* Fixed Tandemaus being able to evolve via Rare and Exp. Candies by @Bassoonian in https://github.com/rh-hideout/pokeemerald-expansion/pull/4759
* Fixed Poltchageist not always producing Counterfeit form offspring by @kittenchilly in https://github.com/rh-hideout/pokeemerald-expansion/pull/4812
* Fixed missing Minior Pokédex Entry by @cawtds in https://github.com/rh-hideout/pokeemerald-expansion/pull/4858
* Multiple Pokemon sprite fixes by @cafei-uh in https://github.com/rh-hideout/pokeemerald-expansion/pull/4887
- Fixed Charjabug shiny + cleaned up its front sprite
- Changed Lurantis back sprite to better match its ingame model
- Fixed Bounsweet shiny not changing the color of its lower body
- Brightened the white color of Bruxish shiny + tweaked its sprites to accommodate the change
* Fixed `P_UPDATED_ABILITIES` not reverting newly gained abilities in Gens 4/6/7 by @AsparagusEduardo in https://github.com/rh-hideout/pokeemerald-expansion/pull/4922
## ⚔️ Battle General ⚔️ ##
### Fixed
* Fixed Dynamax HP not reverting upon fainting by @WillKolada in https://github.com/rh-hideout/pokeemerald-expansion/pull/4681
* Fixed the partner's palette from shifting when throwing a Poké Ball by @Bassoonian in https://github.com/rh-hideout/pokeemerald-expansion/pull/4736
* Fixed shiny value not being updated in battle, causing the palette to reset when reloading the sprites by @DizzyEggg in https://github.com/rh-hideout/pokeemerald-expansion/pull/4788
* Fixed `B_VAR_STARTING_STATUS` every following terrains infinite by @DizzyEggg in https://github.com/rh-hideout/pokeemerald-expansion/pull/4795
* Fixed Gen 7+ confusion self hurt chance from `1 in 3` to `33%` by @Sneed69 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4831
* Fixed caught wild pokemon not restoring their used held item by @kittenchilly in https://github.com/rh-hideout/pokeemerald-expansion/pull/4803
* Fixed AI's right slot switching-in too early by @DizzyEggg in https://github.com/rh-hideout/pokeemerald-expansion/pull/4851
* Ported post-KO test improvements from closed PR by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4859
* Fixed how switch-in effects are played out after multiple faints in the same turn by @DizzyEggg in https://github.com/rh-hideout/pokeemerald-expansion/pull/4864
* Fixed Megas gaining abilities after fainting by @DizzyEggg in https://github.com/rh-hideout/pokeemerald-expansion/pull/4873
## 🤹 Moves 🤹
### Fixed
* Added missing `ignoreSubstitute` flags for Defog (only in Gen 4), Torment and Powder by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4623
* Fixed Grassy Glide granting priority if it's converted to Max Move by @PhallenTree in https://github.com/rh-hideout/pokeemerald-expansion/pull/4659
* Fixed Rampage moves not confusing the user if it's canceled by Protect and Type immunity by @Sneed69 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4722
* Fixed Tar shot the target always be to Fire regardless of existing types by @Sneed69 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4756
* Fixed Shell Side Arm by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4753
* Cleanup by @Sneed69 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4806
* Fixed Body press using physical Defense stat changes instead of Sp. Defense stat stages in Wonder Room (still uses physical defense stat) by @DizzyEggg in https://github.com/rh-hideout/pokeemerald-expansion/pull/4792
* Fixed Relic Song playing the transforming animation for species other than Meloetta by @DizzyEggg in https://github.com/rh-hideout/pokeemerald-expansion/pull/4799
* Fixed Pursuit not being locked by Choice Items when used on an opponent switching out by @DizzyEggg in https://github.com/rh-hideout/pokeemerald-expansion/pull/4801
* Fixed Encore's effect lasting only 2 turns if it was used after the opponent uses the move in the same turn by @DizzyEggg in https://github.com/rh-hideout/pokeemerald-expansion/pull/4802
* Fixed Spectral Thief playing stat raise animation when the user has Contrary by @DizzyEggg in https://github.com/rh-hideout/pokeemerald-expansion/pull/4824
* Fixed Fury Cutter scaling up to 640 power by @Sneed69 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4846
* Fixed moves with the `ignoresTargetAbility` flag ignoring the attacker's own ability by @Sneed69 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4855
* Fixed incorrect move names by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4854
* Floral Healing
* Jungle Healing
* Oceanic Operetta
* Fixed Grassy Terrain not healing on the final turn of its duration by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4903
* Fixed Shed Tail's HP reduction rounding down instead of up by @kleeenexfeu in https://github.com/rh-hideout/pokeemerald-expansion/pull/4913
* Fixed Bitter Malice's description, which used to imply that it didn't always lower the opponent's Attack by @kleeenexfeu in https://github.com/rh-hideout/pokeemerald-expansion/pull/4933
* Fixed Flame Burst's adjacent damage not bypassing Substitute by @hedara90 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4939
## 🎭 Abilities 🎭
### Added
* Added missing Gen 3-4 config for Lightning Rod/Storm Drain (`B_REDIRECT_ABILITY_IMMUNITY`) by @AsparagusEduardo in https://github.com/rh-hideout/pokeemerald-expansion/pull/4920
### Fixed
* Fixed Dancer issues @PhallenTree in https://github.com/rh-hideout/pokeemerald-expansion/pull/4638
* Fixed Dancer triggering if the move user flinches when it was going to use a dance move
* Fixed Dancer not triggering if a previous Dancer flinches.
* Fixed Dazzling, Queenly Majesty and Armor Tail not protecting partners from priority moves by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4635
* Cleanup by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4647
* Fixed Burning Bulwark's incorrect message by @PhallenTree in https://github.com/rh-hideout/pokeemerald-expansion/pull/4659
* Fixed Disguise's `breakable` flag (ignorable by Mold Breaker) by @AgustinGDLV in https://github.com/rh-hideout/pokeemerald-expansion/pull/4666
* Fixed redundant call to `IsBattlerWeatherAffected` Dry Skin's checks by @Sneed69 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4675
* Fixed Guard Dog blocking U-Turn/Volt Switch/Flip Turn instead of Roar/Circle Throw/Dragon Tail by @PhallenTree in https://github.com/rh-hideout/pokeemerald-expansion/pull/4690
* Fixed some abilities preventing stat dropping move effects when used on self by @Sneed69 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4696
* Hyper Cutter (Attack)
* Big Pecks (Defense)
* Keen Eye/Illuminate (Accuracy)
* Fixed Mummy and Lingering Aroma not working at all by @Sneed69 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4731
* Fixed Berserk, Anger Shell, Wimp Out, Emergency Exit HP threshold (more than half HP instead of half HP and more) by @Sneed69 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4724
* Fixed Mycelium Might affecting every battler on the field instead of just the ability holder by @Sneed69 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4740
* Fixed Skill Link ignoring Gastro Acid/Neutralizing Gas by @Sneed69 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4746
* Fixed Own Tempo ignoring Gastro Acid/Neutralizing Gas when checking for Berserk Gene by @Sneed69 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4746
* Fixed Soul-Heart changing stats of wrong battler, which caused Mirror Herb to behave incorrectly by @DizzyEggg in https://github.com/rh-hideout/pokeemerald-expansion/pull/4785
* Fixed Poison Touch trigger chance from `1 in 3` to `30%` by @Sneed69 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4831
* Fixed Cursed Body trigger chance from `1 in 3` to `30%` by @Sneed69 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4831
* Fixed Comatose not being supressed if it's obtained by a Pokémon Transforming by @DizzyEggg in https://github.com/rh-hideout/pokeemerald-expansion/pull/4852
* Fixed Supersweet Syrup0s description by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4902
## 🧶 Items 🧶
### Changed
* Allowed rematches to occur if I_VS_SEEKER_CHARGING isn't enabled by @fdeblasio in https://github.com/rh-hideout/pokeemerald-expansion/pull/4866
### Fixed
* Fixed Honey altering tiles when used by @cawtds in https://github.com/rh-hideout/pokeemerald-expansion/pull/4703
* Fixed potential undefined behaviour when using escape rope by @cawtds in https://github.com/rh-hideout/pokeemerald-expansion/pull/4705
* Fixed Hyper Potion's price not respecting `I_PRICE` by @Bassoonian in https://github.com/rh-hideout/pokeemerald-expansion/pull/4737
* Fixed Ability Shield not protecting against multiple effects by @Sneed69 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4740
* Mold Breaker-type abilities.
* Mycelium Might.
* Moves that bypass abilities (eg. Sunsteel Stike).
## 🤖 Battle AI 🤖
### Changed
* Add checks for `EFFECT_POLTERGEIST` and `EFFECT_FIRST_TURN_ONLY` to `IsDamageMoveUnusable` by @iriv24 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4693
### Fixed
* Fixed AI going for speed control even when it's faster than the opponet by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4630
* Fixed AI not considering `EFFECT_RAGING_BULL` similarly to `EFFECT_BRICK_BREAK` by @AsparagusEduardo in https://github.com/rh-hideout/pokeemerald-expansion/pull/4682
* Fixed AI getting incorrect calculations due to using `gCurrentMove` in `CalcCritChanceStageArgs` by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4687
* Fixed AI not recording Battle Armor or Shell Armor by @Sneed69 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4751
* Fixed AI not considering guaranteed crits by @Sneed69 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4751
* Fixed AI not properly avoiding contact against Rocky Helmet/Rough Skin by @Sneed69 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4779
* Fixed AI not recognising Volt Absorb/Flash Fire by @DizzyEggg in https://github.com/rh-hideout/pokeemerald-expansion/pull/4781
* Fixed AI thinking that Defiant/Competitive triggers off partner's moves in doubles by @Sneed69 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4786
* Fixed AI using `TRUE` (Stench) when calculating if it's worth using Swagger or Flatter on its partner by @Sneed69 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4786
* Fixed passing hold effect instead of ability in one call of ShouldSetSandstorm by @Sneed69 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4789
## 🧪 Test Runner 🧪
### Added
* Added `FORCE_MOVE_ANIM` macro to force an animation to run in headless mode by @DizzyEggg in https://github.com/rh-hideout/pokeemerald-expansion/pull/4774
* Usage: `FORCE_MOVE_ANIM(TRUE)` at the beginning of the test and `FORCE_MOVE_ANIM(FALSE)` at the end.
* Added test to prevent species from having different evolution tracker methods by @Bassoonian in https://github.com/rh-hideout/pokeemerald-expansion/pull/4771
* Added test for missing Pokédex Entries by @cawtds in https://github.com/rh-hideout/pokeemerald-expansion/pull/4858
* Added missing Move Effect TODO tests - Volume B by @AsparagusEduardo in https://github.com/rh-hideout/pokeemerald-expansion/pull/4682
* Added missing tests
* Berserk by @Sneed69 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4724
* Clear Body by @Pawkkie in https://github.com/rh-hideout/pokeemerald-expansion/pull/4685
* Cleanup by @Pawkkie in:
* https://github.com/rh-hideout/pokeemerald-expansion/pull/4797
* https://github.com/rh-hideout/pokeemerald-expansion/pull/4837
* Anger Point and Moxie by @Sneed69 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4811
* Cursed Body, Poison Touch and Confusion status by @Sneed69 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4831
* Corrosion, Acrobatics, Hone Claws and Hurricane by @Pawkkie in https://github.com/rh-hideout/pokeemerald-expansion/pull/4708
* Added AI tests for avoiding using status moves on Pokémon with abilities that prevent them by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4883
* Added Own Tempo/Mold Breaker test by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4883
### Changed
* Multiple changes by @AsparagusEduardo in https://github.com/rh-hideout/pokeemerald-expansion/pull/4682
* Renamed some Baton Pass-related tests so that their prefix becomes Baton Pass.
* Eg. `Aqua Ring can be Baton Passed` becomes `Baton Pass passes Aqua Ring's effect`.
* Expanded Belch's test to show that it doesn't need to eat a berry before each use of the move.
* Unconfirmed interactions added to the specific files.
* Split `EFFECT_RAGING_BULL` from `EFFECT_BRICK_BREAK`'s file.
* Moved Grassy Terrain/Earthquake test to Earthquake file.
* Write new/Fix old tests for post-ko switch scenarios by @DizzyEggg in https://github.com/rh-hideout/pokeemerald-expansion/pull/4856
### Fixed
* Fixed issues when building tests with agbcc by @u8-Salem in https://github.com/rh-hideout/pokeemerald-expansion/pull/4689
* Fixed incorrect `ASSUME`s in 2 test rampage tests by @Sneed69 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4722
* Fixed AI ability guessing in tests by @cawtds in https://github.com/rh-hideout/pokeemerald-expansion/pull/4764
* Fixed Pokemon in tests not being male by default by @kittenchilly in https://github.com/rh-hideout/pokeemerald-expansion/pull/4766
* Fixed Plasma Fists/Pixilate interaction test by @Sneed69 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4865
* Fixed wrong palette in player backsprite in recorded battle by @DizzyEggg in https://github.com/rh-hideout/pokeemerald-expansion/pull/4875
## 📦 Pret merges 📦
* Merge in pret 189d542 by @Bassoonian in https://github.com/rh-hideout/pokeemerald-expansion/pull/4832
* Fix Steven partner battle post-battle script by @Jaizu in https://github.com/pret/pokeemerald/pull/2001
* Pret merge (20th of June) by @Bassoonian in https://github.com/rh-hideout/pokeemerald-expansion/pull/4845
- [366f8b3](https://github.com/pret/pokeemerald/commit/366f8b33a38010f47886f70e52a4fa6dd306a4c4) NixOS install instructions by @leo60228
- [c0d630e](https://github.com/pret/pokeemerald/commit/c0d630ee6304df61a5304942386308a872aeb504) Add support for LF line endings to gbagfx by @nashalexander
* Pret Merge (5th of July) by @Bassoonian in https://github.com/rh-hideout/pokeemerald-expansion/pull/4915
- [pret#2006](https://github.com/pret/pokeemerald/pull/2006/) (manually reverted)
- [pret#2009](https://github.com/pret/pokeemerald/pull/2009/) Decode unused JP text in `berry_blender.c`
- [pret#2012](https://github.com/pret/pokeemerald/pull/2012/) Berry blender's `Task_HandleOpponent` small fixes
**Full Changelog**: https://github.com/rh-hideout/pokeemerald-expansion/compare/expansion/1.8.4...expansion/1.8.5
<!--Last PR: 4939-->

View File

@ -0,0 +1,154 @@
# Version 1.8.6
```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.8.6`.
```
## 🌋 *REFACTORS* 🌋
* [Opportunist/Mirror Herb Refactor](#opportunistmirror-herb-refactor-by-alexon1ine-in-httpsgithubcomrh-hideoutpokeemerald-expansionpull4928)
* [Removed unused Battle Script labels](#removed-unused-battle-script-labels-by-bassoonian-in-httpsgithubcomrh-hideoutpokeemerald-expansionpull4839)
* [Fixed Trace not respecting the speed order like other switch-in abilities](#fixed-trace-not-respecting-the-speed-order-like-other-switch-in-abilities-by-alexon1ine-in-httpsgithubcomrh-hideoutpokeemerald-expansionpull4941)
## 🧬 General 🧬
### Fixed
* Fixed Battle Frontier ineligibility blocking the entire party if it encountered a disabled species by @Bassoonian in https://github.com/rh-hideout/pokeemerald-expansion/pull/4997
* Fixed random IVs given when using `givemon` only giving values from 1-31 by @cawtds in https://github.com/rh-hideout/pokeemerald-expansion/pull/5021
* Fixed `givemon` not giving Cherish Ball by @Sneed69 in https://github.com/rh-hideout/pokeemerald-expansion/pull/5022
## 🐉 Pokémon 🐉
### Added
* Added missing Terapagos Stellar sprite by @hedara90 in https://github.com/rh-hideout/pokeemerald-expansion/pull/5008
* Added missing Ogerpon Tera sprites by @hedara90 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4996
### Changed
* Temporarely reverted regional form inheritance to fix issue with non-regional forms by @AsparagusEduardo in https://github.com/rh-hideout/pokeemerald-expansion/pull/5004
* Updated level up learnsets up to Indigo Disk by @kittenchilly in https://github.com/rh-hideout/pokeemerald-expansion/pull/5023
### Fixed
* Fixed Basculegion learning Dire Claw in Gen9's level up learnset by @Bassoonian in https://github.com/rh-hideout/pokeemerald-expansion/pull/4948
* Fixed Sandile's sprite by @hedara90 in https://github.com/rh-hideout/pokeemerald-expansion/pull/5038
## ⚔️ Battle General ⚔️ ##
### Fixed
* Fixed Debug Menu not properly updating the corresponding flags + general cleanup by @kittenchilly in https://github.com/rh-hideout/pokeemerald-expansion/pull/4643
* Fixed spread damage in double battles by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/5064
* In double battles when `B_POSITION_OPPONENT_LEFT` fainted from the first hit of a spread move, the second hit dealt 100% of damage to `B_POSITION_OPPONENT_RIGHT`.
* #### Removed unused Battle Script labels by @Bassoonian in https://github.com/rh-hideout/pokeemerald-expansion/pull/4839
* `data/battle_scripts_1.s`
* `BattleScript_OctolockTryLowerDef`
* `BattleScript_OctolockTurnDmgPrintMsg`
* `BattleScript_StuffCheeksEatBerry`
* `BattleScript_StrengthSapTryHp` and its contents.
* `BattleScript_PartingShotEnd` and its contents.
* `BattleScript_RototillerAffected`
* `BattleScript_AutotomizeDoAnim`
* `BattleScript_TryTailwindAbilitiesLoop_Ret`
* `BattleScript_HitFromAtkCanceler`
* `BattleScript_EffectMultiHit`
* `BattleScript_BattleScript_EffectParalyzeNoTypeCalc`
* `BattleScript_EffectTeleportTryToRunAway`
* `BattleScript_WindPowerActivates_Ret`
* `BattleScript_CottonDownReturn`
* `BattleScript_ActivateWeatherAbilities_Increment`
* `BattleScript_IntimidateEnd`
* `BattleScript_SupersweetSyrupEnd`
* `BattleScript_ActivateTerrainEffects_Increment`
* `BattleScript_GrassyTerrainHpChange`
* `BattleScript_GrassyTerrainLoopEnd`
* `BattleScript_AbilityNoSpecificStatLossPrint`
* `BattleScript_ArenaNothingDecided`
* `BattleScript_ExtremeEvoboostAtk`
* `BattleScript_BerserkGeneRet_Anim`
* `data/battle_scripts_2.s`
* `BattleScript_PrintCaughtMonInfo`
* #### Opportunist/Mirror Herb Refactor by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4928
* Multiple fixes:
* Opportunist stacking multiple boosts in one turn from opposing mons.
* Increasing the stat by the wrong amount when copying opposing boost (eg. +6 boosts).
* Opportunist no longer has a message.
* Opportunist only play animations once for every stat boost.
* Changes:
* `switchInBattlerCounter` replaces both `switchInAbilitiesCounter` and `switchInItemsCounter`.
* Removed `STRINGID_OPPORTUNISTCOPIED` and `sText_OpportunistCopied`.
* Altered `TryDoEventsBeforeFirstTurn` to use a state switch (`gBattleStruct->eventsBeforeFirstTurnState`)
* `FIRST_TURN_EVENTS_START`.
* `FIRST_TURN_EVENTS_OVERWORLD_WEATHER`.
* `FIRST_TURN_EVENTS_TERRAIN`.
* `FIRST_TURN_EVENTS_STARTING_STATUS`.
* `FIRST_TURN_EVENTS_TOTEM_BOOST`.
* `FIRST_TURN_EVENTS_NEUTRALIZING_GAS`.
* `FIRST_TURN_EVENTS_SWITCH_IN_ABILITIES`.
* `FIRST_TURN_EVENTS_OPPORTUNIST_1`.
* `FIRST_TURN_EVENTS_ITEM_EFFECTS`.
* `FIRST_TURN_EVENTS_OPPORTUNIST_2`.
* `FIRST_TURN_EVENTS_END`.
## 🤹 Moves 🤹
### Added
* Added missing Ivy Cudgel animation by @hedara90 in https://github.com/rh-hideout/pokeemerald-expansion/pull/5034
* Cleanup by @hedara90 in https://github.com/rh-hideout/pokeemerald-expansion/pull/5063
* Added missing Axe Kick animation by @kittenchilly in https://github.com/rh-hideout/pokeemerald-expansion/pull/5039
### Fixed
* Fixed Diamond Storm's Defense increase applying to the target instead of the user by @Bassoonian in https://github.com/rh-hideout/pokeemerald-expansion/pull/4947
* Fixed Psycho Shift check for Frostbite using `CanBeFrozen` instead of `CanGetFrostbite` by @Bassoonian in https://github.com/rh-hideout/pokeemerald-expansion/pull/4995
* Fixed Sleep Talk failing on repeated attempts by @PhallenTree in https://github.com/rh-hideout/pokeemerald-expansion/pull/5009
* Fixed Fury Cutter considering Parental Bond's second hit for its damage multiplier by @PhallenTree in https://github.com/rh-hideout/pokeemerald-expansion/pull/5030
* Fixed Hidden Power damage category when `B_PHYSICAL_SPECIAL_SPLIT < GEN_4` by @hedara90 in https://github.com/rh-hideout/pokeemerald-expansion/pull/5053
* Fixed `MoveEffectRemoveStatus` (Sparkling Aria, Wake-Up Slap, ...) that cure Freeze/Frostbite using the other status' battlescript. by @PhallenTree in https://github.com/rh-hideout/pokeemerald-expansion/pull/5061
## 🎭 Abilities 🎭
### Fixed
* Fixed Toxic Debris incorrect side check by @PhallenTree in https://github.com/rh-hideout/pokeemerald-expansion/pull/5009
* Fixed Snow Warning's description not being updated based on `B_SNOW_WARNING` by @kittenchilly in https://github.com/rh-hideout/pokeemerald-expansion/pull/5018
* Fixed Mold Breaker abilities not properly checking battler actions in double battles causing them to not work by @PhallenTree in https://github.com/rh-hideout/pokeemerald-expansion/pull/5030
* Fixed `cantBeSurpressed` ability check for breakable abilities by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/5043
* Fixed Stalwart and Propeller Tail not ignoring redirection from Storm Drain/Lightning Rod + tests by @PhallenTree in https://github.com/rh-hideout/pokeemerald-expansion/pull/5061
* #### Fixed Trace not respecting the speed order like other switch-in abilities by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4941
* Changes:
* Removed: `ABILITYEFFECT_TRACE1`, `ABILITYEFFECT_TRACE2` and moved their handling to `ABILITYEFFECT_ON_SWITCHIN`.
* Removed `gSpecialStatuses`'s `traced` field.
## 🧶 Items 🧶
### Fixed
* Jaboca/Rowap Berry recording the wrong item effects by @PhallenTree in https://github.com/rh-hideout/pokeemerald-expansion/pull/5009
* Fixed Life Orb damaging its holder if it hits itself in confusion. by @PhallenTree in https://github.com/rh-hideout/pokeemerald-expansion/pull/5061
## 🤖 Battle AI 🤖
### Documentation
* Added AI Flags documentation to directory for new documentation site by @anrichtait in https://github.com/rh-hideout/pokeemerald-expansion/pull/5057
### Fixed
* Fixed typo that caused AI to use Upper Hand when it shouldn't by @Pawkkie in https://github.com/rh-hideout/pokeemerald-expansion/pull/4973
* Fixed AI using U-Turn when only the Ace Pokémon is left in the party (#4748) by @Pawkkie in https://github.com/rh-hideout/pokeemerald-expansion/pull/4972
* Fixed AI not being aware during calculations by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4992
* Fixed `AI_SetMoveAccuracy` getting the wrong battler's ability by @PhallenTree in https://github.com/rh-hideout/pokeemerald-expansion/pull/5030
## 🧹 Other Cleanup 🧹
### Fixed
* Fixed version displayed in `README.md` by @Bassoonian in https://github.com/rh-hideout/pokeemerald-expansion/pull/4966
* Removes unnecessary checks for Shield Dust and Covert Cloak by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/5073
## 🧪 Test Runner 🧪
### Added
* Added AI Upper Hand test by @Pawkkie in https://github.com/rh-hideout/pokeemerald-expansion/pull/4973
* Added test to make sure that Trainer Class balls apply to every member of the party by @Bassoonian in https://github.com/rh-hideout/pokeemerald-expansion/pull/4999
* Added missing Sleep Talk tests by @PhallenTree in https://github.com/rh-hideout/pokeemerald-expansion/pull/5009
### Changed
* Improved Test Runner Summary by @AsparagusEduardo in https://github.com/rh-hideout/pokeemerald-expansion/pull/4641
* Totals are now separated from the erroring test list.
* Assumption Fails and Passing `KNOWN_FAILING`s now have their own lists.
### Fixed
* Fixed tests failing when `B_USE_FROSTBITE` is set to `TRUE` by @fakuzatsu in https://github.com/rh-hideout/pokeemerald-expansion/pull/4986
* Fixed tests not compiling outside of CI after incoming pret merge by @Bassoonian in https://github.com/rh-hideout/pokeemerald-expansion/pull/4998
* Fixed Covert Cloak tests being in `item_effect` folder instead of `hold_effect` folder by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/5073
## 📦 Pret merges 📦
* Pret Merge (13th of July) by @Bassoonian in https://github.com/rh-hideout/pokeemerald-expansion/pull/4964
* Adds the new C-style enums in preproc commit by @SBird1337 [(550e668)](https://github.com/pret/pokeemerald/commit/550e6688aa3b511a9aa9ea851c49ba4d90c7708a)
* Pret Merge (27th of July) by @Bassoonian in https://github.com/rh-hideout/pokeemerald-expansion/pull/5045
* Includes:
* [pret#2016](https://github.com/pret/pokeemerald/pull/2016) Fix WSL1 install instructions
* [pret#2017](https://github.com/pret/pokeemerald/pull/2017) Added constant for `NUM_SNOWFLAKE_SPRITES`
**Full Changelog**: https://github.com/rh-hideout/pokeemerald-expansion/compare/expansion/1.8.5...expansion/1.8.6
<!--Last PR: 5073-->

View File

@ -0,0 +1,556 @@
# Version 1.9.0
```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.9.0`.
```
## 🌋 *REFACTORS* 🌋
📜 = Has a migration script.
* [agbcc has been deprecated](#agbcc-has-been-deprecated-by-mrgriffin-in-httpsgithubcomrh-hideoutpokeemerald-expansionpull4989)
* [Added migration script README](#added-migration-script-readme-by-bassoonian-in-httpsgithubcomrh-hideoutpokeemerald-expansionpull4719)
* [Removed Gen 9 settings for out-of-battle abilities](#removed-gen-9-settings-for-out-of-battle-abilities-by-asparaguseduardo-in-httpsgithubcomrh-hideoutpokeemerald-expansionpull4282)
* 📜[Customizable Frontier Pokémon sets](#customizable-frontier-pokémon-sets-by-ghoulslash-in-httpsgithubcomrh-hideoutpokeemerald-expansionpull4313)
* [Replaced VARARG_8 uses with recursive macros](#replaced-vararg_8-uses-with-recursive-macros-by-cfmnephrite-in-httpsgithubcomrh-hideoutpokeemerald-expansionpull4232)
* 📜[Competitive-formatted parties](#competitive-formatted-parties-by-mrgriffin-in-httpsgithubcomrh-hideoutpokeemerald-expansionpull3545)
* [Terastallization](#terastallization-by-agustingdlv-in-httpsgithubcomrh-hideoutpokeemerald-expansionpull4110)
* [Combined weather set commands](#combined-weather-set-commands-by-alexon1ine-in-httpsgithubcomrh-hideoutpokeemerald-expansionpull4434)
* [Full official GF names for species/items/moves/types](#full-official-gf-names-for-speciesitemsmovestypes-by-mrgriffin-znogyrop-and-cfmnephrite-in-httpsgithubcomrh-hideoutpokeemerald-expansionpull4241)
* [Automatically display TM/HM icons based on their move](#automatically-display-tmhm-icons-based-on-their-move-by-sneed69-in-httpsgithubcomrh-hideoutpokeemerald-expansionpull4452)
* [Set `GiveBoxMonIntialMoveset_Fast` as default](#set-giveboxmonintialmoveset_fast-as-default-by-alexon1ine-in-httpsgithubcomrh-hideoutpokeemerald-expansionpull4470)
* [Changed Battle Frontier validation to species flag](#changed-battle-frontier-validation-to-species-flag-by-kittenchilly-in-httpsgithubcomrh-hideoutpokeemerald-expansionpull4341)
* [Replaced HP checks with `IsBattlerAlive`](#replaced-hp-checks-with-isbattleralive-by-ghoulslash-in-httpsgithubcomrh-hideoutpokeemerald-expansionpull4429)
* [Removed redundant `MOVE_EFFECT_SP_ATK_TWO_DOWN`](#removed-redundant-move_effect_sp_atk_two_down-by-sneed69-in-httpsgithubcomrh-hideoutpokeemerald-expansionpull4557)
* 📜[Removed `gItemIconTable`](#removed-gitemicontable-by-kittenchilly-in-httpsgithubcomrh-hideoutpokeemerald-expansionpull4579)
* 📜[Egg Move Refactor](#egg-move-refactor-by-bassoonian-in-httpsgithubcomrh-hideoutpokeemerald-expansionpull4534)
* [Adjusted Ate-Ability code a bit to make it more readable](#adjusted-ate-ability-code-a-bit-to-make-it-more-readable-by-alexon1ine-in-httpsgithubcomrh-hideoutpokeemerald-expansionpull4640)
* [Type Info refactors](#type-info-refactors-by-asparaguseduardo-in-httpsgithubcomrh-hideoutpokeemerald-expansionpull4462)
* [merrp/aarant's Followers](#merrpaarants-followers)
* [Refactored residual damage to be more readable and less prone to bugs](#refactored-residual-damage-to-be-more-readable-and-less-prone-to-bugs-by-alexon1ine-in-httpsgithubcomrh-hideoutpokeemerald-expansionpull4945)
## 🧬 General 🧬
### Added
* #### Added migration script README by @Bassoonian in https://github.com/rh-hideout/pokeemerald-expansion/pull/4719
* #### Customizable Frontier Pokémon sets by @ghoulslash in https://github.com/rh-hideout/pokeemerald-expansion/pull/4313
* `FacilityMon` has been removed in favor of using regular `TrainerMon`.
* Removed `BATTLE_FRONTIER_ITEM_x` item constants in favor of using regular `ITEM_x` constants.
* New `CreateFacilityMon` to handle duplicated code.
* Added `FLAG_FRONTIER_MON_FACTORY` that replaces Return for Frustration and sets frienship to 0. Used in the Battle Factory.
* Converted data in `src/data/battle_frontier/battle_frontier_mons.h` and `src/data/battle_frontier/battle_tent.h`, for example:
* `.itemTableId = BATTLE_FRONTIER_ITEM_CHOICE_BAND,` -> `.heldItem = ITEM_CHOICE_BAND,`
* `.evSpread = F_EV_SPREAD_SPEED | F_EV_SPREAD_ATTACK,` -> `.ev = TRAINER_PARTY_EVS(0, 252, 0, 252, 0, 0),`
* Migration script available in `migration_scripts/egg_move_refactor.py` by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/5040
* Added documentation to `STATIC_ASSERTS` used by the `BoxPokemon` after 1.8.0 by @pkmnsnfrn in https://github.com/rh-hideout/pokeemerald-expansion/pull/4294
* #### Competitive-formatted parties by @mrgriffin in https://github.com/rh-hideout/pokeemerald-expansion/pull/3545
* Can be disabled by setting `COMPETITIVE_PARTY_SYNTAX` to `FALSE` in `include/config/general.h`. If migrating from 1.8, remove the first and last lines from `src/data/trainers.h` (`const struct Trainer gTrainers[] = {` and `};` respectively).
* Introduces `trainerproc`, a tool which converts Competitive-formatted parties into Trainer Control-formatted parties.
* If you made custom changes to the following files and want to use this new format, ***Do not accept the incoming changes for them.*** Instead, use the migration script present in `migration_scripts/convert_parties.py`:
- `src/data/trainers.h`
- `src/data/trainer_parties.h`
- `src/data/battle_partners.h`
- `src/data/partner_parties.h`
* Before:
```c
static const struct TrainerMon sTestParty1[] =
{
{
.species = SPECIES_WOBBUFFET,
.ball = ITEM_MASTER_BALL,
.ability = ABILITY_TELEPATHY,
.friendship = 42,
.gender = TRAINER_MON_FEMALE,
.heldItem = ITEM_ASSAULT_VEST,
.isShiny = TRUE,
.iv = TRAINER_PARTY_IVS(25,26,27,28,29,30),
.ev = TRAINER_PARTY_EVS(252, 0, 0, 252, 4, 0),
.lvl = 67,
.moves = {MOVE_AIR_SLASH, MOVE_BARRIER, MOVE_SOLAR_BEAM, MOVE_EXPLOSION},
.nature = NATURE_HASTY,
.nickname = COMPOUND_STRING("Bubbles")
},
{
.species = SPECIES_WOBBUFFET,
.ability = ABILITY_SHADOW_TAG,
.lvl = 5,
},
};
static const struct Trainer sTestTrainer1 =
{
.trainerName = _("Test1"),
.party = TRAINER_PARTY(sTestParty1),
};
```
After:
```
=== 0 ===
Name: Test1
Bubbles (Wobbuffet) (F) @ Assault Vest
Hasty Nature
Level: 67
Ability: Telepathy
IVs: 25 HP / 26 Atk / 27 Def / 29 SpA / 30 SpD / 28 Spe
EVs: 252 HP / 4 SpA / 252 Spe
Happiness: 42
Shiny: Yes
Ball: Master Ball
- Air Slash
- Barrier
- Solar Beam
- Explosion
Wobbuffet
Level: 5
Ability: Shadow Tag
```
* You can add comments by using `//` or `/* ... */`, like in C.
* You're allowed to write `SPECIES_PIKACHU` instead of `Pikachu` (etc etc) if you want.
* In addition to the migration script described above, you can add the following to at the top of the `src/data/trainers.party` file to change how the tool interprets the file:
- `#pragma trainerproc ivs explicit` — requires an `IVs:` line for every Pokémon instead of defaulting to 31s.
- `#pragma trainerproc ivs <IVs>` — changes the default IVs.
- `#pragma trainerproc level explicit` — requires a `Level:` line for every Pokémon instead of defaulting to 100.
- `#pragma trainerproc level <level>` — changes the default level.
- During the merge you could choose to keep your original `src/data/trainers.h` and `src/data/trainer_parties.h` and then run the conversion script to update the `src/data/trainers.party`, `make`, then check in all three files. Alternatively don't run the conversion script and turn off `COMPETITIVE_PARTY_SYNTAX` in `include/config.h`.
* Added synonyms for competitive/CFRU species defines, eg:
* `SPECIES_PONYTA_GALAR` for `SPECIES_PONYTA_GALARIAN`
* `SPECIES_MAUSHOLD_FOUR` for `SPECIES_MAUSHOLD_FAMILY_OF_FOUR`
* `SPECIES_CHARIZARD_GMAX` for `SPECIES_CHARIZARD_GIGANTAMAX`
* And so.
* ***TODO***:
- Support `Hidden Power:` to set IVs appropriate for a particular Hidden Power type.
- Consider case-insensitivity in the parser.
* Cleanup and bugfixes:
* By @mrgriffin in https://github.com/rh-hideout/pokeemerald-expansion/pull/4362
* By @AsparagusEduardo in https://github.com/rh-hideout/pokeemerald-expansion/pull/4366
* By @Bassoonian in https://github.com/rh-hideout/pokeemerald-expansion/pull/4374
* By @LOuroboros in https://github.com/rh-hideout/pokeemerald-expansion/pull/4397
* By @Bassoonian in https://github.com/rh-hideout/pokeemerald-expansion/pull/4421
* By @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4431
* By @mrgriffin in https://github.com/rh-hideout/pokeemerald-expansion/pull/4442
* By @fdeblasio in https://github.com/rh-hideout/pokeemerald-expansion/pull/4830
* By @mrgriffin in https://github.com/rh-hideout/pokeemerald-expansion/pull/4969
* By @hedara90 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4734
* By @innocenthedgehog in https://github.com/rh-hideout/pokeemerald-expansion/pull/4988
* By @mrgriffin in https://github.com/rh-hideout/pokeemerald-expansion/pull/4990
* By @mrgriffin in https://github.com/rh-hideout/pokeemerald-expansion/pull/5035
* Added `OW_PC_MOVE_ORDER` config to use future generation's menu order for the Pokémon Storage System by @pkmnsnfrn and @AsparagusEduardo in https://github.com/rh-hideout/pokeemerald-expansion/pull/4348
* `GEN_1/2/3`: Widthraw -> Deposit -> Move.
* `GEN_4/5/6_XY`: Deposit -> Widthraw -> Move.
* `GEN_6_ORAS/7/8/9`: Move -> Deposit -> Widthraw.
* Added `OW_HIDE_REPEAT_MAP_POPUP` config that doesn't show the Map Popup when transitioning bewteen maps within the same Map Section by Anon822 from Pokécommunity and @pkmnsnfrn in https://github.com/rh-hideout/pokeemerald-expansion/pull/4370
* Multiple Fishing Enhancements by @ghoulslash and @pkmnsnfrn in https://github.com/rh-hideout/pokeemerald-expansion/pull/4343
* Added `I_FISHING_CHAIN` config to enable XY's chain fishing.
* Added `I_FISHING_PROXIMITY` config to enable XY's proximity mechanic, where fishing away from NPCs increases the chance of a Pokémon being hooked.
* Added `I_FISHING_MINIGAME` config to change between minigame versions.
* `GEN_1/2` will not require a minigame, and instead automatically hook the Pokémon.
* All other settings use RSE's minigame. FRLG/Gen4+'s minigame will be implemented in the future.
* Cleanup and bugfixes:
* By @AsparagusEduardo in https://github.com/rh-hideout/pokeemerald-expansion/pull/4412
* By @cawtds in https://github.com/rh-hideout/pokeemerald-expansion/pull/4906
* By @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4718
* By @cawtds and @pkmnsnfrn in https://github.com/rh-hideout/pokeemerald-expansion/pull/5031
* #### Full official GF names for species/items/moves/types by @mrgriffin, @ZnogyroP and @cfmnephrite in https://github.com/rh-hideout/pokeemerald-expansion/pull/4241
* 8-character type names.
* 12-character Pokémon names (and nicknames)
* 16-character Move names.
* 20-character item names.
* This is done by introducing 3 new fonts that automatically change the size of the name in vanilla interfaces:
* `FONT_NARROWER`, `FONT_SMALL_NARROWER` and `FONT_SHORT_NARROW`.
* If the hack has changed fonts—e.g. to the FrLg ones—then they probably want to create their own versions of the new fonts.
* If the hack has introduced more UIs that render names they probably want to use `GetFontIdToFit`—see this PR's changes for examples of that.
* If the hack has introduced names in list menus they can use `.fontIdMayNarrow = TRUE` on the list template.
* Types, species, moves, and items all have individual commits which enable support in the UI and turn on longer names by default. These can be reverted by downstream projects if they really want to.
* Cleanup
* By @Nopinou in https://github.com/rh-hideout/pokeemerald-expansion/pull/4473
* By @kittenchilly in https://github.com/rh-hideout/pokeemerald-expansion/pull/4588
* By @iriv24 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4979
* Added `OW_PC_RELEASE_ITEM` config that gives back items from released Pokémon by @Bassoonian in https://github.com/rh-hideout/pokeemerald-expansion/pull/4577
* If the bag is full, the item is lost, however.
* Cleanup by @Bassoonian in https://github.com/rh-hideout/pokeemerald-expansion/pull/4844
* Added `P_EGG_CYCLE_LENGTH` config that updates the amount of steps required to complete an egg cycle by @Bassoonian in https://github.com/rh-hideout/pokeemerald-expansion/pull/4596
* Added `trainerbattle_two_trainers` macro to trigger a 1 player vs 2 NPC battle by @aarant and @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4741
* Added `createmon` Script Command and macro by @ghoulslash in https://github.com/rh-hideout/pokeemerald-expansion/pull/4688
* This allows to set up wild enemy parties with the same versatility as `givemon` (IVs, EVs, abilities, moves, etc).
* Added `setwilddoubleflag` macro to set `sIsScriptedWildDouble` and allow 2 player vs 1 enemy wild battles by @ghoulslash in https://github.com/rh-hideout/pokeemerald-expansion/pull/4688
* Added support for multiple Roaming Pokémon at once by @Bassoonian in https://github.com/rh-hideout/pokeemerald-expansion/pull/4762
* By default, `ROAMER_COUNT` is set to 1 to keep save compatibility. Increase it to add more roamers (though this breaks saves).
* Added `OW_IGNORE_EGGS_ON_HEAL`, which makes it such that eggs are not counted in the Pokémon Center's heal animation by @ghoulslash @pkmnsnfrn in https://github.com/rh-hideout/pokeemerald-expansion/pull/4888
* Added support for fake RTC by Anon822 from PokéCommunity and @pkmnsnfrn in https://github.com/rh-hideout/pokeemerald-expansion/pull/4910
* When `OW_USE_FAKE_RTC` is `TRUE`, time runs at a different rate from real time, like in Legends: Arceus or Scarlet and Violet.
* Use `OW_ALTERED_TIME_RATIO` to set the amount of "time" passing every 60 frames (1 real time second):
* `GEN_8_PLA`: 1 minute.
* `GEN_9`: 20 seconds.
* All other settings make the game synced with real life.
* You may also set a flag to pause the RTC (`OW_FLAG_PAUSE_TIME`), and the script commands `pausefakertc`, `resumefakertc` and `togglefakertc` by @pkmnsnfrn in https://github.com/rh-hideout/pokeemerald-expansion/pull/4954
* Cleanup by @Bassoonian in https://github.com/rh-hideout/pokeemerald-expansion/pull/4965
* Added B2W2-style map pop-Ups by @ravepossum, @nielsmittertreiner and @pkmnsnfrn in https://github.com/rh-hideout/pokeemerald-expansion/pull/4396
* Change `OW_POPUP_GENERATION` to `GEN_5` to switch existing map popups.
* You may choose between Black or White themes via `OW_POPUP_BW_COLOR` (`OW_POPUP_BW_COLOR_BLACK` or `OW_POPUP_BW_COLOR_WHITE`).
* You may choose to display the current time in the pop-up using `OW_POPUP_BW_TIME_MODE`.
* `OW_POPUP_BW_TIME_NONE`: Disables time in pop-up.
* `OW_POPUP_BW_TIME_12_HR`: Shows 12-hour time in pop-up
* `OW_POPUP_BW_TIME_24_HR`: Shows 24-hour time in pop-up
* You may enable alpha blending via `OW_POPUP_BW_ALPHA_BLEND` (mainly designed around the Black theme).
* Cleanup by @AsparagusEduardo in https://github.com/rh-hideout/pokeemerald-expansion/pull/4752
* Allowed flags to be used in trigger scripts instead of vars by @DizzyEggg in https://github.com/rh-hideout/pokeemerald-expansion/pull/4900
### Changed
* #### agbcc has been deprecated by @mrgriffin in https://github.com/rh-hideout/pokeemerald-expansion/pull/4989
* You technically still use `make agbcc` by disabling the error thrown when using it, but it will be removed completely for version 1.10.
* #### Moved general config file to the config folder by @AsparagusEduardo in https://github.com/rh-hideout/pokeemerald-expansion/pull/4805
* `config.h` -> `config/general.h`
* Cleanup by @hedara90 in https://github.com/rh-hideout/pokeemerald-expansion/pull/5026
* #### Set `GiveBoxMonIntialMoveset_Fast` as default by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4470
* #### Changed Battle Frontier validation to species flag by @kittenchilly in https://github.com/rh-hideout/pokeemerald-expansion/pull/4341
* Added `isFrontierBanned` flag and removed `gFrontierBannedSpecies`.
* Renamed `isParadoxForm` -> `isParadox`.
* #### Unified Nature info by @fdeblasio in https://github.com/rh-hideout/pokeemerald-expansion/pull/4562
* All data is now found on `gNaturesInfo` in `src/pokemon.c`
* Names, Stat Up/Down, Back Sprite animation, Pokéblock animation, Nature Girl message and Battle Palace data.
* Cleanup by @Sneed69 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4598
* #### Type Info refactors by @AsparagusEduardo in https://github.com/rh-hideout/pokeemerald-expansion/pull/4462
* Added `src/data/types_info.h` file for `gTypesInfo` instead of `src/battle_main.c`.
* Moved `sTypeEffectivenessTable` here file as well (and renamed it to `gTypeEffectivenessTable`)
* `TYPE_NONE` duplicates graphics from `TYPE_MYSTERY` due to limitations with `graphics_file_rules.mk`.
* Damage Categories for `B_PHYSICAL_SPECIAL_SPLIT`'s pre-Gen4 setting can now be specified in this `gTypesInfo`'s `damageCategory` field instead of depending on the type's order.
* Consolidated Lilycove Contest Lady's values into one struct (`sContestLadyValues`) by @fdeblasio in https://github.com/rh-hideout/pokeemerald-expansion/pull/4951
* Applied the Pokémon Sprite Visualizer name officially by @Bassoonian in https://github.com/rh-hideout/pokeemerald-expansion/pull/4745
* Don't specify `sDexSearchTypeOptions` array size by @Sneed69 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4820
* Prevents Type search in the dex from breaking when non-conventional types are added.
* Only call RNG once when generating IVs in some cases by @tertu-m in https://github.com/rh-hideout/pokeemerald-expansion/pull/4876
### Fixed
* Fixed potential Wireless Adapter desynchronization by @AtariDreams in https://github.com/rh-hideout/pokeemerald-expansion/pull/3730
* Fixed `ListItemTemplate` UB in the Pokémon Center by @Bassoonian in https://github.com/rh-hideout/pokeemerald-expansion/pull/4725
* Fixed `src/data/map_group_count.h` not being ignored in `.gitignore` properly by @rayrobdod in https://github.com/rh-hideout/pokeemerald-expansion/pull/4727
* Fixed double battles not occuring with only one Pokemon by talking to the trainers despite `OW_DOUBLE_APPROACH_WITH_ONE_MON` being set `TRUE` by @fdeblasio in https://github.com/rh-hideout/pokeemerald-expansion/pull/4848
* Fixed unused `B_TRANSITION_SHRED_SPLIT` from softlocking the game by @Lunos, @griffinr and @pkmnsnfrn in https://github.com/rh-hideout/pokeemerald-expansion/pull/4919
## ✨ Feature Branches ✨
### ***merrp/aarant's Followers***
* Integrated @aarant's followers branch by @AsparagusEduardo in https://github.com/rh-hideout/pokeemerald-expansion/pull/4022
* This includes Dynamic Overworld Palettes and Expanded Overworld IDs.
* This does ***not*** include the `lighting` branch yet, but will be included in a future version.
* Updated up to the latest version of the branch (11th of July) by @Bassoonian in https://github.com/rh-hideout/pokeemerald-expansion/pull/4944
* Cleanup
* By @Bassoonian in https://github.com/rh-hideout/pokeemerald-expansion/pull/4782
* By @AsparagusEduardo in https://github.com/rh-hideout/pokeemerald-expansion/pull/4937
#### Changes from the original branch
* Follower Pokémon can be enabled using the `OW_FOLLOWERS_ENABLED` config.
* Pokémon NPCs can be added to a map [independently](https://github.com/rh-hideout/pokeemerald-expansion/pull/4761) from the Followers config. Keep in mind, this requires `OW_POKEMON_OBJECT_EVENTS` to be enabled in order to add the graphics to the ROM.
* Eg: use `OBJ_EVENT_GFX_SPECIES(CHARIZARD)` where the graphic ID would go (`OBJ_EVENT_GFX_SPECIES_SHINY()` for shiny version).
* May also use `OBJ_EVENT_GFX_SPECIES_SHINY(CHARIZARD)` to make them shiny by @AsparagusEduardo in https://github.com/rh-hideout/pokeemerald-expansion/pull/5049
* Moved original configs from `include/constants/event_objects.h` to `include/config/overworld.h` and renamed them:
* `OW_MON_BOBBING` -> `OW_FOLLOWERS_BOBBING`
* `LARGE_OW_SUPPORT` -> `OW_LARGE_OW_SUPPORT`
* `OW_MON_POKEBALLS` -> `OW_FOLLOWERS_POKEBALLS`
* Added follower Pokémon sprites from Gen 4-8
* Credits to @Eemeliri and Gerben BSc
* Moved `OW_GFX_COMPRESS` from `include/global.h` to `include/config/overworld.h`.
* Added `OW_SUBSTITUTE_PLACEHOLDER` config to hide followers if they don't have a follower sprite instead of using a placeholder Substitute sprite by @Bassoonian in https://github.com/rh-hideout/pokeemerald-expansion/pull/4765
* Follower graphics are shown in the Pokémon Sprite Visualizer.
* Follower graphics have been moved to the respective species graphics folder instead of all being grouped in `graphics/object_events/pics/pokemon`.
* Eg: `graphics/object_events/pics/pokemon/abomasnow.png` was moved to `graphics/pokemon/abomasnow/follower.png`.
* Follower data has been moved to `gSpeciesInfo`
* Their palettes are separate from the battle sprite palettes
* Can be enabled using `OW_FOLLOWERS_SHARE_PALETTE`, but requires manual sprite adjustements. For now, it's recommended to keep this `FALSE`. (They don't use much space anyway)
* Updated `GetTypeEffectiveness` used by follower messages to account for new abilities with type immunities.
* Cleaned up code style to match pret/expansion's.
* Reverted Regi's sprite to vanilla's.
* Follower PicTables use `overworld_ascending_frames` macro.
* Removed unneeded calls to `bufferspeciesname`.
* Removed `MON_DATA_NATURE`.
* Removed debug functions like `IsAccurateGBA`.
* Removed `ScrCmd_callfunc` to use `callnative`s instead
## 🐉 Pokémon 🐉
### Added
* Added `EVO_ITEM_COUNT_999` evolution method (used by Gimmighoul) by @kittenchilly in https://github.com/rh-hideout/pokeemerald-expansion/pull/4261
* Requires level up while carrying 999 of the specified item in the bag, which will be consumed.
* Uses new `EVO_MODE_CANT_STOP` mode, which is a clone of `EVO_MODE_NORMAL` but prevents evolution from being canceled.
* Added `EVO_DEFEAT_THREE_WITH_ITEM` evolution method (used by Bisharp) by @Bassoonian in https://github.com/rh-hideout/pokeemerald-expansion/pull/4768
* Requires level up after defeating 3 Pokémon of the same species holding the specified item.
* Eg: Bisharp defeating 3 other Bisharp holding Leader Crests.
* Cleanup by @AsparagusEduardo in https://github.com/rh-hideout/pokeemerald-expansion/pull/5046
* Added `EVO_OVERWORLD_STEPS` evolution method (used by Pawmo, Bramblin and Rellor) by @Bassoonian in https://github.com/rh-hideout/pokeemerald-expansion/pull/4758
* Requires level up after walking the specified amount of steps with that Pokémon as the first member in the party without switching.
* Switching the party leader resets the steps.
* Cleanup by @AsparagusEduardo in https://github.com/rh-hideout/pokeemerald-expansion/pull/5047
* Added `FORM_CHANGE_DAYS_PASSED` form change (used by Furfrou and Hoopa) by @Bassoonian in https://github.com/rh-hideout/pokeemerald-expansion/pull/4778
* Adds `MON_DATA_DAYS_SINCE_FORM_CHANGE`, which is a timer to automatically changes forms at midnight once it runs out. It is set after a different form change has been made (currently only added to Form Change items, including Prison Bottle)
* Added unique icons for all of Arceus's forms via config (`P_ARCEUS_UNIQUE_FORM_ICONS`) by @kittenchilly in https://github.com/rh-hideout/pokeemerald-expansion/pull/4329
* Added `P_TWO_FRAME_FRONT_SPRITES` config to allow disabling 2-frame front animations by @Bassoonian in https://github.com/rh-hideout/pokeemerald-expansion/pull/4750
* Added `P_CRIES_ENABLED` config to disable species cries and stop them from being included in the ROM by @AsparagusEduardo in https://github.com/rh-hideout/pokeemerald-expansion/pull/4791
* Added configs to prevent unobtainable Pokemon from being shiny by @fdeblasio in https://github.com/rh-hideout/pokeemerald-expansion/pull/4735
* `P_ONLY_OBTAINABLE_SHINIES`: Prevents shinies from generating in the Battle Pyramid.
* `P_NO_SHINIES_WITHOUT_POKEBALLS`: Prevents shinies from generating if the player has no Poké Balls.
* Added `P_CAN_FORGET_HIDDEN_MOVE` config allow Pokémon to forget HM moves by @pkmnsnfrn and @Lunos in https://github.com/rh-hideout/pokeemerald-expansion/pull/4968
### Changed
* Renamed evolution methods the were labeled as evo level by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4607
* `EVO_LEVEL_MOVE_TWENTY_TIMES` -> `EVO_MOVE_TWENTY_TIMES`
* `EVO_LEVEL_RECOIL_DAMAGE_MALE` -> `EVO_RECOIL_DAMAGE_MALE`
* `EVO_LEVEL_RECOIL_DAMAGE_FEMALE` -> `EVO_RECOIL_DAMAGE_FEMALE`
* Cleanup by @AsparagusEduardo in https://github.com/rh-hideout/pokeemerald-expansion/pull/4644
* Evolution tracker is now by @Bassoonian in https://github.com/rh-hideout/pokeemerald-expansion/pull/4758
* #### Replaced VARARG_8 uses with recursive macros by @cfmnephrite in https://github.com/rh-hideout/pokeemerald-expansion/pull/4232
* #### Egg Move Refactor by @Bassoonian in https://github.com/rh-hideout/pokeemerald-expansion/pull/4534
* Egg Moves are now formatted like Teachable learnsets and their pointers are stored in `gSpeciesInfo`, as opposed to having one big array.
* Only offspring require these tables.
* Migration script available in `migration_scripts/egg_move_refactor.py`.
## ⚔️ Battle General ⚔️ ##
### Added
* Added option to increase Experience bar speed via `B_FAST_EXP_GROW` by @SonikkuA-DatH and @pkmnsnfrn in https://github.com/rh-hideout/pokeemerald-expansion/pull/4335
* Added Gen 4's Fog battle weather by @kittenchilly in https://github.com/rh-hideout/pokeemerald-expansion/pull/4359
* Uses Haze's animation.
* Changes `B_FOG_TERRAIN` (TRUE/FALSE config) into `B_OVERWORLD_FOG` (Generational config).
* `GEN_4`: Uses this battle weather in maps with `WEATHER_FOG_DIAGONAL` and `WEATHER_FOG_HORIZONTAL`.
* `GEN_8` onwards: Sets permanent Misty Terrain.
* All others disable them.
* #### Terastallization by @AgustinGDLV in https://github.com/rh-hideout/pokeemerald-expansion/pull/4110
* Tera Type automatically assigned to existing Pokémon based on their personality value.
* Can get and set Tera Types in scripts for party members using `checkteratype` and `setteratype` by @Bassoonian in https://github.com/rh-hideout/pokeemerald-expansion/pull/4460
* To activate, it requires:
* `ITEM_TERA_ORB` to be in the player's bag.
* `B_FLAG_TERA_ORB_CHARGED` to be set up to an unused flag. It¿s automatically set when `HealPlayerParty` is called.
* Added `ignoreTera` argument added to `GetBattlerType`
* Added Tera Blast's effect.
* Changes type shown in battle screen if the mon is Terastalized or about to by @kittenchilly in https://github.com/rh-hideout/pokeemerald-expansion/pull/4447
* Added Stellar Type.
* Added `teraType` option for Trainers (also supported by Competitive Format Parties)
* Added Tera Starstorm's effect by @kittenchilly in https://github.com/rh-hideout/pokeemerald-expansion/pull/4447
* Terastallization animation by @Pokabbie in https://github.com/rh-hideout/pokeemerald-expansion/pull/4507
* Added `forceTeraType` field for `gSpeciesInfo`, which forces the Pokémon to have a specific Tera Type (used by Terapagos and Ogerpon) by @kittenchilly in https://github.com/rh-hideout/pokeemerald-expansion/pull/4438
* Added `FORM_CHANGE_BATTLE_TERASTALLIZATION` by @kittenchilly in https://github.com/rh-hideout/pokeemerald-expansion/pull/4438
* It uses a Pokémon's Tera Type to choose which form to switch to upon Terastallizing.
* Bugfixes:
* By @AgustinGDLV in https://github.com/rh-hideout/pokeemerald-expansion/pull/4435
* By @AgustinGDLV in https://github.com/rh-hideout/pokeemerald-expansion/pull/4440
* By @Sneed69 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4513
* By @Sneed69 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4515
* By @WillKolada in https://github.com/rh-hideout/pokeemerald-expansion/pull/4529
* By @iriv24 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4975
* Added Gen 1 type matchups by @AsparagusEduardo in https://github.com/rh-hideout/pokeemerald-expansion/pull/4508
* Renamed `B_STEEL_RESISTANCES` -> `B_UPDATED_TYPE_MATCHUPS` to reflect this change.
* Added defines to cleanup `sTypeEffectivenessTable`.
* Added Move Descriptions in battle by @Bassoonian, @TheXaman, @Pawkkie and @ravepossum in https://github.com/rh-hideout/pokeemerald-expansion/pull/4152
* Press L before selecting a move to see their category, power, accuracy and description.
* This can be changed to R by using the `B_MOVE_DESCRIPTION_BUTTON` config by @fakuzatsu in https://github.com/rh-hideout/pokeemerald-expansion/pull/4860
* Cleanup
* By @AGSMGMaster64 and @Sneed69 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4678
* Added ball throwing configs by セケツ from PokéCommunity and @pkmnsnfrn in https://github.com/rh-hideout/pokeemerald-expansion/pull/4953
* `B_ENEMY_THROW_BALLS`: When set to `GEN_6` or higher, it changes the opposing trainer's ball animation so they throw their Pokéballs instead of already starting on the floor.
* `B_PLAYER_THROW_BALLS_SOUND`: When set to `GEN_5` or higher, it plays `SE_BALL_THROW` as part of the player's ball throw animation.
* `B_ENEMY_THROW_BALLS_SOUND`: When set to `GEN_5` or higher, it plays `SE_BALL_THROW` as part of the enemy's ball throw animation.
* Added `RandomChance` macro for battle/test randomization by @Sneed69 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4829
* #### Gimmick Refactor by @AgustinGDLV in https://github.com/rh-hideout/pokeemerald-expansion/pull/4449
* Unifies generational mechanics into `gGimmicksInfo` struct (Mega, Z-Moves, Ultra Burst, Dynamax, Terastallization).
* Contains triggers, indicator, condition and function to execute when triggered.
* Around ~500-1000 lines of redundant / duplicate code removed!
* Cleanup
* By @Bassoonian in https://github.com/rh-hideout/pokeemerald-expansion/pull/4927
* By @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4962
* By @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4863
* By @Bassoonian in https://github.com/rh-hideout/pokeemerald-expansion/pull/4960
* Allow users to increase `MAX_MONEY` dynamically by @DizzyEggg and @pkmnsnfrn in https://github.com/rh-hideout/pokeemerald-expansion/pull/4943
* Added `AUTO_LOWERCASE_KEYBOARD` by @Jaizu and @pkmnsnfrn in https://github.com/rh-hideout/pokeemerald-expansion/pull/4976
* Automatically changes to to lowercase if the first character inputted is uppercase.
### Changed
* Improved HP drain when enabling `B_FAST_HP_DRAIN` by @pkmnsnfrn and @SonikkuA-DatH in https://github.com/rh-hideout/pokeemerald-expansion/pull/4335
* #### Combined weather set commands by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4434
* `setrain` -> `setfieldweather ENUM_WEATHER_RAIN`.
* `setsandstorm` -> `setfieldweather ENUM_WEATHER_SANDSTORM`.
* `setsunny` -> `setfieldweather ENUM_WEATHER_SUN`.
* `sethail` -> `setfieldweather ENUM_WEATHER_HAIL`.
* `setsnow` -> `setfieldweather ENUM_WEATHER_SNOW`.
* #### Replaced HP checks with `IsBattlerAlive` by @ghoulslash in https://github.com/rh-hideout/pokeemerald-expansion/pull/4429
* #### Removed redundant `MOVE_EFFECT_SP_ATK_TWO_DOWN` by @Sneed69 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4557
* Added stack for saved targets and attackers by @ghoulslash in https://github.com/rh-hideout/pokeemerald-expansion/pull/4061
* This avoids the need to overwriting battler IDs during scripts and cause potential issues.
* Several scripts have been updated to use these.
* Cleanup and fixes
* By @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4653
* By @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4668
* #### Adjusted Ate-Ability code a bit to make it more readable by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4640
* Added global constants for damage rolls by @Sneed69 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4663
```c
// Lowest and highest percentages used for damage roll calculations
#define DMG_ROLL_PERCENT_LO 85
#define DMG_ROLL_PERCENT_HI 100
```
* #### Refactored residual damage to be more readable and less prone to bugs by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4945
* Cleanup by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4993
* Clarified some cases of `ChangeStatBuffs` usage by @Sneed69 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4826
* Moved EWRAM variables from battle controller player file to gBattleStruct by @DizzyEggg in https://github.com/rh-hideout/pokeemerald-expansion/pull/4840
* `sDescriptionSubmenu`, `sAckBallUseBtn` and `sBallSwapped`.
### Fixed
* Fixed Dynamax data not clearing when a battler faints by @WillKolada in https://github.com/rh-hideout/pokeemerald-expansion/pull/4672
* Multiple Z-Move fixes by @AgustinGDLV in https://github.com/rh-hideout/pokeemerald-expansion/pull/4449
* Fixed Z-Moves not working in Link Battles, recorded battles and tests.
* Fixed `Z_EFFECT_ALL_STATS_UP` functionality.
* Fixed Z-Nature Power, Z-Copycat, Z-Me First, and Z-Sleep Talk incorrectly using a normal move and not a Z-Move, ~~which had not been raised as an issue yet.~~ (some of these were caught recently!)
* Fixed Breakneck Blitz incorrectly being affected by -ate abilities, which had not been raised as an issue yet.
* Fixed Instruct incorrectly not failing if the target last used a Z-Move, which had not been raised as an issue yet.
* Fixed Guardian of Alola incorrectly doing 50% of the target's HP instead of 75%.
* Fixed Enemy Data not clearing at the end of battles by @ghoulslash in https://github.com/rh-hideout/pokeemerald-expansion/pull/4867
## 🤹 Moves 🤹
### Added
* Expanded Freeze Dry's effect to use `argument` field and allow custom moves to use the effect to be super effective to any specific type by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4312
* Renamed `EFFECT_FREEZE_DRY` to `EFFECT_SUPER_EFFECTIVE_ON_ARG`.
* Expanded `EFFECT_BODY_PRESS` to use category of defense stats for calculation based on the move's own damage category by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4312
* Eg: In vanilla, Body Press uses the user's Defense and its stat changes instead of Attack. Now, if we were to change its `category` in `gMovesInfo`, it'll use Sp. Defense and its stat changes instead of Sp. Attack.
* Expanded Photon Geyser and Shell Side Arm (restored) effects so that they also work for physical moves by @Sneed69 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4923
* Added Knock Off's Gen 5+ effect with config (`B_KNOCK_OFF_REMOVAL`) by @AgustinGDLV in https://github.com/rh-hideout/pokeemerald-expansion/pull/4333
* Items are removed outright instead of making them unusable.
* Added Heal Bell/Soundproof Gen 5-8+ interactions with `B_HEAL_BELL_SOUNDPROOF` config by @Sneed69 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4732
* Cleanup by @AsparagusEduardo in https://github.com/rh-hideout/pokeemerald-expansion/pull/5060
* Added Spicy Extract's effect by @AlexOn1ine, @Skeli789, @kittenchilly and @ZnogyroP in https://github.com/rh-hideout/pokeemerald-expansion/pull/4211
* Added `B_RETURN_STOLEN_NPC_ITEMS` config for Covet/Thief not being able to steal from NPCs by @moostoet and @Sneed69 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4605
* Added Dragon Darts effect (CFRU port) by @AlexOn1ine, @Skeli789 and @BuffelSaft in https://github.com/rh-hideout/pokeemerald-expansion/pull/4612
* Animation by @hedara90 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4620
### Changed
* `EFFECT_TRIPLE_KICK`'s base power uses the move's `strikeCount` instead of a constant by @Sneed69 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4608
* This allows users to create "Quadruple Kick" and similar moves.
* Migrated move animation pointers to `gMovesInfo` by @cawtds in https://github.com/rh-hideout/pokeemerald-expansion/pull/4683
* This removes the need for `gBattleAnims_Moves` which had potential ordering issues if not kept in line with move IDs.
* If `battleAnimScript` is not defined for a move, it defaults to Tackle's animation.
* Migration script available in `migration_scripts/battle_anim_moves_refactor.py`
### Fixed
* Multiple Ally Switch fixes by @ghoulslash in https://github.com/rh-hideout/pokeemerald-expansion/pull/4451
* Shadows no longer disappear + safety checks.
* Corrected animation for opponents.
* Fixed Avalanche's target by @TheLastMudkip in https://github.com/rh-hideout/pokeemerald-expansion/pull/4581
* Fixed Feint and Feint Attack's descriptions by @lhearachel in https://github.com/rh-hideout/pokeemerald-expansion/pull/4617
* Fixed Mud Sport/Water Sport reducing damage by 77% instead of 67% in Gen5+ by @fdeblasio in https://github.com/rh-hideout/pokeemerald-expansion/pull/4874
## 🎭 Abilities 🎭
### Added
* Added Poison Puppeteer's effect by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4416
* Added Tera Shift, Tera Shell, and Teraform Zero by @kittenchilly in https://github.com/rh-hideout/pokeemerald-expansion/pull/4418
* `FORM_CHANGE_BATTLE_SWITCH` now has ability as optional parameter.
* Cleanup by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4742
* Added Toxic Chain's effect by @PhallenTree in https://github.com/rh-hideout/pokeemerald-expansion/pull/4823
* Cleanup by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4843
* Added `B_ABILITY_TRIGGER_CHANCE` config to update trigger chances of abilities to Gen4+ by @Sneed69 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4829
* Shed Skin, Cute Charm, Flame Body, Static and Poison Point have a 30% chance to trigger in Gen4+ instead of 1/3 in Gen3.
* Effect Spore has an 11%, 10% and 9% chance of triggering Sleep, Paralysis and Poison in Gen4+ instead of equal 10% each in Gen3.
### Changed
* #### Removed Gen 9 settings for out-of-battle abilities by @AsparagusEduardo in https://github.com/rh-hideout/pokeemerald-expansion/pull/4282
* These configs no longer disable out-of-battle ability effects when set to `GEN_9`.
* `OW_SUPER_LUCK`.
* `OW_INFILTRATOR`.
* `OW_HARVEST`.
* `OW_LIGHTNING_ROD`.
* `OW_STORM_DRAIN`.
* `OW_FLASH_FIRE`.
* These configs have been removed
* `OW_COMPOUND_EYES`.
* `OW_CUTE_CHARM`.
* `OW_ILLUMINATE`.
* `OW_MAGNET_PULL`.
* `OW_STATIC`.
### Fixed
* Fixed Mirror Armor bouncing Sticky Web's stat reduction to the opponent by @Sneed69 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4713
* Effect Spore now uses `B_POWDER_GRASS` to toggle Grass-type Pokémon immunity to it by @Sneed69 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4829
## 🧶 Items 🧶
### Added
* Added Booster Energy's effect by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4337
* Cleanup
* By @PCG06 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4354
* By @kittenchilly in https://github.com/rh-hideout/pokeemerald-expansion/pull/4804
### Changed
* #### Removed `gItemIconTable` by @kittenchilly in https://github.com/rh-hideout/pokeemerald-expansion/pull/4579
* Sprite and palette pointers have been moved to `gItemsInfo` as `iconPic` and `iconPalette` respectively.
* Migration script available in `migration_scripts/convert_item_icons.py`
* Cleanup
* By @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4591
* By @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4658
* #### Automatically display TM/HM icons based on their move by @Sneed69 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4452
* TM palettes are now stored in `gTypesInfo` in the `paletteTMHM` field.
* Cleanup by @Sneed69 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4487
## 🤖 Battle AI 🤖
### Added
* Added `AI_GetBattlerAbility` by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4555
* Added `AI_FLAG_CONSERVATIVE` flag by @Pawkkie and @iriv24 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4615
* AI will assume low damage rolls for its `calculationsDamage` roll selection in `AI_CalcDamage`
* Cleanup
* By @Sneed69 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4663
* Added `AI_FLAG_SEQUENCE_SWITCHING` flag by @Pawkkie, Kasen, @pkmnsnfrn and @DizzyEggg in https://github.com/rh-hideout/pokeemerald-expansion/pull/4878
* AI will keep their party order consistently with switches.
* Added `setdynamicaifunc`, which allows to setup custom AI functions before a battle besides the predetermined ones used by AI Flags @ghoulslash in https://github.com/rh-hideout/pokeemerald-expansion/pull/4908
* Eg:
```
setdynamicaifunc AI_TagBattlePreferFoe
multi_2_vs_2 TRAINER_MAXIE_MOSSDEEP, MossdeepCity_SpaceCenter_2F_Text_JustWantToExpandLand, TRAINER_TABITHA_MOSSDEEP, MossdeepCity_SpaceCenter_Text_TabithaDefeat, PARTNER_STEVEN
```
Where `AI_TagBattlePreferFoe` prioritizes attacking the opposite battler index.
### Changed
* AI now calculates and stores minimum possible move damage and uses it with `AI_FLAG_TRY_TO_FAINT` by @Sneed69 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4760
* This allows AI to prefer guaranteed KO moves over highest expected damage move.
* Cleanup by @Sneed69 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4808
* AI Revenge Killer switching factors in Trick Room by @Shadowzlmao and @Pawkkie in https://github.com/rh-hideout/pokeemerald-expansion/pull/4794
* AI Smarter Choice AI for Status Moves by @Pawkkie in https://github.com/rh-hideout/pokeemerald-expansion/pull/4872
* Better behavior for AI under Choice Item effects.
* Cleanup by @Pawkkie in https://github.com/rh-hideout/pokeemerald-expansion/pull/4911
* AI Smarter Focus Punch and Substitute handling by @Pawkkie, @Kasenn and @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4952
* Moved `RestoreBattlerData` out of `Ai_CalcDmg` and added `SaveBattlerData` Protections by @ghoulslash in https://github.com/rh-hideout/pokeemerald-expansion/pull/4156
* Cleanup
* By @ghoulslash in https://github.com/rh-hideout/pokeemerald-expansion/pull/4586
* Made AI see Loaded Dice hold effect for multi hit moves that strike 5 times by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4622
* `AI_FLAG_RISKY` Improvements by @Pawkkie, @AlexOn1ine and @iriv24 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4648
* Check the PR for in depth details.
* Cleanup
* By @AsparagusEduardo in https://github.com/rh-hideout/pokeemerald-expansion/pull/4790
* By @Pawkkie in https://github.com/rh-hideout/pokeemerald-expansion/pull/5032
* Removed temporary scores in `AI_CalcMoveEffectScores` by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4655
* Changed `AI_IS_SLOWER` and `AI_IS_FASTER` comparisons into `AI_IsFaster` and `AI_IsSlower` functions by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4671
* `AI_STRIKES_FIRST` is also replaced by `AI_IsFaster`.
* Switch AI uses trapping abilities aggressively by @Pawkkie in https://github.com/rh-hideout/pokeemerald-expansion/pull/4669
* Use 9th roll instead of average in AI calcs by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4679
* Use `AI_DATA->abilities` in more places by @Sneed69 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4729
* Minor switch AI cleanup by @Pawkkie, @DizzyEggg, @AlexOn1ine and @Sneed69 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4849
* Removed `SetBattlerData` from `AI_CalcDamage` by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4881
* Removed unused `AI_FLAG_HELP_PARTNER` by @pkmnsnfrn and @Pawkkie in https://github.com/rh-hideout/pokeemerald-expansion/pull/4918
* Added missing `ADJUST_SCORE`s by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4925
* Reduced `AI_WhoStrikesFirst` to the most essential parts by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4978
* Changed score adjustments to `tempScore` increases by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4987
### Fixed
* Minor AI flag fixes/cleanup by @Pawkkie, @AlexOn1ine and @pkmnsnfrn in https://github.com/rh-hideout/pokeemerald-expansion/pull/4924
## 🧹 Other Cleanup 🧹
### Changed
* Corrected species info struct hex comments by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4798
* Cleanup by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4800
## 🧪 Test Runner 🧪
### Added
* Added missing weather tests by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4434
* Added missing Gale Wings test by @Pawkkie in https://github.com/rh-hideout/pokeemerald-expansion/pull/4694
* Added `SWITCH_OUT_MESSAGE` and `SEND_IN_MESSAGE` macros to avoid tests from failing based on changing switch out/in messages by @Sneed69 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4717
* Usage: `SEND_IN_MESSAGE("Wobbuffet");`
* Tests have been updated to use these new macros.
* Added missing Hidden Power test by @AsparagusEduardo in https://github.com/rh-hideout/pokeemerald-expansion/pull/4462
* Added some Terastallization tests by @hedara90 in https://github.com/rh-hideout/pokeemerald-expansion/pull/5020
### Changed
* Cleaned up Frisk test by @mrgriffin in https://github.com/rh-hideout/pokeemerald-expansion/pull/4441
* Renamed `MgbaPrintf_` to `Test_MgbaPrintf` by @Bassoonian in https://github.com/rh-hideout/pokeemerald-expansion/pull/4642
* AI tests have been moved to their own folder by @Pawkkie in https://github.com/rh-hideout/pokeemerald-expansion/pull/4898
* Species are now always included in tests by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4810
* Added Battle Anim Debug Check to see if animations aren't cleared by @ghoulslash in https://github.com/rh-hideout/pokeemerald-expansion/pull/4930
* Test battlers always have their forced abilities to prevent them from changing during a test by @Sneed69 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4707
### Fixed
* Test runner uses Set mode to avoid an issue where tests prompted switching and caused a timeout by @Pawkkie in https://github.com/rh-hideout/pokeemerald-expansion/pull/4661
## New Contributors
* @Pokabbie made their first contribution in https://github.com/rh-hideout/pokeemerald-expansion/pull/4507
* @TheLastMudkip made their first contribution in https://github.com/rh-hideout/pokeemerald-expansion/pull/4581
* @moostoet made their first contribution in https://github.com/rh-hideout/pokeemerald-expansion/pull/4605
* @rayrobdod made their first contribution in https://github.com/rh-hideout/pokeemerald-expansion/pull/4727
* @innocenthedgehog made their first contribution in https://github.com/rh-hideout/pokeemerald-expansion/pull/4988
**Full Changelog**: https://github.com/rh-hideout/pokeemerald-expansion/compare/expansion/1.8.5...expansion/1.9.0
<!--Last PR: 5060-->

View File

@ -6,7 +6,8 @@
- Once you have your remote set up, run the command `git pull RHH expansion/1.Y.Z`.
```
## 🌋 *IMPORTANT CHANGES* 🌋
## 🌋 *REFACTORS* 🌋
📜 = Uses a migration script.
* N/A
## 💥 *Softlock/Crash fixes* 💥
@ -49,6 +50,13 @@
* N/A
#### Fixed
* N/A
### ***merrp/aarant's Followers***
#### Added
* N/A
#### Changed
* N/A
#### Fixed
* N/A
## 🐉 Pokémon 🐉
### Added

View File

@ -99,7 +99,7 @@ void *AllocInternal(void *heapStart, u32 size, const char *location)
block = block->next;
}
while (block != head);
Test_ExitWithResult(TEST_RESULT_ERROR, "%s: OOM allocating %d bytes", location, size);
Test_ExitWithResult(TEST_RESULT_ERROR, SourceLine(0), ":L%s:%d, %s: OOM allocating %d bytes", gTestRunnerState.test->filename, SourceLine(0), location, size);
#endif
return NULL;
}

View File

@ -1443,7 +1443,7 @@ void SetOamMatrixRotationScaling(u8 matrixNum, s16 xScale, s16 yScale, u16 rotat
CopyOamMatrix(matrixNum, &matrix);
}
u16 LoadSpriteSheet(const struct SpriteSheet *sheet)
static u16 LoadSpriteSheetWithOffset(const struct SpriteSheet *sheet, u32 offset)
{
s16 tileStart = AllocSpriteTiles(sheet->size / TILE_SIZE_4BPP);
@ -1454,11 +1454,16 @@ u16 LoadSpriteSheet(const struct SpriteSheet *sheet)
else
{
AllocSpriteTileRange(sheet->tag, (u16)tileStart, sheet->size / TILE_SIZE_4BPP);
CpuSmartCopy16(sheet->data, (u8 *)OBJ_VRAM0 + TILE_SIZE_4BPP * tileStart, sheet->size);
CpuSmartCopy16(sheet->data, (u8 *)OBJ_VRAM0 + TILE_SIZE_4BPP * tileStart + offset, sheet->size - offset);
return (u16)tileStart;
}
}
u16 LoadSpriteSheet(const struct SpriteSheet *sheet)
{
return LoadSpriteSheetWithOffset(sheet, 0);
}
// Like LoadSpriteSheet, but checks if already loaded, and uses template image frames
u16 LoadSpriteSheetByTemplate(const struct SpriteTemplate *template, u32 frame, s32 offset)
{
@ -1469,10 +1474,10 @@ u16 LoadSpriteSheetByTemplate(const struct SpriteTemplate *template, u32 frame,
return TAG_NONE;
if ((tileStart = GetSpriteTileStartByTag(template->tileTag)) != TAG_NONE) // return if already loaded
return tileStart;
sheet.data = template->images[frame].data - offset;
sheet.data = template->images[frame].data;
sheet.size = template->images[frame].size;
sheet.tag = template->tileTag;
return LoadSpriteSheet(&sheet);
return LoadSpriteSheetWithOffset(&sheet, offset);
}
void LoadSpriteSheets(const struct SpriteSheet *sheets)

View File

@ -2155,21 +2155,17 @@ u32 GetFontIdToFit(const u8 *string, u32 fontId, u32 letterSpacing, u32 widthPx)
u8 *PrependFontIdToFit(u8 *start, u8 *end, u32 fontId, u32 width)
{
u32 fitFontId = GetFontIdToFit(start, fontId, 0, width);
if (fitFontId != fontId)
{
memmove(&start[3], &start[0], end - start);
start[0] = EXT_CTRL_CODE_BEGIN;
start[1] = EXT_CTRL_CODE_FONT;
start[2] = fitFontId;
end[3] = EOS;
return end + 3;
}
else
{
if (fitFontId == fontId)
return end;
}
memmove(&start[3], &start[0], end - start);
start[0] = EXT_CTRL_CODE_BEGIN;
start[1] = EXT_CTRL_CODE_FONT;
start[2] = fitFontId;
end[3] = EOS;
return end + 3;
}
u8 *WrapFontIdToFit(u8 *start, u8 *end, u32 fontId, u32 width)

Binary file not shown.

After

Width:  |  Height:  |  Size: 319 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 314 B

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 275 B

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 451 B

After

Width:  |  Height:  |  Size: 388 B

View File

@ -15,5 +15,5 @@ JASC-PAL
248 136 136
88 104 96
184 192 192
0 0 0
248 248 248
0 0 0

View File

@ -14,6 +14,6 @@ JASC-PAL
248 224 40
248 136 136
88 104 96
184 192 192
0 0 0
200 192 128
247 240 184
0 0 0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 708 B

After

Width:  |  Height:  |  Size: 620 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 666 B

After

Width:  |  Height:  |  Size: 571 B

View File

@ -10,8 +10,8 @@ JASC-PAL
120 24 24
232 56 40
136 120 104
224 216 208
192 176 160
248 248 248
200 192 176
200 160 80
232 208 136
248 248 248

Binary file not shown.

Before

Width:  |  Height:  |  Size: 837 B

After

Width:  |  Height:  |  Size: 816 B

View File

@ -15,5 +15,5 @@ JASC-PAL
248 160 72
112 72 24
176 112 48
0 0 0
0 0 0
8 64 88
176 168 176

Binary file not shown.

Before

Width:  |  Height:  |  Size: 898 B

After

Width:  |  Height:  |  Size: 820 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 487 B

After

Width:  |  Height:  |  Size: 447 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 582 B

After

Width:  |  Height:  |  Size: 537 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1002 B

After

Width:  |  Height:  |  Size: 962 B

View File

@ -2,12 +2,12 @@ JASC-PAL
0100
15
148 209 161
0 0 0
42 44 41
21 158 7
0 0 0
74 76 73
25 27 24
61 113 53
25 27 24
109 99 108
133 139 139
53 134 168

View File

@ -2,12 +2,12 @@ JASC-PAL
0100
15
148 209 161
0 0 0
42 44 41
21 158 7
0 0 0
74 76 73
25 27 24
61 113 53
25 27 24
109 99 108
133 139 139
53 134 168

Binary file not shown.

After

Width:  |  Height:  |  Size: 871 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -0,0 +1,19 @@
JASC-PAL
0100
16
224 54 230
14 17 13
27 29 27
42 44 41
46 48 45
74 76 73
90 96 103
61 113 53
139 99 57
0 150 177
90 171 46
149 151 148
0 212 248
196 198 195
253 218 63
251 253 250

View File

@ -0,0 +1,19 @@
JASC-PAL
0100
16
224 54 230
14 17 13
27 29 27
42 44 41
46 48 45
74 76 73
90 96 103
61 113 53
139 99 57
0 150 177
90 171 46
149 151 148
0 212 248
196 198 195
253 218 63
251 253 250

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 577 B

After

Width:  |  Height:  |  Size: 533 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 999 B

After

Width:  |  Height:  |  Size: 958 B

View File

@ -2,18 +2,18 @@ JASC-PAL
0100
16
148 210 164
156 153 172
131 28 24
49 133 172
213 230 246
0 0 0
41 44 41
16 157 0
230 60 49
57 113 49
49 133 172
131 28 24
213 230 246
255 198 74
172 105 32
16 157 0
57 113 49
156 153 172
49 190 230
0 0 0
164 52 49
74 76 74
189 137 90
230 60 49

View File

@ -2,18 +2,18 @@ JASC-PAL
0100
16
148 210 164
156 153 172
131 28 24
49 133 172
213 230 246
0 0 0
41 44 41
16 157 0
230 60 49
57 113 49
49 133 172
131 28 24
213 230 246
255 198 74
124 162 56
16 157 0
57 113 49
156 153 172
49 190 230
0 0 0
164 52 49
74 76 74
189 137 90
230 60 49

Binary file not shown.

After

Width:  |  Height:  |  Size: 949 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -0,0 +1,18 @@
JASC-PAL
0100
15
222 57 229
16 16 16
87 15 15
44 43 41
153 23 23
75 76 76
64 112 54
237 59 47
141 98 59
91 171 49
209 154 24
232 157 2
0 211 249
255 218 70
253 253 253

View File

@ -0,0 +1,18 @@
JASC-PAL
0100
15
222 57 229
16 16 16
87 15 15
44 43 41
153 23 23
75 76 76
64 112 54
237 59 47
141 98 59
91 171 49
209 154 24
232 157 2
0 211 249
255 218 70
253 253 253

View File

@ -2,17 +2,17 @@ JASC-PAL
0100
15
148 209 161
42 44 41
0 1 0
27 70 15
0 164 153
17 106 68
42 44 41
21 158 7
27 70 15
61 113 53
17 106 68
83 133 90
74 76 73
61 97 53
175 216 159
251 253 250
139 99 57
0 164 153
120 81 39
219 157 92
83 133 90

View File

@ -2,17 +2,17 @@ JASC-PAL
0100
15
148 209 161
42 44 41
0 1 0
27 70 15
0 164 153
17 106 68
42 44 41
21 158 7
27 70 15
61 113 53
17 106 68
83 133 90
74 76 73
61 97 53
175 216 159
251 253 250
139 99 57
0 164 153
124 162 56
219 157 92
83 133 90

Binary file not shown.

After

Width:  |  Height:  |  Size: 910 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -0,0 +1,19 @@
JASC-PAL
0100
16
222 57 229
16 16 16
44 43 41
75 76 76
15 106 67
64 112 54
141 98 59
9 164 156
97 167 27
91 171 49
84 182 101
232 157 2
219 156 94
151 216 120
255 218 70
253 253 253

View File

@ -0,0 +1,19 @@
JASC-PAL
0100
16
222 57 229
16 16 16
44 43 41
75 76 76
15 106 67
64 112 54
141 98 59
9 164 156
97 167 27
91 171 49
84 182 101
232 157 2
219 156 94
151 216 120
255 218 70
253 253 253

Binary file not shown.

Before

Width:  |  Height:  |  Size: 514 B

After

Width:  |  Height:  |  Size: 472 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1001 B

After

Width:  |  Height:  |  Size: 960 B

View File

@ -2,12 +2,12 @@ JASC-PAL
0100
16
148 209 161
0 0 0
42 44 41
21 158 7
74 76 73
0 0 0
61 113 53
11 64 121
61 113 53
74 76 73
15 90 170
0 126 229
53 134 168

View File

@ -2,12 +2,12 @@ JASC-PAL
0100
16
148 209 161
0 0 0
42 44 41
21 158 7
74 76 73
0 0 0
61 113 53
11 64 121
61 113 53
74 76 73
15 90 170
0 126 229
53 134 168

Binary file not shown.

After

Width:  |  Height:  |  Size: 818 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 978 B

View File

@ -0,0 +1,19 @@
JASC-PAL
0100
16
224 54 230
14 17 13
42 44 41
22 65 128
74 76 73
19 94 181
61 113 53
139 99 57
0 130 229
90 171 46
42 214 251
139 196 213
204 222 254
251 253 250
253 218 63
232 157 0

View File

@ -0,0 +1,19 @@
JASC-PAL
0100
16
224 54 230
14 17 13
42 44 41
22 65 128
74 76 73
19 94 181
61 113 53
139 99 57
0 130 229
90 171 46
42 214 251
139 196 213
204 222 254
251 253 250
253 218 63
232 157 0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 694 B

After

Width:  |  Height:  |  Size: 693 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 429 B

After

Width:  |  Height:  |  Size: 371 B

View File

@ -1,6 +1,6 @@
JASC-PAL
0100
16
13
152 208 160
139 115 49
32 32 32
@ -12,8 +12,5 @@ JASC-PAL
180 180 189
82 82 98
205 115 123
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
205 115 123
169 92 99

View File

@ -1,6 +1,6 @@
JASC-PAL
0100
16
13
152 208 160
120 136 56
32 32 32
@ -12,8 +12,5 @@ JASC-PAL
176 168 168
80 80 96
64 144 160
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
205 115 123
169 92 99

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -0,0 +1,19 @@
JASC-PAL
0100
16
224 54 230
26 26 26
50 56 135
56 56 177
62 85 198
169 58 211
147 78 192
247 69 26
65 132 243
43 149 206
34 177 76
44 211 177
245 160 163
165 230 153
255 213 45
212 245 255

View File

@ -0,0 +1,19 @@
JASC-PAL
0100
16
224 54 230
26 26 26
50 56 135
56 56 177
62 85 198
169 58 211
147 78 192
247 69 26
65 132 243
43 149 206
34 177 76
44 211 177
245 160 163
165 230 153
255 213 45
212 245 255

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1019 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 983 B

After

Width:  |  Height:  |  Size: 949 B

View File

@ -16,6 +16,7 @@
#include "battle_debug.h"
#include "battle_dynamax.h"
#include "battle_terastal.h"
#include "battle_gimmick.h"
#include "random.h" // for rng_value_t
// Helper for accessing command arguments and advancing gBattlescriptCurrInstr.
@ -217,10 +218,10 @@ struct SpecialStatus
u8 statLowered:1;
u8 lightningRodRedirected:1;
u8 restoredBattlerSprite: 1;
u8 traced:1;
u8 faintedHasReplacement:1;
u8 focusBanded:1;
u8 focusSashed:1;
u8 unused:1;
// End of byte
u8 sturdied:1;
u8 stormDrainRedirected:1;
@ -370,8 +371,6 @@ struct AiLogicData
bool8 weatherHasEffect; // The same as WEATHER_HAS_EFFECT. Stored here, so it's called only once.
u8 mostSuitableMonId[MAX_BATTLERS_COUNT]; // Stores result of GetMostSuitableMonToSwitchInto, which decides which generic mon the AI would switch into if they decide to switch. This can be overruled by specific mons found in ShouldSwitch; the final resulting mon is stored in AI_monToSwitchIntoId.
struct SwitchinCandidate switchinCandidate; // Struct used for deciding which mon to switch to in battle_ai_switch_items.c
bool8 shouldTerastal[MAX_BATTLERS_COUNT];
bool8 shouldDynamax[MAX_BATTLERS_COUNT];
};
struct AI_ThinkingStruct
@ -558,24 +557,6 @@ struct LinkBattlerHeader
struct BattleEnigmaBerry battleEnigmaBerry;
};
struct MegaEvolutionData
{
u8 toEvolve; // As flags using gBitTable.
bool8 alreadyEvolved[4]; // Array id is used for mon position.
u8 battlerId;
bool8 playerSelect;
u8 triggerSpriteId;
};
struct UltraBurstData
{
u8 toBurst; // As flags using gBitTable.
bool8 alreadyBursted[4]; // Array id is used for mon position.
u8 battlerId;
bool8 playerSelect;
u8 triggerSpriteId;
};
struct Illusion
{
u8 on;
@ -587,48 +568,30 @@ struct Illusion
struct ZMoveData
{
u8 viable:1; // current move can become a z move
u8 viable:1; // current move can become a z move
u8 viewing:1; // if player is viewing the z move name instead of regular moves
u8 active:1; // is z move being used this turn
u8 zStatusActive:1;
u8 healReplacement:1;
u8 activeCategory:2; // active z move category
u8 zUnused:1;
u8 triggerSpriteId;
u8 healReplacement:6;
u8 possibleZMoves[MAX_BATTLERS_COUNT];
u16 chosenZMove; // z move of move cursor is on
u8 effect;
u8 used[MAX_BATTLERS_COUNT]; //one per bank for multi-battles
u16 toBeUsed[MAX_BATTLERS_COUNT]; // z moves per battler to be used
u16 baseMoves[MAX_BATTLERS_COUNT];
u8 categories[MAX_BATTLERS_COUNT];
};
struct DynamaxData
{
bool8 playerSelect;
u8 triggerSpriteId;
u8 toDynamax; // flags using gBitTable
bool8 alreadyDynamaxed[NUM_BATTLE_SIDES];
bool8 dynamaxed[MAX_BATTLERS_COUNT];
u8 dynamaxTurns[MAX_BATTLERS_COUNT];
u8 usingMaxMove[MAX_BATTLERS_COUNT];
u8 activeCategory;
u8 categories[MAX_BATTLERS_COUNT];
u16 baseMove[MAX_BATTLERS_COUNT]; // base move of Max Move
u16 baseMoves[MAX_BATTLERS_COUNT]; // base move of Max Move
u16 lastUsedBaseMove;
u16 levelUpHP;
};
struct TeraData
struct BattleGimmickData
{
bool8 toTera; // flags using gBitTable
bool8 isTerastallized[NUM_BATTLE_SIDES]; // stored as a bitfield for each side's party members
bool8 alreadyTerastallized[MAX_BATTLERS_COUNT];
bool8 playerSelect;
u32 stellarBoostFlags[NUM_BATTLE_SIDES]; // stored as a bitfield of flags for all types for each side
u8 usableGimmick[MAX_BATTLERS_COUNT]; // first usable gimmick that can be selected for each battler
bool8 playerSelect; // used to toggle trigger and update battle UI
u8 triggerSpriteId;
u8 indicatorSpriteId[MAX_BATTLERS_COUNT];
u8 toActivate; // stores whether a battler should transform at start of turn as bitfield
u8 activeGimmick[NUM_BATTLE_SIDES][PARTY_SIZE]; // stores the active gimmick for each party member
bool8 activated[MAX_BATTLERS_COUNT][GIMMICKS_COUNT]; // stores whether a trainer has used gimmick
};
struct LostItem
@ -669,7 +632,7 @@ struct BattleStruct
u8 moneyMultiplierItem:1;
u8 moneyMultiplierMove:1;
u8 savedTurnActionNumber;
u8 switchInAbilitiesCounter;
u8 eventsBeforeFirstTurnState;
u8 faintedActionsState;
u8 faintedActionsBattlerId;
u8 scriptPartyIdx; // for printing the nickname
@ -703,13 +666,17 @@ struct BattleStruct
u16 abilityPreventingSwitchout;
u8 hpScale;
u16 synchronizeMoveEffect;
bool8 anyMonHasTransformed;
u8 anyMonHasTransformed:1; // Only used in battle_tv.c
u8 multipleSwitchInBattlers:4; // One bit per battler
u8 multipleSwitchInState:2;
u8 multipleSwitchInCursor:3;
u8 multipleSwitchInSortedBattlers[MAX_BATTLERS_COUNT];
void (*savedCallback)(void);
u16 usedHeldItems[PARTY_SIZE][NUM_BATTLE_SIDES]; // For each party member and side. For harvest, recycle
u16 chosenItem[MAX_BATTLERS_COUNT];
u16 choicedMove[MAX_BATTLERS_COUNT];
u16 changedItems[MAX_BATTLERS_COUNT];
u8 switchInItemsCounter;
u8 switchInBattlerCounter;
u8 arenaTurnCounter;
u8 turnSideTracker;
u16 lastTakenMoveFrom[MAX_BATTLERS_COUNT][MAX_BATTLERS_COUNT]; // a 2-D array [target][attacker]
@ -753,11 +720,9 @@ struct BattleStruct
u8 activeAbilityPopUps; // as bits for each battler
u8 abilityPopUpSpriteIds[MAX_BATTLERS_COUNT][2]; // two per battler
bool8 throwingPokeBall;
struct MegaEvolutionData mega;
struct UltraBurstData burst;
struct ZMoveData zmove;
struct DynamaxData dynamax;
struct TeraData tera;
struct BattleGimmickData gimmick;
const u8 *trainerSlideMsg;
bool8 trainerSlideLowHpMsgDone;
u8 introState;
@ -779,12 +744,15 @@ struct BattleStruct
u16 moveEffect2; // For Knock Off
u16 changedSpecies[NUM_BATTLE_SIDES][PARTY_SIZE]; // For forms when multiple mons can change into the same pokemon.
u8 quickClawBattlerId;
struct LostItem itemLost[PARTY_SIZE]; // Player's team that had items consumed or stolen (two bytes per party member)
struct LostItem itemLost[NUM_BATTLE_SIDES][PARTY_SIZE]; // Pokemon that had items consumed or stolen (two bytes per party member per side)
u8 forcedSwitch:4; // For each battler
u8 additionalEffectsCounter:4; // A counter for the additionalEffects applied by the current move in Cmd_setadditionaleffects
u8 blunderPolicy:1; // should blunder policy activate
u8 swapDamageCategory:1; // Photon Geyser, Shell Side Arm, Light That Burns the Sky
u8 bouncedMoveIsUsed:1;
u8 descriptionSubmenu:1; // For Move Description window in move selection screen
u8 ackBallUseBtn:1; // Used for the last used ball feature
u8 ballSwapped:1; // Used for the last used ball feature
u8 ballSpriteIds[2]; // item gfx, window gfx
u8 appearedInBattle; // Bitfield to track which Pokemon appeared in battle. Used for Burmy's form change
u8 skyDropTargets[MAX_BATTLERS_COUNT]; // For Sky Drop, to account for if multiple Pokemon use Sky Drop in a double battle.
@ -827,8 +795,11 @@ struct BattleStruct
u8 quickClawRandom[MAX_BATTLERS_COUNT];
u8 quickDrawRandom[MAX_BATTLERS_COUNT];
u8 shellSideArmCategory[MAX_BATTLERS_COUNT][MAX_BATTLERS_COUNT];
u8 speedTieBreaks; // MAX_BATTLERS_COUNT! values.
u8 boosterEnergyActivates;
u8 distortedTypeMatchups;
u8 categoryOverride; // for Z-Moves and Max Moves
u32 stellarBoostFlags[NUM_BATTLE_SIDES]; // stored as a bitfield of flags for all types for each side
};
// The palaceFlags member of struct BattleStruct contains 1 flag per move to indicate which moves the AI should consider,
@ -840,13 +811,12 @@ STATIC_ASSERT(sizeof(((struct BattleStruct *)0)->palaceFlags) * 8 >= MAX_BATTLER
#define F_DYNAMIC_TYPE_IGNORE_PHYSICALITY (1 << 6) // If set, the dynamic type's physicality won't be used for certain move effects.
#define F_DYNAMIC_TYPE_SET (1 << 7) // Set for all dynamic types to distinguish a dynamic type of Normal (0) from no dynamic type.
#define GET_MOVE_TYPE(move, typeArg) \
{ \
#define GET_MOVE_TYPE(move, typeArg) do { \
if (gBattleStruct->dynamicMoveType) \
typeArg = gBattleStruct->dynamicMoveType & DYNAMIC_TYPE_MASK; \
else \
typeArg = gMovesInfo[move].type; \
}
typeArg = gMovesInfo[move].type; \
} while(0)
#define IS_MOVE_PHYSICAL(move)(GetBattleMoveCategory(move) == DAMAGE_CATEGORY_PHYSICAL)
#define IS_MOVE_SPECIAL(move)(GetBattleMoveCategory(move) == DAMAGE_CATEGORY_SPECIAL)

View File

@ -1,6 +1,9 @@
#ifndef GUARD_BATTLE_AI_MAIN_H
#define GUARD_BATTLE_AI_MAIN_H
typedef s32 (*AiScoreFunc)(u32, u32, u32, s32);
#define UNKNOWN_NO_OF_HITS UINT32_MAX
// return vals for BattleAI_ChooseMoveOrAction
@ -29,10 +32,12 @@
#define STAT_CHANGE_ACC 10
#define STAT_CHANGE_EVASION 11
#define BEST_DAMAGE_MOVE 1 // Move with the most amount of hits with the best accuracy/effect
#define POWERFUL_STATUS_MOVE 10 // Moves with this score will be chosen over a move that faints target
#define BEST_DAMAGE_MOVE 1 // Move with the most amount of hits with the best accuracy/effect
#define POWERFUL_STATUS_MOVE 10 // Moves with this score will be chosen over a move that faints target
#define NO_DAMAGE_OR_FAILS -20 // Move fails or does no damage
// Scores given in AI_CalcMoveEffectScore
#define NO_INCREASE 0
#define WEAK_EFFECT 1
#define DECENT_EFFECT 2
#define GOOD_EFFECT 3
@ -64,6 +69,14 @@
score += val; \
} while (0) \
#define ADJUST_AND_RETURN_SCORE(val) \
do \
{ \
TestRunner_Battle_AIAdjustScore(__FILE__, __LINE__, sBattler_AI, AI_THINKING_STRUCT->movesetIndex, val); \
score += val; \
return score; \
} while (0) \
#define ADJUST_SCORE_PTR(val) \
do \
{ \
@ -92,6 +105,7 @@ void Ai_InitPartyStruct(void);
void Ai_UpdateSwitchInData(u32 battler);
void Ai_UpdateFaintData(u32 battler);
void SetAiLogicDataForTurn(struct AiLogicData *aiData);
void ResetDynamicAiFunc(void);
extern u8 sBattler_AI;

View File

@ -3,7 +3,7 @@
void GetAIPartyIndexes(u32 battlerId, s32 *firstId, s32 *lastId);
void AI_TrySwitchOrUseItem(u32 battler);
u8 GetMostSuitableMonToSwitchInto(u32 battler, bool32 switchAfterMonKOd);
u32 GetMostSuitableMonToSwitchInto(u32 battler, bool32 switchAfterMonKOd);
bool32 ShouldSwitch(u32 battler, bool32 emitResult);
#endif // GUARD_BATTLE_AI_SWITCH_ITEMS_H

View File

@ -42,6 +42,7 @@ s32 AI_WhoStrikesFirst(u32 battlerAI, u32 battler2, u32 moveConsidered);
bool32 CanTargetFaintAi(u32 battlerDef, u32 battlerAtk);
u32 NoOfHitsForTargetToFaintAI(u32 battlerDef, u32 battlerAtk);
u32 GetBestDmgMoveFromBattler(u32 battlerAtk, u32 battlerDef);
u32 GetBestDmgFromBattler(u32 battler, u32 battlerTarget);
bool32 CanTargetMoveFaintAi(u32 move, u32 battlerDef, u32 battlerAtk, u32 nHits);
bool32 CanTargetFaintAiWithMod(u32 battlerDef, u32 battlerAtk, s32 hpMod, s32 dmgMod);
s32 AI_DecideKnownAbilityForTurn(u32 battlerId);
@ -115,6 +116,7 @@ bool32 HasMoveWithAdditionalEffect(u32 battlerId, u32 moveEffect);
bool32 HasMoveWithCriticalHitChance(u32 battlerId);
bool32 HasMoveWithMoveEffectExcept(u32 battlerId, u32 moveEffect, u32 exception);
bool32 HasMoveWithLowAccuracy(u32 battlerAtk, u32 battlerDef, u32 accCheck, bool32 ignoreStatus, u32 atkAbility, u32 defAbility, u32 atkHoldEffect, u32 defHoldEffect);
bool32 HasAnyKnownMove(u32 battlerId);
bool32 IsAromaVeilProtectedMove(u32 move);
bool32 IsNonVolatileStatusMoveEffect(u32 moveEffect);
bool32 IsStatLoweringMoveEffect(u32 moveEffect);
@ -146,10 +148,8 @@ bool32 HasMagicCoatAffectedMove(u32 battler);
bool32 HasSnatchAffectedMove(u32 battler);
// status checks
bool32 AI_CanBeBurned(u32 battler, u32 ability);
bool32 AI_CanGetFrostbite(u32 battler, u32 ability);
bool32 AI_CanBeConfused(u32 battlerAtk, u32 battlerDef, u32 move, u32 ability);
bool32 AI_CanSleep(u32 battler, u32 ability);
bool32 IsBattlerIncapacitated(u32 battler, u32 ability);
bool32 AI_CanPutToSleep(u32 battlerAtk, u32 battlerDef, u32 defAbility, u32 move, u32 partnerMove);
bool32 ShouldPoisonSelf(u32 battler, u32 ability);
@ -190,8 +190,8 @@ bool32 PartyHasMoveCategory(u32 battlerId, u32 category);
bool32 SideHasMoveCategory(u32 battlerId, u32 category);
// score increases
void IncreaseStatUpScore(u32 battlerAtk, u32 battlerDef, u32 statId, s32 *score);
void IncreaseStatUpScoreContrary(u32 battlerAtk, u32 battlerDef, u32 statId, s32 *score);
u32 IncreaseStatUpScore(u32 battlerAtk, u32 battlerDef, u32 statId);
u32 IncreaseStatUpScoreContrary(u32 battlerAtk, u32 battlerDef, u32 statId);
void IncreasePoisonScore(u32 battlerAtk, u32 battlerDef, u32 move, s32 *score);
void IncreaseBurnScore(u32 battlerAtk, u32 battlerDef, u32 move, s32 *score);
void IncreaseParalyzeScore(u32 battlerAtk, u32 battlerDef, u32 move, s32 *score);

View File

@ -98,10 +98,7 @@ enum {
// Special return values in gBattleBufferB from Battle Controller functions.
#define RET_VALUE_LEVELED_UP 11
#define RET_MEGA_EVOLUTION (1 << 7)
#define RET_ULTRA_BURST (1 << 6)
#define RET_DYNAMAX (1 << 5)
#define RET_TERASTAL (1 << 4)
#define RET_GIMMICK (1 << 7)
struct UnusedControllerStruct
{
@ -131,8 +128,6 @@ struct ChooseMoveStruct
u8 monType1;
u8 monType2;
u8 monType3;
struct MegaEvolutionData mega;
struct UltraBurstData burst;
struct ZMoveData zmove;
};

View File

@ -56,21 +56,19 @@ enum MaxMoveEffect
MAX_EFFECT_BYPASS_PROTECT,
};
bool32 IsDynamaxed(u16 battlerId);
bool32 CanDynamax(u16 battlerId);
bool32 IsGigantamaxed(u16 battlerId);
bool32 CanDynamax(u32 battler);
bool32 IsGigantamaxed(u32 battler);
void ApplyDynamaxHPMultiplier(u32 battler, struct Pokemon* mon);
void PrepareBattlerForDynamax(u16 battlerId);
u16 GetNonDynamaxHP(u16 battlerId);
u16 GetNonDynamaxMaxHP(u32 battlerId);
void UndoDynamax(u16 battlerId);
bool32 IsMoveBlockedByMaxGuard(u16 move);
bool32 IsMoveBlockedByDynamax(u16 move);
void ActivateDynamax(u32 battler);
u16 GetNonDynamaxHP(u32 battler);
u16 GetNonDynamaxMaxHP(u32 battler);
void UndoDynamax(u32 battler);
bool32 IsMoveBlockedByMaxGuard(u32 move);
bool32 IsMoveBlockedByDynamax(u32 move);
bool32 ShouldUseMaxMove(u16 battlerId, u16 baseMove);
u16 GetMaxMove(u16 battlerId, u16 baseMove);
u8 GetMaxMovePower(u16 move);
bool32 IsMaxMove(u16 move);
u16 GetMaxMove(u32 battler, u32 baseMove);
u8 GetMaxMovePower(u32 move);
bool32 IsMaxMove(u32 move);
void ChooseDamageNonTypesString(u8 type);
void BS_UpdateDynamax(void);
@ -78,15 +76,8 @@ void BS_SetMaxMoveEffect(void);
void BS_SetSteelsurge(void);
void BS_TrySetStatus1(void);
void BS_TrySetStatus2(void);
void BS_DamageNonTypes(void);
void BS_HealOneSixth(void);
void BS_TryRecycleBerry(void);
void BS_JumpIfDynamaxed(void);
void ChangeDynamaxTriggerSprite(u8 spriteId, u8 animId);
void CreateDynamaxTriggerSprite(u8, bool8);
void HideDynamaxTriggerSprite(void);
bool32 IsDynamaxTriggerSpriteActive(void);
void DestroyDynamaxTriggerSprite(void);
#endif

51
include/battle_gimmick.h Normal file
View File

@ -0,0 +1,51 @@
#ifndef GUARD_BATTLE_GIMMICK_H
#define GUARD_BATTLE_GIMMICK_H
enum Gimmick
{
GIMMICK_NONE,
GIMMICK_MEGA,
GIMMICK_ULTRA_BURST,
GIMMICK_Z_MOVE,
GIMMICK_DYNAMAX,
GIMMICK_TERA,
GIMMICKS_COUNT,
};
struct GimmickInfo
{
const struct SpritePalette *triggerPal; // trigger gfx data
const struct SpriteSheet *triggerSheet;
const struct SpriteTemplate *triggerTemplate;
const struct SpritePalette *indicatorPal; // indicator gfx data
const struct SpriteSheet *indicatorSheet;
bool32 (*CanActivate)(u32 battler);
void (*ActivateGimmick)(u32 battler);
};
void AssignUsableGimmicks(void);
bool32 CanActivateGimmick(u32 battler, enum Gimmick gimmick);
bool32 IsGimmickSelected(u32 battler, enum Gimmick gimmick);
void SetActiveGimmick(u32 battler, enum Gimmick gimmick);
enum Gimmick GetActiveGimmick(u32 battler);
bool32 ShouldTrainerBattlerUseGimmick(u32 battler, enum Gimmick gimmick);
bool32 HasTrainerUsedGimmick(u32 battler, enum Gimmick gimmick);
void SetGimmickAsActivated(u32 battler, enum Gimmick gimmick);
void ChangeGimmickTriggerSprite(u32 spriteId, u32 animId);
void CreateGimmickTriggerSprite(u32 battler);
bool32 IsGimmickTriggerSpriteActive(void);
void HideGimmickTriggerSprite(void);
void DestroyGimmickTriggerSprite(void);
void LoadIndicatorSpritesGfx(void);
u32 GetIndicatorTileTag(u32 battler);
u32 GetIndicatorPalTag(u32 battler);
void UpdateIndicatorVisibilityAndType(u32 healthboxId, bool32 invisible);
void UpdateIndicatorOamPriority(u32 healthboxId, u32 oamPriority);
void UpdateIndicatorLevelData(u32 healthboxId, u32 level);
void CreateIndicatorSprite(u32 battler);
extern const struct GimmickInfo gGimmicksInfo[];
#endif

View File

@ -48,45 +48,38 @@ enum
#define TAG_HEALTHBAR_PAL TAG_HEALTHBAR_PLAYER1_TILE
#define TAG_HEALTHBOX_PAL TAG_HEALTHBOX_PLAYER1_TILE
#define TAG_MEGA_TRIGGER_TILE 0xD777
#define TAG_GIMMICK_TRIGGER_TILE 0xD777
#define TAG_MEGA_INDICATOR_TILE 0xD778
#define TAG_ALPHA_INDICATOR_TILE 0xD779
#define TAG_OMEGA_INDICATOR_TILE 0xD77A
#define TAG_ZMOVE_TRIGGER_TILE 0xD77B
#define TAG_BURST_TRIGGER_TILE 0xD77C
#define TAG_DYNAMAX_TRIGGER_TILE 0xD77D
#define TAG_DYNAMAX_INDICATOR_TILE 0xD77E
#define TAG_DYNAMAX_INDICATOR_TILE 0xD77B
#define TAG_NORMAL_INDICATOR_TILE 0xD77F
#define TAG_FIGHTING_INDICATOR_TILE 0xD780
#define TAG_FLYING_INDICATOR_TILE 0xD781
#define TAG_POISON_INDICATOR_TILE 0xD782
#define TAG_GROUND_INDICATOR_TILE 0xD783
#define TAG_ROCK_INDICATOR_TILE 0xD784
#define TAG_BUG_INDICATOR_TILE 0xD785
#define TAG_GHOST_INDICATOR_TILE 0xD786
#define TAG_STEEL_INDICATOR_TILE 0xD787
#define TAG_NORMAL_INDICATOR_TILE 0xD77C
#define TAG_FIGHTING_INDICATOR_TILE 0xD77D
#define TAG_FLYING_INDICATOR_TILE 0xD77E
#define TAG_POISON_INDICATOR_TILE 0xD77F
#define TAG_GROUND_INDICATOR_TILE 0xD780
#define TAG_ROCK_INDICATOR_TILE 0xD781
#define TAG_BUG_INDICATOR_TILE 0xD782
#define TAG_GHOST_INDICATOR_TILE 0xD783
#define TAG_STEEL_INDICATOR_TILE 0xD784
// empty spot for TYPE_MYSTERY
#define TAG_FIRE_INDICATOR_TILE 0xD789
#define TAG_WATER_INDICATOR_TILE 0xD78A
#define TAG_GRASS_INDICATOR_TILE 0xD78B
#define TAG_ELECTRIC_INDICATOR_TILE 0xD78C
#define TAG_PSYCHIC_INDICATOR_TILE 0xD78D
#define TAG_ICE_INDICATOR_TILE 0xD78E
#define TAG_DRAGON_INDICATOR_TILE 0xD78F
#define TAG_DARK_INDICATOR_TILE 0xD790
#define TAG_FAIRY_INDICATOR_TILE 0xD791
#define TAG_STELLAR_INDICATOR_TILE 0xD792
#define TAG_TERA_TRIGGER_TILE 0xD793
#define TAG_FIRE_INDICATOR_TILE 0xD786
#define TAG_WATER_INDICATOR_TILE 0xD787
#define TAG_GRASS_INDICATOR_TILE 0xD788
#define TAG_ELECTRIC_INDICATOR_TILE 0xD789
#define TAG_PSYCHIC_INDICATOR_TILE 0xD78A
#define TAG_ICE_INDICATOR_TILE 0xD78B
#define TAG_DRAGON_INDICATOR_TILE 0xD78C
#define TAG_DARK_INDICATOR_TILE 0xD78D
#define TAG_FAIRY_INDICATOR_TILE 0xD78E
#define TAG_STELLAR_INDICATOR_TILE 0xD78F
#define TAG_TERA_TRIGGER_TILE 0xD790
#define TAG_MEGA_TRIGGER_PAL 0xD777
#define TAG_GIMMICK_TRIGGER_PAL 0xD777
#define TAG_MEGA_INDICATOR_PAL 0xD778
#define TAG_MISC_INDICATOR_PAL 0xD779 // Alpha, Omega, and Dynamax indicators use the same palette as each of them only uses 4 different colors.
#define TAG_ZMOVE_TRIGGER_PAL 0xD77B
#define TAG_BURST_TRIGGER_PAL 0xD77C
#define TAG_DYNAMAX_TRIGGER_PAL 0xD77D
#define TAG_TERA_INDICATOR_PAL 0xD77E
#define TAG_TERA_TRIGGER_PAL 0xD77F
#define TAG_TERA_INDICATOR_PAL 0xD77A
enum
{
@ -116,18 +109,6 @@ void InitBattlerHealthboxCoords(u8 battler);
void GetBattlerHealthboxCoords(u8 battler, s16 *x, s16 *y);
void UpdateHpTextInHealthbox(u32 healthboxSpriteId, u32 maxOrCurrent, s16 currHp, s16 maxHp);
void SwapHpBarsWithHpText(void);
void ChangeMegaTriggerSprite(u8 spriteId, u8 animId);
void CreateMegaTriggerSprite(u8 battlerId, u8 palId);
bool32 IsMegaTriggerSpriteActive(void);
void HideMegaTriggerSprite(void);
void DestroyMegaTriggerSprite(void);
void ChangeBurstTriggerSprite(u8 spriteId, u8 animId);
void CreateBurstTriggerSprite(u8 battlerId, u8 palId);
bool32 IsBurstTriggerSpriteActive(void);
void HideBurstTriggerSprite(void);
void DestroyBurstTriggerSprite(void);
void MegaIndicator_LoadSpritesGfx(void);
void MegaIndicator_SetVisibilities(u32 healthboxId, bool32 invisible);
u8 CreatePartyStatusSummarySprites(u8 battler, struct HpAndStatus *partyInfo, bool8 skipPlayer, bool8 isBattleStart);
void Task_HidePartyStatusSummary(u8 taskId);
void UpdateHealthboxAttribute(u8 healthboxSpriteId, struct Pokemon *mon, u8 elementId);
@ -136,7 +117,6 @@ u8 GetScaledHPFraction(s16 hp, s16 maxhp, u8 scale);
u8 GetHPBarLevel(s16 hp, s16 maxhp);
void CreateAbilityPopUp(u8 battlerId, u32 ability, bool32 isDoubleBattle);
void DestroyAbilityPopUp(u8 battlerId);
void HideTriggerSprites(void);
bool32 CanThrowLastUsedBall(void);
void TryHideLastUsedBall(void);
void TryRestoreLastUsedBall(void);

View File

@ -23,6 +23,20 @@ struct MultiPartnerMenuPokemon
#define BOUNCE_MON 0x0
#define BOUNCE_HEALTHBOX 0x1
enum {
FIRST_TURN_EVENTS_START,
FIRST_TURN_EVENTS_OVERWORLD_WEATHER,
FIRST_TURN_EVENTS_TERRAIN,
FIRST_TURN_EVENTS_STARTING_STATUS,
FIRST_TURN_EVENTS_TOTEM_BOOST,
FIRST_TURN_EVENTS_NEUTRALIZING_GAS,
FIRST_TURN_EVENTS_SWITCH_IN_ABILITIES,
FIRST_TURN_EVENTS_OPPORTUNIST_1,
FIRST_TURN_EVENTS_ITEM_EFFECTS,
FIRST_TURN_EVENTS_OPPORTUNIST_2,
FIRST_TURN_EVENTS_END,
};
void CB2_InitBattle(void);
void BattleMainCB2(void);
void CB2_QuitRecordedBattle(void);
@ -61,6 +75,7 @@ s8 GetChosenMovePriority(u32 battlerId);
s8 GetMovePriority(u32 battlerId, u16 move);
s32 GetWhichBattlerFasterArgs(u32 battler1, u32 battler2, bool32 ignoreChosenMoves, u32 ability1, u32 ability2,
u32 holdEffectBattler1, u32 holdEffectBattler2, u32 speedBattler1, u32 speedBattler2, s32 priority1, s32 priority2);
s32 GetWhichBattlerFasterOrTies(u32 battler1, u32 battler2, bool32 ignoreChosenMoves);
s32 GetWhichBattlerFaster(u32 battler1, u32 battler2, bool32 ignoreChosenMoves);
void RunBattleScriptCommands_PopCallbacksStack(void);
void RunBattleScriptCommands(void);

View File

@ -47,7 +47,7 @@ bool32 IsShieldsDownProtected(u32 battler);
u32 IsAbilityStatusProtected(u32 battler);
bool32 TryResetBattlerStatChanges(u8 battler);
bool32 CanCamouflage(u8 battlerId);
u16 GetNaturePowerMove(void);
u32 GetNaturePowerMove(u32 battler);
void StealTargetItem(u8 battlerStealer, u8 battlerItem);
u8 GetCatchingBattler(void);
u32 GetHighestStatId(u32 battlerId);

View File

@ -51,6 +51,8 @@ extern const u8 BattleScript_LevelUp[];
extern const u8 BattleScript_RainContinuesOrEnds[];
extern const u8 BattleScript_SnowContinuesOrEnds[];
extern const u8 BattleScript_DamagingWeatherContinues[];
extern const u8 BattleScript_DamagingWeather[];
extern const u8 BattleScript_IceBodyHeal[];
extern const u8 BattleScript_SandStormHailSnowEnds[];
extern const u8 BattleScript_SunlightContinues[];
extern const u8 BattleScript_SunlightFaded[];
@ -84,6 +86,7 @@ extern const u8 BattleScript_DmgHazardsOnBattlerScripting[];
extern const u8 BattleScript_DmgHazardsOnFaintedBattler[];
extern const u8 BattleScript_PerishSongTakesLife[];
extern const u8 BattleScript_PerishSongCountGoesDown[];
extern const u8 BattleScript_AllStatsUpZMove[];
extern const u8 BattleScript_AllStatsUp[];
extern const u8 BattleScript_RapidSpinAway[];
extern const u8 BattleScript_WrapFree[];
@ -268,6 +271,7 @@ extern const u8 BattleScript_WonderRoomEnds[];
extern const u8 BattleScript_MagicRoomEnds[];
extern const u8 BattleScript_TerrainEnds[];
extern const u8 BattleScript_TerrainEnds_Ret[];
extern const u8 BattleScript_GrassyTerrainEnds[];
extern const u8 BattleScript_MudSportEnds[];
extern const u8 BattleScript_WaterSportEnds[];
extern const u8 BattleScript_SturdiedMsg[];
@ -838,5 +842,6 @@ extern const u8 BattleScript_EffectShedTail[];
extern const u8 BattleScript_EffectUpperHand[];
extern const u8 BattleScript_EffectTidyUp[];
extern const u8 BattleScript_EffectSpicyExtract[];
extern const u8 BattleScript_DamageToQuarterTargetHP[];
#endif // GUARD_BATTLE_SCRIPTS_H

View File

@ -1,31 +1,14 @@
#ifndef GUARD_BATTLE_TERASTAL_H
#define GUARD_BATTLE_TERASTAL_H
void PrepareBattlerForTera(u32 battler);
void ActivateTera(u32 battler);
void ApplyBattlerVisualsForTeraAnim(u32 battler);
bool32 CanTerastallize(u32 battler);
u32 GetBattlerTeraType(u32 battler);
bool32 IsTerastallized(u32 battler);
void ExpendTypeStellarBoost(u32 battler, u32 type);
bool32 IsTypeStellarBoosted(u32 battler, u32 type);
uq4_12_t GetTeraMultiplier(u32 battler, u32 type);
u16 GetTeraTypeRGB(u32 type);
void ChangeTeraTriggerSprite(u8 spriteId, u8 animId);
void CreateTeraTriggerSprite(u8 battler, u8 palId);
bool32 IsTeraTriggerSpriteActive(void);
void HideTeraTriggerSprite(void);
void DestroyTeraTriggerSprite(void);
void TeraIndicator_LoadSpriteGfx(void);
bool32 TeraIndicator_ShouldBeInvisible(u32 battler);
u8 TeraIndicator_GetSpriteId(u32 healthboxSpriteId);
void TeraIndicator_SetVisibilities(u32 healthboxId, bool32 invisible);
void TeraIndicator_UpdateOamPriorities(u32 healthboxId, u32 oamPriority);
void TeraIndicator_UpdateLevel(u32 healthboxId, u32 level);
void TeraIndicator_CreateSprite(u32 battler, u32 healthboxSpriteId);
void TeraIndicator_DestroySprite(u32 healthboxSpriteId);
void TeraIndicator_UpdateType(u32 battler, u32 healthboxSpriteId);
#endif

View File

@ -32,8 +32,6 @@ enum {
ABILITYEFFECT_IMMUNITY,
ABILITYEFFECT_SYNCHRONIZE,
ABILITYEFFECT_ATK_SYNCHRONIZE,
ABILITYEFFECT_TRACE1,
ABILITYEFFECT_TRACE2,
ABILITYEFFECT_MOVE_END_OTHER,
ABILITYEFFECT_NEUTRALIZINGGAS,
ABILITYEFFECT_FIELD_SPORT, // Only used if B_SPORT_TURNS >= GEN_6
@ -157,7 +155,7 @@ bool32 TryChangeBattleWeather(u32 battler, u32 weatherEnumId, bool32 viaAbility)
u32 AbilityBattleEffects(u32 caseID, u32 battler, u32 ability, u32 special, u32 moveArg);
bool32 TryPrimalReversion(u32 battler);
bool32 IsNeutralizingGasOnField(void);
bool32 IsMoldBreakerTypeAbility(u32 ability);
bool32 IsMoldBreakerTypeAbility(u32 battler, u32 ability);
u32 GetBattlerAbility(u32 battler);
u32 IsAbilityOnSide(u32 battler, u32 ability);
u32 IsAbilityOnOpposingSide(u32 battler, u32 ability);
@ -196,11 +194,13 @@ s32 GetStealthHazardDamage(u8 hazardType, u32 battler);
s32 GetStealthHazardDamageByTypesAndHP(u8 hazardType, u8 type1, u8 type2, u32 maxHp);
bool32 CanMegaEvolve(u32 battler);
bool32 CanUltraBurst(u32 battler);
void ActivateMegaEvolution(u32 battler);
void ActivateUltraBurst(u32 battler);
bool32 IsBattlerMegaEvolved(u32 battler);
bool32 IsBattlerPrimalReverted(u32 battler);
bool32 IsBattlerUltraBursted(u32 battler);
u16 GetBattleFormChangeTargetSpecies(u32 battler, u16 method);
bool32 TryBattleFormChange(u32 battler, u16 method);
bool32 TryBattleFormChange(u32 battler, u32 method);
bool32 DoBattlersShareType(u32 battler1, u32 battler2);
bool32 CanBattlerGetOrLoseItem(u32 battler, u16 itemId);
u32 GetIllusionMonSpecies(u32 battler);
@ -247,10 +247,10 @@ bool32 MoveHasChargeTurnAdditionalEffect(u32 move);
bool32 CanTargetPartner(u32 battlerAtk, u32 battlerDef);
bool32 TargetFullyImmuneToCurrMove(u32 BattlerAtk, u32 battlerDef);
bool32 CanSleep(u32 battler);
bool32 CanBePoisoned(u32 battlerAttacker, u32 battlerTarget);
bool32 CanBeBurned(u32 battler);
bool32 CanBeParalyzed(u32 battler);
bool32 CanBeSlept(u32 battler, u32 ability);
bool32 CanBePoisoned(u32 battlerAtk, u32 battlerDef, u32 defAbility);
bool32 CanBeBurned(u32 battler, u32 ability);
bool32 CanBeParalyzed(u32 battler, u32 ability);
bool32 CanBeFrozen(u32 battler);
bool32 CanGetFrostbite(u32 battler);
bool32 CanBeConfused(u32 battler);

View File

@ -13,19 +13,17 @@ struct SignatureZMove
u16 zmove;
};
bool8 IsZMove(u16 move);
void QueueZMove(u8 battler, u16 baseMove);
bool32 IsViableZMove(u8 battler, u16 move);
bool32 TryChangeZIndicator(u8 battler, u8 moveIndex);
void CreateZMoveTriggerSprite(u8, bool8);
void HideZMoveTriggerSprite(void);
bool32 IsZMoveTriggerSpriteActive(void);
void DestroyZMoveTriggerSprite(void);
u16 GetTypeBasedZMove(u16 move, u8 battler);
bool32 IsZMove(u32 move);
bool32 CanUseZMove(u32 battler);
u32 GetUsableZMove(u32 battler, u32 move);
void ActivateZMove(u32 battler);
bool32 IsViableZMove(u32 battler, u32 move);
bool32 TryChangeZTrigger(u32 battler, u32 moveIndex);
u32 GetTypeBasedZMove(u32 move);
u32 GetSignatureZMove(u32 move, u32 species, u32 item);
bool32 MoveSelectionDisplayZMove(u16 zmove, u32 battler);
void SetZEffect(void);
bool32 IsZMoveUsable(u8 battler, u16 moveIndex);
void GetUsableZMoves(u8 battler, u16 *moves);
u16 GetZMovePower(u16 move);
void AssignUsableZMoves(u32 battler, u16 *moves);
u32 GetZMovePower(u32 move);
#endif // GUARD_BATTLE_Z_MOVE_H

View File

@ -138,6 +138,7 @@
#define B_WEATHER_FORMS GEN_LATEST // In Gen5+, Castform and Cherrim revert to their base form upon losing their respective ability. Cherrim needs Flower Gift to swap forms.
#define B_SYMBIOSIS_GEMS GEN_LATEST // In Gen7+, Symbiosis passes an item after a gem-boosted attack. Previously, items are passed before the gem-boosted attack hits, making the item effect apply.
#define B_ABSORBING_ABILITY_STRING GEN_LATEST // In Gen5+, the abilities that absorb moves of a certain type use a generic string for stat increases and decreases.
#define B_REDIRECT_ABILITY_IMMUNITY GEN_LATEST // In Gen5+, Pokémon with Lightning Rod/Storm Drain become immune to Electric/Water-type moves and increase their Sp. Attack by 1 stage on top of the redirecting effect.
#define B_LEAF_GUARD_PREVENTS_REST GEN_LATEST // In Gen5+, Leaf Guard prevents the use of Rest in harsh sunlight.
#define B_SNOW_WARNING GEN_LATEST // In Gen9+, Snow Warning will summon snow instead of hail.
#define B_TRANSISTOR_BOOST GEN_LATEST // In Gen9+, Transistor will only boost Electric-type moves by 1.3x as opposed to 1.5x.
@ -223,6 +224,7 @@
#define B_EXPANDED_MOVE_NAMES TRUE // If set to FALSE, move names are decreased from 16 characters to 12 characters.
#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_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
// 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)
@ -266,4 +268,9 @@
#define B_NEW_IMPACT_PALETTE TRUE // If set to TRUE, it updates the basic 'hit' palette.
#define B_NEW_SURF_PARTICLE_PALETTE TRUE // If set to TRUE, it updates Surf's wave palette.
// Poké Ball animation and sounds
#define B_ENEMY_THROW_BALLS GEN_LATEST // In GEN_6+, enemy Trainers throw Poké Balls into battle instead of them just appearing on the ground and opening.
#define B_ENEMY_THROW_BALLS_SOUND GEN_LATEST // In GEN_5+, enemy Trainer's Poké Balls make a sound when thrown to send out a Pokémon. This can only be used when B_ENEMY_THROW_BALLS is set to GEN_6 or later.
#define B_PLAYER_THROW_BALLS_SOUND GEN_LATEST // In GEN_5+, the player's Poké Balls make a sound when thrown to send out a Pokémon.
#endif // GUARD_CONFIG_BATTLE_H

View File

@ -80,4 +80,7 @@
#define UNITS UNITS_IMPERIAL
#define CHAR_DEC_SEPARATOR CHAR_PERIOD // CHAR_PERIOD is used as a decimal separator only in the UK and the US. The rest of the world uses CHAR_COMMA.
// Naming Screen
#define AUTO_LOWERCASE_KEYBOARD GEN_LATEST // Starting in GEN_6, after entering the first uppercase character, the keyboard switches to lowercase letters.
#endif // GUARD_CONFIG_GENERAL_H

View File

@ -7,9 +7,9 @@
// Other settings
#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_TIMES_OF_DAY GEN_LATEST // Different generations have the times of day change at different times.
#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_FRLG_WHITEOUT FALSE // If enabled, shows an additional whiteout message and post whiteout event script with healing NPC.
// These generational defines only make a distinction for Berries and the OW_PC_MOVE_ORDER
#define GEN_6_XY GEN_6
@ -45,7 +45,7 @@
// (You should not use 48x48 sprites/tables for compressed gfx)
// 16x32, 32x32, 64x64 etc are fine
// Follower Pokémon
#define OW_FOLLOWERS_ENABLED TRUE // Enables follower Pokémon, HGSS style. Requires OW_POKEMON_OBJECT_EVENTS.
#define OW_FOLLOWERS_ENABLED FALSE // Enables follower Pokémon, HGSS style. Requires OW_POKEMON_OBJECT_EVENTS. Note that additional scripting may be required for them to be fully supported!
#define OW_FOLLOWERS_BOBBING TRUE // If true, follower pokemon will bob up and down during their idle & walking animations
#define OW_FOLLOWERS_POKEBALLS TRUE // Followers will emerge from the pokeball they are stored in, instead of a normal pokeball
@ -60,9 +60,18 @@
#define OW_STORM_DRAIN GEN_LATEST // In Gen8+, if a Pokémon with Storm Drain is leading the party, there is a 50% chance to encounter a Water-type Pokémon.
#define OW_FLASH_FIRE GEN_LATEST // In Gen8+, if a Pokémon with Flash Fire is leading the party, there is a 50% chance to encounter a Fire-type Pokémon.
// These generational defines only make a distinction for OW_ALTERED_TIME_RATIO
#define GEN_8_PLA GEN_LATEST + 2
//Time
#define OW_TIMES_OF_DAY GEN_LATEST // Different generations have the times of day change at different times.
#define OW_USE_FAKE_RTC FALSE // When TRUE, seconds on the in-game clock will only advance once every 60 playTimeVBlanks (every 60 frames).
#define OW_ALTERED_TIME_RATIO GEN_LATEST // In GEN_8_PLA, the time in game moves forward 60 seconds for every second in the RTC. In GEN_9, it is 20 seconds. This has no effect if OW_USE_FAKE_RTC is FALSE.
// Overworld flags
// To use the following features in scripting, replace the 0s with the flag ID you're assigning it to.
// Eg: Replace with FLAG_UNUSED_0x264 so you can use that flag to toggle the feature.
#define OW_FLAG_PAUSE_TIME 0 // If this flag is set and OW_USE_FAKE_RTC is enabled, seconds on the in-game clock will not advance.
#define OW_FLAG_NO_ENCOUNTER 0 // If this flag is set, wild encounters will be disabled.
#define OW_FLAG_NO_TRAINER_SEE 0 // If this flag is set, trainers will not battle the player unless they're talked to.
#define OW_FLAG_NO_COLLISION 0 // If this flag is set, the player will be able to walk over tiles with collision. Mainly intended for debugging purposes.
@ -83,8 +92,11 @@
#define OW_POPUP_BW_COLOR_WHITE 1 // White pop-up from W2
// Configuration
#define OW_POPUP_BW_COLOR OW_POPUP_BW_COLOR_BLACK // B2W2 use different colors for their map pop-ups.
#define OW_POPUP_BW_COLOR OW_POPUP_BW_COLOR_BLACK // B2W2 use different colors for their map pop-ups.
#define OW_POPUP_BW_TIME_MODE OW_POPUP_BW_TIME_NONE // Determines what type of time is shown.
#define OW_POPUP_BW_ALPHA_BLEND FALSE // Enables alpha blending/transparency for the pop-ups. Mainly intended to be used with the black color option.
// Pokémon Center
#define OW_IGNORE_EGGS_ON_HEAL GEN_LATEST // In Gen 4+, the nurse in the Pokémon Center does not heal Eggs on healing machine.
#endif // GUARD_CONFIG_OVERWORLD_H

View File

@ -39,15 +39,18 @@
#define P_ARCEUS_UNIQUE_FORM_ICONS GEN_LATEST // Since Gen 9, Arceus additionally changes its icon to reflect its current form.
// Other settings
#define P_CUSTOM_GENDER_DIFF_ICONS TRUE // If TRUE, will give more Pokémon custom icons for their female forms, i.e. Hippopotas and Hippowdon
#define P_FOOTPRINTS TRUE // If TRUE, Pokémon will have footprints (as was the case up to Gen 5 and in BDSP). Disabling this saves some ROM space.
#define P_CRIES_ENABLED TRUE // If TRUE, Pokémon will have cries. Disabling this saves around a LOT of ROM space (over 25%!), but instead we recommend disabling individual unused Pokémon families in include/config/species_enabled.h.
#define P_LEGENDARY_PERFECT_IVS GEN_LATEST // Since Gen 6, Legendaries, Mythicals and Ultra Beasts found in the wild or given through gifts have at least 3 perfect IVs.
#define P_EV_CAP GEN_LATEST // Since Gen 6, the max EVs per stat is 252 instead of 255.
#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_EGG_CYCLE_LENGTH GEN_LATEST // Since Gen 8, egg cycles take half as many steps as before.
#define P_TWO_FRAME_FRONT_SPRITES TRUE // In Pokémon Emerald, Pokémon front sprites always consist of two frames. This config can revert it to only use the first frame, as is the case in the other Gen 3 games.
#define P_CUSTOM_GENDER_DIFF_ICONS TRUE // If TRUE, will give more Pokémon custom icons for their female forms, i.e. Hippopotas and Hippowdon
#define P_FOOTPRINTS TRUE // If TRUE, Pokémon will have footprints (as was the case up to Gen 5 and in BDSP). Disabling this saves some ROM space.
#define P_CRIES_ENABLED TRUE // If TRUE, Pokémon will have cries. Disabling this saves around a LOT of ROM space (over 25%!), but instead we recommend disabling individual unused Pokémon families in include/config/species_enabled.h.
#define P_LEGENDARY_PERFECT_IVS GEN_LATEST // Since Gen 6, Legendaries, Mythicals and Ultra Beasts found in the wild or given through gifts have at least 3 perfect IVs.
#define P_EV_CAP GEN_LATEST // Since Gen 6, the max EVs per stat is 252 instead of 255.
#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_CAN_FORGET_HIDDEN_MOVE FALSE // If TRUE, Pokémon can forget any move, even if it is a Hidden Move.
#define P_EGG_CYCLE_LENGTH GEN_LATEST // Since Gen 8, egg cycles take half as many steps as before.
#define P_TWO_FRAME_FRONT_SPRITES TRUE // In Pokémon Emerald, Pokémon front sprites always consist of two frames. This config can revert it to only use the first frame, as is the case in the other Gen 3 games.
#define P_ONLY_OBTAINABLE_SHINIES FALSE // If TRUE, Pokémon encountered in the Battle Pyramid 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
// Learnset helper toggles
#define P_LEARNSET_HELPER_TEACHABLE TRUE // If TRUE, teachable_learnsets.h will be populated by tools/learnset_helpers/teachable.py using the included JSON files based on available TMs and tutors.

File diff suppressed because it is too large Load Diff

View File

@ -32,25 +32,26 @@
#define AI_FLAG_RISKY (1 << 4)
#define AI_FLAG_PREFER_STRONGEST_MOVE (1 << 5)
#define AI_FLAG_PREFER_BATON_PASS (1 << 6)
#define AI_FLAG_DOUBLE_BATTLE (1 << 7) // removed, split between AI_FLAG_CHECK_BAD_MOVE & AI_FLAG_CHECK_GOOD_MOVE
#define AI_FLAG_DOUBLE_BATTLE (1 << 7) // Automatically set for double battles, handles AI behaviour with partner
#define AI_FLAG_HP_AWARE (1 << 8)
#define AI_FLAG_POWERFUL_STATUS (1 << 9) // AI prefers moves that set up field effects or side statuses, even if the user can faint the target
// New, Trainer Handicap Flags
#define AI_FLAG_NEGATE_UNAWARE (1 << 10) // AI is NOT aware of negating effects like wonder room, mold breaker, etc
#define AI_FLAG_WILL_SUICIDE (1 << 11) // AI will use explosion / self destruct / final gambit / etc
// New, Trainer Strategy Flags
#define AI_FLAG_HELP_PARTNER (1 << 12) // AI can try to help partner. If not set, will tend not to target partner
#define AI_FLAG_PREFER_STATUS_MOVES (1 << 13) // AI gets a score bonus for status moves. Should be combined with AI_FLAG_CHECK_BAD_MOVE to prevent using only status moves
#define AI_FLAG_STALL (1 << 14) // AI stalls battle and prefers secondary damage/trapping/etc. TODO not finished
#define AI_FLAG_SMART_SWITCHING (1 << 15) // AI includes a lot more switching checks. Automatically includes AI_FLAG_SMART_MON_CHOICES.
#define AI_FLAG_ACE_POKEMON (1 << 16) // AI has an Ace Pokemon. The last Pokemon in the party will not be used until it's the last one remaining.
#define AI_FLAG_OMNISCIENT (1 << 17) // AI has full knowledge of player moves, abilities, hold items
#define AI_FLAG_SMART_MON_CHOICES (1 << 18) // AI will make smarter decisions when choosing which mon to send out mid-battle and after a KO, which are separate decisions. Automatically included by AI_FLAG_SMART_SWITCHING.
#define AI_FLAG_CONSERVATIVE (1 << 19) // AI assumes all moves will low roll damage
#define AI_FLAG_PREFER_STATUS_MOVES (1 << 12) // AI gets a score bonus for status moves. Should be combined with AI_FLAG_CHECK_BAD_MOVE to prevent using only status moves
#define AI_FLAG_STALL (1 << 13) // AI stalls battle and prefers secondary damage/trapping/etc. TODO not finished
#define AI_FLAG_SMART_SWITCHING (1 << 14) // AI includes a lot more switching checks. Automatically includes AI_FLAG_SMART_MON_CHOICES.
#define AI_FLAG_ACE_POKEMON (1 << 15) // AI has an Ace Pokemon. The last Pokemon in the party will not be used until it's the last one remaining.
#define AI_FLAG_OMNISCIENT (1 << 16) // AI has full knowledge of player moves, abilities, hold items
#define AI_FLAG_SMART_MON_CHOICES (1 << 17) // AI will make smarter decisions when choosing which mon to send out mid-battle and after a KO, which are separate decisions. Automatically included by AI_FLAG_SMART_SWITCHING.
#define AI_FLAG_CONSERVATIVE (1 << 18) // AI assumes all moves will low roll damage
#define AI_FLAG_SEQUENCE_SWITCHING (1 << 19) // AI switches in mons in exactly party order, and never switches mid-battle
#define AI_FLAG_COUNT 20
// 'other' ai logic flags
#define AI_FLAG_DYNAMIC_FUNC (1 << 28) // Create custom AI functions for specific battles via "setdynamicaifunc" cmd
#define AI_FLAG_ROAMING (1 << 29)
#define AI_FLAG_SAFARI (1 << 30)
#define AI_FLAG_FIRST_BATTLE (1 << 31)

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