public override bool doIParticipateInTournament(Player currPlayer, ActiveTourney tourney, Player[] players) { tounamentReward = tourney.getAwardNum(); bool someoneWillEvolve = false; for (int i = 0; i < players.Length; i++) { if (players[i] != player) { if (hp.willPlayerEvolve(players[i], tounamentReward)) { someoneWillEvolve = true; } } } if (currPlayer == player && someoneWillEvolve) { Debug.Log("Joining tournament"); return(true); } else { Debug.Log("Not joining tournament"); return(false); } }
public void endTourney() { gameState = state.TOURNEYWRAPUP; if (tourney.getPlayerNum() == 0) { drawQuestCard(); return; } tourney.awardShields(); log.log(tourney.getWinner().getName() + " won the tournament and is awarded " + tourney.getAwardNum() + " shields"); ui.displayAlert(tourney.getWinner().getName() + " won the tournament and is awarded " + tourney.getAwardNum() + " shields"); tourney = null; drawQuestCard(); }