From e43bc35c14ae5080e34bbd846927b772a7e2ed79 Mon Sep 17 00:00:00 2001 From: North Date: Sat, 31 May 2014 23:19:26 +0300 Subject: [PATCH] [refactor] removed generic parameter from Spell --- Mage.Common/src/mage/view/CardView.java | 2 +- Mage/src/mage/abilities/AbilityImpl.java | 6 +++--- Mage/src/mage/game/stack/Spell.java | 5 ++--- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Mage.Common/src/mage/view/CardView.java b/Mage.Common/src/mage/view/CardView.java index d1e8b55cff9..55a36c91814 100644 --- a/Mage.Common/src/mage/view/CardView.java +++ b/Mage.Common/src/mage/view/CardView.java @@ -224,7 +224,7 @@ public class CardView extends SimpleCardView { if (card instanceof Spell) { this.mageObjectType = MageObjectType.SPELL; - Spell spell = (Spell) card; + Spell spell = (Spell) card; for (SpellAbility spellAbility: spell.getSpellAbilities()) { for(UUID modeId : spellAbility.getModes().getSelectedModes()) { spellAbility.getModes().setMode(spellAbility.getModes().get(modeId)); diff --git a/Mage/src/mage/abilities/AbilityImpl.java b/Mage/src/mage/abilities/AbilityImpl.java index 09798babc9f..3a9f11e2601 100644 --- a/Mage/src/mage/abilities/AbilityImpl.java +++ b/Mage/src/mage/abilities/AbilityImpl.java @@ -831,7 +831,7 @@ public abstract class AbilityImpl> implements Ability { } } else { if (object instanceof Spell) { - Spell spell = (Spell) object; + Spell spell = (Spell) object; String castText = spell.getSpellAbility().toString(); sb.append((castText.startsWith("Cast ") ? castText.substring(5):castText)); if (spell.getFromZone() == Zone.GRAVEYARD) { @@ -847,7 +847,7 @@ public abstract class AbilityImpl> implements Ability { } if (object instanceof Spell && ((Spell) object).getSpellAbilities().size() > 1) { if (((Spell) object).getSpellAbility().getSpellAbilityType().equals(SpellAbilityType.SPLIT_FUSED)) { - Spell spell = (Spell) object; + Spell spell = (Spell) object; int i = 0; for (SpellAbility spellAbility : spell.getSpellAbilities()) { i++; @@ -865,7 +865,7 @@ public abstract class AbilityImpl> implements Ability { } } } else { - Spell spell = (Spell) object; + Spell spell = (Spell) object; int i = 0; for (SpellAbility spellAbility : spell.getSpellAbilities()) { i++; diff --git a/Mage/src/mage/game/stack/Spell.java b/Mage/src/mage/game/stack/Spell.java index af9589b2f4a..10655d6a7b9 100644 --- a/Mage/src/mage/game/stack/Spell.java +++ b/Mage/src/mage/game/stack/Spell.java @@ -67,9 +67,8 @@ import mage.watchers.Watcher; /** * * @author BetaSteward_at_googlemail.com - * @param */ -public class Spell> implements StackObject, Card { +public class Spell implements StackObject, Card { private final List spellCards = new ArrayList<>(); private final List spellAbilities = new ArrayList<>(); @@ -100,7 +99,7 @@ public class Spell> implements StackObject, Card { this.fromZone = fromZone; } - public Spell(final Spell spell) { + public Spell(final Spell spell) { this.id = spell.id; for (SpellAbility spellAbility: spell.spellAbilities) { this.spellAbilities.add(spellAbility.copy());