mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
* Prophet of Kruphix - Fixed that the triggered untap ability was missing.
This commit is contained in:
parent
fdca147d4d
commit
24baf63cf1
3 changed files with 28 additions and 10 deletions
|
@ -58,7 +58,6 @@ public class GracefulAntelope extends CardImpl<GracefulAntelope> {
|
|||
// Plainswalk
|
||||
this.addAbility(new PlainswalkAbility());
|
||||
// Whenever Graceful Antelope deals combat damage to a player, you may have target land become a Plains until Graceful Antelope leaves the battlefield.
|
||||
//Ability ability = new SimpleTriggeredAbility(Zone.BATTLEFIELD, new BecomesBasicLandTargetEffect(Duration.WhileOnBattlefield), new TapSourceCost());
|
||||
Ability ability = new DealsCombatDamageToAPlayerTriggeredAbility(new BecomesBasicLandTargetEffect(Duration.WhileOnBattlefield,"Plains"), true);
|
||||
Target target = new TargetLandPermanent();
|
||||
target.setRequired(true);
|
||||
|
|
|
@ -74,7 +74,7 @@ public class ProphetOfKruphix extends CardImpl<ProphetOfKruphix> {
|
|||
this.toughness = new MageInt(3);
|
||||
|
||||
// Untap all creatures and lands you control during each other player's untap step.
|
||||
Effect effect = new UntapAllControllerEffect(filter, "Untap all creatures and lands you control during each other player's untap step");
|
||||
Effect effect = new UntapAllControllerEffect(filter, "Untap all creatures and lands you control");
|
||||
this.addAbility(new BeginningOfUntapTriggeredAbility(Zone.BATTLEFIELD, effect, TargetController.NOT_YOU, false));
|
||||
// You may cast creature cards as though they had flash.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ProphetOfKruphixEffect()));
|
||||
|
|
|
@ -10,6 +10,7 @@ import mage.constants.TargetController;
|
|||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.players.Player;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
/**
|
||||
|
@ -53,6 +54,17 @@ public class BeginningOfUntapTriggeredAbility extends TriggeredAbilityImpl<Begin
|
|||
}
|
||||
}
|
||||
return yours;
|
||||
case NOT_YOU:
|
||||
Player controller = game.getPlayer(this.getControllerId());
|
||||
if (controller != null && controller.getInRange().contains(event.getPlayerId()) && !event.getPlayerId().equals(this.getControllerId())) {
|
||||
if (getTargets().size() == 0) {
|
||||
for (Effect effect : this.getEffects()) {
|
||||
effect.setTargetPointer(new FixedTarget(event.getPlayerId()));
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
case OPPONENT:
|
||||
if (game.getOpponents(this.controllerId).contains(event.getPlayerId())) {
|
||||
if (getTargets().size() == 0) {
|
||||
|
@ -64,12 +76,15 @@ public class BeginningOfUntapTriggeredAbility extends TriggeredAbilityImpl<Begin
|
|||
}
|
||||
break;
|
||||
case ANY:
|
||||
if (getTargets().size() == 0) {
|
||||
for (Effect effect : this.getEffects()) {
|
||||
effect.setTargetPointer(new FixedTarget(event.getPlayerId()));
|
||||
controller = game.getPlayer(this.getControllerId());
|
||||
if (controller != null && controller.getInRange().contains(event.getPlayerId())) {
|
||||
if (getTargets().size() == 0) {
|
||||
for (Effect effect : this.getEffects()) {
|
||||
effect.setTargetPointer(new FixedTarget(event.getPlayerId()));
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
@ -77,15 +92,19 @@ public class BeginningOfUntapTriggeredAbility extends TriggeredAbilityImpl<Begin
|
|||
|
||||
@Override
|
||||
public String getRule() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
switch (targetController) {
|
||||
case YOU:
|
||||
return "At the beginning of your untap step, " + generateZoneString() + getEffects().getText(modes.getMode());
|
||||
return sb.append("At the beginning of your untap step, ").append(generateZoneString()).append(getEffects().getText(modes.getMode())).toString();
|
||||
case NOT_YOU:
|
||||
return sb.append(getEffects().getText(modes.getMode())).append(" during each other player's untap step").append(generateZoneString()).toString();
|
||||
case OPPONENT:
|
||||
return "At the beginning of each opponent's untap step, " + generateZoneString() + getEffects().getText(modes.getMode());
|
||||
return sb.append("At the beginning of each opponent's untap step, ").append(generateZoneString()).append(getEffects().getText(modes.getMode())).toString();
|
||||
case ANY:
|
||||
return "At the beginning of each player's untap step, " + generateZoneString() + getEffects().getText(modes.getMode());
|
||||
return sb.append("At the beginning of each player's untap step, ").append(generateZoneString()).append(getEffects().getText(modes.getMode())).toString();
|
||||
|
||||
}
|
||||
return "";
|
||||
return "BeginningOfUntapTriggeredAbility: targetController value not supported";
|
||||
}
|
||||
|
||||
private String generateZoneString() {
|
||||
|
|
Loading…
Reference in a new issue