Merge pull request #1719 from AsparagusEduardo/pret_cleanBattleScriptCommands
Further cleaning after comparing with pokefirered
This commit is contained in:
+31
-31
@@ -490,7 +490,7 @@ BattleScript_EffectStatUp::
|
|||||||
BattleScript_EffectStatUpAfterAtkCanceler::
|
BattleScript_EffectStatUpAfterAtkCanceler::
|
||||||
attackstring
|
attackstring
|
||||||
ppreduce
|
ppreduce
|
||||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_StatUpEnd
|
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_StatUpEnd
|
||||||
jumpifbyte CMP_NOT_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_StatUpAttackAnim
|
jumpifbyte CMP_NOT_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_StatUpAttackAnim
|
||||||
pause B_WAIT_TIME_SHORT
|
pause B_WAIT_TIME_SHORT
|
||||||
goto BattleScript_StatUpPrintString
|
goto BattleScript_StatUpPrintString
|
||||||
@@ -536,7 +536,7 @@ BattleScript_EffectStatDown::
|
|||||||
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
|
accuracycheck BattleScript_PrintMoveMissed, ACC_CURR_MOVE
|
||||||
attackstring
|
attackstring
|
||||||
ppreduce
|
ppreduce
|
||||||
statbuffchange STAT_BUFF_ALLOW_PTR, BattleScript_StatDownEnd
|
statbuffchange STAT_CHANGE_ALLOW_PTR, BattleScript_StatDownEnd
|
||||||
jumpifbyte CMP_LESS_THAN, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_DECREASE, BattleScript_StatDownDoAnim
|
jumpifbyte CMP_LESS_THAN, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_DECREASE, BattleScript_StatDownDoAnim
|
||||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_FELL_EMPTY, BattleScript_StatDownEnd
|
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_FELL_EMPTY, BattleScript_StatDownEnd
|
||||||
pause B_WAIT_TIME_SHORT
|
pause B_WAIT_TIME_SHORT
|
||||||
@@ -1492,17 +1492,17 @@ BattleScript_CurseTrySpeed::
|
|||||||
attackanimation
|
attackanimation
|
||||||
waitanimation
|
waitanimation
|
||||||
setstatchanger STAT_SPEED, 1, TRUE
|
setstatchanger STAT_SPEED, 1, TRUE
|
||||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_CurseTryAttack
|
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_CurseTryAttack
|
||||||
printfromtable gStatDownStringIds
|
printfromtable gStatDownStringIds
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
BattleScript_CurseTryAttack::
|
BattleScript_CurseTryAttack::
|
||||||
setstatchanger STAT_ATK, 1, FALSE
|
setstatchanger STAT_ATK, 1, FALSE
|
||||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_CurseTryDefense
|
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_CurseTryDefense
|
||||||
printfromtable gStatUpStringIds
|
printfromtable gStatUpStringIds
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
BattleScript_CurseTryDefense::
|
BattleScript_CurseTryDefense::
|
||||||
setstatchanger STAT_DEF, 1, FALSE
|
setstatchanger STAT_DEF, 1, FALSE
|
||||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_CurseEnd
|
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_CurseEnd
|
||||||
printfromtable gStatUpStringIds
|
printfromtable gStatUpStringIds
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
BattleScript_CurseEnd::
|
BattleScript_CurseEnd::
|
||||||
@@ -1614,7 +1614,7 @@ BattleScript_EffectSwagger::
|
|||||||
attackanimation
|
attackanimation
|
||||||
waitanimation
|
waitanimation
|
||||||
setstatchanger STAT_ATK, 2, FALSE
|
setstatchanger STAT_ATK, 2, FALSE
|
||||||
statbuffchange STAT_BUFF_ALLOW_PTR, BattleScript_SwaggerTryConfuse
|
statbuffchange STAT_CHANGE_ALLOW_PTR, BattleScript_SwaggerTryConfuse
|
||||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_SwaggerTryConfuse
|
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_SwaggerTryConfuse
|
||||||
setgraphicalstatchangevalues
|
setgraphicalstatchangevalues
|
||||||
playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
|
playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
|
||||||
@@ -1813,7 +1813,7 @@ BattleScript_EffectSkullBash::
|
|||||||
setbyte sTWOTURN_STRINGID, B_MSG_TURN1_SKULL_BASH
|
setbyte sTWOTURN_STRINGID, B_MSG_TURN1_SKULL_BASH
|
||||||
call BattleScriptFirstChargingTurn
|
call BattleScriptFirstChargingTurn
|
||||||
setstatchanger STAT_DEF, 1, FALSE
|
setstatchanger STAT_DEF, 1, FALSE
|
||||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_SkullBashEnd
|
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_SkullBashEnd
|
||||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_SkullBashEnd
|
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_SkullBashEnd
|
||||||
setgraphicalstatchangevalues
|
setgraphicalstatchangevalues
|
||||||
playanimation BS_ATTACKER, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
|
playanimation BS_ATTACKER, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
|
||||||
@@ -2016,7 +2016,7 @@ BattleScript_EffectDefenseCurl::
|
|||||||
ppreduce
|
ppreduce
|
||||||
setdefensecurlbit
|
setdefensecurlbit
|
||||||
setstatchanger STAT_DEF, 1, FALSE
|
setstatchanger STAT_DEF, 1, FALSE
|
||||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_DefenseCurlDoStatUpAnim
|
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_DefenseCurlDoStatUpAnim
|
||||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_StatUpPrintString
|
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_StatUpPrintString
|
||||||
attackanimation
|
attackanimation
|
||||||
waitanimation
|
waitanimation
|
||||||
@@ -2157,7 +2157,7 @@ BattleScript_EffectFlatter::
|
|||||||
attackanimation
|
attackanimation
|
||||||
waitanimation
|
waitanimation
|
||||||
setstatchanger STAT_SPATK, 1, FALSE
|
setstatchanger STAT_SPATK, 1, FALSE
|
||||||
statbuffchange STAT_BUFF_ALLOW_PTR, BattleScript_FlatterTryConfuse
|
statbuffchange STAT_CHANGE_ALLOW_PTR, BattleScript_FlatterTryConfuse
|
||||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_FlatterTryConfuse
|
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_FlatterTryConfuse
|
||||||
setgraphicalstatchangevalues
|
setgraphicalstatchangevalues
|
||||||
playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
|
playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
|
||||||
@@ -2214,7 +2214,7 @@ BattleScript_EffectMemento::
|
|||||||
playstatchangeanimation BS_TARGET, BIT_ATK | BIT_SPATK, STAT_CHANGE_NEGATIVE | STAT_CHANGE_BY_TWO | STAT_CHANGE_MULTIPLE_STATS
|
playstatchangeanimation BS_TARGET, BIT_ATK | BIT_SPATK, STAT_CHANGE_NEGATIVE | STAT_CHANGE_BY_TWO | STAT_CHANGE_MULTIPLE_STATS
|
||||||
playstatchangeanimation BS_TARGET, BIT_ATK, STAT_CHANGE_NEGATIVE | STAT_CHANGE_BY_TWO
|
playstatchangeanimation BS_TARGET, BIT_ATK, STAT_CHANGE_NEGATIVE | STAT_CHANGE_BY_TWO
|
||||||
setstatchanger STAT_ATK, 2, TRUE
|
setstatchanger STAT_ATK, 2, TRUE
|
||||||
statbuffchange STAT_BUFF_ALLOW_PTR, BattleScript_EffectMementoTrySpAtk
|
statbuffchange STAT_CHANGE_ALLOW_PTR, BattleScript_EffectMementoTrySpAtk
|
||||||
@ Greater than B_MSG_DEFENDER_STAT_FELL is checking if the stat cannot decrease
|
@ Greater than B_MSG_DEFENDER_STAT_FELL is checking if the stat cannot decrease
|
||||||
jumpifbyte CMP_GREATER_THAN, cMULTISTRING_CHOOSER, B_MSG_DEFENDER_STAT_FELL, BattleScript_EffectMementoTrySpAtk
|
jumpifbyte CMP_GREATER_THAN, cMULTISTRING_CHOOSER, B_MSG_DEFENDER_STAT_FELL, BattleScript_EffectMementoTrySpAtk
|
||||||
printfromtable gStatDownStringIds
|
printfromtable gStatDownStringIds
|
||||||
@@ -2222,7 +2222,7 @@ BattleScript_EffectMemento::
|
|||||||
BattleScript_EffectMementoTrySpAtk:
|
BattleScript_EffectMementoTrySpAtk:
|
||||||
playstatchangeanimation BS_TARGET, BIT_SPATK, STAT_CHANGE_NEGATIVE | STAT_CHANGE_BY_TWO
|
playstatchangeanimation BS_TARGET, BIT_SPATK, STAT_CHANGE_NEGATIVE | STAT_CHANGE_BY_TWO
|
||||||
setstatchanger STAT_SPATK, 2, TRUE
|
setstatchanger STAT_SPATK, 2, TRUE
|
||||||
statbuffchange STAT_BUFF_ALLOW_PTR, BattleScript_EffectMementoTryFaint
|
statbuffchange STAT_CHANGE_ALLOW_PTR, BattleScript_EffectMementoTryFaint
|
||||||
@ Greater than B_MSG_DEFENDER_STAT_FELL is checking if the stat cannot decrease
|
@ Greater than B_MSG_DEFENDER_STAT_FELL is checking if the stat cannot decrease
|
||||||
jumpifbyte CMP_GREATER_THAN, cMULTISTRING_CHOOSER, B_MSG_DEFENDER_STAT_FELL, BattleScript_EffectMementoTryFaint
|
jumpifbyte CMP_GREATER_THAN, cMULTISTRING_CHOOSER, B_MSG_DEFENDER_STAT_FELL, BattleScript_EffectMementoTryFaint
|
||||||
printfromtable gStatDownStringIds
|
printfromtable gStatDownStringIds
|
||||||
@@ -2662,14 +2662,14 @@ BattleScript_TickleDoMoveAnim::
|
|||||||
playstatchangeanimation BS_TARGET, BIT_ATK | BIT_DEF, STAT_CHANGE_NEGATIVE | STAT_CHANGE_MULTIPLE_STATS
|
playstatchangeanimation BS_TARGET, BIT_ATK | BIT_DEF, STAT_CHANGE_NEGATIVE | STAT_CHANGE_MULTIPLE_STATS
|
||||||
playstatchangeanimation BS_TARGET, BIT_ATK, STAT_CHANGE_NEGATIVE
|
playstatchangeanimation BS_TARGET, BIT_ATK, STAT_CHANGE_NEGATIVE
|
||||||
setstatchanger STAT_ATK, 1, TRUE
|
setstatchanger STAT_ATK, 1, TRUE
|
||||||
statbuffchange STAT_BUFF_ALLOW_PTR, BattleScript_TickleTryLowerDef
|
statbuffchange STAT_CHANGE_ALLOW_PTR, BattleScript_TickleTryLowerDef
|
||||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_DECREASE, BattleScript_TickleTryLowerDef
|
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_DECREASE, BattleScript_TickleTryLowerDef
|
||||||
printfromtable gStatDownStringIds
|
printfromtable gStatDownStringIds
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
BattleScript_TickleTryLowerDef::
|
BattleScript_TickleTryLowerDef::
|
||||||
playstatchangeanimation BS_TARGET, BIT_DEF, STAT_CHANGE_NEGATIVE
|
playstatchangeanimation BS_TARGET, BIT_DEF, STAT_CHANGE_NEGATIVE
|
||||||
setstatchanger STAT_DEF, 1, TRUE
|
setstatchanger STAT_DEF, 1, TRUE
|
||||||
statbuffchange STAT_BUFF_ALLOW_PTR, BattleScript_TickleEnd
|
statbuffchange STAT_CHANGE_ALLOW_PTR, BattleScript_TickleEnd
|
||||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_DECREASE, BattleScript_TickleEnd
|
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_DECREASE, BattleScript_TickleEnd
|
||||||
printfromtable gStatDownStringIds
|
printfromtable gStatDownStringIds
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
@@ -2695,13 +2695,13 @@ BattleScript_CosmicPowerDoMoveAnim::
|
|||||||
setbyte sSTAT_ANIM_PLAYED, FALSE
|
setbyte sSTAT_ANIM_PLAYED, FALSE
|
||||||
playstatchangeanimation BS_ATTACKER, BIT_DEF | BIT_SPDEF, 0
|
playstatchangeanimation BS_ATTACKER, BIT_DEF | BIT_SPDEF, 0
|
||||||
setstatchanger STAT_DEF, 1, FALSE
|
setstatchanger STAT_DEF, 1, FALSE
|
||||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_CosmicPowerTrySpDef
|
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_CosmicPowerTrySpDef
|
||||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_CosmicPowerTrySpDef
|
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_CosmicPowerTrySpDef
|
||||||
printfromtable gStatUpStringIds
|
printfromtable gStatUpStringIds
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
BattleScript_CosmicPowerTrySpDef::
|
BattleScript_CosmicPowerTrySpDef::
|
||||||
setstatchanger STAT_SPDEF, 1, FALSE
|
setstatchanger STAT_SPDEF, 1, FALSE
|
||||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_CosmicPowerEnd
|
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_CosmicPowerEnd
|
||||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_CosmicPowerEnd
|
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_CosmicPowerEnd
|
||||||
printfromtable gStatUpStringIds
|
printfromtable gStatUpStringIds
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
@@ -2724,13 +2724,13 @@ BattleScript_BulkUpDoMoveAnim::
|
|||||||
setbyte sSTAT_ANIM_PLAYED, FALSE
|
setbyte sSTAT_ANIM_PLAYED, FALSE
|
||||||
playstatchangeanimation BS_ATTACKER, BIT_ATK | BIT_DEF, 0
|
playstatchangeanimation BS_ATTACKER, BIT_ATK | BIT_DEF, 0
|
||||||
setstatchanger STAT_ATK, 1, FALSE
|
setstatchanger STAT_ATK, 1, FALSE
|
||||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_BulkUpTryDef
|
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_BulkUpTryDef
|
||||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_BulkUpTryDef
|
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_BulkUpTryDef
|
||||||
printfromtable gStatUpStringIds
|
printfromtable gStatUpStringIds
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
BattleScript_BulkUpTryDef::
|
BattleScript_BulkUpTryDef::
|
||||||
setstatchanger STAT_DEF, 1, FALSE
|
setstatchanger STAT_DEF, 1, FALSE
|
||||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_BulkUpEnd
|
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_BulkUpEnd
|
||||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_BulkUpEnd
|
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_BulkUpEnd
|
||||||
printfromtable gStatUpStringIds
|
printfromtable gStatUpStringIds
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
@@ -2749,13 +2749,13 @@ BattleScript_CalmMindDoMoveAnim::
|
|||||||
setbyte sSTAT_ANIM_PLAYED, FALSE
|
setbyte sSTAT_ANIM_PLAYED, FALSE
|
||||||
playstatchangeanimation BS_ATTACKER, BIT_SPATK | BIT_SPDEF, 0
|
playstatchangeanimation BS_ATTACKER, BIT_SPATK | BIT_SPDEF, 0
|
||||||
setstatchanger STAT_SPATK, 1, FALSE
|
setstatchanger STAT_SPATK, 1, FALSE
|
||||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_CalmMindTrySpDef
|
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_CalmMindTrySpDef
|
||||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_CalmMindTrySpDef
|
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_CalmMindTrySpDef
|
||||||
printfromtable gStatUpStringIds
|
printfromtable gStatUpStringIds
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
BattleScript_CalmMindTrySpDef::
|
BattleScript_CalmMindTrySpDef::
|
||||||
setstatchanger STAT_SPDEF, 1, FALSE
|
setstatchanger STAT_SPDEF, 1, FALSE
|
||||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_CalmMindEnd
|
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_CalmMindEnd
|
||||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_CalmMindEnd
|
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_CalmMindEnd
|
||||||
printfromtable gStatUpStringIds
|
printfromtable gStatUpStringIds
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
@@ -2781,13 +2781,13 @@ BattleScript_DragonDanceDoMoveAnim::
|
|||||||
setbyte sSTAT_ANIM_PLAYED, FALSE
|
setbyte sSTAT_ANIM_PLAYED, FALSE
|
||||||
playstatchangeanimation BS_ATTACKER, BIT_ATK | BIT_SPEED, 0
|
playstatchangeanimation BS_ATTACKER, BIT_ATK | BIT_SPEED, 0
|
||||||
setstatchanger STAT_ATK, 1, FALSE
|
setstatchanger STAT_ATK, 1, FALSE
|
||||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_DragonDanceTrySpeed
|
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_DragonDanceTrySpeed
|
||||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_DragonDanceTrySpeed
|
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_DragonDanceTrySpeed
|
||||||
printfromtable gStatUpStringIds
|
printfromtable gStatUpStringIds
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
BattleScript_DragonDanceTrySpeed::
|
BattleScript_DragonDanceTrySpeed::
|
||||||
setstatchanger STAT_SPEED, 1, FALSE
|
setstatchanger STAT_SPEED, 1, FALSE
|
||||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_DragonDanceEnd
|
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_DragonDanceEnd
|
||||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_DragonDanceEnd
|
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_DragonDanceEnd
|
||||||
printfromtable gStatUpStringIds
|
printfromtable gStatUpStringIds
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
@@ -3458,27 +3458,27 @@ BattleScript_AllStatsUpAtk::
|
|||||||
setbyte sSTAT_ANIM_PLAYED, FALSE
|
setbyte sSTAT_ANIM_PLAYED, FALSE
|
||||||
playstatchangeanimation BS_ATTACKER, BIT_ATK | BIT_DEF | BIT_SPEED | BIT_SPATK | BIT_SPDEF, 0
|
playstatchangeanimation BS_ATTACKER, BIT_ATK | BIT_DEF | BIT_SPEED | BIT_SPATK | BIT_SPDEF, 0
|
||||||
setstatchanger STAT_ATK, 1, FALSE
|
setstatchanger STAT_ATK, 1, FALSE
|
||||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_AllStatsUpDef
|
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_AllStatsUpDef
|
||||||
printfromtable gStatUpStringIds
|
printfromtable gStatUpStringIds
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
BattleScript_AllStatsUpDef::
|
BattleScript_AllStatsUpDef::
|
||||||
setstatchanger STAT_DEF, 1, FALSE
|
setstatchanger STAT_DEF, 1, FALSE
|
||||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_AllStatsUpSpeed
|
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_AllStatsUpSpeed
|
||||||
printfromtable gStatUpStringIds
|
printfromtable gStatUpStringIds
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
BattleScript_AllStatsUpSpeed::
|
BattleScript_AllStatsUpSpeed::
|
||||||
setstatchanger STAT_SPEED, 1, FALSE
|
setstatchanger STAT_SPEED, 1, FALSE
|
||||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_AllStatsUpSpAtk
|
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_AllStatsUpSpAtk
|
||||||
printfromtable gStatUpStringIds
|
printfromtable gStatUpStringIds
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
BattleScript_AllStatsUpSpAtk::
|
BattleScript_AllStatsUpSpAtk::
|
||||||
setstatchanger STAT_SPATK, 1, FALSE
|
setstatchanger STAT_SPATK, 1, FALSE
|
||||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_AllStatsUpSpDef
|
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_AllStatsUpSpDef
|
||||||
printfromtable gStatUpStringIds
|
printfromtable gStatUpStringIds
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
BattleScript_AllStatsUpSpDef::
|
BattleScript_AllStatsUpSpDef::
|
||||||
setstatchanger STAT_SPDEF, 1, FALSE
|
setstatchanger STAT_SPDEF, 1, FALSE
|
||||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_AllStatsUpRet
|
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_AllStatsUpRet
|
||||||
printfromtable gStatUpStringIds
|
printfromtable gStatUpStringIds
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
BattleScript_AllStatsUpRet::
|
BattleScript_AllStatsUpRet::
|
||||||
@@ -3625,14 +3625,14 @@ BattleScript_AtkDefDown::
|
|||||||
playstatchangeanimation BS_ATTACKER, BIT_DEF | BIT_ATK, STAT_CHANGE_CANT_PREVENT | STAT_CHANGE_NEGATIVE | STAT_CHANGE_MULTIPLE_STATS
|
playstatchangeanimation BS_ATTACKER, BIT_DEF | BIT_ATK, STAT_CHANGE_CANT_PREVENT | STAT_CHANGE_NEGATIVE | STAT_CHANGE_MULTIPLE_STATS
|
||||||
playstatchangeanimation BS_ATTACKER, BIT_ATK, STAT_CHANGE_CANT_PREVENT | STAT_CHANGE_NEGATIVE
|
playstatchangeanimation BS_ATTACKER, BIT_ATK, STAT_CHANGE_CANT_PREVENT | STAT_CHANGE_NEGATIVE
|
||||||
setstatchanger STAT_ATK, 1, TRUE
|
setstatchanger STAT_ATK, 1, TRUE
|
||||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN | STAT_BUFF_ALLOW_PTR, BattleScript_AtkDefDown_TryDef
|
statbuffchange MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN | STAT_CHANGE_ALLOW_PTR, BattleScript_AtkDefDown_TryDef
|
||||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_DECREASE, BattleScript_AtkDefDown_TryDef
|
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_DECREASE, BattleScript_AtkDefDown_TryDef
|
||||||
printfromtable gStatDownStringIds
|
printfromtable gStatDownStringIds
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
BattleScript_AtkDefDown_TryDef::
|
BattleScript_AtkDefDown_TryDef::
|
||||||
playstatchangeanimation BS_ATTACKER, BIT_DEF, STAT_CHANGE_CANT_PREVENT | STAT_CHANGE_NEGATIVE
|
playstatchangeanimation BS_ATTACKER, BIT_DEF, STAT_CHANGE_CANT_PREVENT | STAT_CHANGE_NEGATIVE
|
||||||
setstatchanger STAT_DEF, 1, TRUE
|
setstatchanger STAT_DEF, 1, TRUE
|
||||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN | STAT_BUFF_ALLOW_PTR, BattleScript_AtkDefDown_End
|
statbuffchange MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN | STAT_CHANGE_ALLOW_PTR, BattleScript_AtkDefDown_End
|
||||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_DECREASE, BattleScript_AtkDefDown_End
|
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_DECREASE, BattleScript_AtkDefDown_End
|
||||||
printfromtable gStatDownStringIds
|
printfromtable gStatDownStringIds
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
@@ -3698,7 +3698,7 @@ BattleScript_SAtkDown2::
|
|||||||
setbyte sSTAT_ANIM_PLAYED, FALSE
|
setbyte sSTAT_ANIM_PLAYED, FALSE
|
||||||
playstatchangeanimation BS_ATTACKER, BIT_SPATK, STAT_CHANGE_CANT_PREVENT | STAT_CHANGE_NEGATIVE | STAT_CHANGE_BY_TWO
|
playstatchangeanimation BS_ATTACKER, BIT_SPATK, STAT_CHANGE_CANT_PREVENT | STAT_CHANGE_NEGATIVE | STAT_CHANGE_BY_TWO
|
||||||
setstatchanger STAT_SPATK, 2, TRUE
|
setstatchanger STAT_SPATK, 2, TRUE
|
||||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN | STAT_BUFF_ALLOW_PTR, BattleScript_SAtkDown2End
|
statbuffchange MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN | STAT_CHANGE_ALLOW_PTR, BattleScript_SAtkDown2End
|
||||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_DECREASE, BattleScript_SAtkDown2End
|
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_DECREASE, BattleScript_SAtkDown2End
|
||||||
printfromtable gStatDownStringIds
|
printfromtable gStatDownStringIds
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
@@ -4029,7 +4029,7 @@ BattleScript_IntimidateActivatesLoop:
|
|||||||
jumpifability BS_TARGET, ABILITY_CLEAR_BODY, BattleScript_IntimidatePrevented
|
jumpifability BS_TARGET, ABILITY_CLEAR_BODY, BattleScript_IntimidatePrevented
|
||||||
jumpifability BS_TARGET, ABILITY_HYPER_CUTTER, BattleScript_IntimidatePrevented
|
jumpifability BS_TARGET, ABILITY_HYPER_CUTTER, BattleScript_IntimidatePrevented
|
||||||
jumpifability BS_TARGET, ABILITY_WHITE_SMOKE, BattleScript_IntimidatePrevented
|
jumpifability BS_TARGET, ABILITY_WHITE_SMOKE, BattleScript_IntimidatePrevented
|
||||||
statbuffchange STAT_BUFF_NOT_PROTECT_AFFECTED | STAT_BUFF_ALLOW_PTR, BattleScript_IntimidateActivatesLoopIncrement
|
statbuffchange STAT_CHANGE_NOT_PROTECT_AFFECTED | STAT_CHANGE_ALLOW_PTR, BattleScript_IntimidateActivatesLoopIncrement
|
||||||
jumpifbyte CMP_GREATER_THAN, cMULTISTRING_CHOOSER, 1, BattleScript_IntimidateActivatesLoopIncrement
|
jumpifbyte CMP_GREATER_THAN, cMULTISTRING_CHOOSER, 1, BattleScript_IntimidateActivatesLoopIncrement
|
||||||
setgraphicalstatchangevalues
|
setgraphicalstatchangevalues
|
||||||
playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
|
playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
|
||||||
@@ -4408,7 +4408,7 @@ BattleScript_BerryConfuseHealEnd2::
|
|||||||
|
|
||||||
BattleScript_BerryStatRaiseEnd2::
|
BattleScript_BerryStatRaiseEnd2::
|
||||||
playanimation BS_ATTACKER, B_ANIM_HELD_ITEM_EFFECT
|
playanimation BS_ATTACKER, B_ANIM_HELD_ITEM_EFFECT
|
||||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR, BattleScript_BerryStatRaiseDoStatUp
|
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_BerryStatRaiseDoStatUp
|
||||||
BattleScript_BerryStatRaiseDoStatUp::
|
BattleScript_BerryStatRaiseDoStatUp::
|
||||||
setbyte cMULTISTRING_CHOOSER, B_MSG_STAT_ROSE_ITEM
|
setbyte cMULTISTRING_CHOOSER, B_MSG_STAT_ROSE_ITEM
|
||||||
call BattleScript_StatUp
|
call BattleScript_StatUp
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ enum {
|
|||||||
LINK_STANDBY_MSG_ONLY,
|
LINK_STANDBY_MSG_ONLY,
|
||||||
};
|
};
|
||||||
|
|
||||||
#define INSTANT_HP_BAR_DROP 32767
|
#define INSTANT_HP_BAR_DROP 0x7FFF
|
||||||
|
|
||||||
#define PARTY_SUMM_SKIP_DRAW_DELAY (1 << 7)
|
#define PARTY_SUMM_SKIP_DRAW_DELAY (1 << 7)
|
||||||
|
|
||||||
|
|||||||
@@ -53,17 +53,17 @@
|
|||||||
#define BATTLE_TYPE_MULTI (1 << 6)
|
#define BATTLE_TYPE_MULTI (1 << 6)
|
||||||
#define BATTLE_TYPE_SAFARI (1 << 7)
|
#define BATTLE_TYPE_SAFARI (1 << 7)
|
||||||
#define BATTLE_TYPE_BATTLE_TOWER (1 << 8)
|
#define BATTLE_TYPE_BATTLE_TOWER (1 << 8)
|
||||||
#define BATTLE_TYPE_WALLY_TUTORIAL (1 << 9)
|
#define BATTLE_TYPE_WALLY_TUTORIAL (1 << 9) // Used in pokefirered as BATTLE_TYPE_OLD_MAN_TUTORIAL.
|
||||||
#define BATTLE_TYPE_ROAMER (1 << 10)
|
#define BATTLE_TYPE_ROAMER (1 << 10)
|
||||||
#define BATTLE_TYPE_EREADER_TRAINER (1 << 11)
|
#define BATTLE_TYPE_EREADER_TRAINER (1 << 11)
|
||||||
#define BATTLE_TYPE_KYOGRE_GROUDON (1 << 12)
|
#define BATTLE_TYPE_KYOGRE_GROUDON (1 << 12)
|
||||||
#define BATTLE_TYPE_LEGENDARY (1 << 13)
|
#define BATTLE_TYPE_LEGENDARY (1 << 13)
|
||||||
#define BATTLE_TYPE_REGI (1 << 14)
|
#define BATTLE_TYPE_REGI (1 << 14)
|
||||||
#define BATTLE_TYPE_TWO_OPPONENTS (1 << 15)
|
#define BATTLE_TYPE_TWO_OPPONENTS (1 << 15) // Used in pokefirered as BATTLE_TYPE_GHOST.
|
||||||
#define BATTLE_TYPE_DOME (1 << 16)
|
#define BATTLE_TYPE_DOME (1 << 16) // Used in pokefirered as BATTLE_TYPE_POKEDUDE.
|
||||||
#define BATTLE_TYPE_PALACE (1 << 17)
|
#define BATTLE_TYPE_PALACE (1 << 17) // Used in pokefirered as BATTLE_TYPE_WILD_SCRIPTED.
|
||||||
#define BATTLE_TYPE_ARENA (1 << 18)
|
#define BATTLE_TYPE_ARENA (1 << 18) // Used in pokefirered as BATTLE_TYPE_LEGENDARY_FRLG.
|
||||||
#define BATTLE_TYPE_FACTORY (1 << 19)
|
#define BATTLE_TYPE_FACTORY (1 << 19) // Used in pokefirered as BATTLE_TYPE_TRAINER_TOWER.
|
||||||
#define BATTLE_TYPE_PIKE (1 << 20)
|
#define BATTLE_TYPE_PIKE (1 << 20)
|
||||||
#define BATTLE_TYPE_PYRAMID (1 << 21)
|
#define BATTLE_TYPE_PYRAMID (1 << 21)
|
||||||
#define BATTLE_TYPE_INGAME_PARTNER (1 << 22)
|
#define BATTLE_TYPE_INGAME_PARTNER (1 << 22)
|
||||||
|
|||||||
@@ -53,15 +53,15 @@
|
|||||||
#define BS_EFFECT_BATTLER 2
|
#define BS_EFFECT_BATTLER 2
|
||||||
#define BS_FAINTED 3
|
#define BS_FAINTED 3
|
||||||
#define BS_ATTACKER_WITH_PARTNER 4 // for Cmd_updatestatusicon
|
#define BS_ATTACKER_WITH_PARTNER 4 // for Cmd_updatestatusicon
|
||||||
#define BS_FAINTED_LINK_MULTIPLE_1 5
|
#define BS_FAINTED_LINK_MULTIPLE_1 5 // for openpartyscreen
|
||||||
#define BS_FAINTED_LINK_MULTIPLE_2 6
|
#define BS_FAINTED_LINK_MULTIPLE_2 6 // for openpartyscreen
|
||||||
#define BS_BATTLER_0 7
|
#define BS_BATTLER_0 7
|
||||||
#define BS_ATTACKER_SIDE 8 // for Cmd_jumpifability
|
#define BS_ATTACKER_SIDE 8 // for Cmd_jumpifability
|
||||||
#define BS_NOT_ATTACKER_SIDE 9 // for Cmd_jumpifability
|
#define BS_NOT_ATTACKER_SIDE 9 // for Cmd_jumpifability
|
||||||
#define BS_SCRIPTING 10
|
#define BS_SCRIPTING 10
|
||||||
#define BS_PLAYER1 11
|
#define BS_PLAYER1 11
|
||||||
#define BS_OPPONENT1 12
|
#define BS_OPPONENT1 12
|
||||||
#define BS_PLAYER2 13
|
#define BS_PLAYER2 13 // for Cmd_updatestatusicon
|
||||||
#define BS_OPPONENT2 14
|
#define BS_OPPONENT2 14
|
||||||
|
|
||||||
// Cmd_accuracycheck
|
// Cmd_accuracycheck
|
||||||
@@ -115,8 +115,8 @@
|
|||||||
#define SWITCH_IGNORE_ESCAPE_PREVENTION (1 << 7)
|
#define SWITCH_IGNORE_ESCAPE_PREVENTION (1 << 7)
|
||||||
|
|
||||||
// Cmd_statbuffchange
|
// Cmd_statbuffchange
|
||||||
#define STAT_BUFF_ALLOW_PTR (1 << 0) // If set, allow use of jumpptr. Set in every use of statbuffchange
|
#define STAT_CHANGE_ALLOW_PTR (1 << 0) // If set, allow use of jumpptr. Set in every use of statbuffchange
|
||||||
#define STAT_BUFF_NOT_PROTECT_AFFECTED (1 << 5)
|
#define STAT_CHANGE_NOT_PROTECT_AFFECTED (1 << 5)
|
||||||
|
|
||||||
// stat change flags for Cmd_playstatchangeanimation
|
// stat change flags for Cmd_playstatchangeanimation
|
||||||
#define STAT_CHANGE_NEGATIVE (1 << 0)
|
#define STAT_CHANGE_NEGATIVE (1 << 0)
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ void StopMapMusic(void);
|
|||||||
void FadeOutMapMusic(u8 speed);
|
void FadeOutMapMusic(u8 speed);
|
||||||
void FadeOutAndPlayNewMapMusic(u16 songNum, u8 speed);
|
void FadeOutAndPlayNewMapMusic(u16 songNum, u8 speed);
|
||||||
void FadeOutAndFadeInNewMapMusic(u16 songNum, u8 fadeOutSpeed, u8 fadeInSpeed);
|
void FadeOutAndFadeInNewMapMusic(u16 songNum, u8 fadeOutSpeed, u8 fadeInSpeed);
|
||||||
void FadeInNewMapMusic(u16 songNum, u8 speed);
|
|
||||||
bool8 IsNotWaitingForBGMStop(void);
|
bool8 IsNotWaitingForBGMStop(void);
|
||||||
void PlayFanfareByFanfareNum(u8 fanfareNum);
|
void PlayFanfareByFanfareNum(u8 fanfareNum);
|
||||||
bool8 WaitFanfare(bool8 stop);
|
bool8 WaitFanfare(bool8 stop);
|
||||||
|
|||||||
+1
-1
@@ -17,7 +17,7 @@ int GetUnionRoomTradeMessageId(struct RfuGameCompatibilityData player, struct Rf
|
|||||||
int CanSpinTradeMon(struct Pokemon *, u16);
|
int CanSpinTradeMon(struct Pokemon *, u16);
|
||||||
void InitTradeSequenceBgGpuRegs(void);
|
void InitTradeSequenceBgGpuRegs(void);
|
||||||
void LinkTradeDrawWindow(void);
|
void LinkTradeDrawWindow(void);
|
||||||
void InitTradeBg(void);
|
void LoadTradeAnimGfx(void);
|
||||||
void DrawTextOnTradeWindow(u8, const u8 *, u8);
|
void DrawTextOnTradeWindow(u8, const u8 *, u8);
|
||||||
|
|
||||||
#endif //GUARD_TRADE_H
|
#endif //GUARD_TRADE_H
|
||||||
|
|||||||
+1
-1
@@ -719,7 +719,7 @@ void BattleArena_AddSkillPoints(u8 battler)
|
|||||||
}
|
}
|
||||||
else if (gMoveResultFlags & MOVE_RESULT_NO_EFFECT)
|
else if (gMoveResultFlags & MOVE_RESULT_NO_EFFECT)
|
||||||
{
|
{
|
||||||
if (!(gMoveResultFlags & MOVE_RESULT_MISSED) || gBattleCommunication[6] != 1)
|
if (!(gMoveResultFlags & MOVE_RESULT_MISSED) || gBattleCommunication[MISS_TYPE] != B_MSG_PROTECTED)
|
||||||
skillPoints[battler] -= 2;
|
skillPoints[battler] -= 2;
|
||||||
}
|
}
|
||||||
else if ((gMoveResultFlags & MOVE_RESULT_SUPER_EFFECTIVE) && (gMoveResultFlags & MOVE_RESULT_NOT_VERY_EFFECTIVE))
|
else if ((gMoveResultFlags & MOVE_RESULT_SUPER_EFFECTIVE) && (gMoveResultFlags & MOVE_RESULT_NOT_VERY_EFFECTIVE))
|
||||||
|
|||||||
+18
-18
@@ -3275,25 +3275,25 @@ void FaintClearSetData(void)
|
|||||||
for (i = 0; i < sizeof(struct DisableStruct); i++)
|
for (i = 0; i < sizeof(struct DisableStruct); i++)
|
||||||
ptr[i] = 0;
|
ptr[i] = 0;
|
||||||
|
|
||||||
gProtectStructs[gActiveBattler].protected = 0;
|
gProtectStructs[gActiveBattler].protected = FALSE;
|
||||||
gProtectStructs[gActiveBattler].endured = 0;
|
gProtectStructs[gActiveBattler].endured = FALSE;
|
||||||
gProtectStructs[gActiveBattler].noValidMoves = 0;
|
gProtectStructs[gActiveBattler].noValidMoves = FALSE;
|
||||||
gProtectStructs[gActiveBattler].helpingHand = 0;
|
gProtectStructs[gActiveBattler].helpingHand = FALSE;
|
||||||
gProtectStructs[gActiveBattler].bounceMove = 0;
|
gProtectStructs[gActiveBattler].bounceMove = FALSE;
|
||||||
gProtectStructs[gActiveBattler].stealMove = 0;
|
gProtectStructs[gActiveBattler].stealMove = FALSE;
|
||||||
gProtectStructs[gActiveBattler].flag0Unknown = 0;
|
gProtectStructs[gActiveBattler].flag0Unknown = FALSE;
|
||||||
gProtectStructs[gActiveBattler].prlzImmobility = 0;
|
gProtectStructs[gActiveBattler].prlzImmobility = FALSE;
|
||||||
gProtectStructs[gActiveBattler].confusionSelfDmg = 0;
|
gProtectStructs[gActiveBattler].confusionSelfDmg = FALSE;
|
||||||
gProtectStructs[gActiveBattler].targetNotAffected = 0;
|
gProtectStructs[gActiveBattler].targetNotAffected = FALSE;
|
||||||
gProtectStructs[gActiveBattler].chargingTurn = 0;
|
gProtectStructs[gActiveBattler].chargingTurn = FALSE;
|
||||||
gProtectStructs[gActiveBattler].fleeType = 0;
|
gProtectStructs[gActiveBattler].fleeType = 0;
|
||||||
gProtectStructs[gActiveBattler].usedImprisonedMove = 0;
|
gProtectStructs[gActiveBattler].usedImprisonedMove = FALSE;
|
||||||
gProtectStructs[gActiveBattler].loveImmobility = 0;
|
gProtectStructs[gActiveBattler].loveImmobility = FALSE;
|
||||||
gProtectStructs[gActiveBattler].usedDisabledMove = 0;
|
gProtectStructs[gActiveBattler].usedDisabledMove = FALSE;
|
||||||
gProtectStructs[gActiveBattler].usedTauntedMove = 0;
|
gProtectStructs[gActiveBattler].usedTauntedMove = FALSE;
|
||||||
gProtectStructs[gActiveBattler].flag2Unknown = 0;
|
gProtectStructs[gActiveBattler].flag2Unknown = FALSE;
|
||||||
gProtectStructs[gActiveBattler].flinchImmobility = 0;
|
gProtectStructs[gActiveBattler].flinchImmobility = FALSE;
|
||||||
gProtectStructs[gActiveBattler].notFirstStrike = 0;
|
gProtectStructs[gActiveBattler].notFirstStrike = FALSE;
|
||||||
|
|
||||||
gDisableStructs[gActiveBattler].isFirstTurn = 2;
|
gDisableStructs[gActiveBattler].isFirstTurn = 2;
|
||||||
|
|
||||||
|
|||||||
+133
-123
@@ -667,7 +667,8 @@ static const u8* const sMoveEffectBS_Ptrs[] =
|
|||||||
[MOVE_EFFECT_RECOIL_33] = BattleScript_MoveEffectRecoil,
|
[MOVE_EFFECT_RECOIL_33] = BattleScript_MoveEffectRecoil,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct WindowTemplate sUnusedWinTemplate = {
|
static const struct WindowTemplate sUnusedWinTemplate =
|
||||||
|
{
|
||||||
.bg = 0,
|
.bg = 0,
|
||||||
.tilemapLeft = 1,
|
.tilemapLeft = 1,
|
||||||
.tilemapTop = 3,
|
.tilemapTop = 3,
|
||||||
@@ -961,7 +962,7 @@ static void Cmd_attackcanceler(void)
|
|||||||
if (gProtectStructs[gBattlerTarget].bounceMove && gBattleMoves[gCurrentMove].flags & FLAG_MAGIC_COAT_AFFECTED)
|
if (gProtectStructs[gBattlerTarget].bounceMove && gBattleMoves[gCurrentMove].flags & FLAG_MAGIC_COAT_AFFECTED)
|
||||||
{
|
{
|
||||||
PressurePPLose(gBattlerAttacker, gBattlerTarget, MOVE_MAGIC_COAT);
|
PressurePPLose(gBattlerAttacker, gBattlerTarget, MOVE_MAGIC_COAT);
|
||||||
gProtectStructs[gBattlerTarget].bounceMove = 0;
|
gProtectStructs[gBattlerTarget].bounceMove = FALSE;
|
||||||
BattleScriptPushCursor();
|
BattleScriptPushCursor();
|
||||||
gBattlescriptCurrInstr = BattleScript_MagicCoatBounce;
|
gBattlescriptCurrInstr = BattleScript_MagicCoatBounce;
|
||||||
return;
|
return;
|
||||||
@@ -972,7 +973,7 @@ static void Cmd_attackcanceler(void)
|
|||||||
if ((gProtectStructs[gBattlerByTurnOrder[i]].stealMove) && gBattleMoves[gCurrentMove].flags & FLAG_SNATCH_AFFECTED)
|
if ((gProtectStructs[gBattlerByTurnOrder[i]].stealMove) && gBattleMoves[gCurrentMove].flags & FLAG_SNATCH_AFFECTED)
|
||||||
{
|
{
|
||||||
PressurePPLose(gBattlerAttacker, gBattlerByTurnOrder[i], MOVE_SNATCH);
|
PressurePPLose(gBattlerAttacker, gBattlerByTurnOrder[i], MOVE_SNATCH);
|
||||||
gProtectStructs[gBattlerByTurnOrder[i]].stealMove = 0;
|
gProtectStructs[gBattlerByTurnOrder[i]].stealMove = FALSE;
|
||||||
gBattleScripting.battler = gBattlerByTurnOrder[i];
|
gBattleScripting.battler = gBattlerByTurnOrder[i];
|
||||||
BattleScriptPushCursor();
|
BattleScriptPushCursor();
|
||||||
gBattlescriptCurrInstr = BattleScript_SnatchedMove;
|
gBattlescriptCurrInstr = BattleScript_SnatchedMove;
|
||||||
@@ -982,7 +983,7 @@ static void Cmd_attackcanceler(void)
|
|||||||
|
|
||||||
if (gSpecialStatuses[gBattlerTarget].lightningRodRedirected)
|
if (gSpecialStatuses[gBattlerTarget].lightningRodRedirected)
|
||||||
{
|
{
|
||||||
gSpecialStatuses[gBattlerTarget].lightningRodRedirected = 0;
|
gSpecialStatuses[gBattlerTarget].lightningRodRedirected = FALSE;
|
||||||
gLastUsedAbility = ABILITY_LIGHTNING_ROD;
|
gLastUsedAbility = ABILITY_LIGHTNING_ROD;
|
||||||
BattleScriptPushCursor();
|
BattleScriptPushCursor();
|
||||||
gBattlescriptCurrInstr = BattleScript_TookAttack;
|
gBattlescriptCurrInstr = BattleScript_TookAttack;
|
||||||
@@ -1175,8 +1176,8 @@ static void Cmd_accuracycheck(void)
|
|||||||
if ((Random() % 100 + 1) > calc)
|
if ((Random() % 100 + 1) > calc)
|
||||||
{
|
{
|
||||||
gMoveResultFlags |= MOVE_RESULT_MISSED;
|
gMoveResultFlags |= MOVE_RESULT_MISSED;
|
||||||
if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE &&
|
if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE
|
||||||
(gBattleMoves[move].target == MOVE_TARGET_BOTH || gBattleMoves[move].target == MOVE_TARGET_FOES_AND_ALLY))
|
&& (gBattleMoves[move].target == MOVE_TARGET_BOTH || gBattleMoves[move].target == MOVE_TARGET_FOES_AND_ALLY))
|
||||||
gBattleCommunication[MISS_TYPE] = B_MSG_AVOIDED_ATK;
|
gBattleCommunication[MISS_TYPE] = B_MSG_AVOIDED_ATK;
|
||||||
else
|
else
|
||||||
gBattleCommunication[MISS_TYPE] = B_MSG_MISSED;
|
gBattleCommunication[MISS_TYPE] = B_MSG_MISSED;
|
||||||
@@ -1191,6 +1192,7 @@ static void Cmd_attackstring(void)
|
|||||||
{
|
{
|
||||||
if (gBattleControllerExecFlags)
|
if (gBattleControllerExecFlags)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!(gHitMarker & (HITMARKER_NO_ATTACKSTRING | HITMARKER_ATTACKSTRING_PRINTED)))
|
if (!(gHitMarker & (HITMARKER_NO_ATTACKSTRING | HITMARKER_ATTACKSTRING_PRINTED)))
|
||||||
{
|
{
|
||||||
PrepareStringBattle(STRINGID_USEDMOVE, gBattlerAttacker);
|
PrepareStringBattle(STRINGID_USEDMOVE, gBattlerAttacker);
|
||||||
@@ -1496,7 +1498,8 @@ static void CheckWonderGuardAndLevitate(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ModulateDmgByType2(u8 multiplier, u16 move, u8* flags) // same as ModulateDmgByType except different arguments
|
// Same as ModulateDmgByType except different arguments
|
||||||
|
static void ModulateDmgByType2(u8 multiplier, u16 move, u8 *flags)
|
||||||
{
|
{
|
||||||
gBattleMoveDamage = gBattleMoveDamage * multiplier / 10;
|
gBattleMoveDamage = gBattleMoveDamage * multiplier / 10;
|
||||||
if (gBattleMoveDamage == 0 && multiplier != 0)
|
if (gBattleMoveDamage == 0 && multiplier != 0)
|
||||||
@@ -1694,7 +1697,8 @@ static void Cmd_adjustnormaldamage(void)
|
|||||||
gBattlescriptCurrInstr++;
|
gBattlescriptCurrInstr++;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Cmd_adjustnormaldamage2(void) // The same as adjustnormaldamage except it doesn't check for false swipe move effect.
|
// The same as adjustnormaldamage except it doesn't check for false swipe move effect.
|
||||||
|
static void Cmd_adjustnormaldamage2(void)
|
||||||
{
|
{
|
||||||
u8 holdEffect, param;
|
u8 holdEffect, param;
|
||||||
|
|
||||||
@@ -1777,8 +1781,8 @@ static void Cmd_attackanimation(void)
|
|||||||
multihit = gMultiHitCounter;
|
multihit = gMultiHitCounter;
|
||||||
|
|
||||||
BtlController_EmitMoveAnimation(BUFFER_A, gCurrentMove, gBattleScripting.animTurn, gBattleMovePower, gBattleMoveDamage, gBattleMons[gBattlerAttacker].friendship, &gDisableStructs[gBattlerAttacker], multihit);
|
BtlController_EmitMoveAnimation(BUFFER_A, gCurrentMove, gBattleScripting.animTurn, gBattleMovePower, gBattleMoveDamage, gBattleMons[gBattlerAttacker].friendship, &gDisableStructs[gBattlerAttacker], multihit);
|
||||||
gBattleScripting.animTurn += 1;
|
gBattleScripting.animTurn++;
|
||||||
gBattleScripting.animTargetsHit += 1;
|
gBattleScripting.animTargetsHit++;
|
||||||
MarkBattlerForControllerExec(gBattlerAttacker);
|
MarkBattlerForControllerExec(gBattlerAttacker);
|
||||||
gBattlescriptCurrInstr++;
|
gBattlescriptCurrInstr++;
|
||||||
}
|
}
|
||||||
@@ -2537,7 +2541,6 @@ void SetMoveEffect(bool8 primary, u8 certain)
|
|||||||
case MOVE_EFFECT_UPROAR:
|
case MOVE_EFFECT_UPROAR:
|
||||||
if (!(gBattleMons[gEffectBattler].status2 & STATUS2_UPROAR))
|
if (!(gBattleMons[gEffectBattler].status2 & STATUS2_UPROAR))
|
||||||
{
|
{
|
||||||
|
|
||||||
gBattleMons[gEffectBattler].status2 |= STATUS2_MULTIPLETURNS;
|
gBattleMons[gEffectBattler].status2 |= STATUS2_MULTIPLETURNS;
|
||||||
gLockedMoves[gEffectBattler] = gCurrentMove;
|
gLockedMoves[gEffectBattler] = gCurrentMove;
|
||||||
gBattleMons[gEffectBattler].status2 |= STATUS2_UPROAR_TURN((Random() & 3) + 2); // 2-5 turns
|
gBattleMons[gEffectBattler].status2 |= STATUS2_UPROAR_TURN((Random() & 3) + 2); // 2-5 turns
|
||||||
@@ -2754,7 +2757,7 @@ void SetMoveEffect(bool8 primary, u8 certain)
|
|||||||
{
|
{
|
||||||
u16 *changedItem = &gBattleStruct->changedItems[gBattlerAttacker];
|
u16 *changedItem = &gBattleStruct->changedItems[gBattlerAttacker];
|
||||||
gLastUsedItem = *changedItem = gBattleMons[gBattlerTarget].item;
|
gLastUsedItem = *changedItem = gBattleMons[gBattlerTarget].item;
|
||||||
gBattleMons[gBattlerTarget].item = 0;
|
gBattleMons[gBattlerTarget].item = ITEM_NONE;
|
||||||
|
|
||||||
gActiveBattler = gBattlerAttacker;
|
gActiveBattler = gBattlerAttacker;
|
||||||
BtlController_EmitSetMonData(BUFFER_A, REQUEST_HELDITEM_BATTLE, 0, sizeof(gLastUsedItem), &gLastUsedItem);
|
BtlController_EmitSetMonData(BUFFER_A, REQUEST_HELDITEM_BATTLE, 0, sizeof(gLastUsedItem), &gLastUsedItem);
|
||||||
@@ -2770,7 +2773,6 @@ void SetMoveEffect(bool8 primary, u8 certain)
|
|||||||
*(u8 *)((u8 *)(&gBattleStruct->choicedMove[gBattlerTarget]) + 0) = 0;
|
*(u8 *)((u8 *)(&gBattleStruct->choicedMove[gBattlerTarget]) + 0) = 0;
|
||||||
*(u8 *)((u8 *)(&gBattleStruct->choicedMove[gBattlerTarget]) + 1) = 0;
|
*(u8 *)((u8 *)(&gBattleStruct->choicedMove[gBattlerTarget]) + 1) = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MOVE_EFFECT_PREVENT_ESCAPE:
|
case MOVE_EFFECT_PREVENT_ESCAPE:
|
||||||
@@ -2834,7 +2836,7 @@ void SetMoveEffect(bool8 primary, u8 certain)
|
|||||||
case MOVE_EFFECT_KNOCK_OFF:
|
case MOVE_EFFECT_KNOCK_OFF:
|
||||||
if (gBattleMons[gEffectBattler].ability == ABILITY_STICKY_HOLD)
|
if (gBattleMons[gEffectBattler].ability == ABILITY_STICKY_HOLD)
|
||||||
{
|
{
|
||||||
if (gBattleMons[gEffectBattler].item == 0)
|
if (gBattleMons[gEffectBattler].item == ITEM_NONE)
|
||||||
{
|
{
|
||||||
gBattlescriptCurrInstr++;
|
gBattlescriptCurrInstr++;
|
||||||
}
|
}
|
||||||
@@ -2851,7 +2853,7 @@ void SetMoveEffect(bool8 primary, u8 certain)
|
|||||||
side = GetBattlerSide(gEffectBattler);
|
side = GetBattlerSide(gEffectBattler);
|
||||||
|
|
||||||
gLastUsedItem = gBattleMons[gEffectBattler].item;
|
gLastUsedItem = gBattleMons[gEffectBattler].item;
|
||||||
gBattleMons[gEffectBattler].item = 0;
|
gBattleMons[gEffectBattler].item = ITEM_NONE;
|
||||||
gWishFutureKnock.knockedOffMons[side] |= gBitTable[gBattlerPartyIndexes[gEffectBattler]];
|
gWishFutureKnock.knockedOffMons[side] |= gBitTable[gBattlerPartyIndexes[gEffectBattler]];
|
||||||
|
|
||||||
BattleScriptPush(gBattlescriptCurrInstr + 1);
|
BattleScriptPush(gBattlescriptCurrInstr + 1);
|
||||||
@@ -3055,7 +3057,7 @@ static void Cmd_jumpifstatus(void)
|
|||||||
u32 flags = T2_READ_32(gBattlescriptCurrInstr + 2);
|
u32 flags = T2_READ_32(gBattlescriptCurrInstr + 2);
|
||||||
const u8 *jumpPtr = T2_READ_PTR(gBattlescriptCurrInstr + 6);
|
const u8 *jumpPtr = T2_READ_PTR(gBattlescriptCurrInstr + 6);
|
||||||
|
|
||||||
if (gBattleMons[battlerId].status1 & flags && gBattleMons[battlerId].hp)
|
if (gBattleMons[battlerId].status1 & flags && gBattleMons[battlerId].hp != 0)
|
||||||
gBattlescriptCurrInstr = jumpPtr;
|
gBattlescriptCurrInstr = jumpPtr;
|
||||||
else
|
else
|
||||||
gBattlescriptCurrInstr += 10;
|
gBattlescriptCurrInstr += 10;
|
||||||
@@ -3067,7 +3069,7 @@ static void Cmd_jumpifstatus2(void)
|
|||||||
u32 flags = T2_READ_32(gBattlescriptCurrInstr + 2);
|
u32 flags = T2_READ_32(gBattlescriptCurrInstr + 2);
|
||||||
const u8 *jumpPtr = T2_READ_PTR(gBattlescriptCurrInstr + 6);
|
const u8 *jumpPtr = T2_READ_PTR(gBattlescriptCurrInstr + 6);
|
||||||
|
|
||||||
if (gBattleMons[battlerId].status2 & flags && gBattleMons[battlerId].hp)
|
if (gBattleMons[battlerId].status2 & flags && gBattleMons[battlerId].hp != 0)
|
||||||
gBattlescriptCurrInstr = jumpPtr;
|
gBattlescriptCurrInstr = jumpPtr;
|
||||||
else
|
else
|
||||||
gBattlescriptCurrInstr += 10;
|
gBattlescriptCurrInstr += 10;
|
||||||
@@ -3322,7 +3324,7 @@ static void Cmd_getexp(void)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// music change in wild battle after fainting a poke
|
// music change in wild battle after fainting a poke
|
||||||
if (!(gBattleTypeFlags & BATTLE_TYPE_TRAINER) && gBattleMons[0].hp && !gBattleStruct->wildVictorySong)
|
if (!(gBattleTypeFlags & BATTLE_TYPE_TRAINER) && gBattleMons[0].hp != 0 && !gBattleStruct->wildVictorySong)
|
||||||
{
|
{
|
||||||
BattleStopLowHpSound();
|
BattleStopLowHpSound();
|
||||||
PlayBGM(MUS_VICTORY_WILD);
|
PlayBGM(MUS_VICTORY_WILD);
|
||||||
@@ -3488,8 +3490,8 @@ static void Cmd_getexp(void)
|
|||||||
if (gBattleControllerExecFlags == 0)
|
if (gBattleControllerExecFlags == 0)
|
||||||
{
|
{
|
||||||
// not sure why gf clears the item and ability here
|
// not sure why gf clears the item and ability here
|
||||||
gBattleMons[gBattlerFainted].item = 0;
|
gBattleMons[gBattlerFainted].item = ITEM_NONE;
|
||||||
gBattleMons[gBattlerFainted].ability = 0;
|
gBattleMons[gBattlerFainted].ability = ABILITY_NONE;
|
||||||
gBattlescriptCurrInstr += 2;
|
gBattlescriptCurrInstr += 2;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -3931,7 +3933,8 @@ static void Cmd_end2(void)
|
|||||||
gCurrentActionFuncId = B_ACTION_TRY_FINISH;
|
gCurrentActionFuncId = B_ACTION_TRY_FINISH;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Cmd_end3(void) // pops the main function stack
|
// Pops the main function stack
|
||||||
|
static void Cmd_end3(void)
|
||||||
{
|
{
|
||||||
BattleScriptPop();
|
BattleScriptPop();
|
||||||
if (gBattleResources->battleCallbackStack->size != 0)
|
if (gBattleResources->battleCallbackStack->size != 0)
|
||||||
@@ -4244,7 +4247,7 @@ static void Cmd_moveend(void)
|
|||||||
effect = TRUE;
|
effect = TRUE;
|
||||||
gBattleScripting.moveendState++;
|
gBattleScripting.moveendState++;
|
||||||
break;
|
break;
|
||||||
case MOVEEND_ON_DAMAGE_ABILITIES: // Contact abilities and Color Change
|
case MOVEEND_ON_DAMAGE_ABILITIES: // Such as abilities activating on contact (Effect Spore, Rough Skin, etc.).
|
||||||
if (AbilityBattleEffects(ABILITYEFFECT_ON_DAMAGE, gBattlerTarget, 0, 0, 0))
|
if (AbilityBattleEffects(ABILITYEFFECT_ON_DAMAGE, gBattlerTarget, 0, 0, 0))
|
||||||
effect = TRUE;
|
effect = TRUE;
|
||||||
gBattleScripting.moveendState++;
|
gBattleScripting.moveendState++;
|
||||||
@@ -4268,19 +4271,19 @@ static void Cmd_moveend(void)
|
|||||||
{
|
{
|
||||||
if (gChosenMove == MOVE_BATON_PASS && !(gMoveResultFlags & MOVE_RESULT_FAILED))
|
if (gChosenMove == MOVE_BATON_PASS && !(gMoveResultFlags & MOVE_RESULT_FAILED))
|
||||||
{
|
{
|
||||||
++gBattleScripting.moveendState;
|
gBattleScripting.moveendState++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
*choicedMoveAtk = gChosenMove;
|
*choicedMoveAtk = gChosenMove;
|
||||||
}
|
}
|
||||||
for (i = 0; i < MAX_MON_MOVES; ++i)
|
for (i = 0; i < MAX_MON_MOVES; i++)
|
||||||
{
|
{
|
||||||
if (gBattleMons[gBattlerAttacker].moves[i] == *choicedMoveAtk)
|
if (gBattleMons[gBattlerAttacker].moves[i] == *choicedMoveAtk)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (i == MAX_MON_MOVES)
|
if (i == MAX_MON_MOVES)
|
||||||
*choicedMoveAtk = MOVE_NONE;
|
*choicedMoveAtk = MOVE_NONE;
|
||||||
++gBattleScripting.moveendState;
|
gBattleScripting.moveendState++;
|
||||||
break;
|
break;
|
||||||
case MOVEEND_CHANGED_ITEMS: // changed held items
|
case MOVEEND_CHANGED_ITEMS: // changed held items
|
||||||
for (i = 0; i < gBattlersCount; i++)
|
for (i = 0; i < gBattlersCount; i++)
|
||||||
@@ -4609,7 +4612,7 @@ static void Cmd_switchindataupdate(void)
|
|||||||
i = GetBattlerSide(gActiveBattler);
|
i = GetBattlerSide(gActiveBattler);
|
||||||
if (gWishFutureKnock.knockedOffMons[i] & gBitTable[gBattlerPartyIndexes[gActiveBattler]])
|
if (gWishFutureKnock.knockedOffMons[i] & gBitTable[gBattlerPartyIndexes[gActiveBattler]])
|
||||||
{
|
{
|
||||||
gBattleMons[gActiveBattler].item = 0;
|
gBattleMons[gActiveBattler].item = ITEM_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gBattleMoves[gCurrentMove].effect == EFFECT_BATON_PASS)
|
if (gBattleMoves[gCurrentMove].effect == EFFECT_BATON_PASS)
|
||||||
@@ -5251,7 +5254,7 @@ static void Cmd_switchineffects(void)
|
|||||||
u32 hitmarkerFaintBits = gHitMarker >> 28;
|
u32 hitmarkerFaintBits = gHitMarker >> 28;
|
||||||
|
|
||||||
gBattlerFainted++;
|
gBattlerFainted++;
|
||||||
while (1)
|
while (TRUE)
|
||||||
{
|
{
|
||||||
if (hitmarkerFaintBits & gBitTable[gBattlerFainted] && !(gAbsentBattlerFlags & gBitTable[gBattlerFainted]))
|
if (hitmarkerFaintBits & gBitTable[gBattlerFainted] && !(gAbsentBattlerFlags & gBitTable[gBattlerFainted]))
|
||||||
break;
|
break;
|
||||||
@@ -5824,7 +5827,8 @@ static void Cmd_cancelallactions(void)
|
|||||||
gBattlescriptCurrInstr++;
|
gBattlescriptCurrInstr++;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Cmd_adjustsetdamage(void) // The same as adjustnormaldamage, except there's no random damage multiplier.
|
// The same as adjustnormaldamage, except there's no random damage multiplier.
|
||||||
|
static void Cmd_adjustsetdamage(void)
|
||||||
{
|
{
|
||||||
u8 holdEffect, param;
|
u8 holdEffect, param;
|
||||||
|
|
||||||
@@ -5872,7 +5876,7 @@ static void Cmd_removeitem(void)
|
|||||||
|
|
||||||
usedHeldItem = &gBattleStruct->usedHeldItems[gActiveBattler];
|
usedHeldItem = &gBattleStruct->usedHeldItems[gActiveBattler];
|
||||||
*usedHeldItem = gBattleMons[gActiveBattler].item;
|
*usedHeldItem = gBattleMons[gActiveBattler].item;
|
||||||
gBattleMons[gActiveBattler].item = 0;
|
gBattleMons[gActiveBattler].item = ITEM_NONE;
|
||||||
|
|
||||||
BtlController_EmitSetMonData(BUFFER_A, REQUEST_HELDITEM_BATTLE, 0, sizeof(gBattleMons[gActiveBattler].item), &gBattleMons[gActiveBattler].item);
|
BtlController_EmitSetMonData(BUFFER_A, REQUEST_HELDITEM_BATTLE, 0, sizeof(gBattleMons[gActiveBattler].item), &gBattleMons[gActiveBattler].item);
|
||||||
MarkBattlerForControllerExec(gActiveBattler);
|
MarkBattlerForControllerExec(gActiveBattler);
|
||||||
@@ -6223,19 +6227,19 @@ static void Cmd_jumpifplayerran(void)
|
|||||||
|
|
||||||
static void Cmd_hpthresholds(void)
|
static void Cmd_hpthresholds(void)
|
||||||
{
|
{
|
||||||
u8 opposingBank;
|
u8 opposingBattler;
|
||||||
s32 result;
|
s32 result;
|
||||||
|
|
||||||
if (!(gBattleTypeFlags & BATTLE_TYPE_DOUBLE))
|
if (!(gBattleTypeFlags & BATTLE_TYPE_DOUBLE))
|
||||||
{
|
{
|
||||||
gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]);
|
gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]);
|
||||||
opposingBank = gActiveBattler ^ BIT_SIDE;
|
opposingBattler = gActiveBattler ^ BIT_SIDE;
|
||||||
|
|
||||||
result = gBattleMons[opposingBank].hp * 100 / gBattleMons[opposingBank].maxHP;
|
result = gBattleMons[opposingBattler].hp * 100 / gBattleMons[opposingBattler].maxHP;
|
||||||
if (result == 0)
|
if (result == 0)
|
||||||
result = 1;
|
result = 1;
|
||||||
|
|
||||||
if (result > 69 || !gBattleMons[opposingBank].hp)
|
if (result > 69 || gBattleMons[opposingBattler].hp == 0)
|
||||||
gBattleStruct->hpScale = 0;
|
gBattleStruct->hpScale = 0;
|
||||||
else if (result > 39)
|
else if (result > 39)
|
||||||
gBattleStruct->hpScale = 1;
|
gBattleStruct->hpScale = 1;
|
||||||
@@ -6250,18 +6254,18 @@ static void Cmd_hpthresholds(void)
|
|||||||
|
|
||||||
static void Cmd_hpthresholds2(void)
|
static void Cmd_hpthresholds2(void)
|
||||||
{
|
{
|
||||||
u8 opposingBank;
|
u8 opposingBattler;
|
||||||
s32 result;
|
s32 result;
|
||||||
u8 hpSwitchout;
|
u8 hpSwitchout;
|
||||||
|
|
||||||
if (!(gBattleTypeFlags & BATTLE_TYPE_DOUBLE))
|
if (!(gBattleTypeFlags & BATTLE_TYPE_DOUBLE))
|
||||||
{
|
{
|
||||||
gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]);
|
gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]);
|
||||||
opposingBank = gActiveBattler ^ BIT_SIDE;
|
opposingBattler = gActiveBattler ^ BIT_SIDE;
|
||||||
hpSwitchout = *(gBattleStruct->hpOnSwitchout + GetBattlerSide(opposingBank));
|
hpSwitchout = *(gBattleStruct->hpOnSwitchout + GetBattlerSide(opposingBattler));
|
||||||
result = (hpSwitchout - gBattleMons[opposingBank].hp) * 100 / hpSwitchout;
|
result = (hpSwitchout - gBattleMons[opposingBattler].hp) * 100 / hpSwitchout;
|
||||||
|
|
||||||
if (gBattleMons[opposingBank].hp >= hpSwitchout)
|
if (gBattleMons[opposingBattler].hp >= hpSwitchout)
|
||||||
gBattleStruct->hpScale = 0;
|
gBattleStruct->hpScale = 0;
|
||||||
else if (result <= 29)
|
else if (result <= 29)
|
||||||
gBattleStruct->hpScale = 1;
|
gBattleStruct->hpScale = 1;
|
||||||
@@ -6278,7 +6282,7 @@ static void Cmd_useitemonopponent(void)
|
|||||||
{
|
{
|
||||||
gBattlerInMenuId = gBattlerAttacker;
|
gBattlerInMenuId = gBattlerAttacker;
|
||||||
PokemonUseItemEffects(&gEnemyParty[gBattlerPartyIndexes[gBattlerAttacker]], gLastUsedItem, gBattlerPartyIndexes[gBattlerAttacker], 0, TRUE);
|
PokemonUseItemEffects(&gEnemyParty[gBattlerPartyIndexes[gBattlerAttacker]], gLastUsedItem, gBattlerPartyIndexes[gBattlerAttacker], 0, TRUE);
|
||||||
gBattlescriptCurrInstr += 1;
|
gBattlescriptCurrInstr++;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Cmd_various(void)
|
static void Cmd_various(void)
|
||||||
@@ -6335,7 +6339,7 @@ static void Cmd_various(void)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (i == MAX_MON_MOVES)
|
if (i == MAX_MON_MOVES)
|
||||||
*choicedMove = 0;
|
*choicedMove = MOVE_NONE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case VARIOUS_RESET_PLAYER_FAINTED:
|
case VARIOUS_RESET_PLAYER_FAINTED:
|
||||||
@@ -6462,7 +6466,8 @@ static void Cmd_various(void)
|
|||||||
gBattlescriptCurrInstr += 3;
|
gBattlescriptCurrInstr += 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Cmd_setprotectlike(void) // protect and endure
|
// Protect and Endure
|
||||||
|
static void Cmd_setprotectlike(void)
|
||||||
{
|
{
|
||||||
bool8 notLastTurn = TRUE;
|
bool8 notLastTurn = TRUE;
|
||||||
u16 lastMove = gLastResultingMoves[gBattlerAttacker];
|
u16 lastMove = gLastResultingMoves[gBattlerAttacker];
|
||||||
@@ -6606,8 +6611,7 @@ static void Cmd_trymirrormove(void)
|
|||||||
{
|
{
|
||||||
if (i != gBattlerAttacker)
|
if (i != gBattlerAttacker)
|
||||||
{
|
{
|
||||||
move = *(i * 2 + gBattlerAttacker * 8 + (u8*)(gBattleStruct->lastTakenMoveFrom) + 0)
|
move = T1_READ_16(i * 2 + gBattlerAttacker * 8 + gBattleStruct->lastTakenMoveFrom);
|
||||||
| (*(i * 2 + gBattlerAttacker * 8 + (u8*)(gBattleStruct->lastTakenMoveFrom) + 1) << 8);
|
|
||||||
|
|
||||||
if (move != MOVE_NONE && move != MOVE_UNAVAILABLE)
|
if (move != MOVE_NONE && move != MOVE_UNAVAILABLE)
|
||||||
{
|
{
|
||||||
@@ -6617,8 +6621,7 @@ static void Cmd_trymirrormove(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
move = *(gBattleStruct->lastTakenMove + gBattlerAttacker * 2 + 0)
|
move = T1_READ_16(gBattleStruct->lastTakenMove + gBattlerAttacker * 2);
|
||||||
| (*(gBattleStruct->lastTakenMove + gBattlerAttacker * 2 + 1) << 8);
|
|
||||||
|
|
||||||
if (move != MOVE_NONE && move != MOVE_UNAVAILABLE)
|
if (move != MOVE_NONE && move != MOVE_UNAVAILABLE)
|
||||||
{
|
{
|
||||||
@@ -6895,8 +6898,8 @@ static void Cmd_negativedamage(void)
|
|||||||
gBattlescriptCurrInstr++;
|
gBattlescriptCurrInstr++;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define STAT_BUFF_WORKED 0
|
#define STAT_CHANGE_WORKED 0
|
||||||
#define STAT_BUFF_DIDNT_WORK 1
|
#define STAT_CHANGE_DIDNT_WORK 1
|
||||||
|
|
||||||
static u8 ChangeStatBuffs(s8 statValue, u8 statId, u8 flags, const u8 *BS_ptr)
|
static u8 ChangeStatBuffs(s8 statValue, u8 statId, u8 flags, const u8 *BS_ptr)
|
||||||
{
|
{
|
||||||
@@ -6915,9 +6918,9 @@ static u8 ChangeStatBuffs(s8 statValue, u8 statId, u8 flags, const u8 *BS_ptr)
|
|||||||
certain++;
|
certain++;
|
||||||
flags &= ~MOVE_EFFECT_CERTAIN;
|
flags &= ~MOVE_EFFECT_CERTAIN;
|
||||||
|
|
||||||
if (flags & STAT_BUFF_NOT_PROTECT_AFFECTED)
|
if (flags & STAT_CHANGE_NOT_PROTECT_AFFECTED)
|
||||||
notProtectAffected++;
|
notProtectAffected++;
|
||||||
flags &= ~STAT_BUFF_NOT_PROTECT_AFFECTED;
|
flags &= ~STAT_CHANGE_NOT_PROTECT_AFFECTED;
|
||||||
|
|
||||||
PREPARE_STAT_BUFFER(gBattleTextBuff1, statId)
|
PREPARE_STAT_BUFFER(gBattleTextBuff1, statId)
|
||||||
|
|
||||||
@@ -6926,7 +6929,7 @@ static u8 ChangeStatBuffs(s8 statValue, u8 statId, u8 flags, const u8 *BS_ptr)
|
|||||||
if (gSideTimers[GET_BATTLER_SIDE(gActiveBattler)].mistTimer
|
if (gSideTimers[GET_BATTLER_SIDE(gActiveBattler)].mistTimer
|
||||||
&& !certain && gCurrentMove != MOVE_CURSE)
|
&& !certain && gCurrentMove != MOVE_CURSE)
|
||||||
{
|
{
|
||||||
if (flags == STAT_BUFF_ALLOW_PTR)
|
if (flags == STAT_CHANGE_ALLOW_PTR)
|
||||||
{
|
{
|
||||||
if (gSpecialStatuses[gActiveBattler].statLowered)
|
if (gSpecialStatuses[gActiveBattler].statLowered)
|
||||||
{
|
{
|
||||||
@@ -6940,19 +6943,19 @@ static u8 ChangeStatBuffs(s8 statValue, u8 statId, u8 flags, const u8 *BS_ptr)
|
|||||||
gSpecialStatuses[gActiveBattler].statLowered = 1;
|
gSpecialStatuses[gActiveBattler].statLowered = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return STAT_BUFF_DIDNT_WORK;
|
return STAT_CHANGE_DIDNT_WORK;
|
||||||
}
|
}
|
||||||
else if (gCurrentMove != MOVE_CURSE
|
else if (gCurrentMove != MOVE_CURSE
|
||||||
&& notProtectAffected != TRUE && JumpIfMoveAffectedByProtect(0))
|
&& notProtectAffected != TRUE && JumpIfMoveAffectedByProtect(0))
|
||||||
{
|
{
|
||||||
gBattlescriptCurrInstr = BattleScript_ButItFailed;
|
gBattlescriptCurrInstr = BattleScript_ButItFailed;
|
||||||
return STAT_BUFF_DIDNT_WORK;
|
return STAT_CHANGE_DIDNT_WORK;
|
||||||
}
|
}
|
||||||
else if ((gBattleMons[gActiveBattler].ability == ABILITY_CLEAR_BODY
|
else if ((gBattleMons[gActiveBattler].ability == ABILITY_CLEAR_BODY
|
||||||
|| gBattleMons[gActiveBattler].ability == ABILITY_WHITE_SMOKE)
|
|| gBattleMons[gActiveBattler].ability == ABILITY_WHITE_SMOKE)
|
||||||
&& !certain && gCurrentMove != MOVE_CURSE)
|
&& !certain && gCurrentMove != MOVE_CURSE)
|
||||||
{
|
{
|
||||||
if (flags == STAT_BUFF_ALLOW_PTR)
|
if (flags == STAT_CHANGE_ALLOW_PTR)
|
||||||
{
|
{
|
||||||
if (gSpecialStatuses[gActiveBattler].statLowered)
|
if (gSpecialStatuses[gActiveBattler].statLowered)
|
||||||
{
|
{
|
||||||
@@ -6968,12 +6971,12 @@ static u8 ChangeStatBuffs(s8 statValue, u8 statId, u8 flags, const u8 *BS_ptr)
|
|||||||
gSpecialStatuses[gActiveBattler].statLowered = 1;
|
gSpecialStatuses[gActiveBattler].statLowered = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return STAT_BUFF_DIDNT_WORK;
|
return STAT_CHANGE_DIDNT_WORK;
|
||||||
}
|
}
|
||||||
else if (gBattleMons[gActiveBattler].ability == ABILITY_KEEN_EYE
|
else if (gBattleMons[gActiveBattler].ability == ABILITY_KEEN_EYE
|
||||||
&& !certain && statId == STAT_ACC)
|
&& !certain && statId == STAT_ACC)
|
||||||
{
|
{
|
||||||
if (flags == STAT_BUFF_ALLOW_PTR)
|
if (flags == STAT_CHANGE_ALLOW_PTR)
|
||||||
{
|
{
|
||||||
BattleScriptPush(BS_ptr);
|
BattleScriptPush(BS_ptr);
|
||||||
gBattleScripting.battler = gActiveBattler;
|
gBattleScripting.battler = gActiveBattler;
|
||||||
@@ -6981,12 +6984,12 @@ static u8 ChangeStatBuffs(s8 statValue, u8 statId, u8 flags, const u8 *BS_ptr)
|
|||||||
gLastUsedAbility = gBattleMons[gActiveBattler].ability;
|
gLastUsedAbility = gBattleMons[gActiveBattler].ability;
|
||||||
RecordAbilityBattle(gActiveBattler, gLastUsedAbility);
|
RecordAbilityBattle(gActiveBattler, gLastUsedAbility);
|
||||||
}
|
}
|
||||||
return STAT_BUFF_DIDNT_WORK;
|
return STAT_CHANGE_DIDNT_WORK;
|
||||||
}
|
}
|
||||||
else if (gBattleMons[gActiveBattler].ability == ABILITY_HYPER_CUTTER
|
else if (gBattleMons[gActiveBattler].ability == ABILITY_HYPER_CUTTER
|
||||||
&& !certain && statId == STAT_ATK)
|
&& !certain && statId == STAT_ATK)
|
||||||
{
|
{
|
||||||
if (flags == STAT_BUFF_ALLOW_PTR)
|
if (flags == STAT_CHANGE_ALLOW_PTR)
|
||||||
{
|
{
|
||||||
BattleScriptPush(BS_ptr);
|
BattleScriptPush(BS_ptr);
|
||||||
gBattleScripting.battler = gActiveBattler;
|
gBattleScripting.battler = gActiveBattler;
|
||||||
@@ -6994,11 +6997,11 @@ static u8 ChangeStatBuffs(s8 statValue, u8 statId, u8 flags, const u8 *BS_ptr)
|
|||||||
gLastUsedAbility = gBattleMons[gActiveBattler].ability;
|
gLastUsedAbility = gBattleMons[gActiveBattler].ability;
|
||||||
RecordAbilityBattle(gActiveBattler, gLastUsedAbility);
|
RecordAbilityBattle(gActiveBattler, gLastUsedAbility);
|
||||||
}
|
}
|
||||||
return STAT_BUFF_DIDNT_WORK;
|
return STAT_CHANGE_DIDNT_WORK;
|
||||||
}
|
}
|
||||||
else if (gBattleMons[gActiveBattler].ability == ABILITY_SHIELD_DUST && flags == 0)
|
else if (gBattleMons[gActiveBattler].ability == ABILITY_SHIELD_DUST && flags == 0)
|
||||||
{
|
{
|
||||||
return STAT_BUFF_DIDNT_WORK;
|
return STAT_CHANGE_DIDNT_WORK;
|
||||||
}
|
}
|
||||||
else // try to decrease
|
else // try to decrease
|
||||||
{
|
{
|
||||||
@@ -7012,19 +7015,15 @@ static u8 ChangeStatBuffs(s8 statValue, u8 statId, u8 flags, const u8 *BS_ptr)
|
|||||||
gBattleTextBuff2[3] = STRINGID_STATHARSHLY >> 8;
|
gBattleTextBuff2[3] = STRINGID_STATHARSHLY >> 8;
|
||||||
index = 4;
|
index = 4;
|
||||||
}
|
}
|
||||||
gBattleTextBuff2[index] = B_BUFF_STRING;
|
gBattleTextBuff2[index++] = B_BUFF_STRING;
|
||||||
index++;
|
gBattleTextBuff2[index++] = STRINGID_STATFELL;
|
||||||
gBattleTextBuff2[index] = STRINGID_STATFELL;
|
gBattleTextBuff2[index++] = STRINGID_STATFELL >> 8;
|
||||||
index++;
|
|
||||||
gBattleTextBuff2[index] = STRINGID_STATFELL >> 8;
|
|
||||||
index++;
|
|
||||||
gBattleTextBuff2[index] = B_BUFF_EOS;
|
gBattleTextBuff2[index] = B_BUFF_EOS;
|
||||||
|
|
||||||
if (gBattleMons[gActiveBattler].statStages[statId] == MIN_STAT_STAGE)
|
if (gBattleMons[gActiveBattler].statStages[statId] == MIN_STAT_STAGE)
|
||||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_STAT_WONT_DECREASE;
|
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_STAT_WONT_DECREASE;
|
||||||
else
|
else
|
||||||
gBattleCommunication[MULTISTRING_CHOOSER] = (gBattlerTarget == gActiveBattler); // B_MSG_ATTACKER_STAT_FELL or B_MSG_DEFENDER_STAT_FELL
|
gBattleCommunication[MULTISTRING_CHOOSER] = (gBattlerTarget == gActiveBattler); // B_MSG_ATTACKER_STAT_FELL or B_MSG_DEFENDER_STAT_FELL
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else // stat increase
|
else // stat increase
|
||||||
@@ -7039,12 +7038,9 @@ static u8 ChangeStatBuffs(s8 statValue, u8 statId, u8 flags, const u8 *BS_ptr)
|
|||||||
gBattleTextBuff2[3] = STRINGID_STATSHARPLY >> 8;
|
gBattleTextBuff2[3] = STRINGID_STATSHARPLY >> 8;
|
||||||
index = 4;
|
index = 4;
|
||||||
}
|
}
|
||||||
gBattleTextBuff2[index] = B_BUFF_STRING;
|
gBattleTextBuff2[index++] = B_BUFF_STRING;
|
||||||
index++;
|
gBattleTextBuff2[index++] = STRINGID_STATROSE;
|
||||||
gBattleTextBuff2[index] = STRINGID_STATROSE;
|
gBattleTextBuff2[index++] = STRINGID_STATROSE >> 8;
|
||||||
index++;
|
|
||||||
gBattleTextBuff2[index] = STRINGID_STATROSE >> 8;
|
|
||||||
index++;
|
|
||||||
gBattleTextBuff2[index] = B_BUFF_EOS;
|
gBattleTextBuff2[index] = B_BUFF_EOS;
|
||||||
|
|
||||||
if (gBattleMons[gActiveBattler].statStages[statId] == MAX_STAT_STAGE)
|
if (gBattleMons[gActiveBattler].statStages[statId] == MAX_STAT_STAGE)
|
||||||
@@ -7059,23 +7055,24 @@ static u8 ChangeStatBuffs(s8 statValue, u8 statId, u8 flags, const u8 *BS_ptr)
|
|||||||
if (gBattleMons[gActiveBattler].statStages[statId] > MAX_STAT_STAGE)
|
if (gBattleMons[gActiveBattler].statStages[statId] > MAX_STAT_STAGE)
|
||||||
gBattleMons[gActiveBattler].statStages[statId] = MAX_STAT_STAGE;
|
gBattleMons[gActiveBattler].statStages[statId] = MAX_STAT_STAGE;
|
||||||
|
|
||||||
if (gBattleCommunication[MULTISTRING_CHOOSER] == B_MSG_STAT_WONT_INCREASE && flags & STAT_BUFF_ALLOW_PTR)
|
if (gBattleCommunication[MULTISTRING_CHOOSER] == B_MSG_STAT_WONT_INCREASE && flags & STAT_CHANGE_ALLOW_PTR)
|
||||||
gMoveResultFlags |= MOVE_RESULT_MISSED;
|
gMoveResultFlags |= MOVE_RESULT_MISSED;
|
||||||
|
|
||||||
if (gBattleCommunication[MULTISTRING_CHOOSER] == B_MSG_STAT_WONT_INCREASE && !(flags & STAT_BUFF_ALLOW_PTR))
|
if (gBattleCommunication[MULTISTRING_CHOOSER] == B_MSG_STAT_WONT_INCREASE && !(flags & STAT_CHANGE_ALLOW_PTR))
|
||||||
return STAT_BUFF_DIDNT_WORK;
|
return STAT_CHANGE_DIDNT_WORK;
|
||||||
|
|
||||||
return STAT_BUFF_WORKED;
|
return STAT_CHANGE_WORKED;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Cmd_statbuffchange(void)
|
static void Cmd_statbuffchange(void)
|
||||||
{
|
{
|
||||||
const u8 *jumpPtr = T1_READ_PTR(gBattlescriptCurrInstr + 2);
|
const u8 *jumpPtr = T1_READ_PTR(gBattlescriptCurrInstr + 2);
|
||||||
if (ChangeStatBuffs(gBattleScripting.statChanger & 0xF0, GET_STAT_BUFF_ID(gBattleScripting.statChanger), gBattlescriptCurrInstr[1], jumpPtr) == STAT_BUFF_WORKED)
|
if (ChangeStatBuffs(gBattleScripting.statChanger & 0xF0, GET_STAT_BUFF_ID(gBattleScripting.statChanger), gBattlescriptCurrInstr[1], jumpPtr) == STAT_CHANGE_WORKED)
|
||||||
gBattlescriptCurrInstr += 6;
|
gBattlescriptCurrInstr += 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Cmd_normalisebuffs(void) // haze
|
// Haze
|
||||||
|
static void Cmd_normalisebuffs(void)
|
||||||
{
|
{
|
||||||
s32 i, j;
|
s32 i, j;
|
||||||
|
|
||||||
@@ -7178,15 +7175,15 @@ static void Cmd_forcerandomswitch(void)
|
|||||||
{
|
{
|
||||||
if ((gBattlerTarget & BIT_FLANK) != B_FLANK_LEFT)
|
if ((gBattlerTarget & BIT_FLANK) != B_FLANK_LEFT)
|
||||||
{
|
{
|
||||||
firstMonId = 3;
|
firstMonId = PARTY_SIZE / 2;
|
||||||
lastMonId = 6;
|
lastMonId = PARTY_SIZE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
firstMonId = 0;
|
firstMonId = 0;
|
||||||
lastMonId = 3;
|
lastMonId = PARTY_SIZE / 2;
|
||||||
}
|
}
|
||||||
monsCount = 3;
|
monsCount = PARTY_SIZE / 2;
|
||||||
minNeeded = 1;
|
minNeeded = 1;
|
||||||
battler2PartyId = gBattlerPartyIndexes[gBattlerTarget];
|
battler2PartyId = gBattlerPartyIndexes[gBattlerTarget];
|
||||||
battler1PartyId = gBattlerPartyIndexes[gBattlerTarget ^ BIT_FLANK];
|
battler1PartyId = gBattlerPartyIndexes[gBattlerTarget ^ BIT_FLANK];
|
||||||
@@ -7196,15 +7193,15 @@ static void Cmd_forcerandomswitch(void)
|
|||||||
{
|
{
|
||||||
if (GetLinkTrainerFlankId(GetBattlerMultiplayerId(gBattlerTarget)) == B_FLANK_RIGHT)
|
if (GetLinkTrainerFlankId(GetBattlerMultiplayerId(gBattlerTarget)) == B_FLANK_RIGHT)
|
||||||
{
|
{
|
||||||
firstMonId = 3;
|
firstMonId = PARTY_SIZE / 2;
|
||||||
lastMonId = 6;
|
lastMonId = PARTY_SIZE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
firstMonId = 0;
|
firstMonId = 0;
|
||||||
lastMonId = 3;
|
lastMonId = PARTY_SIZE / 2;
|
||||||
}
|
}
|
||||||
monsCount = 3;
|
monsCount = PARTY_SIZE / 2;
|
||||||
minNeeded = 1;
|
minNeeded = 1;
|
||||||
battler2PartyId = gBattlerPartyIndexes[gBattlerTarget];
|
battler2PartyId = gBattlerPartyIndexes[gBattlerTarget];
|
||||||
battler1PartyId = gBattlerPartyIndexes[gBattlerTarget ^ BIT_FLANK];
|
battler1PartyId = gBattlerPartyIndexes[gBattlerTarget ^ BIT_FLANK];
|
||||||
@@ -7214,23 +7211,23 @@ static void Cmd_forcerandomswitch(void)
|
|||||||
if (GetBattlerSide(gBattlerTarget) == B_SIDE_PLAYER)
|
if (GetBattlerSide(gBattlerTarget) == B_SIDE_PLAYER)
|
||||||
{
|
{
|
||||||
firstMonId = 0;
|
firstMonId = 0;
|
||||||
lastMonId = 6;
|
lastMonId = PARTY_SIZE;
|
||||||
monsCount = 6;
|
monsCount = PARTY_SIZE;
|
||||||
minNeeded = 2; // since there are two opponents, it has to be a double battle
|
minNeeded = 2; // since there are two opponents, it has to be a double battle
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ((gBattlerTarget & BIT_FLANK) != B_FLANK_LEFT)
|
if ((gBattlerTarget & BIT_FLANK) != B_FLANK_LEFT)
|
||||||
{
|
{
|
||||||
firstMonId = 3;
|
firstMonId = PARTY_SIZE / 2;
|
||||||
lastMonId = 6;
|
lastMonId = PARTY_SIZE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
firstMonId = 0;
|
firstMonId = 0;
|
||||||
lastMonId = 3;
|
lastMonId = PARTY_SIZE / 2;
|
||||||
}
|
}
|
||||||
monsCount = 3;
|
monsCount = PARTY_SIZE / 2;
|
||||||
minNeeded = 1;
|
minNeeded = 1;
|
||||||
}
|
}
|
||||||
battler2PartyId = gBattlerPartyIndexes[gBattlerTarget];
|
battler2PartyId = gBattlerPartyIndexes[gBattlerTarget];
|
||||||
@@ -7239,8 +7236,8 @@ static void Cmd_forcerandomswitch(void)
|
|||||||
else if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE)
|
else if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE)
|
||||||
{
|
{
|
||||||
firstMonId = 0;
|
firstMonId = 0;
|
||||||
lastMonId = 6;
|
lastMonId = PARTY_SIZE;
|
||||||
monsCount = 6;
|
monsCount = PARTY_SIZE;
|
||||||
minNeeded = 2;
|
minNeeded = 2;
|
||||||
battler2PartyId = gBattlerPartyIndexes[gBattlerTarget];
|
battler2PartyId = gBattlerPartyIndexes[gBattlerTarget];
|
||||||
battler1PartyId = gBattlerPartyIndexes[gBattlerTarget ^ BIT_FLANK];
|
battler1PartyId = gBattlerPartyIndexes[gBattlerTarget ^ BIT_FLANK];
|
||||||
@@ -7248,8 +7245,8 @@ static void Cmd_forcerandomswitch(void)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
firstMonId = 0;
|
firstMonId = 0;
|
||||||
lastMonId = 6;
|
lastMonId = PARTY_SIZE;
|
||||||
monsCount = 6;
|
monsCount = PARTY_SIZE;
|
||||||
minNeeded = 1;
|
minNeeded = 1;
|
||||||
battler2PartyId = gBattlerPartyIndexes[gBattlerTarget]; // there is only one pokemon out in single battles
|
battler2PartyId = gBattlerPartyIndexes[gBattlerTarget]; // there is only one pokemon out in single battles
|
||||||
battler1PartyId = gBattlerPartyIndexes[gBattlerTarget];
|
battler1PartyId = gBattlerPartyIndexes[gBattlerTarget];
|
||||||
@@ -7309,7 +7306,8 @@ static void Cmd_forcerandomswitch(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Cmd_tryconversiontypechange(void) // randomly changes user's type to one of its moves' type
|
// Randomly changes user's type to one of its moves' type
|
||||||
|
static void Cmd_tryconversiontypechange(void)
|
||||||
{
|
{
|
||||||
u8 validMoves = 0;
|
u8 validMoves = 0;
|
||||||
u8 moveChecked;
|
u8 moveChecked;
|
||||||
@@ -7349,7 +7347,6 @@ static void Cmd_tryconversiontypechange(void) // randomly changes user's type to
|
|||||||
{
|
{
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
|
||||||
while ((moveChecked = Random() & (MAX_MON_MOVES - 1)) >= validMoves);
|
while ((moveChecked = Random() & (MAX_MON_MOVES - 1)) >= validMoves);
|
||||||
|
|
||||||
moveType = gBattleMoves[gBattleMons[gBattlerAttacker].moves[moveChecked]].type;
|
moveType = gBattleMoves[gBattleMons[gBattlerAttacker].moves[moveChecked]].type;
|
||||||
@@ -7497,7 +7494,8 @@ static void Cmd_tryKO(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Cmd_damagetohalftargethp(void) // super fang
|
// Super Fang
|
||||||
|
static void Cmd_damagetohalftargethp(void)
|
||||||
{
|
{
|
||||||
gBattleMoveDamage = gBattleMons[gBattlerTarget].hp / 2;
|
gBattleMoveDamage = gBattleMons[gBattlerTarget].hp / 2;
|
||||||
if (gBattleMoveDamage == 0)
|
if (gBattleMoveDamage == 0)
|
||||||
@@ -7793,7 +7791,6 @@ static void Cmd_mimicattackcopy(void)
|
|||||||
else
|
else
|
||||||
gBattleMons[gBattlerAttacker].pp[gCurrMovePos] = 5;
|
gBattleMons[gBattlerAttacker].pp[gCurrMovePos] = 5;
|
||||||
|
|
||||||
|
|
||||||
PREPARE_MOVE_BUFFER(gBattleTextBuff1, gLastMoves[gBattlerTarget])
|
PREPARE_MOVE_BUFFER(gBattleTextBuff1, gLastMoves[gBattlerTarget])
|
||||||
|
|
||||||
gDisableStructs[gBattlerAttacker].mimickedMoves |= gBitTable[gCurrMovePos];
|
gDisableStructs[gBattlerAttacker].mimickedMoves |= gBitTable[gCurrMovePos];
|
||||||
@@ -7808,7 +7805,7 @@ static void Cmd_mimicattackcopy(void)
|
|||||||
|
|
||||||
static void Cmd_metronome(void)
|
static void Cmd_metronome(void)
|
||||||
{
|
{
|
||||||
while (1)
|
while (TRUE)
|
||||||
{
|
{
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
@@ -7819,7 +7816,7 @@ static void Cmd_metronome(void)
|
|||||||
for (i = 0; i < MAX_MON_MOVES; i++); // ?
|
for (i = 0; i < MAX_MON_MOVES; i++); // ?
|
||||||
|
|
||||||
i = -1;
|
i = -1;
|
||||||
while (1)
|
while (TRUE)
|
||||||
{
|
{
|
||||||
i++;
|
i++;
|
||||||
if (sMovesForbiddenToCopy[i] == gCurrentMove)
|
if (sMovesForbiddenToCopy[i] == gCurrentMove)
|
||||||
@@ -7880,7 +7877,8 @@ static void Cmd_counterdamagecalculator(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Cmd_mirrorcoatdamagecalculator(void) // a copy of Cmd with the physical -> special field changes
|
// A copy of Cmd with the physical -> special field changes
|
||||||
|
static void Cmd_mirrorcoatdamagecalculator(void)
|
||||||
{
|
{
|
||||||
u8 sideAttacker = GetBattlerSide(gBattlerAttacker);
|
u8 sideAttacker = GetBattlerSide(gBattlerAttacker);
|
||||||
u8 sideTarget = GetBattlerSide(gProtectStructs[gBattlerAttacker].specialBattlerId);
|
u8 sideTarget = GetBattlerSide(gProtectStructs[gBattlerAttacker].specialBattlerId);
|
||||||
@@ -7984,7 +7982,8 @@ static void Cmd_painsplitdmgcalc(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Cmd_settypetorandomresistance(void) // conversion 2
|
// Conversion 2
|
||||||
|
static void Cmd_settypetorandomresistance(void)
|
||||||
{
|
{
|
||||||
if (gLastLandedMoves[gBattlerAttacker] == MOVE_NONE
|
if (gLastLandedMoves[gBattlerAttacker] == MOVE_NONE
|
||||||
|| gLastLandedMoves[gBattlerAttacker] == MOVE_UNAVAILABLE)
|
|| gLastLandedMoves[gBattlerAttacker] == MOVE_UNAVAILABLE)
|
||||||
@@ -8052,7 +8051,8 @@ static void Cmd_setalwayshitflag(void)
|
|||||||
gBattlescriptCurrInstr++;
|
gBattlescriptCurrInstr++;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Cmd_copymovepermanently(void) // sketch
|
// Sketch
|
||||||
|
static void Cmd_copymovepermanently(void)
|
||||||
{
|
{
|
||||||
gChosenMove = MOVE_UNAVAILABLE;
|
gChosenMove = MOVE_UNAVAILABLE;
|
||||||
|
|
||||||
@@ -8164,7 +8164,6 @@ static void Cmd_trychoosesleeptalkmove(void)
|
|||||||
{
|
{
|
||||||
unusableMovesBits |= gBitTable[i];
|
unusableMovesBits |= gBitTable[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
unusableMovesBits = CheckMoveLimitations(gBattlerAttacker, unusableMovesBits, ~MOVE_LIMITATION_PP);
|
unusableMovesBits = CheckMoveLimitations(gBattlerAttacker, unusableMovesBits, ~MOVE_LIMITATION_PP);
|
||||||
@@ -8609,7 +8608,6 @@ static void Cmd_magnitudedamagecalculation(void)
|
|||||||
magnitude = 10;
|
magnitude = 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
PREPARE_BYTE_NUMBER_BUFFER(gBattleTextBuff1, 2, magnitude)
|
PREPARE_BYTE_NUMBER_BUFFER(gBattleTextBuff1, 2, magnitude)
|
||||||
|
|
||||||
for (gBattlerTarget = 0; gBattlerTarget < gBattlersCount; gBattlerTarget++)
|
for (gBattlerTarget = 0; gBattlerTarget < gBattlersCount; gBattlerTarget++)
|
||||||
@@ -8684,7 +8682,8 @@ static void Cmd_setsunny(void)
|
|||||||
gBattlescriptCurrInstr++;
|
gBattlescriptCurrInstr++;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Cmd_maxattackhalvehp(void) // belly drum
|
// Belly Drum
|
||||||
|
static void Cmd_maxattackhalvehp(void)
|
||||||
{
|
{
|
||||||
u32 halfHp = gBattleMons[gBattlerAttacker].maxHP / 2;
|
u32 halfHp = gBattleMons[gBattlerAttacker].maxHP / 2;
|
||||||
|
|
||||||
@@ -8707,7 +8706,8 @@ static void Cmd_maxattackhalvehp(void) // belly drum
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Cmd_copyfoestats(void) // psych up
|
// Psych Up
|
||||||
|
static void Cmd_copyfoestats(void)
|
||||||
{
|
{
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
@@ -8985,7 +8985,8 @@ static void Cmd_trymemento(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Cmd_setforcedtarget(void) // follow me
|
// Follow Me
|
||||||
|
static void Cmd_setforcedtarget(void)
|
||||||
{
|
{
|
||||||
gSideTimers[GetBattlerSide(gBattlerAttacker)].followmeTimer = 1;
|
gSideTimers[GetBattlerSide(gBattlerAttacker)].followmeTimer = 1;
|
||||||
gSideTimers[GetBattlerSide(gBattlerAttacker)].followmeTarget = gBattlerAttacker;
|
gSideTimers[GetBattlerSide(gBattlerAttacker)].followmeTarget = gBattlerAttacker;
|
||||||
@@ -9000,7 +9001,8 @@ static void Cmd_setcharge(void)
|
|||||||
gBattlescriptCurrInstr++;
|
gBattlescriptCurrInstr++;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Cmd_callterrainattack(void) // nature power
|
// Nature Power
|
||||||
|
static void Cmd_callterrainattack(void)
|
||||||
{
|
{
|
||||||
gHitMarker &= ~HITMARKER_ATTACKSTRING_PRINTED;
|
gHitMarker &= ~HITMARKER_ATTACKSTRING_PRINTED;
|
||||||
gCurrentMove = sNaturePowerMoves[gBattleTerrain];
|
gCurrentMove = sNaturePowerMoves[gBattleTerrain];
|
||||||
@@ -9009,7 +9011,8 @@ static void Cmd_callterrainattack(void) // nature power
|
|||||||
gBattlescriptCurrInstr++;
|
gBattlescriptCurrInstr++;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Cmd_cureifburnedparalysedorpoisoned(void) // refresh
|
// Refresh
|
||||||
|
static void Cmd_cureifburnedparalysedorpoisoned(void)
|
||||||
{
|
{
|
||||||
if (gBattleMons[gBattlerAttacker].status1 & (STATUS1_POISON | STATUS1_BURN | STATUS1_PARALYSIS | STATUS1_TOXIC_POISON))
|
if (gBattleMons[gBattlerAttacker].status1 & (STATUS1_POISON | STATUS1_BURN | STATUS1_PARALYSIS | STATUS1_TOXIC_POISON))
|
||||||
{
|
{
|
||||||
@@ -9078,7 +9081,8 @@ static void Cmd_trysethelpinghand(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Cmd_tryswapitems(void) // trick
|
// Trick
|
||||||
|
static void Cmd_tryswapitems(void)
|
||||||
{
|
{
|
||||||
// opponent can't swap items with player in regular battles
|
// opponent can't swap items with player in regular battles
|
||||||
if (gBattleTypeFlags & BATTLE_TYPE_TRAINER_HILL
|
if (gBattleTypeFlags & BATTLE_TYPE_TRAINER_HILL
|
||||||
@@ -9165,7 +9169,8 @@ static void Cmd_tryswapitems(void) // trick
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Cmd_trycopyability(void) // role play
|
// Role Play
|
||||||
|
static void Cmd_trycopyability(void)
|
||||||
{
|
{
|
||||||
if (gBattleMons[gBattlerTarget].ability != ABILITY_NONE
|
if (gBattleMons[gBattlerTarget].ability != ABILITY_NONE
|
||||||
&& gBattleMons[gBattlerTarget].ability != ABILITY_WONDER_GUARD)
|
&& gBattleMons[gBattlerTarget].ability != ABILITY_WONDER_GUARD)
|
||||||
@@ -9213,7 +9218,8 @@ static void Cmd_trywish(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Cmd_trysetroots(void) // ingrain
|
// Ingrain
|
||||||
|
static void Cmd_trysetroots(void)
|
||||||
{
|
{
|
||||||
if (gStatuses3[gBattlerAttacker] & STATUS3_ROOTED)
|
if (gStatuses3[gBattlerAttacker] & STATUS3_ROOTED)
|
||||||
{
|
{
|
||||||
@@ -9228,9 +9234,9 @@ static void Cmd_trysetroots(void) // ingrain
|
|||||||
|
|
||||||
static void Cmd_doubledamagedealtifdamaged(void)
|
static void Cmd_doubledamagedealtifdamaged(void)
|
||||||
{
|
{
|
||||||
if ((gProtectStructs[gBattlerAttacker].physicalDmg
|
if ((gProtectStructs[gBattlerAttacker].physicalDmg != 0
|
||||||
&& gProtectStructs[gBattlerAttacker].physicalBattlerId == gBattlerTarget)
|
&& gProtectStructs[gBattlerAttacker].physicalBattlerId == gBattlerTarget)
|
||||||
|| (gProtectStructs[gBattlerAttacker].specialDmg
|
|| (gProtectStructs[gBattlerAttacker].specialDmg != 0
|
||||||
&& gProtectStructs[gBattlerAttacker].specialBattlerId == gBattlerTarget))
|
&& gProtectStructs[gBattlerAttacker].specialBattlerId == gBattlerTarget))
|
||||||
{
|
{
|
||||||
gBattleScripting.dmgMultiplier = 2;
|
gBattleScripting.dmgMultiplier = 2;
|
||||||
@@ -9278,7 +9284,8 @@ static void Cmd_scaledamagebyhealthratio(void)
|
|||||||
gBattlescriptCurrInstr++;
|
gBattlescriptCurrInstr++;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Cmd_tryswapabilities(void) // skill swap
|
// Skill Swap
|
||||||
|
static void Cmd_tryswapabilities(void)
|
||||||
{
|
{
|
||||||
if ((gBattleMons[gBattlerAttacker].ability == ABILITY_NONE
|
if ((gBattleMons[gBattlerAttacker].ability == ABILITY_NONE
|
||||||
&& gBattleMons[gBattlerTarget].ability == ABILITY_NONE)
|
&& gBattleMons[gBattlerTarget].ability == ABILITY_NONE)
|
||||||
@@ -9433,12 +9440,13 @@ static void Cmd_trysetmagiccoat(void)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
gProtectStructs[gBattlerAttacker].bounceMove = 1;
|
gProtectStructs[gBattlerAttacker].bounceMove = TRUE;
|
||||||
gBattlescriptCurrInstr += 5;
|
gBattlescriptCurrInstr += 5;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Cmd_trysetsnatch(void) // snatch
|
// Snatch
|
||||||
|
static void Cmd_trysetsnatch(void)
|
||||||
{
|
{
|
||||||
gSpecialStatuses[gBattlerAttacker].ppNotAffectedByPressure = 1;
|
gSpecialStatuses[gBattlerAttacker].ppNotAffectedByPressure = 1;
|
||||||
if (gCurrentTurnActionNumber == gBattlersCount - 1) // moves last turn
|
if (gCurrentTurnActionNumber == gBattlersCount - 1) // moves last turn
|
||||||
@@ -9642,7 +9650,8 @@ static void Cmd_trycastformdatachange(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Cmd_settypebasedhalvers(void) // water and mud sport
|
// Water and Mud Sport
|
||||||
|
static void Cmd_settypebasedhalvers(void)
|
||||||
{
|
{
|
||||||
bool8 worked = FALSE;
|
bool8 worked = FALSE;
|
||||||
|
|
||||||
@@ -9655,7 +9664,7 @@ static void Cmd_settypebasedhalvers(void) // water and mud sport
|
|||||||
worked = TRUE;
|
worked = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else // water sport
|
else // Water Sport
|
||||||
{
|
{
|
||||||
if (!(gStatuses3[gBattlerAttacker] & STATUS3_WATERSPORT))
|
if (!(gStatuses3[gBattlerAttacker] & STATUS3_WATERSPORT))
|
||||||
{
|
{
|
||||||
@@ -9766,7 +9775,8 @@ static void Cmd_snatchsetbattlers(void)
|
|||||||
gBattlescriptCurrInstr++;
|
gBattlescriptCurrInstr++;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Cmd_removelightscreenreflect(void) // brick break
|
// Brick Break
|
||||||
|
static void Cmd_removelightscreenreflect(void)
|
||||||
{
|
{
|
||||||
u8 opposingSide = GetBattlerSide(gBattlerAttacker) ^ BIT_SIDE;
|
u8 opposingSide = GetBattlerSide(gBattlerAttacker) ^ BIT_SIDE;
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -93,7 +93,7 @@ void HandleAction_UseMove(void)
|
|||||||
gBattleStruct->atkCancellerTracker = 0;
|
gBattleStruct->atkCancellerTracker = 0;
|
||||||
gMoveResultFlags = 0;
|
gMoveResultFlags = 0;
|
||||||
gMultiHitCounter = 0;
|
gMultiHitCounter = 0;
|
||||||
gBattleCommunication[6] = 0;
|
gBattleCommunication[MISS_TYPE] = 0;
|
||||||
gCurrMovePos = gChosenMovePos = *(gBattleStruct->chosenMovePositions + gBattlerAttacker);
|
gCurrMovePos = gChosenMovePos = *(gBattleStruct->chosenMovePositions + gBattlerAttacker);
|
||||||
|
|
||||||
// choose move
|
// choose move
|
||||||
|
|||||||
@@ -410,7 +410,7 @@ static void CB2_TradeEvolutionSceneLoadGraphics(void)
|
|||||||
gMain.state++;
|
gMain.state++;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
InitTradeBg();
|
LoadTradeAnimGfx();
|
||||||
gMain.state++;
|
gMain.state++;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
|
|||||||
+2
-1
@@ -156,7 +156,8 @@ void FadeOutAndFadeInNewMapMusic(u16 songNum, u8 fadeOutSpeed, u8 fadeInSpeed)
|
|||||||
sMapMusicFadeInSpeed = fadeInSpeed;
|
sMapMusicFadeInSpeed = fadeInSpeed;
|
||||||
}
|
}
|
||||||
|
|
||||||
void FadeInNewMapMusic(u16 songNum, u8 speed)
|
// Unused
|
||||||
|
static void FadeInNewMapMusic(u16 songNum, u8 speed)
|
||||||
{
|
{
|
||||||
FadeInNewBGM(songNum, speed);
|
FadeInNewBGM(songNum, speed);
|
||||||
sCurrentMapMusic = songNum;
|
sCurrentMapMusic = songNum;
|
||||||
|
|||||||
+1
-1
@@ -4821,7 +4821,7 @@ static void CheckPartnersMonForRibbons(void)
|
|||||||
FlagSet(FLAG_SYS_RIBBON_GET);
|
FlagSet(FLAG_SYS_RIBBON_GET);
|
||||||
}
|
}
|
||||||
|
|
||||||
void InitTradeBg(void)
|
void LoadTradeAnimGfx(void)
|
||||||
{
|
{
|
||||||
InitTradeBgInternal();
|
InitTradeBgInternal();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user