mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -08:00
Merge pull request #1241 from BijanT/master
Implemented Cards: Grave Scrabbler, EbonbladeReaper
This commit is contained in:
commit
83230aebc2
4 changed files with 229 additions and 5 deletions
48
Mage.Sets/src/mage/sets/futuresight/GraveScrabbler.java
Normal file
48
Mage.Sets/src/mage/sets/futuresight/GraveScrabbler.java
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
package mage.sets.futuresight;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||
import mage.abilities.keyword.MadnessAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.MageInt;
|
||||
import mage.target.common.TargetCardInGraveyard;
|
||||
|
||||
public class GraveScrabbler extends CardImpl{
|
||||
|
||||
public GraveScrabbler(UUID ownerId) {
|
||||
super(ownerId, 86, "Grave Scrabbler", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{3}{B}");
|
||||
this.expansionSetCode = "FUT";
|
||||
this.subtype.add("Zombie");
|
||||
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
//Madness {1}{B}
|
||||
this.addAbility(new MadnessAbility(this, new ManaCostsImpl("{1}{B}")));
|
||||
|
||||
//When Grave Scrabbler enters the battlefield, if its madness cost was paid,
|
||||
//you may return target creature card from a graveyard to its owner's hand.
|
||||
EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect(), true);
|
||||
ability.addTarget(new TargetCardInGraveyard(new FilterCreatureCard("creature card in a graveyard")));
|
||||
this.addAbility(new ConditionalTriggeredAbility(ability, MadnessAbility.GetCondition(),
|
||||
"When {this} enters the battlefield, if its madness cost was paid, you may return target creature card from a graveyard to its owner's hand."));
|
||||
}
|
||||
|
||||
public GraveScrabbler(final GraveScrabbler card){
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Card copy() {
|
||||
return new GraveScrabbler(this);
|
||||
}
|
||||
|
||||
}
|
||||
116
Mage.Sets/src/mage/sets/onslaught/EbonbladeReaper.java
Normal file
116
Mage.Sets/src/mage/sets/onslaught/EbonbladeReaper.java
Normal file
|
|
@ -0,0 +1,116 @@
|
|||
/*
|
||||
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are
|
||||
* permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this list of
|
||||
* conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
||||
* of conditions and the following disclaimer in the documentation and/or other materials
|
||||
* provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are those of the
|
||||
* authors and should not be interpreted as representing official policies, either expressed
|
||||
* or implied, of BetaSteward_at_googlemail.com.
|
||||
*/
|
||||
package mage.sets.onslaught;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.AttacksTriggeredAbility;
|
||||
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.LoseHalfLifeEffect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.keyword.MorphAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Rarity;
|
||||
import mage.MageInt;
|
||||
import mage.constants.Outcome;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author BijanT
|
||||
*/
|
||||
public class EbonbladeReaper extends CardImpl{
|
||||
|
||||
public EbonbladeReaper(UUID ownerId)
|
||||
{
|
||||
super(ownerId, 141, "Ebonblade Reaper", Rarity.RARE, new CardType[]{CardType.CREATURE}, "{2}{B}");
|
||||
this.expansionSetCode = "ONS";
|
||||
this.subtype.add("Human");
|
||||
this.subtype.add("Cleric");
|
||||
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
//Whenever Ebonblade Reaper attacks, you lose half your life, rounded up.
|
||||
this.addAbility(new AttacksTriggeredAbility(new LoseHalfLifeEffect(), false));
|
||||
|
||||
//Whenever Ebonblade Reaper deals combat damage to a player, that player loses half his or her life, rounded up.
|
||||
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new EbonbladeReaperEffect(), false, true));
|
||||
|
||||
//Morph {3}{B}{B}
|
||||
this.addAbility(new MorphAbility(this, new ManaCostsImpl<>("{3}{B}{B}")));
|
||||
}
|
||||
|
||||
public EbonbladeReaper(final EbonbladeReaper card)
|
||||
{
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Card copy() {
|
||||
return new EbonbladeReaper(this);
|
||||
}
|
||||
}
|
||||
|
||||
class EbonbladeReaperEffect extends OneShotEffect
|
||||
{
|
||||
|
||||
public EbonbladeReaperEffect()
|
||||
{
|
||||
super(Outcome.Damage);
|
||||
this.staticText = "that player loses half his or her life, rounded up.";
|
||||
}
|
||||
|
||||
public EbonbladeReaperEffect(final EbonbladeReaperEffect effect)
|
||||
{
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Effect copy() {
|
||||
return new EbonbladeReaperEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(getTargetPointer().getFirst(game, source));
|
||||
if (player != null) {
|
||||
Integer amount = (int) Math.ceil(player.getLife() / 2f);
|
||||
if (amount > 0) {
|
||||
player.loseLife(amount, game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue