fixed Ob-Nixilis, Unshackled triggering when a player searches a library that isn't theirs (fixes
package mage.cards.o;
-import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.TriggeredAbilityImpl;
@@ -25,8 +24,9 @@ import mage.game.events.GameEvent.EventType;
import mage.players.Player;
import mage.target.targetpointer.FixedTarget;
+import java.util.UUID;
+
/**
- *
* @author emerald000
*/
public final class ObNixilisUnshackled extends CardImpl {
@@ -64,11 +64,11 @@ public final class ObNixilisUnshackled extends CardImpl {
class ObNixilisUnshackledTriggeredAbility extends TriggeredAbilityImpl {
- ObNixilisUnshackledTriggeredAbility() {
+ public ObNixilisUnshackledTriggeredAbility() {
super(Zone.BATTLEFIELD, new ObNixilisUnshackledEffect(), false);
}
- ObNixilisUnshackledTriggeredAbility(final ObNixilisUnshackledTriggeredAbility ability) {
+ public ObNixilisUnshackledTriggeredAbility(final ObNixilisUnshackledTriggeredAbility ability) {
super(ability);
}
@@ -85,7 +85,8 @@ class ObNixilisUnshackledTriggeredAbility extends TriggeredAbilityImpl {
@Override
public boolean checkTrigger(GameEvent event, Game game) {
Player controller = game.getPlayer(this.getControllerId());
- if (controller != null && game.isOpponent(controller, event.getTargetId())) {
+ if (controller != null && game.isOpponent(controller, event.getTargetId())
+ && event.getTargetId().equals(event.getPlayerId())) {
getEffects().get(0).setTargetPointer(new FixedTarget(event.getPlayerId()));
return true;
}
@@ -102,12 +103,12 @@ class ObNixilisUnshackledEffect extends SacrificeEffect {
static private final FilterPermanent filter = new FilterControlledCreaturePermanent("creature");
- ObNixilisUnshackledEffect() {
+ public ObNixilisUnshackledEffect() {
super(filter, 1, "that player");
this.staticText = "that player sacrifices a creature and loses 10 life";
}
- ObNixilisUnshackledEffect(final ObNixilisUnshackledEffect effect) {
+ public ObNixilisUnshackledEffect(final ObNixilisUnshackledEffect effect) {
super(effect);
}
