mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 02:08:00 +00:00
Merge branch 'assorted-fixes' into 'master'
- AI: Don't hold land drops till main 2 if playing with the Momir avatar See merge request core-developers/forge!385
This commit is contained in:
@@ -1180,6 +1180,13 @@ public class AiController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private boolean isSafeToHoldLandDropForMain2(Card landToPlay) {
|
private boolean isSafeToHoldLandDropForMain2(Card landToPlay) {
|
||||||
|
boolean hasMomir = !CardLists.filter(player.getCardsIn(ZoneType.Command),
|
||||||
|
CardPredicates.nameEquals("Momir Vig, Simic Visionary Avatar")).isEmpty();
|
||||||
|
if (hasMomir) {
|
||||||
|
// Don't do this in Momir variants since it messes with the AI decision making for the avatar.
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (!MyRandom.percentTrue(getIntProperty(AiProps.HOLD_LAND_DROP_FOR_MAIN2_IF_UNUSED))) {
|
if (!MyRandom.percentTrue(getIntProperty(AiProps.HOLD_LAND_DROP_FOR_MAIN2_IF_UNUSED))) {
|
||||||
// check against the chance specified in the profile
|
// check against the chance specified in the profile
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user