Files
zfxaction25/RobotAndDonkey.Game/Intents/Reroll.cs
2026-04-19 00:43:27 +02:00

28 lines
788 B
C#

using System;
using System.Collections.Generic;
using RobotAndDonkey.Game.Execution;
using RobotAndDonkey.Game.Execution.Results;
using RobotAndDonkey.Game.GameState;
namespace RobotAndDonkey.Game.Intents;
public class Reroll(int energyCost) : Intent(energyCost)
{
public override void Run(Guid requestId, CoreLoop coreLoop, List<Intent> newIntents, List<Result> results)
{
coreLoop.RerollPatchDeck();
base.Run(requestId, coreLoop, newIntents, results);
}
public override bool IsValid(CoreLoop coreLoop)
{
if (!base.IsValid(coreLoop))
return false;
return coreLoop.RunPhase == ERunPhase.Improve;
}
public override bool Immune => true;
public override string ToString() => "Reroll, " + base.ToString();
}