- Added North Star

This commit is contained in:
swordshine
2014-08-06 05:59:40 +00:00
parent b0d2244633
commit cc90fc61c6
8 changed files with 55 additions and 13 deletions

1
.gitattributes vendored
View File

@@ -9440,6 +9440,7 @@ forge-gui/res/cardsfolder/n/norin_the_wary.txt svneol=native#text/plain
forge-gui/res/cardsfolder/n/norns_annex.txt -text
forge-gui/res/cardsfolder/n/norns_dominion.txt -text
forge-gui/res/cardsfolder/n/norritt.txt -text
forge-gui/res/cardsfolder/n/north_star.txt -text
forge-gui/res/cardsfolder/n/northern_paladin.txt svneol=native#text/plain
forge-gui/res/cardsfolder/n/norwood_archers.txt svneol=native#text/plain
forge-gui/res/cardsfolder/n/norwood_priestess.txt svneol=native#text/plain

View File

@@ -1,6 +1,7 @@
package forge.card;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import java.util.List;
@@ -127,5 +128,14 @@ public class MagicColor {
/** The Basic lands. */
public static final List<String> BASIC_LANDS = ImmutableList.of("Plains", "Island", "Swamp", "Mountain", "Forest");
public static final List<String> SNOW_LANDS = ImmutableList.of("Snow-Covered Plains", "Snow-Covered Island", "Snow-Covered Swamp", "Snow-Covered Mountain", "Snow-Covered Forest");
public static final ImmutableMap<String, String> ANY_MANA_CONVERSION = new ImmutableMap.Builder<String, String>()
.put("ManaColorConversion", "Additive")
.put("WhiteConversion", "All")
.put("BlueConversion", "All")
.put("BlackConversion", "All")
.put("RedConversion", "All")
.put("GreenConversion", "All")
.put("ColorlessConversion", "All")
.build();
}
}

View File

@@ -733,6 +733,7 @@ public class PhaseHandler implements java.io.Serializable, IGameStateObject {
p.setLifeLostThisTurn(0);
p.setLifeGainedThisTurn(0);
p.setLibrarySearched(0);
p.setNumManaConversion(0);
p.removeKeyword("At the beginning of this turn's end step, you lose the game.");
p.removeKeyword("Skip the untap step of this turn.");

View File

@@ -184,6 +184,8 @@ public class Player extends GameEntity implements Comparable<Player> {
private List<Card> lostOwnership = new ArrayList<Card>();
private List<Card> gainedOwnership = new ArrayList<Card>();
private int numManaConversion = 0;
public final PlayerOutcome getOutcome() {
return stats.getOutcome();
}
@@ -2332,6 +2334,23 @@ public class Player extends GameEntity implements Comparable<Player> {
this.numLibrarySearchedOwn++;
}
public final void setNumManaConversion(final int l) {
this.numManaConversion = l;
}
public final boolean hasManaConversion() {
return this.numManaConversion < this.getAmountOfKeyword("You may spend mana as though"
+ " it were mana of any color to cast a spell this turn.");
}
public final void incNumManaConversion() {
this.numManaConversion++;
}
public final void decNumManaConversion() {
this.numManaConversion--;
}
/*
* (non-Javadoc)
*

View File

@@ -7,13 +7,12 @@ T:Mode$ DamageDone | ValidSource$ Card.Self | ValidTarget$ Player | CombatDamage
SVar:TrigExile:AB$ Mill | Cost$ 0 | Defined$ TriggeredTarget | NumCards$ 1 | Destination$ Exile | RememberMilled$ True | SubAbility$ DBGainLife
SVar:DBGainLife:DB$ GainLife | Defined$ You | LifeAmount$ X | References$ X | SubAbility$ DBEffect
SVar:X:Remembered$CardManaCost
SVar:DBEffect:DB$ Effect | StaticAbilities$ STPlay,STPlay2 | Triggers$ TriggerCastDoM | SVars$ TrigRemoveSelf,DoM | RememberObjects$ Remembered | SubAbility$ DBCleanup
SVar:STPlay:Mode$ Continuous | EffectZone$ Command | Affected$ Card.IsRemembered+nonLand+YouOwn | AddSVar$ DoM | AddHiddenKeyword$ May be played & May spend mana as though it were mana of any color to cast CARDNAME | AffectedZone$ Exile | Description$ Until end of turn, you may cast that card and you may spend mana as though it were mana of any color to cast it.
SVar:STPlay2:Mode$ Continuous | EffectZone$ Command | Affected$ Card.IsRemembered+nonLand+OppOwn | AddSVar$ DoM | AddHiddenKeyword$ May be played by your opponent & May spend mana as though it were mana of any color to cast CARDNAME | AffectedZone$ Exile
SVar:DBEffect:DB$ Effect | StaticAbilities$ STPlay,STPlay2 | Triggers$ TriggerCastDoM | SVars$ TrigRemoveSelf | RememberObjects$ Remembered | SubAbility$ DBCleanup
SVar:STPlay:Mode$ Continuous | EffectZone$ Command | Affected$ Card.IsRemembered+nonLand+YouOwn | AddHiddenKeyword$ May be played & May spend mana as though it were mana of any color to cast CARDNAME | AffectedZone$ Exile | Description$ Until end of turn, you may cast that card and you may spend mana as though it were mana of any color to cast it.
SVar:STPlay2:Mode$ Continuous | EffectZone$ Command | Affected$ Card.IsRemembered+nonLand+OppOwn | AddHiddenKeyword$ May be played by your opponent & May spend mana as though it were mana of any color to cast CARDNAME | AffectedZone$ Exile
SVar:TriggerCastDoM:Mode$ SpellCast | ValidCard$ Card.IsRemembered | TriggerZones$ Command | Execute$ TrigRemoveSelf | Static$ True
SVar:TrigRemoveSelf:DB$ ChangeZone | Defined$ Self | Origin$ Command | Destination$ Exile
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:DoM:SVar:ManaConversionMatrix:ManaColorConversion$ Additive | WhiteConversion$ All | BlueConversion$ All | BlackConversion$ All | RedConversion$ All | GreenConversion$ All | ColorlessConversion$ All
SVar:RemAIDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/daxos_of_meletis.jpg
Oracle:Daxos of Meletis can't be blocked by creatures with power 3 or greater.\nWhenever Daxos of Meletis deals combat damage to a player, exile the top card of that player's library. You gain life equal to that card's converted mana cost. Until end of turn, you may cast that card and you may spend mana as though it were mana of any color to cast it.

View File

@@ -0,0 +1,7 @@
Name:North Star
ManaCost:4
Types:Artifact
A:AB$ Pump | Cost$ 4 T | Defined$ You | KW$ You may spend mana as though it were mana of any color to cast a spell this turn. | SpellDescription$ For one spell this turn, you may spend mana as though it were mana of any color to pay that spell's mana cost. (Additional costs are still paid normally.)
SVar:RemAIDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/north_star.jpg
Oracle:{4}, {T}: For one spell this turn, you may spend mana as though it were mana of any color to pay that spell's mana cost. (Additional costs are still paid normally.)

View File

@@ -2,12 +2,11 @@ Name:Psychic Intrusion
ManaCost:3 U B
Types:Sorcery
A:SP$ ChangeZone | Cost$ 3 U B | Origin$ Hand,Graveyard | Destination$ Exile | ValidTgts$ Opponent | DefinedPlayer$ Targeted | Chooser$ You | TgtPrompt$ Select target opponent | ChangeType$ Card.nonLand | ChangeNum$ 1 | IsCurse$ True | RememberChanged$ True | SubAbility$ DBEffect | StackDescription$ SpellDescription | SpellDescription$ Target opponent reveals his or her hand. You choose a nonland card from that player's graveyard or hand and exile it. You may cast that card for as long as it remains exiled, and you may spend mana as though it were mana of any color to cast that spell.
SVar:DBEffect:DB$ Effect | StaticAbilities$ STPlay | Triggers$ TriggerCastPI | SVars$ TrigRemoveSelf,ManaConversionPI | RememberObjects$ Remembered | Duration$ Permanent | SubAbility$ DBCleanup
SVar:STPlay:Mode$ Continuous | EffectZone$ Command | Affected$ Card.IsRemembered+OppOwn | AddSVar$ ManaConversionPI | AddHiddenKeyword$ May be played by your opponent & May spend mana as though it were mana of any color to cast CARDNAME | AffectedZone$ Exile | Description$ You may cast that card and you may spend mana as though it were mana of any color to cast it.
SVar:DBEffect:DB$ Effect | StaticAbilities$ STPlay | Triggers$ TriggerCastPI | SVars$ TrigRemoveSelf | RememberObjects$ Remembered | Duration$ Permanent | SubAbility$ DBCleanup
SVar:STPlay:Mode$ Continuous | EffectZone$ Command | Affected$ Card.IsRemembered+OppOwn | AddHiddenKeyword$ May be played by your opponent & May spend mana as though it were mana of any color to cast CARDNAME | AffectedZone$ Exile | Description$ You may cast that card and you may spend mana as though it were mana of any color to cast it.
SVar:TriggerCastPI:Mode$ SpellCast | ValidCard$ Card.IsRemembered | TriggerZones$ Command | Execute$ TrigRemoveSelf | Static$ True
SVar:TrigRemoveSelf:DB$ ChangeZone | Defined$ Self | Origin$ Command | Destination$ Exile
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:ManaConversionPI:SVar:ManaConversionMatrix:ManaColorConversion$ Additive | WhiteConversion$ All | BlueConversion$ All | BlackConversion$ All | RedConversion$ All | GreenConversion$ All | ColorlessConversion$ All
SVar:RemAIDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/psychic_intrusion.jpg
Oracle:Target opponent reveals his or her hand. You choose a nonland card from that player's graveyard or hand and exile it. You may cast that card for as long as it remains exiled, and you may spend mana as though it were mana of any color to cast that spell.

View File

@@ -20,9 +20,9 @@ package forge.player;
import com.google.common.collect.Iterables;
import forge.card.CardType;
import forge.card.MagicColor;
import forge.game.Game;
import forge.game.GameObject;
import forge.game.ability.AbilityFactory;
import forge.game.ability.AbilityUtils;
import forge.game.card.Card;
import forge.game.cost.CostPartMana;
@@ -40,7 +40,6 @@ import org.apache.commons.lang3.StringUtils;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* <p>
@@ -70,9 +69,8 @@ public class HumanPlaySpellAbility {
final Card c = this.ability.getHostCard();
boolean manaConversion = (ability.isSpell() && c.hasKeyword("May spend mana as though it were mana of any color to cast CARDNAME"));
Map<String, String> params = AbilityFactory.getMapParams(c.getSVar("ManaConversionMatrix"));
boolean playerManaConversion = human.hasManaConversion()
&& human.getController().confirmAction(ability, null, "Do you want to spend mana as though it were mana of any color to pay the cost?");
if (this.ability instanceof Spell && !c.isCopiedSpell()) {
fromZone = game.getZoneOf(c);
if (fromZone != null) {
@@ -85,7 +83,11 @@ public class HumanPlaySpellAbility {
game.getStack().freezeStack();
if (manaConversion) {
AbilityUtils.applyManaColorConversion(human, params);
AbilityUtils.applyManaColorConversion(human, MagicColor.Constant.ANY_MANA_CONVERSION);
}
if (playerManaConversion) {
AbilityUtils.applyManaColorConversion(human, MagicColor.Constant.ANY_MANA_CONVERSION);
human.incNumManaConversion();
}
// This line makes use of short-circuit evaluation of boolean values, that is each subsequent argument
// is only executed or evaluated if the first argument does not suffice to determine the value of the expression
@@ -108,6 +110,10 @@ public class HumanPlaySpellAbility {
if (manaConversion) {
manapool.restoreColorReplacements();
}
if (playerManaConversion) {
manapool.restoreColorReplacements();
human.decNumManaConversion();
}
return;
}