コード例 #1
0
ファイル: Spellbook.cs プロジェクト: ErteTD/Depper
    public void LevelthreeSpell(int lvl3choiceNOW)
    {
        CastSpell  cast  = CastSpell.FindObjectOfType <CastSpell>();
        DoubleCast dCast = DoubleCast.GetComponent <DoubleCast>();
        SplitCast  split = SplitCast.GetComponent <SplitCast>();
        Companion  Corb  = CompOrb.GetComponent <Companion>();

        if (lvl3choiceNOW == 1)
        { // Multicast
            cast.doubleCast = dCast.doubleCast;
            cast.cd1Per     = dCast.cooldownPercent;
            cast.splitCast  = false;
            cast.damage1Per = dCast.damagePercent;
            cast.CompOrb    = false;
        }

        if (lvl3choiceNOW == 2)
        { // Splitcast
            cast.doubleCast = false;
            cast.splitCast  = split.splitCast;
            cast.cd1Per     = split.cooldownPercent;
            cast.damage1Per = split.damagePercent;
            cast.CompOrb    = false;
        }

        if (lvl3choiceNOW == 3)
        { //CompOrb
            cast.CompOrbCD  = Corb.Cooldown;
            cast.CompOrbDur = Corb.duration;
            cast.CompOrb    = Corb.CompOrb;
            cast.damage1Per = Corb.damagePercent;
            cast.cd1Per     = Corb.cooldownPercent;
            cast.doubleCast = false;
            cast.splitCast  = false;
        }
        if (lvl3choiceNOW == 4)
        { // Multicast
            cast.doubleCast = dCast.doubleCast;
            cast.cd1Per     = dCast.cooldownPercent * split.cooldownPercent;
            cast.splitCast  = true;
            cast.damage1Per = dCast.damagePercent * split.damagePercent;
            cast.CompOrb    = false;
        }



        if (lvl3choiceNOW == 0)
        {
            cast.damage1Per = 1f;
            cast.doubleCast = false;
            cast.splitCast  = false;
            cast.CompOrb    = false;
            cast.cd1Per     = 1f;
        }
    }
コード例 #2
0
ファイル: ToolTipScript.cs プロジェクト: ErteTD/Depper
    public void ArmorTip(bool preview)
    {
        ToolTipHC2         = false;
        toggleArmorTooltip = !toggleArmorTooltip;
        ArmorTipPanel.SetActive(toggleArmorTooltip);
        int CurID = CastSpell.FindObjectOfType <CastWeapon>().CurrentArmor;

        if (preview)
        {
            CurID      = CurItemID;
            ToolTipHC2 = true;
        }
        GetArmorClassFrom(AllArmors_[CurID], preview);
    }
コード例 #3
0
ファイル: ToolTipScript.cs プロジェクト: ErteTD/Depper
    public void WeaponTip(bool preview)
    {
        ToolTipHC1          = false;
        toggleWeaponTooltip = !toggleWeaponTooltip;
        WeaponTipPanel.SetActive(toggleWeaponTooltip);
        int CurID = CastSpell.FindObjectOfType <CastWeapon>().CurrentWeapon;

        if (preview)
        {
            CurID      = CurItemID;
            ToolTipHC1 = true;
        }
        GetWeaponClassFrom(AllWeapons_[CurID], preview);
    }
コード例 #4
0
ファイル: Spellbook.cs プロジェクト: ErteTD/Depper
    public void LevelfourSpell(int lvl4choiceNOW)
    {
        CastSpell cast    = CastSpell.FindObjectOfType <CastSpell>();
        Boost     boost   = Boost.GetComponent <Boost>();
        Hasten    hasten  = Hasten.GetComponent <Hasten>();
        Empower   empower = Empower.GetComponent <Empower>();

        if (lvl4choiceNOW == 1)
        {                                        // Boost
            cast.damage3Pure = boost.damagePure; //TODO ehum order of damage.
            cast.damage2Per  = boost.damagePercent;
            cast.BoostCrit   = boost.BoostCrit;
            cast.CritChance  = boost.CritChance;
            cast.CritDamage  = boost.CritDamage;
            cast.cd2Per      = 1f;
            cast.HastenBool  = false;
        }
        if (lvl4choiceNOW == 2)
        { //Hasten
            cast.cd2Per           = hasten.cooldownPercent;
            cast.projectilespeed *= hasten.ProjectileSpeed;
            cast.HastenChance     = hasten.HastenChance;
            cast.HastenBool       = hasten.HastenBool;
            cast.BoostCrit        = false;
            cast.damage3Pure      = 0f;
            cast.damage2Per       = 1f;
        }
        if (lvl4choiceNOW == 3)
        { //Empower OBS don't need to reset empower or specify for other lvl 4 spells, because always redone when "lvl1" spell in called.
            cast.SlowPercent    = empower.SlowPercent;
            cast.SlowDuration   = empower.SlowDuration;
            cast.cd2Per         = 1f;
            cast.BurnPercent    = empower.BurnPercent;
            cast.BurnDuration   = empower.BurnDuration;
            cast.LBBounceAmount = empower.LBBounceAmount;
            cast.BoostCrit      = false;
            cast.HastenBool     = false;
            cast.damage3Pure    = 0f;
            cast.damage2Per     = 1f;
        }
        if (lvl4choiceNOW == 0)
        {
            cast.damage3Pure = 0f;
            cast.damage2Per  = 1f;
            cast.cd2Per      = 1f;
            cast.HastenBool  = false;
            cast.BoostCrit   = false;
        }
    }
