mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 10:48:00 +00:00
Merge pull request #1470 from rikimbo/adventure_no_warn_about_ai_cards
Adventure: Don't warn about cards the AI can't play well
This commit is contained in:
@@ -19,6 +19,9 @@ public class GameRules {
|
||||
// same for me
|
||||
private boolean useGrayText;
|
||||
|
||||
// whether to warn about cards AI can't play well
|
||||
private boolean warnAboutAICards = true;
|
||||
|
||||
public GameRules(final GameType type) {
|
||||
this.gameType = type;
|
||||
}
|
||||
@@ -109,4 +112,11 @@ public class GameRules {
|
||||
public void setUseGrayText(final boolean useGrayText) {
|
||||
this.useGrayText = useGrayText;
|
||||
}
|
||||
|
||||
public boolean warnAboutAICards() {
|
||||
return warnAboutAICards;
|
||||
}
|
||||
public void setWarnAboutAICards(final boolean warnAboutAICards) {
|
||||
this.warnAboutAICards = warnAboutAICards;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -334,7 +334,7 @@ public class Match {
|
||||
}
|
||||
|
||||
final Localizer localizer = Localizer.getInstance();
|
||||
if (!rAICards.isEmpty() && !rules.getGameType().isCardPoolLimited()) {
|
||||
if (!rAICards.isEmpty() && !rules.getGameType().isCardPoolLimited() && rules.warnAboutAICards()) {
|
||||
game.getAction().revealUnplayableByAI(localizer.getMessage("lblAICantPlayCards"), rAICards);
|
||||
}
|
||||
|
||||
|
||||
@@ -282,6 +282,7 @@ public class DuelScene extends ForgeScene {
|
||||
rules.setMatchAnteRarity(true);
|
||||
rules.setGamesPerMatch(1);
|
||||
rules.setManaBurn(false);
|
||||
rules.setWarnAboutAICards(false);
|
||||
|
||||
hostedMatch.setEndGameHook(() -> DuelScene.this.GameEnd());
|
||||
hostedMatch.startMatch(rules, appliedVariants, players, guiMap);
|
||||
|
||||
Reference in New Issue
Block a user