- Added Hall of Gemstone

This commit is contained in:
swordshine
2013-12-20 08:06:33 +00:00
parent 5dee59e8e5
commit c08e984e35
4 changed files with 21 additions and 1 deletions

1
.gitattributes vendored
View File

@@ -5119,6 +5119,7 @@ forge-gui/res/cardsfolder/h/halcyon_glaze.txt svneol=native#text/plain
forge-gui/res/cardsfolder/h/halimar_depths.txt svneol=native#text/plain
forge-gui/res/cardsfolder/h/halimar_excavator.txt svneol=native#text/plain
forge-gui/res/cardsfolder/h/halimar_wavewatch.txt svneol=native#text/plain
forge-gui/res/cardsfolder/h/hall_of_gemstone.txt -text
forge-gui/res/cardsfolder/h/hall_of_the_bandit_lord.txt -text
forge-gui/res/cardsfolder/h/hallow.txt -text
forge-gui/res/cardsfolder/h/hallowed_burial.txt svneol=native#text/plain

View File

@@ -0,0 +1,10 @@
Name:Hall of Gemstone
ManaCost:1 G G
Types:World Enchantment
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ Player | Execute$ TrigChoose | TriggerZones$ Battlefield | TriggerDescription$ At the beginning of each player's upkeep, that player chooses a color. Until end of turn, lands tapped for mana produce mana of the chosen color instead of any other color.
SVar:TrigChoose:AB$ ChooseColor | Cost$ 0 | Defined$ TriggeredPlayer | AILogic$ MostProminentInActivePlayerHand | SubAbility$ DBEffect
SVar:DBEffect:DB$ Effect | ReplacementEffects$ ReplaceChosen | SVars$ ProduceChosen
SVar:ReplaceChosen:Event$ ProduceMana | ActiveZones$ Command | ValidCard$ Land | ManaReplacement$ ProduceChosen | Description$ Lands tapped for mana produce mana of the chosen color instead of any other color.
SVar:ProduceChosen:Colorless->Chosen & U->Chosen & B->Chosen & R->Chosen & G->Chosen & W->Chosen
SVar:Picture:http://www.wizards.com/global/images/magic/general/hall_of_gemstone.jpg
Oracle:At the beginning of each player's upkeep, that player chooses a color. Until end of turn, lands tapped for mana produce mana of the chosen color instead of any other color.

View File

@@ -867,6 +867,9 @@ public class ComputerUtilCard {
else if (logic.equals("MostProminentAttackers") && game.getPhaseHandler().inCombat()) {
chosen.add(ComputerUtilCard.getMostProminentColor(game.getCombat().getAttackers(), colorChoices));
}
else if (logic.equals("MostProminentInActivePlayerHand")) {
chosen.add(ComputerUtilCard.getMostProminentColor(game.getPhaseHandler().getPlayerTurn().getCardsIn(ZoneType.Hand), colorChoices));
}
else if (logic.equals("MostProminentKeywordInComputerDeck")) {
List<Card> list = ai.getAllCards();
int m1 = 0;

View File

@@ -25,6 +25,7 @@ import java.util.Map;
import org.apache.commons.lang3.StringUtils;
import forge.card.MagicColor;
import forge.game.Game;
import forge.game.GameLogEntryType;
import forge.game.ability.AbilityFactory;
@@ -219,7 +220,12 @@ public class ReplacementHandler {
final Player player1 = (Player) runParams.get("Player");
final String rep = (String) runParams.get("Mana");
// Replaced mana type
manaAb.getManaPart().setManaReplaceType(replacementEffect.getHostCard().getSVar(mapParams.get("ManaReplacement")));
final Card repHost = replacementEffect.getHostCard();
String repType = repHost.getSVar(mapParams.get("ManaReplacement"));
if (repType.contains("Chosen") && !repHost.getChosenColor().isEmpty()) {
repType = repType.replace("Chosen", MagicColor.toShortString(repHost.getChosenColor().get(0)));
}
manaAb.getManaPart().setManaReplaceType(repType);
manaAb.getManaPart().produceMana(rep, player1, manaAb);
} else {
player.getController().playSpellAbilityNoStack(effectSA, true);