17 lines
684 B
C#
17 lines
684 B
C#
namespace PkmnLib.Plugin.Gen7.Scripts.Abilities;
|
|
|
|
/// <summary>
|
|
/// Overgrow is an ability that boosts the power of Grass-type moves when the Pokémon's HP is low.
|
|
///
|
|
/// <see href="https://bulbapedia.bulbagarden.net/wiki/Overgrow_(Ability)">Bulbapedia - Overgrow</see>
|
|
/// </summary>
|
|
[Script(ScriptCategory.Ability, "overgrow")]
|
|
public class Overgrow : Script
|
|
{
|
|
/// <inheritdoc />
|
|
public override void ChangeBasePower(IExecutingMove move, IPokemon target, byte hit, ref ushort basePower)
|
|
{
|
|
if (move.GetHitData(target, hit).Type?.Name == "grass" && target.CurrentHealth <= target.BoostedStats.Hp / 3)
|
|
basePower = basePower.MultiplyOrMax(1.5f);
|
|
}
|
|
} |