forked from External/mage
AI: improved combat support:
* added support to attack battle permanents (#10246); * fixed that AI was able to attack multiple targets by single creature (#7434); * added docs; * added todos with another bugs or possible problems with AI combat;
This commit is contained in:
parent
6858d43547
commit
e4157fefb8
16 changed files with 239 additions and 89 deletions
|
|
@ -247,10 +247,10 @@ public class ContinuousEffects implements Serializable {
|
|||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
public Map<RequirementEffect, Set<Ability>> getApplicableRequirementEffects(Permanent permanent, boolean playerRealted, Game game) {
|
||||
public Map<RequirementEffect, Set<Ability>> getApplicableRequirementEffects(Permanent permanent, boolean playerRelated, Game game) {
|
||||
Map<RequirementEffect, Set<Ability>> effects = new HashMap<>();
|
||||
for (RequirementEffect effect : requirementEffects) {
|
||||
if (playerRealted == effect.isPlayerRelated()) {
|
||||
if (playerRelated == effect.isPlayerRelated()) {
|
||||
Set<Ability> abilities = requirementEffects.getAbility(effect.getId());
|
||||
Set<Ability> applicableAbilities = new HashSet<>();
|
||||
for (Ability ability : abilities) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue