Merge branch 'master' into 'master'

Add a TODO for Ward AI

See merge request core-developers/forge!5698
This commit is contained in:
Michael Kamensky
2021-10-31 06:20:57 +00:00

View File

@@ -734,6 +734,8 @@ public class AiController {
AiPlayDecision canPlay = canPlaySa(sa); // this is the "heaviest" check, which also sets up targets, defines X, etc. AiPlayDecision canPlay = canPlaySa(sa); // this is the "heaviest" check, which also sets up targets, defines X, etc.
// Account for possible Ward after the spell is fully targeted // Account for possible Ward after the spell is fully targeted
// TODO: ideally, this should be done while targeting, so that a different target can be preferred if the best
// one is warded and can't be paid for.
if (sa.usesTargeting()) { if (sa.usesTargeting()) {
for (Card tgt : sa.getTargets().getTargetCards()) { for (Card tgt : sa.getTargets().getTargetCards()) {
if (tgt.hasKeyword(Keyword.WARD)) { if (tgt.hasKeyword(Keyword.WARD)) {