fixed Vaevictis Asmadi, the Dire's triggered ability triggering incorrectly and not properly forcing sacrifice
@@ -23,6 +23,7 @@ import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.permanent.Permanent;
import mage.players.Player;
+import mage.target.Target;
import mage.target.TargetPermanent;
/**
@@ -79,6 +80,9 @@ class VaevictisAsmadiTheDireTriggeredAbility extends TriggeredAbilityImpl {
@Override
public boolean checkTrigger(GameEvent event, Game game) {
+ if (!game.getCombat().getAttackers().contains(this.getSourceId())) {
+ return false;
+ }
this.getTargets().clear();
for (UUID playerId : game.getState().getPlayerList(this.getControllerId())) {
Player player = game.getPlayer(playerId);
@@ -125,7 +129,8 @@ class VaevictisAsmadiTheDireEffect extends OneShotEffect {
@Override
public boolean apply(Game game, Ability source) {
List<Player> playersToFlip = new ArrayList();
- for (UUID permId : this.getTargetPointer().getTargets(game, source)) {
+ for (Target target : source.getTargets()) {
+ for (UUID permId : target.getTargets()) {
Permanent permanent = game.getPermanent(permId);
if (permanent == null
|| !permanent.sacrifice(source.getSourceId(), game)) {
@@ -136,6 +141,7 @@ class VaevictisAsmadiTheDireEffect extends OneShotEffect {
playersToFlip.add(player);
}
}
+ }
for (Player player : playersToFlip) {
if (player == null) {
return false;
