mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
WinLose bug fix: Quest win penalizes 15 credits and doesn't add win credits - fixed.
This commit is contained in:
@@ -110,7 +110,7 @@ public class QuestWinLoseHandler extends WinLoseModeHandler {
|
|||||||
view.btnQuit.setText("Surrender (15 Credits)");
|
view.btnQuit.setText("Surrender (15 Credits)");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Win case
|
// Win case
|
||||||
if(wonMatch) {
|
if(wonMatch) {
|
||||||
// Standard event reward credits
|
// Standard event reward credits
|
||||||
@@ -159,10 +159,10 @@ public class QuestWinLoseHandler extends WinLoseModeHandler {
|
|||||||
@Override
|
@Override
|
||||||
public void actionOnQuit() {
|
public void actionOnQuit() {
|
||||||
// Record win/loss in quest data
|
// Record win/loss in quest data
|
||||||
if (model.qMatchState.isMatchWonBy(AllZone.getHumanPlayer().getName())) {
|
if (wonMatch) {
|
||||||
model.qData.addWin();
|
model.qData.addWin();
|
||||||
} else {
|
} else {
|
||||||
model.qData.addLost();
|
model.qData.addLost();
|
||||||
model.qData.subtractCredits(15);
|
model.qData.subtractCredits(15);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -333,6 +333,7 @@ public class QuestWinLoseHandler extends WinLoseModeHandler {
|
|||||||
|
|
||||||
sb.append(String.format("%s <b>%d credits</b> in total.</h3>", congrats, credTotal));
|
sb.append(String.format("%s <b>%d credits</b> in total.</h3>", congrats, credTotal));
|
||||||
sb.append("</body></html>");
|
sb.append("</body></html>");
|
||||||
|
model.qData.addCredits(credTotal);
|
||||||
|
|
||||||
// Generate Swing components and attach.
|
// Generate Swing components and attach.
|
||||||
icoTemp = GuiUtils.getResizedIcon("GoldIcon.png",0.5);
|
icoTemp = GuiUtils.getResizedIcon("GoldIcon.png",0.5);
|
||||||
|
|||||||
Reference in New Issue
Block a user