mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 18:58:00 +00:00
- Added Ink-Treader Nephilim and Precursor Golem
This commit is contained in:
2
.gitattributes
vendored
2
.gitattributes
vendored
@@ -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_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.txt svneol=native#text/plain
|
||||||
res/cardsfolder/i/ink_eyes_servant_of_oni_avatar.txt -text
|
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_divers.txt svneol=native#text/plain
|
||||||
res/cardsfolder/i/inkfathom_infiltrator.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
|
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/prahv_spires_of_order.txt -text
|
||||||
res/cardsfolder/p/precinct_captain.txt -text
|
res/cardsfolder/p/precinct_captain.txt -text
|
||||||
res/cardsfolder/p/precognition.txt svneol=native#text/plain
|
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_dragon.txt svneol=native#text/plain
|
||||||
res/cardsfolder/p/predator_flagship.txt svneol=native#text/plain
|
res/cardsfolder/p/predator_flagship.txt svneol=native#text/plain
|
||||||
res/cardsfolder/p/predator_ooze.txt -text
|
res/cardsfolder/p/predator_ooze.txt -text
|
||||||
|
|||||||
8
res/cardsfolder/i/ink_treader_nephilim.txt
Normal file
8
res/cardsfolder/i/ink_treader_nephilim.txt
Normal 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.
|
||||||
10
res/cardsfolder/p/precursor_golem.txt
Normal file
10
res/cardsfolder/p/precursor_golem.txt
Normal 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.
|
||||||
@@ -5,6 +5,7 @@ import java.util.Iterator;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import forge.Card;
|
import forge.Card;
|
||||||
|
import forge.CardLists;
|
||||||
import forge.card.ability.AbilityUtils;
|
import forge.card.ability.AbilityUtils;
|
||||||
import forge.card.ability.SpellAbilityEffect;
|
import forge.card.ability.SpellAbilityEffect;
|
||||||
import forge.card.cardfactory.CardFactory;
|
import forge.card.cardfactory.CardFactory;
|
||||||
@@ -99,7 +100,35 @@ public class CopySpellAbilityEffect extends SpellAbilityEffect {
|
|||||||
for (final SpellAbility chosenSAcopy : chosenSAs) {
|
for (final SpellAbility chosenSAcopy : chosenSAs) {
|
||||||
chosenSAcopy.setActivatingPlayer(controller);
|
chosenSAcopy.setActivatingPlayer(controller);
|
||||||
for (int i = 0; i < amount; i++) {
|
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);
|
chosenSA.setActivatingPlayer(controller);
|
||||||
for (int i = 0; i < amount; i++) {
|
for (int i = 0; i < amount; i++) {
|
||||||
CardFactory.copySpellontoStack(card, chosenSA.getSourceCard(), chosenSA, true);
|
CardFactory.copySpellontoStack(card, chosenSA.getSourceCard(), chosenSA, true, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} // end resolve
|
} // end resolve
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ public class CardFactory {
|
|||||||
* a boolean.
|
* a boolean.
|
||||||
*/
|
*/
|
||||||
public final static void copySpellontoStack(final Card source, final Card original, final SpellAbility sa,
|
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 originalController = original.getController();
|
||||||
Player controller = sa.getActivatingPlayer();
|
Player controller = sa.getActivatingPlayer();
|
||||||
final Card c = copyCard(original);
|
final Card c = copyCard(original);
|
||||||
@@ -186,7 +186,12 @@ public class CardFactory {
|
|||||||
copySA.setCopied(true);
|
copySA.setCopied(true);
|
||||||
//remove all costs
|
//remove all costs
|
||||||
copySA.setPayCosts(new Cost("", sa.isAbility()));
|
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 target = new Target(sa.getTarget());
|
||||||
target.setSourceCard(c);
|
target.setSourceCard(c);
|
||||||
copySA.setTarget(target);
|
copySA.setTarget(target);
|
||||||
|
|||||||
@@ -66,6 +66,7 @@ public class Target {
|
|||||||
private boolean randomTarget = false;
|
private boolean randomTarget = false;
|
||||||
private String definedController = null;
|
private String definedController = null;
|
||||||
private String relatedProperty = null;
|
private String relatedProperty = null;
|
||||||
|
private Object definedTarget = null;
|
||||||
|
|
||||||
// How many can be targeted?
|
// How many can be targeted?
|
||||||
private String minTargets;
|
private String minTargets;
|
||||||
@@ -111,6 +112,7 @@ public class Target {
|
|||||||
this.relatedProperty = target.getRelatedProperty();
|
this.relatedProperty = target.getRelatedProperty();
|
||||||
this.singleTarget = target.isSingleTarget();
|
this.singleTarget = target.isSingleTarget();
|
||||||
this.randomTarget = target.isRandomTarget();
|
this.randomTarget = target.isRandomTarget();
|
||||||
|
this.definedTarget = target.getDefinedTarget();
|
||||||
this.choice = target.getTargetChoices();
|
this.choice = target.getTargetChoices();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -906,6 +908,20 @@ public class Target {
|
|||||||
this.relatedProperty = related;
|
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
|
* @return the singleTarget
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -94,10 +94,13 @@ public class TargetSelection {
|
|||||||
|
|
||||||
final boolean choiceResult;
|
final boolean choiceResult;
|
||||||
final boolean random = tgt.isRandomTarget();
|
final boolean random = tgt.isRandomTarget();
|
||||||
|
final Object defined = tgt.getDefinedTarget();
|
||||||
if (random) {
|
if (random) {
|
||||||
List<Object> candidates = tgt.getAllCandidates(this.ability, true);
|
List<Object> candidates = tgt.getAllCandidates(this.ability, true);
|
||||||
Object choice = Aggregates.random(candidates);
|
Object choice = Aggregates.random(candidates);
|
||||||
return tgt.addTarget(choice);
|
return tgt.addTarget(choice);
|
||||||
|
} else if (defined != null) {
|
||||||
|
return tgt.addTarget(defined);
|
||||||
} else if (zone.size() == 1 && zone.get(0) == ZoneType.Stack) {
|
} else if (zone.size() == 1 && zone.get(0) == ZoneType.Stack) {
|
||||||
// If Zone is Stack, the choices are handled slightly differently.
|
// If Zone is Stack, the choices are handled slightly differently.
|
||||||
// Handle everything inside function due to interaction with StackInstance
|
// Handle everything inside function due to interaction with StackInstance
|
||||||
|
|||||||
@@ -163,6 +163,11 @@ public class TriggerSpellAbilityCast extends Trigger {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (this.mapParams.containsKey("IsSingleTarget")) {
|
||||||
|
if (spellAbility.getTarget().getTargets().size() != 1) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (this.mapParams.containsKey("SpellSpeed")) {
|
if (this.mapParams.containsKey("SpellSpeed")) {
|
||||||
if (this.mapParams.get("SpellSpeed").equals("NotSorcerySpeed")) {
|
if (this.mapParams.get("SpellSpeed").equals("NotSorcerySpeed")) {
|
||||||
|
|||||||
@@ -442,7 +442,7 @@ public class MagicStack extends MyObservable implements Iterable<SpellAbilitySta
|
|||||||
this.run();
|
this.run();
|
||||||
} else {
|
} else {
|
||||||
for (int i = 0; i < sp.getSourceCard().getReplicateMagnitude(); i++) {
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user