コード例 #5
0
ファイル: Spellbook.cs プロジェクト: ErteTD/Depper
    public void SlotThree()
    {
        slot1.color = Color.white;
        slot2.color = Color.white;
        slot3.color = selCol;

        if (!finishSpell_)
        {
            LeveloneSpell(spellSlot3Choice1);
            LeveltwoSpell(spellSlot3Choice2);
            LevelthreeSpell(spellSlot3Choice3);
            LevelfourSpell(spellSlot3Choice4);
            LevelfiveSpell(spellSlot3Choice5);
            LevelsixSpell(spellSlot3Choice6);
        }
        CastSpell.FindObjectOfType <CastSpell>().currentSlot = 3;
    }
コード例 #6
0
ファイル: Spellbook.cs プロジェクト: ErteTD/Depper
    public void LevelfiveSpell(int lvl5choiceNOW)
    {
        CastSpell cast = CastSpell.FindObjectOfType <CastSpell>();
        BlackHole BH   = BlackHole.GetComponent <BlackHole>();
        Push      push = Push.GetComponent <Push>();
        Pool      pool = Pool.GetComponent <Pool>();

        if (lvl5choiceNOW == 1)
        { // BlackHole
            cast.cd3Pure    = BH.cooldownSeconds;
            cast.BHDuration = BH.BHDuration;
            cast.BHSize     = BH.BHSize;
            cast.BHRadius   = BH.BHRadius;
            cast.BHStrenght = BH.BHStrenght;
            cast.BHBool     = BH.BHBool;
            cast.Push       = false;
            cast.pool       = false;
        }

        if (lvl5choiceNOW == 2)
        { //Push
            cast.cd3Pure = push.cooldownSeconds;
            cast.Push    = push.push;
            cast.BHBool  = false;
            cast.pool    = false;
        }

        if (lvl5choiceNOW == 3)
        { //Pool
            cast.cd3Pure      = pool.cooldownSeconds;
            cast.pool         = pool.pool;
            cast.Poolduration = pool.duration;
            cast.PoolDamage   = pool.damageMod;
            cast.BHBool       = false;
            cast.Push         = false;
        }
        if (lvl5choiceNOW == 0)
        {
            cast.cd3Pure    = 0f;
            cast.BHBool     = false;
            cast.Push       = false;
            cast.pool       = false;
            cast.PoolDamage = 0f;
        }
    }
コード例 #7
0
ファイル: Spellbook.cs プロジェクト: ErteTD/Depper
    public void LeveltwoSpell(int lvl2choiceNOW)
    {
        CastSpell cast   = CastSpell.FindObjectOfType <CastSpell>();
        Meteor    meteor = Meteor.GetComponent <Meteor>();
        GhostCast ghost  = GhostCast.GetComponent <GhostCast>();
        Cone      cone   = Cone.GetComponent <Cone>();

        if (lvl2choiceNOW == 1)
        { // Meteor
            cast.damage2Pure   = meteor.damagePure;
            cast.aoeSizeMeteor = meteor.aoeSize;
            cast.cd2Pure       = meteor.cooldownSeconds;
            cast.ghostCast     = false; // needs to be here to remove ghostchast
            cast.cone          = false;
        }

        if (lvl2choiceNOW == 2)
        { // Cone - Aoe infront of caster.
            cast.cone          = cone.cone;
            cast.damage2Pure   = cone.damagePure;
            cast.cd2Pure       = cone.cooldownSeconds;
            cast.aoeSizeMeteor = 0f;
            cast.ghostCast     = false;
        }

        if (lvl2choiceNOW == 3)
        { //GhostCast (spells pass through enemies).
            cast.damage2Pure   = ghost.damagePure;
            cast.ghostCast     = ghost.ghostCast;
            cast.cd2Pure       = ghost.cooldownSeconds;
            cast.aoeSizeMeteor = 0f; // needs to be here to remove the meteor thingy..
            cast.cone          = false;
        }
        if (lvl2choiceNOW == 0)
        {
            cast.damage2Pure   = 0f;
            cast.aoeSizeMeteor = 0f;
            cast.cd2Pure       = 0f;
            cast.cone          = false;
            cast.ghostCast     = false;
        }
    }
