This commit is contained in:
Evan 2020-02-11 07:43:32 -07:00
commit 7c91183eda
616 changed files with 41576 additions and 13186 deletions

View File

@ -227,15 +227,15 @@
.byte \battler
.endm
.macro if_equal_ param0:req, param1:req
.macro if_equal_u32 param0:req, param1:req
.byte 0x26
.byte \param0
.4byte \param0
.4byte \param1
.endm
.macro if_not_equal_ param0:req, param1:req
.macro if_not_equal_u32 param0:req, param1:req
.byte 0x27
.byte \param0
.4byte \param0
.4byte \param1
.endm
@ -245,10 +245,10 @@
.4byte \param1
.endm
.macro if_user_doesnt_go param0:req, param1:req
.macro if_cant_use_belch battler:req, ptr:req
.byte 0x29
.byte \param0
.4byte \param1
.byte \battler
.4byte \ptr
.endm
.macro nullsub_2A
@ -315,13 +315,13 @@
.macro if_effect param0:req, param1:req
.byte 0x37
.byte \param0
.2byte \param0
.4byte \param1
.endm
.macro if_not_effect param0:req, param1:req
.byte 0x38
.byte \param0
.2byte \param0
.4byte \param1
.endm
@ -467,24 +467,32 @@
.byte \battler
.endm
.macro nullsub_52
.macro if_move_flag flag jumpptr
.byte 0x52
.4byte \flag
.4byte \jumpptr
.endm
.macro nullsub_53
.macro if_field_status flag jumpptr
.byte 0x53
.4byte \flag
.4byte \jumpptr
.endm
.macro nullsub_54
.macro get_move_accuracy
.byte 0x54
.endm
.macro nullsub_55
.macro call_if_eq value, ptr
.byte 0x55
.2byte \value
.4byte \ptr
.endm
.macro nullsub_56
.byte 0x56
.macro call_if_move_flag flag ptr
.byte 0x52
.4byte \flag
.4byte \ptr
.endm
.macro nullsub_57
@ -551,7 +559,132 @@
.4byte \param2
.endm
.macro get_ally_chosen_move
.byte 0x63
.endm
.macro if_has_no_attacking_moves battler:req, param1:req
.byte 0x64
.byte \battler
.4byte \param1
.endm
.macro get_hazards_count battler:req, effect:req
.byte 0x65
.byte \battler
.2byte \effect
.endm
.macro if_doesnt_hold_berry battler:req, ptr:req
.byte 0x66
.byte \battler
.4byte \ptr
.endm
.macro if_share_type battler1:req, battler2:req, ptr:req
.byte 0x67
.byte \battler1
.byte \battler2
.4byte \ptr
.endm
.macro if_cant_use_last_resort battler:req, ptr:req
.byte 0x68
.byte \battler
.4byte \ptr
.endm
.macro if_has_move_with_split battler:req, split:req, ptr:req
.byte 0x69
.byte \battler
.byte \split
.4byte \ptr
.endm
.macro if_has_no_move_with_split battler:req, split:req, ptr:req
.byte 0x6A
.byte \battler
.byte \split
.4byte \ptr
.endm
.macro if_physical_moves_unusable attacker:req, target:req, ptr:req
.byte 0x6B
.byte \attacker
.byte \target
.4byte \ptr
.endm
.macro if_ai_can_go_down ptr:req
.byte 0x6C
.4byte \ptr
.endm
.macro if_has_move_with_type battler:req, type:req, ptr:req
.byte 0x6D
.byte \battler
.byte \type
.4byte \ptr
.endm
.macro if_no_move_used battler:req, ptr:req
.byte 0x6E
.byte \battler
.4byte \ptr
.endm
.macro if_has_move_with_flag battler:req, flag:req, ptr:req
.byte 0x6F
.byte \battler
.4byte \flag
.4byte \ptr
.endm
.macro if_battler_absent battler:req, ptr:req
.byte 0x70
.byte \battler
.4byte \ptr
.endm
.macro if_grounded battler:req, ptr:req
.byte 0x71
.byte \battler
.4byte \ptr
.endm
.macro get_best_dmg_hp_percent
.byte 0x72
.endm
.macro get_curr_dmg_hp_percent
.byte 0x73
.endm
.macro get_move_split_from_result
.byte 0x74
.endm
@ useful script macros
.macro if_has_physical_move battler:req, ptr:req
if_has_move_with_split \battler, SPLIT_PHYSICAL, \ptr
.endm
.macro if_has_no_physical_move battler:req, ptr:req
if_has_no_move_with_split \battler, SPLIT_PHYSICAL, \ptr
.endm
.macro if_has_special_move battler:req, ptr:req
if_has_move_with_split \battler, SPLIT_SPECIAL, \ptr
.endm
.macro if_has_no_special_move battler:req, ptr:req
if_has_no_move_with_split \battler, SPLIT_SPECIAL, \ptr
.endm
.macro if_holds_no_item battler, ptr:req
if_holds_item \battler, 0, \ptr
.endm
.macro get_curr_move_type
get_type AI_TYPE_MOVE
.endm
@ -617,3 +750,8 @@
.macro if_any_move_encored battler:req, ptr:req
if_any_move_disabled_or_encored \battler, 1, \ptr
.endm
.macro call_if_always_hit ptr:req
get_move_accuracy
call_if_eq 0, \ptr
.endm

View File

@ -283,3 +283,8 @@
.macro jumpretfalse ptr:req
jumpreteq FALSE, \ptr
.endm
.macro jumpifdoublebattle ptr:req
createvisualtask AnimTask_IsDoubleBattle, 0
jumprettrue \ptr
.endm

View File

@ -29,11 +29,11 @@
.byte 0x6
.endm
.macro adjustnormaldamage
.macro adjustdamage
.byte 0x7
.endm
.macro adjustnormaldamage2
.macro multihitresultmessage
.byte 0x8
.endm
@ -150,7 +150,7 @@
.macro jumpifsideaffecting battler:req, sidestatus:req, ptr:req
.byte 0x1f
.byte \battler
.2byte \sidestatus
.4byte \sidestatus
.4byte \ptr
.endm
@ -171,12 +171,21 @@
.4byte \ptr
.endm
.macro jumpiftype battler:req, type:req, ptr:req
.macro jumpbasedontype battler:req, type:req, case:req, ptr:req
.byte 0x22
.byte \battler
.byte \type
.byte \case
.4byte \ptr
.endm
.macro jumpiftype battler:req, type:req, ptr:req
jumpbasedontype \battler, \type, 1, \ptr
.endm
.macro jumpifnottype battler:req, type:req, ptr:req
jumpbasedontype \battler, \type, 0, \ptr
.endm
.macro getexp battler:req
.byte 0x23
@ -356,11 +365,8 @@
.4byte \ptr
.endm
.macro jumpiftype2 battler:req, type:req, ptr:req
.macro setroost
.byte 0x42
.byte \battler
.byte \type
.4byte \ptr
.endm
.macro jumpifabilitypresent ability:req, ptr:req
@ -436,8 +442,9 @@
moveend 2, \to
.endm
.macro typecalc2
.macro sethealblock ptr
.byte 0x4a
.4byte \ptr
.endm
.macro returnatktoball
@ -593,8 +600,9 @@
.byte 0x68
.endm
.macro adjustsetdamage
.macro setgravity ptr
.byte 0x69
.4byte \ptr
.endm
.macro removeitem battler:req
@ -623,7 +631,7 @@
.byte \battler
.endm
.macro recordlastability battler:req
.macro recordability battler:req
.byte 0x70
.byte \battler
.endm
@ -711,8 +719,9 @@
.4byte \ptr
.endm
.macro nop
.macro setmiracleeye ptr
.byte 0x83
.4byte \ptr
.endm
.macro jumpifcantmakeasleep param0:req
@ -720,8 +729,9 @@
.4byte \param0
.endm
.macro stockpile
.macro stockpile id:req
.byte 0x85
.byte \id
.endm
.macro stockpiletobasedamage param0:req
@ -734,13 +744,13 @@
.4byte \param0
.endm
.macro negativedamage
.macro setdrainedhp
.byte 0x88
.endm
.macro statbuffchange flags:req, jumpptr:req
.byte 0x89
.byte \flags
.2byte \flags
.4byte \jumpptr
.endm
@ -895,8 +905,9 @@
.byte 0xab
.endm
.macro remaininghptopower
.macro settailwind ptr:req
.byte 0xac
.4byte \ptr
.endm
.macro tryspiteppreduce param0:req
@ -927,7 +938,7 @@
.4byte \param0
.endm
.macro rolloutdamagecalculation
.macro handlerollout
.byte 0xb3
.endm
@ -937,12 +948,13 @@
.4byte \ptr
.endm
.macro furycuttercalc
.macro handlefurycutter
.byte 0xb5
.endm
.macro happinesstodamagecalculation
.macro setembargo ptr
.byte 0xb6
.4byte \ptr
.endm
.macro presentdamagecalculation
@ -989,8 +1001,9 @@
.4byte \param0
.endm
.macro hiddenpowercalc
.macro setstickyweb ptr
.byte 0xc1
.4byte \ptr
.endm
.macro selectfirstvalidtarget
@ -1082,13 +1095,14 @@
.4byte \param1
.endm
.macro trysetroots param0:req
.macro settoxicspikes ptr:req
.byte 0xd5
.4byte \param0
.4byte \ptr
.endm
.macro doubledamagedealtifdamaged
.macro setgastroacid ptr
.byte 0xd6
.4byte \ptr
.endm
.macro setyawn param0:req
@ -1101,7 +1115,7 @@
.4byte \param0
.endm
.macro scaledamagebyhealthratio
.macro setroom
.byte 0xd9
.endm
@ -1115,13 +1129,15 @@
.4byte \param0
.endm
.macro trysetgrudge param0:req
.macro setstealthrock ptr:req
.byte 0xdc
.4byte \param0
.4byte \ptr
.endm
.macro weightdamagecalculation
.macro setuserstatus3 flags ptr
.byte 0xdd
.4byte \flags
.4byte \ptr
.endm
.macro assistattackselect param0:req
@ -1176,8 +1192,9 @@
.4byte \param0
.endm
.macro setweatherballtype
.macro jumpifsubstituteblocks ptr
.byte 0xe9
.4byte \ptr
.endm
.macro tryrecycleitem param0:req
@ -1246,6 +1263,41 @@
.byte \param0
.endm
.macro settelekinesis ptr:req
.byte 0xf9
.4byte \ptr
.endm
.macro swapstatstages stat:req
.byte 0xfa
.byte \stat
.endm
.macro averagestats stat:req
.byte 0xfb
.byte \stat
.endm
.macro jumpifoppositegenders ptr:req
.byte 0xfc
.4byte \ptr
.endm
.macro trygetbaddreamstarget ptr:req
.byte 0xfd
.4byte \ptr
.endm
.macro tryworryseed ptr:req
.byte 0xfe
.4byte \ptr
.endm
.macro metalburstdamagecalculator ptr:req
.byte 0xff
.4byte \ptr
.endm
@ various command changed to more readable macros
.macro cancelmultiturnmoves battler:req
various \battler, VARIOUS_CANCEL_MULTI_TURN_MOVES
@ -1355,13 +1407,285 @@
various \battler, VARIOUS_PLAY_TRAINER_DEFEATED_MUSIC
.endm
.macro stattextbuffer battler:req
various \battler, VARIOUS_STAT_TEXT_BUFFER
.endm
.macro switchinabilities battler:req
various \battler, VARIOUS_SWITCHIN_ABILITIES
.endm
.macro savetarget
various BS_TARGET, VARIOUS_SAVE_TARGET
.endm
.macro restoretarget
various BS_TARGET, VARIOUS_RESTORE_TARGET
.endm
.macro instanthpdrop battler:req
various \battler, VARIOUS_INSTANT_HP_DROP
.endm
.macro clearstatus battler:req
various \battler, VARIOUS_CLEAR_STATUS
.endm
.macro restorepp battler:req
various \battler, VARIOUS_RESTORE_PP
.endm
.macro tryactivatemoxie battler:req
various \battler, VARIOUS_TRY_ACTIVATE_MOXIE
.endm
.macro tryactivatefellstinger battler:req
various \battler, VARIOUS_TRY_ACTIVATE_FELL_STINGER
.endm
.macro playmoveanimation battler:req, move:req
various \battler, VARIOUS_PLAY_MOVE_ANIMATION
.2byte \move
.endm
.macro setluckychant battler:req, ptr:req
various \battler VARIOUS_SET_LUCKY_CHANT
.4byte \ptr
.endm
.macro suckerpunchcheck ptr:req
various BS_ATTACKER, VARIOUS_SUCKER_PUNCH_CHECK
.4byte \ptr
.endm
.macro setabilitysimple battler:req, ptr:req
various \battler VARIOUS_SET_SIMPLE_BEAM
.4byte \ptr
.endm
.macro tryentrainment ptr:req
various BS_ATTACKER, VARIOUS_TRY_ENTRAINMENT
.4byte \ptr
.endm
.macro setlastusedability battler:req
various \battler, VARIOUS_SET_LAST_USED_ABILITY
.endm
.macro tryhealpulse battler:req, ptr:req
various \battler, VARIOUS_TRY_HEAL_PULSE
.4byte \ptr
.endm
.macro tryquash ptr:req
various BS_ATTACKER, VARIOUS_TRY_QUASH
.4byte \ptr
.endm
.macro tryafteryou ptr:req
various BS_ATTACKER, VARIOUS_AFTER_YOU
.4byte \ptr
.endm
.macro trybestow ptr:req
various BS_ATTACKER, VARIOUS_BESTOW
.4byte \ptr
.endm
.macro invertstatstages battler:req
various \battler, VARIOUS_INVERT_STAT_STAGES
.endm
.macro setterrain ptr:req
various BS_ATTACKER, VARIOUS_SET_TERRAIN
.4byte \ptr
.endm
.macro trymefirst ptr:req
various BS_ATTACKER, VARIOUS_TRY_ME_FIRST
.4byte \ptr
.endm
.macro jumpifbattleend ptr:req
various BS_ATTACKER, VARIOUS_JUMP_IF_BATTLE_END
.4byte \ptr
.endm
.macro tryelectrify ptr:req
various BS_ATTACKER, VARIOUS_TRY_ELECTRIFY
.4byte \ptr
.endm
.macro tryreflecttype ptr:req
various BS_ATTACKER, VARIOUS_TRY_REFLECT_TYPE
.4byte \ptr
.endm
.macro trysoak ptr:req
various BS_ATTACKER, VARIOUS_TRY_SOAK
.4byte \ptr
.endm
.macro handlemegaevo battler:req, case:req
various \battler, VARIOUS_HANDLE_MEGA_EVO
.byte \case
.endm
.macro handleformchange battler:req, case:req
various \battler, VARIOUS_HANDLE_FORM_CHANGE
.byte \case
.endm
.macro jumpifcantuselastresort battler:req, ptr:req
various \battler, VARIOUS_TRY_LAST_RESORT
.4byte \ptr
.endm
.macro argumentstatuseffect
various BS_ATTACKER, VARIOUS_ARGUMENT_STATUS_EFFECT
.endm
.macro tryhitswitchtarget ptr:req
various BS_ATTACKER, VARIOUS_TRY_HIT_SWITCH_TARGET
.4byte \ptr
.endm
.macro tryautonomize battler:req, ptr:req
various \battler, VARIOUS_TRY_AUTONOMIZE
.4byte \ptr
.endm
.macro jumpifcantusesynchronoise ptr:req
various BS_ATTACKER, VARIOUS_TRY_SYNCHRONOISE
.4byte \ptr
.endm
.macro trycopycat ptr:req
various BS_ATTACKER, VARIOUS_TRY_COPYCAT
.4byte \ptr
.endm
.macro showabilitypopup battler:req
various \battler, VARIOUS_ABILITY_POPUP
.endm
.macro defogclear battler:req, clear:req, ptr:req
various \battler, VARIOUS_DEFOG
.byte \clear
.4byte \ptr
.endm
.macro jumpiftargetally ptr:req
various BS_ATTACKER, VARIOUS_JUMP_IF_TARGET_ALLY
.4byte \ptr
.endm
.macro trypsychoshift ptr:req
various BS_ATTACKER, VARIOUS_PSYCHO_SHIFT
.4byte \ptr
.endm
.macro curestatus battler:req
various \battler, VARIOUS_CURE_STATUS
.endm
.macro powertrick battler:req
various \battler, VARIOUS_POWER_TRICK
.endm
.macro argumenttomoveeffect
various BS_ATTACKER, VARIOUS_ARGUMENT_TO_MOVE_EFFECT
.endm
.macro jumpifnotgrounded battler:req, ptr:req
various \battler, VARIOUS_JUMP_IF_NOT_GROUNDED
.4byte \ptr
.endm
.macro handletrainerslidemsg battler:req, field:req
various \battler, VARIOUS_HANDLE_TRAINER_SLIDE_MSG
.byte \field
.endm
.macro trytrainerslidefirstdownmsg battler:req
various \battler, VARIOUS_TRY_TRAINER_SLIDE_MSG_FIRST_OFF
.endm
.macro trytrainerslidelastonmsg battler:req
various \battler, VARIOUS_TRY_TRAINER_SLIDE_MSG_LAST_ON
.endm
.macro setauroraveil battler:req
various \battler, VARIOUS_SET_AURORA_VEIL
.endm
.macro trysetthirdtype battler:req, ptr:req
various \battler, VARIOUS_TRY_THIRD_TYPE
.4byte \ptr
.endm
.macro tryaccupressure battler:req, ptr:req
various \battler, VARIOUS_ACUPRESSURE
.4byte \ptr
.endm
.macro setpowder battler:req
various \battler, VARIOUS_SET_POWDER
.endm
.macro spectralthiefprintstats
various BS_ATTACKER, VARIOUS_SPECTRAL_THIEF
.endm
.macro bringdownairbornebattler battler:req
various \battler, VARIOUS_GRAVITY_ON_AIRBORNE_MONS
.endm
.macro checkgrassyterrainheal battler:req, ptr:req
various \battler, VARIOUS_CHECK_IF_GRASSY_TERRAIN_HEALS
.4byte \ptr
.endm
.macro jumpifnotberry battler:req, ptr:req
various \battler, VARIOUS_JUMP_IF_NOT_BERRY
.4byte \ptr
.endm
.macro jumpifroarfails ptr:req
various BS_ATTACKER, VARIOUS_JUMP_IF_ROAR_FAILS
.4byte \ptr
.endm
.macro tryinstruct ptr:req
various BS_ATTACKER, VARIOUS_TRY_INSTRUCT
.4byte \ptr
.endm
.macro settracedability battler:req
various \battler, VARIOUS_TRACE_ABILITY
.endm
.macro updatenick battler:req
various \battler, VARIOUS_UPDATE_NICK
.endm
.macro tryillusionoff battler:req
various \battler, VARIOUS_TRY_ILLUSION_OFF
.endm
.macro spriteignore0hp val:req
various BS_ATTACKER, VARIOUS_SET_SPRITEIGNORE0HP
.byte \val
.endm
@ helpful macros
.macro setstatchanger stat:req, stages:req, down:req
setbyte sSTATCHANGER \stat | \stages << 4 | \down << 7
setbyte sSTATCHANGER \stat | \stages << 3 | \down << 7
.endm
.macro setmoveeffect effect:req
setbyte cEFFECT_CHOOSER \effect
sethword sMOVE_EFFECT \effect
sethword sSAVED_MOVE_EFFECT \effect
.endm
.macro chosenstatus1animation battler:req, status:req
@ -1411,8 +1735,12 @@
.macro jumpifnotmove move:req, jumpptr:req
jumpifhalfword CMP_NOT_EQUAL, gCurrentMove, \move, \jumpptr
.endm
.macro jumpifstatus3 battler:req, status:req, jumpptr:req
.macro jumpifnotchosenmove move:req, jumpptr:req
jumpifhalfword CMP_NOT_EQUAL, gChosenMove, \move, \jumpptr
.endm
.macro jumpifstatus3 battler, status:req, jumpptr:req
jumpifstatus3condition \battler, \status, 0x0, \jumpptr
.endm
@ -1431,3 +1759,37 @@
.macro jumpifnotbattletype flags:req, jumpptr:req
jumpifword CMP_NO_COMMON_BITS, gBattleTypeFlags, \flags, \jumpptr
.endm
.macro dmg_1_8_targethp
manipulatedamage DMG_1_8_TARGET_HP
.endm
.macro dmgtomaxattackerhp
manipulatedamage DMG_FULL_ATTACKER_HP
.endm
.macro dmgtocurrattackerhp
manipulatedamage DMG_CURR_ATTACKER_HP
.endm
.macro jumpifflowerveil jumpptr:req
jumpifnottype BS_TARGET, TYPE_GRASS, 1f
jumpifability BS_TARGET_SIDE, ABILITY_FLOWER_VEIL, \jumpptr
1:
.endm
.macro setallytonexttarget jumpptr:req
jumpifbyte CMP_GREATER_THAN, gBattlerTarget, 0x1, 1f
addbyte gBattlerTarget, 0x2
goto \jumpptr
1:
subbyte gBattlerTarget, 0x2
goto \jumpptr
.endm
.macro jumpifleafguard jumpptr:req
jumpifhalfword CMP_NO_COMMON_BITS, gBattleWeather, WEATHER_SUN_ANY, 1f
jumpifability BS_TARGET, ABILITY_LEAF_GUARD, \jumpptr
1:
.endm

View File

@ -1,116 +0,0 @@
Param
(
[Parameter(Position = 0)]
[string]$Start,
[Parameter(Position = 1)]
[string]$Offset,
[Parameter()]
[string[]]$DiffTool
)
$ErrorActionPreference = "Stop"
$offset_default_value = "0x100"
$diff_tool_default_value = "diff"
$help = "
$($args[0]) [OPTIONS] Start [Offset]
Performs a diff on the assembly of a function in a rom. 'Start' is the start
location of the function, and 'Offset' is the number of bytes to disassemble.
The assembly is saved to *.dump files.
'Offset' is optional, and defaults to $offset_default_value. If this value is
very large (0x10000+), objdump may hang / freeze.
Requirements:
- A clean copy of the rom named 'baserom.gba'.
- $$ENV:DEVKITARM to point to the installation of devkitpro. By default, it is
installed to 'C:\devkitpro\devkitARM'.
Options:
-DiffTool <tool> The tool to use for diffing. Defaults to '$diff_tool_default_value'. For VSCode,
you can use -DiffTool 'code --diff'. (Quotes are necessary around 'code --diff')
"
if ((-not (Test-Path variable:Start)) -or [string]::IsNullOrWhiteSpace($Start))
{
Write-Host $help
exit
}
if (-not (Test-Path variable:DiffTool) -or [string]::IsNullOrWhiteSpace($DiffTool))
{
$DiffTool = $diff_tool_default_value
}
if (-not (Test-Path variable:Offset) -or [string]::IsNullOrWhiteSpace($Offset))
{
$Offset = $offset_default_value
}
if (-Not (Test-Path env:DEVKITARM))
{
Write-Host "ENV:DEVKITARM variable not set."
Write-Host $help
exit
}
if (-Not (Test-Path $env:DEVKITARM))
{
Write-Host "DEVKITARM path '$env:DEVKITARM' does not exist."
Write-Host $help
exit
}
if (-Not (Test-Path ".\pokeemerald.gba"))
{
Write-Host "File 'pokeemerald.gba' not found."
Write-Host $help
exit
}
if (-Not (Test-Path ".\baserom.gba"))
{
Write-Host "File 'baserom.gba' not found."
}
try
{
$start_num = [System.Convert]::ToUInt64($Start, 16)
}
catch
{
Write-Host "Error parsing '$start_num' as a hex number."
Write-Host $help
exit
}
try
{
$offset_num = [System.Convert]::ToUInt64($Offset, 16)
}
catch
{
Write-Host "Error parsing '$offset_num' as a hex number."
Write-Host $help
exit
}
if ($start_num -gt 0x1000000)
{
Write-Host "Warning: Start address is larger than the ROM file. Hint: ignore the leading number in the address."
}
$end_str = [System.Convert]::ToString($start_num + $offset_num, 16)
$end_str = "0x$end_str"
$start_str = "0x$Start"
Write-Host "$start_str - $end_str"
$objdump = Join-Path -Path $env:DEVKITARM -ChildPath "arm-none-eabi\bin\objdump.exe"
&$objdump -D -bbinary -marmv4t -Mforce-thumb --start-address="$start_str" --stop-address="$end_str" .\baserom.gba > .\baserom.dump
&$objdump -D -bbinary -marmv4t -Mforce-thumb --start-address="$start_str" --stop-address="$end_str" .\pokeemerald.gba > .\pokeemerald.dump
Invoke-Expression "$DiffTool .\baserom.dump .\pokeemerald.dump"

View File

@ -400,6 +400,13 @@ B_TRAINER2_WIN_TEXT = FD 31
B_PARTNER_CLASS = FD 32
B_PARTNER_NAME = FD 33
B_BUFF3 = FD 34
B_ATK_TRAINER_NAME = FD 35
B_ATK_TRAINER_CLASS = FD 36
B_ATK_TEAM1 = FD 37
B_ATK_TEAM2 = FD 38
B_DEF_NAME = FD 39
B_DEF_TEAM1 = FD 3A
B_DEF_TEAM2 = FD 3B
@ indicates the end of a town/city name (before " TOWN" or " CITY")
NAME_END = FC 00

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -2,6 +2,7 @@
#include "constants/battle_script_commands.h"
#include "constants/battle_anim.h"
#include "constants/battle_string_ids.h"
#include "constants/battle_config.h"
#include "constants/items.h"
#include "constants/songs.h"
#include "constants/game_stat.h"
@ -62,10 +63,16 @@ BattleScript_SafariBallThrow::
handleballthrow
BattleScript_SuccessBallThrow::
setbyte sMON_CAUGHT, TRUE
jumpifhalfword CMP_EQUAL, gLastUsedItem, ITEM_SAFARI_BALL, BattleScript_PrintCaughtMonInfo
incrementgamestat GAME_STAT_POKEMON_CAPTURES
BattleScript_PrintCaughtMonInfo::
printstring STRINGID_GOTCHAPKMNCAUGHT
jumpifbyte CMP_NOT_EQUAL, sEXP_CATCH, TRUE, BattleScript_TryPrintCaughtMonInfo
setbyte sGIVEEXP_STATE, 0x0
getexp BS_TARGET
sethword gBattle_BG2_X, 0x0
BattleScript_TryPrintCaughtMonInfo:
trysetcaughtmondexflags BattleScript_TryNicknameCaughtMon
printstring STRINGID_PKMNDATAADDEDTODEX
waitstate
@ -121,6 +128,7 @@ BattleScript_OpponentUsesHealItem::
playse SE_KAIFUKU
printstring STRINGID_TRAINER1USEDITEM
waitmessage 0x40
bichalfword gMoveResultFlags, MOVE_RESULT_NO_EFFECT
useitemonopponent
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE
healthbarupdate BS_ATTACKER
@ -205,3 +213,17 @@ BattleScript_ActionWallyThrow:
printstring STRINGID_YOUTHROWABALLNOWRIGHT
waitmessage 0x40
end2
BattleScript_TrainerSlideMsgRet::
handletrainerslidemsg BS_SCRIPTING, 0
trainerslidein 1
handletrainerslidemsg BS_SCRIPTING, 1
waitstate
trainerslideout 1
handletrainerslidemsg BS_SCRIPTING, 2
waitstate
return
BattleScript_TrainerSlideMsgEnd2::
call BattleScript_TrainerSlideMsgRet
end2

View File

@ -0,0 +1,19 @@
JASC-PAL
0100
16
0 0 0
255 214 0
255 197 0
255 173 0
255 165 0
148 90 222
255 107 0
255 132 0
255 148 0
255 156 41
0 0 0
0 90 0
0 0 0
0 0 0
0 0 0
0 0 0

View File

@ -0,0 +1,19 @@
JASC-PAL
0100
16
0 0 0
255 214 0
255 197 0
255 173 0
255 165 0
148 90 222
255 107 0
255 132 0
255 148 0
255 156 41
0 0 0
0 90 0
0 0 0
0 0 0
0 0 0
0 0 0

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 358 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 432 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 930 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 357 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 236 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 510 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 487 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 912 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 905 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 922 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 282 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 183 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 926 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 256 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 317 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 271 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 365 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 365 B

View File

@ -0,0 +1,19 @@
JASC-PAL
0100
16
185 207 163
77 105 97
199 159 199
221 177 207
57 151 117
139 221 253
247 161 133
255 255 255
153 87 67
233 233 125
129 255 223
149 147 247
195 207 201
123 151 135
0 0 0
0 0 0

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

0
graphics/items/icon_palettes/acro_bike.pal Normal file → Executable file
View File

0
graphics/items/icon_palettes/aguav_berry.pal Normal file → Executable file
View File

0
graphics/items/icon_palettes/amulet_coin.pal Normal file → Executable file
View File

0
graphics/items/icon_palettes/antidote.pal Normal file → Executable file
View File

0
graphics/items/icon_palettes/apicot_berry.pal Normal file → Executable file
View File

0
graphics/items/icon_palettes/aspear_berry.pal Normal file → Executable file
View File

0
graphics/items/icon_palettes/aurora_ticket.pal Normal file → Executable file
View File

0
graphics/items/icon_palettes/awakening.pal Normal file → Executable file
View File

0
graphics/items/icon_palettes/bead_mail.pal Normal file → Executable file
View File

0
graphics/items/icon_palettes/belue_berry.pal Normal file → Executable file
View File

0
graphics/items/icon_palettes/berry_juice.pal Normal file → Executable file
View File

0
graphics/items/icon_palettes/berry_pouch.pal Normal file → Executable file
View File

0
graphics/items/icon_palettes/bicycle.pal Normal file → Executable file
View File

0
graphics/items/icon_palettes/bike_voucher.pal Normal file → Executable file
View File

0
graphics/items/icon_palettes/black_flute.pal Normal file → Executable file
View File

View File

0
graphics/items/icon_palettes/blue_flute.pal Normal file → Executable file
View File

0
graphics/items/icon_palettes/blue_orb.pal Normal file → Executable file
View File

0
graphics/items/icon_palettes/blue_scarf.pal Normal file → Executable file
View File

0
graphics/items/icon_palettes/blue_shard.pal Normal file → Executable file
View File

0
graphics/items/icon_palettes/bluk_berry.pal Normal file → Executable file
View File

0
graphics/items/icon_palettes/bright_powder.pal Normal file → Executable file
View File

0
graphics/items/icon_palettes/burn_heal.pal Normal file → Executable file
View File

0
graphics/items/icon_palettes/calcium.pal Normal file → Executable file
View File

0
graphics/items/icon_palettes/carbos.pal Normal file → Executable file
View File

0
graphics/items/icon_palettes/card_key.pal Normal file → Executable file
View File

0
graphics/items/icon_palettes/charcoal.pal Normal file → Executable file
View File

0
graphics/items/icon_palettes/cheri_berry.pal Normal file → Executable file
View File

0
graphics/items/icon_palettes/chesto_berry.pal Normal file → Executable file
View File

0
graphics/items/icon_palettes/choice_band.pal Normal file → Executable file
View File

0
graphics/items/icon_palettes/cleanse_tag.pal Normal file → Executable file
View File

0
graphics/items/icon_palettes/coin_case.pal Normal file → Executable file
View File

0
graphics/items/icon_palettes/contest_pass.pal Normal file → Executable file
View File

0
graphics/items/icon_palettes/cornn_berry.pal Normal file → Executable file
View File

0
graphics/items/icon_palettes/dark_tm_hm.pal Normal file → Executable file
View File

0
graphics/items/icon_palettes/deep_sea_scale.pal Normal file → Executable file
View File

0
graphics/items/icon_palettes/deep_sea_tooth.pal Normal file → Executable file
View File

0
graphics/items/icon_palettes/devon_goods.pal Normal file → Executable file
View File

0
graphics/items/icon_palettes/devon_scope.pal Normal file → Executable file
View File

0
graphics/items/icon_palettes/dire_hit.pal Normal file → Executable file
View File

0
graphics/items/icon_palettes/dive_ball.pal Normal file → Executable file
View File

0
graphics/items/icon_palettes/dragon_fang.pal Normal file → Executable file
View File

0
graphics/items/icon_palettes/dragon_scale.pal Normal file → Executable file
View File

0
graphics/items/icon_palettes/dragon_tm_hm.pal Normal file → Executable file
View File

0
graphics/items/icon_palettes/dream_mail.pal Normal file → Executable file
View File

0
graphics/items/icon_palettes/durin_berry.pal Normal file → Executable file
View File

0
graphics/items/icon_palettes/electric_tm_hm.pal Normal file → Executable file
View File

0
graphics/items/icon_palettes/elixir.pal Normal file → Executable file
View File

0
graphics/items/icon_palettes/energy_powder.pal Normal file → Executable file
View File

0
graphics/items/icon_palettes/energy_root.pal Normal file → Executable file
View File

0
graphics/items/icon_palettes/enigma_berry.pal Normal file → Executable file
View File

0
graphics/items/icon_palettes/eon_ticket.pal Normal file → Executable file
View File

0
graphics/items/icon_palettes/escape_rope.pal Normal file → Executable file
View File

0
graphics/items/icon_palettes/ether.pal Normal file → Executable file
View File

0
graphics/items/icon_palettes/everstone.pal Normal file → Executable file
View File

0
graphics/items/icon_palettes/exp_share.pal Normal file → Executable file
View File

0
graphics/items/icon_palettes/fab_mail.pal Normal file → Executable file
View File

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