mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
CardFactoryUtil: moved "At the beginning of your upkeep, sacrifice" as "UpkeepCost" in CardFactoryUtil
delete Upkeep class because its not needed anymore
This commit is contained in:
@@ -163,7 +163,7 @@ public class CreatureEvaluator implements Function<Card, Integer> {
|
||||
value -= subValue(50, "eot-leaves");
|
||||
} else if (c.hasStartOfKeyword("Cumulative upkeep")) {
|
||||
value -= subValue(30, "cupkeep");
|
||||
} else if (c.hasStartOfKeyword("At the beginning of your upkeep, sacrifice CARDNAME unless you pay")) {
|
||||
} else if (c.hasStartOfKeyword("UpkeepCost")) {
|
||||
value -= subValue(20, "sac-unless");
|
||||
} else if (c.hasStartOfKeyword("Echo") && c.cameUnderControlSinceLastUpkeep()) {
|
||||
value -= subValue(10, "echo-unpaid");
|
||||
|
||||
@@ -135,9 +135,9 @@ public class PermanentAi extends SpellAbilityAi {
|
||||
|
||||
// don't play cards without being able to pay the upkeep for
|
||||
for (String ability : card.getKeywords()) {
|
||||
if (ability.startsWith("At the beginning of your upkeep, sacrifice CARDNAME unless you pay")) {
|
||||
final String[] k = ability.split(" pay ");
|
||||
final String costs = k[1].replaceAll("[{]", "").replaceAll("[}]", " ");
|
||||
if (ability.startsWith("UpkeepCost")) {
|
||||
final String[] k = ability.split(":");
|
||||
final String costs = k[1];
|
||||
|
||||
final SpellAbility emptyAbility = new SpellAbility.EmptySa(card, ai);
|
||||
emptyAbility.setPayCosts(new Cost(costs, true));
|
||||
|
||||
Reference in New Issue
Block a user