using RobotAndDonkey.Game.Board; using RobotAndDonkey.Game.Data; using RobotAndDonkey.Game.Execution.Results; using RobotAndDonkey.Game.GameState; namespace RobotAndDonkey.Game.Intents; public class Rest(Cell cell, int restoreEnergyAmount) : Intent(-restoreEnergyAmount) { public override void Run(Guid requestId, CoreLoop coreLoop, List newIntents, List results) { if (cell.Type == ECellType.Fertile) { EnergyCost -= Balancing.Instance.FertileRestEnergyReplenish; } else if (cell.Type == ECellType.Dry) { EnergyCost = Math.Min(0, EnergyCost + Balancing.Instance.DryRestEnergyMalus); } base.Run(requestId, coreLoop, newIntents, results); } public override string ToString() => "Rest, " + base.ToString(); }