public bool SkillThreeOnCoolDown(MonsterScript TheMonster) { if (TheMonster.GetMonsterSKills()[2].GetSkillCurrentCooldown() > 0) { return(true); } else { return(false); } }
// Update is called once per frame and will check wether to change a monsters turn or not void Update() { if (PlayerMonOneDead && PlayerMonTwoDead && PlayerMonThreeDead) { BattleStart = false; EndGameScreen.SetActive(true); BattleUIScreen.SetActive(false); DefeatImage.SetActive(true); if (EnemyMonOneDead && EnemyMonTwoDead || EnemyMonOneDead && EnemyMonThreeDead || EnemyMonTwoDead && EnemyMonThreeDead) { EndScreenTitleText.text = "Close Defeat"; } else if (EnemyMonThreeDead || EnemyMonTwoDead || EnemyMonOneDead) { EndScreenTitleText.text = "Agonising Loss"; } else { EndScreenTitleText.text = "Humiliating Defeat"; } } else if (EnemyMonOneDead && EnemyMonTwoDead && EnemyMonThreeDead) { BattleStart = false; EndGameScreen.SetActive(true); BattleUIScreen.SetActive(false); VictoryImage.SetActive(true); if (PlayerMonOneDead && PlayerMonTwoDead || PlayerMonOneDead && PlayerMonThreeDead || PlayerMonTwoDead && PlayerMonThreeDead) { EndScreenTitleText.text = "Hard Fought Victory"; } else if (PlayerMonThreeDead || PlayerMonTwoDead || PlayerMonOneDead) { EndScreenTitleText.text = "Tactical Win"; } else { EndScreenTitleText.text = "Astonishing Vicotry"; } } if (CurrentMonster != null) { if (BattleStart) { if (BattleSummary == false) { if (!AIBattleUI.ReturnAnimating()) { if (CurrentMonster.ReturnMonsterOwner() == "AI") { TheBattleUI.SetEnemyTargets(TargetDecisions.PickEnemyTarget(PlayersMonsters, EnemyMonsters, CurrentMonster.GetMonsterSKills())); if (TheBattleUI.ReturnMonsterTargets().Count > 1) { } else { if (TheBattleUI.ReturnMonsterTargets()[0].ReturnMonsterName() == EnemyMonsters[0].ReturnMonsterName()) { TargetMonsterNumber = 0; } else if (TheBattleUI.ReturnMonsterTargets()[0].ReturnMonsterName() == EnemyMonsters[1].ReturnMonsterName()) { TargetMonsterNumber = 1; } else if (TheBattleUI.ReturnMonsterTargets()[0].ReturnMonsterName() == EnemyMonsters[2].ReturnMonsterName()) { TargetMonsterNumber = 2; } else if (TheBattleUI.ReturnMonsterTargets()[0].ReturnMonsterName() == PlayersMonsters[0].ReturnMonsterName()) { TargetMonsterNumber = 0; } else if (TheBattleUI.ReturnMonsterTargets()[0].ReturnMonsterName() == PlayersMonsters[1].ReturnMonsterName()) { TargetMonsterNumber = 1; } else if (TheBattleUI.ReturnMonsterTargets()[0].ReturnMonsterName() == PlayersMonsters[2].ReturnMonsterName()) { TargetMonsterNumber = 2; } } AIScript.Execute(AIBattleUI, CurrentMonster); } } } } } if (BattleStart) { UpdateMonsterDeadStat(); } }