mirror of
https://github.com/magefree/mage.git
synced 2026-01-24 12:19:59 -08:00
remove target hack from DealsCombatDamageToAPlayerTriggeredAbility, now you need to add flag to constructor to set target pointer to damaged player
This commit is contained in:
parent
a9e2bfe52a
commit
0633a2667f
3 changed files with 21 additions and 9 deletions
|
|
@ -28,7 +28,6 @@
|
|||
|
||||
package mage.sets.magic2011;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Outcome;
|
||||
import mage.Constants.Rarity;
|
||||
|
|
@ -43,6 +42,8 @@ import mage.cards.CardsImpl;
|
|||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
|
|
@ -59,7 +60,7 @@ public class MerfolkSpy extends CardImpl<MerfolkSpy> {
|
|||
this.toughness = new MageInt(1);
|
||||
|
||||
this.addAbility(new IslandwalkAbility());
|
||||
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new MerfolkSpyEffect(), false));
|
||||
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new MerfolkSpyEffect(), false, true));
|
||||
}
|
||||
|
||||
public MerfolkSpy(final MerfolkSpy card) {
|
||||
|
|
@ -86,7 +87,7 @@ class MerfolkSpyEffect extends OneShotEffect<MerfolkSpyEffect> {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getFirstTarget());
|
||||
Player player = game.getPlayer(targetPointer.getFirst(source));
|
||||
if (player != null && player.getHand().size() > 0) {
|
||||
Cards revealed = new CardsImpl();
|
||||
revealed.add(player.getHand().getRandom(game));
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@
|
|||
*/
|
||||
package mage.sets.scarsofmirrodin;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.MageInt;
|
||||
|
|
@ -39,6 +38,8 @@ import mage.abilities.effects.common.PutLibraryIntoGraveTargetEffect;
|
|||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author ayratn
|
||||
|
|
@ -59,7 +60,7 @@ public class ScreechingSilcaw extends CardImpl<ScreechingSilcaw> {
|
|||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
TriggeredAbility conditional = new ConditionalTriggeredAbility(
|
||||
new DealsCombatDamageToAPlayerTriggeredAbility(new PutLibraryIntoGraveTargetEffect(4), false),
|
||||
new DealsCombatDamageToAPlayerTriggeredAbility(new PutLibraryIntoGraveTargetEffect(4), false, true),
|
||||
Metalcraft.getInstance(), text);
|
||||
this.addAbility(conditional);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue