- Added Auriok Survivors.

This commit is contained in:
Sloth
2012-02-22 17:12:09 +00:00
parent c6570b6709
commit 0c118fb707
3 changed files with 29 additions and 2 deletions

1
.gitattributes vendored
View File

@@ -503,6 +503,7 @@ res/cardsfolder/a/auriok_edgewright.txt svneol=native#text/plain
res/cardsfolder/a/auriok_glaivemaster.txt svneol=native#text/plain
res/cardsfolder/a/auriok_salvagers.txt svneol=native#text/plain
res/cardsfolder/a/auriok_sunchaser.txt svneol=native#text/plain
res/cardsfolder/a/auriok_survivors.txt -text
res/cardsfolder/a/auriok_transfixer.txt svneol=native#text/plain
res/cardsfolder/a/aurochs.txt svneol=native#text/plain
res/cardsfolder/a/aurochs_herd.txt svneol=native#text/plain

View File

@@ -0,0 +1,13 @@
Name:Auriok Survivors
ManaCost:5 W
Types:Creature Human Soldier
Text:no text
PT:4/6
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigChangeZone | OptionalDecider$ You | TriggerDescription$ When CARDNAME enters the battlefield, you may return target Equipment card from your graveyard to the battlefield. If you do, you may attach it to CARDNAME.
SVar:TrigChangeZone:AB$ChangeZone | Cost$ 0 | Origin$ Graveyard | Destination$ Battlefield | ValidTgts$ Equipment.YouCtrl | SubAbility$ DBAttach
SVar:DBAttach:DB$ Attach | Object$ Targeted | Defined$ Self | Optional$ True
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/auriok_survivors.jpg
SetInfo:NPH|Uncommon|http://magiccards.info/scans/en/nph/3.jpg
Oracle:When Auriok Survivors enters the battlefield, you may return target Equipment card from your graveyard to the battlefield. If you do, you may attach it to Auriok Survivors.
End

View File

@@ -33,6 +33,7 @@ import forge.CombatUtil;
import forge.Command;
import forge.ComputerUtil;
import forge.Constant;
import forge.GameActionUtil;
import forge.Constant.Zone;
import forge.GameEntity;
import forge.Player;
@@ -994,17 +995,29 @@ public class AbilityFactoryAttach {
*/
public static void attachResolve(final AbilityFactory af, final SpellAbility sa) {
final Map<String, String> params = af.getMapParams();
final Card card = sa.getSourceCard();
Card source = sa.getSourceCard();
Card card = sa.getSourceCard();
ArrayList<Object> targets;
if (params.containsKey("Object")) {
card = AbilityFactory.getDefinedCards(source, params.get("Object"), sa).get(0);
}
final Target tgt = sa.getTarget();
if (tgt != null) {
targets = tgt.getTargets();
// TODO Remove invalid targets (although more likely this will just
// fizzle earlier)
} else {
targets = AbilityFactory.getDefinedObjects(sa.getSourceCard(), params.get("Defined"), sa);
targets = AbilityFactory.getDefinedObjects(source, params.get("Defined"), sa);
}
final StringBuilder sb = new StringBuilder();
sb.append("Do you want to attach " + card + " to " + targets + "?");
if (sa.getActivatingPlayer().isHuman() && params.containsKey("Optional")
&& !GameActionUtil.showYesNoDialog(source, sb.toString())) {
return;
}
// If Cast Targets will be checked on the Stack