- Plane: Added Jund

- Converted Maelstrom Nexus to script
This commit is contained in:
swordshine
2013-08-04 06:33:19 +00:00
parent 759a9bed7a
commit d34e40ea29
6 changed files with 51 additions and 9 deletions

1
.gitattributes vendored
View File

@@ -5733,6 +5733,7 @@ res/cardsfolder/j/juggernaut.txt svneol=native#text/plain
res/cardsfolder/j/juju_bubble.txt svneol=native#text/plain res/cardsfolder/j/juju_bubble.txt svneol=native#text/plain
res/cardsfolder/j/jukai_messenger.txt svneol=native#text/plain res/cardsfolder/j/jukai_messenger.txt svneol=native#text/plain
res/cardsfolder/j/jump.txt svneol=native#text/plain res/cardsfolder/j/jump.txt svneol=native#text/plain
res/cardsfolder/j/jund.txt -text
res/cardsfolder/j/jund_battlemage.txt svneol=native#text/plain res/cardsfolder/j/jund_battlemage.txt svneol=native#text/plain
res/cardsfolder/j/jund_charm.txt svneol=native#text/plain res/cardsfolder/j/jund_charm.txt svneol=native#text/plain
res/cardsfolder/j/jund_hackblade.txt svneol=native#text/plain res/cardsfolder/j/jund_hackblade.txt svneol=native#text/plain

View File

@@ -0,0 +1,16 @@
Name:Jund
ManaCost:no cost
Types:Plane Alara
T:Mode$ SpellCast | ValidCard$ Creature.Black,Creature.Red,Creature.Green | ValidActivatingPlayer$ Player | TriggerZones$ Command | Execute$ DevourPump | TriggerDescription$ Whenever a player casts a black, red, or green creature spell, it gains devour 5. (As the creature enters the battlefield, its controller may sacrifice any number of creatures. The creature enters the battlefield with five times that many +1/+1 counters on it.)
SVar:DevourPump:AB$ Animate | Cost$ 0 | Defined$ TriggeredCard | Replacements$ etbDevour | sVars$ JundETB,JundSac,JundSacX,JundRememberedX,JundCounters,JundCleanup | Permanent$ True
SVar:etbDevour:Event$ Moved | ValidCard$ Card.Self | Destination$ Battlefield | ReplaceWith$ JundETB | Description$ Devour 5 (As the creature enters the battlefield, its controller may sacrifice any number of creatures. The creature enters the battlefield with five times that many +1/+1 counters on it.)
SVar:JundSac:DB$ Sacrifice | Defined$ You | Amount$ JundSacX | References$ JundSacX | SacValid$ Creature.Other | RememberSacrificed$ True | SacMessage$ another creature (Devour 5) | Optional$ True | Devour$ True | SubAbility$ JundCounters
SVar:JundETB:AB$ ChangeZone | Cost$ 0 | Hidden$ True | Origin$ All | Destination$ Battlefield | Defined$ ReplacedCard | SubAbility$ JundSac
SVar:JundSacX:Count$Valid Creature.YouCtrl+Other
SVar:JundCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:JundRememberedX:Count$RememberedSize/Times.5
SVar:JundCounters:DB$ PutCounter | Defined$ Self | CounterType$ P1P1 | CounterNum$ JundRememberedX | References$ JundRememberedX | SubAbility$ JundCleanup
T:Mode$ PlanarDice | Result$ Chaos | TriggerZones$ Command | Execute$ RolledChaos | TriggerDescription$ Whenever you roll Chaos, put two 1/1 red Goblin creature tokens onto the battlefield.
SVar:RolledChaos:AB$ Token | Cost$ 0 | TokenAmount$ 2 | TokenPower$ 1 | TokenName$ Goblin | TokenToughness$ 1 | TokenColors$ Red | TokenTypes$ Creature,Goblin | TokenOwner$ You
SVar:Picture:http://www.wizards.com/global/images/magic/general/jund.jpg
Oracle:Whenever a player casts a black, red, or green creature spell, it gains devour 5. (As the creature enters the battlefield, its controller may sacrifice any number of creatures. The creature enters the battlefield with five times that many +1/+1 counters on it.)\nWhenever you roll {C}, put two 1/1 red Goblin creature tokens onto the battlefield.

View File

@@ -1,6 +1,12 @@
Name:Maelstrom Nexus Name:Maelstrom Nexus
ManaCost:W U B R G ManaCost:W U B R G
Types:Enchantment Types:Enchantment
Text:The first spell you cast each turn has cascade. T:Mode$ SpellCast | ValidCard$ Card.YouCtrl | CheckSVar$ Y | SVarCompare$ EQ1 | TriggerZones$ Battlefield | Execute$ MaelstromCascade | Secondary$ True | TriggerDescription$ The first spell you cast each turn has cascade. (When you cast your first spell, exile cards from the top of your library until you exile a nonland card that costs less. You may cast it without paying its mana cost. Put the exiled cards on the bottom in a random order.)
SVar:MaelstromCascade:AB$ DigUntil | Cost$ 0 | Defined$ You | Amount$ 1 | Valid$ Card.nonLand+cmcLTX | FoundDestination$ Exile | RevealedDestination$ Exile | References$ X | ImprintRevealed$ True | RememberFound$ True | SubAbility$ DBCast
SVar:DBCast:DB$ Play | Defined$ Remembered | WithoutManaCost$ True | Optional$ True | SubAbility$ DBMoveToLib
SVar:DBMoveToLib:DB$ ChangeZoneAll | ChangeType$ Card.IsRemembered,Card.IsImprinted | Origin$ Exile | Destination$ Library | RandomOrder$ True | LibraryPosition$ -1 | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True | ClearImprinted$ True
SVar:X:Count$TriggeredCardManaCost
SVar:Y:Count$ThisTurnCast_Card.YouCtrl
SVar:Picture:http://www.wizards.com/global/images/magic/general/maelstrom_nexus.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/maelstrom_nexus.jpg
Oracle:The first spell you cast each turn has cascade. (When you cast your first spell, exile cards from the top of your library until you exile a nonland card that costs less. You may cast it without paying its mana cost. Put the exiled cards on the bottom in a random order.) Oracle:The first spell you cast each turn has cascade. (When you cast your first spell, exile cards from the top of your library until you exile a nonland card that costs less. You may cast it without paying its mana cost. Put the exiled cards on the bottom in a random order.)

View File

@@ -3,6 +3,7 @@ ManaCost:3 R G
Types:Legendary Creature Hellion Types:Legendary Creature Hellion
PT:0/0 PT:0/0
K:Devour:X:, where X is the number of creatures devoured this way K:Devour:X:, where X is the number of creatures devoured this way
SVar:X:Count$Devoured Creature SVar:X:Count$RememberedSize
# Change the script in order to be compatible with Jund, each Devour ability will remember the sacrificed card separately. Remembered$Amount doesn't work
SVar:Picture:http://www.wizards.com/global/images/magic/general/thromok_the_insatiable.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/thromok_the_insatiable.jpg
Oracle:Devour X, where X is the number of creatures devoured this way (As this enters the battlefield, you may sacrifice any number of creatures. This creature enters the battlefield with X +1/+1 counters on it for each of those creatures.) Oracle:Devour X, where X is the number of creatures devoured this way (As this enters the battlefield, you may sacrifice any number of creatures. This creature enters the battlefield with X +1/+1 counters on it for each of those creatures.)

View File

@@ -1,5 +1,6 @@
package forge.card.ability.effects; package forge.card.ability.effects;
import java.util.HashMap;
import java.util.List; import java.util.List;
import forge.Card; import forge.Card;
@@ -9,6 +10,7 @@ import forge.CardUtil;
import forge.card.ability.AbilityUtils; import forge.card.ability.AbilityUtils;
import forge.card.ability.SpellAbilityEffect; import forge.card.ability.SpellAbilityEffect;
import forge.card.spellability.SpellAbility; import forge.card.spellability.SpellAbility;
import forge.card.trigger.TriggerType;
import forge.game.Game; import forge.game.Game;
import forge.game.player.Player; import forge.game.player.Player;
import forge.game.zone.ZoneType; import forge.game.zone.ZoneType;
@@ -26,6 +28,7 @@ public class SacrificeEffect extends SpellAbilityEffect {
final String num = sa.hasParam("Amount") ? sa.getParam("Amount") : "1"; final String num = sa.hasParam("Amount") ? sa.getParam("Amount") : "1";
final int amount = AbilityUtils.calculateAmount(card, num, sa); final int amount = AbilityUtils.calculateAmount(card, num, sa);
final List<Player> tgts = getTargetPlayers(sa); final List<Player> tgts = getTargetPlayers(sa);
final boolean devour = sa.hasParam("Devour");
String valid = sa.getParam("SacValid"); String valid = sa.getParam("SacValid");
if (valid == null) { if (valid == null) {
@@ -37,8 +40,6 @@ public class SacrificeEffect extends SpellAbilityEffect {
msg = valid; msg = valid;
} }
msg = "Sacrifice a " + msg;
final boolean destroy = sa.hasParam("Destroy"); final boolean destroy = sa.hasParam("Destroy");
final boolean remSacrificed = sa.hasParam("RememberSacrificed"); final boolean remSacrificed = sa.hasParam("RememberSacrificed");
@@ -63,15 +64,21 @@ public class SacrificeEffect extends SpellAbilityEffect {
} else { } else {
boolean isOptional = sa.hasParam("Optional"); boolean isOptional = sa.hasParam("Optional");
choosenToSacrifice = destroy ? choosenToSacrifice = destroy ?
p.getController().choosePermanentsToDestroy(sa, isOptional ? 0 : amount, amount, validTargets, valid) : p.getController().choosePermanentsToDestroy(sa, isOptional ? 0 : amount, amount, validTargets, msg) :
p.getController().choosePermanentsToSacrifice(sa, isOptional ? 0 : amount, amount, validTargets, valid); p.getController().choosePermanentsToSacrifice(sa, isOptional ? 0 : amount, amount, validTargets, msg);
} }
for(Card sac : choosenToSacrifice) { for(Card sac : choosenToSacrifice) {
final Card lKICopy = CardUtil.getLKICopy(sac); final Card lKICopy = CardUtil.getLKICopy(sac);
boolean wasSacrificed = !destroy && game.getAction().sacrifice(sac, sa); boolean wasSacrificed = !destroy && game.getAction().sacrifice(sac, sa);
boolean wasDestroyed = destroy && game.getAction().destroy(sac, sa); boolean wasDestroyed = destroy && game.getAction().destroy(sac, sa);
// Run Devour Trigger
if (devour) {
card.addDevoured(lKICopy);
final HashMap<String, Object> runParams = new HashMap<String, Object>();
runParams.put("Devoured", sac);
game.getTriggerHandler().runTrigger(TriggerType.Devoured, runParams, false);
}
if ( remSacrificed && (wasDestroyed || wasSacrificed) ) { if ( remSacrificed && (wasDestroyed || wasSacrificed) ) {
card.addRemembered(lKICopy); card.addRemembered(lKICopy);
} }

View File

@@ -674,13 +674,24 @@ public class ComputerUtil {
*/ */
public static List<Card> choosePermanentsToSacrifice(final Player ai, final List<Card> cardlist, final int amount, SpellAbility source, public static List<Card> choosePermanentsToSacrifice(final Player ai, final List<Card> cardlist, final int amount, SpellAbility source,
final boolean destroy, final boolean isOptional) { final boolean destroy, final boolean isOptional) {
final List<Card> remaining = new ArrayList<Card>(cardlist); List<Card> remaining = new ArrayList<Card>(cardlist);
final List<Card> sacrificed = new ArrayList<Card>(); final List<Card> sacrificed = new ArrayList<Card>();
if (isOptional && source.getActivatingPlayer().isOpponentOf(ai)) { if (isOptional && source.getActivatingPlayer().isOpponentOf(ai)) {
return sacrificed; // sacrifice none return sacrificed; // sacrifice none
} }
if (isOptional && source.hasParam("Devour")) {
remaining = CardLists.filter(remaining, new Predicate<Card>() {
@Override
public boolean apply(final Card c) {
if ((c.getCMC() <= 1 && c.getNetAttack() < 3)
|| c.getNetAttack() + c.getNetDefense() <= 3) {
return true;
}
return false;
}
});
}
CardLists.sortByCmcDesc(remaining); CardLists.sortByCmcDesc(remaining);
Collections.reverse(remaining); Collections.reverse(remaining);