mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 03:34:15 +01:00
Merge branch 'upcoming' of https://github.com/rh-hideout/pokeemerald-expansion into mimicry
This commit is contained in:
commit
d0f5653f5e
20
.github/calcrom/calcrom.pl
vendored
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);
|
||||
|
@ -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
|
||||
@ -1332,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
|
||||
@ -1936,6 +1936,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 +2019,23 @@
|
||||
.byte \counter
|
||||
.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
|
||||
|
||||
.macro applymimicry battler:req
|
||||
various \battler, VARIOUS_APPLY_MIMICRY
|
||||
@ -2156,3 +2198,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
|
||||
|
@ -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 @@@@@@@@@@@@@@@@@@@@@@@
|
||||
|
@ -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
|
||||
call BattleScript_TryToApplyMimicry
|
||||
goto BattleScript_MoveEnd
|
||||
@ -2680,10 +2802,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
|
||||
|
||||
@ -2824,8 +2946,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
|
||||
@ -2913,6 +3065,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
|
||||
@ -3034,6 +3187,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
|
||||
@ -3202,6 +3356,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
|
||||
@ -3499,6 +3657,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
|
||||
@ -3623,6 +3782,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
|
||||
@ -3961,6 +4121,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
|
||||
@ -3987,6 +4148,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
|
||||
@ -4971,6 +5133,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
|
||||
@ -5123,10 +5289,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
|
||||
@ -5156,12 +5330,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::
|
||||
@ -5410,6 +5578,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
|
||||
@ -5702,6 +5871,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
|
||||
@ -6129,7 +6299,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
|
||||
@ -6584,6 +6754,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
|
||||
@ -7024,6 +7215,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
|
||||
@ -7545,6 +7800,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
|
||||
@ -8155,6 +8421,7 @@ BattleScript_WeatherFormChanges::
|
||||
setbyte sBATTLER, 0
|
||||
BattleScript_WeatherFormChangesLoop::
|
||||
tryweatherformdatachange
|
||||
activateweatherchangeabilities BS_SCRIPTING
|
||||
addbyte sBATTLER, 1
|
||||
jumpifbytenotequal sBATTLER, gBattlersCount, BattleScript_WeatherFormChangesLoop
|
||||
return
|
||||
@ -8199,19 +8466,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
|
||||
@ -8221,27 +8484,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
|
||||
@ -8300,6 +8578,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
|
||||
@ -8335,12 +8649,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
|
||||
|
||||
@ -8350,6 +8687,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
|
||||
|
||||
@ -8359,6 +8697,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
|
||||
|
||||
@ -8368,6 +8707,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
|
||||
|
||||
@ -8448,8 +8788,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
|
||||
@ -9623,7 +9970,7 @@ BattleScript_ExtremeEvoboostSpDef::
|
||||
BattleScript_ExtremeEvoboostEnd::
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
BattleScript_EffectTerrainHit:
|
||||
BattleScript_EffectHitSetRemoveTerrain:
|
||||
attackcanceler
|
||||
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
|
||||
attackstring
|
||||
@ -9645,6 +9992,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
|
||||
@ -9743,6 +10091,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
|
||||
|
@ -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
graphics/battle_anims/sprites/new/teapot.pal
Normal file
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
BIN
graphics/battle_anims/sprites/new/teapot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 881 B |
@ -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
|
||||
|
||||
|
@ -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
|
||||
@ -577,13 +579,12 @@ struct BattleStruct
|
||||
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)
|
||||
};
|
||||
|
@ -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[];
|
||||
extern const u8 BattleScript_MimicryActivates_End3[];
|
||||
|
||||
// zmoves
|
||||
|
@ -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);
|
||||
@ -201,6 +202,8 @@ 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);
|
||||
void ChangeTypeBasedOnTerrain(u8 battlerId);
|
||||
|
||||
#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
|
||||
|
@ -38,6 +38,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 +110,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.
|
||||
|
@ -9,7 +9,6 @@
|
||||
#define P_LEGENDARY_PERFECT_IVS GEN_LATEST // Since Gen 6, Legendaries, Mythicals and Ultra Beasts found in the wild or given through gifts have at least 3 perfect IVs.
|
||||
#define P_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.
|
||||
#define P_SHINY_BASE_CHANCE GEN_LATEST // Since Gen 6, the base chances of encountering a Shiny Pokémon was raised to 1/4096. This config adds an extra roll to the calculation, which effectively does the same thing.
|
||||
|
||||
// Flag settings
|
||||
// To use the following features in scripting, replace the 0s with the flag ID you're assigning it to.
|
||||
|
@ -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
|
||||
|
@ -299,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,7 +246,16 @@
|
||||
#define VARIOUS_CAN_TELEPORT 155
|
||||
#define VARIOUS_GET_BATTLER_SIDE 156
|
||||
#define VARIOUS_CHECK_PARENTAL_BOND_COUNTER 157
|
||||
#define VARIOUS_APPLY_MIMICRY 158
|
||||
#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
|
||||
#define VARIOUS_APPLY_MIMICRY 167
|
||||
|
||||
// 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,
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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[];
|
||||
|
@ -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:
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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),
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -101,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);
|
||||
@ -3039,11 +3039,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;
|
||||
}
|
||||
@ -3720,8 +3721,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.
|
||||
@ -4482,6 +4481,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)
|
||||
@ -4503,6 +4503,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];
|
||||
@ -4668,6 +4672,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)
|
||||
@ -4846,10 +4854,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)
|
||||
@ -4880,7 +4888,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
|
||||
@ -4905,11 +4913,11 @@ static void TryChangeTurnOrder(void)
|
||||
}
|
||||
}
|
||||
}
|
||||
gBattleMainFunc = CheckFocusPunch_ClearVarsBeforeTurnStarts;
|
||||
gBattleMainFunc = CheckChosenMoveForEffectsBeforeTurnStarts;
|
||||
gBattleStruct->focusPunchBattlerId = 0;
|
||||
}
|
||||
|
||||
static void CheckFocusPunch_ClearVarsBeforeTurnStarts(void)
|
||||
static void CheckChosenMoveForEffectsBeforeTurnStarts(void)
|
||||
{
|
||||
u32 i;
|
||||
|
||||
@ -4923,7 +4931,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[] =
|
||||
|
@ -544,7 +544,7 @@ static void Cmd_setuserstatus3(void);
|
||||
static void Cmd_assistattackselect(void);
|
||||
static void Cmd_trysetmagiccoat(void);
|
||||
static void Cmd_trysetsnatch(void);
|
||||
static void Cmd_trygetintimidatetarget(void);
|
||||
static void Cmd_unused2(void);
|
||||
static void Cmd_switchoutabilities(void);
|
||||
static void Cmd_jumpifhasnohp(void);
|
||||
static void Cmd_getsecretpowereffect(void);
|
||||
@ -803,7 +803,7 @@ void (* const gBattleScriptingCommandsTable[])(void) =
|
||||
Cmd_assistattackselect, //0xDE
|
||||
Cmd_trysetmagiccoat, //0xDF
|
||||
Cmd_trysetsnatch, //0xE0
|
||||
Cmd_trygetintimidatetarget, //0xE1
|
||||
Cmd_unused2, //0xE1
|
||||
Cmd_switchoutabilities, //0xE2
|
||||
Cmd_jumpifhasnohp, //0xE3
|
||||
Cmd_getsecretpowereffect, //0xE4
|
||||
@ -1130,6 +1130,7 @@ static const u16 sFinalStrikeOnlyEffects[] =
|
||||
EFFECT_BUG_BITE,
|
||||
EFFECT_THIEF,
|
||||
EFFECT_BURN_UP,
|
||||
EFFECT_DOUBLE_SHOCK,
|
||||
EFFECT_SECRET_POWER,
|
||||
EFFECT_SMACK_DOWN,
|
||||
EFFECT_SPARKLING_ARIA,
|
||||
@ -3496,16 +3497,11 @@ void SetMoveEffect(bool32 primary, u32 certain)
|
||||
gProtectStructs[gBattlerTarget].kingsShielded = FALSE;
|
||||
gProtectStructs[gBattlerTarget].banefulBunkered = FALSE;
|
||||
gProtectStructs[gBattlerTarget].obstructed = FALSE;
|
||||
if (gCurrentMove == MOVE_FEINT)
|
||||
{
|
||||
BattleScriptPush(gBattlescriptCurrInstr + 1);
|
||||
gBattlescriptCurrInstr = BattleScript_MoveEffectFeint;
|
||||
}
|
||||
else if (gCurrentMove == MOVE_HYPERSPACE_FURY)
|
||||
{
|
||||
BattleScriptPush(gBattlescriptCurrInstr + 1);
|
||||
BattleScriptPush(gBattlescriptCurrInstr + 1);
|
||||
if (gCurrentMove == MOVE_HYPERSPACE_FURY)
|
||||
gBattlescriptCurrInstr = BattleScript_HyperspaceFuryRemoveProtect;
|
||||
}
|
||||
else
|
||||
gBattlescriptCurrInstr = BattleScript_MoveEffectFeint;
|
||||
}
|
||||
break;
|
||||
case MOVE_EFFECT_SPECTRAL_THIEF:
|
||||
@ -3646,6 +3642,11 @@ void SetMoveEffect(bool32 primary, u32 certain)
|
||||
BattleScriptPush(gBattlescriptCurrInstr + 1);
|
||||
gBattlescriptCurrInstr = BattleScript_BurnUpRemoveType;
|
||||
break;
|
||||
case MOVE_EFFECT_DOUBLE_SHOCK:
|
||||
// This seems unnecessary but is done to make it work properly with Parental Bond
|
||||
BattleScriptPush(gBattlescriptCurrInstr + 1);
|
||||
gBattlescriptCurrInstr = BattleScript_DoubleShockRemoveType;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -4801,22 +4802,24 @@ static void Cmd_setroost(void)
|
||||
{
|
||||
gBattleStruct->roostTypes[gBattlerAttacker][0] = TYPE_FLYING;
|
||||
gBattleStruct->roostTypes[gBattlerAttacker][1] = TYPE_FLYING;
|
||||
gBattleStruct->roostTypes[gBattlerAttacker][2] = TYPE_FLYING;
|
||||
#if B_ROOST_PURE_FLYING >= GEN_5
|
||||
SET_BATTLER_TYPE(gBattlerAttacker, TYPE_NORMAL);
|
||||
#else
|
||||
SET_BATTLER_TYPE(gBattlerAttacker, TYPE_MYSTERY);
|
||||
#endif
|
||||
}
|
||||
// Dual Type with Flying Type.
|
||||
else if ((gBattleMons[gBattlerAttacker].type1 == TYPE_FLYING && gBattleMons[gBattlerAttacker].type2 != TYPE_FLYING)
|
||||
||(gBattleMons[gBattlerAttacker].type2 == TYPE_FLYING && gBattleMons[gBattlerAttacker].type1 != TYPE_FLYING))
|
||||
// Dual type with flying type.
|
||||
else if (gBattleMons[gBattlerAttacker].type1 == TYPE_FLYING || gBattleMons[gBattlerAttacker].type2 == TYPE_FLYING)
|
||||
{
|
||||
gBattleStruct->roostTypes[gBattlerAttacker][0] = gBattleMons[gBattlerAttacker].type1;
|
||||
gBattleStruct->roostTypes[gBattlerAttacker][1] = gBattleMons[gBattlerAttacker].type2;
|
||||
if (gBattleMons[gBattlerAttacker].type1 == TYPE_FLYING)
|
||||
gBattleMons[gBattlerAttacker].type1 = TYPE_MYSTERY;
|
||||
if (gBattleMons[gBattlerAttacker].type2 == TYPE_FLYING)
|
||||
else if (gBattleMons[gBattlerAttacker].type2 == TYPE_FLYING)
|
||||
gBattleMons[gBattlerAttacker].type2 = TYPE_MYSTERY;
|
||||
}
|
||||
// Non-flying type.
|
||||
else if (!IS_BATTLER_OF_TYPE(gBattlerAttacker, TYPE_FLYING))
|
||||
else
|
||||
{
|
||||
gBattleStruct->roostTypes[gBattlerAttacker][0] = gBattleMons[gBattlerAttacker].type1;
|
||||
gBattleStruct->roostTypes[gBattlerAttacker][1] = gBattleMons[gBattlerAttacker].type2;
|
||||
@ -5754,7 +5757,8 @@ static void Cmd_moveend(void)
|
||||
if (gCurrentMove != MOVE_DRAGON_TAIL
|
||||
&& gCurrentMove != MOVE_CIRCLE_THROW
|
||||
&& IsBattlerAlive(gBattlerAttacker)
|
||||
&& !TestSheerForceFlag(gBattlerAttacker, gCurrentMove))
|
||||
&& !TestSheerForceFlag(gBattlerAttacker, gCurrentMove)
|
||||
&& GetBattlerAbility(gBattlerAttacker) != ABILITY_GUARD_DOG)
|
||||
{
|
||||
// Since we check if battler was damaged, we don't need to check move result.
|
||||
// In fact, doing so actually prevents multi-target moves from activating red card properly
|
||||
@ -6782,7 +6786,6 @@ static void Cmd_switchineffects(void)
|
||||
|
||||
if (AbilityBattleEffects(ABILITYEFFECT_ON_SWITCHIN, gActiveBattler, 0, 0, 0)
|
||||
|| ItemBattleEffects(ITEMEFFECT_ON_SWITCH_IN, gActiveBattler, FALSE)
|
||||
|| AbilityBattleEffects(ABILITYEFFECT_INTIMIDATE2, 0, 0, 0, 0)
|
||||
|| AbilityBattleEffects(ABILITYEFFECT_TRACE2, 0, 0, 0, 0)
|
||||
|| AbilityBattleEffects(ABILITYEFFECT_WEATHER_FORM, 0, 0, 0, 0))
|
||||
return;
|
||||
@ -7920,35 +7923,34 @@ static bool32 HasAttackerFaintedTarget(void)
|
||||
static void HandleTerrainMove(u16 move)
|
||||
{
|
||||
u32 statusFlag = 0;
|
||||
u8 *timer = NULL;
|
||||
|
||||
switch (gBattleMoves[move].effect)
|
||||
{
|
||||
case EFFECT_MISTY_TERRAIN:
|
||||
statusFlag = STATUS_FIELD_MISTY_TERRAIN, timer = &gFieldTimers.terrainTimer;
|
||||
statusFlag = STATUS_FIELD_MISTY_TERRAIN;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
|
||||
break;
|
||||
case EFFECT_GRASSY_TERRAIN:
|
||||
statusFlag = STATUS_FIELD_GRASSY_TERRAIN, timer = &gFieldTimers.terrainTimer;
|
||||
statusFlag = STATUS_FIELD_GRASSY_TERRAIN;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 1;
|
||||
break;
|
||||
case EFFECT_ELECTRIC_TERRAIN:
|
||||
statusFlag = STATUS_FIELD_ELECTRIC_TERRAIN, timer = &gFieldTimers.terrainTimer;
|
||||
statusFlag = STATUS_FIELD_ELECTRIC_TERRAIN;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 2;
|
||||
break;
|
||||
case EFFECT_PSYCHIC_TERRAIN:
|
||||
statusFlag = STATUS_FIELD_PSYCHIC_TERRAIN, timer = &gFieldTimers.terrainTimer;
|
||||
statusFlag = STATUS_FIELD_PSYCHIC_TERRAIN;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 3;
|
||||
break;
|
||||
case EFFECT_DAMAGE_SET_TERRAIN:
|
||||
case EFFECT_HIT_SET_REMOVE_TERRAIN:
|
||||
switch (gBattleMoves[move].argument)
|
||||
{
|
||||
case 0: //genesis supernova
|
||||
statusFlag = STATUS_FIELD_PSYCHIC_TERRAIN, timer = &gFieldTimers.terrainTimer;
|
||||
statusFlag = STATUS_FIELD_PSYCHIC_TERRAIN;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 3;
|
||||
break;
|
||||
case 1: //splintered stormshards
|
||||
if (!(gFieldStatuses & (STATUS_FIELD_MISTY_TERRAIN | STATUS_FIELD_GRASSY_TERRAIN | STATUS_FIELD_ELECTRIC_TERRAIN | STATUS_FIELD_PSYCHIC_TERRAIN)))
|
||||
if (!(gFieldStatuses & STATUS_FIELD_TERRAIN_ANY))
|
||||
{
|
||||
//no terrain to remove -> jump to battle script pointer
|
||||
gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3);
|
||||
@ -7956,7 +7958,7 @@ static void HandleTerrainMove(u16 move)
|
||||
else
|
||||
{
|
||||
// remove all terrain
|
||||
gFieldStatuses &= ~(STATUS_FIELD_MISTY_TERRAIN | STATUS_FIELD_GRASSY_TERRAIN | STATUS_FIELD_ELECTRIC_TERRAIN | STATUS_FIELD_PSYCHIC_TERRAIN);
|
||||
gFieldStatuses &= ~STATUS_FIELD_TERRAIN_ANY;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = 4;
|
||||
gBattlescriptCurrInstr += 7;
|
||||
}
|
||||
@ -7976,9 +7978,9 @@ static void HandleTerrainMove(u16 move)
|
||||
gFieldStatuses &= ~STATUS_FIELD_TERRAIN_ANY;
|
||||
gFieldStatuses |= statusFlag;
|
||||
if (GetBattlerHoldEffect(gBattlerAttacker, TRUE) == HOLD_EFFECT_TERRAIN_EXTENDER)
|
||||
*timer = 8;
|
||||
gFieldTimers.terrainTimer = 8;
|
||||
else
|
||||
*timer = 5;
|
||||
gFieldTimers.terrainTimer = 5;
|
||||
gBattlescriptCurrInstr += 7;
|
||||
}
|
||||
}
|
||||
@ -8098,7 +8100,7 @@ static void RecalcBattlerStats(u32 battler, struct Pokemon *mon)
|
||||
gBattleMons[battler].type2 = gSpeciesInfo[gBattleMons[battler].species].type2;
|
||||
}
|
||||
|
||||
static u32 GetHighestStatId(u32 battlerId)
|
||||
u32 GetHighestStatId(u32 battlerId)
|
||||
{
|
||||
u32 i, highestId = STAT_ATK, highestStat = gBattleMons[battlerId].attack;
|
||||
|
||||
@ -8129,6 +8131,67 @@ static bool32 IsRototillerAffected(u32 battlerId)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
static bool32 IsAbilityRodAffected(void)
|
||||
{
|
||||
u32 moveType;
|
||||
|
||||
if (gBattleStruct->dynamicMoveType == 0)
|
||||
moveType = gBattleMoves[gCurrentMove].type;
|
||||
else if (!(gBattleStruct->dynamicMoveType & 0x40))
|
||||
moveType = gBattleStruct->dynamicMoveType & 0x3F;
|
||||
else
|
||||
moveType = gBattleMoves[gCurrentMove].type;
|
||||
|
||||
if (moveType == TYPE_ELECTRIC && GetBattlerAbility(gBattlerTarget) == ABILITY_LIGHTNING_ROD)
|
||||
return TRUE;
|
||||
else
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static bool32 IsAbilityMotorAffected(void)
|
||||
{
|
||||
u32 moveType;
|
||||
|
||||
if (gBattleStruct->dynamicMoveType == 0)
|
||||
moveType = gBattleMoves[gCurrentMove].type;
|
||||
else if (!(gBattleStruct->dynamicMoveType & 0x40))
|
||||
moveType = gBattleStruct->dynamicMoveType & 0x3F;
|
||||
else
|
||||
moveType = gBattleMoves[gCurrentMove].type;
|
||||
|
||||
if (moveType == TYPE_ELECTRIC && GetBattlerAbility(gBattlerTarget) == ABILITY_MOTOR_DRIVE)
|
||||
return TRUE;
|
||||
else
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static bool32 IsAbilityAbsorbAffected(void)
|
||||
{
|
||||
u32 moveType;
|
||||
|
||||
if (gBattleStruct->dynamicMoveType == 0)
|
||||
moveType = gBattleMoves[gCurrentMove].type;
|
||||
else if (!(gBattleStruct->dynamicMoveType & 0x40))
|
||||
moveType = gBattleStruct->dynamicMoveType & 0x3F;
|
||||
else
|
||||
moveType = gBattleMoves[gCurrentMove].type;
|
||||
|
||||
if (moveType == TYPE_ELECTRIC && GetBattlerAbility(gBattlerTarget) == ABILITY_VOLT_ABSORB)
|
||||
return TRUE;
|
||||
else
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static bool32 IsTeatimeAffected(u32 battlerId)
|
||||
{
|
||||
if (ItemId_GetPocket(gBattleMons[battlerId].item) != POCKET_BERRIES)
|
||||
return FALSE; // Only berries
|
||||
if (gStatuses3[battlerId] & STATUS3_SEMI_INVULNERABLE)
|
||||
return FALSE; // Teatime doesn't affected semi-invulnerable battlers
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#define COURTCHANGE_SWAP(status, structField, temp) \
|
||||
{ \
|
||||
temp = gSideStatuses[B_SIDE_PLAYER]; \
|
||||
@ -8468,8 +8531,7 @@ static void Cmd_various(void)
|
||||
else
|
||||
gBattleCommunication[0] = FALSE;
|
||||
break;
|
||||
case VARIOUS_RESET_INTIMIDATE_TRACE_BITS:
|
||||
gSpecialStatuses[gActiveBattler].intimidatedMon = FALSE;
|
||||
case VARIOUS_RESET_SWITCH_IN_ABILITY_BITS:
|
||||
gSpecialStatuses[gActiveBattler].traced = FALSE;
|
||||
gSpecialStatuses[gActiveBattler].switchInAbilityDone = FALSE;
|
||||
break;
|
||||
@ -8633,7 +8695,6 @@ static void Cmd_various(void)
|
||||
gBattlescriptCurrInstr += 3;
|
||||
AbilityBattleEffects(ABILITYEFFECT_NEUTRALIZINGGAS, gActiveBattler, 0, 0, 0);
|
||||
AbilityBattleEffects(ABILITYEFFECT_ON_SWITCHIN, gActiveBattler, 0, 0, 0);
|
||||
AbilityBattleEffects(ABILITYEFFECT_INTIMIDATE2, gActiveBattler, 0, 0, 0);
|
||||
AbilityBattleEffects(ABILITYEFFECT_TRACE2, gActiveBattler, 0, 0, 0);
|
||||
return;
|
||||
case VARIOUS_SAVE_TARGET:
|
||||
@ -9132,9 +9193,10 @@ static void Cmd_various(void)
|
||||
break;
|
||||
case VARIOUS_TRY_HIT_SWITCH_TARGET:
|
||||
if (IsBattlerAlive(gBattlerAttacker)
|
||||
&& IsBattlerAlive(gBattlerTarget)
|
||||
&& !(gMoveResultFlags & MOVE_RESULT_NO_EFFECT)
|
||||
&& TARGET_TURN_DAMAGED)
|
||||
&& IsBattlerAlive(gBattlerTarget)
|
||||
&& !(gMoveResultFlags & MOVE_RESULT_NO_EFFECT)
|
||||
&& TARGET_TURN_DAMAGED
|
||||
&& GetBattlerAbility(gBattlerTarget) != ABILITY_GUARD_DOG)
|
||||
{
|
||||
gBattleScripting.switchCase = B_SWITCH_HIT;
|
||||
gBattlescriptCurrInstr = BattleScript_ForceRandomSwitch;
|
||||
@ -10016,7 +10078,7 @@ static void Cmd_various(void)
|
||||
gBattleMons[gActiveBattler].item = gLastUsedItem;
|
||||
break;
|
||||
case VARIOUS_SET_BEAK_BLAST:
|
||||
gProtectStructs[gBattlerAttacker].beakBlastCharge = TRUE;
|
||||
gProtectStructs[gActiveBattler].beakBlastCharge = TRUE;
|
||||
break;
|
||||
case VARIOUS_SWAP_SIDE_STATUSES:
|
||||
CourtChangeSwapSideStatuses();
|
||||
@ -10054,6 +10116,99 @@ static void Cmd_various(void)
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case VARIOUS_SWAP_STATS:
|
||||
{
|
||||
u8 statId = T1_READ_8(gBattlescriptCurrInstr + 3);
|
||||
u16 temp;
|
||||
|
||||
switch (statId)
|
||||
{
|
||||
case STAT_HP:
|
||||
SWAP(gBattleMons[gBattlerAttacker].hp, gBattleMons[gBattlerTarget].hp, temp);
|
||||
break;
|
||||
case STAT_ATK:
|
||||
SWAP(gBattleMons[gBattlerAttacker].attack, gBattleMons[gBattlerTarget].attack, temp);
|
||||
break;
|
||||
case STAT_DEF:
|
||||
SWAP(gBattleMons[gBattlerAttacker].defense, gBattleMons[gBattlerTarget].defense, temp);
|
||||
break;
|
||||
case STAT_SPEED:
|
||||
SWAP(gBattleMons[gBattlerAttacker].speed, gBattleMons[gBattlerTarget].speed, temp);
|
||||
break;
|
||||
case STAT_SPATK:
|
||||
SWAP(gBattleMons[gBattlerAttacker].spAttack, gBattleMons[gBattlerTarget].spAttack, temp);
|
||||
break;
|
||||
case STAT_SPDEF:
|
||||
SWAP(gBattleMons[gBattlerAttacker].spDefense, gBattleMons[gBattlerTarget].spDefense, temp);
|
||||
break;
|
||||
}
|
||||
PREPARE_STAT_BUFFER(gBattleTextBuff1, statId);
|
||||
}
|
||||
break;
|
||||
case VARIOUS_TEATIME_TARGETS:
|
||||
{
|
||||
u32 count = 0;
|
||||
|
||||
for (i = 0; i < gBattlersCount; i++)
|
||||
{
|
||||
if (IsTeatimeAffected(i))
|
||||
count++;
|
||||
}
|
||||
if (count == 0)
|
||||
gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3); // Teatime fails
|
||||
else
|
||||
gBattlescriptCurrInstr += 7;
|
||||
}
|
||||
return;
|
||||
case VARIOUS_TEATIME_INVUL:
|
||||
if (ItemId_GetPocket(gBattleMons[gActiveBattler].item) == POCKET_BERRIES && !(gStatuses3[gBattlerTarget] & (STATUS3_SEMI_INVULNERABLE)))
|
||||
gBattlescriptCurrInstr += 7;
|
||||
else
|
||||
gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3);
|
||||
return;
|
||||
case VARIOUS_JUMP_IF_ROD:
|
||||
if (IsAbilityRodAffected())
|
||||
gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3);
|
||||
else
|
||||
gBattlescriptCurrInstr += 7;
|
||||
return;
|
||||
case VARIOUS_JUMP_IF_MOTOR:
|
||||
if (IsAbilityMotorAffected())
|
||||
gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3);
|
||||
else
|
||||
gBattlescriptCurrInstr += 7;
|
||||
return;
|
||||
case VARIOUS_JUMP_IF_ABSORB:
|
||||
if (IsAbilityAbsorbAffected())
|
||||
gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3);
|
||||
else
|
||||
gBattlescriptCurrInstr += 7;
|
||||
return;
|
||||
case VARIOUS_TRY_WIND_RIDER_POWER:
|
||||
{
|
||||
u16 ability = GetBattlerAbility(gActiveBattler);
|
||||
if (GetBattlerSide(gActiveBattler) == GetBattlerSide(gBattlerAttacker)
|
||||
&& (ability == ABILITY_WIND_RIDER || ability == ABILITY_WIND_POWER))
|
||||
{
|
||||
gLastUsedAbility = ability;
|
||||
RecordAbilityBattle(gActiveBattler, gLastUsedAbility);
|
||||
gBattlerAbility = gBattleScripting.battler = gActiveBattler;
|
||||
gBattlescriptCurrInstr += 7;
|
||||
}
|
||||
else
|
||||
{
|
||||
gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 3);
|
||||
}
|
||||
}
|
||||
return;
|
||||
case VARIOUS_ACTIVATE_WEATHER_CHANGE_ABILITIES:
|
||||
gBattlescriptCurrInstr += 3;
|
||||
AbilityBattleEffects(ABILITYEFFECT_ON_WEATHER, gActiveBattler, 0, 0, 0);
|
||||
return;
|
||||
case VARIOUS_ACTIVATE_TERRAIN_CHANGE_ABILITIES:
|
||||
gBattlescriptCurrInstr += 3;
|
||||
AbilityBattleEffects(ABILITYEFFECT_ON_TERRAIN, gActiveBattler, 0, 0, 0);
|
||||
return;
|
||||
case VARIOUS_APPLY_MIMICRY:
|
||||
ChangeTypeBasedOnTerrain(gActiveBattler);
|
||||
break;
|
||||
@ -10660,9 +10815,6 @@ static u16 ReverseStatChangeMoveEffect(u16 moveEffect)
|
||||
}
|
||||
}
|
||||
|
||||
#define STAT_CHANGE_WORKED 0
|
||||
#define STAT_CHANGE_DIDNT_WORK 1
|
||||
|
||||
static u32 ChangeStatBuffs(s8 statValue, u32 statId, u32 flags, const u8 *BS_ptr)
|
||||
{
|
||||
bool32 certain = FALSE;
|
||||
@ -10738,7 +10890,7 @@ static u32 ChangeStatBuffs(s8 statValue, u32 statId, u32 flags, const u8 *BS_ptr
|
||||
else if ((activeBattlerAbility == ABILITY_CLEAR_BODY
|
||||
|| activeBattlerAbility == ABILITY_FULL_METAL_BODY
|
||||
|| activeBattlerAbility == ABILITY_WHITE_SMOKE)
|
||||
&& !certain && gCurrentMove != MOVE_CURSE)
|
||||
&& !affectsUser && !certain && gCurrentMove != MOVE_CURSE)
|
||||
{
|
||||
if (flags == STAT_CHANGE_ALLOW_PTR)
|
||||
{
|
||||
@ -11745,7 +11897,9 @@ static void Cmd_mimicattackcopy(void)
|
||||
|
||||
static void Cmd_metronome(void)
|
||||
{
|
||||
#if B_METRONOME_MOVES >= GEN_8
|
||||
#if B_METRONOME_MOVES >= GEN_9
|
||||
u16 moveCount = MOVES_COUNT_GEN9;
|
||||
#elif B_METRONOME_MOVES >= GEN_8
|
||||
u16 moveCount = MOVES_COUNT_GEN8;
|
||||
#elif B_METRONOME_MOVES >= GEN_7
|
||||
u16 moveCount = MOVES_COUNT_GEN7;
|
||||
@ -11886,8 +12040,9 @@ static void Cmd_trysetencore(void)
|
||||
}
|
||||
|
||||
if (gLastMoves[gBattlerTarget] == MOVE_STRUGGLE
|
||||
|| gLastMoves[gBattlerTarget] == MOVE_ENCORE
|
||||
|| gLastMoves[gBattlerTarget] == MOVE_MIRROR_MOVE)
|
||||
|| gLastMoves[gBattlerTarget] == MOVE_ENCORE
|
||||
|| gLastMoves[gBattlerTarget] == MOVE_MIRROR_MOVE
|
||||
|| gLastMoves[gBattlerTarget] == MOVE_SHELL_TRAP)
|
||||
{
|
||||
i = MAX_MON_MOVES;
|
||||
}
|
||||
@ -12815,6 +12970,10 @@ static void Cmd_trysetfutureattack(void)
|
||||
|
||||
static void Cmd_trydobeatup(void)
|
||||
{
|
||||
#if B_BEAT_UP >= GEN_5
|
||||
gBattleStruct->beatUpSlot++;
|
||||
gBattlescriptCurrInstr += 9;
|
||||
#else
|
||||
struct Pokemon *party;
|
||||
|
||||
if (GetBattlerSide(gBattlerAttacker) == B_SIDE_PLAYER)
|
||||
@ -12858,6 +13017,7 @@ static void Cmd_trydobeatup(void)
|
||||
else
|
||||
gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 5);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static void Cmd_setsemiinvulnerablebit(void)
|
||||
@ -13521,27 +13681,8 @@ static void Cmd_trysetsnatch(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void Cmd_trygetintimidatetarget(void)
|
||||
static void Cmd_unused2(void)
|
||||
{
|
||||
u8 side;
|
||||
|
||||
gBattleScripting.battler = gBattleStruct->intimidateBattler;
|
||||
side = GetBattlerSide(gBattleScripting.battler);
|
||||
|
||||
PREPARE_ABILITY_BUFFER(gBattleTextBuff1, gBattleMons[gBattleScripting.battler].ability)
|
||||
|
||||
for (;gBattlerTarget < gBattlersCount; gBattlerTarget++)
|
||||
{
|
||||
if (GetBattlerSide(gBattlerTarget) == side)
|
||||
continue;
|
||||
if (!(gAbsentBattlerFlags & gBitTable[gBattlerTarget]))
|
||||
break;
|
||||
}
|
||||
|
||||
if (gBattlerTarget >= gBattlersCount)
|
||||
gBattlescriptCurrInstr = T1_READ_PTR(gBattlescriptCurrInstr + 1);
|
||||
else
|
||||
gBattlescriptCurrInstr += 5;
|
||||
}
|
||||
|
||||
static void Cmd_switchoutabilities(void)
|
||||
|
610
src/battle_tv.c
610
src/battle_tv.c
@ -86,220 +86,402 @@ static const u16 sVariableDmgMoves[] =
|
||||
|
||||
static const u16 sPoints_MoveEffect[NUM_BATTLE_MOVE_EFFECTS] =
|
||||
{
|
||||
[EFFECT_HIT] = 1,
|
||||
[EFFECT_SLEEP] = 1,
|
||||
[EFFECT_POISON_HIT] = 1,
|
||||
[EFFECT_ABSORB] = 4,
|
||||
[EFFECT_BURN_HIT] = 1,
|
||||
[EFFECT_FREEZE_HIT] = 1,
|
||||
[EFFECT_PARALYZE_HIT] = 1,
|
||||
[EFFECT_EXPLOSION] = 0,
|
||||
[EFFECT_DREAM_EATER] = 5,
|
||||
[EFFECT_MIRROR_MOVE] = 1,
|
||||
[EFFECT_ATTACK_UP] = 1,
|
||||
[EFFECT_DEFENSE_UP] = 1,
|
||||
[EFFECT_SPEED_UP] = 1,
|
||||
[EFFECT_SPECIAL_ATTACK_UP] = 1,
|
||||
[EFFECT_SPECIAL_DEFENSE_UP] = 1,
|
||||
[EFFECT_ACCURACY_UP] = 1,
|
||||
[EFFECT_EVASION_UP] = 1,
|
||||
// [EFFECT_ALWAYS_HIT] = 2,
|
||||
[EFFECT_ATTACK_DOWN] = 1,
|
||||
[EFFECT_DEFENSE_DOWN] = 1,
|
||||
[EFFECT_SPEED_DOWN] = 1,
|
||||
[EFFECT_SPECIAL_ATTACK_DOWN] = 1,
|
||||
[EFFECT_SPECIAL_DEFENSE_DOWN] = 1,
|
||||
[EFFECT_ACCURACY_DOWN] = 1,
|
||||
[EFFECT_EVASION_DOWN] = 1,
|
||||
[EFFECT_HAZE] = 5,
|
||||
[EFFECT_BIDE] = 5,
|
||||
[EFFECT_RAMPAGE] = 4,
|
||||
[EFFECT_ROAR] = 5,
|
||||
[EFFECT_MULTI_HIT] = 1,
|
||||
[EFFECT_CONVERSION] = 3,
|
||||
[EFFECT_FLINCH_HIT] = 1,
|
||||
[EFFECT_RESTORE_HP] = 3,
|
||||
[EFFECT_TOXIC] = 5,
|
||||
[EFFECT_PAY_DAY] = 1,
|
||||
[EFFECT_LIGHT_SCREEN] = 7,
|
||||
[EFFECT_TRI_ATTACK] = 1,
|
||||
[EFFECT_REST] = 7,
|
||||
[EFFECT_OHKO] = 7,
|
||||
// [EFFECT_RAZOR_WIND] = 1,
|
||||
[EFFECT_SUPER_FANG] = 5,
|
||||
[EFFECT_DRAGON_RAGE] = 2,
|
||||
[EFFECT_TRAP] = 4,
|
||||
// [EFFECT_HIGH_CRITICAL] = 1,
|
||||
// [EFFECT_DOUBLE_HIT] = 1,
|
||||
[EFFECT_RECOIL_IF_MISS] = 1,
|
||||
[EFFECT_MIST] = 5,
|
||||
[EFFECT_FOCUS_ENERGY] = 1,
|
||||
[EFFECT_RECOIL_25] = 2,
|
||||
[EFFECT_CONFUSE] = 4,
|
||||
[EFFECT_ATTACK_UP_2] = 1,
|
||||
[EFFECT_DEFENSE_UP_2] = 1,
|
||||
[EFFECT_SPEED_UP_2] = 1,
|
||||
[EFFECT_SPECIAL_ATTACK_UP_2] = 1,
|
||||
[EFFECT_SPECIAL_DEFENSE_UP_2] = 1,
|
||||
[EFFECT_ACCURACY_UP_2] = 1,
|
||||
[EFFECT_EVASION_UP_2] = 1,
|
||||
[EFFECT_TRANSFORM] = 0,
|
||||
[EFFECT_ATTACK_DOWN_2] = 1,
|
||||
[EFFECT_DEFENSE_DOWN_2] = 1,
|
||||
[EFFECT_SPEED_DOWN_2] = 1,
|
||||
[EFFECT_SPECIAL_ATTACK_DOWN_2] = 1,
|
||||
[EFFECT_SPECIAL_DEFENSE_DOWN_2] = 1,
|
||||
[EFFECT_ACCURACY_DOWN_2] = 1,
|
||||
[EFFECT_EVASION_DOWN_2] = 1,
|
||||
[EFFECT_REFLECT] = 7,
|
||||
[EFFECT_POISON] = 4,
|
||||
[EFFECT_PARALYZE] = 4,
|
||||
[EFFECT_ATTACK_DOWN_HIT] = 1,
|
||||
[EFFECT_DEFENSE_DOWN_HIT] = 1,
|
||||
[EFFECT_SPEED_DOWN_HIT] = 1,
|
||||
[EFFECT_SPECIAL_ATTACK_DOWN_HIT] = 1,
|
||||
[EFFECT_SPECIAL_DEFENSE_DOWN_HIT] = 1,
|
||||
[EFFECT_ACCURACY_DOWN_HIT] = 1,
|
||||
[EFFECT_EVASION_DOWN_HIT] = 1,
|
||||
// [EFFECT_SKY_ATTACK] = 4,
|
||||
[EFFECT_CONFUSE_HIT] = 1,
|
||||
// [EFFECT_TWINEEDLE] = 1,
|
||||
[EFFECT_VITAL_THROW] = 1,
|
||||
[EFFECT_SUBSTITUTE] = 4,
|
||||
[EFFECT_RECHARGE] = 5,
|
||||
[EFFECT_RAGE] = 2,
|
||||
[EFFECT_MIMIC] = 4,
|
||||
[EFFECT_METRONOME] = 1,
|
||||
[EFFECT_LEECH_SEED] = 4,
|
||||
[EFFECT_DO_NOTHING] = 1,
|
||||
[EFFECT_DISABLE] = 7,
|
||||
[EFFECT_LEVEL_DAMAGE] = 2,
|
||||
[EFFECT_PSYWAVE] = 1,
|
||||
[EFFECT_COUNTER] = 5,
|
||||
[EFFECT_ENCORE] = 7,
|
||||
[EFFECT_PAIN_SPLIT] = 3,
|
||||
[EFFECT_SNORE] = 3,
|
||||
[EFFECT_CONVERSION_2] = 4,
|
||||
[EFFECT_LOCK_ON] = 3,
|
||||
[EFFECT_SKETCH] = 3,
|
||||
// [EFFECT_UNUSED_60] = 3,
|
||||
[EFFECT_SLEEP_TALK] = 3,
|
||||
[EFFECT_DESTINY_BOND] = 3,
|
||||
[EFFECT_FLAIL] = 2,
|
||||
[EFFECT_SPITE] = 4,
|
||||
[EFFECT_FALSE_SWIPE] = 1,
|
||||
[EFFECT_HEAL_BELL] = 5,
|
||||
// [EFFECT_QUICK_ATTACK] = 1,
|
||||
[EFFECT_TRIPLE_KICK] = 1,
|
||||
[EFFECT_THIEF] = 4,
|
||||
[EFFECT_MEAN_LOOK] = 5,
|
||||
[EFFECT_NIGHTMARE] = 3,
|
||||
[EFFECT_MINIMIZE] = 1,
|
||||
[EFFECT_CURSE] = 2,
|
||||
// [EFFECT_UNUSED_6E] = 1,
|
||||
[EFFECT_PROTECT] = 5,
|
||||
[EFFECT_SPIKES] = 4,
|
||||
[EFFECT_FORESIGHT] = 3,
|
||||
[EFFECT_PERISH_SONG] = 6,
|
||||
[EFFECT_SANDSTORM] = 4,
|
||||
[EFFECT_ENDURE] = 3,
|
||||
[EFFECT_ROLLOUT] = 3,
|
||||
[EFFECT_SWAGGER] = 3,
|
||||
[EFFECT_FURY_CUTTER] = 2,
|
||||
[EFFECT_ATTRACT] = 4,
|
||||
[EFFECT_RETURN] = 1,
|
||||
[EFFECT_PRESENT] = 1,
|
||||
[EFFECT_FRUSTRATION] = 1,
|
||||
[EFFECT_SAFEGUARD] = 5,
|
||||
// [EFFECT_THAW_HIT] = 1, Now unused
|
||||
[EFFECT_MAGNITUDE] = 1,
|
||||
[EFFECT_BATON_PASS] = 7,
|
||||
[EFFECT_PURSUIT] = 2,
|
||||
[EFFECT_RAPID_SPIN] = 2,
|
||||
[EFFECT_SONICBOOM] = 1,
|
||||
// [EFFECT_UNUSED_83] = 1,
|
||||
[EFFECT_MORNING_SUN] = 4,
|
||||
[EFFECT_SYNTHESIS] = 4,
|
||||
[EFFECT_MOONLIGHT] = 4,
|
||||
[EFFECT_HIDDEN_POWER] = 1,
|
||||
[EFFECT_RAIN_DANCE] = 4,
|
||||
[EFFECT_SUNNY_DAY] = 4,
|
||||
[EFFECT_DEFENSE_UP_HIT] = 1,
|
||||
[EFFECT_ATTACK_UP_HIT] = 1,
|
||||
[EFFECT_ALL_STATS_UP_HIT] = 1,
|
||||
// [EFFECT_UNUSED_8D] = 1,
|
||||
[EFFECT_BELLY_DRUM] = 7,
|
||||
[EFFECT_PSYCH_UP] = 7,
|
||||
[EFFECT_MIRROR_COAT] = 6,
|
||||
[EFFECT_SKULL_BASH] = 3,
|
||||
[EFFECT_TWISTER] = 1,
|
||||
[EFFECT_EARTHQUAKE] = 1,
|
||||
[EFFECT_FUTURE_SIGHT] = 1,
|
||||
[EFFECT_GUST] = 1,
|
||||
[EFFECT_FLINCH_MINIMIZE_HIT] = 1,
|
||||
[EFFECT_SOLAR_BEAM] = 1,
|
||||
[EFFECT_THUNDER] = 1,
|
||||
[EFFECT_TELEPORT] = 1,
|
||||
[EFFECT_BEAT_UP] = 2,
|
||||
[EFFECT_SEMI_INVULNERABLE] = 3,
|
||||
[EFFECT_DEFENSE_CURL] = 1,
|
||||
[EFFECT_SOFTBOILED] = 1,
|
||||
[EFFECT_FAKE_OUT] = 4,
|
||||
[EFFECT_UPROAR] = 4,
|
||||
[EFFECT_STOCKPILE] = 3,
|
||||
[EFFECT_SPIT_UP] = 3,
|
||||
[EFFECT_SWALLOW] = 3,
|
||||
// [EFFECT_UNUSED_A3] = 1,
|
||||
[EFFECT_HAIL] = 4,
|
||||
[EFFECT_TORMENT] = 7,
|
||||
[EFFECT_FLATTER] = 7,
|
||||
[EFFECT_WILL_O_WISP] = 5,
|
||||
[EFFECT_MEMENTO] = 7,
|
||||
[EFFECT_FACADE] = 1,
|
||||
[EFFECT_FOCUS_PUNCH] = 7,
|
||||
[EFFECT_SMELLINGSALT] = 1,
|
||||
[EFFECT_FOLLOW_ME] = 5,
|
||||
[EFFECT_NATURE_POWER] = 0,
|
||||
[EFFECT_CHARGE] = 4,
|
||||
[EFFECT_TAUNT] = 4,
|
||||
[EFFECT_HELPING_HAND] = 4,
|
||||
[EFFECT_TRICK] = 4,
|
||||
[EFFECT_ROLE_PLAY] = 4,
|
||||
[EFFECT_WISH] = 2,
|
||||
[EFFECT_ASSIST] = 2,
|
||||
[EFFECT_INGRAIN] = 6,
|
||||
[EFFECT_SUPERPOWER] = 3,
|
||||
[EFFECT_MAGIC_COAT] = 6,
|
||||
[EFFECT_RECYCLE] = 4,
|
||||
[EFFECT_REVENGE] = 4,
|
||||
[EFFECT_BRICK_BREAK] = 2,
|
||||
[EFFECT_YAWN] = 5,
|
||||
[EFFECT_KNOCK_OFF] = 2,
|
||||
[EFFECT_ENDEAVOR] = 1,
|
||||
[EFFECT_ERUPTION] = 1,
|
||||
[EFFECT_SKILL_SWAP] = 6,
|
||||
[EFFECT_IMPRISON] = 6,
|
||||
[EFFECT_REFRESH] = 6,
|
||||
[EFFECT_GRUDGE] = 1,
|
||||
[EFFECT_SNATCH] = 1,
|
||||
[EFFECT_LOW_KICK] = 1,
|
||||
[EFFECT_SECRET_POWER] = 1,
|
||||
[EFFECT_RECOIL_33] = 2,
|
||||
[EFFECT_TEETER_DANCE] = 6,
|
||||
// [EFFECT_BLAZE_KICK] = 1,
|
||||
[EFFECT_MUD_SPORT] = 4,
|
||||
[EFFECT_POISON_FANG] = 1,
|
||||
[EFFECT_WEATHER_BALL] = 1,
|
||||
[EFFECT_OVERHEAT] = 3,
|
||||
[EFFECT_TICKLE] = 1,
|
||||
[EFFECT_COSMIC_POWER] = 1,
|
||||
[EFFECT_SKY_UPPERCUT] = 1,
|
||||
[EFFECT_BULK_UP] = 1,
|
||||
// [EFFECT_POISON_TAIL] = 1,
|
||||
[EFFECT_WATER_SPORT] = 4,
|
||||
[EFFECT_CALM_MIND] = 1,
|
||||
[EFFECT_DRAGON_DANCE] = 1,
|
||||
[EFFECT_CAMOUFLAGE] = 3
|
||||
[EFFECT_HIT] = 1,
|
||||
[EFFECT_SLEEP] = 1,
|
||||
[EFFECT_POISON_HIT] = 1,
|
||||
[EFFECT_ABSORB] = 4,
|
||||
[EFFECT_BURN_HIT] = 1,
|
||||
[EFFECT_FREEZE_HIT] = 1,
|
||||
[EFFECT_PARALYZE_HIT] = 1,
|
||||
[EFFECT_EXPLOSION] = 0,
|
||||
[EFFECT_DREAM_EATER] = 5,
|
||||
[EFFECT_MIRROR_MOVE] = 1,
|
||||
[EFFECT_ATTACK_UP] = 1,
|
||||
[EFFECT_DEFENSE_UP] = 1,
|
||||
[EFFECT_SPEED_UP] = 1,
|
||||
[EFFECT_SPECIAL_ATTACK_UP] = 1,
|
||||
[EFFECT_SPECIAL_DEFENSE_UP] = 1,
|
||||
[EFFECT_ACCURACY_UP] = 1,
|
||||
[EFFECT_EVASION_UP] = 1,
|
||||
// [EFFECT_ALWAYS_HIT] = 2,
|
||||
[EFFECT_ATTACK_DOWN] = 1,
|
||||
[EFFECT_DEFENSE_DOWN] = 1,
|
||||
[EFFECT_SPEED_DOWN] = 1,
|
||||
[EFFECT_SPECIAL_ATTACK_DOWN] = 1,
|
||||
[EFFECT_SPECIAL_DEFENSE_DOWN] = 1,
|
||||
[EFFECT_ACCURACY_DOWN] = 1,
|
||||
[EFFECT_EVASION_DOWN] = 1,
|
||||
[EFFECT_HAZE] = 5,
|
||||
[EFFECT_BIDE] = 5,
|
||||
[EFFECT_RAMPAGE] = 4,
|
||||
[EFFECT_ROAR] = 5,
|
||||
[EFFECT_MULTI_HIT] = 1,
|
||||
[EFFECT_CONVERSION] = 3,
|
||||
[EFFECT_FLINCH_HIT] = 1,
|
||||
[EFFECT_RESTORE_HP] = 3,
|
||||
[EFFECT_TOXIC] = 5,
|
||||
[EFFECT_PAY_DAY] = 1,
|
||||
[EFFECT_LIGHT_SCREEN] = 7,
|
||||
[EFFECT_TRI_ATTACK] = 1,
|
||||
[EFFECT_REST] = 7,
|
||||
[EFFECT_OHKO] = 7,
|
||||
// [EFFECT_RAZOR_WIND] = 1,
|
||||
[EFFECT_SUPER_FANG] = 5,
|
||||
[EFFECT_DRAGON_RAGE] = 2,
|
||||
[EFFECT_TRAP] = 4,
|
||||
// [EFFECT_HIGH_CRITICAL] = 1,
|
||||
// [EFFECT_DOUBLE_HIT] = 1,
|
||||
[EFFECT_RECOIL_IF_MISS] = 1,
|
||||
[EFFECT_MIST] = 5,
|
||||
[EFFECT_FOCUS_ENERGY] = 1,
|
||||
[EFFECT_RECOIL_25] = 2,
|
||||
[EFFECT_CONFUSE] = 4,
|
||||
[EFFECT_ATTACK_UP_2] = 1,
|
||||
[EFFECT_DEFENSE_UP_2] = 1,
|
||||
[EFFECT_SPEED_UP_2] = 1,
|
||||
[EFFECT_SPECIAL_ATTACK_UP_2] = 1,
|
||||
[EFFECT_SPECIAL_DEFENSE_UP_2] = 1,
|
||||
[EFFECT_ACCURACY_UP_2] = 1,
|
||||
[EFFECT_EVASION_UP_2] = 1,
|
||||
[EFFECT_TRANSFORM] = 0,
|
||||
[EFFECT_ATTACK_DOWN_2] = 1,
|
||||
[EFFECT_DEFENSE_DOWN_2] = 1,
|
||||
[EFFECT_SPEED_DOWN_2] = 1,
|
||||
[EFFECT_SPECIAL_ATTACK_DOWN_2] = 1,
|
||||
[EFFECT_SPECIAL_DEFENSE_DOWN_2] = 1,
|
||||
[EFFECT_ACCURACY_DOWN_2] = 1,
|
||||
[EFFECT_EVASION_DOWN_2] = 1,
|
||||
[EFFECT_REFLECT] = 7,
|
||||
[EFFECT_POISON] = 4,
|
||||
[EFFECT_PARALYZE] = 4,
|
||||
[EFFECT_ATTACK_DOWN_HIT] = 1,
|
||||
[EFFECT_DEFENSE_DOWN_HIT] = 1,
|
||||
[EFFECT_SPEED_DOWN_HIT] = 1,
|
||||
[EFFECT_SPECIAL_ATTACK_DOWN_HIT] = 1,
|
||||
[EFFECT_SPECIAL_DEFENSE_DOWN_HIT] = 1,
|
||||
[EFFECT_ACCURACY_DOWN_HIT] = 1,
|
||||
[EFFECT_EVASION_DOWN_HIT] = 1,
|
||||
// [EFFECT_SKY_ATTACK] = 4,
|
||||
[EFFECT_CONFUSE_HIT] = 1,
|
||||
// [EFFECT_TWINEEDLE] = 1,
|
||||
[EFFECT_VITAL_THROW] = 1,
|
||||
[EFFECT_SUBSTITUTE] = 4,
|
||||
[EFFECT_RECHARGE] = 5,
|
||||
[EFFECT_RAGE] = 2,
|
||||
[EFFECT_MIMIC] = 4,
|
||||
[EFFECT_METRONOME] = 1,
|
||||
[EFFECT_LEECH_SEED] = 4,
|
||||
[EFFECT_DO_NOTHING] = 1,
|
||||
[EFFECT_DISABLE] = 7,
|
||||
[EFFECT_LEVEL_DAMAGE] = 2,
|
||||
[EFFECT_PSYWAVE] = 1,
|
||||
[EFFECT_COUNTER] = 5,
|
||||
[EFFECT_ENCORE] = 7,
|
||||
[EFFECT_PAIN_SPLIT] = 3,
|
||||
[EFFECT_SNORE] = 3,
|
||||
[EFFECT_CONVERSION_2] = 4,
|
||||
[EFFECT_LOCK_ON] = 3,
|
||||
[EFFECT_SKETCH] = 3,
|
||||
// [EFFECT_UNUSED_60] = 3,
|
||||
[EFFECT_SLEEP_TALK] = 3,
|
||||
[EFFECT_DESTINY_BOND] = 3,
|
||||
[EFFECT_FLAIL] = 2,
|
||||
[EFFECT_SPITE] = 4,
|
||||
[EFFECT_FALSE_SWIPE] = 1,
|
||||
[EFFECT_HEAL_BELL] = 5,
|
||||
// [EFFECT_QUICK_ATTACK] = 1,
|
||||
[EFFECT_TRIPLE_KICK] = 1,
|
||||
[EFFECT_THIEF] = 4,
|
||||
[EFFECT_MEAN_LOOK] = 5,
|
||||
[EFFECT_NIGHTMARE] = 3,
|
||||
[EFFECT_MINIMIZE] = 1,
|
||||
[EFFECT_CURSE] = 2,
|
||||
// [EFFECT_UNUSED_6E] = 1,
|
||||
[EFFECT_PROTECT] = 5,
|
||||
[EFFECT_SPIKES] = 4,
|
||||
[EFFECT_FORESIGHT] = 3,
|
||||
[EFFECT_PERISH_SONG] = 6,
|
||||
[EFFECT_SANDSTORM] = 4,
|
||||
[EFFECT_ENDURE] = 3,
|
||||
[EFFECT_ROLLOUT] = 3,
|
||||
[EFFECT_SWAGGER] = 3,
|
||||
[EFFECT_FURY_CUTTER] = 2,
|
||||
[EFFECT_ATTRACT] = 4,
|
||||
[EFFECT_RETURN] = 1,
|
||||
[EFFECT_PRESENT] = 1,
|
||||
[EFFECT_FRUSTRATION] = 1,
|
||||
[EFFECT_SAFEGUARD] = 5,
|
||||
// [EFFECT_THAW_HIT] = 1, Now unused
|
||||
[EFFECT_MAGNITUDE] = 1,
|
||||
[EFFECT_BATON_PASS] = 7,
|
||||
[EFFECT_PURSUIT] = 2,
|
||||
[EFFECT_RAPID_SPIN] = 2,
|
||||
[EFFECT_SONICBOOM] = 1,
|
||||
// [EFFECT_UNUSED_83] = 1,
|
||||
[EFFECT_MORNING_SUN] = 4,
|
||||
[EFFECT_SYNTHESIS] = 4,
|
||||
[EFFECT_MOONLIGHT] = 4,
|
||||
[EFFECT_HIDDEN_POWER] = 1,
|
||||
[EFFECT_RAIN_DANCE] = 4,
|
||||
[EFFECT_SUNNY_DAY] = 4,
|
||||
[EFFECT_DEFENSE_UP_HIT] = 1,
|
||||
[EFFECT_ATTACK_UP_HIT] = 1,
|
||||
[EFFECT_ALL_STATS_UP_HIT] = 1,
|
||||
// [EFFECT_UNUSED_8D] = 1,
|
||||
[EFFECT_BELLY_DRUM] = 7,
|
||||
[EFFECT_PSYCH_UP] = 7,
|
||||
[EFFECT_MIRROR_COAT] = 6,
|
||||
[EFFECT_SKULL_BASH] = 3,
|
||||
[EFFECT_TWISTER] = 1,
|
||||
[EFFECT_EARTHQUAKE] = 1,
|
||||
[EFFECT_FUTURE_SIGHT] = 1,
|
||||
[EFFECT_GUST] = 1,
|
||||
[EFFECT_FLINCH_MINIMIZE_HIT] = 1,
|
||||
[EFFECT_SOLAR_BEAM] = 1,
|
||||
[EFFECT_THUNDER] = 1,
|
||||
[EFFECT_TELEPORT] = 1,
|
||||
[EFFECT_BEAT_UP] = 2,
|
||||
[EFFECT_SEMI_INVULNERABLE] = 3,
|
||||
[EFFECT_DEFENSE_CURL] = 1,
|
||||
[EFFECT_SOFTBOILED] = 1,
|
||||
[EFFECT_FAKE_OUT] = 4,
|
||||
[EFFECT_UPROAR] = 4,
|
||||
[EFFECT_STOCKPILE] = 3,
|
||||
[EFFECT_SPIT_UP] = 3,
|
||||
[EFFECT_SWALLOW] = 3,
|
||||
// [EFFECT_UNUSED_A3] = 1,
|
||||
[EFFECT_HAIL] = 4,
|
||||
[EFFECT_TORMENT] = 7,
|
||||
[EFFECT_FLATTER] = 7,
|
||||
[EFFECT_WILL_O_WISP] = 5,
|
||||
[EFFECT_MEMENTO] = 7,
|
||||
[EFFECT_FACADE] = 1,
|
||||
[EFFECT_FOCUS_PUNCH] = 7,
|
||||
[EFFECT_SMELLINGSALT] = 1,
|
||||
[EFFECT_FOLLOW_ME] = 5,
|
||||
[EFFECT_NATURE_POWER] = 0,
|
||||
[EFFECT_CHARGE] = 4,
|
||||
[EFFECT_TAUNT] = 4,
|
||||
[EFFECT_HELPING_HAND] = 4,
|
||||
[EFFECT_TRICK] = 4,
|
||||
[EFFECT_ROLE_PLAY] = 4,
|
||||
[EFFECT_WISH] = 2,
|
||||
[EFFECT_ASSIST] = 2,
|
||||
[EFFECT_INGRAIN] = 6,
|
||||
[EFFECT_SUPERPOWER] = 3,
|
||||
[EFFECT_MAGIC_COAT] = 6,
|
||||
[EFFECT_RECYCLE] = 4,
|
||||
[EFFECT_REVENGE] = 4,
|
||||
[EFFECT_BRICK_BREAK] = 2,
|
||||
[EFFECT_YAWN] = 5,
|
||||
[EFFECT_KNOCK_OFF] = 2,
|
||||
[EFFECT_ENDEAVOR] = 1,
|
||||
[EFFECT_ERUPTION] = 1,
|
||||
[EFFECT_SKILL_SWAP] = 6,
|
||||
[EFFECT_IMPRISON] = 6,
|
||||
[EFFECT_REFRESH] = 6,
|
||||
[EFFECT_GRUDGE] = 1,
|
||||
[EFFECT_SNATCH] = 1,
|
||||
[EFFECT_LOW_KICK] = 1,
|
||||
[EFFECT_SECRET_POWER] = 1,
|
||||
[EFFECT_RECOIL_33] = 2,
|
||||
[EFFECT_TEETER_DANCE] = 6,
|
||||
// [EFFECT_BLAZE_KICK] = 1,
|
||||
[EFFECT_MUD_SPORT] = 4,
|
||||
[EFFECT_POISON_FANG] = 1,
|
||||
[EFFECT_WEATHER_BALL] = 1,
|
||||
[EFFECT_OVERHEAT] = 3,
|
||||
[EFFECT_TICKLE] = 1,
|
||||
[EFFECT_COSMIC_POWER] = 1,
|
||||
[EFFECT_SKY_UPPERCUT] = 1,
|
||||
[EFFECT_BULK_UP] = 1,
|
||||
// [EFFECT_POISON_TAIL] = 1,
|
||||
[EFFECT_WATER_SPORT] = 4,
|
||||
[EFFECT_CALM_MIND] = 1,
|
||||
[EFFECT_DRAGON_DANCE] = 1,
|
||||
[EFFECT_CAMOUFLAGE] = 3,
|
||||
[EFFECT_PLEDGE] = 0, // TODO: Assign points
|
||||
[EFFECT_FLING] = 0, // TODO: Assign points
|
||||
[EFFECT_NATURAL_GIFT] = 0, // TODO: Assign points
|
||||
[EFFECT_WAKE_UP_SLAP] = 0, // TODO: Assign points
|
||||
[EFFECT_WRING_OUT] = 0, // TODO: Assign points
|
||||
[EFFECT_HEX] = 0, // TODO: Assign points
|
||||
[EFFECT_ASSURANCE] = 0, // TODO: Assign points
|
||||
[EFFECT_TRUMP_CARD] = 0, // TODO: Assign points
|
||||
[EFFECT_ACROBATICS] = 0, // TODO: Assign points
|
||||
[EFFECT_HEAT_CRASH] = 0, // TODO: Assign points
|
||||
[EFFECT_PUNISHMENT] = 0, // TODO: Assign points
|
||||
[EFFECT_STORED_POWER] = 0, // TODO: Assign points
|
||||
[EFFECT_ELECTRO_BALL] = 0, // TODO: Assign points
|
||||
[EFFECT_GYRO_BALL] = 0, // TODO: Assign points
|
||||
[EFFECT_ECHOED_VOICE] = 0, // TODO: Assign points
|
||||
[EFFECT_PAYBACK] = 0, // TODO: Assign points
|
||||
[EFFECT_ROUND] = 0, // TODO: Assign points
|
||||
[EFFECT_BRINE] = 0, // TODO: Assign points
|
||||
[EFFECT_VENOSHOCK] = 0, // TODO: Assign points
|
||||
[EFFECT_RETALIATE] = 0, // TODO: Assign points
|
||||
[EFFECT_BULLDOZE] = 0, // TODO: Assign points
|
||||
[EFFECT_FOUL_PLAY] = 0, // TODO: Assign points
|
||||
[EFFECT_PSYSHOCK] = 0, // TODO: Assign points
|
||||
[EFFECT_ROOST] = 0, // TODO: Assign points
|
||||
[EFFECT_GRAVITY] = 0, // TODO: Assign points
|
||||
[EFFECT_MIRACLE_EYE] = 0, // TODO: Assign points
|
||||
[EFFECT_TAILWIND] = 0, // TODO: Assign points
|
||||
[EFFECT_EMBARGO] = 0, // TODO: Assign points
|
||||
[EFFECT_AQUA_RING] = 0, // TODO: Assign points
|
||||
[EFFECT_TRICK_ROOM] = 0, // TODO: Assign points
|
||||
[EFFECT_WONDER_ROOM] = 0, // TODO: Assign points
|
||||
[EFFECT_MAGIC_ROOM] = 0, // TODO: Assign points
|
||||
[EFFECT_MAGNET_RISE] = 0, // TODO: Assign points
|
||||
[EFFECT_TOXIC_SPIKES] = 0, // TODO: Assign points
|
||||
[EFFECT_GASTRO_ACID] = 0, // TODO: Assign points
|
||||
[EFFECT_STEALTH_ROCK] = 0, // TODO: Assign points
|
||||
[EFFECT_TELEKINESIS] = 0, // TODO: Assign points
|
||||
[EFFECT_POWER_SWAP] = 0, // TODO: Assign points
|
||||
[EFFECT_GUARD_SWAP] = 0, // TODO: Assign points
|
||||
[EFFECT_HEART_SWAP] = 0, // TODO: Assign points
|
||||
[EFFECT_POWER_SPLIT] = 0, // TODO: Assign points
|
||||
[EFFECT_GUARD_SPLIT] = 0, // TODO: Assign points
|
||||
[EFFECT_STICKY_WEB] = 0, // TODO: Assign points
|
||||
[EFFECT_METAL_BURST] = 0, // TODO: Assign points
|
||||
[EFFECT_LUCKY_CHANT] = 0, // TODO: Assign points
|
||||
[EFFECT_SUCKER_PUNCH] = 0, // TODO: Assign points
|
||||
[EFFECT_SPECIAL_DEFENSE_DOWN_HIT_2] = 0, // TODO: Assign points
|
||||
[EFFECT_SIMPLE_BEAM] = 0, // TODO: Assign points
|
||||
[EFFECT_ENTRAINMENT] = 0, // TODO: Assign points
|
||||
[EFFECT_HEAL_PULSE] = 0, // TODO: Assign points
|
||||
[EFFECT_QUASH] = 0, // TODO: Assign points
|
||||
[EFFECT_ION_DELUGE] = 0, // TODO: Assign points
|
||||
[EFFECT_FREEZE_DRY] = 0, // TODO: Assign points
|
||||
[EFFECT_TOPSY_TURVY] = 0, // TODO: Assign points
|
||||
[EFFECT_MISTY_TERRAIN] = 0, // TODO: Assign points
|
||||
[EFFECT_GRASSY_TERRAIN] = 0, // TODO: Assign points
|
||||
[EFFECT_ELECTRIC_TERRAIN] = 0, // TODO: Assign points
|
||||
[EFFECT_PSYCHIC_TERRAIN] = 0, // TODO: Assign points
|
||||
[EFFECT_ATTACK_ACCURACY_UP] = 0, // TODO: Assign points
|
||||
[EFFECT_ATTACK_SPATK_UP] = 0, // TODO: Assign points
|
||||
[EFFECT_HURRICANE] = 0, // TODO: Assign points
|
||||
[EFFECT_TWO_TYPED_MOVE] = 0, // TODO: Assign points
|
||||
[EFFECT_ME_FIRST] = 0, // TODO: Assign points
|
||||
[EFFECT_SPEED_UP_HIT] = 0, // TODO: Assign points
|
||||
[EFFECT_QUIVER_DANCE] = 0, // TODO: Assign points
|
||||
[EFFECT_COIL] = 0, // TODO: Assign points
|
||||
[EFFECT_ELECTRIFY] = 0, // TODO: Assign points
|
||||
[EFFECT_SCALD] = 0, // TODO: Assign points
|
||||
[EFFECT_REFLECT_TYPE] = 0, // TODO: Assign points
|
||||
[EFFECT_SOAK] = 0, // TODO: Assign points
|
||||
[EFFECT_GROWTH] = 0, // TODO: Assign points
|
||||
[EFFECT_CLOSE_COMBAT] = 0, // TODO: Assign points
|
||||
[EFFECT_LAST_RESORT] = 0, // TODO: Assign points
|
||||
[EFFECT_RECOIL_33_STATUS] = 0, // TODO: Assign points
|
||||
[EFFECT_FLINCH_STATUS] = 0, // TODO: Assign points
|
||||
[EFFECT_RECOIL_50] = 0, // TODO: Assign points
|
||||
[EFFECT_SHELL_SMASH] = 0, // TODO: Assign points
|
||||
[EFFECT_SHIFT_GEAR] = 0, // TODO: Assign points
|
||||
[EFFECT_DEFENSE_UP_3] = 0, // TODO: Assign points
|
||||
[EFFECT_NOBLE_ROAR] = 0, // TODO: Assign points
|
||||
[EFFECT_VENOM_DRENCH] = 0, // TODO: Assign points
|
||||
[EFFECT_TOXIC_THREAD] = 0, // TODO: Assign points
|
||||
[EFFECT_CLEAR_SMOG] = 0, // TODO: Assign points
|
||||
[EFFECT_HIT_SWITCH_TARGET] = 0, // TODO: Assign points
|
||||
[EFFECT_FINAL_GAMBIT] = 0, // TODO: Assign points
|
||||
[EFFECT_CHANGE_TYPE_ON_ITEM] = 0, // TODO: Assign points
|
||||
[EFFECT_AUTOTOMIZE] = 0, // TODO: Assign points
|
||||
[EFFECT_COPYCAT] = 0, // TODO: Assign points
|
||||
[EFFECT_DEFOG] = 0, // TODO: Assign points
|
||||
[EFFECT_HIT_ENEMY_HEAL_ALLY] = 0, // TODO: Assign points
|
||||
[EFFECT_SMACK_DOWN] = 0, // TODO: Assign points
|
||||
[EFFECT_SYNCHRONOISE] = 0, // TODO: Assign points
|
||||
[EFFECT_PSYCHO_SHIFT] = 0, // TODO: Assign points
|
||||
[EFFECT_POWER_TRICK] = 0, // TODO: Assign points
|
||||
[EFFECT_FLAME_BURST] = 0, // TODO: Assign points
|
||||
[EFFECT_AFTER_YOU] = 0, // TODO: Assign points
|
||||
[EFFECT_BESTOW] = 0, // TODO: Assign points
|
||||
[EFFECT_ROTOTILLER] = 0, // TODO: Assign points
|
||||
[EFFECT_FLOWER_SHIELD] = 0, // TODO: Assign points
|
||||
[EFFECT_HIT_PREVENT_ESCAPE] = 0, // TODO: Assign points
|
||||
[EFFECT_SPEED_SWAP] = 0, // TODO: Assign points
|
||||
[EFFECT_DEFENSE_UP2_HIT] = 0, // TODO: Assign points
|
||||
[EFFECT_REVELATION_DANCE] = 0, // TODO: Assign points
|
||||
[EFFECT_AURORA_VEIL] = 0, // TODO: Assign points
|
||||
[EFFECT_THIRD_TYPE] = 0, // TODO: Assign points
|
||||
[EFFECT_FEINT] = 0, // TODO: Assign points
|
||||
[EFFECT_SPARKLING_ARIA] = 0, // TODO: Assign points
|
||||
[EFFECT_ACUPRESSURE] = 0, // TODO: Assign points
|
||||
[EFFECT_AROMATIC_MIST] = 0, // TODO: Assign points
|
||||
[EFFECT_POWDER] = 0, // TODO: Assign points
|
||||
[EFFECT_SP_ATTACK_UP_HIT] = 0, // TODO: Assign points
|
||||
[EFFECT_BELCH] = 0, // TODO: Assign points
|
||||
[EFFECT_PARTING_SHOT] = 0, // TODO: Assign points
|
||||
[EFFECT_SPECTRAL_THIEF] = 0, // TODO: Assign points
|
||||
[EFFECT_V_CREATE] = 0, // TODO: Assign points
|
||||
[EFFECT_MAT_BLOCK] = 0, // TODO: Assign points
|
||||
[EFFECT_STOMPING_TANTRUM] = 0, // TODO: Assign points
|
||||
[EFFECT_CORE_ENFORCER] = 0, // TODO: Assign points
|
||||
[EFFECT_INSTRUCT] = 0, // TODO: Assign points
|
||||
[EFFECT_THROAT_CHOP] = 0, // TODO: Assign points
|
||||
[EFFECT_LASER_FOCUS] = 0, // TODO: Assign points
|
||||
[EFFECT_MAGNETIC_FLUX] = 0, // TODO: Assign points
|
||||
[EFFECT_GEAR_UP] = 0, // TODO: Assign points
|
||||
[EFFECT_INCINERATE] = 0, // TODO: Assign points
|
||||
[EFFECT_BUG_BITE] = 0, // TODO: Assign points
|
||||
[EFFECT_STRENGTH_SAP] = 0, // TODO: Assign points
|
||||
[EFFECT_MIND_BLOWN] = 0, // TODO: Assign points
|
||||
[EFFECT_PURIFY] = 0, // TODO: Assign points
|
||||
[EFFECT_BURN_UP] = 0, // TODO: Assign points
|
||||
[EFFECT_SHORE_UP] = 0, // TODO: Assign points
|
||||
[EFFECT_GEOMANCY] = 0, // TODO: Assign points
|
||||
[EFFECT_FAIRY_LOCK] = 0, // TODO: Assign points
|
||||
[EFFECT_ALLY_SWITCH] = 0, // TODO: Assign points
|
||||
[EFFECT_RELIC_SONG] = 0, // TODO: Assign points
|
||||
[EFFECT_ATTACKER_DEFENSE_DOWN_HIT] = 0, // TODO: Assign points
|
||||
[EFFECT_BODY_PRESS] = 0, // TODO: Assign points
|
||||
[EFFECT_EERIE_SPELL] = 0, // TODO: Assign points
|
||||
[EFFECT_JUNGLE_HEALING] = 0, // TODO: Assign points
|
||||
[EFFECT_COACHING] = 0, // TODO: Assign points
|
||||
[EFFECT_LASH_OUT] = 0, // TODO: Assign points
|
||||
[EFFECT_GRASSY_GLIDE] = 0, // TODO: Assign points
|
||||
[EFFECT_REMOVE_TERRAIN] = 0, // TODO: Assign points
|
||||
[EFFECT_DYNAMAX_DOUBLE_DMG] = 0, // TODO: Assign points
|
||||
[EFFECT_DECORATE] = 0, // TODO: Assign points
|
||||
[EFFECT_SNIPE_SHOT] = 0, // TODO: Assign points
|
||||
[EFFECT_RECOIL_HP_25] = 0, // TODO: Assign points
|
||||
[EFFECT_STUFF_CHEEKS] = 0, // TODO: Assign points
|
||||
[EFFECT_GRAV_APPLE] = 0, // TODO: Assign points
|
||||
[EFFECT_EVASION_UP_HIT] = 0, // TODO: Assign points
|
||||
[EFFECT_GLITZY_GLOW] = 0, // TODO: Assign points
|
||||
[EFFECT_BADDY_BAD] = 0, // TODO: Assign points
|
||||
[EFFECT_SAPPY_SEED] = 0, // TODO: Assign points
|
||||
[EFFECT_FREEZY_FROST] = 0, // TODO: Assign points
|
||||
[EFFECT_SPARKLY_SWIRL] = 0, // TODO: Assign points
|
||||
[EFFECT_PLASMA_FISTS] = 0, // TODO: Assign points
|
||||
[EFFECT_HYPERSPACE_FURY] = 0, // TODO: Assign points
|
||||
[EFFECT_AURA_WHEEL] = 0, // TODO: Assign points
|
||||
[EFFECT_PHOTON_GEYSER] = 0, // TODO: Assign points
|
||||
[EFFECT_SHELL_SIDE_ARM] = 0, // TODO: Assign points
|
||||
[EFFECT_TERRAIN_PULSE] = 0, // TODO: Assign points
|
||||
[EFFECT_JAW_LOCK] = 0, // TODO: Assign points
|
||||
[EFFECT_NO_RETREAT] = 0, // TODO: Assign points
|
||||
[EFFECT_TAR_SHOT] = 0, // TODO: Assign points
|
||||
[EFFECT_POLTERGEIST] = 0, // TODO: Assign points
|
||||
[EFFECT_OCTOLOCK] = 0, // TODO: Assign points
|
||||
[EFFECT_CLANGOROUS_SOUL] = 0, // TODO: Assign points
|
||||
[EFFECT_BOLT_BEAK] = 0, // TODO: Assign points
|
||||
[EFFECT_SKY_DROP] = 0, // TODO: Assign points
|
||||
[EFFECT_EXPANDING_FORCE] = 0, // TODO: Assign points
|
||||
[EFFECT_SCALE_SHOT] = 0, // TODO: Assign points
|
||||
[EFFECT_METEOR_BEAM] = 0, // TODO: Assign points
|
||||
[EFFECT_RISING_VOLTAGE] = 0, // TODO: Assign points
|
||||
[EFFECT_BEAK_BLAST] = 0, // TODO: Assign points
|
||||
[EFFECT_COURT_CHANGE] = 0, // TODO: Assign points
|
||||
[EFFECT_STEEL_BEAM] = 0, // TODO: Assign points
|
||||
[EFFECT_EXTREME_EVOBOOST] = 0, // TODO: Assign points
|
||||
[EFFECT_HIT_SET_REMOVE_TERRAIN] = 0, // TODO: Assign points
|
||||
[EFFECT_DARK_VOID] = 0, // TODO: Assign points
|
||||
[EFFECT_SLEEP_HIT] = 1,
|
||||
[EFFECT_DOUBLE_SHOCK] = 0, // TODO: Assign points
|
||||
[EFFECT_SPECIAL_ATTACK_UP_HIT] = 1,
|
||||
[EFFECT_VICTORY_DANCE] = 0, // TODO: Assign points
|
||||
};
|
||||
|
||||
static const u16 sPoints_Effectiveness[] =
|
||||
|
@ -60,6 +60,7 @@ static bool32 IsUnnerveAbilityOnOpposingSide(u8 battlerId);
|
||||
static u8 GetFlingPowerFromItemId(u16 itemId);
|
||||
static void SetRandomMultiHitCounter();
|
||||
static u32 GetBattlerItemHoldEffectParam(u8 battlerId, u16 item);
|
||||
static u16 GetInverseTypeMultiplier(u16 multiplier);
|
||||
|
||||
extern const u8 *const gBattleScriptsForMoveEffects[];
|
||||
extern const u8 *const gBattlescriptsForRunningByItem[];
|
||||
@ -229,8 +230,9 @@ static u8 CalcBeatUpPower(void)
|
||||
party = gPlayerParty;
|
||||
else
|
||||
party = gEnemyParty;
|
||||
// Party slot is set in the battle script for Beat Up
|
||||
species = GetMonData(&party[gBattleCommunication[0] - 1], MON_DATA_SPECIES);
|
||||
|
||||
// Party slot is incremented by the battle script for Beat Up after this damage calculation
|
||||
species = GetMonData(&party[gBattleStruct->beatUpSlot], MON_DATA_SPECIES);
|
||||
basePower = (gSpeciesInfo[species].baseAttack / 10) + 5;
|
||||
|
||||
return basePower;
|
||||
@ -418,7 +420,7 @@ void HandleAction_UseMove(void)
|
||||
battlerAbility = GetBattlerAbility(gActiveBattler);
|
||||
|
||||
RecordAbilityBattle(gActiveBattler, gBattleMons[gActiveBattler].ability);
|
||||
if (battlerAbility == ABILITY_LIGHTNING_ROD)
|
||||
if (battlerAbility == ABILITY_LIGHTNING_ROD && gCurrentMove != MOVE_TEATIME)
|
||||
gSpecialStatuses[gActiveBattler].lightningRodRedirected = TRUE;
|
||||
else if (battlerAbility == ABILITY_STORM_DRAIN)
|
||||
gSpecialStatuses[gActiveBattler].stormDrainRedirected = TRUE;
|
||||
@ -1064,6 +1066,11 @@ static const u8 sAbilitiesAffectedByMoldBreaker[] =
|
||||
[ABILITY_ICE_SCALES] = 1,
|
||||
[ABILITY_ICE_FACE] = 1,
|
||||
[ABILITY_PASTEL_VEIL] = 1,
|
||||
[ABILITY_ARMOR_TAIL] = 1,
|
||||
[ABILITY_EARTH_EATER] = 1,
|
||||
[ABILITY_GOOD_AS_GOLD] = 1,
|
||||
[ABILITY_PURIFYING_SALT] = 1,
|
||||
[ABILITY_WELL_BAKED_BODY] = 1,
|
||||
};
|
||||
|
||||
static const u8 sAbilitiesNotTraced[ABILITIES_COUNT] =
|
||||
@ -1256,38 +1263,6 @@ static const u16 sTypeEffectivenessTable[NUMBER_OF_MON_TYPES][NUMBER_OF_MON_TYPE
|
||||
{X(1.0), X(2.0), X(1.0), X(0.5), X(1.0), X(1.0), X(1.0), X(1.0), X(0.5), X(1.0), X(0.5), X(1.0), X(1.0), X(1.0), X(1.0), X(1.0), X(2.0), X(2.0), X(1.0)}, // fairy
|
||||
};
|
||||
|
||||
static const u16 sInverseTypeEffectivenessTable[NUMBER_OF_MON_TYPES][NUMBER_OF_MON_TYPES] =
|
||||
{
|
||||
// normal fight flying poison ground rock bug ghost steel mystery fire water grass electric psychic ice dragon dark fairy
|
||||
{X(1.0), X(1.0), X(1.0), X(1.0), X(1.0), X(2.0), X(1.0), X(2.0), X(2.0), X(1.0), X(1.0), X(1.0), X(1.0), X(1.0), X(1.0), X(1.0), X(1.0), X(1.0), X(1.0)}, // normal
|
||||
{X(0.5), X(1.0), X(2.0), X(2.0), X(1.0), X(0.5), X(2.0), X(2.0), X(0.5), X(1.0), X(1.0), X(1.0), X(1.0), X(1.0), X(2.0), X(0.5), X(1.0), X(0.5), X(2.0)}, // fight
|
||||
{X(1.0), X(0.5), X(1.0), X(1.0), X(1.0), X(2.0), X(0.5), X(1.0), X(2.0), X(1.0), X(1.0), X(1.0), X(0.5), X(2.0), X(1.0), X(1.0), X(1.0), X(1.0), X(1.0)}, // flying
|
||||
{X(1.0), X(1.0), X(1.0), X(2.0), X(2.0), X(2.0), X(1.0), X(2.0), X(2.0), X(1.0), X(1.0), X(1.0), X(0.5), X(1.0), X(1.0), X(1.0), X(1.0), X(1.0), X(0.5)}, // poison
|
||||
{X(1.0), X(1.0), X(2.0), X(0.5), X(1.0), X(0.5), X(2.0), X(1.0), X(0.5), X(1.0), X(0.5), X(1.0), X(2.0), X(0.5), X(1.0), X(1.0), X(1.0), X(1.0), X(1.0)}, // ground
|
||||
{X(1.0), X(2.0), X(0.5), X(1.0), X(2.0), X(1.0), X(0.5), X(1.0), X(2.0), X(1.0), X(0.5), X(1.0), X(1.0), X(1.0), X(1.0), X(0.5), X(1.0), X(1.0), X(1.0)}, // rock
|
||||
{X(1.0), X(2.0), X(2.0), X(2.0), X(1.0), X(1.0), X(1.0), X(2.0), X(2.0), X(1.0), X(2.0), X(1.0), X(0.5), X(1.0), X(0.5), X(1.0), X(1.0), X(0.5), X(2.0)}, // bug
|
||||
#if B_STEEL_RESISTANCES >= GEN_6
|
||||
{X(2.0), X(1.0), X(1.0), X(1.0), X(1.0), X(1.0), X(1.0), X(0.5), X(1.0), X(1.0), X(1.0), X(1.0), X(1.0), X(1.0), X(0.5), X(1.0), X(1.0), X(2.0), X(1.0)}, // ghost
|
||||
#else
|
||||
{X(2.0), X(1.0), X(1.0), X(1.0), X(1.0), X(1.0), X(1.0), X(0.5), X(2.0), X(1.0), X(1.0), X(1.0), X(1.0), X(1.0), X(0.5), X(1.0), X(1.0), X(2.0), X(1.0)}, // ghost
|
||||
#endif
|
||||
{X(1.0), X(1.0), X(1.0), X(1.0), X(1.0), X(0.5), X(1.0), X(1.0), X(2.0), X(1.0), X(2.0), X(2.0), X(1.0), X(2.0), X(1.0), X(0.5), X(1.0), X(1.0), X(0.5)}, // steel
|
||||
{X(1.0), X(1.0), X(1.0), X(1.0), X(1.0), X(1.0), X(1.0), X(1.0), X(1.0), X(1.0), X(1.0), X(1.0), X(1.0), X(1.0), X(1.0), X(1.0), X(1.0), X(1.0), X(1.0)}, // mystery
|
||||
{X(1.0), X(1.0), X(1.0), X(1.0), X(1.0), X(2.0), X(0.5), X(1.0), X(0.5), X(1.0), X(2.0), X(2.0), X(0.5), X(1.0), X(1.0), X(0.5), X(2.0), X(1.0), X(1.0)}, // fire
|
||||
{X(1.0), X(1.0), X(1.0), X(1.0), X(0.5), X(0.5), X(1.0), X(1.0), X(1.0), X(1.0), X(0.5), X(2.0), X(2.0), X(1.0), X(1.0), X(1.0), X(2.0), X(1.0), X(1.0)}, // water
|
||||
{X(1.0), X(1.0), X(2.0), X(2.0), X(0.5), X(0.5), X(2.0), X(1.0), X(2.0), X(1.0), X(2.0), X(0.5), X(2.0), X(1.0), X(1.0), X(1.0), X(2.0), X(1.0), X(1.0)}, // grass
|
||||
{X(1.0), X(1.0), X(0.5), X(1.0), X(2.0), X(1.0), X(1.0), X(1.0), X(1.0), X(1.0), X(1.0), X(0.5), X(2.0), X(2.0), X(1.0), X(1.0), X(2.0), X(1.0), X(1.0)}, // electric
|
||||
{X(1.0), X(0.5), X(1.0), X(0.5), X(1.0), X(1.0), X(1.0), X(1.0), X(2.0), X(1.0), X(1.0), X(1.0), X(1.0), X(1.0), X(2.0), X(1.0), X(1.0), X(2.0), X(1.0)}, // psychic
|
||||
{X(1.0), X(1.0), X(0.5), X(1.0), X(0.5), X(1.0), X(1.0), X(1.0), X(2.0), X(1.0), X(2.0), X(2.0), X(0.5), X(1.0), X(1.0), X(2.0), X(0.5), X(1.0), X(1.0)}, // ice
|
||||
{X(1.0), X(1.0), X(1.0), X(1.0), X(1.0), X(1.0), X(1.0), X(1.0), X(2.0), X(1.0), X(1.0), X(1.0), X(1.0), X(1.0), X(1.0), X(1.0), X(0.5), X(1.0), X(2.0)}, // dragon
|
||||
#if B_STEEL_RESISTANCES >= GEN_6
|
||||
{X(1.0), X(2.0), X(1.0), X(1.0), X(1.0), X(1.0), X(1.0), X(0.5), X(1.0), X(1.0), X(1.0), X(1.0), X(1.0), X(1.0), X(0.5), X(1.0), X(1.0), X(2.0), X(2.0)}, // dark
|
||||
#else
|
||||
{X(1.0), X(2.0), X(1.0), X(1.0), X(1.0), X(1.0), X(1.0), X(0.5), X(2.0), X(1.0), X(1.0), X(1.0), X(1.0), X(1.0), X(0.5), X(1.0), X(1.0), X(2.0), X(2.0)}, // dark
|
||||
#endif
|
||||
{X(1.0), X(0.5), X(1.0), X(2.0), X(1.0), X(1.0), X(1.0), X(1.0), X(2.0), X(1.0), X(2.0), X(1.0), X(1.0), X(1.0), X(1.0), X(1.0), X(0.5), X(0.5), X(1.0)}, // fairy
|
||||
};
|
||||
|
||||
#undef X
|
||||
|
||||
// code
|
||||
@ -2645,6 +2620,7 @@ enum
|
||||
ENDTURN_THROAT_CHOP,
|
||||
ENDTURN_SLOW_START,
|
||||
ENDTURN_PLASMA_FISTS,
|
||||
ENDTURN_CUD_CHEW,
|
||||
ENDTURN_BATTLER_COUNT
|
||||
};
|
||||
|
||||
@ -3183,8 +3159,12 @@ u8 DoBattlerEndTurnEffects(void)
|
||||
gBattleStruct->turnEffectsTracker++;
|
||||
break;
|
||||
case ENDTURN_PLASMA_FISTS:
|
||||
for (i = 0; i < gBattlersCount; i++)
|
||||
gStatuses4[i] &= ~STATUS4_PLASMA_FISTS;
|
||||
gStatuses4[gActiveBattler] &= ~STATUS4_PLASMA_FISTS;
|
||||
gBattleStruct->turnEffectsTracker++;
|
||||
break;
|
||||
case ENDTURN_CUD_CHEW:
|
||||
if (GetBattlerAbility(gActiveBattler) == ABILITY_CUD_CHEW && !gDisableStructs[gActiveBattler].cudChew && ItemId_GetPocket(GetUsedHeldItem(gActiveBattler)) == POCKET_BERRIES)
|
||||
gDisableStructs[gActiveBattler].cudChew = TRUE;
|
||||
gBattleStruct->turnEffectsTracker++;
|
||||
break;
|
||||
case ENDTURN_BATTLER_COUNT: // done
|
||||
@ -3867,7 +3847,7 @@ u8 AtkCanceller_UnableToUseMove(void)
|
||||
gMultiHitCounter++;
|
||||
}
|
||||
|
||||
gBattleCommunication[0] = 0; // For later
|
||||
gBattleStruct->beatUpSlot = 0;
|
||||
PREPARE_BYTE_NUMBER_BUFFER(gBattleScripting.multihitString, 1, 0)
|
||||
}
|
||||
#endif
|
||||
@ -4737,6 +4717,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
|
||||
}
|
||||
break;
|
||||
case ABILITY_ELECTRIC_SURGE:
|
||||
case ABILITY_HADRON_ENGINE:
|
||||
if (TryChangeBattleTerrain(battler, STATUS_FIELD_ELECTRIC_TERRAIN, &gFieldTimers.terrainTimer))
|
||||
{
|
||||
BattleScriptPushCursorAndCallback(BattleScript_ElectricSurgeActivates);
|
||||
@ -4765,23 +4746,12 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
|
||||
}
|
||||
break;
|
||||
case ABILITY_INTIMIDATE:
|
||||
if (!(gSpecialStatuses[battler].intimidatedMon))
|
||||
if (!gSpecialStatuses[battler].switchInAbilityDone)
|
||||
{
|
||||
gBattleResources->flags->flags[battler] |= RESOURCE_FLAG_INTIMIDATED;
|
||||
gSpecialStatuses[battler].intimidatedMon = TRUE;
|
||||
}
|
||||
break;
|
||||
case ABILITY_FORECAST:
|
||||
#if B_WEATHER_FORMS >= GEN_5
|
||||
case ABILITY_FLOWER_GIFT:
|
||||
#else
|
||||
TRY_WEATHER_FORM:
|
||||
#endif
|
||||
effect = TryWeatherFormChange(battler);
|
||||
if (effect != 0)
|
||||
{
|
||||
BattleScriptPushCursorAndCallback(BattleScript_WeatherFormChange);
|
||||
*(&gBattleStruct->formToChangeInto) = effect - 1;
|
||||
gSpecialStatuses[battler].switchInAbilityDone = TRUE;
|
||||
SET_STATCHANGER(STAT_ATK, 1, TRUE);
|
||||
BattleScriptPushCursorAndCallback(BattleScript_IntimidateActivates);
|
||||
effect++;
|
||||
}
|
||||
break;
|
||||
case ABILITY_TRACE:
|
||||
@ -4860,6 +4830,89 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
|
||||
effect++;
|
||||
}
|
||||
break;
|
||||
case ABILITY_PROTOSYNTHESIS:
|
||||
if (!gSpecialStatuses[battler].switchInAbilityDone && gBattleWeather & B_WEATHER_SUN)
|
||||
{
|
||||
gSpecialStatuses[battler].switchInAbilityDone = TRUE;
|
||||
PREPARE_STAT_BUFFER(gBattleTextBuff1, GetHighestStatId(battler));
|
||||
BattleScriptPushCursorAndCallback(BattleScript_ProtosynthesisActivates);
|
||||
effect++;
|
||||
}
|
||||
break;
|
||||
case ABILITY_QUARK_DRIVE:
|
||||
if (!gSpecialStatuses[battler].switchInAbilityDone && gFieldStatuses & STATUS_FIELD_ELECTRIC_TERRAIN)
|
||||
{
|
||||
gSpecialStatuses[battler].switchInAbilityDone = TRUE;
|
||||
PREPARE_STAT_BUFFER(gBattleTextBuff1, GetHighestStatId(battler));
|
||||
BattleScriptPushCursorAndCallback(BattleScript_QuarkDriveActivates);
|
||||
effect++;
|
||||
}
|
||||
break;
|
||||
case ABILITY_VESSEL_OF_RUIN:
|
||||
if (!gSpecialStatuses[battler].switchInAbilityDone)
|
||||
{
|
||||
PREPARE_STAT_BUFFER(gBattleTextBuff1, STAT_SPATK);
|
||||
gSpecialStatuses[battler].switchInAbilityDone = TRUE;
|
||||
BattleScriptPushCursorAndCallback(BattleScript_RuinAbilityActivates);
|
||||
effect++;
|
||||
}
|
||||
break;
|
||||
case ABILITY_SWORD_OF_RUIN:
|
||||
if (!gSpecialStatuses[battler].switchInAbilityDone)
|
||||
{
|
||||
PREPARE_STAT_BUFFER(gBattleTextBuff1, STAT_DEF);
|
||||
gSpecialStatuses[battler].switchInAbilityDone = TRUE;
|
||||
BattleScriptPushCursorAndCallback(BattleScript_RuinAbilityActivates);
|
||||
effect++;
|
||||
}
|
||||
break;
|
||||
case ABILITY_TABLETS_OF_RUIN:
|
||||
if (!gSpecialStatuses[battler].switchInAbilityDone)
|
||||
{
|
||||
PREPARE_STAT_BUFFER(gBattleTextBuff1, STAT_ATK);
|
||||
gSpecialStatuses[battler].switchInAbilityDone = TRUE;
|
||||
BattleScriptPushCursorAndCallback(BattleScript_RuinAbilityActivates);
|
||||
effect++;
|
||||
}
|
||||
break;
|
||||
case ABILITY_BEADS_OF_RUIN:
|
||||
if (!gSpecialStatuses[battler].switchInAbilityDone)
|
||||
{
|
||||
PREPARE_STAT_BUFFER(gBattleTextBuff1, STAT_SPDEF);
|
||||
gSpecialStatuses[battler].switchInAbilityDone = TRUE;
|
||||
BattleScriptPushCursorAndCallback(BattleScript_RuinAbilityActivates);
|
||||
effect++;
|
||||
}
|
||||
break;
|
||||
case ABILITY_ORICHALCUM_PULSE:
|
||||
if (TryChangeBattleWeather(battler, ENUM_WEATHER_SUN, TRUE))
|
||||
{
|
||||
BattleScriptPushCursorAndCallback(BattleScript_DroughtActivates);
|
||||
effect++;
|
||||
}
|
||||
break;
|
||||
case ABILITY_SUPREME_OVERLORD:
|
||||
if (!gSpecialStatuses[battler].switchInAbilityDone && CountUsablePartyMons(battler) < PARTY_SIZE)
|
||||
{
|
||||
gSpecialStatuses[battler].switchInAbilityDone = TRUE;
|
||||
BattleScriptPushCursorAndCallback(BattleScript_SupremeOverlordActivates);
|
||||
effect++;
|
||||
}
|
||||
break;
|
||||
case ABILITY_COSTAR:
|
||||
if (!gSpecialStatuses[battler].switchInAbilityDone
|
||||
&& IsDoubleBattle()
|
||||
&& IsBattlerAlive(BATTLE_PARTNER(battler))
|
||||
&& CountBattlerStatIncreases(BATTLE_PARTNER(battler), FALSE))
|
||||
{
|
||||
gSpecialStatuses[battler].switchInAbilityDone = TRUE;
|
||||
for (i = 0; i < NUM_BATTLE_STATS; i++)
|
||||
gBattleMons[battler].statStages[i] = gBattleMons[BATTLE_PARTNER(battler)].statStages[i];
|
||||
gBattlerTarget = BATTLE_PARTNER(battler);
|
||||
BattleScriptPushCursorAndCallback(BattleScript_CostarActivates);
|
||||
effect++;
|
||||
}
|
||||
break;
|
||||
#if B_WEATHER_FORMS < GEN_5
|
||||
default:
|
||||
if (gBattleMons[battler].species == SPECIES_CHERRIM)
|
||||
@ -5063,48 +5116,66 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
|
||||
effect++;
|
||||
}
|
||||
break;
|
||||
case ABILITY_CUD_CHEW:
|
||||
if (ItemId_GetPocket(GetUsedHeldItem(battler)) == POCKET_BERRIES && gDisableStructs[gActiveBattler].cudChew == TRUE)
|
||||
{
|
||||
gLastUsedItem = gBattleStruct->usedHeldItems[battler][GetBattlerSide(battler)];
|
||||
gBattleStruct->usedHeldItems[battler][GetBattlerSide(battler)] = ITEM_NONE;
|
||||
BattleScriptPushCursorAndCallback(BattleScript_CudChewActivates);
|
||||
effect++;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case ABILITYEFFECT_MOVES_BLOCK: // 2
|
||||
{
|
||||
u16 moveTarget = GetBattlerMoveTargetType(battler, move);
|
||||
{
|
||||
u16 moveTarget = GetBattlerMoveTargetType(battler, move);
|
||||
u16 battlerAbility = GetBattlerAbility(battler);
|
||||
u16 targetAbility = GetBattlerAbility(gBattlerTarget);
|
||||
|
||||
if ((gLastUsedAbility == ABILITY_SOUNDPROOF && gBattleMoves[move].flags & FLAG_SOUND && !(moveTarget & MOVE_TARGET_USER))
|
||||
|| (gLastUsedAbility == ABILITY_BULLETPROOF && gBattleMoves[move].flags & FLAG_BALLISTIC))
|
||||
{
|
||||
if (gBattleMons[gBattlerAttacker].status2 & STATUS2_MULTIPLETURNS)
|
||||
gHitMarker |= HITMARKER_NO_PPDEDUCT;
|
||||
gBattlescriptCurrInstr = BattleScript_SoundproofProtected;
|
||||
effect = 1;
|
||||
if ((gLastUsedAbility == ABILITY_SOUNDPROOF && gBattleMoves[move].flags & FLAG_SOUND && !(moveTarget & MOVE_TARGET_USER))
|
||||
|| (gLastUsedAbility == ABILITY_BULLETPROOF && gBattleMoves[move].flags & FLAG_BALLISTIC))
|
||||
{
|
||||
if (gBattleMons[gBattlerAttacker].status2 & STATUS2_MULTIPLETURNS)
|
||||
gHitMarker |= HITMARKER_NO_PPDEDUCT;
|
||||
gBattlescriptCurrInstr = BattleScript_SoundproofProtected;
|
||||
effect = 1;
|
||||
}
|
||||
else if ((gLastUsedAbility == ABILITY_DAZZLING || gLastUsedAbility == ABILITY_QUEENLY_MAJESTY || gLastUsedAbility == ABILITY_ARMOR_TAIL || IsBattlerAlive(battler ^= BIT_FLANK))
|
||||
&& (battlerAbility == ABILITY_DAZZLING || battlerAbility == ABILITY_QUEENLY_MAJESTY || battlerAbility == ABILITY_ARMOR_TAIL)
|
||||
&& GetChosenMovePriority(gBattlerAttacker) > 0
|
||||
&& GetBattlerSide(gBattlerAttacker) != GetBattlerSide(battler))
|
||||
{
|
||||
if (gBattleMons[gBattlerAttacker].status2 & STATUS2_MULTIPLETURNS)
|
||||
gHitMarker |= HITMARKER_NO_PPDEDUCT;
|
||||
gBattlescriptCurrInstr = BattleScript_DazzlingProtected;
|
||||
effect = 1;
|
||||
}
|
||||
else if (BlocksPrankster(move, gBattlerAttacker, gBattlerTarget, TRUE) && !(IS_MOVE_STATUS(move) && targetAbility == ABILITY_MAGIC_BOUNCE))
|
||||
{
|
||||
if (!(gBattleTypeFlags & BATTLE_TYPE_DOUBLE) || !(moveTarget & (MOVE_TARGET_BOTH | MOVE_TARGET_FOES_AND_ALLY)))
|
||||
CancelMultiTurnMoves(gBattlerAttacker); // Don't cancel moves that can hit two targets bc one target might not be protected
|
||||
gBattleScripting.battler = gBattlerAbility = gBattlerTarget;
|
||||
gBattlescriptCurrInstr = BattleScript_DarkTypePreventsPrankster;
|
||||
effect = 1;
|
||||
}
|
||||
else if (GetBattlerAbility(gBattlerTarget) == ABILITY_GOOD_AS_GOLD
|
||||
&& IS_MOVE_STATUS(gCurrentMove)
|
||||
&& !(moveTarget & MOVE_TARGET_USER)
|
||||
&& !(moveTarget & MOVE_TARGET_OPPONENTS_FIELD)
|
||||
&& !(moveTarget & MOVE_TARGET_ALL_BATTLERS))
|
||||
{
|
||||
gBattlescriptCurrInstr = BattleScript_GoodAsGoldActivates;
|
||||
effect = 1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
else if ((((gLastUsedAbility == ABILITY_DAZZLING || gLastUsedAbility == ABILITY_QUEENLY_MAJESTY
|
||||
|| (IsBattlerAlive(battler ^= BIT_FLANK)
|
||||
&& ((GetBattlerAbility(battler) == ABILITY_DAZZLING) || GetBattlerAbility(battler) == ABILITY_QUEENLY_MAJESTY)))
|
||||
))
|
||||
&& GetChosenMovePriority(gBattlerAttacker) > 0
|
||||
&& GetBattlerSide(gBattlerAttacker) != GetBattlerSide(battler))
|
||||
{
|
||||
if (gBattleMons[gBattlerAttacker].status2 & STATUS2_MULTIPLETURNS)
|
||||
gHitMarker |= HITMARKER_NO_PPDEDUCT;
|
||||
gBattlescriptCurrInstr = BattleScript_DazzlingProtected;
|
||||
effect = 1;
|
||||
}
|
||||
else if (BlocksPrankster(move, gBattlerAttacker, gBattlerTarget, TRUE)
|
||||
&& !(IS_MOVE_STATUS(move) && GetBattlerAbility(gBattlerTarget) == ABILITY_MAGIC_BOUNCE))
|
||||
{
|
||||
if (!(gBattleTypeFlags & BATTLE_TYPE_DOUBLE) || !(moveTarget & (MOVE_TARGET_BOTH | MOVE_TARGET_FOES_AND_ALLY)))
|
||||
CancelMultiTurnMoves(gBattlerAttacker); // Don't cancel moves that can hit two targets bc one target might not be protected
|
||||
gBattleScripting.battler = gBattlerAbility = gBattlerTarget;
|
||||
gBattlescriptCurrInstr = BattleScript_DarkTypePreventsPrankster;
|
||||
effect = 1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ABILITYEFFECT_ABSORBING: // 3
|
||||
if (move != MOVE_NONE)
|
||||
{
|
||||
u8 statId;
|
||||
u8 statAmount = 1;
|
||||
switch (gLastUsedAbility)
|
||||
{
|
||||
case ABILITY_VOLT_ABSORB:
|
||||
@ -5162,6 +5233,18 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
|
||||
}
|
||||
}
|
||||
break;
|
||||
case ABILITY_WELL_BAKED_BODY:
|
||||
if (moveType == TYPE_FIRE)
|
||||
effect = 2, statId = STAT_DEF, statAmount = 2;
|
||||
break;
|
||||
case ABILITY_WIND_RIDER:
|
||||
if (gBattleMoves[gCurrentMove].flags & FLAG_WIND_MOVE && !(GetBattlerMoveTargetType(gBattlerAttacker, gCurrentMove) & MOVE_TARGET_USER))
|
||||
effect = 2, statId = STAT_ATK;
|
||||
break;
|
||||
case ABILITY_EARTH_EATER:
|
||||
if (moveType == TYPE_GROUND)
|
||||
effect = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
if (effect == 1) // Drain Hp ability.
|
||||
@ -5206,9 +5289,11 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
|
||||
else
|
||||
gBattlescriptCurrInstr = BattleScript_MoveStatDrain_PPLoss;
|
||||
|
||||
SET_STATCHANGER(statId, 1, FALSE);
|
||||
SET_STATCHANGER(statId, statAmount, FALSE);
|
||||
#if B_ABSORBING_ABILITY_STRING < GEN_5
|
||||
gBattleMons[battler].statStages[statId]++;
|
||||
PREPARE_STAT_BUFFER(gBattleTextBuff1, statId);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -5342,11 +5427,13 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
|
||||
effect++;
|
||||
}
|
||||
break;
|
||||
case ABILITY_LINGERING_AROMA:
|
||||
case ABILITY_MUMMY:
|
||||
if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT)
|
||||
&& IsBattlerAlive(gBattlerAttacker)
|
||||
&& TARGET_TURN_DAMAGED
|
||||
&& (IsMoveMakingContact(move, gBattlerAttacker)))
|
||||
&& IsMoveMakingContact(move, gBattlerAttacker)
|
||||
&& gBattleStruct->overwrittenAbilities[gBattlerAttacker] != GetBattlerAbility(gBattlerTarget))
|
||||
{
|
||||
switch (gBattleMons[gBattlerAttacker].ability)
|
||||
{
|
||||
@ -5362,7 +5449,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
|
||||
case ABILITY_STANCE_CHANGE:
|
||||
break;
|
||||
default:
|
||||
gLastUsedAbility = gBattleMons[gBattlerAttacker].ability = gBattleStruct->overwrittenAbilities[gBattlerAttacker] = ABILITY_MUMMY;
|
||||
gLastUsedAbility = gBattleMons[gBattlerAttacker].ability = gBattleStruct->overwrittenAbilities[gBattlerAttacker] = gBattleMons[gBattlerTarget].ability;
|
||||
BattleScriptPushCursor();
|
||||
gBattlescriptCurrInstr = BattleScript_MummyActivates;
|
||||
effect++;
|
||||
@ -5709,6 +5796,75 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
|
||||
}
|
||||
}
|
||||
break;
|
||||
case ABILITY_SEED_SOWER:
|
||||
if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT)
|
||||
&& !gProtectStructs[gBattlerAttacker].confusionSelfDmg
|
||||
&& TARGET_TURN_DAMAGED
|
||||
&& IsBattlerAlive(gBattlerTarget)
|
||||
&& TryChangeBattleTerrain(gBattlerTarget, STATUS_FIELD_GRASSY_TERRAIN, &gFieldTimers.terrainTimer))
|
||||
{
|
||||
BattleScriptPushCursor();
|
||||
gBattlescriptCurrInstr = BattleScript_SeedSowerActivates;
|
||||
effect++;
|
||||
}
|
||||
break;
|
||||
case ABILITY_THERMAL_EXCHANGE:
|
||||
if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT)
|
||||
&& TARGET_TURN_DAMAGED
|
||||
&& IsBattlerAlive(gBattlerTarget)
|
||||
&& CompareStat(gBattlerTarget, STAT_ATK, MAX_STAT_STAGE, CMP_LESS_THAN)
|
||||
&& moveType == TYPE_FIRE)
|
||||
{
|
||||
gEffectBattler = gBattlerTarget;
|
||||
SET_STATCHANGER(STAT_ATK, 1, FALSE);
|
||||
BattleScriptPushCursor();
|
||||
gBattlescriptCurrInstr = BattleScript_TargetAbilityStatRaiseRet;
|
||||
effect++;
|
||||
}
|
||||
break;
|
||||
case ABILITY_ANGER_SHELL:
|
||||
if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT)
|
||||
&& !gProtectStructs[gBattlerAttacker].confusionSelfDmg
|
||||
&& TARGET_TURN_DAMAGED
|
||||
&& (gBattleMons[gBattlerTarget].hp <= gBattleMons[gBattlerTarget].maxHP / 2)
|
||||
&& !(TestSheerForceFlag(gBattlerAttacker, gCurrentMove)))
|
||||
{
|
||||
gBattlerAttacker = gBattlerTarget;
|
||||
BattleScriptPushCursor();
|
||||
gBattlescriptCurrInstr = BattleScript_AngerShellActivates;
|
||||
effect++;
|
||||
}
|
||||
break;
|
||||
case ABILITY_WIND_POWER:
|
||||
if (!(gBattleMoves[gCurrentMove].flags & FLAG_WIND_MOVE))
|
||||
break;
|
||||
// fall through
|
||||
case ABILITY_ELECTROMORPHOSIS:
|
||||
if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT)
|
||||
&& !gProtectStructs[gBattlerAttacker].confusionSelfDmg
|
||||
&& TARGET_TURN_DAMAGED
|
||||
&& IsBattlerAlive(gBattlerTarget))
|
||||
{
|
||||
gBattlerAttacker = gBattlerTarget;
|
||||
BattleScriptPushCursor();
|
||||
gBattlescriptCurrInstr = BattleScript_WindPowerActivates;
|
||||
effect++;
|
||||
}
|
||||
break;
|
||||
case ABILITY_TOXIC_DEBRIS:
|
||||
if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT)
|
||||
&& !gProtectStructs[gBattlerAttacker].confusionSelfDmg
|
||||
&& IS_MOVE_PHYSICAL(gCurrentMove)
|
||||
&& TARGET_TURN_DAMAGED
|
||||
&& !(gSideStatuses[gBattlerAttacker] & SIDE_STATUS_TOXIC_SPIKES)
|
||||
&& IsBattlerAlive(gBattlerTarget))
|
||||
{
|
||||
gBattlerTarget = gBattlerAttacker;
|
||||
BattleScriptPushCursor();
|
||||
gBattlescriptCurrInstr = BattleScript_ToxicDebrisActivates;
|
||||
effect++;
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case ABILITYEFFECT_MOVE_END_ATTACKER: // Same as above, but for attacker
|
||||
@ -5945,30 +6101,6 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
|
||||
}
|
||||
}
|
||||
break;
|
||||
case ABILITYEFFECT_INTIMIDATE1:
|
||||
case ABILITYEFFECT_INTIMIDATE2:
|
||||
for (i = 0; i < gBattlersCount; i++)
|
||||
{
|
||||
if (GetBattlerAbility(i) == ABILITY_INTIMIDATE && gBattleResources->flags->flags[i] & RESOURCE_FLAG_INTIMIDATED
|
||||
&& (IsBattlerAlive(BATTLE_OPPOSITE(i)) || IsBattlerAlive(BATTLE_PARTNER(BATTLE_OPPOSITE(i))))) // At least one opposing mon has to be alive.
|
||||
{
|
||||
gBattleResources->flags->flags[i] &= ~RESOURCE_FLAG_INTIMIDATED;
|
||||
gLastUsedAbility = ABILITY_INTIMIDATE;
|
||||
if (caseID == ABILITYEFFECT_INTIMIDATE1)
|
||||
{
|
||||
BattleScriptPushCursorAndCallback(BattleScript_IntimidateActivatesEnd3);
|
||||
}
|
||||
else
|
||||
{
|
||||
BattleScriptPushCursor();
|
||||
gBattlescriptCurrInstr = BattleScript_IntimidateActivates;
|
||||
}
|
||||
battler = gBattlerAbility = gBattleStruct->intimidateBattler = i;
|
||||
effect++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case ABILITYEFFECT_TRACE1:
|
||||
case ABILITYEFFECT_TRACE2:
|
||||
for (i = 0; i < gBattlersCount; i++)
|
||||
@ -6064,6 +6196,47 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case ABILITYEFFECT_ON_WEATHER: // For ability effects that activate when the battle weather changes.
|
||||
battler = gBattlerAbility = gBattlerAttacker = gBattleScripting.battler;
|
||||
switch (GetBattlerAbility(battler))
|
||||
{
|
||||
case ABILITY_FORECAST:
|
||||
#if B_WEATHER_FORMS >= GEN_5
|
||||
case ABILITY_FLOWER_GIFT:
|
||||
#else
|
||||
TRY_WEATHER_FORM:
|
||||
#endif
|
||||
effect = TryWeatherFormChange(battler);
|
||||
if (effect != 0)
|
||||
{
|
||||
BattleScriptPushCursorAndCallback(BattleScript_WeatherFormChange);
|
||||
*(&gBattleStruct->formToChangeInto) = effect - 1;
|
||||
}
|
||||
break;
|
||||
case ABILITY_PROTOSYNTHESIS:
|
||||
if (IsBattlerWeatherAffected(battler, B_WEATHER_SUN))
|
||||
{
|
||||
PREPARE_STAT_BUFFER(gBattleTextBuff1, GetHighestStatId(battler));
|
||||
BattleScriptPushCursorAndCallback(BattleScript_ProtosynthesisActivates);
|
||||
effect++;
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case ABILITYEFFECT_ON_TERRAIN: // For ability effects that activate when the field terrain changes.
|
||||
battler = gBattlerAbility = gBattlerAttacker = gBattleScripting.battler;
|
||||
switch (GetBattlerAbility(battler))
|
||||
{
|
||||
case ABILITY_QUARK_DRIVE:
|
||||
if (IsBattlerTerrainAffected(battler, STATUS_FIELD_ELECTRIC_TERRAIN))
|
||||
{
|
||||
PREPARE_STAT_BUFFER(gBattleTextBuff1, GetHighestStatId(battler));
|
||||
BattleScriptPushCursorAndCallback(BattleScript_QuarkDriveActivates);
|
||||
effect++;
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (effect && gLastUsedAbility != 0xFF)
|
||||
@ -6110,6 +6283,19 @@ bool32 IsNeutralizingGasOnField(void)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool32 IsMyceliumMightOnField(void)
|
||||
{
|
||||
u32 i;
|
||||
|
||||
for (i = 0; i < gBattlersCount; i++)
|
||||
{
|
||||
if (IsBattlerAlive(i) && gBattleMons[i].ability == ABILITY_MYCELIUM_MIGHT && IS_MOVE_STATUS(gCurrentMove))
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
u32 GetBattlerAbility(u8 battlerId)
|
||||
{
|
||||
if (gStatuses3[battlerId] & STATUS3_GASTRO_ACID)
|
||||
@ -6118,6 +6304,9 @@ u32 GetBattlerAbility(u8 battlerId)
|
||||
if (IsNeutralizingGasOnField() && !IsNeutralizingGasBannedAbility(gBattleMons[battlerId].ability))
|
||||
return ABILITY_NONE;
|
||||
|
||||
if (IsMyceliumMightOnField())
|
||||
return ABILITY_NONE;
|
||||
|
||||
if ((((gBattleMons[gBattlerAttacker].ability == ABILITY_MOLD_BREAKER
|
||||
|| gBattleMons[gBattlerAttacker].ability == ABILITY_TERAVOLT
|
||||
|| gBattleMons[gBattlerAttacker].ability == ABILITY_TURBOBLAZE)
|
||||
@ -6291,6 +6480,7 @@ bool32 CanBeBurned(u8 battlerId)
|
||||
|| ability == ABILITY_WATER_VEIL
|
||||
|| ability == ABILITY_WATER_BUBBLE
|
||||
|| ability == ABILITY_COMATOSE
|
||||
|| ability == ABILITY_THERMAL_EXCHANGE
|
||||
|| IsAbilityStatusProtected(battlerId)
|
||||
|| IsBattlerTerrainAffected(battlerId, STATUS_FIELD_MISTY_TERRAIN))
|
||||
return FALSE;
|
||||
@ -8023,6 +8213,11 @@ bool32 IsBattlerProtected(u8 battlerId, u16 move)
|
||||
else if (gProtectStructs[battlerId].protected)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (move == MOVE_TEATIME)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// Protective Pads doesn't stop Unseen Fist from bypassing Protect effects, so IsMoveMakingContact() isn't used here.
|
||||
// This means extra logic is needed to handle Shell Side Arm.
|
||||
@ -8541,17 +8736,41 @@ static u16 CalcMoveBasePower(u16 move, u8 battlerAtk, u8 battlerDef)
|
||||
return basePower;
|
||||
}
|
||||
|
||||
// Supreme Overlord adds a damage boost for each fainted ally.
|
||||
// The first ally adds a x1.2 boost, and subsequent allies add an extra x0.1 boost each.
|
||||
static u16 GetSupremeOverlordModifier(u8 battlerId)
|
||||
{
|
||||
u32 i;
|
||||
u8 side = GetBattlerSide(battlerId);
|
||||
struct Pokemon *party = (side == B_SIDE_PLAYER) ? gPlayerParty : gEnemyParty;
|
||||
u16 modifier = UQ_4_12(1.0);
|
||||
bool8 appliedFirstBoost = FALSE;
|
||||
|
||||
for (i = 0; i < PARTY_SIZE; i++)
|
||||
{
|
||||
if (GetMonData(&party[i], MON_DATA_SPECIES) != SPECIES_NONE
|
||||
&& !GetMonData(&party[i], MON_DATA_IS_EGG)
|
||||
&& GetMonData(&party[i], MON_DATA_HP) == 0)
|
||||
modifier += (!appliedFirstBoost) ? UQ_4_12(0.2) : UQ_4_12(0.1);
|
||||
appliedFirstBoost = TRUE;
|
||||
}
|
||||
|
||||
return modifier;
|
||||
}
|
||||
|
||||
static u32 CalcMoveBasePowerAfterModifiers(u16 move, u8 battlerAtk, u8 battlerDef, u8 moveType, bool32 updateFlags)
|
||||
{
|
||||
u32 i, ability;
|
||||
u32 i;
|
||||
u32 holdEffectAtk, holdEffectParamAtk;
|
||||
u16 basePower = CalcMoveBasePower(move, battlerAtk, battlerDef);
|
||||
u16 holdEffectModifier;
|
||||
u16 modifier = UQ_4_12(1.0);
|
||||
u32 atkSide = GET_BATTLER_SIDE(battlerAtk);
|
||||
u16 atkAbility = GetBattlerAbility(battlerAtk);
|
||||
u16 defAbility = GetBattlerAbility(battlerDef);
|
||||
|
||||
// attacker's abilities
|
||||
switch (GetBattlerAbility(battlerAtk))
|
||||
switch (atkAbility)
|
||||
{
|
||||
case ABILITY_TECHNICIAN:
|
||||
if (basePower <= 60)
|
||||
@ -8657,11 +8876,44 @@ static u32 CalcMoveBasePowerAfterModifiers(u16 move, u8 battlerAtk, u8 battlerDe
|
||||
if (IS_MOVE_PHYSICAL(move))
|
||||
MulModifier(&modifier, UQ_4_12(1.5));
|
||||
break;
|
||||
case ABILITY_ROCKY_PAYLOAD:
|
||||
if (moveType == TYPE_ROCK)
|
||||
MulModifier(&modifier, UQ_4_12(1.5));
|
||||
break;
|
||||
case ABILITY_PROTOSYNTHESIS:
|
||||
{
|
||||
u8 atkHighestStat = GetHighestStatId(battlerAtk);
|
||||
if (gBattleWeather & B_WEATHER_SUN && WEATHER_HAS_EFFECT && (atkHighestStat == STAT_ATK || atkHighestStat == STAT_SPATK))
|
||||
MulModifier(&modifier, UQ_4_12(1.3));
|
||||
}
|
||||
break;
|
||||
case ABILITY_QUARK_DRIVE:
|
||||
{
|
||||
u8 atkHighestStat = GetHighestStatId(battlerAtk);
|
||||
if (gFieldStatuses & STATUS_FIELD_ELECTRIC_TERRAIN && (atkHighestStat == STAT_ATK || atkHighestStat == STAT_SPATK))
|
||||
MulModifier(&modifier, UQ_4_12(1.3));
|
||||
}
|
||||
break;
|
||||
case ABILITY_ORICHALCUM_PULSE:
|
||||
if (gBattleWeather & B_WEATHER_SUN && WEATHER_HAS_EFFECT)
|
||||
MulModifier(&modifier, UQ_4_12(1.3));
|
||||
break;
|
||||
case ABILITY_HADRON_ENGINE:
|
||||
if (gFieldStatuses & STATUS_FIELD_ELECTRIC_TERRAIN)
|
||||
MulModifier(&modifier, UQ_4_12(1.3));
|
||||
break;
|
||||
case ABILITY_SHARPNESS:
|
||||
if (gBattleMoves[move].flags & FLAG_SLICING_MOVE)
|
||||
MulModifier(&modifier, UQ_4_12(1.5));
|
||||
break;
|
||||
case ABILITY_SUPREME_OVERLORD:
|
||||
MulModifier(&modifier, GetSupremeOverlordModifier(battlerAtk));
|
||||
break;
|
||||
}
|
||||
|
||||
// field abilities
|
||||
if ((IsAbilityOnField(ABILITY_DARK_AURA) && moveType == TYPE_DARK)
|
||||
|| (IsAbilityOnField(ABILITY_FAIRY_AURA) && moveType == TYPE_FAIRY))
|
||||
|| (IsAbilityOnField(ABILITY_FAIRY_AURA) && moveType == TYPE_FAIRY))
|
||||
{
|
||||
if (IsAbilityOnField(ABILITY_AURA_BREAK))
|
||||
MulModifier(&modifier, UQ_4_12(0.75));
|
||||
@ -8669,6 +8921,18 @@ static u32 CalcMoveBasePowerAfterModifiers(u16 move, u8 battlerAtk, u8 battlerDe
|
||||
MulModifier(&modifier, UQ_4_12(1.33));
|
||||
}
|
||||
|
||||
if (IsAbilityOnField(ABILITY_VESSEL_OF_RUIN) && atkAbility != ABILITY_VESSEL_OF_RUIN && IS_MOVE_SPECIAL(gCurrentMove))
|
||||
MulModifier(&modifier, UQ_4_12(0.25));
|
||||
|
||||
if (IsAbilityOnField(ABILITY_SWORD_OF_RUIN) && defAbility != ABILITY_SWORD_OF_RUIN && IS_MOVE_PHYSICAL(gCurrentMove))
|
||||
MulModifier(&modifier, UQ_4_12(0.25));
|
||||
|
||||
if (IsAbilityOnField(ABILITY_TABLETS_OF_RUIN) && atkAbility != ABILITY_TABLETS_OF_RUIN && IS_MOVE_PHYSICAL(gCurrentMove))
|
||||
MulModifier(&modifier, UQ_4_12(0.25));
|
||||
|
||||
if (IsAbilityOnField(ABILITY_BEADS_OF_RUIN) && defAbility != ABILITY_BEADS_OF_RUIN && IS_MOVE_SPECIAL(gCurrentMove))
|
||||
MulModifier(&modifier, UQ_4_12(0.25));
|
||||
|
||||
// attacker partner's abilities
|
||||
if (IsBattlerAlive(BATTLE_PARTNER(battlerAtk)))
|
||||
{
|
||||
@ -8689,8 +8953,7 @@ static u32 CalcMoveBasePowerAfterModifiers(u16 move, u8 battlerAtk, u8 battlerDe
|
||||
}
|
||||
|
||||
// target's abilities
|
||||
ability = GetBattlerAbility(battlerDef);
|
||||
switch (ability)
|
||||
switch (defAbility)
|
||||
{
|
||||
case ABILITY_HEATPROOF:
|
||||
case ABILITY_WATER_BUBBLE:
|
||||
@ -8698,7 +8961,7 @@ static u32 CalcMoveBasePowerAfterModifiers(u16 move, u8 battlerAtk, u8 battlerDe
|
||||
{
|
||||
MulModifier(&modifier, UQ_4_12(0.5));
|
||||
if (updateFlags)
|
||||
RecordAbilityBattle(battlerDef, ability);
|
||||
RecordAbilityBattle(battlerDef, defAbility);
|
||||
}
|
||||
break;
|
||||
case ABILITY_DRY_SKIN:
|
||||
@ -8710,11 +8973,25 @@ static u32 CalcMoveBasePowerAfterModifiers(u16 move, u8 battlerAtk, u8 battlerDe
|
||||
{
|
||||
MulModifier(&modifier, UQ_4_12(0.5));
|
||||
if (updateFlags)
|
||||
RecordAbilityBattle(battlerDef, ability);
|
||||
RecordAbilityBattle(battlerDef, defAbility);
|
||||
}
|
||||
if (moveType == TYPE_FIRE)
|
||||
MulModifier(&modifier, UQ_4_12(2.0));
|
||||
break;
|
||||
case ABILITY_PROTOSYNTHESIS:
|
||||
{
|
||||
u8 defHighestStat = GetHighestStatId(battlerDef);
|
||||
if (gBattleWeather & B_WEATHER_SUN && WEATHER_HAS_EFFECT && (defHighestStat == STAT_DEF || defHighestStat == STAT_SPDEF))
|
||||
MulModifier(&modifier, UQ_4_12(0.7));
|
||||
}
|
||||
break;
|
||||
case ABILITY_QUARK_DRIVE:
|
||||
{
|
||||
u8 defHighestStat = GetHighestStatId(battlerDef);
|
||||
if (gFieldStatuses & STATUS_FIELD_ELECTRIC_TERRAIN && (defHighestStat == STAT_DEF || defHighestStat == STAT_SPDEF))
|
||||
MulModifier(&modifier, UQ_4_12(0.7));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
holdEffectAtk = GetBattlerHoldEffect(battlerAtk, TRUE);
|
||||
@ -8841,7 +9118,7 @@ static u32 CalcMoveBasePowerAfterModifiers(u16 move, u8 battlerAtk, u8 battlerDe
|
||||
#define TERRAIN_TYPE_BOOST UQ_4_12(1.5)
|
||||
#endif
|
||||
|
||||
// various effecs
|
||||
// various effects
|
||||
if (gProtectStructs[battlerAtk].helpingHand)
|
||||
MulModifier(&modifier, UQ_4_12(1.5));
|
||||
if (gStatuses3[battlerAtk] & STATUS3_CHARGED_UP && moveType == TYPE_ELECTRIC)
|
||||
@ -9171,6 +9448,10 @@ static u32 CalcDefenseStat(u16 move, u8 battlerAtk, u8 battlerDef, u8 moveType,
|
||||
if (gBattleMoves[move].flags & FLAG_SOUND)
|
||||
MulModifier(&modifier, UQ_4_12(2.0));
|
||||
break;
|
||||
case ABILITY_PURIFYING_SALT:
|
||||
if (gBattleMoves[move].type == TYPE_GHOST)
|
||||
MulModifier(&modifier, UQ_4_12(2.0));
|
||||
break;
|
||||
}
|
||||
|
||||
// ally's abilities
|
||||
@ -9614,20 +9895,32 @@ u16 CalcPartyMonTypeEffectivenessMultiplier(u16 move, u16 speciesDef, u16 abilit
|
||||
return modifier;
|
||||
}
|
||||
|
||||
static u16 GetInverseTypeMultiplier(u16 multiplier)
|
||||
{
|
||||
switch (multiplier)
|
||||
{
|
||||
case UQ_4_12(0.0):
|
||||
case UQ_4_12(0.5):
|
||||
return UQ_4_12(2.0);
|
||||
case UQ_4_12(2.0):
|
||||
return UQ_4_12(0.5);
|
||||
case UQ_4_12(1.0):
|
||||
default:
|
||||
return UQ_4_12(1.0);
|
||||
}
|
||||
}
|
||||
|
||||
u16 GetTypeModifier(u8 atkType, u8 defType)
|
||||
{
|
||||
#if B_FLAG_INVERSE_BATTLE != 0
|
||||
if (FlagGet(B_FLAG_INVERSE_BATTLE))
|
||||
return sInverseTypeEffectivenessTable[atkType][defType];
|
||||
return GetInverseTypeMultiplier(sTypeEffectivenessTable[atkType][defType]);
|
||||
#endif
|
||||
return sTypeEffectivenessTable[atkType][defType];
|
||||
}
|
||||
|
||||
s32 GetStealthHazardDamage(u8 hazardType, u8 battlerId)
|
||||
s32 GetStealthHazardDamageByTypesAndHP(u8 hazardType, u8 type1, u8 type2, u32 maxHp)
|
||||
{
|
||||
u8 type1 = gBattleMons[battlerId].type1;
|
||||
u8 type2 = gBattleMons[battlerId].type2;
|
||||
u32 maxHp = gBattleMons[battlerId].maxHP;
|
||||
s32 dmg = 0;
|
||||
u16 modifier = UQ_4_12(1.0);
|
||||
|
||||
@ -9670,6 +9963,15 @@ s32 GetStealthHazardDamage(u8 hazardType, u8 battlerId)
|
||||
return dmg;
|
||||
}
|
||||
|
||||
s32 GetStealthHazardDamage(u8 hazardType, u8 battlerId)
|
||||
{
|
||||
u8 type1 = gBattleMons[battlerId].type1;
|
||||
u8 type2 = gBattleMons[battlerId].type2;
|
||||
u32 maxHp = gBattleMons[battlerId].maxHP;
|
||||
|
||||
return GetStealthHazardDamageByTypesAndHP(hazardType, type1, type2, maxHp);
|
||||
}
|
||||
|
||||
bool32 IsPartnerMonFromSameTrainer(u8 battlerId)
|
||||
{
|
||||
if (GetBattlerSide(battlerId) == B_SIDE_OPPONENT && gBattleTypeFlags & BATTLE_TYPE_TWO_OPPONENTS)
|
||||
|
@ -1450,6 +1450,7 @@ const struct CompressedSpriteSheet gBattleAnimPicTable[] =
|
||||
{gBattleAnimSpriteGfx_OmegaSymbol, 0x0200, ANIM_TAG_OMEGA_SYMBOL},
|
||||
{gBattleAnimSpriteGfx_Orbs, 0x0180, ANIM_TAG_STEEL_BEAM},
|
||||
{gBattleAnimSpriteGfx_AuraSphere, 0x200, ANIM_TAG_POLTERGEIST},
|
||||
{gBattleAnimSpriteGfx_Teapot, 0x1800, ANIM_TAG_TEAPOT},
|
||||
};
|
||||
|
||||
const struct CompressedSpritePalette gBattleAnimPaletteTable[] =
|
||||
@ -1900,6 +1901,7 @@ const struct CompressedSpritePalette gBattleAnimPaletteTable[] =
|
||||
{gBattleAnimSpritePal_OmegaSymbol, ANIM_TAG_OMEGA_SYMBOL},
|
||||
{gBattleAnimSpritePal_SteelBeam, ANIM_TAG_STEEL_BEAM},
|
||||
{gBattleAnimSpritePal_Poltergeist, ANIM_TAG_POLTERGEIST},
|
||||
{gBattleAnimSpritePal_Teapot, ANIM_TAG_TEAPOT},
|
||||
};
|
||||
|
||||
const struct BattleAnimBackground gBattleAnimBackgroundTable[] =
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -5966,6 +5966,102 @@ const struct ContestMove gContestMoves[MOVES_COUNT] =
|
||||
[MOVE_LUNAR_BLESSING] = {0}, // TODO
|
||||
|
||||
[MOVE_TAKE_HEART] = {0}, // TODO
|
||||
|
||||
[MOVE_TERA_BLAST] = {0}, // TODO
|
||||
|
||||
[MOVE_SILK_TRAP] = {0}, // TODO
|
||||
|
||||
[MOVE_AXE_KICK] = {0}, // TODO
|
||||
|
||||
[MOVE_LAST_RESPECTS] = {0}, // TODO
|
||||
|
||||
[MOVE_LUMINA_CRASH] = {0}, // TODO
|
||||
|
||||
[MOVE_ORDER_UP] = {0}, // TODO
|
||||
|
||||
[MOVE_JET_PUNCH] = {0}, // TODO
|
||||
|
||||
[MOVE_SPICY_EXTRACT] = {0}, // TODO
|
||||
|
||||
[MOVE_SPIN_OUT] = {0}, // TODO
|
||||
|
||||
[MOVE_POPULATION_BOMB] = {0}, // TODO
|
||||
|
||||
[MOVE_ICE_SPINNER] = {0}, // TODO
|
||||
|
||||
[MOVE_GLAIVE_RUSH] = {0}, // TODO
|
||||
|
||||
[MOVE_REVIVAL_BLESSING] = {0}, // TODO
|
||||
|
||||
[MOVE_SALT_CURE] = {0}, // TODO
|
||||
|
||||
[MOVE_TRIPLE_DIVE] = {0}, // TODO
|
||||
|
||||
[MOVE_MORTAL_SPIN] = {0}, // TODO
|
||||
|
||||
[MOVE_DOODLE] = {0}, // TODO
|
||||
|
||||
[MOVE_FILLET_AWAY] = {0}, // TODO
|
||||
|
||||
[MOVE_KOWTOW_CLEAVE] = {0}, // TODO
|
||||
|
||||
[MOVE_FLOWER_TRICK] = {0}, // TODO
|
||||
|
||||
[MOVE_TORCH_SONG] = {0}, // TODO
|
||||
|
||||
[MOVE_AQUA_STEP] = {0}, // TODO
|
||||
|
||||
[MOVE_RAGING_BULL] = {0}, // TODO
|
||||
|
||||
[MOVE_MAKE_IT_RAIN] = {0}, // TODO
|
||||
|
||||
[MOVE_RUINATION] = {0}, // TODO
|
||||
|
||||
[MOVE_COLLISION_COURSE] = {0}, // TODO
|
||||
|
||||
[MOVE_ELECTRO_DRIFT] = {0}, // TODO
|
||||
|
||||
[MOVE_SHED_TAIL] = {0}, // TODO
|
||||
|
||||
[MOVE_CHILLY_RECEPTION] = {0}, // TODO
|
||||
|
||||
[MOVE_TIDY_UP] = {0}, // TODO
|
||||
|
||||
[MOVE_SNOWSCAPE] = {0}, // TODO
|
||||
|
||||
[MOVE_POUNCE] = {0}, // TODO
|
||||
|
||||
[MOVE_TRAILBLAZE] = {0}, // TODO
|
||||
|
||||
[MOVE_CHILLING_WATER] = {0}, // TODO
|
||||
|
||||
[MOVE_HYPER_DRILL] = {0}, // TODO
|
||||
|
||||
[MOVE_TWIN_BEAM] = {0}, // TODO
|
||||
|
||||
[MOVE_RAGE_FIST] = {0}, // TODO
|
||||
|
||||
[MOVE_ARMOR_CANNON] = {0}, // TODO
|
||||
|
||||
[MOVE_BITTER_BLADE] = {0}, // TODO
|
||||
|
||||
[MOVE_DOUBLE_SHOCK] = {0}, // TODO
|
||||
|
||||
[MOVE_GIGATON_HAMMER] = {0}, // TODO
|
||||
|
||||
[MOVE_COMEUPPANCE] = {0}, // TODO
|
||||
|
||||
[MOVE_AQUA_CUTTER] = {0}, // TODO
|
||||
|
||||
[MOVE_BLAZING_TORQUE] = {0}, // TODO
|
||||
|
||||
[MOVE_WICKED_TORQUE] = {0}, // TODO
|
||||
|
||||
[MOVE_NOXIOUS_TORQUE] = {0}, // TODO
|
||||
|
||||
[MOVE_COMBAT_TORQUE] = {0}, // TODO
|
||||
|
||||
[MOVE_MAGICAL_TORQUE] = {0}, // TODO
|
||||
};
|
||||
|
||||
const struct ContestEffect gContestEffects[] =
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -254,6 +254,37 @@ static const u8 sChillingNeighDescription[] = _("KOs boost Attack stat.");
|
||||
static const u8 sGrimNeighDescription[] = _("KOs boost Sp. Atk stat.");
|
||||
static const u8 sAsOneIceRiderDescription[] = _("Unnerve and Chilling Neigh.");
|
||||
static const u8 sAsOneShadowRiderDescription[] = _("Unnerve and Grim Neigh.");
|
||||
static const u8 sLingeringAromaDescription[] = _("Spreads with contact.");
|
||||
static const u8 sSeedSowerDescription[] = _("Affects terrain when hit.");
|
||||
static const u8 sThermalExchangeDescription[] = _("Fire hits up Attack.");
|
||||
static const u8 sAngerShellDescription[] = _("Gets angry at half HP.");
|
||||
static const u8 sPurifyingSaltDescription[] = _("Protected by pure salts.");
|
||||
static const u8 sWellBakedBodyDescription[] = _("Strengthened by Fire.");
|
||||
static const u8 sWindRiderDescription[] = _("Ups Attack if hit by wind.");
|
||||
static const u8 sGuardDogDescription[] = _("Cannot be intimidated.");
|
||||
static const u8 sRockyPayloadDescription[] = _("Powers up Rock moves.");
|
||||
static const u8 sWindPowerDescription[] = _("Gets charged by wind.");
|
||||
static const u8 sZeroToHeroDescription[] = _("Changes form on switch out.");
|
||||
static const u8 sCommanderDescription[] = _("Commands from Dondozo.");
|
||||
static const u8 sElectromorphosisDescription[] = _("Gets Charged on contact.");
|
||||
static const u8 sProtosynthesisDescription[] = _("Sun boosts best stat.");
|
||||
static const u8 sQuarkDriveDescription[] = _("Elec. field ups best stat.");
|
||||
static const u8 sGoodAsGoldDescription[] = _("Avoids status problems.");
|
||||
static const u8 sVesselOfRuinDescription[] = _("Lowers foes' sp. damage.");
|
||||
static const u8 sSwordOfRuinDescription[] = _("Lowers foes' defense.");
|
||||
static const u8 sTabletsOfRuinDescription[] = _("Lowers foes' damage.");
|
||||
static const u8 sBeadsOfRuinDescription[] = _("Lowers foes' sp. defense.");
|
||||
static const u8 sOrichalcumPulseDescription[] = _("Summons sunlight in battle.");
|
||||
static const u8 sHadronEngineDescription[] = _("Field becomes Electric.");
|
||||
static const u8 sOpportunistDescription[] = _("Copies foe's stat change.");
|
||||
static const u8 sCudChewDescription[] = _("Eats a used berry again.");
|
||||
static const u8 sSharpnessDescription[] = _("Strengthens cutting moves.");
|
||||
static const u8 sSupremeOverlordDescription[] = _("Inherits fallen's strength.");
|
||||
static const u8 sCostarDescription[] = _("Copies ally's stat changes.");
|
||||
static const u8 sToxicDebrisDescription[] = _("Throws poison spikes if hit.");
|
||||
static const u8 sArmorTailDescription[] = _("Protects from priority.");
|
||||
static const u8 sEarthEaterDescription[] = _("Eats ground to heal HP.");
|
||||
static const u8 sMyceliumMightDescription[] = _("Status moves never fail.");
|
||||
|
||||
#if B_EXPANDED_ABILITY_NAMES == TRUE
|
||||
const u8 gAbilityNames[ABILITIES_COUNT][ABILITY_NAME_LENGTH + 1] =
|
||||
@ -526,6 +557,37 @@ const u8 gAbilityNames[ABILITIES_COUNT][ABILITY_NAME_LENGTH + 1] =
|
||||
[ABILITY_GRIM_NEIGH] = _("Grim Neigh"),
|
||||
[ABILITY_AS_ONE_ICE_RIDER] = _("As One"),
|
||||
[ABILITY_AS_ONE_SHADOW_RIDER] = _("As One"),
|
||||
[ABILITY_LINGERING_AROMA] = _("Lingering Aroma"),
|
||||
[ABILITY_SEED_SOWER] = _("Seed Sower"),
|
||||
[ABILITY_THERMAL_EXCHANGE] = _("Thermal Exchange"),
|
||||
[ABILITY_ANGER_SHELL] = _("Anger Shell"),
|
||||
[ABILITY_PURIFYING_SALT] = _("Purifying Salt"),
|
||||
[ABILITY_WELL_BAKED_BODY] = _("Well-Baked Body"),
|
||||
[ABILITY_WIND_RIDER] = _("Wind Rider"),
|
||||
[ABILITY_GUARD_DOG] = _("Guard Dog"),
|
||||
[ABILITY_ROCKY_PAYLOAD] = _("Rocky Payload"),
|
||||
[ABILITY_WIND_POWER] = _("Wind Power"),
|
||||
[ABILITY_ZERO_TO_HERO] = _("Zero to Hero"),
|
||||
[ABILITY_COMMANDER] = _("Commander"),
|
||||
[ABILITY_ELECTROMORPHOSIS] = _("Electromorphosis"),
|
||||
[ABILITY_PROTOSYNTHESIS] = _("Protosynthesis"),
|
||||
[ABILITY_QUARK_DRIVE] = _("Quark Drive"),
|
||||
[ABILITY_GOOD_AS_GOLD] = _("Good as Gold"),
|
||||
[ABILITY_VESSEL_OF_RUIN] = _("Vessel of Ruin"),
|
||||
[ABILITY_SWORD_OF_RUIN] = _("Sword of Ruin"),
|
||||
[ABILITY_TABLETS_OF_RUIN] = _("Tablets of Ruin"),
|
||||
[ABILITY_BEADS_OF_RUIN] = _("Beads of Ruin"),
|
||||
[ABILITY_ORICHALCUM_PULSE] = _("Orichalcum Pulse"),
|
||||
[ABILITY_HADRON_ENGINE] = _("Hadron Engine"),
|
||||
[ABILITY_OPPORTUNIST] = _("Opportunist"),
|
||||
[ABILITY_CUD_CHEW] = _("Cud Chew"),
|
||||
[ABILITY_SHARPNESS] = _("Sharpness"),
|
||||
[ABILITY_SUPREME_OVERLORD] = _("Supreme Overlord"),
|
||||
[ABILITY_COSTAR] = _("Costar"),
|
||||
[ABILITY_TOXIC_DEBRIS] = _("Toxic Debris"),
|
||||
[ABILITY_ARMOR_TAIL] = _("Armor Tail"),
|
||||
[ABILITY_EARTH_EATER] = _("Earth Eater"),
|
||||
[ABILITY_MYCELIUM_MIGHT] = _("Mycelium Might"),
|
||||
};
|
||||
#else // 12 characters
|
||||
const u8 gAbilityNames[ABILITIES_COUNT][ABILITY_NAME_LENGTH + 1] =
|
||||
@ -798,6 +860,37 @@ const u8 gAbilityNames[ABILITIES_COUNT][ABILITY_NAME_LENGTH + 1] =
|
||||
[ABILITY_GRIM_NEIGH] = _("Grim Neigh"),
|
||||
[ABILITY_AS_ONE_ICE_RIDER] = _("As One"),
|
||||
[ABILITY_AS_ONE_SHADOW_RIDER] = _("As One"),
|
||||
[ABILITY_LINGERING_AROMA] = _("LngerngAroma"),
|
||||
[ABILITY_SEED_SOWER] = _("Seed Sower"),
|
||||
[ABILITY_THERMAL_EXCHANGE] = _("ThrmlExchnge"),
|
||||
[ABILITY_ANGER_SHELL] = _("Anger Shell"),
|
||||
[ABILITY_PURIFYING_SALT] = _("PurfyingSalt"),
|
||||
[ABILITY_WELL_BAKED_BODY] = _("WellBakedBdy"),
|
||||
[ABILITY_WIND_RIDER] = _("Wind Rider"),
|
||||
[ABILITY_GUARD_DOG] = _("Guard Dog"),
|
||||
[ABILITY_ROCKY_PAYLOAD] = _("RockyPayload"),
|
||||
[ABILITY_WIND_POWER] = _("Wind Power"),
|
||||
[ABILITY_ZERO_TO_HERO] = _("Zero to Hero"),
|
||||
[ABILITY_COMMANDER] = _("Commander"),
|
||||
[ABILITY_ELECTROMORPHOSIS] = _("Elecmrphosis"),
|
||||
[ABILITY_PROTOSYNTHESIS] = _("Protosnthsis"),
|
||||
[ABILITY_QUARK_DRIVE] = _("Quark Drive"),
|
||||
[ABILITY_GOOD_AS_GOLD] = _("Good as Gold"),
|
||||
[ABILITY_VESSEL_OF_RUIN] = _("VesselOfRuin"),
|
||||
[ABILITY_SWORD_OF_RUIN] = _("SwordOfRuin"),
|
||||
[ABILITY_TABLETS_OF_RUIN] = _("TabltsOfRuin"),
|
||||
[ABILITY_BEADS_OF_RUIN] = _("BeadsOfRuin"),
|
||||
[ABILITY_ORICHALCUM_PULSE] = _("OrchlcumPlse"),
|
||||
[ABILITY_HADRON_ENGINE] = _("HadronEngine"),
|
||||
[ABILITY_OPPORTUNIST] = _("Opportunist"),
|
||||
[ABILITY_CUD_CHEW] = _("Cud Chew"),
|
||||
[ABILITY_SHARPNESS] = _("Sharpness"),
|
||||
[ABILITY_SUPREME_OVERLORD] = _("SuprmeOvrlrd"),
|
||||
[ABILITY_COSTAR] = _("Costar"),
|
||||
[ABILITY_TOXIC_DEBRIS] = _("Toxic Debris"),
|
||||
[ABILITY_ARMOR_TAIL] = _("Armor Tail"),
|
||||
[ABILITY_EARTH_EATER] = _("Earth Eater"),
|
||||
[ABILITY_MYCELIUM_MIGHT] = _("MceliumMight"),
|
||||
};
|
||||
#endif
|
||||
|
||||
@ -1071,4 +1164,35 @@ const u8 *const gAbilityDescriptionPointers[ABILITIES_COUNT] =
|
||||
[ABILITY_GRIM_NEIGH] = sGrimNeighDescription,
|
||||
[ABILITY_AS_ONE_ICE_RIDER] = sAsOneIceRiderDescription,
|
||||
[ABILITY_AS_ONE_SHADOW_RIDER] = sAsOneShadowRiderDescription,
|
||||
[ABILITY_LINGERING_AROMA] = sLingeringAromaDescription,
|
||||
[ABILITY_SEED_SOWER] = sSeedSowerDescription,
|
||||
[ABILITY_THERMAL_EXCHANGE] = sThermalExchangeDescription,
|
||||
[ABILITY_ANGER_SHELL] = sAngerShellDescription,
|
||||
[ABILITY_PURIFYING_SALT] = sPurifyingSaltDescription,
|
||||
[ABILITY_WELL_BAKED_BODY] = sWellBakedBodyDescription,
|
||||
[ABILITY_WIND_RIDER] = sWindRiderDescription,
|
||||
[ABILITY_GUARD_DOG] = sGuardDogDescription,
|
||||
[ABILITY_ROCKY_PAYLOAD] = sRockyPayloadDescription,
|
||||
[ABILITY_WIND_POWER] = sWindPowerDescription,
|
||||
[ABILITY_ZERO_TO_HERO] = sZeroToHeroDescription,
|
||||
[ABILITY_COMMANDER] = sCommanderDescription,
|
||||
[ABILITY_ELECTROMORPHOSIS] = sElectromorphosisDescription,
|
||||
[ABILITY_PROTOSYNTHESIS] = sProtosynthesisDescription,
|
||||
[ABILITY_QUARK_DRIVE] = sQuarkDriveDescription,
|
||||
[ABILITY_GOOD_AS_GOLD] = sGoodAsGoldDescription,
|
||||
[ABILITY_VESSEL_OF_RUIN] = sVesselOfRuinDescription,
|
||||
[ABILITY_SWORD_OF_RUIN] = sSwordOfRuinDescription,
|
||||
[ABILITY_TABLETS_OF_RUIN] = sTabletsOfRuinDescription,
|
||||
[ABILITY_BEADS_OF_RUIN] = sBeadsOfRuinDescription,
|
||||
[ABILITY_ORICHALCUM_PULSE] = sOrichalcumPulseDescription,
|
||||
[ABILITY_HADRON_ENGINE] = sHadronEngineDescription,
|
||||
[ABILITY_OPPORTUNIST] = sOpportunistDescription,
|
||||
[ABILITY_CUD_CHEW] = sCudChewDescription,
|
||||
[ABILITY_SHARPNESS] = sSharpnessDescription,
|
||||
[ABILITY_SUPREME_OVERLORD] = sSupremeOverlordDescription,
|
||||
[ABILITY_COSTAR] = sCostarDescription,
|
||||
[ABILITY_TOXIC_DEBRIS] = sToxicDebrisDescription,
|
||||
[ABILITY_ARMOR_TAIL] = sArmorTailDescription,
|
||||
[ABILITY_EARTH_EATER] = sEarthEaterDescription,
|
||||
[ABILITY_MYCELIUM_MIGHT] = sMyceliumMightDescription,
|
||||
};
|
||||
|
@ -2962,8 +2962,8 @@ static const u8 sPsyshieldBashDescription[] = _(
|
||||
"energy. May raise Defense.");
|
||||
|
||||
static const u8 sPowerShiftDescription[] = _(
|
||||
"The user swaps its offensive\n"
|
||||
"and defensive stats.");
|
||||
"The user swaps its Attack\n"
|
||||
"and Defense stats.");
|
||||
|
||||
static const u8 sStoneAxeDescription[] = _(
|
||||
"High critical hit ratio. Sets\n"
|
||||
@ -2974,52 +2974,52 @@ static const u8 sSpringtideStormDescription[] = _(
|
||||
"Varies with the user's form.");
|
||||
|
||||
static const u8 sMysticalPowerDescription[] = _(
|
||||
"Increases the user's better\n"
|
||||
"of Atk. and Def. stats.");
|
||||
"A mysterious power strikes,\n"
|
||||
"raising the user's Sp. Atk.");
|
||||
|
||||
static const u8 sRagingFuryDescription[] = _(
|
||||
"Viciously spews flames at\n"
|
||||
"a foe, becoming fixated.");
|
||||
"A rampage of 2 to 3 turns\n"
|
||||
"that confuses the user.");
|
||||
|
||||
static const u8 sWaveCrashDescription[] = _(
|
||||
"A water slam. Hurts the user\n"
|
||||
"and raises its Action Speed.");
|
||||
"A slam shrouded in water.\n"
|
||||
"It also hurts the user.");
|
||||
|
||||
static const u8 sChloroblastDescription[] = _(
|
||||
"An blast that hurts the user\n"
|
||||
"and lowers its Action Speed.");
|
||||
"A user-hurting blast of\n"
|
||||
"amassed chlorophyll.");
|
||||
|
||||
static const u8 sMountainGaleDescription[] = _(
|
||||
"The user hurls giant chunks\n"
|
||||
"of ice to damage the foe.");
|
||||
"Giant chunks of ice damage\n"
|
||||
"the foe. It may flinch.");
|
||||
|
||||
static const u8 sVictoryDanceDescription[] = _(
|
||||
"Dances to raise damage 50%,\n"
|
||||
"plus offenses and defenses.");
|
||||
"Dances to raise Attack,\n"
|
||||
"Defense and Speed.");
|
||||
|
||||
static const u8 sHeadlongRushDescription[] = _(
|
||||
"Hits with a full-body tackle,\n"
|
||||
"lowering the foe's Defense.");
|
||||
"Hits with a full-body tackle.\n"
|
||||
"Lowers the users's defenses.");
|
||||
|
||||
static const u8 sBarbBarrageDescription[] = _(
|
||||
"Can poison on impact. Powers\n"
|
||||
"up if the foe has an ailment.");
|
||||
"up against poisoned foes.");
|
||||
|
||||
static const u8 sEsperWingDescription[] = _(
|
||||
"High critical hit ratio.\n"
|
||||
"Ups the user's Action Speed.");
|
||||
"Ups the user's Speed.");
|
||||
|
||||
static const u8 sBitterMaliceDescription[] = _(
|
||||
"Hurts a foe harder if it has\n"
|
||||
"an ailment. Can give FrstBte.");
|
||||
"A spine-chilling resentment.\n"
|
||||
"May lower the foe's Attack.");
|
||||
|
||||
static const u8 sShelterDescription[] = _(
|
||||
"The user hardens their skin\n"
|
||||
"and obscures itself.");
|
||||
"The user hardens their skin,\n"
|
||||
"sharply raising its Defense.");
|
||||
|
||||
static const u8 sTripleArrowsDescription[] = _(
|
||||
"Ups critical-hit ratio for 3\n"
|
||||
"turns. Lowers foe Defenses.");
|
||||
"High critical hit ratio.\n"
|
||||
"May lower Defense or flinch.");
|
||||
|
||||
static const u8 sInfernalParadeDescription[] = _(
|
||||
"Hurts a foe harder if it has\n"
|
||||
@ -3031,7 +3031,7 @@ static const u8 sCeaselessEdgeDescription[] = _(
|
||||
|
||||
static const u8 sBleakwindStormDescription[] = _(
|
||||
"Hits with brutal, cold winds.\n"
|
||||
"May inflict frostbite.");
|
||||
"May lower the foe's Speed.");
|
||||
|
||||
static const u8 sWildboltStormDescription[] = _(
|
||||
"Hits with a brutal tempest.\n"
|
||||
@ -3042,13 +3042,200 @@ static const u8 sSandsearStormDescription[] = _(
|
||||
"May inflict a burn.");
|
||||
|
||||
static const u8 sLunarBlessingDescription[] = _(
|
||||
"The user heals themself and\n"
|
||||
"conceals their presence.");
|
||||
"The user heals and cures\n"
|
||||
"itself and its ally.");
|
||||
|
||||
static const u8 sTakeHeartDescription[] = _(
|
||||
"The user lifts its spirits to\n"
|
||||
"heal and strengthen itself.");
|
||||
|
||||
static const u8 sTeraBlastDescription[] = _(
|
||||
"If the user's Terastallized,\n"
|
||||
"it hits with its Tera-type.");
|
||||
|
||||
static const u8 sSilkTrapDescription[] =_(
|
||||
"Protects itself, lowering\n"
|
||||
"Speed on contact.");
|
||||
|
||||
static const u8 sAxeKickDescription[] = _(
|
||||
"May miss and hurt the kicker.\n"
|
||||
"May cause confusion.");
|
||||
|
||||
static const u8 sLastRespectsDescription[] = _(
|
||||
"This move deals more damage\n"
|
||||
"for each defeated ally.");
|
||||
|
||||
static const u8 sLuminaCrashDescription[] = _(
|
||||
"A mind-affecting light\n"
|
||||
"harshly lowers Sp. Def.");
|
||||
|
||||
static const u8 sOrderUpDescription[] = _(
|
||||
"Boosts a user's stats\n"
|
||||
"depending on Tatsugiri.");
|
||||
|
||||
static const u8 sJetPunchDescription[] = _(
|
||||
"A punch is thrown at blinding\n"
|
||||
"speed to strike first.");
|
||||
|
||||
static const u8 sSpicyExtractDescription[] = _(
|
||||
"Sharply ups target's Attack,\n"
|
||||
"harshly lowers its Defense.");
|
||||
|
||||
static const u8 sSpinOutDescription[] = _(
|
||||
"Furiously strains its legs.\n"
|
||||
"Harshly lowers user's Speed.");
|
||||
|
||||
static const u8 sPopulationBombDescription[] = _(
|
||||
"The user's fellows hit one\n"
|
||||
"to ten times in a row.");
|
||||
|
||||
static const u8 sIceSpinnerDescription[] = _(
|
||||
"Ice-covered feet hit a foe\n"
|
||||
"and destroy the terrain.");
|
||||
|
||||
static const u8 sGlaiveRushDescription[] = _(
|
||||
"Foe attacks next turn can't\n"
|
||||
"miss and do double damage.");
|
||||
|
||||
static const u8 sRevivalBlessingDescription[] = _(
|
||||
"Revives a fainted party {PKMN}\n"
|
||||
"and restores half of its HP.");
|
||||
|
||||
static const u8 sSaltCureDescription[] = _(
|
||||
"Hurts foe every turn. Double\n"
|
||||
"damage to Steel and Water.");
|
||||
|
||||
static const u8 sTripleDiveDescription[] = _(
|
||||
"Hits target with splashes\n"
|
||||
"of water 3 times in a row.");
|
||||
|
||||
static const u8 sMortalSpinDescription[] = _(
|
||||
"Erases trap moves and Leech\n"
|
||||
"Seed. Poisons adjecent foes.");
|
||||
|
||||
static const u8 sDoodleDescription[] = _(
|
||||
"Changes user's and ally's\n"
|
||||
"Ability into the target's.");
|
||||
|
||||
static const u8 sFilletAwayDescription[] = _(
|
||||
"Sharply boosts offenses and\n"
|
||||
"Speed by using its own HP.");
|
||||
|
||||
static const u8 sKowtowCleaveDescription[] = _(
|
||||
"User slashes the foe after\n"
|
||||
"kowtowing. It never misses.");
|
||||
|
||||
static const u8 sFlowerTrickDescription[] = _(
|
||||
"Rigged bouquet. Always gets\n"
|
||||
"a critical hit, never missing.");
|
||||
|
||||
static const u8 sTorchSongDescription[] = _(
|
||||
"Flames scorch the target.\n"
|
||||
"Boosts the user's Sp. Atk.");
|
||||
|
||||
static const u8 sAquaStepDescription[] = _(
|
||||
"Hits with light, fluid dance\n"
|
||||
"steps. Ups the user's Speed.");
|
||||
|
||||
static const u8 sRagingBullDescription[] = _(
|
||||
"Tackle that breaks barriers.\n"
|
||||
"User's form determines type.");
|
||||
|
||||
static const u8 sMakeItRainDescription[] = _(
|
||||
"Lowers the user's Sp. Atk.\n"
|
||||
"Money is recovered after.");
|
||||
|
||||
static const u8 sRuinationDescription[] = _(
|
||||
"Summons a ruinous disaster\n"
|
||||
"and cuts half the foe's HP.");
|
||||
|
||||
static const u8 sCollisionCourseDescription[] = _(
|
||||
"Prehistoric explosion that's\n"
|
||||
"stronger if supereffective.");
|
||||
|
||||
static const u8 sElectroDriftDescription[] = _(
|
||||
"Futuristic electricity. It's\n"
|
||||
"stronger if supereffective.");
|
||||
|
||||
static const u8 sShedTailDescription[] = _(
|
||||
"Creates a Substitute for\n"
|
||||
"itself before switching out.");
|
||||
|
||||
static const u8 sChillyReceptionDescription[] =_(
|
||||
"Bad joke summons snowstorm.\n"
|
||||
"The user also switches out.");
|
||||
|
||||
static const u8 sTidyUpDescription[] = _(
|
||||
"User tidies up hazards and\n"
|
||||
"raises its Attack and Speed.");
|
||||
|
||||
static const u8 sSnowscapeDescription[] = _(
|
||||
"Summons a snowstorm that\n"
|
||||
"lasts for five turns.");
|
||||
|
||||
static const u8 sPounceDescription[] = _(
|
||||
"The user pounces on the foe,\n"
|
||||
"lowering its Speed.");
|
||||
|
||||
static const u8 sTrailblazeDescription[] = _(
|
||||
"The user attacks suddenly,\n"
|
||||
"raising its Speed.");
|
||||
|
||||
static const u8 sChillingWaterDescription[] = _(
|
||||
"A shower with ice-cold water\n"
|
||||
"lowers the target's Attack.");
|
||||
|
||||
static const u8 sHyperDrillDescription[] = _(
|
||||
"A spinning pointed part\n"
|
||||
"bypasses a foe's Protect.");
|
||||
|
||||
static const u8 sTwinBeamDescription[] = _(
|
||||
"Mystical eye-beams that hit\n"
|
||||
"the target twice in a row.");
|
||||
|
||||
static const u8 sRageFistDescription[] = _(
|
||||
"The more the user has been\n"
|
||||
"hit, the stronger the move.");
|
||||
|
||||
static const u8 sArmorCannonDescription[] = _(
|
||||
"A strong attack but lowers\n"
|
||||
"the defensive stats.");
|
||||
|
||||
static const u8 sBitterBladeDescription[] = _(
|
||||
"An attack that absorbs\n"
|
||||
"half the damage inflicted.");
|
||||
|
||||
static const u8 sDoubleShockDescription[] = _(
|
||||
"Discharges all electricity,\n"
|
||||
"losing the Electric type.");
|
||||
|
||||
static const u8 sGigatonHammerDescription[] = _(
|
||||
"Swings a huge hammer. Can't\n"
|
||||
"be used twice in a row.");
|
||||
|
||||
static const u8 sComeuppanceDescription[] = _(
|
||||
"Retaliates strongly against\n"
|
||||
"who last hurt the user.");
|
||||
|
||||
static const u8 sAquaCutterDescription[] = _(
|
||||
"Pressurized water cut with a\n"
|
||||
"high critical-hit ratio.");
|
||||
|
||||
static const u8 sBlazingTorqueDescription[] = _(
|
||||
"---");
|
||||
|
||||
static const u8 sWickedTorqueDescription[] = _(
|
||||
"---");
|
||||
|
||||
static const u8 sNoxiousTorqueDescription[] = _(
|
||||
"---");
|
||||
|
||||
static const u8 sCombatTorqueDescription[] = _(
|
||||
"---");
|
||||
|
||||
static const u8 sMagicalTorqueDescription[] = _(
|
||||
"---");
|
||||
|
||||
const u8 gNotDoneYetDescription[] = _(
|
||||
"This move can't be used. Its\n"
|
||||
"effect is in development.");
|
||||
@ -3838,4 +4025,52 @@ const u8 *const gMoveDescriptionPointers[MOVES_COUNT - 1] =
|
||||
[MOVE_SANDSEAR_STORM - 1] = sSandsearStormDescription,
|
||||
[MOVE_LUNAR_BLESSING - 1] = sLunarBlessingDescription,
|
||||
[MOVE_TAKE_HEART - 1] = sTakeHeartDescription,
|
||||
[MOVE_TERA_BLAST - 1] = sTeraBlastDescription,
|
||||
[MOVE_SILK_TRAP - 1] = sSilkTrapDescription,
|
||||
[MOVE_AXE_KICK - 1] = sAxeKickDescription,
|
||||
[MOVE_LAST_RESPECTS - 1] = sLastRespectsDescription,
|
||||
[MOVE_LUMINA_CRASH - 1] = sLuminaCrashDescription,
|
||||
[MOVE_ORDER_UP - 1] = sOrderUpDescription,
|
||||
[MOVE_JET_PUNCH - 1] = sJetPunchDescription,
|
||||
[MOVE_SPICY_EXTRACT - 1] = sSpicyExtractDescription,
|
||||
[MOVE_SPIN_OUT - 1] = sSpinOutDescription,
|
||||
[MOVE_POPULATION_BOMB - 1] = sPopulationBombDescription,
|
||||
[MOVE_ICE_SPINNER - 1] = sIceSpinnerDescription,
|
||||
[MOVE_GLAIVE_RUSH - 1] = sGlaiveRushDescription,
|
||||
[MOVE_REVIVAL_BLESSING - 1] = sRevivalBlessingDescription,
|
||||
[MOVE_SALT_CURE - 1] = sSaltCureDescription,
|
||||
[MOVE_TRIPLE_DIVE - 1] = sTripleDiveDescription,
|
||||
[MOVE_MORTAL_SPIN - 1] = sMortalSpinDescription,
|
||||
[MOVE_DOODLE - 1] = sDoodleDescription,
|
||||
[MOVE_FILLET_AWAY - 1] = sFilletAwayDescription,
|
||||
[MOVE_KOWTOW_CLEAVE - 1] = sKowtowCleaveDescription,
|
||||
[MOVE_FLOWER_TRICK - 1] = sFlowerTrickDescription,
|
||||
[MOVE_TORCH_SONG - 1] = sTorchSongDescription,
|
||||
[MOVE_AQUA_STEP - 1] = sAquaStepDescription,
|
||||
[MOVE_RAGING_BULL - 1] = sRagingBullDescription,
|
||||
[MOVE_MAKE_IT_RAIN - 1] = sMakeItRainDescription,
|
||||
[MOVE_RUINATION - 1] = sRuinationDescription,
|
||||
[MOVE_COLLISION_COURSE - 1] = sCollisionCourseDescription,
|
||||
[MOVE_ELECTRO_DRIFT - 1] = sElectroDriftDescription,
|
||||
[MOVE_SHED_TAIL - 1] = sShedTailDescription,
|
||||
[MOVE_CHILLY_RECEPTION - 1] = sChillyReceptionDescription,
|
||||
[MOVE_TIDY_UP - 1] = sTidyUpDescription,
|
||||
[MOVE_SNOWSCAPE - 1] = sSnowscapeDescription,
|
||||
[MOVE_POUNCE - 1] = sPounceDescription,
|
||||
[MOVE_TRAILBLAZE - 1] = sTrailblazeDescription,
|
||||
[MOVE_CHILLING_WATER - 1] = sChillingWaterDescription,
|
||||
[MOVE_HYPER_DRILL - 1] = sHyperDrillDescription,
|
||||
[MOVE_TWIN_BEAM - 1] = sTwinBeamDescription,
|
||||
[MOVE_RAGE_FIST - 1] = sRageFistDescription,
|
||||
[MOVE_ARMOR_CANNON - 1] = sArmorCannonDescription,
|
||||
[MOVE_BITTER_BLADE - 1] = sBitterBladeDescription,
|
||||
[MOVE_DOUBLE_SHOCK - 1] = sDoubleShockDescription,
|
||||
[MOVE_GIGATON_HAMMER - 1] = sGigatonHammerDescription,
|
||||
[MOVE_COMEUPPANCE - 1] = sComeuppanceDescription,
|
||||
[MOVE_AQUA_CUTTER - 1] = sAquaCutterDescription,
|
||||
[MOVE_BLAZING_TORQUE - 1] = sBlazingTorqueDescription,
|
||||
[MOVE_WICKED_TORQUE - 1] = sWickedTorqueDescription,
|
||||
[MOVE_NOXIOUS_TORQUE - 1] = sNoxiousTorqueDescription,
|
||||
[MOVE_COMBAT_TORQUE - 1] = sCombatTorqueDescription,
|
||||
[MOVE_MAGICAL_TORQUE - 1] = sMagicalTorqueDescription,
|
||||
};
|
||||
|
@ -781,6 +781,54 @@ const u8 gMoveNames[MOVES_COUNT][MOVE_NAME_LENGTH + 1] =
|
||||
[MOVE_SANDSEAR_STORM] = _("Sandsear Storm"),
|
||||
[MOVE_LUNAR_BLESSING] = _("Lunar Blessing"),
|
||||
[MOVE_TAKE_HEART] = _("Take Heart"),
|
||||
[MOVE_TERA_BLAST] = _("Tera Blast"),
|
||||
[MOVE_SILK_TRAP] = _("Silk Trap"),
|
||||
[MOVE_AXE_KICK] = _("Axe Kick"),
|
||||
[MOVE_LAST_RESPECTS] = _("Last Respects"),
|
||||
[MOVE_LUMINA_CRASH] = _("Lumina Crash"),
|
||||
[MOVE_ORDER_UP] = _("Order Up"),
|
||||
[MOVE_JET_PUNCH] = _("Jet Punch"),
|
||||
[MOVE_SPICY_EXTRACT] = _("Spicy Extract"),
|
||||
[MOVE_SPIN_OUT] = _("Spin Out"),
|
||||
[MOVE_POPULATION_BOMB] = _("Population Bomb"),
|
||||
[MOVE_ICE_SPINNER] = _("Ice Spinner"),
|
||||
[MOVE_GLAIVE_RUSH] = _("Glaive Rush"),
|
||||
[MOVE_REVIVAL_BLESSING] = _("Revival Blessing"),
|
||||
[MOVE_SALT_CURE] = _("Salt Cure"),
|
||||
[MOVE_TRIPLE_DIVE] = _("Triple Dive"),
|
||||
[MOVE_MORTAL_SPIN] = _("Mortal Spin"),
|
||||
[MOVE_DOODLE] = _("Doodle"),
|
||||
[MOVE_FILLET_AWAY] = _("Fillet Away"),
|
||||
[MOVE_KOWTOW_CLEAVE] = _("Kowtow Cleave"),
|
||||
[MOVE_FLOWER_TRICK] = _("Flower Trick"),
|
||||
[MOVE_TORCH_SONG] = _("Torch Song"),
|
||||
[MOVE_AQUA_STEP] = _("Aqua Step"),
|
||||
[MOVE_RAGING_BULL] = _("Raging Bull"),
|
||||
[MOVE_MAKE_IT_RAIN] = _("Make It Rain"),
|
||||
[MOVE_RUINATION] = _("Ruination"),
|
||||
[MOVE_COLLISION_COURSE] = _("Collision Course"),
|
||||
[MOVE_ELECTRO_DRIFT] = _("Electro Drift"),
|
||||
[MOVE_SHED_TAIL] = _("Shed Tail"),
|
||||
[MOVE_CHILLY_RECEPTION] = _("Chilly Reception"),
|
||||
[MOVE_TIDY_UP] = _("Tidy Up"),
|
||||
[MOVE_SNOWSCAPE] = _("Snowscape"),
|
||||
[MOVE_POUNCE] = _("Pounce"),
|
||||
[MOVE_TRAILBLAZE] = _("Trailblaze"),
|
||||
[MOVE_CHILLING_WATER] = _("Chilling Water"),
|
||||
[MOVE_HYPER_DRILL] = _("Hyper Drill"),
|
||||
[MOVE_TWIN_BEAM] = _("Twin Beam"),
|
||||
[MOVE_RAGE_FIST] = _("Rage Fist"),
|
||||
[MOVE_ARMOR_CANNON] = _("Armor Cannon"),
|
||||
[MOVE_BITTER_BLADE] = _("Bitter Blade"),
|
||||
[MOVE_DOUBLE_SHOCK] = _("Double Shock"),
|
||||
[MOVE_GIGATON_HAMMER] = _("Gigaton Hammer"),
|
||||
[MOVE_COMEUPPANCE] = _("Comeuppance"),
|
||||
[MOVE_AQUA_CUTTER] = _("Aqua Cutter"),
|
||||
[MOVE_BLAZING_TORQUE] = _("Blazing Torque"),
|
||||
[MOVE_WICKED_TORQUE] = _("Wicked Torque"),
|
||||
[MOVE_NOXIOUS_TORQUE] = _("Noxious Torque"),
|
||||
[MOVE_COMBAT_TORQUE] = _("Combat Torque"),
|
||||
[MOVE_MAGICAL_TORQUE] = _("Magical Torque"),
|
||||
};
|
||||
#else
|
||||
// 12 letters
|
||||
@ -1565,6 +1613,54 @@ const u8 gMoveNames[MOVES_COUNT][MOVE_NAME_LENGTH + 1] =
|
||||
[MOVE_SANDSEAR_STORM] = _("SndsearStorm"),
|
||||
[MOVE_LUNAR_BLESSING] = _("LunarBlessng"),
|
||||
[MOVE_TAKE_HEART] = _("Take Heart"),
|
||||
[MOVE_TERA_BLAST] = _("Tera Blast"),
|
||||
[MOVE_SILK_TRAP] = _("Silk Trap"),
|
||||
[MOVE_AXE_KICK] = _("Axe Kick"),
|
||||
[MOVE_LAST_RESPECTS] = _("LastRespects"),
|
||||
[MOVE_LUMINA_CRASH] = _("Lumina Crash"),
|
||||
[MOVE_ORDER_UP] = _("Order Up"),
|
||||
[MOVE_JET_PUNCH] = _("Jet Punch"),
|
||||
[MOVE_SPICY_EXTRACT] = _("SpicyExtract"),
|
||||
[MOVE_SPIN_OUT] = _("Spin Out"),
|
||||
[MOVE_POPULATION_BOMB] = _("PoplatinBomb"),
|
||||
[MOVE_ICE_SPINNER] = _("Ice Spinner"),
|
||||
[MOVE_GLAIVE_RUSH] = _("Glaive Rush"),
|
||||
[MOVE_REVIVAL_BLESSING] = _("RevivlBlesng"),
|
||||
[MOVE_SALT_CURE] = _("Salt Cure"),
|
||||
[MOVE_TRIPLE_DIVE] = _("Triple Dive"),
|
||||
[MOVE_MORTAL_SPIN] = _("Mortal Spin"),
|
||||
[MOVE_DOODLE] = _("Doodle"),
|
||||
[MOVE_FILLET_AWAY] = _("Fillet Away"),
|
||||
[MOVE_KOWTOW_CLEAVE] = _("KowtowCleave"),
|
||||
[MOVE_FLOWER_TRICK] = _("Flower Trick"),
|
||||
[MOVE_TORCH_SONG] = _("Torch Song"),
|
||||
[MOVE_AQUA_STEP] = _("Aqua Step"),
|
||||
[MOVE_RAGING_BULL] = _("Raging Bull"),
|
||||
[MOVE_MAKE_IT_RAIN] = _("Make It Rain"),
|
||||
[MOVE_RUINATION] = _("Ruination"),
|
||||
[MOVE_COLLISION_COURSE] = _("ColisinCours"),
|
||||
[MOVE_ELECTRO_DRIFT] = _("ElectroDrift"),
|
||||
[MOVE_SHED_TAIL] = _("Shed Tail"),
|
||||
[MOVE_CHILLY_RECEPTION] = _("ChilReceptin"),
|
||||
[MOVE_TIDY_UP] = _("Tidy Up"),
|
||||
[MOVE_SNOWSCAPE] = _("Snowscape"),
|
||||
[MOVE_POUNCE] = _("Pounce"),
|
||||
[MOVE_TRAILBLAZE] = _("Trailblaze"),
|
||||
[MOVE_CHILLING_WATER] = _("ChillingWatr"),
|
||||
[MOVE_HYPER_DRILL] = _("Hyper Drill"),
|
||||
[MOVE_TWIN_BEAM] = _("Twin Beam"),
|
||||
[MOVE_RAGE_FIST] = _("Rage Fist"),
|
||||
[MOVE_ARMOR_CANNON] = _("Armor Cannon"),
|
||||
[MOVE_BITTER_BLADE] = _("Bitter Blade"),
|
||||
[MOVE_DOUBLE_SHOCK] = _("Double Shock"),
|
||||
[MOVE_GIGATON_HAMMER] = _("GigatonHammr"),
|
||||
[MOVE_COMEUPPANCE] = _("Comeuppance"),
|
||||
[MOVE_AQUA_CUTTER] = _("Aqua Cutter"),
|
||||
[MOVE_BLAZING_TORQUE] = _("BlazngTorque"),
|
||||
[MOVE_WICKED_TORQUE] = _("WickedTorque"),
|
||||
[MOVE_NOXIOUS_TORQUE] = _("NoxiusTorque"),
|
||||
[MOVE_COMBAT_TORQUE] = _("CombatTorque"),
|
||||
[MOVE_MAGICAL_TORQUE] = _("MagiclTorque"),
|
||||
};
|
||||
#endif
|
||||
|
||||
|
@ -2178,6 +2178,8 @@ static void DebugAction_Give_Pokemon_SelectLevel(u8 taskId)
|
||||
{
|
||||
PlaySE(MUS_LEVEL_UP);
|
||||
ScriptGiveMon(sDebugMonData->mon_speciesId, gTasks[taskId].data[3], ITEM_NONE, 0,0,0);
|
||||
//Set flag for user convenience
|
||||
FlagSet(FLAG_SYS_POKEMON_GET);
|
||||
Free(sDebugMonData); //Frees EWRAM of MonData Struct
|
||||
DebugAction_DestroyExtraWindow(taskId);
|
||||
}
|
||||
@ -2732,6 +2734,9 @@ static void DebugAction_Give_Pokemon_ComplexCreateMon(u8 taskId) //https://githu
|
||||
break;
|
||||
}
|
||||
|
||||
//Set flag for user convenience
|
||||
FlagSet(FLAG_SYS_POKEMON_GET);
|
||||
|
||||
Free(sDebugMonData); //Frees EWRAM of MonData Struct
|
||||
DebugAction_DestroyExtraWindow(taskId); //return sentToPc;
|
||||
}
|
||||
|
@ -1977,7 +1977,7 @@ static void SetDecorSelectionMetatiles(struct PlaceDecorationGraphicsDataBuffer
|
||||
shape = data->decoration->shape;
|
||||
for (i = 0; i < sDecorTilemaps[shape].size; i++)
|
||||
{
|
||||
data->tiles[sDecorTilemaps[shape].tiles[i]] = GetMetatile(data->decoration->tiles[sDecorTilemaps[shape].y[i]] * 8 + sDecorTilemaps[shape].x[i]);
|
||||
data->tiles[sDecorTilemaps[shape].tiles[i]] = GetMetatile(data->decoration->tiles[sDecorTilemaps[shape].y[i]] * NUM_TILES_PER_METATILE + sDecorTilemaps[shape].x[i]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2037,7 +2037,7 @@ static u8 gpu_pal_decompress_alloc_tag_and_upload(struct PlaceDecorationGraphics
|
||||
SetDecorSelectionMetatiles(data);
|
||||
SetDecorSelectionBoxOamAttributes(data->decoration->shape);
|
||||
SetDecorSelectionBoxTiles(data);
|
||||
CopyPalette(data->palette, ((u16 *)gTilesetPointer_SecretBaseRedCave->metatiles)[(data->decoration->tiles[0] * 8) + 7] >> 12);
|
||||
CopyPalette(data->palette, ((u16 *)gTilesetPointer_SecretBaseRedCave->metatiles)[(data->decoration->tiles[0] * NUM_TILES_PER_METATILE) + 7] >> 12);
|
||||
LoadSpritePalette(&sSpritePal_PlaceDecoration);
|
||||
return CreateSprite(&sDecorationSelectorSpriteTemplate, 0, 0, 0);
|
||||
}
|
||||
@ -2093,7 +2093,7 @@ static u8 AddDecorationIconObjectFromObjectEvent(u16 tilesTag, u16 paletteTag, u
|
||||
SetDecorSelectionMetatiles(&sPlaceDecorationGraphicsDataBuffer);
|
||||
SetDecorSelectionBoxOamAttributes(sPlaceDecorationGraphicsDataBuffer.decoration->shape);
|
||||
SetDecorSelectionBoxTiles(&sPlaceDecorationGraphicsDataBuffer);
|
||||
CopyPalette(sPlaceDecorationGraphicsDataBuffer.palette, ((u16 *)gTilesetPointer_SecretBaseRedCave->metatiles)[(sPlaceDecorationGraphicsDataBuffer.decoration->tiles[0] * 8) + 7] >> 12);
|
||||
CopyPalette(sPlaceDecorationGraphicsDataBuffer.palette, ((u16 *)gTilesetPointer_SecretBaseRedCave->metatiles)[(sPlaceDecorationGraphicsDataBuffer.decoration->tiles[0] * NUM_TILES_PER_METATILE) + 7] >> 12);
|
||||
sheet.data = sPlaceDecorationGraphicsDataBuffer.image;
|
||||
sheet.size = sDecorShapeSizes[sPlaceDecorationGraphicsDataBuffer.decoration->shape] * TILE_SIZE_4BPP;
|
||||
sheet.tag = tilesTag;
|
||||
|
@ -237,7 +237,7 @@ static void DrawMetatileAt(const struct MapLayout *mapLayout, u16 offset, int x,
|
||||
metatiles = mapLayout->secondaryTileset->metatiles;
|
||||
metatileId -= NUM_METATILES_IN_PRIMARY;
|
||||
}
|
||||
DrawMetatile(MapGridGetMetatileLayerTypeAt(x, y), metatiles + metatileId * 8, offset);
|
||||
DrawMetatile(MapGridGetMetatileLayerTypeAt(x, y), metatiles + metatileId * NUM_TILES_PER_METATILE, offset);
|
||||
}
|
||||
|
||||
static void DrawMetatile(s32 metatileLayerType, const u16 *tiles, u16 offset)
|
||||
|
@ -286,6 +286,8 @@ const u32 gBattleAnimSpritePal_Tornado[] = INCBIN_U32("graphics/battle_anims/spr
|
||||
const u32 gBattleAnimSpriteGfx_ZMoveSymbol[] = INCBIN_U32("graphics/battle_anims/sprites/z_move_symbol.4bpp.lz");
|
||||
const u32 gBattleAnimSpritePal_ZMoveSymbol[] = INCBIN_U32("graphics/battle_anims/sprites/z_move_symbol.gbapal.lz");
|
||||
|
||||
const u32 gBattleAnimSpriteGfx_Teapot[] = INCBIN_U32("graphics/battle_anims/sprites/new/teapot.4bpp.lz");
|
||||
const u32 gBattleAnimSpritePal_Teapot[] = INCBIN_U32("graphics/battle_anims/sprites/new/teapot.gbapal.lz");
|
||||
|
||||
// Battle anims
|
||||
const u32 gBattleAnimSpriteGfx_Bubble[] = INCBIN_U32("graphics/battle_anims/sprites/bubble.4bpp.lz");
|
||||
|
@ -3481,11 +3481,7 @@ void CreateBoxMon(struct BoxPokemon *boxMon, u16 species, u8 level, u8 fixedIV,
|
||||
else
|
||||
#endif
|
||||
{
|
||||
#if P_SHINY_BASE_CHANCE >= GEN_6
|
||||
u32 totalRerolls = 1;
|
||||
#else
|
||||
u32 totalRerolls = 0;
|
||||
#endif
|
||||
if (CheckBagHasItem(ITEM_SHINY_CHARM, 1))
|
||||
totalRerolls += I_SHINY_CHARM_REROLLS;
|
||||
if (LURE_STEP_COUNT != 0)
|
||||
@ -8621,6 +8617,8 @@ void TrySpecialOverworldEvo(void)
|
||||
|
||||
bool32 ShouldShowFemaleDifferences(u16 species, u32 personality)
|
||||
{
|
||||
if (species >= NUM_SPECIES)
|
||||
return FALSE;
|
||||
return (gSpeciesInfo[species].flags & SPECIES_FLAG_GENDER_DIFFERENCE) && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE;
|
||||
}
|
||||
|
||||
|
@ -808,9 +808,9 @@ static void BuyMenuDrawMapBg(void)
|
||||
metatileLayerType = METATILE_LAYER_TYPE_COVERED;
|
||||
|
||||
if (metatile < NUM_METATILES_IN_PRIMARY)
|
||||
BuyMenuDrawMapMetatile(i, j, mapLayout->primaryTileset->metatiles + metatile * 8, metatileLayerType);
|
||||
BuyMenuDrawMapMetatile(i, j, mapLayout->primaryTileset->metatiles + metatile * NUM_TILES_PER_METATILE, metatileLayerType);
|
||||
else
|
||||
BuyMenuDrawMapMetatile(i, j, mapLayout->secondaryTileset->metatiles + ((metatile - NUM_METATILES_IN_PRIMARY) * 8), metatileLayerType);
|
||||
BuyMenuDrawMapMetatile(i, j, mapLayout->secondaryTileset->metatiles + ((metatile - NUM_METATILES_IN_PRIMARY) * NUM_TILES_PER_METATILE), metatileLayerType);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -484,14 +484,14 @@ const u16 *const gTilesetAnims_BikeShop_BlinkingLights[] = {
|
||||
gTilesetAnims_BikeShop_BlinkingLights_Frame1
|
||||
};
|
||||
|
||||
const u16 gTilesetAnims_Sootopolis_StormyWater_Frame0[] = INCBIN_U16("data/tilesets/secondary/sootopolis/anim/stormy_water/0.4bpp");
|
||||
const u16 gTilesetAnims_Sootopolis_StormyWater_Frame1[] = INCBIN_U16("data/tilesets/secondary/sootopolis/anim/stormy_water/1.4bpp");
|
||||
const u16 gTilesetAnims_Sootopolis_StormyWater_Frame2[] = INCBIN_U16("data/tilesets/secondary/sootopolis/anim/stormy_water/2.4bpp");
|
||||
const u16 gTilesetAnims_Sootopolis_StormyWater_Frame3[] = INCBIN_U16("data/tilesets/secondary/sootopolis/anim/stormy_water/3.4bpp");
|
||||
const u16 gTilesetAnims_Sootopolis_StormyWater_Frame4[] = INCBIN_U16("data/tilesets/secondary/sootopolis/anim/stormy_water/4.4bpp");
|
||||
const u16 gTilesetAnims_Sootopolis_StormyWater_Frame5[] = INCBIN_U16("data/tilesets/secondary/sootopolis/anim/stormy_water/5.4bpp");
|
||||
const u16 gTilesetAnims_Sootopolis_StormyWater_Frame6[] = INCBIN_U16("data/tilesets/secondary/sootopolis/anim/stormy_water/6.4bpp");
|
||||
const u16 gTilesetAnims_Sootopolis_StormyWater_Frame7[] = INCBIN_U16("data/tilesets/secondary/sootopolis/anim/stormy_water/7.4bpp");
|
||||
const u16 gTilesetAnims_Sootopolis_StormyWater_Frame0[] = INCBIN_U16("data/tilesets/secondary/sootopolis/anim/stormy_water/0_kyogre.4bpp", "data/tilesets/secondary/sootopolis/anim/stormy_water/0_groudon.4bpp");
|
||||
const u16 gTilesetAnims_Sootopolis_StormyWater_Frame1[] = INCBIN_U16("data/tilesets/secondary/sootopolis/anim/stormy_water/1_kyogre.4bpp", "data/tilesets/secondary/sootopolis/anim/stormy_water/1_groudon.4bpp");
|
||||
const u16 gTilesetAnims_Sootopolis_StormyWater_Frame2[] = INCBIN_U16("data/tilesets/secondary/sootopolis/anim/stormy_water/2_kyogre.4bpp", "data/tilesets/secondary/sootopolis/anim/stormy_water/2_groudon.4bpp");
|
||||
const u16 gTilesetAnims_Sootopolis_StormyWater_Frame3[] = INCBIN_U16("data/tilesets/secondary/sootopolis/anim/stormy_water/3_kyogre.4bpp", "data/tilesets/secondary/sootopolis/anim/stormy_water/3_groudon.4bpp");
|
||||
const u16 gTilesetAnims_Sootopolis_StormyWater_Frame4[] = INCBIN_U16("data/tilesets/secondary/sootopolis/anim/stormy_water/4_kyogre.4bpp", "data/tilesets/secondary/sootopolis/anim/stormy_water/4_groudon.4bpp");
|
||||
const u16 gTilesetAnims_Sootopolis_StormyWater_Frame5[] = INCBIN_U16("data/tilesets/secondary/sootopolis/anim/stormy_water/5_kyogre.4bpp", "data/tilesets/secondary/sootopolis/anim/stormy_water/5_groudon.4bpp");
|
||||
const u16 gTilesetAnims_Sootopolis_StormyWater_Frame6[] = INCBIN_U16("data/tilesets/secondary/sootopolis/anim/stormy_water/6_kyogre.4bpp", "data/tilesets/secondary/sootopolis/anim/stormy_water/6_groudon.4bpp");
|
||||
const u16 gTilesetAnims_Sootopolis_StormyWater_Frame7[] = INCBIN_U16("data/tilesets/secondary/sootopolis/anim/stormy_water/7_kyogre.4bpp", "data/tilesets/secondary/sootopolis/anim/stormy_water/7_groudon.4bpp");
|
||||
const u16 tileset_anims_space_8[16] = {};
|
||||
|
||||
const u16 gTilesetAnims_Unused1_Frame0[] = INCBIN_U16("data/tilesets/secondary/unused_1/0.4bpp");
|
||||
|
@ -1104,7 +1104,7 @@ bool8 TryDoDoubleWildBattle(void)
|
||||
return TRUE;
|
||||
#endif
|
||||
#if B_DOUBLE_WILD_CHANCE != 0
|
||||
else if ((Random() % 100) + 1 < B_DOUBLE_WILD_CHANCE)
|
||||
else if ((Random() % 100) + 1 <= B_DOUBLE_WILD_CHANCE)
|
||||
return TRUE;
|
||||
#endif
|
||||
return FALSE;
|
||||
|
Loading…
Reference in New Issue
Block a user