mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
[UNF] Implemented Non-Human Cannonball
This commit is contained in:
parent
84f4a35553
commit
29ecfb9f08
2 changed files with 73 additions and 0 deletions
72
Mage.Sets/src/mage/cards/n/NonHumanCannonball.java
Normal file
72
Mage.Sets/src/mage/cards/n/NonHumanCannonball.java
Normal file
|
@ -0,0 +1,72 @@
|
|||
package mage.cards.n;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DiesSourceTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class NonHumanCannonball extends CardImpl {
|
||||
|
||||
public NonHumanCannonball(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{2}{R}");
|
||||
|
||||
this.subtype.add(SubType.CLOWN);
|
||||
this.subtype.add(SubType.ROBOT);
|
||||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// When Non-Human Cannonball dies, roll a six-sided die. If the result is 4 or less, Non-Human Cannonball deals that much damage to you.
|
||||
this.addAbility(new DiesSourceTriggeredAbility(new NonHumanCannonballEffect()));
|
||||
}
|
||||
|
||||
private NonHumanCannonball(final NonHumanCannonball card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public NonHumanCannonball copy() {
|
||||
return new NonHumanCannonball(this);
|
||||
}
|
||||
}
|
||||
|
||||
class NonHumanCannonballEffect extends OneShotEffect {
|
||||
|
||||
NonHumanCannonballEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "roll a six-sided die. If the result is 4 or less, {this} deals that much damage to you";
|
||||
}
|
||||
|
||||
private NonHumanCannonballEffect(final NonHumanCannonballEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public NonHumanCannonballEffect copy() {
|
||||
return new NonHumanCannonballEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
int result = player.rollDice(outcome, source, game, 6);
|
||||
if (result <= 4) {
|
||||
player.damage(result, source, game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -33,6 +33,7 @@ public final class Unfinity extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Lila, Hospitality Hostess", 170, Rarity.MYTHIC, mage.cards.l.LilaHospitalityHostess.class));
|
||||
cards.add(new SetCardInfo("Monoxa, Midway Manager", 173, Rarity.UNCOMMON, mage.cards.m.MonoxaMidwayManager.class));
|
||||
cards.add(new SetCardInfo("Mountain", 238, Rarity.LAND, mage.cards.basiclands.Mountain.class, FULL_ART_BFZ_VARIOUS));
|
||||
cards.add(new SetCardInfo("Non-Human Cannonball", 115, Rarity.COMMON, mage.cards.n.NonHumanCannonball.class));
|
||||
cards.add(new SetCardInfo("One-Clown Band", 117, Rarity.COMMON, mage.cards.o.OneClownBand.class));
|
||||
cards.add(new SetCardInfo("Overgrown Tomb", 284, Rarity.RARE, mage.cards.o.OvergrownTomb.class));
|
||||
cards.add(new SetCardInfo("Plains", 235, Rarity.LAND, mage.cards.basiclands.Plains.class, FULL_ART_BFZ_VARIOUS));
|
||||
|
|
Loading…
Reference in a new issue