mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
Fixed that Lazav, Dimir Mastermind's ability also triggers if a card not coming from battlefield goes to graveyard. Little text improvement for Dimir Charm.
This commit is contained in:
parent
ec75e92c7d
commit
ba296f2528
2 changed files with 5 additions and 6 deletions
|
@ -132,7 +132,7 @@ class DimirCharmEffect extends OneShotEffect {
|
||||||
}
|
}
|
||||||
|
|
||||||
if(cards.size() > 0){
|
if(cards.size() > 0){
|
||||||
TargetCard target = new TargetCard(Constants.Zone.PICK, new FilterCard("Card to put on top"));
|
TargetCard target = new TargetCard(Constants.Zone.PICK, new FilterCard("Card to put back on top of library"));
|
||||||
target.setRequired(true);
|
target.setRequired(true);
|
||||||
if(controller.choose(Outcome.Neutral, cards, target, game)){
|
if(controller.choose(Outcome.Neutral, cards, target, game)){
|
||||||
Card card = cards.get(target.getFirstTarget(), game);
|
Card card = cards.get(target.getFirstTarget(), game);
|
||||||
|
|
|
@ -102,15 +102,14 @@ class CreatureCardPutOpponentGraveyardTriggeredAbility extends TriggeredAbilityI
|
||||||
public boolean checkTrigger(GameEvent event, Game game) {
|
public boolean checkTrigger(GameEvent event, Game game) {
|
||||||
if (event.getType() == EventType.ZONE_CHANGE
|
if (event.getType() == EventType.ZONE_CHANGE
|
||||||
&& ((ZoneChangeEvent) event).getToZone() == Zone.GRAVEYARD) {
|
&& ((ZoneChangeEvent) event).getToZone() == Zone.GRAVEYARD) {
|
||||||
MageObject object = game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD);
|
Card card = game.getCard(event.getTargetId());
|
||||||
if (object == null) {
|
if (card == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (game.getOpponents(controllerId).contains(event.getPlayerId())
|
if (game.getOpponents(controllerId).contains(event.getPlayerId())
|
||||||
&& object.getCardType().contains(CardType.CREATURE)
|
&& card.getCardType().contains(CardType.CREATURE)) {
|
||||||
&& (!(object instanceof PermanentToken))) {
|
|
||||||
for (Effect effect : this.getEffects()) {
|
for (Effect effect : this.getEffects()) {
|
||||||
effect.setTargetPointer(new FixedTarget(object.getId()));
|
effect.setTargetPointer(new FixedTarget(card.getId()));
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue