Пример #1
0
 public void Start()
 {
     gm         = FindObjectOfType <GameManager>();
     fire       = AllSpells[0].GetComponent <Fireball>();
     frost      = AllSpells[1].GetComponent <FrostBolt>();
     lightning  = AllSpells[2].GetComponent <LightningBolt>();
     meteor     = AllSpells[5].GetComponent <Meteor>();
     cone       = AllSpells[3].GetComponent <Cone>();
     ghostcast  = AllSpells[4].GetComponent <GhostCast>();
     doublecast = AllSpells[6].GetComponent <DoubleCast>();
     splitcast  = AllSpells[7].GetComponent <SplitCast>();
     companion  = AllSpells[8].GetComponent <Companion>();
     boost      = AllSpells[9].GetComponent <Boost>();
     hasten     = AllSpells[10].GetComponent <Hasten>();
     empower    = AllSpells[11].GetComponent <Empower>();
     blackhole  = AllSpells[12].GetComponent <BlackHole>();
     push       = AllSpells[13].GetComponent <Push>();
     pool       = AllSpells[14].GetComponent <Pool>();
     chaosorb   = AllSpells[15].GetComponent <ChaosOrb>();
     channling  = AllSpells[16].GetComponent <Channeling>();
     blessedaim = AllSpells[17].GetComponent <BlessedAim>();
 }
Пример #2
0
    public void LeveloneSpell(int lvl1choiceNOW)
    {
        CastSpell     cast      = CastSpell.FindObjectOfType <CastSpell>();
        Fireball      fire      = Fireball.GetComponent <Fireball>();
        FrostBolt     frost     = FrostBolt.GetComponent <FrostBolt>();
        LightningBolt lightning = LightningBolt.GetComponent <LightningBolt>();


        if (lvl1choiceNOW == 1)
        {
            cast.spellname          = fire.spellname;
            cast.projectilespeed    = fire.projectilespeed;
            cast.damage1Pure        = fire.damagePure;
            cast.currentspellObject = fire.projectile;
            cast.currentConeObject  = fire.Cone;
            cast.currentChannel     = fire.Channel;
            cast.currentChannelCone = fire.ChannelCone;
            cast.currentChanMet     = fire.ChannelMeteor;
            cast.currentMeteor      = fire.Meteor;
            cast.cd1Pure            = fire.cooldownSeconds;
            cast.FireBallBurn       = fire.FireBallBurn;
            cast.BurnDuration       = fire.BurnDuration;
            cast.BurnPercent        = fire.BurnPercent;
            cast.FrostBoltSlow      = false;
            cast.LBBounce           = false;
            cast.PoolInst           = fire.Pool;
            Player.FindObjectOfType <Player>().spellrange = fire.spellrange;
        }

        if (lvl1choiceNOW == 2)
        {
            cast.spellname          = frost.spellname;
            cast.projectilespeed    = frost.projectilespeed;
            cast.damage1Pure        = frost.damagePure;
            cast.currentspellObject = frost.projectile;
            cast.currentConeObject  = frost.Cone;
            cast.currentChannel     = frost.Channel;
            cast.currentChannelCone = frost.ChannelCone;
            cast.currentChanMet     = frost.ChannelMeteor;
            cast.currentMeteor      = frost.Meteor;
            cast.cd1Pure            = frost.cooldownSeconds;
            cast.FrostBoltSlow      = frost.FrostBoltSlow;
            cast.SlowDuration       = frost.SlowDuration;
            cast.SlowPercent        = frost.SlowPercent;
            cast.FireBallBurn       = false;
            cast.LBBounce           = false;
            cast.PoolInst           = frost.Pool;
            Player.FindObjectOfType <Player>().spellrange = frost.spellrange;
        }

        if (lvl1choiceNOW == 3)
        {
            cast.spellname          = lightning.spellname;
            cast.projectilespeed    = lightning.projectilespeed;
            cast.damage1Pure        = lightning.damagePure;
            cast.currentspellObject = lightning.projectile;
            cast.currentMeteor      = lightning.Meteor;
            cast.currentChannelCone = lightning.ChannelCone;
            cast.currentChannel     = lightning.Channel;
            cast.currentConeObject  = lightning.Cone;
            cast.cd1Pure            = lightning.cooldownSeconds;
            cast.FrostBoltSlow      = false;
            cast.FireBallBurn       = false;
            cast.LBBounce           = lightning.LBBounce;
            cast.LBBounceAmount     = lightning.LBBounceAmount;
            cast.PoolInst           = lightning.Pool;
            Player.FindObjectOfType <Player>().spellrange = lightning.spellrange;
        }
        if (lvl1choiceNOW == 0)
        {
            cast.spellname          = "";
            cast.projectilespeed    = 0;
            cast.damage1Pure        = 0;
            cast.currentspellObject = null;
            cast.cd1Pure            = 0;
            cast.FrostBoltSlow      = false;
            cast.FireBallBurn       = false;
            cast.LBBounce           = false;
            cast.LBBounceAmount     = 0;
            Player.FindObjectOfType <Player>().spellrange = 0;
        }
    }
Пример #3
0
        private static CurrentSpell FrostMageCommands(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 frostArmor   = $"FROST ARMOR-- GET 150 ARMOR, LOWER PHYSICAL DAMAGE BY 20% FOR 2 TURNS, COST: 100 MANA, COOLDOWN: 3";
                string frostBolt    = $"FROST BOLT-- DAMAGE ENEMY FOR {mage.Spellpower * 2}, LOWER ENEMY PHYSICAL DAMAGE DONE BY 20% FOR 2 TURNS, COST: 90 MANA, NO COOLDOWN";
                string icyVeins     = $"ICY VEINS-- LOWER COOLDOWN ON ALL SPELLS BY 1 TURN, GET 50% MORE SPELLPOWER FOR NEXT 3 TURNS, COST: 250 MANA, COOLDOWN: 4";
                string frozenGround = $"FROZEN GROUND-- STUN ENEMY FOR 1 TURN AND DAMAGE HIM FOR 2 TURNS BY {mage.Spellpower}, COST: 150 MANA, COOLDOWN: 4";
                Console.WriteLine("{0}", actionSelect);
                switch (counter)
                {
                case 1:
                    Console.ForegroundColor = ConsoleColor.Blue;
                    Console.WriteLine("{0,2}", "-> " + frostArmor);
                    Console.WriteLine("{0,2}", frostBolt);
                    Console.WriteLine("{0,2}", icyVeins);
                    Console.WriteLine("{0,2}", frozenGround); break;

                case 2:
                    Console.ForegroundColor = ConsoleColor.Blue;
                    Console.WriteLine("{0,2}", frostArmor);
                    Console.WriteLine("{0,2}", "-> " + frostBolt);
                    Console.WriteLine("{0,2}", icyVeins);
                    Console.WriteLine("{0,2}", frozenGround); break;

                case 3:
                    Console.ForegroundColor = ConsoleColor.Blue;
                    Console.WriteLine("{0,2}", frostArmor);
                    Console.WriteLine("{0,2}", frostBolt);
                    Console.WriteLine("{0,2}", "-> " + icyVeins);
                    Console.WriteLine("{0,2}", frozenGround); break;

                case 4:
                    Console.ForegroundColor = ConsoleColor.Blue;
                    Console.WriteLine("{0,2}", frostArmor);
                    Console.WriteLine("{0,2}", frostBolt);
                    Console.WriteLine("{0,2}", icyVeins);
                    Console.WriteLine("{0,2}", "-> " + frozenGround); break;

                default:
                    if (counter == 5)
                    {
                        counter = 1;
                        Console.ForegroundColor = ConsoleColor.Blue;
                        Console.WriteLine("{0,2}", "-> " + frostArmor);
                        Console.WriteLine("{0,2}", frostBolt);
                        Console.WriteLine("{0,2}", icyVeins);
                        Console.WriteLine("{0,2}", frozenGround); break;
                    }
                    else if (counter == 0)
                    {
                        counter = 4;
                        Console.ForegroundColor = ConsoleColor.Blue;
                        Console.WriteLine("{0,2}", frostArmor);
                        Console.WriteLine("{0,2}", frostBolt);
                        Console.WriteLine("{0,2}", icyVeins);
                        Console.WriteLine("{0,2}", "-> " + frozenGround); break;
                    }
                    break;
                }
                enter = Console.ReadKey();
                Console.Clear();
            }
            var currentSpell = new CurrentSpell();

            switch (counter)
            {
            case 1:
                var frostArmor = new FrostArmor();
                currentSpell = frostArmor.GetFrostArmor(mage);
                break;

            case 2:
                var frostBolt = new FrostBolt();
                currentSpell = frostBolt.GetFrostBolt(mage);
                break;

            case 3:
                var icyVeins = new IcyVeins();
                currentSpell = icyVeins.GetIcyVeins(mage);
                break;

            default:
                var frozenGround = new FrozenGround();
                currentSpell = frozenGround.GetFrozenGround(mage);
                break;
            }

            return(currentSpell);
        }