mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
- The AI will no longer use gain life abilities if the amount is zero or less.
This commit is contained in:
@@ -143,10 +143,15 @@ public class AbilityFactory_AlterLife {
|
||||
|
||||
public static boolean gainLifeCanPlayAI(final AbilityFactory af, final SpellAbility sa){
|
||||
Random r = new Random();
|
||||
HashMap<String,String> params = af.getMapParams();
|
||||
Ability_Cost abCost = sa.getPayCosts();
|
||||
final Card source = sa.getSourceCard();
|
||||
int life = AllZone.ComputerPlayer.getLife();
|
||||
int lifeAmount = AbilityFactory.calculateAmount(af.getHostCard(), params.get("LifeAmount"), sa);
|
||||
String amountStr = af.getMapParams().get("LifeAmount");
|
||||
|
||||
//don't use it if no life to gain
|
||||
if (lifeAmount <= 0) return false;
|
||||
|
||||
if (abCost != null){
|
||||
// AI currently disabled for these costs
|
||||
|
||||
Reference in New Issue
Block a user