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,20 +35,22 @@ 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);
|
||||
}
|
||||
|
||||
|
||||
public AncientStirrings (UUID ownerId) {
|
||||
public AncientStirrings(UUID ownerId) {
|
||||
super(ownerId, 174, "Ancient Stirrings", Rarity.COMMON, new CardType[]{CardType.SORCERY}, "{G}");
|
||||
this.expansionSetCode = "ROE";
|
||||
this.color.setGreen(true);
|
||||
|
@ -59,7 +60,7 @@ public class AncientStirrings extends CardImpl<AncientStirrings> {
|
|||
this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(new StaticValue(5), false, new StaticValue(1), filter, false));
|
||||
}
|
||||
|
||||
public AncientStirrings (final AncientStirrings card) {
|
||||
public AncientStirrings(final AncientStirrings card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue