mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
- Added Spelltwine
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -8862,6 +8862,7 @@ res/cardsfolder/s/spellbreaker_behemoth.txt svneol=native#text/plain
|
||||
res/cardsfolder/s/spellgorger_barbarian.txt svneol=native#text/plain
|
||||
res/cardsfolder/s/spellshock.txt svneol=native#text/plain
|
||||
res/cardsfolder/s/spellstutter_sprite.txt svneol=native#text/plain
|
||||
res/cardsfolder/s/spelltwine.txt -text
|
||||
res/cardsfolder/s/spellweaver_helix.txt -text svneol=unset#text/plain
|
||||
res/cardsfolder/s/spellwild_ouphe.txt -text
|
||||
res/cardsfolder/s/sphere_of_duty.txt svneol=native#text/plain
|
||||
|
||||
15
res/cardsfolder/s/spelltwine.txt
Normal file
15
res/cardsfolder/s/spelltwine.txt
Normal file
@@ -0,0 +1,15 @@
|
||||
Name:Spelltwine
|
||||
ManaCost:5 U
|
||||
Types:Sorcery
|
||||
Text:no text
|
||||
A:SP$ ChangeZone | Cost$ 5 U | Origin$ Graveyard | Destination$ Exile | TgtPrompt$ Choose target instant or sorcery card in your graveyard | ValidTgts$ Instant.YouCtrl,Sorcery.YouCtrl | RememberChanged$ True | SubAbility$ TgtOpp | SpellDescription$ Exile target instant or sorcery card from your graveyard and target instant or sorcery from your opponent's graveyard. Copy those cards. Cast the copies if able without paying their mana cost.
|
||||
SVar:TgtOpp:DB$ ChangeZone | Origin$ Graveyard | Destination$ Exile | TgtPrompt$ Choose target instant or sorcery card in your opponent's graveyard | ValidTgts$ Instant.YouDontCtrl,Sorcery.YouDontCtrl | RememberChanged$ True | SubAbility$ CopyYou
|
||||
SVar:CopyYou:DB$ CopySpell | Defined$ Remembered | SubAbility$ CopyOpp | CopyMultipleSpells$ 2 | SubAbility$ ExileSelf
|
||||
SVar:ExileSelf:DB$ ChangeZone | Origin$ Stack | Destination$ Exile | Defined$ Self | SubAbility$ DBCleanup
|
||||
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
|
||||
SVar:RemAIDeck:True
|
||||
SVar:Rarity:Rare
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/spelltwine.jpg
|
||||
SetInfo:M13|Rare|http://magiccards.info/scans/en/m13/68.jpg
|
||||
Oracle:Exile target instant or sorcery card from your graveyard and target instant or sorcery card from an opponent's graveyard. Copy those cards. Cast the copies if able without paying their mana costs. Exile Spelltwine.
|
||||
End
|
||||
@@ -2213,6 +2213,13 @@ public class AbilityFactory {
|
||||
if (o instanceof SpellAbility) {
|
||||
s = (SpellAbility) o;
|
||||
}
|
||||
} else if (defined.equals("Remembered")) {
|
||||
for (final Object o : card.getRemembered()) {
|
||||
if (o instanceof Card) {
|
||||
final Card rem = (Card) o;
|
||||
sas.addAll(AllZoneUtil.getCardState(rem).getSpellAbilities());
|
||||
}
|
||||
}
|
||||
} else if (defined.equals("Imprinted")) {
|
||||
for (final Card imp : card.getImprinted()) {
|
||||
sas.addAll(imp.getSpellAbilities());
|
||||
|
||||
@@ -796,18 +796,55 @@ public final class AbilityFactoryCopy {
|
||||
return;
|
||||
}
|
||||
|
||||
SpellAbility chosenSA = null;
|
||||
if (tgtSpells.size() == 1) {
|
||||
chosenSA = tgtSpells.get(0);
|
||||
} else if (sa.getActivatingPlayer().isHuman()) {
|
||||
chosenSA = (SpellAbility) GuiUtils.chooseOne("Select a spell to copy", tgtSpells.toArray());
|
||||
} else {
|
||||
chosenSA = tgtSpells.get(0);
|
||||
}
|
||||
if (params.containsKey("CopyMultipleSpells")) {
|
||||
final int spellCount = Integer.parseInt(params.get("CopyMultipleSpells"));
|
||||
ArrayList<SpellAbility> chosenSAs = new ArrayList<SpellAbility>();
|
||||
SpellAbility chosenSAtmp = null;
|
||||
for (int multi = 0; multi < spellCount; multi++) {
|
||||
if (tgtSpells.size() == 1) {
|
||||
chosenSAs.addAll(tgtSpells);
|
||||
} else if (sa.getActivatingPlayer().isHuman()) {
|
||||
String num = "";
|
||||
if (multi == 1 - 1) {
|
||||
num = "first";
|
||||
}
|
||||
else if (multi == 2 - 1) {
|
||||
num = "second";
|
||||
}
|
||||
else if (multi == 3 - 1) {
|
||||
num = "third";
|
||||
} else {
|
||||
num = Integer.toString(multi - 1) + "th";
|
||||
}
|
||||
chosenSAtmp = (SpellAbility) GuiUtils.chooseOne("Select " + num + " spell to copy to stack", tgtSpells.toArray());
|
||||
chosenSAs.add(chosenSAtmp);
|
||||
tgtSpells.remove(chosenSAtmp);
|
||||
} else {
|
||||
chosenSAs.add(tgtSpells.get(multi));
|
||||
}
|
||||
}
|
||||
|
||||
chosenSA.setActivatingPlayer(controller);
|
||||
for (int i = 0; i < amount; i++) {
|
||||
AllZone.getCardFactory().copySpellontoStack(card, chosenSA.getSourceCard(), chosenSA, true);
|
||||
for (final SpellAbility chosenSAcopy : chosenSAs) {
|
||||
chosenSAcopy.setActivatingPlayer(controller);
|
||||
for (int i = 0; i < amount; i++) {
|
||||
AllZone.getCardFactory().copySpellontoStack(card, chosenSAcopy.getSourceCard(), chosenSAcopy, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
SpellAbility chosenSA = null;
|
||||
if (tgtSpells.size() == 1) {
|
||||
chosenSA = tgtSpells.get(0);
|
||||
} else if (sa.getActivatingPlayer().isHuman()) {
|
||||
chosenSA = (SpellAbility) GuiUtils.chooseOne("Select a spell to copy", tgtSpells.toArray());
|
||||
} else {
|
||||
chosenSA = tgtSpells.get(0);
|
||||
}
|
||||
|
||||
chosenSA.setActivatingPlayer(controller);
|
||||
for (int i = 0; i < amount; i++) {
|
||||
AllZone.getCardFactory().copySpellontoStack(card, chosenSA.getSourceCard(), chosenSA, true);
|
||||
}
|
||||
}
|
||||
} // end resolve
|
||||
|
||||
|
||||
@@ -151,6 +151,7 @@ public class CardFactory implements CardFactoryInterface {
|
||||
@Override
|
||||
public final void copySpellontoStack(final Card source, final Card original, final SpellAbility sa,
|
||||
final boolean bCopyDetails) {
|
||||
Player originalController = original.getController();
|
||||
Player controller = sa.getActivatingPlayer();
|
||||
/*if (sa.getPayCosts() == null) {
|
||||
this.copySpellontoStack(source, original, bCopyDetails);
|
||||
@@ -191,6 +192,8 @@ public class CardFactory implements CardFactoryInterface {
|
||||
} else if (copySA.canPlayAI()) {
|
||||
ComputerUtil.playStackFree(copySA);
|
||||
}
|
||||
|
||||
c.addController(originalController);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user