24 lines
860 B
C#
24 lines
860 B
C#
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<Intent> intents, CoreLoop coreLoop, Entity owner, List<Intent> newIntents, List<Result> results)
|
|
{
|
|
foreach (var intent in intents)
|
|
{
|
|
if (intent is CardCostIntent cardCostIntent)
|
|
cardCostIntent.EnergyCost += 1;
|
|
}
|
|
}
|
|
|
|
public override string ToolTip => "Increases the energy cost by 1";
|
|
} |