public void Load(IContainer game, Ability ability) { var parameter = ShuffleDeckActionParameter.FromString(ability.GetParams(nameof(ShuffleDeckAction))); var targetSystem = game.GetSystem <TargetSystem>(); Targets = targetSystem.GetPlayers(ability.Owner, parameter.WhichPlayer); }
public static IActionParameterEditor CreateEditor(ActionDefinition actionDef) { switch (actionDef.ActionName) { case nameof(DamagePlayerAction): return(new DamageActionParameterEditor(DamageActionParameter.FromString(actionDef.Params))); case nameof(DrawCardsAction): return(new DrawCardsActionParameterEditor(DrawCardsActionParameter.FromString(actionDef.Params))); case nameof(DamagePlayerOrCreatureAction): return(new DamagePlayerOrCreatureActionParameterEditor(DamagePlayerOrCreatureParameter.FromString(actionDef.Params))); case nameof(ShuffleDeckAction): return(new ShuffleDeckActionParameterEditor(ShuffleDeckActionParameter.FromString(actionDef.Params))); } return(null); }
public ShuffleDeckActionParameterEditor(ShuffleDeckActionParameter parameter) { _parameter = parameter; }