- Added the static effect "CantPlayLand".

- Added Solfatara and Turf Wound.
This commit is contained in:
Sloth
2011-11-20 18:49:41 +00:00
parent d438810d6f
commit 4b1a8b2afa
7 changed files with 71 additions and 1 deletions

2
.gitattributes vendored
View File

@@ -7694,6 +7694,7 @@ res/cardsfolder/s/soldier_of_fortune.txt svneol=native#text/plain
res/cardsfolder/s/soldier_replica.txt svneol=native#text/plain res/cardsfolder/s/soldier_replica.txt svneol=native#text/plain
res/cardsfolder/s/solemn_offering.txt svneol=native#text/plain res/cardsfolder/s/solemn_offering.txt svneol=native#text/plain
res/cardsfolder/s/solemn_simulacrum.txt svneol=native#text/plain res/cardsfolder/s/solemn_simulacrum.txt svneol=native#text/plain
res/cardsfolder/s/solfatara.txt -text
res/cardsfolder/s/solidarity.txt svneol=native#text/plain res/cardsfolder/s/solidarity.txt svneol=native#text/plain
res/cardsfolder/s/soliton.txt svneol=native#text/plain res/cardsfolder/s/soliton.txt svneol=native#text/plain
res/cardsfolder/s/solkanar_the_swamp_king.txt svneol=native#text/plain res/cardsfolder/s/solkanar_the_swamp_king.txt svneol=native#text/plain
@@ -8838,6 +8839,7 @@ res/cardsfolder/t/tundra_wolves.txt svneol=native#text/plain
res/cardsfolder/t/tunnel.txt svneol=native#text/plain res/cardsfolder/t/tunnel.txt svneol=native#text/plain
res/cardsfolder/t/tunneler_wurm.txt svneol=native#text/plain res/cardsfolder/t/tunneler_wurm.txt svneol=native#text/plain
res/cardsfolder/t/turbulent_dreams.txt -text res/cardsfolder/t/turbulent_dreams.txt -text
res/cardsfolder/t/turf_wound.txt -text
res/cardsfolder/t/turn_aside.txt svneol=native#text/plain res/cardsfolder/t/turn_aside.txt svneol=native#text/plain
res/cardsfolder/t/turn_the_tide.txt svneol=native#text/plain res/cardsfolder/t/turn_the_tide.txt svneol=native#text/plain
res/cardsfolder/t/turn_to_dust.txt svneol=native#text/plain res/cardsfolder/t/turn_to_dust.txt svneol=native#text/plain

View File

@@ -2,7 +2,7 @@ Name:Cease-Fire
ManaCost:2 W ManaCost:2 W
Types:Instant Types:Instant
Text:no text Text:no text
A:SP$ Effect | Cost$ 2 W | ValidTgts$ Player | Name$ Abeyance Effect | StaticAbilities$ STCantBeCast | RememberObjects$ Targeted | AILogic$ BeginningOfOppTurn | SubAbility$ DBDraw | SpellDescription$ Target player can't cast creature spells this turn. A:SP$ Effect | Cost$ 2 W | ValidTgts$ Player | Name$ Cease-Fire Effect | StaticAbilities$ STCantBeCast | RememberObjects$ Targeted | AILogic$ BeginningOfOppTurn | SubAbility$ DBDraw | SpellDescription$ Target player can't cast creature spells this turn.
SVar:STCantBeCast:Mode$ CantBeCast | ValidCard$ Creature | Caster$ Player.IsRemembered | Description$ Target player can't cast creature spells this turn. SVar:STCantBeCast:Mode$ CantBeCast | ValidCard$ Creature | Caster$ Player.IsRemembered | Description$ Target player can't cast creature spells this turn.
SVar:DBDraw:DB$Draw | NumCards$ 1 | SpellDescription$ Draw a card. SVar:DBDraw:DB$Draw | NumCards$ 1 | SpellDescription$ Draw a card.
SVar:Rarity:Common SVar:Rarity:Common

View File

@@ -0,0 +1,12 @@
Name:Solfatara
ManaCost:2 R
Types:Instant
Text:no text
A:SP$ Effect | Cost$ 2 R | ValidTgts$ Player | Name$ Solfatara Effect | StaticAbilities$ STCantPlayLand | RememberObjects$ Targeted | AILogic$ BeginningOfOppTurn | SubAbility$ DBDraw | SpellDescription$ Target player can't play land cards this turn.
SVar:STCantPlayLand:Mode$ CantPlayLand | Player$ Player.IsRemembered | Description$ Target player can't play land cards this turn.
SVar:DBDraw:DB$Draw | NumCards$ 1 | NextUpkeep$ True | SpellDescription$ Draw a card at the beginning of the next upkeep.
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/solfatara.jpg
SetInfo:VIS|Common|http://magiccards.info/scans/en/vi/93.jpg
Oracle:Target player can't play land cards this turn.\nDraw a card at the beginning of the next turn's upkeep.
End

View File

@@ -0,0 +1,12 @@
Name:Turf Wound
ManaCost:2 R
Types:Instant
Text:no text
A:SP$ Effect | Cost$ 2 R | ValidTgts$ Player | Name$ Turf Wound Effect | StaticAbilities$ STCantPlayLand | RememberObjects$ Targeted | AILogic$ BeginningOfOppTurn | SubAbility$ DBDraw | SpellDescription$ Target player can't play land cards this turn.
SVar:STCantPlayLand:Mode$ CantPlayLand | Player$ Player.IsRemembered | Description$ Target player can't play land cards this turn.
SVar:DBDraw:DB$Draw | NumCards$ 1 | SpellDescription$ Draw a card.
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/turf_wound.jpg
SetInfo:INV|Common|http://magiccards.info/scans/en/in/177.jpg
Oracle:Target player can't play land cards this turn.\nDraw a card.
End

View File

@@ -1664,6 +1664,18 @@ public abstract class Player extends GameEntity {
* @return a boolean. * @return a boolean.
*/ */
public final boolean canPlayLand() { public final boolean canPlayLand() {
// CantBeCast static abilities
final CardList allp = AllZoneUtil.getCardsIn(Zone.Battlefield);
for (final Card ca : allp) {
final ArrayList<StaticAbility> staticAbilities = ca.getStaticAbilities();
for (final StaticAbility stAb : staticAbilities) {
if (stAb.applyAbility("CantPlayLand", null, this)) {
return false;
}
}
}
return Phase.canCastSorcery(this) return Phase.canCastSorcery(this)
&& (numLandsPlayed < maxLandsToPlay || getCardsIn(Zone.Battlefield, "Fastbond").size() > 0); && (numLandsPlayed < maxLandsToPlay || getCardsIn(Zone.Battlefield, "Fastbond").size() > 0);
} }

View File

@@ -282,6 +282,10 @@ public class StaticAbility {
if (mode.equals("CantBeCast")) { if (mode.equals("CantBeCast")) {
return StaticAbilityCantBeCast.applyCantBeCastAbility(this, card, activator); return StaticAbilityCantBeCast.applyCantBeCastAbility(this, card, activator);
} }
if (mode.equals("CantPlayLand")) {
return StaticAbilityCantBeCast.applyCantPlayLandAbility(this, card, activator);
}
return false; return false;
} }

View File

@@ -77,5 +77,33 @@ public class StaticAbilityCantBeCast {
return true; return true;
} }
/**
* TODO Write javadoc for this method.
*
* @param stAb
* a StaticAbility
* @param card
* the card
* @param activator
* the activator
* @return true, if successful
*/
public static boolean applyCantPlayLandAbility(final StaticAbility stAb, final Card card, final Player player) {
final HashMap<String, String> params = stAb.getMapParams();
final Card hostCard = stAb.getHostCard();
if (params.containsKey("ValidCard") && card != null
&& !card.isValid(params.get("ValidCard").split(","), hostCard.getController(), hostCard)) {
return false;
}
if (params.containsKey("Player") && (player != null)
&& !player.isValid(params.get("Player"), hostCard.getController(), hostCard)) {
return false;
}
return true;
}
} }