add AEthermage's Touch (from Dissension)

This commit is contained in:
jendave
2011-08-07 01:17:59 +00:00
parent ec16dbcb81
commit 1b37bc8879
4 changed files with 42 additions and 2 deletions

1
.gitattributes vendored
View File

@@ -172,6 +172,7 @@ res/cardsfolder/aether_tradewinds.txt svneol=native#text/plain
res/cardsfolder/aether_vial.txt -text svneol=native#text/plain res/cardsfolder/aether_vial.txt -text svneol=native#text/plain
res/cardsfolder/aether_web.txt -text svneol=native#text/plain res/cardsfolder/aether_web.txt -text svneol=native#text/plain
res/cardsfolder/aetherflame_wall.txt -text svneol=native#text/plain res/cardsfolder/aetherflame_wall.txt -text svneol=native#text/plain
res/cardsfolder/aethermages_touch.txt -text svneol=native#text/plain
res/cardsfolder/aethersnipe.txt -text svneol=native#text/plain res/cardsfolder/aethersnipe.txt -text svneol=native#text/plain
res/cardsfolder/affa_guard_hound.txt -text svneol=native#text/plain res/cardsfolder/affa_guard_hound.txt -text svneol=native#text/plain
res/cardsfolder/afflict.txt -text svneol=native#text/plain res/cardsfolder/afflict.txt -text svneol=native#text/plain

View File

@@ -0,0 +1,9 @@
Name:AEthermage's Touch
ManaCost:2 W U
Types:Instant
Text:no text
A:SP$ Dig | Cost$ 2 W U | DigNum$ 4 | Reveal$ True | ChangeNum$ 1 | Optional$ True | ChangeValid$ Creature | DestinationZone$ Battlefield | Keywords$ HIDDEN At the beginning of your end step, return CARDNAME to its owner's hand.| SpellDescription$ Reveal the top four cards of your library. You may put a creature card from among them onto the battlefield. It has "At the beginning of your end step, return this creature to its owner's hand." Then put the rest of the cards revealed this way on the bottom of your library in any order.
SVar:RemAIDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/aethermages_touch.jpg
End

View File

@@ -159,6 +159,24 @@ public class EndOfTurn implements java.io.Serializable
AllZone.Stack.addSimultaneousStackEntry(change); AllZone.Stack.addSimultaneousStackEntry(change);
} }
if(c.hasKeyword("At the beginning of your end step, return CARDNAME to its owner's hand.")
&& AllZone.Phase.isPlayerTurn(c.getController())) {
final Card source = c;
final SpellAbility change = new Ability(source, "0") {
@Override
public void resolve() {
if(AllZoneUtil.isCardInPlay(source)) {
AllZone.GameAction.moveToHand(source);
}
}
};
StringBuilder sb = new StringBuilder();
sb.append(source).append(" - At the beginning of your end step, return CARDNAME to its owner's hand.");
change.setStackDescription(sb.toString());
AllZone.Stack.addSimultaneousStackEntry(change);
}
} }

View File

@@ -3,6 +3,7 @@ package forge.card.abilityFactory;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.Random; import java.util.Random;
import java.util.Arrays;
import javax.swing.JOptionPane; import javax.swing.JOptionPane;
@@ -224,6 +225,10 @@ public class AbilityFactory_Reveal {
boolean optional = params.containsKey("Optional"); boolean optional = params.containsKey("Optional");
boolean noMove = params.containsKey("NoMove"); boolean noMove = params.containsKey("NoMove");
boolean changeAll = false; boolean changeAll = false;
ArrayList<String> keywords = new ArrayList<String>();
if(params.containsKey("Keywords")) {
keywords.addAll(Arrays.asList(params.get("Keywords").split(" & ")));
}
if(params.containsKey("ChangeNum")) { if(params.containsKey("ChangeNum")) {
if(params.get("ChangeNum").equalsIgnoreCase("All")) changeAll = true; if(params.get("ChangeNum").equalsIgnoreCase("All")) changeAll = true;
@@ -324,7 +329,10 @@ public class AbilityFactory_Reveal {
AllZone.GameAction.moveToLibrary(chosen, libraryPosition); AllZone.GameAction.moveToLibrary(chosen, libraryPosition);
} }
else { else {
AllZone.GameAction.moveTo(zone, chosen); Card c = AllZone.GameAction.moveTo(zone, chosen);
if(destZone1.equals("Battlefield") && !keywords.isEmpty()) {
for(String kw : keywords) c.addExtrinsicKeyword(kw);
}
} }
//AllZone.GameAction.revealToComputer() - for when this exists //AllZone.GameAction.revealToComputer() - for when this exists
j++; j++;
@@ -372,8 +380,12 @@ public class AbilityFactory_Reveal {
for(int i = 0; i < rest.size(); i++) { for(int i = 0; i < rest.size(); i++) {
Card c = rest.get(i); Card c = rest.get(i);
PlayerZone toZone = AllZone.getZone(destZone2, c.getOwner()); PlayerZone toZone = AllZone.getZone(destZone2, c.getOwner());
AllZone.GameAction.moveTo(toZone, c); c = AllZone.GameAction.moveTo(toZone, c);
if(destZone2.equals("Battlefield") && !keywords.isEmpty()) {
for(String kw : keywords) c.addExtrinsicKeyword(kw);
}
} }
} }
} }
}//end if canTarget }//end if canTarget