mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 11:37:40 +01:00
Implemented the 4 Ruin Abilities
This commit is contained in:
parent
de05c4dd56
commit
24465858a7
@ -8426,6 +8426,12 @@ BattleScript_QuarkDriveActivates::
|
||||
waitmessage B_WAIT_TIME_MED
|
||||
end3
|
||||
|
||||
BattleScript_RuinAbilityActivates::
|
||||
call BattleScript_AbilityPopUp
|
||||
printstring STRINGID_ABILITYWEAKENEDFSURROUNDINGMONSSTAT
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
end3
|
||||
|
||||
BattleScript_AttackWeakenedByStrongWinds::
|
||||
pause B_WAIT_TIME_SHORT
|
||||
printstring STRINGID_ATTACKWEAKENEDBSTRONGWINDS
|
||||
|
@ -443,6 +443,7 @@ extern const u8 BattleScript_WindPowerActivatesEnd2[];
|
||||
extern const u8 BattleScript_ProtosynthesisActivates[];
|
||||
extern const u8 BattleScript_QuarkDriveActivates[];
|
||||
extern const u8 BattleScript_GoodAsGoldActivates[];
|
||||
extern const u8 BattleScript_RuinAbilityActivates[];
|
||||
|
||||
// zmoves
|
||||
extern const u8 BattleScript_ZMoveActivateDamaging[];
|
||||
|
@ -634,8 +634,9 @@
|
||||
#define STRINGID_SUNLIGHTACTIVATEDABILITY 632
|
||||
#define STRINGID_STATWASHEIGHTENED 633
|
||||
#define STRINGID_ELECTRICTERRAINACTIVATEDABILITY 634
|
||||
#define STRINGID_ABILITYWEAKENEDFSURROUNDINGMONSSTAT 635
|
||||
|
||||
#define BATTLESTRINGS_COUNT 635
|
||||
#define BATTLESTRINGS_COUNT 636
|
||||
|
||||
// This is the string id that gBattleStringsTable starts with.
|
||||
// String ids before this (e.g. STRINGID_INTROMSG) are not in the table,
|
||||
|
@ -763,9 +763,11 @@ static const u8 sText_BeingHitChargedPkmnWithPower[] = _("Being hit by {B_CURREN
|
||||
static const u8 sText_SunlightActivatedAbility[] = _("The harsh sunlight activated\n{B_ATK_NAME_WITH_PREFIX}'s {B_ATK_ABILITY}!");
|
||||
static const u8 sText_StatWasHeightened[] = _("{B_ATK_NAME_WITH_PREFIX}'s {B_BUFF1} was heightened!");
|
||||
static const u8 sText_ElectricTerrainActivatedAbility[] = _("The Electric Terrain activated\n{B_ATK_NAME_WITH_PREFIX}'s {B_ATK_ABILITY}!");
|
||||
static const u8 sText_AbilityWeakenedSurroundingMonsStat[] = _("{B_ATK_NAME_WITH_PREFIX}'s {B_ATK_ABILITY}\nweakened the {B_BUFF1} of\lall surrounding Pokémon!\p");
|
||||
|
||||
const u8 *const gBattleStringsTable[BATTLESTRINGS_COUNT] =
|
||||
{
|
||||
[STRINGID_ABILITYWEAKENEDFSURROUNDINGMONSSTAT - BATTLESTRINGS_TABLE_START] = sText_AbilityWeakenedSurroundingMonsStat,
|
||||
[STRINGID_ELECTRICTERRAINACTIVATEDABILITY - BATTLESTRINGS_TABLE_START] = sText_ElectricTerrainActivatedAbility,
|
||||
[STRINGID_STATWASHEIGHTENED - BATTLESTRINGS_TABLE_START] = sText_StatWasHeightened,
|
||||
[STRINGID_SUNLIGHTACTIVATEDABILITY - BATTLESTRINGS_TABLE_START] = sText_SunlightActivatedAbility,
|
||||
|
@ -4901,6 +4901,42 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
|
||||
effect++;
|
||||
}
|
||||
break;
|
||||
case ABILITY_VESSEL_OF_RUIN:
|
||||
if (!gSpecialStatuses[battler].switchInAbilityDone)
|
||||
{
|
||||
PREPARE_STAT_BUFFER(gBattleTextBuff1, STAT_SPATK);
|
||||
gSpecialStatuses[battler].switchInAbilityDone = TRUE;
|
||||
BattleScriptPushCursorAndCallback(BattleScript_RuinAbilityActivates);
|
||||
effect++;
|
||||
}
|
||||
break;
|
||||
case ABILITY_SWORD_OF_RUIN:
|
||||
if (!gSpecialStatuses[battler].switchInAbilityDone)
|
||||
{
|
||||
PREPARE_STAT_BUFFER(gBattleTextBuff1, STAT_DEF);
|
||||
gSpecialStatuses[battler].switchInAbilityDone = TRUE;
|
||||
BattleScriptPushCursorAndCallback(BattleScript_RuinAbilityActivates);
|
||||
effect++;
|
||||
}
|
||||
break;
|
||||
case ABILITY_TABLETS_OF_RUIN:
|
||||
if (!gSpecialStatuses[battler].switchInAbilityDone)
|
||||
{
|
||||
PREPARE_STAT_BUFFER(gBattleTextBuff1, STAT_ATK);
|
||||
gSpecialStatuses[battler].switchInAbilityDone = TRUE;
|
||||
BattleScriptPushCursorAndCallback(BattleScript_RuinAbilityActivates);
|
||||
effect++;
|
||||
}
|
||||
break;
|
||||
case ABILITY_BEADS_OF_RUIN:
|
||||
if (!gSpecialStatuses[battler].switchInAbilityDone)
|
||||
{
|
||||
PREPARE_STAT_BUFFER(gBattleTextBuff1, STAT_SPDEF);
|
||||
gSpecialStatuses[battler].switchInAbilityDone = TRUE;
|
||||
BattleScriptPushCursorAndCallback(BattleScript_RuinAbilityActivates);
|
||||
effect++;
|
||||
}
|
||||
break;
|
||||
#if B_WEATHER_FORMS < GEN_5
|
||||
default:
|
||||
if (gBattleMons[battler].species == SPECIES_CHERRIM)
|
||||
@ -8801,6 +8837,18 @@ static u32 CalcMoveBasePowerAfterModifiers(u16 move, u8 battlerAtk, u8 battlerDe
|
||||
MulModifier(&modifier, UQ_4_12(1.33));
|
||||
}
|
||||
|
||||
if (IsAbilityOnField(ABILITY_VESSEL_OF_RUIN) && atkAbility != ABILITY_VESSEL_OF_RUIN && IS_MOVE_SPECIAL(gCurrentMove))
|
||||
MulModifier(&modifier, UQ_4_12(0.25));
|
||||
|
||||
if (IsAbilityOnField(ABILITY_SWORD_OF_RUIN) && defAbility != ABILITY_SWORD_OF_RUIN && IS_MOVE_PHYSICAL(gCurrentMove))
|
||||
MulModifier(&modifier, UQ_4_12(0.25));
|
||||
|
||||
if (IsAbilityOnField(ABILITY_TABLETS_OF_RUIN) && atkAbility != ABILITY_TABLETS_OF_RUIN && IS_MOVE_PHYSICAL(gCurrentMove))
|
||||
MulModifier(&modifier, UQ_4_12(0.25));
|
||||
|
||||
if (IsAbilityOnField(ABILITY_BEADS_OF_RUIN) && defAbility != ABILITY_BEADS_OF_RUIN && IS_MOVE_SPECIAL(gCurrentMove))
|
||||
MulModifier(&modifier, UQ_4_12(0.25));
|
||||
|
||||
// attacker partner's abilities
|
||||
if (IsBattlerAlive(BATTLE_PARTNER(battlerAtk)))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user