mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
Fixed some tooltip texts and display of choosen color in tooltip.
This commit is contained in:
parent
c03c14af52
commit
94d8ff554f
10 changed files with 27 additions and 22 deletions
|
@ -114,6 +114,7 @@ class ChooseColorEffect extends OneShotEffect<ChooseColorEffect> {
|
|||
if (player.choose(Outcome.Neutral, colorChoice, game)) {
|
||||
game.informPlayers(permanent.getName() + ": " + player.getName() + " has chosen " + colorChoice.getChoice());
|
||||
game.getState().setValue(permanent.getId() + "_color", colorChoice.getColor());
|
||||
permanent.addInfo("chosen color", "<font color = 'blue'>Chosen color: " + colorChoice.getColor().getDescription() + "</font>");
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -102,7 +102,7 @@ class HallOfTriumphEffect extends OneShotEffect<HallOfTriumphEffect> {
|
|||
if (colorChoice.getChoice() != null) {
|
||||
game.informPlayers(permanent.getName() + ": " + player.getName() + " has chosen " + colorChoice.getChoice());
|
||||
game.getState().setValue(permanent.getId() + "_color", colorChoice.getColor());
|
||||
permanent.addInfo("chosen color", "<i>Chosen color: " + colorChoice.getChoice().toString() + "</i>");
|
||||
permanent.addInfo("chosen color", "<font color = 'blue'>Chosen color: " + colorChoice.getColor().getDescription() + "</font>");
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -107,7 +107,7 @@ class WardSliverEffect extends OneShotEffect<WardSliverEffect> {
|
|||
Player player = game.getPlayer(source.getControllerId());
|
||||
Permanent permanent = game.getPermanent(source.getSourceId());
|
||||
if (player != null && permanent != null) {
|
||||
Choice colorChoice = new ChoiceColor();
|
||||
ChoiceColor colorChoice = new ChoiceColor();
|
||||
colorChoice.setMessage("Choose color");
|
||||
while (!player.choose(Outcome.BoostCreature, colorChoice, game)) {
|
||||
if (!player.isInGame()) {
|
||||
|
@ -117,7 +117,7 @@ class WardSliverEffect extends OneShotEffect<WardSliverEffect> {
|
|||
if (colorChoice.getChoice() != null) {
|
||||
game.informPlayers(permanent.getName() + ": " + player.getName() + " has chosen " + colorChoice.getChoice());
|
||||
game.getState().setValue(permanent.getId() + "_color", colorChoice.getChoice());
|
||||
permanent.addInfo("chosen color", "<i>Chosen color: " + colorChoice.getChoice().toString() + "</i>");
|
||||
permanent.addInfo("chosen color", "<font color = 'blue'>Chosen color: " + colorChoice.getColor().getDescription() + "</font>");
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -103,6 +103,7 @@ class CagedSunEffect1 extends OneShotEffect<CagedSunEffect1> {
|
|||
if (player.choose(Outcome.BoostCreature, colorChoice, game)) {
|
||||
game.informPlayers(permanent.getName() + ": " + player.getName() + " has chosen " + colorChoice.getChoice());
|
||||
game.getState().setValue(permanent.getId() + "_color", colorChoice.getColor());
|
||||
permanent.addInfo("chosen color", "<font color = 'blue'>Chosen color: " + colorChoice.getColor().getDescription() + "</font>");
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
@ -173,8 +174,9 @@ class CagedSunTriggeredAbility extends TriggeredManaAbility<CagedSunTriggeredAbi
|
|||
}
|
||||
if (permanent != null && permanent.getCardType().contains(CardType.LAND)) {
|
||||
ObjectColor color = (ObjectColor) game.getState().getValue(this.sourceId + "_color");
|
||||
if (color != null && event.getData().contains(color.toString()))
|
||||
if (color != null && event.getData().contains(color.toString())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
@ -208,16 +210,17 @@ class CagedSunEffect extends ManaEffect<CagedSunEffect> {
|
|||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player != null) {
|
||||
ObjectColor color = (ObjectColor) game.getState().getValue(source.getSourceId() + "_color");
|
||||
if (color.isBlack())
|
||||
if (color.isBlack()) {
|
||||
player.getManaPool().addMana(Mana.BlackMana, game, source);
|
||||
else if (color.isBlue())
|
||||
} else if (color.isBlue()) {
|
||||
player.getManaPool().addMana(Mana.BlueMana, game, source);
|
||||
else if (color.isRed())
|
||||
} else if (color.isRed()) {
|
||||
player.getManaPool().addMana(Mana.RedMana, game, source);
|
||||
else if (color.isGreen())
|
||||
} else if (color.isGreen()) {
|
||||
player.getManaPool().addMana(Mana.GreenMana, game, source);
|
||||
else if (color.isWhite())
|
||||
} else if (color.isWhite()) {
|
||||
player.getManaPool().addMana(Mana.WhiteMana, game, source);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -97,6 +97,7 @@ class CurseOfWizardryChooseColorEffect extends OneShotEffect<CurseOfWizardryChoo
|
|||
if (player.choose(Outcome.Detriment, colorChoice, game)) {
|
||||
game.informPlayers(curseOfWizardry.getName() + ": " + player.getName() + " has chosen " + colorChoice.getChoice());
|
||||
game.getState().setValue(curseOfWizardry.getId() + "_color", colorChoice.getColor());
|
||||
curseOfWizardry.addInfo("chosen color", "<font color = 'blue'>Chosen color: " + colorChoice.getColor().getDescription() + "</font>");
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -50,7 +50,7 @@ import mage.filter.predicate.permanent.EnchantedPredicate;
|
|||
public class GreaterAuramancy extends CardImpl<GreaterAuramancy> {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("enchantments");
|
||||
private static final FilterPermanent filter2 = new FilterPermanent("Creatures");
|
||||
private static final FilterPermanent filter2 = new FilterPermanent("Enchanted creatures");
|
||||
|
||||
static {
|
||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||
|
|
|
@ -27,8 +27,7 @@
|
|||
*/
|
||||
package mage.sets.shadowmoor;
|
||||
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
|
@ -39,7 +38,9 @@ import mage.abilities.effects.common.SacrificeSourceEffect;
|
|||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.choices.ChoiceColor;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
|
@ -47,8 +48,6 @@ import mage.game.permanent.Permanent;
|
|||
import mage.game.stack.StackObject;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
|
@ -95,12 +94,13 @@ class LureboundScarecrowChooseColorEffect extends OneShotEffect<LureboundScarecr
|
|||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
StackObject sourceStackObject = game.getStack().getStackObject(source.getSourceId());
|
||||
Card card = game.getCard(source.getSourceId());
|
||||
if (player != null && sourceStackObject != null && card != null) {
|
||||
Permanent permanent = game.getPermanent(source.getSourceId());
|
||||
if (player != null && sourceStackObject != null && permanent != null) {
|
||||
ChoiceColor colorChoice = new ChoiceColor();
|
||||
if (player.choose(Outcome.BoostCreature, colorChoice, game)) {
|
||||
game.informPlayers(sourceStackObject.getName() + ": " + player.getName() + " has chosen " + colorChoice.getChoice());
|
||||
game.getState().setValue(card.getId() + "_color", colorChoice.getColor());
|
||||
game.getState().setValue(permanent.getId() + "_color", colorChoice.getColor());
|
||||
permanent.addInfo("chosen color", new StringBuilder("<font color='blue'>Chosen color: ").append(colorChoice.getColor().getDescription()).append("</font>").toString());
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -96,12 +96,13 @@ class ChooseColorEffect extends OneShotEffect<ChooseColorEffect> {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
Card card = game.getCard(source.getSourceId());
|
||||
if (player != null && card != null) {
|
||||
Permanent permanent = game.getPermanent(source.getSourceId());
|
||||
if (player != null && permanent != null) {
|
||||
ChoiceColor colorChoice = new ChoiceColor();
|
||||
if (player.choose(Outcome.Neutral, colorChoice, game)) {
|
||||
game.informPlayers(new StringBuilder(card.getName()).append(": ").append(player.getName()).append(" has chosen ").append(colorChoice.getChoice()).toString());
|
||||
game.informPlayers(new StringBuilder(permanent.getName()).append(": ").append(player.getName()).append(" has chosen ").append(colorChoice.getChoice()).toString());
|
||||
game.getState().setValue(source.getSourceId() + "_color", colorChoice.getColor());
|
||||
permanent.addInfo("chosen color", "<font color = 'blue'>Chosen color: " + colorChoice.getColor().getDescription() + "</font>");
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -102,7 +102,7 @@ class IonaShieldOfEmeriaChooseColorEffect extends OneShotEffect<IonaShieldOfEmer
|
|||
if (player.choose(Outcome.Detriment, colorChoice, game)) {
|
||||
game.informPlayers(permanent.getName() + ": " + player.getName() + " has chosen " + colorChoice.getChoice());
|
||||
game.getState().setValue(permanent.getId() + "_color", colorChoice.getColor());
|
||||
permanent.addInfo("chosen color", new StringBuilder("<font color='blue'>Chosen color: ").append(colorChoice.getChoice()).append("</font>").toString());
|
||||
permanent.addInfo("chosen color", new StringBuilder("<font color='blue'>Chosen color: ").append(colorChoice.getColor().getDescription()).append("</font>").toString());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -182,7 +182,6 @@ public class ObjectColor implements Serializable, Copyable<ObjectColor>, Compara
|
|||
}
|
||||
|
||||
public String getDescription() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if (getColorCount() > 1) {
|
||||
return "multicolored";
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue