//gets the damage done by the spell to bosses(called by bosses when they are hit) public float GetDamage(BossStatController enemy) { if (Random.Range(0f, 1f) < critChance) { isCrit = true; if (vorpal && Random.Range(0f, 1f) < vorpalChance) { return((power + vorpalDamage) * (1 + critMultiplier) * (1 + Random.Range(-powerVariability, powerVariability)) * RegicideMultiplier); } else { return(power * (1 + critMultiplier) * (1 + Random.Range(-powerVariability, powerVariability)) * RegicideMultiplier); } } else { isCrit = false; if (vorpal && Random.Range(0f, 1f) < vorpalChance) { return((power + vorpalDamage) * (1 + Random.Range(-powerVariability, powerVariability)) * RegicideMultiplier); } else { return(power * (1 + Random.Range(-powerVariability, powerVariability)) * RegicideMultiplier); } } }
//Has a chance to apply the Rune's effect on the boss public void ApplyEffect(BossStatController boss, SpellEffectController controller) { if (Random.Range(0f, 1f) < DoTChance) { boss.ApplyDoT(controller.GetDamageType(), controller.GetPower() * DoTDamage); } }
//Has a chance to apply the Rune's effect on the boss public void ApplyEffect(BossStatController boss, SpellEffectController controller) { if (Random.Range(0f, 1f) <= manaDrainChance) { boss.ManaDrain(); } }
//Applies the spells effects when hitting a target public void ApplyEffects(BossStatController boss) { IEffectRune[] effects = GetComponents <IEffectRune>(); for (int i = 0; i < effects.Length; i++) { effects[i].ApplyEffect(boss, this); } }
//This effect does nothing to bosses public void ApplyEffect(BossStatController boss, SpellEffectController controller) { }
//Has a chance to apply the Rune's effect on the boss public void ApplyEffect(BossStatController boss, SpellEffectController controller) { boss.Mark(controller.GetDamageType(), markMultiplier); }