27 lines
717 B
C#
27 lines
717 B
C#
using PkmnLib.Static.Moves;
|
|
|
|
namespace PkmnLib.Plugin.Gen7.Scripts.Side;
|
|
|
|
[Script(ScriptCategory.Side, "battery")]
|
|
public class BatteryAbilityEffect : Script
|
|
{
|
|
private HashSet<IPokemon> _placers = new();
|
|
|
|
public void PlacerActivated(IPokemon placer) => _placers.Add(placer);
|
|
|
|
public void PlacerDeactivated(IPokemon placer)
|
|
{
|
|
_placers.Remove(placer);
|
|
if (_placers.Count == 0)
|
|
RemoveSelf();
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
public override void ChangeDamageModifier(IExecutingMove move, IPokemon target, byte hit, ref float modifier)
|
|
{
|
|
if (move.UseMove.Category == MoveCategory.Special)
|
|
{
|
|
modifier *= 5325f / 4096f; // ~1.3x
|
|
}
|
|
}
|
|
} |