mirror of
https://github.com/correl/mage.git
synced 2024-12-24 11:50:45 +00:00
commit
b5b73c84f4
4 changed files with 98 additions and 0 deletions
77
Mage.Sets/src/mage/cards/c/ChickenEgg.java
Normal file
77
Mage.Sets/src/mage/cards/c/ChickenEgg.java
Normal file
|
@ -0,0 +1,77 @@
|
|||
package mage.cards.c;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.SacrificeSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.token.GiantChickenToken;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author ciaccona007
|
||||
*/
|
||||
|
||||
public class ChickenEgg extends CardImpl {
|
||||
|
||||
public ChickenEgg(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}");
|
||||
|
||||
this.subtype.add(SubType.EGG);
|
||||
this.power = new MageInt(0);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// At the beginning of your upkeep, roll a six-sided die. If you roll a 6, sacrifice Chicken Egg and create a 4/4 red Giant Chicken creature token.
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new ChickenEggEffect(), TargetController.YOU, false));
|
||||
}
|
||||
|
||||
public ChickenEgg(final ChickenEgg card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChickenEgg copy() {
|
||||
return new ChickenEgg(this);
|
||||
}
|
||||
}
|
||||
|
||||
class ChickenEggEffect extends OneShotEffect {
|
||||
|
||||
ChickenEggEffect() {
|
||||
super(Outcome.Benefit);
|
||||
this.staticText = "roll a six-sided die. If you roll a 6, sacrifice {this} and create a 4/4 red Giant Chicken creature token";
|
||||
}
|
||||
|
||||
ChickenEggEffect(final ChickenEggEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
int result = controller.rollDice(game, 6);
|
||||
if (result == 6) {
|
||||
new SacrificeSourceEffect().apply(game, source);
|
||||
return (new CreateTokenEffect(new GiantChickenToken(), 1)).apply(game, source);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChickenEggEffect copy() {
|
||||
return new ChickenEggEffect(this);
|
||||
}
|
||||
}
|
|
@ -20,6 +20,7 @@ public class Unglued extends ExpansionSet {
|
|||
|
||||
private Unglued() {
|
||||
super("Unglued", "UGL", ExpansionSet.buildDate(1998, 8, 11), SetType.JOKESET);
|
||||
cards.add(new SetCardInfo("Chicken Egg", 41, Rarity.COMMON, mage.cards.c.ChickenEgg.class));
|
||||
cards.add(new SetCardInfo("Forest", 88, Rarity.LAND, mage.cards.basiclands.Forest.class, new CardGraphicInfo(FrameStyle.UGL_FULL_ART_BASIC, false)));
|
||||
cards.add(new SetCardInfo("Island", 85, Rarity.LAND, mage.cards.basiclands.Island.class, new CardGraphicInfo(FrameStyle.UGL_FULL_ART_BASIC, false)));
|
||||
cards.add(new SetCardInfo("Mountain", 87, Rarity.LAND, mage.cards.basiclands.Mountain.class, new CardGraphicInfo(FrameStyle.UGL_FULL_ART_BASIC, false)));
|
||||
|
|
|
@ -85,6 +85,7 @@ public enum SubType {
|
|||
CENTAUR("Centaur", SubTypeSet.CreatureType),
|
||||
CEREAN("Cerean", SubTypeSet.CreatureType, true), // Star Wars
|
||||
CEPHALID("Cephalid", SubTypeSet.CreatureType),
|
||||
CHICKEN("Chicken", SubTypeSet.CreatureType),
|
||||
CHIMERA("Chimera", SubTypeSet.CreatureType),
|
||||
CHISS("Chiss", SubTypeSet.CreatureType, true),
|
||||
CITIZEN("Citizen", SubTypeSet.CreatureType),
|
||||
|
@ -114,6 +115,7 @@ public enum SubType {
|
|||
DWARF("Dwarf", SubTypeSet.CreatureType),
|
||||
// E
|
||||
EFREET("Efreet", SubTypeSet.CreatureType),
|
||||
EGG("Egg", SubTypeSet.CreatureType),
|
||||
ELDER("Elder", SubTypeSet.CreatureType),
|
||||
ELDRAZI("Eldrazi", SubTypeSet.CreatureType),
|
||||
ELEMENTAL("Elemental", SubTypeSet.CreatureType),
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
package mage.game.permanent.token;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
|
||||
public class GiantChickenToken extends Token {
|
||||
|
||||
public GiantChickenToken() {
|
||||
super("Giant Chicken", "4/4 red Giant Chicken creature token");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setRed(true);
|
||||
subtype.add(SubType.GIANT);
|
||||
subtype.add(SubType.CHICKEN);
|
||||
power = new MageInt(4);
|
||||
toughness = new MageInt(4);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue