- Added Ink-Treader Nephilim and Precursor Golem

This commit is contained in:
swordshine
2013-05-25 01:42:41 +00:00
parent 55cf47e61e
commit 7aa04ec3f4
9 changed files with 83 additions and 5 deletions

2
.gitattributes vendored
View File

@@ -5365,6 +5365,7 @@ res/cardsfolder/i/initiates_of_the_ebon_hand.txt svneol=native#text/plain
res/cardsfolder/i/ink_dissolver.txt svneol=native#text/plain
res/cardsfolder/i/ink_eyes_servant_of_oni.txt svneol=native#text/plain
res/cardsfolder/i/ink_eyes_servant_of_oni_avatar.txt -text
res/cardsfolder/i/ink_treader_nephilim.txt -text
res/cardsfolder/i/inkfathom_divers.txt svneol=native#text/plain
res/cardsfolder/i/inkfathom_infiltrator.txt svneol=native#text/plain
res/cardsfolder/i/inkfathom_witch.txt -text svneol=unset#text/plain
@@ -8144,6 +8145,7 @@ res/cardsfolder/p/praetors_grasp.txt -text
res/cardsfolder/p/prahv_spires_of_order.txt -text
res/cardsfolder/p/precinct_captain.txt -text
res/cardsfolder/p/precognition.txt svneol=native#text/plain
res/cardsfolder/p/precursor_golem.txt -text
res/cardsfolder/p/predator_dragon.txt svneol=native#text/plain
res/cardsfolder/p/predator_flagship.txt svneol=native#text/plain
res/cardsfolder/p/predator_ooze.txt -text

View File

@@ -0,0 +1,8 @@
Name:Ink-Treader Nephilim
ManaCost:R G W U
Types:Creature Nephilim
PT:3/3
T:Mode$ SpellCast | ValidCard$ Instant,Sorcery | ValidActivatingPlayer$ Player | IsSingleTarget$ True | TargetsValid$ Card.Self | Execute$ TrigCopy | TriggerZones$ Battlefield | TriggerDescription$ Whenever a player casts an instant or sorcery spell, if that spell targets only CARDNAME, copy the spell for each other creature that spell could target. Each copy targets a different one of those creatures.
SVar:TrigCopy:AB$ CopySpellAbility | Cost$ 0 | Defined$ TriggeredSpellAbility | Controller$ You | CopyForEachCanTarget$ Creature
SVar:Picture:http://www.wizards.com/global/images/magic/general/ink_treader_nephilim.jpg
Oracle:Whenever a player casts an instant or sorcery spell, if that spell targets only Ink-Treader Nephilim, copy the spell for each other creature that spell could target. Each copy targets a different one of those creatures.

View File

@@ -0,0 +1,10 @@
Name:Precursor Golem
ManaCost:5
Types:Artifact Creature Golem
PT:3/3
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigToken | TriggerDescription$ When CARDNAME enters the battlefield, put two 3/3 colorless Golem artifact creature tokens onto the battlefield.
SVar:TrigToken:AB$ Token | Cost$ 0 | TokenAmount$ 2 | TokenName$ Golem | TokenTypes$ Artifact,Creature,Golem | TokenOwner$ You | TokenColors$ Colorless | TokenPower$ 3 | TokenToughness$ 3
T:Mode$ SpellCast | ValidCard$ Instant,Sorcery | ValidActivatingPlayer$ Player | IsSingleTarget$ True | TargetsValid$ Golem | Execute$ TrigCopy | TriggerZones$ Battlefield | TriggerDescription$ Whenever a player casts an instant or sorcery spell that targets only a single Golem, that player copies that spell for each other Golem that spell could target. Each copy targets a different one of those Golems.
SVar:TrigCopy:AB$ CopySpellAbility | Cost$ 0 | Defined$ TriggeredSpellAbility | Controller$ You | CopyForEachCanTarget$ Golem
SVar:Picture:http://www.wizards.com/global/images/magic/general/precursor_golem.jpg
Oracle:When Precursor Golem enters the battlefield, put two 3/3 colorless Golem artifact creature tokens onto the battlefield.\nWhenever a player casts an instant or sorcery spell that targets only a single Golem, that player copies that spell for each other Golem that spell could target. Each copy targets a different one of those Golems.

View File

@@ -5,6 +5,7 @@ import java.util.Iterator;
import java.util.List;
import forge.Card;
import forge.CardLists;
import forge.card.ability.AbilityUtils;
import forge.card.ability.SpellAbilityEffect;
import forge.card.cardfactory.CardFactory;
@@ -99,7 +100,35 @@ public class CopySpellAbilityEffect extends SpellAbilityEffect {
for (final SpellAbility chosenSAcopy : chosenSAs) {
chosenSAcopy.setActivatingPlayer(controller);
for (int i = 0; i < amount; i++) {
CardFactory.copySpellontoStack(card, chosenSAcopy.getSourceCard(), chosenSAcopy, true);
CardFactory.copySpellontoStack(card, chosenSAcopy.getSourceCard(), chosenSAcopy, true, null);
}
}
}
else if (sa.hasParam("CopyForEachCanTarget")) {
SpellAbility chosenSA = null;
if (tgtSpells.size() == 1 || sa.getActivatingPlayer().isComputer()) {
chosenSA = tgtSpells.get(0);
} else {
chosenSA = GuiChoose.one("Select a spell to copy", tgtSpells);
}
chosenSA.setActivatingPlayer(controller);
List<Object> candidates = chosenSA.getTarget().getAllCandidates(chosenSA, true);
if (sa.hasParam("CanTargetPlayer")) {// Radiate
for (Object o : candidates) {
CardFactory.copySpellontoStack(card, chosenSA.getSourceCard(), chosenSA, true, o);
}
} else {// Precursor Golem, Ink-Treader Nephilim
final String type = sa.getParam("CopyForEachCanTarget");
List<Card> valid = new ArrayList<Card>();
for (final Object o : candidates) {
if (o instanceof Card) {
valid.add((Card) o);
}
}
valid = CardLists.getValidCards(valid, type, chosenSA.getActivatingPlayer(),
chosenSA.getSourceCard());
for (Card c : valid) {
CardFactory.copySpellontoStack(card, chosenSA.getSourceCard(), chosenSA, true, c);
}
}
}
@@ -115,7 +144,7 @@ public class CopySpellAbilityEffect extends SpellAbilityEffect {
chosenSA.setActivatingPlayer(controller);
for (int i = 0; i < amount; i++) {
CardFactory.copySpellontoStack(card, chosenSA.getSourceCard(), chosenSA, true);
CardFactory.copySpellontoStack(card, chosenSA.getSourceCard(), chosenSA, true, null);
}
}
} // end resolve

View File

@@ -136,7 +136,7 @@ public class CardFactory {
* a boolean.
*/
public final static void copySpellontoStack(final Card source, final Card original, final SpellAbility sa,
final boolean bCopyDetails) {
final boolean bCopyDetails, final Object definedTarget) {
//Player originalController = original.getController();
Player controller = sa.getActivatingPlayer();
final Card c = copyCard(original);
@@ -186,7 +186,12 @@ public class CardFactory {
copySA.setCopied(true);
//remove all costs
copySA.setPayCosts(new Cost("", sa.isAbility()));
if (sa.getTarget() != null) {
if (definedTarget != null) {
Target target = new Target(c, null, "");
target.setDefinedTarget(definedTarget);
copySA.setTarget(target);
}
else if (sa.getTarget() != null) {
Target target = new Target(sa.getTarget());
target.setSourceCard(c);
copySA.setTarget(target);

View File

@@ -66,6 +66,7 @@ public class Target {
private boolean randomTarget = false;
private String definedController = null;
private String relatedProperty = null;
private Object definedTarget = null;
// How many can be targeted?
private String minTargets;
@@ -111,6 +112,7 @@ public class Target {
this.relatedProperty = target.getRelatedProperty();
this.singleTarget = target.isSingleTarget();
this.randomTarget = target.isRandomTarget();
this.definedTarget = target.getDefinedTarget();
this.choice = target.getTargetChoices();
}
@@ -906,6 +908,20 @@ public class Target {
this.relatedProperty = related;
}
/**
* @return the definedTarget
*/
public Object getDefinedTarget() {
return definedTarget;
}
/**
* @param defined the definedTarget to set
*/
public void setDefinedTarget(Object defined) {
this.definedTarget = defined;
}
/**
* @return the singleTarget
*/

View File

@@ -94,10 +94,13 @@ public class TargetSelection {
final boolean choiceResult;
final boolean random = tgt.isRandomTarget();
final Object defined = tgt.getDefinedTarget();
if (random) {
List<Object> candidates = tgt.getAllCandidates(this.ability, true);
Object choice = Aggregates.random(candidates);
return tgt.addTarget(choice);
} else if (defined != null) {
return tgt.addTarget(defined);
} else if (zone.size() == 1 && zone.get(0) == ZoneType.Stack) {
// If Zone is Stack, the choices are handled slightly differently.
// Handle everything inside function due to interaction with StackInstance

View File

@@ -163,6 +163,11 @@ public class TriggerSpellAbilityCast extends Trigger {
return false;
}
}
if (this.mapParams.containsKey("IsSingleTarget")) {
if (spellAbility.getTarget().getTargets().size() != 1) {
return false;
}
}
if (this.mapParams.containsKey("SpellSpeed")) {
if (this.mapParams.get("SpellSpeed").equals("NotSorcerySpeed")) {

View File

@@ -442,7 +442,7 @@ public class MagicStack extends MyObservable implements Iterable<SpellAbilitySta
this.run();
} else {
for (int i = 0; i < sp.getSourceCard().getReplicateMagnitude(); i++) {
CardFactory.copySpellontoStack(sp.getSourceCard(), sp.getSourceCard(), sp, false);
CardFactory.copySpellontoStack(sp.getSourceCard(), sp.getSourceCard(), sp, false, null);
}
}
}