mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
Added builder method to cards
This commit is contained in:
parent
533cc69101
commit
4de0bdec64
2 changed files with 12 additions and 9 deletions
|
@ -298,7 +298,9 @@ public class Sets extends HashMap<String, ExpansionSet> {
|
|||
public static Card createCard(Class clazz) {
|
||||
try {
|
||||
Constructor<?> con = clazz.getConstructor(new Class[]{UUID.class});
|
||||
return (Card) con.newInstance(new Object[] {null});
|
||||
Card card = (Card) con.newInstance(new Object[] {null});
|
||||
card.build();
|
||||
return card;
|
||||
} catch (Exception ex) {
|
||||
logger.fatal("Error creating card:" + clazz.getName(), ex);
|
||||
return null;
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
|
||||
package mage.sets.riseoftheeldrazi;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Constants.CardType;
|
||||
import mage.Constants.Rarity;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
|
@ -36,13 +35,15 @@ import mage.abilities.effects.common.LookLibraryAndPickControllerEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.filter.FilterCard;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX
|
||||
*/
|
||||
public class AncientStirrings extends CardImpl<AncientStirrings> {
|
||||
|
||||
private final static FilterCard filter = new FilterCard("colorless card");
|
||||
|
||||
static {
|
||||
filter.setColorless(true);
|
||||
filter.setUseColorless(true);
|
||||
|
|
Loading…
Reference in a new issue