Implemented Good as Gold's effect

This commit is contained in:
LOuroboros 2022-12-04 20:17:14 -03:00
parent e25f843db3
commit de05c4dd56
3 changed files with 19 additions and 0 deletions

View File

@ -9888,6 +9888,15 @@ BattleScript_WindRiderActivatesMoveEnd::
BattleScript_WindRiderActivatesMoveEnd_End:
goto BattleScript_MoveEnd
BattleScript_GoodAsGoldActivates::
attackstring
ppreduce
showabilitypopup BS_TARGET
pause B_WAIT_TIME_SHORT
printstring STRINGID_ITDOESNTAFFECT
waitmessage B_WAIT_TIME_MED
goto BattleScript_MoveEnd
BattleScript_PastelVeilActivates::
setbyte gBattleCommunication, 0
setbyte gBattleCommunication + 1, 0

View File

@ -442,6 +442,7 @@ extern const u8 BattleScript_WindPowerActivates[];
extern const u8 BattleScript_WindPowerActivatesEnd2[];
extern const u8 BattleScript_ProtosynthesisActivates[];
extern const u8 BattleScript_QuarkDriveActivates[];
extern const u8 BattleScript_GoodAsGoldActivates[];
// zmoves
extern const u8 BattleScript_ZMoveActivateDamaging[];

View File

@ -5149,6 +5149,15 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
gBattlescriptCurrInstr = BattleScript_WindRiderActivatesMoveEnd;
effect = 1;
}
else if (GetBattlerAbility(gBattlerTarget) == ABILITY_GOOD_AS_GOLD
&& IS_MOVE_STATUS(gCurrentMove)
&& !(moveTarget & MOVE_TARGET_USER)
&& !(moveTarget & MOVE_TARGET_OPPONENTS_FIELD)
&& !(moveTarget & MOVE_TARGET_ALL_BATTLERS))
{
gBattlescriptCurrInstr = BattleScript_GoodAsGoldActivates;
effect = 1;
}
break;
}
case ABILITYEFFECT_ABSORBING: // 3