Even more abilities
All checks were successful
Build / Build (push) Successful in 52s

This commit is contained in:
2025-06-14 11:30:56 +02:00
parent 24712fbb0d
commit 6c13d20bf7
13 changed files with 278 additions and 12 deletions

View File

@@ -6,8 +6,29 @@ namespace PkmnLib.Plugin.Gen7.Scripts.Weather;
/// <see href="https://bulbapedia.bulbagarden.net/wiki/Harsh_sunlight">Bulbapedia - Harsh Sunlight</see>
/// </summary>
[Script(ScriptCategory.Weather, "harsh_sunlight")]
public class HarshSunlight : Script
public class HarshSunlight : Script, ILimitedTurnsScript
{
private int? _duration;
/// <inheritdoc />
public int TurnsRemaining => _duration ?? 0;
/// <inheritdoc />
public void SetTurns(int turns)
{
_duration = turns;
}
/// <inheritdoc />
public override void OnEndTurn(IBattle battle)
{
_duration--;
if (_duration <= 0)
{
battle.SetWeather(null, 0);
}
}
/// <inheritdoc />
public override void ChangeBasePower(IExecutingMove move, IPokemon target, byte hit, ref ushort basePower)
{