remove raw type
parent
012a968358
commit
004f7d8fb6
|
@ -10,7 +10,7 @@ import magic.model.MagicSource;
|
|||
import magic.model.choice.MagicChoice;
|
||||
import magic.model.condition.MagicCondition;
|
||||
|
||||
public abstract class MagicActivation<T extends MagicSource> implements MagicEventAction, Comparable<MagicActivation> {
|
||||
public abstract class MagicActivation<T extends MagicSource> implements MagicEventAction, Comparable<MagicActivation<?>> {
|
||||
|
||||
public static final MagicCondition[] NO_COND = new MagicCondition[0];
|
||||
|
||||
|
@ -115,7 +115,7 @@ public abstract class MagicActivation<T extends MagicSource> implements MagicEve
|
|||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(final MagicActivation other) {
|
||||
public int compareTo(final MagicActivation<?> other) {
|
||||
return Long.signum(id-other.id);
|
||||
}
|
||||
|
||||
|
|
|
@ -93,7 +93,7 @@ public class MagicEvent implements MagicCopyable {
|
|||
private final MagicSource source;
|
||||
private final MagicPlayer player;
|
||||
private final MagicChoice choice;
|
||||
private final MagicTargetPicker targetPicker;
|
||||
private final MagicTargetPicker<?> targetPicker;
|
||||
private final MagicEventAction action;
|
||||
private final String description;
|
||||
private final MagicCopyable ref;
|
||||
|
@ -103,7 +103,7 @@ public class MagicEvent implements MagicCopyable {
|
|||
final MagicSource source,
|
||||
final MagicPlayer player,
|
||||
final MagicChoice choice,
|
||||
final MagicTargetPicker targetPicker,
|
||||
final MagicTargetPicker<?> targetPicker,
|
||||
final MagicCopyable ref,
|
||||
final MagicEventAction action,
|
||||
final String description) {
|
||||
|
@ -120,7 +120,7 @@ public class MagicEvent implements MagicCopyable {
|
|||
final MagicSource source,
|
||||
final MagicPlayer player,
|
||||
final MagicChoice choice,
|
||||
final MagicTargetPicker targetPicker,
|
||||
final MagicTargetPicker<?> targetPicker,
|
||||
final int ref,
|
||||
final MagicEventAction action,
|
||||
final String description) {
|
||||
|
@ -131,7 +131,7 @@ public class MagicEvent implements MagicCopyable {
|
|||
public MagicEvent(
|
||||
final MagicSource source,
|
||||
final MagicChoice choice,
|
||||
final MagicTargetPicker targetPicker,
|
||||
final MagicTargetPicker<?> targetPicker,
|
||||
final MagicCopyable ref,
|
||||
final MagicEventAction action,
|
||||
final String description) {
|
||||
|
@ -141,7 +141,7 @@ public class MagicEvent implements MagicCopyable {
|
|||
public MagicEvent(
|
||||
final MagicSource source,
|
||||
final MagicChoice choice,
|
||||
final MagicTargetPicker targetPicker,
|
||||
final MagicTargetPicker<?> targetPicker,
|
||||
final int ref,
|
||||
final MagicEventAction action,
|
||||
final String description) {
|
||||
|
@ -152,7 +152,7 @@ public class MagicEvent implements MagicCopyable {
|
|||
final MagicSource source,
|
||||
final MagicPlayer player,
|
||||
final MagicChoice choice,
|
||||
final MagicTargetPicker targetPicker,
|
||||
final MagicTargetPicker<?> targetPicker,
|
||||
final MagicEventAction action,
|
||||
final String description) {
|
||||
this(source,player,choice,targetPicker,NO_REF,action,description);
|
||||
|
@ -161,7 +161,7 @@ public class MagicEvent implements MagicCopyable {
|
|||
public MagicEvent(
|
||||
final MagicSource source,
|
||||
final MagicChoice choice,
|
||||
final MagicTargetPicker targetPicker,
|
||||
final MagicTargetPicker<?> targetPicker,
|
||||
final MagicEventAction action,
|
||||
final String description) {
|
||||
this(source,source.getController(),choice,targetPicker,NO_REF,action,description);
|
||||
|
@ -367,7 +367,7 @@ public class MagicEvent implements MagicCopyable {
|
|||
return choice;
|
||||
}
|
||||
|
||||
public final MagicTargetPicker getTargetPicker() {
|
||||
public final MagicTargetPicker<?> getTargetPicker() {
|
||||
return targetPicker;
|
||||
}
|
||||
|
||||
|
|
|
@ -178,13 +178,13 @@ public enum MagicRuleEventAction {
|
|||
private final Pattern pattern;
|
||||
private final MagicTargetHint hint;
|
||||
public final MagicEventAction action;
|
||||
public final MagicTargetPicker picker;
|
||||
public final MagicTargetPicker<?> picker;
|
||||
|
||||
private MagicRuleEventAction(final String aPattern, final MagicEventAction aAction) {
|
||||
this(aPattern, MagicTargetHint.None, MagicDefaultTargetPicker.create(), aAction);
|
||||
}
|
||||
|
||||
private MagicRuleEventAction(final String aPattern, final MagicTargetHint aHint, final MagicTargetPicker aPicker, final MagicEventAction aAction) {
|
||||
private MagicRuleEventAction(final String aPattern, final MagicTargetHint aHint, final MagicTargetPicker<?> aPicker, final MagicEventAction aAction) {
|
||||
pattern = Pattern.compile(aPattern);
|
||||
hint = aHint;
|
||||
picker = aPicker;
|
||||
|
|
|
@ -27,12 +27,12 @@ public abstract class MagicItemOnStack implements MagicTarget, MagicMappable<Mag
|
|||
private final MagicSource source;
|
||||
private final MagicPlayer controller;
|
||||
private final MagicEvent event;
|
||||
private final MagicActivation activation; //may be null
|
||||
private final MagicActivation<?> activation; //may be null
|
||||
private final long id;
|
||||
|
||||
private Object[] choiceResults=MagicEvent.NO_CHOICE_RESULTS;
|
||||
|
||||
MagicItemOnStack(final MagicSource aSource, final MagicPlayer aController, final MagicEvent aEvent, final MagicActivation act) {
|
||||
MagicItemOnStack(final MagicSource aSource, final MagicPlayer aController, final MagicEvent aEvent, final MagicActivation<?> act) {
|
||||
source = aSource;
|
||||
controller = aController;
|
||||
event = aEvent;
|
||||
|
@ -100,7 +100,7 @@ public abstract class MagicItemOnStack implements MagicTarget, MagicMappable<Mag
|
|||
return 0;
|
||||
}
|
||||
|
||||
MagicActivation getActivation() {
|
||||
MagicActivation<?> getActivation() {
|
||||
return activation;
|
||||
}
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ public class MagicMiracleTrigger extends MagicWhenDrawnTrigger {
|
|||
// without this, card.getCardDefinition() will return UNKNOWN in simulated game
|
||||
card.reveal();
|
||||
|
||||
final MagicActivation act = card.getCardDefinition().getCastActivation();
|
||||
final MagicActivation<MagicCard> act = card.getCardDefinition().getCastActivation();
|
||||
game.addEvent(act.getEvent(card));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ public abstract class MagicWhenComesIntoPlayTrigger extends MagicTrigger<MagicPa
|
|||
final String effect = rule.toLowerCase();
|
||||
final MagicRuleEventAction ruleAction = MagicRuleEventAction.build(effect);
|
||||
final MagicEventAction action = ruleAction.action;
|
||||
final MagicTargetPicker picker = ruleAction.picker;
|
||||
final MagicTargetPicker<?> picker = ruleAction.picker;
|
||||
final MagicChoice choice = ruleAction.getChoice(effect);
|
||||
|
||||
return new MagicWhenComesIntoPlayTrigger() {
|
||||
|
@ -63,7 +63,7 @@ public abstract class MagicWhenComesIntoPlayTrigger extends MagicTrigger<MagicPa
|
|||
final String effect = rule.toLowerCase();
|
||||
final MagicRuleEventAction ruleAction = MagicRuleEventAction.build(effect);
|
||||
final MagicEventAction action = ruleAction.action;
|
||||
final MagicTargetPicker picker = ruleAction.picker;
|
||||
final MagicTargetPicker<?> picker = ruleAction.picker;
|
||||
final MagicChoice choice = ruleAction.getChoice(effect);
|
||||
|
||||
return new MagicWhenComesIntoPlayTrigger() {
|
||||
|
|
|
@ -32,7 +32,7 @@ public abstract class MagicWhenDiesTrigger extends MagicWhenPutIntoGraveyardTrig
|
|||
final String effect = rule.toLowerCase();
|
||||
final MagicRuleEventAction ruleAction = MagicRuleEventAction.build(effect);
|
||||
final MagicEventAction action = ruleAction.action;
|
||||
final MagicTargetPicker picker = ruleAction.picker;
|
||||
final MagicTargetPicker<?> picker = ruleAction.picker;
|
||||
final MagicChoice choice = ruleAction.getChoice(effect);
|
||||
|
||||
return new MagicWhenDiesTrigger() {
|
||||
|
@ -59,7 +59,7 @@ public abstract class MagicWhenDiesTrigger extends MagicWhenPutIntoGraveyardTrig
|
|||
final String effect = rule.toLowerCase();
|
||||
final MagicRuleEventAction ruleAction = MagicRuleEventAction.build(effect);
|
||||
final MagicEventAction action = ruleAction.action;
|
||||
final MagicTargetPicker picker = ruleAction.picker;
|
||||
final MagicTargetPicker<?> picker = ruleAction.picker;
|
||||
final MagicChoice choice = ruleAction.getChoice(effect);
|
||||
|
||||
return new MagicWhenDiesTrigger() {
|
||||
|
|
|
@ -37,7 +37,7 @@ public abstract class MagicWhenLeavesPlayTrigger extends MagicTrigger<MagicRemov
|
|||
final String effect = rule.toLowerCase();
|
||||
final MagicRuleEventAction ruleAction = MagicRuleEventAction.build(effect);
|
||||
final MagicEventAction action = ruleAction.action;
|
||||
final MagicTargetPicker picker = ruleAction.picker;
|
||||
final MagicTargetPicker<?> picker = ruleAction.picker;
|
||||
final MagicChoice choice = ruleAction.getChoice(effect);
|
||||
|
||||
return new MagicWhenLeavesPlayTrigger() {
|
||||
|
@ -64,7 +64,7 @@ public abstract class MagicWhenLeavesPlayTrigger extends MagicTrigger<MagicRemov
|
|||
final String effect = rule.toLowerCase();
|
||||
final MagicRuleEventAction ruleAction = MagicRuleEventAction.build(effect);
|
||||
final MagicEventAction action = ruleAction.action;
|
||||
final MagicTargetPicker picker = ruleAction.picker;
|
||||
final MagicTargetPicker<?> picker = ruleAction.picker;
|
||||
final MagicChoice choice = ruleAction.getChoice(effect);
|
||||
|
||||
return new MagicWhenLeavesPlayTrigger() {
|
||||
|
|
Loading…
Reference in New Issue