Merge remote-tracking branch '_pret_origin/master' into multilanguage/sync

# Conflicts:
#	Makefile
#	data/maps/BattleFrontier_BattleTowerLobby/scripts.inc
#	data/maps/OldaleTown/scripts.inc
#	data/maps/Route110_TrickHousePuzzle7/scripts.inc
#	data/maps/Route110_TrickHousePuzzle8/scripts.inc
#	data/scripts/roulette.inc
#	data/tilesets/graphics.inc
#	data/tilesets/metatiles.inc
#	graphics/trainer_card/0star_fr.pal
#	graphics/trainer_card/four_stars_fr.pal
#	graphics/trainer_card/frlg/0star.pal
#	graphics/trainer_card/frlg/blue.pal
#	graphics/trainer_card/frlg/bronze.pal
#	graphics/trainer_card/frlg/card.png
#	graphics/trainer_card/frlg/four_stars.pal
#	graphics/trainer_card/frlg/gold.pal
#	graphics/trainer_card/frlg/green.pal
#	graphics/trainer_card/frlg/one_star.pal
#	graphics/trainer_card/frlg/silver.pal
#	graphics/trainer_card/frlg/three_stars.pal
#	graphics/trainer_card/frlg/two_stars.pal
#	graphics/trainer_card/one_star_fr.pal
#	graphics/trainer_card/three_stars_fr.pal
#	graphics/trainer_card/two_stars_fr.pal
#	src/battle_message.c
#	src/battle_tent.c
#	src/berry_blender.c
#	src/berry_tag_screen.c
#	src/data/bard_music/length_table.h
#	src/data/credits.h
#	src/data/items.h
#	src/data/pokemon/pokedex_orders.h
#	src/data/region_map/region_map_entries.h
#	src/easy_chat.c
#	src/field_region_map.c
#	src/graphics.c
#	src/item.c
#	src/item_menu.c
#	src/menu_specialized.c
#	src/pokedex.c
#	src/pokedex_cry_screen.c
#	src/pokemon_jump.c
#	src/pokenav_conditions_search_results.c
#	src/pokenav_match_call_gfx.c
#	src/pokenav_ribbons_list.c
#	src/shop.c
#	src/trade.c
#	src/trainer_card.c
#	src/wireless_communication_status_screen.c
This commit is contained in:
Eduardo Quezada
2024-07-05 18:38:49 -04:00
1867 changed files with 65437 additions and 65493 deletions

View File

@@ -1,5 +1,11 @@
#!/usr/bin/perl
# Usage:
# calcrom.pl <mapfile> [--data]
#
# mapfile: path to .map file output by LD
# data: set to output % breakdown of data
use IPC::Cmd qw[ run ];
use Getopt::Long;
@@ -65,12 +71,13 @@ my $base_cmd = "nm $elffname | awk '{print \$3}' | grep '^[^_].\\{4\\}' | uniq";
# This looks for Unknown_, Unknown_, or sub_, followed by an address. Note that
# it matches even if stuff precedes the unknown, like sUnknown/gUnknown.
my $undoc_cmd = "grep '[Uu]nknown_[0-9a-fA-F]\\{5,7\\}\\|sub_[0-9a-fA-F]\\{5,7\\}'";
my $undoc_regex = "'[Uu]nknown_[0-9a-fA-F]\\{5,7\\}\\|sub_[0-9a-fA-F]\\{5,7\\}'";
# This looks for every symbol with an address at the end of it. Some things are
# given a name based on their type / location, but still have an unknown purpose.
# For example, FooMap_EventScript_FFFFFFF.
my $partial_doc_cmd = "grep '_[0-28][0-9a-fA-F]\\{5,7\\}'";
# The above may be double counted here, and will need to be filtered out.
my $partial_doc_regex = "'_[0-28][0-9a-fA-F]\\{5,7\\}'";
my $count_cmd = "wc -l";
@@ -87,7 +94,7 @@ my $total_syms_as_string;
my $undocumented_as_string;
(run (
command => "$base_cmd | $undoc_cmd | $count_cmd",
command => "$base_cmd | grep $undoc_regex | $count_cmd",
buffer => \$undocumented_as_string,
timeout => 60
))
@@ -95,7 +102,7 @@ my $undocumented_as_string;
my $partial_documented_as_string;
(run (
command => "$base_cmd | $partial_doc_cmd | $count_cmd",
command => "$base_cmd | grep $partial_doc_regex | grep -v $undoc_regex | $count_cmd",
buffer => \$partial_documented_as_string,
timeout => 60
))
@@ -112,7 +119,7 @@ my $undocumented = $undocumented_as_string + 0;
$partial_documented_as_string =~ s/^\s+|\s+$//g;
my $partial_documented = $partial_documented_as_string + 0;
(($partial_documented != 0) or (($partial_documented == 0) and ($partial_documented_as_string eq "0")))
or die "ERROR: Cannot convert string to num: '$partial_documented_as_string'";
or die "ERROR: Cannot convert string to num: '$partial_documented_as_string'";
$total_syms_as_string =~ s/^\s+|\s+$//g;
my $total_syms = $total_syms_as_string + 0;
@@ -126,9 +133,6 @@ my $total = $src + $asm;
my $srcPct = sprintf("%.4f", 100 * $src / $total);
my $asmPct = sprintf("%.4f", 100 * $asm / $total);
# partial_documented is double-counting the unknown_* and sub_* symbols.
$partial_documented = $partial_documented - $undocumented;
my $documented = $total_syms - ($undocumented + $partial_documented);
my $docPct = sprintf("%.4f", 100 * $documented / $total_syms);
my $partialPct = sprintf("%.4f", 100 * $partial_documented / $total_syms);

4
.gitignore vendored
View File

@@ -21,7 +21,6 @@ sound/**/*.bin
sound/songs/midi/*.s
tools/agbcc
*.map
*.ld
*.bat
*.dump
*.sa*
@@ -30,7 +29,8 @@ build/
.DS_Store
*.ddump
.idea/
porymap.project.cfg
porymap.*.cfg
prefabs.json
.vscode/
*.a
.fuse_hidden*

View File

@@ -9,7 +9,7 @@ If you run into trouble, ask for help on Discord or IRC (see [README.md](README.
## Windows
Windows has instructions for building with three possible terminals, providing 3 different options in case the user stumbles upon unexpected errors.
- [Windows 10 (WSL1)](#windows-10-wsl1) (**Fastest, highly recommended**, Windows 10 only)
- [Windows 10/11 (WSL1)](#windows-1011-wsl1) (**Fastest, highly recommended**, Windows 10 and 11 only)
- [Windows (msys2)](#windows-msys2) (Second fastest)
- [Windows (Cygwin)](#windows-cygwin) (Slowest)
@@ -26,7 +26,7 @@ All of the Windows instructions assume that the default drive is C:\\. If this d
**A note of caution**: As Windows 7 is officially unsupported by Microsoft and Windows 8 has very little usage, some maintainers are unwilling to maintain the Windows 7/8 instructions. Thus, these instructions may break in the future with fixes taking longer than fixes to the Windows 10 instructions.
## Windows 10 (WSL1)
## Windows 10/11 (WSL1)
WSL1 is the preferred terminal to build **pokeemerald**. The following instructions will explain how to install WSL1 (referred to interchangeably as WSL).
- If WSL (Debian or Ubuntu) is **not installed**, then go to [Installing WSL1](#Installing-WSL1).
- Otherwise, if WSL is installed, but it **hasn't previously been set up for another decompilation project**, then go to [Setting up WSL1](#Setting-up-WSL1).
@@ -106,7 +106,7 @@ cd /mnt/c/Users/<user>/Desktop/decomps
> Note 2: If the path has spaces, then the path must be wrapped with quotations, e.g. `cd "/mnt/c/users/<user>/Desktop/decomp folder"`.
> Note 3: Windows path names are case-insensitive so adhering to capitalization isn't needed
</details>
If this works, then proceed to [Installation](#installation).
Otherwise, ask for help on Discord or IRC (see [README.md](README.md)), or continue reading below for [Windows instructions using msys2](#windows-msys2).
@@ -125,19 +125,53 @@ Otherwise, ask for help on Discord or IRC (see [README.md](README.md)), or conti
Note that in msys2, Copy is Ctrl+Insert and Paste is Shift+Insert.
1. Open msys2 at C:\devkitPro\msys2\mingw64.exe or run `C:\devkitPro\msys2\msys2_shell.bat -mingw64`.
1. Open msys2 at C:\devkitPro\msys2\msys2_shell.bat.
2. Certain packages are required to build pokeemerald. Install these by running the following command:
2. Certain packages are required to build pokeemerald. Install these by running the following two commands:
```bash
pacman -S make zlib-devel git mingw-w64-x86_64-gcc mingw-w64-x86_64-libpng
pacman -Sy msys2-keyring
pacman -S make gcc zlib-devel git
```
<details>
<summary><i>Note...</i></summary>
> This command will ask for confirmation, just enter the yes action when prompted.
> The commands will ask for confirmation, just enter the yes action when prompted.
</details>
3. Download [libpng](https://sourceforge.net/projects/libpng/files/libpng16/1.6.37/libpng-1.6.37.tar.xz/download).
4. Change directory to where libpng was downloaded. By default, msys2 will start in the current user's profile folder, located at **C:\Users\\&#8288;_\<user>_**, where *\<user>* is your Windows username. In most cases, libpng should be saved within a subfolder of the profile folder. For example, if libpng was saved to **C:\Users\\_\<user>_\Downloads** (the Downloads location for most users), enter this command:
```bash
cd Downloads
```
<details>
<summary><i>Notes...</i></summary>
> Note 1: While not shown, msys uses forward slashes `/` instead of backwards slashes `\` as the directory separator.
> Note 2: If the path has spaces, then the path must be wrapped with quotations, e.g. `cd "Downloads/My Downloads"`.
> Note 3: Windows path names are case-insensitive so adhering to capitalization isn’t needed.
> Note 4: If libpng was saved elsewhere, you will need to specify the full path to where libpng was downloaded, e.g. `cd c:/devkitpro/msys2` if it was saved there.
</details>
5. Run the following commands to uncompress and install libpng.
```bash
tar xf libpng-1.6.37.tar.xz
cd libpng-1.6.37
./configure --prefix=/usr
make check
make install
```
6. Then finally, run the following command to change back to the user profile folder.
```bash
cd
```
### Choosing where to store pokeemerald (msys2)
At this point, you can choose a folder to store pokeemerald into. If you're okay with storing pokeemerald in the user profile folder, then proceed to [Installation](#installation). Otherwise, you'll need to account for where pokeemerald is stored when changing directory to the pokeemerald folder.
@@ -216,7 +250,7 @@ Note that the directory **must exist** in Windows. If you want to store pokeemer
> Note 1: If the path has spaces, then the path must be wrapped with quotations, e.g. `cd "c:/users/<user>/Desktop/decomp folder"`.
> Note 2: Windows path names are case-insensitive so adhering to capitalization isn't needed
</details>
If this works, then proceed to [Installation](#installation). Otherwise, ask for help on Discord or IRC (see [README.md](README.md)).
## macOS
@@ -320,6 +354,13 @@ Then proceed to [Choosing where to store pokeemerald (Linux)](#choosing-where-to
> [install devkitARM on Arch Linux](#installing-devkitarm-on-arch-linux).
</details>
### 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 (Linux)](#choosing-where-to-store-pokeemerald-linux).
### Other distributions
_(Specific instructions for other distributions would be greatly appreciated!)_
@@ -539,7 +580,7 @@ devkitARM is now installed.
devkitARM is now installed.
### Installing devkitARM on Arch Linux
1. Follow [devkitPro's instructions](https://devkitpro.org/wiki/devkitPro_pacman#Customising_Existing_Pacman_Install) to configure `pacman` to download devkitPro packages.
2. Install `gba-dev`: run the following command as root.

View File

@@ -33,7 +33,7 @@ LD := $(PREFIX)ld
# note: the makefile must be set up so MODERNCC is never called
# if MODERN=0
MODERNCC := $(PREFIX)gcc
PATH_MODERNCC := PATH=$(TOOLCHAIN)/bin:PATH $(MODERNCC)
PATH_MODERNCC := PATH="$(PATH)" $(MODERNCC)
ifeq ($(OS),Windows_NT)
EXE := .exe
@@ -103,7 +103,7 @@ else
endif
SHELL := /bin/bash -o pipefail
SHELL := bash -o pipefail
ELF = $(ROM:.gba=.elf)
MAP = $(ROM:.gba=.map)
@@ -148,8 +148,6 @@ ifneq ($(MODERN),1)
CPPFLAGS += -I tools/agbcc/include -I tools/agbcc -nostdinc -undef
endif
LDFLAGS = -Map ../../$(MAP)
SHA1 := $(shell { command -v sha1sum || command -v shasum; } 2>/dev/null) -c
GFX := tools/gbagfx/gbagfx$(EXE)
AIF := tools/aif2pcm/aif2pcm$(EXE)
@@ -163,7 +161,8 @@ JSONPROC := tools/jsonproc/jsonproc$(EXE)
PERL := perl
TOOLDIRS := $(filter-out tools/agbcc tools/binutils,$(wildcard tools/*))
# Inclusive list. If you don't want a tool to be built, don't add it here.
TOOLDIRS := tools/aif2pcm tools/bin2c tools/gbafix tools/gbagfx tools/jsonproc tools/mapjson tools/mid2agb tools/preproc tools/ramscrgen tools/rsfont tools/scaninc
TOOLBASE = $(TOOLDIRS:tools/%=%)
TOOLS = $(foreach tool,$(TOOLBASE),tools/$(tool)/$(tool)$(EXE))
@@ -261,8 +260,7 @@ clean-tools:
@$(foreach tooldir,$(TOOLDIRS),$(MAKE) clean -C $(tooldir);)
mostlyclean: tidy
rm -f $(SAMPLE_SUBDIR)/*.bin
rm -f $(CRY_SUBDIR)/*.bin
find sound -iname '*.bin' -exec rm {} +
rm -f $(MID_SUBDIR)/*.s
find . \( -iname '*.1bpp' -o -iname '*.4bpp' -o -iname '*.8bpp' -o -iname '*.gbapal' -o -iname '*.lz' -o -iname '*.rl' -o -iname '*.latfont' -o -iname '*.hwjpnfont' -o -iname '*.fwjpnfont' \) -exec rm {} +
rm -f $(DATA_ASM_SUBDIR)/layouts/layouts.inc $(DATA_ASM_SUBDIR)/layouts/layouts_table.inc
@@ -275,7 +273,7 @@ tidy:
$(RM) $(ALL_BUILDS:%=poke%{.gba,.elf,.map})
$(RM) $(MODERN_BUILDS:%=poke%{.gba,.elf,.map})
$(RM) -r build
ifneq ($(MODERN),0)
$(C_BUILDDIR)/berry_crush.o: override CFLAGS += -Wno-address-of-packed-member
endif
@@ -432,19 +430,20 @@ $(OBJ_DIR)/sym_ewram.ld: sym_ewram.txt
$(RAMSCRGEN) ewram_data $< ENGLISH > $@
ifeq ($(MODERN),0)
LD_SCRIPT := ld_script.txt
LD_SCRIPT := ld_script.ld
LD_SCRIPT_DEPS := $(OBJ_DIR)/sym_bss.ld $(OBJ_DIR)/sym_common.ld $(OBJ_DIR)/sym_ewram.ld
else
LD_SCRIPT := ld_script_modern.txt
LD_SCRIPT_DEPS :=
LD_SCRIPT := ld_script_modern.ld
LD_SCRIPT_DEPS :=
endif
$(OBJ_DIR)/ld_script.ld: $(LD_SCRIPT) $(LD_SCRIPT_DEPS)
cd $(OBJ_DIR) && sed "s#tools/#../../tools/#g" ../../$(LD_SCRIPT) > ld_script.ld
LDFLAGS = -Map ../../$(MAP)
$(ELF): $(OBJ_DIR)/ld_script.ld $(OBJS) libagbsyscall
@echo "cd $(OBJ_DIR) && $(LD) $(LDFLAGS) -T ld_script.ld -o ../../$@ <objects> <lib>"
@cd $(OBJ_DIR) && $(LD) $(LDFLAGS) -T ld_script.ld -o ../../$@ $(OBJS_REL) $(LIB)
@cd $(OBJ_DIR) && $(LD) $(LDFLAGS) -T ld_script.ld --print-memory-usage -o ../../$@ $(OBJS_REL) $(LIB) | cat
$(FIX) $@ -t"$(TITLE)" -c$(GAME_CODE) -m$(MAKER_CODE) -r$(GAME_REVISION) --silent
$(ROM): $(ELF)

View File

@@ -11,24 +11,4 @@ It builds the following ROMs:
To set up the repository, see [INSTALL.md](INSTALL.md).
## See also
Other disassembly and/or decompilation projects:
* [**Pokémon Red and Blue**](https://github.com/pret/pokered)
* [**Pokémon Gold and Silver (Space World '97 demo)**](https://github.com/pret/pokegold-spaceworld)
* [**Pokémon Yellow**](https://github.com/pret/pokeyellow)
* [**Pokémon Trading Card Game**](https://github.com/pret/poketcg)
* [**Pokémon Pinball**](https://github.com/pret/pokepinball)
* [**Pokémon Stadium**](https://github.com/pret/pokestadium)
* [**Pokémon Gold and Silver**](https://github.com/pret/pokegold)
* [**Pokémon Crystal**](https://github.com/pret/pokecrystal)
* [**Pokémon Ruby and Sapphire**](https://github.com/pret/pokeruby)
* [**Pokémon Pinball: Ruby & Sapphire**](https://github.com/pret/pokepinballrs)
* [**Pokémon FireRed and LeafGreen**](https://github.com/pret/pokefirered)
* [**Pokémon Mystery Dungeon: Red Rescue Team**](https://github.com/pret/pmd-red)
## Contacts
You can find us on [Discord](https://discord.gg/d5dubZ3) and [IRC](https://web.libera.chat/?#pret).
For contacts and other pret projects, see [pret.github.io](https://pret.github.io/).

View File

@@ -550,38 +550,38 @@
.2byte \param1
.4byte \param2
.endm
@ useful script macros
.macro get_curr_move_type
get_type AI_TYPE_MOVE
.endm
.macro get_user_type1
get_type AI_TYPE1_USER
.endm
.macro get_user_type2
get_type AI_TYPE2_USER
.endm
.macro get_target_type1
get_type AI_TYPE1_TARGET
.endm
.macro get_target_type2
get_type AI_TYPE2_TARGET
.endm
.macro if_ability battler:req, ability:req, ptr:req
check_ability \battler, \ability
if_equal 1, \ptr
.endm
.macro if_no_ability battler:req, ability:req, ptr:req
check_ability \battler, \ability
if_equal 0, \ptr
.endm
.macro if_type battler:req, type:req, ptr:req
is_of_type \battler, \type
if_equal 1, \ptr
@@ -591,20 +591,20 @@
is_of_type \battler, \type
if_equal 0, \ptr
.endm
.macro if_target_faster ptr:req
if_user_goes 1, \ptr
.endm
.macro if_user_faster ptr:req
if_user_goes 0, \ptr
.endm
.macro if_double_battle ptr:req
is_double_battle
if_equal 1, \ptr
.endm
.macro if_not_double_battle ptr:req
is_double_battle
if_equal 0, \ptr
@@ -613,7 +613,7 @@
.macro if_any_move_disabled battler:req, ptr:req
if_any_move_disabled_or_encored \battler, 0, \ptr
.endm
.macro if_any_move_encored battler:req, ptr:req
if_any_move_disabled_or_encored \battler, 1, \ptr
.endm

View File

@@ -270,16 +270,16 @@
.macro stopsound
.byte 0x2f
.endm
@ useful macros
.macro jumpreteq value:req, ptr:req
jumpargeq ARG_RET_ID, \value, \ptr
.endm
.macro jumprettrue ptr:req
jumpreteq TRUE, \ptr
.endm
.macro jumpretfalse ptr:req
jumpreteq FALSE, \ptr
.endm

View File

@@ -1,4 +1,4 @@
@ Get the status (CHALLENGE_STATUS_*) of the current challenge and store the result in VAR_TEMP_0
@ Get the status (CHALLENGE_STATUS_*) of the current challenge and store the result in VAR_TEMP_CHALLENGE_STATUS
.macro frontier_getstatus
setvar VAR_0x8004, FRONTIER_UTIL_FUNC_GET_STATUS
special CallFrontierUtilFunc

View File

@@ -410,33 +410,33 @@
.byte \endMode
.byte \endState
.endm
@ Help macros for 5 uses of moveend command
@ All cases
.macro moveendall
setbyte sMOVEEND_STATE, 0
moveend 0, 0
.endm
@ Chosen case
.macro moveendcase case:req
setbyte sMOVEEND_STATE, \case
moveend 1, 0
.endm
@ All cases from (inclusive)
.macro moveendfrom from:req
setbyte sMOVEEND_STATE, \from
moveend 0, 0
.endm
@ All cases from 0 to (not inclusive)
.macro moveendto to:req
setbyte sMOVEEND_STATE, 0
moveend 2, \to
.endm
@ Cases from (inclusive) to (not inclusive)
.macro moveendfromto from:req, to:req
setbyte sMOVEEND_STATE, \from
@@ -1252,165 +1252,165 @@
.byte 0xf8
.byte \position
.endm
@ various command changed to more readable macros
.macro cancelmultiturnmoves battler:req
various \battler, VARIOUS_CANCEL_MULTI_TURN_MOVES
.endm
.macro setmagiccoattarget battler:req
various \battler, VARIOUS_SET_MAGIC_COAT_TARGET
.endm
.macro getifcantrunfrombattle battler:req
various \battler, VARIOUS_IS_RUNNING_IMPOSSIBLE
.endm
.macro getmovetarget battler:req
various \battler, VARIOUS_GET_MOVE_TARGET
.endm
.macro getbattlerfainted battler:req
various \battler, VARIOUS_GET_BATTLER_FAINTED
.endm
.macro resetintimidatetracebits battler:req
various \battler, VARIOUS_RESET_INTIMIDATE_TRACE_BITS
.endm
.macro updatechoicemoveonlvlup battler:req
various \battler, VARIOUS_UPDATE_CHOICE_MOVE_ON_LVL_UP
.endm
.macro resetplayerfainted
various BS_ATTACKER, VARIOUS_RESET_PLAYER_FAINTED
.endm
.macro palaceflavortext battler:req
various \battler, VARIOUS_PALACE_FLAVOR_TEXT
.endm
.macro arenajudgmentwindow
various BS_ATTACKER, VARIOUS_ARENA_JUDGMENT_WINDOW
.endm
.macro arenaopponentmonlost
various BS_ATTACKER, VARIOUS_ARENA_OPPONENT_MON_LOST
.endm
.macro arenaplayermonlost
various BS_ATTACKER, VARIOUS_ARENA_PLAYER_MON_LOST
.endm
.macro arenabothmonlost
various BS_ATTACKER, VARIOUS_ARENA_BOTH_MONS_LOST
.endm
.macro forfeityesnobox battler:req
various \battler, VARIOUS_EMIT_YESNOBOX
.endm
.macro arenadrawreftextbox
various BS_ATTACKER, VARIOUS_DRAW_ARENA_REF_TEXT_BOX
.endm
.macro arenaerasereftextbox
various BS_ATTACKER, VARIOUS_ERASE_ARENA_REF_TEXT_BOX
.endm
.macro arenajudgmentstring id:req
various \id, VARIOUS_ARENA_JUDGMENT_STRING
.endm
.macro arenawaitmessage id:req
various \id, VARIOUS_ARENA_WAIT_STRING
.endm
.macro waitcry battler:req
various \battler, VARIOUS_WAIT_CRY
.endm
.macro returnopponentmon1toball battler:req
various \battler, VARIOUS_RETURN_OPPONENT_MON1
.endm
.macro returnopponentmon2toball battler:req
various \battler, VARIOUS_RETURN_OPPONENT_MON2
.endm
.macro volumedown
various BS_ATTACKER, VARIOUS_VOLUME_DOWN
.endm
.macro volumeup
various BS_ATTACKER, VARIOUS_VOLUME_UP
.endm
.macro setalreadystatusedmoveattempt battler:req
various \battler, VARIOUS_SET_ALREADY_STATUS_MOVE_ATTEMPT
.endm
.macro palacetryescapestatus battler:req
various \battler, VARIOUS_PALACE_TRY_ESCAPE_STATUS
.endm
.macro setoutcomeonteleport battler:req
various \battler, VARIOUS_SET_TELEPORT_OUTCOME
.endm
.macro playtrainerdefeatbgm battler:req
various \battler, VARIOUS_PLAY_TRAINER_DEFEATED_MUSIC
.endm
@ helpful macros
.macro setstatchanger stat:req, stages:req, down:req
setbyte sSTATCHANGER, \stat | \stages << 4 | \down << 7
.endm
.macro setmoveeffect effect:req
setbyte cEFFECT_CHOOSER, \effect
.endm
.macro chosenstatus1animation battler:req, status:req
chosenstatusanimation \battler, 0x0, \status
.endm
.macro chosenstatus2animation battler:req, status:req
chosenstatusanimation \battler, 0x1, \status
.endm
.macro sethword dst:req, value:req
setbyte \dst, (\value) & 0xFF
setbyte \dst + 1, ((\value) >> 8) & 0xFF
.endm
.macro setword dst:req, value:req
setbyte \dst, (\value) & 0xFF
setbyte \dst + 1, ((\value) >> 8) & 0xFF
setbyte \dst + 2, ((\value) >> 16) & 0xFF
setbyte \dst + 3, ((\value) >> 24) & 0xFF
.endm
.macro copybyte dst:req, src:req
copyarray \dst, \src, 0x1
.endm
.macro copyhword dst:req, src:req
copyarray \dst, \src, 0x2
.endm
.macro copyword dst:req, src:req
copyarray \dst, \src, 0x4
.endm
.macro jumpifbytenotequal byte1:req, byte2:req, jumpptr:req
jumpifarraynotequal \byte1, \byte2, 0x1, \jumpptr
.endm
.macro jumpifbyteequal byte1:req, byte2:req, jumpptr:req
jumpifarrayequal \byte1, \byte2, 0x1, \jumpptr
.endm
.macro jumpifmove move:req, jumpptr:req
jumpifhalfword CMP_EQUAL, gCurrentMove, \move, \jumpptr
.endm
@@ -1418,23 +1418,23 @@
.macro jumpifnotmove move:req, jumpptr:req
jumpifhalfword CMP_NOT_EQUAL, gCurrentMove, \move, \jumpptr
.endm
.macro jumpifstatus3 battler:req, status:req, jumpptr:req
jumpifstatus3condition \battler, \status, FALSE, \jumpptr
.endm
.macro jumpifnostatus3 battler:req, status:req, jumpptr:req
jumpifstatus3condition \battler, \status, TRUE, \jumpptr
.endm
.macro jumpifmovehadnoeffect jumpptr:req
jumpifbyte CMP_COMMON_BITS, gMoveResultFlags, MOVE_RESULT_NO_EFFECT, \jumpptr
.endm
.macro jumpifbattletype flags:req, jumpptr:req
jumpifword CMP_COMMON_BITS, gBattleTypeFlags, \flags, \jumpptr
.endm
.macro jumpifnotbattletype flags:req, jumpptr:req
jumpifword CMP_NO_COMMON_BITS, gBattleTypeFlags, \flags, \jumpptr
.endm

View File

@@ -276,7 +276,7 @@
.2byte SPECIAL_\function
.endm
@ Blocks script execution until a command or C code manually unblocks it. Generally used with specific
@ Blocks script execution until a command or C code manually unblocks it. Generally used with specific
@ commands and specials. Calling ScriptContext_Enable for instance will allow execution to continue.
.macro waitstate
.byte 0x27
@@ -469,7 +469,7 @@
formatwarp \map, \a, \b, \c
.endm
@ Sets the dynamic warp destination. Warps with a destination map of MAP_NONE will target this destination.
@ Sets the dynamic warp destination. Warps with a destination map of MAP_DYNAMIC will target this destination.
@ Warp commands can be given either the id of which warp location to go to on the destination map
@ or a pair of x/y coordinates to go to directly on the destination map.
.macro setdynamicwarp map:req, a, b, c
@@ -985,7 +985,7 @@
.endm
@ Gives the player a Pokémon of the specified species and level, holding the specified item. The trailing 0s are unused parameters.
@ VAR_RESULT will be set to MON_GIVEN_TO_PARTY, MON_GIVEN_TO_PC, or MON_CANT_GIVE depending on the outcome.
@ VAR_RESULT will be set to MON_GIVEN_TO_PARTY, MON_GIVEN_TO_PC, or MON_CANT_GIVE depending on the outcome.
.macro givemon species:req, level:req, item=ITEM_NONE
.byte 0x79
.2byte \species
@@ -997,7 +997,7 @@
.endm
@ Gives the player an Egg of the specified species.
@ VAR_RESULT will be set to MON_GIVEN_TO_PARTY, MON_GIVEN_TO_PC, or MON_CANT_GIVE depending on the outcome.
@ VAR_RESULT will be set to MON_GIVEN_TO_PARTY, MON_GIVEN_TO_PC, or MON_CANT_GIVE depending on the outcome.
.macro giveegg species:req
.byte 0x7a
.2byte \species
@@ -1415,7 +1415,7 @@
.2byte \out
.endm
@ Gives 'count' coins to the player, up to a total of MAX_COINS.
@ Gives 'count' coins to the player, up to a total of MAX_COINS.
@ If the player already has MAX_COINS then VAR_RESULT is set to TRUE, otherwise it is set to FALSE.
.macro addcoins count:req
.byte 0xb4
@@ -1576,15 +1576,15 @@
.4byte \value
.endm
@ Sets the eventLegal bit for the Pokemon in the specified slot of the player's party.
.macro setmoneventlegal slot:req
@ Sets the modernFatefulEncounter bit for the Pokemon in the specified slot of the player's party.
.macro setmodernfatefulencounter slot:req
.byte 0xcd
.2byte \slot
.endm
@ Checks if the eventLegal bit is set for the Pokemon in the specified slot of the player's party. If it isn't set,
@ Checks if the modernFatefulEncounter bit is set for the Pokemon in the specified slot of the player's party. If it isn't set,
@ VAR_RESULT is TRUE. If the bit is set (or if the specified slot is empty or invalid), VAR_RESULT is FALSE.
.macro checkmoneventlegal slot:req
.macro checkmodernfatefulencounter slot:req
.byte 0xce
.2byte \slot
.endm
@@ -1887,7 +1887,7 @@
@ Gives 'amount' of the specified 'item' to the player and prints a message with fanfare.
@ If the player doesn't have space for all the items then as many are added as possible, the
@ message indicates there is no room, and VAR_RESULT is set to FALSE.
@ message indicates there is no room, and VAR_RESULT is set to FALSE.
@ Otherwise VAR_RESULT is set to TRUE, and the message indicates they have received the item(s).
.macro giveitem item:req, amount=1
setorcopyvar VAR_0x8000, \item
@@ -1932,10 +1932,10 @@
closebraillemessage
.endm
@ Creates an "event legal" Pokémon for an encounter
@ Creates a Pokémon with the modernFatefulEncounter bit set for an encounter
.macro seteventmon species:req, level:req, item=ITEM_NONE
setvar VAR_0x8004, \species
setvar VAR_0x8005, \level
setvar VAR_0x8006, \item
special CreateEventLegalEnemyMon
special CreateEnemyEventMon
.endm

View File

@@ -19,11 +19,11 @@
.4byte \script
.endm
@ Defines an object event template for map data. Mirrors the struct layout of ObjectEventTemplate in include/global.fieldmap.h
.macro object_event index:req, gfx:req, inConnection:req, x:req, y:req, elevation:req, movement_type:req, x_radius:req, y_radius:req, trainer_type:req, sight_radius_tree_etc:req, script:req, event_flag:req
@ Defines an object event template for map data, to be used by a normal object. Mirrors the struct layout of ObjectEventTemplate in include/global.fieldmap.h
.macro object_event index:req, gfx:req, x:req, y:req, elevation:req, movement_type:req, x_radius:req, y_radius:req, trainer_type:req, sight_radius_tree_etc:req, script:req, event_flag:req
.byte \index
.byte \gfx
.byte \inConnection
.byte OBJ_KIND_NORMAL
.space 1 @ Padding
.2byte \x, \y
.byte \elevation
@@ -38,6 +38,22 @@
inc _num_npcs
.endm
@ Defines an object event template for map data, to be used by a clone object. Mirrors the struct layout of ObjectEventTemplate in include/global.fieldmap.h
@ NOTE: The handling for this type of event does not exist in Emerald by default; it is exclusive to FRLG.
.macro clone_event index:req, gfx:req, x:req, y:req, target_local_id:req, target_map_id:req
.byte \index
.byte \gfx
.byte OBJ_KIND_CLONE
.space 1 @ Padding
.2byte \x, \y
.byte \target_local_id
.space 3 @ Padding
.2byte \target_map_id & 0xFF @ map num
.2byte \target_map_id >> 8 @ map group
.space 8 @ Padding
inc _num_npcs
.endm
@ Defines a warp event for map data. Mirrors the struct layout of WarpEvent in include/global.fieldmap.h
.macro warp_def x:req, y:req, elevation:req, warpId:req, map_id:req
.2byte \x, \y
@@ -49,12 +65,12 @@
.endm
@ Defines a coord event for map data. Mirrors the struct layout of CoordEvent in include/global.fieldmap.h
.macro coord_event x:req, y:req, elevation:req, trigger:req, index:req, script:req
.macro coord_event x:req, y:req, elevation:req, var:req, varValue:req, script:req
.2byte \x, \y
.byte \elevation
.space 1 @ Padding
.2byte \trigger
.2byte \index
.2byte \var
.2byte \varValue
.space 2 @ Padding
.4byte \script
inc _num_traps

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

@@ -421,13 +421,13 @@ SHADOW = FC 03 @ same as fc 01
COLOR_HIGHLIGHT_SHADOW = FC 04 @ takes 3 bytes
PALETTE = FC 05 @ used in credits
FONT = FC 06 @ Given a font id, or use font constants below instead
RESET_SIZE = FC 07
RESET_FONT = FC 07
PAUSE = FC 08 @ manually print the wait byte after this, havent mapped them
PAUSE_UNTIL_PRESS = FC 09
WAIT_SE = FC 0A
PLAY_BGM = FC 0B
ESCAPE = FC 0C
SHIFT_TEXT = FC 0D
SHIFT_RIGHT = FC 0D
SHIFT_DOWN = FC 0E
FILL_WINDOW = FC 0F
PLAY_SE = FC 10
@@ -800,7 +800,7 @@ MUS_LITTLEROOT = 95 01
MUS_MT_CHIMNEY = 96 01
MUS_ENCOUNTER_FEMALE = 97 01
MUS_LILYCOVE = 98 01
MUS_ROUTE111 = 99 01
MUS_DESERT = 99 01
MUS_HELP = 9A 01
MUS_UNDERWATER = 9B 01
MUS_VICTORY_TRAINER = 9C 01

View File

@@ -1,5 +1,2 @@
gUnusedWindowVar1
gUnusedWindowVar2
gTransparentTileNumber
gUnusedWindowVar3
gWindowBgTilemapBuffers

View File

@@ -1,2 +1,3 @@
.include "constants/gba_constants.inc"
.include "constants/global.inc"
.include "constants/tms_hms.inc"

View File

@@ -1,3 +1,6 @@
#ifndef GUARD_CONSTANTS_GBA_CONSTANTS_INC
#define GUARD_CONSTANTS_GBA_CONSTANTS_INC
.set PSR_USR_MODE, 0x00000010
.set PSR_FIQ_MODE, 0x00000011
.set PSR_IRQ_MODE, 0x00000012
@@ -511,3 +514,5 @@
.set BLDCNT_TGT2_OBJ, 1 << 12
.set BLDCNT_TGT2_BD, 1 << 13
.set BLDCNT_TGT2_ALL, BLDCNT_TGT2_BG0 | BLDCNT_TGT2_BG1 | BLDCNT_TGT2_BG2 | BLDCNT_TGT2_BG3 | BLDCNT_TGT2_OBJ | BLDCNT_TGT2_BD
#endif @ GUARD_CONSTANTS_GBA_CONSTANTS_INC

View File

@@ -1,3 +1,6 @@
#ifndef GUARD_CONSTANTS_GLOBAL_INC
#define GUARD_CONSTANTS_GLOBAL_INC
.set TRUE, 1
.set FALSE, 0
@@ -20,3 +23,5 @@
.set OBJ_IMAGE_ANIM_H_FLIP, 1 << 6
.set OBJ_IMAGE_ANIM_V_FLIP, 1 << 7
#endif @ GUARD_CONSTANTS_GLOBAL_INC

View File

@@ -1,3 +1,6 @@
#ifndef GUARD_CONSTANTS_M4A_CONSTANTS_INC
#define GUARD_CONSTANTS_M4A_CONSTANTS_INC
.equiv ID_NUMBER, 0x68736d53
.equiv PCM_DMA_BUF_SIZE, 1584
@@ -250,3 +253,5 @@
struct_field o_CgbChannel_nextChannelPointer, 4
struct_field o_CgbChannel_dummy4, 8
struct_field CgbChannel_size, 0
#endif @ GUARD_CONSTANTS_M4A_CONSTANTS_INC

22
constants/tms_hms.inc Normal file
View File

@@ -0,0 +1,22 @@
#ifndef GUARD_CONSTANTS_TMS_HMS_INC
#define GUARD_CONSTANTS_TMS_HMS_INC
#include "constants/tms_hms.h"
/* Expands to:
* enum_start ITEM_TM01
* enum ITEM_TM_FOCUS_PUNCH
* ...
* enum_start ITEM_HM01
* enum ITEM_HM_CUT
* ... */
#define EQUIV_TM(id) enum ITEM_TM_ ## id;
#define EQUIV_HM(id) enum ITEM_HM_ ## id;
enum_start ITEM_TM01
FOREACH_TM(EQUIV_TM)
enum_start ITEM_HM01
FOREACH_HM(EQUIV_HM)
#undef EQUIV_TM
#undef EQUIV_HM
#endif @ GUARD_CONSTANTS_TMS_HMS_INC

View File

@@ -1,3 +1,4 @@
#include "config.h"
#include "constants/battle.h"
#include "constants/battle_ai.h"
#include "constants/abilities.h"
@@ -6,6 +7,7 @@
#include "constants/battle_move_effects.h"
#include "constants/hold_effects.h"
#include "constants/pokemon.h"
.include "asm/macros.inc"
.include "asm/macros/battle_ai_script.inc"
.include "constants/constants.inc"
@@ -1099,15 +1101,18 @@ AI_CV_AttackDown3:
score -2
AI_CV_AttackDown4:
get_target_type1
if_in_bytes AI_CV_AttackDown_UnknownTypeList, AI_CV_AttackDown_End
if_in_bytes AI_CV_AttackDown_PhysicalTypeList, AI_CV_AttackDown_End
get_target_type2
if_in_bytes AI_CV_AttackDown_UnknownTypeList, AI_CV_AttackDown_End
if_in_bytes AI_CV_AttackDown_PhysicalTypeList, AI_CV_AttackDown_End
if_random_less_than 50, AI_CV_AttackDown_End
score -2
AI_CV_AttackDown_End:
end
AI_CV_AttackDown_UnknownTypeList:
@ If the target is not of any type in this list then using the move may be discouraged.
@ It seems likely this was meant to be "discourage reducing the target's attack if they're
@ not a physical type", but they've left out Flying, Poison, and Ghost.
AI_CV_AttackDown_PhysicalTypeList:
.byte TYPE_NORMAL
.byte TYPE_FIGHTING
.byte TYPE_GROUND
@@ -1909,7 +1914,7 @@ AI_CV_Protect4:
if_random_less_than 128, AI_CV_Protect_End
score -1
goto AI_CV_Protect_End
AI_CV_Protect3:
get_last_used_bank_move AI_TARGET
get_move_effect_from_result
@@ -1922,19 +1927,19 @@ AI_CV_Protect_End:
@ BUG: Foresight is only encouraged if the user is Ghost type or
@ has high evasion, but should check target instead
AI_CV_Foresight:
.ifdef BUGFIX
#ifdef BUGFIX
get_target_type1
if_equal TYPE_GHOST, AI_CV_Foresight2
get_target_type2
if_equal TYPE_GHOST, AI_CV_Foresight2
if_stat_level_more_than AI_TARGET, STAT_EVASION, 8, AI_CV_Foresight3
.else
#else
get_user_type1
if_equal TYPE_GHOST, AI_CV_Foresight2
get_user_type2
if_equal TYPE_GHOST, AI_CV_Foresight2
if_stat_level_more_than AI_USER, STAT_EVASION, 8, AI_CV_Foresight3
.endif
#endif
score -2
goto AI_CV_Foresight_End
@@ -2179,13 +2184,13 @@ AI_CV_SemiInvulnerable2:
if_status2 AI_TARGET, STATUS2_CURSED, AI_CV_SemiInvulnerable_TryEncourage
if_status3 AI_TARGET, STATUS3_LEECHSEED, AI_CV_SemiInvulnerable_TryEncourage
get_weather
.ifdef BUGFIX
#ifdef BUGFIX
if_equal AI_WEATHER_HAIL, AI_CV_SemiInvulnerable_CheckIceType
if_equal AI_WEATHER_SANDSTORM, AI_CV_SemiInvulnerable_CheckSandstormTypes
.else
#else
if_equal AI_WEATHER_HAIL, AI_CV_SemiInvulnerable_CheckSandstormTypes
if_equal AI_WEATHER_SANDSTORM, AI_CV_SemiInvulnerable_CheckIceType
.endif
#endif
goto AI_CV_SemiInvulnerable5
AI_CV_SemiInvulnerable_CheckSandstormTypes:
@@ -2250,11 +2255,11 @@ AI_CV_Hail_End:
@ BUG: Facade score is increased if the target is statused, but should be if the user is
AI_CV_Facade:
.ifdef BUGFIX
#ifdef BUGFIX
if_not_status AI_USER, STATUS1_POISON | STATUS1_BURN | STATUS1_PARALYSIS | STATUS1_TOXIC_POISON, AI_CV_Facade_End
.else
#else
if_not_status AI_TARGET, STATUS1_POISON | STATUS1_BURN | STATUS1_PARALYSIS | STATUS1_TOXIC_POISON, AI_CV_Facade_End
.endif
#endif
score +1
AI_CV_Facade_End:
end
@@ -3172,9 +3177,9 @@ AI_HPAware_DiscouragedEffectsWhenTargetLowHP:
AI_TrySunnyDayStart:
if_target_is_ally AI_TryOnAlly
if_not_effect EFFECT_SUNNY_DAY, AI_TrySunnyDayStart_End
.ifndef BUGFIX @ funcResult has not been set in this script yet, below call is nonsense
#ifndef BUGFIX @ funcResult has not been set in this script yet, below call is nonsense
if_equal FALSE, AI_TrySunnyDayStart_End
.endif
#endif
is_first_turn_for AI_USER
if_equal FALSE, AI_TrySunnyDayStart_End
score +5

View File

@@ -798,14 +798,14 @@ Move_DOUBLE_EDGE:
createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 4, -10, 0, ANIM_TARGET, 0
createsprite gSlideMonToOffsetSpriteTemplate, ANIM_ATTACKER, 2, 1, -32, 0, 0, 3
waitforvisualfinish
createvisualtask AnimTask_RotateMonSpriteToSide, 2, 8, -256, 0, 0
createvisualtask AnimTask_RotateMonSpriteToSide, 2, 8, -256, 1, 0
createvisualtask AnimTask_RotateMonSpriteToSide, 2, 8, -256, ANIM_ATTACKER, 0
createvisualtask AnimTask_RotateMonSpriteToSide, 2, 8, -256, ANIM_TARGET, 0
createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_ATTACKER, 4, 0, 12, 1
createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_TARGET, 4, 0, 12, 1
createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, F_PAL_BG, 2, 16, 0, RGB_WHITE
waitforvisualfinish
createvisualtask AnimTask_RotateMonSpriteToSide, 2, 8, -256, 0, 1
createvisualtask AnimTask_RotateMonSpriteToSide, 2, 8, -256, 1, 1
createvisualtask AnimTask_RotateMonSpriteToSide, 2, 8, -256, ANIM_ATTACKER, 1
createvisualtask AnimTask_RotateMonSpriteToSide, 2, 8, -256, ANIM_TARGET, 1
waitforvisualfinish
createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, 0, 0, 5
delay 3
@@ -1458,11 +1458,11 @@ FuryCutterStrongest:
Move_SELF_DESTRUCT:
loadspritegfx ANIM_TAG_EXPLOSION
createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_ATTACKER, 1, 0, 9, RGB_RED
createvisualtask AnimTask_ShakeMon2, 5, 4, 6, 0, 38, 1
createvisualtask AnimTask_ShakeMon2, 5, 5, 6, 0, 38, 1
createvisualtask AnimTask_ShakeMon2, 5, 6, 6, 0, 38, 1
createvisualtask AnimTask_ShakeMon2, 5, 7, 6, 0, 38, 1
createvisualtask AnimTask_ShakeMon2, 5, 8, 6, 0, 38, 1
createvisualtask AnimTask_ShakeMon2, 5, ANIM_PLAYER_LEFT, 6, 0, 38, 1
createvisualtask AnimTask_ShakeMon2, 5, ANIM_PLAYER_RIGHT, 6, 0, 38, 1
createvisualtask AnimTask_ShakeMon2, 5, ANIM_OPPONENT_LEFT, 6, 0, 38, 1
createvisualtask AnimTask_ShakeMon2, 5, ANIM_OPPONENT_RIGHT, 6, 0, 38, 1
createvisualtask AnimTask_ShakeMon2, 5, ANIM_ATTACKER_FORCE, 6, 0, 38, 1
call SelfDestructExplode
call SelfDestructExplode
waitforvisualfinish
@@ -1624,11 +1624,11 @@ RisingWaterHitEffect:
Move_EXPLOSION:
loadspritegfx ANIM_TAG_EXPLOSION
createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, F_PAL_BG, 8, 9, RGB(26, 8, 8), 8, RGB_BLACK, 8
createvisualtask AnimTask_ShakeMon2, 5, 4, 8, 0, 40, 1
createvisualtask AnimTask_ShakeMon2, 5, 5, 8, 0, 40, 1
createvisualtask AnimTask_ShakeMon2, 5, 6, 8, 0, 40, 1
createvisualtask AnimTask_ShakeMon2, 5, 7, 8, 0, 40, 1
createvisualtask AnimTask_ShakeMon2, 5, 8, 8, 0, 40, 1
createvisualtask AnimTask_ShakeMon2, 5, ANIM_PLAYER_LEFT, 8, 0, 40, 1
createvisualtask AnimTask_ShakeMon2, 5, ANIM_PLAYER_RIGHT, 8, 0, 40, 1
createvisualtask AnimTask_ShakeMon2, 5, ANIM_OPPONENT_LEFT, 8, 0, 40, 1
createvisualtask AnimTask_ShakeMon2, 5, ANIM_OPPONENT_RIGHT, 8, 0, 40, 1
createvisualtask AnimTask_ShakeMon2, 5, ANIM_ATTACKER_FORCE, 8, 0, 40, 1
call Explosion1
call Explosion1
waitforvisualfinish
@@ -1657,12 +1657,12 @@ Explosion1:
Move_DEFENSE_CURL:
loadspritegfx ANIM_TAG_ECLIPSING_ORB
loopsewithpan SE_M_TRI_ATTACK, SOUND_PAN_ATTACKER, 18, 3
createvisualtask AnimTask_SetGrayscaleOrOriginalPal, 5, ANIM_ATTACKER, 0
createvisualtask AnimTask_SetGrayscaleOrOriginalPal, 5, ANIM_ATTACKER, FALSE
createvisualtask AnimTask_DefenseCurlDeformMon, 5
waitforvisualfinish
createsprite gEclipsingOrbSpriteTemplate, ANIM_ATTACKER, 2, 0, 6, 0, 1
waitforvisualfinish
createvisualtask AnimTask_SetGrayscaleOrOriginalPal, 5, ANIM_ATTACKER, 1
createvisualtask AnimTask_SetGrayscaleOrOriginalPal, 5, ANIM_ATTACKER, TRUE
waitforvisualfinish
end
@@ -2441,7 +2441,7 @@ Move_HORN_ATTACK:
Move_FURY_ATTACK:
loadspritegfx ANIM_TAG_IMPACT
loadspritegfx ANIM_TAG_HORN_HIT
createvisualtask AnimTask_RotateMonSpriteToSide, 2, 4, 256, 0, 2
createvisualtask AnimTask_RotateMonSpriteToSide, 2, 4, 256, ANIM_ATTACKER, 2
choosetwoturnanim FuryAttackRight, FuryAttackLeft
FuryAttackContinue:
createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 5, 0, 6, 1
@@ -2590,7 +2590,7 @@ Move_LOW_KICK:
createsprite gSlidingKickSpriteTemplate, ANIM_TARGET, 2, -24, 28, 40, 8, 160, 0
delay 4
createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 2, -8, 8, ANIM_TARGET, 2
createvisualtask AnimTask_RotateMonSpriteToSide, 2, 6, 384, 1, 2
createvisualtask AnimTask_RotateMonSpriteToSide, 2, 6, 384, ANIM_TARGET, 2
playsewithpan SE_M_VITAL_THROW2, SOUND_PAN_TARGET
waitforvisualfinish
createsprite gSlideMonToOriginalPosSpriteTemplate, ANIM_ATTACKER, 2, 0, 1, 4
@@ -2835,7 +2835,7 @@ SkullBashSetUpHeadDown:
createsprite gSlideMonToOffsetAndBackSpriteTemplate, ANIM_ATTACKER, 2, ANIM_ATTACKER, -24, 0, 0, 10, 0
playsewithpan SE_M_TAKE_DOWN, SOUND_PAN_ATTACKER
waitforvisualfinish
createvisualtask AnimTask_RotateMonSpriteToSide, 2, 16, 96, 0, 2
createvisualtask AnimTask_RotateMonSpriteToSide, 2, 16, 96, ANIM_ATTACKER, 2
waitforvisualfinish
createsprite gSlideMonToOffsetAndBackSpriteTemplate, ANIM_ATTACKER, 2, ANIM_ATTACKER, 24, 0, 0, 10, 1
waitforvisualfinish
@@ -3920,22 +3920,22 @@ Move_LUSTER_PURGE:
waitforvisualfinish
createvisualtask AnimTask_BlendParticle, 5, ANIM_TAG_IMPACT, 0, 12, 12, RGB(0, 0, 23)
waitforvisualfinish
createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, 1, 2
createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, ANIM_TARGET, 2
createvisualtask SoundTask_PlaySE1WithPanning, 5, SE_M_HYPER_BEAM, SOUND_PAN_TARGET
delay 3
createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, 1, 2
createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, ANIM_TARGET, 2
createvisualtask SoundTask_PlaySE1WithPanning, 5, SE_M_HYPER_BEAM, SOUND_PAN_TARGET
delay 3
createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, 1, 2
createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, ANIM_TARGET, 2
createvisualtask SoundTask_PlaySE1WithPanning, 5, SE_M_HYPER_BEAM, SOUND_PAN_TARGET
delay 3
createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, 1, 2
createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, ANIM_TARGET, 2
createvisualtask SoundTask_PlaySE1WithPanning, 5, SE_M_HYPER_BEAM, SOUND_PAN_TARGET
delay 3
createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, 1, 2
createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, ANIM_TARGET, 2
createvisualtask SoundTask_PlaySE1WithPanning, 5, SE_M_HYPER_BEAM, SOUND_PAN_TARGET
delay 3
createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, 1, 2
createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, ANIM_TARGET, 2
createvisualtask SoundTask_PlaySE1WithPanning, 5, SE_M_HYPER_BEAM, SOUND_PAN_TARGET
waitforvisualfinish
createvisualtask AnimTask_BlendBattleAnimPalExclude, 5, 5, 2, 16, 0, RGB_WHITEALPHA
@@ -3958,7 +3958,7 @@ Move_MIST_BALL:
createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 0, F_PAL_BG, 1, 1, RGB(23, 16, 31), 16, RGB_WHITE, 16
delay 0
playsewithpan SE_M_HAZE, 0
createvisualtask AnimTask_LoadMistTiles, 5
createvisualtask AnimTask_MistBallFog, 5
createvisualtask AnimTask_BlendBattleAnimPal, 10, F_PAL_TARGET, 3, 0, 16, RGB_WHITE
delay 8
createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 4, 0, 70, 0
@@ -4360,7 +4360,7 @@ Move_AERIAL_ACE:
Move_IRON_DEFENSE:
loopsewithpan SE_SHINY, SOUND_PAN_ATTACKER, 28, 2
createvisualtask AnimTask_MetallicShine, 5, 0, 0, 0
createvisualtask AnimTask_MetallicShine, 5, 0, 0, RGB_BLACK
createsprite gComplexPaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, F_PAL_BG, 8, 2, RGB_WHITEALPHA, 14, RGB_WHITEALPHA, 0
waitforvisualfinish
end
@@ -4373,7 +4373,7 @@ Move_BLOCK:
Move_HOWL:
loadspritegfx ANIM_TAG_NOISE_LINE
createvisualtask AnimTask_DeepInhale, 2, 0
createvisualtask AnimTask_DeepInhale, 2, ANIM_ATTACKER
delay 12
call RoarEffect
createvisualtask SoundTask_PlayCryHighPitch, 2, ANIM_ATTACKER, 3
@@ -4572,7 +4572,7 @@ Move_SHOCK_WAVE:
Move_HARDEN:
loopsewithpan SE_M_HARDEN, SOUND_PAN_ATTACKER, 28, 2
createvisualtask AnimTask_MetallicShine, 5, 0, 0, 0
createvisualtask AnimTask_MetallicShine, 5, 0, 0, RGB_BLACK
waitforvisualfinish
end
@@ -5645,7 +5645,7 @@ HydroPumpBeams:
createsprite gHydroPumpOrbSpriteTemplate, ANIM_ATTACKER, 3, 10, 10, 0, -16
delay 1
return
HydroPumpHitSplats :
HydroPumpHitSplats:
createsprite gWaterHitSplatSpriteTemplate, ANIM_ATTACKER, 4, 0, 15, ANIM_TARGET, 1
createsprite gWaterHitSplatSpriteTemplate, ANIM_ATTACKER, 4, 0, -15, ANIM_TARGET, 1
return
@@ -7219,7 +7219,7 @@ Move_STEEL_WING:
loadspritegfx ANIM_TAG_GUST
loadspritegfx ANIM_TAG_IMPACT
loopsewithpan SE_M_HARDEN, SOUND_PAN_ATTACKER, 28, 2
createvisualtask AnimTask_MetallicShine, 5, 0, 0, 0
createvisualtask AnimTask_MetallicShine, 5, 0, 0, RGB_BLACK
waitforvisualfinish
monbg ANIM_DEF_PARTNER
splitbgprio ANIM_TARGET
@@ -7245,7 +7245,7 @@ Move_STEEL_WING:
Move_IRON_TAIL:
loadspritegfx ANIM_TAG_IMPACT
loopsewithpan SE_M_HARDEN, SOUND_PAN_ATTACKER, 28, 2
createvisualtask AnimTask_MetallicShine, 5, 1, 0, 0
createvisualtask AnimTask_MetallicShine, 5, 1, 0, RGB_BLACK
waitforvisualfinish
monbg ANIM_TARGET
setalpha 12, 8
@@ -7255,7 +7255,7 @@ Move_IRON_TAIL:
createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 3, 0, 6, 1
playsewithpan SE_M_VITAL_THROW2, SOUND_PAN_TARGET
waitforvisualfinish
createvisualtask AnimTask_SetGrayscaleOrOriginalPal, 5, ANIM_ATTACKER, 1
createvisualtask AnimTask_SetGrayscaleOrOriginalPal, 5, ANIM_ATTACKER, TRUE
clearmonbg ANIM_TARGET
blendoff
waitforvisualfinish
@@ -7275,7 +7275,7 @@ Move_POISON_TAIL:
createvisualtask AnimTask_ShakeMon, 2, ANIM_TARGET, 3, 0, 6, 1
playsewithpan SE_M_VITAL_THROW2, SOUND_PAN_TARGET
waitforvisualfinish
createvisualtask AnimTask_SetGrayscaleOrOriginalPal, 5, ANIM_ATTACKER, 1
createvisualtask AnimTask_SetGrayscaleOrOriginalPal, 5, ANIM_ATTACKER, TRUE
clearmonbg ANIM_TARGET
blendoff
call PoisonBubblesEffect
@@ -7285,7 +7285,7 @@ Move_POISON_TAIL:
Move_METAL_CLAW:
loadspritegfx ANIM_TAG_CLAW_SLASH
loopsewithpan SE_M_HARDEN, SOUND_PAN_ATTACKER, 28, 2
createvisualtask AnimTask_MetallicShine, 5, 0, 0, 0
createvisualtask AnimTask_MetallicShine, 5, 0, 0, RGB_BLACK
waitforvisualfinish
createsprite gHorizontalLungeSpriteTemplate, ANIM_ATTACKER, 2, 6, 4
delay 2
@@ -7947,16 +7947,16 @@ Move_PERISH_SONG:
panse SE_M_PERISH_SONG, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, +2, 0
delay 80
createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, F_PAL_BG, 3, 0, 16, RGB_BLACK
createvisualtask AnimTask_SetGrayscaleOrOriginalPal, 5, 4, 0
createvisualtask AnimTask_SetGrayscaleOrOriginalPal, 5, 5, 0
createvisualtask AnimTask_SetGrayscaleOrOriginalPal, 5, 6, 0
createvisualtask AnimTask_SetGrayscaleOrOriginalPal, 5, 7, 0
createvisualtask AnimTask_SetGrayscaleOrOriginalPal, 5, ANIM_PLAYER_LEFT, FALSE
createvisualtask AnimTask_SetGrayscaleOrOriginalPal, 5, ANIM_PLAYER_RIGHT, FALSE
createvisualtask AnimTask_SetGrayscaleOrOriginalPal, 5, ANIM_OPPONENT_LEFT, FALSE
createvisualtask AnimTask_SetGrayscaleOrOriginalPal, 5, ANIM_OPPONENT_RIGHT, FALSE
delay 100
createsprite gSimplePaletteBlendSpriteTemplate, ANIM_ATTACKER, 2, F_PAL_BG, 3, 16, 0, RGB_BLACK
createvisualtask AnimTask_SetGrayscaleOrOriginalPal, 5, 4, 1
createvisualtask AnimTask_SetGrayscaleOrOriginalPal, 5, 5, 1
createvisualtask AnimTask_SetGrayscaleOrOriginalPal, 5, 6, 1
createvisualtask AnimTask_SetGrayscaleOrOriginalPal, 5, 7, 1
createvisualtask AnimTask_SetGrayscaleOrOriginalPal, 5, ANIM_PLAYER_LEFT, TRUE
createvisualtask AnimTask_SetGrayscaleOrOriginalPal, 5, ANIM_PLAYER_RIGHT, TRUE
createvisualtask AnimTask_SetGrayscaleOrOriginalPal, 5, ANIM_OPPONENT_LEFT, TRUE
createvisualtask AnimTask_SetGrayscaleOrOriginalPal, 5, ANIM_OPPONENT_RIGHT, TRUE
waitforvisualfinish
end
@@ -8102,7 +8102,7 @@ Move_ENCORE:
loadspritegfx ANIM_TAG_SPOTLIGHT
loadspritegfx ANIM_TAG_TAG_HAND
createvisualtask AnimTask_CreateSpotlight, 2
createvisualtask AnimTask_HardwarePaletteFade, 2, 248, 3, 0, 10, 0
createvisualtask AnimTask_HardwarePaletteFade, 2, BLDCNT_TGT1_BG3 | BLDCNT_TGT1_OBJ | BLDCNT_TGT1_BD | BLDCNT_EFFECT_DARKEN, 3, 0, 10, FALSE
waitforvisualfinish
createsprite gSpotlightSpriteTemplate, ANIM_TARGET, 2, 0, -8
createsprite gClappingHandSpriteTemplate, ANIM_ATTACKER, 2, -2, 0, 0, 0, 9
@@ -8113,7 +8113,7 @@ Move_ENCORE:
createvisualtask SoundTask_PlaySE2WithPanning, 5, SE_M_ENCORE2, SOUND_PAN_TARGET
createvisualtask AnimTask_SwayMon, 5, 1, 8, 1536, 5, ANIM_TARGET
waitforvisualfinish
createvisualtask AnimTask_HardwarePaletteFade, 2, 248, 3, 10, 0, 1
createvisualtask AnimTask_HardwarePaletteFade, 2, BLDCNT_TGT1_BG3 | BLDCNT_TGT1_OBJ | BLDCNT_TGT1_BD | BLDCNT_EFFECT_DARKEN, 3, 10, 0, TRUE
waitforvisualfinish
createvisualtask AnimTask_RemoveSpotlight, 2
end
@@ -8364,7 +8364,7 @@ Move_HYPER_BEAM:
delay 30
createsoundtask SoundTask_LoopSEAdjustPanning, SE_M_HYPER_BEAM2, SOUND_PAN_ATTACKER, SOUND_PAN_TARGET, 1, 15, 0, 5
createvisualtask AnimTask_ShakeMon, 2, ANIM_ATTACKER, 0, 4, 50, 1
createvisualtask AnimTask_FlashAnimTagWithColor, 2, ANIM_TAG_ORBS, 1, 12, RGB(31, 0, 0), 16, 0, 0
createvisualtask AnimTask_FlashAnimTagWithColor, 2, ANIM_TAG_ORBS, 1, 12, RGB_RED, 16, 0, 0
call HyperBeamOrbs
call HyperBeamOrbs
call HyperBeamOrbs
@@ -8408,7 +8408,7 @@ Move_FLATTER:
loadspritegfx ANIM_TAG_CONFETTI
createvisualtask SoundTask_PlaySE2WithPanning, 5, SE_M_ENCORE2, SOUND_PAN_TARGET
createvisualtask AnimTask_CreateSpotlight, 2
createvisualtask AnimTask_HardwarePaletteFade, 2, 248, 3, 0, 10, 0
createvisualtask AnimTask_HardwarePaletteFade, 2, BLDCNT_TGT1_BG3 | BLDCNT_TGT1_OBJ | BLDCNT_TGT1_BD | BLDCNT_EFFECT_DARKEN, 3, 0, 10, FALSE
waitforvisualfinish
createsprite gFlatterSpotlightSpriteTemplate, ANIM_TARGET, 2, 0, -8, 80
delay 0
@@ -8439,7 +8439,7 @@ Move_FLATTER:
delay 5
createvisualtask SoundTask_PlaySE1WithPanning, 5, SE_M_FLATTER, SOUND_PAN_TARGET
waitforvisualfinish
createvisualtask AnimTask_HardwarePaletteFade, 2, 248, 3, 10, 0, 1
createvisualtask AnimTask_HardwarePaletteFade, 2, BLDCNT_TGT1_BG3 | BLDCNT_TGT1_OBJ | BLDCNT_TGT1_BD | BLDCNT_EFFECT_DARKEN, 3, 10, 0, TRUE
waitforvisualfinish
createvisualtask AnimTask_RemoveSpotlight, 2
end
@@ -8570,14 +8570,14 @@ Move_ARM_THRUST:
loadspritegfx ANIM_TAG_IMPACT
splitbgprio ANIM_TARGET
setalpha 12, 8
createvisualtask AnimTask_RotateMonSpriteToSide, 5, 8, 5, 0, 0
createvisualtask AnimTask_RotateMonSpriteToSide, 5, 8, 5, ANIM_ATTACKER, 0
delay 6
createsprite gHorizontalLungeSpriteTemplate, ANIM_ATTACKER, 2, 4, 3
delay 4
playsewithpan SE_M_SWAGGER, SOUND_PAN_TARGET
createsprite gArmThrustHandSpriteTemplate, ANIM_TARGET, 2, 10, -8, 14, 3
waitforvisualfinish
createvisualtask AnimTask_RotateMonSpriteToSide, 5, 8, 5, 0, 1
createvisualtask AnimTask_RotateMonSpriteToSide, 5, 8, 5, ANIM_ATTACKER, 1
playsewithpan SE_M_DOUBLE_SLAP, SOUND_PAN_TARGET
choosetwoturnanim ArmThrustRight, ArmThrustLeft
ArmThrustContinue:
@@ -9680,10 +9680,10 @@ Move_TWISTER:
createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_TARGET, 3, 0, 12, 1
createvisualtask AnimTask_ShakeMonInPlace, 2, ANIM_DEF_PARTNER, 3, 0, 12, 1
delay 4
createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, 1, 3
createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, ANIM_TARGET, 3
playsewithpan SE_M_COMET_PUNCH, SOUND_PAN_TARGET
delay 4
createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, 1, 3
createsprite gRandomPosHitSplatSpriteTemplate, ANIM_TARGET, 3, ANIM_TARGET, 3
playsewithpan SE_M_COMET_PUNCH, SOUND_PAN_TARGET
delay 4
createsprite gBasicHitSplatSpriteTemplate, ANIM_TARGET, 3, 32, 20, ANIM_TARGET, 3

View File

@@ -15,7 +15,7 @@
.include "constants/constants.inc"
.section script_data, "aw", %progbits
.align 2
gBattleScriptsForMoveEffects::
.4byte BattleScript_EffectHit @ EFFECT_HIT
@@ -533,7 +533,7 @@ BattleScript_EffectEvasionDown::
setstatchanger STAT_EVASION, 1, TRUE
BattleScript_EffectStatDown::
attackcanceler
jumpifstatus2 BS_TARGET, STATUS2_SUBSTITUTE, BattleScript_ButItFailedAtkStringPpReduce
jumpifstatus2 BS_TARGET, STATUS2_SUBSTITUTE, BattleScript_FailedFromAtkString
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
@@ -1216,7 +1216,7 @@ BattleScript_EffectPsywave::
BattleScript_EffectCounter::
attackcanceler
counterdamagecalculator BattleScript_ButItFailedAtkStringPpReduce
counterdamagecalculator BattleScript_FailedFromAtkString
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
@@ -1543,7 +1543,7 @@ BattleScript_EffectEndure::
BattleScript_EffectSpikes::
attackcanceler
trysetspikes BattleScript_ButItFailedAtkStringPpReduce
trysetspikes BattleScript_FailedFromAtkString
attackstring
ppreduce
attackanimation
@@ -1800,7 +1800,7 @@ BattleScript_EffectPsychUp::
BattleScript_EffectMirrorCoat::
attackcanceler
mirrorcoatdamagecalculator BattleScript_ButItFailedAtkStringPpReduce
mirrorcoatdamagecalculator BattleScript_FailedFromAtkString
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
attackstring
ppreduce
@@ -2047,13 +2047,13 @@ BattleScript_AlreadyAtFullHp::
BattleScript_EffectFakeOut::
attackcanceler
jumpifnotfirstturn BattleScript_ButItFailedAtkStringPpReduce
jumpifnotfirstturn BattleScript_FailedFromAtkString
setmoveeffect MOVE_EFFECT_FLINCH | MOVE_EFFECT_CERTAIN
goto BattleScript_EffectHit
BattleScript_ButItFailedAtkStringPpReduce::
BattleScript_FailedFromAtkString::
attackstring
BattleScript_ButItFailedPpReduce::
BattleScript_FailedFromPpReduce::
ppreduce
BattleScript_ButItFailed::
pause B_WAIT_TIME_SHORT
@@ -2367,7 +2367,7 @@ BattleScript_EffectWish::
BattleScript_EffectAssist::
attackcanceler
attackstring
assistattackselect BattleScript_ButItFailedPpReduce
assistattackselect BattleScript_FailedFromPpReduce
attackanimation
waitanimation
setbyte sB_ANIM_TURN, 0
@@ -2391,7 +2391,7 @@ BattleScript_EffectSuperpower::
BattleScript_EffectMagicCoat::
attackcanceler
trysetmagiccoat BattleScript_ButItFailedAtkStringPpReduce
trysetmagiccoat BattleScript_FailedFromAtkString
attackstring
ppreduce
attackanimation
@@ -2542,7 +2542,7 @@ BattleScript_EffectGrudge::
BattleScript_EffectSnatch::
attackcanceler
trysetsnatch BattleScript_ButItFailedAtkStringPpReduce
trysetsnatch BattleScript_FailedFromAtkString
attackstring
ppreduce
attackanimation
@@ -2826,7 +2826,7 @@ BattleScript_GiveExp::
setbyte sGIVEEXP_STATE, 0
getexp BS_TARGET
end2
BattleScript_HandleFaintedMon::
checkteamslost BattleScript_LinkHandleFaintedMonMultiple
jumpifbyte CMP_NOT_EQUAL, gBattleOutcome, 0, BattleScript_FaintedMonEnd
@@ -3208,7 +3208,7 @@ BattleScript_DamagingWeatherLoop::
jumpifword CMP_EQUAL, gBattleMoveDamage, 0, BattleScript_DamagingWeatherLoopIncrement
printfromtable gSandStormHailDmgStringIds
waitmessage B_WAIT_TIME_LONG
orword gHitMarker, HITMARKER_SKIP_DMG_TRACK | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE | HITMARKER_GRUDGE
orword gHitMarker, HITMARKER_IGNORE_BIDE | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE | HITMARKER_GRUDGE
effectivenesssound
hitanimation BS_ATTACKER
healthbarupdate BS_ATTACKER
@@ -3220,7 +3220,7 @@ BattleScript_DamagingWeatherLoopIncrement::
addbyte gBattleCommunication, 1
jumpifbytenotequal gBattleCommunication, gBattlersCount, BattleScript_DamagingWeatherLoop
BattleScript_DamagingWeatherContinuesEnd::
bicword gHitMarker, HITMARKER_SKIP_DMG_TRACK | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE | HITMARKER_GRUDGE
bicword gHitMarker, HITMARKER_IGNORE_BIDE | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE | HITMARKER_GRUDGE
end2
BattleScript_SandStormHailEnds::
@@ -4046,7 +4046,7 @@ BattleScript_IntimidatePrevented:
printstring STRINGID_PREVENTEDFROMWORKING
waitmessage B_WAIT_TIME_LONG
goto BattleScript_IntimidateActivatesLoopIncrement
BattleScript_DroughtActivates::
pause B_WAIT_TIME_SHORT
printstring STRINGID_PKMNSXINTENSIFIEDSUN

View File

@@ -65,7 +65,7 @@ BattleScript_SuccessBallThrow::
jumpifhalfword CMP_EQUAL, gLastUsedItem, ITEM_SAFARI_BALL, BattleScript_PrintCaughtMonInfo
incrementgamestat GAME_STAT_POKEMON_CAPTURES
BattleScript_PrintCaughtMonInfo::
printstring STRINGID_GOTCHAPKMNCAUGHT
printstring STRINGID_GOTCHAPKMNCAUGHTPLAYER
trysetcaughtmondexflags BattleScript_TryNicknameCaughtMon
printstring STRINGID_PKMNDATAADDEDTODEX
waitstate
@@ -87,7 +87,7 @@ BattleScript_SuccessBallThrowEnd::
finishturn
BattleScript_WallyBallThrow::
printstring STRINGID_GOTCHAPKMNCAUGHT2
printstring STRINGID_GOTCHAPKMNCAUGHTWALLY
setbyte gBattleOutcome, B_OUTCOME_CAUGHT
finishturn

View File

@@ -1,3 +1,4 @@
#include "config.h"
#include "constants/global.h"
#include "constants/contest.h"
.include "asm/macros.inc"
@@ -435,11 +436,15 @@ AI_CGM_BetterWhenAudienceExcited:
AI_CGM_BetterWhenAudienceExcited_1stUp:
@ BUG: Should be if_appeal_num_eq 0
@ 1st up on 1st appeal excitement will always be 0
if_appeal_num_not_eq 0, AI_CGM_BetterWhenAudienceExcited_Not1stAppeal
#ifdef BUGFIX
if_appeal_num_eq 0, AI_CGM_BetterWhenAudienceExcited_1stAppeal
#else
if_appeal_num_not_eq 0, AI_CGM_BetterWhenAudienceExcited_1stAppeal
#endif
if_excitement_eq 4, AI_CGM_BetterWhenAudienceExcited_1AwayFromMax
if_excitement_eq 3, AI_CGM_BetterWhenAudienceExcited_2AwayFromMax
end
AI_CGM_BetterWhenAudienceExcited_Not1stAppeal:
AI_CGM_BetterWhenAudienceExcited_1stAppeal:
if_random_less_than 125, AI_CGM_End
score -15
end
@@ -542,7 +547,11 @@ AI_CGM_TargetMonWithJudgesAttention:
end
AI_CGM_TargetMonWithJudgesAttention_CheckMon1:
if_cannot_participate MON_1, AI_CGM_TargetMonWithJudgesAttention_CheckMon2
#ifdef BUGFIX
if_not_used_combo_starter MON_1, AI_CGM_TargetMonWithJudgesAttention_CheckMon2
#else
if_used_combo_starter MON_1, AI_CGM_TargetMonWithJudgesAttention_CheckMon2
#endif
if_random_less_than 125, AI_CGM_TargetMonWithJudgesAttention_CheckMon2
score +2
if_not_completed_combo MON_1, AI_CGM_TargetMonWithJudgesAttention_CheckMon2
@@ -551,7 +560,11 @@ AI_CGM_TargetMonWithJudgesAttention_CheckMon1:
AI_CGM_TargetMonWithJudgesAttention_CheckMon2:
if_user_order_eq MON_2, AI_CGM_End
if_cannot_participate MON_2, AI_CGM_TargetMonWithJudgesAttention_CheckMon3
#ifdef BUGFIX
if_not_used_combo_starter MON_2, AI_CGM_TargetMonWithJudgesAttention_CheckMon3
#else
if_used_combo_starter MON_2, AI_CGM_TargetMonWithJudgesAttention_CheckMon3
#endif
if_random_less_than 125, AI_CGM_TargetMonWithJudgesAttention_CheckMon3
score +2
if_not_completed_combo MON_2, AI_CGM_TargetMonWithJudgesAttention_CheckMon3
@@ -560,7 +573,11 @@ AI_CGM_TargetMonWithJudgesAttention_CheckMon2:
AI_CGM_TargetMonWithJudgesAttention_CheckMon3:
if_user_order_eq MON_3, AI_CGM_End
if_cannot_participate MON_3, AI_CGM_End
#ifdef BUGFIX
if_not_used_combo_starter MON_3, AI_CGM_End
#else
if_used_combo_starter MON_3, AI_CGM_End
#endif
if_random_less_than 125, AI_CGM_End
score +2
if_not_completed_combo MON_3, AI_CGM_End

View File

@@ -1,3 +1,4 @@
#include "config.h"
#include "constants/global.h"
#include "constants/apprentice.h"
#include "constants/battle.h"
@@ -923,69 +924,6 @@ Common_EventScript_LegendaryFlewAway::
.include "data/scripts/abnormal_weather.inc"
.include "data/scripts/trainer_script.inc"
.include "data/scripts/berry_tree.inc"
.ifdef ENGLISH
.include "data/text/berry_tree.inc"
.include "data/text/secret_power.inc"
.include "data/text/secret_base_trainers.inc"
.include "data/scripts/secret_base.inc"
.include "data/text/secret_base.inc"
.include "data/scripts/cable_club.inc"
.include "data/text/cable_club.inc"
.include "data/scripts/contest_hall.inc"
.include "data/text/contest_hall.inc"
.include "data/text/contest_strings.inc"
.include "data/text/contest_link.inc"
.include "data/text/contest_painting.inc"
.include "data/text/trick_house_mechadolls.inc"
.include "data/scripts/tv.inc"
.include "data/text/tv.inc"
.include "data/scripts/interview.inc"
.include "data/scripts/gabby_and_ty.inc"
.include "data/text/pokemon_news.inc"
.include "data/scripts/mauville_man.inc"
.include "data/scripts/field_move_scripts.inc"
.include "data/scripts/item_ball_scripts.inc"
.include "data/scripts/profile_man.inc"
.include "data/text/profile_man.inc"
.include "data/scripts/day_care.inc"
.include "data/text/day_care.inc"
.include "data/scripts/flash.inc"
.include "data/scripts/players_house.inc"
.include "data/text/berry_blender.inc"
.include "data/scripts/berry_blender.inc"
.include "data/text/mauville_man.inc"
.include "data/text/trainers.inc"
.include "data/scripts/repel.inc"
.include "data/scripts/safari_zone.inc"
.include "data/text/safari_zone.inc"
.include "data/scripts/roulette.inc"
.include "data/text/roulette.inc"
.include "data/text/pokedex_rating.inc"
.include "data/text/lottery_corner.inc"
.include "data/text/event_ticket_1.inc"
.include "data/text/braille.inc"
.include "data/text/berries.inc"
.include "data/text/shoal_cave.inc"
.include "data/text/check_furniture.inc"
.include "data/scripts/cave_hole.inc"
.include "data/scripts/lilycove_lady.inc"
.include "data/text/lilycove_lady.inc"
.include "data/text/match_call.inc"
.include "data/scripts/apprentice.inc"
.include "data/text/apprentice.inc"
.include "data/text/battle_dome.inc"
.include "data/scripts/battle_pike.inc"
.include "data/text/blend_master.inc"
.include "data/text/battle_tent.inc"
.include "data/text/event_ticket_2.inc"
.include "data/text/move_tutors.inc"
.include "data/scripts/move_tutors.inc"
.include "data/scripts/trainer_hill.inc"
.include "data/scripts/test_signpost.inc"
.include "data/text/frontier_brain.inc"
.include "data/text/save.inc"
.include "data/text/birch_speech.inc"
.else
.ifdef FRENCH
.include "data/text/french/berry_tree.inc"
.include "data/text/french/secret_power.inc"
@@ -1174,7 +1112,68 @@ Common_EventScript_LegendaryFlewAway::
.include "data/text/spanish/frontier_brain.inc"
.include "data/text/spanish/save.inc"
.include "data/text/spanish/birch_speech.inc"
.endif
.else @ENGLISH
.include "data/text/berry_tree.inc"
.include "data/text/secret_power.inc"
.include "data/text/secret_base_trainers.inc"
.include "data/scripts/secret_base.inc"
.include "data/text/secret_base.inc"
.include "data/scripts/cable_club.inc"
.include "data/text/cable_club.inc"
.include "data/scripts/contest_hall.inc"
.include "data/text/contest_hall.inc"
.include "data/text/contest_strings.inc"
.include "data/text/contest_link.inc"
.include "data/text/contest_painting.inc"
.include "data/text/trick_house_mechadolls.inc"
.include "data/scripts/tv.inc"
.include "data/text/tv.inc"
.include "data/scripts/interview.inc"
.include "data/scripts/gabby_and_ty.inc"
.include "data/text/pokemon_news.inc"
.include "data/scripts/mauville_man.inc"
.include "data/scripts/field_move_scripts.inc"
.include "data/scripts/item_ball_scripts.inc"
.include "data/scripts/profile_man.inc"
.include "data/text/profile_man.inc"
.include "data/scripts/day_care.inc"
.include "data/text/day_care.inc"
.include "data/scripts/flash.inc"
.include "data/scripts/players_house.inc"
.include "data/text/berry_blender.inc"
.include "data/scripts/berry_blender.inc"
.include "data/text/mauville_man.inc"
.include "data/text/trainers.inc"
.include "data/scripts/repel.inc"
.include "data/scripts/safari_zone.inc"
.include "data/text/safari_zone.inc"
.include "data/scripts/roulette.inc"
.include "data/text/roulette.inc"
.include "data/text/pokedex_rating.inc"
.include "data/text/lottery_corner.inc"
.include "data/text/event_ticket_1.inc"
.include "data/text/braille.inc"
.include "data/text/berries.inc"
.include "data/text/shoal_cave.inc"
.include "data/text/check_furniture.inc"
.include "data/scripts/cave_hole.inc"
.include "data/scripts/lilycove_lady.inc"
.include "data/text/lilycove_lady.inc"
.include "data/text/match_call.inc"
.include "data/scripts/apprentice.inc"
.include "data/text/apprentice.inc"
.include "data/text/battle_dome.inc"
.include "data/scripts/battle_pike.inc"
.include "data/text/blend_master.inc"
.include "data/text/battle_tent.inc"
.include "data/text/event_ticket_2.inc"
.include "data/text/move_tutors.inc"
.include "data/scripts/move_tutors.inc"
.include "data/scripts/trainer_hill.inc"
.include "data/scripts/test_signpost.inc"
.include "data/text/frontier_brain.inc"
.include "data/text/save.inc"
.include "data/text/birch_speech.inc"
.endif
.endif
.endif

View File

@@ -47,14 +47,14 @@
"y": 6,
"elevation": 3,
"dest_map": "MAP_ABANDONED_SHIP_DECK",
"dest_warp_id": 4
"dest_warp_id": "4"
},
{
"x": 8,
"y": 6,
"elevation": 3,
"dest_map": "MAP_ABANDONED_SHIP_DECK",
"dest_warp_id": 4
"dest_warp_id": "4"
}
],
"coord_events": [],

View File

@@ -7,7 +7,7 @@ AbandonedShip_CaptainsOffice_EventScript_CaptSternAide::
goto_if_set FLAG_EXCHANGED_SCANNER, AbandonedShip_CaptainsOffice_EventScript_ThisIsSSCactus
checkitem ITEM_SCANNER
goto_if_eq VAR_RESULT, TRUE, AbandonedShip_CaptainsOffice_EventScript_CanYouDeliverScanner
goto_if_set FLAG_ITEM_ABANDONED_SHIP_HIDDEN_FLOOR_ROOM_4_SCANNER, AbandonedShip_CaptainsOffice_EventScript_ThisIsSSCactus
goto_if_set FLAG_ITEM_ABANDONED_SHIP_HIDDEN_FLOOR_ROOM_2_SCANNER, AbandonedShip_CaptainsOffice_EventScript_ThisIsSSCactus
msgbox AbandonedShip_CaptainsOffice_Text_NoSuccessFindingScanner, MSGBOX_DEFAULT
release
end

View File

@@ -47,84 +47,84 @@
"y": 11,
"elevation": 3,
"dest_map": "MAP_ABANDONED_SHIP_DECK",
"dest_warp_id": 2
"dest_warp_id": "2"
},
{
"x": 8,
"y": 11,
"elevation": 3,
"dest_map": "MAP_ABANDONED_SHIP_DECK",
"dest_warp_id": 2
"dest_warp_id": "2"
},
{
"x": 0,
"y": 11,
"elevation": 3,
"dest_map": "MAP_ABANDONED_SHIP_DECK",
"dest_warp_id": 3
"dest_warp_id": "3"
},
{
"x": 1,
"y": 11,
"elevation": 3,
"dest_map": "MAP_ABANDONED_SHIP_DECK",
"dest_warp_id": 3
"dest_warp_id": "3"
},
{
"x": 11,
"y": 9,
"elevation": 3,
"dest_map": "MAP_ABANDONED_SHIP_ROOMS_1F",
"dest_warp_id": 0
"dest_warp_id": "0"
},
{
"x": 14,
"y": 9,
"elevation": 3,
"dest_map": "MAP_ABANDONED_SHIP_ROOMS_1F",
"dest_warp_id": 3
"dest_warp_id": "3"
},
{
"x": 11,
"y": 3,
"elevation": 3,
"dest_map": "MAP_ABANDONED_SHIP_ROOMS_1F",
"dest_warp_id": 2
"dest_warp_id": "2"
},
{
"x": 14,
"y": 3,
"elevation": 3,
"dest_map": "MAP_ABANDONED_SHIP_ROOMS_1F",
"dest_warp_id": 4
"dest_warp_id": "4"
},
{
"x": 3,
"y": 9,
"elevation": 3,
"dest_map": "MAP_ABANDONED_SHIP_ROOMS2_1F",
"dest_warp_id": 0
"dest_warp_id": "0"
},
{
"x": 16,
"y": 2,
"elevation": 3,
"dest_map": "MAP_ABANDONED_SHIP_CORRIDORS_B1F",
"dest_warp_id": 7
"dest_warp_id": "7"
},
{
"x": 5,
"y": 2,
"elevation": 3,
"dest_map": "MAP_ABANDONED_SHIP_CORRIDORS_B1F",
"dest_warp_id": 6
"dest_warp_id": "6"
},
{
"x": 3,
"y": 3,
"elevation": 3,
"dest_map": "MAP_ABANDONED_SHIP_ROOMS2_1F",
"dest_warp_id": 2
"dest_warp_id": "2"
}
],
"coord_events": [],

View File

@@ -47,56 +47,56 @@
"y": 4,
"elevation": 3,
"dest_map": "MAP_ABANDONED_SHIP_ROOMS2_B1F",
"dest_warp_id": 2
"dest_warp_id": "2"
},
{
"x": 3,
"y": 4,
"elevation": 3,
"dest_map": "MAP_ABANDONED_SHIP_ROOMS2_B1F",
"dest_warp_id": 0
"dest_warp_id": "0"
},
{
"x": 5,
"y": 7,
"elevation": 3,
"dest_map": "MAP_ABANDONED_SHIP_ROOMS_B1F",
"dest_warp_id": 0
"dest_warp_id": "0"
},
{
"x": 8,
"y": 7,
"elevation": 3,
"dest_map": "MAP_ABANDONED_SHIP_ROOMS_B1F",
"dest_warp_id": 1
"dest_warp_id": "1"
},
{
"x": 11,
"y": 7,
"elevation": 3,
"dest_map": "MAP_ABANDONED_SHIP_ROOMS_B1F",
"dest_warp_id": 2
"dest_warp_id": "2"
},
{
"x": 11,
"y": 4,
"elevation": 3,
"dest_map": "MAP_ABANDONED_SHIP_ROOM_B1F",
"dest_warp_id": 0
"dest_warp_id": "0"
},
{
"x": 0,
"y": 2,
"elevation": 3,
"dest_map": "MAP_ABANDONED_SHIP_CORRIDORS_1F",
"dest_warp_id": 10
"dest_warp_id": "10"
},
{
"x": 8,
"y": 2,
"elevation": 3,
"dest_map": "MAP_ABANDONED_SHIP_CORRIDORS_1F",
"dest_warp_id": 9
"dest_warp_id": "9"
}
],
"coord_events": [],

View File

@@ -20,35 +20,35 @@
"y": 15,
"elevation": 3,
"dest_map": "MAP_ROUTE108",
"dest_warp_id": 0
"dest_warp_id": "0"
},
{
"x": 14,
"y": 15,
"elevation": 3,
"dest_map": "MAP_ROUTE108",
"dest_warp_id": 0
"dest_warp_id": "0"
},
{
"x": 13,
"y": 9,
"elevation": 3,
"dest_map": "MAP_ABANDONED_SHIP_CORRIDORS_1F",
"dest_warp_id": 1
"dest_warp_id": "1"
},
{
"x": 8,
"y": 9,
"elevation": 3,
"dest_map": "MAP_ABANDONED_SHIP_CORRIDORS_1F",
"dest_warp_id": 2
"dest_warp_id": "2"
},
{
"x": 12,
"y": 5,
"elevation": 3,
"dest_map": "MAP_ABANDONED_SHIP_CAPTAINS_OFFICE",
"dest_warp_id": 0
"dest_warp_id": "0"
}
],
"coord_events": [],

View File

@@ -20,42 +20,42 @@
"y": 8,
"elevation": 3,
"dest_map": "MAP_ABANDONED_SHIP_HIDDEN_FLOOR_ROOMS",
"dest_warp_id": 0
"dest_warp_id": "0"
},
{
"x": 6,
"y": 8,
"elevation": 3,
"dest_map": "MAP_ABANDONED_SHIP_HIDDEN_FLOOR_ROOMS",
"dest_warp_id": 2
"dest_warp_id": "2"
},
{
"x": 9,
"y": 8,
"elevation": 3,
"dest_map": "MAP_ABANDONED_SHIP_HIDDEN_FLOOR_ROOMS",
"dest_warp_id": 4
"dest_warp_id": "4"
},
{
"x": 3,
"y": 3,
"elevation": 3,
"dest_map": "MAP_ABANDONED_SHIP_HIDDEN_FLOOR_ROOMS",
"dest_warp_id": 6
"dest_warp_id": "6"
},
{
"x": 6,
"y": 3,
"elevation": 3,
"dest_map": "MAP_ABANDONED_SHIP_HIDDEN_FLOOR_ROOMS",
"dest_warp_id": 7
"dest_warp_id": "7"
},
{
"x": 9,
"y": 3,
"elevation": 3,
"dest_map": "MAP_ABANDONED_SHIP_HIDDEN_FLOOR_ROOMS",
"dest_warp_id": 8
"dest_warp_id": "8"
}
],
"coord_events": [],

View File

@@ -38,7 +38,7 @@
"trainer_type": "TRAINER_TYPE_NONE",
"trainer_sight_or_berry_tree_id": "0",
"script": "AbandonedShip_HiddenFloorRooms_EventScript_ItemScanner",
"flag": "FLAG_ITEM_ABANDONED_SHIP_HIDDEN_FLOOR_ROOM_4_SCANNER"
"flag": "FLAG_ITEM_ABANDONED_SHIP_HIDDEN_FLOOR_ROOM_2_SCANNER"
},
{
"graphics_id": "OBJ_EVENT_GFX_ITEM_BALL",
@@ -50,8 +50,8 @@
"movement_range_y": 1,
"trainer_type": "TRAINER_TYPE_NONE",
"trainer_sight_or_berry_tree_id": "0",
"script": "AbandonedShip_HiddenFloorRooms_EventScript_ItemTM18",
"flag": "FLAG_ITEM_ABANDONED_SHIP_HIDDEN_FLOOR_ROOM_1_TM_18"
"script": "AbandonedShip_HiddenFloorRooms_EventScript_ItemTMRainDance",
"flag": "FLAG_ITEM_ABANDONED_SHIP_HIDDEN_FLOOR_ROOM_1_TM_RAIN_DANCE"
},
{
"graphics_id": "OBJ_EVENT_GFX_ITEM_BALL",
@@ -73,63 +73,63 @@
"y": 14,
"elevation": 3,
"dest_map": "MAP_ABANDONED_SHIP_HIDDEN_FLOOR_CORRIDORS",
"dest_warp_id": 0
"dest_warp_id": "0"
},
{
"x": 7,
"y": 14,
"elevation": 3,
"dest_map": "MAP_ABANDONED_SHIP_HIDDEN_FLOOR_CORRIDORS",
"dest_warp_id": 0
"dest_warp_id": "0"
},
{
"x": 21,
"y": 14,
"elevation": 3,
"dest_map": "MAP_ABANDONED_SHIP_HIDDEN_FLOOR_CORRIDORS",
"dest_warp_id": 1
"dest_warp_id": "1"
},
{
"x": 22,
"y": 14,
"elevation": 3,
"dest_map": "MAP_ABANDONED_SHIP_HIDDEN_FLOOR_CORRIDORS",
"dest_warp_id": 1
"dest_warp_id": "1"
},
{
"x": 36,
"y": 14,
"elevation": 3,
"dest_map": "MAP_ABANDONED_SHIP_HIDDEN_FLOOR_CORRIDORS",
"dest_warp_id": 2
"dest_warp_id": "2"
},
{
"x": 37,
"y": 14,
"elevation": 3,
"dest_map": "MAP_ABANDONED_SHIP_HIDDEN_FLOOR_CORRIDORS",
"dest_warp_id": 2
"dest_warp_id": "2"
},
{
"x": 6,
"y": 1,
"elevation": 3,
"dest_map": "MAP_ABANDONED_SHIP_HIDDEN_FLOOR_CORRIDORS",
"dest_warp_id": 3
"dest_warp_id": "3"
},
{
"x": 21,
"y": 1,
"elevation": 3,
"dest_map": "MAP_ABANDONED_SHIP_HIDDEN_FLOOR_CORRIDORS",
"dest_warp_id": 4
"dest_warp_id": "4"
},
{
"x": 36,
"y": 1,
"elevation": 3,
"dest_map": "MAP_ABANDONED_SHIP_HIDDEN_FLOOR_CORRIDORS",
"dest_warp_id": 5
"dest_warp_id": "5"
}
],
"coord_events": [],

View File

@@ -24,8 +24,8 @@
"movement_range_y": 1,
"trainer_type": "TRAINER_TYPE_NONE",
"trainer_sight_or_berry_tree_id": "0",
"script": "AbandonedShip_Room_B1F_EventScript_ItemTM13",
"flag": "FLAG_ITEM_ABANDONED_SHIP_ROOMS_B1F_TM_13"
"script": "AbandonedShip_Room_B1F_EventScript_ItemTMIceBeam",
"flag": "FLAG_ITEM_ABANDONED_SHIP_ROOMS_B1F_TM_ICE_BEAM"
}
],
"warp_events": [
@@ -34,14 +34,14 @@
"y": 7,
"elevation": 3,
"dest_map": "MAP_ABANDONED_SHIP_CORRIDORS_B1F",
"dest_warp_id": 5
"dest_warp_id": "5"
},
{
"x": 5,
"y": 7,
"elevation": 3,
"dest_map": "MAP_ABANDONED_SHIP_CORRIDORS_B1F",
"dest_warp_id": 5
"dest_warp_id": "5"
}
],
"coord_events": [],

View File

@@ -86,21 +86,21 @@
"y": 16,
"elevation": 3,
"dest_map": "MAP_ABANDONED_SHIP_CORRIDORS_1F",
"dest_warp_id": 8
"dest_warp_id": "8"
},
{
"x": 5,
"y": 16,
"elevation": 3,
"dest_map": "MAP_ABANDONED_SHIP_CORRIDORS_1F",
"dest_warp_id": 8
"dest_warp_id": "8"
},
{
"x": 4,
"y": 1,
"elevation": 3,
"dest_map": "MAP_ABANDONED_SHIP_CORRIDORS_1F",
"dest_warp_id": 11
"dest_warp_id": "11"
}
],
"coord_events": [],

View File

@@ -47,28 +47,28 @@
"y": 7,
"elevation": 3,
"dest_map": "MAP_ABANDONED_SHIP_CORRIDORS_B1F",
"dest_warp_id": 1
"dest_warp_id": "1"
},
{
"x": 5,
"y": 7,
"elevation": 3,
"dest_map": "MAP_ABANDONED_SHIP_CORRIDORS_B1F",
"dest_warp_id": 1
"dest_warp_id": "1"
},
{
"x": 13,
"y": 7,
"elevation": 3,
"dest_map": "MAP_ABANDONED_SHIP_CORRIDORS_B1F",
"dest_warp_id": 0
"dest_warp_id": "0"
},
{
"x": 14,
"y": 7,
"elevation": 3,
"dest_map": "MAP_ABANDONED_SHIP_CORRIDORS_B1F",
"dest_warp_id": 0
"dest_warp_id": "0"
}
],
"coord_events": [],

View File

@@ -73,42 +73,42 @@
"y": 16,
"elevation": 3,
"dest_map": "MAP_ABANDONED_SHIP_CORRIDORS_1F",
"dest_warp_id": 4
"dest_warp_id": "4"
},
{
"x": 5,
"y": 16,
"elevation": 3,
"dest_map": "MAP_ABANDONED_SHIP_CORRIDORS_1F",
"dest_warp_id": 4
"dest_warp_id": "4"
},
{
"x": 4,
"y": 1,
"elevation": 3,
"dest_map": "MAP_ABANDONED_SHIP_CORRIDORS_1F",
"dest_warp_id": 6
"dest_warp_id": "6"
},
{
"x": 13,
"y": 16,
"elevation": 3,
"dest_map": "MAP_ABANDONED_SHIP_CORRIDORS_1F",
"dest_warp_id": 5
"dest_warp_id": "5"
},
{
"x": 13,
"y": 1,
"elevation": 3,
"dest_map": "MAP_ABANDONED_SHIP_CORRIDORS_1F",
"dest_warp_id": 7
"dest_warp_id": "7"
},
{
"x": 14,
"y": 16,
"elevation": 3,
"dest_map": "MAP_ABANDONED_SHIP_CORRIDORS_1F",
"dest_warp_id": 5
"dest_warp_id": "5"
}
],
"coord_events": [],

View File

@@ -47,21 +47,21 @@
"y": 1,
"elevation": 3,
"dest_map": "MAP_ABANDONED_SHIP_CORRIDORS_B1F",
"dest_warp_id": 2
"dest_warp_id": "2"
},
{
"x": 13,
"y": 1,
"elevation": 3,
"dest_map": "MAP_ABANDONED_SHIP_CORRIDORS_B1F",
"dest_warp_id": 3
"dest_warp_id": "3"
},
{
"x": 22,
"y": 1,
"elevation": 3,
"dest_map": "MAP_ABANDONED_SHIP_CORRIDORS_B1F",
"dest_warp_id": 4
"dest_warp_id": "4"
}
],
"coord_events": [],

View File

@@ -20,14 +20,14 @@
"y": 7,
"elevation": 3,
"dest_map": "MAP_ABANDONED_SHIP_UNDERWATER2",
"dest_warp_id": 0
"dest_warp_id": "0"
},
{
"x": 4,
"y": 7,
"elevation": 3,
"dest_map": "MAP_ABANDONED_SHIP_UNDERWATER2",
"dest_warp_id": 0
"dest_warp_id": "0"
}
],
"coord_events": [],

View File

@@ -20,7 +20,7 @@
"y": 1,
"elevation": 3,
"dest_map": "MAP_ABANDONED_SHIP_UNDERWATER1",
"dest_warp_id": 0
"dest_warp_id": "0"
}
],
"coord_events": [],

View File

@@ -20,7 +20,7 @@
"y": 22,
"elevation": 0,
"dest_map": "MAP_ROUTE103",
"dest_warp_id": 0
"dest_warp_id": "0"
}
],
"coord_events": [],

View File

@@ -34,21 +34,21 @@
"y": 29,
"elevation": 3,
"dest_map": "MAP_ROUTE120",
"dest_warp_id": 0
"dest_warp_id": "0"
},
{
"x": 8,
"y": 20,
"elevation": 0,
"dest_map": "MAP_ANCIENT_TOMB",
"dest_warp_id": 2
"dest_warp_id": "2"
},
{
"x": 8,
"y": 11,
"elevation": 3,
"dest_map": "MAP_ANCIENT_TOMB",
"dest_warp_id": 1
"dest_warp_id": "1"
}
],
"coord_events": [],

View File

@@ -60,21 +60,21 @@
"y": 27,
"elevation": 1,
"dest_map": "MAP_LILYCOVE_CITY",
"dest_warp_id": 6
"dest_warp_id": "6"
},
{
"x": 14,
"y": 27,
"elevation": 1,
"dest_map": "MAP_LILYCOVE_CITY",
"dest_warp_id": 6
"dest_warp_id": "6"
},
{
"x": 22,
"y": 1,
"elevation": 3,
"dest_map": "MAP_AQUA_HIDEOUT_B1F",
"dest_warp_id": 0
"dest_warp_id": "0"
}
],
"coord_events": [],

View File

@@ -138,175 +138,175 @@
"y": 1,
"elevation": 3,
"dest_map": "MAP_AQUA_HIDEOUT_1F",
"dest_warp_id": 2
"dest_warp_id": "2"
},
{
"x": 18,
"y": 1,
"elevation": 3,
"dest_map": "MAP_AQUA_HIDEOUT_B2F",
"dest_warp_id": 0
"dest_warp_id": "0"
},
{
"x": 12,
"y": 1,
"elevation": 3,
"dest_map": "MAP_AQUA_HIDEOUT_B2F",
"dest_warp_id": 1
"dest_warp_id": "1"
},
{
"x": 3,
"y": 3,
"elevation": 3,
"dest_map": "MAP_AQUA_HIDEOUT_B2F",
"dest_warp_id": 2
"dest_warp_id": "2"
},
{
"x": 31,
"y": 4,
"elevation": 3,
"dest_map": "MAP_AQUA_HIDEOUT_B1F",
"dest_warp_id": 7
"dest_warp_id": "7"
},
{
"x": 27,
"y": 4,
"elevation": 3,
"dest_map": "MAP_AQUA_HIDEOUT_B1F",
"dest_warp_id": 8
"dest_warp_id": "8"
},
{
"x": 20,
"y": 4,
"elevation": 3,
"dest_map": "MAP_AQUA_HIDEOUT_B1F",
"dest_warp_id": 10
"dest_warp_id": "10"
},
{
"x": 27,
"y": 12,
"elevation": 3,
"dest_map": "MAP_AQUA_HIDEOUT_B1F",
"dest_warp_id": 4
"dest_warp_id": "4"
},
{
"x": 3,
"y": 15,
"elevation": 3,
"dest_map": "MAP_AQUA_HIDEOUT_B1F",
"dest_warp_id": 5
"dest_warp_id": "5"
},
{
"x": 3,
"y": 20,
"elevation": 3,
"dest_map": "MAP_AQUA_HIDEOUT_B1F",
"dest_warp_id": 12
"dest_warp_id": "12"
},
{
"x": 32,
"y": 19,
"elevation": 3,
"dest_map": "MAP_AQUA_HIDEOUT_B1F",
"dest_warp_id": 6
"dest_warp_id": "6"
},
{
"x": 23,
"y": 10,
"elevation": 3,
"dest_map": "MAP_AQUA_HIDEOUT_B1F",
"dest_warp_id": 22
"dest_warp_id": "22"
},
{
"x": 45,
"y": 3,
"elevation": 3,
"dest_map": "MAP_AQUA_HIDEOUT_B1F",
"dest_warp_id": 9
"dest_warp_id": "9"
},
{
"x": 42,
"y": 5,
"elevation": 3,
"dest_map": "MAP_AQUA_HIDEOUT_B1F",
"dest_warp_id": 18
"dest_warp_id": "18"
},
{
"x": 45,
"y": 5,
"elevation": 3,
"dest_map": "MAP_AQUA_HIDEOUT_B1F",
"dest_warp_id": 12
"dest_warp_id": "12"
},
{
"x": 48,
"y": 5,
"elevation": 3,
"dest_map": "MAP_AQUA_HIDEOUT_B1F",
"dest_warp_id": 16
"dest_warp_id": "16"
},
{
"x": 42,
"y": 9,
"elevation": 3,
"dest_map": "MAP_AQUA_HIDEOUT_B1F",
"dest_warp_id": 15
"dest_warp_id": "15"
},
{
"x": 45,
"y": 9,
"elevation": 3,
"dest_map": "MAP_AQUA_HIDEOUT_B1F",
"dest_warp_id": 20
"dest_warp_id": "20"
},
{
"x": 48,
"y": 9,
"elevation": 3,
"dest_map": "MAP_AQUA_HIDEOUT_B1F",
"dest_warp_id": 13
"dest_warp_id": "13"
},
{
"x": 42,
"y": 13,
"elevation": 3,
"dest_map": "MAP_AQUA_HIDEOUT_B1F",
"dest_warp_id": 24
"dest_warp_id": "24"
},
{
"x": 45,
"y": 13,
"elevation": 3,
"dest_map": "MAP_AQUA_HIDEOUT_B1F",
"dest_warp_id": 17
"dest_warp_id": "17"
},
{
"x": 48,
"y": 13,
"elevation": 3,
"dest_map": "MAP_AQUA_HIDEOUT_B1F",
"dest_warp_id": 12
"dest_warp_id": "12"
},
{
"x": 42,
"y": 17,
"elevation": 3,
"dest_map": "MAP_AQUA_HIDEOUT_B1F",
"dest_warp_id": 11
"dest_warp_id": "11"
},
{
"x": 45,
"y": 17,
"elevation": 3,
"dest_map": "MAP_AQUA_HIDEOUT_B1F",
"dest_warp_id": 17
"dest_warp_id": "17"
},
{
"x": 48,
"y": 17,
"elevation": 3,
"dest_map": "MAP_AQUA_HIDEOUT_B1F",
"dest_warp_id": 19
"dest_warp_id": "19"
}
],
"coord_events": [],

View File

@@ -99,70 +99,70 @@
"y": 1,
"elevation": 3,
"dest_map": "MAP_AQUA_HIDEOUT_B1F",
"dest_warp_id": 1
"dest_warp_id": "1"
},
{
"x": 12,
"y": 1,
"elevation": 3,
"dest_map": "MAP_AQUA_HIDEOUT_B1F",
"dest_warp_id": 2
"dest_warp_id": "2"
},
{
"x": 3,
"y": 3,
"elevation": 3,
"dest_map": "MAP_AQUA_HIDEOUT_B1F",
"dest_warp_id": 3
"dest_warp_id": "3"
},
{
"x": 31,
"y": 8,
"elevation": 3,
"dest_map": "MAP_AQUA_HIDEOUT_B2F",
"dest_warp_id": 5
"dest_warp_id": "5"
},
{
"x": 8,
"y": 8,
"elevation": 3,
"dest_map": "MAP_AQUA_HIDEOUT_B2F",
"dest_warp_id": 8
"dest_warp_id": "8"
},
{
"x": 5,
"y": 8,
"elevation": 3,
"dest_map": "MAP_AQUA_HIDEOUT_B2F",
"dest_warp_id": 3
"dest_warp_id": "3"
},
{
"x": 18,
"y": 13,
"elevation": 3,
"dest_map": "MAP_AQUA_HIDEOUT_B2F",
"dest_warp_id": 7
"dest_warp_id": "7"
},
{
"x": 12,
"y": 13,
"elevation": 3,
"dest_map": "MAP_AQUA_HIDEOUT_B2F",
"dest_warp_id": 6
"dest_warp_id": "6"
},
{
"x": 31,
"y": 17,
"elevation": 3,
"dest_map": "MAP_AQUA_HIDEOUT_B2F",
"dest_warp_id": 4
"dest_warp_id": "4"
},
{
"x": 32,
"y": 20,
"elevation": 3,
"dest_map": "MAP_AQUA_HIDEOUT_B1F",
"dest_warp_id": 4
"dest_warp_id": "4"
}
],
"coord_events": [

View File

@@ -34,14 +34,14 @@
"y": 17,
"elevation": 0,
"dest_map": "MAP_BATTLE_FRONTIER_OUTSIDE_EAST",
"dest_warp_id": 13
"dest_warp_id": "13"
},
{
"x": 6,
"y": 5,
"elevation": 0,
"dest_map": "MAP_ARTISAN_CAVE_B1F",
"dest_warp_id": 1
"dest_warp_id": "1"
}
],
"coord_events": [],

View File

@@ -34,14 +34,14 @@
"y": 48,
"elevation": 0,
"dest_map": "MAP_BATTLE_FRONTIER_OUTSIDE_WEST",
"dest_warp_id": 10
"dest_warp_id": "10"
},
{
"x": 38,
"y": 5,
"elevation": 0,
"dest_map": "MAP_ARTISAN_CAVE_1F",
"dest_warp_id": 1
"dest_warp_id": "1"
}
],
"coord_events": [],

View File

@@ -33,15 +33,15 @@
"x": 6,
"y": 8,
"elevation": 3,
"dest_map": "MAP_NONE",
"dest_warp_id": 127
"dest_map": "MAP_DYNAMIC",
"dest_warp_id": "WARP_ID_DYNAMIC"
},
{
"x": 7,
"y": 8,
"elevation": 3,
"dest_map": "MAP_NONE",
"dest_warp_id": 127
"dest_map": "MAP_DYNAMIC",
"dest_warp_id": "WARP_ID_DYNAMIC"
}
],
"coord_events": [

View File

@@ -19,29 +19,29 @@
"x": 5,
"y": 8,
"elevation": 3,
"dest_map": "MAP_NONE",
"dest_warp_id": 127
"dest_map": "MAP_DYNAMIC",
"dest_warp_id": "WARP_ID_DYNAMIC"
},
{
"x": 6,
"y": 8,
"elevation": 3,
"dest_map": "MAP_NONE",
"dest_warp_id": 127
"dest_map": "MAP_DYNAMIC",
"dest_warp_id": "WARP_ID_DYNAMIC"
},
{
"x": 7,
"y": 8,
"elevation": 3,
"dest_map": "MAP_NONE",
"dest_warp_id": 127
"dest_map": "MAP_DYNAMIC",
"dest_warp_id": "WARP_ID_DYNAMIC"
},
{
"x": 8,
"y": 8,
"elevation": 3,
"dest_map": "MAP_NONE",
"dest_warp_id": 127
"dest_map": "MAP_DYNAMIC",
"dest_warp_id": "WARP_ID_DYNAMIC"
}
],
"coord_events": [

View File

@@ -86,7 +86,7 @@
"y": 12,
"elevation": 3,
"dest_map": "MAP_BATTLE_FRONTIER_OUTSIDE_EAST",
"dest_warp_id": 1
"dest_warp_id": "1"
}
],
"coord_events": [],

View File

@@ -15,11 +15,11 @@ BattleFrontier_BattleArenaLobby_EventScript_TurnPlayerNorth::
end
BattleFrontier_BattleArenaLobby_OnFrame:
map_script_2 VAR_TEMP_0, 0, BattleFrontier_BattleArenaLobby_EventScript_GetChallengeStatus
map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_SAVING, BattleFrontier_BattleArenaLobby_EventScript_QuitWithoutSaving
map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_PAUSED, BattleFrontier_BattleArenaLobby_EventScript_ResumeChallenge
map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_WON, BattleFrontier_BattleArenaLobby_EventScript_WonChallenge
map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_LOST, BattleFrontier_BattleArenaLobby_EventScript_LostChallenge
map_script_2 VAR_TEMP_CHALLENGE_STATUS, 0, BattleFrontier_BattleArenaLobby_EventScript_GetChallengeStatus
map_script_2 VAR_TEMP_CHALLENGE_STATUS, CHALLENGE_STATUS_SAVING, BattleFrontier_BattleArenaLobby_EventScript_QuitWithoutSaving
map_script_2 VAR_TEMP_CHALLENGE_STATUS, CHALLENGE_STATUS_PAUSED, BattleFrontier_BattleArenaLobby_EventScript_ResumeChallenge
map_script_2 VAR_TEMP_CHALLENGE_STATUS, CHALLENGE_STATUS_WON, BattleFrontier_BattleArenaLobby_EventScript_WonChallenge
map_script_2 VAR_TEMP_CHALLENGE_STATUS, CHALLENGE_STATUS_LOST, BattleFrontier_BattleArenaLobby_EventScript_LostChallenge
.2byte 0
BattleFrontier_BattleArenaLobby_EventScript_GetChallengeStatus::
@@ -33,7 +33,7 @@ BattleFrontier_BattleArenaLobby_EventScript_QuitWithoutSaving::
arena_set ARENA_DATA_WIN_STREAK, 0
arena_set ARENA_DATA_WIN_STREAK_ACTIVE, FALSE
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0
setvar VAR_TEMP_0, 255
setvar VAR_TEMP_CHALLENGE_STATUS, 255
releaseall
end
@@ -55,7 +55,7 @@ BattleFrontier_BattleArenaLobby_EventScript_GiveBattlePoints::
call BattleFrontier_BattleArenaLobby_EventScript_SaveAfterChallenge
msgbox BattleFrontier_BattleArenaLobby_Text_AwaitAnotherChallenge2, MSGBOX_DEFAULT
closemessage
setvar VAR_TEMP_0, 255
setvar VAR_TEMP_CHALLENGE_STATUS, 255
releaseall
end
@@ -67,7 +67,7 @@ BattleFrontier_BattleArenaLobby_EventScript_LostChallenge::
call BattleFrontier_BattleArenaLobby_EventScript_SaveAfterChallenge
msgbox BattleFrontier_BattleArenaLobby_Text_AwaitAnotherChallenge2, MSGBOX_DEFAULT
closemessage
setvar VAR_TEMP_0, 255
setvar VAR_TEMP_CHALLENGE_STATUS, 255
releaseall
end
@@ -101,7 +101,7 @@ BattleFrontier_BattleArenaLobby_EventScript_ResumeChallenge::
playse SE_SAVE
waitse
frontier_set FRONTIER_DATA_PAUSED, FALSE
setvar VAR_TEMP_0, 255
setvar VAR_TEMP_CHALLENGE_STATUS, 255
goto BattleFrontier_BattleArenaLobby_EventScript_EnterChallenge
BattleFrontier_BattleArenaLobby_EventScript_Attendant::
@@ -146,7 +146,7 @@ BattleFrontier_BattleArenaLobby_EventScript_TryEnterChallenge::
case MULTI_B_PRESSED, BattleFrontier_BattleArenaLobby_EventScript_LoadPartyAndCancelChallenge
BattleFrontier_BattleArenaLobby_EventScript_SaveBeforeChallenge::
setvar VAR_TEMP_0, 0
setvar VAR_TEMP_CHALLENGE_STATUS, 0
frontier_set FRONTIER_DATA_SELECTED_MON_ORDER
arena_init
arena_set ARENA_DATA_WIN_STREAK_ACTIVE, TRUE
@@ -156,7 +156,7 @@ BattleFrontier_BattleArenaLobby_EventScript_SaveBeforeChallenge::
closemessage
delay 2
call Common_EventScript_SaveGame
setvar VAR_TEMP_0, 255
setvar VAR_TEMP_CHALLENGE_STATUS, 255
goto_if_eq VAR_RESULT, 0, BattleFrontier_BattleArenaLobby_EventScript_CancelChallengeSaveFailed
BattleFrontier_BattleArenaLobby_EventScript_EnterChallenge::
special SavePlayerParty
@@ -167,7 +167,7 @@ BattleFrontier_BattleArenaLobby_EventScript_EnterChallenge::
call_if_eq VAR_RESULT, FRONTIER_LVL_50, BattleFrontier_BattleArenaLobby_EventScript_WalkToDoorLv50
call_if_eq VAR_RESULT, FRONTIER_LVL_OPEN, BattleFrontier_BattleArenaLobby_EventScript_WalkToDoorLvOpen
warp MAP_BATTLE_FRONTIER_BATTLE_ARENA_CORRIDOR, 9, 13
setvar VAR_TEMP_0, 0
setvar VAR_TEMP_CHALLENGE_STATUS, 0
waitstate
end

View File

@@ -34,14 +34,14 @@
"y": 8,
"elevation": 3,
"dest_map": "MAP_BATTLE_FRONTIER_OUTSIDE_WEST",
"dest_warp_id": 1
"dest_warp_id": "1"
},
{
"x": 7,
"y": 8,
"elevation": 3,
"dest_map": "MAP_BATTLE_FRONTIER_OUTSIDE_WEST",
"dest_warp_id": 1
"dest_warp_id": "1"
}
],
"coord_events": [],

View File

@@ -99,14 +99,14 @@
"y": 16,
"elevation": 0,
"dest_map": "MAP_BATTLE_FRONTIER_OUTSIDE_WEST",
"dest_warp_id": 1
"dest_warp_id": "1"
},
{
"x": 12,
"y": 16,
"elevation": 0,
"dest_map": "MAP_BATTLE_FRONTIER_OUTSIDE_WEST",
"dest_warp_id": 1
"dest_warp_id": "1"
}
],
"coord_events": [],

View File

@@ -21,11 +21,11 @@ BattleFrontier_BattleDomeLobby_EventScript_TurnPlayerNorth::
end
BattleFrontier_BattleDomeLobby_OnFrame:
map_script_2 VAR_TEMP_0, 0, BattleFrontier_BattleDomeLobby_EventScript_GetChallengeStatus
map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_SAVING, BattleFrontier_BattleDomeLobby_EventScript_QuitWithoutSaving
map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_PAUSED, BattleFrontier_BattleDomeLobby_EventScript_ResumeChallenge
map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_WON, BattleFrontier_BattleDomeLobby_EventScript_WonChallenge
map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_LOST, BattleFrontier_BattleDomeLobby_EventScript_LostChallenge
map_script_2 VAR_TEMP_CHALLENGE_STATUS, 0, BattleFrontier_BattleDomeLobby_EventScript_GetChallengeStatus
map_script_2 VAR_TEMP_CHALLENGE_STATUS, CHALLENGE_STATUS_SAVING, BattleFrontier_BattleDomeLobby_EventScript_QuitWithoutSaving
map_script_2 VAR_TEMP_CHALLENGE_STATUS, CHALLENGE_STATUS_PAUSED, BattleFrontier_BattleDomeLobby_EventScript_ResumeChallenge
map_script_2 VAR_TEMP_CHALLENGE_STATUS, CHALLENGE_STATUS_WON, BattleFrontier_BattleDomeLobby_EventScript_WonChallenge
map_script_2 VAR_TEMP_CHALLENGE_STATUS, CHALLENGE_STATUS_LOST, BattleFrontier_BattleDomeLobby_EventScript_LostChallenge
.2byte 0
BattleFrontier_BattleDomeLobby_EventScript_GetChallengeStatus::
@@ -40,7 +40,7 @@ BattleFrontier_BattleDomeLobby_EventScript_QuitWithoutSaving::
dome_set DOME_DATA_WIN_STREAK_ACTIVE, FALSE
dome_set DOME_DATA_ATTEMPTED_CHALLENGE, TRUE
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0
setvar VAR_TEMP_0, 255
setvar VAR_TEMP_CHALLENGE_STATUS, 255
releaseall
end
@@ -101,7 +101,7 @@ BattleFrontier_BattleDomeLobby_EventScript_RecordBattle::
BattleFrontier_BattleDomeLobby_EventScript_EndChallenge::
msgbox BattleFrontier_BattleDomeLobby_Text_HopeToSeeYouAgain, MSGBOX_DEFAULT
closemessage
setvar VAR_TEMP_0, 255
setvar VAR_TEMP_CHALLENGE_STATUS, 255
releaseall
end
@@ -114,7 +114,7 @@ BattleFrontier_BattleDomeLobby_EventScript_ResumeChallenge::
playse SE_SAVE
waitse
frontier_set FRONTIER_DATA_PAUSED, FALSE
setvar VAR_TEMP_0, 255
setvar VAR_TEMP_CHALLENGE_STATUS, 255
goto BattleFrontier_BattleDomeLobby_EventScript_EnterChallenge
BattleFrontier_BattleDomeLobby_EventScript_SinglesAttendant::
@@ -173,7 +173,7 @@ BattleFrontier_BattleDomeLobby_EventScript_TryEnterChallenge::
case MULTI_B_PRESSED, BattleFrontier_BattleDomeLobby_EventScript_LoadPartyCancelChallenge
BattleFrontier_BattleDomeLobby_EventScript_SaveBeforeChallenge::
setvar VAR_TEMP_0, 0
setvar VAR_TEMP_CHALLENGE_STATUS, 0
frontier_set FRONTIER_DATA_SELECTED_MON_ORDER
dome_init
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_SAVING
@@ -182,7 +182,7 @@ BattleFrontier_BattleDomeLobby_EventScript_SaveBeforeChallenge::
closemessage
delay 2
call Common_EventScript_SaveGame
setvar VAR_TEMP_0, 255
setvar VAR_TEMP_CHALLENGE_STATUS, 255
goto_if_eq VAR_RESULT, 0, BattleFrontier_BattleDomeLobby_EventScript_CancelChallengeSaveFailed
dome_inittrainers
BattleFrontier_BattleDomeLobby_EventScript_EnterChallenge::
@@ -194,7 +194,7 @@ BattleFrontier_BattleDomeLobby_EventScript_EnterChallenge::
call BattleFrontier_BattleDomeLobby_EventScript_WalkToDoor
special HealPlayerParty
warp MAP_BATTLE_FRONTIER_BATTLE_DOME_CORRIDOR, 23, 6
setvar VAR_TEMP_0, 0
setvar VAR_TEMP_CHALLENGE_STATUS, 0
waitstate
end

View File

@@ -34,14 +34,14 @@
"y": 8,
"elevation": 3,
"dest_map": "MAP_BATTLE_FRONTIER_OUTSIDE_WEST",
"dest_warp_id": 1
"dest_warp_id": "1"
},
{
"x": 7,
"y": 8,
"elevation": 3,
"dest_map": "MAP_BATTLE_FRONTIER_OUTSIDE_WEST",
"dest_warp_id": 1
"dest_warp_id": "1"
}
],
"coord_events": [],

View File

@@ -99,14 +99,14 @@
"y": 11,
"elevation": 0,
"dest_map": "MAP_BATTLE_FRONTIER_OUTSIDE_WEST",
"dest_warp_id": 2
"dest_warp_id": "2"
},
{
"x": 10,
"y": 11,
"elevation": 0,
"dest_map": "MAP_BATTLE_FRONTIER_OUTSIDE_WEST",
"dest_warp_id": 2
"dest_warp_id": "2"
}
],
"coord_events": [],

View File

@@ -16,11 +16,11 @@ BattleFrontier_BattleFactoryLobby_EventScript_TurnPlayerNorth::
end
BattleFrontier_BattleFactoryLobby_OnFrame:
map_script_2 VAR_TEMP_0, 0, BattleFrontier_BattleFactoryLobby_EventScript_GetChallengeStatus
map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_SAVING, BattleFrontier_BattleFactoryLobby_EventScript_QuitWithoutSaving
map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_PAUSED, BattleFrontier_BattleFactoryLobby_EventScript_ResumeChallenge
map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_WON, BattleFrontier_BattleFactoryLobby_EventScript_WonChallenge
map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_LOST, BattleFrontier_BattleFactoryLobby_EventScript_LostChallenge
map_script_2 VAR_TEMP_CHALLENGE_STATUS, 0, BattleFrontier_BattleFactoryLobby_EventScript_GetChallengeStatus
map_script_2 VAR_TEMP_CHALLENGE_STATUS, CHALLENGE_STATUS_SAVING, BattleFrontier_BattleFactoryLobby_EventScript_QuitWithoutSaving
map_script_2 VAR_TEMP_CHALLENGE_STATUS, CHALLENGE_STATUS_PAUSED, BattleFrontier_BattleFactoryLobby_EventScript_ResumeChallenge
map_script_2 VAR_TEMP_CHALLENGE_STATUS, CHALLENGE_STATUS_WON, BattleFrontier_BattleFactoryLobby_EventScript_WonChallenge
map_script_2 VAR_TEMP_CHALLENGE_STATUS, CHALLENGE_STATUS_LOST, BattleFrontier_BattleFactoryLobby_EventScript_LostChallenge
.2byte 0
BattleFrontier_BattleFactoryLobby_EventScript_GetChallengeStatus::
@@ -36,7 +36,7 @@ BattleFrontier_BattleFactoryLobby_EventScript_QuitWithoutSaving::
factory_set FACTORY_DATA_WIN_STREAK, 0
factory_set FACTORY_DATA_WIN_STREAK_ACTIVE, FALSE
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0
setvar VAR_TEMP_0, 255
setvar VAR_TEMP_CHALLENGE_STATUS, 255
releaseall
end
@@ -92,7 +92,7 @@ BattleFrontier_BattleFactoryLobby_EventScript_RecordBattle::
BattleFrontier_BattleFactoryLobby_EventScript_EndRecordBattle::
msgbox BattleFrontier_BattleFactoryLobby_Text_LookForwardToNextVisit, MSGBOX_DEFAULT
closemessage
setvar VAR_TEMP_0, 255
setvar VAR_TEMP_CHALLENGE_STATUS, 255
releaseall
end
@@ -104,7 +104,7 @@ BattleFrontier_BattleFactoryLobby_EventScript_ResumeChallenge::
playse SE_SAVE
waitse
frontier_set FRONTIER_DATA_PAUSED, FALSE
setvar VAR_TEMP_0, 255
setvar VAR_TEMP_CHALLENGE_STATUS, 255
setvar VAR_0x8006, 2
goto BattleFrontier_BattleFactoryLobby_EventScript_EnterChallenge
@@ -152,7 +152,7 @@ BattleFrontier_BattleFactoryLobby_EventScript_TryEnterChallenge::
case MULTI_B_PRESSED, BattleFrontier_BattleFactoryLobby_EventScript_LoadPartyAndCancelChallenge
BattleFrontier_BattleFactoryLobby_EventScript_SaveBeforeChallenge::
setvar VAR_TEMP_0, 0
setvar VAR_TEMP_CHALLENGE_STATUS, 0
factory_init
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_SAVING
factory_set FACTORY_DATA_WIN_STREAK_ACTIVE, TRUE
@@ -160,7 +160,7 @@ BattleFrontier_BattleFactoryLobby_EventScript_SaveBeforeChallenge::
closemessage
delay 2
call Common_EventScript_SaveGame
setvar VAR_TEMP_0, 255
setvar VAR_TEMP_CHALLENGE_STATUS, 255
goto_if_eq VAR_RESULT, 0, BattleFrontier_BattleFactoryLobby_EventScript_CancelChallengeSaveFailed
setvar VAR_0x8006, 0
BattleFrontier_BattleFactoryLobby_EventScript_EnterChallenge::
@@ -173,7 +173,7 @@ BattleFrontier_BattleFactoryLobby_EventScript_EnterChallenge::
applymovement OBJ_EVENT_ID_PLAYER, BattleFrontier_BattleFactoryLobby_Movement_PlayerEnterDoor
waitmovement 0
warp MAP_BATTLE_FRONTIER_BATTLE_FACTORY_PRE_BATTLE_ROOM, 8, 13
setvar VAR_TEMP_0, 0
setvar VAR_TEMP_CHALLENGE_STATUS, 0
waitstate
end

View File

@@ -86,14 +86,14 @@
"y": 9,
"elevation": 3,
"dest_map": "MAP_BATTLE_FRONTIER_BATTLE_PALACE_CORRIDOR",
"dest_warp_id": 2
"dest_warp_id": "2"
},
{
"x": 1,
"y": 9,
"elevation": 3,
"dest_map": "MAP_BATTLE_FRONTIER_BATTLE_PALACE_CORRIDOR",
"dest_warp_id": 2
"dest_warp_id": "2"
}
],
"coord_events": [],

View File

@@ -112,28 +112,28 @@
"y": 13,
"elevation": 3,
"dest_map": "MAP_BATTLE_FRONTIER_BATTLE_PALACE_LOBBY",
"dest_warp_id": 2
"dest_warp_id": "2"
},
{
"x": 9,
"y": 13,
"elevation": 3,
"dest_map": "MAP_BATTLE_FRONTIER_BATTLE_PALACE_LOBBY",
"dest_warp_id": 2
"dest_warp_id": "2"
},
{
"x": 6,
"y": 3,
"elevation": 3,
"dest_map": "MAP_BATTLE_FRONTIER_BATTLE_PALACE_BATTLE_ROOM",
"dest_warp_id": 0
"dest_warp_id": "0"
},
{
"x": 10,
"y": 3,
"elevation": 3,
"dest_map": "MAP_BATTLE_FRONTIER_BATTLE_PALACE_BATTLE_ROOM",
"dest_warp_id": 0
"dest_warp_id": "0"
}
],
"coord_events": [],

View File

@@ -99,21 +99,21 @@
"y": 11,
"elevation": 0,
"dest_map": "MAP_BATTLE_FRONTIER_OUTSIDE_EAST",
"dest_warp_id": 2
"dest_warp_id": "2"
},
{
"x": 13,
"y": 11,
"elevation": 0,
"dest_map": "MAP_BATTLE_FRONTIER_OUTSIDE_EAST",
"dest_warp_id": 2
"dest_warp_id": "2"
},
{
"x": 5,
"y": 4,
"elevation": 3,
"dest_map": "MAP_BATTLE_FRONTIER_BATTLE_PALACE_CORRIDOR",
"dest_warp_id": 0
"dest_warp_id": "0"
}
],
"coord_events": [],

View File

@@ -16,11 +16,11 @@ BattleFrontier_BattlePalaceLobby_EventScript_TurnPlayerNorth::
end
BattleFrontier_BattlePalaceLobby_OnFrame:
map_script_2 VAR_TEMP_0, 0, BattleFrontier_BattlePalaceLobby_EventScript_GetChallengeStatus
map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_SAVING, BattleFrontier_BattlePalaceLobby_EventScript_QuitWithoutSaving
map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_PAUSED, BattleFrontier_BattlePalaceLobby_EventScript_ResumeChallenge
map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_WON, BattleFrontier_BattlePalaceLobby_EventScript_WonChallenge
map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_LOST, BattleFrontier_BattlePalaceLobby_EventScript_LostChallenge
map_script_2 VAR_TEMP_CHALLENGE_STATUS, 0, BattleFrontier_BattlePalaceLobby_EventScript_GetChallengeStatus
map_script_2 VAR_TEMP_CHALLENGE_STATUS, CHALLENGE_STATUS_SAVING, BattleFrontier_BattlePalaceLobby_EventScript_QuitWithoutSaving
map_script_2 VAR_TEMP_CHALLENGE_STATUS, CHALLENGE_STATUS_PAUSED, BattleFrontier_BattlePalaceLobby_EventScript_ResumeChallenge
map_script_2 VAR_TEMP_CHALLENGE_STATUS, CHALLENGE_STATUS_WON, BattleFrontier_BattlePalaceLobby_EventScript_WonChallenge
map_script_2 VAR_TEMP_CHALLENGE_STATUS, CHALLENGE_STATUS_LOST, BattleFrontier_BattlePalaceLobby_EventScript_LostChallenge
.2byte 0
BattleFrontier_BattlePalaceLobby_EventScript_GetChallengeStatus::
@@ -34,7 +34,7 @@ BattleFrontier_BattlePalaceLobby_EventScript_QuitWithoutSaving::
palace_set PALACE_DATA_WIN_STREAK, 0
palace_set PALACE_DATA_WIN_STREAK_ACTIVE, FALSE
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0
setvar VAR_TEMP_0, 255
setvar VAR_TEMP_CHALLENGE_STATUS, 255
releaseall
end
@@ -56,7 +56,7 @@ BattleFrontier_BattlePalaceLobby_EventScript_GiveBattlePoints::
call BattleFrontier_BattlePalaceLobby_EventScript_SaveAfterChallenge
msgbox BattleFrontier_BattlePalaceLobby_Text_ReturnWhenFortified, MSGBOX_DEFAULT
closemessage
setvar VAR_TEMP_0, 255
setvar VAR_TEMP_CHALLENGE_STATUS, 255
releaseall
end
@@ -68,7 +68,7 @@ BattleFrontier_BattlePalaceLobby_EventScript_LostChallenge::
call BattleFrontier_BattlePalaceLobby_EventScript_SaveAfterChallenge
msgbox BattleFrontier_BattlePalaceLobby_Text_ReturnWhenFortified, MSGBOX_DEFAULT
closemessage
setvar VAR_TEMP_0, 255
setvar VAR_TEMP_CHALLENGE_STATUS, 255
releaseall
end
@@ -103,7 +103,7 @@ BattleFrontier_BattlePalaceLobby_EventScript_ResumeChallenge::
playse SE_SAVE
waitse
frontier_set FRONTIER_DATA_PAUSED, FALSE
setvar VAR_TEMP_0, 255
setvar VAR_TEMP_CHALLENGE_STATUS, 255
goto BattleFrontier_BattlePalaceLobby_EventScript_EnterChallenge
BattleFrontier_BattlePalaceLobby_EventScript_SinglesAttendant::
@@ -164,7 +164,7 @@ BattleFrontier_BattlePalaceLobby_EventScript_TryEnterChallenge::
case MULTI_B_PRESSED, BattleFrontier_BattlePalaceLobby_EventScript_LoadPartyAndCancelChallenge
BattleFrontier_BattlePalaceLobby_EventScript_SaveBeforeChallenge::
setvar VAR_TEMP_0, 0
setvar VAR_TEMP_CHALLENGE_STATUS, 0
frontier_set FRONTIER_DATA_SELECTED_MON_ORDER
palace_init
palace_set PALACE_DATA_WIN_STREAK_ACTIVE, TRUE
@@ -174,7 +174,7 @@ BattleFrontier_BattlePalaceLobby_EventScript_SaveBeforeChallenge::
closemessage
delay 2
call Common_EventScript_SaveGame
setvar VAR_TEMP_0, 255
setvar VAR_TEMP_CHALLENGE_STATUS, 255
goto_if_eq VAR_RESULT, 0, BattleFrontier_BattlePalaceLobby_EventScript_CancelChallengeSaveFailed
BattleFrontier_BattlePalaceLobby_EventScript_EnterChallenge::
special SavePlayerParty
@@ -183,7 +183,7 @@ BattleFrontier_BattlePalaceLobby_EventScript_EnterChallenge::
closemessage
call BattleFrontier_BattlePalaceLobby_EventScript_WalkToDoor
warp MAP_BATTLE_FRONTIER_BATTLE_PALACE_CORRIDOR, 8, 13
setvar VAR_TEMP_0, 0
setvar VAR_TEMP_CHALLENGE_STATUS, 0
waitstate
end

View File

@@ -73,21 +73,21 @@
"y": 12,
"elevation": 0,
"dest_map": "MAP_BATTLE_FRONTIER_OUTSIDE_WEST",
"dest_warp_id": 0
"dest_warp_id": "0"
},
{
"x": 4,
"y": 12,
"elevation": 0,
"dest_map": "MAP_BATTLE_FRONTIER_OUTSIDE_WEST",
"dest_warp_id": 0
"dest_warp_id": "0"
},
{
"x": 6,
"y": 12,
"elevation": 0,
"dest_map": "MAP_BATTLE_FRONTIER_OUTSIDE_WEST",
"dest_warp_id": 0
"dest_warp_id": "0"
}
],
"coord_events": [],

View File

@@ -6,10 +6,10 @@ BattleFrontier_BattlePikeLobby_MapScripts::
.byte 0
BattleFrontier_BattlePikeLobby_OnFrame:
map_script_2 VAR_TEMP_0, 0, BattleFrontier_BattlePikeLobby_EventScript_GetChallengeStatus
map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_SAVING, BattleFrontier_BattlePikeLobby_EventScript_QuitWithoutSaving
map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_WON, BattleFrontier_BattlePikeLobby_EventScript_WonChallenge
map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_LOST, BattleFrontier_BattlePikeLobby_EventScript_LostChallenge
map_script_2 VAR_TEMP_CHALLENGE_STATUS, 0, BattleFrontier_BattlePikeLobby_EventScript_GetChallengeStatus
map_script_2 VAR_TEMP_CHALLENGE_STATUS, CHALLENGE_STATUS_SAVING, BattleFrontier_BattlePikeLobby_EventScript_QuitWithoutSaving
map_script_2 VAR_TEMP_CHALLENGE_STATUS, CHALLENGE_STATUS_WON, BattleFrontier_BattlePikeLobby_EventScript_WonChallenge
map_script_2 VAR_TEMP_CHALLENGE_STATUS, CHALLENGE_STATUS_LOST, BattleFrontier_BattlePikeLobby_EventScript_LostChallenge
.2byte 0
BattleFrontier_BattlePikeLobby_OnWarp:
@@ -34,7 +34,7 @@ BattleFrontier_BattlePikeLobby_EventScript_QuitWithoutSaving::
pike_set PIKE_DATA_WIN_STREAK, 0
pike_set PIKE_DATA_WIN_STREAK_ACTIVE, FALSE
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0
setvar VAR_TEMP_0, 255
setvar VAR_TEMP_CHALLENGE_STATUS, 255
releaseall
end
@@ -67,7 +67,7 @@ BattleFrontier_BattlePikeLobby_EventScript_GiveBattlePoints::
waitse
msgbox BattleFrontier_BattlePikeLobby_Text_LookForwardToSeeingYou, MSGBOX_DEFAULT
closemessage
setvar VAR_TEMP_0, 255
setvar VAR_TEMP_CHALLENGE_STATUS, 255
releaseall
end
@@ -86,7 +86,7 @@ BattleFrontier_BattlePikeLobby_EventScript_LostChallenge::
waitse
msgbox BattleFrontier_BattlePikeLobby_Text_LookForwardToSeeingYou, MSGBOX_DEFAULT
closemessage
setvar VAR_TEMP_0, 255
setvar VAR_TEMP_CHALLENGE_STATUS, 255
releaseall
end
@@ -132,7 +132,7 @@ BattleFrontier_BattlePikeLobby_EventScript_TryEnterChallenge::
case MULTI_B_PRESSED, BattleFrontier_BattlePikeLobby_EventScript_LoadPartyAndCancelChallenge
BattleFrontier_BattlePikeLobby_EventScript_SaveBeforeChallenge::
setvar VAR_TEMP_0, 0
setvar VAR_TEMP_CHALLENGE_STATUS, 0
setvar VAR_TEMP_1, 0
frontier_set FRONTIER_DATA_SELECTED_MON_ORDER
pike_init
@@ -144,7 +144,7 @@ BattleFrontier_BattlePikeLobby_EventScript_SaveBeforeChallenge::
closemessage
delay 2
call Common_EventScript_SaveGame
setvar VAR_TEMP_0, 255
setvar VAR_TEMP_CHALLENGE_STATUS, 255
pike_savehelditems
goto_if_eq VAR_RESULT, 0, BattleFrontier_BattlePikeLobby_EventScript_CancelChallengeSaveFailed
special SavePlayerParty
@@ -156,7 +156,7 @@ BattleFrontier_BattlePikeLobby_EventScript_SaveBeforeChallenge::
special HealPlayerParty
call BattleFrontier_BattlePike_EventScript_CloseCurtain
warpsilent MAP_BATTLE_FRONTIER_BATTLE_PIKE_CORRIDOR, 6, 7
setvar VAR_TEMP_0, 0
setvar VAR_TEMP_CHALLENGE_STATUS, 0
waitstate
end

View File

@@ -7,9 +7,9 @@ BattleFrontier_BattlePikeThreePathRoom_MapScripts::
.byte 0
BattleFrontier_BattlePikeThreePathRoom_OnFrame:
map_script_2 VAR_TEMP_0, 0, BattleFrontier_BattlePikeThreePathRoom_EventScript_GetChallengeStatus
map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_SAVING, BattleFrontier_BattlePikeThreePathRoom_EventScript_WarpToLobby
map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_PAUSED, BattleFrontier_BattlePikeThreePathRoom_EventScript_ResumeChallenge
map_script_2 VAR_TEMP_CHALLENGE_STATUS, 0, BattleFrontier_BattlePikeThreePathRoom_EventScript_GetChallengeStatus
map_script_2 VAR_TEMP_CHALLENGE_STATUS, CHALLENGE_STATUS_SAVING, BattleFrontier_BattlePikeThreePathRoom_EventScript_WarpToLobby
map_script_2 VAR_TEMP_CHALLENGE_STATUS, CHALLENGE_STATUS_PAUSED, BattleFrontier_BattlePikeThreePathRoom_EventScript_ResumeChallenge
map_script_2 VAR_TEMP_5, 0, BattleFrontier_BattlePikeThreePathRoom_EventScript_SetHintRoom
map_script_2 VAR_TEMP_5, 1, BattleFrontier_BattlePikeThreePathRoom_EventScript_GivePikeQueenHint
.2byte 0
@@ -40,7 +40,7 @@ BattleFrontier_BattlePikeThreePathRoom_EventScript_ResumeChallenge::
playse SE_SAVE
waitse
frontier_set FRONTIER_DATA_PAUSED, FALSE
setvar VAR_TEMP_0, 255
setvar VAR_TEMP_CHALLENGE_STATUS, 255
special SavePlayerParty
frontier_setpartyorder FRONTIER_PARTY_SIZE
msgbox BattleFrontier_BattlePikeThreePathRoom_Text_PleaseEnjoyChallenge, MSGBOX_DEFAULT

View File

@@ -6,7 +6,7 @@ BattleFrontier_BattlePyramidFloor_MapScripts::
BattleFrontier_BattlePyramidFloor_OnFrame:
map_script_2 VAR_TEMP_D, 1, BattleFrontier_BattlePyramidFloor_EventScript_UpdateLight
map_script_2 VAR_TEMP_E, 0, BattleFrontier_BattlePyramidFloor_EventScript_PlayPyramidMusic
map_script_2 VAR_TEMP_PLAYING_PYRAMID_MUSIC, 0, BattleFrontier_BattlePyramidFloor_EventScript_PlayPyramidMusic
map_script_2 VAR_TEMP_F, 1, BattleFrontier_BattlePyramidFloor_EventScript_ShowMapName
.2byte 0
@@ -33,13 +33,13 @@ BattleFrontier_BattlePyramidFloor_EventScript_ShowMapName::
BattleFrontier_BattlePyramidFloor_EventScript_PlayPyramidMusic::
playbgm MUS_B_PYRAMID, FALSE
setvar VAR_TEMP_E, 1
setvar VAR_TEMP_PLAYING_PYRAMID_MUSIC, 1
end
BattleFrontier_BattlePyramidFloor_OnResume:
pyramid_setfloorpal
frontier_getstatus
switch VAR_TEMP_0
switch VAR_TEMP_CHALLENGE_STATUS
case 0, BattleFrontier_BattlePyramidFloor_EventScript_ReadyChallenge
case CHALLENGE_STATUS_SAVING, BattleFrontier_BattlePyramid_EventScript_WarpToLobby
case CHALLENGE_STATUS_PAUSED, BattleFrontier_BattlePyramidFloor_EventScript_ReadyChallenge

View File

@@ -73,7 +73,7 @@
"y": 17,
"elevation": 4,
"dest_map": "MAP_BATTLE_FRONTIER_OUTSIDE_EAST",
"dest_warp_id": 3
"dest_warp_id": "3"
}
],
"coord_events": [],

View File

@@ -17,11 +17,11 @@ BattleFrontier_BattlePyramidLobby_EventScript_TurnPlayerNorth:
end
BattleFrontier_BattlePyramidLobby_OnFrame:
map_script_2 VAR_TEMP_0, 0, BattleFrontier_BattlePyramidLobby_EventScript_GetChallengeStatus
map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_SAVING, BattleFrontier_BattlePyramidLobby_EventScript_QuitWithoutSaving
map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_PAUSED, BattleFrontier_BattlePyramidLobby_EventScript_ResumeChallenge
map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_WON, BattleFrontier_BattlePyramidLobby_EventScript_WonChallenge
map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_LOST, BattleFrontier_BattlePyramidLobby_EventScript_LostChallenge
map_script_2 VAR_TEMP_CHALLENGE_STATUS, 0, BattleFrontier_BattlePyramidLobby_EventScript_GetChallengeStatus
map_script_2 VAR_TEMP_CHALLENGE_STATUS, CHALLENGE_STATUS_SAVING, BattleFrontier_BattlePyramidLobby_EventScript_QuitWithoutSaving
map_script_2 VAR_TEMP_CHALLENGE_STATUS, CHALLENGE_STATUS_PAUSED, BattleFrontier_BattlePyramidLobby_EventScript_ResumeChallenge
map_script_2 VAR_TEMP_CHALLENGE_STATUS, CHALLENGE_STATUS_WON, BattleFrontier_BattlePyramidLobby_EventScript_WonChallenge
map_script_2 VAR_TEMP_CHALLENGE_STATUS, CHALLENGE_STATUS_LOST, BattleFrontier_BattlePyramidLobby_EventScript_LostChallenge
.2byte 0
BattleFrontier_BattlePyramidLobby_EventScript_GetChallengeStatus::
@@ -38,7 +38,7 @@ BattleFrontier_BattlePyramidLobby_EventScript_QuitWithoutSaving::
pyramid_set PYRAMID_DATA_WIN_STREAK, 0
pyramid_set PYRAMID_DATA_WIN_STREAK_ACTIVE, FALSE
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0
setvar VAR_TEMP_0, 255
setvar VAR_TEMP_CHALLENGE_STATUS, 255
releaseall
end
@@ -74,7 +74,7 @@ BattleFrontier_BattlePyramidLobby_EventScript_GiveBattlePoints::
waitse
msgbox BattleFrontier_BattlePyramidLobby_Text_LookForwardToNextChallenge, MSGBOX_DEFAULT
closemessage
setvar VAR_TEMP_0, 255
setvar VAR_TEMP_CHALLENGE_STATUS, 255
releaseall
end
@@ -96,7 +96,7 @@ BattleFrontier_BattlePyramidLobby_EventScript_LostChallenge::
waitse
msgbox BattleFrontier_BattlePyramidLobby_Text_LookForwardToNextChallenge, MSGBOX_DEFAULT
closemessage
setvar VAR_TEMP_0, 255
setvar VAR_TEMP_CHALLENGE_STATUS, 255
releaseall
end
@@ -145,7 +145,7 @@ BattleFrontier_BattlePyramidLobby_EventScript_TryEnterChallenge::
case MULTI_B_PRESSED, BattleFrontier_BattlePyramidLobby_EventScript_LoadPartyAndCancelChallenge
BattleFrontier_BattlePyramidLobby_EventScript_SaveBeforeChallenge::
setvar VAR_TEMP_0, 0
setvar VAR_TEMP_CHALLENGE_STATUS, 0
frontier_set FRONTIER_DATA_SELECTED_MON_ORDER
pyramid_init
pyramid_set PYRAMID_DATA_WIN_STREAK_ACTIVE, TRUE
@@ -157,7 +157,7 @@ BattleFrontier_BattlePyramidLobby_EventScript_SaveBeforeChallenge::
closemessage
delay 2
call Common_EventScript_SaveGame
setvar VAR_TEMP_0, 255
setvar VAR_TEMP_CHALLENGE_STATUS, 255
goto_if_eq VAR_RESULT, 0, BattleFrontier_BattlePyramidLobby_EventScript_CancelChallengeSaveFailed
BattleFrontier_BattlePyramidLobby_EventScript_EnterChallenge::
special SavePlayerParty
@@ -169,7 +169,7 @@ BattleFrontier_BattlePyramidLobby_EventScript_EnterChallenge::
setvar VAR_RESULT, 0
special HealPlayerParty
warp MAP_BATTLE_FRONTIER_BATTLE_PYRAMID_FLOOR, 1, 1
setvar VAR_TEMP_0, 0
setvar VAR_TEMP_CHALLENGE_STATUS, 0
waitstate
end

View File

@@ -32,7 +32,7 @@ BattleFrontier_BattlePyramidTop_OnResume:
BattleFrontier_BattlePyramidTop_EventScript_CheckChallengeStatus::
copyvar VAR_TEMP_C, VAR_RESULT
frontier_getstatus
switch VAR_TEMP_0
switch VAR_TEMP_CHALLENGE_STATUS
case 0, BattleFrontier_BattlePyramidTop_EventScript_ReadyChallenge
case CHALLENGE_STATUS_SAVING, BattleFrontier_BattlePyramid_EventScript_WarpToLobby
case CHALLENGE_STATUS_PAUSED, BattleFrontier_BattlePyramidTop_EventScript_ReadyChallenge
@@ -43,13 +43,13 @@ BattleFrontier_BattlePyramidTop_EventScript_CheckChallengeStatus::
end
BattleFrontier_BattlePyramidTop_OnFrame:
map_script_2 VAR_TEMP_E, 0, BattleFrontier_BattlePyramidTop_EventScript_PlayPyramidMusic
map_script_2 VAR_TEMP_PLAYING_PYRAMID_MUSIC, 0, BattleFrontier_BattlePyramidTop_EventScript_PlayPyramidMusic
map_script_2 VAR_TEMP_F, 1, BattleFrontier_BattlePyramidTop_EventScript_ShowMapName
.2byte 0
BattleFrontier_BattlePyramidTop_EventScript_PlayPyramidMusic::
playbgm MUS_B_PYRAMID_TOP, FALSE
setvar VAR_TEMP_E, 1
setvar VAR_TEMP_PLAYING_PYRAMID_MUSIC, 1
end
BattleFrontier_BattlePyramidTop_EventScript_ShowMapName::

View File

@@ -60,14 +60,14 @@
"y": 8,
"elevation": 0,
"dest_map": "MAP_BATTLE_FRONTIER_BATTLE_TOWER_LOBBY",
"dest_warp_id": 2
"dest_warp_id": "2"
},
{
"x": 6,
"y": 8,
"elevation": 0,
"dest_map": "MAP_BATTLE_FRONTIER_BATTLE_TOWER_LOBBY",
"dest_warp_id": 2
"dest_warp_id": "2"
}
],
"coord_events": [],

View File

@@ -138,21 +138,21 @@
"y": 9,
"elevation": 3,
"dest_map": "MAP_BATTLE_FRONTIER_OUTSIDE_EAST",
"dest_warp_id": 0
"dest_warp_id": "0"
},
{
"x": 13,
"y": 9,
"elevation": 3,
"dest_map": "MAP_BATTLE_FRONTIER_OUTSIDE_EAST",
"dest_warp_id": 0
"dest_warp_id": "0"
},
{
"x": 6,
"y": 1,
"elevation": 0,
"dest_map": "MAP_BATTLE_FRONTIER_BATTLE_TOWER_BATTLE_ROOM",
"dest_warp_id": 0
"dest_warp_id": "0"
}
],
"coord_events": [],

View File

@@ -41,11 +41,11 @@ BattleFrontier_BattleTowerLobby_EventScript_PlayerFaceNorth::
end
BattleFrontier_BattleTowerLobby_OnFrame:
map_script_2 VAR_TEMP_0, 0, BattleFrontier_BattleTowerLobby_EventScript_GetChallengeStatus
map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_SAVING, BattleFrontier_BattleTowerLobby_EventScript_QuitWithoutSaving
map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_PAUSED, BattleFrontier_BattleTowerLobby_EventScript_ResumeChallenge
map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_WON, BattleFrontier_BattleTowerLobby_EventScript_WonChallenge
map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_LOST, BattleFrontier_BattleTowerLobby_EventScript_LostChallenge
map_script_2 VAR_TEMP_CHALLENGE_STATUS, 0, BattleFrontier_BattleTowerLobby_EventScript_GetChallengeStatus
map_script_2 VAR_TEMP_CHALLENGE_STATUS, CHALLENGE_STATUS_SAVING, BattleFrontier_BattleTowerLobby_EventScript_QuitWithoutSaving
map_script_2 VAR_TEMP_CHALLENGE_STATUS, CHALLENGE_STATUS_PAUSED, BattleFrontier_BattleTowerLobby_EventScript_ResumeChallenge
map_script_2 VAR_TEMP_CHALLENGE_STATUS, CHALLENGE_STATUS_WON, BattleFrontier_BattleTowerLobby_EventScript_WonChallenge
map_script_2 VAR_TEMP_CHALLENGE_STATUS, CHALLENGE_STATUS_LOST, BattleFrontier_BattleTowerLobby_EventScript_LostChallenge
.2byte 0
BattleFrontier_BattleTowerLobby_EventScript_GetChallengeStatus::
@@ -60,7 +60,7 @@ BattleFrontier_BattleTowerLobby_EventScript_QuitWithoutSaving::
tower_set TOWER_DATA_WIN_STREAK, 0
tower_set TOWER_DATA_WIN_STREAK_ACTIVE, FALSE
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0
setvar VAR_TEMP_0, 255
setvar VAR_TEMP_CHALLENGE_STATUS, 255
release
end
@@ -94,7 +94,7 @@ BattleFrontier_BattleTowerLobby_EventScript_GiveBattlePoints::
BattleFrontier_BattleTowerLobby_EventScript_LookForwardToChallenge::
msgbox BattleFrontier_BattleTowerLobby_Text_LookForwardToAnotherChallenge, MSGBOX_DEFAULT
closemessage
setvar VAR_TEMP_0, 255
setvar VAR_TEMP_CHALLENGE_STATUS, 255
release
end
@@ -113,7 +113,7 @@ BattleFrontier_BattleTowerLobby_EventScript_LostThanksForPlaying::
call BattleFrontier_BattleTowerLobby_EventScript_AskSaveBattle
msgbox BattleFrontier_BattleTowerLobby_Text_LookForwardToAnotherChallenge, MSGBOX_DEFAULT
closemessage
setvar VAR_TEMP_0, 255
setvar VAR_TEMP_CHALLENGE_STATUS, 255
release
end
@@ -214,7 +214,7 @@ BattleFrontier_BattleTowerLobby_EventScript_TryEnterSinglesChallenge::
BattleFrontier_BattleTowerLobby_EventScript_SaveBeforeSinglesChallenge::
frontier_set FRONTIER_DATA_SELECTED_MON_ORDER
setvar VAR_TEMP_0, 0
setvar VAR_TEMP_CHALLENGE_STATUS, 0
tower_init
tower_set TOWER_DATA_WIN_STREAK_ACTIVE, TRUE
frontier_set FRONTIER_DATA_PAUSED, FALSE
@@ -222,7 +222,7 @@ BattleFrontier_BattleTowerLobby_EventScript_SaveBeforeSinglesChallenge::
closemessage
delay 2
call Common_EventScript_SaveGame
setvar VAR_TEMP_0, 255
setvar VAR_TEMP_CHALLENGE_STATUS, 255
goto_if_eq VAR_RESULT, 0, BattleFrontier_BattleTowerLobby_EventScript_CancelChallengeSaveFailed
incrementgamestat GAME_STAT_ENTERED_BATTLE_TOWER
setvar VAR_BRAVO_TRAINER_BATTLE_TOWER_ON, TRUE
@@ -277,7 +277,7 @@ BattleFrontier_BattleTowerLobby_EventScript_TryEnterDoublesChallenge::
BattleFrontier_BattleTowerLobby_EventScript_SaveBeforeDoublesChallenge::
frontier_set FRONTIER_DATA_SELECTED_MON_ORDER
setvar VAR_TEMP_0, 0
setvar VAR_TEMP_CHALLENGE_STATUS, 0
tower_init
tower_set TOWER_DATA_WIN_STREAK_ACTIVE, TRUE
frontier_set FRONTIER_DATA_PAUSED, FALSE
@@ -285,7 +285,7 @@ BattleFrontier_BattleTowerLobby_EventScript_SaveBeforeDoublesChallenge::
closemessage
delay 2
call Common_EventScript_SaveGame
setvar VAR_TEMP_0, 255
setvar VAR_TEMP_CHALLENGE_STATUS, 255
goto_if_eq VAR_RESULT, 0, BattleFrontier_BattleTowerLobby_EventScript_CancelChallengeSaveFailed
incrementgamestat GAME_STAT_ENTERED_BATTLE_TOWER
setvar VAR_BRAVO_TRAINER_BATTLE_TOWER_ON, FALSE
@@ -341,7 +341,7 @@ BattleFrontier_BattleTowerLobby_EventScript_TryEnterMultisChallenge::
BattleFrontier_BattleTowerLobby_EventScript_SaveBeforeMultisChallenge::
frontier_set FRONTIER_DATA_SELECTED_MON_ORDER
setvar VAR_TEMP_0, 0
setvar VAR_TEMP_CHALLENGE_STATUS, 0
tower_init
tower_set TOWER_DATA_WIN_STREAK_ACTIVE, TRUE
frontier_set FRONTIER_DATA_PAUSED, FALSE
@@ -349,7 +349,7 @@ BattleFrontier_BattleTowerLobby_EventScript_SaveBeforeMultisChallenge::
closemessage
delay 2
call Common_EventScript_SaveGame
setvar VAR_TEMP_0, 255
setvar VAR_TEMP_CHALLENGE_STATUS, 255
goto_if_eq VAR_RESULT, 0, BattleFrontier_BattleTowerLobby_EventScript_CancelChallengeSaveFailed
incrementgamestat GAME_STAT_ENTERED_BATTLE_TOWER
setvar VAR_BRAVO_TRAINER_BATTLE_TOWER_ON, FALSE
@@ -404,18 +404,29 @@ BattleFrontier_BattleTowerLobby_EventScript_TryEnterLinkMultisChallenge::
BattleFrontier_BattleTowerLobby_EventScript_SaveBeforeLinkMultisChallenge::
frontier_set FRONTIER_DATA_SELECTED_MON_ORDER
setvar VAR_TEMP_0, 0
setvar VAR_TEMP_CHALLENGE_STATUS, 0
tower_init
tower_set TOWER_DATA_WIN_STREAK_ACTIVE, TRUE
frontier_set FRONTIER_DATA_PAUSED, FALSE
special LoadPlayerParty
closemessage
delay 2
@ The command tower_save ultimately calls TrySavingData(SAVE_LINK), which writes data in SaveBlock1 and SaveBlock2
@ to the flash, but not data in PokemonStorage. The SaveGame script that follows asks the player to do a full save,
@ which they can opt out of. As a result the player can save their party and quit without having saved the PC.
@ This allows players to clone pokemon and their held items by withdrawing them (or erase them by despositing).
#ifndef BUGFIX
tower_save 0
#endif
call Common_EventScript_SaveGame
setvar VAR_TEMP_0, 255
setvar VAR_TEMP_CHALLENGE_STATUS, 255
goto_if_eq VAR_RESULT, 0, BattleFrontier_BattleTowerLobby_EventScript_CancelChallengeSaveFailed
@ GAME_STAT_ENTERED_BATTLE_TOWER should not be incremented here, for two reasons:
@ 1. It is incremented again in BattleFrontier_BattleTowerLobby_EventScript_CableLinkSuccessful or BattleFrontier_BattleTowerLobby_EventScript_WirelessLinkSuccessful
@ 2. If the player tries to connect, but fails, the counter will still be incremented even if the player never enters the tower.
#ifndef BUGFIX
incrementgamestat GAME_STAT_ENTERED_BATTLE_TOWER
#endif
specialvar VAR_RESULT, IsWirelessAdapterConnected
goto_if_eq VAR_RESULT, TRUE, BattleFrontier_BattleTowerLobby_EventScript_TryWirelessLink
goto BattleFrontier_BattleTowerLobby_EventScript_TryCableLink
@@ -591,7 +602,7 @@ BattleFrontier_BattleTowerLobby_EventScript_WaitForLinkOpponentLoad::
call BattleFrontier_BattleTowerLobby_EventScript_ShowYouToBattleRoom
clearflag FLAG_CANCEL_BATTLE_ROOM_CHALLENGE
warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_ELEVATOR, 1, 6
setvar VAR_TEMP_0, 0
setvar VAR_TEMP_CHALLENGE_STATUS, 0
waitstate
end

View File

@@ -1,6 +1,6 @@
@ Unused
BattleFrontier_BattleTowerLobby_EventScript_DirectYouToBattleRoom:
BattleFrontier_BattleTowerLobby_Text_DirectYouToBattleRoom:
.string "I'll direct you to your BATTLE ROOM now.$"
BattleFrontier_BattleTowerLobby_Text_DidntSaveBeforeQuitting:

View File

@@ -1,6 +1,6 @@
@ Unused
BattleFrontier_BattleTowerLobby_EventScript_DirectYouToBattleRoom:
BattleFrontier_BattleTowerLobby_Text_DirectYouToBattleRoom:
.string "I’ll direct you to your BATTLE ROOM now.$"
BattleFrontier_BattleTowerLobby_Text_DidntSaveBeforeQuitting:

View File

@@ -1,6 +1,6 @@
@ Unused
BattleFrontier_BattleTowerLobby_EventScript_DirectYouToBattleRoom:
BattleFrontier_BattleTowerLobby_Text_DirectYouToBattleRoom:
.string "I’ll direct you to your BATTLE ROOM now.$"
BattleFrontier_BattleTowerLobby_Text_DidntSaveBeforeQuitting:

View File

@@ -1,6 +1,6 @@
@ Unused
BattleFrontier_BattleTowerLobby_EventScript_DirectYouToBattleRoom:
BattleFrontier_BattleTowerLobby_Text_DirectYouToBattleRoom:
.string "I’ll direct you to your BATTLE ROOM now.$"
BattleFrontier_BattleTowerLobby_Text_DidntSaveBeforeQuitting:

View File

@@ -85,10 +85,14 @@ BattleFrontier_BattleTowerMultiBattleRoom_EventScript_OpponentsEnter::
goto BattleFrontier_BattleTowerMultiBattleRoom_EventScript_DoTowerBattle
BattleFrontier_BattleTowerMultiBattleRoom_EventScript_DoOpponentIntrosLink::
.ifdef ENGLISH
tower_getopponentintro 0
.else
.ifdef FRENCH
tower_getopponentintro2 0
.else
.ifdef ITALIAN
tower_getopponentintro2 0
.else @ENGLISH
tower_getopponentintro 0
.endif
.endif
delay 15
applymovement LOCALID_OPPONENT_1, BattleFrontier_BattleTowerMultiBattleRoom_Movement_WalkInPlaceLeft
@@ -96,10 +100,14 @@ BattleFrontier_BattleTowerMultiBattleRoom_EventScript_DoOpponentIntrosLink::
messageautoscroll gStringVar4
waitmessage
delay 48
.ifdef ENGLISH
tower_getopponentintro 1
.else
.ifdef FRENCH
tower_getopponentintro2 1
.else
.ifdef ITALIAN
tower_getopponentintro2 1
.else @ENGLISH
tower_getopponentintro 1
.endif
.endif
applymovement LOCALID_OPPONENT_2, BattleFrontier_BattleTowerMultiBattleRoom_Movement_WalkInPlaceLeft
waitmovement 0

View File

@@ -138,21 +138,21 @@
"y": 10,
"elevation": 0,
"dest_map": "MAP_BATTLE_FRONTIER_OUTSIDE_EAST",
"dest_warp_id": 6
"dest_warp_id": "6"
},
{
"x": 6,
"y": 10,
"elevation": 0,
"dest_map": "MAP_BATTLE_FRONTIER_OUTSIDE_EAST",
"dest_warp_id": 6
"dest_warp_id": "6"
},
{
"x": 8,
"y": 10,
"elevation": 0,
"dest_map": "MAP_BATTLE_FRONTIER_OUTSIDE_EAST",
"dest_warp_id": 6
"dest_warp_id": "6"
}
],
"coord_events": [],

View File

@@ -60,7 +60,7 @@
"y": 9,
"elevation": 0,
"dest_map": "MAP_BATTLE_FRONTIER_OUTSIDE_EAST",
"dest_warp_id": 5
"dest_warp_id": "5"
}
],
"coord_events": [],

View File

@@ -86,14 +86,14 @@
"y": 7,
"elevation": 0,
"dest_map": "MAP_BATTLE_FRONTIER_OUTSIDE_WEST",
"dest_warp_id": 3
"dest_warp_id": "3"
},
{
"x": 2,
"y": 7,
"elevation": 0,
"dest_map": "MAP_BATTLE_FRONTIER_OUTSIDE_WEST",
"dest_warp_id": 3
"dest_warp_id": "3"
}
],
"coord_events": [],

View File

@@ -86,7 +86,7 @@
"y": 9,
"elevation": 0,
"dest_map": "MAP_BATTLE_FRONTIER_OUTSIDE_EAST",
"dest_warp_id": 9
"dest_warp_id": "9"
}
],
"coord_events": [],

View File

@@ -60,7 +60,7 @@
"y": 9,
"elevation": 0,
"dest_map": "MAP_BATTLE_FRONTIER_OUTSIDE_WEST",
"dest_warp_id": 6
"dest_warp_id": "6"
}
],
"coord_events": [],

View File

@@ -73,14 +73,14 @@
"y": 7,
"elevation": 0,
"dest_map": "MAP_BATTLE_FRONTIER_OUTSIDE_EAST",
"dest_warp_id": 7
"dest_warp_id": "7"
},
{
"x": 2,
"y": 7,
"elevation": 0,
"dest_map": "MAP_BATTLE_FRONTIER_OUTSIDE_EAST",
"dest_warp_id": 7
"dest_warp_id": "7"
}
],
"coord_events": [],

View File

@@ -34,7 +34,7 @@
"y": 9,
"elevation": 0,
"dest_map": "MAP_BATTLE_FRONTIER_OUTSIDE_EAST",
"dest_warp_id": 8
"dest_warp_id": "8"
}
],
"coord_events": [],

View File

@@ -73,7 +73,7 @@
"y": 9,
"elevation": 0,
"dest_map": "MAP_BATTLE_FRONTIER_OUTSIDE_WEST",
"dest_warp_id": 7
"dest_warp_id": "7"
}
],
"coord_events": [],

View File

@@ -20,12 +20,12 @@ BattleFrontier_Lounge7_EventScript_ChooseLeftTutorMove::
message BattleFrontier_Lounge7_Text_TeachWhichMove
waitmessage
special ShowBattlePointsWindow
setvar VAR_TEMP_E, 0
setvar VAR_TEMP_FRONTIER_TUTOR_ID, 0
setvar VAR_0x8004, SCROLL_MULTI_BF_MOVE_TUTOR_1
setvar VAR_0x8006, 0
special ShowScrollableMultichoice
waitstate
copyvar VAR_TEMP_D, VAR_RESULT
copyvar VAR_TEMP_FRONTIER_TUTOR_SELECTION, VAR_RESULT
switch VAR_RESULT
case 0, BattleFrontier_Lounge7_EventScript_Softboiled
case 1, BattleFrontier_Lounge7_EventScript_SeismicToss
@@ -44,12 +44,12 @@ BattleFrontier_Lounge7_EventScript_ChooseLeftTutorMove::
BattleFrontier_Lounge7_EventScript_ChooseNewLeftTutorMove::
message BattleFrontier_Lounge7_Text_TeachWhichMove
waitmessage
setvar VAR_TEMP_E, 0
setvar VAR_TEMP_FRONTIER_TUTOR_ID, 0
setvar VAR_0x8004, SCROLL_MULTI_BF_MOVE_TUTOR_1
setvar VAR_0x8006, 1
special ShowScrollableMultichoice
waitstate
copyvar VAR_TEMP_D, VAR_RESULT
copyvar VAR_TEMP_FRONTIER_TUTOR_SELECTION, VAR_RESULT
switch VAR_RESULT
case 0, BattleFrontier_Lounge7_EventScript_Softboiled
case 1, BattleFrontier_Lounge7_EventScript_SeismicToss
@@ -134,12 +134,12 @@ BattleFrontier_Lounge7_EventScript_ChooseRightTutorMove::
message BattleFrontier_Lounge7_Text_TeachWhichMove
waitmessage
special ShowBattlePointsWindow
setvar VAR_TEMP_E, 1
setvar VAR_TEMP_FRONTIER_TUTOR_ID, 1
setvar VAR_0x8004, SCROLL_MULTI_BF_MOVE_TUTOR_2
setvar VAR_0x8006, 0
special ShowScrollableMultichoice
waitstate
copyvar VAR_TEMP_D, VAR_RESULT
copyvar VAR_TEMP_FRONTIER_TUTOR_SELECTION, VAR_RESULT
switch VAR_RESULT
case 0, BattleFrontier_Lounge7_EventScript_DefenseCurl
case 1, BattleFrontier_Lounge7_EventScript_Snore
@@ -158,12 +158,12 @@ BattleFrontier_Lounge7_EventScript_ChooseRightTutorMove::
BattleFrontier_Lounge7_EventScript_ChooseNewRightTutorMove::
message BattleFrontier_Lounge7_Text_TeachWhichMove
waitmessage
setvar VAR_TEMP_E, 1
setvar VAR_TEMP_FRONTIER_TUTOR_ID, 1
setvar VAR_0x8004, SCROLL_MULTI_BF_MOVE_TUTOR_2
setvar VAR_0x8006, 1
special ShowScrollableMultichoice
waitstate
copyvar VAR_TEMP_D, VAR_RESULT
copyvar VAR_TEMP_FRONTIER_TUTOR_SELECTION, VAR_RESULT
switch VAR_RESULT
case 0, BattleFrontier_Lounge7_EventScript_DefenseCurl
case 1, BattleFrontier_Lounge7_EventScript_Snore
@@ -243,11 +243,11 @@ BattleFrontier_Lounge7_EventScript_CancelChooseMon::
@ VAR_0x8008 is the price
@ VAR_TEMP_C is the scroll multichoice ID
@ VAR_TEMP_D is the move selection
@ VAR_TEMP_E is which move tutor was spoken to
@ VAR_TEMP_FRONTIER_TUTOR_SELECTION is the move selection
@ VAR_TEMP_FRONTIER_TUTOR_ID is which move tutor was spoken to
BattleFrontier_Lounge7_EventScript_ConfirmMoveSelection::
copyvar VAR_0x8004, VAR_TEMP_D
copyvar VAR_0x8005, VAR_TEMP_E
copyvar VAR_0x8004, VAR_TEMP_FRONTIER_TUTOR_SELECTION
copyvar VAR_0x8005, VAR_TEMP_FRONTIER_TUTOR_ID
special BufferBattleFrontierTutorMoveName
buffernumberstring STR_VAR_2, VAR_0x8008
copyvar VAR_0x8004, VAR_TEMP_C
@@ -275,7 +275,7 @@ BattleFrontier_Lounge7_EventScript_TeachTutorMove::
end
BattleFrontier_Lounge7_EventScript_ChooseNewMove::
goto_if_eq VAR_TEMP_E, 0, BattleFrontier_Lounge7_EventScript_ChooseNewLeftTutorMove
goto_if_eq VAR_TEMP_FRONTIER_TUTOR_ID, 0, BattleFrontier_Lounge7_EventScript_ChooseNewLeftTutorMove
goto BattleFrontier_Lounge7_EventScript_ChooseNewRightTutorMove
end

View File

@@ -60,7 +60,7 @@
"y": 9,
"elevation": 0,
"dest_map": "MAP_BATTLE_FRONTIER_OUTSIDE_EAST",
"dest_warp_id": 10
"dest_warp_id": "10"
}
],
"coord_events": [],

View File

@@ -34,14 +34,14 @@
"y": 9,
"elevation": 0,
"dest_map": "MAP_BATTLE_FRONTIER_OUTSIDE_EAST",
"dest_warp_id": 11
"dest_warp_id": "11"
},
{
"x": 2,
"y": 9,
"elevation": 0,
"dest_map": "MAP_BATTLE_FRONTIER_OUTSIDE_EAST",
"dest_warp_id": 11
"dest_warp_id": "11"
}
],
"coord_events": [],

View File

@@ -73,14 +73,14 @@
"y": 7,
"elevation": 0,
"dest_map": "MAP_BATTLE_FRONTIER_OUTSIDE_WEST",
"dest_warp_id": 4
"dest_warp_id": "4"
},
{
"x": 4,
"y": 7,
"elevation": 0,
"dest_map": "MAP_BATTLE_FRONTIER_OUTSIDE_WEST",
"dest_warp_id": 4
"dest_warp_id": "4"
}
],
"coord_events": [],

View File

@@ -14,9 +14,9 @@
"battle_scene": "MAP_BATTLE_SCENE_NORMAL",
"connections": [
{
"direction": "left",
"map": "MAP_BATTLE_FRONTIER_OUTSIDE_WEST",
"offset": 0,
"map": "MAP_BATTLE_FRONTIER_OUTSIDE_WEST"
"direction": "left"
}
],
"object_events": [
@@ -365,98 +365,98 @@
"y": 14,
"elevation": 0,
"dest_map": "MAP_BATTLE_FRONTIER_BATTLE_TOWER_LOBBY",
"dest_warp_id": 0
"dest_warp_id": "0"
},
{
"x": 39,
"y": 29,
"elevation": 0,
"dest_map": "MAP_BATTLE_FRONTIER_BATTLE_ARENA_LOBBY",
"dest_warp_id": 0
"dest_warp_id": "0"
},
{
"x": 45,
"y": 56,
"elevation": 0,
"dest_map": "MAP_BATTLE_FRONTIER_BATTLE_PALACE_LOBBY",
"dest_warp_id": 0
"dest_warp_id": "0"
},
{
"x": 58,
"y": 14,
"elevation": 0,
"dest_map": "MAP_BATTLE_FRONTIER_BATTLE_PYRAMID_LOBBY",
"dest_warp_id": 0
"dest_warp_id": "0"
},
{
"x": 35,
"y": 12,
"elevation": 3,
"dest_map": "MAP_BATTLE_FRONTIER_RANKING_HALL",
"dest_warp_id": 0
"dest_warp_id": "0"
},
{
"x": 4,
"y": 44,
"elevation": 0,
"dest_map": "MAP_BATTLE_FRONTIER_LOUNGE1",
"dest_warp_id": 0
"dest_warp_id": "0"
},
{
"x": 10,
"y": 28,
"elevation": 0,
"dest_map": "MAP_BATTLE_FRONTIER_EXCHANGE_SERVICE_CORNER",
"dest_warp_id": 0
"dest_warp_id": "0"
},
{
"x": 22,
"y": 51,
"elevation": 0,
"dest_map": "MAP_BATTLE_FRONTIER_LOUNGE5",
"dest_warp_id": 0
"dest_warp_id": "0"
},
{
"x": 5,
"y": 8,
"elevation": 0,
"dest_map": "MAP_BATTLE_FRONTIER_LOUNGE6",
"dest_warp_id": 0
"dest_warp_id": "0"
},
{
"x": 65,
"y": 31,
"elevation": 0,
"dest_map": "MAP_BATTLE_FRONTIER_LOUNGE3",
"dest_warp_id": 0
"dest_warp_id": "0"
},
{
"x": 14,
"y": 51,
"elevation": 0,
"dest_map": "MAP_BATTLE_FRONTIER_LOUNGE8",
"dest_warp_id": 0
"dest_warp_id": "0"
},
{
"x": 21,
"y": 45,
"elevation": 0,
"dest_map": "MAP_BATTLE_FRONTIER_LOUNGE9",
"dest_warp_id": 0
"dest_warp_id": "0"
},
{
"x": 3,
"y": 51,
"elevation": 0,
"dest_map": "MAP_BATTLE_FRONTIER_POKEMON_CENTER_1F",
"dest_warp_id": 0
"dest_warp_id": "0"
},
{
"x": 28,
"y": 7,
"elevation": 0,
"dest_map": "MAP_ARTISAN_CAVE_1F",
"dest_warp_id": 0
"dest_warp_id": "0"
}
],
"coord_events": [],

View File

@@ -14,9 +14,9 @@
"battle_scene": "MAP_BATTLE_SCENE_NORMAL",
"connections": [
{
"direction": "right",
"map": "MAP_BATTLE_FRONTIER_OUTSIDE_EAST",
"offset": 0,
"map": "MAP_BATTLE_FRONTIER_OUTSIDE_EAST"
"direction": "right"
}
],
"object_events": [
@@ -339,77 +339,77 @@
"y": 27,
"elevation": 0,
"dest_map": "MAP_BATTLE_FRONTIER_BATTLE_PIKE_LOBBY",
"dest_warp_id": 0
"dest_warp_id": "0"
},
{
"x": 19,
"y": 17,
"elevation": 0,
"dest_map": "MAP_BATTLE_FRONTIER_BATTLE_DOME_LOBBY",
"dest_warp_id": 0
"dest_warp_id": "0"
},
{
"x": 11,
"y": 38,
"elevation": 0,
"dest_map": "MAP_BATTLE_FRONTIER_BATTLE_FACTORY_LOBBY",
"dest_warp_id": 0
"dest_warp_id": "0"
},
{
"x": 45,
"y": 44,
"elevation": 0,
"dest_map": "MAP_BATTLE_FRONTIER_LOUNGE2",
"dest_warp_id": 0
"dest_warp_id": "0"
},
{
"x": 51,
"y": 51,
"elevation": 0,
"dest_map": "MAP_BATTLE_FRONTIER_MART",
"dest_warp_id": 0
"dest_warp_id": "0"
},
{
"x": 44,
"y": 5,
"elevation": 0,
"dest_map": "MAP_BATTLE_FRONTIER_SCOTTS_HOUSE",
"dest_warp_id": 0
"dest_warp_id": "0"
},
{
"x": 53,
"y": 44,
"elevation": 0,
"dest_map": "MAP_BATTLE_FRONTIER_LOUNGE4",
"dest_warp_id": 0
"dest_warp_id": "0"
},
{
"x": 5,
"y": 20,
"elevation": 0,
"dest_map": "MAP_BATTLE_FRONTIER_LOUNGE7",
"dest_warp_id": 0
"dest_warp_id": "0"
},
{
"x": 26,
"y": 65,
"elevation": 0,
"dest_map": "MAP_BATTLE_FRONTIER_RECEPTION_GATE",
"dest_warp_id": 0
"dest_warp_id": "0"
},
{
"x": 26,
"y": 61,
"elevation": 0,
"dest_map": "MAP_BATTLE_FRONTIER_RECEPTION_GATE",
"dest_warp_id": 1
"dest_warp_id": "1"
},
{
"x": 39,
"y": 55,
"elevation": 0,
"dest_map": "MAP_ARTISAN_CAVE_B1F",
"dest_warp_id": 0
"dest_warp_id": "0"
}
],
"coord_events": [],

View File

@@ -86,21 +86,21 @@
"y": 8,
"elevation": 3,
"dest_map": "MAP_BATTLE_FRONTIER_OUTSIDE_EAST",
"dest_warp_id": 12
"dest_warp_id": "12"
},
{
"x": 6,
"y": 8,
"elevation": 3,
"dest_map": "MAP_BATTLE_FRONTIER_OUTSIDE_EAST",
"dest_warp_id": 12
"dest_warp_id": "12"
},
{
"x": 1,
"y": 6,
"elevation": 4,
"dest_map": "MAP_BATTLE_FRONTIER_POKEMON_CENTER_2F",
"dest_warp_id": 0
"dest_warp_id": "0"
}
],
"coord_events": [],

View File

@@ -73,21 +73,21 @@
"y": 6,
"elevation": 4,
"dest_map": "MAP_BATTLE_FRONTIER_POKEMON_CENTER_1F",
"dest_warp_id": 2
"dest_warp_id": "2"
},
{
"x": 5,
"y": 1,
"elevation": 3,
"dest_map": "MAP_UNION_ROOM",
"dest_warp_id": 0
"dest_warp_id": "0"
},
{
"x": 9,
"y": 1,
"elevation": 3,
"dest_map": "MAP_TRADE_CENTER",
"dest_warp_id": 0
"dest_warp_id": "0"
}
],
"coord_events": [],

View File

@@ -60,14 +60,14 @@
"y": 14,
"elevation": 3,
"dest_map": "MAP_BATTLE_FRONTIER_OUTSIDE_EAST",
"dest_warp_id": 4
"dest_warp_id": "4"
},
{
"x": 27,
"y": 14,
"elevation": 3,
"dest_map": "MAP_BATTLE_FRONTIER_OUTSIDE_EAST",
"dest_warp_id": 4
"dest_warp_id": "4"
}
],
"coord_events": [],

View File

@@ -86,14 +86,14 @@
"y": 13,
"elevation": 0,
"dest_map": "MAP_BATTLE_FRONTIER_OUTSIDE_WEST",
"dest_warp_id": 8
"dest_warp_id": "8"
},
{
"x": 4,
"y": 1,
"elevation": 0,
"dest_map": "MAP_BATTLE_FRONTIER_OUTSIDE_WEST",
"dest_warp_id": 9
"dest_warp_id": "9"
}
],
"coord_events": [],

View File

@@ -34,14 +34,14 @@
"y": 7,
"elevation": 3,
"dest_map": "MAP_BATTLE_FRONTIER_OUTSIDE_WEST",
"dest_warp_id": 5
"dest_warp_id": "5"
},
{
"x": 3,
"y": 7,
"elevation": 3,
"dest_map": "MAP_BATTLE_FRONTIER_OUTSIDE_WEST",
"dest_warp_id": 5
"dest_warp_id": "5"
}
],
"coord_events": [],

View File

@@ -47,7 +47,7 @@
"y": 24,
"elevation": 0,
"dest_map": "MAP_BIRTH_ISLAND_HARBOR",
"dest_warp_id": 0
"dest_warp_id": "0"
}
],
"coord_events": [],

View File

@@ -48,21 +48,24 @@ BirthIsland_Exterior_EventScript_Triangle::
special DoDeoxysRockInteraction
waitstate
switch VAR_RESULT
case 0, BirthIsland_Exterior_EventScript_NotSolved1
case 1, BirthIsland_Exterior_EventScript_NotSolved2
case 2, BirthIsland_Exterior_EventScript_Deoxys
case 3, BirthIsland_Exterior_EventScript_NotSolved3
case DEOXYS_ROCK_FAILED, BirthIsland_Exterior_EventScript_Failed
case DEOXYS_ROCK_PROGRESSED, BirthIsland_Exterior_EventScript_Progressed
case DEOXYS_ROCK_SOLVED, BirthIsland_Exterior_EventScript_Deoxys
case DEOXYS_ROCK_COMPLETE, BirthIsland_Exterior_EventScript_Complete
end
BirthIsland_Exterior_EventScript_NotSolved1::
@ The actual rock triangle movement is handled by DoDeoxysRockInteraction.
@ Unless the player has solved the puzzle and needs to encounter Deoxys,
@ there's nothing else the script needs to do.
BirthIsland_Exterior_EventScript_Failed::
release
end
BirthIsland_Exterior_EventScript_NotSolved2::
BirthIsland_Exterior_EventScript_Progressed::
release
end
BirthIsland_Exterior_EventScript_NotSolved3::
BirthIsland_Exterior_EventScript_Complete::
release
end

View File

@@ -47,7 +47,7 @@
"y": 2,
"elevation": 0,
"dest_map": "MAP_BIRTH_ISLAND_EXTERIOR",
"dest_warp_id": 0
"dest_warp_id": "0"
}
],
"coord_events": [],

View File

@@ -20,14 +20,14 @@
"y": 17,
"elevation": 3,
"dest_map": "MAP_CAVE_OF_ORIGIN_ENTRANCE",
"dest_warp_id": 1
"dest_warp_id": "1"
},
{
"x": 14,
"y": 5,
"elevation": 3,
"dest_map": "MAP_CAVE_OF_ORIGIN_B1F",
"dest_warp_id": 0
"dest_warp_id": "0"
}
],
"coord_events": [],

View File

@@ -34,7 +34,7 @@
"y": 3,
"elevation": 3,
"dest_map": "MAP_CAVE_OF_ORIGIN_1F",
"dest_warp_id": 1
"dest_warp_id": "1"
}
],
"coord_events": [],

View File

@@ -20,14 +20,14 @@
"y": 20,
"elevation": 3,
"dest_map": "MAP_SOOTOPOLIS_CITY",
"dest_warp_id": 3
"dest_warp_id": "3"
},
{
"x": 9,
"y": 5,
"elevation": 3,
"dest_map": "MAP_CAVE_OF_ORIGIN_1F",
"dest_warp_id": 0
"dest_warp_id": "0"
}
],
"coord_events": [],

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