Example #1
0
 public Item(
     string itemName = "Default",
     ItemType itemType = ItemType.None,
     StatSystem itemStats = null,
     DamageType damageType = DamageType.None,
     AmmoType itemShoots = AmmoType.None,
     ItemQuality itemQuality = ItemQuality.None,
     double value = 0.0,
     int x = 0,
     int y = 0,
     int quantity = 1)
 {
     if (itemStats != null)
     {
         Stats = itemStats;
     }
     else
     {
         Stats = new StatSystem();
     }
     Name = itemName;
     type = itemType;
     ammo = itemShoots;
     Count = quantity;
     Quality = itemQuality;
     damage = damageType;
     Value = value;
     MapX = x;
     MapY = y;
 }
Example #2
0
 public Item(
     string itemName         = "Default",
     ItemType itemType       = ItemType.None,
     StatSystem itemStats    = null,
     DamageType damageType   = DamageType.None,
     AmmoType itemShoots     = AmmoType.None,
     ItemQuality itemQuality = ItemQuality.None,
     double value            = 0.0,
     int x        = 0,
     int y        = 0,
     int quantity = 1)
 {
     if (itemStats != null)
     {
         Stats = itemStats;
     }
     else
     {
         Stats = new StatSystem();
     }
     Name    = itemName;
     type    = itemType;
     ammo    = itemShoots;
     Count   = quantity;
     Quality = itemQuality;
     damage  = damageType;
     Value   = value;
     MapX    = x;
     MapY    = y;
 }
Example #3
0
 public HeroClass(string name, StatSystem initStats, StatSystem lvlStats)
 {
     levelRequirements = new int[10];
     count = 0;
     powers = new Power[10];
     Name = name;
     startingStats = new StatSystem();
     levelupStats = new StatSystem();
 }
Example #4
0
 public HeroClass(string name, StatSystem initStats, StatSystem lvlStats)
 {
     levelRequirements = new int[10];
     count             = 0;
     powers            = new Power[10];
     Name          = name;
     startingStats = new StatSystem();
     levelupStats  = new StatSystem();
 }
Example #5
0
        public StatSystem Subtract(StatSystem otherSystem)
        {
            StatSystem newSystem = new StatSystem();

            for (int i = 0; i < 9; ++i)
            {
                newSystem[(StatType)i].BaseValue = stats[i].BaseValue - otherSystem.stats[i].BaseValue;
                newSystem[(StatType)i].Modifier  = stats[i].Modifier - otherSystem.stats[i].Modifier;
            }

            return(newSystem);
        }
Example #6
0
 public Power(string name,
              TargetPattern aoePattern,
              double cd             = 0.0,
              bool passive          = true,
              StatSystem statEffect = null,
              StatSystem statCost   = null,
              double dur            = 0.0,
              double firingRange    = 0.0)
 {
     Name     = name;
     Pattern  = aoePattern;
     duration = dur;
     cooldown = cd;
     effect   = statEffect;
     cost     = statCost;
     duration = dur;
     range    = firingRange;
 }
Example #7
0
 public Power(   string name,
                 TargetPattern aoePattern,
                 double cd = 0.0, 
                 bool passive = true,
                 StatSystem statEffect = null,  
                 StatSystem statCost = null, 
                 double dur = 0.0, 
                 double firingRange = 0.0)
 {
     Name = name;
     Pattern = aoePattern;
     duration = dur;
     cooldown = cd;
     effect = statEffect;
     cost = statCost;
     duration = dur;
     range = firingRange;
 }
