Inheritance: MonoBehaviour
Ejemplo n.º 1
0
        public Spell GetSpell(SpellId spellId)
        {
            Spell s = Spells[(int)spellId];

            if (s != null)
            {
                return(s);
            }
            //Spell s = null;
            //if (Spells.TryGetValue((int)spellId, out s)) return s;

            switch (spellId)
            {
            case SpellId.ArcaneBolt:
                s = new ArcaneBolt(this);
                break;

            case SpellId.LightningBolt:
                s = new LightningBolt(this);
                break;

            case SpellId.ArcaneMissiles:
                s = new ArcaneMissiles(this, false);
                break;

            case SpellId.ArcaneMissilesMB:
                s = new ArcaneMissiles(this, true);
                break;

            case SpellId.ArcaneMissilesCC:
                s = new ArcaneMissilesCC(this);
                break;

            case SpellId.ArcaneMissilesNoProc:
                s = new ArcaneMissiles(this, false, true, false, false);
                break;

            /*case SpellId.ArcaneMissilesFTF:
             *  s = new ArcaneMissiles(this);
             *  break;
             * case SpellId.ArcaneMissilesFTT:
             *  s = new ArcaneMissiles(this);
             *  break;*/
            case SpellId.Frostbolt:
                s = new Frostbolt(this);
                break;

            case SpellId.FrostboltNoCC:
                s = new Frostbolt(this, true, false, false);
                break;

            case SpellId.Fireball:
                s = new Fireball(this, false);
                break;

            case SpellId.FrostfireBolt:
                s = new FrostfireBolt(this, false);
                break;

            case SpellId.Pyroblast:
                s = new Pyroblast(this, false);
                break;

            case SpellId.FireBlast:
                s = new FireBlast(this);
                break;

            case SpellId.Scorch:
                s = new Scorch(this);
                break;

            case SpellId.ScorchNoCC:
                s = new Scorch(this, false);
                break;

            case SpellId.ArcaneBarrage:
                s = new ArcaneBarrage(this);
                break;

            case SpellId.ArcaneBlast33:
                s = new ArcaneBlast(this, 3, 3);
                break;

            case SpellId.ArcaneBlast33NoCC:
                s = new ArcaneBlast(this, 3, 3, true, false, false);
                break;

            case SpellId.ArcaneBlast00:
                s = new ArcaneBlast(this, 0, 0);
                break;

            case SpellId.ArcaneBlast00NoCC:
                s = new ArcaneBlast(this, 0, 0, true, false, false);
                break;

            case SpellId.ArcaneBlast10:
                s = new ArcaneBlast(this, 1, 0);
                break;

            case SpellId.ArcaneBlast01:
                s = new ArcaneBlast(this, 0, 1);
                break;

            case SpellId.ArcaneBlast11:
                s = new ArcaneBlast(this, 1, 1);
                break;

            case SpellId.ArcaneBlast11NoCC:
                s = new ArcaneBlast(this, 1, 1, true, false, false);
                break;

            case SpellId.ArcaneBlast22:
                s = new ArcaneBlast(this, 2, 2);
                break;

            case SpellId.ArcaneBlast22NoCC:
                s = new ArcaneBlast(this, 2, 2, true, false, false);
                break;

            case SpellId.ArcaneBlast12:
                s = new ArcaneBlast(this, 1, 2);
                break;

            case SpellId.ArcaneBlast23:
                s = new ArcaneBlast(this, 2, 3);
                break;

            case SpellId.ArcaneBlast30:
                s = new ArcaneBlast(this, 3, 0);
                break;

            case SpellId.ABAM:
                s = new ABAM(this);
                break;

            case SpellId.ABMBAM:
                s = new ABMBAM(this);
                break;

            case SpellId.ABABar:
                s = new ABABar(this);
                break;

            case SpellId.ABAMP:
                s = new ABAMP(this);
                break;

            case SpellId.AB3AMSc:
                s = new AB3AMSc(this);
                break;

            case SpellId.ABAM3Sc:
                s = new ABAM3Sc(this);
                break;

            case SpellId.ABAM3Sc2:
                s = new ABAM3Sc2(this);
                break;

            case SpellId.ABAM3FrB:
                s = new ABAM3FrB(this);
                break;

            case SpellId.ABAM3FrB2:
                s = new ABAM3FrB2(this);
                break;

            case SpellId.ABFrB:
                s = new ABFrB(this);
                break;

            case SpellId.AB3FrB:
                s = new AB3FrB(this);
                break;

            case SpellId.ABFrB3FrB:
                s = new ABFrB3FrB(this);
                break;

            case SpellId.ABFrB3FrB2:
                s = new ABFrB3FrB2(this);
                break;

            case SpellId.ABFrB3FrBSc:
                s = new ABFrB3FrBSc(this);
                break;

            case SpellId.ABFB3FBSc:
                s = new ABFB3FBSc(this);
                break;

            case SpellId.AB3Sc:
                s = new AB3Sc(this);
                break;

            case SpellId.FireballScorch:
                s = new FireballScorch(this);
                break;

            case SpellId.FireballFireBlast:
                s = new FireballFireBlast(this);
                break;

            case SpellId.ABAM3ScCCAM:
                s = new ABAM3ScCCAM(this);
                break;

            case SpellId.ABAM3Sc2CCAM:
                s = new ABAM3Sc2CCAM(this);
                break;

            case SpellId.ABAM3FrBCCAM:
                s = new ABAM3FrBCCAM(this);
                break;

            case SpellId.ABAM3FrBCCAMFail:
                s = new ABAM3FrBCCAMFail(this);
                break;

            case SpellId.ABAM3FrBScCCAM:
                s = new ABAM3FrBScCCAM(this);
                break;

            case SpellId.ABAMCCAM:
                s = new ABAMCCAM(this);
                break;

            case SpellId.ABAM3CCAM:
                s = new ABAM3CCAM(this);
                break;

            case SpellId.ArcaneExplosion:
                s = new ArcaneExplosion(this);
                break;

            case SpellId.FlamestrikeSpammed:
                s = new Flamestrike(this, true);
                break;

            case SpellId.FlamestrikeSingle:
                s = new Flamestrike(this, false);
                break;

            case SpellId.Blizzard:
                s = new Blizzard(this);
                break;

            case SpellId.BlastWave:
                s = new BlastWave(this);
                break;

            case SpellId.DragonsBreath:
                s = new DragonsBreath(this);
                break;

            case SpellId.ConeOfCold:
                s = new ConeOfCold(this);
                break;

            case SpellId.ArcaneBlast0POM:
                s = new ArcaneBlast(this, 0, 0, false, false, true);
                break;

            case SpellId.FireballPOM:
                s = new Fireball(this, true);
                break;

            case SpellId.FrostboltPOM:
                s = new Frostbolt(this, false, false, true);
                break;

            case SpellId.PyroblastPOM:
                s = new Pyroblast(this, true);
                break;

            case SpellId.CustomSpellMix:
                s = new SpellCustomMix(this);
                break;
            }
            if (s != null)
            {
                s.SpellId            = spellId;
                Spells[(int)spellId] = s;
            }

            return(s);
        }
