Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 8 additions & 17 deletions forge-gui-mobile/src/forge/adventure/scene/DuelScene.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ public static DuelScene instance() {
boolean arenaBattleChallenge = false;
boolean isArena = false;
AdventureEventData eventData;
private LoadingOverlay matchOverlay;
final int enemyAvatarKey = 90001;
final int playerAvatarKey = 90000;
FOptionPane bossDialogue;
Expand Down Expand Up @@ -395,6 +394,7 @@ public void enter() {
hostedMatch.startMatch(rules, appliedVariants, players, guiMap, bossBattle ? MusicPlaylist.BOSS : MusicPlaylist.MATCH);
MatchController.instance.setGameView(hostedMatch.getGameView());
boolean showMessages = enemy.getData().boss || (enemy.getData().copyPlayerDeck && Current.player().isUsingCustomDeck());
LoadingOverlay matchOverlay;
if (chaosBattle || showMessages || isDeckMissing) {
final FBufferedImage fb = getFBEnemyAvatar();
bossDialogue = createFOption(isDeckMissing ? isDeckMissingMsg : Forge.getLocalizer().getMessage("AdvBossIntro" + Aggregates.randomInt(1, 35)),
Expand Down Expand Up @@ -496,23 +496,14 @@ public void initDuels(PlayerSprite playerSprite, EnemySprite enemySprite, boolea
private String selectAI(String ai) { //Decide opponent AI.
String AI = ""; //Use user settings if it's null.
if (ai != null) {
switch (ai.toLowerCase()) { //We use this way to ensure capitalization is exact.
AI = switch (ai.toLowerCase()) { //We use this way to ensure capitalization is exact.
//We don't want misspellings here.
case "default":
AI = "Default";
break;
case "reckless":
AI = "Reckless";
break;
case "cautious":
AI = "Cautious";
break;
case "experimental":
AI = "Experimental";
break;
default:
AI = ""; //User settings.
}
case "default" -> "Default";
case "reckless" -> "Reckless";
case "cautious" -> "Cautious";
case "experimental" -> "Experimental";
default -> ""; //User settings.
};
}
return AI;
}
Expand Down