using System; using System.Collections.Generic; using RobotAndDonkey.Game.Execution; using RobotAndDonkey.Game.Execution.Results; using RobotAndDonkey.Game.GameState; using RobotAndDonkey.Game.Intents; namespace RobotAndDonkey.Game.Modifiers; public record ThrottledModifier(EModifierDuration Duration) : Modifier(EModifierKind.Card, EModifierId.Throttled, Duration) { protected override ThrottledModifier CreateInstance() => new(Duration); public override void Before(Guid requestId, ReadOnlySpan intents, CoreLoop coreLoop, Entity owner, List newIntents, List results) { foreach (var intent in intents) { if (intent is CardCostIntent cardCostIntent) cardCostIntent.EnergyCost += 1; } } public override string ToolTip => "Increases the energy cost by 1"; }