mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 02:38:02 +00:00
Clean up
This commit is contained in:
@@ -627,21 +627,14 @@ public abstract class Trigger extends TriggerReplacementBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
boolean whileKeywordCheck(final String param, final Map<AbilityKey, Object> runParams) {
|
boolean whileKeywordCheck(final String param, final Map<AbilityKey, Object> runParams) {
|
||||||
SpellAbility sa;
|
IndividualCostPaymentInstance currentPayment = (IndividualCostPaymentInstance) runParams.get(AbilityKey.IndividualCostPaymentInstance);
|
||||||
|
|
||||||
IndividualCostPaymentInstance currentPayment =
|
|
||||||
(IndividualCostPaymentInstance) runParams.get(AbilityKey.IndividualCostPaymentInstance);
|
|
||||||
if (currentPayment != null) {
|
if (currentPayment != null) {
|
||||||
sa = currentPayment.getPayment().getAbility();
|
if (matchesValidParam(param, currentPayment.getPayment().getAbility())) return true;
|
||||||
if (sa != null) {
|
|
||||||
if (matchesValidParam(param, sa)) return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CostPaymentStack stack = (CostPaymentStack) runParams.get(AbilityKey.CostStack);
|
CostPaymentStack stack = (CostPaymentStack) runParams.get(AbilityKey.CostStack);
|
||||||
for (IndividualCostPaymentInstance individual : stack) {
|
for (IndividualCostPaymentInstance individual : stack) {
|
||||||
sa = individual.getPayment().getAbility();
|
if (matchesValidParam(param, individual.getPayment().getAbility())) return true;
|
||||||
if (matchesValidParam(param, sa)) return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user