public AttackDelegate GetAttack(Battler target, BattleMasterScript bm) { if (isPlayerControlled) { Debug.Log("This shouldn't have happened! Asked player controlled battler to attack."); return(null); } return(nme.GetAttack(target, this, bm)); }
public IEnumerator Vibrate(Battler aggressor, Battler target, BattleMasterScript bm) { BattleTopBoardScript topboard = GameObject.Find("Canvas/BattleTopBoard").GetComponent <BattleTopBoardScript>(); topboard.UpdateString("The " + aggressor.name + " vibrates intensely!"); yield return(new WaitForSeconds(1.5f)); bm.YieldTurn(); }
public IEnumerator CallParents(Battler aggressor, Battler target, BattleMasterScript bm) { BattleTopBoardScript topboard = GameObject.Find("Canvas/BattleTopBoard").GetComponent <BattleTopBoardScript>(); topboard.UpdateString("The " + aggressor.name + " threatens to call your parents! Mom's gonna flip!"); yield return(new WaitForSeconds(1.5f)); bm.YieldTurn(); }
public IEnumerator EjectDrawer(Battler aggressor, Battler target, BattleMasterScript bm) { BattleTopBoardScript topboard = GameObject.Find("Canvas/BattleTopBoard").GetComponent <BattleTopBoardScript>(); topboard.UpdateString("The " + aggressor.name + " ejects its money drawer."); yield return(new WaitForSeconds(1.5f)); bm.YieldTurn(); }
public IEnumerator ActorThought(Battler aggressor, Battler target, BattleMasterScript bm) { BattleTopBoardScript topboard = GameObject.Find("Canvas/BattleTopBoard").GetComponent <BattleTopBoardScript>(); topboard.UpdateString("The " + aggressor.name + " is wondering which actor should play them in the movie adaptation."); yield return(new WaitForSeconds(1.5f)); bm.YieldTurn(); }
public IEnumerator DisposeBodyLookup(Battler aggressor, Battler target, BattleMasterScript bm) { BattleTopBoardScript topboard = GameObject.Find("Canvas/BattleTopBoard").GetComponent <BattleTopBoardScript>(); topboard.UpdateString("The " + aggressor.name + " is looking up how to get rid of a body."); yield return(new WaitForSeconds(1.5f)); bm.YieldTurn(); }
public IEnumerator WindUp(Battler aggressor, Battler target, BattleMasterScript bm) { BattleTopBoardScript topboard = GameObject.Find("Canvas/BattleTopBoard").GetComponent <BattleTopBoardScript>(); aggressor.att += 2; topboard.UpdateString("The " + aggressor.name + " starts whirling their arm in a circle! Their Offense has increased by 2!"); yield return(new WaitForSeconds(3.0f)); bm.YieldTurn(); }
public IEnumerator ArmsUp(Battler aggressor, Battler target, BattleMasterScript bm) { BattleTopBoardScript topboard = GameObject.Find("Canvas/BattleTopBoard").GetComponent <BattleTopBoardScript>(); aggressor.def += 2; topboard.UpdateString("The " + aggressor.name + " hides behind their arms! Their Defense has increased by 2!"); yield return(new WaitForSeconds(3.0f)); bm.YieldTurn(); }
public IEnumerator TurnUpVolume(Battler aggressor, Battler target, BattleMasterScript bm) { BattleTopBoardScript topboard = GameObject.Find("Canvas/BattleTopBoard").GetComponent <BattleTopBoardScript>(); aggressor.att += 1; topboard.UpdateString("The " + aggressor.name + " is turning up the volume!" + " Their Offense went up by 1!"); yield return(new WaitForSeconds(3.3f)); bm.YieldTurn(); }
public IEnumerator PlayerCombo(Battler aggressor, Battler target, BattleMasterScript bm) { GameObject attack = (GameObject)Instantiate(Resources.Load("Prefabs/DefaultAttackObject")); attack.transform.position = target.sprite.transform.position - new Vector3(0, .001f, 1); attack.GetComponent <DefaultAttackScript>().aggressor = aggressor; attack.GetComponent <DefaultAttackScript>().target = target; attack.GetComponent <DefaultAttackScript>().at = AttackType.playerCombo; yield return(new WaitForSeconds(1.0f / 60.0f)); }
public IEnumerator DrawPower(Battler aggressor, Battler target, BattleMasterScript bm) { BattleTopBoardScript topboard = GameObject.Find("Canvas/BattleTopBoard").GetComponent <BattleTopBoardScript>(); aggressor.att += 1; aggressor.def += 1; topboard.UpdateString("The " + aggressor.name + " is drawing an excess of power!" + " Their Offense and Defense went up by 1!"); yield return(new WaitForSeconds(3.3f)); bm.YieldTurn(); }
public IEnumerator ShowMartialArts(Battler aggressor, Battler target, BattleMasterScript bm) { BattleTopBoardScript topboard = GameObject.Find("Canvas/BattleTopBoard").GetComponent <BattleTopBoardScript>(); target = bm.GetRandomEnemyIgnoringOne(aggressor); target.def += 1; topboard.UpdateString("The " + aggressor.name + " is showing a martial arts video to the " + target.name + "!" + " Their Defense went up by 1!"); yield return(new WaitForSeconds(3.0f)); bm.YieldTurn(); }
public IEnumerator WireWhip(Battler aggressor, Battler target, BattleMasterScript bm) { BattleTopBoardScript topboard = GameObject.Find("Canvas/BattleTopBoard").GetComponent <BattleTopBoardScript>(); topboard.UpdateString("The " + aggressor.name + " is whipping its wires at the " + target.name + "!"); yield return(new WaitForSeconds(2.0f)); GameObject enemyAttack = (GameObject)Instantiate(Resources.Load("Prefabs/EnemyAttack")); enemyAttack.GetComponent <AttackAnim>().aggressor = aggressor; enemyAttack.GetComponent <AttackAnim>().target = target; enemyAttack.GetComponent <AttackAnim>().at = AttackType.gunchange; enemyAttack.transform.position = target.sprite.transform.position; }
public IEnumerator ShowUncomfortableFootage(Battler aggressor, Battler target, BattleMasterScript bm) { BattleTopBoardScript topboard = GameObject.Find("Canvas/BattleTopBoard").GetComponent <BattleTopBoardScript>(); target.def -= 1; if (target.def < 0) { target.def = 0; } topboard.UpdateString("The " + aggressor.name + " is showing something uncomfortable to watch to the " + target.name + "!" + " Their Defense went down by 1!"); yield return(new WaitForSeconds(3.0f)); bm.YieldTurn(); }
void Start() { pd = GameObject.Find("Player").GetComponent <PlayerData>(); audio = gameObject.AddComponent <AudioSource>(); rt = gameObject.GetComponent <RectTransform>(); click = gameObject.GetComponent <AudioSource>(); bm = GameObject.Find("BattleMaster").GetComponent <BattleMasterScript>(); List <ItemDirectory.ItemIndex> fullItemList = pd.items; for (int i = 0; i < fullItemList.Count; i++) { ItemDirectory.ItemIndex curritem = fullItemList[i]; if (pd.masterItemDirectory.dir[(int)curritem].type == ItemType.consumable) { useableItems.Add(curritem); } } }
public IEnumerator GoodSide(Battler aggressor, Battler target, BattleMasterScript bm) { BattleTopBoardScript topboard = GameObject.Find("Canvas/BattleTopBoard").GetComponent <BattleTopBoardScript>(); int roll = Mathf.RoundToInt(UnityEngine.Random.Range(0.0f, 1.0f) * 4); switch (roll) { case 0: topboard.UpdateString("The " + aggressor.name + " looks on the bright side, supposing that their finals are probably cancelled now! They healed by 20 HP!"); break; case 1: topboard.UpdateString("The " + aggressor.name + " looks on the bright side, realizing their schedule is looking a lot more clear now! They healed by 20 HP!"); break; case 2: topboard.UpdateString("The " + aggressor.name + " looks on the bright side, remembering they got rid of their smart toaster after it switched to a subscription service! They healed by 20 HP!"); break; case 3: topboard.UpdateString("The " + aggressor.name + " looks on the bright side, doubting anyone is gonna bother collecting on their student loans now! They healed by 20 HP!"); break; case 4: topboard.UpdateString("The " + aggressor.name + " looks on the bright side, they didn't really have anything better to do tonight anyway! They healed by 20 HP!"); break; default: topboard.UpdateString("The " + aggressor.name + " looks on the bright side, supposing that finals are probably cancelled now! They healed by 20 HP!"); break; } aggressor.hp += 20; if (aggressor.hp > aggressor.maxhp) { aggressor.hp = aggressor.maxhp; } yield return(new WaitForSeconds(3.5f)); bm.YieldTurn(); }
void Start() { audio = gameObject.GetComponent <AudioSource>(); audio.Play(); bm = GameObject.Find("BattleMaster").GetComponent <BattleMasterScript>(); }
public AttackDelegate GetAttack(Battler target, Battler self, BattleMasterScript bm) { return(atks.SelectAttack()); }