ported from perforce
This commit is contained in:
24
RobotAndDonkey.Game/Modifiers/ThrottledModifier.cs
Normal file
24
RobotAndDonkey.Game/Modifiers/ThrottledModifier.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
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";
|
||||
}
|
||||
Reference in New Issue
Block a user