Esempio n. 1
0
 public Unit(string name, string type, string classType, string race, int level
             , double xp, double xpCap, double maxHP, int healthRegen, double maxMana, int manaRegen, double attackPower
             , double magicPower, double armorValue, double ressistanceValue, double critChance
             , int goldAmount, PlayerInventory inventory, SpellRepos spells, Bag bag, Equipment equipment)
 {
     this.Name                    = name;
     this.Type                    = type;
     this.Level                   = level;
     this.XP                      = xp;
     this.MaxHP                   = maxHP;
     this.CurrentHP               = this.MaxHP;
     this.HealthRegen             = healthRegen;
     this.CurrentHealthRegen      = this.HealthRegen;
     this.MaxMana                 = maxMana;
     this.CurrentMana             = this.MaxMana;
     this.ManaRegen               = manaRegen;
     this.CurrentManaRegen        = this.ManaRegen;
     this.AttackPower             = attackPower;
     this.CurrentAttackPower      = this.AttackPower;
     this.MagicPower              = magicPower;
     this.CurrentMagicPower       = this.MagicPower;
     this.ArmorValue              = armorValue;
     this.CurrentArmorValue       = this.ArmorValue;
     this.RessistanceValue        = ressistanceValue;
     this.CurrentRessistanceValue = this.RessistanceValue;
     this.GoldAmount              = goldAmount;
     this.XPCap                   = xpCap;
     this.CritChance              = critChance;
     this.CurrentCritChance       = this.CritChance;
     inventory                    = new PlayerInventory();
     Spells    = new SpellRepos();
     bag       = new Bag();
     equipment = new Equipment();
 }
Esempio n. 2
0
 public EnemyUnit(string name, string classType, string race, int level,
                  double xp, double xpCap, double maxHP, int healthRegen, double maxMana, int manaRegen,
                  double attackPower, double magicPower, double armorValue, double ressistanceValue, double critChance, PlayerInventory inventory)
     : base(name, type, classType, race, level, xp, xpCap, maxHP, healthRegen, maxMana,
            manaRegen, attackPower, magicPower, armorValue, ressistanceValue, critChance, goldAmount, inventory, spells, bag, equipment)
 {
     spells = new SpellRepos();
 }
Esempio n. 3
0
        public Player(string name)

            : base(name, type, classType, race, level, xp, xpCap, maxHP, healthRegen, maxMana,
                   manaRegen, attackPower, magicPower, armorValue, ressistanceValue, critChance, goldAmount, inventory, spells, bag, equipment)
        {
            this.Name  = name;
            this.Level = level;
            inventory  = new PlayerInventory();
            spells     = new SpellRepos();
            bag        = new Bag();
            equipment  = new Equipment();
        }
        public void SpellCast(Unit caster, Unit target, SpellRepos repos)
        {
            if (caster.Type == "Player")
            {
                Console.WriteLine("Select a Spell!");
                Console.WriteLine();
                Console.WriteLine(repos.SpellReposInfo(repos, caster));
                Console.WriteLine();

                if (caster.ClassType == "Warrior")
                {
                    warriorSpellRepository.SpellCast(caster, target);
                }

                if (caster.ClassType == "Mage")
                {
                    mageSpellRepository.SpellCast(caster, target);
                }

                if (caster.ClassType == "Priest")
                {
                    priestSpellRepository.SpellCast(caster, target);
                }

                if (caster.ClassType == "Paladin")
                {
                    paladinSpellRepository.SpellCast(caster, target);
                }

                if (caster.ClassType == "Hunter")
                {
                    hunterSpellRepository.SpellCast(caster, target);
                }

                if (caster.ClassType == "Necroid")
                {
                    necroidSpellRepository.SpellCast(caster, target);
                }

                if (caster.ClassType == "Naturalist")
                {
                    naturalistSpellRepository.SpellCast(caster, target);
                }

                if (caster.ClassType == "Rogue")
                {
                    rogueSpellRepository.SpellCast(caster, target);
                }

                if (caster.ClassType == "Shaman")
                {
                    shamanSpellRepository.SpellCast(caster, target);
                }
            }
            else if (caster.Type == "Enemy")
            {
                Console.Write("[Enemy] ");

                if (caster.ClassType == "Beast")
                {
                    beastSpellRepository.SpellCast(caster, target);
                }

                if (caster.ClassType == "Demon")
                {
                    demonSpellRepository.SpellCast(caster, target);
                }

                if (caster.ClassType == "Giant")
                {
                    giantSpellRepository.SpellCast(caster, target);
                }

                if (caster.ClassType == "Gryphon")
                {
                    gryphonSpellRepository.SpellCast(caster, target);
                }

                if (caster.ClassType == "Reptile")
                {
                    reptileSpellRepository.SpellCast(caster, target);
                }

                if (caster.ClassType == "Saint")
                {
                    saintSpellRepository.SpellCast(caster, target);
                }

                if (caster.ClassType == "Skeleton")
                {
                    skeletonSpellRepository.SpellCast(caster, target);
                }

                if (caster.ClassType == "Wyrm")
                {
                    wyrmSpellRepository.SpellCast(caster, target);
                }

                if (caster.ClassType == "Zombie")
                {
                    zombieSpellRepository.SpellCast(caster, target);
                }
            }
        }