using System; using System.Collections.Generic; using System.Linq; using KernelPanic.Core; using KernelPanic.Data; namespace KernelPanic.Combat { public enum PythonOperation { Print, Loop, Draw, List, Zip, Async, Inspect, Install, Unattended, Cinnamon, Update, Timeshift, Shield } public sealed class PythonEffect : ICardEffect { private readonly PythonOperation _operation; private readonly int _amount; public PythonEffect(PythonOperation operation, int amount) { _operation = operation; _amount = amount; } public void Execute(CombatContext context) => context.CombatManager.Python.Execute(context, _operation, _amount); } public sealed class PythonChoiceOption { public string Label { get; } public bool Enabled { get; } public PythonChoiceOption(string label, bool enabled = true) { Label = label; Enabled = enabled; } public CardInstance Card { get; } public int Cost { get; } public string ActionLabel { get; } public PythonChoiceOption(CardInstance card, int cost, string actionLabel, bool enabled = true) { Card = card; Cost = cost; ActionLabel = actionLabel; Label = card.Definition.DisplayName; Enabled = enabled; } } /// Wave-local FIFO transformations, immutable payload snapshots and bounded background tasks. public sealed class PythonPipeline { private sealed class Payload { public CardInstance Card; public int Damage, Shield; public bool All; public CombatantState Target; } private sealed class Script { public string Name; public CardInstance Owner; public Payload Payload; public bool Waiting, Restore; public int FirstRound, Remaining = 2, Uptime, LastRunRound = -1; } private readonly List _loops = new(), _areas = new(); private readonly List