forked from External/mage
[EOE] Implement Cosmogoyf
This commit is contained in:
parent
4d446b0bef
commit
6af22b8144
2 changed files with 78 additions and 0 deletions
76
Mage.Sets/src/mage/cards/c/Cosmogoyf.java
Normal file
76
Mage.Sets/src/mage/cards/c/Cosmogoyf.java
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
package mage.cards.c;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.continuous.SetBasePowerToughnessPlusOneSourceEffect;
|
||||
import mage.abilities.hint.Hint;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class Cosmogoyf extends CardImpl {
|
||||
|
||||
public Cosmogoyf(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}{G}");
|
||||
|
||||
this.subtype.add(SubType.ELEMENTAL);
|
||||
this.subtype.add(SubType.LHURGOYF);
|
||||
this.power = new MageInt(0);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// This creature's power is equal to the number of cards you own in exile and its toughness is equal to that number plus 1.
|
||||
this.addAbility(new SimpleStaticAbility(
|
||||
Zone.ALL, new SetBasePowerToughnessPlusOneSourceEffect(CosmogoyfValue.instance)
|
||||
).addHint(CosmogoyfValue.instance.getHint()));
|
||||
}
|
||||
|
||||
private Cosmogoyf(final Cosmogoyf card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Cosmogoyf copy() {
|
||||
return new Cosmogoyf(this);
|
||||
}
|
||||
}
|
||||
|
||||
enum CosmogoyfValue implements DynamicValue {
|
||||
instance;
|
||||
private static final Hint hint = new ValueHint("Card you own in exile", instance);
|
||||
|
||||
public static Hint getHint() {
|
||||
return hint;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int calculate(Game game, Ability sourceAbility, Effect effect) {
|
||||
return game.getState().getExile().getAllCards(game, sourceAbility.getControllerId()).size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public CosmogoyfValue copy() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return "cards you own in exile";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "1";
|
||||
}
|
||||
}
|
||||
|
|
@ -42,6 +42,8 @@ public final class EdgeOfEternities extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Command Bridge", 252, Rarity.COMMON, mage.cards.c.CommandBridge.class));
|
||||
cards.add(new SetCardInfo("Consult the Star Charts", 325, Rarity.RARE, mage.cards.c.ConsultTheStarCharts.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Consult the Star Charts", 51, Rarity.RARE, mage.cards.c.ConsultTheStarCharts.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Cosmogoyf", 215, Rarity.RARE, mage.cards.c.Cosmogoyf.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Cosmogoyf", 313, Rarity.RARE, mage.cards.c.Cosmogoyf.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Decode Transmissions", 94, Rarity.COMMON, mage.cards.d.DecodeTransmissions.class));
|
||||
cards.add(new SetCardInfo("Embrace Oblivion", 98, Rarity.COMMON, mage.cards.e.EmbraceOblivion.class));
|
||||
cards.add(new SetCardInfo("Emergency Eject", 14, Rarity.UNCOMMON, mage.cards.e.EmergencyEject.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue