Merge branch 'RHH/upcoming' into RHH/pr/cleanup/unown
# Conflicts: # src/data/pokemon/species_info.h # src/data/pokemon_graphics/front_pic_anims.h
20
.github/calcrom/calcrom.pl
vendored
@ -1,5 +1,11 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
# Usage:
|
||||
# calcrom.pl <mapfile> [--data]
|
||||
#
|
||||
# mapfile: path to .map file output by LD
|
||||
# data: set to output % breakdown of data
|
||||
|
||||
use IPC::Cmd qw[ run ];
|
||||
use Getopt::Long;
|
||||
|
||||
@ -65,12 +71,13 @@ my $base_cmd = "nm $elffname | awk '{print \$3}' | grep '^[^_].\\{4\\}' | uniq";
|
||||
|
||||
# This looks for Unknown_, Unknown_, or sub_, followed by an address. Note that
|
||||
# it matches even if stuff precedes the unknown, like sUnknown/gUnknown.
|
||||
my $undoc_cmd = "grep '[Uu]nknown_[0-9a-fA-F]\\{5,7\\}\\|sub_[0-9a-fA-F]\\{5,7\\}'";
|
||||
my $undoc_regex = "'[Uu]nknown_[0-9a-fA-F]\\{5,7\\}\\|sub_[0-9a-fA-F]\\{5,7\\}'";
|
||||
|
||||
# This looks for every symbol with an address at the end of it. Some things are
|
||||
# given a name based on their type / location, but still have an unknown purpose.
|
||||
# For example, FooMap_EventScript_FFFFFFF.
|
||||
my $partial_doc_cmd = "grep '_[0-28][0-9a-fA-F]\\{5,7\\}'";
|
||||
# The above may be double counted here, and will need to be filtered out.
|
||||
my $partial_doc_regex = "'_[0-28][0-9a-fA-F]\\{5,7\\}'";
|
||||
|
||||
my $count_cmd = "wc -l";
|
||||
|
||||
@ -87,7 +94,7 @@ my $total_syms_as_string;
|
||||
|
||||
my $undocumented_as_string;
|
||||
(run (
|
||||
command => "$base_cmd | $undoc_cmd | $count_cmd",
|
||||
command => "$base_cmd | grep $undoc_regex | $count_cmd",
|
||||
buffer => \$undocumented_as_string,
|
||||
timeout => 60
|
||||
))
|
||||
@ -95,7 +102,7 @@ my $undocumented_as_string;
|
||||
|
||||
my $partial_documented_as_string;
|
||||
(run (
|
||||
command => "$base_cmd | $partial_doc_cmd | $count_cmd",
|
||||
command => "$base_cmd | grep $partial_doc_regex | grep -v $undoc_regex | $count_cmd",
|
||||
buffer => \$partial_documented_as_string,
|
||||
timeout => 60
|
||||
))
|
||||
@ -112,7 +119,7 @@ my $undocumented = $undocumented_as_string + 0;
|
||||
$partial_documented_as_string =~ s/^\s+|\s+$//g;
|
||||
my $partial_documented = $partial_documented_as_string + 0;
|
||||
(($partial_documented != 0) or (($partial_documented == 0) and ($partial_documented_as_string eq "0")))
|
||||
or die "ERROR: Cannot convert string to num: '$partial_documented_as_string'";
|
||||
or die "ERROR: Cannot convert string to num: '$partial_documented_as_string'";
|
||||
|
||||
$total_syms_as_string =~ s/^\s+|\s+$//g;
|
||||
my $total_syms = $total_syms_as_string + 0;
|
||||
@ -126,9 +133,6 @@ my $total = $src + $asm;
|
||||
my $srcPct = sprintf("%.4f", 100 * $src / $total);
|
||||
my $asmPct = sprintf("%.4f", 100 * $asm / $total);
|
||||
|
||||
# partial_documented is double-counting the unknown_* and sub_* symbols.
|
||||
$partial_documented = $partial_documented - $undocumented;
|
||||
|
||||
my $documented = $total_syms - ($undocumented + $partial_documented);
|
||||
my $docPct = sprintf("%.4f", 100 * $documented / $total_syms);
|
||||
my $partialPct = sprintf("%.4f", 100 * $partial_documented / $total_syms);
|
||||
|
@ -358,7 +358,7 @@ If this works, then proceed to [Installation](#installation). Otherwise, ask for
|
||||
1. If pokeemerald is not already downloaded (some users may prefer to download pokeemerald via a git client like GitHub Desktop), run:
|
||||
|
||||
```bash
|
||||
git clone https://github.com/pret/pokeemerald
|
||||
git clone https://github.com/rh-hideout/pokeemerald-expansion
|
||||
```
|
||||
|
||||
<details>
|
||||
|
@ -1022,7 +1022,7 @@
|
||||
.4byte \ptr
|
||||
.endm
|
||||
|
||||
.macro trydobeatup endPtr:req, failPtr:req
|
||||
.macro trydobeatup endPtr=NULL, failPtr=NULL
|
||||
.byte 0xc4
|
||||
.4byte \endPtr
|
||||
.4byte \failPtr
|
||||
@ -1162,7 +1162,7 @@
|
||||
.4byte \ptr
|
||||
.endm
|
||||
|
||||
.macro trygetintimidatetarget ptr:req
|
||||
.macro unused2 ptr:req
|
||||
.byte 0xe1
|
||||
.4byte \ptr
|
||||
.endm
|
||||
@ -1299,9 +1299,15 @@
|
||||
.byte 0xfe
|
||||
.4byte \ptr
|
||||
.endm
|
||||
|
||||
.macro metalburstdamagecalculator ptr:req
|
||||
|
||||
.macro callnative func:req
|
||||
.byte 0xff
|
||||
.4byte \func
|
||||
.endm
|
||||
|
||||
@ callnative macros
|
||||
.macro metalburstdamagecalculator ptr:req
|
||||
callnative BS_CalcMetalBurstDmg
|
||||
.4byte \ptr
|
||||
.endm
|
||||
|
||||
@ -1326,8 +1332,8 @@
|
||||
various \battler, VARIOUS_GET_BATTLER_FAINTED
|
||||
.endm
|
||||
|
||||
.macro resetintimidatetracebits battler:req
|
||||
various \battler, VARIOUS_RESET_INTIMIDATE_TRACE_BITS
|
||||
.macro resetswitchinabilitybits battler:req
|
||||
various \battler, VARIOUS_RESET_SWITCH_IN_ABILITY_BITS
|
||||
.endm
|
||||
|
||||
.macro updatechoicemoveonlvlup battler:req
|
||||
@ -1935,6 +1941,31 @@
|
||||
.macro shellsidearmcheck
|
||||
various BS_ATTACKER, VARIOUS_SHELL_SIDE_ARM_CHECK
|
||||
.endm
|
||||
|
||||
.macro jumpifrodaffected battler:req, ptr:req
|
||||
various \battler, VARIOUS_JUMP_IF_ROD
|
||||
.4byte \ptr
|
||||
.endm
|
||||
|
||||
.macro jumpifabsorbaffected battler:req, ptr:req
|
||||
various \battler, VARIOUS_JUMP_IF_ABSORB
|
||||
.4byte \ptr
|
||||
.endm
|
||||
|
||||
.macro jumpifmotoraffected battler:req, ptr:req
|
||||
various \battler, VARIOUS_JUMP_IF_MOTOR
|
||||
.4byte \ptr
|
||||
.endm
|
||||
|
||||
.macro jumpifteanoberry ptr:req
|
||||
various BS_ATTACKER, VARIOUS_TEATIME_TARGETS
|
||||
.4byte \ptr
|
||||
.endm
|
||||
|
||||
.macro jumpifteainvulnerable battler:req, ptr:req
|
||||
various \battler, VARIOUS_TEATIME_INVUL
|
||||
.4byte \ptr
|
||||
.endm
|
||||
|
||||
.macro jumpifcantfling battler:req, ptr:req
|
||||
various \battler, VARIOUS_JUMP_IF_CANT_FLING
|
||||
@ -1994,6 +2025,24 @@
|
||||
.4byte \ptr
|
||||
.endm
|
||||
|
||||
.macro swapstats stat:req
|
||||
various BS_ATTACKER, VARIOUS_SWAP_STATS
|
||||
.byte \stat
|
||||
.endm
|
||||
|
||||
.macro trywindriderpower battler:req, ptr:req
|
||||
various \battler, VARIOUS_TRY_WIND_RIDER_POWER
|
||||
.4byte \ptr
|
||||
.endm
|
||||
|
||||
.macro activateweatherchangeabilities battler:req
|
||||
various \battler, VARIOUS_ACTIVATE_WEATHER_CHANGE_ABILITIES
|
||||
.endm
|
||||
|
||||
.macro activateterrainchangeabilities battler:req
|
||||
various \battler, VARIOUS_ACTIVATE_TERRAIN_CHANGE_ABILITIES
|
||||
.endm
|
||||
|
||||
@ helpful macros
|
||||
.macro setstatchanger stat:req, stages:req, down:req
|
||||
setbyte sSTATCHANGER, \stat | \stages << 3 | \down << 7
|
||||
@ -2151,3 +2200,34 @@
|
||||
.macro trysymbiosis
|
||||
various BS_ATTACKER, VARIOUS_TRY_SYMBIOSIS
|
||||
.endm
|
||||
|
||||
@ Tries to increase or decrease a battler's stat's stat stage by a specified amount. If impossible, jumps to \script.
|
||||
.macro modifybattlerstatstage battler:req, stat:req, mode:req, amount:req, script:req, animation:req, customString
|
||||
|
||||
@ \mode parameters
|
||||
INCREASE = FALSE
|
||||
DECREASE = TRUE
|
||||
|
||||
@ \animation parameters
|
||||
ANIM_OFF = FALSE
|
||||
ANIM_ON = TRUE
|
||||
|
||||
setstatchanger \stat, \amount, \mode
|
||||
statbuffchange STAT_CHANGE_ALLOW_PTR, \script
|
||||
setgraphicalstatchangevalues
|
||||
.if \animation == TRUE
|
||||
playanimation \battler, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
|
||||
.endif
|
||||
.ifnb \customString
|
||||
printstring \customString
|
||||
.else
|
||||
.if \mode == DECREASE
|
||||
printfromtable gStatDownStringIds
|
||||
.else
|
||||
.if \mode == INCREASE
|
||||
printfromtable gStatUpStringIds
|
||||
.endif
|
||||
.endif
|
||||
.endif
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
.endm
|
||||
|
@ -426,13 +426,13 @@ SHADOW = FC 03 @ same as fc 01
|
||||
COLOR_HIGHLIGHT_SHADOW = FC 04 @ takes 3 bytes
|
||||
PALETTE = FC 05 @ used in credits
|
||||
FONT = FC 06 @ Given a font id, or use font constants below instead
|
||||
RESET_SIZE = FC 07
|
||||
RESET_FONT = FC 07
|
||||
PAUSE = FC 08 @ manually print the wait byte after this, havent mapped them
|
||||
PAUSE_UNTIL_PRESS = FC 09
|
||||
WAIT_SE = FC 0A
|
||||
PLAY_BGM = FC 0B
|
||||
ESCAPE = FC 0C
|
||||
SHIFT_TEXT = FC 0D
|
||||
SHIFT_RIGHT = FC 0D
|
||||
SHIFT_DOWN = FC 0E
|
||||
FILL_WINDOW = FC 0F
|
||||
PLAY_SE = FC 10
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "config.h"
|
||||
#include "config/battle.h"
|
||||
#include "constants/battle.h"
|
||||
#include "constants/battle_anim.h"
|
||||
#include "constants/rgb.h"
|
||||
@ -7,7 +8,6 @@
|
||||
#include "constants/moves.h"
|
||||
#include "constants/pokemon.h"
|
||||
#include "constants/items.h"
|
||||
#include "constants/battle_config.h"
|
||||
.include "asm/macros.inc"
|
||||
.include "asm/macros/battle_anim_script.inc"
|
||||
.include "constants/constants.inc"
|
||||
@ -805,6 +805,55 @@ gBattleAnims_Moves::
|
||||
.4byte Move_SANDSEAR_STORM
|
||||
.4byte Move_LUNAR_BLESSING
|
||||
.4byte Move_TAKE_HEART
|
||||
@@@@@@@@@@@@ GEN 9 @@@@@@@@@@@@
|
||||
.4byte Move_TERA_BLAST
|
||||
.4byte Move_SILK_TRAP
|
||||
.4byte Move_AXE_KICK
|
||||
.4byte Move_LAST_RESPECTS
|
||||
.4byte Move_LUMINA_CRASH
|
||||
.4byte Move_ORDER_UP
|
||||
.4byte Move_JET_PUNCH
|
||||
.4byte Move_SPICY_EXTRACT
|
||||
.4byte Move_SPIN_OUT
|
||||
.4byte Move_POPULATION_BOMB
|
||||
.4byte Move_ICE_SPINNER
|
||||
.4byte Move_GLAIVE_RUSH
|
||||
.4byte Move_REVIVAL_BLESSING
|
||||
.4byte Move_SALT_CURE
|
||||
.4byte Move_TRIPLE_DIVE
|
||||
.4byte Move_MORTAL_SPIN
|
||||
.4byte Move_DOODLE
|
||||
.4byte Move_FILLET_AWAY
|
||||
.4byte Move_KOWTOW_CLEAVE
|
||||
.4byte Move_FLOWER_TRICK
|
||||
.4byte Move_TORCH_SONG
|
||||
.4byte Move_AQUA_STEP
|
||||
.4byte Move_RAGING_BULL
|
||||
.4byte Move_MAKE_IT_RAIN
|
||||
.4byte Move_RUINATION
|
||||
.4byte Move_COLLISION_COURSE
|
||||
.4byte Move_ELECTRO_DRIFT
|
||||
.4byte Move_SHED_TAIL
|
||||
.4byte Move_CHILLY_RECEPTION
|
||||
.4byte Move_TIDY_UP
|
||||
.4byte Move_SNOWSCAPE
|
||||
.4byte Move_POUNCE
|
||||
.4byte Move_TRAILBLAZE
|
||||
.4byte Move_CHILLING_WATER
|
||||
.4byte Move_HYPER_DRILL
|
||||
.4byte Move_TWIN_BEAM
|
||||
.4byte Move_RAGE_FIST
|
||||
.4byte Move_ARMOR_CANNON
|
||||
.4byte Move_BITTER_BLADE
|
||||
.4byte Move_DOUBLE_SHOCK
|
||||
.4byte Move_GIGATON_HAMMER
|
||||
.4byte Move_COMEUPPANCE
|
||||
.4byte Move_AQUA_CUTTER
|
||||
.4byte Move_BLAZING_TORQUE
|
||||
.4byte Move_WICKED_TORQUE
|
||||
.4byte Move_NOXIOUS_TORQUE
|
||||
.4byte Move_COMBAT_TORQUE
|
||||
.4byte Move_MAGICAL_TORQUE
|
||||
@@@@ Z MOVES
|
||||
.4byte Move_BREAKNECK_BLITZ
|
||||
.4byte Move_ALL_OUT_PUMMELING
|
||||
@ -13429,7 +13478,18 @@ Move_DRAGON_DARTS::
|
||||
end
|
||||
|
||||
Move_TEATIME::
|
||||
goto Move_MILK_DRINK
|
||||
loadspritegfx ANIM_TAG_TEAPOT
|
||||
loadspritegfx ANIM_TAG_THOUGHT_BUBBLE
|
||||
createsprite gThoughtBubbleSpriteTemplate, ANIM_ATTACKER, 11, 0, 100
|
||||
playsewithpan SE_M_ICY_WIND, SOUND_PAN_ATTACKER
|
||||
delay 6
|
||||
createsprite gTeapotSpriteTemplate, ANIM_ATTACKER, 12, 0
|
||||
createvisualtask AnimTask_RockMonBackAndForth, 5, ANIM_ATTACKER, 2, 0
|
||||
createvisualtask AnimTask_RockMonBackAndForth, 5, ANIM_ATK_PARTNER, 2, 0
|
||||
delay 24
|
||||
loopsewithpan SE_M_HEAL_BELL, SOUND_PAN_ATTACKER, 22, 3
|
||||
waitforvisualfinish
|
||||
end
|
||||
|
||||
Move_OCTOLOCK::
|
||||
loadspritegfx ANIM_TAG_TENDRILS
|
||||
@ -14345,6 +14405,54 @@ Move_WILDBOLT_STORM::
|
||||
Move_SANDSEAR_STORM::
|
||||
Move_LUNAR_BLESSING::
|
||||
Move_TAKE_HEART::
|
||||
Move_TERA_BLAST::
|
||||
Move_SILK_TRAP::
|
||||
Move_AXE_KICK::
|
||||
Move_LAST_RESPECTS::
|
||||
Move_LUMINA_CRASH::
|
||||
Move_ORDER_UP::
|
||||
Move_JET_PUNCH::
|
||||
Move_SPICY_EXTRACT::
|
||||
Move_SPIN_OUT::
|
||||
Move_POPULATION_BOMB::
|
||||
Move_ICE_SPINNER::
|
||||
Move_GLAIVE_RUSH::
|
||||
Move_REVIVAL_BLESSING::
|
||||
Move_SALT_CURE::
|
||||
Move_TRIPLE_DIVE::
|
||||
Move_MORTAL_SPIN::
|
||||
Move_DOODLE::
|
||||
Move_FILLET_AWAY::
|
||||
Move_KOWTOW_CLEAVE::
|
||||
Move_FLOWER_TRICK::
|
||||
Move_TORCH_SONG::
|
||||
Move_AQUA_STEP::
|
||||
Move_RAGING_BULL::
|
||||
Move_MAKE_IT_RAIN::
|
||||
Move_RUINATION::
|
||||
Move_COLLISION_COURSE::
|
||||
Move_ELECTRO_DRIFT::
|
||||
Move_SHED_TAIL::
|
||||
Move_CHILLY_RECEPTION::
|
||||
Move_TIDY_UP::
|
||||
Move_SNOWSCAPE::
|
||||
Move_POUNCE::
|
||||
Move_TRAILBLAZE::
|
||||
Move_CHILLING_WATER::
|
||||
Move_HYPER_DRILL::
|
||||
Move_TWIN_BEAM::
|
||||
Move_RAGE_FIST::
|
||||
Move_ARMOR_CANNON::
|
||||
Move_BITTER_BLADE::
|
||||
Move_DOUBLE_SHOCK::
|
||||
Move_GIGATON_HAMMER::
|
||||
Move_COMEUPPANCE::
|
||||
Move_AQUA_CUTTER::
|
||||
Move_BLAZING_TORQUE::
|
||||
Move_WICKED_TORQUE::
|
||||
Move_NOXIOUS_TORQUE::
|
||||
Move_COMBAT_TORQUE::
|
||||
Move_MAGICAL_TORQUE::
|
||||
end @to do
|
||||
|
||||
@@@@@@@@@@@@@@@@@@@@@@@ GEN 1-3 @@@@@@@@@@@@@@@@@@@@@@@
|
||||
@ -24841,7 +24949,7 @@ General_StrongWinds::
|
||||
General_PrimalReversion::
|
||||
launchtask AnimTask_PrimalReversion 0x5 0x0
|
||||
jumpargeq 0x0, ITEM_RED_ORB, General_PrimalReversion_Omega
|
||||
jumpargeq 0x1, ITEM_BLUE_ORB, General_PrimalReversion_Alpha
|
||||
jumpargeq 0x0, ITEM_BLUE_ORB, General_PrimalReversion_Alpha
|
||||
General_PrimalReversion_Alpha:
|
||||
loadspritegfx ANIM_TAG_ALPHA_STONE
|
||||
loadspritegfx ANIM_TAG_MEGA_PARTICLES
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "config.h"
|
||||
#include "config/battle.h"
|
||||
#include "constants/global.h"
|
||||
#include "constants/battle.h"
|
||||
#include "constants/pokemon.h"
|
||||
@ -12,7 +13,6 @@
|
||||
#include "constants/songs.h"
|
||||
#include "constants/game_stat.h"
|
||||
#include "constants/trainers.h"
|
||||
#include "constants/battle_config.h"
|
||||
#include "constants/species.h"
|
||||
.include "asm/macros.inc"
|
||||
.include "asm/macros/battle_script.inc"
|
||||
@ -410,8 +410,80 @@ gBattleScriptsForMoveEffects::
|
||||
.4byte BattleScript_EffectCourtChange @ EFFECT_COURT_CHANGE
|
||||
.4byte BattleScript_EffectSteelBeam @ EFFECT_STEEL_BEAM
|
||||
.4byte BattleScript_EffectExtremeEvoboost @ EFFECT_EXTREME_EVOBOOST
|
||||
.4byte BattleScript_EffectTerrainHit @ EFFECT_DAMAGE_SET_TERRAIN
|
||||
.4byte BattleScript_EffectHitSetRemoveTerrain @ EFFECT_HIT_SET_REMOVE_TERRAIN
|
||||
.4byte BattleScript_EffectDarkVoid @ EFFECT_DARK_VOID
|
||||
.4byte BattleScript_EffectSleepHit @ EFFECT_SLEEP_HIT
|
||||
.4byte BattleScript_EffectDoubleShock @ EFFECT_DOUBLE_SHOCK
|
||||
.4byte BattleScript_EffectSpecialAttackUpHit @ EFFECT_SPECIAL_ATTACK_UP_HIT
|
||||
.4byte BattleScript_EffectVictoryDance @ EFFECT_VICTORY_DANCE
|
||||
.4byte BattleScript_EffectTeatime @ EFFECT_TEATIME
|
||||
|
||||
BattleScript_EffectTeatime::
|
||||
attackcanceler
|
||||
attackstring
|
||||
ppreduce
|
||||
jumpifteanoberry BattleScript_ButItFailed
|
||||
@ at least one battler is affected
|
||||
attackanimation
|
||||
waitanimation
|
||||
BattleScript_TeatimeLoop:
|
||||
jumpifteainvulnerable BS_TARGET, BattleScript_Teatimevul
|
||||
jumpifrodaffected BS_TARGET, BattleScript_Teatimerod
|
||||
jumpifabsorbaffected BS_TARGET, BattleScript_Teatimesorb
|
||||
jumpifmotoraffected BS_TARGET, BattleScript_Teatimemotor
|
||||
orword gHitMarker, HITMARKER_NO_ANIMATIONS | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_IGNORE_DISGUISE
|
||||
setbyte sBERRY_OVERRIDE, TRUE @ override the requirements for eating berries
|
||||
consumeberry BS_TARGET, TRUE @ consume the berry, then restore the item from changedItems
|
||||
bicword gHitMarker, HITMARKER_NO_ANIMATIONS | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_IGNORE_DISGUISE
|
||||
setbyte sBERRY_OVERRIDE, FALSE
|
||||
removeitem BS_TARGET
|
||||
moveendto MOVEEND_NEXT_TARGET
|
||||
jumpifnexttargetvalid BattleScript_TeatimeLoop
|
||||
moveendcase MOVEEND_CLEAR_BITS
|
||||
goto BattleScript_MoveEnd
|
||||
BattleScript_Teatimevul:
|
||||
moveendto MOVEEND_NEXT_TARGET
|
||||
jumpifnexttargetvalid BattleScript_TeatimeLoop
|
||||
moveendcase MOVEEND_CLEAR_BITS
|
||||
goto BattleScript_MoveEnd
|
||||
BattleScript_Teatimesorb:
|
||||
copybyte gBattlerAbility, gBattlerTarget
|
||||
call BattleScript_AbilityPopUp
|
||||
moveendto MOVEEND_NEXT_TARGET
|
||||
jumpifnexttargetvalid BattleScript_TeatimeLoop
|
||||
moveendcase MOVEEND_CLEAR_BITS
|
||||
goto BattleScript_MoveEnd
|
||||
BattleScript_Teatimerod:
|
||||
copybyte gBattlerAbility, gBattlerTarget
|
||||
call BattleScript_AbilityPopUp
|
||||
playstatchangeanimation BS_TARGET, BIT_SPATK, STAT_CHANGE_BY_TWO
|
||||
setstatchanger STAT_SPATK, 1, FALSE
|
||||
statbuffchange STAT_CHANGE_ALLOW_PTR, BattleScript_TeatimeBuffer
|
||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_TeatimeBuffer
|
||||
printfromtable gStatUpStringIds
|
||||
waitmessage 0x40
|
||||
moveendto MOVEEND_NEXT_TARGET
|
||||
jumpifnexttargetvalid BattleScript_TeatimeLoop
|
||||
moveendcase MOVEEND_CLEAR_BITS
|
||||
goto BattleScript_MoveEnd
|
||||
BattleScript_Teatimemotor:
|
||||
copybyte gBattlerAbility, gBattlerTarget
|
||||
call BattleScript_AbilityPopUp
|
||||
playstatchangeanimation BS_TARGET, BIT_SPEED, STAT_CHANGE_BY_TWO
|
||||
setstatchanger STAT_SPEED, 1, FALSE
|
||||
statbuffchange STAT_CHANGE_ALLOW_PTR, BattleScript_TeatimeBuffer
|
||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_TeatimeBuffer
|
||||
printfromtable gStatUpStringIds
|
||||
waitmessage 0x40
|
||||
moveendto MOVEEND_NEXT_TARGET
|
||||
jumpifnexttargetvalid BattleScript_TeatimeLoop
|
||||
moveendcase MOVEEND_CLEAR_BITS
|
||||
goto BattleScript_MoveEnd
|
||||
BattleScript_TeatimeBuffer:
|
||||
moveendto MOVEEND_NEXT_TARGET
|
||||
jumpifnexttargetvalid BattleScript_TeatimeLoop
|
||||
moveendcase MOVEEND_CLEAR_BITS
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
BattleScript_AffectionBasedEndurance::
|
||||
playanimation BS_TARGET, B_ANIM_AFFECTION_HANGED_ON
|
||||
@ -1280,6 +1352,23 @@ BattleScript_BurnUpRemoveType::
|
||||
printstring STRINGID_ATTACKERLOSTFIRETYPE
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
return
|
||||
|
||||
BattleScript_EffectDoubleShock:
|
||||
attackcanceler
|
||||
attackstring
|
||||
ppreduce
|
||||
jumpiftype BS_ATTACKER, TYPE_ELECTRIC, BattleScript_DoubleShockWorks
|
||||
goto BattleScript_ButItFailed
|
||||
|
||||
BattleScript_DoubleShockWorks:
|
||||
setmoveeffect MOVE_EFFECT_DOUBLE_SHOCK | MOVE_EFFECT_CERTAIN
|
||||
goto BattleScript_EffectHit
|
||||
|
||||
BattleScript_DoubleShockRemoveType::
|
||||
losetype BS_ATTACKER, TYPE_ELECTRIC
|
||||
printstring STRINGID_ATTACKERLOSTELECTRICTYPE
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
return
|
||||
|
||||
BattleScript_EffectPurify:
|
||||
attackcanceler
|
||||
@ -2326,6 +2415,38 @@ BattleScript_QuiverDanceTrySpeed::
|
||||
BattleScript_QuiverDanceEnd::
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
BattleScript_EffectVictoryDance:
|
||||
attackcanceler
|
||||
attackstring
|
||||
ppreduce
|
||||
jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_ATK, MAX_STAT_STAGE, BattleScript_VictoryDanceDoMoveAnim
|
||||
jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_DEF, MAX_STAT_STAGE, BattleScript_VictoryDanceDoMoveAnim
|
||||
jumpifstat BS_ATTACKER, CMP_EQUAL, STAT_SPEED, MAX_STAT_STAGE, BattleScript_CantRaiseMultipleStats
|
||||
BattleScript_VictoryDanceDoMoveAnim::
|
||||
attackanimation
|
||||
waitanimation
|
||||
setbyte sSTAT_ANIM_PLAYED, FALSE
|
||||
playstatchangeanimation BS_ATTACKER, BIT_ATK | BIT_DEF | BIT_SPEED, 0
|
||||
setstatchanger STAT_ATK, 1, FALSE
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_VictoryDanceTryDef
|
||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_VictoryDanceTryDef
|
||||
printfromtable gStatUpStringIds
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
BattleScript_VictoryDanceTryDef::
|
||||
setstatchanger STAT_DEF, 1, FALSE
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_VictoryDanceTrySpeed
|
||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_VictoryDanceTrySpeed
|
||||
printfromtable gStatUpStringIds
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
BattleScript_VictoryDanceTrySpeed::
|
||||
setstatchanger STAT_SPEED, 1, FALSE
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_VictoryDanceEnd
|
||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_VictoryDanceEnd
|
||||
printfromtable gStatUpStringIds
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
BattleScript_VictoryDanceEnd::
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
BattleScript_EffectSpeedUpHit:
|
||||
setmoveeffect MOVE_EFFECT_SPD_PLUS_1 | MOVE_EFFECT_AFFECTS_USER
|
||||
goto BattleScript_EffectHit
|
||||
@ -2403,6 +2524,7 @@ BattleScript_EffectPsychicTerrain:
|
||||
printfromtable gTerrainStringIds
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
playanimation BS_ATTACKER, B_ANIM_RESTORE_BG
|
||||
call BattleScript_ActivateTerrainAbilities
|
||||
call BattleScript_TerrainSeedLoop
|
||||
jumpifabilitypresent ABILITY_MIMICRY, BattleScript_ApplyMimicry
|
||||
goto BattleScript_MoveEnd
|
||||
@ -2679,10 +2801,10 @@ BattleScript_EffectSpeedSwap:
|
||||
attackstring
|
||||
ppreduce
|
||||
accuracycheck BattleScript_ButItFailed, NO_ACC_CALC_CHECK_LOCK_ON
|
||||
swapstatstages STAT_SPEED
|
||||
swapstats STAT_SPEED
|
||||
attackanimation
|
||||
waitanimation
|
||||
printstring STRINGID_PKMNSWITCHEDSTATCHANGES
|
||||
printstring STRINGID_ATTACKERSWITCHEDSTATWITHTARGET
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
@ -2823,8 +2945,38 @@ BattleScript_EffectTailwind:
|
||||
waitanimation
|
||||
printstring STRINGID_TAILWINDBLEW
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
call BattleScript_TryTailwindAbilitiesLoop
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
BattleScript_TryTailwindAbilitiesLoop:
|
||||
savetarget
|
||||
setbyte gBattlerTarget, 0
|
||||
BattleScript_TryTailwindAbilitiesLoop_Iter:
|
||||
trywindriderpower BS_TARGET, BattleScript_TryTailwindAbilitiesLoop_Increment
|
||||
jumpifability BS_TARGET, ABILITY_WIND_RIDER, BattleScript_TryTailwindAbilitiesLoop_WindRider
|
||||
jumpifability BS_TARGET, ABILITY_WIND_POWER, BattleScript_TryTailwindAbilitiesLoop_WindPower
|
||||
BattleScript_TryTailwindAbilitiesLoop_Increment:
|
||||
addbyte gBattlerTarget, 0x1
|
||||
jumpifbytenotequal gBattlerTarget, gBattlersCount, BattleScript_TryTailwindAbilitiesLoop_Iter
|
||||
BattleScript_TryTailwindAbilitiesLoop_Ret:
|
||||
restoretarget
|
||||
return
|
||||
|
||||
BattleScript_TryTailwindAbilitiesLoop_WindRider:
|
||||
call BattleScript_AbilityPopUp
|
||||
modifybattlerstatstage BS_TARGET, STAT_ATK, INCREASE, 1, BattleScript_TryTailwindAbilitiesLoop_Increment, ANIM_ON
|
||||
goto BattleScript_TryTailwindAbilitiesLoop_Increment
|
||||
|
||||
BattleScript_TryTailwindAbilitiesLoop_WindPower:
|
||||
call BattleScript_AbilityPopUp
|
||||
copybyte sSAVED_BATTLER, gBattlerAttacker
|
||||
copybyte gBattlerAttacker, gBattlerTarget
|
||||
setcharge
|
||||
printstring STRINGID_BEINGHITCHARGEDPKMNWITHPOWER
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
copybyte gBattlerAttacker, sSAVED_BATTLER
|
||||
goto BattleScript_TryTailwindAbilitiesLoop_Increment
|
||||
|
||||
BattleScript_EffectMircleEye:
|
||||
attackcanceler
|
||||
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
|
||||
@ -2912,6 +3064,7 @@ BattleScript_EffectHitEscape:
|
||||
resultmessage
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
jumpifmovehadnoeffect BattleScript_MoveEnd
|
||||
jumpifability BS_TARGET, ABILITY_GUARD_DOG, BattleScript_MoveEnd
|
||||
seteffectwithchance
|
||||
tryfaintmon BS_TARGET
|
||||
moveendto MOVEEND_ATTACKER_VISIBLE
|
||||
@ -3033,6 +3186,7 @@ BattleScript_EffectSleep::
|
||||
jumpifstatus BS_TARGET, STATUS1_SLEEP, BattleScript_AlreadyAsleep
|
||||
jumpifcantmakeasleep BattleScript_CantMakeAsleep
|
||||
jumpifability BS_TARGET, ABILITY_COMATOSE, BattleScript_LeafGuardProtects
|
||||
jumpifability BS_TARGET, ABILITY_PURIFYING_SALT, BattleScript_LeafGuardProtects
|
||||
jumpifflowerveil BattleScript_FlowerVeilProtects
|
||||
jumpifability BS_TARGET_SIDE, ABILITY_SWEET_VEIL, BattleScript_SweetVeilProtects
|
||||
jumpifleafguardprotected BS_TARGET, BattleScript_LeafGuardProtects
|
||||
@ -3201,6 +3355,10 @@ BattleScript_EffectBurnHit::
|
||||
setmoveeffect MOVE_EFFECT_BURN
|
||||
goto BattleScript_EffectHit
|
||||
|
||||
BattleScript_EffectSleepHit::
|
||||
setmoveeffect MOVE_EFFECT_SLEEP
|
||||
goto BattleScript_EffectHit
|
||||
|
||||
BattleScript_EffectFreezeHit::
|
||||
setmoveeffect MOVE_EFFECT_FREEZE
|
||||
goto BattleScript_EffectHit
|
||||
@ -3498,6 +3656,7 @@ BattleScript_EffectRoar::
|
||||
attackstring
|
||||
ppreduce
|
||||
jumpifroarfails BattleScript_ButItFailed
|
||||
jumpifability BS_TARGET, ABILITY_GUARD_DOG, BattleScript_ButItFailed
|
||||
jumpifability BS_TARGET, ABILITY_SUCTION_CUPS, BattleScript_AbilityPreventsPhasingOut
|
||||
jumpifstatus3 BS_TARGET, STATUS3_ROOTED, BattleScript_PrintMonIsRooted
|
||||
accuracycheck BattleScript_ButItFailed, NO_ACC_CALC_CHECK_LOCK_ON
|
||||
@ -3622,6 +3781,7 @@ BattleScript_EffectToxic::
|
||||
ppreduce
|
||||
jumpifability BS_TARGET, ABILITY_IMMUNITY, BattleScript_ImmunityProtected
|
||||
jumpifability BS_TARGET, ABILITY_COMATOSE, BattleScript_LeafGuardProtects
|
||||
jumpifability BS_TARGET, ABILITY_PURIFYING_SALT, BattleScript_LeafGuardProtects
|
||||
jumpifability BS_TARGET_SIDE, ABILITY_PASTEL_VEIL, BattleScript_PastelVeilProtects
|
||||
jumpifflowerveil BattleScript_FlowerVeilProtects
|
||||
jumpifleafguardprotected BS_TARGET, BattleScript_LeafGuardProtects
|
||||
@ -3960,6 +4120,7 @@ BattleScript_EffectPoison::
|
||||
ppreduce
|
||||
jumpifability BS_TARGET, ABILITY_IMMUNITY, BattleScript_ImmunityProtected
|
||||
jumpifability BS_TARGET, ABILITY_COMATOSE, BattleScript_LeafGuardProtects
|
||||
jumpifability BS_TARGET, ABILITY_PURIFYING_SALT, BattleScript_LeafGuardProtects
|
||||
jumpifability BS_TARGET_SIDE, ABILITY_PASTEL_VEIL, BattleScript_PastelVeilProtects
|
||||
jumpifflowerveil BattleScript_FlowerVeilProtects
|
||||
jumpifleafguardprotected BS_TARGET, BattleScript_LeafGuardProtects
|
||||
@ -3986,6 +4147,7 @@ BattleScript_EffectParalyze:
|
||||
ppreduce
|
||||
jumpifability BS_TARGET, ABILITY_LIMBER, BattleScript_LimberProtected
|
||||
jumpifability BS_TARGET, ABILITY_COMATOSE, BattleScript_LeafGuardProtects
|
||||
jumpifability BS_TARGET, ABILITY_PURIFYING_SALT, BattleScript_LeafGuardProtects
|
||||
jumpifflowerveil BattleScript_FlowerVeilProtects
|
||||
jumpifleafguardprotected BS_TARGET, BattleScript_LeafGuardProtects
|
||||
jumpifshieldsdown BS_TARGET, BattleScript_LeafGuardProtects
|
||||
@ -4970,6 +5132,10 @@ BattleScript_EffectAttackUpHit::
|
||||
setmoveeffect MOVE_EFFECT_ATK_PLUS_1 | MOVE_EFFECT_AFFECTS_USER
|
||||
goto BattleScript_EffectHit
|
||||
|
||||
BattleScript_EffectSpecialAttackUpHit::
|
||||
setmoveeffect MOVE_EFFECT_SP_ATK_PLUS_1 | MOVE_EFFECT_AFFECTS_USER
|
||||
goto BattleScript_EffectHit
|
||||
|
||||
BattleScript_EffectAllStatsUpHit::
|
||||
setmoveeffect MOVE_EFFECT_ALL_STATS_UP | MOVE_EFFECT_AFFECTS_USER
|
||||
goto BattleScript_EffectHit
|
||||
@ -5122,10 +5288,18 @@ BattleScript_EffectTeleportNew:
|
||||
BattleScript_EffectTeleportNewEnd:
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
.if B_BEAT_UP < GEN_5
|
||||
BattleScript_EffectBeatUp::
|
||||
attackcanceler
|
||||
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
|
||||
.if B_BEAT_UP >= GEN_5
|
||||
attackstring
|
||||
ppreduce
|
||||
critcalc
|
||||
damagecalc
|
||||
adjustdamage
|
||||
trydobeatup
|
||||
goto BattleScript_HitFromAtkAnimation
|
||||
.else
|
||||
attackstring
|
||||
pause B_WAIT_TIME_SHORT
|
||||
ppreduce
|
||||
@ -5155,12 +5329,6 @@ BattleScript_BeatUpAttack::
|
||||
goto BattleScript_BeatUpLoop
|
||||
BattleScript_BeatUpEnd::
|
||||
end
|
||||
.else
|
||||
BattleScript_EffectBeatUp::
|
||||
attackcanceler
|
||||
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
|
||||
addbyte gBattleCommunication, 1
|
||||
goto BattleScript_HitFromAtkString
|
||||
.endif
|
||||
|
||||
BattleScript_EffectSemiInvulnerable::
|
||||
@ -5409,6 +5577,7 @@ BattleScript_EffectWillOWisp::
|
||||
jumpifability BS_TARGET, ABILITY_WATER_VEIL, BattleScript_WaterVeilPrevents
|
||||
jumpifability BS_TARGET, ABILITY_WATER_BUBBLE, BattleScript_WaterVeilPrevents
|
||||
jumpifability BS_TARGET, ABILITY_COMATOSE, BattleScript_LeafGuardProtects
|
||||
jumpifability BS_TARGET, ABILITY_PURIFYING_SALT, BattleScript_LeafGuardProtects
|
||||
jumpifflowerveil BattleScript_FlowerVeilProtects
|
||||
jumpifleafguardprotected BS_TARGET, BattleScript_LeafGuardProtects
|
||||
jumpifshieldsdown BS_TARGET, BattleScript_LeafGuardProtects
|
||||
@ -5701,6 +5870,7 @@ BattleScript_EffectYawn::
|
||||
jumpifability BS_TARGET, ABILITY_VITAL_SPIRIT, BattleScript_PrintBankAbilityMadeIneffective
|
||||
jumpifability BS_TARGET, ABILITY_INSOMNIA, BattleScript_PrintBankAbilityMadeIneffective
|
||||
jumpifability BS_TARGET, ABILITY_COMATOSE, BattleScript_PrintBankAbilityMadeIneffective
|
||||
jumpifability BS_TARGET, ABILITY_PURIFYING_SALT, BattleScript_LeafGuardProtects
|
||||
jumpifflowerveil BattleScript_FlowerVeilProtects
|
||||
jumpifleafguardprotected BS_TARGET, BattleScript_LeafGuardProtects
|
||||
jumpifshieldsdown BS_TARGET, BattleScript_LeafGuardProtects
|
||||
@ -6128,7 +6298,7 @@ BattleScript_FaintedMonTryChoose:
|
||||
jumpifbyte CMP_EQUAL, gBattleCommunication, PARTY_SIZE, BattleScript_FaintedMonSendOutNew
|
||||
@ Switch Pokémon before opponent
|
||||
atknameinbuff1
|
||||
resetintimidatetracebits BS_ATTACKER
|
||||
resetswitchinabilitybits BS_ATTACKER
|
||||
hpthresholds2 BS_ATTACKER
|
||||
printstring STRINGID_RETURNMON
|
||||
switchoutabilities BS_ATTACKER
|
||||
@ -6583,6 +6753,27 @@ BattleScript_TailwindEnds::
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
end2
|
||||
|
||||
BattleScript_WindPowerActivatesEnd2::
|
||||
setbyte gBattlerAttacker, 0
|
||||
BattleScript_WindPowerLoop:
|
||||
printstring STRINGID_EMPTYSTRING3
|
||||
jumpifability BS_ATTACKER, ABILITY_WIND_POWER, BattleScript_WindPowerLoop_Cont
|
||||
goto BattleScript_WindPowerIncrement
|
||||
BattleScript_WindPowerLoop_Cont:
|
||||
jumpifstatus3 BS_ATTACKER, STATUS3_CHARGED_UP, BattleScript_WindPowerIncrement
|
||||
goto BattleScript_WindPower_Activate
|
||||
BattleScript_WindPower_Activate:
|
||||
call BattleScript_AbilityPopUp
|
||||
setcharge
|
||||
printstring STRINGID_BEINGHITCHARGEDPKMNWITHPOWER
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
BattleScript_WindPowerIncrement:
|
||||
addbyte gBattlerAttacker, 1
|
||||
jumpifbytenotequal gBattlerAttacker, gBattlersCount, BattleScript_WindPowerLoop
|
||||
BattleScript_WindPowerEnd:
|
||||
destroyabilitypopup
|
||||
end2
|
||||
|
||||
BattleScript_TrickRoomEnds::
|
||||
printstring STRINGID_TRICKROOMENDS
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
@ -7023,6 +7214,70 @@ BattleScript_GulpMissileGorgingTargetDefenseCantGoLower:
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
return
|
||||
|
||||
BattleScript_SeedSowerActivates::
|
||||
pause B_WAIT_TIME_SHORT
|
||||
call BattleScript_AbilityPopUp
|
||||
printstring STRINGID_TERRAINBECOMESGRASSY
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
playanimation BS_SCRIPTING, B_ANIM_RESTORE_BG
|
||||
call BattleScript_ActivateTerrainAbilities
|
||||
call BattleScript_TerrainSeedLoop
|
||||
return
|
||||
|
||||
BattleScript_AngerShellActivates::
|
||||
call BattleScript_AbilityPopUp
|
||||
jumpifstat BS_TARGET, CMP_LESS_THAN, STAT_ATK, MAX_STAT_STAGE, BattleScript_AngerShellTryDef
|
||||
jumpifstat BS_TARGET, CMP_LESS_THAN, STAT_SPATK, MAX_STAT_STAGE, BattleScript_AngerShellTryDef
|
||||
jumpifstat BS_TARGET, CMP_LESS_THAN, STAT_SPEED, MAX_STAT_STAGE, BattleScript_AngerShellTryDef
|
||||
jumpifstat BS_TARGET, CMP_GREATER_THAN, STAT_DEF, MIN_STAT_STAGE, BattleScript_AngerShellTryDef
|
||||
jumpifstat BS_TARGET, CMP_EQUAL, STAT_SPDEF, MIN_STAT_STAGE, BattleScript_ButItFailed
|
||||
BattleScript_AngerShellTryDef::
|
||||
setbyte sSTAT_ANIM_PLAYED, FALSE
|
||||
modifybattlerstatstage BS_ATTACKER, STAT_DEF, DECREASE, 1, BattleScript_AngerShellTrySpDef, ANIM_ON
|
||||
BattleScript_AngerShellTrySpDef:
|
||||
modifybattlerstatstage BS_ATTACKER, STAT_SPDEF, DECREASE, 1, BattleScript_AngerShellTryAttack, ANIM_ON
|
||||
BattleScript_AngerShellTryAttack:
|
||||
setbyte sSTAT_ANIM_PLAYED, FALSE
|
||||
modifybattlerstatstage BS_ATTACKER, STAT_ATK, INCREASE, 1, BattleScript_AngerShellTrySpAtk, ANIM_ON
|
||||
BattleScript_AngerShellTrySpAtk:
|
||||
modifybattlerstatstage BS_ATTACKER, STAT_SPATK, INCREASE, 1, BattleScript_AngerShellTrySpeed, ANIM_ON
|
||||
BattleScript_AngerShellTrySpeed:
|
||||
modifybattlerstatstage BS_ATTACKER, STAT_SPEED, INCREASE, 1, BattleScript_AngerShellRet, ANIM_ON
|
||||
BattleScript_AngerShellRet:
|
||||
return
|
||||
|
||||
BattleScript_WindPowerActivates::
|
||||
.if B_CHECK_IF_CHARGED_UP == TRUE
|
||||
jumpifstatus3 BS_ATTACKER, STATUS3_CHARGED_UP, BattleScript_WindPowerActivates_Ret
|
||||
.endif
|
||||
call BattleScript_AbilityPopUp
|
||||
setcharge
|
||||
printstring STRINGID_BEINGHITCHARGEDPKMNWITHPOWER
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
BattleScript_WindPowerActivates_Ret:
|
||||
return
|
||||
|
||||
BattleScript_ToxicDebrisActivates::
|
||||
call BattleScript_AbilityPopUp
|
||||
pause B_WAIT_TIME_SHORT
|
||||
settoxicspikes BattleScript_ToxicDebrisRet
|
||||
printstring STRINGID_POISONSPIKESSCATTERED
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
BattleScript_ToxicDebrisRet:
|
||||
return
|
||||
|
||||
BattleScript_EarthEaterActivates::
|
||||
call BattleScript_AbilityPopUp
|
||||
pause B_WAIT_TIME_LONG
|
||||
tryhealquarterhealth BS_TARGET, BattleScript_EarthEaterRet
|
||||
orword gHitMarker, HITMARKER_SKIP_DMG_TRACK | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE
|
||||
healthbarupdate BS_TARGET
|
||||
datahpupdate BS_TARGET
|
||||
printstring STRINGID_PKMNREGAINEDHEALTH
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
BattleScript_EarthEaterRet:
|
||||
return
|
||||
|
||||
BattleScript_PerishSongCountGoesDown::
|
||||
printstring STRINGID_PKMNPERISHCOUNTFELL
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
@ -7544,6 +7799,17 @@ BattleScript_BallFetch::
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
end3
|
||||
|
||||
BattleScript_CudChewActivates::
|
||||
pause B_WAIT_TIME_SHORTEST
|
||||
call BattleScript_AbilityPopUp
|
||||
setbyte sBERRY_OVERRIDE, 1 @ override the requirements for eating berries
|
||||
consumeberry BS_TARGET, FALSE
|
||||
orword gHitMarker, HITMARKER_SKIP_DMG_TRACK | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE
|
||||
healthbarupdate BS_ATTACKER
|
||||
datahpupdate BS_ATTACKER
|
||||
setbyte sBERRY_OVERRIDE, 0
|
||||
end3
|
||||
|
||||
BattleScript_TargetFormChange::
|
||||
pause 5
|
||||
copybyte gBattlerAbility, gBattlerTarget
|
||||
@ -8154,6 +8420,7 @@ BattleScript_WeatherFormChanges::
|
||||
setbyte sBATTLER, 0
|
||||
BattleScript_WeatherFormChangesLoop::
|
||||
tryweatherformdatachange
|
||||
activateweatherchangeabilities BS_SCRIPTING
|
||||
addbyte sBATTLER, 1
|
||||
jumpifbytenotequal sBATTLER, gBattlersCount, BattleScript_WeatherFormChangesLoop
|
||||
return
|
||||
@ -8198,19 +8465,15 @@ BattleScript_TryAdrenalineOrb:
|
||||
BattleScript_TryAdrenalineOrbRet:
|
||||
return
|
||||
|
||||
BattleScript_IntimidateActivatesEnd3::
|
||||
call BattleScript_PauseIntimidateActivates
|
||||
end3
|
||||
|
||||
BattleScript_PauseIntimidateActivates:
|
||||
pause B_WAIT_TIME_SHORT
|
||||
BattleScript_IntimidateActivates::
|
||||
showabilitypopup BS_ATTACKER
|
||||
pause B_WAIT_TIME_LONG
|
||||
destroyabilitypopup
|
||||
setbyte gBattlerTarget, 0
|
||||
call BattleScript_AbilityPopUp
|
||||
BattleScript_IntimidateActivatesLoop:
|
||||
setstatchanger STAT_ATK, 1, TRUE
|
||||
trygetintimidatetarget BattleScript_IntimidateActivatesReturn
|
||||
jumpifstatus2 BS_TARGET, STATUS2_SUBSTITUTE, BattleScript_IntimidateActivatesLoopIncrement
|
||||
BattleScript_IntimidateLoop:
|
||||
jumpifbyteequal gBattlerTarget, gBattlerAttacker, BattleScript_IntimidateLoopIncrement
|
||||
jumpiftargetally BattleScript_IntimidateLoopIncrement
|
||||
jumpifstatus2 BS_TARGET, STATUS2_SUBSTITUTE, BattleScript_IntimidateLoopIncrement
|
||||
jumpifability BS_TARGET, ABILITY_CLEAR_BODY, BattleScript_IntimidatePrevented
|
||||
jumpifability BS_TARGET, ABILITY_HYPER_CUTTER, BattleScript_IntimidatePrevented
|
||||
jumpifability BS_TARGET, ABILITY_WHITE_SMOKE, BattleScript_IntimidatePrevented
|
||||
@ -8220,27 +8483,42 @@ BattleScript_IntimidateActivatesLoop:
|
||||
jumpifability BS_TARGET, ABILITY_OWN_TEMPO, BattleScript_IntimidatePrevented
|
||||
jumpifability BS_TARGET, ABILITY_OBLIVIOUS, BattleScript_IntimidatePrevented
|
||||
.endif
|
||||
statbuffchange STAT_CHANGE_NOT_PROTECT_AFFECTED | STAT_CHANGE_ALLOW_PTR, BattleScript_IntimidateActivatesLoopIncrement
|
||||
jumpifbyte CMP_GREATER_THAN, cMULTISTRING_CHOOSER, 1, BattleScript_IntimidateActivatesLoopIncrement
|
||||
jumpifability BS_TARGET, ABILITY_GUARD_DOG, BattleScript_IntimidateInReverse
|
||||
BattleScript_IntimidateEffect:
|
||||
copybyte sBATTLER, gBattlerAttacker
|
||||
statbuffchange STAT_CHANGE_NOT_PROTECT_AFFECTED | STAT_CHANGE_ALLOW_PTR, BattleScript_IntimidateLoopIncrement
|
||||
setgraphicalstatchangevalues
|
||||
playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
|
||||
printstring STRINGID_PKMNCUTSATTACKWITH
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
copybyte sBATTLER, gBattlerTarget
|
||||
call BattleScript_TryAdrenalineOrb
|
||||
BattleScript_IntimidateActivatesLoopIncrement:
|
||||
BattleScript_IntimidateLoopIncrement:
|
||||
addbyte gBattlerTarget, 1
|
||||
goto BattleScript_IntimidateActivatesLoop
|
||||
BattleScript_IntimidateActivatesReturn:
|
||||
return
|
||||
jumpifbytenotequal gBattlerTarget, gBattlersCount, BattleScript_IntimidateLoop
|
||||
BattleScript_IntimidateEnd:
|
||||
destroyabilitypopup
|
||||
pause B_WAIT_TIME_MED
|
||||
end3
|
||||
|
||||
BattleScript_IntimidatePrevented:
|
||||
pause B_WAIT_TIME_SHORT
|
||||
call BattleScript_AbilityPopUp
|
||||
pause B_WAIT_TIME_LONG
|
||||
setbyte gBattleCommunication STAT_ATK
|
||||
stattextbuffer BS_ATTACKER
|
||||
stattextbuffer BS_TARGET
|
||||
printstring STRINGID_STATWASNOTLOWERED
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
call BattleScript_TryAdrenalineOrb
|
||||
goto BattleScript_IntimidateActivatesLoopIncrement
|
||||
goto BattleScript_IntimidateLoopIncrement
|
||||
|
||||
BattleScript_IntimidateInReverse:
|
||||
copybyte sBATTLER, gBattlerTarget
|
||||
copybyte gBattlerAbility, gBattlerTarget
|
||||
call BattleScript_AbilityPopUp
|
||||
pause B_WAIT_TIME_SHORT
|
||||
modifybattlerstatstage BS_TARGET, STAT_ATK, INCREASE, 1, BattleScript_IntimidateLoopIncrement, ANIM_ON
|
||||
call BattleScript_TryAdrenalineOrb
|
||||
goto BattleScript_IntimidateLoopIncrement
|
||||
|
||||
BattleScript_DroughtActivates::
|
||||
pause B_WAIT_TIME_SHORT
|
||||
@ -8299,6 +8577,42 @@ BattleScript_DeltaStreamActivates::
|
||||
playanimation BS_ATTACKER, B_ANIM_STRONG_WINDS
|
||||
end3
|
||||
|
||||
BattleScript_ProtosynthesisActivates::
|
||||
call BattleScript_AbilityPopUp
|
||||
printstring STRINGID_SUNLIGHTACTIVATEDABILITY
|
||||
waitmessage B_WAIT_TIME_MED
|
||||
printstring STRINGID_STATWASHEIGHTENED
|
||||
waitmessage B_WAIT_TIME_MED
|
||||
end3
|
||||
|
||||
BattleScript_QuarkDriveActivates::
|
||||
call BattleScript_AbilityPopUp
|
||||
printstring STRINGID_ELECTRICTERRAINACTIVATEDABILITY
|
||||
waitmessage B_WAIT_TIME_MED
|
||||
printstring STRINGID_STATWASHEIGHTENED
|
||||
waitmessage B_WAIT_TIME_MED
|
||||
end3
|
||||
|
||||
BattleScript_RuinAbilityActivates::
|
||||
call BattleScript_AbilityPopUp
|
||||
printstring STRINGID_ABILITYWEAKENEDFSURROUNDINGMONSSTAT
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
end3
|
||||
|
||||
BattleScript_SupremeOverlordActivates::
|
||||
pause B_WAIT_TIME_SHORT
|
||||
call BattleScript_AbilityPopUp
|
||||
printstring STRINGID_ATTACKERGAINEDSTRENGTHFROMTHEFALLEN
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
end3
|
||||
|
||||
BattleScript_CostarActivates::
|
||||
pause B_WAIT_TIME_SHORT
|
||||
call BattleScript_AbilityPopUp
|
||||
printstring STRINGID_PKMNCOPIEDSTATCHANGES
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
end3
|
||||
|
||||
BattleScript_AttackWeakenedByStrongWinds::
|
||||
pause B_WAIT_TIME_SHORT
|
||||
printstring STRINGID_ATTACKWEAKENEDBSTRONGWINDS
|
||||
@ -8327,12 +8641,35 @@ BattleScript_TerrainSeedLoop_NextBattler:
|
||||
restoretarget
|
||||
return
|
||||
|
||||
BattleScript_ActivateSwitchInAbilities:
|
||||
copybyte sBATTLER, gBattlerAttacker
|
||||
setbyte gBattlerAttacker, 0
|
||||
BattleScript_ActivateSwitchInAbilities_Loop:
|
||||
switchinabilities BS_ATTACKER
|
||||
BattleScript_ActivateSwitchInAbilities_Increment:
|
||||
addbyte gBattlerAttacker, 1
|
||||
jumpifbytenotequal gBattlerAttacker, gBattlersCount, BattleScript_ActivateSwitchInAbilities_Loop
|
||||
copybyte gBattlerAttacker, sBATTLER
|
||||
return
|
||||
|
||||
BattleScript_ActivateTerrainAbilities:
|
||||
copybyte sBATTLER, gBattlerAttacker
|
||||
setbyte gBattlerAttacker, 0
|
||||
BattleScript_ActivateTerrainAbilities_Loop:
|
||||
activateterrainchangeabilities BS_ATTACKER
|
||||
BattleScript_ActivateTerrainAbilities_Increment:
|
||||
addbyte gBattlerAttacker, 1
|
||||
jumpifbytenotequal gBattlerAttacker, gBattlersCount, BattleScript_ActivateTerrainAbilities_Loop
|
||||
copybyte gBattlerAttacker, sBATTLER
|
||||
return
|
||||
|
||||
BattleScript_ElectricSurgeActivates::
|
||||
pause B_WAIT_TIME_SHORT
|
||||
call BattleScript_AbilityPopUp
|
||||
printstring STRINGID_TERRAINBECOMESELECTRIC
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
playanimation BS_SCRIPTING, B_ANIM_RESTORE_BG
|
||||
call BattleScript_ActivateTerrainAbilities
|
||||
call BattleScript_TerrainSeedLoop
|
||||
end3
|
||||
|
||||
@ -8342,6 +8679,7 @@ BattleScript_MistySurgeActivates::
|
||||
printstring STRINGID_TERRAINBECOMESMISTY
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
playanimation BS_SCRIPTING, B_ANIM_RESTORE_BG
|
||||
call BattleScript_ActivateTerrainAbilities
|
||||
call BattleScript_TerrainSeedLoop
|
||||
end3
|
||||
|
||||
@ -8351,6 +8689,7 @@ BattleScript_GrassySurgeActivates::
|
||||
printstring STRINGID_TERRAINBECOMESGRASSY
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
playanimation BS_SCRIPTING, B_ANIM_RESTORE_BG
|
||||
call BattleScript_ActivateTerrainAbilities
|
||||
call BattleScript_TerrainSeedLoop
|
||||
end3
|
||||
|
||||
@ -8360,6 +8699,7 @@ BattleScript_PsychicSurgeActivates::
|
||||
printstring STRINGID_TERRAINBECOMESPSYCHIC
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
playanimation BS_SCRIPTING, B_ANIM_RESTORE_BG
|
||||
call BattleScript_ActivateTerrainAbilities
|
||||
call BattleScript_TerrainSeedLoop
|
||||
end3
|
||||
|
||||
@ -8440,8 +8780,15 @@ BattleScript_MoveStatDrain::
|
||||
setgraphicalstatchangevalues
|
||||
playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
|
||||
waitanimation
|
||||
.if B_ABSORBING_ABILITY_STRING >= GEN_5
|
||||
statbuffchange STAT_CHANGE_ALLOW_PTR, BattleScript_MoveStatDrain_Cont
|
||||
printfromtable gStatUpStringIds
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
.else
|
||||
printstring STRINGID_TARGETABILITYSTATRAISE
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
.endif
|
||||
BattleScript_MoveStatDrain_Cont:
|
||||
clearsemiinvulnerablebit
|
||||
tryfaintmon BS_ATTACKER
|
||||
goto BattleScript_MoveEnd
|
||||
@ -9621,7 +9968,7 @@ BattleScript_ExtremeEvoboostSpDef::
|
||||
BattleScript_ExtremeEvoboostEnd::
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
BattleScript_EffectTerrainHit:
|
||||
BattleScript_EffectHitSetRemoveTerrain:
|
||||
attackcanceler
|
||||
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
|
||||
attackstring
|
||||
@ -9643,6 +9990,7 @@ BattleScript_EffectTerrainHit:
|
||||
setterrain BattleScript_TryFaint
|
||||
playanimation BS_ATTACKER, B_ANIM_RESTORE_BG
|
||||
printfromtable gTerrainStringIds
|
||||
call BattleScript_ActivateTerrainAbilities
|
||||
BattleScript_TryFaint:
|
||||
tryfaintmon BS_TARGET
|
||||
goto BattleScript_MoveEnd
|
||||
@ -9741,6 +10089,35 @@ BattleScript_DarkTypePreventsPrankster::
|
||||
orhalfword gMoveResultFlags, MOVE_RESULT_NO_EFFECT
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
BattleScript_WellBakedBodyActivates::
|
||||
attackstring
|
||||
ppreduce
|
||||
pause B_WAIT_TIME_SHORT
|
||||
showabilitypopup BS_TARGET
|
||||
orhalfword gMoveResultFlags, MOVE_RESULT_NO_EFFECT
|
||||
modifybattlerstatstage BS_TARGET, STAT_DEF, INCREASE, 1, BattleScript_WellBakedBodyEnd, ANIM_ON
|
||||
BattleScript_WellBakedBodyEnd:
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
BattleScript_WindRiderActivatesMoveEnd::
|
||||
attackstring
|
||||
ppreduce
|
||||
pause B_WAIT_TIME_SHORT
|
||||
showabilitypopup BS_TARGET
|
||||
orhalfword gMoveResultFlags, MOVE_RESULT_NO_EFFECT
|
||||
modifybattlerstatstage BS_TARGET, STAT_ATK, INCREASE, 1, BattleScript_WindRiderActivatesMoveEnd_End, ANIM_ON
|
||||
BattleScript_WindRiderActivatesMoveEnd_End:
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
BattleScript_GoodAsGoldActivates::
|
||||
attackstring
|
||||
ppreduce
|
||||
showabilitypopup BS_TARGET
|
||||
pause B_WAIT_TIME_SHORT
|
||||
printstring STRINGID_ITDOESNTAFFECT
|
||||
waitmessage B_WAIT_TIME_MED
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
BattleScript_PastelVeilActivates::
|
||||
setbyte gBattleCommunication, 0
|
||||
setbyte gBattleCommunication + 1, 0
|
||||
|
@ -1,8 +1,8 @@
|
||||
#include "config/battle.h"
|
||||
#include "constants/battle.h"
|
||||
#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"
|
||||
|
@ -1,8 +1,9 @@
|
||||
#include "config/battle.h"
|
||||
#include "config/item.h"
|
||||
#include "constants/global.h"
|
||||
#include "constants/apprentice.h"
|
||||
#include "constants/battle.h"
|
||||
#include "constants/battle_arena.h"
|
||||
#include "constants/battle_config.h"
|
||||
#include "constants/battle_dome.h"
|
||||
#include "constants/battle_factory.h"
|
||||
#include "constants/battle_frontier.h"
|
||||
@ -30,7 +31,6 @@
|
||||
#include "constants/frontier_util.h"
|
||||
#include "constants/game_stat.h"
|
||||
#include "constants/item.h"
|
||||
#include "constants/item_config.h"
|
||||
#include "constants/items.h"
|
||||
#include "constants/heal_locations.h"
|
||||
#include "constants/layouts.h"
|
||||
|
@ -145,6 +145,7 @@ BattleFrontier_Lounge7_EventScript_ChooseRightTutorMove::
|
||||
waitmessage
|
||||
special ShowBattlePointsWindow
|
||||
setvar VAR_TEMP_E, 1
|
||||
setvar VAR_0x8004, SCROLL_MULTI_BF_MOVE_TUTOR_2
|
||||
setvar VAR_0x8006, 0
|
||||
special ShowScrollableMultichoice
|
||||
waitstate
|
||||
@ -168,6 +169,7 @@ BattleFrontier_Lounge7_EventScript_ChooseNewRightTutorMove::
|
||||
message BattleFrontier_Lounge7_Text_TeachWhichMove
|
||||
waitmessage
|
||||
setvar VAR_TEMP_E, 1
|
||||
setvar VAR_0x8004, SCROLL_MULTI_BF_MOVE_TUTOR_2
|
||||
setvar VAR_0x8006, 1
|
||||
special ShowScrollableMultichoice
|
||||
waitstate
|
||||
|
@ -19,6 +19,7 @@ EventScript_RepelUseAnother:
|
||||
lock
|
||||
msgbox Text_UseAnotherRepel, MSGBOX_YESNO
|
||||
.if I_REPEL_LURE_MENU == TRUE
|
||||
goto_if_eq VAR_RESULT, NO, EventScript_RepelWoreOff_End
|
||||
callnative TryDrawRepelMenu
|
||||
goto_if_eq VAR_RESULT, FALSE, EventScript_RepelWoreOff_Chose
|
||||
waitstate
|
||||
@ -68,6 +69,7 @@ EventScript_LureUseAnother:
|
||||
lock
|
||||
msgbox Text_UseAnotherLure, MSGBOX_YESNO
|
||||
.if I_REPEL_LURE_MENU == TRUE
|
||||
goto_if_eq VAR_RESULT, NO, EventScript_LureWoreOff_End
|
||||
callnative TryDrawLureMenu
|
||||
goto_if_eq VAR_RESULT, FALSE, EventScript_LureWoreOff_Chose
|
||||
waitstate
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
.include "asm/macros/m4a.inc"
|
||||
.include "asm/macros/music_voice.inc"
|
||||
.include "include/constants/pokemon_config.h"
|
||||
.include "include/config/pokemon.h"
|
||||
.include "sound/voice_groups.inc"
|
||||
.include "sound/keysplit_tables.inc"
|
||||
.include "sound/programmable_wave_data.inc"
|
||||
|
@ -1053,7 +1053,7 @@ void WriteSequenceToBgTilemapBuffer(u8 bg, u16 firstTileNum, u8 x, u8 y, u8 widt
|
||||
for (x16 = x; x16 < (x + width); x16++)
|
||||
{
|
||||
CopyTileMapEntry(&firstTileNum, &((u16 *)sGpuBgConfigs2[bg].tilemap)[(u16)GetTileMapIndexFromCoords(x16, y16, attribute, mode, mode2)], paletteSlot, 0, 0);
|
||||
firstTileNum = (firstTileNum & (MAPGRID_COLLISION_MASK | MAPGRID_ELEVATION_MASK)) + ((firstTileNum + tileNumDelta) & MAPGRID_METATILE_ID_MASK);
|
||||
firstTileNum = (firstTileNum & 0xFC00) + ((firstTileNum + tileNumDelta) & 0x3FF);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -1064,7 +1064,7 @@ void WriteSequenceToBgTilemapBuffer(u8 bg, u16 firstTileNum, u8 x, u8 y, u8 widt
|
||||
for (x16 = x; x16 < (x + width); x16++)
|
||||
{
|
||||
((u8 *)sGpuBgConfigs2[bg].tilemap)[(y16 * mode3) + x16] = firstTileNum;
|
||||
firstTileNum = (firstTileNum & (MAPGRID_COLLISION_MASK | MAPGRID_ELEVATION_MASK)) + ((firstTileNum + tileNumDelta) & MAPGRID_METATILE_ID_MASK);
|
||||
firstTileNum = (firstTileNum & 0xFC00) + ((firstTileNum + tileNumDelta) & 0x3FF);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -212,13 +212,13 @@
|
||||
#define EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW 0x04
|
||||
#define EXT_CTRL_CODE_PALETTE 0x05
|
||||
#define EXT_CTRL_CODE_FONT 0x06
|
||||
#define EXT_CTRL_CODE_RESET_SIZE 0x07
|
||||
#define EXT_CTRL_CODE_RESET_FONT 0x07
|
||||
#define EXT_CTRL_CODE_PAUSE 0x08
|
||||
#define EXT_CTRL_CODE_PAUSE_UNTIL_PRESS 0x09
|
||||
#define EXT_CTRL_CODE_WAIT_SE 0x0A
|
||||
#define EXT_CTRL_CODE_PLAY_BGM 0x0B
|
||||
#define EXT_CTRL_CODE_ESCAPE 0x0C
|
||||
#define EXT_CTRL_CODE_SHIFT_TEXT 0x0D
|
||||
#define EXT_CTRL_CODE_SHIFT_RIGHT 0x0D
|
||||
#define EXT_CTRL_CODE_SHIFT_DOWN 0x0E
|
||||
#define EXT_CTRL_CODE_FILL_WINDOW 0x0F
|
||||
#define EXT_CTRL_CODE_PLAY_SE 0x10
|
||||
|
@ -354,7 +354,7 @@ u8 *StringExpandPlaceholders(u8 *dest, const u8 *src)
|
||||
|
||||
switch (c)
|
||||
{
|
||||
case EXT_CTRL_CODE_RESET_SIZE:
|
||||
case EXT_CTRL_CODE_RESET_FONT:
|
||||
case EXT_CTRL_CODE_PAUSE_UNTIL_PRESS:
|
||||
case EXT_CTRL_CODE_FILL_WINDOW:
|
||||
case EXT_CTRL_CODE_JPN:
|
||||
@ -665,13 +665,13 @@ u8 GetExtCtrlCodeLength(u8 code)
|
||||
[EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW] = 4,
|
||||
[EXT_CTRL_CODE_PALETTE] = 2,
|
||||
[EXT_CTRL_CODE_FONT] = 2,
|
||||
[EXT_CTRL_CODE_RESET_SIZE] = 1,
|
||||
[EXT_CTRL_CODE_RESET_FONT] = 1,
|
||||
[EXT_CTRL_CODE_PAUSE] = 2,
|
||||
[EXT_CTRL_CODE_PAUSE_UNTIL_PRESS] = 1,
|
||||
[EXT_CTRL_CODE_WAIT_SE] = 1,
|
||||
[EXT_CTRL_CODE_PLAY_BGM] = 3,
|
||||
[EXT_CTRL_CODE_ESCAPE] = 2,
|
||||
[EXT_CTRL_CODE_SHIFT_TEXT] = 2,
|
||||
[EXT_CTRL_CODE_SHIFT_RIGHT] = 2,
|
||||
[EXT_CTRL_CODE_SHIFT_DOWN] = 2,
|
||||
[EXT_CTRL_CODE_FILL_WINDOW] = 1,
|
||||
[EXT_CTRL_CODE_PLAY_SE] = 3,
|
||||
|
16
gflib/text.c
@ -1009,7 +1009,7 @@ static u16 RenderText(struct TextPrinter *textPrinter)
|
||||
subStruct->fontId = *textPrinter->printerTemplate.currentChar;
|
||||
textPrinter->printerTemplate.currentChar++;
|
||||
return RENDER_REPEAT;
|
||||
case EXT_CTRL_CODE_RESET_SIZE:
|
||||
case EXT_CTRL_CODE_RESET_FONT:
|
||||
return RENDER_REPEAT;
|
||||
case EXT_CTRL_CODE_PAUSE:
|
||||
textPrinter->delayCounter = *textPrinter->printerTemplate.currentChar;
|
||||
@ -1042,7 +1042,7 @@ static u16 RenderText(struct TextPrinter *textPrinter)
|
||||
textPrinter->printerTemplate.currentChar++;
|
||||
PlaySE(currChar);
|
||||
return RENDER_REPEAT;
|
||||
case EXT_CTRL_CODE_SHIFT_TEXT:
|
||||
case EXT_CTRL_CODE_SHIFT_RIGHT:
|
||||
textPrinter->printerTemplate.currentX = textPrinter->printerTemplate.x + *textPrinter->printerTemplate.currentChar;
|
||||
textPrinter->printerTemplate.currentChar++;
|
||||
return RENDER_REPEAT;
|
||||
@ -1271,7 +1271,7 @@ static u32 GetStringWidthFixedWidthFont(const u8 *str, u8 fontId, u8 letterSpaci
|
||||
case EXT_CTRL_CODE_FONT:
|
||||
case EXT_CTRL_CODE_PAUSE:
|
||||
case EXT_CTRL_CODE_ESCAPE:
|
||||
case EXT_CTRL_CODE_SHIFT_TEXT:
|
||||
case EXT_CTRL_CODE_SHIFT_RIGHT:
|
||||
case EXT_CTRL_CODE_SHIFT_DOWN:
|
||||
case EXT_CTRL_CODE_CLEAR:
|
||||
case EXT_CTRL_CODE_SKIP:
|
||||
@ -1279,7 +1279,7 @@ static u32 GetStringWidthFixedWidthFont(const u8 *str, u8 fontId, u8 letterSpaci
|
||||
case EXT_CTRL_CODE_MIN_LETTER_SPACING:
|
||||
++strPos;
|
||||
break;
|
||||
case EXT_CTRL_CODE_RESET_SIZE:
|
||||
case EXT_CTRL_CODE_RESET_FONT:
|
||||
case EXT_CTRL_CODE_PAUSE_UNTIL_PRESS:
|
||||
case EXT_CTRL_CODE_WAIT_SE:
|
||||
case EXT_CTRL_CODE_FILL_WINDOW:
|
||||
@ -1413,7 +1413,7 @@ s32 GetStringWidth(u8 fontId, const u8 *str, s16 letterSpacing)
|
||||
case EXT_CTRL_CODE_PALETTE:
|
||||
case EXT_CTRL_CODE_PAUSE:
|
||||
case EXT_CTRL_CODE_ESCAPE:
|
||||
case EXT_CTRL_CODE_SHIFT_TEXT:
|
||||
case EXT_CTRL_CODE_SHIFT_RIGHT:
|
||||
case EXT_CTRL_CODE_SHIFT_DOWN:
|
||||
++str;
|
||||
break;
|
||||
@ -1444,7 +1444,7 @@ s32 GetStringWidth(u8 fontId, const u8 *str, s16 letterSpacing)
|
||||
case EXT_CTRL_CODE_ENG:
|
||||
isJapanese = 0;
|
||||
break;
|
||||
case EXT_CTRL_CODE_RESET_SIZE:
|
||||
case EXT_CTRL_CODE_RESET_FONT:
|
||||
case EXT_CTRL_CODE_PAUSE_UNTIL_PRESS:
|
||||
case EXT_CTRL_CODE_WAIT_SE:
|
||||
case EXT_CTRL_CODE_FILL_WINDOW:
|
||||
@ -1556,7 +1556,7 @@ u8 RenderTextHandleBold(u8 *pixels, u8 fontId, u8 *str)
|
||||
case EXT_CTRL_CODE_PALETTE:
|
||||
case EXT_CTRL_CODE_PAUSE:
|
||||
case EXT_CTRL_CODE_ESCAPE:
|
||||
case EXT_CTRL_CODE_SHIFT_TEXT:
|
||||
case EXT_CTRL_CODE_SHIFT_RIGHT:
|
||||
case EXT_CTRL_CODE_SHIFT_DOWN:
|
||||
case EXT_CTRL_CODE_CLEAR:
|
||||
case EXT_CTRL_CODE_SKIP:
|
||||
@ -1564,7 +1564,7 @@ u8 RenderTextHandleBold(u8 *pixels, u8 fontId, u8 *str)
|
||||
case EXT_CTRL_CODE_MIN_LETTER_SPACING:
|
||||
++strPos;
|
||||
break;
|
||||
case EXT_CTRL_CODE_RESET_SIZE:
|
||||
case EXT_CTRL_CODE_RESET_FONT:
|
||||
case EXT_CTRL_CODE_PAUSE_UNTIL_PRESS:
|
||||
case EXT_CTRL_CODE_WAIT_SE:
|
||||
case EXT_CTRL_CODE_FILL_WINDOW:
|
||||
|
19
graphics/battle_anims/sprites/new/teapot.pal
Normal file
@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
10 247 12
|
||||
144 141 173
|
||||
255 255 255
|
||||
207 232 255
|
||||
106 104 120
|
||||
190 211 255
|
||||
166 169 214
|
||||
214 171 113
|
||||
162 119 89
|
||||
72 71 81
|
||||
251 255 211
|
||||
232 207 121
|
||||
255 255 153
|
||||
124 86 73
|
||||
0 0 0
|
||||
0 0 0
|
BIN
graphics/battle_anims/sprites/new/teapot.png
Normal file
After Width: | Height: | Size: 881 B |
Before Width: | Height: | Size: 103 B After Width: | Height: | Size: 103 B |
Before Width: | Height: | Size: 167 B After Width: | Height: | Size: 167 B |
Before Width: | Height: | Size: 156 B After Width: | Height: | Size: 156 B |
19
graphics/interface/red.pal
Normal file
@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
115 164 197
|
||||
255 82 0
|
||||
131 32 0
|
||||
255 0 255
|
||||
255 0 255
|
||||
255 0 255
|
||||
255 0 255
|
||||
255 0 255
|
||||
255 0 255
|
||||
255 0 255
|
||||
255 0 255
|
||||
255 0 255
|
||||
255 0 255
|
||||
255 0 255
|
||||
255 0 255
|
||||
255 0 255
|
Before Width: | Height: | Size: 197 B After Width: | Height: | Size: 197 B |
@ -1,259 +0,0 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
256
|
||||
0 0 0
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
57 57 57
|
||||
172 123 0
|
||||
90 90 90
|
||||
57 57 57
|
||||
164 164 164
|
||||
255 180 0
|
||||
106 106 106
|
||||
74 74 74
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
0 0 0
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
74 246 255
|
||||
57 57 57
|
||||
172 123 0
|
||||
90 90 90
|
||||
57 57 57
|
||||
164 164 164
|
||||
255 180 0
|
||||
106 106 106
|
||||
74 74 74
|
||||
0 0 0
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
74 246 255
|
||||
57 213 230
|
||||
57 57 57
|
||||
172 123 0
|
||||
90 90 90
|
||||
57 57 57
|
||||
164 164 164
|
||||
255 180 0
|
||||
106 106 106
|
||||
74 74 74
|
||||
0 0 0
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
74 246 255
|
||||
57 213 230
|
||||
49 180 205
|
||||
0 32 98
|
||||
172 123 0
|
||||
90 90 90
|
||||
57 57 57
|
||||
164 164 164
|
||||
255 180 0
|
||||
106 106 106
|
||||
74 74 74
|
||||
0 0 0
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
74 246 255
|
||||
57 213 230
|
||||
49 180 205
|
||||
41 148 180
|
||||
0 32 98
|
||||
172 123 0
|
||||
90 90 90
|
||||
57 57 57
|
||||
164 164 164
|
||||
255 180 0
|
||||
106 106 106
|
||||
74 74 74
|
||||
0 0 0
|
||||
90 90 90
|
||||
90 90 90
|
||||
74 246 255
|
||||
57 213 230
|
||||
49 180 205
|
||||
41 148 180
|
||||
24 123 164
|
||||
0 32 98
|
||||
172 123 0
|
||||
90 90 90
|
||||
57 57 57
|
||||
164 164 164
|
||||
255 180 0
|
||||
106 106 106
|
||||
74 74 74
|
||||
0 0 0
|
||||
90 90 90
|
||||
74 246 255
|
||||
57 213 230
|
||||
49 180 205
|
||||
41 148 180
|
||||
24 123 164
|
||||
16 90 139
|
||||
0 32 98
|
||||
172 123 0
|
||||
90 90 90
|
||||
57 57 57
|
||||
164 164 164
|
||||
255 180 0
|
||||
106 106 106
|
||||
74 74 74
|
||||
0 0 0
|
||||
74 246 255
|
||||
57 213 230
|
||||
49 180 205
|
||||
41 148 180
|
||||
24 123 164
|
||||
16 90 139
|
||||
8 57 115
|
||||
0 32 98
|
||||
172 123 0
|
||||
90 90 90
|
||||
57 57 57
|
||||
164 164 164
|
||||
255 180 0
|
||||
106 106 106
|
||||
74 74 74
|
||||
0 0 0
|
||||
57 213 230
|
||||
49 180 205
|
||||
41 148 180
|
||||
24 123 164
|
||||
16 90 139
|
||||
8 57 115
|
||||
8 57 115
|
||||
57 57 57
|
||||
172 123 0
|
||||
90 90 90
|
||||
57 57 57
|
||||
164 164 164
|
||||
255 180 0
|
||||
106 106 106
|
||||
74 74 74
|
||||
0 0 0
|
||||
49 180 205
|
||||
41 148 180
|
||||
24 123 164
|
||||
16 90 139
|
||||
8 57 115
|
||||
8 57 115
|
||||
90 90 90
|
||||
57 57 57
|
||||
172 123 0
|
||||
90 90 90
|
||||
57 57 57
|
||||
164 164 164
|
||||
255 180 0
|
||||
106 106 106
|
||||
74 74 74
|
||||
0 0 0
|
||||
41 148 180
|
||||
24 123 164
|
||||
16 90 139
|
||||
8 57 115
|
||||
8 57 115
|
||||
90 90 90
|
||||
90 90 90
|
||||
57 57 57
|
||||
172 123 0
|
||||
90 90 90
|
||||
57 57 57
|
||||
164 164 164
|
||||
255 180 0
|
||||
106 106 106
|
||||
74 74 74
|
||||
0 0 0
|
||||
24 123 164
|
||||
16 90 139
|
||||
8 57 115
|
||||
8 57 115
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
57 57 57
|
||||
172 123 0
|
||||
90 90 90
|
||||
57 57 57
|
||||
164 164 164
|
||||
255 180 0
|
||||
106 106 106
|
||||
74 74 74
|
||||
0 0 0
|
||||
16 90 139
|
||||
8 57 115
|
||||
8 57 115
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
57 57 57
|
||||
172 123 0
|
||||
90 90 90
|
||||
57 57 57
|
||||
164 164 164
|
||||
255 180 0
|
||||
106 106 106
|
||||
74 74 74
|
||||
0 0 0
|
||||
8 57 115
|
||||
8 57 115
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
57 57 57
|
||||
172 123 0
|
||||
90 90 90
|
||||
57 57 57
|
||||
164 164 164
|
||||
255 180 0
|
||||
106 106 106
|
||||
74 74 74
|
||||
0 0 0
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
57 57 57
|
||||
172 123 0
|
||||
90 90 90
|
||||
57 57 57
|
||||
164 164 164
|
||||
255 180 0
|
||||
106 106 106
|
||||
74 74 74
|
Before Width: | Height: | Size: 1.2 KiB |
19
graphics/wireless_status_screen/anim_00.pal
Normal file
@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
0 0 0
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
74 246 255
|
||||
57 57 57
|
||||
172 123 0
|
||||
90 90 90
|
||||
57 57 57
|
||||
164 164 164
|
||||
255 180 0
|
||||
106 106 106
|
||||
74 74 74
|
19
graphics/wireless_status_screen/anim_01.pal
Normal file
@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
0 0 0
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
74 246 255
|
||||
57 213 230
|
||||
57 57 57
|
||||
172 123 0
|
||||
90 90 90
|
||||
57 57 57
|
||||
164 164 164
|
||||
255 180 0
|
||||
106 106 106
|
||||
74 74 74
|
19
graphics/wireless_status_screen/anim_02.pal
Normal file
@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
0 0 0
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
74 246 255
|
||||
57 213 230
|
||||
49 180 205
|
||||
0 32 98
|
||||
172 123 0
|
||||
90 90 90
|
||||
57 57 57
|
||||
164 164 164
|
||||
255 180 0
|
||||
106 106 106
|
||||
74 74 74
|
19
graphics/wireless_status_screen/anim_03.pal
Normal file
@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
0 0 0
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
74 246 255
|
||||
57 213 230
|
||||
49 180 205
|
||||
41 148 180
|
||||
0 32 98
|
||||
172 123 0
|
||||
90 90 90
|
||||
57 57 57
|
||||
164 164 164
|
||||
255 180 0
|
||||
106 106 106
|
||||
74 74 74
|
19
graphics/wireless_status_screen/anim_04.pal
Normal file
@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
0 0 0
|
||||
90 90 90
|
||||
90 90 90
|
||||
74 246 255
|
||||
57 213 230
|
||||
49 180 205
|
||||
41 148 180
|
||||
24 123 164
|
||||
0 32 98
|
||||
172 123 0
|
||||
90 90 90
|
||||
57 57 57
|
||||
164 164 164
|
||||
255 180 0
|
||||
106 106 106
|
||||
74 74 74
|
19
graphics/wireless_status_screen/anim_05.pal
Normal file
@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
0 0 0
|
||||
90 90 90
|
||||
74 246 255
|
||||
57 213 230
|
||||
49 180 205
|
||||
41 148 180
|
||||
24 123 164
|
||||
16 90 139
|
||||
0 32 98
|
||||
172 123 0
|
||||
90 90 90
|
||||
57 57 57
|
||||
164 164 164
|
||||
255 180 0
|
||||
106 106 106
|
||||
74 74 74
|
19
graphics/wireless_status_screen/anim_06.pal
Normal file
@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
0 0 0
|
||||
74 246 255
|
||||
57 213 230
|
||||
49 180 205
|
||||
41 148 180
|
||||
24 123 164
|
||||
16 90 139
|
||||
8 57 115
|
||||
0 32 98
|
||||
172 123 0
|
||||
90 90 90
|
||||
57 57 57
|
||||
164 164 164
|
||||
255 180 0
|
||||
106 106 106
|
||||
74 74 74
|
19
graphics/wireless_status_screen/anim_07.pal
Normal file
@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
0 0 0
|
||||
57 213 230
|
||||
49 180 205
|
||||
41 148 180
|
||||
24 123 164
|
||||
16 90 139
|
||||
8 57 115
|
||||
8 57 115
|
||||
57 57 57
|
||||
172 123 0
|
||||
90 90 90
|
||||
57 57 57
|
||||
164 164 164
|
||||
255 180 0
|
||||
106 106 106
|
||||
74 74 74
|
19
graphics/wireless_status_screen/anim_08.pal
Normal file
@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
0 0 0
|
||||
49 180 205
|
||||
41 148 180
|
||||
24 123 164
|
||||
16 90 139
|
||||
8 57 115
|
||||
8 57 115
|
||||
90 90 90
|
||||
57 57 57
|
||||
172 123 0
|
||||
90 90 90
|
||||
57 57 57
|
||||
164 164 164
|
||||
255 180 0
|
||||
106 106 106
|
||||
74 74 74
|
19
graphics/wireless_status_screen/anim_09.pal
Normal file
@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
0 0 0
|
||||
41 148 180
|
||||
24 123 164
|
||||
16 90 139
|
||||
8 57 115
|
||||
8 57 115
|
||||
90 90 90
|
||||
90 90 90
|
||||
57 57 57
|
||||
172 123 0
|
||||
90 90 90
|
||||
57 57 57
|
||||
164 164 164
|
||||
255 180 0
|
||||
106 106 106
|
||||
74 74 74
|
19
graphics/wireless_status_screen/anim_10.pal
Normal file
@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
0 0 0
|
||||
24 123 164
|
||||
16 90 139
|
||||
8 57 115
|
||||
8 57 115
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
57 57 57
|
||||
172 123 0
|
||||
90 90 90
|
||||
57 57 57
|
||||
164 164 164
|
||||
255 180 0
|
||||
106 106 106
|
||||
74 74 74
|
19
graphics/wireless_status_screen/anim_11.pal
Normal file
@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
0 0 0
|
||||
16 90 139
|
||||
8 57 115
|
||||
8 57 115
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
57 57 57
|
||||
172 123 0
|
||||
90 90 90
|
||||
57 57 57
|
||||
164 164 164
|
||||
255 180 0
|
||||
106 106 106
|
||||
74 74 74
|
19
graphics/wireless_status_screen/anim_12.pal
Normal file
@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
0 0 0
|
||||
8 57 115
|
||||
8 57 115
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
57 57 57
|
||||
172 123 0
|
||||
90 90 90
|
||||
57 57 57
|
||||
164 164 164
|
||||
255 180 0
|
||||
106 106 106
|
||||
74 74 74
|
19
graphics/wireless_status_screen/anim_13.pal
Normal file
@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
0 0 0
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
57 57 57
|
||||
172 123 0
|
||||
90 90 90
|
||||
57 57 57
|
||||
164 164 164
|
||||
255 180 0
|
||||
106 106 106
|
||||
74 74 74
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
BIN
graphics/wireless_status_screen/bg.png
Normal file
After Width: | Height: | Size: 490 B |
19
graphics/wireless_status_screen/default.pal
Normal file
@ -0,0 +1,19 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
16
|
||||
0 0 0
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
90 90 90
|
||||
57 57 57
|
||||
172 123 0
|
||||
90 90 90
|
||||
57 57 57
|
||||
164 164 164
|
||||
255 180 0
|
||||
106 106 106
|
||||
74 74 74
|
@ -109,40 +109,6 @@ $(TILESETGFXDIR)/secondary/pacifidlog/tiles.4bpp: %.4bpp: %.png
|
||||
$(TILESETGFXDIR)/secondary/sootopolis/tiles.4bpp: %.4bpp: %.png
|
||||
$(GFX) $< $@ -num_tiles 328 -Wnum_tiles
|
||||
|
||||
SOOTOPOLISANIMDIR := $(TILESETGFXDIR)/secondary/sootopolis/anim
|
||||
|
||||
$(SOOTOPOLISANIMDIR)/stormy_water/0.4bpp: $(SOOTOPOLISANIMDIR)/stormy_water/0_kyogre.4bpp \
|
||||
$(SOOTOPOLISANIMDIR)/stormy_water/0_groudon.4bpp
|
||||
@cat $^ >$@
|
||||
|
||||
$(SOOTOPOLISANIMDIR)/stormy_water/1.4bpp: $(SOOTOPOLISANIMDIR)/stormy_water/1_kyogre.4bpp \
|
||||
$(SOOTOPOLISANIMDIR)/stormy_water/1_groudon.4bpp
|
||||
@cat $^ >$@
|
||||
|
||||
$(SOOTOPOLISANIMDIR)/stormy_water/2.4bpp: $(SOOTOPOLISANIMDIR)/stormy_water/2_kyogre.4bpp \
|
||||
$(SOOTOPOLISANIMDIR)/stormy_water/2_groudon.4bpp
|
||||
@cat $^ >$@
|
||||
|
||||
$(SOOTOPOLISANIMDIR)/stormy_water/3.4bpp: $(SOOTOPOLISANIMDIR)/stormy_water/3_kyogre.4bpp \
|
||||
$(SOOTOPOLISANIMDIR)/stormy_water/3_groudon.4bpp
|
||||
@cat $^ >$@
|
||||
|
||||
$(SOOTOPOLISANIMDIR)/stormy_water/4.4bpp: $(SOOTOPOLISANIMDIR)/stormy_water/4_kyogre.4bpp \
|
||||
$(SOOTOPOLISANIMDIR)/stormy_water/4_groudon.4bpp
|
||||
@cat $^ >$@
|
||||
|
||||
$(SOOTOPOLISANIMDIR)/stormy_water/5.4bpp: $(SOOTOPOLISANIMDIR)/stormy_water/5_kyogre.4bpp \
|
||||
$(SOOTOPOLISANIMDIR)/stormy_water/5_groudon.4bpp
|
||||
@cat $^ >$@
|
||||
|
||||
$(SOOTOPOLISANIMDIR)/stormy_water/6.4bpp: $(SOOTOPOLISANIMDIR)/stormy_water/6_kyogre.4bpp \
|
||||
$(SOOTOPOLISANIMDIR)/stormy_water/6_groudon.4bpp
|
||||
@cat $^ >$@
|
||||
|
||||
$(SOOTOPOLISANIMDIR)/stormy_water/7.4bpp: $(SOOTOPOLISANIMDIR)/stormy_water/7_kyogre.4bpp \
|
||||
$(SOOTOPOLISANIMDIR)/stormy_water/7_groudon.4bpp
|
||||
@cat $^ >$@
|
||||
|
||||
$(TILESETGFXDIR)/secondary/battle_frontier_outside_west/tiles.4bpp: %.4bpp: %.png
|
||||
$(GFX) $< $@ -num_tiles 508 -Wnum_tiles
|
||||
|
||||
@ -688,7 +654,7 @@ $(WALLPAPERGFXDIR)/whiscash/tiles.4bpp: $(WALLPAPERGFXDIR)/friends_frame2.4bpp $
|
||||
$(OBJEVENTGFXDIR)/pics/effects/unknown_4F6D38/0.4bpp: %.4bpp: %.png
|
||||
$(GFX) $< $@ -num_tiles 11 -Wnum_tiles
|
||||
|
||||
$(INTERFACEGFXDIR)/selector_outline.4bpp: %.4bpp: %.png
|
||||
$(INTERFACEGFXDIR)/outline_cursor.4bpp: %.4bpp: %.png
|
||||
$(GFX) $< $@ -num_tiles 8 -Wnum_tiles
|
||||
|
||||
$(BATTRANSGFXDIR)/frontier_logo_center.4bpp: %.4bpp: %.png
|
||||
|
@ -53,7 +53,7 @@ struct ResourceFlags
|
||||
#define RESOURCE_FLAG_FLASH_FIRE 0x1
|
||||
#define RESOURCE_FLAG_ROOST 0x2
|
||||
#define RESOURCE_FLAG_UNBURDEN 0x4
|
||||
#define RESOURCE_FLAG_INTIMIDATED 0x8
|
||||
#define RESOURCE_FLAG_UNUSED 0x8
|
||||
#define RESOURCE_FLAG_TRACED 0x10
|
||||
#define RESOURCE_FLAG_EMERGENCY_EXIT 0x20
|
||||
#define RESOURCE_FLAG_NEUTRALIZING_GAS 0x40
|
||||
@ -104,6 +104,7 @@ struct DisableStruct
|
||||
u8 noRetreat:1;
|
||||
u8 tarShot:1;
|
||||
u8 octolock:1;
|
||||
u8 cudChew:1;
|
||||
};
|
||||
|
||||
struct ProtectStruct
|
||||
@ -155,41 +156,42 @@ struct ProtectStruct
|
||||
|
||||
struct SpecialStatus
|
||||
{
|
||||
u8 statLowered:1;
|
||||
u8 lightningRodRedirected:1;
|
||||
u8 restoredBattlerSprite: 1;
|
||||
u8 intimidatedMon:1;
|
||||
u8 traced:1;
|
||||
u8 ppNotAffectedByPressure:1;
|
||||
u8 faintedHasReplacement:1;
|
||||
u8 focusBanded:1;
|
||||
// End of byte
|
||||
u8 focusSashed:1;
|
||||
u8 sturdied:1;
|
||||
u8 stormDrainRedirected:1;
|
||||
u8 switchInAbilityDone:1;
|
||||
u8 switchInItemDone:1;
|
||||
u8 instructedChosenTarget:3;
|
||||
// End of byte
|
||||
u8 berryReduced:1;
|
||||
u8 gemBoost:1;
|
||||
u8 rototillerAffected:1; // to be affected by rototiller
|
||||
u8 parentalBondState:2;
|
||||
u8 multiHitOn:1;
|
||||
// End of byte, two bits unused
|
||||
u8 gemParam;
|
||||
u8 damagedMons:4; // Mons that have been damaged directly by using a move, includes substitute.
|
||||
u8 dancerUsedMove:1;
|
||||
u8 dancerOriginalTarget:3;
|
||||
u8 announceNeutralizingGas:1; // See Cmd_switchineffects
|
||||
u8 neutralizingGasRemoved:1; // See VARIOUS_TRY_END_NEUTRALIZING_GAS
|
||||
u8 affectionEndured:1;
|
||||
s32 dmg;
|
||||
s32 physicalDmg;
|
||||
s32 specialDmg;
|
||||
u8 physicalBattlerId;
|
||||
u8 specialBattlerId;
|
||||
u8 changedStatsBattlerId; // Battler that was responsible for the latest stat change. Can be self.
|
||||
u8 statLowered:1;
|
||||
u8 lightningRodRedirected:1;
|
||||
u8 restoredBattlerSprite: 1;
|
||||
u8 traced:1;
|
||||
u8 ppNotAffectedByPressure:1;
|
||||
u8 faintedHasReplacement:1;
|
||||
u8 focusBanded:1;
|
||||
u8 focusSashed:1;
|
||||
// End of byte
|
||||
u8 sturdied:1;
|
||||
u8 stormDrainRedirected:1;
|
||||
u8 switchInAbilityDone:1;
|
||||
u8 switchInItemDone:1;
|
||||
u8 instructedChosenTarget:3;
|
||||
u8 berryReduced:1;
|
||||
// End of byte
|
||||
u8 gemParam;
|
||||
// End of byte
|
||||
u8 gemBoost:1;
|
||||
u8 rototillerAffected:1; // to be affected by rototiller
|
||||
u8 parentalBondState:2;
|
||||
u8 multiHitOn:1;
|
||||
u8 announceNeutralizingGas:1; // See Cmd_switchineffects
|
||||
u8 neutralizingGasRemoved:1; // See VARIOUS_TRY_END_NEUTRALIZING_GAS
|
||||
u8 affectionEndured:1;
|
||||
// End of byte
|
||||
u8 damagedMons:4; // Mons that have been damaged directly by using a move, includes substitute.
|
||||
u8 dancerUsedMove:1;
|
||||
u8 dancerOriginalTarget:3;
|
||||
// End of byte
|
||||
};
|
||||
|
||||
struct SideTimer
|
||||
@ -240,7 +242,7 @@ struct WishFutureKnock
|
||||
u8 wishCounter[MAX_BATTLERS_COUNT];
|
||||
u8 wishPartyId[MAX_BATTLERS_COUNT];
|
||||
u8 weatherDuration;
|
||||
u8 knockedOffMons[2]; // Each battler is represented by a bit. The array entry is dependent on the battler's side.
|
||||
u8 knockedOffMons[NUM_BATTLE_SIDES]; // Each battler is represented by a bit.
|
||||
};
|
||||
|
||||
struct AI_SavedBattleMon
|
||||
@ -451,9 +453,9 @@ struct BattleTv_Mon
|
||||
|
||||
struct BattleTv
|
||||
{
|
||||
struct BattleTv_Mon mon[2][PARTY_SIZE]; // [side][partyId]
|
||||
struct BattleTv_Position pos[2][2]; // [side][flank]
|
||||
struct BattleTv_Side side[2]; // [side]
|
||||
struct BattleTv_Mon mon[NUM_BATTLE_SIDES][PARTY_SIZE];
|
||||
struct BattleTv_Position pos[NUM_BATTLE_SIDES][2]; // [side][flank]
|
||||
struct BattleTv_Side side[NUM_BATTLE_SIDES];
|
||||
};
|
||||
|
||||
struct BattleTvMovePoints
|
||||
@ -570,20 +572,19 @@ struct BattleStruct
|
||||
u8 wallyWaitFrames;
|
||||
u8 wallyMoveFrames;
|
||||
u16 lastTakenMove[MAX_BATTLERS_COUNT]; // Last move that a battler was hit with.
|
||||
u16 hpOnSwitchout[2];
|
||||
u16 hpOnSwitchout[NUM_BATTLE_SIDES];
|
||||
u32 savedBattleTypeFlags;
|
||||
u16 abilityPreventingSwitchout;
|
||||
u8 hpScale;
|
||||
u16 synchronizeMoveEffect;
|
||||
bool8 anyMonHasTransformed;
|
||||
void (*savedCallback)(void);
|
||||
u16 usedHeldItems[PARTY_SIZE][2]; // For each party member and side. For harvest, recycle
|
||||
u16 usedHeldItems[PARTY_SIZE][NUM_BATTLE_SIDES]; // For each party member and side. For harvest, recycle
|
||||
u16 chosenItem[MAX_BATTLERS_COUNT];
|
||||
u8 AI_itemType[2];
|
||||
u8 AI_itemFlags[2];
|
||||
u16 choicedMove[MAX_BATTLERS_COUNT];
|
||||
u16 changedItems[MAX_BATTLERS_COUNT];
|
||||
u8 intimidateBattler;
|
||||
u8 switchInItemsCounter;
|
||||
u8 arenaTurnCounter;
|
||||
u8 turnSideTracker;
|
||||
@ -611,7 +612,7 @@ struct BattleStruct
|
||||
u8 debugBattler;
|
||||
u8 magnitudeBasePower;
|
||||
u8 presentBasePower;
|
||||
u8 roostTypes[MAX_BATTLERS_COUNT][3];
|
||||
u8 roostTypes[MAX_BATTLERS_COUNT][2];
|
||||
u8 savedBattlerTarget;
|
||||
bool8 ateBoost[MAX_BATTLERS_COUNT];
|
||||
u8 activeAbilityPopUps; // as bits for each battler
|
||||
@ -650,6 +651,7 @@ struct BattleStruct
|
||||
u8 skyDropTargets[MAX_BATTLERS_COUNT]; // For Sky Drop, to account for if multiple Pokemon use Sky Drop in a double battle.
|
||||
// When using a move which hits multiple opponents which is then bounced by a target, we need to make sure, the move hits both opponents, the one with bounce, and the one without.
|
||||
u8 attackerBeforeBounce:2;
|
||||
u8 beatUpSlot:3;
|
||||
u8 targetsDone[MAX_BATTLERS_COUNT]; // Each battler as a bit.
|
||||
u16 overwrittenAbilities[MAX_BATTLERS_COUNT]; // abilities overwritten during battle (keep separate from battle history in case of switching)
|
||||
};
|
||||
@ -916,8 +918,8 @@ extern u16 gMoveResultFlags;
|
||||
extern u32 gHitMarker;
|
||||
extern u8 gTakenDmgByBattler[MAX_BATTLERS_COUNT];
|
||||
extern u8 gUnusedFirstBattleVar2;
|
||||
extern u32 gSideStatuses[2];
|
||||
extern struct SideTimer gSideTimers[2];
|
||||
extern u32 gSideStatuses[NUM_BATTLE_SIDES];
|
||||
extern struct SideTimer gSideTimers[NUM_BATTLE_SIDES];
|
||||
extern u32 gStatuses3[MAX_BATTLERS_COUNT];
|
||||
extern u32 gStatuses4[MAX_BATTLERS_COUNT];
|
||||
extern struct DisableStruct gDisableStructs[MAX_BATTLERS_COUNT];
|
||||
|
@ -1,7 +1,6 @@
|
||||
#ifndef GUARD_BATTLE_BG_H
|
||||
#define GUARD_BATTLE_BG_H
|
||||
|
||||
#if P_ENABLE_DEBUG == TRUE
|
||||
struct BattleBackground
|
||||
{
|
||||
const void *tileset;
|
||||
@ -10,7 +9,6 @@ struct BattleBackground
|
||||
const void *entryTilemap;
|
||||
const void *palette;
|
||||
};
|
||||
#endif
|
||||
|
||||
void BattleInitBgsAndWindows(void);
|
||||
void InitBattleBgsVideo(void);
|
||||
|
@ -1,8 +1,6 @@
|
||||
#ifndef GUARD_BATTLE_MESSAGE_H
|
||||
#define GUARD_BATTLE_MESSAGE_H
|
||||
|
||||
#include "constants/battle_config.h"
|
||||
|
||||
#if B_EXPANDED_ABILITY_NAMES == TRUE
|
||||
#define TEXT_BUFF_ARRAY_COUNT 17
|
||||
#else
|
||||
|
@ -43,6 +43,7 @@ u16 GetNaturePowerMove(void);
|
||||
u16 GetSecretPowerMoveEffect(void);
|
||||
void StealTargetItem(u8 battlerStealer, u8 battlerItem);
|
||||
u8 GetCatchingBattler(void);
|
||||
u32 GetHighestStatId(u32 battlerId);
|
||||
|
||||
extern void (* const gBattleScriptingCommandsTable[])(void);
|
||||
extern const u8 gBattlePalaceNatureToMoveGroupLikelihood[NUM_NATURES][4];
|
||||
|
@ -152,7 +152,6 @@ extern const u8 BattleScript_ShedSkinActivates[];
|
||||
extern const u8 BattleScript_WeatherFormChanges[];
|
||||
extern const u8 BattleScript_WeatherFormChangesLoop[];
|
||||
extern const u8 BattleScript_WeatherFormChange[];
|
||||
extern const u8 BattleScript_IntimidateActivatesEnd3[];
|
||||
extern const u8 BattleScript_IntimidateActivates[];
|
||||
extern const u8 BattleScript_DroughtActivates[];
|
||||
extern const u8 BattleScript_TookAttack[];
|
||||
@ -433,6 +432,22 @@ extern const u8 BattleScript_SymbiosisActivates[];
|
||||
extern const u8 BattleScript_MultiHitPrintStrings[];
|
||||
extern const u8 BattleScript_BurnUpRemoveType[];
|
||||
extern const u8 BattleScript_TargetAbilityStatRaiseRet[];
|
||||
extern const u8 BattleScript_DoubleShockRemoveType[];
|
||||
extern const u8 BattleScript_SeedSowerActivates[];
|
||||
extern const u8 BattleScript_AngerShellActivates[];
|
||||
extern const u8 BattleScript_WellBakedBodyActivates[];
|
||||
extern const u8 BattleScript_WindRiderActivatesMoveEnd[];
|
||||
extern const u8 BattleScript_WindPowerActivates[];
|
||||
extern const u8 BattleScript_WindPowerActivatesEnd2[];
|
||||
extern const u8 BattleScript_ProtosynthesisActivates[];
|
||||
extern const u8 BattleScript_QuarkDriveActivates[];
|
||||
extern const u8 BattleScript_GoodAsGoldActivates[];
|
||||
extern const u8 BattleScript_RuinAbilityActivates[];
|
||||
extern const u8 BattleScript_CudChewActivates[];
|
||||
extern const u8 BattleScript_SupremeOverlordActivates[];
|
||||
extern const u8 BattleScript_CostarActivates[];
|
||||
extern const u8 BattleScript_ToxicDebrisActivates[];
|
||||
extern const u8 BattleScript_EarthEaterActivates[];
|
||||
|
||||
// zmoves
|
||||
extern const u8 BattleScript_ZMoveActivateDamaging[];
|
||||
|
@ -29,13 +29,13 @@
|
||||
#define ABILITYEFFECT_WEATHER_FORM 7
|
||||
#define ABILITYEFFECT_SYNCHRONIZE 8
|
||||
#define ABILITYEFFECT_ATK_SYNCHRONIZE 9
|
||||
#define ABILITYEFFECT_INTIMIDATE1 10
|
||||
#define ABILITYEFFECT_INTIMIDATE2 11
|
||||
#define ABILITYEFFECT_TRACE1 12
|
||||
#define ABILITYEFFECT_TRACE2 13
|
||||
#define ABILITYEFFECT_MOVE_END_OTHER 14
|
||||
#define ABILITYEFFECT_NEUTRALIZINGGAS 15
|
||||
#define ABILITYEFFECT_FIELD_SPORT 16 // Only used if B_SPORT_TURNS < GEN_6
|
||||
#define ABILITYEFFECT_TRACE1 10
|
||||
#define ABILITYEFFECT_TRACE2 11
|
||||
#define ABILITYEFFECT_MOVE_END_OTHER 12
|
||||
#define ABILITYEFFECT_NEUTRALIZINGGAS 13
|
||||
#define ABILITYEFFECT_FIELD_SPORT 14 // Only used if B_SPORT_TURNS < GEN_6
|
||||
#define ABILITYEFFECT_ON_WEATHER 15
|
||||
#define ABILITYEFFECT_ON_TERRAIN 16
|
||||
// Special cases
|
||||
#define ABILITYEFFECT_MUD_SPORT 252 // Only used if B_SPORT_TURNS < GEN_6
|
||||
#define ABILITYEFFECT_WATER_SPORT 253 // Only used if B_SPORT_TURNS < GEN_6
|
||||
@ -144,6 +144,7 @@ u16 CalcTypeEffectivenessMultiplier(u16 move, u8 moveType, u8 battlerAtk, u8 bat
|
||||
u16 CalcPartyMonTypeEffectivenessMultiplier(u16 move, u16 speciesDef, u16 abilityDef);
|
||||
u16 GetTypeModifier(u8 atkType, u8 defType);
|
||||
s32 GetStealthHazardDamage(u8 hazardType, u8 battlerId);
|
||||
s32 GetStealthHazardDamageByTypesAndHP(u8 hazardType, u8 type1, u8 type2, u32 maxHp);
|
||||
u16 GetMegaEvolutionSpecies(u16 preEvoSpecies, u16 heldItemId);
|
||||
u16 GetPrimalReversionSpecies(u16 preEvoSpecies, u16 heldItemId);
|
||||
u16 GetWishMegaEvolutionSpecies(u16 preEvoSpecies, u16 moveId1, u16 moveId2, u16 moveId3, u16 moveId4);
|
||||
@ -204,5 +205,7 @@ bool32 CanBeFrozen(u8 battlerId);
|
||||
bool32 CanBeConfused(u8 battlerId);
|
||||
bool32 IsBattlerTerrainAffected(u8 battlerId, u32 terrainFlag);
|
||||
u32 GetBattlerFriendshipScore(u8 battlerId);
|
||||
u32 CountBattlerStatIncreases(u8 battlerId, bool32 countEvasionAcc);
|
||||
bool32 IsMyceliumMightOnField(void);
|
||||
|
||||
#endif // GUARD_BATTLE_UTIL_H
|
||||
|
@ -70,6 +70,7 @@
|
||||
#define GEN_6 3
|
||||
#define GEN_7 4
|
||||
#define GEN_8 5
|
||||
#define GEN_9 6
|
||||
#define GEN_LATEST GEN_8
|
||||
|
||||
#endif // GUARD_CONFIG_H
|
||||
|
@ -1,5 +1,5 @@
|
||||
#ifndef GUARD_CONSTANTS_BATTLE_CONFIG_H
|
||||
#define GUARD_CONSTANTS_BATTLE_CONFIG_H
|
||||
#ifndef GUARD_CONFIG_BATTLE_H
|
||||
#define GUARD_CONFIG_BATTLE_H
|
||||
|
||||
// Calculation settings
|
||||
#define B_CRIT_CHANCE GEN_LATEST // Chances of a critical hit landing. See CalcCritChanceStage. Gen6+ chances guarantee that Farfetch'd and Sirfetch'd always get critical hits while holding a Leek and using high-crit ratio moves.
|
||||
@ -30,6 +30,7 @@
|
||||
#define B_SPORT_DMG_REDUCTION GEN_LATEST // In Gen5+, Water/Mud Sport reduce Fire/Electric Damage by 67% instead of 50%.
|
||||
#define B_EXPLOSION_DEFENSE GEN_LATEST // In Gen5+, Self-Destruct and Explosion don't halve the targets' defense.
|
||||
#define B_PARENTAL_BOND_DMG GEN_LATEST // In Gen7+, Parental Bond's second hit does 25% of the initial hits damage. Before, it did 50%.
|
||||
#define B_MULTIPLE_TARGETS_DMG GEN_LATEST // In Gen4+, damage dealt by moves that hit multiple targets at once is reduced to 75%. Before, it was 50%.
|
||||
|
||||
// Type settings
|
||||
#define B_GHOSTS_ESCAPE GEN_LATEST // In Gen6+, abilities like Shadow Tag or moves like Mean Look fail on Ghost-type Pokémon. They can also escape any Wild Battle.
|
||||
@ -38,6 +39,7 @@
|
||||
#define B_STEEL_RESISTANCES GEN_LATEST // In Gen6+, Steel-type Pokémon are no longer resistant to Dark-type and Ghost-type moves.
|
||||
#define B_PRANKSTER_DARK_TYPES GEN_LATEST // In Gen7+, Prankster-elevated status moves do not affect Dark type Pokémon.
|
||||
#define B_SHEER_COLD_IMMUNITY GEN_LATEST // In Gen7+, Ice-types are immune to Sheer Cold
|
||||
#define B_ROOST_PURE_FLYING GEN_LATEST // In Gen5+, Roost makes pure Flying-types into Normal-type.
|
||||
|
||||
// Turn settings
|
||||
#define B_BINDING_TURNS GEN_LATEST // In Gen5+, binding moves last for 4-5 turns instead of 2-5 turns. (With Grip Claw, 7 and 5 turns respectively.)
|
||||
@ -109,6 +111,8 @@
|
||||
#define B_PLUS_MINUS_INTERACTION GEN_LATEST // In Gen5+, Plus and Minus can be activated with themselves and the opposite ability. Before, only the opposing ability could activate it.
|
||||
#define B_WEATHER_FORMS GEN_LATEST // In Gen5+, Castform and Cherrim revert to their base form upon losing their respective ability. Cherrim needs Flower Gift to swap forms.
|
||||
#define B_SYMBIOSIS_GEMS GEN_LATEST // In Gen7+, Symbiosis passes an item after a gem-boosted attack. Previously, items are passed before the gem-boosted attack hits, making the item effect apply.
|
||||
#define B_CHECK_IF_CHARGED_UP TRUE // If set to TRUE, certain abilities such as Electromorphosis WILL check if the STATUS3_CHARGED_UP status flag is applied.
|
||||
#define B_ABSORBING_ABILITY_STRING GEN_LATEST // In Gen5+, the abilities that absorb moves of a certain type use a generic string for stat increases and decreases.
|
||||
|
||||
// Item settings
|
||||
#define B_HP_BERRIES GEN_LATEST // In Gen4+, berries which restore hp activate immediately after HP drops to half. In Gen3, the effect occurs at the end of the turn.
|
||||
@ -197,6 +201,4 @@
|
||||
#define B_NEW_IMPACT_PALETTE FALSE // If set to TRUE, it updates the basic 'hit' palette.
|
||||
#define B_NEW_SURF_PARTICLE_PALETTE FALSE // If set to TRUE, it updates Surf's wave palette.
|
||||
|
||||
#define B_ENABLE_DEBUG TRUE // If set to TRUE, enables a debug menu to use in battles by pressing the Select button.
|
||||
|
||||
#endif // GUARD_CONSTANTS_BATTLE_CONFIG_H
|
||||
#endif // GUARD_CONFIG_BATTLE_H
|
21
include/config/debug.h
Normal file
@ -0,0 +1,21 @@
|
||||
#ifndef GUARD_CONFIG_DEBUG_H
|
||||
#define GUARD_CONFIG_DEBUG_H
|
||||
|
||||
// Overworld Debug
|
||||
#define DEBUG_OVERWORLD_MENU TRUE // Enables a overworld debug menu for changing flags, variables, giving pokemon and more, accessed by holding R and pressing START while in the overworld by default.
|
||||
#define DEBUG_OVERWORLD_HELD_KEYS (R_BUTTON) // The keys required to be held to open the debug menu.
|
||||
#define DEBUG_OVERWORLD_TRIGGER_EVENT pressedStartButton // The event that opens the menu when holding the key(s) defined in DEBUG_OVERWORLD_HELD_KEYS.
|
||||
#define DEBUG_OVERWORLD_IN_MENU FALSE // Replaces the overworld debug menu button combination with a start menu entry (above Pokédex).
|
||||
|
||||
// Debug Flags
|
||||
// To use the following debug features, replace the 0s with the flag ID you're assigning it to.
|
||||
// Eg: Replace with FLAG_UNUSED_0x264 so you can use that flag to toggle the feature.
|
||||
#define DEBUG_FLAG_NO_COLLISION 0 // If this flag is set, the debug function in the Utility submenu to disable player collision can be used.
|
||||
|
||||
// Battle Debug Menu
|
||||
#define DEBUG_BATTLE_MENU TRUE // If set to TRUE, enables a debug menu to use in battles by pressing the Select button.
|
||||
|
||||
// Pokémon Debug
|
||||
#define DEBUG_POKEMON_MENU TRUE // Enables a debug menu for pokemon sprites and icons, accessed by pressing SELECT in the summary screen.
|
||||
|
||||
#endif // GUARD_CONFIG_DEBUG_H
|
@ -1,5 +1,5 @@
|
||||
#ifndef GUARD_CONSTANTS_ITEM_CONFIG_H
|
||||
#define GUARD_CONSTANTS_ITEM_CONFIG_H
|
||||
#ifndef GUARD_CONFIG_ITEM_H
|
||||
#define GUARD_CONFIG_ITEM_H
|
||||
|
||||
// Item config
|
||||
#define I_SHINY_CHARM_REROLLS 3 // Amount of re-rolls if the player has the Shiny Charm. Set to 0 to disable Shiny Charm's effects.
|
||||
@ -14,4 +14,4 @@
|
||||
#define VAR_LAST_REPEL_LURE_USED 0 // If this var has been assigned, last Repel/Lure used will be saved and the player will get prompted with the vanilla repel YES/NO option, unless I_REPEL_LURE_MENU is set to TRUE.
|
||||
#define I_REPEL_LURE_MENU TRUE // If TRUE, the player is able to choose which Repel/Lure to use once the previous one runs out. Cursor position is saved by VAR_LAST_REPEL_LURE_USED if not 0.
|
||||
|
||||
#endif // GUARD_CONSTANTS_ITEM_CONFIG_H
|
||||
#endif // GUARD_CONFIG_ITEM_H
|
13
include/config/overworld.h
Normal file
@ -0,0 +1,13 @@
|
||||
#ifndef GUARD_CONFIG_OVERWORLD_H
|
||||
#define GUARD_CONFIG_OVERWORLD_H
|
||||
|
||||
// Movement config
|
||||
#define OW_RUNNING_INDOORS GEN_LATEST // In Gen4+, players are allowed to run indoors.
|
||||
|
||||
// Overworld flags
|
||||
// To use the following features in scripting, replace the 0s with the flag ID you're assigning it to.
|
||||
// Eg: Replace with FLAG_UNUSED_0x264 so you can use that flag to toggle the feature.
|
||||
#define OW_FLAG_NO_ENCOUNTER 0 // If this flag is set, wild encounters will be disabled.
|
||||
#define OW_FLAG_NO_TRAINER_SEE 0 // If this flag is set, trainers will not battle the player unless they're talked to.
|
||||
|
||||
#endif // GUARD_CONFIG_OVERWORLD_H
|
@ -1,5 +1,5 @@
|
||||
#ifndef GUARD_CONSTANTS_POKEMON_CONFIG_H
|
||||
#define GUARD_CONSTANTS_POKEMON_CONFIG_H
|
||||
#ifndef GUARD_CONFIG_POKEMON_H
|
||||
#define GUARD_CONFIG_POKEMON_H
|
||||
|
||||
#define P_UPDATED_TYPES GEN_LATEST // Since Gen 6, several Pokémon were changed to be partially or fully Fairy type.
|
||||
#define P_UPDATED_STATS GEN_LATEST // Since Gen 6, Pokémon stats are updated with each passing generation.
|
||||
@ -10,6 +10,12 @@
|
||||
#define P_KADABRA_EVERSTONE GEN_LATEST // Since Gen 4, Kadabra can evolve even when holding an Everstone.
|
||||
#define P_NIDORAN_M_DITTO_BREED GEN_LATEST // Since Gen 5, when Nidoran♂ breeds with Ditto it can produce Nidoran♀ offspring. Before, it would only yield male offspring. This change also applies to Volbeat.
|
||||
|
||||
// Flag settings
|
||||
// To use the following features in scripting, replace the 0s with the flag ID you're assigning it to.
|
||||
// Eg: Replace with FLAG_UNUSED_0x264 so you can use that flag to toggle the feature.
|
||||
#define P_FLAG_FORCE_SHINY 0 // If this flag is set, all wild and gift Pokémon will forced into being Shiny.
|
||||
#define P_FLAG_FORCE_NO_SHINY 0 // If this flag is set, all wild and gift Pokémon will forced into NOT being Shiny.
|
||||
|
||||
// Modifying the latest generation WILL change the saveblock due to Dex flags and will require a new save file.
|
||||
// Forms are kept based on the base species, Eg: Meowth and Persian will keep all of their forms, but Perrserker will not be available if P_GEN_8_POKEMON is set to FALSE.
|
||||
// If you're disabling a generation previous to others (eg: Gen 5 but not Gen 6, 7 and 8),
|
||||
@ -20,6 +26,4 @@
|
||||
#define P_GEN_7_POKEMON TRUE // Generation 7 Pokémon (SM, USUM, LGPE)
|
||||
#define P_GEN_8_POKEMON TRUE // Generation 8 Pokémon (SwSh, BDSP, LA)
|
||||
|
||||
#define P_ENABLE_DEBUG TRUE // Enables a debug menu for pokemon sprites and icons, accessed by pressing SELECT in the summary screen.
|
||||
|
||||
#endif // GUARD_CONSTANTS_POKEMON_CONFIG_H
|
||||
#endif // GUARD_CONFIG_POKEMON_H
|
@ -292,6 +292,41 @@
|
||||
|
||||
#define ABILITIES_COUNT_GEN8 268
|
||||
|
||||
#define ABILITIES_COUNT ABILITIES_COUNT_GEN8
|
||||
// Gen 9
|
||||
#define ABILITY_LINGERING_AROMA 268
|
||||
#define ABILITY_SEED_SOWER 269
|
||||
#define ABILITY_THERMAL_EXCHANGE 270
|
||||
#define ABILITY_ANGER_SHELL 271
|
||||
#define ABILITY_PURIFYING_SALT 272
|
||||
#define ABILITY_WELL_BAKED_BODY 273
|
||||
#define ABILITY_WIND_RIDER 274
|
||||
#define ABILITY_GUARD_DOG 275
|
||||
#define ABILITY_ROCKY_PAYLOAD 276
|
||||
#define ABILITY_WIND_POWER 277
|
||||
#define ABILITY_ZERO_TO_HERO 278
|
||||
#define ABILITY_COMMANDER 279
|
||||
#define ABILITY_ELECTROMORPHOSIS 280
|
||||
#define ABILITY_PROTOSYNTHESIS 281
|
||||
#define ABILITY_QUARK_DRIVE 282
|
||||
#define ABILITY_GOOD_AS_GOLD 283
|
||||
#define ABILITY_VESSEL_OF_RUIN 284
|
||||
#define ABILITY_SWORD_OF_RUIN 285
|
||||
#define ABILITY_TABLETS_OF_RUIN 286
|
||||
#define ABILITY_BEADS_OF_RUIN 287
|
||||
#define ABILITY_ORICHALCUM_PULSE 288
|
||||
#define ABILITY_HADRON_ENGINE 289
|
||||
#define ABILITY_OPPORTUNIST 290
|
||||
#define ABILITY_CUD_CHEW 291
|
||||
#define ABILITY_SHARPNESS 292
|
||||
#define ABILITY_SUPREME_OVERLORD 293
|
||||
#define ABILITY_COSTAR 294
|
||||
#define ABILITY_TOXIC_DEBRIS 295
|
||||
#define ABILITY_ARMOR_TAIL 296
|
||||
#define ABILITY_EARTH_EATER 297
|
||||
#define ABILITY_MYCELIUM_MIGHT 298
|
||||
|
||||
#define ABILITIES_COUNT_GEN9 299
|
||||
|
||||
#define ABILITIES_COUNT ABILITIES_COUNT_GEN9
|
||||
|
||||
#endif // GUARD_CONSTANTS_ABILITIES_H
|
||||
|
@ -36,6 +36,7 @@
|
||||
|
||||
#define B_SIDE_PLAYER 0
|
||||
#define B_SIDE_OPPONENT 1
|
||||
#define NUM_BATTLE_SIDES 2
|
||||
|
||||
#define B_FLANK_LEFT 0
|
||||
#define B_FLANK_RIGHT 1
|
||||
@ -298,79 +299,80 @@
|
||||
#define ENUM_WEATHER_STRONG_WINDS 7
|
||||
|
||||
// Move Effects
|
||||
#define MOVE_EFFECT_SLEEP 0x1
|
||||
#define MOVE_EFFECT_POISON 0x2
|
||||
#define MOVE_EFFECT_BURN 0x3
|
||||
#define MOVE_EFFECT_FREEZE 0x4
|
||||
#define MOVE_EFFECT_PARALYSIS 0x5
|
||||
#define MOVE_EFFECT_TOXIC 0x6
|
||||
#define MOVE_EFFECT_SLEEP 1
|
||||
#define MOVE_EFFECT_POISON 2
|
||||
#define MOVE_EFFECT_BURN 3
|
||||
#define MOVE_EFFECT_FREEZE 4
|
||||
#define MOVE_EFFECT_PARALYSIS 5
|
||||
#define MOVE_EFFECT_TOXIC 6
|
||||
#define PRIMARY_STATUS_MOVE_EFFECT MOVE_EFFECT_TOXIC // All above move effects apply primary status
|
||||
#define MOVE_EFFECT_CONFUSION 0x7
|
||||
#define MOVE_EFFECT_FLINCH 0x8
|
||||
#define MOVE_EFFECT_TRI_ATTACK 0x9
|
||||
#define MOVE_EFFECT_UPROAR 0xA
|
||||
#define MOVE_EFFECT_PAYDAY 0xB
|
||||
#define MOVE_EFFECT_CHARGING 0xC
|
||||
#define MOVE_EFFECT_WRAP 0xD
|
||||
#define MOVE_EFFECT_BURN_UP 0xE // MOVE_EFFECT_BURN_UP replaces unused MOVE_EFFECT_RECOIL_25 so that stat change animations don't break
|
||||
#define MOVE_EFFECT_ATK_PLUS_1 0xF
|
||||
#define MOVE_EFFECT_DEF_PLUS_1 0x10
|
||||
#define MOVE_EFFECT_SPD_PLUS_1 0x11
|
||||
#define MOVE_EFFECT_SP_ATK_PLUS_1 0x12
|
||||
#define MOVE_EFFECT_SP_DEF_PLUS_1 0x13
|
||||
#define MOVE_EFFECT_ACC_PLUS_1 0x14
|
||||
#define MOVE_EFFECT_EVS_PLUS_1 0x15
|
||||
#define MOVE_EFFECT_ATK_MINUS_1 0x16
|
||||
#define MOVE_EFFECT_DEF_MINUS_1 0x17
|
||||
#define MOVE_EFFECT_SPD_MINUS_1 0x18
|
||||
#define MOVE_EFFECT_SP_ATK_MINUS_1 0x19
|
||||
#define MOVE_EFFECT_SP_DEF_MINUS_1 0x1A
|
||||
#define MOVE_EFFECT_ACC_MINUS_1 0x1B
|
||||
#define MOVE_EFFECT_EVS_MINUS_1 0x1C
|
||||
#define MOVE_EFFECT_RECHARGE 0x1D
|
||||
#define MOVE_EFFECT_RAGE 0x1E
|
||||
#define MOVE_EFFECT_STEAL_ITEM 0x1F
|
||||
#define MOVE_EFFECT_PREVENT_ESCAPE 0x20
|
||||
#define MOVE_EFFECT_NIGHTMARE 0x21
|
||||
#define MOVE_EFFECT_ALL_STATS_UP 0x22
|
||||
#define MOVE_EFFECT_RAPIDSPIN 0x23
|
||||
#define MOVE_EFFECT_REMOVE_STATUS 0x24
|
||||
#define MOVE_EFFECT_ATK_DEF_DOWN 0x25
|
||||
#define MOVE_EFFECT_SCALE_SHOT 0x26 // MOVE_EFFECT_SCALE_SHOT replaces unused MOVE_EFFECT_RECOIL_33 so that stat change animations don't break
|
||||
#define MOVE_EFFECT_ATK_PLUS_2 0x27
|
||||
#define MOVE_EFFECT_DEF_PLUS_2 0x28
|
||||
#define MOVE_EFFECT_SPD_PLUS_2 0x29
|
||||
#define MOVE_EFFECT_SP_ATK_PLUS_2 0x2A
|
||||
#define MOVE_EFFECT_SP_DEF_PLUS_2 0x2B
|
||||
#define MOVE_EFFECT_ACC_PLUS_2 0x2C
|
||||
#define MOVE_EFFECT_EVS_PLUS_2 0x2D
|
||||
#define MOVE_EFFECT_ATK_MINUS_2 0x2E
|
||||
#define MOVE_EFFECT_DEF_MINUS_2 0x2F
|
||||
#define MOVE_EFFECT_SPD_MINUS_2 0x30
|
||||
#define MOVE_EFFECT_SP_ATK_MINUS_2 0x31
|
||||
#define MOVE_EFFECT_SP_DEF_MINUS_2 0x32
|
||||
#define MOVE_EFFECT_ACC_MINUS_2 0x33
|
||||
#define MOVE_EFFECT_EVS_MINUS_2 0x34
|
||||
#define MOVE_EFFECT_THRASH 0x35
|
||||
#define MOVE_EFFECT_KNOCK_OFF 0x36
|
||||
#define MOVE_EFFECT_DEF_SPDEF_DOWN 0x37
|
||||
#define MOVE_EFFECT_CLEAR_SMOG 0x38
|
||||
#define MOVE_EFFECT_SP_ATK_TWO_DOWN 0x39
|
||||
#define MOVE_EFFECT_SMACK_DOWN 0x3A
|
||||
#define MOVE_EFFECT_FLAME_BURST 0x3B
|
||||
#define MOVE_EFFECT_FEINT 0x3C
|
||||
#define MOVE_EFFECT_SPECTRAL_THIEF 0x3D
|
||||
#define MOVE_EFFECT_V_CREATE 0x3E
|
||||
#define MOVE_EFFECT_HAPPY_HOUR 0x3F
|
||||
#define MOVE_EFFECT_CORE_ENFORCER 0x40
|
||||
#define MOVE_EFFECT_THROAT_CHOP 0x41
|
||||
#define MOVE_EFFECT_INCINERATE 0x42
|
||||
#define MOVE_EFFECT_BUG_BITE 0x43
|
||||
#define MOVE_EFFECT_RECOIL_HP_25 0x44
|
||||
#define MOVE_EFFECT_RELIC_SONG 0x45
|
||||
#define MOVE_EFFECT_TRAP_BOTH 0x46
|
||||
#define MOVE_EFFECT_CONFUSION 7
|
||||
#define MOVE_EFFECT_FLINCH 8
|
||||
#define MOVE_EFFECT_TRI_ATTACK 9
|
||||
#define MOVE_EFFECT_UPROAR 10
|
||||
#define MOVE_EFFECT_PAYDAY 11
|
||||
#define MOVE_EFFECT_CHARGING 12
|
||||
#define MOVE_EFFECT_WRAP 13
|
||||
#define MOVE_EFFECT_BURN_UP 14 // MOVE_EFFECT_BURN_UP replaces unused MOVE_EFFECT_RECOIL_25 so that stat change animations don't break
|
||||
#define MOVE_EFFECT_ATK_PLUS_1 15
|
||||
#define MOVE_EFFECT_DEF_PLUS_1 16
|
||||
#define MOVE_EFFECT_SPD_PLUS_1 17
|
||||
#define MOVE_EFFECT_SP_ATK_PLUS_1 18
|
||||
#define MOVE_EFFECT_SP_DEF_PLUS_1 19
|
||||
#define MOVE_EFFECT_ACC_PLUS_1 20
|
||||
#define MOVE_EFFECT_EVS_PLUS_1 21
|
||||
#define MOVE_EFFECT_ATK_MINUS_1 22
|
||||
#define MOVE_EFFECT_DEF_MINUS_1 23
|
||||
#define MOVE_EFFECT_SPD_MINUS_1 24
|
||||
#define MOVE_EFFECT_SP_ATK_MINUS_1 25
|
||||
#define MOVE_EFFECT_SP_DEF_MINUS_1 26
|
||||
#define MOVE_EFFECT_ACC_MINUS_1 27
|
||||
#define MOVE_EFFECT_EVS_MINUS_1 28
|
||||
#define MOVE_EFFECT_RECHARGE 29
|
||||
#define MOVE_EFFECT_RAGE 30
|
||||
#define MOVE_EFFECT_STEAL_ITEM 31
|
||||
#define MOVE_EFFECT_PREVENT_ESCAPE 32
|
||||
#define MOVE_EFFECT_NIGHTMARE 33
|
||||
#define MOVE_EFFECT_ALL_STATS_UP 34
|
||||
#define MOVE_EFFECT_RAPIDSPIN 35
|
||||
#define MOVE_EFFECT_REMOVE_STATUS 36
|
||||
#define MOVE_EFFECT_ATK_DEF_DOWN 37
|
||||
#define MOVE_EFFECT_SCALE_SHOT 38 // MOVE_EFFECT_SCALE_SHOT replaces unused MOVE_EFFECT_RECOIL_33 so that stat change animations don't break
|
||||
#define MOVE_EFFECT_ATK_PLUS_2 39
|
||||
#define MOVE_EFFECT_DEF_PLUS_2 40
|
||||
#define MOVE_EFFECT_SPD_PLUS_2 41
|
||||
#define MOVE_EFFECT_SP_ATK_PLUS_2 42
|
||||
#define MOVE_EFFECT_SP_DEF_PLUS_2 43
|
||||
#define MOVE_EFFECT_ACC_PLUS_2 44
|
||||
#define MOVE_EFFECT_EVS_PLUS_2 45
|
||||
#define MOVE_EFFECT_ATK_MINUS_2 46
|
||||
#define MOVE_EFFECT_DEF_MINUS_2 47
|
||||
#define MOVE_EFFECT_SPD_MINUS_2 48
|
||||
#define MOVE_EFFECT_SP_ATK_MINUS_2 49
|
||||
#define MOVE_EFFECT_SP_DEF_MINUS_2 50
|
||||
#define MOVE_EFFECT_ACC_MINUS_2 51
|
||||
#define MOVE_EFFECT_EVS_MINUS_2 52
|
||||
#define MOVE_EFFECT_THRASH 53
|
||||
#define MOVE_EFFECT_KNOCK_OFF 54
|
||||
#define MOVE_EFFECT_DEF_SPDEF_DOWN 55
|
||||
#define MOVE_EFFECT_CLEAR_SMOG 56
|
||||
#define MOVE_EFFECT_SP_ATK_TWO_DOWN 57
|
||||
#define MOVE_EFFECT_SMACK_DOWN 58
|
||||
#define MOVE_EFFECT_FLAME_BURST 59
|
||||
#define MOVE_EFFECT_FEINT 60
|
||||
#define MOVE_EFFECT_SPECTRAL_THIEF 61
|
||||
#define MOVE_EFFECT_V_CREATE 62
|
||||
#define MOVE_EFFECT_HAPPY_HOUR 63
|
||||
#define MOVE_EFFECT_CORE_ENFORCER 64
|
||||
#define MOVE_EFFECT_THROAT_CHOP 65
|
||||
#define MOVE_EFFECT_INCINERATE 66
|
||||
#define MOVE_EFFECT_BUG_BITE 67
|
||||
#define MOVE_EFFECT_RECOIL_HP_25 68
|
||||
#define MOVE_EFFECT_RELIC_SONG 69
|
||||
#define MOVE_EFFECT_TRAP_BOTH 70
|
||||
#define MOVE_EFFECT_DOUBLE_SHOCK 71
|
||||
|
||||
#define NUM_MOVE_EFFECTS 0x47
|
||||
#define NUM_MOVE_EFFECTS 72
|
||||
|
||||
#define MOVE_EFFECT_AFFECTS_USER 0x4000
|
||||
#define MOVE_EFFECT_CERTAIN 0x8000
|
||||
|
@ -394,6 +394,8 @@
|
||||
#define ANIM_TAG_OMEGA_SYMBOL (ANIM_SPRITES_START + 382)
|
||||
#define ANIM_TAG_STEEL_BEAM (ANIM_SPRITES_START + 383)
|
||||
#define ANIM_TAG_POLTERGEIST (ANIM_SPRITES_START + 384)
|
||||
#define ANIM_TAG_TEAPOT (ANIM_SPRITES_START + 385)
|
||||
|
||||
|
||||
// battlers
|
||||
#define ANIM_ATTACKER 0
|
||||
|
@ -391,9 +391,15 @@
|
||||
#define EFFECT_COURT_CHANGE 385
|
||||
#define EFFECT_STEEL_BEAM 386
|
||||
#define EFFECT_EXTREME_EVOBOOST 387
|
||||
#define EFFECT_DAMAGE_SET_TERRAIN 388 // genesis supernova
|
||||
#define EFFECT_HIT_SET_REMOVE_TERRAIN 388
|
||||
#define EFFECT_DARK_VOID 389
|
||||
#define EFFECT_SLEEP_HIT 390
|
||||
#define EFFECT_DOUBLE_SHOCK 391
|
||||
#define EFFECT_SPECIAL_ATTACK_UP_HIT 392
|
||||
#define EFFECT_VICTORY_DANCE 393
|
||||
#define EFFECT_TEATIME 394
|
||||
|
||||
#define NUM_BATTLE_MOVE_EFFECTS 395
|
||||
|
||||
#define NUM_BATTLE_MOVE_EFFECTS 389
|
||||
|
||||
#endif // GUARD_CONSTANTS_BATTLE_MOVE_EFFECTS_H
|
||||
|
@ -93,7 +93,7 @@
|
||||
#define VARIOUS_IS_RUNNING_IMPOSSIBLE 2
|
||||
#define VARIOUS_GET_MOVE_TARGET 3
|
||||
#define VARIOUS_GET_BATTLER_FAINTED 4
|
||||
#define VARIOUS_RESET_INTIMIDATE_TRACE_BITS 5
|
||||
#define VARIOUS_RESET_SWITCH_IN_ABILITY_BITS 5
|
||||
#define VARIOUS_UPDATE_CHOICE_MOVE_ON_LVL_UP 6
|
||||
#define VARIOUS_RESET_PLAYER_FAINTED 7
|
||||
#define VARIOUS_PALACE_FLAVOR_TEXT 8
|
||||
@ -246,6 +246,15 @@
|
||||
#define VARIOUS_CAN_TELEPORT 155
|
||||
#define VARIOUS_GET_BATTLER_SIDE 156
|
||||
#define VARIOUS_CHECK_PARENTAL_BOND_COUNTER 157
|
||||
#define VARIOUS_SWAP_STATS 158
|
||||
#define VARIOUS_JUMP_IF_ROD 159
|
||||
#define VARIOUS_JUMP_IF_ABSORB 160
|
||||
#define VARIOUS_JUMP_IF_MOTOR 161
|
||||
#define VARIOUS_TEATIME_INVUL 162
|
||||
#define VARIOUS_TEATIME_TARGETS 163
|
||||
#define VARIOUS_TRY_WIND_RIDER_POWER 164
|
||||
#define VARIOUS_ACTIVATE_WEATHER_CHANGE_ABILITIES 165
|
||||
#define VARIOUS_ACTIVATE_TERRAIN_CHANGE_ABILITIES 166
|
||||
|
||||
// Cmd_manipulatedamage
|
||||
#define DMG_CHANGE_SIGN 0
|
||||
|
@ -630,8 +630,16 @@
|
||||
#define STRINGID_ATTACKERHEALEDITSBURN 628
|
||||
#define STRINGID_ATTACKERMELTEDTHEICE 629
|
||||
#define STRINGID_TARGETTOUGHEDITOUT 630
|
||||
#define STRINGID_ATTACKERLOSTELECTRICTYPE 631
|
||||
#define STRINGID_ATTACKERSWITCHEDSTATWITHTARGET 632
|
||||
#define STRINGID_BEINGHITCHARGEDPKMNWITHPOWER 633
|
||||
#define STRINGID_SUNLIGHTACTIVATEDABILITY 634
|
||||
#define STRINGID_STATWASHEIGHTENED 635
|
||||
#define STRINGID_ELECTRICTERRAINACTIVATEDABILITY 636
|
||||
#define STRINGID_ABILITYWEAKENEDFSURROUNDINGMONSSTAT 637
|
||||
#define STRINGID_ATTACKERGAINEDSTRENGTHFROMTHEFALLEN 638
|
||||
|
||||
#define BATTLESTRINGS_COUNT 631
|
||||
#define BATTLESTRINGS_COUNT 639
|
||||
|
||||
// This is the string id that gBattleStringsTable starts with.
|
||||
// String ids before this (e.g. STRINGID_INTROMSG) are not in the table,
|
||||
|
@ -1,8 +1,11 @@
|
||||
#ifndef GUARD_CONSTANTS_GLOBAL_H
|
||||
#define GUARD_CONSTANTS_GLOBAL_H
|
||||
|
||||
#include "constants/battle_config.h"
|
||||
#include "constants/overworld_config.h"
|
||||
#include "config/battle.h"
|
||||
#include "config/debug.h"
|
||||
#include "config/item.h"
|
||||
#include "config/pokemon.h"
|
||||
#include "config/overworld.h"
|
||||
|
||||
// Invalid Versions show as "----------" in Gen 4 and Gen 5's summary screen.
|
||||
// In Gens 6 and 7, invalid versions instead show "a distant land" in the summary screen.
|
||||
|
@ -684,8 +684,6 @@
|
||||
#define METATILE_SecretBase_BigPlant_TopRight 0x2E6
|
||||
#define METATILE_SecretBase_BigPlant_BaseLeft1 0x2EC
|
||||
#define METATILE_SecretBase_BigPlant_BaseRight1 0x2ED
|
||||
#define METATILE_SecretBase_BigPlant_TopLeftWall 0x2E5
|
||||
#define METATILE_SecretBase_BigPlant_TopRightWall 0x2E6
|
||||
#define METATILE_SecretBase_BigPlant_BaseLeft2 0x2EE
|
||||
#define METATILE_SecretBase_BigPlant_BaseRight2 0x2EF
|
||||
#define METATILE_SecretBase_GorgeousPlant_TopLeft 0x2F0
|
||||
|
@ -809,7 +809,59 @@
|
||||
|
||||
#define MOVES_COUNT_GEN8 779
|
||||
|
||||
#define MOVES_COUNT MOVES_COUNT_GEN8
|
||||
// Gen 9 moves.
|
||||
#define MOVE_TERA_BLAST 779
|
||||
#define MOVE_SILK_TRAP 780
|
||||
#define MOVE_AXE_KICK 781
|
||||
#define MOVE_LAST_RESPECTS 782
|
||||
#define MOVE_LUMINA_CRASH 783
|
||||
#define MOVE_ORDER_UP 784
|
||||
#define MOVE_JET_PUNCH 785
|
||||
#define MOVE_SPICY_EXTRACT 786
|
||||
#define MOVE_SPIN_OUT 787
|
||||
#define MOVE_POPULATION_BOMB 788
|
||||
#define MOVE_ICE_SPINNER 789
|
||||
#define MOVE_GLAIVE_RUSH 790
|
||||
#define MOVE_REVIVAL_BLESSING 791
|
||||
#define MOVE_SALT_CURE 792
|
||||
#define MOVE_TRIPLE_DIVE 793
|
||||
#define MOVE_MORTAL_SPIN 794
|
||||
#define MOVE_DOODLE 795
|
||||
#define MOVE_FILLET_AWAY 796
|
||||
#define MOVE_KOWTOW_CLEAVE 797
|
||||
#define MOVE_FLOWER_TRICK 798
|
||||
#define MOVE_TORCH_SONG 799
|
||||
#define MOVE_AQUA_STEP 800
|
||||
#define MOVE_RAGING_BULL 801
|
||||
#define MOVE_MAKE_IT_RAIN 802
|
||||
#define MOVE_RUINATION 803
|
||||
#define MOVE_COLLISION_COURSE 804
|
||||
#define MOVE_ELECTRO_DRIFT 805
|
||||
#define MOVE_SHED_TAIL 806
|
||||
#define MOVE_CHILLY_RECEPTION 807
|
||||
#define MOVE_TIDY_UP 808
|
||||
#define MOVE_SNOWSCAPE 809
|
||||
#define MOVE_POUNCE 810
|
||||
#define MOVE_TRAILBLAZE 811
|
||||
#define MOVE_CHILLING_WATER 812
|
||||
#define MOVE_HYPER_DRILL 813
|
||||
#define MOVE_TWIN_BEAM 814
|
||||
#define MOVE_RAGE_FIST 815
|
||||
#define MOVE_ARMOR_CANNON 816
|
||||
#define MOVE_BITTER_BLADE 817
|
||||
#define MOVE_DOUBLE_SHOCK 818
|
||||
#define MOVE_GIGATON_HAMMER 819
|
||||
#define MOVE_COMEUPPANCE 820
|
||||
#define MOVE_AQUA_CUTTER 821
|
||||
#define MOVE_BLAZING_TORQUE 822
|
||||
#define MOVE_WICKED_TORQUE 823
|
||||
#define MOVE_NOXIOUS_TORQUE 824
|
||||
#define MOVE_COMBAT_TORQUE 825
|
||||
#define MOVE_MAGICAL_TORQUE 826
|
||||
|
||||
#define MOVES_COUNT_GEN9 827
|
||||
|
||||
#define MOVES_COUNT MOVES_COUNT_GEN9
|
||||
|
||||
// Z Moves
|
||||
#define MOVE_BREAKNECK_BLITZ (MOVES_COUNT + 0)
|
||||
|
@ -1,20 +0,0 @@
|
||||
#ifndef GUARD_CONSTANTS_OVERWORLD_CONFIG_H
|
||||
#define GUARD_CONSTANTS_OVERWORLD_CONFIG_H
|
||||
|
||||
// Movement config
|
||||
#define OW_RUNNING_INDOORS GEN_LATEST // In Gen4+, players are allowed to run indoors.
|
||||
|
||||
// Overworld flags
|
||||
#define OW_FLAG_NO_ENCOUNTER 0 // If this flag is set, wild encounters will be disabled.
|
||||
#define OW_FLAG_NO_TRAINER_SEE 0 // If this flag is set, trainers will not battle the player unless they're talked to.
|
||||
|
||||
// Debug options
|
||||
#define DEBUG_SYSTEM_ENABLE TRUE // Enables a overworld debug menu for changing flags, variables, giving pokemon and more, accessed by holding R and pressing START while in the overworld by default.
|
||||
#define DEBUG_SYSTEM_HELD_KEYS (R_BUTTON) // The keys required to be held to open the debug menu.
|
||||
#define DEBUG_SYSTEM_TRIGGER_EVENT pressedStartButton // The event that opens the menu when holding the key(s) defined in DEBUG_SYSTEM_HELD_KEYS.
|
||||
#define DEBUG_SYSTEM_IN_MENU FALSE // Replaces the overworld debug menu button combination with a start menu entry (above Pokédex).
|
||||
|
||||
// Replace the used flags with others or disable with a 0
|
||||
#define DEBUG_FLAG_NO_COLLISION 0 // If this flag is set, the debug function in the Utility submenu to disable player collision can be used.
|
||||
|
||||
#endif // GUARD_CONSTANTS_OVERWORLD_CONFIG_H
|
@ -1,7 +1,6 @@
|
||||
#ifndef GUARD_CONSTANTS_POKEDEX_H
|
||||
#define GUARD_CONSTANTS_POKEDEX_H
|
||||
|
||||
#include "constants/pokemon_config.h"
|
||||
// National Pokedex order.
|
||||
// These constants are NOT disabled by P_GEN_X_POKEMON to keep pokedex_orders.h clean.
|
||||
enum {
|
||||
|
@ -235,6 +235,8 @@
|
||||
#define FLAG_THAW_USER (1 << 25)
|
||||
#define FLAG_HIT_IN_SUBSTITUTE (1 << 26) // Hyperspace Fury
|
||||
#define FLAG_TWO_STRIKES (1 << 27) // A move with this flag will strike twice, and may apply its effect on each hit
|
||||
#define FLAG_WIND_MOVE (1 << 28)
|
||||
#define FLAG_SLICING_MOVE (1 << 29)
|
||||
|
||||
// Split defines.
|
||||
#define SPLIT_PHYSICAL 0x0
|
||||
@ -350,8 +352,7 @@
|
||||
#define SPECIES_FLAG_HISUIAN_FORM (1 << 6)
|
||||
#define SPECIES_FLAG_GENDER_DIFFERENCE (1 << 7)
|
||||
#define SPECIES_FLAG_ALL_PERFECT_IVS (1 << 8)
|
||||
#define SPECIES_FLAG_SHINY_LOCKED (1 << 9)
|
||||
#define SPECIES_FLAG_CANNOT_BE_TRADED (1 << 10)
|
||||
#define SPECIES_FLAG_CANNOT_BE_TRADED (1 << 9)
|
||||
|
||||
#define LEGENDARY_PERFECT_IV_COUNT 3
|
||||
|
||||
|
@ -1,8 +1,6 @@
|
||||
#ifndef GUARD_CONSTANTS_SPECIES_H
|
||||
#define GUARD_CONSTANTS_SPECIES_H
|
||||
|
||||
#include "constants/pokemon_config.h"
|
||||
|
||||
#define SPECIES_NONE 0
|
||||
#define SPECIES_BULBASAUR 1
|
||||
#define SPECIES_IVYSAUR 2
|
||||
|
@ -1,8 +1,6 @@
|
||||
#ifndef GUARD_DEBUG_H
|
||||
#define GUARD_DEBUG_H
|
||||
|
||||
#include "constants/overworld_config.h"
|
||||
|
||||
void Debug_ShowMainMenu(void);
|
||||
|
||||
#endif // GUARD_DEBUG_H
|
||||
|
@ -9,6 +9,8 @@
|
||||
#define NUM_PALS_TOTAL 13
|
||||
#define MAX_MAP_DATA_SIZE 10240
|
||||
|
||||
#define NUM_TILES_PER_METATILE 8
|
||||
|
||||
// Map coordinates are offset by 7 when using the map
|
||||
// buffer because it needs to load sufficient border
|
||||
// metatiles to fill the player's view (the player has
|
||||
|
@ -11,6 +11,7 @@
|
||||
|
||||
#ifdef NDEBUG
|
||||
#define DebugPrintf(pBuf, ...)
|
||||
#define DebugPrintfLevel(level, pBuf, ...)
|
||||
#define MgbaOpen()
|
||||
#define MgbaClose()
|
||||
#define AGBPrintInit()
|
||||
@ -29,18 +30,21 @@ void AGBPrintInit(void);
|
||||
|
||||
#if (LOG_HANDLER == LOG_HANDLER_MGBA_PRINT)
|
||||
|
||||
#define DebugPrintf(pBuf, ...) MgbaPrintf(MGBA_LOG_INFO, pBuf, __VA_ARGS__)
|
||||
#define DebugPrintf(pBuf, ...) MgbaPrintf(MGBA_LOG_INFO, pBuf, ## __VA_ARGS__)
|
||||
#define DebugAssert(pFile, nLine, pExpression, nStopProgram) MgbaAssert(pFile, nLine, pExpression, nStopProgram)
|
||||
#define DebugPrintfLevel(level, pBuf, ...) MgbaPrintf(level, pBuf, ## __VA_ARGS__)
|
||||
|
||||
#elif (LOG_HANDLER == LOG_HANDLER_NOCASH_PRINT)
|
||||
|
||||
#define DebugPrintf(pBuf, ...) NoCashGBAPrintf(pBuf, __VA_ARGS__)
|
||||
#define DebugPrintf(pBuf, ...) NoCashGBAPrintf(pBuf, ## __VA_ARGS__)
|
||||
#define DebugAssert(pFile, nLine, pExpression, nStopProgram) NoCashGBAAssert(pFile, nLine, pExpression, nStopProgram)
|
||||
#define DebugPrintfLevel(level, pBuf, ...) NoCashGBAPrintf(pBuf, ## __VA_ARGS__)
|
||||
|
||||
#else // Default to AGBPrint
|
||||
|
||||
#define DebugPrintf(pBuf, ...) AGBPrintf(const char *pBuf, ...)
|
||||
#define DebugPrintf(pBuf, ...) AGBPrintf(pBuf, ## __VA_ARGS__)
|
||||
#define DebugAssert(pFile, nLine, pExpression, nStopProgram) AGBAssert(pFile, nLine, pExpression, nStopProgram)
|
||||
#define DebugPrintfLevel(level, pBuf, ...) AGBPrintf(pBuf, ## __VA_ARGS__)
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -10,7 +10,7 @@ struct MultiBootParam
|
||||
{
|
||||
u32 system_work[5]; // 00
|
||||
u8 handshake_data; // 14
|
||||
u8 padding; // 15
|
||||
//u8 padding; // 15
|
||||
u16 handshake_timeout; // 16
|
||||
u8 probe_count; // 18
|
||||
u8 client_data[MULTIBOOT_NCHILD]; // 19
|
||||
|
@ -40,6 +40,7 @@ struct Berry2
|
||||
u8 bitter;
|
||||
u8 sour;
|
||||
u8 smoothness;
|
||||
//u8 padding;
|
||||
};
|
||||
|
||||
struct EnigmaBerry
|
||||
|
@ -41,7 +41,7 @@ struct Tileset
|
||||
/*0x01*/ bool8 isSecondary;
|
||||
/*0x04*/ const u32 *tiles;
|
||||
/*0x08*/ const u16 (*palettes)[16];
|
||||
/*0x0c*/ const u16 *metatiles;
|
||||
/*0x0C*/ const u16 *metatiles;
|
||||
/*0x10*/ const u16 *metatileAttributes;
|
||||
/*0x14*/ TilesetCB callback;
|
||||
};
|
||||
@ -51,7 +51,7 @@ struct MapLayout
|
||||
/*0x00*/ s32 width;
|
||||
/*0x04*/ s32 height;
|
||||
/*0x08*/ u16 *border;
|
||||
/*0x0c*/ u16 *map;
|
||||
/*0x0C*/ u16 *map;
|
||||
/*0x10*/ struct Tileset *primaryTileset;
|
||||
/*0x14*/ struct Tileset *secondaryTileset;
|
||||
};
|
||||
@ -68,16 +68,19 @@ struct ObjectEventTemplate
|
||||
/*0x00*/ u8 localId;
|
||||
/*0x01*/ u8 graphicsId;
|
||||
/*0x02*/ u8 inConnection; // Leftover from FRLG
|
||||
/*0x03*/ //u8 padding1;
|
||||
/*0x04*/ s16 x;
|
||||
/*0x06*/ s16 y;
|
||||
/*0x08*/ u8 elevation;
|
||||
/*0x09*/ u8 movementType;
|
||||
/*0x0A*/ u16 movementRangeX:4;
|
||||
u16 movementRangeY:4;
|
||||
//u16 padding2:8;
|
||||
/*0x0C*/ u16 trainerType;
|
||||
/*0x0E*/ u16 trainerRange_berryTreeId;
|
||||
/*0x10*/ const u8 *script;
|
||||
/*0x14*/ u16 flagId;
|
||||
/*0x16*/ //u8 padding3[2];
|
||||
};
|
||||
|
||||
struct WarpEvent
|
||||
@ -192,6 +195,7 @@ struct ObjectEvent
|
||||
u32 disableJumpLandingGroundEffect:1;
|
||||
u32 fixedPriority:1;
|
||||
u32 hideReflection:1;
|
||||
//u32 padding:4;
|
||||
/*0x04*/ u8 spriteId;
|
||||
/*0x05*/ u8 graphicsId;
|
||||
/*0x06*/ u8 movementType;
|
||||
@ -217,6 +221,7 @@ struct ObjectEvent
|
||||
/*0x20*/ u8 previousMovementDirection;
|
||||
/*0x21*/ u8 directionSequenceIndex;
|
||||
/*0x22*/ u8 playerCopyableMovement; // COPY_MOVE_*
|
||||
/*0x23*/ //u8 padding2;
|
||||
/*size = 0x24*/
|
||||
};
|
||||
|
||||
|
@ -249,9 +249,11 @@ struct ApprenticeMon
|
||||
struct Apprentice
|
||||
{
|
||||
u8 id:5;
|
||||
u8 lvlMode:2; // + 1
|
||||
u8 lvlMode:2;
|
||||
//u8 padding1:1;
|
||||
u8 numQuestions;
|
||||
u8 number;
|
||||
//u8 padding2;
|
||||
struct ApprenticeMon party[MULTI_PARTY_SIZE];
|
||||
u16 speechWon[EASY_CHAT_BATTLE_WORDS_COUNT];
|
||||
u8 playerId[TRAINER_ID_LENGTH];
|
||||
@ -299,6 +301,7 @@ struct EmeraldBattleTowerRecord
|
||||
/*0x28*/ u16 speechLost[EASY_CHAT_BATTLE_WORDS_COUNT];
|
||||
/*0x34*/ struct BattleTowerPokemon party[MAX_FRONTIER_PARTY_SIZE];
|
||||
/*0xE4*/ u8 language;
|
||||
/*0xE7*/ //u8 padding[3];
|
||||
/*0xE8*/ u32 checksum;
|
||||
};
|
||||
|
||||
@ -331,14 +334,17 @@ struct DomeMonData
|
||||
u16 moves[MAX_MON_MOVES];
|
||||
u8 evs[NUM_STATS];
|
||||
u8 nature;
|
||||
//u8 padding;
|
||||
};
|
||||
|
||||
struct RentalMon
|
||||
{
|
||||
u16 monId;
|
||||
//u8 padding1[2];
|
||||
u32 personality;
|
||||
u8 ivs;
|
||||
u8 abilityNum;
|
||||
//u8 padding2[2];
|
||||
};
|
||||
|
||||
struct BattleDomeTrainer
|
||||
@ -360,8 +366,9 @@ struct BattleFrontier
|
||||
/*0xBEC*/ struct BattleTowerEReaderTrainer ereaderTrainer;
|
||||
/*0xCA8*/ u8 challengeStatus;
|
||||
/*0xCA9*/ u8 lvlMode:2;
|
||||
/*0xCA9*/ u8 challengePaused:1;
|
||||
/*0xCA9*/ u8 disableRecordBattle:1;
|
||||
u8 challengePaused:1;
|
||||
u8 disableRecordBattle:1;
|
||||
//u8 padding1:4;
|
||||
/*0xCAA*/ u16 selectedPartyMons[MAX_FRONTIER_PARTY_SIZE];
|
||||
/*0xCB2*/ u16 curChallengeBattleNum; // Battle number / room number (Pike) / floor number (Pyramid)
|
||||
/*0xCB4*/ u16 trainerIds[20];
|
||||
@ -405,16 +412,19 @@ struct BattleFrontier
|
||||
/*0xE08*/ u16 pikeRecordStreaks[FRONTIER_LVL_MODE_COUNT];
|
||||
/*0xE0C*/ u16 pikeTotalStreaks[FRONTIER_LVL_MODE_COUNT];
|
||||
/*0xE10*/ u8 pikeHintedRoomIndex:3;
|
||||
/*0xE10*/ u8 pikeHintedRoomType:4;
|
||||
/*0xE10*/ u8 pikeHealingRoomsDisabled:1;
|
||||
u8 pikeHintedRoomType:4;
|
||||
u8 pikeHealingRoomsDisabled:1;
|
||||
/*0xE11*/ //u8 padding2;
|
||||
/*0xE12*/ u16 pikeHeldItemsBackup[FRONTIER_PARTY_SIZE];
|
||||
/*0xE18*/ u16 pyramidPrize;
|
||||
/*0xE1A*/ u16 pyramidWinStreaks[FRONTIER_LVL_MODE_COUNT];
|
||||
/*0xE1E*/ u16 pyramidRecordStreaks[FRONTIER_LVL_MODE_COUNT];
|
||||
/*0xE22*/ u16 pyramidRandoms[4];
|
||||
/*0xE2A*/ u8 pyramidTrainerFlags; // 1 bit for each trainer (MAX_PYRAMID_TRAINERS)
|
||||
/*0xE2B*/ //u8 padding3;
|
||||
/*0xE2C*/ struct PyramidBag pyramidBag;
|
||||
/*0xE68*/ u8 pyramidLightRadius;
|
||||
/*0xE69*/ //u8 padding4;
|
||||
/*0xE6A*/ u16 verdanturfTentPrize;
|
||||
/*0xE6C*/ u16 fallarborTentPrize;
|
||||
/*0xE6E*/ u16 slateportTentPrize;
|
||||
@ -439,6 +449,7 @@ struct ApprenticeQuestion
|
||||
u8 monId:2;
|
||||
u8 moveSlot:2;
|
||||
u8 suggestedChange:2; // TRUE if told to use held item or second move, FALSE if told to use no item or first move
|
||||
//u8 padding;
|
||||
u16 data; // used both as an itemId and a moveId
|
||||
};
|
||||
|
||||
@ -449,9 +460,11 @@ struct PlayersApprentice
|
||||
/*0xB1*/ u8 questionsAnswered:4;
|
||||
/*0xB1*/ u8 leadMonId:2;
|
||||
/*0xB2*/ u8 party:3;
|
||||
/*0xB2*/ u8 saveId:2;
|
||||
u8 saveId:2;
|
||||
//u8 padding1:3;
|
||||
/*0xB3*/ u8 unused;
|
||||
/*0xB4*/ u8 speciesIds[MULTI_PARTY_SIZE];
|
||||
/*0xB7*/ //u8 padding2;
|
||||
/*0xB8*/ struct ApprenticeQuestion questions[APPRENTICE_MAX_QUESTIONS];
|
||||
};
|
||||
|
||||
@ -461,6 +474,7 @@ struct RankingHall1P
|
||||
u16 winStreak;
|
||||
u8 name[PLAYER_NAME_LENGTH + 1];
|
||||
u8 language;
|
||||
//u8 padding;
|
||||
};
|
||||
|
||||
struct RankingHall2P
|
||||
@ -471,6 +485,7 @@ struct RankingHall2P
|
||||
u8 name1[PLAYER_NAME_LENGTH + 1];
|
||||
u8 name2[PLAYER_NAME_LENGTH + 1];
|
||||
u8 language;
|
||||
//u8 padding;
|
||||
};
|
||||
|
||||
struct SaveBlock2
|
||||
@ -490,6 +505,8 @@ struct SaveBlock2
|
||||
u16 optionsBattleStyle:1; // OPTIONS_BATTLE_STYLE_[SHIFT/SET]
|
||||
u16 optionsBattleSceneOff:1; // whether battle animations are disabled
|
||||
u16 regionMapZoom:1; // whether the map is zoomed in
|
||||
//u16 padding1:4;
|
||||
//u16 padding2;
|
||||
/*0x18*/ struct Pokedex pokedex;
|
||||
/*0x90*/ u8 filler_90[0x8];
|
||||
/*0x98*/ struct Time localTimeOffset;
|
||||
@ -534,6 +551,7 @@ struct SecretBase
|
||||
/*0x1AAD*/ u8 unused;
|
||||
/*0x1AAE*/ u8 decorations[DECOR_MAX_SECRET_BASE];
|
||||
/*0x1ABE*/ u8 decorationPositions[DECOR_MAX_SECRET_BASE];
|
||||
/*0x1ACE*/ //u8 padding[2];
|
||||
/*0x1AD0*/ struct SecretBaseParty party;
|
||||
};
|
||||
|
||||
@ -548,6 +566,7 @@ struct WarpData
|
||||
s8 mapGroup;
|
||||
s8 mapNum;
|
||||
s8 warpId;
|
||||
//u8 padding;
|
||||
s16 x, y;
|
||||
};
|
||||
|
||||
@ -592,6 +611,7 @@ struct RamScriptData
|
||||
u8 mapNum;
|
||||
u8 objectId;
|
||||
u8 script[995];
|
||||
//u8 padding;
|
||||
};
|
||||
|
||||
struct RamScript
|
||||
@ -606,6 +626,7 @@ struct DewfordTrend
|
||||
u16 trendiness:7;
|
||||
u16 maxTrendiness:7;
|
||||
u16 gainingTrendiness:1;
|
||||
//u16 padding:1;
|
||||
u16 rand;
|
||||
u16 words[2];
|
||||
}; /*size = 0x8*/
|
||||
@ -618,6 +639,7 @@ struct MauvilleManCommon
|
||||
struct MauvilleManBard
|
||||
{
|
||||
/*0x00*/ u8 id;
|
||||
/*0x01*/ //u8 padding1;
|
||||
/*0x02*/ u16 songLyrics[BARD_SONG_LENGTH];
|
||||
/*0x0E*/ u16 temporaryLyrics[BARD_SONG_LENGTH];
|
||||
/*0x1A*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
@ -625,6 +647,7 @@ struct MauvilleManBard
|
||||
/*0x25*/ u8 playerTrainerId[TRAINER_ID_LENGTH];
|
||||
/*0x29*/ bool8 hasChangedSong;
|
||||
/*0x2A*/ u8 language;
|
||||
/*0x2B*/ //u8 padding2;
|
||||
}; /*size = 0x2C*/
|
||||
|
||||
struct MauvilleManStoryteller
|
||||
@ -643,9 +666,11 @@ struct MauvilleManGiddy
|
||||
/*0x00*/ u8 id;
|
||||
/*0x01*/ u8 taleCounter;
|
||||
/*0x02*/ u8 questionNum;
|
||||
/*0x03*/ //u8 padding1;
|
||||
/*0x04*/ u16 randomWords[GIDDY_MAX_TALES];
|
||||
/*0x18*/ u8 questionList[GIDDY_MAX_QUESTIONS];
|
||||
/*0x20*/ u8 language;
|
||||
/*0x21*/ //u8 padding2;
|
||||
}; /*size = 0x2C*/
|
||||
|
||||
struct MauvilleManHipster
|
||||
@ -690,6 +715,7 @@ struct LinkBattleRecords
|
||||
{
|
||||
struct LinkBattleRecord entries[LINK_B_RECORDS_COUNT];
|
||||
u8 languages[LINK_B_RECORDS_COUNT];
|
||||
//u8 padding;
|
||||
};
|
||||
|
||||
struct RecordMixingGiftData
|
||||
@ -715,6 +741,7 @@ struct ContestWinner
|
||||
u8 monName[POKEMON_NAME_LENGTH + 1];
|
||||
u8 trainerName[PLAYER_NAME_LENGTH + 1];
|
||||
u8 contestRank;
|
||||
//u8 padding;
|
||||
};
|
||||
|
||||
struct Mail
|
||||
@ -747,6 +774,7 @@ struct DayCare
|
||||
struct DaycareMon mons[DAYCARE_MON_COUNT];
|
||||
u32 offspringPersonality;
|
||||
u8 stepCounter;
|
||||
//u8 padding[3];
|
||||
};
|
||||
|
||||
struct LilycoveLadyQuiz
|
||||
@ -759,10 +787,10 @@ struct LilycoveLadyQuiz
|
||||
/*0x018*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x020*/ u16 playerTrainerId[TRAINER_ID_LENGTH];
|
||||
/*0x028*/ u16 prize;
|
||||
/*0x02a*/ bool8 waitingForChallenger;
|
||||
/*0x02b*/ u8 questionId;
|
||||
/*0x02c*/ u8 prevQuestionId;
|
||||
/*0x02d*/ u8 language;
|
||||
/*0x02A*/ bool8 waitingForChallenger;
|
||||
/*0x02B*/ u8 questionId;
|
||||
/*0x02C*/ u8 prevQuestionId;
|
||||
/*0x02D*/ u8 language;
|
||||
};
|
||||
|
||||
struct LilycoveLadyFavor
|
||||
@ -772,10 +800,12 @@ struct LilycoveLadyFavor
|
||||
/*0x002*/ bool8 likedItem;
|
||||
/*0x003*/ u8 numItemsGiven;
|
||||
/*0x004*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x00c*/ u8 favorId;
|
||||
/*0x00e*/ u16 itemId;
|
||||
/*0x00C*/ u8 favorId;
|
||||
/*0x00D*/ //u8 padding1;
|
||||
/*0x00E*/ u16 itemId;
|
||||
/*0x010*/ u16 bestItem;
|
||||
/*0x012*/ u8 language;
|
||||
/*0x013*/ //u8 padding2;
|
||||
};
|
||||
|
||||
struct LilycoveLadyContest
|
||||
@ -785,9 +815,9 @@ struct LilycoveLadyContest
|
||||
/*0x002*/ u8 numGoodPokeblocksGiven;
|
||||
/*0x003*/ u8 numOtherPokeblocksGiven;
|
||||
/*0x004*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x00c*/ u8 maxSheen;
|
||||
/*0x00d*/ u8 category;
|
||||
/*0x00e*/ u8 language;
|
||||
/*0x00C*/ u8 maxSheen;
|
||||
/*0x00D*/ u8 category;
|
||||
/*0x00E*/ u8 language;
|
||||
};
|
||||
|
||||
typedef union // 3b58
|
||||
@ -796,7 +826,7 @@ typedef union // 3b58
|
||||
struct LilycoveLadyFavor favor;
|
||||
struct LilycoveLadyContest contest;
|
||||
u8 id;
|
||||
u8 pad[0x40];
|
||||
u8 filler[0x40];
|
||||
} LilycoveLady;
|
||||
|
||||
struct WaldaPhrase
|
||||
@ -806,6 +836,7 @@ struct WaldaPhrase
|
||||
u8 iconId;
|
||||
u8 patternId;
|
||||
bool8 patternUnlocked;
|
||||
//u8 padding;
|
||||
};
|
||||
|
||||
struct TrainerNameRecord
|
||||
@ -821,12 +852,13 @@ struct TrainerHillSave
|
||||
/*0x3D6C*/ u8 unk_3D6C;
|
||||
/*0x3D6D*/ u8 unused;
|
||||
/*0x3D6E*/ u16 receivedPrize:1;
|
||||
/*0x3D6E*/ u16 checkedFinalTime:1;
|
||||
/*0x3D6E*/ u16 spokeToOwner:1;
|
||||
/*0x3D6E*/ u16 hasLost:1;
|
||||
/*0x3D6E*/ u16 maybeECardScanDuringChallenge:1;
|
||||
/*0x3D6E*/ u16 field_3D6E_0f:1;
|
||||
/*0x3D6E*/ u16 mode:2; // HILL_MODE_*
|
||||
u16 checkedFinalTime:1;
|
||||
u16 spokeToOwner:1;
|
||||
u16 hasLost:1;
|
||||
u16 maybeECardScanDuringChallenge:1;
|
||||
u16 field_3D6E_0f:1;
|
||||
u16 mode:2; // HILL_MODE_*
|
||||
//u16 padding:8;
|
||||
};
|
||||
|
||||
struct WonderNewsMetadata
|
||||
@ -835,6 +867,7 @@ struct WonderNewsMetadata
|
||||
u8 sentCounter:3;
|
||||
u8 getCounter:3;
|
||||
u8 rand;
|
||||
//u8 padding[2];
|
||||
};
|
||||
|
||||
struct WonderNews
|
||||
@ -860,6 +893,7 @@ struct WonderCard
|
||||
u8 bodyText[WONDER_CARD_BODY_TEXT_LINES][WONDER_CARD_TEXT_LENGTH];
|
||||
u8 footerLine1Text[WONDER_CARD_TEXT_LENGTH];
|
||||
u8 footerLine2Text[WONDER_CARD_TEXT_LENGTH];
|
||||
//u8 padding[2];
|
||||
};
|
||||
|
||||
struct WonderCardMetadata
|
||||
@ -906,7 +940,7 @@ struct ExternalEventFlags
|
||||
{
|
||||
u8 usedBoxRS:1; // Set by Pokémon Box: Ruby & Sapphire; denotes whether this save has connected to it and triggered the free False Swipe Swablu Egg giveaway.
|
||||
u8 boxRSEggsUnlocked:2; // Set by Pokémon Box: Ruby & Sapphire; denotes the number of Eggs unlocked from deposits; 1 for ExtremeSpeed Zigzagoon (at 100 deposited), 2 for Pay Day Skitty (at 500 deposited), 3 for Surf Pichu (at 1499 deposited)
|
||||
u8 padding:5;
|
||||
//u8 padding:5;
|
||||
u8 unknownFlag1;
|
||||
u8 receivedGCNJirachi; // Both the US Colosseum Bonus Disc and PAL/AUS Pokémon Channel use this field. One cannot receive a WISHMKR Jirachi and CHANNEL Jirachi with the same savefile.
|
||||
u8 unknownFlag3;
|
||||
@ -942,9 +976,11 @@ struct SaveBlock1
|
||||
/*0x2E*/ u8 weather;
|
||||
/*0x2F*/ u8 weatherCycleStage;
|
||||
/*0x30*/ u8 flashLevel;
|
||||
/*0x31*/ //u8 padding1;
|
||||
/*0x32*/ u16 mapLayoutId;
|
||||
/*0x34*/ u16 mapView[0x100];
|
||||
/*0x234*/ u8 playerPartyCount;
|
||||
/*0x235*/ //u8 padding2[3];
|
||||
/*0x238*/ struct Pokemon playerParty[PARTY_SIZE];
|
||||
/*0x490*/ u32 money;
|
||||
/*0x494*/ u16 coins;
|
||||
@ -961,6 +997,7 @@ struct SaveBlock1
|
||||
/*0x9C2*/ u8 unused_9C2[6];
|
||||
/*0x9C8*/ u16 trainerRematchStepCounter;
|
||||
/*0x9CA*/ u8 trainerRematches[MAX_REMATCH_ENTRIES];
|
||||
/*0xA2E*/ //u8 padding3[2];
|
||||
/*0xA30*/ struct ObjectEvent objectEvents[OBJECT_EVENTS_COUNT];
|
||||
/*0xC70*/ struct ObjectEventTemplate objectEventTemplates[OBJECT_EVENT_TEMPLATES_COUNT];
|
||||
/*0x1270*/ u8 flags[NUM_FLAG_BYTES];
|
||||
@ -978,6 +1015,7 @@ struct SaveBlock1
|
||||
/*0x278E*/ u8 decorationPosters[10];
|
||||
/*0x2798*/ u8 decorationDolls[40];
|
||||
/*0x27C0*/ u8 decorationCushions[10];
|
||||
/*0x27CA*/ //u8 padding4[2];
|
||||
/*0x27CC*/ TVShow tvShows[TV_SHOWS_COUNT];
|
||||
/*0x2B50*/ PokeNews pokeNews[POKE_NEWS_COUNT];
|
||||
/*0x2B90*/ u16 outbreakPokemonSpecies;
|
||||
@ -997,6 +1035,7 @@ struct SaveBlock1
|
||||
/*0x2BD4*/ u16 easyChatBattleLost[EASY_CHAT_BATTLE_WORDS_COUNT];
|
||||
/*0x2BE0*/ struct Mail mail[MAIL_COUNT];
|
||||
/*0x2E20*/ u8 additionalPhrases[NUM_ADDITIONAL_PHRASE_BYTES]; // bitfield for 33 additional phrases in easy chat system
|
||||
/*0x2E25*/ //u8 padding5[3];
|
||||
/*0x2E28*/ OldMan oldMan;
|
||||
/*0x2e64*/ struct DewfordTrend dewfordTrends[SAVED_TRENDS_COUNT];
|
||||
/*0x2e90*/ struct ContestWinner contestWinners[NUM_CONTEST_WINNERS]; // see CONTEST_WINNER_*
|
||||
|
@ -36,6 +36,7 @@ typedef union // size = 0x24
|
||||
/*0x04*/ u16 words[6];
|
||||
/*0x10*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x18*/ u8 language;
|
||||
/*0x19*/ //u8 padding;
|
||||
} fanclubLetter;
|
||||
|
||||
// TVSHOW_RECENT_HAPPENINGS
|
||||
@ -46,6 +47,7 @@ typedef union // size = 0x24
|
||||
/*0x04*/ u16 words[6];
|
||||
/*0x10*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x18*/ u8 language;
|
||||
/*0x19*/ //u8 padding;
|
||||
} recentHappenings;
|
||||
|
||||
// TVSHOW_PKMN_FAN_CLUB_OPINIONS
|
||||
@ -54,7 +56,7 @@ typedef union // size = 0x24
|
||||
/*0x01*/ bool8 active;
|
||||
/*0x02*/ u16 species;
|
||||
/*0x04*/ u8 friendshipHighNybble:4;
|
||||
/*0x04*/ u8 questionAsked:4;
|
||||
u8 questionAsked:4;
|
||||
/*0x05*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x0D*/ u8 language;
|
||||
/*0x0E*/ u8 pokemonNameLanguage;
|
||||
@ -70,8 +72,8 @@ typedef union // size = 0x24
|
||||
/*0x01*/ bool8 active;
|
||||
/*0x02*/ u16 words[2];
|
||||
/*0x06*/ u16 species;
|
||||
/*0x08*/ u8 pad_08[3];
|
||||
/*0x0b*/ u8 name[12];
|
||||
/*0x08*/ u8 filler_08[3];
|
||||
/*0x0B*/ u8 name[12];
|
||||
/*0x17*/ u8 language;
|
||||
} dummy;
|
||||
|
||||
@ -98,8 +100,9 @@ typedef union // size = 0x24
|
||||
/*0x04*/ u16 words[2];
|
||||
/*0x08*/ u8 pokemonNickname[POKEMON_NAME_LENGTH + 1];
|
||||
/*0x13*/ u8 contestCategory:3;
|
||||
/*0x13*/ u8 contestRank:2;
|
||||
/*0x13*/ u8 contestResult:2;
|
||||
u8 contestRank:2;
|
||||
u8 contestResult:2;
|
||||
//u8 padding:1;
|
||||
/*0x14*/ u16 move;
|
||||
/*0x16*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x1E*/ u8 language;
|
||||
@ -121,6 +124,7 @@ typedef union // size = 0x24
|
||||
/*0x1C*/ bool8 wonTheChallenge;
|
||||
/*0x1D*/ u8 language;
|
||||
/*0x1E*/ u8 pokemonNameLanguage;
|
||||
/*0x1F*/ //u8 padding;
|
||||
} bravoTrainerTower;
|
||||
|
||||
// TVSHOW_CONTEST_LIVE_UPDATES
|
||||
@ -131,14 +135,15 @@ typedef union // size = 0x24
|
||||
/*0x04*/ u8 losingTrainerName[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x0C*/ u8 loserAppealFlag;
|
||||
/*0x0D*/ u8 round1Placing;
|
||||
/*0x0e*/ u8 round2Placing;
|
||||
/*0x0f*/ u8 winnerAppealFlag;
|
||||
/*0x0E*/ u8 round2Placing;
|
||||
/*0x0F*/ u8 winnerAppealFlag;
|
||||
/*0x10*/ u16 move;
|
||||
/*0x12*/ u16 winningSpecies;
|
||||
/*0x14*/ u8 winningTrainerName[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x1C*/ u8 category;
|
||||
/*0x1D*/ u8 winningTrainerLanguage;
|
||||
/*0x1E*/ u8 losingTrainerLanguage;
|
||||
/*0x1F*/ //u8 padding;
|
||||
} contestLiveUpdates;
|
||||
|
||||
// TVSHOW_3_CHEERS_FOR_POKEBLOCKS
|
||||
@ -147,7 +152,8 @@ typedef union // size = 0x24
|
||||
/*0x01*/ bool8 active;
|
||||
/*0x02*/ u8 sheen;
|
||||
/*0x03*/ u8 flavor:3;
|
||||
/*0x03*/ u8 color:2;
|
||||
u8 color:2;
|
||||
//u8 padding:3;
|
||||
/*0x04*/ u8 worstBlenderName[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x0C*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x14*/ u8 language;
|
||||
@ -166,6 +172,7 @@ typedef union // size = 0x24
|
||||
/*0x18*/ u8 battleType;
|
||||
/*0x19*/ u8 language;
|
||||
/*0x1A*/ u8 linkOpponentLanguage;
|
||||
/*0x1B*/ //u8 padding;
|
||||
} battleUpdate;
|
||||
|
||||
// TVSHOW_FAN_CLUB_SPECIAL
|
||||
@ -173,13 +180,14 @@ typedef union // size = 0x24
|
||||
/*0x00*/ u8 kind;
|
||||
/*0x01*/ bool8 active;
|
||||
/*0x02*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x0a*/ u8 idLo;
|
||||
/*0x0b*/ u8 idHi;
|
||||
/*0x0c*/ u8 idolName[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x0A*/ u8 idLo;
|
||||
/*0x0B*/ u8 idHi;
|
||||
/*0x0C*/ u8 idolName[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x14*/ u16 words[1];
|
||||
/*0x16*/ u8 score;
|
||||
/*0x17*/ u8 language;
|
||||
/*0x18*/ u8 idolNameLanguage;
|
||||
/*0x19*/ //u8 padding;
|
||||
} fanClubSpecial;
|
||||
|
||||
// TVSHOW_LILYCOVE_CONTEST_LADY
|
||||
@ -187,8 +195,8 @@ typedef union // size = 0x24
|
||||
/*0x00*/ u8 kind;
|
||||
/*0x01*/ bool8 active;
|
||||
/*0x02*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x0a*/ u8 contestCategory;
|
||||
/*0x0b*/ u8 nickname[POKEMON_NAME_LENGTH + 1];
|
||||
/*0x0A*/ u8 contestCategory;
|
||||
/*0x0B*/ u8 nickname[POKEMON_NAME_LENGTH + 1];
|
||||
/*0x16*/ u8 pokeblockState;
|
||||
/*0x17*/ u8 language;
|
||||
/*0x18*/ u8 pokemonNameLanguage;
|
||||
@ -206,6 +214,7 @@ typedef union // size = 0x24
|
||||
/*0x10*/ u16 species;
|
||||
/*0x12*/ u8 nBallsUsed;
|
||||
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x1B*/ //u8 padding;
|
||||
} pokemonToday;
|
||||
|
||||
// TVSHOW_SMART_SHOPPER
|
||||
@ -214,11 +223,12 @@ typedef union // size = 0x24
|
||||
/*0x01*/ bool8 active;
|
||||
/*0x02*/ u8 priceReduced;
|
||||
/*0x03*/ u8 language;
|
||||
/*0x04*/ u8 pad04[2];
|
||||
/*0x04*/ u8 filler_04[2];
|
||||
/*0x06*/ u16 itemIds[SMARTSHOPPER_NUM_ITEMS];
|
||||
/*0x0C*/ u16 itemAmounts[SMARTSHOPPER_NUM_ITEMS];
|
||||
/*0x12*/ u8 shopLocation;
|
||||
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x1B*/ //u8 padding;
|
||||
} smartshopperShow;
|
||||
|
||||
// TVSHOW_POKEMON_TODAY_FAILED
|
||||
@ -226,13 +236,14 @@ typedef union // size = 0x24
|
||||
/*0x00*/ u8 kind;
|
||||
/*0x01*/ bool8 active;
|
||||
/*0x02*/ u8 language;
|
||||
/*0x03*/ u8 pad03[9];
|
||||
/*0x0c*/ u16 species;
|
||||
/*0x0e*/ u16 species2;
|
||||
/*0x03*/ u8 filler_03[9];
|
||||
/*0x0C*/ u16 species;
|
||||
/*0x0E*/ u16 species2;
|
||||
/*0x10*/ u8 nBallsUsed;
|
||||
/*0x11*/ u8 outcome;
|
||||
/*0x12*/ u8 location;
|
||||
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x1B*/ //u8 padding;
|
||||
} pokemonTodayFailed;
|
||||
|
||||
// TVSHOW_FISHING_ADVICE
|
||||
@ -243,8 +254,9 @@ typedef union // size = 0x24
|
||||
/*0x03*/ u8 nFails;
|
||||
/*0x04*/ u16 species;
|
||||
/*0x06*/ u8 language;
|
||||
/*0x07*/ u8 pad07[12];
|
||||
/*0x07*/ u8 filler_07[12];
|
||||
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x1B*/ //u8 padding;
|
||||
} pokemonAngler;
|
||||
|
||||
// TVSHOW_WORLD_OF_MASTERS
|
||||
@ -255,10 +267,11 @@ typedef union // size = 0x24
|
||||
/*0x04*/ u16 caughtPoke;
|
||||
/*0x06*/ u16 steps;
|
||||
/*0x08*/ u16 species;
|
||||
/*0x0a*/ u8 location;
|
||||
/*0x0b*/ u8 language;
|
||||
/*0x0c*/ u8 pad0c[7];
|
||||
/*0x0A*/ u8 location;
|
||||
/*0x0B*/ u8 language;
|
||||
/*0x0C*/ u8 filler_0C[7];
|
||||
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x1B*/ //u8 padding2;
|
||||
} worldOfMasters;
|
||||
|
||||
// TVSHOW_TODAYS_RIVAL_TRAINER
|
||||
@ -271,10 +284,11 @@ typedef union // size = 0x24
|
||||
/*0x06*/ u8 nGoldSymbols;
|
||||
/*0x07*/ u8 location;
|
||||
/*0x08*/ u16 battlePoints;
|
||||
/*0x0a*/ u16 mapLayoutId;
|
||||
/*0x0c*/ u8 language;
|
||||
/*0x0d*/ u8 filler_0d[6];
|
||||
/*0x0A*/ u16 mapLayoutId;
|
||||
/*0x0C*/ u8 language;
|
||||
/*0x0D*/ u8 filler_0D[6];
|
||||
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x1B*/ //u8 padding2;
|
||||
} rivalTrainer;
|
||||
|
||||
// TVSHOW_TREND_WATCHER
|
||||
@ -285,8 +299,9 @@ typedef union // size = 0x24
|
||||
/*0x04*/ u16 words[2];
|
||||
/*0x08*/ u8 gender;
|
||||
/*0x09*/ u8 language;
|
||||
/*0x0a*/ u8 filler_0a[9];
|
||||
/*0x0A*/ u8 filler_0a[9];
|
||||
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x1B*/ //u8 padding;
|
||||
} trendWatcher;
|
||||
|
||||
// TVSHOW_TREASURE_INVESTIGATORS
|
||||
@ -299,6 +314,7 @@ typedef union // size = 0x24
|
||||
/*0x06*/ u16 mapLayoutId;
|
||||
/*0x08*/ u8 filler_08[11];
|
||||
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x1B*/ //u8 padding;
|
||||
} treasureInvestigators;
|
||||
|
||||
// TVSHOW_FIND_THAT_GAMER
|
||||
@ -312,6 +328,7 @@ typedef union // size = 0x24
|
||||
/*0x08*/ u8 language;
|
||||
/*0x09*/ u8 filler_09[10];
|
||||
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x1B*/ //u8 padding;
|
||||
} findThatGamer;
|
||||
|
||||
// TVSHOW_BREAKING_NEWS
|
||||
@ -323,11 +340,12 @@ typedef union // size = 0x24
|
||||
/*0x05*/ u8 outcome;
|
||||
/*0x06*/ u16 caughtMonBall;
|
||||
/*0x08*/ u16 balls;
|
||||
/*0x0a*/ u16 poke1Species;
|
||||
/*0x0c*/ u16 lastUsedMove;
|
||||
/*0x0e*/ u8 language;
|
||||
/*0x0f*/ u8 filler_0f[4];
|
||||
/*0x0A*/ u16 poke1Species;
|
||||
/*0x0C*/ u16 lastUsedMove;
|
||||
/*0x0E*/ u8 language;
|
||||
/*0x0F*/ u8 filler_0f[4];
|
||||
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x1B*/ //u8 padding;
|
||||
} breakingNews;
|
||||
|
||||
// TVSHOW_SECRET_BASE_VISIT
|
||||
@ -338,10 +356,11 @@ typedef union // size = 0x24
|
||||
/*0x03*/ u8 numDecorations;
|
||||
/*0x04*/ u8 decorations[4];
|
||||
/*0x08*/ u16 species;
|
||||
/*0x0a*/ u16 move;
|
||||
/*0x0c*/ u8 language;
|
||||
/*0x0d*/ u8 filler_0d[6];
|
||||
/*0x0A*/ u16 move;
|
||||
/*0x0C*/ u8 language;
|
||||
/*0x0D*/ u8 filler_0d[6];
|
||||
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x1B*/ //u8 padding;
|
||||
} secretBaseVisit;
|
||||
|
||||
// TVSHOW_LOTTO_WINNER
|
||||
@ -353,6 +372,7 @@ typedef union // size = 0x24
|
||||
/*0x05*/ u8 language;
|
||||
/*0x06*/ u8 filler_06[13];
|
||||
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x1B*/ //u8 padding;
|
||||
} lottoWinner;
|
||||
|
||||
// TVSHOW_BATTLE_SEMINAR
|
||||
@ -363,11 +383,12 @@ typedef union // size = 0x24
|
||||
/*0x04*/ u16 foeSpecies;
|
||||
/*0x06*/ u16 species;
|
||||
/*0x08*/ u16 otherMoves[3];
|
||||
/*0x0e*/ u16 betterMove;
|
||||
/*0x0E*/ u16 betterMove;
|
||||
/*0x10*/ u8 nOtherMoves;
|
||||
/*0x11*/ u8 language;
|
||||
/*0x12*/ u8 filler_12[1];
|
||||
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x1B*/ //u8 padding;
|
||||
} battleSeminar;
|
||||
|
||||
// TVSHOW_TRAINER_FAN_CLUB
|
||||
@ -379,6 +400,7 @@ typedef union // size = 0x24
|
||||
/*0x08*/ u8 language;
|
||||
/*0x09*/ u8 filler_09[10];
|
||||
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x1B*/ //u8 padding;
|
||||
} trainerFanClub;
|
||||
|
||||
// TVSHOW_CUTIES
|
||||
@ -388,7 +410,7 @@ typedef union // size = 0x24
|
||||
/*0x02*/ u8 nRibbons;
|
||||
/*0x03*/ u8 selectedRibbon;
|
||||
/*0x04*/ u8 nickname[POKEMON_NAME_LENGTH + 1];
|
||||
/*0x0f*/ u8 language;
|
||||
/*0x0F*/ u8 language;
|
||||
/*0x10*/ u8 pokemonNameLanguage;
|
||||
/*0x11*/ u8 filler_12[2];
|
||||
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
@ -402,11 +424,12 @@ typedef union // size = 0x24
|
||||
/*0x04*/ u16 species1;
|
||||
/*0x06*/ u16 species2;
|
||||
/*0x08*/ u16 species3;
|
||||
/*0x0a*/ u16 species4;
|
||||
/*0x0c*/ u8 language;
|
||||
/*0x0d*/ u8 facilityAndMode;
|
||||
/*0x0e*/ u8 filler_0e[5];
|
||||
/*0x0A*/ u16 species4;
|
||||
/*0x0C*/ u8 language;
|
||||
/*0x0D*/ u8 facilityAndMode;
|
||||
/*0x0E*/ u8 filler_0e[5];
|
||||
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x1B*/ //u8 padding;
|
||||
} frontier;
|
||||
|
||||
// TVSHOW_NUMBER_ONE
|
||||
@ -418,6 +441,7 @@ typedef union // size = 0x24
|
||||
/*0x05*/ u8 language;
|
||||
/*0x06*/ u8 filler_06[13];
|
||||
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x1B*/ //u8 padding;
|
||||
} numberOne;
|
||||
|
||||
// TVSHOW_SECRET_BASE_SECRETS
|
||||
@ -426,12 +450,13 @@ typedef union // size = 0x24
|
||||
/*0x01*/ bool8 active;
|
||||
/*0x02*/ u16 stepsInBase;
|
||||
/*0x04*/ u8 baseOwnersName[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x0c*/ u32 flags;
|
||||
/*0x0C*/ u32 flags;
|
||||
/*0x10*/ u16 item;
|
||||
/*0x12*/ u8 savedState;
|
||||
/*0x13*/ u8 playerName[PLAYER_NAME_LENGTH + 1];
|
||||
/*0x1b*/ u8 language;
|
||||
/*0x1c*/ u8 baseOwnersNameLanguage;
|
||||
/*0x1B*/ u8 language;
|
||||
/*0x1C*/ u8 baseOwnersNameLanguage;
|
||||
/*0x1D*/ //u8 padding[3];
|
||||
} secretBaseSecrets;
|
||||
|
||||
// TVSHOW_SAFARI_FAN_CLUB
|
||||
@ -463,6 +488,7 @@ typedef union // size = 0x24
|
||||
/*0x15*/ u8 unused5;
|
||||
/*0x16*/ u16 daysLeft;
|
||||
/*0x18*/ u8 language;
|
||||
/*0x19*/ //u8 padding;
|
||||
} massOutbreak;
|
||||
} TVShow;
|
||||
|
||||
@ -475,23 +501,23 @@ typedef struct
|
||||
|
||||
struct GabbyAndTyData
|
||||
{
|
||||
/*2ba4*/ u16 mon1;
|
||||
/*2ba6*/ u16 mon2;
|
||||
/*2ba8*/ u16 lastMove;
|
||||
/*2baa*/ u16 quote[1];
|
||||
/*2bac*/ u8 mapnum;
|
||||
/*2bad*/ u8 battleNum;
|
||||
/*2bae*/ u8 battleTookMoreThanOneTurn:1;
|
||||
/*2bae*/ u8 playerLostAMon:1;
|
||||
/*2bae*/ u8 playerUsedHealingItem:1;
|
||||
/*2bae*/ u8 playerThrewABall:1;
|
||||
/*2bae*/ u8 onAir:1;
|
||||
/*2bae*/ u8 valA_5:3;
|
||||
/*2baf*/ u8 battleTookMoreThanOneTurn2:1;
|
||||
/*2baf*/ u8 playerLostAMon2:1;
|
||||
/*2baf*/ u8 playerUsedHealingItem2:1;
|
||||
/*2baf*/ u8 playerThrewABall2:1;
|
||||
/*2baf*/ u8 valB_4:4;
|
||||
/*2BA4*/ u16 mon1;
|
||||
/*2BA6*/ u16 mon2;
|
||||
/*2BA8*/ u16 lastMove;
|
||||
/*2BAA*/ u16 quote[1];
|
||||
/*2BAC*/ u8 mapnum;
|
||||
/*2BAD*/ u8 battleNum;
|
||||
/*2BAE*/ u8 battleTookMoreThanOneTurn:1;
|
||||
u8 playerLostAMon:1;
|
||||
u8 playerUsedHealingItem:1;
|
||||
u8 playerThrewABall:1;
|
||||
u8 onAir:1;
|
||||
u8 valA_5:3;
|
||||
/*2BAF*/ u8 battleTookMoreThanOneTurn2:1;
|
||||
u8 playerLostAMon2:1;
|
||||
u8 playerUsedHealingItem2:1;
|
||||
u8 playerThrewABall2:1;
|
||||
u8 valB_4:4;
|
||||
};
|
||||
|
||||
#endif //GUARD_GLOBAL_TV_H
|
||||
|
@ -9957,6 +9957,8 @@ extern const u32 gBattleAnimSpriteGfx_Tornado[];
|
||||
extern const u32 gBattleAnimSpritePal_Tornado[];
|
||||
extern const u32 gBattleAnimSpriteGfx_ZMoveSymbol[];
|
||||
extern const u32 gBattleAnimSpritePal_ZMoveSymbol[];
|
||||
extern const u32 gBattleAnimSpriteGfx_Teapot[];
|
||||
extern const u32 gBattleAnimSpritePal_Teapot[];
|
||||
|
||||
extern const u32 gBattleAnimBgImage_Dark[];
|
||||
extern const u32 gBattleAnimBgImage_Ghost[];
|
||||
|
@ -2,7 +2,6 @@
|
||||
#define GUARD_ITEM_H
|
||||
|
||||
#include "constants/item.h"
|
||||
#include "constants/item_config.h"
|
||||
|
||||
typedef void (*ItemUseFunc)(u8);
|
||||
|
||||
|
@ -109,7 +109,7 @@ struct __attribute__((packed, aligned(2))) RfuGameData
|
||||
u8 playerGender:1;
|
||||
u8 tradeLevel:7;
|
||||
u8 tradeType:6;
|
||||
u8 padding:2;
|
||||
u8 filler:2;
|
||||
};
|
||||
|
||||
// Constants for getting/setting information in 'partnerInfo' of RfuGameData.
|
||||
|
@ -7,12 +7,20 @@
|
||||
#define LIST_CANCEL -2
|
||||
#define LIST_HEADER -3
|
||||
|
||||
#define LIST_NO_MULTIPLE_SCROLL 0
|
||||
#define LIST_MULTIPLE_SCROLL_DPAD 1
|
||||
#define LIST_MULTIPLE_SCROLL_L_R 2
|
||||
enum {
|
||||
LIST_NO_MULTIPLE_SCROLL,
|
||||
LIST_MULTIPLE_SCROLL_DPAD,
|
||||
LIST_MULTIPLE_SCROLL_L_R,
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
enum {
|
||||
CURSOR_BLACK_ARROW,
|
||||
CURSOR_INVISIBLE,
|
||||
CURSOR_RED_OUTLINE,
|
||||
CURSOR_RED_ARROW,
|
||||
};
|
||||
|
||||
enum {
|
||||
SCROLL_ARROW_LEFT,
|
||||
SCROLL_ARROW_RIGHT,
|
||||
SCROLL_ARROW_UP,
|
||||
|
@ -3,10 +3,7 @@
|
||||
|
||||
extern u8 gUnusedPokedexU8;
|
||||
extern void (*gPokedexVBlankCB)(void);
|
||||
|
||||
#if P_ENABLE_DEBUG == TRUE
|
||||
extern const u8 *const gMonFootprintTable[];
|
||||
#endif
|
||||
|
||||
enum
|
||||
{
|
||||
|
@ -3,7 +3,6 @@
|
||||
|
||||
#include "sprite.h"
|
||||
#include "constants/region_map_sections.h"
|
||||
#include "constants/pokemon_config.h"
|
||||
#include "constants/map_groups.h"
|
||||
|
||||
#define GET_BASE_SPECIES_ID(speciesId) (GetFormSpeciesId(speciesId, 0))
|
||||
@ -294,7 +293,7 @@ struct BattlePokemon
|
||||
/*0x55*/ u32 otId;
|
||||
};
|
||||
|
||||
struct BaseStats
|
||||
struct SpeciesInfo
|
||||
{
|
||||
/* 0x00 */ u8 baseHP;
|
||||
/* 0x01 */ u8 baseAttack;
|
||||
@ -327,7 +326,6 @@ struct BaseStats
|
||||
u16 flags;
|
||||
};
|
||||
|
||||
#include "constants/battle_config.h"
|
||||
struct BattleMove
|
||||
{
|
||||
u16 effect;
|
||||
@ -396,7 +394,7 @@ extern struct SpriteTemplate gMultiuseSpriteTemplate;
|
||||
extern const struct BattleMove gBattleMoves[];
|
||||
extern const u8 gFacilityClassToPicIndex[];
|
||||
extern const u8 gFacilityClassToTrainerClass[];
|
||||
extern const struct BaseStats gBaseStats[];
|
||||
extern const struct SpeciesInfo gSpeciesInfo[];
|
||||
extern const u8 *const gItemEffectTable[];
|
||||
extern const u32 gExperienceTables[][MAX_LEVEL + 1];
|
||||
extern const struct LevelUpMove *const gLevelUpLearnsets[];
|
||||
|
@ -1749,6 +1749,7 @@ gCryTable::
|
||||
cry Cry_TornadusTherian
|
||||
cry Cry_ThundurusTherian
|
||||
cry Cry_LandorusTherian
|
||||
cry Cry_Bulbasaur //Cry_EnamorusTherian
|
||||
@ Kyurem
|
||||
cry Cry_KyuremWhite
|
||||
cry Cry_KyuremBlack
|
||||
|
@ -1082,6 +1082,14 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score)
|
||||
else if (!BattlerStatCanRise(battlerAtk, AI_DATA->abilities[battlerAtk], STAT_SPDEF))
|
||||
score -= 6;
|
||||
break;
|
||||
case EFFECT_VICTORY_DANCE:
|
||||
if (gBattleMons[battlerAtk].statStages[STAT_ATK] >= MAX_STAT_STAGE || !HasMoveWithSplit(battlerAtk, SPLIT_PHYSICAL))
|
||||
score -= 10;
|
||||
else if (!BattlerStatCanRise(battlerAtk, AI_DATA->abilities[battlerAtk], STAT_SPEED))
|
||||
score -= 8;
|
||||
else if (!BattlerStatCanRise(battlerAtk, AI_DATA->abilities[battlerAtk], STAT_DEF))
|
||||
score -= 6;
|
||||
break;
|
||||
case EFFECT_SHIFT_GEAR:
|
||||
if (!BattlerStatCanRise(battlerAtk, AI_DATA->abilities[battlerAtk], STAT_ATK) || !HasMoveWithSplit(battlerAtk, SPLIT_PHYSICAL))
|
||||
score -= 10;
|
||||
@ -2007,6 +2015,10 @@ static s16 AI_CheckBadMove(u8 battlerAtk, u8 battlerDef, u16 move, s16 score)
|
||||
if (!IS_BATTLER_OF_TYPE(battlerAtk, TYPE_FIRE))
|
||||
score -= 10;
|
||||
break;
|
||||
case EFFECT_DOUBLE_SHOCK:
|
||||
if (!IS_BATTLER_OF_TYPE(battlerAtk, TYPE_ELECTRIC))
|
||||
score -= 10;
|
||||
break;
|
||||
case EFFECT_DEFOG:
|
||||
if (gSideStatuses[GetBattlerSide(battlerDef)]
|
||||
& (SIDE_STATUS_REFLECT | SIDE_STATUS_LIGHTSCREEN | SIDE_STATUS_AURORA_VEIL | SIDE_STATUS_SAFEGUARD | SIDE_STATUS_MIST)
|
||||
@ -2690,7 +2702,7 @@ static s16 AI_DoubleBattle(u8 battlerAtk, u8 battlerDef, u16 move, s16 score)
|
||||
switch (gBattleMoves[AI_DATA->partnerMove].effect)
|
||||
{
|
||||
case EFFECT_HELPING_HAND:
|
||||
if (IS_MOVE_STATUS(move))
|
||||
if (!IS_MOVE_STATUS(move))
|
||||
score += 5;
|
||||
break;
|
||||
case EFFECT_PERISH_SONG:
|
||||
@ -3938,6 +3950,10 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score)
|
||||
if (sereneGraceBoost)
|
||||
IncreaseStatUpScore(battlerAtk, battlerDef, STAT_ATK, &score);
|
||||
break;
|
||||
case EFFECT_SPECIAL_ATTACK_UP_HIT:
|
||||
if (sereneGraceBoost)
|
||||
IncreaseStatUpScore(battlerAtk, battlerDef, STAT_SPATK, &score);
|
||||
break;
|
||||
case EFFECT_FELL_STINGER:
|
||||
if (gBattleMons[battlerAtk].statStages[STAT_ATK] < MAX_STAT_STAGE
|
||||
&& AI_DATA->abilities[battlerAtk] != ABILITY_CONTRARY
|
||||
@ -4393,6 +4409,11 @@ static s16 AI_CheckViability(u8 battlerAtk, u8 battlerDef, u16 move, s16 score)
|
||||
IncreaseStatUpScore(battlerAtk, battlerDef, STAT_SPATK, &score);
|
||||
IncreaseStatUpScore(battlerAtk, battlerDef, STAT_SPDEF, &score);
|
||||
break;
|
||||
case EFFECT_VICTORY_DANCE:
|
||||
IncreaseStatUpScore(battlerAtk, battlerDef, STAT_SPEED, &score);
|
||||
IncreaseStatUpScore(battlerAtk, battlerDef, STAT_ATK, &score);
|
||||
IncreaseStatUpScore(battlerAtk, battlerDef, STAT_DEF, &score);
|
||||
break;
|
||||
case EFFECT_SHELL_SMASH:
|
||||
if (AI_DATA->holdEffects[battlerAtk] == HOLD_EFFECT_RESTORE_STATS)
|
||||
score += 1;
|
||||
@ -4878,6 +4899,7 @@ static s16 AI_SetupFirstTurn(u8 battlerAtk, u8 battlerDef, u16 move, s16 score)
|
||||
case EFFECT_SANDSTORM:
|
||||
case EFFECT_HAIL:
|
||||
case EFFECT_GEOMANCY:
|
||||
case EFFECT_VICTORY_DANCE:
|
||||
score += 2;
|
||||
break;
|
||||
default:
|
||||
|
@ -209,9 +209,9 @@ static bool8 FindMonThatAbsorbsOpponentsMove(void)
|
||||
|
||||
species = GetMonData(&party[i], MON_DATA_SPECIES);
|
||||
if (GetMonData(&party[i], MON_DATA_ABILITY_NUM) != 0)
|
||||
monAbility = gBaseStats[species].abilities[1];
|
||||
monAbility = gSpeciesInfo[species].abilities[1];
|
||||
else
|
||||
monAbility = gBaseStats[species].abilities[0];
|
||||
monAbility = gSpeciesInfo[species].abilities[0];
|
||||
|
||||
if (absorbingTypeAbility == monAbility && Random() & 1)
|
||||
{
|
||||
@ -583,9 +583,9 @@ static bool8 FindMonWithFlagsAndSuperEffective(u16 flags, u8 moduloPercent)
|
||||
|
||||
species = GetMonData(&party[i], MON_DATA_SPECIES);
|
||||
if (GetMonData(&party[i], MON_DATA_ABILITY_NUM) != 0)
|
||||
monAbility = gBaseStats[species].abilities[1];
|
||||
monAbility = gSpeciesInfo[species].abilities[1];
|
||||
else
|
||||
monAbility = gBaseStats[species].abilities[0];
|
||||
monAbility = gSpeciesInfo[species].abilities[0];
|
||||
|
||||
CalcPartyMonTypeEffectivenessMultiplier(gLastLandedMoves[gActiveBattler], species, monAbility);
|
||||
if (gMoveResultFlags & flags)
|
||||
@ -832,8 +832,8 @@ static u32 GetBestMonTypeMatchup(struct Pokemon *party, int firstId, int lastId,
|
||||
|
||||
u8 atkType1 = gBattleMons[opposingBattler].type1;
|
||||
u8 atkType2 = gBattleMons[opposingBattler].type2;
|
||||
u8 defType1 = gBaseStats[species].type1;
|
||||
u8 defType2 = gBaseStats[species].type2;
|
||||
u8 defType1 = gSpeciesInfo[species].type1;
|
||||
u8 defType2 = gSpeciesInfo[species].type2;
|
||||
|
||||
typeEffectiveness *= GetTypeModifier(atkType1, defType1);
|
||||
if (atkType2 != atkType1)
|
||||
|
@ -552,9 +552,9 @@ void SetBattlerData(u8 battlerId)
|
||||
if (BATTLE_HISTORY->abilities[battlerId] != ABILITY_NONE)
|
||||
gBattleMons[battlerId].ability = BATTLE_HISTORY->abilities[battlerId];
|
||||
// Check if mon can only have one ability.
|
||||
else if (gBaseStats[gBattleMons[battlerId].species].abilities[1] == ABILITY_NONE
|
||||
|| gBaseStats[gBattleMons[battlerId].species].abilities[1] == gBaseStats[gBattleMons[battlerId].species].abilities[0])
|
||||
gBattleMons[battlerId].ability = gBaseStats[gBattleMons[battlerId].species].abilities[0];
|
||||
else if (gSpeciesInfo[gBattleMons[battlerId].species].abilities[1] == ABILITY_NONE
|
||||
|| gSpeciesInfo[gBattleMons[battlerId].species].abilities[1] == gSpeciesInfo[gBattleMons[battlerId].species].abilities[0])
|
||||
gBattleMons[battlerId].ability = gSpeciesInfo[gBattleMons[battlerId].species].abilities[0];
|
||||
// The ability is unknown.
|
||||
else
|
||||
gBattleMons[battlerId].ability = ABILITY_NONE;
|
||||
@ -628,12 +628,12 @@ bool32 IsBattlerTrapped(u8 battler, bool8 checkSwitch)
|
||||
|
||||
u32 GetTotalBaseStat(u32 species)
|
||||
{
|
||||
return gBaseStats[species].baseHP
|
||||
+ gBaseStats[species].baseAttack
|
||||
+ gBaseStats[species].baseDefense
|
||||
+ gBaseStats[species].baseSpeed
|
||||
+ gBaseStats[species].baseSpAttack
|
||||
+ gBaseStats[species].baseSpDefense;
|
||||
return gSpeciesInfo[species].baseHP
|
||||
+ gSpeciesInfo[species].baseAttack
|
||||
+ gSpeciesInfo[species].baseDefense
|
||||
+ gSpeciesInfo[species].baseSpeed
|
||||
+ gSpeciesInfo[species].baseSpAttack
|
||||
+ gSpeciesInfo[species].baseSpDefense;
|
||||
}
|
||||
|
||||
bool32 IsTruantMonVulnerable(u32 battlerAI, u32 opposingBattler)
|
||||
@ -1183,12 +1183,12 @@ s32 AI_GetAbility(u32 battlerId)
|
||||
return knownAbility;
|
||||
|
||||
// Else, guess the ability
|
||||
if (gBaseStats[gBattleMons[battlerId].species].abilities[0] != ABILITY_NONE)
|
||||
if (gSpeciesInfo[gBattleMons[battlerId].species].abilities[0] != ABILITY_NONE)
|
||||
{
|
||||
u16 abilityGuess = ABILITY_NONE;
|
||||
while (abilityGuess == ABILITY_NONE)
|
||||
{
|
||||
abilityGuess = gBaseStats[gBattleMons[battlerId].species].abilities[Random() % NUM_ABILITY_SLOTS];
|
||||
abilityGuess = gSpeciesInfo[gBattleMons[battlerId].species].abilities[Random() % NUM_ABILITY_SLOTS];
|
||||
}
|
||||
|
||||
return abilityGuess;
|
||||
@ -2091,6 +2091,7 @@ bool32 IsStatRaisingEffect(u16 effect)
|
||||
case EFFECT_BULK_UP:
|
||||
case EFFECT_GEOMANCY:
|
||||
case EFFECT_STOCKPILE:
|
||||
case EFFECT_VICTORY_DANCE:
|
||||
return TRUE;
|
||||
default:
|
||||
return FALSE;
|
||||
@ -2428,19 +2429,41 @@ static bool32 PartyBattlerShouldAvoidHazards(u8 currBattler, u8 switchBattler)
|
||||
{
|
||||
struct Pokemon *mon = GetPartyBattlerPartyData(currBattler, switchBattler);
|
||||
u16 ability = GetMonAbility(mon); // we know our own party data
|
||||
u16 holdEffect = GetBattlerHoldEffect(GetMonData(mon, MON_DATA_HELD_ITEM), TRUE);
|
||||
u16 holdEffect;
|
||||
u16 species = GetMonData(mon, MON_DATA_SPECIES);
|
||||
u32 flags = gSideStatuses[GetBattlerSide(currBattler)] & (SIDE_STATUS_SPIKES | SIDE_STATUS_STEALTH_ROCK | SIDE_STATUS_STICKY_WEB | SIDE_STATUS_TOXIC_SPIKES);
|
||||
s32 hazardDamage = 0;
|
||||
u8 type1 = gSpeciesInfo[species].type1;
|
||||
u8 type2 = gSpeciesInfo[species].type2;
|
||||
u32 maxHp = GetMonData(mon, MON_DATA_MAX_HP);
|
||||
|
||||
if (flags == 0)
|
||||
return FALSE;
|
||||
|
||||
if (ability == ABILITY_MAGIC_GUARD || ability == ABILITY_LEVITATE
|
||||
|| holdEffect == HOLD_EFFECT_HEAVY_DUTY_BOOTS)
|
||||
if (ability == ABILITY_MAGIC_GUARD)
|
||||
return FALSE;
|
||||
if (gFieldStatuses & STATUS_FIELD_MAGIC_ROOM || ability == ABILITY_KLUTZ)
|
||||
holdEffect = HOLD_EFFECT_NONE;
|
||||
else
|
||||
holdEffect = gItems[GetMonData(mon, MON_DATA_HELD_ITEM)].holdEffect;
|
||||
if (holdEffect == HOLD_EFFECT_HEAVY_DUTY_BOOTS)
|
||||
return FALSE;
|
||||
|
||||
if (flags & (SIDE_STATUS_SPIKES | SIDE_STATUS_STEALTH_ROCK) && GetMonData(mon, MON_DATA_HP) < (GetMonData(mon, MON_DATA_MAX_HP) / 8))
|
||||
return TRUE;
|
||||
if (flags & SIDE_STATUS_STEALTH_ROCK)
|
||||
hazardDamage += GetStealthHazardDamageByTypesAndHP(gBattleMoves[MOVE_STEALTH_ROCK].type, type1, type2, maxHp);
|
||||
|
||||
if (flags & SIDE_STATUS_SPIKES && ((type1 != TYPE_FLYING && type2 != TYPE_FLYING
|
||||
&& ability != ABILITY_LEVITATE && holdEffect != HOLD_EFFECT_AIR_BALLOON)
|
||||
|| holdEffect == HOLD_EFFECT_IRON_BALL || gFieldStatuses & STATUS_FIELD_GRAVITY))
|
||||
{
|
||||
u8 spikesDmg = maxHp / ((5 - gSideTimers[GetBattlerSide(currBattler)].spikesAmount) * 2);
|
||||
if (spikesDmg == 0)
|
||||
spikesDmg = 1;
|
||||
hazardDamage += spikesDmg;
|
||||
}
|
||||
|
||||
if (hazardDamage >= GetMonData(mon, MON_DATA_HP))
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -17,7 +17,6 @@
|
||||
#include "sprite.h"
|
||||
#include "task.h"
|
||||
#include "constants/battle_anim.h"
|
||||
#include "constants/battle_config.h"
|
||||
#include "constants/moves.h"
|
||||
|
||||
/*
|
||||
|
@ -2447,6 +2447,39 @@ const struct SpriteTemplate gFollowMeFingerSpriteTemplate =
|
||||
.callback = AnimFollowMeFinger,
|
||||
};
|
||||
|
||||
const union AffineAnimCmd gTeaAffineAnimCmds1[] =
|
||||
{
|
||||
AFFINEANIMCMD_FRAME(0x10, 0x10, 0, 0),
|
||||
AFFINEANIMCMD_FRAME(0x1E, 0x1E, 0, 8),
|
||||
AFFINEANIMCMD_END,
|
||||
};
|
||||
|
||||
const union AffineAnimCmd gTeaAffineAnimCmds2[] =
|
||||
{
|
||||
AFFINEANIMCMD_FRAME(0x0, 0x0, -3, 11),
|
||||
AFFINEANIMCMD_FRAME(0x0, 0x0, 3, 11),
|
||||
AFFINEANIMCMD_LOOP(2),
|
||||
AFFINEANIMCMD_FRAME(0xFFE2, 0xFFE2, 0, 8),
|
||||
AFFINEANIMCMD_END,
|
||||
};
|
||||
|
||||
const union AffineAnimCmd *const gTeaAffineAnimTable[] =
|
||||
{
|
||||
gTeaAffineAnimCmds1,
|
||||
gTeaAffineAnimCmds2,
|
||||
};
|
||||
|
||||
const struct SpriteTemplate gTeapotSpriteTemplate =
|
||||
{
|
||||
.tileTag = ANIM_TAG_TEAPOT,
|
||||
.paletteTag = ANIM_TAG_TEAPOT,
|
||||
.oam = &gOamData_AffineDouble_ObjNormal_64x64,
|
||||
.anims = gDummySpriteAnimTable,
|
||||
.images = NULL,
|
||||
.affineAnims = gTeaAffineAnimTable,
|
||||
.callback = AnimMetronomeFinger,
|
||||
};
|
||||
|
||||
const union AnimCmd gTauntFingerAnimCmds1[] =
|
||||
{
|
||||
ANIMCMD_FRAME(0, 1),
|
||||
@ -5667,11 +5700,11 @@ static void AnimTipMon_Step(struct Sprite *sprite)
|
||||
|
||||
void AnimTask_SkullBashPosition(u8 taskId)
|
||||
{
|
||||
u8 a;
|
||||
u8 side;
|
||||
|
||||
gTasks[taskId].data[0] = gBattlerSpriteIds[gBattleAnimAttacker];
|
||||
a = GetBattlerSide(gBattleAnimAttacker);
|
||||
gTasks[taskId].data[1] = a;
|
||||
side = GetBattlerSide(gBattleAnimAttacker);
|
||||
gTasks[taskId].data[1] = side;
|
||||
gTasks[taskId].data[2] = 0;
|
||||
switch (gBattleAnimArgs[0])
|
||||
{
|
||||
@ -5683,7 +5716,7 @@ void AnimTask_SkullBashPosition(u8 taskId)
|
||||
gTasks[taskId].data[3] = 8;
|
||||
gTasks[taskId].data[4] = 0;
|
||||
gTasks[taskId].data[5] = 3;
|
||||
if (a == 0)
|
||||
if (side == B_SIDE_PLAYER)
|
||||
gTasks[taskId].data[5] *= -1;
|
||||
|
||||
gTasks[taskId].func = AnimTask_SkullBashPositionSet;
|
||||
@ -5692,7 +5725,7 @@ void AnimTask_SkullBashPosition(u8 taskId)
|
||||
gTasks[taskId].data[3] = 8;
|
||||
gTasks[taskId].data[4] = 0x600;
|
||||
gTasks[taskId].data[5] = 0xC0;
|
||||
if (a == 0)
|
||||
if (side == B_SIDE_PLAYER)
|
||||
{
|
||||
gTasks[taskId].data[4] = -gTasks[taskId].data[4];
|
||||
gTasks[taskId].data[5] = -gTasks[taskId].data[5];
|
||||
|
@ -36,11 +36,7 @@ static void CreateBattlerTrace(struct Task *task, u8 taskId);
|
||||
|
||||
EWRAM_DATA static union AffineAnimCmd *sAnimTaskAffineAnim = NULL;
|
||||
|
||||
#if P_ENABLE_DEBUG == TRUE
|
||||
const struct UCoords8 sBattlerCoords[][MAX_BATTLERS_COUNT] =
|
||||
#else
|
||||
static const struct UCoords8 sBattlerCoords[][MAX_BATTLERS_COUNT] =
|
||||
#endif
|
||||
{
|
||||
{ // Single battle
|
||||
{ 72, 80 },
|
||||
@ -65,11 +61,7 @@ const struct MonCoords gCastformFrontSpriteCoords[NUM_CASTFORM_FORMS] =
|
||||
[CASTFORM_ICE] = { .size = MON_COORDS_SIZE(64, 48), .y_offset = 8 },
|
||||
};
|
||||
|
||||
#if P_ENABLE_DEBUG == TRUE
|
||||
const u8 sCastformElevations[NUM_CASTFORM_FORMS] =
|
||||
#else
|
||||
static const u8 sCastformElevations[NUM_CASTFORM_FORMS] =
|
||||
#endif
|
||||
{
|
||||
[CASTFORM_NORMAL] = 13,
|
||||
[CASTFORM_FIRE] = 14,
|
||||
|
@ -7857,7 +7857,7 @@ static void SpriteCB_TwinkleOnBattler(struct Sprite *sprite)
|
||||
|
||||
void AnimTask_PrimalReversion(u8 taskId)
|
||||
{
|
||||
if (gBattleMons[gBattleAnimAttacker].item == ITEM_RED_ORB)
|
||||
if (gBattleMons[gBattleAnimAttacker].item == ITEM_RED_ORB || gBattleMons[gBattleAnimAttacker].item == ITEM_BLUE_ORB)
|
||||
gBattleAnimArgs[0] = gBattleMons[gBattleAnimAttacker].item;
|
||||
else
|
||||
gBattleAnimArgs[0] = 0;
|
||||
|
@ -26,17 +26,6 @@
|
||||
#include "constants/trainers.h"
|
||||
#include "constants/battle_anim.h"
|
||||
|
||||
#if !P_ENABLE_DEBUG
|
||||
struct BattleBackground
|
||||
{
|
||||
const void *tileset;
|
||||
const void *tilemap;
|
||||
const void *entryTileset;
|
||||
const void *entryTilemap;
|
||||
const void *palette;
|
||||
};
|
||||
#endif
|
||||
|
||||
// .rodata
|
||||
static const u16 sUnrefArray[] = {0x0300, 0x0000}; //OamData?
|
||||
|
||||
@ -602,11 +591,7 @@ const struct WindowTemplate * const gBattleWindowTemplates[] =
|
||||
[B_WIN_TYPE_ARENA] = sBattleArenaWindowTemplates,
|
||||
};
|
||||
|
||||
#if P_ENABLE_DEBUG == TRUE
|
||||
const struct BattleBackground sBattleTerrainTable[] =
|
||||
#else
|
||||
static const struct BattleBackground sBattleTerrainTable[] =
|
||||
#endif
|
||||
{
|
||||
[BATTLE_TERRAIN_GRASS] =
|
||||
{
|
||||
|
@ -30,7 +30,6 @@
|
||||
#include "util.h"
|
||||
#include "window.h"
|
||||
#include "constants/battle_anim.h"
|
||||
#include "constants/battle_config.h"
|
||||
#include "constants/items.h"
|
||||
#include "constants/moves.h"
|
||||
#include "constants/party_menu.h"
|
||||
@ -330,7 +329,7 @@ static void HandleInputChooseAction(void)
|
||||
{
|
||||
SwapHpBarsWithHpText();
|
||||
}
|
||||
#if B_ENABLE_DEBUG == TRUE
|
||||
#if DEBUG_BATTLE_MENU == TRUE
|
||||
else if (JOY_NEW(SELECT_BUTTON))
|
||||
{
|
||||
BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_DEBUG, 0);
|
||||
@ -1385,7 +1384,7 @@ static void Task_GiveExpToMon(u8 taskId)
|
||||
u16 species = GetMonData(mon, MON_DATA_SPECIES);
|
||||
u8 level = GetMonData(mon, MON_DATA_LEVEL);
|
||||
u32 currExp = GetMonData(mon, MON_DATA_EXP);
|
||||
u32 nextLvlExp = gExperienceTables[gBaseStats[species].growthRate][level + 1];
|
||||
u32 nextLvlExp = gExperienceTables[gSpeciesInfo[species].growthRate][level + 1];
|
||||
|
||||
if (currExp + gainedExp >= nextLvlExp)
|
||||
{
|
||||
@ -1428,11 +1427,11 @@ static void Task_PrepareToGiveExpWithExpBar(u8 taskId)
|
||||
u8 level = GetMonData(mon, MON_DATA_LEVEL);
|
||||
u16 species = GetMonData(mon, MON_DATA_SPECIES);
|
||||
u32 exp = GetMonData(mon, MON_DATA_EXP);
|
||||
u32 currLvlExp = gExperienceTables[gBaseStats[species].growthRate][level];
|
||||
u32 currLvlExp = gExperienceTables[gSpeciesInfo[species].growthRate][level];
|
||||
u32 expToNextLvl;
|
||||
|
||||
exp -= currLvlExp;
|
||||
expToNextLvl = gExperienceTables[gBaseStats[species].growthRate][level + 1] - currLvlExp;
|
||||
expToNextLvl = gExperienceTables[gSpeciesInfo[species].growthRate][level + 1] - currLvlExp;
|
||||
SetBattleBarStruct(battlerId, gHealthboxSpriteIds[battlerId], expToNextLvl, exp, -gainedExp);
|
||||
PlaySE(SE_EXP);
|
||||
gTasks[taskId].func = Task_GiveExpWithExpBar;
|
||||
@ -1464,7 +1463,7 @@ static void Task_GiveExpWithExpBar(u8 taskId)
|
||||
level = GetMonData(&gPlayerParty[monId], MON_DATA_LEVEL);
|
||||
currExp = GetMonData(&gPlayerParty[monId], MON_DATA_EXP);
|
||||
species = GetMonData(&gPlayerParty[monId], MON_DATA_SPECIES);
|
||||
expOnNextLvl = gExperienceTables[gBaseStats[species].growthRate][level + 1];
|
||||
expOnNextLvl = gExperienceTables[gSpeciesInfo[species].growthRate][level + 1];
|
||||
|
||||
if (currExp + gainedExp >= expOnNextLvl)
|
||||
{
|
||||
|
@ -325,7 +325,7 @@ static void Task_GiveExpToMon(u8 taskId)
|
||||
u16 species = GetMonData(mon, MON_DATA_SPECIES);
|
||||
u8 level = GetMonData(mon, MON_DATA_LEVEL);
|
||||
u32 currExp = GetMonData(mon, MON_DATA_EXP);
|
||||
u32 nextLvlExp = gExperienceTables[gBaseStats[species].growthRate][level + 1];
|
||||
u32 nextLvlExp = gExperienceTables[gSpeciesInfo[species].growthRate][level + 1];
|
||||
|
||||
if (currExp + gainedExp >= nextLvlExp)
|
||||
{
|
||||
@ -368,11 +368,11 @@ static void Task_PrepareToGiveExpWithExpBar(u8 taskId)
|
||||
u8 level = GetMonData(mon, MON_DATA_LEVEL);
|
||||
u16 species = GetMonData(mon, MON_DATA_SPECIES);
|
||||
u32 exp = GetMonData(mon, MON_DATA_EXP);
|
||||
u32 currLvlExp = gExperienceTables[gBaseStats[species].growthRate][level];
|
||||
u32 currLvlExp = gExperienceTables[gSpeciesInfo[species].growthRate][level];
|
||||
u32 expToNextLvl;
|
||||
|
||||
exp -= currLvlExp;
|
||||
expToNextLvl = gExperienceTables[gBaseStats[species].growthRate][level + 1] - currLvlExp;
|
||||
expToNextLvl = gExperienceTables[gSpeciesInfo[species].growthRate][level + 1] - currLvlExp;
|
||||
SetBattleBarStruct(battlerId, gHealthboxSpriteIds[battlerId], expToNextLvl, exp, -gainedExp);
|
||||
PlaySE(SE_EXP);
|
||||
gTasks[taskId].func = Task_GiveExpWithExpBar;
|
||||
@ -404,7 +404,7 @@ static void Task_GiveExpWithExpBar(u8 taskId)
|
||||
level = GetMonData(&gPlayerParty[monId], MON_DATA_LEVEL);
|
||||
currExp = GetMonData(&gPlayerParty[monId], MON_DATA_EXP);
|
||||
species = GetMonData(&gPlayerParty[monId], MON_DATA_SPECIES);
|
||||
expOnNextLvl = gExperienceTables[gBaseStats[species].growthRate][level + 1];
|
||||
expOnNextLvl = gExperienceTables[gSpeciesInfo[species].growthRate][level + 1];
|
||||
|
||||
if (currExp + gainedExp >= expOnNextLvl)
|
||||
{
|
||||
|
@ -1759,7 +1759,7 @@ static void SetUpModifyArrows(struct BattleDebugMenu *data)
|
||||
{
|
||||
case LIST_ITEM_ABILITY:
|
||||
data->modifyArrows.minValue = 0;
|
||||
data->modifyArrows.maxValue = ABILITIES_COUNT_GEN8 - 1;
|
||||
data->modifyArrows.maxValue = ABILITIES_COUNT - 1;
|
||||
data->modifyArrows.maxDigits = 3;
|
||||
data->modifyArrows.modifiedValPtr = &gBattleMons[data->battlerId].ability;
|
||||
data->modifyArrows.typeOfVal = VAL_U16;
|
||||
@ -1767,7 +1767,7 @@ static void SetUpModifyArrows(struct BattleDebugMenu *data)
|
||||
break;
|
||||
case LIST_ITEM_MOVES:
|
||||
data->modifyArrows.minValue = 0;
|
||||
data->modifyArrows.maxValue = MOVES_COUNT_GEN8 - 1;
|
||||
data->modifyArrows.maxValue = MOVES_COUNT - 1;
|
||||
data->modifyArrows.maxDigits = 3;
|
||||
if (data->currentSecondaryListItemId == 4)
|
||||
{
|
||||
|
@ -2348,8 +2348,8 @@ static void InitDomeTrainers(void)
|
||||
rankingScores[0] += GetMonData(&gPlayerParty[trainerId], MON_DATA_SPDEF, NULL);
|
||||
rankingScores[0] += GetMonData(&gPlayerParty[trainerId], MON_DATA_SPEED, NULL);
|
||||
rankingScores[0] += GetMonData(&gPlayerParty[trainerId], MON_DATA_MAX_HP, NULL);
|
||||
monTypesBits |= gBitTable[gBaseStats[GetMonData(&gPlayerParty[trainerId], MON_DATA_SPECIES, NULL)].type1];
|
||||
monTypesBits |= gBitTable[gBaseStats[GetMonData(&gPlayerParty[trainerId], MON_DATA_SPECIES, NULL)].type2];
|
||||
monTypesBits |= gBitTable[gSpeciesInfo[GetMonData(&gPlayerParty[trainerId], MON_DATA_SPECIES, NULL)].type1];
|
||||
monTypesBits |= gBitTable[gSpeciesInfo[GetMonData(&gPlayerParty[trainerId], MON_DATA_SPECIES, NULL)].type2];
|
||||
}
|
||||
|
||||
// Count the number of types in the players party, to factor into the ranking
|
||||
@ -2383,8 +2383,8 @@ static void InitDomeTrainers(void)
|
||||
rankingScores[i] += statValues[STAT_SPDEF];
|
||||
rankingScores[i] += statValues[STAT_SPEED];
|
||||
rankingScores[i] += statValues[STAT_HP];
|
||||
monTypesBits |= gBitTable[gBaseStats[gFacilityTrainerMons[DOME_MONS[i][j]].species].type1];
|
||||
monTypesBits |= gBitTable[gBaseStats[gFacilityTrainerMons[DOME_MONS[i][j]].species].type2];
|
||||
monTypesBits |= gBitTable[gSpeciesInfo[gFacilityTrainerMons[DOME_MONS[i][j]].species].type1];
|
||||
monTypesBits |= gBitTable[gSpeciesInfo[gFacilityTrainerMons[DOME_MONS[i][j]].species].type2];
|
||||
}
|
||||
|
||||
for (monTypesCount = 0, j = 0; j < 32; j++)
|
||||
@ -2448,7 +2448,7 @@ static void InitDomeTrainers(void)
|
||||
|
||||
#define CALC_STAT(base, statIndex) \
|
||||
{ \
|
||||
u8 baseStat = gBaseStats[species].base; \
|
||||
u8 baseStat = gSpeciesInfo[species].base; \
|
||||
stats[statIndex] = (((2 * baseStat + ivs + evs[statIndex] / 4) * level) / 100) + 5; \
|
||||
stats[statIndex] = (u8) ModifyStatByNature(nature, stats[statIndex], statIndex); \
|
||||
}
|
||||
@ -2481,7 +2481,7 @@ static void CalcDomeMonStats(u16 species, int level, int ivs, u8 evBits, u8 natu
|
||||
}
|
||||
else
|
||||
{
|
||||
int n = 2 * gBaseStats[species].baseHP;
|
||||
int n = 2 * gSpeciesInfo[species].baseHP;
|
||||
stats[STAT_HP] = (((n + ivs + evs[STAT_HP] / 4) * level) / 100) + level + 10;
|
||||
}
|
||||
|
||||
@ -2750,9 +2750,9 @@ static int GetTypeEffectivenessPoints(int move, int targetSpecies, int mode)
|
||||
if (move == MOVE_NONE || move == MOVE_UNAVAILABLE || IS_MOVE_STATUS(move))
|
||||
return 0;
|
||||
|
||||
defType1 = gBaseStats[targetSpecies].type1;
|
||||
defType2 = gBaseStats[targetSpecies].type2;
|
||||
defAbility = gBaseStats[targetSpecies].abilities[0];
|
||||
defType1 = gSpeciesInfo[targetSpecies].type1;
|
||||
defType2 = gSpeciesInfo[targetSpecies].type2;
|
||||
defAbility = gSpeciesInfo[targetSpecies].abilities[0];
|
||||
moveType = gBattleMoves[move].type;
|
||||
|
||||
if (defAbility == ABILITY_LEVITATE && moveType == TYPE_GROUND)
|
||||
@ -5188,9 +5188,9 @@ static u16 GetWinningMove(int winnerTournamentId, int loserTournamentId, u8 roun
|
||||
targetSpecies = gFacilityTrainerMons[DOME_MONS[loserTournamentId][k]].species;
|
||||
|
||||
if (personality & 1)
|
||||
targetAbility = gBaseStats[targetSpecies].abilities[1];
|
||||
targetAbility = gSpeciesInfo[targetSpecies].abilities[1];
|
||||
else
|
||||
targetAbility = gBaseStats[targetSpecies].abilities[0];
|
||||
targetAbility = gSpeciesInfo[targetSpecies].abilities[0];
|
||||
|
||||
typeMultiplier = CalcPartyMonTypeEffectivenessMultiplier(moveIds[i * 4 + j], targetSpecies, targetAbility);
|
||||
if (typeMultiplier == UQ_4_12(0))
|
||||
@ -5865,8 +5865,8 @@ static void InitRandomTourneyTreeResults(void)
|
||||
statSums[i] += statValues[STAT_SPDEF];
|
||||
statSums[i] += statValues[STAT_SPEED];
|
||||
statSums[i] += statValues[STAT_HP];
|
||||
monTypesBits |= gBitTable[gBaseStats[gFacilityTrainerMons[DOME_MONS[i][j]].species].type1];
|
||||
monTypesBits |= gBitTable[gBaseStats[gFacilityTrainerMons[DOME_MONS[i][j]].species].type2];
|
||||
monTypesBits |= gBitTable[gSpeciesInfo[gFacilityTrainerMons[DOME_MONS[i][j]].species].type1];
|
||||
monTypesBits |= gBitTable[gSpeciesInfo[gFacilityTrainerMons[DOME_MONS[i][j]].species].type2];
|
||||
}
|
||||
|
||||
// Because GF hates temporary vars, trainerId acts like monTypesCount here.
|
||||
@ -5992,12 +5992,12 @@ static void DecideRoundWinners(u8 roundId)
|
||||
}
|
||||
}
|
||||
species = gFacilityTrainerMons[DOME_MONS[tournamentId1][monId1]].species;
|
||||
points1 += ( gBaseStats[species].baseHP
|
||||
+ gBaseStats[species].baseAttack
|
||||
+ gBaseStats[species].baseDefense
|
||||
+ gBaseStats[species].baseSpeed
|
||||
+ gBaseStats[species].baseSpAttack
|
||||
+ gBaseStats[species].baseSpDefense) / 10;
|
||||
points1 += ( gSpeciesInfo[species].baseHP
|
||||
+ gSpeciesInfo[species].baseAttack
|
||||
+ gSpeciesInfo[species].baseDefense
|
||||
+ gSpeciesInfo[species].baseSpeed
|
||||
+ gSpeciesInfo[species].baseSpAttack
|
||||
+ gSpeciesInfo[species].baseSpDefense) / 10;
|
||||
}
|
||||
// Random part of the formula.
|
||||
points1 += (Random() & 0x1F);
|
||||
@ -6015,12 +6015,12 @@ static void DecideRoundWinners(u8 roundId)
|
||||
}
|
||||
}
|
||||
species = gFacilityTrainerMons[DOME_MONS[tournamentId2][monId1]].species;
|
||||
points2 += ( gBaseStats[species].baseHP
|
||||
+ gBaseStats[species].baseAttack
|
||||
+ gBaseStats[species].baseDefense
|
||||
+ gBaseStats[species].baseSpeed
|
||||
+ gBaseStats[species].baseSpAttack
|
||||
+ gBaseStats[species].baseSpDefense) / 10;
|
||||
points2 += ( gSpeciesInfo[species].baseHP
|
||||
+ gSpeciesInfo[species].baseAttack
|
||||
+ gSpeciesInfo[species].baseDefense
|
||||
+ gSpeciesInfo[species].baseSpeed
|
||||
+ gSpeciesInfo[species].baseSpAttack
|
||||
+ gSpeciesInfo[species].baseSpDefense) / 10;
|
||||
}
|
||||
// Random part of the formula.
|
||||
points2 += (Random() & 0x1F);
|
||||
|
@ -618,9 +618,9 @@ static void GetOpponentMostCommonMonType(void)
|
||||
for (i = 0; i < FRONTIER_PARTY_SIZE; i++)
|
||||
{
|
||||
u32 species = gFacilityTrainerMons[gFrontierTempParty[i]].species;
|
||||
typeCounts[gBaseStats[species].type1]++;
|
||||
if (gBaseStats[species].type1 != gBaseStats[species].type2)
|
||||
typeCounts[gBaseStats[species].type2]++;
|
||||
typeCounts[gSpeciesInfo[species].type1]++;
|
||||
if (gSpeciesInfo[species].type1 != gSpeciesInfo[species].type2)
|
||||
typeCounts[gSpeciesInfo[species].type2]++;
|
||||
}
|
||||
|
||||
// Determine which are the two most-common types.
|
||||
|
@ -23,7 +23,6 @@
|
||||
#include "palette.h"
|
||||
#include "contest.h"
|
||||
#include "constants/songs.h"
|
||||
#include "constants/battle_config.h"
|
||||
#include "constants/rgb.h"
|
||||
#include "constants/battle_palace.h"
|
||||
|
||||
@ -78,11 +77,7 @@ static const struct CompressedSpriteSheet sSpriteSheets_HealthBar[MAX_BATTLERS_C
|
||||
{gBlankGfxCompressed, 0x0120, TAG_HEALTHBAR_OPPONENT2_TILE}
|
||||
};
|
||||
|
||||
#if P_ENABLE_DEBUG == TRUE
|
||||
const struct SpritePalette sSpritePalettes_HealthBoxHealthBar[2] =
|
||||
#else
|
||||
static const struct SpritePalette sSpritePalettes_HealthBoxHealthBar[2] =
|
||||
#endif
|
||||
{
|
||||
{gBattleInterface_BallStatusBarPal, TAG_HEALTHBOX_PAL},
|
||||
{gBattleInterface_BallDisplayPal, TAG_HEALTHBAR_PAL}
|
||||
|
@ -31,7 +31,6 @@
|
||||
#include "constants/battle_anim.h"
|
||||
#include "constants/rgb.h"
|
||||
#include "constants/songs.h"
|
||||
#include "constants/battle_config.h"
|
||||
#include "constants/items.h"
|
||||
|
||||
enum
|
||||
@ -2394,9 +2393,9 @@ void UpdateHealthboxAttribute(u8 healthboxSpriteId, struct Pokemon *mon, u8 elem
|
||||
species = GetMonData(mon, MON_DATA_SPECIES);
|
||||
level = GetMonData(mon, MON_DATA_LEVEL);
|
||||
exp = GetMonData(mon, MON_DATA_EXP);
|
||||
currLevelExp = gExperienceTables[gBaseStats[species].growthRate][level];
|
||||
currLevelExp = gExperienceTables[gSpeciesInfo[species].growthRate][level];
|
||||
currExpBarValue = exp - currLevelExp;
|
||||
maxExpBarValue = gExperienceTables[gBaseStats[species].growthRate][level + 1] - currLevelExp;
|
||||
maxExpBarValue = gExperienceTables[gSpeciesInfo[species].growthRate][level + 1] - currLevelExp;
|
||||
SetBattleBarStruct(battlerId, healthboxSpriteId, maxExpBarValue, currExpBarValue, isDoubles);
|
||||
MoveBattleBar(battlerId, healthboxSpriteId, EXP_BAR, 0);
|
||||
}
|
||||
|
@ -52,7 +52,6 @@
|
||||
#include "wild_encounter.h"
|
||||
#include "window.h"
|
||||
#include "constants/abilities.h"
|
||||
#include "constants/battle_config.h"
|
||||
#include "constants/battle_move_effects.h"
|
||||
#include "constants/battle_string_ids.h"
|
||||
#include "constants/hold_effects.h"
|
||||
@ -102,7 +101,7 @@ static void SetActionsAndBattlersTurnOrder(void);
|
||||
static void UpdateBattlerPartyOrdersOnSwitch(void);
|
||||
static bool8 AllAtActionConfirmed(void);
|
||||
static void TryChangeTurnOrder(void);
|
||||
static void CheckFocusPunch_ClearVarsBeforeTurnStarts(void);
|
||||
static void CheckChosenMoveForEffectsBeforeTurnStarts(void);
|
||||
static void CheckMegaEvolutionBeforeTurn(void);
|
||||
static void CheckQuickClaw_CustapBerryActivation(void);
|
||||
static void FreeResetData_ReturnToOvOrDoEvolutions(void);
|
||||
@ -194,8 +193,8 @@ EWRAM_DATA u16 gMoveResultFlags = 0;
|
||||
EWRAM_DATA u32 gHitMarker = 0;
|
||||
EWRAM_DATA u8 gTakenDmgByBattler[MAX_BATTLERS_COUNT] = {0};
|
||||
EWRAM_DATA u8 gUnusedFirstBattleVar2 = 0; // Never read
|
||||
EWRAM_DATA u32 gSideStatuses[2] = {0};
|
||||
EWRAM_DATA struct SideTimer gSideTimers[2] = {0};
|
||||
EWRAM_DATA u32 gSideStatuses[NUM_BATTLE_SIDES] = {0};
|
||||
EWRAM_DATA struct SideTimer gSideTimers[NUM_BATTLE_SIDES] = {0};
|
||||
EWRAM_DATA u32 gStatuses3[MAX_BATTLERS_COUNT] = {0};
|
||||
EWRAM_DATA u32 gStatuses4[MAX_BATTLERS_COUNT] = {0};
|
||||
EWRAM_DATA struct DisableStruct gDisableStructs[MAX_BATTLERS_COUNT] = {0};
|
||||
@ -3016,7 +3015,7 @@ static void BattleStartClearSetData(void)
|
||||
gBattleStruct->runTries = 0;
|
||||
gBattleStruct->safariGoNearCounter = 0;
|
||||
gBattleStruct->safariPkblThrowCounter = 0;
|
||||
gBattleStruct->safariCatchFactor = gBaseStats[GetMonData(&gEnemyParty[0], MON_DATA_SPECIES)].catchRate * 100 / 1275;
|
||||
gBattleStruct->safariCatchFactor = gSpeciesInfo[GetMonData(&gEnemyParty[0], MON_DATA_SPECIES)].catchRate * 100 / 1275;
|
||||
gBattleStruct->safariEscapeFactor = 3;
|
||||
gBattleStruct->wildVictorySong = 0;
|
||||
gBattleStruct->moneyMultiplier = 1;
|
||||
@ -3035,11 +3034,12 @@ static void BattleStartClearSetData(void)
|
||||
|
||||
gBattleStruct->stickyWebUser = 0xFF;
|
||||
gBattleStruct->appearedInBattle = 0;
|
||||
gBattleStruct->beatUpSlot = 0;
|
||||
|
||||
for (i = 0; i < PARTY_SIZE; i++)
|
||||
{
|
||||
gBattleStruct->usedHeldItems[i][0] = 0;
|
||||
gBattleStruct->usedHeldItems[i][1] = 0;
|
||||
gBattleStruct->usedHeldItems[i][B_SIDE_PLAYER] = 0;
|
||||
gBattleStruct->usedHeldItems[i][B_SIDE_OPPONENT] = 0;
|
||||
gBattleStruct->itemStolen[i].originalItem = GetMonData(&gPlayerParty[i], MON_DATA_HELD_ITEM);
|
||||
gPartyCriticalHits[i] = 0;
|
||||
}
|
||||
@ -3250,8 +3250,8 @@ void FaintClearSetData(void)
|
||||
|
||||
gBattleResources->flags->flags[gActiveBattler] = 0;
|
||||
|
||||
gBattleMons[gActiveBattler].type1 = gBaseStats[gBattleMons[gActiveBattler].species].type1;
|
||||
gBattleMons[gActiveBattler].type2 = gBaseStats[gBattleMons[gActiveBattler].species].type2;
|
||||
gBattleMons[gActiveBattler].type1 = gSpeciesInfo[gBattleMons[gActiveBattler].species].type1;
|
||||
gBattleMons[gActiveBattler].type2 = gSpeciesInfo[gBattleMons[gActiveBattler].species].type2;
|
||||
gBattleMons[gActiveBattler].type3 = TYPE_MYSTERY;
|
||||
|
||||
Ai_UpdateFaintData(gActiveBattler);
|
||||
@ -3353,8 +3353,8 @@ static void DoBattleIntro(void)
|
||||
else
|
||||
{
|
||||
memcpy(&gBattleMons[gActiveBattler], &gBattleResources->bufferB[gActiveBattler][4], sizeof(struct BattlePokemon));
|
||||
gBattleMons[gActiveBattler].type1 = gBaseStats[gBattleMons[gActiveBattler].species].type1;
|
||||
gBattleMons[gActiveBattler].type2 = gBaseStats[gBattleMons[gActiveBattler].species].type2;
|
||||
gBattleMons[gActiveBattler].type1 = gSpeciesInfo[gBattleMons[gActiveBattler].species].type1;
|
||||
gBattleMons[gActiveBattler].type2 = gSpeciesInfo[gBattleMons[gActiveBattler].species].type2;
|
||||
gBattleMons[gActiveBattler].type3 = TYPE_MYSTERY;
|
||||
gBattleMons[gActiveBattler].ability = GetAbilityBySpecies(gBattleMons[gActiveBattler].species, gBattleMons[gActiveBattler].abilityNum);
|
||||
gBattleStruct->hpOnSwitchout[GetBattlerSide(gActiveBattler)] = gBattleMons[gActiveBattler].hp;
|
||||
@ -3716,8 +3716,6 @@ static void TryDoEventsBeforeFirstTurn(void)
|
||||
if (AbilityBattleEffects(ABILITYEFFECT_ON_SWITCHIN, gBattlerAttacker, 0, 0, 0) != 0)
|
||||
return;
|
||||
}
|
||||
if (AbilityBattleEffects(ABILITYEFFECT_INTIMIDATE1, 0, 0, 0, 0) != 0)
|
||||
return;
|
||||
if (AbilityBattleEffects(ABILITYEFFECT_TRACE1, 0, 0, 0, 0) != 0)
|
||||
return;
|
||||
// Check all switch in items having effect from the fastest mon to slowest.
|
||||
@ -4478,6 +4476,7 @@ u32 GetBattlerTotalSpeedStat(u8 battlerId)
|
||||
u32 speed = gBattleMons[battlerId].speed;
|
||||
u32 ability = GetBattlerAbility(battlerId);
|
||||
u32 holdEffect = GetBattlerHoldEffect(battlerId, TRUE);
|
||||
u32 highestStat = GetHighestStatId(battlerId);
|
||||
|
||||
// weather abilities
|
||||
if (WEATHER_HAS_EFFECT)
|
||||
@ -4499,6 +4498,10 @@ u32 GetBattlerTotalSpeedStat(u8 battlerId)
|
||||
speed *= 2;
|
||||
else if (ability == ABILITY_SLOW_START && gDisableStructs[battlerId].slowStartTimer != 0)
|
||||
speed /= 2;
|
||||
else if (ability == ABILITY_PROTOSYNTHESIS && gBattleWeather & B_WEATHER_SUN && highestStat == STAT_SPEED)
|
||||
speed = (speed * 150) / 100;
|
||||
else if (ability == ABILITY_QUARK_DRIVE && gFieldStatuses & STATUS_FIELD_ELECTRIC_TERRAIN && highestStat == STAT_SPEED)
|
||||
speed = (speed * 150) / 100;
|
||||
|
||||
// stat stages
|
||||
speed *= gStatStageRatios[gBattleMons[battlerId].statStages[STAT_SPEED]][0];
|
||||
@ -4664,6 +4667,10 @@ u8 GetWhoStrikesFirst(u8 battler1, u8 battler2, bool8 ignoreChosenMoves)
|
||||
strikesFirst = 1;
|
||||
else if (ability2 == ABILITY_STALL && ability1 != ABILITY_STALL)
|
||||
strikesFirst = 0;
|
||||
else if (ability1 == ABILITY_MYCELIUM_MIGHT && ability2 != ABILITY_MYCELIUM_MIGHT && IS_MOVE_STATUS(gCurrentMove))
|
||||
strikesFirst = 1;
|
||||
else if (ability2 == ABILITY_MYCELIUM_MIGHT && ability1 != ABILITY_MYCELIUM_MIGHT && IS_MOVE_STATUS(gCurrentMove))
|
||||
strikesFirst = 0;
|
||||
else
|
||||
{
|
||||
if (speedBattler1 == speedBattler2 && Random() & 1)
|
||||
@ -4842,10 +4849,10 @@ static void TurnValuesCleanUp(bool8 var0)
|
||||
gSpecialStatuses[gActiveBattler].parentalBondState = PARENTAL_BOND_OFF;
|
||||
}
|
||||
|
||||
gSideStatuses[0] &= ~(SIDE_STATUS_QUICK_GUARD | SIDE_STATUS_WIDE_GUARD | SIDE_STATUS_CRAFTY_SHIELD | SIDE_STATUS_MAT_BLOCK);
|
||||
gSideStatuses[1] &= ~(SIDE_STATUS_QUICK_GUARD | SIDE_STATUS_WIDE_GUARD | SIDE_STATUS_CRAFTY_SHIELD | SIDE_STATUS_MAT_BLOCK);
|
||||
gSideTimers[0].followmeTimer = 0;
|
||||
gSideTimers[1].followmeTimer = 0;
|
||||
gSideStatuses[B_SIDE_PLAYER] &= ~(SIDE_STATUS_QUICK_GUARD | SIDE_STATUS_WIDE_GUARD | SIDE_STATUS_CRAFTY_SHIELD | SIDE_STATUS_MAT_BLOCK);
|
||||
gSideStatuses[B_SIDE_OPPONENT] &= ~(SIDE_STATUS_QUICK_GUARD | SIDE_STATUS_WIDE_GUARD | SIDE_STATUS_CRAFTY_SHIELD | SIDE_STATUS_MAT_BLOCK);
|
||||
gSideTimers[B_SIDE_PLAYER].followmeTimer = 0;
|
||||
gSideTimers[B_SIDE_OPPONENT].followmeTimer = 0;
|
||||
}
|
||||
|
||||
void SpecialStatusesClear(void)
|
||||
@ -4876,7 +4883,7 @@ static void CheckMegaEvolutionBeforeTurn(void)
|
||||
}
|
||||
|
||||
#if B_MEGA_EVO_TURN_ORDER <= GEN_6
|
||||
gBattleMainFunc = CheckFocusPunch_ClearVarsBeforeTurnStarts;
|
||||
gBattleMainFunc = CheckChosenMoveForEffectsBeforeTurnStarts;
|
||||
gBattleStruct->focusPunchBattlerId = 0;
|
||||
#else
|
||||
gBattleMainFunc = TryChangeTurnOrder; // This will just do nothing if no mon has mega evolved
|
||||
@ -4901,11 +4908,11 @@ static void TryChangeTurnOrder(void)
|
||||
}
|
||||
}
|
||||
}
|
||||
gBattleMainFunc = CheckFocusPunch_ClearVarsBeforeTurnStarts;
|
||||
gBattleMainFunc = CheckChosenMoveForEffectsBeforeTurnStarts;
|
||||
gBattleStruct->focusPunchBattlerId = 0;
|
||||
}
|
||||
|
||||
static void CheckFocusPunch_ClearVarsBeforeTurnStarts(void)
|
||||
static void CheckChosenMoveForEffectsBeforeTurnStarts(void)
|
||||
{
|
||||
u32 i;
|
||||
|
||||
@ -4919,7 +4926,7 @@ static void CheckFocusPunch_ClearVarsBeforeTurnStarts(void)
|
||||
&& !(gDisableStructs[gBattlerAttacker].truantCounter)
|
||||
&& !(gProtectStructs[gActiveBattler].noValidMoves))
|
||||
{
|
||||
switch(gChosenMoveByBattler[gActiveBattler])
|
||||
switch (gChosenMoveByBattler[gActiveBattler])
|
||||
{
|
||||
case MOVE_FOCUS_PUNCH:
|
||||
BattleScriptExecute(BattleScript_FocusPunchSetUp);
|
||||
|
@ -616,7 +616,7 @@ static const u8 sText_HealingWishCameTrue[] = _("The healing wish came true\nfor
|
||||
static const u8 sText_HealingWishHealed[] = _("{B_ATK_NAME_WITH_PREFIX} regained health!");
|
||||
static const u8 sText_LunarDanceCameTrue[] = _("{B_ATK_NAME_WITH_PREFIX} became cloaked\nin mystical moonlight!");
|
||||
static const u8 sText_CursedBodyDisabled[] = _("{B_ATK_NAME_WITH_PREFIX}'s {B_BUFF1} was disabled\nby {B_DEF_NAME_WITH_PREFIX}'s {B_DEF_ABILITY}!");
|
||||
static const u8 sText_AttackerAquiredAbility[] = _("{B_ATK_NAME_WITH_PREFIX} acquired {B_LAST_ABILITY}!");
|
||||
static const u8 sText_AttackerAquiredAbility[] = _("{B_ATK_NAME_WITH_PREFIX} acquired\n{B_LAST_ABILITY}!");
|
||||
static const u8 sText_TargetStatWontGoHigher[] = _("{B_DEF_NAME_WITH_PREFIX}'s {B_BUFF1}\nwon't go higher!");
|
||||
static const u8 sText_PkmnMoveBouncedViaAbility[] = _("{B_ATK_NAME_WITH_PREFIX}'s {B_CURRENT_MOVE} was\nbounced back by {B_DEF_NAME_WITH_PREFIX}'s\l{B_DEF_ABILITY}!");
|
||||
static const u8 sText_ImposterTransform[] = _("{B_ATK_NAME_WITH_PREFIX} transformed into\n{B_DEF_NAME_WITH_PREFIX} using {B_LAST_ABILITY}!");
|
||||
@ -759,10 +759,24 @@ static const u8 sText_AttackerBrokeThroughParalysis[] = _("{B_ATK_NAME_WITH_PREF
|
||||
static const u8 sText_AttackerHealedItsBurn[] = _("{B_ATK_NAME_WITH_PREFIX} healed its burn with\nits sheer determination!");
|
||||
static const u8 sText_AttackerMeltedTheIce[] = _("{B_ATK_NAME_WITH_PREFIX} melted the ice with\nits fiery determination!");
|
||||
static const u8 sText_TargetToughedItOut[] = _("{B_DEF_NAME_WITH_PREFIX} toughed it out\nto show you its best side!");
|
||||
|
||||
static const u8 sText_AttackerLostElectricType[] = _("{B_ATK_NAME_WITH_PREFIX} used up all\nof its electricity!");
|
||||
static const u8 sText_AttackerSwitchedStatWithTarget[] = _("{B_ATK_NAME_WITH_PREFIX} switched {B_BUFF1}\nwith its target!");
|
||||
static const u8 sText_BeingHitChargedPkmnWithPower[] = _("Being hit by {B_CURRENT_MOVE}\ncharged {B_ATK_NAME_WITH_PREFIX} with power!");
|
||||
static const u8 sText_SunlightActivatedAbility[] = _("The harsh sunlight activated\n{B_ATK_NAME_WITH_PREFIX}'s {B_ATK_ABILITY}!");
|
||||
static const u8 sText_StatWasHeightened[] = _("{B_ATK_NAME_WITH_PREFIX}'s {B_BUFF1} was heightened!");
|
||||
static const u8 sText_ElectricTerrainActivatedAbility[] = _("The Electric Terrain activated\n{B_ATK_NAME_WITH_PREFIX}'s {B_ATK_ABILITY}!");
|
||||
static const u8 sText_AbilityWeakenedSurroundingMonsStat[] = _("{B_ATK_NAME_WITH_PREFIX}'s {B_ATK_ABILITY}\nweakened the {B_BUFF1} of\lall surrounding Pokémon!\p");
|
||||
static const u8 sText_AttackerGainedStrengthFromTheFallen[] = _("{B_ATK_NAME_WITH_PREFIX} gained strength\nfrom the fallen!");
|
||||
|
||||
const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] =
|
||||
{
|
||||
[STRINGID_ATTACKERGAINEDSTRENGTHFROMTHEFALLEN - BATTLESTRINGS_TABLE_START] = sText_AttackerGainedStrengthFromTheFallen,
|
||||
[STRINGID_ABILITYWEAKENEDFSURROUNDINGMONSSTAT - BATTLESTRINGS_TABLE_START] = sText_AbilityWeakenedSurroundingMonsStat,
|
||||
[STRINGID_ELECTRICTERRAINACTIVATEDABILITY - BATTLESTRINGS_TABLE_START] = sText_ElectricTerrainActivatedAbility,
|
||||
[STRINGID_STATWASHEIGHTENED - BATTLESTRINGS_TABLE_START] = sText_StatWasHeightened,
|
||||
[STRINGID_SUNLIGHTACTIVATEDABILITY - BATTLESTRINGS_TABLE_START] = sText_SunlightActivatedAbility,
|
||||
[STRINGID_BEINGHITCHARGEDPKMNWITHPOWER - BATTLESTRINGS_TABLE_START] = sText_BeingHitChargedPkmnWithPower,
|
||||
[STRINGID_ATTACKERSWITCHEDSTATWITHTARGET - BATTLESTRINGS_TABLE_START] = sText_AttackerSwitchedStatWithTarget,
|
||||
[STRINGID_TARGETTOUGHEDITOUT - BATTLESTRINGS_TABLE_START] = sText_TargetToughedItOut,
|
||||
[STRINGID_ATTACKERMELTEDTHEICE - BATTLESTRINGS_TABLE_START] = sText_AttackerMeltedTheIce,
|
||||
[STRINGID_ATTACKERHEALEDITSBURN - BATTLESTRINGS_TABLE_START] = sText_AttackerHealedItsBurn,
|
||||
@ -1381,6 +1395,7 @@ const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] =
|
||||
[STRINGID_CANTESCAPEBECAUSEOFCURRENTMOVE - BATTLESTRINGS_TABLE_START] = sText_CantEscapeBecauseOfCurrentMove,
|
||||
[STRINGID_PKMNTOOKTARGETHIGH - BATTLESTRINGS_TABLE_START] = sText_PkmnTookTargetHigh,
|
||||
[STRINGID_TARGETTOOHEAVY - BATTLESTRINGS_TABLE_START] = sText_TargetTooHeavy,
|
||||
[STRINGID_ATTACKERLOSTELECTRICTYPE - BATTLESTRINGS_TABLE_START] = sText_AttackerLostElectricType,
|
||||
};
|
||||
|
||||
const u16 gZEffectStringIds[] =
|
||||
|
@ -17,7 +17,6 @@
|
||||
#include "constants/battle_frontier.h"
|
||||
#include "constants/frontier_util.h"
|
||||
#include "constants/abilities.h"
|
||||
#include "constants/battle_config.h"
|
||||
#include "constants/layouts.h"
|
||||
#include "constants/rgb.h"
|
||||
#include "constants/trainers.h"
|
||||
@ -849,24 +848,24 @@ static bool8 DoesTypePreventStatus(u16 species, u32 status)
|
||||
switch (status)
|
||||
{
|
||||
case STATUS1_TOXIC_POISON:
|
||||
if (gBaseStats[species].type1 == TYPE_STEEL || gBaseStats[species].type1 == TYPE_POISON
|
||||
|| gBaseStats[species].type2 == TYPE_STEEL || gBaseStats[species].type2 == TYPE_POISON)
|
||||
if (gSpeciesInfo[species].type1 == TYPE_STEEL || gSpeciesInfo[species].type1 == TYPE_POISON
|
||||
|| gSpeciesInfo[species].type2 == TYPE_STEEL || gSpeciesInfo[species].type2 == TYPE_POISON)
|
||||
ret = TRUE;
|
||||
break;
|
||||
case STATUS1_FREEZE:
|
||||
if (gBaseStats[species].type1 == TYPE_ICE || gBaseStats[species].type2 == TYPE_ICE)
|
||||
if (gSpeciesInfo[species].type1 == TYPE_ICE || gSpeciesInfo[species].type2 == TYPE_ICE)
|
||||
ret = TRUE;
|
||||
break;
|
||||
case STATUS1_PARALYSIS:
|
||||
if (gBaseStats[species].type1 == TYPE_GROUND || gBaseStats[species].type2 == TYPE_GROUND
|
||||
if (gSpeciesInfo[species].type1 == TYPE_GROUND || gSpeciesInfo[species].type2 == TYPE_GROUND
|
||||
#if B_PARALYZE_ELECTRIC >= GEN_6
|
||||
|| gBaseStats[species].type1 == TYPE_ELECTRIC || gBaseStats[species].type2 == TYPE_ELECTRIC
|
||||
|| gSpeciesInfo[species].type1 == TYPE_ELECTRIC || gSpeciesInfo[species].type2 == TYPE_ELECTRIC
|
||||
#endif
|
||||
)
|
||||
ret = TRUE;
|
||||
break;
|
||||
case STATUS1_BURN:
|
||||
if (gBaseStats[species].type1 == TYPE_FIRE || gBaseStats[species].type2 == TYPE_FIRE)
|
||||
if (gSpeciesInfo[species].type1 == TYPE_FIRE || gSpeciesInfo[species].type2 == TYPE_FIRE)
|
||||
ret = TRUE;
|
||||
break;
|
||||
case STATUS1_SLEEP:
|
||||
@ -1145,9 +1144,9 @@ bool32 TryGenerateBattlePikeWildMon(bool8 checkKeenEyeIntimidate)
|
||||
|
||||
SetMonData(&gEnemyParty[0],
|
||||
MON_DATA_EXP,
|
||||
&gExperienceTables[gBaseStats[wildMons[headerId][pikeMonId].species].growthRate][monLevel]);
|
||||
&gExperienceTables[gSpeciesInfo[wildMons[headerId][pikeMonId].species].growthRate][monLevel]);
|
||||
|
||||
if (gBaseStats[wildMons[headerId][pikeMonId].species].abilities[1])
|
||||
if (gSpeciesInfo[wildMons[headerId][pikeMonId].species].abilities[1])
|
||||
abilityNum = Random() % 2;
|
||||
else
|
||||
abilityNum = 0;
|
||||
|