コード例 #8
0
ファイル: Spellbook.cs プロジェクト: ErteTD/Depper
    public void LevelsixSpell(int lvl6choiceNOW)
    {
        CastSpell  cast    = CastSpell.FindObjectOfType <CastSpell>();
        ChaosOrb   Chaos   = ChaosOrb.GetComponent <ChaosOrb>();
        Channeling channel = Channeling.GetComponent <Channeling>();
        BlessedAim Aim     = BlessedAim.GetComponent <BlessedAim>();

        if (lvl6choiceNOW == 1)
        { // Chaos
            cast.cd4Per           = Chaos.cooldownPercent;
            cast.cd4Pure          = Chaos.cooldownSeconds;
            cast.ChaosOrb_        = Chaos.ChaosOrbBool;
            cast.damage4Per       = 1;
            cast.ChaosOrbAttackCD = Chaos.ChaosOrbAttackCD;
            cast.ChaosOrbDuration = Chaos.ChaosOrbDuration;
            cast.channel          = false;
            cast.BlessedAim       = false;
        }

        if (lvl6choiceNOW == 2)
        { //Channel
            cast.damage4Per = channel.damagePercent;
            cast.cd4Pure    = channel.cooldownSeconds;
            cast.channel    = channel.channeling;
            cast.cd4Per     = channel.cooldownPercent;
            cast.chanDur    = channel.chanDur;
            cast.ChaosOrb_  = false;
            cast.BlessedAim = false;
        }

        if (lvl6choiceNOW == 3)
        { //Blessed
            cast.cd4Per     = Aim.cooldownPercent;
            cast.damage4Per = Aim.damagePercent;
            cast.BlessedAim = Aim.BlessedAimBool;
            cast.cd4Pure    = 0;
            cast.channel    = false;
            cast.ChaosOrb_  = false;
        }
        if (lvl6choiceNOW == 4)
        {
            cast.cd4Per           = Aim.cooldownPercent * Chaos.cooldownPercent;
            cast.damage4Per       = Aim.damagePercent;
            cast.BlessedAim       = Aim.BlessedAimBool;
            cast.cd4Pure          = Chaos.cooldownSeconds;
            cast.channel          = false;
            cast.ChaosOrb_        = Chaos.ChaosOrbBool;
            cast.ChaosOrbAttackCD = Chaos.ChaosOrbAttackCD;
            cast.ChaosOrbDuration = Chaos.ChaosOrbDuration;
        }
        if (lvl6choiceNOW == 5)
        {
            cast.cd4Per           = channel.cooldownPercent * Chaos.cooldownPercent;
            cast.damage4Per       = channel.damagePercent;
            cast.BlessedAim       = false;
            cast.cd4Pure          = Chaos.cooldownSeconds;
            cast.channel          = channel.channeling;;
            cast.chanDur          = channel.chanDur;
            cast.ChaosOrb_        = Chaos.ChaosOrbBool;
            cast.ChaosOrbAttackCD = Chaos.ChaosOrbAttackCD;
            cast.ChaosOrbDuration = Chaos.ChaosOrbDuration;
            cast.cone             = false;
            cast.aoeSizeMeteor    = 5;
        }

        if (lvl6choiceNOW == 0)
        {
            cast.cd4Per     = 1;
            cast.damage4Per = 1;
            cast.cd4Pure    = 0;
            cast.BlessedAim = false;
            cast.channel    = false;
            cast.ChaosOrb_  = false;
        }
    }
コード例 #9
0
ファイル: Spellbook.cs プロジェクト: ErteTD/Depper
    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;
        }
    }
