Пример #1
0
 private static void AddMechanics(Card card, Dictionary <string, object> data)
 {
     if (data.ContainsKey("taunt"))
     {
         card.AddAspect <Taunt> ();
     }
 }
Пример #2
0
    static Ability AddAbility(Card card, string actionName, object userInfo)
    {
        var ability = card.AddAspect <Ability> ();

        ability.actionName = actionName;
        ability.userInfo   = userInfo;
        return(ability);
    }
Пример #3
0
    private static Ability AddAbility(Card card, Dictionary <string, object> data)
    {
        var ability = card.AddAspect <Ability> ();

        ability.actionName = (string)data["action"];
        ability.userInfo   = data["info"];
        return(ability);
    }
Пример #4
0
        private static Ability AddAbility(Card card, Dictionary <string, object> data)
        {
            var key     = card.GetAspects <Ability>().Count.ToString();
            var ability = card.AddAspect <Ability>(key);

            ability.ActionName = (string)data["action"];
            if (data.ContainsKey("info"))
            {
                ability.userInfo = data["info"];
            }
            return(ability);
        }
Пример #5
0
    private static void AddTarget(Card card, Dictionary <string, object> data)
    {
        if (data.ContainsKey("target") == false)
        {
            return;
        }
        var targetData  = (Dictionary <string, object>)data ["target"];
        var target      = card.AddAspect <Target> ();
        var allowedData = (Dictionary <string, object>)targetData["allowed"];

        target.allowed = new Mark(allowedData);
        var preferredData = (Dictionary <string, object>)targetData["preferred"];

        target.preferred = new Mark(preferredData);
    }