mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
clean up cost tweaks
This commit is contained in:
@@ -131,10 +131,8 @@ public class CostTapType extends CostPartWithList {
|
|||||||
}
|
}
|
||||||
typeList = CardLists.filter(typeList, Presets.UNTAPPED);
|
typeList = CardLists.filter(typeList, Presets.UNTAPPED);
|
||||||
|
|
||||||
boolean isCrew=false;
|
|
||||||
if (ability.hasParam("Crew")) {
|
if (ability.hasParam("Crew")) {
|
||||||
typeList = CardLists.getNotKeyword(typeList, "CARDNAME can't crew Vehicles.");
|
typeList = CardLists.getNotKeyword(typeList, "CARDNAME can't crew Vehicles.");
|
||||||
isCrew=true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sameType) {
|
if (sameType) {
|
||||||
@@ -148,7 +146,7 @@ public class CostTapType extends CostPartWithList {
|
|||||||
|
|
||||||
if (totalPower) {
|
if (totalPower) {
|
||||||
final int i = Integer.parseInt(totalP);
|
final int i = Integer.parseInt(totalP);
|
||||||
return CardLists.getTotalPower(typeList, true, isCrew) >= i;
|
return CardLists.getTotalPower(typeList, true, ability.hasParam("Crew")) >= i;
|
||||||
}
|
}
|
||||||
|
|
||||||
final Integer amount = this.convertAmount();
|
final Integer amount = this.convertAmount();
|
||||||
|
|||||||
@@ -1187,10 +1187,8 @@ public class HumanCostDecision extends CostDecisionMakerBase {
|
|||||||
source, ability);
|
source, ability);
|
||||||
typeList = CardLists.filter(typeList, Presets.UNTAPPED);
|
typeList = CardLists.filter(typeList, Presets.UNTAPPED);
|
||||||
|
|
||||||
boolean isCrew=false;
|
|
||||||
if (ability.hasParam("Crew")) {
|
if (ability.hasParam("Crew")) {
|
||||||
typeList = CardLists.getNotKeyword(typeList, "CARDNAME can't crew Vehicles.");
|
typeList = CardLists.getNotKeyword(typeList, "CARDNAME can't crew Vehicles.");
|
||||||
isCrew=true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (c == null && !amount.equals("Any")) {
|
if (c == null && !amount.equals("Any")) {
|
||||||
@@ -1249,7 +1247,7 @@ public class HumanCostDecision extends CostDecisionMakerBase {
|
|||||||
inp.setCancelAllowed(true);
|
inp.setCancelAllowed(true);
|
||||||
inp.showAndWait();
|
inp.showAndWait();
|
||||||
|
|
||||||
if (inp.hasCancelled() || CardLists.getTotalPower(inp.getSelected(), true, isCrew) < i) {
|
if (inp.hasCancelled() || CardLists.getTotalPower(inp.getSelected(), true, ability.hasParam("Crew")) < i) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return PaymentDecision.card(inp.getSelected());
|
return PaymentDecision.card(inp.getSelected());
|
||||||
|
|||||||
Reference in New Issue
Block a user