Deukhoofd 1feb27e826
All checks were successful
Build / Build (push) Successful in 50s
More work on refactor to interfaces
2025-06-29 12:03:51 +02:00

17 lines
643 B
C#

namespace PkmnLib.Plugin.Gen7.Scripts.Abilities;
/// <summary>
/// Prism Armor is an ability that reduces the damage taken from super effective moves.
///
/// <see href="https://bulbapedia.bulbagarden.net/wiki/Prism_Armor_(Ability)">Bulbapedia - Prism Armor</see>
/// </summary>
[Script(ScriptCategory.Ability, "prism_armor")]
public class PrismArmor : Script, IScriptChangeIncomingMoveDamage
{
/// <inheritdoc />
public void ChangeIncomingMoveDamage(IExecutingMove move, IPokemon target, byte hit, ref uint damage)
{
if (move.GetHitData(target, hit).Effectiveness >= 2)
damage = (uint)(damage * 0.75);
}
}