mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 20:58:03 +00:00
Fixing Credits generated by Estates
This commit is contained in:
@@ -319,26 +319,28 @@ public class QuestWinLoseHandler extends WinLoseModeHandler {
|
|||||||
|
|
||||||
// Estates bonus
|
// Estates bonus
|
||||||
credTotal = credBase + credGameplay + credUndefeated;
|
credTotal = credBase + credGameplay + credUndefeated;
|
||||||
|
double estateValue = 0;
|
||||||
switch (this.model.qData.getInventory().getItemLevel("Estates")) {
|
switch (this.model.qData.getInventory().getItemLevel("Estates")) {
|
||||||
case 1:
|
case 1:
|
||||||
credEstates = (int) 0.1 * credTotal;
|
estateValue = .1;
|
||||||
sb.append("Estates bonus: 10%.<br>");
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
credEstates = (int) 0.15 * credTotal;
|
estateValue = .15;
|
||||||
sb.append("Estates bonus: 15%.<br>");
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
credEstates = (int) 0.2 * credTotal;
|
estateValue = .2;
|
||||||
sb.append("Estates bonus: 20%.<br>");
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
credTotal += credEstates;
|
if (estateValue > 0){
|
||||||
|
credEstates = (int) (estateValue * credTotal);
|
||||||
|
sb.append("Estates bonus: ").append((int) (100 * estateValue)).append("%.<br>");
|
||||||
|
credTotal += credEstates;
|
||||||
|
}
|
||||||
|
|
||||||
// Final output
|
// Final output
|
||||||
String congrats = "<br><h3>";
|
String congrats = "<br><h3>";
|
||||||
|
|||||||
Reference in New Issue
Block a user