Exemple #1
0
        private T CreateInstance <T>(CardJson cj, string str)
        {
            var type = Type.GetType($"Furuyoni.Model.{str}", true);
            var args = new object[] { cj };

            return((T)Activator.CreateInstance(type, args));
        }
Exemple #2
0
        public Atack(CardJson cj)
        {
            Range = cj.Range;
            var damage = cj.Damage.Split('/');

            AuraDamage = damage[0];
            LifeDamage = damage[1];
        }
Exemple #3
0
 public Card(CardJson cj)
 {
     Name     = cj.Name;
     Owner    = cj.Owner;
     Text     = cj.Text;
     Category = CreateInstance <CardType>(cj, cj.Category);
     Main     = CreateInstance <CardType>(cj, cj.Main);
     Sub      = CreateInstance <CardType>(cj, cj.Sub);
 }
Exemple #4
0
 public class FullPower : CardType { public FullPower(CardJson _)
                                     {
                                     }
Exemple #5
0
 public class Reaction : CardType { public Reaction(CardJson _)
                                    {
                                    }
Exemple #6
0
 public class None : CardType { public None(CardJson _)
                                {
                                }
Exemple #7
0
 public class Unknown : CardType { public Unknown(CardJson _)
                                   {
                                   }
Exemple #8
0
 public Grant(CardJson cj) => Charge = cj.Charge;
Exemple #9
0
 public class Action : CardType { public Action(CardJson _)
                                  {
                                  }
Exemple #10
0
 public Special(CardJson cj) => Cost = cj.Cost;
Exemple #11
0
 public class TransForm : CardType { public TransForm(CardJson _)
                                     {
                                     }
Exemple #12
0
 public class Poison : CardType { public Poison(CardJson _)
                                  {
                                  }
Exemple #13
0
 public class Normal : CardType { public Normal(CardJson _)
                                  {
                                  }