mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
Add XChoice to PayLife
Add Hatred
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -3417,6 +3417,7 @@ res/cardsfolder/h/hatchet_bully.txt svneol=native#text/plain
|
|||||||
res/cardsfolder/h/hatching_plans.txt svneol=native#text/plain
|
res/cardsfolder/h/hatching_plans.txt svneol=native#text/plain
|
||||||
res/cardsfolder/h/hate_weaver.txt svneol=native#text/plain
|
res/cardsfolder/h/hate_weaver.txt svneol=native#text/plain
|
||||||
res/cardsfolder/h/hateflayer.txt svneol=native#text/plain
|
res/cardsfolder/h/hateflayer.txt svneol=native#text/plain
|
||||||
|
res/cardsfolder/h/hatred.txt -text
|
||||||
res/cardsfolder/h/haunted_angel.txt svneol=native#text/plain
|
res/cardsfolder/h/haunted_angel.txt svneol=native#text/plain
|
||||||
res/cardsfolder/h/haunted_cadaver.txt svneol=native#text/plain
|
res/cardsfolder/h/haunted_cadaver.txt svneol=native#text/plain
|
||||||
res/cardsfolder/h/haunted_crossroads.txt svneol=native#text/plain
|
res/cardsfolder/h/haunted_crossroads.txt svneol=native#text/plain
|
||||||
|
|||||||
11
res/cardsfolder/h/hatred.txt
Normal file
11
res/cardsfolder/h/hatred.txt
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
Name:Hatred
|
||||||
|
ManaCost:3 B B
|
||||||
|
Types:Instant
|
||||||
|
Text:no text
|
||||||
|
A:SP$ Pump | Cost$ 3 B B PayLife<X> | Tgt$ TgtC | NumAtt$ ChosenX | SpellDescription$ Target creature gets +X/+0 until end of turn.
|
||||||
|
SVar:X:XChoice
|
||||||
|
#ChosenX SVar created by Cost payment
|
||||||
|
SVar:RemAIDeck:True
|
||||||
|
SVar:Rarity:Rare
|
||||||
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/hatred.jpg
|
||||||
|
End
|
||||||
@@ -53,7 +53,8 @@ public class CostPayLife extends CostPart {
|
|||||||
@Override
|
@Override
|
||||||
public boolean payHuman(SpellAbility ability, Card source, Cost_Payment payment) {
|
public boolean payHuman(SpellAbility ability, Card source, Cost_Payment payment) {
|
||||||
String amount = getAmount();
|
String amount = getAmount();
|
||||||
int life = ability.getActivatingPlayer().getLife();
|
Player activator = ability.getActivatingPlayer();
|
||||||
|
int life = activator.getLife();
|
||||||
|
|
||||||
Integer c = convertAmount();
|
Integer c = convertAmount();
|
||||||
if (c == null){
|
if (c == null){
|
||||||
@@ -70,8 +71,8 @@ public class CostPayLife extends CostPart {
|
|||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append(source.getName()).append(" - Pay ").append(c).append(" Life?");
|
sb.append(source.getName()).append(" - Pay ").append(c).append(" Life?");
|
||||||
|
|
||||||
if (GameActionUtil.showYesNoDialog(source, sb.toString())) {
|
if (GameActionUtil.showYesNoDialog(source, sb.toString()) && activator.canPayLife(c)) {
|
||||||
AllZone.getHumanPlayer().payLife(c, null);
|
activator.payLife(c, null);
|
||||||
setLastPaidAmount(c);
|
setLastPaidAmount(c);
|
||||||
payment.setPaidManaPart(this, true);
|
payment.setPaidManaPart(this, true);
|
||||||
} else {
|
} else {
|
||||||
@@ -91,9 +92,7 @@ public class CostPayLife extends CostPart {
|
|||||||
String sVar = source.getSVar(amount);
|
String sVar = source.getSVar(amount);
|
||||||
// Generalize this
|
// Generalize this
|
||||||
if (sVar.equals("XChoice")){
|
if (sVar.equals("XChoice")){
|
||||||
// This decision should be locked in the AF and be calculable at this state
|
return false;
|
||||||
//c = chooseXValue(life);
|
|
||||||
// Figure out what to do here
|
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
c = AbilityFactory.calculateAmount(source, amount, ability);
|
c = AbilityFactory.calculateAmount(source, amount, ability);
|
||||||
@@ -102,7 +101,7 @@ public class CostPayLife extends CostPart {
|
|||||||
if (!activator.canPayLife(c)){
|
if (!activator.canPayLife(c)){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
activator.payLife(c, null);
|
||||||
setLastPaidAmount(c);
|
setLastPaidAmount(c);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user