mirror of
https://github.com/magefree/mage.git
synced 2025-12-27 05:52:06 -08:00
* Undercity Reaches - fixed rollback error on plane's draw trigger
This commit is contained in:
parent
30fe344e23
commit
87d8383eb8
2 changed files with 57 additions and 4 deletions
|
|
@ -43,7 +43,7 @@ public class UndercityReachesPlane extends Plane {
|
|||
this.setPlaneType(Planes.PLANE_UNDERCITY_REACHES);
|
||||
this.setExpansionSetCodeForImage("PCA");
|
||||
|
||||
// Whenever a creature deals combat damage to a player, its controller may a draw a card
|
||||
// Whenever a creature deals combat damage to a player, its controller may draw a card.
|
||||
Ability ability = new UndercityReachesTriggeredAbility();
|
||||
|
||||
this.getAbilities().add(ability);
|
||||
|
|
@ -68,7 +68,7 @@ public class UndercityReachesPlane extends Plane {
|
|||
class UndercityReachesTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
public UndercityReachesTriggeredAbility() {
|
||||
super(Zone.COMMAND, null, true);
|
||||
super(Zone.COMMAND, null, false); // effect must be optional
|
||||
}
|
||||
|
||||
public UndercityReachesTriggeredAbility(final UndercityReachesTriggeredAbility ability) {
|
||||
|
|
@ -98,9 +98,9 @@ class UndercityReachesTriggeredAbility extends TriggeredAbilityImpl {
|
|||
if (((DamagedPlayerEvent) event).isCombatDamage()) {
|
||||
Permanent creature = game.getPermanent(event.getSourceId());
|
||||
if (creature != null) {
|
||||
Effect effect = new DrawCardTargetEffect(StaticValue.get(1), false, true);
|
||||
Effect effect = new DrawCardTargetEffect(StaticValue.get(1), true, false);
|
||||
effect.setTargetPointer(new FixedTarget(creature.getControllerId()));
|
||||
effect.apply(game, null);
|
||||
effect.apply(game, this);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue