mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
- experimental fix of ChangeZoneEffect.changeKnownOriginResolve and SacrificeEffect
- Added Traveling Plague
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -11768,6 +11768,7 @@ res/cardsfolder/t/traumatize.txt svneol=native#text/plain
|
|||||||
res/cardsfolder/t/travel_preparations.txt -text
|
res/cardsfolder/t/travel_preparations.txt -text
|
||||||
res/cardsfolder/t/travelers_amulet.txt -text
|
res/cardsfolder/t/travelers_amulet.txt -text
|
||||||
res/cardsfolder/t/travelers_cloak.txt -text
|
res/cardsfolder/t/travelers_cloak.txt -text
|
||||||
|
res/cardsfolder/t/traveling_plague.txt -text
|
||||||
res/cardsfolder/t/treacherous_link.txt svneol=native#text/plain
|
res/cardsfolder/t/treacherous_link.txt svneol=native#text/plain
|
||||||
res/cardsfolder/t/treacherous_pit_dweller.txt -text
|
res/cardsfolder/t/treacherous_pit_dweller.txt -text
|
||||||
res/cardsfolder/t/treacherous_urge.txt svneol=native#text/plain
|
res/cardsfolder/t/treacherous_urge.txt svneol=native#text/plain
|
||||||
|
|||||||
14
res/cardsfolder/t/traveling_plague.txt
Normal file
14
res/cardsfolder/t/traveling_plague.txt
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
Name:Traveling Plague
|
||||||
|
ManaCost:3 B B
|
||||||
|
Types:Enchantment Aura
|
||||||
|
K:Enchant creature
|
||||||
|
A:SP$ Attach | Cost$ 3 B B | ValidTgts$ Creature | AILogic$ Curse
|
||||||
|
T:Mode$ Phase | Phase$ Upkeep | TriggerZones$ Battlefield | Execute$ TrigPutCounter | TriggerDescription$ At the beginning of each upkeep, put a plague counter on CARDNAME.
|
||||||
|
SVar:TrigPutCounter:AB$ PutCounter | Cost$ 0 | Defined$ Self | CounterType$ PLAGUE | CounterNum$ 1
|
||||||
|
S:Mode$ Continuous | Affected$ Creature.EnchantedBy | AddPower$ X | AddToughness$ X | References$ X | Description$ Enchanted creature gets -1/-1 for each plague counter on CARDNAME.
|
||||||
|
SVar:X:Count$CardCounters.PLAGUE/Times.-1
|
||||||
|
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | ValidCard$ Card.EnchantedBy | TriggerController$ TriggeredCardController | Execute$ TrigChoose | TriggerDescription$ When enchanted creature leaves the battlefield, that creature's controller returns CARDNAME from its owner's graveyard to the battlefield.
|
||||||
|
SVar:TrigChoose:AB$ ChooseCard | Cost$ 0 | Choices$ Creature | AILogic$ OppPreferred | Defined$ TriggeredCardController | Mandatory$ True | SubAbility$ DBChangeZone
|
||||||
|
SVar:DBChangeZone:DB$ ChangeZone | Defined$ Self | Origin$ Graveyard | Destination$ Battlefield | AttachedTo$ ChosenCard
|
||||||
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/traveling_plague.jpg
|
||||||
|
Oracle:Enchant creature\nAt the beginning of each upkeep, put a plague counter on Traveling Plague.\nEnchanted creature gets -1/-1 for each plague counter on Traveling Plague.\nWhen enchanted creature leaves the battlefield, that creature's controller returns Traveling Plague from its owner's graveyard to the battlefield.
|
||||||
@@ -407,7 +407,7 @@ public class ChangeZoneEffect extends SpellAbilityEffect {
|
|||||||
boolean optional = sa.hasParam("Optional");
|
boolean optional = sa.hasParam("Optional");
|
||||||
|
|
||||||
|
|
||||||
for (final Card tgtC : tgtCards) {
|
for (Card tgtC : tgtCards) {
|
||||||
if (tgt != null && tgtC.isInPlay() && !tgtC.canBeTargetedBy(sa)) {
|
if (tgt != null && tgtC.isInPlay() && !tgtC.canBeTargetedBy(sa)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -419,6 +419,7 @@ public class ChangeZoneEffect extends SpellAbilityEffect {
|
|||||||
if (optional && false == player.getController().confirmAction(sa, null, prompt) )
|
if (optional && false == player.getController().confirmAction(sa, null, prompt) )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
tgtC = game.getCardState(tgtC);
|
||||||
final Zone originZone = game.getZoneOf(tgtC);
|
final Zone originZone = game.getZoneOf(tgtC);
|
||||||
|
|
||||||
// if Target isn't in the expected Zone, continue
|
// if Target isn't in the expected Zone, continue
|
||||||
|
|||||||
@@ -20,9 +20,9 @@ public class SacrificeEffect extends SpellAbilityEffect {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void resolve(SpellAbility sa) {
|
public void resolve(SpellAbility sa) {
|
||||||
final Card card = sa.getSourceCard();
|
|
||||||
final Player activator = sa.getActivatingPlayer();
|
final Player activator = sa.getActivatingPlayer();
|
||||||
final Game game = activator.getGame();
|
final Game game = activator.getGame();
|
||||||
|
final Card card = game.getCardState(sa.getSourceCard());
|
||||||
|
|
||||||
// Expand Sacrifice keyword here depending on what we need out of it.
|
// Expand Sacrifice keyword here depending on what we need out of it.
|
||||||
final String num = sa.hasParam("Amount") ? sa.getParam("Amount") : "1";
|
final String num = sa.hasParam("Amount") ? sa.getParam("Amount") : "1";
|
||||||
|
|||||||
Reference in New Issue
Block a user