- Added Cankerous Thirst

This commit is contained in:
moomarc
2012-09-11 09:50:35 +00:00
parent 8db554ceed
commit 73b8ead6f2
3 changed files with 42 additions and 7 deletions

1
.gitattributes vendored
View File

@@ -1308,6 +1308,7 @@ res/cardsfolder/c/cancel.txt svneol=native#text/plain
res/cardsfolder/c/candelabra_of_tawnos.txt svneol=native#text/plain
res/cardsfolder/c/candles_of_leng.txt -text svneol=unset#text/plain
res/cardsfolder/c/canker_abomination.txt svneol=native#text/plain
res/cardsfolder/c/cankerous_thirst.txt -text
res/cardsfolder/c/canopy_claws.txt svneol=native#text/plain
res/cardsfolder/c/canopy_cover.txt svneol=native#text/plain
res/cardsfolder/c/canopy_dragon.txt svneol=native#text/plain

View File

@@ -0,0 +1,11 @@
Name:Cankerous Thirst
ManaCost:3 BG
Types:Instant
Text:no text
A:SP$ Pump | Cost$ 3 BG | ValidTgts$ Creature | TgtPrompt$ Select target creature to get -3/-3 | Optional$ True | OptionQuestion$ Do you want TARGETS to get -3/-3? | NumAtt$ -3 | NumDef$ -3 | IsCurse$ True | ConditionManaSpent$ B | SubAbility$ GPaid | SpellDescription$ If B was spent to cast CARDNAME, you may have target creature get -3/-3 until end of turn. If G was spent to cast CARDNAME, you may have target creature get +3/+3 until end of turn. (Do both if B G was spent.)
SVar:GPaid:DB$ Pump | ValidTgts$ Creature | TgtPrompt$ Select target creature to get +3/+3 | Optional$ True | OptionQuestion$ Do you want TARGETS to get +3/+3? | NumAtt$ 3 | NumDef$ 3 | ConditionManaSpent$ G
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/cankerous_thirst.jpg
SetInfo:EVE|Uncommon|http://magiccards.info/scans/en/eve/116.jpg
Oracle:If {B} was spent to cast Cankerous Thirst, you may have target creature get -3/-3 until end of turn. If {G} was spent to cast Cankerous Thirst, you may have target creature get +3/+3 until end of turn. (Do both if {B}{G} was spent.)
End

View File

@@ -30,6 +30,7 @@ import forge.CardListFilter;
import forge.CardListUtil;
import forge.CardUtil;
import forge.Command;
import forge.GameActionUtil;
import forge.GameEntity;
import forge.Singletons;
import forge.card.cardfactory.CardFactoryUtil;
@@ -625,7 +626,7 @@ public class AbilityFactoryPump {
// if the life of the computer is in danger, try to pump blockers blocking Tramplers
CardList blockedBy = AllZone.getCombat().getAttackersBlockedBy(c);
boolean attackerHasTrample = false;
for(Card b : blockedBy) {
for (Card b : blockedBy) {
attackerHasTrample |= b.hasKeyword("Trample");
}
@@ -1328,6 +1329,7 @@ public class AbilityFactoryPump {
final Target tgt = sa.getTarget();
ArrayList<Player> tgtPlayers = new ArrayList<Player>();
String pumpRemembered = null;
if (tgt != null) {
tgtCards = tgt.getTargetCards();
tgtPlayers = tgt.getTargetPlayers();
@@ -1340,6 +1342,27 @@ public class AbilityFactoryPump {
}
}
if (this.params.containsKey("Optional")) {
if (sa.getActivatingPlayer().isHuman()) {
final StringBuilder targets = new StringBuilder();
for (final Card tc : tgtCards) {
targets.append(tc);
}
final StringBuilder sb = new StringBuilder();
final String descBasic = "Apply pump to " + targets + "?";
final String pumpDesc = params.containsKey("OptionQuestion")
? params.get("OptionQuestion").replace("TARGETS", targets) : descBasic;
sb.append(pumpDesc);
if (!GameActionUtil.showYesNoDialog(sa.getSourceCard(), sb.toString())) {
return;
}
} else { //Computer player
//TODO Add logic here if necessary but I think the AI won't cast
//the spell in the first place if it would curse its own creature
//and the pump isn't mandatory
}
}
if (this.params.containsKey("RememberObjects")) {
pumpRemembered = params.get("RememberObjects");
}