コード例 #10
0
    public void WeaponAttack()
    {
        if (spellSlot1rdy == true && player_.DieOnce == false)
        {
            switch (CurrentWeapon)
            {
            case 0:
                spellSlotCD = 0.5f;
                break;


            case 1:
                WeaponSpider spell = Weapons[CurrentWeapon].GetComponent <WeaponSpider>();
                spellSlotCD = spell.cooldown;
                GameObject spider1 = Instantiate(spell.ItemObject, transform.position, transform.rotation, transform);
                GameObject spider2 = Instantiate(spell.ItemObject, transform.position, transform.rotation, transform);

                spider1.transform.position += spider1.transform.right * 2;
                spider2.transform.position += spider2.transform.right * -2;

                spider1.transform.parent = null;
                spider2.transform.parent = null;

                break;

            case 2:
                Blink      spell2 = Weapons[CurrentWeapon].GetComponent <Blink>();
                Ray        ray    = Camera.main.ScreenPointToRay(Input.mousePosition);
                RaycastHit hit;
                if (Physics.Raycast(ray, out hit) && hit.collider.gameObject.tag == "Floor" || hit.collider.gameObject.tag == "Monster" || hit.collider.gameObject.tag == "Token" || hit.collider.gameObject.tag == "Door")
                {
                    TelePortDoor = false;
                    Tele1Effect  = Instantiate(TelePortEffect, Player1.transform.position, Player1.transform.rotation);
                    Tele1Effect.transform.parent = Player1.transform;

                    ParticleSystem Tele1Effect2 = Instantiate(TelePortEffect, hit.point, Player1.transform.rotation);
                    TeleLoc = hit.point;
                    Destroy(Tele1Effect.transform.gameObject, 3.1f);
                    Destroy(Tele1Effect2.transform.gameObject, 3.1f);

                    Invoke("TelePortPlayer", 1f);
                    spellSlotCD = spell2.cooldown;
                }
                else
                {
                    spellSlotCD = 0.5f;
                }
                break;

            case 3:
                Blink      spell3 = Weapons[CurrentWeapon].GetComponent <Blink>();
                Ray        ray2   = Camera.main.ScreenPointToRay(Input.mousePosition);
                RaycastHit hit2;
                if (Physics.Raycast(ray2, out hit2))
                {
                    // Code Here.
                    Vector3 Pos = new Vector3(Player1.transform.position.x, 1.5f, Player1.transform.position.z);
                    Player1.transform.LookAt(hit2.point);
                    GameObject PoolObj = Instantiate(spell3.ItemObject, Pos + Player1.transform.forward * 4, transform.rotation, transform);
                    PoolObj.transform.parent     = null;
                    PoolObj.transform.localScale = new Vector3(1, 1, 1);
                    PoolObj.GetComponent <BigBoyFire>().PoolNumb      = 10;
                    PoolObj.GetComponent <BigBoyFire>().PlayerCasting = true;
                    PoolObj.GetComponent <BigBoyFire>().duration      = 3f;
                    PoolObj.GetComponent <BigBoyFire>().damage        = 1f;

                    spellSlotCD = spell3.cooldown;
                }
                else
                {
                    spellSlotCD = 0.5f;
                }
                break;

            case 4:
                Blink spell4 = Weapons[CurrentWeapon].GetComponent <Blink>();
                // Code Here.
                float OrbFacing   = transform.rotation.eulerAngles.x;
                float attackTimer = 0;
                for (int i = 0; i < 5; i++)
                {
                    GameObject P1 = Instantiate(spell4.ItemObject, transform);
                    player_.SpellsCastInThisRoom.Add(P1);
                    P1.transform.Rotate(0, OrbFacing, 0);
                    P1.transform.position = new Vector3(transform.position.x, 3, transform.position.z) + P1.transform.forward * 1.5f;
                    P1.GetComponent <OldKingAttack3>().FloatUpTimer += attackTimer;
                    P1.GetComponent <OldKingAttack3>().damage        = 1;
                    P1.GetComponent <OldKingAttack3>().PlayerCast    = true;
                    OrbFacing   += 72;   //360/5
                    attackTimer += 0.2f;
                }
                spellSlotCD = spell4.cooldown;
                break;

            case 5:
                Blink spell5 = Weapons[CurrentWeapon].GetComponent <Blink>();
                player_.BlobWeaponEquppied = true;
                player_.W5.SetActive(true);
                player_.BlobWeaponObject = spell5.ItemObject;
                spellSlotCD = spell5.cooldown;
                break;

            case 6:
                Blink spell6 = Weapons[CurrentWeapon].GetComponent <Blink>();
                player_.TimeStaffCDS();
                player_.ResetCDVis(spell6.ItemObject);
                spellSlotCD = spell6.cooldown;
                break;

            case 7:
                Blink      spell7    = Weapons[CurrentWeapon].GetComponent <Blink>();
                Collider[] cols      = Physics.OverlapSphere(transform.position, 35);
                bool       AnySpells = false;
                foreach (Collider c in cols)
                {
                    Monster e = c.GetComponent <Monster>();
                    if (e != null && e.tag == "Monster")
                    {
                        AnySpells = true;
                        //Monster enemy = e.GetComponent<Monster>();
                        GameObject      test123     = Instantiate(spell7.ItemObject, transform.position, transform.rotation, transform);
                        SpellProjectile Frostmeteor = test123.GetComponent <SpellProjectile>();
                        Frostmeteor.projectilespeed    = 30;
                        Frostmeteor.damage             = 1;
                        Frostmeteor.FrostBoltSlow      = true;
                        Frostmeteor.SlowDuration       = 3f;
                        Frostmeteor.SlowPercent        = 1.4f;
                        Frostmeteor.aoeSizeMeteor      = 3f;
                        Frostmeteor.FrostStaff         = true;
                        Frostmeteor.spellCastLocation  = e.transform.position;
                        Frostmeteor.transform.position = new Vector3(transform.position.x, 20, transform.position.z);
                        player_.SpellsCastInThisRoom.Add(test123);
                    }
                }

                if (!AnySpells)
                {
                    GameObject      test12345   = Instantiate(spell7.ItemObject, transform.position, transform.rotation, transform);
                    SpellProjectile Frostmeteor = test12345.GetComponent <SpellProjectile>();
                    Frostmeteor.projectilespeed    = 15;
                    Frostmeteor.damage             = 1;
                    Frostmeteor.FrostBoltSlow      = true;
                    Frostmeteor.SlowDuration       = 3f;
                    Frostmeteor.SlowPercent        = 1.4f;
                    Frostmeteor.aoeSizeMeteor      = 3f;
                    Frostmeteor.FrostStaff         = true;
                    Frostmeteor.spellCastLocation  = transform.position;
                    Frostmeteor.transform.position = new Vector3(transform.position.x, 20, transform.position.z);
                    player_.SpellsCastInThisRoom.Add(test12345);
                }

                spellSlotCD = spell7.cooldown;
                break;

            case 8:
                Blink spell8 = Weapons[CurrentWeapon].GetComponent <Blink>();

                GameObject test1234 = Instantiate(spell8.ItemObject, transform.position, transform.rotation, transform);

                test1234.transform.parent = null;
                Destroy(test1234, 1f);

                Collider[] cols2 = Physics.OverlapSphere(transform.position, 10);
                foreach (Collider c in cols2)
                {
                    Monster e = c.GetComponent <Monster>();
                    if (e != null && e.tag == "Monster")
                    {
                        Monster enemy = e.GetComponent <Monster>();
                        enemy.Slow(true, 2, 1.25f);
                        Vector3 directionF = (enemy.transform.position - transform.position).normalized;
                        enemy.CancelInvoke("StopPush");
                        enemy.TakeDamage(1);
                        enemy.pushDir = directionF;
                        enemy.pushed  = true;
                    }
                }
                spellSlotCD = spell8.cooldown;
                break;

            case 9:
                // Blink spell9 = Weapons[CurrentWeapon].GetComponent<Blink>();

                Spellbook SB_ = FindObjectOfType <Spellbook>();
                CastSpell CS_ = FindObjectOfType <CastSpell>();

                int curS = CastSpell.FindObjectOfType <CastSpell>().currentSlot;
                CS_.MadWeapon = true;
                SB_.LeveloneSpell(Random.Range(1, 4));
                SB_.LeveltwoSpell(Random.Range(0, 4));
                SB_.LevelthreeSpell(Random.Range(0, 5));
                SB_.LevelfourSpell(Random.Range(0, 4));
                SB_.LevelfiveSpell(Random.Range(0, 4));
                SB_.LevelsixSpell(Random.Range(0, 6));



                Ray        ray3 = Camera.main.ScreenPointToRay(Input.mousePosition);
                RaycastHit hit3;
                if (Physics.Raycast(ray3, out hit3))
                {
                    CS_.spellCastLocation = hit3.point;
                    Vector3    targetPosition = hit3.point;
                    Vector3    direction      = (targetPosition - Player1.transform.position).normalized;
                    Quaternion lookRotation   = Quaternion.LookRotation(new Vector3(direction.x, 0, direction.z));      // flattens the vector3
                    Player1.transform.rotation = Quaternion.Slerp(transform.rotation, lookRotation, Time.deltaTime * 999f);
                }
                CS_.CastCurrentSpell();
                CS_.MadWeapon = false;

                switch (curS)
                {
                case 1:
                    SB_.SlotOne();
                    break;

                case 2:
                    SB_.SlotTwo();
                    break;

                case 3:
                    SB_.SlotThree();
                    break;
                }

                // spellSlotCD = spell9.cooldown;
                break;
            }
            CD1  = spellSlotCD;
            CD1_ = spellSlotCD;
        }
    }