示例#1
0
 private void Burn()
 {
     //timer
     if ((dotTimerTick < StoryProgressionManager.GetTimeHours()) && (dotTimer <= StoryProgressionManager.GetTimeHours()))
     {
         gameObject.GetComponent <CharacterStats>().TakeDamage(amount, DictionaryHolder.element.Fire);
         dotTimer++;
     }
 }
示例#2
0
 private void Poison()
 {
     //timer
     if ((dotTimerTick <= StoryProgressionManager.GetTimeHours()) && (dotTimer <= StoryProgressionManager.GetTimeHours()))
     {
         GameObject.FindGameObjectWithTag("FightWindow").GetComponent <FightManager>().WriteToInfoLabel(string.Format("<color=green>Poisoned</color>... <color=red>{0}</color>",
                                                                                                                      gameObject.GetComponent <CharacterStats>().TakeDamage(amount, DictionaryHolder.element.Earth)));
         dotTimer++;
     }
 }
示例#3
0
 private void Escape()
 {
     if (dotTimer >= dotTimerTick)
     {
         GameObject.FindGameObjectWithTag("FightWindow").GetComponent <FightManager>().EnemyEscape();
     }
     if (dotTimer < StoryProgressionManager.GetTimeHours())
     {
         dotTimer = StoryProgressionManager.GetTimeHours();
     }
 }
示例#4
0
 private void Bleed()
 {
     //timer
     if (dotTimerTick < StoryProgressionManager.GetTimeHours())
     {
         Debug.Log(dotTimer + "/" + dotTimerTick);
     }
     else
     {
         GameObject.FindGameObjectWithTag("FightWindow").GetComponent <FightManager>().WriteToInfoLabel(string.Format("<color=red>Bleeding</color>... <color=red>{0}</color>",
                                                                                                                      gameObject.GetComponent <CharacterStats>().TakeDamage(amount, DictionaryHolder.element.Dark)));
         amount = 0;
     }
 }
示例#5
0
    public void UseSkillEffect(DictionaryHolder.element statElement)
    {
        switch (currentEffect)
        {
        case Effects.ResUp:
        {
            var temp = GameObject.FindGameObjectWithTag("FightWindow").GetComponent <FightManager>().enemy.gameObject.AddComponent <EnemySkillEffect>();
            temp.SetAmount(amount);
            temp.SetEffect(currentEffect);
            temp.SetElement(statElement);
            break;
        }

        case Effects.AllResUp:
        {
            var temp = GameObject.FindGameObjectWithTag("FightWindow").GetComponent <FightManager>().enemy.gameObject.AddComponent <EnemySkillEffect>();
            temp.SetAmount(amount);
            temp.SetEffect(currentEffect);
            break;
        }

        case Effects.ResDown:
        {
            var temp = GameObject.FindGameObjectWithTag("Player").gameObject.AddComponent <EnemySkillEffect>();
            temp.SetAmount(amount);
            temp.SetEffect(currentEffect);
            temp.SetElement(statElement);
            break;
        }

        case Effects.DamageDown:
        {
            var temp = GameObject.FindGameObjectWithTag("Player").gameObject.AddComponent <EnemySkillEffect>();
            temp.SetAmount(amount);
            temp.SetEffect(currentEffect);
            temp.SetElement(statElement);
            break;
        }

        case Effects.DamageUp:
        {
            var temp = GameObject.FindGameObjectWithTag("FightWindow").GetComponent <FightManager>().enemy.gameObject.AddComponent <EnemySkillEffect>();
            temp.SetAmount(amount);
            temp.SetEffect(currentEffect);
            temp.SetElement(statElement);
            break;
        }

        case Effects.Poison:
        {
            var temp = GameObject.FindGameObjectWithTag("Player").gameObject.AddComponent <EnemySkillEffect>();
            temp.SetAmount(amount);
            temp.SetEffect(currentEffect);
            temp.dotTimerTick = StoryProgressionManager.GetTimeHours() + 7;
            temp.dotTimer     = StoryProgressionManager.GetTimeHours() + 1;
            break;
        }

        case Effects.Burn:
        {
            var temp = GameObject.FindGameObjectWithTag("Player").gameObject.AddComponent <EnemySkillEffect>();
            temp.SetAmount(amount);
            temp.SetEffect(currentEffect);
            temp.dotTimerTick = StoryProgressionManager.GetTimeHours() + 3;
            temp.dotTimer     = StoryProgressionManager.GetTimeHours() + 1;
            break;
        }

        case Effects.Bleed:
        {
            var temp = GameObject.FindGameObjectWithTag("Player").gameObject.AddComponent <EnemySkillEffect>();
            temp.SetAmount(amount);
            temp.SetEffect(currentEffect);
            temp.dotTimerTick = StoryProgressionManager.GetTimeHours() + 3;
            break;
        }

        case Effects.Escape:
        {
            var temp = GameObject.FindGameObjectWithTag("FightWindow").GetComponent <FightManager>().enemy.gameObject.AddComponent <EnemySkillEffect>();
            temp.SetAmount(amount);
            temp.SetEffect(currentEffect);
            temp.dotTimerTick = StoryProgressionManager.GetTimeHours() + 1;
            temp.dotTimer     = StoryProgressionManager.GetTimeHours();
            break;
        }

        case Effects.Exp:
        {
            var temp = GameObject.FindGameObjectWithTag("FightWindow").GetComponent <FightManager>().enemy.gameObject.AddComponent <EnemySkillEffect>();
            temp.SetAmount(amount);
            temp.SetEffect(currentEffect);
            break;
        }

        case Effects.Heal:
        {
            var temp = GameObject.FindGameObjectWithTag("FightWindow").GetComponent <FightManager>().enemy.gameObject.AddComponent <EnemySkillEffect>();
            temp.SetAmount(amount);
            temp.SetEffect(currentEffect);
            break;
        }
        }
    }