// public override Card[] nextBid(ActiveQuest quest) { Card[] submit = null; if (quest.getHighestBid() > hand.Length) { return(submit); } for (int i = 0; i < hand.Length; i++) { if (hand [i].getType().Equals("foe") && hand[i].getBP() <= 20) { submit = hp.addCard(submit, hand [i]); if (submit.Length > quest.getHighestBid()) { return(submit); } else { //quest.deletePlayer(player); return(null); } } else { if (quest.getCurrentTestPhase() == 1 && hp.numberOfCardInstancesInHand(hand, hand[i]) > 1) { submit = hp.addCard(submit, hand [i]); } } } return(null); }
// public override Card[] nextBid(ActiveQuest quest) { Card[] submit = null; if (quest.getHighestBid() > hand.Length) { Debug.Log("Cannot place bid"); //quest.deletePlayer(player); return(submit); } for (int i = 0; i < hand.Length; i++) { if (hand [i].getType().Equals("foe") && hand[i].getBP() <= 20) { submit = hp.addCard(submit, hand [i]); if (submit.Length > quest.getHighestBid()) { return(submit); } else { Debug.Log("Bid too low"); //quest.deletePlayer(player); return(null); } } } return(null); }
public void showStage(ActiveQuest activeQuest) { clearGameObjectArray(cardsToShow); clearGameObjectArray(currButtons); if (activeQuest.getQuest() == null) { gm.setUserInputState(state.STANDBY); clearGameObjectArray(cardsToShow); } changeHeaderMessage(activePlayer.getName() + "'s turn", headerCurrPlayer); if (Object.ReferenceEquals(activeQuest.getCurrentStage().GetType(), typeof(Foe))) { showCard(activeQuest.getQuest()); Destroy(currentBid); Destroy(highestBid); if (playerBP == null) { playerBP = createHeaderMessage(panelPosX - panelWidth / 3, panelHeight / 2, new Vector3(0, 0, 0), " "); } if (activeQuest != null) { changeHeaderMessage("Player BP: " + activePlayer.getBP(activeQuest.getQuest().getName()), playerBP); } else { changeHeaderMessage("Player BP: " + activePlayer.getBP("null"), playerBP); } changeHeaderMessage("Select the cards you wish to play in this stage", instructionHeader); //createButtonMessage(panelPosX, panelPosY - panelHeight/10, "FIGHT"); gm.setUserInputState(state.ASKINGFORCARDSINQUEST); } else if (Object.ReferenceEquals(activeQuest.getCurrentStage().GetType(), typeof(Test))) { showCard(activeQuest.getCurrentStage()); if (currentBid == null) { currentBid = createHeaderMessage(panelPosX - panelWidth / 3, panelHeight / 2, new Vector3(0, 0, 0), " "); } if (highestBid == null) { highestBid = createHeaderMessage(panelPosX + panelWidth / 3, panelHeight / 2, new Vector3(0, 0, 0), " "); } changeHeaderMessage("Current bid: " + activeQuest.getCurrentPlayerFreeBids(), currentBid); changeHeaderMessage("Highest bid: " + activeQuest.getHighestBid(), highestBid); gm.setUserInputState(state.ASKINGFORCARDSINBID); } createButtonMessage(panelPosX - panelWidth / 5, panelPosY + panelHeight / 5, "Give up"); }