* Panopticon Plane - Fixed draw card abilities.

This commit is contained in:
LevelX2 2020-01-11 01:25:26 +01:00
parent b8c459a6b9
commit 1f7a7a10b0
5 changed files with 47 additions and 27 deletions

View file

@ -1,4 +1,3 @@
package mage.abilities.common;
import mage.abilities.TriggeredAbilityImpl;
@ -86,6 +85,7 @@ public class BeginningOfDrawTriggeredAbility extends TriggeredAbilityImpl {
}
break;
case ANY:
case ACTIVE:
if (getTargets().isEmpty()) {
this.getEffects().setTargetPointer(new FixedTarget(event.getPlayerId()));
}
@ -97,6 +97,8 @@ public class BeginningOfDrawTriggeredAbility extends TriggeredAbilityImpl {
@Override
public String getRule() {
switch (targetController) {
case ACTIVE:
return "At the beginning of your draw step, " + generateZoneString() + getEffects().getText(modes.getMode());
case YOU:
return "At the beginning of your draw step, " + generateZoneString() + getEffects().getText(modes.getMode());
case OPPONENT:

View file

@ -1,4 +1,3 @@
package mage.abilities.effects.common;
import java.util.List;
@ -102,7 +101,6 @@ public class RollPlanarDieEffect extends OneShotEffect {
// Steps: 1) Remove the last plane and set its effects to discarded
for (CommandObject cobject : game.getState().getCommand()) {
if (cobject instanceof Plane) {
game.getState().addSeenPlane((Plane) cobject, game, id);
if (((Plane) cobject).getAbilities() != null) {
for (Ability ability : ((Plane) cobject).getAbilities()) {
for (Effect effect : ability.getEffects()) {
@ -153,7 +151,7 @@ public class RollPlanarDieEffect extends OneShotEffect {
for (int i = 0; i < chaosEffects.size(); i++) {
Effect effect = chaosEffects.get(i);
if (effect != null) {
try {
try {
String emode = effect.getText(mode);
emode = emode.substring(0, 1).toLowerCase() + emode.substring(1);
sb.append(emode);

View file

@ -1,15 +1,13 @@
package mage.constants;
/**
*
* @author spjspj
*/
public enum PlanarDieRoll {
NIL_ROLL ("Nil Roll"),
NIL_ROLL("Blank Roll"),
CHAOS_ROLL("Chaos Roll"),
PLANAR_ROLL ("Planar Roll");
PLANAR_ROLL("Planar Roll");
private final String text;

View file

@ -1,4 +1,3 @@
package mage.game.command.planes;
import java.util.ArrayList;
@ -22,6 +21,7 @@ import mage.game.events.GameEvent;
import mage.game.events.GameEvent.EventType;
import mage.players.Player;
import mage.target.Target;
import mage.target.targetpointer.FixedTarget;
import mage.watchers.common.PlanarRollWatcher;
/**
@ -36,12 +36,14 @@ public class PanopticonPlane extends Plane {
this.setName("Plane - Panopticon");
this.setExpansionSetCodeForImage("PCA");
// At the beginning of your draw step, draw an additional card.
Ability ability = new BeginningOfDrawTriggeredAbility(new DrawCardTargetEffect(1), TargetController.ANY, false);
this.getAbilities().add(ability);
// When you planeswalk to Panopticon, draw a card
Ability pwability = new PanopticonTriggeredAbility(new DrawCardTargetEffect(1));
this.getAbilities().add(pwability);
// At the beginning of your draw step, draw an additional card.
Ability ability = new BeginningOfDrawTriggeredAbility(Zone.COMMAND, new DrawCardTargetEffect(1), TargetController.ACTIVE, false);
this.getAbilities().add(ability);
// Active player can roll the planar die: Whenever you roll {CHAOS}, draw a card
Effect chaosEffect = new DrawCardSourceControllerEffect(1);
Target chaosTarget = null;
@ -84,7 +86,7 @@ class PanopticonTriggeredAbility extends TriggeredAbilityImpl {
Player activePlayer = game.getPlayer(game.getActivePlayerId());
if (activePlayer != null) {
activePlayer.drawCards(1, game);
getEffects().setTargetPointer(new FixedTarget(activePlayer.getId()));
return true;
}
return false;