mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-26 21:33:53 +01:00
Growth gen6 effect
This commit is contained in:
parent
a69af8f2f5
commit
7b60a654b2
@ -234,6 +234,7 @@ AI_CheckBadMove_CheckEffect: @ 82DC045
|
||||
if_effect EFFECT_FLING, AI_CBM_Fling
|
||||
if_effect EFFECT_ATTACK_ACCURACY_UP, AI_CBM_AtkAccUp
|
||||
if_effect EFFECT_ATTACK_SPATK_UP, AI_CBM_AtkSpAtkUp
|
||||
if_effect EFFECT_GROWTH, AI_CBM_AtkSpAtkUp
|
||||
end
|
||||
|
||||
AI_CBM_AtkAccUp:
|
||||
|
@ -298,6 +298,42 @@ gBattleScriptsForMoveEffects:: @ 82D86A8
|
||||
.4byte BattleScript_EffectScald
|
||||
.4byte BattleScript_EffectReflectType
|
||||
.4byte BattleScript_EffectSoak
|
||||
.4byte BattleScript_EffectGrowth
|
||||
|
||||
BattleScript_EffectGrowth:
|
||||
attackcanceler
|
||||
attackstring
|
||||
ppreduce
|
||||
jumpifstat BS_ATTACKER, CMP_LESS_THAN, STAT_ATK, 0xC, BattleScript_GrowthDoMoveAnim
|
||||
jumpifstat BS_ATTACKER, CMP_EQUAL, STAT_SPATK, 0xC, BattleScript_CantRaiseMultipleStats
|
||||
BattleScript_GrowthDoMoveAnim::
|
||||
attackanimation
|
||||
waitanimation
|
||||
setbyte sSTAT_ANIM_PLAYED, FALSE
|
||||
playstatchangeanimation BS_ATTACKER, BIT_ATK | BIT_SPATK, 0x0
|
||||
jumpifhalfword CMP_COMMON_BITS, gBattleWeather, WEATHER_SUN_ANY, BattleScript_GrowthAtk2
|
||||
setstatchanger STAT_ATK, 1, FALSE
|
||||
goto BattleScript_GrowthAtk
|
||||
BattleScript_GrowthAtk2:
|
||||
setstatchanger STAT_ATK, 2, FALSE
|
||||
BattleScript_GrowthAtk:
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | 0x1, BattleScript_GrowthTrySpAtk
|
||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_GrowthTrySpAtk
|
||||
printfromtable gStatUpStringIds
|
||||
waitmessage 0x40
|
||||
BattleScript_GrowthTrySpAtk::
|
||||
jumpifhalfword CMP_COMMON_BITS, gBattleWeather, WEATHER_SUN_ANY, BattleScript_GrowthSpAtk2
|
||||
setstatchanger STAT_SPATK, 1, FALSE
|
||||
goto BattleScript_GrowthSpAtk
|
||||
BattleScript_GrowthSpAtk2:
|
||||
setstatchanger STAT_SPATK, 2, FALSE
|
||||
BattleScript_GrowthSpAtk:
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | 0x1, BattleScript_GrowthEnd
|
||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_GrowthEnd
|
||||
printfromtable gStatUpStringIds
|
||||
waitmessage 0x40
|
||||
BattleScript_GrowthEnd:
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
BattleScript_EffectSoak:
|
||||
attackcanceler
|
||||
@ -426,13 +462,13 @@ BattleScript_AttackSpAttackUpDoMoveAnim::
|
||||
attackanimation
|
||||
waitanimation
|
||||
setbyte sSTAT_ANIM_PLAYED, FALSE
|
||||
playstatchangeanimation BS_ATTACKER, BIT_SPATK | BIT_SPDEF, 0x0
|
||||
playstatchangeanimation BS_ATTACKER, BIT_ATK | BIT_SPATK, 0x0
|
||||
setstatchanger STAT_ATK, 1, FALSE
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | 0x1, BattleScript_AttackSpAttackUpTrySpDef
|
||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_AttackSpAttackUpTrySpDef
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | 0x1, BattleScript_AttackSpAttackUpTrySpAtk
|
||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_AttackSpAttackUpTrySpAtk
|
||||
printfromtable gStatUpStringIds
|
||||
waitmessage 0x40
|
||||
BattleScript_AttackSpAttackUpTrySpDef::
|
||||
BattleScript_AttackSpAttackUpTrySpAtk::
|
||||
setstatchanger STAT_SPATK, 1, FALSE
|
||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | 0x1, BattleScript_AttackSpAttackUpEnd
|
||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_AttackSpAttackUpEnd
|
||||
|
@ -287,5 +287,6 @@
|
||||
#define EFFECT_SCALD 281
|
||||
#define EFFECT_REFLECT_TYPE 282
|
||||
#define EFFECT_SOAK 283
|
||||
#define EFFECT_GROWTH 284
|
||||
|
||||
#endif // GUARD_CONSTANTS_BATTLE_MOVE_EFFECTS_H
|
||||
|
@ -1571,13 +1571,13 @@ void CreateMegaTriggerSprite(u8 battlerId, u8 palId)
|
||||
if (gBattleStruct->mega.triggerSpriteId == 0xFF)
|
||||
{
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE)
|
||||
gBattleStruct->mega.triggerSpriteId = CreateSprite(&sSpriteTemplate_MegaTrigger,
|
||||
gSprites[gHealthboxSpriteIds[battlerId]].pos1.x - SINGLES_MEGA_TRIGGER_POS_X_SLIDE,
|
||||
gSprites[gHealthboxSpriteIds[battlerId]].pos1.y - SINGLES_MEGA_TRIGGER_POS_Y_DIFF, 0);
|
||||
else
|
||||
gBattleStruct->mega.triggerSpriteId = CreateSprite(&sSpriteTemplate_MegaTrigger,
|
||||
gSprites[gHealthboxSpriteIds[battlerId]].pos1.x - DOUBLES_MEGA_TRIGGER_POS_X_SLIDE,
|
||||
gSprites[gHealthboxSpriteIds[battlerId]].pos1.y - DOUBLES_MEGA_TRIGGER_POS_Y_DIFF, 0);
|
||||
else
|
||||
gBattleStruct->mega.triggerSpriteId = CreateSprite(&sSpriteTemplate_MegaTrigger,
|
||||
gSprites[gHealthboxSpriteIds[battlerId]].pos1.x - SINGLES_MEGA_TRIGGER_POS_X_SLIDE,
|
||||
gSprites[gHealthboxSpriteIds[battlerId]].pos1.y - SINGLES_MEGA_TRIGGER_POS_Y_DIFF, 0);
|
||||
}
|
||||
gSprites[gBattleStruct->mega.triggerSpriteId].tBattler = battlerId;
|
||||
gSprites[gBattleStruct->mega.triggerSpriteId].tHide = FALSE;
|
||||
@ -1610,7 +1610,7 @@ static void SpriteCb_MegaTrigger(struct Sprite *sprite)
|
||||
if (sprite->pos1.x != gSprites[gHealthboxSpriteIds[sprite->tBattler]].pos1.x - xSlide)
|
||||
sprite->pos1.x++;
|
||||
|
||||
if (sprite->pos1.x >= xPriority)
|
||||
if (sprite->pos1.x >= gSprites[gHealthboxSpriteIds[sprite->tBattler]].pos1.x - xPriority)
|
||||
sprite->oam.priority = 2;
|
||||
else
|
||||
sprite->oam.priority = 1;
|
||||
@ -1625,7 +1625,7 @@ static void SpriteCb_MegaTrigger(struct Sprite *sprite)
|
||||
if (sprite->pos1.x != gSprites[gHealthboxSpriteIds[sprite->tBattler]].pos1.x - xOptimal)
|
||||
sprite->pos1.x--;
|
||||
|
||||
if (sprite->pos1.x >= xPriority)
|
||||
if (sprite->pos1.x >= gSprites[gHealthboxSpriteIds[sprite->tBattler]].pos1.x - xPriority)
|
||||
sprite->oam.priority = 2;
|
||||
else
|
||||
sprite->oam.priority = 1;
|
||||
|
@ -892,7 +892,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_GEN6] =
|
||||
.split = SPLIT_STATUS,
|
||||
},
|
||||
{ // MOVE_GROWTH
|
||||
.effect = EFFECT_SPECIAL_ATTACK_UP,
|
||||
.effect = EFFECT_GROWTH,
|
||||
.power = 0,
|
||||
.type = TYPE_NORMAL,
|
||||
.accuracy = 0,
|
||||
|
Loading…
x
Reference in New Issue
Block a user