forked from External/mage
* Fixed a problem that optional effects could produce IndexOutOfBoundsExceptions.
This commit is contained in:
parent
8e42660e33
commit
ca25cc4679
5 changed files with 19 additions and 12 deletions
|
|
@ -32,6 +32,7 @@ import mage.abilities.DelayedTriggeredAbility;
|
|||
import mage.abilities.Mode;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.constants.Outcome;
|
||||
import mage.game.Game;
|
||||
|
||||
/**
|
||||
|
|
@ -53,7 +54,7 @@ public class CreateDelayedTriggeredAbilityEffect extends OneShotEffect {
|
|||
}
|
||||
|
||||
public CreateDelayedTriggeredAbilityEffect(DelayedTriggeredAbility ability, boolean copyTargets, boolean initAbility) {
|
||||
super(ability.getEffects().get(0).getOutcome());
|
||||
super(ability.getEffects().isEmpty() ? Outcome.Detriment : ability.getEffects().get(0).getOutcome());
|
||||
this.ability = ability;
|
||||
this.copyTargets = copyTargets;
|
||||
this.initAbility = initAbility;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue