コード例 #1
0
    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();
        }
    }
コード例 #2
0
 //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);
     }
 }
コード例 #3
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);
     }
 }
コード例 #4
0
    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();
        }
    }
コード例 #5
0
    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();
        }
    }
コード例 #6
0
 //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();
     }
 }
コード例 #7
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) <= manaDrainChance)
     {
         boss.ManaDrain();
     }
 }
コード例 #8
0
 //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);
     }
 }
コード例 #9
0
    //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);
    }
コード例 #10
0
    //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"));
    }
コード例 #11
0
 //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>();
 }
コード例 #12
0
    //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;
            }
        }
    }
コード例 #13
0
 //Has a chance to apply the Rune's effect on the boss
 public void ApplyEffect(EyerisMinionController minion, SpellEffectController controller)
 {
     minion.Mark(controller.GetDamageType(), markMultiplier);
 }
コード例 #14
0
    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);
    }
コード例 #15
0
    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);
    }
コード例 #16
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);
 }
コード例 #17
0
 //This effect does nothing to bosses
 public void ApplyEffect(BossStatController boss, SpellEffectController controller)
 {
 }
コード例 #18
0
 //This effect does nothing to bosses minions
 public void ApplyEffect(EyerisMinionController minion, SpellEffectController controller)
 {
 }
コード例 #19
0
    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);
    }
コード例 #20
0
    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);
    }
コード例 #21
0
 //Applies the Rune's effect on the enemy
 public void ApplyEffect(GameObject enemy, SpellEffectController controller)
 {
     enemy.GetComponent <EnemyStatController>().Disintegrate();
 }