refactor: fixed dies events support in single cards (part 6);

This commit is contained in:
Oleg Agafonov 2024-11-30 16:56:00 +04:00
parent d49ff89a81
commit b1024d23fc
10 changed files with 80 additions and 29 deletions

View file

@ -1290,7 +1290,7 @@ public abstract class AbilityImpl implements Ability {
}
@Override
public boolean hasSourceObjectAbility(Game game, MageObject sourceObject, GameEvent event) {
public final boolean hasSourceObjectAbility(Game game, MageObject sourceObject, GameEvent event) {
MageObject object = sourceObject;
if (object == null) {
object = game.getPermanentEntering(getSourceId());

View file

@ -47,6 +47,7 @@ public class HauntAbility extends TriggeredAbilityImpl {
setTriggerPhrase((creatureHaunt ? "When {this} enters or the creature it haunts dies, "
: "When the creature {this} haunts dies, ")
);
setLeavesTheBattlefieldTrigger(true);
}
private HauntAbility(final HauntAbility ability) {