示例#1
0
 //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);
         }
     }
 }
示例#2
0
 //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();
     }
 }
示例#4
0
 //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);
     }
 }
示例#5
0
 //This effect does nothing to bosses
 public void ApplyEffect(BossStatController boss, SpellEffectController controller)
 {
 }
示例#6
0
 //Has a chance to apply the Rune's effect on the boss
 public void ApplyEffect(BossStatController boss, SpellEffectController controller)
 {
     boss.Mark(controller.GetDamageType(), markMultiplier);
 }