private static void AddMechanics(Card card, Dictionary <string, object> data) { if (data.ContainsKey("taunt")) { card.AddAspect <Taunt> (); } }
static Ability AddAbility(Card card, string actionName, object userInfo) { var ability = card.AddAspect <Ability> (); ability.actionName = actionName; ability.userInfo = userInfo; return(ability); }
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); }
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); }
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); }