[J25] Implement Ozox, the Clattering King

This commit is contained in:
theelk801 2024-11-12 12:15:25 -05:00
parent 202edaa7f4
commit 659fadba96
3 changed files with 97 additions and 0 deletions

View file

@ -0,0 +1,45 @@
package mage.cards.o;
import mage.MageInt;
import mage.abilities.common.CantBlockAbility;
import mage.abilities.common.DiesSourceTriggeredAbility;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.game.permanent.token.JumblebonesToken;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class OzoxTheClatteringKing extends CardImpl {
public OzoxTheClatteringKing(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}");
this.supertype.add(SuperType.LEGENDARY);
this.subtype.add(SubType.SKELETON);
this.subtype.add(SubType.NOBLE);
this.power = new MageInt(3);
this.toughness = new MageInt(2);
// Ozox, the Clattering King can't block.
this.addAbility(new CantBlockAbility());
// When Ozox dies, create Jumblebones, a legendary 2/1 black Skeleton creature token with "This creature can't block" and "When this creature leaves the battlefield, return target card named Ozox, the Clattering King from your graveyard to your hand."
this.addAbility(new DiesSourceTriggeredAbility(new CreateTokenEffect(new JumblebonesToken())));
}
private OzoxTheClatteringKing(final OzoxTheClatteringKing card) {
super(card);
}
@Override
public OzoxTheClatteringKing copy() {
return new OzoxTheClatteringKing(this);
}
}

View file

@ -491,6 +491,7 @@ public final class FoundationsJumpstart extends ExpansionSet {
cards.add(new SetCardInfo("Overflowing Insight", 341, Rarity.MYTHIC, mage.cards.o.OverflowingInsight.class));
cards.add(new SetCardInfo("Overwhelm", 697, Rarity.UNCOMMON, mage.cards.o.Overwhelm.class));
cards.add(new SetCardInfo("Owl Familiar", 342, Rarity.COMMON, mage.cards.o.OwlFamiliar.class));
cards.add(new SetCardInfo("Ozox, the Clattering King", 44, Rarity.UNCOMMON, mage.cards.o.OzoxTheClatteringKing.class));
cards.add(new SetCardInfo("Pacifism", 234, Rarity.COMMON, mage.cards.p.Pacifism.class));
cards.add(new SetCardInfo("Padeem, Consul of Innovation", 62, Rarity.RARE, mage.cards.p.PadeemConsulOfInnovation.class));
cards.add(new SetCardInfo("Paladin of the Bloodstained", 235, Rarity.COMMON, mage.cards.p.PaladinOfTheBloodstained.class));

View file

@ -0,0 +1,51 @@
package mage.game.permanent.token;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.CantBlockAbility;
import mage.abilities.common.LeavesBattlefieldTriggeredAbility;
import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.filter.FilterCard;
import mage.filter.predicate.mageobject.NamePredicate;
import mage.target.common.TargetCardInYourGraveyard;
/**
* @author TheElk801
*/
public final class JumblebonesToken extends TokenImpl {
private static final FilterCard filter = new FilterCard("card named Ozox, the Clattering King from your graveyard");
static {
filter.add(new NamePredicate("Ozox, the Clattering King"));
}
public JumblebonesToken() {
super("Jumblebones", "Jumblebones, a legendary 2/1 black Skeleton creature token with \"This creature can't block\" and \"When this creature leaves the battlefield, return target card named Ozox, the Clattering King from your graveyard to your hand.\"");
supertype.add(SuperType.LEGENDARY);
cardType.add(CardType.CREATURE);
subtype.add(SubType.SKELETON);
color.setBlack(true);
power = new MageInt(2);
toughness = new MageInt(1);
// This creature can't block
this.addAbility(new CantBlockAbility());
// When this creature leaves the battlefield, return target card named Ozox, the Clattering King from your graveyard to your hand.
Ability ability = new LeavesBattlefieldTriggeredAbility(new ReturnFromGraveyardToHandTargetEffect());
ability.addTarget(new TargetCardInYourGraveyard(filter));
this.addAbility(ability);
}
private JumblebonesToken(final JumblebonesToken token) {
super(token);
}
public JumblebonesToken copy() {
return new JumblebonesToken(this);
}
}