20 lines
731 B
C#
20 lines
731 B
C#
namespace PkmnLib.Plugin.Gen7.Scripts.Abilities;
|
|
|
|
/// <summary>
|
|
/// Toxic Boost is an ability that increases Attack when the Pokémon is poisoned.
|
|
///
|
|
/// <see href="https://bulbapedia.bulbagarden.net/wiki/Toxic_Boost_(Ability)">Bulbapedia - Toxic Boost</see>
|
|
/// </summary>
|
|
[Script(ScriptCategory.Ability, "toxic_boost")]
|
|
public class ToxicBoost : Script
|
|
{
|
|
/// <inheritdoc />
|
|
public override void ChangeMoveDamage(IExecutingMove move, IPokemon target, byte hit, ref uint damage)
|
|
{
|
|
if (move.User.HasStatus(ScriptUtils.ResolveName<Status.Poisoned>()) ||
|
|
move.User.HasStatus(ScriptUtils.ResolveName<Status.BadlyPoisoned>()))
|
|
{
|
|
damage = damage.MultiplyOrMax(1.5f);
|
|
}
|
|
}
|
|
} |