Ejemplo n.º 2
0
        private static CurrentSpell FireMageCommands(Player mage)
        {
            ConsoleKeyInfo enter = new ConsoleKeyInfo();

            Console.Clear();

            var counter = 1;

            while (enter.Key != ConsoleKey.Enter)
            {
                if (enter.Key == ConsoleKey.DownArrow)
                {
                    counter++;
                }
                else if (enter.Key == ConsoleKey.UpArrow)
                {
                    counter--;
                }

                GameTitle.GetTitle();
                string actionSelect = $"SELECT ACTION FOR {mage.Name}";
                string fireBlast    = $"FIRE BLAST-- DAMAGE:{mage.Spellpower * 2} COST: 120 MANA, NO COOLDOWN";
                string fireArmor    = $"FIRE ARMOR-- GET 150 ARMOR AND 150 HEALTH, COST: 80 MANA, COOLDOWN: 3";
                string pyroBlast    = $"PYRO BLAST-- DAMAGE:{mage.Spellpower * 5} COST: 250 MANA, COOLDOWN: 4";
                string incinerate   = $"INCINERATE-- KILL ENEMY IF ENEMY HP IS BELOW 900";
                Console.WriteLine("{0}", actionSelect);
                switch (counter)
                {
                case 1:
                    Console.ForegroundColor = ConsoleColor.Red;
                    Console.WriteLine("{0,2}", "-> " + fireBlast);
                    Console.WriteLine("{0,2}", fireArmor);
                    Console.WriteLine("{0,2}", pyroBlast);
                    Console.WriteLine("{0,2}", incinerate); break;

                case 2:
                    Console.ForegroundColor = ConsoleColor.Red;
                    Console.WriteLine("{0,2}", fireBlast);
                    Console.WriteLine("{0,2}", "-> " + fireArmor);
                    Console.WriteLine("{0,2}", pyroBlast);
                    Console.WriteLine("{0,2}", incinerate); break;

                case 3:
                    Console.ForegroundColor = ConsoleColor.Red;
                    Console.WriteLine("{0,2}", fireBlast);
                    Console.WriteLine("{0,2}", fireArmor);
                    Console.WriteLine("{0,2}", "-> " + pyroBlast);
                    Console.WriteLine("{0,2}", incinerate); break;

                case 4:
                    Console.ForegroundColor = ConsoleColor.Red;
                    Console.WriteLine("{0,2}", fireBlast);
                    Console.WriteLine("{0,2}", fireArmor);
                    Console.WriteLine("{0,2}", pyroBlast);
                    Console.WriteLine("{0,2}", "-> " + incinerate); break;

                default:
                    if (counter == 5)
                    {
                        counter = 1;
                        Console.ForegroundColor = ConsoleColor.Red;
                        Console.WriteLine("{0,2}", "-> " + fireBlast);
                        Console.WriteLine("{0,2}", fireArmor);
                        Console.WriteLine("{0,2}", pyroBlast);
                        Console.WriteLine("{0,2}", incinerate); break;
                    }
                    else if (counter == 0)
                    {
                        counter = 4;
                        Console.ForegroundColor = ConsoleColor.Red;
                        Console.WriteLine("{0,2}", fireBlast);
                        Console.WriteLine("{0,2}", fireArmor);
                        Console.WriteLine("{0,2}", pyroBlast);
                        Console.WriteLine("{0,2}", "-> " + incinerate); break;
                    }
                    break;
                }
                enter = Console.ReadKey();
                Console.Clear();
            }
            var currentSpell = new CurrentSpell();

            switch (counter)
            {
            case 1:
                var fireBlast = new FireBlast();
                currentSpell = fireBlast.GetFireBlast(mage);
                break;

            case 2:
                var fireArmor = new FireArmor();
                currentSpell = fireArmor.GetFireArmor(mage);
                break;

            case 3:
                var pyroBlast = new PyroBlast();
                currentSpell = pyroBlast.GetPyroBlast(mage);
                break;

            default:
                var incinerate = new Incinerate();
                currentSpell = incinerate.Incineration(mage);
                break;
            }

            return(currentSpell);
        }
Ejemplo n.º 3
0
        public Spells()
        {
            Items = new List <BaseSpell>();

            goblinWave = new GoblinWave();
            Items.Add(goblinWave);

            wolfPack = new WolfPack();
            Items.Add(wolfPack);

            siege = new Siege();
            Items.Add(siege);

            orcWave = new OrcWave();
            Items.Add(orcWave);

            trollWave = new TrollWave();
            Items.Add(trollWave);

            blackHorsemen = new BlackHorsemen();
            Items.Add(blackHorsemen);

            giant = new Giant();
            Items.Add(giant);

            dragon = new Dragon();
            Items.Add(dragon);

            spark = new Spark();
            Items.Add(spark);

            eletroCharge = new EletroCharge();
            Items.Add(eletroCharge);

            lightning = new Lightning();
            Items.Add(lightning);

            discharge = new Discharge();
            Items.Add(discharge);

            thunderShock = new ThunderShock();
            Items.Add(thunderShock);

            thunderBolt = new ThunderBolt();
            Items.Add(thunderBolt);

            lightningStorm = new LightningStorm();
            Items.Add(lightningStorm);

            thunder = new Thunder();
            Items.Add(thunder);

            mudStrike = new MudStrike();
            Items.Add(mudStrike);

            rockThrow = new RockThrow();
            Items.Add(rockThrow);

            vineWhip = new VineWhip();
            Items.Add(vineWhip);

            razorLeaf = new RazorLeaf();
            Items.Add(razorLeaf);

            seedBombs = new SeedBombs();
            Items.Add(seedBombs);

            rockBlast = new RockBlast();
            Items.Add(rockBlast);

            photosynthesis = new Photosynthesis();
            Items.Add(photosynthesis);

            earthQuake = new Earthquake();
            Items.Add(earthQuake);

            wave = new Wave();
            Items.Add(wave);

            whirlwind = new Whirlwind();
            Items.Add(whirlwind);

            icyspikes = new IcySpikes();
            Items.Add(icyspikes);

            ringoffrost = new RingOfFrost();
            Items.Add(ringoffrost);

            frozenPillar = new FrozenPillar();
            Items.Add(frozenPillar);

            frostWave = new FrostWave();
            Items.Add(frostWave);

            storm = new Storm();
            Items.Add(storm);

            blizzard = new Blizzard();
            Items.Add(blizzard);

            fireball = new Fireball();
            Items.Add(fireball);

            firewave = new Firewave();
            Items.Add(firewave);

            imoloate = new Imoloate();
            Items.Add(imoloate);

            fireblast = new FireBlast();
            Items.Add(fireblast);

            ringoffire = new RingOfFire();
            Items.Add(ringoffire);

            lavastrike = new LavaStrike();
            Items.Add(lavastrike);

            dragonBreath = new DragonBreath();
            Items.Add(dragonBreath);
        }