- Improved the prompt of unless costs.

- Added Cleansing.
This commit is contained in:
Sloth
2012-11-10 12:07:06 +00:00
parent bb096e7a80
commit 2fbd90faf4
3 changed files with 18 additions and 2 deletions

1
.gitattributes vendored
View File

@@ -1681,6 +1681,7 @@ res/cardsfolder/c/claws_of_wirewood.txt svneol=native#text/plain
res/cardsfolder/c/clay_statue.txt svneol=native#text/plain
res/cardsfolder/c/cleanfall.txt svneol=native#text/plain
res/cardsfolder/c/cleanse.txt svneol=native#text/plain
res/cardsfolder/c/cleansing.txt -text
res/cardsfolder/c/cleansing_beam.txt svneol=native#text/plain
res/cardsfolder/c/clear.txt svneol=native#text/plain
res/cardsfolder/c/clear_the_land.txt -text

View File

@@ -0,0 +1,11 @@
Name:Cleansing
ManaCost:W W W
Types:Sorcery
A:SP$ RepeatEach | Cost$ W W W | RepeatSubAbility$ DBSac | RepeatCards$ Land | SpellDescription$ For each land, destroy that land unless any player pays 1 life.
SVar:DBSac:DB$ Destroy | UnlessCost$ PayLife<1> | UnlessPayer$ RememberedController | Defined$ Remembered
SVar:RemAIDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/cleansing.jpg
SetInfo:DRK|Rare|http://magiccards.info/scans/en/dk/77.jpg
Oracle:For each land, destroy that land unless any player pays 1 life.
End

View File

@@ -377,8 +377,12 @@ public final class GameActionUtil {
if (!parts.isEmpty()) {
costPart = parts.get(0);
}
String orString = "";
if (sourceAbility != null) {
orString = " (or: " + sourceAbility.getStackDescription() + ")";
}
if (parts.isEmpty() || costPart.getAmount().equals("0")) {
if (showYesNoDialog(source, "Do you want to pay 0?")) {
if (showYesNoDialog(source, "Do you want to pay 0?" + orString)) {
paid.execute();
} else {
unpaid.execute();
@@ -394,7 +398,7 @@ public final class GameActionUtil {
final int amount = amountString.matches("[0-9][0-9]?") ? Integer.parseInt(amountString)
: AbilityFactory.calculateAmount(source, amountString, sourceAbility);
Player p = Singletons.getControl().getPlayer();
if (p.canPayLife(amount) && showYesNoDialog(source, "Do you want to pay " + amount + " life?")) {
if (p.canPayLife(amount) && showYesNoDialog(source, "Do you want to pay " + amount + " life?" + orString)) {
p.payLife(amount, null);
} else {
hasPaid = false;