merge w pret

This commit is contained in:
ghoulslash 2024-08-04 12:32:13 -04:00
commit 80db140d2b
855 changed files with 15900 additions and 14749 deletions

1
.gitignore vendored
View File

@ -21,7 +21,6 @@ sound/**/*.bin
sound/songs/midi/*.s
tools/agbcc
*.map
*.ld
*.bat
*.dump
*.sa*

View File

@ -33,27 +33,23 @@ WSL1 is the preferred terminal to build **pokeemerald**. The following instructi
- Otherwise, **open WSL** and go to [Choosing where to store pokeemerald (WSL1)](#Choosing-where-to-store-pokeemerald-WSL1).
### Installing WSL1
1. Open [Windows Powershell **as Administrator**](https://i.imgur.com/QKmVbP9.png), and run the following command (Right Click or Shift+Insert is paste in the Powershell).
1. Open [Windows Powershell **as Administrator**](https://i.imgur.com/QKmVbP9.png), and run the following commands (Right Click or Shift+Insert is paste in the Powershell).
```powershell
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
wsl --install -d Ubuntu --enable-wsl1
```
2. Once the process finishes, restart your machine.
3. The next step is to choose and install a Linux distribution from the Microsoft Store. The following instructions will assume Ubuntu as the Linux distribution of choice.
3. Open Windows Powershell **as Administrator** again (after restarting), and run the following command to configure Ubuntu to use WSL1.
```powershell
wsl --set-version Ubuntu 1
```
<details>
<summary><i>Note for advanced users...</i></summary>
<summary><i>Note...</i></summary>
> You can pick a preferred Linux distribution, but setup instructions may differ. Debian should work with the given instructions, but has not been tested.
</details>
4. Open the [Microsoft Store Linux Selection](https://aka.ms/wslstore), click Ubuntu, then click Get, which will install the Ubuntu distribution.
<details>
<summary><i>Notes...</i></summary>
> Note 1: If a dialog pops up asking for you to sign into a Microsoft Account, then just close the dialog.
> Note 2: If the link does not work, then open the Microsoft Store manually, and search for the Ubuntu app (choose the one with no version number).
> WSL may open automatically after restarting, but you can ignore it for now.
</details>
### Setting up WSL1
@ -125,19 +121,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 isnt 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.
@ -320,6 +350,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!)_

View File

@ -28,7 +28,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
@ -73,7 +73,7 @@ MODERN_ELF_NAME := $(MODERN_ROM_NAME:.gba=.elf)
MODERN_MAP_NAME := $(MODERN_ROM_NAME:.gba=.map)
MODERN_OBJ_DIR_NAME := build/modern
SHELL := /bin/bash -o pipefail
SHELL := bash -o pipefail
ELF = $(ROM:.gba=.elf)
MAP = $(ROM:.gba=.map)
@ -119,8 +119,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)
@ -236,8 +234,7 @@ clean-tools:
@$(foreach tooldir,$(TOOLDIRS),$(MAKE) clean -C $(tooldir);)
mostlyclean: tidynonmodern tidymodern
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
@ -314,7 +311,7 @@ ifeq ($(NODEP),1)
$(C_BUILDDIR)/%.o: $(C_SUBDIR)/%.c
ifeq (,$(KEEP_TEMPS))
@echo "$(CC1) <flags> -o $@ $<"
@$(CPP) $(CPPFLAGS) $< | $(PREPROC) $< charmap.txt -i | $(CC1) $(CFLAGS) -o - - | cat - <(echo -e ".text\n\t.align\t2, 0") | $(AS) $(ASFLAGS) -o $@ -
@$(CPP) $(CPPFLAGS) $< | $(PREPROC) -i $< charmap.txt | $(CC1) $(CFLAGS) -o - - | cat - <(echo -e ".text\n\t.align\t2, 0") | $(AS) $(ASFLAGS) -o $@ -
else
@$(CPP) $(CPPFLAGS) $< -o $(C_BUILDDIR)/$*.i
@$(PREPROC) $(C_BUILDDIR)/$*.i charmap.txt | $(CC1) $(CFLAGS) -o $(C_BUILDDIR)/$*.s
@ -326,7 +323,7 @@ define C_DEP
$1: $2 $$(shell $(SCANINC) -I include -I tools/agbcc/include -I gflib $2)
ifeq (,$$(KEEP_TEMPS))
@echo "$$(CC1) <flags> -o $$@ $$<"
@$$(CPP) $$(CPPFLAGS) $$< | $$(PREPROC) $$< charmap.txt -i | $$(CC1) $$(CFLAGS) -o - - | cat - <(echo -e ".text\n\t.align\t2, 0") | $$(AS) $$(ASFLAGS) -o $$@ -
@$$(CPP) $$(CPPFLAGS) $$< | $$(PREPROC) -i $$< charmap.txt | $$(CC1) $$(CFLAGS) -o - - | cat - <(echo -e ".text\n\t.align\t2, 0") | $$(AS) $$(ASFLAGS) -o $$@ -
else
@$$(CPP) $$(CPPFLAGS) $$< -o $$(C_BUILDDIR)/$3.i
@$$(PREPROC) $$(C_BUILDDIR)/$3.i charmap.txt | $$(CC1) $$(CFLAGS) -o $$(C_BUILDDIR)/$3.s
@ -341,7 +338,7 @@ ifeq ($(NODEP),1)
$(GFLIB_BUILDDIR)/%.o: $(GFLIB_SUBDIR)/%.c $$(c_dep)
ifeq (,$(KEEP_TEMPS))
@echo "$(CC1) <flags> -o $@ $<"
@$(CPP) $(CPPFLAGS) $< | $(PREPROC) $< charmap.txt -i | $(CC1) $(CFLAGS) -o - - | cat - <(echo -e ".text\n\t.align\t2, 0") | $(AS) $(ASFLAGS) -o $@ -
@$(CPP) $(CPPFLAGS) $< | $(PREPROC) -i $< charmap.txt | $(CC1) $(CFLAGS) -o - - | cat - <(echo -e ".text\n\t.align\t2, 0") | $(AS) $(ASFLAGS) -o $@ -
else
@$(CPP) $(CPPFLAGS) $< -o $(GFLIB_BUILDDIR)/$*.i
@$(PREPROC) $(GFLIB_BUILDDIR)/$*.i charmap.txt | $(CC1) $(CFLAGS) -o $(GFLIB_BUILDDIR)/$*.s
@ -353,7 +350,7 @@ define GFLIB_DEP
$1: $2 $$(shell $(SCANINC) -I include -I tools/agbcc/include -I gflib $2)
ifeq (,$$(KEEP_TEMPS))
@echo "$$(CC1) <flags> -o $$@ $$<"
@$$(CPP) $$(CPPFLAGS) $$< | $$(PREPROC) $$< charmap.txt -i | $$(CC1) $$(CFLAGS) -o - - | cat - <(echo -e ".text\n\t.align\t2, 0") | $$(AS) $$(ASFLAGS) -o $$@ -
@$$(CPP) $$(CPPFLAGS) $$< | $$(PREPROC) -i $$< charmap.txt | $$(CC1) $$(CFLAGS) -o - - | cat - <(echo -e ".text\n\t.align\t2, 0") | $$(AS) $$(ASFLAGS) -o $$@ -
else
@$$(CPP) $$(CPPFLAGS) $$< -o $$(GFLIB_BUILDDIR)/$3.i
@$$(PREPROC) $$(GFLIB_BUILDDIR)/$3.i charmap.txt | $$(CC1) $$(CFLAGS) -o $$(GFLIB_BUILDDIR)/$3.s
@ -366,11 +363,11 @@ endif
ifeq ($(NODEP),1)
$(C_BUILDDIR)/%.o: $(C_SUBDIR)/%.s
$(PREPROC) $< charmap.txt | $(CPP) -I include - | $(AS) $(ASFLAGS) -o $@
$(PREPROC) $< charmap.txt | $(CPP) -I include - | $(PREPROC) -i $$< charmap.txt | $(AS) $(ASFLAGS) -o $@
else
define SRC_ASM_DATA_DEP
$1: $2 $$(shell $(SCANINC) -I include -I "" $2)
$$(PREPROC) $$< charmap.txt | $$(CPP) -I include - | $$(AS) $$(ASFLAGS) -o $$@
$$(PREPROC) $$< charmap.txt | $$(CPP) -I include - | $$(PREPROC) -ie $$< charmap.txt | $$(AS) $$(ASFLAGS) -o $$@
endef
$(foreach src, $(C_ASM_SRCS), $(eval $(call SRC_ASM_DATA_DEP,$(patsubst $(C_SUBDIR)/%.s,$(C_BUILDDIR)/%.o, $(src)),$(src))))
endif
@ -388,7 +385,7 @@ endif
ifeq ($(NODEP),1)
$(DATA_ASM_BUILDDIR)/%.o: $(DATA_ASM_SUBDIR)/%.s
$(PREPROC) $< charmap.txt | $(CPP) -I include - | $(AS) $(ASFLAGS) -o $@
$(PREPROC) $< charmap.txt | $(CPP) -I include - | $(PREPROC) -ie $$< charmap.txt | $(AS) $(ASFLAGS) -o $@
else
$(foreach src, $(REGULAR_DATA_ASM_SRCS), $(eval $(call SRC_ASM_DATA_DEP,$(patsubst $(DATA_ASM_SUBDIR)/%.s,$(DATA_ASM_BUILDDIR)/%.o, $(src)),$(src))))
endif
@ -407,19 +404,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 := 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$(REVISION) --silent
$(ROM): $(ELF)

View File

@ -8,24 +8,4 @@ It builds the following ROM:
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

@ -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

@ -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

@ -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"
@ -1925,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
@ -2182,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:
@ -2253,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
@ -3175,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

@ -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
@ -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::

View File

@ -1,3 +1,4 @@
#include "config.h"
#include "constants/global.h"
#include "constants/contest.h"
.include "asm/macros.inc"
@ -435,11 +436,11 @@ 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
.ifdef BUGFIX
#ifdef BUGFIX
if_appeal_num_eq 0, AI_CGM_BetterWhenAudienceExcited_1stAppeal
.else
#else
if_appeal_num_not_eq 0, AI_CGM_BetterWhenAudienceExcited_1stAppeal
.endif
#endif
if_excitement_eq 4, AI_CGM_BetterWhenAudienceExcited_1AwayFromMax
if_excitement_eq 3, AI_CGM_BetterWhenAudienceExcited_2AwayFromMax
end
@ -546,11 +547,11 @@ AI_CGM_TargetMonWithJudgesAttention:
end
AI_CGM_TargetMonWithJudgesAttention_CheckMon1:
if_cannot_participate MON_1, AI_CGM_TargetMonWithJudgesAttention_CheckMon2
.ifdef BUGFIX
#ifdef BUGFIX
if_not_used_combo_starter MON_1, AI_CGM_TargetMonWithJudgesAttention_CheckMon2
.else
#else
if_used_combo_starter MON_1, AI_CGM_TargetMonWithJudgesAttention_CheckMon2
.endif
#endif
if_random_less_than 125, AI_CGM_TargetMonWithJudgesAttention_CheckMon2
score +2
if_not_completed_combo MON_1, AI_CGM_TargetMonWithJudgesAttention_CheckMon2
@ -559,11 +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
#ifdef BUGFIX
if_not_used_combo_starter MON_2, AI_CGM_TargetMonWithJudgesAttention_CheckMon3
.else
#else
if_used_combo_starter MON_2, AI_CGM_TargetMonWithJudgesAttention_CheckMon3
.endif
#endif
if_random_less_than 125, AI_CGM_TargetMonWithJudgesAttention_CheckMon3
score +2
if_not_completed_combo MON_2, AI_CGM_TargetMonWithJudgesAttention_CheckMon3
@ -572,11 +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
#ifdef BUGFIX
if_not_used_combo_starter MON_3, AI_CGM_End
.else
#else
if_used_combo_starter MON_3, AI_CGM_End
.endif
#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"

View File

@ -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_TM18"
"script": "AbandonedShip_HiddenFloorRooms_EventScript_ItemTMRainDance",
"flag": "FLAG_ITEM_ABANDONED_SHIP_HIDDEN_FLOOR_ROOM_1_TM_RAIN_DANCE"
},
{
"graphics_id": "OBJ_EVENT_GFX_ITEM_BALL",

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_TM13"
"script": "AbandonedShip_Room_B1F_EventScript_ItemTMIceBeam",
"flag": "FLAG_ITEM_ABANDONED_SHIP_ROOMS_B1F_TM_ICE_BEAM"
}
],
"warp_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

@ -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

@ -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

@ -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

@ -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

@ -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

@ -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,7 +404,7 @@ 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
@ -415,13 +415,18 @@ BattleFrontier_BattleTowerLobby_EventScript_SaveBeforeLinkMultisChallenge::
@ 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
#ifndef BUGFIX
tower_save 0
.endif
#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
@ -597,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

@ -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

@ -136,7 +136,7 @@ DewfordTown_Gym_EventScript_Brawly::
trainerbattle_single TRAINER_BRAWLY_1, DewfordTown_Gym_Text_BrawlyIntro, DewfordTown_Gym_Text_BrawlyDefeat, DewfordTown_Gym_EventScript_BrawlyDefeated, NO_MUSIC
specialvar VAR_RESULT, ShouldTryRematchBattle
goto_if_eq VAR_RESULT, TRUE, DewfordTown_Gym_EventScript_BrawlyRematch
goto_if_unset FLAG_RECEIVED_TM08, DewfordTown_Gym_EventScript_GiveBulkUp2
goto_if_unset FLAG_RECEIVED_TM_BULK_UP, DewfordTown_Gym_EventScript_GiveBulkUp2
msgbox DewfordTown_Gym_Text_BrawlyPostBattle, MSGBOX_DEFAULT
release
end
@ -168,17 +168,17 @@ DewfordTown_Gym_EventScript_BrawlyDefeated::
end
DewfordTown_Gym_EventScript_GiveBulkUp::
giveitem ITEM_TM08
giveitem ITEM_TM_BULK_UP
goto_if_eq VAR_RESULT, 0, Common_EventScript_BagIsFull
msgbox DewfordTown_Gym_Text_ExplainBulkUp, MSGBOX_DEFAULT
setflag FLAG_RECEIVED_TM08
setflag FLAG_RECEIVED_TM_BULK_UP
return
DewfordTown_Gym_EventScript_GiveBulkUp2:
giveitem ITEM_TM08
giveitem ITEM_TM_BULK_UP
goto_if_eq VAR_RESULT, 0, Common_EventScript_ShowBagIsFull
msgbox DewfordTown_Gym_Text_ExplainBulkUp, MSGBOX_DEFAULT
setflag FLAG_RECEIVED_TM08
setflag FLAG_RECEIVED_TM_BULK_UP
release
end

View File

@ -246,11 +246,11 @@ DewfordTown_Hall_EventScript_SludgeBombMan::
lock
faceplayer
call Common_EventScript_BufferTrendyPhrase
goto_if_set FLAG_RECEIVED_TM36, DewfordTown_Hall_EventScript_ReceivedSludgeBomb
goto_if_set FLAG_RECEIVED_TM_SLUDGE_BOMB, DewfordTown_Hall_EventScript_ReceivedSludgeBomb
msgbox DewfordTown_Hall_Text_GiveYouSludgeBomb, MSGBOX_DEFAULT
giveitem ITEM_TM36
giveitem ITEM_TM_SLUDGE_BOMB
goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull
setflag FLAG_RECEIVED_TM36
setflag FLAG_RECEIVED_TM_SLUDGE_BOMB
release
end

View File

@ -15,11 +15,11 @@ FallarborTown_BattleTentLobby_EventScript_TurnPlayerNorth::
end
FallarborTown_BattleTentLobby_OnFrame:
map_script_2 VAR_TEMP_0, 0, FallarborTown_BattleTentLobby_EventScript_GetChallengeStatus
map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_SAVING, FallarborTown_BattleTentLobby_EventScript_QuitWithoutSaving
map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_PAUSED, FallarborTown_BattleTentLobby_EventScript_ResumeChallenge
map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_WON, FallarborTown_BattleTentLobby_EventScript_WonChallenge
map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_LOST, FallarborTown_BattleTentLobby_EventScript_LostChallenge
map_script_2 VAR_TEMP_CHALLENGE_STATUS, 0, FallarborTown_BattleTentLobby_EventScript_GetChallengeStatus
map_script_2 VAR_TEMP_CHALLENGE_STATUS, CHALLENGE_STATUS_SAVING, FallarborTown_BattleTentLobby_EventScript_QuitWithoutSaving
map_script_2 VAR_TEMP_CHALLENGE_STATUS, CHALLENGE_STATUS_PAUSED, FallarborTown_BattleTentLobby_EventScript_ResumeChallenge
map_script_2 VAR_TEMP_CHALLENGE_STATUS, CHALLENGE_STATUS_WON, FallarborTown_BattleTentLobby_EventScript_WonChallenge
map_script_2 VAR_TEMP_CHALLENGE_STATUS, CHALLENGE_STATUS_LOST, FallarborTown_BattleTentLobby_EventScript_LostChallenge
.2byte 0
FallarborTown_BattleTentLobby_EventScript_GetChallengeStatus::
@ -31,7 +31,7 @@ FallarborTown_BattleTentLobby_EventScript_QuitWithoutSaving::
msgbox FallarborTown_BattleTentLobby_Text_DidntSaveBeforeQuitting, MSGBOX_DEFAULT
closemessage
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0
setvar VAR_TEMP_0, 255
setvar VAR_TEMP_CHALLENGE_STATUS, 255
frontier_set FRONTIER_DATA_LVL_MODE, FRONTIER_LVL_50
releaseall
end
@ -59,7 +59,7 @@ FallarborTown_BattleTentLobby_EventScript_GivePrize::
waitfanfare
msgbox FallarborTown_BattleTentLobby_Text_AwaitAnotherChallenge2, MSGBOX_DEFAULT
closemessage
setvar VAR_TEMP_0, 255
setvar VAR_TEMP_CHALLENGE_STATUS, 255
releaseall
end
@ -67,7 +67,7 @@ FallarborTown_BattleTentLobby_EventScript_NoRoomForPrize::
msgbox FallarborTown_BattleTentLobby_Text_BagFullReturnForPrize, MSGBOX_DEFAULT
waitmessage
closemessage
setvar VAR_TEMP_0, 255
setvar VAR_TEMP_CHALLENGE_STATUS, 255
releaseall
end
@ -87,7 +87,7 @@ FallarborTown_BattleTentLobby_EventScript_LostChallenge::
waitse
msgbox FallarborTown_BattleTentLobby_Text_AwaitAnotherChallenge2, MSGBOX_DEFAULT
closemessage
setvar VAR_TEMP_0, 255
setvar VAR_TEMP_CHALLENGE_STATUS, 255
releaseall
end
@ -99,7 +99,7 @@ FallarborTown_BattleTentLobby_EventScript_ResumeChallenge::
playse SE_SAVE
waitse
frontier_set FRONTIER_DATA_PAUSED, FALSE
setvar VAR_TEMP_0, 255
setvar VAR_TEMP_CHALLENGE_STATUS, 255
goto FallarborTown_BattleTentLobby_EventScript_EnterChallenge
FallarborTown_BattleTentLobby_EventScript_Attendant::
@ -140,7 +140,7 @@ FallarborTown_BattleTentLobby_EventScript_TryEnterChallenge::
case MULTI_B_PRESSED, FallarborTown_BattleTentLobby_EventScript_LoadPartyCancelChallenge
FallarborTown_BattleTentLobby_EventScript_SaveBeforeChallenge::
setvar VAR_TEMP_0, 0
setvar VAR_TEMP_CHALLENGE_STATUS, 0
frontier_set FRONTIER_DATA_SELECTED_MON_ORDER
fallarbortent_init
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_SAVING
@ -149,7 +149,7 @@ FallarborTown_BattleTentLobby_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, FallarborTown_BattleTentLobby_EventScript_CancelChallengeSaveFailed
FallarborTown_BattleTentLobby_EventScript_EnterChallenge::
special SavePlayerParty
@ -158,7 +158,7 @@ FallarborTown_BattleTentLobby_EventScript_EnterChallenge::
closemessage
call FallarborTown_BattleTentLobby_EventScript_WalkToDoor
warp MAP_FALLARBOR_TOWN_BATTLE_TENT_CORRIDOR, 2, 7
setvar VAR_TEMP_0, 0
setvar VAR_TEMP_CHALLENGE_STATUS, 0
waitstate
end

View File

@ -4,7 +4,7 @@ FallarborTown_CozmosHouse_MapScripts::
FallarborTown_CozmosHouse_EventScript_ProfCozmo::
lock
faceplayer
goto_if_set FLAG_RECEIVED_TM27, FallarborTown_CozmosHouse_EventScript_GaveMeteorite
goto_if_set FLAG_RECEIVED_TM_RETURN, FallarborTown_CozmosHouse_EventScript_GaveMeteorite
checkitem ITEM_METEORITE
goto_if_eq VAR_RESULT, TRUE, FallarborTown_CozmosHouse_EventScript_PlayerHasMeteorite
msgbox FallarborTown_CozmosHouse_Text_MeteoriteWillNeverBeMineNow, MSGBOX_DEFAULT
@ -16,11 +16,11 @@ FallarborTown_CozmosHouse_EventScript_PlayerHasMeteorite::
call_if_set FLAG_TEMP_2, FallarborTown_CozmosHouse_EventScript_AskForMeteorite
goto_if_eq VAR_RESULT, NO, FallarborTown_CozmosHouse_EventScript_DeclineGiveMeteorite
msgbox FallarborTown_CozmosHouse_Text_PleaseUseThisTM, MSGBOX_DEFAULT
giveitem ITEM_TM27
giveitem ITEM_TM_RETURN
goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull
setvar VAR_0x8004, ITEM_METEORITE
call Common_EventScript_PlayerHandedOverTheItem
setflag FLAG_RECEIVED_TM27
setflag FLAG_RECEIVED_TM_RETURN
msgbox FallarborTown_CozmosHouse_Text_ReallyGoingToHelpMyResearch, MSGBOX_DEFAULT
release
end
@ -48,7 +48,7 @@ FallarborTown_CozmosHouse_EventScript_GaveMeteorite::
FallarborTown_CozmosHouse_EventScript_CozmosWife::
lock
faceplayer
goto_if_set FLAG_RECEIVED_TM27, FallarborTown_CozmosHouse_EventScript_CozmoIsHappy
goto_if_set FLAG_RECEIVED_TM_RETURN, FallarborTown_CozmosHouse_EventScript_CozmoIsHappy
goto_if_set FLAG_DEFEATED_EVIL_TEAM_MT_CHIMNEY, FallarborTown_CozmosHouse_EventScript_CozmoIsSad
msgbox FallarborTown_CozmosHouse_Text_CozmoWentToMeteorFalls, MSGBOX_DEFAULT
release

View File

@ -24,8 +24,8 @@
"movement_range_y": 1,
"trainer_type": "TRAINER_TYPE_NONE",
"trainer_sight_or_berry_tree_id": "0",
"script": "FieryPath_EventScript_ItemTM06",
"flag": "FLAG_ITEM_FIERY_PATH_TM06"
"script": "FieryPath_EventScript_ItemTMToxic",
"flag": "FLAG_ITEM_FIERY_PATH_TM_TOXIC"
},
{
"graphics_id": "OBJ_EVENT_GFX_PUSHABLE_BOULDER",

View File

@ -11,6 +11,7 @@ FortreeCity_Gym_OnWarp:
map_script_2 VAR_TEMP_0, VAR_TEMP_0, FortreeCity_Gym_EventScript_InitRotatingGates
.2byte 0
@ NOTE: This rotating gate puzzle makes use of VAR_TEMP_0 - VAR_TEMP_3
FortreeCity_Gym_EventScript_InitRotatingGates::
special RotatingGate_InitPuzzleAndGraphics
end
@ -19,7 +20,7 @@ FortreeCity_Gym_EventScript_Winona::
trainerbattle_single TRAINER_WINONA_1, FortreeCity_Gym_Text_WinonaIntro, FortreeCity_Gym_Text_WinonaDefeat, FortreeCity_Gym_EventScript_WinonaDefeated, NO_MUSIC
specialvar VAR_RESULT, ShouldTryRematchBattle
goto_if_eq VAR_RESULT, TRUE, FortreeCity_Gym_EventScript_WinonaRematch
goto_if_unset FLAG_RECEIVED_TM40, FortreeCity_Gym_EventScript_GiveAerialAce2
goto_if_unset FLAG_RECEIVED_TM_AERIAL_ACE, FortreeCity_Gym_EventScript_GiveAerialAce2
msgbox FortreeCity_Gym_Text_WinonaPostBattle, MSGBOX_DEFAULT
release
end
@ -48,18 +49,18 @@ FortreeCity_Gym_EventScript_WinonaDefeated::
end
FortreeCity_Gym_EventScript_GiveAerialAce2::
giveitem ITEM_TM40
giveitem ITEM_TM_AERIAL_ACE
goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull
msgbox FortreeCity_Gym_Text_ExplainAerialAce, MSGBOX_DEFAULT
setflag FLAG_RECEIVED_TM40
setflag FLAG_RECEIVED_TM_AERIAL_ACE
release
end
FortreeCity_Gym_EventScript_GiveAerialAce::
giveitem ITEM_TM40
giveitem ITEM_TM_AERIAL_ACE
goto_if_eq VAR_RESULT, FALSE, Common_EventScript_BagIsFull
msgbox FortreeCity_Gym_Text_ExplainAerialAce, MSGBOX_DEFAULT
setflag FLAG_RECEIVED_TM40
setflag FLAG_RECEIVED_TM_AERIAL_ACE
return
FortreeCity_Gym_EventScript_WinonaRematch::

View File

@ -4,7 +4,7 @@ FortreeCity_House2_MapScripts::
FortreeCity_House2_EventScript_HiddenPowerGiver::
lock
faceplayer
goto_if_set FLAG_RECEIVED_TM10, FortreeCity_House2_EventScript_ExplainHiddenPower
goto_if_set FLAG_RECEIVED_TM_HIDDEN_POWER, FortreeCity_House2_EventScript_ExplainHiddenPower
call_if_unset FLAG_MET_HIDDEN_POWER_GIVER, FortreeCity_House2_EventScript_Greeting
msgbox FortreeCity_House2_Text_CoinInWhichHand, MSGBOX_DEFAULT
multichoice 21, 8, MULTI_RIGHTLEFT, TRUE
@ -19,9 +19,9 @@ FortreeCity_House2_EventScript_HiddenPowerGiver::
switch VAR_RESULT
case 0, FortreeCity_House2_EventScript_WrongGuess
msgbox FortreeCity_House2_Text_YourHiddenPowerHasAwoken, MSGBOX_DEFAULT
giveitem ITEM_TM10
giveitem ITEM_TM_HIDDEN_POWER
goto_if_eq VAR_RESULT, 0, Common_EventScript_ShowBagIsFull
setflag FLAG_RECEIVED_TM10
setflag FLAG_RECEIVED_TM_HIDDEN_POWER
msgbox FortreeCity_House2_Text_ExplainHiddenPower, MSGBOX_DEFAULT
release
end

View File

@ -4,10 +4,10 @@ GraniteCave_1F_MapScripts::
GraniteCave_1F_EventScript_Hiker::
lock
faceplayer
goto_if_set FLAG_RECEIVED_HM05, GraniteCave_1F_EventScript_ReceivedFlash
goto_if_set FLAG_RECEIVED_HM_FLASH, GraniteCave_1F_EventScript_ReceivedFlash
msgbox GraniteCave_1F_Text_GetsDarkAheadHereYouGo, MSGBOX_DEFAULT
giveitem ITEM_HM05
setflag FLAG_RECEIVED_HM05
giveitem ITEM_HM_FLASH
setflag FLAG_RECEIVED_HM_FLASH
msgbox GraniteCave_1F_Text_ExplainFlash, MSGBOX_DEFAULT
release
end

View File

@ -11,7 +11,7 @@ GraniteCave_StevensRoom_EventScript_Steven::
call Common_EventScript_PlayerHandedOverTheItem
setflag FLAG_DELIVERED_STEVEN_LETTER
msgbox GraniteCave_StevensRoom_Text_ThankYouTakeThis, MSGBOX_DEFAULT
giveitem ITEM_TM47
giveitem ITEM_TM_STEEL_WING
call_if_eq VAR_RESULT, FALSE, GraniteCave_StevensRoom_EventScript_BagFull
msgbox GraniteCave_StevensRoom_Text_CouldBecomeChampionLetsRegister, MSGBOX_DEFAULT
closemessage

View File

@ -51,10 +51,10 @@ IslandCave_EventScript_OpenRegiEntrance::
IslandCave_EventScript_CaveEntranceMiddle::
lockall
call_if_set FLAG_TEMP_3, IslandCave_EventScript_ClearSteps
call_if_set FLAG_TEMP_REGICE_PUZZLE_FAILED, IslandCave_EventScript_ClearSteps
goto_if_set FLAG_SYS_BRAILLE_REGICE_COMPLETED, IslandCave_EventScript_BigHoleInWall
braillemessage IslandCave_Braille_RunLapAroundWall
setflag FLAG_TEMP_2
setflag FLAG_TEMP_REGICE_PUZZLE_STARTED
special ShouldDoBrailleRegicePuzzle
goto IslandCave_EventScript_CloseBrailleMsg
end
@ -66,10 +66,10 @@ IslandCave_EventScript_BigHoleInWall::
IslandCave_EventScript_CaveEntranceSide::
lockall
call_if_set FLAG_TEMP_3, IslandCave_EventScript_ClearSteps
call_if_set FLAG_TEMP_REGICE_PUZZLE_FAILED, IslandCave_EventScript_ClearSteps
braillemessage IslandCave_Braille_RunLapAroundWall
goto_if_set FLAG_SYS_BRAILLE_REGICE_COMPLETED, IslandCave_EventScript_CloseBrailleMsg
setflag FLAG_TEMP_2
setflag FLAG_TEMP_REGICE_PUZZLE_STARTED
special ShouldDoBrailleRegicePuzzle
goto IslandCave_EventScript_CloseBrailleMsg
end
@ -84,7 +84,7 @@ IslandCave_EventScript_ClearSteps::
setvar VAR_REGICE_STEPS_1, 0
setvar VAR_REGICE_STEPS_2, 0
setvar VAR_REGICE_STEPS_3, 0
clearflag FLAG_TEMP_3
clearflag FLAG_TEMP_REGICE_PUZZLE_FAILED
return
IslandCave_EventScript_Regice::

View File

@ -52,7 +52,7 @@ LavaridgeTown_Gym_1F_EventScript_Flannery::
trainerbattle_single TRAINER_FLANNERY_1, LavaridgeTown_Gym_1F_Text_FlanneryIntro, LavaridgeTown_Gym_1F_Text_FlanneryDefeat, LavaridgeTown_Gym_1F_EventScript_FlanneryDefeated, NO_MUSIC
specialvar VAR_RESULT, ShouldTryRematchBattle
goto_if_eq VAR_RESULT, TRUE, LavaridgeTown_Gym_1F_EventScript_FlanneryRematch
goto_if_unset FLAG_RECEIVED_TM50, LavaridgeTown_Gym_1F_EventScript_GiveOverheat2
goto_if_unset FLAG_RECEIVED_TM_OVERHEAT, LavaridgeTown_Gym_1F_EventScript_GiveOverheat2
msgbox LavaridgeTown_Gym_1F_Text_FlanneryPostBattle, MSGBOX_DEFAULT
release
end
@ -84,18 +84,18 @@ LavaridgeTown_Gym_1F_EventScript_FlanneryDefeated::
end
LavaridgeTown_Gym_1F_EventScript_GiveOverheat2::
giveitem ITEM_TM50
giveitem ITEM_TM_OVERHEAT
goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull
msgbox LavaridgeTown_Gym_1F_Text_ExplainOverheat, MSGBOX_DEFAULT
setflag FLAG_RECEIVED_TM50
setflag FLAG_RECEIVED_TM_OVERHEAT
release
end
LavaridgeTown_Gym_1F_EventScript_GiveOverheat::
giveitem ITEM_TM50
giveitem ITEM_TM_OVERHEAT
goto_if_eq VAR_RESULT, FALSE, Common_EventScript_BagIsFull
msgbox LavaridgeTown_Gym_1F_Text_ExplainOverheat, MSGBOX_DEFAULT
setflag FLAG_RECEIVED_TM50
setflag FLAG_RECEIVED_TM_OVERHEAT
return
LavaridgeTown_Gym_1F_EventScript_FlanneryRematch::

View File

@ -25,10 +25,10 @@ LilycoveCity_DepartmentStore_4F_EventScript_ClerkLeft::
.align 2
LilycoveCity_DepartmentStore_4F_Pokemart_AttackTMs:
.2byte ITEM_TM38 @ Fire Blast
.2byte ITEM_TM25 @ Thunder
.2byte ITEM_TM14 @ Blizzard
.2byte ITEM_TM15 @ Hyper Beam
.2byte ITEM_TM_FIRE_BLAST
.2byte ITEM_TM_THUNDER
.2byte ITEM_TM_BLIZZARD
.2byte ITEM_TM_HYPER_BEAM
.2byte ITEM_NONE
release
end
@ -45,10 +45,10 @@ LilycoveCity_DepartmentStore_4F_EventScript_ClerkRight::
.align 2
LilycoveCity_DepartmentStore_4F_Pokemart_DefenseTMs:
.2byte ITEM_TM17 @ Protect
.2byte ITEM_TM20 @ Safeguard
.2byte ITEM_TM33 @ Reflect
.2byte ITEM_TM16 @ Light Screen
.2byte ITEM_TM_PROTECT
.2byte ITEM_TM_SAFEGUARD
.2byte ITEM_TM_REFLECT
.2byte ITEM_TM_LIGHT_SCREEN
.2byte ITEM_NONE
release
end

View File

@ -4,11 +4,11 @@ LilycoveCity_House2_MapScripts::
LilycoveCity_House2_EventScript_FatMan::
lock
faceplayer
goto_if_set FLAG_RECEIVED_TM44, LilycoveCity_House2_EventScript_ReceivedRest
goto_if_set FLAG_RECEIVED_TM_REST, LilycoveCity_House2_EventScript_ReceivedRest
msgbox LilycoveCity_House2_Text_NotAwakeYetHaveThis, MSGBOX_DEFAULT
giveitem ITEM_TM44
giveitem ITEM_TM_REST
goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull
setflag FLAG_RECEIVED_TM44
setflag FLAG_RECEIVED_TM_REST
msgbox LilycoveCity_House2_Text_SleepIsEssential, MSGBOX_DEFAULT
release
end

View File

@ -339,7 +339,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_TakeYourTime::
LittlerootTown_ProfessorBirchsLab_EventScript_GiveCyndaquil::
bufferspeciesname STR_VAR_1, SPECIES_CYNDAQUIL
setvar VAR_TEMP_1, SPECIES_CYNDAQUIL
setvar VAR_TEMP_TRANSFERRED_SPECIES, SPECIES_CYNDAQUIL
givemon SPECIES_CYNDAQUIL, 5
goto_if_eq VAR_RESULT, MON_GIVEN_TO_PARTY, LittlerootTown_ProfessorBirchsLab_EventScript_SendCyndaquilToParty
goto_if_eq VAR_RESULT, MON_GIVEN_TO_PC, LittlerootTown_ProfessorBirchsLab_EventScript_SendCyndaquilToPC
@ -380,7 +380,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_ReceivedCyndaquil::
LittlerootTown_ProfessorBirchsLab_EventScript_GiveTotodile::
bufferspeciesname STR_VAR_1, SPECIES_TOTODILE
setvar VAR_TEMP_1, SPECIES_TOTODILE
setvar VAR_TEMP_TRANSFERRED_SPECIES, SPECIES_TOTODILE
givemon SPECIES_TOTODILE, 5
goto_if_eq VAR_RESULT, MON_GIVEN_TO_PARTY, LittlerootTown_ProfessorBirchsLab_EventScript_SendTotodileToParty
goto_if_eq VAR_RESULT, MON_GIVEN_TO_PC, LittlerootTown_ProfessorBirchsLab_EventScript_SendTotodileToPC
@ -421,7 +421,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_ReceivedTotodile::
LittlerootTown_ProfessorBirchsLab_EventScript_GiveChikorita::
bufferspeciesname STR_VAR_1, SPECIES_CHIKORITA
setvar VAR_TEMP_1, SPECIES_CHIKORITA
setvar VAR_TEMP_TRANSFERRED_SPECIES, SPECIES_CHIKORITA
givemon SPECIES_CHIKORITA, 5
goto_if_eq VAR_RESULT, MON_GIVEN_TO_PARTY, LittlerootTown_ProfessorBirchsLab_EventScript_SendChikoritaToParty
goto_if_eq VAR_RESULT, MON_GIVEN_TO_PC, LittlerootTown_ProfessorBirchsLab_EventScript_SendChikoritaToPC

View File

@ -13,7 +13,7 @@ MauvilleCity_OnTransition:
setflag FLAG_SYS_TV_START
clearflag FLAG_MAUVILLE_GYM_BARRIERS_STATE
setvar VAR_MAUVILLE_GYM_STATE, 0
call_if_set FLAG_GOT_TM24_FROM_WATTSON, MauvilleCity_EventScript_MoveWattsonBackToGym
call_if_set FLAG_GOT_TM_THUNDERBOLT_FROM_WATTSON, MauvilleCity_EventScript_MoveWattsonBackToGym
end
MauvilleCity_EventScript_MoveWattsonBackToGym::
@ -418,7 +418,7 @@ MauvilleCity_Movement_ScottExitEast:
MauvilleCity_EventScript_Wattson::
lock
faceplayer
goto_if_set FLAG_GOT_TM24_FROM_WATTSON, MauvilleCity_EventScript_ReceivedThunderbolt
goto_if_set FLAG_GOT_TM_THUNDERBOLT_FROM_WATTSON, MauvilleCity_EventScript_ReceivedThunderbolt
goto_if_eq VAR_NEW_MAUVILLE_STATE, 2, MauvilleCity_EventScript_CompletedNewMauville
goto_if_set FLAG_GOT_BASEMENT_KEY_FROM_WATTSON, MauvilleCity_EventScript_BegunNewMauville
msgbox MauvilleCity_Text_WattsonNeedFavorTakeKey, MSGBOX_DEFAULT
@ -435,9 +435,9 @@ MauvilleCity_EventScript_BegunNewMauville::
MauvilleCity_EventScript_CompletedNewMauville::
msgbox MauvilleCity_Text_WattsonThanksTakeTM, MSGBOX_DEFAULT
giveitem ITEM_TM24
giveitem ITEM_TM_THUNDERBOLT
goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull
setflag FLAG_GOT_TM24_FROM_WATTSON
setflag FLAG_GOT_TM_THUNDERBOLT_FROM_WATTSON
msgbox MauvilleCity_Text_WattsonYoungTakeCharge, MSGBOX_DEFAULT
release
end

View File

@ -2,12 +2,12 @@ MauvilleCity_GameCorner_MapScripts::
.byte 0
@ Game Corner prices
.set TM32_COINS, 1500
.set TM29_COINS, 3500
.set TM35_COINS, 4000
.set TM24_COINS, 4000
.set TM13_COINS, 4000
.set DOLL_COINS, 1000
.set TM_DOUBLE_TEAM_COINS, 1500
.set TM_PSYCHIC_COINS, 3500
.set TM_FLAMETHROWER_COINS, 4000
.set TM_THUNDERBOLT_COINS, 4000
.set TM_ICE_BEAM_COINS, 4000
.set DOLL_COINS, 1000
.set COINS_PRICE_50, 1000
.set COINS_PRICE_500, 10000
@ -236,43 +236,43 @@ MauvilleCity_GameCorner_EventScript_ReturnToChooseTMPrize::
MauvilleCity_GameCorner_EventScript_ChooseTMPrize::
multichoice 12, 0, MULTI_GAME_CORNER_TMS, FALSE
switch VAR_RESULT
case 0, MauvilleCity_GameCorner_EventScript_TM32
case 1, MauvilleCity_GameCorner_EventScript_TM29
case 2, MauvilleCity_GameCorner_EventScript_TM35
case 3, MauvilleCity_GameCorner_EventScript_TM24
case 4, MauvilleCity_GameCorner_EventScript_TM13
case 0, MauvilleCity_GameCorner_EventScript_TMDoubleTeam
case 1, MauvilleCity_GameCorner_EventScript_TMPsychic
case 2, MauvilleCity_GameCorner_EventScript_TMFlamethrower
case 3, MauvilleCity_GameCorner_EventScript_TMThunderbolt
case 4, MauvilleCity_GameCorner_EventScript_TMIceBeam
case 5, MauvilleCity_GameCorner_EventScript_CancelTMSelect
goto MauvilleCity_GameCorner_EventScript_CancelTMSelect
end
MauvilleCity_GameCorner_EventScript_TM32::
MauvilleCity_GameCorner_EventScript_TMDoubleTeam::
setvar VAR_TEMP_1, 1
bufferitemname STR_VAR_1, ITEM_TM32
setvar VAR_0x8004, ITEM_TM32
bufferitemname STR_VAR_1, ITEM_TM_DOUBLE_TEAM
setvar VAR_0x8004, ITEM_TM_DOUBLE_TEAM
goto MauvilleCity_GameCorner_EventScript_ConfirmTMPrize
MauvilleCity_GameCorner_EventScript_TM29::
MauvilleCity_GameCorner_EventScript_TMPsychic::
setvar VAR_TEMP_1, 2
bufferitemname STR_VAR_1, ITEM_TM29
setvar VAR_0x8004, ITEM_TM29
bufferitemname STR_VAR_1, ITEM_TM_PSYCHIC
setvar VAR_0x8004, ITEM_TM_PSYCHIC
goto MauvilleCity_GameCorner_EventScript_ConfirmTMPrize
MauvilleCity_GameCorner_EventScript_TM35::
MauvilleCity_GameCorner_EventScript_TMFlamethrower::
setvar VAR_TEMP_1, 3
bufferitemname STR_VAR_1, ITEM_TM35
setvar VAR_0x8004, ITEM_TM35
bufferitemname STR_VAR_1, ITEM_TM_FLAMETHROWER
setvar VAR_0x8004, ITEM_TM_FLAMETHROWER
goto MauvilleCity_GameCorner_EventScript_ConfirmTMPrize
MauvilleCity_GameCorner_EventScript_TM24::
MauvilleCity_GameCorner_EventScript_TMThunderbolt::
setvar VAR_TEMP_1, 4
bufferitemname STR_VAR_1, ITEM_TM24
setvar VAR_0x8004, ITEM_TM24
bufferitemname STR_VAR_1, ITEM_TM_THUNDERBOLT
setvar VAR_0x8004, ITEM_TM_THUNDERBOLT
goto MauvilleCity_GameCorner_EventScript_ConfirmTMPrize
MauvilleCity_GameCorner_EventScript_TM13::
MauvilleCity_GameCorner_EventScript_TMIceBeam::
setvar VAR_TEMP_1, 5
bufferitemname STR_VAR_1, ITEM_TM13
setvar VAR_0x8004, ITEM_TM13
bufferitemname STR_VAR_1, ITEM_TM_ICE_BEAM
setvar VAR_0x8004, ITEM_TM_ICE_BEAM
goto MauvilleCity_GameCorner_EventScript_ConfirmTMPrize
MauvilleCity_GameCorner_EventScript_ConfirmTMPrize::
@ -280,72 +280,72 @@ MauvilleCity_GameCorner_EventScript_ConfirmTMPrize::
msgbox MauvilleCity_GameCorner_Text_SoYourChoiceIsTheTMX, MSGBOX_YESNO
goto_if_eq VAR_RESULT, NO, MauvilleCity_GameCorner_EventScript_CancelTMSelect
switch VAR_TEMP_1
case 1, MauvilleCity_GameCorner_EventScript_BuyTM32
case 2, MauvilleCity_GameCorner_EventScript_BuyTM29
case 3, MauvilleCity_GameCorner_EventScript_BuyTM35
case 4, MauvilleCity_GameCorner_EventScript_BuyTM24
case 5, MauvilleCity_GameCorner_EventScript_BuyTM13
case 1, MauvilleCity_GameCorner_EventScript_BuyTMDoubleTeam
case 2, MauvilleCity_GameCorner_EventScript_BuyTMPsychic
case 3, MauvilleCity_GameCorner_EventScript_BuyTMFlamethrower
case 4, MauvilleCity_GameCorner_EventScript_BuyTMThunderbolt
case 5, MauvilleCity_GameCorner_EventScript_BuyTMIceBeam
end
MauvilleCity_GameCorner_EventScript_BuyTM32::
MauvilleCity_GameCorner_EventScript_BuyTMDoubleTeam::
checkcoins VAR_TEMP_2
goto_if_lt VAR_TEMP_2, TM32_COINS, MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForTM
checkitemspace ITEM_TM32
goto_if_lt VAR_TEMP_2, TM_DOUBLE_TEAM_COINS, MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForTM
checkitemspace ITEM_TM_DOUBLE_TEAM
goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoRoomForTM
removecoins TM32_COINS
additem ITEM_TM32
removecoins TM_DOUBLE_TEAM_COINS
additem ITEM_TM_DOUBLE_TEAM
updatecoinsbox 1, 1
playse SE_SHOP
msgbox MauvilleCity_GameCorner_Text_HereYouGo, MSGBOX_DEFAULT
goto MauvilleCity_GameCorner_EventScript_ReturnToChooseTMPrize
end
MauvilleCity_GameCorner_EventScript_BuyTM29::
MauvilleCity_GameCorner_EventScript_BuyTMPsychic::
checkcoins VAR_TEMP_2
goto_if_lt VAR_TEMP_2, TM29_COINS, MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForTM
checkitemspace ITEM_TM29
goto_if_lt VAR_TEMP_2, TM_PSYCHIC_COINS, MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForTM
checkitemspace ITEM_TM_PSYCHIC
goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoRoomForTM
removecoins TM29_COINS
additem ITEM_TM29
removecoins TM_PSYCHIC_COINS
additem ITEM_TM_PSYCHIC
updatecoinsbox 1, 1
playse SE_SHOP
msgbox MauvilleCity_GameCorner_Text_HereYouGo, MSGBOX_DEFAULT
goto MauvilleCity_GameCorner_EventScript_ReturnToChooseTMPrize
end
MauvilleCity_GameCorner_EventScript_BuyTM35::
MauvilleCity_GameCorner_EventScript_BuyTMFlamethrower::
checkcoins VAR_TEMP_2
goto_if_lt VAR_TEMP_2, TM35_COINS, MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForTM
checkitemspace ITEM_TM35
goto_if_lt VAR_TEMP_2, TM_FLAMETHROWER_COINS, MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForTM
checkitemspace ITEM_TM_FLAMETHROWER
goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoRoomForTM
removecoins TM35_COINS
additem ITEM_TM35
removecoins TM_FLAMETHROWER_COINS
additem ITEM_TM_FLAMETHROWER
updatecoinsbox 1, 1
playse SE_SHOP
msgbox MauvilleCity_GameCorner_Text_HereYouGo, MSGBOX_DEFAULT
goto MauvilleCity_GameCorner_EventScript_ReturnToChooseTMPrize
end
MauvilleCity_GameCorner_EventScript_BuyTM24::
MauvilleCity_GameCorner_EventScript_BuyTMThunderbolt::
checkcoins VAR_TEMP_2
goto_if_lt VAR_TEMP_2, TM24_COINS, MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForTM
checkitemspace ITEM_TM24
goto_if_lt VAR_TEMP_2, TM_THUNDERBOLT_COINS, MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForTM
checkitemspace ITEM_TM_THUNDERBOLT
goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoRoomForTM
removecoins TM24_COINS
additem ITEM_TM24
removecoins TM_THUNDERBOLT_COINS
additem ITEM_TM_THUNDERBOLT
updatecoinsbox 1, 1
playse SE_SHOP
msgbox MauvilleCity_GameCorner_Text_HereYouGo, MSGBOX_DEFAULT
goto MauvilleCity_GameCorner_EventScript_ReturnToChooseTMPrize
end
MauvilleCity_GameCorner_EventScript_BuyTM13::
MauvilleCity_GameCorner_EventScript_BuyTMIceBeam::
checkcoins VAR_TEMP_2
goto_if_lt VAR_TEMP_2, TM13_COINS, MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForTM
checkitemspace ITEM_TM13
goto_if_lt VAR_TEMP_2, TM_ICE_BEAM_COINS, MauvilleCity_GameCorner_EventScript_NotEnoughCoinsForTM
checkitemspace ITEM_TM_ICE_BEAM
goto_if_eq VAR_RESULT, FALSE, MauvilleCity_GameCorner_EventScript_NoRoomForTM
removecoins TM13_COINS
additem ITEM_TM13
removecoins TM_ICE_BEAM_COINS
additem ITEM_TM_ICE_BEAM
updatecoinsbox 1, 1
playse SE_SHOP
msgbox MauvilleCity_GameCorner_Text_HereYouGo, MSGBOX_DEFAULT

View File

@ -77,7 +77,7 @@ MauvilleCity_Gym_EventScript_Wattson::
trainerbattle_single TRAINER_WATTSON_1, MauvilleCity_Gym_Text_WattsonIntro, MauvilleCity_Gym_Text_WattsonDefeat, MauvilleCity_Gym_EventScript_WattsonDefeated, NO_MUSIC
specialvar VAR_RESULT, ShouldTryRematchBattle
goto_if_eq VAR_RESULT, TRUE, MauvilleCity_Gym_EventScript_WattsonRematch
goto_if_unset FLAG_RECEIVED_TM34, MauvilleCity_Gym_EventScript_GiveShockWave2
goto_if_unset FLAG_RECEIVED_TM_SHOCK_WAVE, MauvilleCity_Gym_EventScript_GiveShockWave2
goto_if_eq VAR_NEW_MAUVILLE_STATE, 2, MauvilleCity_Gym_EventScript_CompletedNewMauville
msgbox MauvilleCity_Gym_Text_WattsonPostBattle, MSGBOX_DEFAULT
release
@ -112,18 +112,18 @@ MauvilleCity_Gym_EventScript_WattsonDefeated::
end
MauvilleCity_Gym_EventScript_GiveShockWave2::
giveitem ITEM_TM34
giveitem ITEM_TM_SHOCK_WAVE
goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull
msgbox MauvilleCity_Gym_Text_ExplainShockWave, MSGBOX_DEFAULT
setflag FLAG_RECEIVED_TM34
setflag FLAG_RECEIVED_TM_SHOCK_WAVE
release
end
MauvilleCity_Gym_EventScript_GiveShockWave::
giveitem ITEM_TM34
giveitem ITEM_TM_SHOCK_WAVE
goto_if_eq VAR_RESULT, FALSE, Common_EventScript_BagIsFull
msgbox MauvilleCity_Gym_Text_ExplainShockWave, MSGBOX_DEFAULT
setflag FLAG_RECEIVED_TM34
setflag FLAG_RECEIVED_TM_SHOCK_WAVE
return
MauvilleCity_Gym_EventScript_CompletedNewMauville::

View File

@ -4,10 +4,10 @@ MauvilleCity_House1_MapScripts::
MauvilleCity_House1_EventScript_RockSmashDude::
lock
faceplayer
goto_if_set FLAG_RECEIVED_HM06, MauvilleCity_House1_EventScript_ReceivedRockSmash
goto_if_set FLAG_RECEIVED_HM_ROCK_SMASH, MauvilleCity_House1_EventScript_ReceivedRockSmash
msgbox MauvilleCity_House1_Text_ImRockSmashDudeTakeThis, MSGBOX_DEFAULT
giveitem ITEM_HM06
setflag FLAG_RECEIVED_HM06
giveitem ITEM_HM_ROCK_SMASH
setflag FLAG_RECEIVED_HM_ROCK_SMASH
setflag FLAG_HIDE_ROUTE_111_ROCK_SMASH_TIP_GUY
msgbox MauvilleCity_House1_Text_ExplainRockSmash, MSGBOX_DEFAULT
release

View File

@ -24,8 +24,8 @@
"movement_range_y": 0,
"trainer_type": "TRAINER_TYPE_NONE",
"trainer_sight_or_berry_tree_id": "0",
"script": "MeteorFalls_1F_1R_EventScript_ItemTM23",
"flag": "FLAG_ITEM_METEOR_FALLS_1F_1R_TM23"
"script": "MeteorFalls_1F_1R_EventScript_ItemTMIronTail",
"flag": "FLAG_ITEM_METEOR_FALLS_1F_1R_TM_IRON_TAIL"
},
{
"graphics_id": "OBJ_EVENT_GFX_ITEM_BALL",

View File

@ -24,8 +24,8 @@
"movement_range_y": 1,
"trainer_type": "TRAINER_TYPE_NONE",
"trainer_sight_or_berry_tree_id": "0",
"script": "MeteorFalls_B1F_2R_EventScript_ItemTM02",
"flag": "FLAG_ITEM_METEOR_FALLS_B1F_2R_TM02"
"script": "MeteorFalls_B1F_2R_EventScript_ItemTMDragonClaw",
"flag": "FLAG_ITEM_METEOR_FALLS_B1F_2R_TM_DRAGON_CLAW"
}
],
"warp_events": [

View File

@ -20,7 +20,7 @@ MossdeepCity_OnTransition:
MossdeepCity_EventScript_PokefanF::
lock
faceplayer
goto_if_set FLAG_RECEIVED_HM08, MossdeepCity_EventScript_PokefanFMagmaGone
goto_if_set FLAG_RECEIVED_HM_DIVE, MossdeepCity_EventScript_PokefanFMagmaGone
msgbox MossdeepCity_Text_SpaceCenterReceivedLetter, MSGBOX_DEFAULT
release
end
@ -33,7 +33,7 @@ MossdeepCity_EventScript_PokefanFMagmaGone::
MossdeepCity_EventScript_Sailor::
lock
faceplayer
goto_if_set FLAG_RECEIVED_HM08, MossdeepCity_EventScript_SailorMagmaGone
goto_if_set FLAG_RECEIVED_HM_DIVE, MossdeepCity_EventScript_SailorMagmaGone
msgbox MossdeepCity_Text_MossdeepTargetedByMagma, MSGBOX_DEFAULT
release
end

View File

@ -52,7 +52,7 @@ MossdeepCity_Gym_EventScript_TateAndLiza::
trainerbattle_double TRAINER_TATE_AND_LIZA_1, MossdeepCity_Gym_Text_TateAndLizaIntro, MossdeepCity_Gym_Text_TateAndLizaDefeat, MossdeepCity_Gym_Text_TateAndLizaNeedTwoMons, MossdeepCity_Gym_EventScript_TateAndLizaDefeated, NO_MUSIC
specialvar VAR_RESULT, ShouldTryRematchBattle
goto_if_eq VAR_RESULT, TRUE, MossdeepCity_Gym_EventScript_TateAndLizaRematch
goto_if_unset FLAG_RECEIVED_TM04, MossdeepCity_Gym_EventScript_GiveCalmMind2
goto_if_unset FLAG_RECEIVED_TM_CALM_MIND, MossdeepCity_Gym_EventScript_GiveCalmMind2
msgbox MossdeepCity_Gym_Text_TateAndLizaPostBattle, MSGBOX_DEFAULT
release
end
@ -90,18 +90,18 @@ MossdeepCity_Gym_EventScript_TateAndLizaDefeated::
end
MossdeepCity_Gym_EventScript_GiveCalmMind2::
giveitem ITEM_TM04
giveitem ITEM_TM_CALM_MIND
goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull
msgbox MossdeepCity_Gym_Text_ExplainCalmMind, MSGBOX_DEFAULT
setflag FLAG_RECEIVED_TM04
setflag FLAG_RECEIVED_TM_CALM_MIND
release
end
MossdeepCity_Gym_EventScript_GiveCalmMind::
giveitem ITEM_TM04
giveitem ITEM_TM_CALM_MIND
goto_if_eq VAR_RESULT, FALSE, Common_EventScript_BagIsFull
msgbox MossdeepCity_Gym_Text_ExplainCalmMind, MSGBOX_DEFAULT
setflag FLAG_RECEIVED_TM04
setflag FLAG_RECEIVED_TM_CALM_MIND
return
MossdeepCity_Gym_EventScript_TateAndLizaRematch::

View File

@ -229,11 +229,11 @@ MossdeepCity_SpaceCenter_1F_EventScript_Grunt2::
copyobjectxytoperm LOCALID_STAIR_GRUNT
switch VAR_FACING
case DIR_WEST, MossdeepCity_SpaceCenter_1F_EventScript_MoveGruntFromStairsWest
#ifdef BUGFIX
#ifdef BUGFIX
case DIR_EAST, MossdeepCity_SpaceCenter_1F_EventScript_MoveGruntFromStairsEast
#else
#else
case DIR_WEST, MossdeepCity_SpaceCenter_1F_EventScript_MoveGruntFromStairsEast
#endif
#endif
applymovement LOCALID_STAIR_GRUNT, MossdeepCity_SpaceCenter_1F_Movement_MoveGruntFromStairs
waitmovement 0
setvar VAR_MOSSDEEP_SPACE_CENTER_STAIR_GUARD_STATE, 2

View File

@ -320,6 +320,9 @@ MossdeepCity_SpaceCenter_2F_EventScript_DefeatedMaxieTabitha::
setobjectmovementtype LOCALID_SCIENTIST, MOVEMENT_TYPE_WANDER_AROUND
addobject LOCALID_SCIENTIST
fadescreen FADE_FROM_BLACK
#ifdef BUGFIX
releaseall
#endif
end
MossdeepCity_SpaceCenter_2F_EventScript_StevenFacePlayer::

View File

@ -40,8 +40,8 @@ MossdeepCity_StevensHouse_EventScript_StevenGivesDive::
applymovement LOCALID_STEVEN, MossdeepCity_StevensHouse_Movement_StevenApproachPlayer
waitmovement 0
msgbox MossdeepCity_StevensHouse_Text_YouveEarnedHMDive, MSGBOX_DEFAULT
giveitem ITEM_HM08
setflag FLAG_RECEIVED_HM08
giveitem ITEM_HM_DIVE
setflag FLAG_RECEIVED_HM_DIVE
setflag FLAG_OMIT_DIVE_FROM_STEVEN_LETTER
msgbox MossdeepCity_StevensHouse_Text_ExplainDive, MSGBOX_DEFAULT
closemessage
@ -85,7 +85,7 @@ MossdeepCity_StevensHouse_EventScript_LeaveBeldum::
end
MossdeepCity_StevensHouse_EventScript_GiveBeldum::
setvar VAR_TEMP_1, SPECIES_BELDUM
setvar VAR_TEMP_TRANSFERRED_SPECIES, SPECIES_BELDUM
givemon SPECIES_BELDUM, 5
goto_if_eq VAR_RESULT, MON_GIVEN_TO_PARTY, MossdeepCity_StevensHouse_EventScript_SendBeldumParty
goto_if_eq VAR_RESULT, MON_GIVEN_TO_PC, MossdeepCity_StevensHouse_EventScript_SendBeldumPC
@ -146,8 +146,8 @@ MossdeepCity_StevensHouse_EventScript_Letter::
@ Unused, leftover from RS
MossdeepCity_StevensHouse_EventScript_DiveItemBall::
finditem ITEM_HM08
setflag FLAG_RECEIVED_HM08
finditem ITEM_HM_DIVE
setflag FLAG_RECEIVED_HM_DIVE
end
MossdeepCity_StevensHouse_Text_YouveEarnedHMDive:

View File

@ -37,8 +37,8 @@
"movement_range_y": 1,
"trainer_type": "TRAINER_TYPE_NONE",
"trainer_sight_or_berry_tree_id": "0",
"script": "MtPyre_6F_EventScript_ItemTM30",
"flag": "FLAG_ITEM_MT_PYRE_6F_TM30"
"script": "MtPyre_6F_EventScript_ItemTMShadowBall",
"flag": "FLAG_ITEM_MT_PYRE_6F_TM_SHADOW_BALL"
},
{
"graphics_id": "OBJ_EVENT_GFX_PSYCHIC_M",

View File

@ -37,8 +37,8 @@
"movement_range_y": 0,
"trainer_type": "TRAINER_TYPE_NONE",
"trainer_sight_or_berry_tree_id": "0",
"script": "MtPyre_Exterior_EventScript_ItemTM48",
"flag": "FLAG_ITEM_MT_PYRE_EXTERIOR_TM48"
"script": "MtPyre_Exterior_EventScript_ItemTMSkillSwap",
"flag": "FLAG_ITEM_MT_PYRE_EXTERIOR_TM_SKILL_SWAP"
}
],
"warp_events": [

View File

@ -38,7 +38,7 @@ PacifidlogTown_House2_EventScript_ClearReceivedFanClubTM::
PacifidlogTown_House2_EventScript_GiveReturn::
msgbox PacifidlogTown_House2_Text_AdoringPokemonTakeThis, MSGBOX_DEFAULT
giveitem ITEM_TM27
giveitem ITEM_TM_RETURN
goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull
setflag FLAG_RECEIVED_FANCLUB_TM_THIS_WEEK
special SetPacifidlogTMReceivedDay
@ -53,7 +53,7 @@ PacifidlogTown_House2_EventScript_PutInEffort::
PacifidlogTown_House2_EventScript_GiveFrustration::
msgbox PacifidlogTown_House2_Text_ViciousPokemonTakeThis, MSGBOX_DEFAULT
giveitem ITEM_TM21
giveitem ITEM_TM_FRUSTRATION
goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull
setflag FLAG_RECEIVED_FANCLUB_TM_THIS_WEEK
special SetPacifidlogTMReceivedDay

View File

@ -332,7 +332,7 @@ PetalburgCity_Gym_EventScript_NormanFaceDoorEast::
PetalburgCity_Gym_EventScript_NormanPostBattle::
call PetalburgCity_Gym_EventScript_ShouldGiveEnigmaBerry
goto_if_eq VAR_RESULT, TRUE, PetalburgCity_Gym_EventScript_GiveEnigmaBerry
goto_if_unset FLAG_RECEIVED_TM42, PetalburgCity_Gym_EventScript_GiveFacade2
goto_if_unset FLAG_RECEIVED_TM_FACADE, PetalburgCity_Gym_EventScript_GiveFacade2
goto_if_set FLAG_SYS_GAME_CLEAR, PetalburgCity_Gym_EventScript_NoAmountOfTrainingIsEnough
msgbox PetalburgCity_Gym_Text_DadGoingToKeepTraining, MSGBOX_DEFAULT
release
@ -405,9 +405,9 @@ PetalburgCity_Gym_EventScript_NormanBattle::
end
PetalburgCity_Gym_EventScript_GiveFacade::
giveitem ITEM_TM42
giveitem ITEM_TM_FACADE
goto_if_eq VAR_RESULT, FALSE, Common_EventScript_BagIsFull
setflag FLAG_RECEIVED_TM42
setflag FLAG_RECEIVED_TM_FACADE
msgbox PetalburgCity_Gym_Text_ExplainFacade, MSGBOX_DEFAULT
return

View File

@ -15,14 +15,14 @@ PetalburgCity_WallysHouse_EventScript_PlayerWallysDadFaceEachOther::
end
PetalburgCity_WallysHouse_OnFrame:
map_script_2 VAR_PETALBURG_CITY_STATE, 4, PetalburgCity_WallysHouse_EventScript_GiveHM03Surf
map_script_2 VAR_PETALBURG_CITY_STATE, 4, PetalburgCity_WallysHouse_EventScript_GiveHMSurf
.2byte 0
PetalburgCity_WallysHouse_EventScript_GiveHM03Surf::
PetalburgCity_WallysHouse_EventScript_GiveHMSurf::
lockall
msgbox PetalburgCity_WallysHouse_Text_PleaseExcuseUs, MSGBOX_DEFAULT
giveitem ITEM_HM03
setflag FLAG_RECEIVED_HM03
giveitem ITEM_HM_SURF
setflag FLAG_RECEIVED_HM_SURF
msgbox PetalburgCity_WallysHouse_Text_SurfGoAllSortsOfPlaces, MSGBOX_DEFAULT
setvar VAR_PETALBURG_CITY_STATE, 5
releaseall
@ -32,14 +32,14 @@ PetalburgCity_WallysHouse_EventScript_WallysDad::
lock
faceplayer
goto_if_set FLAG_DEFEATED_WALLY_VICTORY_ROAD, PetalburgCity_WallysHouse_EventScript_DefeatedWallyInVictoryRoad
goto_if_set FLAG_RECEIVED_HM03, PetalburgCity_WallysHouse_EventScript_ReceievedHM03Surf
goto_if_set FLAG_RECEIVED_HM_SURF, PetalburgCity_WallysHouse_EventScript_ReceievedHMSurf
goto_if_set FLAG_THANKED_FOR_PLAYING_WITH_WALLY, PetalburgCity_WallysHouse_EventScript_PlayedWithWally
msgbox PetalburgCity_WallysHouse_Text_ThanksForPlayingWithWally, MSGBOX_DEFAULT
setflag FLAG_THANKED_FOR_PLAYING_WITH_WALLY
release
end
PetalburgCity_WallysHouse_EventScript_ReceievedHM03Surf::
PetalburgCity_WallysHouse_EventScript_ReceievedHMSurf::
msgbox PetalburgCity_WallysHouse_Text_WallyIsComingHomeSoon, MSGBOX_DEFAULT
release
end
@ -57,12 +57,12 @@ PetalburgCity_WallysHouse_EventScript_PlayedWithWally::
PetalburgCity_WallysHouse_EventScript_WallysMom::
lock
faceplayer
goto_if_set FLAG_RECEIVED_HM03, PetalburgCity_WallysHouse_EventScript_ReceivedHM03Surf
goto_if_set FLAG_RECEIVED_HM_SURF, PetalburgCity_WallysHouse_EventScript_ReceivedHMSurf
msgbox PetalburgCity_WallysHouse_Text_WallyWasReallyHappy, MSGBOX_DEFAULT
release
end
PetalburgCity_WallysHouse_EventScript_ReceivedHM03Surf::
PetalburgCity_WallysHouse_EventScript_ReceivedHMSurf::
msgbox PetalburgCity_WallysHouse_Text_WallyLeftWithoutTelling, MSGBOX_DEFAULT
release
end

View File

@ -329,11 +329,11 @@ Route104_EventScript_Woman::
Route104_EventScript_Boy2::
lock
faceplayer
goto_if_set FLAG_RECEIVED_TM09, Route104_EventScript_ReceivedBulletSeed
goto_if_set FLAG_RECEIVED_TM_BULLET_SEED, Route104_EventScript_ReceivedBulletSeed
msgbox Route104_Text_LikeFillingMouthWithSeedsTakeThis, MSGBOX_DEFAULT
giveitem ITEM_TM09
giveitem ITEM_TM_BULLET_SEED
goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull
setflag FLAG_RECEIVED_TM09
setflag FLAG_RECEIVED_TM_BULLET_SEED
release
end

View File

@ -109,7 +109,7 @@ Route110_TrickHouseEnd_EventScript_CompletedPuzzle5::
msgbox Route110_TrickHouseEnd_Text_AllNightToMakeMechadolls, MSGBOX_DEFAULT
msgbox Route110_TrickHouseEnd_Text_YouHaveEarnedThisReward, MSGBOX_DEFAULT
setvar VAR_TRICK_HOUSE_PRIZE_PICKUP, 0
giveitem ITEM_TM12
giveitem ITEM_TM_TAUNT
call_if_eq VAR_RESULT, FALSE, Route110_TrickHouseEnd_EventScript_BagFull
msgbox Route110_TrickHouseEnd_Text_MakeNewTricksToStumpYou, MSGBOX_DEFAULT
closemessage

View File

@ -370,7 +370,7 @@ Route110_TrickHouseEntrance_EventScript_GivePuzzle4Reward::
end
Route110_TrickHouseEntrance_EventScript_GivePuzzle5Reward::
giveitem ITEM_TM12
giveitem ITEM_TM_TAUNT
goto_if_eq VAR_RESULT, TRUE, Route110_TrickHouseEntrance_EventScript_GotReward
call_if_eq VAR_RESULT, FALSE, Common_EventScript_BagIsFull
msgbox Route110_TrickHouseEntrance_Text_DidYouNotComeToClaimReward, MSGBOX_DEFAULT

View File

@ -11,6 +11,7 @@ Route110_TrickHousePuzzle6_OnWarp:
map_script_2 VAR_TEMP_0, VAR_TEMP_0, Route110_TrickHousePuzzle6_EventScript_InitPuzzle
.2byte 0
@ NOTE: This rotating gate puzzle makes use of VAR_TEMP_0 - VAR_TEMP_5
Route110_TrickHousePuzzle6_EventScript_InitPuzzle::
special RotatingGate_InitPuzzleAndGraphics
end

View File

@ -261,8 +261,8 @@
"movement_range_y": 0,
"trainer_type": "TRAINER_TYPE_NONE",
"trainer_sight_or_berry_tree_id": "0",
"script": "Route111_EventScript_ItemTM37",
"flag": "FLAG_ITEM_ROUTE_111_TM37"
"script": "Route111_EventScript_ItemTMSandstorm",
"flag": "FLAG_ITEM_ROUTE_111_TM_SANDSTORM"
},
{
"graphics_id": "OBJ_EVENT_GFX_BERRY_TREE",

View File

@ -450,8 +450,8 @@
"x": 22,
"y": 5,
"elevation": 3,
"item": "ITEM_TM32",
"flag": "FLAG_HIDDEN_ITEM_ROUTE_113_TM32"
"item": "ITEM_TM_DOUBLE_TEAM",
"flag": "FLAG_HIDDEN_ITEM_ROUTE_113_TM_DOUBLE_TEAM"
},
{
"type": "hidden_item",

View File

@ -43,11 +43,11 @@ Route114_EventScript_ReceivedBerry::
Route114_EventScript_RoarGentleman::
lock
faceplayer
goto_if_set FLAG_RECEIVED_TM05, Route114_EventScript_ReceivedRoar
goto_if_set FLAG_RECEIVED_TM_ROAR, Route114_EventScript_ReceivedRoar
msgbox Route114_Text_AllMyMonDoesIsRoarTakeThis, MSGBOX_DEFAULT
giveitem ITEM_TM05
giveitem ITEM_TM_ROAR
goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull
setflag FLAG_RECEIVED_TM05
setflag FLAG_RECEIVED_TM_ROAR
msgbox Route114_Text_ExplainRoar, MSGBOX_DEFAULT
release
end

View File

@ -9,11 +9,11 @@ Route114_FossilManiacsHouse_OnTransition:
Route114_FossilManiacsHouse_EventScript_FossilManiacsBrother::
lock
faceplayer
goto_if_set FLAG_RECEIVED_TM28, Route114_FossilManiacsHouse_EventScript_ReceivedDig
goto_if_set FLAG_RECEIVED_TM_DIG, Route114_FossilManiacsHouse_EventScript_ReceivedDig
msgbox Route114_FossilManiacsHouse_Text_HaveThisToDigLikeMyBrother, MSGBOX_DEFAULT
giveitem ITEM_TM28
giveitem ITEM_TM_DIG
goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull
setflag FLAG_RECEIVED_TM28
setflag FLAG_RECEIVED_TM_DIG
release
end

View File

@ -165,8 +165,8 @@
"movement_range_y": 0,
"trainer_type": "TRAINER_TYPE_NONE",
"trainer_sight_or_berry_tree_id": "0",
"script": "Route115_EventScript_ItemTM01",
"flag": "FLAG_ITEM_ROUTE_115_TM01"
"script": "Route115_EventScript_ItemTMFocusPunch",
"flag": "FLAG_ITEM_ROUTE_115_TM_FOCUS_PUNCH"
},
{
"graphics_id": "OBJ_EVENT_GFX_ITEM_BALL",

View File

@ -132,8 +132,8 @@ Route119_EventScript_DefeatedBrendan::
end
Route119_EventScript_GiveFlyHM::
giveitem ITEM_HM02
setflag FLAG_RECEIVED_HM02
giveitem ITEM_HM_FLY
setflag FLAG_RECEIVED_HM_FLY
return
Route119_EventScript_RivalExitScottArrive::

View File

@ -88,7 +88,7 @@ Route119_WeatherInstitute_2F_EventScript_ShellyDefeated::
Route119_WeatherInstitute_2F_EventScript_ReceiveCastform::
msgbox Route119_WeatherInstitute_2F_Text_ThanksPleaseTakePokemon, MSGBOX_DEFAULT
setvar VAR_TEMP_1, SPECIES_CASTFORM
setvar VAR_TEMP_TRANSFERRED_SPECIES, SPECIES_CASTFORM
givemon SPECIES_CASTFORM, 25, ITEM_MYSTIC_WATER
goto_if_eq VAR_RESULT, MON_GIVEN_TO_PARTY, Route119_WeatherInstitute_2F_EventScript_ReceiveCastformParty
goto_if_eq VAR_RESULT, MON_GIVEN_TO_PC, Route119_WeatherInstitute_2F_EventScript_ReceiveCastformPC

View File

@ -9,14 +9,14 @@ Route123_OnTransition:
Route123_EventScript_GigaDrainGirl::
lock
faceplayer
goto_if_set FLAG_RECEIVED_TM19, Route123_EventScript_ReceivedGigaDrain
goto_if_set FLAG_RECEIVED_TM_GIGA_DRAIN, Route123_EventScript_ReceivedGigaDrain
msgbox Route123_Text_LoveGrassMonsHaveAny, MSGBOX_DEFAULT
special IsGrassTypeInParty
goto_if_eq VAR_RESULT, FALSE, Route123_EventScript_NoGrassMons
msgbox Route123_Text_YouLikeGrassMonsTooHaveThis, MSGBOX_DEFAULT
giveitem ITEM_TM19
giveitem ITEM_TM_GIGA_DRAIN
goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull
setflag FLAG_RECEIVED_TM19
setflag FLAG_RECEIVED_TM_GIGA_DRAIN
msgbox Route123_Text_CheckTreesWithMyGrassMon, MSGBOX_DEFAULT
release
end

View File

@ -62,7 +62,7 @@
"trainer_type": "TRAINER_TYPE_NONE",
"trainer_sight_or_berry_tree_id": "BERRY_TREE_ROUTE_130_LIECHI",
"script": "BerryTreeScript",
"flag": "FLAG_TEMP_11"
"flag": "FLAG_TEMP_HIDE_MIRAGE_ISLAND_BERRY_TREE"
},
{
"graphics_id": "OBJ_EVENT_GFX_SWIMMER_M",

View File

@ -6,7 +6,8 @@ Route130_OnTransition:
call_if_ge VAR_SOOTOPOLIS_CITY_STATE, 4, Route130_EventScript_CheckSetAbnormalWeather
specialvar VAR_RESULT, IsMirageIslandPresent
goto_if_eq VAR_RESULT, TRUE, Route130_EventScript_SetMirageIslandLayout
setflag FLAG_TEMP_11
@ Mirage Island isn't currently visible, hide any objects on the island. Only the first flag is actually associated with anything.
setflag FLAG_TEMP_HIDE_MIRAGE_ISLAND_BERRY_TREE
setflag FLAG_TEMP_12
setflag FLAG_TEMP_13
setflag FLAG_TEMP_14

View File

@ -4,10 +4,10 @@ RustboroCity_CuttersHouse_MapScripts::
RustboroCity_CuttersHouse_EventScript_Cutter::
lock
faceplayer
goto_if_set FLAG_RECEIVED_HM01, RustboroCity_CuttersHouse_EventScript_ExplainCut
goto_if_set FLAG_RECEIVED_HM_CUT, RustboroCity_CuttersHouse_EventScript_ExplainCut
msgbox RustboroCity_CuttersHouse_Text_YouCanPutThisHMToGoodUse, MSGBOX_DEFAULT
giveitem ITEM_HM01
setflag FLAG_RECEIVED_HM01
giveitem ITEM_HM_CUT
setflag FLAG_RECEIVED_HM_CUT
msgbox RustboroCity_CuttersHouse_Text_ExplainCut, MSGBOX_DEFAULT
release
end

View File

@ -144,7 +144,7 @@ RustboroCity_DevonCorp_2F_EventScript_AnorithReady::
end
RustboroCity_DevonCorp_2F_EventScript_ReceiveLileep::
setvar VAR_TEMP_1, SPECIES_LILEEP
setvar VAR_TEMP_TRANSFERRED_SPECIES, SPECIES_LILEEP
givemon SPECIES_LILEEP, 20
goto_if_eq VAR_RESULT, MON_GIVEN_TO_PARTY, RustboroCity_DevonCorp_2F_EventScript_ReceiveLileepParty
goto_if_eq VAR_RESULT, MON_GIVEN_TO_PC, RustboroCity_DevonCorp_2F_EventScript_ReceiveLileepPC
@ -189,7 +189,7 @@ RustboroCity_DevonCorp_2F_EventScript_FinishReceivingLileep::
end
RustboroCity_DevonCorp_2F_EventScript_ReceiveAnorith::
setvar VAR_TEMP_1, SPECIES_ANORITH
setvar VAR_TEMP_TRANSFERRED_SPECIES, SPECIES_ANORITH
givemon SPECIES_ANORITH, 20
goto_if_eq VAR_RESULT, MON_GIVEN_TO_PARTY, RustboroCity_DevonCorp_2F_EventScript_ReceiveAnorithParty
goto_if_eq VAR_RESULT, MON_GIVEN_TO_PC, RustboroCity_DevonCorp_2F_EventScript_ReceiveAnorithPC

View File

@ -5,7 +5,7 @@ RustboroCity_Gym_EventScript_Roxanne::
trainerbattle_single TRAINER_ROXANNE_1, RustboroCity_Gym_Text_RoxanneIntro, RustboroCity_Gym_Text_RoxanneDefeat, RustboroCity_Gym_EventScript_RoxanneDefeated, NO_MUSIC
specialvar VAR_RESULT, ShouldTryRematchBattle
goto_if_eq VAR_RESULT, TRUE, RustboroCity_Gym_EventScript_RoxanneRematch
goto_if_unset FLAG_RECEIVED_TM39, RustboroCity_Gym_EventScript_GiveRockTomb
goto_if_unset FLAG_RECEIVED_TM_ROCK_TOMB, RustboroCity_Gym_EventScript_GiveRockTomb
msgbox RustboroCity_Gym_Text_RoxannePostBattle, MSGBOX_DEFAULT
release
end
@ -26,9 +26,9 @@ RustboroCity_Gym_EventScript_RoxanneDefeated::
end
RustboroCity_Gym_EventScript_GiveRockTomb::
giveitem ITEM_TM39
giveitem ITEM_TM_ROCK_TOMB
goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull
setflag FLAG_RECEIVED_TM39
setflag FLAG_RECEIVED_TM_ROCK_TOMB
msgbox RustboroCity_Gym_Text_ExplainRockTomb, MSGBOX_DEFAULT
release
end

View File

@ -62,8 +62,8 @@ RusturfTunnel_EventScript_ClearTunnelScene::
msgbox RusturfTunnel_Text_YouShatteredBoulderTakeHM, MSGBOX_DEFAULT
call_if_eq VAR_TEMP_1, 2, RusturfTunnel_EventScript_WandasBoyfriendApproachPlayer
call_if_eq VAR_TEMP_1, 3, RusturfTunnel_EventScript_WandasBoyfriendApproachPlayer
giveitem ITEM_HM04
setflag FLAG_RECEIVED_HM04
giveitem ITEM_HM_STRENGTH
setflag FLAG_RECEIVED_HM_STRENGTH
msgbox RusturfTunnel_Text_ExplainStrength, MSGBOX_DEFAULT
closemessage
call_if_eq VAR_TEMP_1, 1, RusturfTunnel_EventScript_BoyfriendApproachWanda1

View File

@ -124,7 +124,7 @@ SSTidalCorridor_EventScript_ExitSailor::
SSTidalCorridor_EventScript_ExitLilycove::
setrespawn HEAL_LOCATION_LILYCOVE_CITY
msgbox SSTidalCorridor_Text_WeveArrived, MSGBOX_DEFAULT
call_if_set FLAG_RECEIVED_TM49, SSTidalCorridor_EventScript_HideSnatchGiver
call_if_set FLAG_RECEIVED_TM_SNATCH, SSTidalCorridor_EventScript_HideSnatchGiver
warp MAP_LILYCOVE_CITY_HARBOR, 8, 11
waitstate
release
@ -133,7 +133,7 @@ SSTidalCorridor_EventScript_ExitLilycove::
SSTidalCorridor_EventScript_ExitSlateport::
setrespawn HEAL_LOCATION_SLATEPORT_CITY
msgbox SSTidalCorridor_Text_WeveArrived, MSGBOX_DEFAULT
call_if_set FLAG_RECEIVED_TM49, SSTidalCorridor_EventScript_HideSnatchGiver
call_if_set FLAG_RECEIVED_TM_SNATCH, SSTidalCorridor_EventScript_HideSnatchGiver
warp MAP_SLATEPORT_CITY_HARBOR, 8, 11
waitstate
release

View File

@ -4,11 +4,11 @@ SSTidalRooms_MapScripts::
SSTidalRooms_EventScript_SnatchGiver::
lock
faceplayer
goto_if_set FLAG_RECEIVED_TM49, SSTidalRooms_EventScript_ExplainSnatch
goto_if_set FLAG_RECEIVED_TM_SNATCH, SSTidalRooms_EventScript_ExplainSnatch
msgbox SSTidalRooms_Text_NotSuspiciousTakeThis, MSGBOX_DEFAULT
giveitem ITEM_TM49
giveitem ITEM_TM_SNATCH
goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull
setflag FLAG_RECEIVED_TM49
setflag FLAG_RECEIVED_TM_SNATCH
msgbox SSTidalRooms_Text_ExplainSnatch, MSGBOX_DEFAULT
release
end

View File

@ -48,8 +48,8 @@
"movement_range_y": 1,
"trainer_type": "TRAINER_TYPE_NONE",
"trainer_sight_or_berry_tree_id": "0",
"script": "SafariZone_Northwest_EventScript_ItemTM22",
"flag": "FLAG_ITEM_SAFARI_ZONE_NORTH_WEST_TM22"
"script": "SafariZone_Northwest_EventScript_ItemTMSolarBeam",
"flag": "FLAG_ITEM_SAFARI_ZONE_NORTH_WEST_TM_SOLAR_BEAM"
}
],
"warp_events": [],

View File

@ -24,8 +24,8 @@
"movement_range_y": 0,
"trainer_type": "TRAINER_TYPE_NONE",
"trainer_sight_or_berry_tree_id": "0",
"script": "ScorchedSlab_EventScript_ItemTM11",
"flag": "FLAG_ITEM_SCORCHED_SLAB_TM11"
"script": "ScorchedSlab_EventScript_ItemTMSunnyDay",
"flag": "FLAG_ITEM_SCORCHED_SLAB_TM_SUNNY_DAY"
}
],
"warp_events": [

View File

@ -89,8 +89,8 @@
"movement_range_y": 1,
"trainer_type": "TRAINER_TYPE_NONE",
"trainer_sight_or_berry_tree_id": "0",
"script": "SeafloorCavern_Room9_EventScript_ItemTM26",
"flag": "FLAG_ITEM_SEAFLOOR_CAVERN_ROOM_9_TM26"
"script": "SeafloorCavern_Room9_EventScript_ItemTMEarthquake",
"flag": "FLAG_ITEM_SEAFLOOR_CAVERN_ROOM_9_TM_EARTHQUAKE"
},
{
"graphics_id": "OBJ_EVENT_GFX_KYOGRE_ASLEEP",

View File

@ -33,9 +33,9 @@ ShoalCave_LowTideEntranceRoom_EventScript_ShellBellExpert::
removeitem ITEM_SHOAL_SALT, 4
removeitem ITEM_SHOAL_SHELL, 4
giveitem ITEM_SHELL_BELL
goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull
goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull @ Never FALSE, we already made sure there will be room in the bag.
msgbox ShoalCave_LowTideEntranceRoom_Text_ExplainShellBell, MSGBOX_DEFAULT
setflag FLAG_TEMP_2
setflag FLAG_TEMP_2 @ Not read. Perhaps meant to stop him from re-explaining the Shell Bell if multiple are received in one sitting.
release
end

View File

@ -24,8 +24,8 @@
"movement_range_y": 1,
"trainer_type": "TRAINER_TYPE_NONE",
"trainer_sight_or_berry_tree_id": "0",
"script": "ShoalCave_LowTideIceRoom_EventScript_ItemTM07",
"flag": "FLAG_ITEM_SHOAL_CAVE_ICE_ROOM_TM07"
"script": "ShoalCave_LowTideIceRoom_EventScript_ItemTMHail",
"flag": "FLAG_ITEM_SHOAL_CAVE_ICE_ROOM_TM_HAIL"
},
{
"graphics_id": "OBJ_EVENT_GFX_ITEM_BALL",

View File

@ -566,8 +566,8 @@ SlateportCity_EventScript_PowerTMClerk::
.align 2
SlateportCity_Pokemart_PowerTMs:
.2byte ITEM_TM10 @ Hidden Power
.2byte ITEM_TM43 @ Secret Power
.2byte ITEM_TM_HIDDEN_POWER
.2byte ITEM_TM_SECRET_POWER
.2byte ITEM_NONE
release
end

View File

@ -15,11 +15,11 @@ SlateportCity_BattleTentLobby_EventScript_TurnPlayerNorth::
end
SlateportCity_BattleTentLobby_OnFrame:
map_script_2 VAR_TEMP_0, 0, SlateportCity_BattleTentLobby_EventScript_GetChallengeStatus
map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_SAVING, SlateportCity_BattleTentLobby_EventScript_QuitWithoutSaving
map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_PAUSED, SlateportCity_BattleTentLobby_EventScript_ResumeChallenge
map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_WON, SlateportCity_BattleTentLobby_EventScript_WonChallenge
map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_LOST, SlateportCity_BattleTentLobby_EventScript_LostChallenge
map_script_2 VAR_TEMP_CHALLENGE_STATUS, 0, SlateportCity_BattleTentLobby_EventScript_GetChallengeStatus
map_script_2 VAR_TEMP_CHALLENGE_STATUS, CHALLENGE_STATUS_SAVING, SlateportCity_BattleTentLobby_EventScript_QuitWithoutSaving
map_script_2 VAR_TEMP_CHALLENGE_STATUS, CHALLENGE_STATUS_PAUSED, SlateportCity_BattleTentLobby_EventScript_ResumeChallenge
map_script_2 VAR_TEMP_CHALLENGE_STATUS, CHALLENGE_STATUS_WON, SlateportCity_BattleTentLobby_EventScript_WonChallenge
map_script_2 VAR_TEMP_CHALLENGE_STATUS, CHALLENGE_STATUS_LOST, SlateportCity_BattleTentLobby_EventScript_LostChallenge
.2byte 0
SlateportCity_BattleTentLobby_EventScript_GetChallengeStatus::
@ -31,7 +31,7 @@ SlateportCity_BattleTentLobby_EventScript_QuitWithoutSaving::
msgbox SlateportCity_BattleTentLobby_Text_DidntSaveBeforeQuitting, MSGBOX_DEFAULT
closemessage
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0
setvar VAR_TEMP_0, 255
setvar VAR_TEMP_CHALLENGE_STATUS, 255
frontier_set FRONTIER_DATA_LVL_MODE, FRONTIER_LVL_50
releaseall
end
@ -73,7 +73,7 @@ SlateportCity_BattleTentLobby_EventScript_LostChallenge::
SlateportCity_BattleTentLobby_EventScript_EndGivePrize::
msgbox SlateportCity_BattleTentLobby_Text_LookForwardToNextVisit, MSGBOX_DEFAULT
closemessage
setvar VAR_TEMP_0, 255
setvar VAR_TEMP_CHALLENGE_STATUS, 255
releaseall
end
@ -85,7 +85,7 @@ SlateportCity_BattleTentLobby_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 SlateportCity_BattleTentLobby_EventScript_EnterChallenge
@ -117,7 +117,7 @@ SlateportCity_BattleTentLobby_EventScript_TryEnterChallenge::
case MULTI_B_PRESSED, SlateportCity_BattleTentLobby_EventScript_LoadPartyCancelChallenge
SlateportCity_BattleTentLobby_EventScript_SaveBeforeChallenge::
setvar VAR_TEMP_0, 0
setvar VAR_TEMP_CHALLENGE_STATUS, 0
frontier_set FRONTIER_DATA_SELECTED_MON_ORDER
slateporttent_init
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_SAVING
@ -125,7 +125,7 @@ SlateportCity_BattleTentLobby_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, SlateportCity_BattleTentLobby_EventScript_CancelChallengeSaveFailed
setvar VAR_0x8006, 0
SlateportCity_BattleTentLobby_EventScript_EnterChallenge::
@ -133,7 +133,7 @@ SlateportCity_BattleTentLobby_EventScript_EnterChallenge::
closemessage
call SlateportCity_BattleTentLobby_EventScript_WalkToDoor
warp MAP_SLATEPORT_CITY_BATTLE_TENT_CORRIDOR, 2, 7
setvar VAR_TEMP_0, 0
setvar VAR_TEMP_CHALLENGE_STATUS, 0
waitstate
end
@ -199,11 +199,11 @@ SlateportCity_BattleTentLobby_Movement_UnusedEnterDoor::
SlateportCity_BattleTentLobby_EventScript_TormentGiver::
lock
faceplayer
goto_if_set FLAG_RECEIVED_TM41, SlateportCity_BattleTentLobby_EventScript_ReceivedTorment
goto_if_set FLAG_RECEIVED_TM_TORMENT, SlateportCity_BattleTentLobby_EventScript_ReceivedTorment
msgbox SlateportCity_BattleTentLobby_Text_CouldntFindMonForMe, MSGBOX_DEFAULT
giveitem ITEM_TM41
giveitem ITEM_TM_TORMENT
goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull
setflag FLAG_RECEIVED_TM41
setflag FLAG_RECEIVED_TM_TORMENT
msgbox SlateportCity_BattleTentLobby_Text_ExplainTorment, MSGBOX_DEFAULT
release
end

View File

@ -151,9 +151,9 @@ SlateportCity_OceanicMuseum_1F_EventScript_FamiliarGrunt::
applymovement LOCALID_FAMILIAR_GRUNT, Common_Movement_Delay48
waitmovement 0
msgbox SlateportCity_OceanicMuseum_1F_Text_RememberMeTakeThis, MSGBOX_DEFAULT
giveitem ITEM_TM46
giveitem ITEM_TM_THIEF
goto_if_eq VAR_RESULT, 0, SlateportCity_OceanicMuseum_1F_EventScript_NoRoomForThief
setflag FLAG_RECEIVED_TM46
setflag FLAG_RECEIVED_TM_THIEF
msgbox SlateportCity_OceanicMuseum_1F_Text_HopeINeverSeeYouAgain, MSGBOX_DEFAULT
closemessage
goto_if_eq VAR_FACING, DIR_NORTH, SlateportCity_OceanicMuseum_1F_EventScript_FamiliarGruntExitNorth

View File

@ -1300,7 +1300,7 @@ SootopolisCity_EventScript_Wallace::
lock
faceplayer
goto_if_eq VAR_SOOTOPOLIS_CITY_STATE, 4, SootopolisCity_EventScript_GoToSkyPillar
goto_if_set FLAG_RECEIVED_HM07, SootopolisCity_EventScript_GoToGym
goto_if_set FLAG_RECEIVED_HM_WATERFALL, SootopolisCity_EventScript_GoToGym
goto_if_set FLAG_SOOTOPOLIS_ARCHIE_MAXIE_LEAVE, SootopolisCity_EventScript_GiveWaterfall
msgbox SootopolisCity_Text_AquaMagmaDidntMeanHarm, MSGBOX_DEFAULT
release
@ -1308,8 +1308,8 @@ SootopolisCity_EventScript_Wallace::
SootopolisCity_EventScript_GiveWaterfall::
msgbox SootopolisCity_Text_ThankYouForHelpAcceptThis, MSGBOX_DEFAULT
giveitem ITEM_HM07
setflag FLAG_RECEIVED_HM07
giveitem ITEM_HM_WATERFALL
setflag FLAG_RECEIVED_HM_WATERFALL
msgbox SootopolisCity_Text_ExplainWaterfallGoToGym, MSGBOX_DEFAULT
closemessage
call_if_eq VAR_FACING, DIR_NORTH, SootopolisCity_EventScript_WallaceMoveFromGym

View File

@ -83,7 +83,7 @@ SootopolisCity_Gym_1F_EventScript_Juan::
trainerbattle_single TRAINER_JUAN_1, SootopolisCity_Gym_1F_Text_JuanIntro, SootopolisCity_Gym_1F_Text_JuanDefeat, SootopolisCity_Gym_1F_EventScript_JuanDefeated, NO_MUSIC
specialvar VAR_RESULT, ShouldTryRematchBattle
goto_if_eq VAR_RESULT, TRUE, SootopolisCity_Gym_1F_EventScript_JuanRematch
goto_if_unset FLAG_RECEIVED_TM03, SootopolisCity_Gym_1F_EventScript_GiveWaterPulse2
goto_if_unset FLAG_RECEIVED_TM_WATER_PULSE, SootopolisCity_Gym_1F_EventScript_GiveWaterPulse2
goto_if_unset FLAG_BADGE06_GET, SootopolisCity_Gym_1F_EventScript_GoGetFortreeBadge
msgbox SootopolisCity_Gym_1F_Text_JuanPostBattle, MSGBOX_DEFAULT
release
@ -116,17 +116,17 @@ SootopolisCity_Gym_1F_EventScript_JuanDefeated::
end
SootopolisCity_Gym_1F_EventScript_GiveWaterPulse::
giveitem ITEM_TM03
giveitem ITEM_TM_WATER_PULSE
goto_if_eq VAR_RESULT, FALSE, Common_EventScript_BagIsFull
msgbox SootopolisCity_Gym_1F_Text_ExplainWaterPulse, MSGBOX_DEFAULT
setflag FLAG_RECEIVED_TM03
setflag FLAG_RECEIVED_TM_WATER_PULSE
return
SootopolisCity_Gym_1F_EventScript_GiveWaterPulse2::
giveitem ITEM_TM03
giveitem ITEM_TM_WATER_PULSE
goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull
msgbox SootopolisCity_Gym_1F_Text_ExplainWaterPulse, MSGBOX_DEFAULT
setflag FLAG_RECEIVED_TM03
setflag FLAG_RECEIVED_TM_WATER_PULSE
release
end

View File

@ -4,11 +4,11 @@ SootopolisCity_House1_MapScripts::
SootopolisCity_House1_EventScript_BrickBreakBlackBelt::
lock
faceplayer
goto_if_set FLAG_RECEIVED_TM31, SootopolisCity_House1_EventScript_ReceivedBrickBreak
goto_if_set FLAG_RECEIVED_TM_BRICK_BREAK, SootopolisCity_House1_EventScript_ReceivedBrickBreak
msgbox SootopolisCity_House1_Text_DevelopedThisTM, MSGBOX_DEFAULT
giveitem ITEM_TM31
giveitem ITEM_TM_BRICK_BREAK
goto_if_eq VAR_RESULT, FALSE, Common_EventScript_ShowBagIsFull
setflag FLAG_RECEIVED_TM31
setflag FLAG_RECEIVED_TM_BRICK_BREAK
msgbox SootopolisCity_House1_Text_ExplainBrickBreak, MSGBOX_DEFAULT
release
end

View File

@ -15,11 +15,11 @@ VerdanturfTown_BattleTentLobby_EventScript_TurnPlayerNorth::
end
VerdanturfTown_BattleTentLobby_OnFrame:
map_script_2 VAR_TEMP_0, 0, VerdanturfTown_BattleTentLobby_EventScript_GetChallengeStatus
map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_SAVING, VerdanturfTown_BattleTentLobby_EventScript_QuitWithoutSaving
map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_PAUSED, VerdanturfTown_BattleTentLobby_EventScript_ResumeChallenge
map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_WON, VerdanturfTown_BattleTentLobby_EventScript_WonChallenge
map_script_2 VAR_TEMP_0, CHALLENGE_STATUS_LOST, VerdanturfTown_BattleTentLobby_EventScript_LostChallenge
map_script_2 VAR_TEMP_CHALLENGE_STATUS, 0, VerdanturfTown_BattleTentLobby_EventScript_GetChallengeStatus
map_script_2 VAR_TEMP_CHALLENGE_STATUS, CHALLENGE_STATUS_SAVING, VerdanturfTown_BattleTentLobby_EventScript_QuitWithoutSaving
map_script_2 VAR_TEMP_CHALLENGE_STATUS, CHALLENGE_STATUS_PAUSED, VerdanturfTown_BattleTentLobby_EventScript_ResumeChallenge
map_script_2 VAR_TEMP_CHALLENGE_STATUS, CHALLENGE_STATUS_WON, VerdanturfTown_BattleTentLobby_EventScript_WonChallenge
map_script_2 VAR_TEMP_CHALLENGE_STATUS, CHALLENGE_STATUS_LOST, VerdanturfTown_BattleTentLobby_EventScript_LostChallenge
.2byte 0
VerdanturfTown_BattleTentLobby_EventScript_GetChallengeStatus::
@ -31,7 +31,7 @@ VerdanturfTown_BattleTentLobby_EventScript_QuitWithoutSaving::
msgbox BattleFrontier_BattlePalaceLobby_Text_FailedToSaveBeforeEndingChallenge, MSGBOX_DEFAULT
closemessage
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, 0
setvar VAR_TEMP_0, 255
setvar VAR_TEMP_CHALLENGE_STATUS, 255
frontier_set FRONTIER_DATA_LVL_MODE, FRONTIER_LVL_50
releaseall
end
@ -59,7 +59,7 @@ VerdanturfTown_BattleTentLobby_EventScript_GivePrize::
waitfanfare
msgbox VerdanturfTown_BattleTentLobby_Text_ReturnFortified, MSGBOX_DEFAULT
closemessage
setvar VAR_TEMP_0, 255
setvar VAR_TEMP_CHALLENGE_STATUS, 255
releaseall
end
@ -67,7 +67,7 @@ VerdanturfTown_BattleTentLobby_EventScript_NoRoomForPrize::
msgbox BattleFrontier_BattlePalaceLobby_Text_NoSpaceForPrize, MSGBOX_DEFAULT
waitmessage
closemessage
setvar VAR_TEMP_0, 255
setvar VAR_TEMP_CHALLENGE_STATUS, 255
releaseall
end
@ -87,7 +87,7 @@ VerdanturfTown_BattleTentLobby_EventScript_LostChallenge::
waitse
msgbox VerdanturfTown_BattleTentLobby_Text_ReturnFortified, MSGBOX_DEFAULT
closemessage
setvar VAR_TEMP_0, 255
setvar VAR_TEMP_CHALLENGE_STATUS, 255
releaseall
end
@ -100,7 +100,7 @@ VerdanturfTown_BattleTentLobby_EventScript_ResumeChallenge::
playse SE_SAVE
waitse
frontier_set FRONTIER_DATA_PAUSED, FALSE
setvar VAR_TEMP_0, 255
setvar VAR_TEMP_CHALLENGE_STATUS, 255
goto VerdanturfTown_BattleTentLobby_EventScript_EnterChallenge
VerdanturfTown_BattleTentLobby_EventScript_Attendant::
@ -141,7 +141,7 @@ VerdanturfTown_BattleTentLobby_EventScript_TryEnterChallenge::
case MULTI_B_PRESSED, VerdanturfTown_BattleTentLobby_EventScript_LoadPartyCancelChallenge
VerdanturfTown_BattleTentLobby_EventScript_SaveBeforeChallenge::
setvar VAR_TEMP_0, 0
setvar VAR_TEMP_CHALLENGE_STATUS, 0
frontier_set FRONTIER_DATA_SELECTED_MON_ORDER
verdanturftent_init
frontier_set FRONTIER_DATA_CHALLENGE_STATUS, CHALLENGE_STATUS_SAVING
@ -150,7 +150,7 @@ VerdanturfTown_BattleTentLobby_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, VerdanturfTown_BattleTentLobby_EventScript_CancelChallengeSaveFailed
VerdanturfTown_BattleTentLobby_EventScript_EnterChallenge::
special SavePlayerParty
@ -159,7 +159,7 @@ VerdanturfTown_BattleTentLobby_EventScript_EnterChallenge::
closemessage
call VerdanturfTown_BattleTentLobby_EventScript_WalkToDoor
warp MAP_VERDANTURF_TOWN_BATTLE_TENT_CORRIDOR, 2, 7
setvar VAR_TEMP_0, 0
setvar VAR_TEMP_CHALLENGE_STATUS, 0
waitstate
end
@ -225,11 +225,11 @@ VerdanturfTown_BattleTentLobby_Movement_PlayerEnterDoor:
VerdanturfTown_BattleTentLobby_EventScript_AttractGiver::
lock
faceplayer
goto_if_set FLAG_RECEIVED_TM45, VerdanturfTown_BattleTentLobby_EventScript_ReceivedAttract
goto_if_set FLAG_RECEIVED_TM_ATTRACT, VerdanturfTown_BattleTentLobby_EventScript_ReceivedAttract
msgbox VerdanturfTown_BattleTentLobby_Text_AttractionRunsDeep, MSGBOX_DEFAULT
giveitem ITEM_TM45
giveitem ITEM_TM_ATTRACT
goto_if_eq VAR_RESULT, 0, Common_EventScript_ShowBagIsFull
setflag FLAG_RECEIVED_TM45
setflag FLAG_RECEIVED_TM_ATTRACT
msgbox VerdanturfTown_BattleTentLobby_Text_AttractionMutual, MSGBOX_DEFAULT
release
end

View File

@ -245,8 +245,8 @@
"movement_range_y": 1,
"trainer_type": "TRAINER_TYPE_NONE",
"trainer_sight_or_berry_tree_id": "0",
"script": "VictoryRoad_B1F_EventScript_ItemTM29",
"flag": "FLAG_ITEM_VICTORY_ROAD_B1F_TM29"
"script": "VictoryRoad_B1F_EventScript_ItemTMPsychic",
"flag": "FLAG_ITEM_VICTORY_ROAD_B1F_TM_PSYCHIC"
},
{
"graphics_id": "OBJ_EVENT_GFX_ITEM_BALL",

View File

@ -205,8 +205,8 @@ gScriptCmdTable::
.4byte ScrCmd_nop1 @ 0xca
.4byte ScrCmd_nop1 @ 0xcb
.4byte ScrCmd_nop1 @ 0xcc
.4byte ScrCmd_setmonmodernfatefulencounter @ 0xcd
.4byte ScrCmd_checkmonmodernfatefulencounter @ 0xce
.4byte ScrCmd_setmodernfatefulencounter @ 0xcd
.4byte ScrCmd_checkmodernfatefulencounter @ 0xce
.4byte ScrCmd_trywondercardscript @ 0xcf
.4byte ScrCmd_nop1 @ 0xd0
.4byte ScrCmd_warpspinenter @ 0xd1

View File

@ -743,37 +743,36 @@ EventScript_TradeCenter_Chair3::
waitstate
end
@ VAR_TEMP_1 for below scripts set by ReceiveGiftItem
EventScript_RecordCenter_Spot0::
setvar VAR_0x8005, 0
special RecordMixingPlayerSpotTriggered
waitstate
goto_if_ne VAR_TEMP_1, ITEM_NONE, RecordCorner_EventScript_ReceivedGiftItem
goto_if_ne VAR_TEMP_RECORD_MIX_GIFT_ITEM, ITEM_NONE, RecordCorner_EventScript_ReceivedGiftItem
end
EventScript_RecordCenter_Spot1::
setvar VAR_0x8005, 1
special RecordMixingPlayerSpotTriggered
waitstate
goto_if_ne VAR_TEMP_1, ITEM_NONE, RecordCorner_EventScript_ReceivedGiftItem
goto_if_ne VAR_TEMP_RECORD_MIX_GIFT_ITEM, ITEM_NONE, RecordCorner_EventScript_ReceivedGiftItem
end
EventScript_RecordCenter_Spot2::
setvar VAR_0x8005, 2
special RecordMixingPlayerSpotTriggered
waitstate
goto_if_ne VAR_TEMP_1, ITEM_NONE, RecordCorner_EventScript_ReceivedGiftItem
goto_if_ne VAR_TEMP_RECORD_MIX_GIFT_ITEM, ITEM_NONE, RecordCorner_EventScript_ReceivedGiftItem
end
EventScript_RecordCenter_Spot3::
setvar VAR_0x8005, 3
special RecordMixingPlayerSpotTriggered
waitstate
goto_if_ne VAR_TEMP_1, ITEM_NONE, RecordCorner_EventScript_ReceivedGiftItem
goto_if_ne VAR_TEMP_RECORD_MIX_GIFT_ITEM, ITEM_NONE, RecordCorner_EventScript_ReceivedGiftItem
end
RecordCorner_EventScript_ReceivedGiftItem::
bufferitemname STR_VAR_2, VAR_TEMP_1
bufferitemname STR_VAR_2, VAR_TEMP_RECORD_MIX_GIFT_ITEM
message RecordCorner_Text_PlayerSentOverOneX
waitmessage
waitbuttonpress
@ -814,7 +813,7 @@ TradeCenter_EventScript_Attendant::
end
RecordCorner_EventScript_Attendant::
goto_if_ne VAR_TEMP_0, 0, RecordCorner_EventScript_AlreadyMixed
goto_if_ne VAR_TEMP_MIXED_RECORDS, 0, RecordCorner_EventScript_AlreadyMixed
special Script_FacePlayer
message RecordCorner_Text_TakeSeatAndWait
waitmessage

View File

@ -202,7 +202,7 @@ GabbyAndTy_EventScript_FirstInterview::
call_if_eq VAR_FACING, DIR_NORTH, GabbyAndTy_EventScript_FacePlayerNorth
call_if_eq VAR_FACING, DIR_SOUTH, GabbyAndTy_EventScript_FacePlayerSouth
call_if_eq VAR_FACING, DIR_EAST, GabbyAndTy_EventScript_FacePlayerEast
goto_if_set FLAG_TEMP_1, GabbyAndTy_EventScript_KeepingAnEyeOutForYou
goto_if_set FLAG_TEMP_SKIP_GABBY_INTERVIEW, GabbyAndTy_EventScript_KeepingAnEyeOutForYou
msgbox GabbyAndTy_Text_WhoAreYouInterview, MSGBOX_YESNO
goto GabbyAndTy_EventScript_Interview
end
@ -230,7 +230,7 @@ GabbyAndTy_EventScript_RequestInterview::
call_if_eq VAR_FACING, DIR_NORTH, GabbyAndTy_EventScript_FacePlayerNorth
call_if_eq VAR_FACING, DIR_SOUTH, GabbyAndTy_EventScript_FacePlayerSouth
call_if_eq VAR_FACING, DIR_EAST, GabbyAndTy_EventScript_FacePlayerEast
goto_if_set FLAG_TEMP_1, GabbyAndTy_EventScript_KeepingAnEyeOutForYou
goto_if_set FLAG_TEMP_SKIP_GABBY_INTERVIEW, GabbyAndTy_EventScript_KeepingAnEyeOutForYou
specialvar VAR_RESULT, GabbyAndTyGetLastQuote
goto_if_eq VAR_RESULT, 0, GabbyAndTy_EventScript_DidntInterviewLastTime
msgbox GabbyAndTy_Text_QuoteFromLastInterview, MSGBOX_DEFAULT
@ -295,13 +295,13 @@ GabbyAndTy_EventScript_Interview::
goto_if_eq VAR_RESULT, 0, GabbyAndTy_EventScript_DontGiveUpKeepingEyeOut
msgbox GabbyAndTy_Text_PerfectWellBeSeeingYou, MSGBOX_DEFAULT
special GabbyAndTyAfterInterview
setflag FLAG_TEMP_1
setflag FLAG_TEMP_SKIP_GABBY_INTERVIEW
release
end
GabbyAndTy_EventScript_DontGiveUpKeepingEyeOut::
msgbox GabbyAndTy_Text_DontGiveUpKeepingEyeOut, MSGBOX_DEFAULT
setflag FLAG_TEMP_1
setflag FLAG_TEMP_SKIP_GABBY_INTERVIEW
release
end

View File

@ -58,8 +58,8 @@ Route110_EventScript_ItemElixir::
finditem ITEM_ELIXIR
end
Route111_EventScript_ItemTM37::
finditem ITEM_TM37
Route111_EventScript_ItemTMSandstorm::
finditem ITEM_TM_SANDSTORM
end
Route111_EventScript_ItemStardust::
@ -106,8 +106,8 @@ Route115_EventScript_ItemSuperPotion::
finditem ITEM_SUPER_POTION
end
Route115_EventScript_ItemTM01::
finditem ITEM_TM01
Route115_EventScript_ItemTMFocusPunch::
finditem ITEM_TM_FOCUS_PUNCH
end
Route115_EventScript_ItemIron::
@ -374,12 +374,12 @@ FieryPath_EventScript_ItemFireStone::
finditem ITEM_FIRE_STONE
end
FieryPath_EventScript_ItemTM06::
finditem ITEM_TM06
FieryPath_EventScript_ItemTMToxic::
finditem ITEM_TM_TOXIC
end
MeteorFalls_1F_1R_EventScript_ItemTM23::
finditem ITEM_TM23
MeteorFalls_1F_1R_EventScript_ItemTMIronTail::
finditem ITEM_TM_IRON_TAIL
end
MeteorFalls_1F_1R_EventScript_ItemFullHeal::
@ -394,8 +394,8 @@ MeteorFalls_1F_1R_EventScript_ItemPPUP::
finditem ITEM_PP_UP
end
MeteorFalls_B1F_2R_EventScript_ItemTM02::
finditem ITEM_TM02
MeteorFalls_B1F_2R_EventScript_ItemTMDragonClaw::
finditem ITEM_TM_DRAGON_CLAW
end
NewMauville_Inside_EventScript_ItemUltraBall::
@ -430,8 +430,8 @@ AbandonedShip_Rooms2_B1F_EventScript_ItemDiveBall::
finditem ITEM_DIVE_BALL
end
AbandonedShip_Room_B1F_EventScript_ItemTM13::
finditem ITEM_TM13
AbandonedShip_Room_B1F_EventScript_ItemTMIceBeam::
finditem ITEM_TM_ICE_BEAM
end
AbandonedShip_Rooms2_1F_EventScript_ItemRevive::
@ -454,16 +454,16 @@ AbandonedShip_HiddenFloorRooms_EventScript_ItemWaterStone::
finditem ITEM_WATER_STONE
end
AbandonedShip_HiddenFloorRooms_EventScript_ItemTM18::
finditem ITEM_TM18
AbandonedShip_HiddenFloorRooms_EventScript_ItemTMRainDance::
finditem ITEM_TM_RAIN_DANCE
end
ScorchedSlab_EventScript_ItemTM11::
finditem ITEM_TM11
ScorchedSlab_EventScript_ItemTMSunnyDay::
finditem ITEM_TM_SUNNY_DAY
end
SafariZone_Northwest_EventScript_ItemTM22::
finditem ITEM_TM22
SafariZone_Northwest_EventScript_ItemTMSolarBeam::
finditem ITEM_TM_SOLAR_BEAM
end
SafariZone_North_EventScript_ItemCalcium::
@ -498,16 +498,16 @@ MtPyre_5F_EventScript_ItemLaxIncense::
finditem ITEM_LAX_INCENSE
end
MtPyre_6F_EventScript_ItemTM30::
finditem ITEM_TM30
MtPyre_6F_EventScript_ItemTMShadowBall::
finditem ITEM_TM_SHADOW_BALL
end
MtPyre_Exterior_EventScript_ItemMaxPotion::
finditem ITEM_MAX_POTION
end
MtPyre_Exterior_EventScript_ItemTM48::
finditem ITEM_TM48
MtPyre_Exterior_EventScript_ItemTMSkillSwap::
finditem ITEM_TM_SKILL_SWAP
end
AquaHideout_B1F_EventScript_ItemMasterBall::
@ -554,16 +554,16 @@ ShoalCave_LowTideStairsRoom_EventScript_ItemIceHeal::
finditem ITEM_ICE_HEAL
end
ShoalCave_LowTideIceRoom_EventScript_ItemTM07::
finditem ITEM_TM07
ShoalCave_LowTideIceRoom_EventScript_ItemTMHail::
finditem ITEM_TM_HAIL
end
ShoalCave_LowTideIceRoom_EventScript_ItemNeverMeltIce::
finditem ITEM_NEVER_MELT_ICE
end
SeafloorCavern_Room9_EventScript_ItemTM26::
finditem ITEM_TM26
SeafloorCavern_Room9_EventScript_ItemTMEarthquake::
finditem ITEM_TM_EARTHQUAKE
end
Route110_TrickHousePuzzle1_EventScript_ItemOrangeMail::
@ -610,8 +610,8 @@ VictoryRoad_1F_EventScript_ItemPPUp::
finditem ITEM_PP_UP
end
VictoryRoad_B1F_EventScript_ItemTM29::
finditem ITEM_TM29
VictoryRoad_B1F_EventScript_ItemTMPsychic::
finditem ITEM_TM_PSYCHIC
end
VictoryRoad_B1F_EventScript_ItemFullRestore::

View File

@ -15,7 +15,7 @@ Common_EventScript_NameReceivedBoxMon::
Common_EventScript_TransferredToPC::
bufferboxname STR_VAR_1, VAR_PC_BOX_TO_SEND_MON
bufferspeciesname STR_VAR_2, VAR_TEMP_1
bufferspeciesname STR_VAR_2, VAR_TEMP_TRANSFERRED_SPECIES
call_if_unset FLAG_SYS_PC_LANETTE, EventScript_TransferredSomeonesPC
call_if_set FLAG_SYS_PC_LANETTE, EventScript_TransferredLanettesPC
return

View File

@ -53,6 +53,9 @@ SafariZone_EventScript_ChoosePokeblock::
special OpenPokeblockCaseOnFeeder
waitstate
goto_if_ne VAR_RESULT, 0xFFFF, SafariZone_EventScript_PokeblockPlaced
#ifdef BUGFIX
releaseall @ Only gets called from EventScript_PokeBlockFeeder which uses lockall.
#endif
end
SafariZone_EventScript_PokeblockPlaced::

View File

@ -43,7 +43,7 @@ Route111_EventScript_SecretPowerMan::
end
Route111_EventScript_GiveSecretPower::
giveitem ITEM_TM43
giveitem ITEM_TM_SECRET_POWER
goto_if_eq VAR_RESULT, FALSE, Route111_EventScript_NoRoomForSecretPower
msgbox Route111_Text_ExplainSecretPower, MSGBOX_DEFAULT
closemessage

View File

@ -13,9 +13,9 @@ TrainerHill_OnWarp:
TrainerHill_1F_EventScript_DummyOnWarp::
setvar VAR_TEMP_3, 1
.ifdef BUGFIX
#ifdef BUGFIX
end @ Missing end. By chance, the next byte (0x02 of VAR_TEMP_2) is also the id for the end cmd
.endif
#endif
TrainerHill_OnFrame:
map_script_2 VAR_TEMP_2, 0, TrainerHill_1F_EventScript_DummyWarpToEntranceCounter

View File

@ -421,13 +421,11 @@ u16 Unused_LoadBgPalette(u8 bg, const void *src, u16 size, u16 destOffset)
if (!IsInvalidBg32(bg))
{
u16 paletteOffset = (sGpuBgConfigs2[bg].basePalette * 0x20) + (destOffset * 2);
u16 paletteOffset = PLTT_OFFSET_4BPP(sGpuBgConfigs2[bg].basePalette) + (destOffset * 2);
cursor = RequestDma3Copy(src, (void *)(paletteOffset + BG_PLTT), size, 0);
if (cursor == -1)
{
return -1;
}
}
else
{

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