Example #8
0
        public Hero(string hname, int htype)
        {
            mapX = 1;
            mapY = 1;
            type = htype;
            mQueue = new List<Point>();
            delay = 0;
            name = hname;
            stats = new StatSystem();
            stats.SetBaseStat(StatType.Health, 23);
            stats.SetBaseStat(StatType.Vitality, 13);
            stats.SetBaseStat(StatType.Sanity, 8);
            stats.DrainStat(StatType.Health, 9);

            if ((HeroClasses)type == HeroClasses.Warrior)
            {
                chosenClass = new HeroClass("Warrior",
                                            new StatSystem(
                                                strength: 10,
                                                toughness: 5,
                                                health: 30,
                                                intellect: 3,
                                                perception: 5,
                                                sanity: 15,
                                                faith: 3,
                                                wisdom: 2,
                                                vitality: 20),
                                            new StatSystem(
                                                strength: 3,
                                                toughness: 2,
                                                health: 30,
                                                intellect: 3,
                                                perception: 5,
                                                sanity: 15,
                                                faith: 3,
                                                wisdom: 2,
                                                vitality: 20));
                chosenClass.AddPower(new Power(
                                                 name: "Rage",
                                                 aoePattern: new TargetPattern(),
                                                 cd: 30,
                                                 passive: true,
                                                 statEffect:
                                                            new StatSystem(
                                                            strength: 10,
                                                            toughness: 10,
                                                            health: 10,
                                                            intellect: -3,
                                                            perception: -1,
                                                            sanity: 0,
                                                            faith: 0,
                                                            wisdom: -2,
                                                            vitality: 0),
                                                  statCost:
                                                            new StatSystem(
                                                            strength: 0,
                                                            toughness: 0,
                                                            health: 0,
                                                            intellect: 0,
                                                            perception: 0,
                                                            sanity: 5,
                                                            faith: 0,
                                                            wisdom: 0,
                                                            vitality: 5),
                                                   dur: 5,
                                                   firingRange: 0),
                                       levelReq: 0);

            }
        }
Example #9
0
        public Hero(string hname, int htype)
        {
            mapX   = 1;
            mapY   = 1;
            type   = htype;
            mQueue = new List <Point>();
            delay  = 0;
            name   = hname;
            stats  = new StatSystem();
            stats.SetBaseStat(StatType.Health, 23);
            stats.SetBaseStat(StatType.Vitality, 13);
            stats.SetBaseStat(StatType.Sanity, 8);
            stats.DrainStat(StatType.Health, 9);

            if ((HeroClasses)type == HeroClasses.Warrior)
            {
                chosenClass = new HeroClass("Warrior",
                                            new StatSystem(
                                                strength: 10,
                                                toughness: 5,
                                                health: 30,
                                                intellect: 3,
                                                perception: 5,
                                                sanity: 15,
                                                faith: 3,
                                                wisdom: 2,
                                                vitality: 20),
                                            new StatSystem(
                                                strength: 3,
                                                toughness: 2,
                                                health: 30,
                                                intellect: 3,
                                                perception: 5,
                                                sanity: 15,
                                                faith: 3,
                                                wisdom: 2,
                                                vitality: 20));
                chosenClass.AddPower(new Power(
                                         name: "Rage",
                                         aoePattern: new TargetPattern(),
                                         cd: 30,
                                         passive: true,
                                         statEffect:
                                         new StatSystem(
                                             strength: 10,
                                             toughness: 10,
                                             health: 10,
                                             intellect: -3,
                                             perception: -1,
                                             sanity: 0,
                                             faith: 0,
                                             wisdom: -2,
                                             vitality: 0),
                                         statCost:
                                         new StatSystem(
                                             strength: 0,
                                             toughness: 0,
                                             health: 0,
                                             intellect: 0,
                                             perception: 0,
                                             sanity: 5,
                                             faith: 0,
                                             wisdom: 0,
                                             vitality: 5),
                                         dur: 5,
                                         firingRange: 0),
                                     levelReq: 0);
            }
        }
Example #10
0
        public StatSystem Subtract(StatSystem otherSystem)
        {
            StatSystem newSystem = new StatSystem();

            for (int i = 0; i < 9; ++i)
            {
                newSystem[(StatType)i].BaseValue = stats[i].BaseValue - otherSystem.stats[i].BaseValue;
                newSystem[(StatType)i].Modifier = stats[i].Modifier - otherSystem.stats[i].Modifier;
            }

            return newSystem;
        }