Exemplo n.º 1
0
    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;
        }
    }
Exemplo n.º 2
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>();
 }