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; } }
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>(); }