Co-authored-by: tool4EvEr <tool4EvEr@192.168.0.60>
This commit is contained in:
tool4ever
2023-08-27 14:05:50 +02:00
committed by GitHub
parent bcb88736b9
commit 9544d2073e
5 changed files with 10 additions and 8 deletions

View File

@@ -351,8 +351,6 @@ public class TokenAi extends SpellAbilityAi {
throw new RuntimeException("don't find Token for TokenScript: " + sa.getParam("TokenScript")); throw new RuntimeException("don't find Token for TokenScript: " + sa.getParam("TokenScript"));
} }
result.setOwner(ai);
// Apply static abilities // Apply static abilities
final Game game = ai.getGame(); final Game game = ai.getGame();
ComputerUtilCard.applyStaticContPT(game, result, null); ComputerUtilCard.applyStaticContPT(game, result, null);

View File

@@ -30,6 +30,7 @@ import forge.game.trigger.TriggerType;
import forge.game.zone.ZoneType; import forge.game.zone.ZoneType;
import forge.util.Aggregates; import forge.util.Aggregates;
import forge.util.Expressions; import forge.util.Expressions;
import forge.util.Localizer;
import forge.util.MyRandom; import forge.util.MyRandom;
import forge.util.TextUtil; import forge.util.TextUtil;
import forge.util.collect.FCollection; import forge.util.collect.FCollection;
@@ -1473,7 +1474,11 @@ public class AbilityUtils {
if (unlessCost.split("_").length == 3) { if (unlessCost.split("_").length == 3) {
String modifier = unlessCost.split("_")[2]; String modifier = unlessCost.split("_")[2];
if (modifier.startsWith("Minus")) { if (modifier.startsWith("Minus")) {
newCost.decreaseGenericMana(Integer.parseInt(modifier.substring(5))); int max = Integer.parseInt(modifier.substring(5));
if (sa.hasParam("UnlessUpTo")) { // Flash
max = allPayers.get(0).getController().chooseNumber(sa, Localizer.getInstance().getMessage("lblChooseNumber"), 0, max);
}
newCost.decreaseGenericMana(max);
} else { } else {
newCost.increaseGenericMana(Integer.parseInt(modifier.substring(4))); newCost.increaseGenericMana(Integer.parseInt(modifier.substring(4)));
} }

View File

@@ -52,12 +52,11 @@ public class StaticAbilityNumLoyaltyAct {
} }
if (stAb.hasParam("Additional")) { if (stAb.hasParam("Additional")) {
if (stAb.hasParam("OnlySourceAbs")) { if (stAb.hasParam("OnlySourceAbs")) {
if (!stAb.getHostCard().getEffectSourceAbility().getRootAbility().equals(sa)) { if (!stAb.getHostCard().getEffectSourceAbility().getRootAbility().getOriginalAbility().equals(sa)) {
continue; continue;
} }
} }
int more = AbilityUtils.calculateAmount(card, stAb.getParam("Additional"), stAb); addl += AbilityUtils.calculateAmount(card, stAb.getParam("Additional"), stAb);
addl += more;
} }
} }
} }

View File

@@ -2,7 +2,7 @@ Name:Flash
ManaCost:1 U ManaCost:1 U
Types:Instant Types:Instant
A:SP$ ChangeZone | Cost$ 1 U | Origin$ Hand | Destination$ Battlefield | ChangeType$ Creature | ChangeNum$ 1 | SubAbility$ DBSac | RememberChanged$ True | SpellDescription$ You may put a creature card from your hand onto the battlefield. If you do, sacrifice it unless you pay its mana cost reduced by up to {2}. A:SP$ ChangeZone | Cost$ 1 U | Origin$ Hand | Destination$ Battlefield | ChangeType$ Creature | ChangeNum$ 1 | SubAbility$ DBSac | RememberChanged$ True | SpellDescription$ You may put a creature card from your hand onto the battlefield. If you do, sacrifice it unless you pay its mana cost reduced by up to {2}.
SVar:DBSac:DB$ SacrificeAll | Defined$ Remembered | UnlessCost$ DefinedCost_Remembered_Minus2 | UnlessPayer$ You | SubAbility$ DBCleanup SVar:DBSac:DB$ SacrificeAll | Defined$ Remembered | UnlessCost$ DefinedCost_Remembered_Minus2 | UnlessPayer$ You | UnlessUpTo$ True | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
AI:RemoveDeck:All AI:RemoveDeck:All
Oracle:You may put a creature card from your hand onto the battlefield. If you do, sacrifice it unless you pay its mana cost reduced by up to {2}. Oracle:You may put a creature card from your hand onto the battlefield. If you do, sacrifice it unless you pay its mana cost reduced by up to {2}.

View File

@@ -2,4 +2,4 @@ Name:Training Grounds
ManaCost:U ManaCost:U
Types:Enchantment Types:Enchantment
S:Mode$ ReduceCost | ValidCard$ Creature.YouCtrl | Type$ Ability | Amount$ 2 | MinMana$ 1 | AffectedZone$ Battlefield | Description$ Activated abilities of creatures you control cost {2} less to activate. This effect can't reduce the mana in that cost to less than one mana. S:Mode$ ReduceCost | ValidCard$ Creature.YouCtrl | Type$ Ability | Amount$ 2 | MinMana$ 1 | AffectedZone$ Battlefield | Description$ Activated abilities of creatures you control cost {2} less to activate. This effect can't reduce the mana in that cost to less than one mana.
Oracle:Activated abilities of creatures you control cost up to {2} less to activate. This effect can't reduce the mana in that cost to less than one mana. Oracle:Activated abilities of creatures you control cost {2} less to activate. This effect can't reduce the mana in that cost to less than one mana.