float sleepChance = 0.025f; //the chance of the effect applying //Has a chance to apply the Rune's effect on the enemy public void ApplyEffect(GameObject enemy, SpellEffectController controller) { if (Random.Range(0f, 1f) < sleepChance) { enemy.GetComponent <EnemyController>().ApplySleep(); } }
//Has a chance to apply the Runes effect on the boss' minion public void ApplyEffect(EyerisMinionController minion, SpellEffectController controller) { if (Random.Range(0f, 1f) < DoTChance) { minion.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) < DoTChance) { boss.ApplyDoT(controller.GetDamageType(), controller.GetPower() * DoTDamage); } }
float enfeebleChance = 0.05f; //the chance of the effect applying //Has a chance to apply the Rune's effect on the enemy public void ApplyEffect(GameObject enemy, SpellEffectController controller) { if (Random.Range(0f, 1f) < enfeebleChance) { enemy.GetComponent <IEnemySpellController>().Enfeeble(); } }
float manaDrainChance = 0.5f; //the chance of the effect applying //Has a chance to apply the Rune's effect on the enemy public void ApplyEffect(GameObject enemy, SpellEffectController controller) { if (Random.Range(0f, 1f) <= manaDrainChance) { enemy.GetComponent <EnemyStatController>().ManaDrain(); } }
//Has a chance to apply the Rune's effect on the boss' minion public void ApplyEffect(EyerisMinionController minion, SpellEffectController controller) { if (Random.Range(0f, 1f) <= manaDrainChance) { minion.ManaDrain(); } }
//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(); } }
//Has a chance to apply the Rune's effect on the enemy public void ApplyEffect(GameObject enemy, SpellEffectController controller) { if (Random.Range(0f, 1f) < DoTChance) { enemy.GetComponent <EnemyStatController>().ApplyDoT(controller.GetDamageType(), controller.GetPower() * DoTDamage); } }
//applies the effects of the spell private void ApplySpellEffects(GameObject spell) { ProjectileController projectileController = spell.GetComponent <ProjectileController> (); SpellEffectController effectController = spell.GetComponent <SpellEffectController> (); SetStats(projectileController, effectController); ApplyKinetics(projectileController); ApplyEffects(effectController); }
//sets the stats of the spell private void SetStats(ProjectileController pController, SpellEffectController sController) { if (vengefulSpell) { CalculateVengefulModifier(); } spellMultipliers = playerStats.getPlayerMultipliers(); pController.SetSpeed(getStat("speed")); sController.setStats(getStat("power"), getStat("accuracy"), getStat("crit%"), getStat("critPower")); }
//Start Method private void Start() { cursorChangerController = this.GetComponent <CursorChangerController>(); spellEffectController = this.GetComponent <SpellEffectController>(); manaController = this.GetComponent <ManaController>(); screenShakeController = this.GetComponent <ScreenShakeController>(); devourerController = this.GetComponent <DevourerController>(); screenFlashController = this.GetComponent <ScreenFlashController>(); corruptionController = this.GetComponent <CorruptionController>(); environmentController = this.GetComponent <EnvironmentController>(); conditionController = this.GetComponent <ConditionController>(); grimmoireController = this.GetComponent <GrimmoireController>(); enemySpawner = this.GetComponent <EnemySpawner>(); soundController = this.GetComponent <SoundController>(); }
//applies spell effects private void ApplyEffects(SpellEffectController effects) { for (int i = 0; i < 3; i++) { switch (currentSpell.spellEffects [i]) { case -1: break; case 0: effects.AddEffect(0); break; case 1: effects.VorpalEffect(); break; case 2: effects.AddEffect(1); break; case 3: effects.AddEffect(2); break; case 4: effects.AddEffect(3); break; case 5: effects.ExecutingEffect(); break; case 6: effects.ExplosiveEffect(); break; case 7: effects.AddEffect(4); break; case 8: effects.AddEffect(5); break; case 9: effects.DisintegratingEffect(); break; case 10: effects.AddEffect(7); break; case 11: effects.AddEffect(8); break; case 12: effects.AddEffect(9); break; case 13: effects.AddEffect(10); break; case 14: effects.RegicideEffect(); break; case 15: effects.AddEffect(11); break; } } }
//Has a chance to apply the Rune's effect on the boss public void ApplyEffect(EyerisMinionController minion, SpellEffectController controller) { minion.Mark(controller.GetDamageType(), markMultiplier); }
int weaknessModifier = 15; //the chance of the effect applying //Has a chance to apply the Rune's effect on the enemy public void ApplyEffect(GameObject enemy, SpellEffectController controller) { enemy.GetComponent <EnemyStatController>().Weaken(controller.GetDamageType(), weaknessModifier); }
float alchemiseEffect = 1.5f; //the potency of the effect //Has a chance to apply the Rune's effect on the enemy public void ApplyEffect(GameObject enemy, SpellEffectController controller) { enemy.GetComponent <EnemyStatController>().Alchemise(alchemiseEffect); }
//Has a chance to apply the Rune's effect on the boss public void ApplyEffect(BossStatController boss, SpellEffectController controller) { boss.Mark(controller.GetDamageType(), markMultiplier); }
//This effect does nothing to bosses public void ApplyEffect(BossStatController boss, SpellEffectController controller) { }
//This effect does nothing to bosses minions public void ApplyEffect(EyerisMinionController minion, SpellEffectController controller) { }
float markMultiplier = 1.25f; //how much to multiply the damage a marked target takes by //Has a chance to apply the Rune's effect on the enemy public void ApplyEffect(GameObject enemy, SpellEffectController controller) { enemy.GetComponent <EnemyStatController>().Mark(controller.GetDamageType(), markMultiplier); }
float crystaliseEffect = 1.5f; //the potency of the effect //Has a chance to apply the Rune's effect on the enemy public void ApplyEffect(GameObject enemy, SpellEffectController controller) { enemy.GetComponent <EnemyStatController>().Crystalise(crystaliseEffect); }
//Applies the Rune's effect on the enemy public void ApplyEffect(GameObject enemy, SpellEffectController controller) { enemy.GetComponent <EnemyStatController>().Disintegrate(); }