mirror of
https://github.com/correl/mage.git
synced 2024-12-25 19:25:41 +00:00
Minor changes.
This commit is contained in:
parent
a8b2102273
commit
1816e50337
2 changed files with 9 additions and 10 deletions
|
@ -81,23 +81,23 @@ public class BeginningOfUpkeepTriggeredAbility extends TriggeredAbilityImpl<Begi
|
|||
|
||||
@Override
|
||||
public String getRule() {
|
||||
String effectsText = getEffects().getText(modes.getMode());
|
||||
StringBuilder sb = new StringBuilder(getEffects().getText(modes.getMode()));
|
||||
switch (targetController) {
|
||||
case YOU:
|
||||
if (this.optional) {
|
||||
if (effectsText.toLowerCase().startsWith("target")){
|
||||
effectsText = "you may have " + effectsText;
|
||||
} else if (!effectsText.toLowerCase().startsWith("you may")){
|
||||
effectsText = "you may " + effectsText;
|
||||
if (sb.substring(0, 6).toLowerCase().equals("target")){
|
||||
sb.insert(0, "you may have ");
|
||||
} else if (!sb.substring(0, 4).toLowerCase().equals("you ")){
|
||||
sb.insert(0, "you may ");
|
||||
}
|
||||
}
|
||||
return "At the beginning of your upkeep, " + generateZoneString() + effectsText;
|
||||
return sb.insert(0, generateZoneString()).insert(0, "At the beginning of your upkeep, ").toString();
|
||||
case OPPONENT:
|
||||
return "At the beginning of each opponent's upkeep, " + generateZoneString() + effectsText;
|
||||
return sb.insert(0, generateZoneString()).insert(0, "At the beginning of each opponent's upkeep, ").toString();
|
||||
case ANY:
|
||||
return "At the beginning of each player's upkeep, " + generateZoneString() + effectsText;
|
||||
return sb.insert(0, generateZoneString()).insert(0, "At the beginning of each player's upkeep, ").toString();
|
||||
case CONTROLLER_ATTACHED_TO:
|
||||
return "At the beginning of the upkeep of enchanted creature's controller, " + generateZoneString() + effectsText;
|
||||
return sb.insert(0, generateZoneString()).insert(0, "At the beginning of the upkeep of enchanted creature's controller, ").toString();
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
|
|
@ -32,7 +32,6 @@ import java.util.UUID;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.watchers.common.PlayerLostLifeWatcher;
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue