simplify getCostEvent
parent
3c152a890e
commit
3521803877
|
@ -478,16 +478,15 @@ public class MagicCardDefinition {
|
||||||
}
|
}
|
||||||
|
|
||||||
public MagicEvent[] getCostEvent(final MagicCard source) {
|
public MagicEvent[] getCostEvent(final MagicCard source) {
|
||||||
final MagicManaCost cost = getCost();
|
List<MagicEvent> costEvent = new ArrayList<MagicEvent>();
|
||||||
return cost == MagicManaCost.ZERO ?
|
if (cost != MagicManaCost.ZERO) {
|
||||||
MagicEvent.NO_EVENTS :
|
costEvent.add(new MagicPayManaCostEvent(
|
||||||
new MagicEvent[]{
|
source,
|
||||||
new MagicPayManaCostEvent(
|
source.getController(),
|
||||||
source,
|
cost
|
||||||
source.getController(),
|
));
|
||||||
cost
|
}
|
||||||
)
|
return costEvent.toArray(new MagicEvent[0]);
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isPlayable(final MagicPlayerProfile profile) {
|
public boolean isPlayable(final MagicPlayerProfile profile) {
|
||||||
|
|
Loading…
Reference in New Issue