Implemented Seed Sower's effect

This commit is contained in:
LOuroboros 2022-12-02 23:07:25 -03:00
parent 8dd3fd025f
commit b0027cb78b
3 changed files with 22 additions and 0 deletions

View File

@ -7023,6 +7023,15 @@ BattleScript_GulpMissileGorgingTargetDefenseCantGoLower:
waitmessage B_WAIT_TIME_LONG waitmessage B_WAIT_TIME_LONG
return return
BattleScript_SeedSowerActivates::
pause B_WAIT_TIME_SHORT
call BattleScript_AbilityPopUp
printstring STRINGID_TERRAINBECOMESGRASSY
waitmessage B_WAIT_TIME_LONG
playanimation BS_SCRIPTING, B_ANIM_RESTORE_BG
call BattleScript_TerrainSeedLoop
return
BattleScript_PerishSongCountGoesDown:: BattleScript_PerishSongCountGoesDown::
printstring STRINGID_PKMNPERISHCOUNTFELL printstring STRINGID_PKMNPERISHCOUNTFELL
waitmessage B_WAIT_TIME_LONG waitmessage B_WAIT_TIME_LONG

View File

@ -433,6 +433,7 @@ extern const u8 BattleScript_SymbiosisActivates[];
extern const u8 BattleScript_MultiHitPrintStrings[]; extern const u8 BattleScript_MultiHitPrintStrings[];
extern const u8 BattleScript_BurnUpRemoveType[]; extern const u8 BattleScript_BurnUpRemoveType[];
extern const u8 BattleScript_TargetAbilityStatRaiseRet[]; extern const u8 BattleScript_TargetAbilityStatRaiseRet[];
extern const u8 BattleScript_SeedSowerActivates[];
// zmoves // zmoves
extern const u8 BattleScript_ZMoveActivateDamaging[]; extern const u8 BattleScript_ZMoveActivateDamaging[];

View File

@ -5723,6 +5723,18 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
} }
} }
break; break;
case ABILITY_SEED_SOWER:
if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT)
&& !gProtectStructs[gBattlerAttacker].confusionSelfDmg
&& TARGET_TURN_DAMAGED
&& IsBattlerAlive(gBattlerTarget)
&& TryChangeBattleTerrain(gBattlerTarget, STATUS_FIELD_GRASSY_TERRAIN, &gFieldTimers.terrainTimer))
{
BattleScriptPushCursor();
gBattlescriptCurrInstr = BattleScript_SeedSowerActivates;
effect++;
}
break;
} }
break; break;
case ABILITYEFFECT_MOVE_END_ATTACKER: // Same as above, but for attacker case ABILITYEFFECT_MOVE_END_ATTACKER: // Same as above, but for attacker