mirror of
https://github.com/magefree/mage.git
synced 2026-01-23 11:49:56 -08:00
* Willbreaker - Fixed that it didn't trigger when targeted by abilities.
This commit is contained in:
parent
d38910b81b
commit
7bb93fbb25
3 changed files with 77 additions and 7 deletions
|
|
@ -43,7 +43,6 @@ import mage.game.Game;
|
|||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.stack.StackObject;
|
||||
import mage.players.Player;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
|
|
@ -96,8 +95,7 @@ class WillbreakerTriggeredAbility extends TriggeredAbilityImpl {
|
|||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (getControllerId().equals(event.getPlayerId())) {
|
||||
Permanent permanent = game.getPermanent(event.getTargetId());
|
||||
if (permanent != null && permanent.getCardType().contains(CardType.CREATURE)
|
||||
&& StackObject.class.isInstance(game.getObject(event.getSourceId()))) {
|
||||
if (permanent != null && permanent.getCardType().contains(CardType.CREATURE)) {
|
||||
Player controller = game.getPlayer(getControllerId());
|
||||
if (controller != null && controller.hasOpponent(permanent.getControllerId(), game)) {
|
||||
getEffects().get(0).setTargetPointer(new FixedTarget(event.getTargetId()));
|
||||
|
|
|
|||
|
|
@ -28,16 +28,16 @@
|
|||
package mage.sets.newphyrexia;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.ColoredManaSymbol;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.PhyrexianManaCost;
|
||||
import mage.abilities.effects.common.TapTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.ColoredManaSymbol;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
|
@ -54,6 +54,7 @@ public class BlindingSouleater extends CardImpl {
|
|||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// {WP},{T}: Tap target creature. ( can be paid with either or 2 life.)
|
||||
SimpleActivatedAbility ability = new SimpleActivatedAbility(Zone.BATTLEFIELD,
|
||||
new TapTargetEffect(),
|
||||
new PhyrexianManaCost(ColoredManaSymbol.W));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue