diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 2f2e6f1a8..6cf62d2f9 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -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 diff --git a/include/battle_scripts.h b/include/battle_scripts.h index 519c72fc4..960262cba 100644 --- a/include/battle_scripts.h +++ b/include/battle_scripts.h @@ -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[]; diff --git a/src/battle_util.c b/src/battle_util.c index aa00f1df7..6c69183d0 100644 --- a/src/battle_util.c +++ b/src/battle_util.c @@ -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