mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 20:58:03 +00:00
Merge branch 'master' into 'master'
Filter valid options for the AI when choosing a card name before running the logic. See merge request core-developers/forge!6173
This commit is contained in:
@@ -1204,6 +1204,12 @@ public class PlayerControllerAi extends PlayerController {
|
|||||||
final Card source = sa.getHostCard();
|
final Card source = sa.getHostCard();
|
||||||
final String logic = sa.getParam("AILogic");
|
final String logic = sa.getParam("AILogic");
|
||||||
|
|
||||||
|
// Filter for valid options only
|
||||||
|
if (!valid.isEmpty()) {
|
||||||
|
aiLibrary = CardLists.getValidCards(aiLibrary, valid, source.getController(), source, sa);
|
||||||
|
oppLibrary = CardLists.getValidCards(oppLibrary, valid, source.getController(), source, sa);
|
||||||
|
}
|
||||||
|
|
||||||
if (source != null && source.getState(CardStateName.Original).hasIntrinsicKeyword("Hidden agenda")) {
|
if (source != null && source.getState(CardStateName.Original).hasIntrinsicKeyword("Hidden agenda")) {
|
||||||
// If any Conspiracies are present, try not to choose the same name twice
|
// If any Conspiracies are present, try not to choose the same name twice
|
||||||
// (otherwise the AI will spam the same name)
|
// (otherwise the AI will spam the same name)
|
||||||
|
|||||||
Reference in New Issue
Block a user