mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 10:48:00 +00:00
- Added Cankerous Thirst
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -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/candelabra_of_tawnos.txt svneol=native#text/plain
|
||||||
res/cardsfolder/c/candles_of_leng.txt -text svneol=unset#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/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_claws.txt svneol=native#text/plain
|
||||||
res/cardsfolder/c/canopy_cover.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
|
res/cardsfolder/c/canopy_dragon.txt svneol=native#text/plain
|
||||||
|
|||||||
11
res/cardsfolder/c/cankerous_thirst.txt
Normal file
11
res/cardsfolder/c/cankerous_thirst.txt
Normal 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
|
||||||
@@ -30,6 +30,7 @@ import forge.CardListFilter;
|
|||||||
import forge.CardListUtil;
|
import forge.CardListUtil;
|
||||||
import forge.CardUtil;
|
import forge.CardUtil;
|
||||||
import forge.Command;
|
import forge.Command;
|
||||||
|
import forge.GameActionUtil;
|
||||||
import forge.GameEntity;
|
import forge.GameEntity;
|
||||||
import forge.Singletons;
|
import forge.Singletons;
|
||||||
import forge.card.cardfactory.CardFactoryUtil;
|
import forge.card.cardfactory.CardFactoryUtil;
|
||||||
@@ -600,7 +601,7 @@ public class AbilityFactoryPump {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
CardList blockedBy = AllZone.getCombat().getAttackersBlockedBy(c);
|
CardList blockedBy = AllZone.getCombat().getAttackersBlockedBy(c);
|
||||||
// For now, Only care the first creature blocked by a card.
|
// For now, Only care the first creature blocked by a card.
|
||||||
// TODO Add in better BlockAdditional support
|
// TODO Add in better BlockAdditional support
|
||||||
if (blockedBy.size() != 0 && !CombatUtil.attackerWouldBeDestroyed(blockedBy.get(0))) {
|
if (blockedBy.size() != 0 && !CombatUtil.attackerWouldBeDestroyed(blockedBy.get(0))) {
|
||||||
return true;
|
return true;
|
||||||
@@ -625,10 +626,10 @@ public class AbilityFactoryPump {
|
|||||||
// if the life of the computer is in danger, try to pump blockers blocking Tramplers
|
// if the life of the computer is in danger, try to pump blockers blocking Tramplers
|
||||||
CardList blockedBy = AllZone.getCombat().getAttackersBlockedBy(c);
|
CardList blockedBy = AllZone.getCombat().getAttackersBlockedBy(c);
|
||||||
boolean attackerHasTrample = false;
|
boolean attackerHasTrample = false;
|
||||||
for(Card b : blockedBy) {
|
for (Card b : blockedBy) {
|
||||||
attackerHasTrample |= b.hasKeyword("Trample");
|
attackerHasTrample |= b.hasKeyword("Trample");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (phase.getPhase().equals(PhaseType.COMBAT_DECLARE_BLOCKERS_INSTANT_ABILITY)
|
if (phase.getPhase().equals(PhaseType.COMBAT_DECLARE_BLOCKERS_INSTANT_ABILITY)
|
||||||
&& phase.isPlayerTurn(AllZone.getHumanPlayer())
|
&& phase.isPlayerTurn(AllZone.getHumanPlayer())
|
||||||
&& c.isBlocking()
|
&& c.isBlocking()
|
||||||
@@ -784,7 +785,7 @@ public class AbilityFactoryPump {
|
|||||||
if (!CostUtil.checkRemoveCounterCost(cost, sa.getSourceCard())) {
|
if (!CostUtil.checkRemoveCounterCost(cost, sa.getSourceCard())) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (AllZone.getStack().isEmpty() && CostUtil.hasTapCost(cost, sa.getSourceCard())) {
|
if (AllZone.getStack().isEmpty() && CostUtil.hasTapCost(cost, sa.getSourceCard())) {
|
||||||
if (ph.getPhase().isBefore(PhaseType.COMBAT_DECLARE_ATTACKERS) && ph.isPlayerTurn(AllZone.getComputerPlayer())) {
|
if (ph.getPhase().isBefore(PhaseType.COMBAT_DECLARE_ATTACKERS) && ph.isPlayerTurn(AllZone.getComputerPlayer())) {
|
||||||
return false;
|
return false;
|
||||||
@@ -889,12 +890,12 @@ public class AbilityFactoryPump {
|
|||||||
if (!this.pumpTgtAI(sa, defense, attack, false)) {
|
if (!this.pumpTgtAI(sa, defense, attack, false)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
final AbilitySub subAb = sa.getSubAbility();
|
final AbilitySub subAb = sa.getSubAbility();
|
||||||
if (subAb != null && !subAb.chkAIDrawback()) {
|
if (subAb != null && !subAb.chkAIDrawback()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
} // pumpPlayAI()
|
} // pumpPlayAI()
|
||||||
|
|
||||||
@@ -1208,7 +1209,7 @@ public class AbilityFactoryPump {
|
|||||||
if (!this.pumpTgtAI(sa, defense, attack, false)) {
|
if (!this.pumpTgtAI(sa, defense, attack, false)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
final AbilitySub subAb = sa.getSubAbility();
|
final AbilitySub subAb = sa.getSubAbility();
|
||||||
if (subAb != null && !subAb.chkAIDrawback()) {
|
if (subAb != null && !subAb.chkAIDrawback()) {
|
||||||
return false;
|
return false;
|
||||||
@@ -1328,6 +1329,7 @@ public class AbilityFactoryPump {
|
|||||||
final Target tgt = sa.getTarget();
|
final Target tgt = sa.getTarget();
|
||||||
ArrayList<Player> tgtPlayers = new ArrayList<Player>();
|
ArrayList<Player> tgtPlayers = new ArrayList<Player>();
|
||||||
String pumpRemembered = null;
|
String pumpRemembered = null;
|
||||||
|
|
||||||
if (tgt != null) {
|
if (tgt != null) {
|
||||||
tgtCards = tgt.getTargetCards();
|
tgtCards = tgt.getTargetCards();
|
||||||
tgtPlayers = tgt.getTargetPlayers();
|
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")) {
|
if (this.params.containsKey("RememberObjects")) {
|
||||||
pumpRemembered = params.get("RememberObjects");
|
pumpRemembered = params.get("RememberObjects");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user