forked from External/mage
rewrote enum comparisons, iterator to removeIf, added some stream and filters
This commit is contained in:
parent
05e5ca3c78
commit
3a152ab3d6
41 changed files with 178 additions and 239 deletions
|
|
@ -38,7 +38,6 @@ import mage.game.stack.Spell;
|
|||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
public class SpellCastOpponentTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
|
@ -60,7 +59,6 @@ public class SpellCastOpponentTriggeredAbility extends TriggeredAbilityImpl {
|
|||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param zone
|
||||
* @param effect
|
||||
* @param filter
|
||||
|
|
@ -89,8 +87,8 @@ public class SpellCastOpponentTriggeredAbility extends TriggeredAbilityImpl {
|
|||
if (game.getPlayer(this.getControllerId()).hasOpponent(event.getPlayerId(), game)) {
|
||||
Spell spell = game.getStack().getSpell(event.getTargetId());
|
||||
if (spell != null && filter.match(spell, game)) {
|
||||
if (!setTargetPointer.equals(SetTargetPointer.NONE)) {
|
||||
for (Effect effect: this.getEffects()) {
|
||||
if (setTargetPointer != SetTargetPointer.NONE) {
|
||||
for (Effect effect : this.getEffects()) {
|
||||
switch (setTargetPointer) {
|
||||
case SPELL:
|
||||
effect.setTargetPointer(new FixedTarget(event.getTargetId()));
|
||||
|
|
@ -101,7 +99,7 @@ public class SpellCastOpponentTriggeredAbility extends TriggeredAbilityImpl {
|
|||
default:
|
||||
throw new UnsupportedOperationException("Value of SetTargetPointer not supported!");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue