string GetAbilityDescription(int slot) { int id = pinfo.GetAbilityID(slot); string desc = ""; //Debug.Log("SLOT" + slot+"ID"+id); switch (id) { case 1: //frenzy Frenzy frenzy = (Frenzy)pinfo.abilities[slot]; frenzy.CalculateMult(); desc = frenzy.GetDescription(); break; case 2: //rage Rage rage = (Rage)pinfo.abilities[slot]; rage.CalculateMult(); desc = rage.GetDescription(); break; case 3: //Mine Mine mine = (Mine)pinfo.abilities[slot]; mine.CalculateDamage(); desc = mine.GetDescription(); break; case 4: //Mine Fireball fireball = (Fireball)pinfo.abilities[slot]; fireball.CalculateDamage(); desc = fireball.GetDescription(); break; } return(desc); }
public void UpdateAbilityData(int slot) { int id = abilities[slot].GetID(); switch (id) { case 1: Frenzy frenzy = (Frenzy)abilities[slot]; frenzy.CalculateMult(); break; case 2: Rage rage = (Rage)abilities[slot]; rage.CalculateMult(); break; case 3: Mine mine = (Mine)abilities[slot]; mine.CalculateDamage(); break; case 4: Fireball fireball = (Fireball)abilities[slot]; fireball.CalculateDamage(); break; } }
public void DoSome(string button) { lastClicked = button; switch (button) { case "ResetChoises": ResetAll(); break; case "Long Sword": SetWeaponDescription(button, "3.2", "2", null); break; case "Dagger": SetWeaponDescription(button, "1.6", "1", null); break; case "Throwing Knifes": SetWeaponDescription(button, "0.8", "1", "3"); break; case "Javelin": SetWeaponDescription(button, "2.4", "2.1", "4"); break; case "Bow": SetWeaponDescription(button, "1.25", "1.8", "5"); break; case "Unarmed": SetWeaponDescription(button, "0.8", "0.5", null); break; case "Frenzy": descHeader.text = button; Frenzy frenzy = new Frenzy(); descText.text = frenzy.GetDescription(); break; case "Rage": descHeader.text = button; Rage rage = new Rage(); descText.text = rage.GetDescription(); break; case "Magical Mine": descHeader.text = button; Mine mine = new Mine(); descText.text = mine.GetDescription(); break; case "Fireball": descHeader.text = button; Fireball fireball = new Fireball(); descText.text = fireball.GetDescription(); break; } }
void DeactivateBuff(int slot) { int id = pinfo.abilities[slot].GetID(); switch (id) { case 1: Frenzy frenzy = (Frenzy)pinfo.abilities[slot]; frenzy.Reset(); break; case 2: Rage rage = (Rage)pinfo.abilities[slot]; rage.Reset(); break; } }
void UtilizeAbility(int slot) { bool cooldownActive = pinfo.abilities[slot].coolDown.GetActivity(); int mpCost = pinfo.abilities[slot].GetCostMP(); if (!cooldownActive && pinfo.stats.mpCur > mpCost) { cooldownImg[slot].gameObject.SetActive(true); int id = pinfo.abilities[slot].GetID(); switch (id) { case 1: Frenzy frenzy = (Frenzy)pinfo.abilities[slot]; frenzy.Activate(); break; case 2: Rage rage = (Rage)pinfo.abilities[slot]; rage.Activate(); break; case 3: Mine mine = (Mine)pinfo.abilities[slot]; mine.Activate(); break; case 4: Fireball fireball = (Fireball)pinfo.abilities[slot]; PlayerInfo target = Target.GetTargetUnit(); if (target != null) { fireball.Activate(); } break; } } }
public void InstantiateAbilities() { for (int i = 0; i < DataTransferManager.dataHolder.abilId.Length; i++) { switch (DataTransferManager.dataHolder.abilId[i]) { case 1: abilities[i] = new Frenzy(i, this, DataTransferManager.dataHolder.abilLv[i]); break; case 2: abilities[i] = new Rage(i, this, DataTransferManager.dataHolder.abilLv[i]); break; case 3: abilities[i] = new Mine(i, this, DataTransferManager.dataHolder.abilLv[i]); break; case 4: abilities[i] = new Fireball(i, this, DataTransferManager.dataHolder.abilLv[i]); break; } } }