public BattleOptions(Unit caster) { wyrmSpellRepository = new WyrmSpellRepository(caster); zombieSpellRepository = new ZombieSpellRepository(caster); skeletonSpellRepository = new SkeletonSpellRepository(caster); giantSpellRepository = new GiantSpellRepository(caster); saintSpellRepository = new SaintSpellRepository(caster); reptileSpellRepository = new ReptileSpellRepository(caster); gryphonSpellRepository = new GryphonSpellRepository(caster); beastSpellRepository = new BeastSpellRepository(caster); demonSpellRepository = new DemonSpellRepository(caster); warriorSpellRepository = new WarriorSpellRepository(caster); mageSpellRepository = new MageSpellRepository(caster); hunterSpellRepository = new HunterSpellRepository(caster); naturalistSpellRepository = new NaturalistSpellRepository(caster); priestSpellRepository = new PriestSpellRepository(caster); paladinSpellRepository = new PaladinSpellRepository(caster); rogueSpellRepository = new RogueSpellRepository(caster); necroidSpellRepository = new NecroidSpellRepository(caster); shamanSpellRepository = new ShamanSpellRepository(caster); }
public void SetClass(Unit player) { while (true) { string input = Console.ReadLine(); if (input == "Warrior") { Warrior warrior = new Warrior(); warrior.StatIncrement(player, warrior); WarriorSpellRepository repos = new WarriorSpellRepository(player); repos.SpellRepositoryInitilization(player, repos); break; } if (input == "Mage") { Mage mage = new Mage(); mage.StatIncrement(player, mage); MageSpellRepository repos = new MageSpellRepository(player); repos.SpellRepositoryInitilization(player, repos); break; } if (input == "Paladin") { Paladin paladin = new Paladin(); paladin.StatIncrement(player, paladin); PaladinSpellRepository repos = new PaladinSpellRepository(player); repos.SpellRepositoryInitilization(player, repos); break; } if (input == "Necroid") { Necroid necroid = new Necroid(); necroid.StatIncrement(player, necroid); NecroidSpellRepository repos = new NecroidSpellRepository(player); repos.SpellRepositoryInitilization(player, repos); break; } if (input == "Hunter") { Hunter hunter = new Hunter(); hunter.StatIncrement(player, hunter); HunterSpellRepository repos = new HunterSpellRepository(player); repos.SpellRepositoryInitilization(player, repos); break; } if (input == "Rogue") { Rogue rogue = new Rogue(); rogue.StatIncrement(player, rogue); RogueSpellRepository repos = new RogueSpellRepository(player); repos.SpellRepositoryInitilization(player, repos); break; } if (input == "Naturalist") { Naturalist naturalist = new Naturalist(); naturalist.StatIncrement(player, naturalist); NaturalistSpellRepository repos = new NaturalistSpellRepository(player); repos.SpellRepositoryInitilization(player, repos); break; } if (input == "Priest") { Priest priest = new Priest(); priest.StatIncrement(player, priest); PriestSpellRepository repos = new PriestSpellRepository(player); repos.SpellRepositoryInitilization(player, repos); break; } if (input == "Shaman") { Shaman shaman = new Shaman(); shaman.StatIncrement(player, shaman); ShamanSpellRepository repos = new ShamanSpellRepository(player); repos.SpellRepositoryInitilization(player, repos); break; } else { Console.WriteLine($"{input} is not a valid class!Please insert a valid class."); continue; } } }