mirror of
https://github.com/magefree/mage.git
synced 2026-01-24 12:19:59 -08:00
Fixed double triggering. Fixed Issue 86.
This commit is contained in:
parent
e8dc1b659c
commit
5e79f51f1d
2 changed files with 19 additions and 12 deletions
|
|
@ -163,16 +163,18 @@ class NecroticPlagueEffect2 extends OneShotEffect<NecroticPlagueEffect2> {
|
|||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
TargetCreaturePermanent target = new TargetCreaturePermanent(filter);
|
||||
if (controller.choose(Outcome.Detriment, target, game)) {
|
||||
Card card = game.getCard(cardId);
|
||||
if (card != null) {
|
||||
card.putOntoBattlefield(game, Zone.GRAVEYARD, source.getId(), source.getControllerId());
|
||||
Permanent permanent = game.getPermanent(target.getFirstTarget());
|
||||
if (permanent != null) {
|
||||
return permanent.addAttachment(cardId, game);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (target.canChoose(source.getControllerId(), game)) {
|
||||
if (controller.choose(Outcome.Detriment, target, game)) {
|
||||
Card card = game.getCard(cardId);
|
||||
if (card != null) {
|
||||
card.putOntoBattlefield(game, Zone.GRAVEYARD, source.getId(), source.getControllerId());
|
||||
Permanent permanent = game.getPermanent(target.getFirstTarget());
|
||||
if (permanent != null) {
|
||||
return permanent.addAttachment(cardId, game);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue