fix: attack ability trigger for opponent creatures (#7697)

The checkTrigger of ZurzothChaosRiderAttackAbility wasn't filtering creatures controlled by Zurzoth's controller
This commit is contained in:
Damiano Carradori 2021-04-06 02:50:14 +02:00 committed by GitHub
parent fbe6e490e9
commit ad91a4ccad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -121,6 +121,7 @@ class ZurzothChaosRiderAttackAbility extends TriggeredAbilityImpl {
.stream()
.map(game::getPermanent)
.filter(Objects::nonNull)
.filter(permanent -> permanent.isControlledBy(this.getControllerId()))
.filter(permanent -> permanent.hasSubtype(SubType.DEVIL, game))
.map(MageItem::getId)
.map(game.getCombat()::getDefenderId)
@ -131,7 +132,7 @@ class ZurzothChaosRiderAttackAbility extends TriggeredAbilityImpl {
if (playerIds.isEmpty()) {
return false;
}
playerIds.add(getControllerId());
playerIds.add(this.getControllerId());
this.getEffects().clear();
this.addEffect(new ZurzothChaosRiderEffect(playerIds));
return true;