mirror of
https://github.com/magefree/mage.git
synced 2026-01-25 04:39:18 -08:00
* Guilded Drake - Fixed that the sacrifice did not happen if the target creature for exchange is no longer a valid target during resolution (fixes #1546).
This commit is contained in:
parent
ea5c825897
commit
cf3488d5e5
8 changed files with 80 additions and 22 deletions
|
|
@ -70,8 +70,10 @@ public class GildedDrake extends CardImpl {
|
|||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
// When Gilded Drake enters the battlefield, exchange control of Gilded Drake and up to one target creature an opponent controls. If you don't make an exchange, sacrifice Gilded Drake. This ability can't be countered except by spells and abilities.
|
||||
// When Gilded Drake enters the battlefield, exchange control of Gilded Drake and up to one target creature an opponent controls. If you don't make an exchange, sacrifice Gilded Drake.
|
||||
// This ability can't be countered except by spells and abilities.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new GildedDrakeEffect());
|
||||
ability.setCanFizzle(false);
|
||||
ability.addTarget(new TargetCreaturePermanent(0, 1, filter, false));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -117,13 +117,13 @@ class MarchesaTheBlackRoseTriggeredAbility extends TriggeredAbilityImpl {
|
|||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (((ZoneChangeEvent) event).getToZone() == Zone.GRAVEYARD
|
||||
&& ((ZoneChangeEvent) event).getFromZone() == Zone.BATTLEFIELD) {
|
||||
Permanent permanent = (Permanent) game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD);
|
||||
Permanent permanent = ((ZoneChangeEvent) event).getTarget();
|
||||
if (permanent != null
|
||||
&& permanent.getControllerId().equals(this.getControllerId())
|
||||
&& permanent.getCardType().contains(CardType.CREATURE)
|
||||
&& permanent.getCounters().getCount(CounterType.P1P1) > 0) {
|
||||
for (Effect effect : this.getEffects()) {
|
||||
effect.setTargetPointer(new FixedTarget(permanent.getId()));
|
||||
effect.setTargetPointer(new FixedTarget(permanent.getId(), permanent.getZoneChangeCounter(game) + 1));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue