mirror of
https://github.com/magefree/mage.git
synced 2026-01-25 20:59:14 -08:00
Fixed Tangle Wire not working if destroyed in response to the trigger.
This commit is contained in:
parent
69d6b2c8f5
commit
996d1a47f9
1 changed files with 4 additions and 4 deletions
|
|
@ -83,7 +83,7 @@ class TangleWireEffect extends OneShotEffect {
|
|||
new CardTypePredicate(CardType.CREATURE),
|
||||
new CardTypePredicate(CardType.LAND)));
|
||||
}
|
||||
|
||||
|
||||
TangleWireEffect() {
|
||||
super(Outcome.Sacrifice);
|
||||
staticText = "that player taps an untapped artifact, creature, or land he or she controls for each fade counter on Tangle Wire";
|
||||
|
|
@ -96,15 +96,15 @@ class TangleWireEffect extends OneShotEffect {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(targetPointer.getFirst(game, source));
|
||||
Permanent permanent = game.getPermanent(source.getSourceId());
|
||||
Permanent permanent = game.getPermanentOrLKIBattlefield(source.getSourceId());
|
||||
if (player == null || permanent == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
int targetCount = game.getBattlefield().countAll(filter, player.getId(), game);
|
||||
int counterCount = permanent.getCounters(game).getCount(CounterType.FADE);
|
||||
int amount = Math.min(counterCount, targetCount);
|
||||
|
||||
|
||||
Target target = new TargetControlledPermanent(amount, amount, filter, true);
|
||||
target.setNotTarget(true);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue