mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
- Fixed a bug in ChooseCardEffect.
This commit is contained in:
@@ -3,7 +3,7 @@ ManaCost:4 B B
|
||||
Types:Enchantment Aura
|
||||
K:Enchant creature or land
|
||||
A:SP$ Attach | Cost$ 4 B B | ValidTgts$ Creature,Land | AILogic$ Curse
|
||||
S:Mode$ Continuous | Affected$ Card.AttachedBy | AddTrigger$ NettlevineTrig | AddSVar$ NettlevineRemember & NettlevineSac & NettlevineChoose & NettlevineAttach | Description$ Enchanted permanent has "At the beginning of your end step, sacrifice this permanent and attach CARDNAME to a creature or land you control."
|
||||
S:Mode$ Continuous | Affected$ Card.AttachedBy | AddTrigger$ NettlevineTrig | AddSVar$ NettlevineRemember & NettlevineSac & NettlevineChoose & NettlevineAttach & NettlevineCleanup | Description$ Enchanted permanent has "At the beginning of your end step, sacrifice this permanent and attach CARDNAME to a creature or land you control."
|
||||
SVar:NettlevineTrig:Mode$ Phase | Phase$ End of Turn | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ NettlevineRemember | TriggerDescription$ At the beginning of your end step, sacrifice CARDNAME and attach the aura to a creature or land you control.
|
||||
SVar:NettlevineRemember:DB$ Pump | ImprintCards$ Valid Card.Enchanted | SubAbility$ NettlevineSac
|
||||
SVar:NettlevineSac:DB$ Sacrifice | Defined$ Self | SubAbility$ NettlevineChoose
|
||||
|
||||
@@ -34,7 +34,8 @@ public class ChooseCardEffect extends SpellAbilityEffect {
|
||||
@Override
|
||||
public void resolve(SpellAbility sa) {
|
||||
final Card host = sa.getSourceCard();
|
||||
final Game game = sa.getActivatingPlayer().getGame();
|
||||
final Player activator = sa.getActivatingPlayer();
|
||||
final Game game = activator.getGame();
|
||||
final List<Card> chosen = new ArrayList<Card>();
|
||||
|
||||
final TargetRestrictions tgt = sa.getTargetRestrictions();
|
||||
@@ -46,7 +47,7 @@ public class ChooseCardEffect extends SpellAbilityEffect {
|
||||
}
|
||||
List<Card> choices = game.getCardsIn(choiceZone);
|
||||
if (sa.hasParam("Choices")) {
|
||||
choices = CardLists.getValidCards(choices, sa.getParam("Choices"), host.getController(), host);
|
||||
choices = CardLists.getValidCards(choices, sa.getParam("Choices"), activator, host);
|
||||
}
|
||||
if (sa.hasParam("TargetControls")) {
|
||||
choices = CardLists.filterControlledBy(choices, tgtPlayers.get(0));
|
||||
|
||||
Reference in New Issue
Block a user