コード例 #1
0
 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);
 }
コード例 #2
0
        public void BeastSetClass(Unit enemy)
        {
            var rng         = new Random();
            int beastNumber = rng.Next(0, 27);

            if (beastNumber == 0 || beastNumber == 1 || beastNumber == 2 ||
                beastNumber == 3 || beastNumber == 4 || beastNumber == 5)
            {
                Beast beast = new Beast();
                beast.StatIncrement(enemy, beast);
                beast.RarityRng(enemy);
                BeastSpellRepository repos = new BeastSpellRepository(enemy);
                repos.SpellRepositoryInitilization(enemy, repos);
            }

            if (beastNumber == 6 || beastNumber == 7 || beastNumber == 8 ||
                beastNumber == 9 || beastNumber == 10)
            {
                Reptile reptile = new Reptile();
                reptile.StatIncrement(enemy, reptile);
                reptile.RarityRng(enemy);
                ReptileSpellRepository repos = new ReptileSpellRepository(enemy);
                repos.SpellRepositoryInitilization(enemy, repos);
            }

            if (beastNumber == 19 || beastNumber == 20)
            {
                Wyrm wyrm = new Wyrm();
                wyrm.StatIncrement(enemy, wyrm);
                wyrm.RarityRng(enemy);
                WyrmSpellRepository repos = new WyrmSpellRepository(enemy);
                repos.SpellRepositoryInitilization(enemy, repos);
            }

            if (beastNumber == 21 || beastNumber == 22)
            {
                Giant giant = new Giant();
                giant.StatIncrement(enemy, giant);
                giant.RarityRng(enemy);
                GiantSpellRepository repos = new GiantSpellRepository(enemy);
                repos.SpellRepositoryInitilization(enemy, repos);
            }

            if (beastNumber == 11 || beastNumber == 12 || beastNumber == 13 ||
                beastNumber == 14)
            {
                Zombie zombie = new Zombie();
                zombie.StatIncrement(enemy, zombie);
                zombie.RarityRng(enemy);
                ZombieSpellRepository repos = new ZombieSpellRepository(enemy);
                repos.SpellRepositoryInitilization(enemy, repos);
            }

            if (beastNumber == 23 || beastNumber == 24)
            {
                Gryphon gryphon = new Gryphon();
                gryphon.StatIncrement(enemy, gryphon);
                gryphon.RarityRng(enemy);
                GryphonSpellRepository repos = new GryphonSpellRepository(enemy);
                repos.SpellRepositoryInitilization(enemy, repos);
            }

            if (beastNumber == 15 || beastNumber == 16 || beastNumber == 17 ||
                beastNumber == 18)
            {
                Skeleton skeleton = new Skeleton();
                skeleton.StatIncrement(enemy, skeleton);
                skeleton.RarityRng(enemy);
                SkeletonSpellRepository repos = new SkeletonSpellRepository(enemy);
                repos.SpellRepositoryInitilization(enemy, repos);
            }

            if (beastNumber == 25)
            {
                Saint saint = new Saint();
                saint.StatIncrement(enemy, saint);
                saint.RarityRng(enemy);
                SaintSpellRepository repos = new SaintSpellRepository(enemy);
                repos.SpellRepositoryInitilization(enemy, repos);
            }

            if (beastNumber == 26)
            {
                Demon demon = new Demon();
                demon.StatIncrement(enemy, demon);
                demon.RarityRng(enemy);
                DemonSpellRepository repos = new DemonSpellRepository(enemy);
                repos.SpellRepositoryInitilization(enemy, repos);
            }
        }