[BRO] fix Slagstone Refinery trigger
* fix Slagstone Refinery trigger
fixes by rewritting the checkTrigger method.
* apply changes from review
* minor fix, remove unecessary import
@@ -15,7 +15,7 @@ import mage.game.permanent.token.PowerstoneToken;
import java.util.UUID;
/**
- * @author TheElk801
+ * @author TheElk801, Susucre
*/
public final class SlagstoneRefinery extends CardImpl {
@@ -59,10 +59,19 @@ class SlagstoneRefineryTriggeredAbility extends TriggeredAbilityImpl {
@Override
public boolean checkTrigger(GameEvent event, Game game) {
ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
- return zEvent.getFromZone().match(Zone.BATTLEFIELD)
- && (zEvent.getToZone().match(Zone.GRAVEYARD) || zEvent.getToZone().match(Zone.EXILED))
- && zEvent.getTargetId().equals(getSourceId())
- || (zEvent.getTarget().isArtifact(game) && !(zEvent.getTarget() instanceof PermanentToken));
+
+ // Filters ZC events for only battlefield => graveyard or battlefield => exile.
+ if (zEvent.getFromZone() == Zone.BATTLEFIELD && (zEvent.getToZone() == Zone.GRAVEYARD || zEvent.getToZone() == Zone.EXILED)) {
+ if(zEvent.getTargetId().equals(getSourceId())) { // {this}
+ return true;
+ } else { // another
+ return zEvent.getTarget().isArtifact(game) // artifact
+ && !(zEvent.getTarget() instanceof PermanentToken) // nontoken
+ && (zEvent.getTarget().getControllerId().equals(getControllerId())); // you control
+ }
+ }
+
+ return false;
}
@Override
