mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
- The AI will no longer use draw card abilities before main2.
This commit is contained in:
@@ -206,7 +206,6 @@ public class AbilityFactory_Token extends AbilityFactory {
|
|||||||
|
|
||||||
private boolean tokenCanPlayAI(SpellAbility sa){
|
private boolean tokenCanPlayAI(SpellAbility sa){
|
||||||
Cost cost = sa.getPayCosts();
|
Cost cost = sa.getPayCosts();
|
||||||
HashMap<String,String> params = af.getMapParams();
|
|
||||||
if (!ComputerUtil.canPayCost(sa)) // If there is a cost payment it's usually not mandatory
|
if (!ComputerUtil.canPayCost(sa)) // If there is a cost payment it's usually not mandatory
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@@ -231,7 +230,7 @@ public class AbilityFactory_Token extends AbilityFactory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Don't generate tokens without haste before main 2 if possible
|
//Don't generate tokens without haste before main 2 if possible
|
||||||
if(AllZone.Phase.isBefore(Constant.Phase.Main2) && !haste && !params.containsKey("ActivatingPhases"))
|
if(AllZone.Phase.isBefore(Constant.Phase.Main2) && !haste)
|
||||||
return false;
|
return false;
|
||||||
if(AllZone.Phase.isAfter(Constant.Phase.Combat_Begin) && oneShot)
|
if(AllZone.Phase.isAfter(Constant.Phase.Combat_Begin) && oneShot)
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -159,6 +159,7 @@ public class AbilityFactory_ZoneAffecting {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static boolean drawCanPlayAI(final AbilityFactory af, SpellAbility sa){
|
public static boolean drawCanPlayAI(final AbilityFactory af, SpellAbility sa){
|
||||||
|
HashMap<String,String> params = af.getMapParams();
|
||||||
// AI cannot use this properly until he can use SAs during Humans turn
|
// AI cannot use this properly until he can use SAs during Humans turn
|
||||||
if (!ComputerUtil.canPayCost(sa))
|
if (!ComputerUtil.canPayCost(sa))
|
||||||
return false;
|
return false;
|
||||||
@@ -195,6 +196,9 @@ public class AbilityFactory_ZoneAffecting {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(AllZone.Phase.isBefore(Constant.Phase.Main2) && !params.containsKey("ActivatingPhases"))
|
||||||
|
return false;
|
||||||
|
|
||||||
double chance = .4; // 40 percent chance of milling with instant speed stuff
|
double chance = .4; // 40 percent chance of milling with instant speed stuff
|
||||||
if (AbilityFactory.isSorcerySpeed(sa))
|
if (AbilityFactory.isSorcerySpeed(sa))
|
||||||
chance = .667; // 66.7% chance for sorcery speed (since it will never activate EOT)
|
chance = .667; // 66.7% chance for sorcery speed (since it will never activate EOT)
|
||||||
|
|||||||
Reference in New Issue
Block a user