mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 20:58:03 +00:00
- The AI will no longer use AF LoseLife abilities with X=0.
This commit is contained in:
@@ -5,7 +5,6 @@ Text:no text
|
||||
A:SP$ LoseLife | Cost$ X B B | Defined$ Opponent | LifeAmount$ X | SubAbility$ SVar=DBGainLife | SpellDescription$ Each opponent loses X life. You gain life equal to the life lost this way.
|
||||
SVar:DBGainLife:DB$GainLife | Defined$ You | LifeAmount$ X
|
||||
SVar:X:Count$xPaid
|
||||
SVar:RemAIDeck:True
|
||||
SVar:Rarity:Uncommon
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/exsanguinate.jpg
|
||||
SetInfo:SOM|Uncommon|http://magiccards.info/scans/en/som/61.jpg
|
||||
|
||||
@@ -608,7 +608,17 @@ public class AbilityFactoryAlterLife {
|
||||
|
||||
// TODO handle proper calculation of X values based on Cost and what
|
||||
// would be paid
|
||||
final int amount = AbilityFactory.calculateAmount(af.getHostCard(), amountStr, sa);
|
||||
int amount = AbilityFactory.calculateAmount(af.getHostCard(), amountStr, sa);
|
||||
|
||||
if (amountStr.equals("X") && source.getSVar(amountStr).equals("Count$xPaid")) {
|
||||
// Set PayX here to maximum value.
|
||||
amount = ComputerUtil.determineLeftoverMana(sa);
|
||||
source.setSVar("PayX", Integer.toString(amount));
|
||||
}
|
||||
|
||||
if (amount <= 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (abCost != null) {
|
||||
// AI currently disabled for these costs
|
||||
@@ -657,12 +667,6 @@ public class AbilityFactoryAlterLife {
|
||||
sa.getTarget().addTarget(AllZone.getHumanPlayer());
|
||||
}
|
||||
|
||||
if (amountStr.equals("X") && source.getSVar(amountStr).equals("Count$xPaid")) {
|
||||
// Set PayX here to maximum value.
|
||||
final int xPay = ComputerUtil.determineLeftoverMana(sa);
|
||||
source.setSVar("PayX", Integer.toString(xPay));
|
||||
}
|
||||
|
||||
boolean randomReturn = r.nextFloat() <= .6667;
|
||||
if (AbilityFactory.playReusable(sa) || priority) {
|
||||
randomReturn = true;
|
||||
|
||||
Reference in New Issue
Block a user