// Return whether Mulligan was done private void mulligan() { // Get hand cards List <Card> cards = API.getOurPlayer().GetHandZone().GetCards().ToList <Card>(); // Ask the AI scripting system, to figure which cards to replace List <Card> replace = api.mulligan(cards); // Toggle them as replaced MulliganManager mm = MulliganManager.Get(); foreach (Card current in replace) { Log.log(current.ToString()); mm.ToggleHoldState(current); } // Report progress Log.log("Mulligan Ended : " + replace.Count + " cards changed"); }
// Return whether Mulligan was done private bool mulligan() { // Check that the button exists and is enabled if (GameState.Get().IsMulliganManagerActive() == false || MulliganManager.Get() == null /*|| * MulliganManager.Get().GetMulliganButton() == null || * MulliganManager.Get().GetMulliganButton().IsEnabled() == false*/) { return(false); } // Get hand cards List <Card> cards = API.getOurPlayer().GetHandZone().GetCards().ToList <Card>(); // Ask the AI scripting system, to figure which cards to replace List <Card> replace = api.mulligan(cards); if (replace == null) { return(false); } // Toggle them as replaced foreach (Card current in replace) { MulliganManager.Get().ToggleHoldState(current); } // End mulligan MulliganManager.Get().EndMulligan(); end_turn(); // Report progress Log.say("Mulligan Ended : " + replace.Count + " cards changed"); // Delay 5 seconds Delay(5000); return(true); }