- Added Plunge into Darkness

This commit is contained in:
swordshine
2013-12-25 08:14:19 +00:00
parent 9262ad4d82
commit 69a9f0fe43
3 changed files with 31 additions and 2 deletions

1
.gitattributes vendored
View File

@@ -8618,6 +8618,7 @@ forge-gui/res/cardsfolder/p/plumes_of_peace.txt svneol=native#text/plain
forge-gui/res/cardsfolder/p/plumeveil.txt svneol=native#text/plain forge-gui/res/cardsfolder/p/plumeveil.txt svneol=native#text/plain
forge-gui/res/cardsfolder/p/plummet.txt svneol=native#text/plain forge-gui/res/cardsfolder/p/plummet.txt svneol=native#text/plain
forge-gui/res/cardsfolder/p/plunder.txt svneol=native#text/plain forge-gui/res/cardsfolder/p/plunder.txt svneol=native#text/plain
forge-gui/res/cardsfolder/p/plunge_into_darkness.txt -text
forge-gui/res/cardsfolder/p/poison_arrow.txt svneol=native#text/plain forge-gui/res/cardsfolder/p/poison_arrow.txt svneol=native#text/plain
forge-gui/res/cardsfolder/p/poison_the_well.txt svneol=native#text/plain forge-gui/res/cardsfolder/p/poison_the_well.txt svneol=native#text/plain
forge-gui/res/cardsfolder/p/poisonbelly_ogre.txt svneol=native#text/plain forge-gui/res/cardsfolder/p/poisonbelly_ogre.txt svneol=native#text/plain

View File

@@ -0,0 +1,19 @@
Name:Plunge into Darkness
ManaCost:1 B
Types:Instant
K:Entwine B
A:SP$ Charm | Cost$ 1 B | Choices$ DBSac,DBChooseNumber | CharmNum$ 1 | SpellDescription$ Choose one - Sacrifice any number of creatures, then you gain 3 life for each sacrificed creature; or pay X life, then look at the top X cards of your library, put one of those cards into your hand, and exile the rest.
SVar:DBSac:DB$ Sacrifice | Defined$ You | Amount$ SacX | References$ SacX | SacValid$ Creature | RememberSacrificed$ True | Optional$ True | SubAbility$ DBGainLife | SpellDescription$ Sacrifice any number of creatures, then you gain 3 life for each sacrificed creature.
SVar:DBGainLife:DB$ GainLife | Defined$ You | LifeAmount$ GainLifeX | References$ GainLifeX | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:SacX:Count$Valid Creature.YouCtrl
SVar:GainLifeX:Count$RememberedSize/Thrice
SVar:DBChooseNumber:DB$ ChooseNumber | Defined$ You | ListTitle$ Pay X life? | Max$ LifeAmountX | AILogic$ DigACard | References$ LifeAmountX | SubAbility$ DBLoseLife | SpellDescription$ Pay X life, then look at the top X cards of your library, put one of those cards into your hand, and exile the rest.
SVar:DBLoseLife:DB$ LoseLife | LifeAmount$ Y | References$ Y | SubAbility$ DBDig
SVar:DBDig:DB$ Dig | DigNum$ AFLifeLost | DestinationZone2$ Exile
SVar:Y:Count$ChosenNumber
SVar:LifeAmountX:Count$YourLifeTotal
SVar:AFLifeLost:Number$0
SVar:RemAIDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/plunge_into_darkness.jpg
Oracle:Choose one - Sacrifice any number of creatures, then you gain 3 life for each sacrificed creature; or pay X life, then look at the top X cards of your library, put one of those cards into your hand, and exile the rest.\nEntwine {B} (Choose both if you pay the entwine cost.)

View File

@@ -916,14 +916,23 @@ public class AiController {
public int chooseNumber(SpellAbility sa, String title, int min, int max) { public int chooseNumber(SpellAbility sa, String title, int min, int max) {
//TODO: AILogic //TODO: AILogic
if ("GainLife".equals(sa.getParam("AILogic"))) { final String logic = sa.getParam("AILogic");
if ("GainLife".equals(logic)) {
if (player.getLife() < 5 || player.getCardsIn(ZoneType.Hand).size() >= player.getMaxHandSize()) { if (player.getLife() < 5 || player.getCardsIn(ZoneType.Hand).size() >= player.getMaxHandSize()) {
return min; return min;
} }
} }
if ("Min".equals(sa.getParam("AILogic"))) { else if ("Min".equals(logic)) {
return min; return min;
} }
else if ("DigACard".equals(logic)) {
int random = MyRandom.getRandom().nextInt(Math.min(4, max)) + 1;
if (player.getLife() < random + 5) {
return min;
} else {
return random;
}
}
return max; return max;
} }