removed deprecated method for adding delayed triggered abilities

This commit is contained in:
Evan Kranzler 2021-04-17 12:13:37 -04:00
parent 1685b9a4ee
commit cbc949c08e
4 changed files with 9 additions and 20 deletions

View file

@ -203,7 +203,7 @@ class LukkaWaywardBonderReturnEffect extends OneShotEffect {
.setText("Exile it at the beginning of your next upkeep.")
.setTargetPointer(new FixedTarget(permanent, game)),
Duration.Custom, true
));
), source);
return true;
}
}

View file

@ -425,8 +425,6 @@ public interface Game extends MageItem, Serializable {
void addTriggeredAbility(TriggeredAbility ability, GameEvent triggeringEvent);
UUID addDelayedTriggeredAbility(DelayedTriggeredAbility delayedAbility);
UUID addDelayedTriggeredAbility(DelayedTriggeredAbility delayedAbility, Ability source);
UUID fireReflexiveTriggeredAbility(ReflexiveTriggeredAbility reflexiveAbility, Ability source);

View file

@ -1778,25 +1778,16 @@ public abstract class GameImpl implements Game, Serializable {
@Override
public UUID addDelayedTriggeredAbility(DelayedTriggeredAbility delayedAbility, Ability source) {
if (source != null) {
delayedAbility.setSourceId(source.getSourceId());
delayedAbility.setControllerId(source.getControllerId());
}
// return addDelayedTriggeredAbility(delayedAbility);
DelayedTriggeredAbility newAbility = delayedAbility.copy();
newAbility.newId();
if (source != null) {
newAbility.setSourceObjectZoneChangeCounter(getState().getZoneChangeCounter(source.getSourceId()));
newAbility.initOnAdding(this);
// ability.init is called as the ability triggeres not now.
// If a FixedTarget pointer is already set from the effect setting up this delayed ability
// it has to be already initialized so it won't be overwitten as the ability triggers
getState().addDelayedTriggeredAbility(newAbility);
return newAbility.getId();
}
@Deprecated
@Override
public UUID addDelayedTriggeredAbility(DelayedTriggeredAbility delayedAbility) {
DelayedTriggeredAbility newAbility = delayedAbility.copy();
newAbility.newId();
newAbility.initOnAdding(this);
// ability.init is called as the ability triggeres not now.
// If a FixedTarget pointer is already set from the effect setting up this delayed ability

View file

@ -553,7 +553,7 @@ public abstract class PlayerImpl implements Player, Serializable {
new LoseControlOnOtherPlayersControllerEffect(this.getLogName(), player.getLogName()));
ability.setSourceId(getId());
ability.setControllerId(getId());
game.addDelayedTriggeredAbility(ability);
game.addDelayedTriggeredAbility(ability, null);
}
}