- Added Petra Sphinx (complete with AI).

This commit is contained in:
Sloth
2012-01-25 18:51:46 +00:00
parent 6b3bfde7aa
commit f318adf0ac
4 changed files with 37 additions and 1 deletions

1
.gitattributes vendored
View File

@@ -6175,6 +6175,7 @@ res/cardsfolder/p/pestilence_rats.txt svneol=native#text/plain
res/cardsfolder/p/pestilent_kathari.txt svneol=native#text/plain
res/cardsfolder/p/pestilent_souleater.txt svneol=native#text/plain
res/cardsfolder/p/petalmane_baku.txt -text
res/cardsfolder/p/petra_sphinx.txt -text
res/cardsfolder/p/petradon.txt svneol=native#text/plain
res/cardsfolder/p/petrahydrox.txt svneol=native#text/plain
res/cardsfolder/p/petravark.txt svneol=native#text/plain

View File

@@ -7,6 +7,9 @@ SVar:DBDamage:DB$ DealDamage | NumDmg$ X | ValidTgts$ Creature | TgtPrompt$ Sele
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:X:Remembered$CardPower
SVar:Y:Remembered$Amount
SVar:RemAIDeck:True
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/dead_reckoning.jpg
SetInfo:WWK|Common|http://magiccards.info/scans/en/wwk/56.jpg
Oracle:You may put target creature card from your graveyard on top of your library. If you do, Dead Reckoning deals damage equal to that card's power to target creature.
End

View File

@@ -0,0 +1,13 @@
Name:Petra Sphinx
ManaCost:2 W W W
Types:Creature Sphinx
Text:no text
PT:3/4
A:AB$ NameCard | Cost$ T | ValidTgts$ Player | TgtPrompt$ Select target player | SubAbility$ DBDig | AILogic$ MostProminentInComputerDeck | SpellDescription$ Target player names a card, then reveals the top card of his or her library. If that card is the named card, that player puts it into his or her hand. If it isn't, the player puts it into his or her graveyard.
SVar:DBDig:DB$ Dig | DigNum$ 1 | Defined$ Targeted | ChangeNum$ All | ChangeValid$ Card.NamedCard | DestinationZone2$ Graveyard | Reveal$ True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/petra_sphinx.jpg
SetInfo:CHR|Rare|http://magiccards.info/scans/en/ch/66.jpg
SetInfo:LEG|Rare|http://magiccards.info/scans/en/lg/199.jpg
Oracle:{T}: Target player names a card, then reveals the top card of his or her library. If that card is the named card, that player puts it into his or her hand. If it isn't, the player puts it into his or her graveyard.
End

View File

@@ -1359,7 +1359,26 @@ public final class AbilityFactoryChoose {
* @return a boolean.
*/
private static boolean nameCardCanPlayAI(final AbilityFactory af, final SpellAbility sa) {
return AbilityFactoryChoose.choosePlayerTriggerAI(af, sa, false);
final HashMap<String, String> params = af.getMapParams();
if (params.containsKey("AILogic")) {
// Don't tap creatures that may be able to block
if (AbilityFactory.waitForBlocking(sa)) {
return false;
}
final Target tgt = sa.getTarget();
if (tgt != null) {
tgt.resetTargets();
if (tgt.canOnlyTgtOpponent()) {
tgt.addTarget(AllZone.getHumanPlayer());
} else {
tgt.addTarget(AllZone.getComputerPlayer());
}
}
return true;
}
return false;
}
/**