Beispiel #1
0
 public virtual void InitiateBossFight(GameObject TankButton, GameObject DPS1Button, GameObject DPS2Button, GameObject DPS3Button, GameObject HealerButton, Text FightLog, Image BossCastBar, Text NextSpellText, Text TargetText, float in_difficultyMultiplier)
 {
     BossFightNextSpellText = NextSpellText;
     BossFightCastBar = BossCastBar;
     BossFightTarget = TargetText;
     Tank = TankButton.GetComponent<PartyMemberScript>();
     DPS1 = DPS1Button.GetComponent<PartyMemberScript>();
     DPS2 = DPS2Button.GetComponent<PartyMemberScript>();
     DPS3 = DPS3Button.GetComponent<PartyMemberScript>();
     Healer = HealerButton.GetComponent<PartyMemberScript>();
     damageMultiplier = (in_difficultyMultiplier - 1.0f) / 3.0f + 1.0f;
     castTimeMultiplier = (in_difficultyMultiplier - 1.0f) / 2.0f + 1.0f;
     durationMultiplier = (in_difficultyMultiplier - 1.0f) / 4.0f + 1.0f;
     healthMultiplier = ((in_difficultyMultiplier - 1.0f) / 10.0f) + 1.0f;
     BossFightLog = FightLog;
     CurrentTarget = AttemptToTargetTank();
 }
Beispiel #2
0
    // Use this for initialization
    void Start()
    {
        CastBar.value = 0;
        CastBarFill.gameObject.SetActive(false);
        Tank = GameObjectTank.GetComponent<PartyMemberScript>();
        DPS1 = GameObjectDPS1.GetComponent<PartyMemberScript>();
        DPS2 = GameObjectDPS2.GetComponent<PartyMemberScript>();
        DPS3 = GameObjectDPS3.GetComponent<PartyMemberScript>();
        Healer = GameObjectHealer.GetComponent<PartyMemberScript>();

        Tank.partyMember = ApplicationStatics.Tank;
        DPS1.partyMember = ApplicationStatics.DPS1;
        DPS2.partyMember = ApplicationStatics.DPS2;
        DPS3.partyMember = ApplicationStatics.DPS3;
        Healer.partyMember = ApplicationStatics.Healer;

        Tank.InitHeightAndWidth(160.0f, 216.318f);
        DPS1.InitHeightAndWidth(160.0f, 216.318f);
        DPS2.InitHeightAndWidth(160.0f, 216.318f);
        DPS3.InitHeightAndWidth(160.0f, 216.318f);
        Healer.InitHeightAndWidth(213.3333f, 270.3975f);

        Tank.ModifyHealthBy(Tank.partyMember.MaxHealth, Spell.Enemy);
        DPS1.ModifyHealthBy(DPS1.partyMember.MaxHealth, Spell.Enemy);
        DPS2.ModifyHealthBy(DPS2.partyMember.MaxHealth, Spell.Enemy);
        DPS3.ModifyHealthBy(DPS3.partyMember.MaxHealth, Spell.Enemy);
        Healer.ModifyHealthBy(Healer.partyMember.MaxHealth, Spell.Enemy);
    }
Beispiel #3
0
    IEnumerator CastBuffAfterTime(float time, PartyMemberScript target, Spell buff)
    {
        yield return new WaitForSeconds(time);
        if (target.isActiveAndEnabled)
        {
            ManaBar.value -= SpellStats.GetManaCost(buff);

            if (buff == Spell.Ultimate1)
            {
                BuffHandler.Buff newBuff = new BuffHandler.Buff(SpellStats.GetSpellName(Spell.Ultimate1), true, SpellStats.GetHealAmount(Spell.Ultimate1),SpellStats.Ultimate1Duration, Spell.Ultimate1);
                target.PlaceBuff(newBuff);
            }
            else if (buff == Spell.Ultimate3)
            {

                BuffHandler.Buff newBuff = new BuffHandler.Buff(SpellStats.GetSpellName(Spell.Ultimate3), true, SpellStats.GetHealAmount(Spell.Ultimate3), SpellStats.Ultimate3Duration, Spell.Ultimate3);
                target.PlaceBuff(newBuff);
            }
            else if (buff == Spell.Spell5)
            {
                BuffHandler.Buff newBuff = new BuffHandler.Buff(SpellStats.GetSpellName(Spell.Spell5), true, SpellStats.GetHealAmount(Spell.Spell5), SpellStats.Spell5Duration, Spell.Spell5);
                target.PlaceBuff(newBuff);
            }
            else if (buff == Spell.Spell8)
            {
                BuffHandler.Buff newBuff = new BuffHandler.Buff(SpellStats.GetSpellName(Spell.Spell8), true, SpellStats.GetHealAmount(Spell.Spell8), SpellStats.Spell8Duration, Spell.Spell8);
                target.PlaceBuff(newBuff);
                StartCoroutine(ReCastSpell8(SpellStats.Spell8Duration, SpellStats.Spell8Jumps));
            }
        }
    }
Beispiel #4
0
    IEnumerator CastSpell7AfterTime(float time, PartyMemberScript target)
    {
        yield return new WaitForSeconds(time);
        if (target.isActiveAndEnabled)
        {
            ManaBar.value -= SpellStats.GetManaCost(Spell.Spell7);
            target.ModifyHealthBy(SpellStats.GetHealAmount(Spell.Spell7), Spell.Spell7);
        }

        PartyMemberScript lowest = ReturnLowestHealthMember();

        if (lowest.isActiveAndEnabled)
            lowest.ModifyHealthBy(SpellStats.GetHealAmount(Spell.Spell7), Spell.Spell7);
    }
Beispiel #5
0
 void CastUltimate3(PartyMemberScript target)
 {
     castTime = SpellStats.GetCastTime(Spell.Ultimate3);
     isCasting = true;
     currentCastingSpellName = SpellStats.GetSpellName(Spell.Ultimate3);
     StartCoroutine(CastBuffAfterTime(castTime, target, Spell.Ultimate3));
 }
Beispiel #6
0
 void CastSpell7(PartyMemberScript target)
 {
     castTime = SpellStats.GetCastTime(Spell.Spell7);
     isCasting = true;
     currentCastingSpellName = SpellStats.GetSpellName(Spell.Spell7);
     StartCoroutine(CastSpell7AfterTime(castTime, target));
 }
Beispiel #7
0
 void CastSpell6(PartyMemberScript target)
 {
     castTime = SpellStats.GetCastTime(Spell.Spell6);
     isCasting = true;
     currentCastingSpellName = SpellStats.GetSpellName(Spell.Spell6);
     StartCoroutine(CastSingleTargetSpellAfterTime(castTime, target, SpellStats.GetHealAmount(Spell.Spell6), Spell.Spell6));
 }
Beispiel #8
0
 IEnumerator CastSingleTargetSpellAfterTime(float time, PartyMemberScript target, int amount, Spell healingSpell)
 {
     yield return new WaitForSeconds(time);
     if (target.isActiveAndEnabled)
     {
         ManaBar.value -= SpellStats.GetManaCost(healingSpell);
         target.ModifyHealthBy(amount, healingSpell);
     }
 }
Beispiel #9
0
 IEnumerator EnableDPSAgain(PartyMemberScript target, float time)
 {
     yield return new WaitForSeconds(time);
     if (target.isActiveAndEnabled)
     {
         target.CanDealDamage = true;
     }
 }
 // Use this for initialization
 void Start()
 {
     FightScript = BossfightDataBase.GetBossFightScript();
     FightScript.InitiateBossFight(TankButton, DPS1Button, DPS2Button, DPS3Button, HealerButton, BossFightCastBarText, BossFightCastBar, BossFightNextSpellText, BossFightTarget, ApplicationStatics.CurrentDifficultyMultiplier);
     BossFightTarget.text = "";
     BossFightLogLabel.text = FightScript.GetBossName();
     Tank = TankButton.GetComponent<PartyMemberScript>();
     DPS1 = DPS1Button.GetComponent<PartyMemberScript>();
     DPS2 = DPS2Button.GetComponent<PartyMemberScript>();
     DPS3 = DPS3Button.GetComponent<PartyMemberScript>();
     Healer = HealerButton.GetComponent<PartyMemberScript>();
     BossHealthSlider.maxValue = FightScript.GetBossMaxHealth();
     BossHealthSlider.value = BossHealthSlider.maxValue;
     BossFightNextSpellText.text = "";
     BossHealthSliderText.text = ((int)BossHealthSlider.value).ToString() + "/" + BossHealthSlider.maxValue.ToString() + "(" + (((int)BossHealthSlider.value * 100) / (int)BossHealthSlider.maxValue).ToString() + "%)";
 }