mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
- Show a quest draft tournament event entry fee and ask the player to confirm creating a tournament when spending a draft token.
This commit is contained in:
@@ -177,10 +177,19 @@ public class QuestTournamentController {
|
|||||||
|
|
||||||
final QuestDraftFormat format = SGuiChoose.oneOrNone("Choose Draft Format", formats);
|
final QuestDraftFormat format = SGuiChoose.oneOrNone("Choose Draft Format", formats);
|
||||||
if (format != null) {
|
if (format != null) {
|
||||||
achievements.spendDraftToken(format);
|
QuestEventDraft evt = QuestEventDraft.getDraftOrNull(FModel.getQuest(), format);
|
||||||
|
if (evt != null) {
|
||||||
update();
|
String fee = String.format("The entry fee for this booster draft tournament is %d credits.\nWould you like to spend a token and create this tournament?", evt.getEntryFee());
|
||||||
view.populate();
|
if (SOptionPane.showConfirmDialog(fee, "Creating a Booster Draft Tournament")) {
|
||||||
|
achievements.spendDraftToken(format);
|
||||||
|
|
||||||
|
update();
|
||||||
|
view.populate();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
SOptionPane.showErrorDialog("Unexpected error when creating a draft tournament " + format.getName() + ". Please report this as a bug.");
|
||||||
|
System.err.println("Error creating booster draft tournament (QuestEventDraft object was null): " + format.getName());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user