コード例 #1
0
        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);
        }
コード例 #2
0
    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);
    }
コード例 #3
0
 public ShuffleDeckActionParameterEditor(ShuffleDeckActionParameter parameter)
 {
     _parameter = parameter;
 }