mirror of
https://github.com/magefree/mage.git
synced 2026-01-24 20:29:19 -08:00
[refactor] removed generic parameter from remaining Abilities
This commit is contained in:
parent
a2e086a152
commit
4fd248c4f8
69 changed files with 73 additions and 77 deletions
|
|
@ -34,9 +34,8 @@ import mage.constants.Zone;
|
|||
/**
|
||||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
* @param <T>
|
||||
*/
|
||||
public abstract class SpecialAction<T extends SpecialAction<T>> extends ActivatedAbilityImpl {
|
||||
public abstract class SpecialAction extends ActivatedAbilityImpl {
|
||||
|
||||
public SpecialAction() {
|
||||
super(AbilityType.SPECIAL_ACTION, Zone.ALL);
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ import mage.game.stack.StackObject;
|
|||
*
|
||||
* @author Plopman
|
||||
*/
|
||||
public class CycleTriggeredAbility extends ZoneChangeTriggeredAbility<CycleTriggeredAbility> {
|
||||
public class CycleTriggeredAbility extends ZoneChangeTriggeredAbility {
|
||||
|
||||
public CycleTriggeredAbility(Effect effect, boolean optional) {
|
||||
super(Zone.ALL, effect, "When you cycle {this}, ", optional);
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ import mage.game.Game;
|
|||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
public class DiesTriggeredAbility extends ZoneChangeTriggeredAbility<DiesTriggeredAbility> {
|
||||
public class DiesTriggeredAbility extends ZoneChangeTriggeredAbility {
|
||||
|
||||
public DiesTriggeredAbility(Effect effect, boolean optional) {
|
||||
super(Zone.BATTLEFIELD, Zone.GRAVEYARD, effect, "When {this} dies, ", optional);
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ import mage.game.permanent.Permanent;
|
|||
*
|
||||
* @author noxx
|
||||
*/
|
||||
public class EntersAnotherCreatureYourControlTriggeredAbility extends ZoneChangeTriggeredAbility<EntersAnotherCreatureYourControlTriggeredAbility> {
|
||||
public class EntersAnotherCreatureYourControlTriggeredAbility extends ZoneChangeTriggeredAbility {
|
||||
|
||||
public EntersAnotherCreatureYourControlTriggeredAbility(Effect effect) {
|
||||
this(effect, false);
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ import mage.abilities.effects.Effect;
|
|||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
public class LeavesBattlefieldTriggeredAbility extends ZoneChangeTriggeredAbility<LeavesBattlefieldTriggeredAbility> {
|
||||
public class LeavesBattlefieldTriggeredAbility extends ZoneChangeTriggeredAbility {
|
||||
|
||||
public LeavesBattlefieldTriggeredAbility(Effect effect, boolean optional) {
|
||||
super(Zone.BATTLEFIELD, null, effect, "When {this} leaves the battlefield, ", optional);
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import mage.constants.Zone;
|
|||
/**
|
||||
* @author Loki
|
||||
*/
|
||||
public class PutIntoGraveFromAnywhereTriggeredAbility extends ZoneChangeTriggeredAbility<PutIntoGraveFromAnywhereTriggeredAbility> {
|
||||
public class PutIntoGraveFromAnywhereTriggeredAbility extends ZoneChangeTriggeredAbility {
|
||||
public PutIntoGraveFromAnywhereTriggeredAbility(Effect effect, boolean optional) {
|
||||
super(Zone.GRAVEYARD, effect, "When {this} is put into a graveyard from anywhere, ", optional);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ import mage.target.targetpointer.FixedTarget;
|
|||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class TapLandForManaAllTriggeredManaAbility extends TriggeredManaAbility<TapLandForManaAllTriggeredManaAbility> {
|
||||
public class TapLandForManaAllTriggeredManaAbility extends TriggeredManaAbility {
|
||||
|
||||
private final boolean setTargetPointer;
|
||||
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ import mage.game.permanent.Permanent;
|
|||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class ZoneChangeAllTriggeredAbility<T extends ZoneChangeAllTriggeredAbility<T>> extends TriggeredAbilityImpl {
|
||||
public class ZoneChangeAllTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
protected FilterPermanent filter;
|
||||
protected Zone fromZone;
|
||||
|
|
@ -95,8 +95,8 @@ public class ZoneChangeAllTriggeredAbility<T extends ZoneChangeAllTriggeredAbili
|
|||
}
|
||||
|
||||
@Override
|
||||
public T copy() {
|
||||
return (T)new ZoneChangeAllTriggeredAbility(this);
|
||||
public ZoneChangeAllTriggeredAbility copy() {
|
||||
return new ZoneChangeAllTriggeredAbility(this);
|
||||
}
|
||||
|
||||
public Zone getFromZone() {
|
||||
|
|
|
|||
|
|
@ -41,9 +41,8 @@ import mage.game.permanent.Permanent;
|
|||
* Is applied when the {@link Permanent} with this ability instance changes zones.
|
||||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
* @param <T>
|
||||
*/
|
||||
public class ZoneChangeTriggeredAbility<T extends ZoneChangeTriggeredAbility<T>> extends TriggeredAbilityImpl {
|
||||
public class ZoneChangeTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
protected Zone fromZone;
|
||||
protected Zone toZone;
|
||||
|
|
@ -87,8 +86,8 @@ public class ZoneChangeTriggeredAbility<T extends ZoneChangeTriggeredAbility<T>>
|
|||
}
|
||||
|
||||
@Override
|
||||
public T copy() {
|
||||
return (T)new ZoneChangeTriggeredAbility(this);
|
||||
public ZoneChangeTriggeredAbility copy() {
|
||||
return new ZoneChangeTriggeredAbility(this);
|
||||
}
|
||||
|
||||
public Zone getFromZone() {
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ public class HauntAbility extends TriggeredAbilityImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class HauntExileAbility extends ZoneChangeTriggeredAbility<HauntExileAbility> {
|
||||
class HauntExileAbility extends ZoneChangeTriggeredAbility {
|
||||
|
||||
private final static String RULE_TEXT_CREATURE = "Haunt <i>(When this creature dies, exile it haunting target creature.)</i>";
|
||||
public HauntExileAbility() {
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ import mage.game.Game;
|
|||
*/
|
||||
|
||||
|
||||
public class ActivateIfConditionManaAbility extends ManaAbility<ActivateIfConditionManaAbility> {
|
||||
public class ActivateIfConditionManaAbility extends ManaAbility {
|
||||
|
||||
private Condition condition;
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ import mage.game.Game;
|
|||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public class ActivateOncePerTurnManaAbility extends ManaAbility<ActivateOncePerTurnManaAbility> {
|
||||
public class ActivateOncePerTurnManaAbility extends ManaAbility {
|
||||
|
||||
public ActivateOncePerTurnManaAbility(Zone zone, ManaEffect effect, Cost cost) {
|
||||
super(zone, effect, cost);
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ import mage.abilities.effects.common.AddManaOfAnyColorEffect;
|
|||
import mage.choices.ChoiceColor;
|
||||
import mage.constants.Zone;
|
||||
|
||||
public class AnyColorManaAbility extends ManaAbility<AnyColorManaAbility> {
|
||||
public class AnyColorManaAbility extends ManaAbility {
|
||||
public AnyColorManaAbility() {
|
||||
this(new TapSourceCost());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,9 +35,8 @@ import mage.abilities.effects.common.ManaEffect;
|
|||
/**
|
||||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
* @param <T>
|
||||
*/
|
||||
public abstract class BasicManaAbility<T extends BasicManaAbility<T>> extends ManaAbility<T> {
|
||||
public abstract class BasicManaAbility extends ManaAbility {
|
||||
|
||||
public BasicManaAbility(ManaEffect effect) {
|
||||
super(Zone.BATTLEFIELD, effect, new TapSourceCost());
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ import mage.abilities.effects.common.BasicManaEffect;
|
|||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
public class BlackManaAbility extends BasicManaAbility<BlackManaAbility> {
|
||||
public class BlackManaAbility extends BasicManaAbility {
|
||||
|
||||
public BlackManaAbility() {
|
||||
super(new BasicManaEffect(Mana.BlackMana));
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ import mage.abilities.effects.common.BasicManaEffect;
|
|||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
public class BlueManaAbility extends BasicManaAbility<BlueManaAbility> {
|
||||
public class BlueManaAbility extends BasicManaAbility {
|
||||
|
||||
public BlueManaAbility() {
|
||||
super(new BasicManaEffect(Mana.BlueMana));
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ import mage.abilities.effects.common.BasicManaEffect;
|
|||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
public class ColorlessManaAbility extends BasicManaAbility<ColorlessManaAbility> {
|
||||
public class ColorlessManaAbility extends BasicManaAbility {
|
||||
|
||||
public ColorlessManaAbility() {
|
||||
super(new BasicManaEffect(Mana.ColorlessMana));
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ import mage.constants.Zone;
|
|||
*
|
||||
* @author noxx
|
||||
*/
|
||||
public class ConditionalAnyColorManaAbility extends ManaAbility<ConditionalAnyColorManaAbility> {
|
||||
public class ConditionalAnyColorManaAbility extends ManaAbility {
|
||||
|
||||
public ConditionalAnyColorManaAbility(int amount, ConditionalManaBuilder manaBuilder) {
|
||||
this(new TapSourceCost(), amount, manaBuilder);
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ import mage.constants.Duration;
|
|||
/**
|
||||
* @author Plopman
|
||||
*/
|
||||
public abstract class DelayedTriggeredManaAbility<T extends DelayedTriggeredManaAbility<T>> extends DelayedTriggeredAbility {
|
||||
public abstract class DelayedTriggeredManaAbility extends DelayedTriggeredAbility {
|
||||
|
||||
public DelayedTriggeredManaAbility(Zone zone, ManaEffect effect) {
|
||||
super(effect);
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ import mage.game.Game;
|
|||
*
|
||||
* @author North
|
||||
*/
|
||||
public class DynamicManaAbility extends ManaAbility<DynamicManaAbility> {
|
||||
public class DynamicManaAbility extends ManaAbility {
|
||||
|
||||
private DynamicManaEffect manaEffect;
|
||||
private String rule;
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ import mage.abilities.effects.common.BasicManaEffect;
|
|||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
public class GreenManaAbility extends BasicManaAbility<GreenManaAbility> {
|
||||
public class GreenManaAbility extends BasicManaAbility {
|
||||
|
||||
public GreenManaAbility() {
|
||||
super(new BasicManaEffect(Mana.GreenMana));
|
||||
|
|
|
|||
|
|
@ -41,9 +41,8 @@ import java.util.UUID;
|
|||
/**
|
||||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
* @param <T>
|
||||
*/
|
||||
public abstract class ManaAbility<T extends ManaAbility<T>> extends ActivatedAbilityImpl {
|
||||
public abstract class ManaAbility extends ActivatedAbilityImpl {
|
||||
|
||||
protected Mana netMana = new Mana();
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ import mage.abilities.effects.common.BasicManaEffect;
|
|||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
public class RedManaAbility extends BasicManaAbility<RedManaAbility> {
|
||||
public class RedManaAbility extends BasicManaAbility {
|
||||
|
||||
public RedManaAbility() {
|
||||
super(new BasicManaEffect(Mana.RedMana));
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ import mage.abilities.effects.common.ManaEffect;
|
|||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
public class SimpleManaAbility extends ManaAbility<SimpleManaAbility> {
|
||||
public class SimpleManaAbility extends ManaAbility {
|
||||
|
||||
public SimpleManaAbility(Zone zone, ManaEffect effect, Cost cost) {
|
||||
super(zone, effect, cost);
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ import mage.abilities.effects.common.ManaEffect;
|
|||
* see 20110715 - 605.1b
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
public abstract class TriggeredManaAbility<T extends TriggeredManaAbility<T>> extends TriggeredAbilityImpl {
|
||||
public abstract class TriggeredManaAbility extends TriggeredAbilityImpl {
|
||||
|
||||
public TriggeredManaAbility(Zone zone, ManaEffect effect) {
|
||||
this(zone, effect, false);
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ import mage.abilities.effects.common.BasicManaEffect;
|
|||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
public class WhiteManaAbility extends BasicManaAbility<WhiteManaAbility> {
|
||||
public class WhiteManaAbility extends BasicManaAbility {
|
||||
|
||||
public WhiteManaAbility() {
|
||||
super(new BasicManaEffect(Mana.WhiteMana));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue