- Added Possibility Storm and Rhystic Lightning

This commit is contained in:
swordshine
2013-04-30 05:53:44 +00:00
parent f79184a9d5
commit 94fc6239e1
6 changed files with 45 additions and 5 deletions

2
.gitattributes vendored
View File

@@ -8077,6 +8077,7 @@ res/cardsfolder/p/possessed_barbarian.txt svneol=native#text/plain
res/cardsfolder/p/possessed_centaur.txt svneol=native#text/plain
res/cardsfolder/p/possessed_nomad.txt svneol=native#text/plain
res/cardsfolder/p/possessed_portal.txt -text
res/cardsfolder/p/possibility_storm.txt -text
res/cardsfolder/p/postmortem_lunge.txt svneol=native#text/plain
res/cardsfolder/p/poultice_sliver.txt svneol=native#text/plain
res/cardsfolder/p/pouncing_jaguar.txt svneol=native#text/plain
@@ -8769,6 +8770,7 @@ res/cardsfolder/r/rhys_the_redeemed.txt svneol=native#text/plain
res/cardsfolder/r/rhystic_cave.txt -text
res/cardsfolder/r/rhystic_circle.txt -text
res/cardsfolder/r/rhystic_deluge.txt svneol=native#text/plain
res/cardsfolder/r/rhystic_lightning.txt -text
res/cardsfolder/r/rhystic_scrying.txt -text
res/cardsfolder/r/rhystic_shield.txt -text
res/cardsfolder/r/rhystic_study.txt svneol=native#text/plain

View File

@@ -0,0 +1,12 @@
Name:Possibility Storm
ManaCost:3 R R
Types:Enchantment
T:Mode$ SpellCast | ValidCard$ Card.wasCastFromHand | Execute$ TrigExileSpell | TriggerZones$ Battlefield | TriggerDescription$ Whenever a player casts a spell from his or her hand, that player exiles it, then exiles cards from the top of his or her library until he or she exiles a card that shares a card type with it. That player may cast that card without paying its mana cost. Then he or she puts all cards exiled with CARDNAME on the bottom of his or her library in a random order.
SVar:TrigExileSpell:AB$ ChangeZone | Cost$ 0 | Defined$ TriggeredCard | Origin$ Stack | Destination$ Exile | Fizzle$ True | SubAbility$ DBDig | Imprint$ True
SVar:DBDig:DB$ DigUntil | Defined$ TriggeredCardController | Valid$ Card.sharesTypeWith FirstImprinted | ValidDescription$ shares a card type with exiled card | FoundDestination$ Exile | RevealedDestination$ Exile | RememberFound$ True | ImprintRevealed$ True | SubAbility$ DBPlay
SVar:DBPlay:DB$ Play | Defined$ Remembered | Controller$ RememberedController | WithoutManaCost$ True | Optional$ True | SubAbility$ DBChangeZone
SVar:DBChangeZone:DB$ ChangeZoneAll | Origin$ Exile | ChangeType$ Card.IsRemembered,Card.IsImprinted | Destination$ Library | LibraryPosition$ -1 | RandomOrder$ True | SubAbility$ DBPossibilityCleanup
SVar:DBPossibilityCleanup:DB$ Cleanup | ClearRemembered$ True | ClearImprinted$ True
SVar:Picture:http://www.wizards.com/global/images/magic/general/possibility_storm.jpg
Oracle:Whenever a player casts a spell from his or her hand, that player exiles it, then exiles cards from the top of his or her library until he or she exiles a card that shares a card type with it. That player may cast that card without paying its mana cost. Then he or she puts all cards exiled with Possibility Storm on the bottom of his or her library in a random order.
SetInfo:DGM Rare

View File

@@ -0,0 +1,13 @@
Name:Rhystic Lightning
ManaCost:2 R
Types:Instant
A:SP$ StoreSVar | Cost$ 2 R | SVar$ RhysticPaid | Type$ Number | Expression$ 0 | UnlessPayer$ Targeted | UnlessCost$ 2 | ValidTgts$ Creature,Player | TgtPrompt$ Select target creature or player | ConditionDefined$ Targeted | ConditionPresent$ Creature | ConditionCompare$ EQ0 | SubAbility$ DBStore2 | SpellDescription$ CARDNAME deals 4 damage to target creature or player unless that creature's controller or that player pays 2. If he or she does, CARDNAME deals 2 damage to the creature or player.
SVar:DBStore2:DB$ StoreSVar | SVar$ RhysticPaid | Type$ Number | Expression$ 0 | UnlessPayer$ TargetedController | UnlessCost$ 2 | ConditionDefined$ Targeted | ConditionPresent$ Creature | ConditionCompare$ GE1 | SubAbility$ DBDmg
SVar:DBDmg:DB$ DealDamage | Defined$ Targeted | NumDmg$ X | References$ X,RhysticPaid | SubAbility$ DBReset
SVar:DBReset:DB$ StoreSVar | SVar$ RhysticPaid | Type$ Number | Expression$ 1
SVar:RhysticPaid:Number$1
SVar:X:Count$Compare RhysticPaid EQ1.2.4
SVar:RemAIDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/rhystic_lightning.jpg
Oracle:Rhystic Lightning deals 4 damage to target creature or player unless that creature's controller or that player pays {2}. If he or she does, Rhystic Lightning deals 2 damage to the creature or player.
SetInfo:PCY Common

View File

@@ -5536,11 +5536,10 @@ public class Card extends GameEntity implements Comparable<Card> {
}
}
} else if (property.substring(10).equals("Enchanted")) {
for (final Card card : source.getEnchantedBy()) {
if (!this.equippedBy.contains(card)) {
if (source.getEnchantingCard() == null ||
!this.equippedBy.contains(source.getEnchantingCard())) {
return false;
}
}
} else {
if (!this.equippedBy.contains(source)) {
return false;

View File

@@ -1,7 +1,9 @@
package forge.card.ability.effects;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Random;
import com.google.common.collect.Iterables;
@@ -15,6 +17,7 @@ import forge.game.GameState;
import forge.game.player.Player;
import forge.game.zone.ZoneType;
import forge.gui.GuiChoose;
import forge.util.MyRandom;
public class ChangeZoneAllEffect extends SpellAbilityEffect {
@@ -59,14 +62,20 @@ public class ChangeZoneAllEffect extends SpellAbilityEffect {
final String remember = sa.getParam("RememberChanged");
final String forget = sa.getParam("ForgetChanged");
final String imprint = sa.getParam("Imprint");
final boolean random = sa.hasParam("RandomOrder");
final int libraryPos = sa.hasParam("LibraryPosition") ? Integer.parseInt(sa.getParam("LibraryPosition")) : 0;
if (sa.getActivatingPlayer().isHuman() && destination.equals(ZoneType.Library) && !sa.hasParam("Shuffle")
&& cards.size() >= 2) {
&& cards.size() >= 2 && !random) {
cards = GuiChoose.order("Choose order of cards to put into the library", "Put first", 0, cards, null, null);
}
if (destination.equals(ZoneType.Library) && random) {
final Random ran = MyRandom.getRandom();
Collections.shuffle(cards, ran);
}
for (final Card c : cards) {
if (destination.equals(ZoneType.Battlefield)) {
// Auras without Candidates stay in their current location

View File

@@ -148,6 +148,11 @@ public class DigUntilEffect extends SpellAbilityEffect {
host.addRemembered(c);
}
}
if (sa.hasParam("ImprintRevealed")) {
for (final Card c : revealed) {
host.addImprinted(c);
}
}
// TODO Use getOrderChoices before this moveTo call for the Human
final Iterator<Card> itr = revealed.iterator();