forked from External/mage
* Silence the Believers - Fix game exception
This commit is contained in:
parent
b746bf108a
commit
1300a6886d
1 changed files with 4 additions and 2 deletions
|
|
@ -27,6 +27,7 @@
|
|||
*/
|
||||
package mage.sets.journeyintonyx;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.abilityword.StriveAbility;
|
||||
|
|
@ -93,10 +94,11 @@ class SilenceTheBelieversExileEffect extends OneShotEffect<SilenceTheBelieversEx
|
|||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
for (UUID targetId: this.getTargetPointer().getTargets(null, source)) {
|
||||
for (UUID targetId: this.getTargetPointer().getTargets(game, source)) {
|
||||
Permanent creature = game.getPermanent(targetId);
|
||||
if (creature != null) {
|
||||
for (UUID attachmentId: creature.getAttachments()) {
|
||||
ArrayList<UUID> attachments = new ArrayList<>(creature.getAttachments());
|
||||
for (UUID attachmentId: attachments) {
|
||||
Permanent attachment = game.getPermanent(attachmentId);
|
||||
if (attachment != null && attachment.getSubtype().contains("Aura")) {
|
||||
controller.moveCardToExileWithInfo(attachment, null, null, source.getSourceId(), game, Zone.BATTLEFIELD);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue