mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 11:37:40 +01:00
Victory Dance effect
This commit is contained in:
parent
29ae22183b
commit
739680e425
@ -415,6 +415,7 @@ gBattleScriptsForMoveEffects::
|
||||
.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
|
||||
|
||||
BattleScript_AffectionBasedEndurance::
|
||||
playanimation BS_TARGET, B_ANIM_AFFECTION_HANGED_ON
|
||||
@ -2346,6 +2347,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
|
||||
|
@ -396,7 +396,8 @@
|
||||
#define EFFECT_SLEEP_HIT 390
|
||||
#define EFFECT_DOUBLE_SHOCK 391
|
||||
#define EFFECT_SPECIAL_ATTACK_UP_HIT 392
|
||||
#define EFFECT_VICTORY_DANCE 393
|
||||
|
||||
#define NUM_BATTLE_MOVE_EFFECTS 393
|
||||
#define NUM_BATTLE_MOVE_EFFECTS 394
|
||||
|
||||
#endif // GUARD_CONSTANTS_BATTLE_MOVE_EFFECTS_H
|
||||
|
@ -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;
|
||||
@ -4401,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;
|
||||
@ -4886,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;
|
||||
|
@ -13454,7 +13454,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_Z] =
|
||||
|
||||
[MOVE_VICTORY_DANCE] =
|
||||
{
|
||||
.effect = EFFECT_PLACEHOLDER, // EFFECT_VICTORY_DANCE,
|
||||
.effect = EFFECT_VICTORY_DANCE,
|
||||
.power = 0,
|
||||
.type = TYPE_FIGHTING,
|
||||
.accuracy = 0,
|
||||
|
Loading…
Reference in New Issue
Block a user