Implemented Rakdos Roustabout

This commit is contained in:
Evan Kranzler 2019-01-07 17:21:53 -05:00
parent 36ed928628
commit f9eb28c6e2
2 changed files with 78 additions and 0 deletions

View file

@ -0,0 +1,77 @@
package mage.cards.r;
import mage.MageInt;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.effects.common.DamageTargetEffect;
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 mage.game.events.GameEvent;
import mage.target.targetpointer.FixedTarget;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class RakdosRoustabout extends CardImpl {
public RakdosRoustabout(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{R}");
this.subtype.add(SubType.OGRE);
this.subtype.add(SubType.WARRIOR);
this.power = new MageInt(3);
this.toughness = new MageInt(2);
// Whenever Rakdos Roustabout becomes blocked, it deals 1 damage to the player or planeswalker its attacking.
this.addAbility(new RakdosRoustaboutAbility());
}
private RakdosRoustabout(final RakdosRoustabout card) {
super(card);
}
@Override
public RakdosRoustabout copy() {
return new RakdosRoustabout(this);
}
}
class RakdosRoustaboutAbility extends TriggeredAbilityImpl {
RakdosRoustaboutAbility() {
super(Zone.BATTLEFIELD, new DamageTargetEffect(1));
}
private RakdosRoustaboutAbility(final RakdosRoustaboutAbility ability) {
super(ability);
}
@Override
public RakdosRoustaboutAbility copy() {
return new RakdosRoustaboutAbility(this);
}
@Override
public boolean checkEventType(GameEvent event, Game game) {
return event.getType() == GameEvent.EventType.ATTACKER_DECLARED;
}
@Override
public boolean checkTrigger(GameEvent event, Game game) {
if (sourceId.equals(event.getSourceId())) {
this.getEffects().get(0).setTargetPointer(new FixedTarget(game.getCombat().getDefenderId(event.getSourceId())));
return true;
}
return false;
}
@Override
public String getRule() {
return "Whenever {this} becomes blocked, it deals 1 damage to the player or planeswalker its attacking";
}
}

View file

@ -99,6 +99,7 @@ public final class RavnicaAllegiance extends ExpansionSet {
cards.add(new SetCardInfo("Rakdos Guildgate", 255, Rarity.COMMON, mage.cards.r.RakdosGuildgate.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Rakdos Guildgate", 256, Rarity.COMMON, mage.cards.r.RakdosGuildgate.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Rakdos Locket", 237, Rarity.COMMON, mage.cards.r.RakdosLocket.class));
cards.add(new SetCardInfo("Rakdos Roustabout", 198, Rarity.COMMON, mage.cards.r.RakdosRoustabout.class));
cards.add(new SetCardInfo("Rakdos, the Showstopper", 199, Rarity.MYTHIC, mage.cards.r.RakdosTheShowstopper.class));
cards.add(new SetCardInfo("Rampage of the Clans", 134, Rarity.RARE, mage.cards.r.RampageOfTheClans.class));
cards.add(new SetCardInfo("Ravager Wurm", 200, Rarity.MYTHIC, mage.cards.r.RavagerWurm.class));