mirror of
https://github.com/correl/mage.git
synced 2024-11-14 19:19:32 +00:00
Implemented Frenzied Arynx
This commit is contained in:
parent
e56e7a6def
commit
2b6f85df23
4 changed files with 149 additions and 0 deletions
51
Mage.Sets/src/mage/cards/f/FrenziedArynx.java
Normal file
51
Mage.Sets/src/mage/cards/f/FrenziedArynx.java
Normal file
|
@ -0,0 +1,51 @@
|
|||
package mage.cards.f;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||
import mage.abilities.keyword.RiotAbility;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class FrenziedArynx extends CardImpl {
|
||||
|
||||
public FrenziedArynx(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{G}");
|
||||
|
||||
this.subtype.add(SubType.CAT);
|
||||
this.subtype.add(SubType.BEAST);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// Riot
|
||||
this.addAbility(new RiotAbility());
|
||||
|
||||
// Trample
|
||||
this.addAbility(TrampleAbility.getInstance());
|
||||
|
||||
// {4}{R}{G}: Frenzied Arynx gets +3/+0 until end of turn.
|
||||
this.addAbility(new SimpleActivatedAbility(
|
||||
new BoostSourceEffect(3, 0, Duration.EndOfTurn),
|
||||
new ManaCostsImpl("{4}{R}{G}")
|
||||
));
|
||||
}
|
||||
|
||||
public FrenziedArynx(final FrenziedArynx card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FrenziedArynx copy() {
|
||||
return new FrenziedArynx(this);
|
||||
}
|
||||
}
|
|
@ -34,6 +34,7 @@ public final class RavnicaAllegiance extends ExpansionSet {
|
|||
|
||||
cards.add(new SetCardInfo("Aeromunculus", 152, Rarity.COMMON, mage.cards.a.Aeromunculus.class));
|
||||
cards.add(new SetCardInfo("Bedevil", 157, Rarity.RARE, mage.cards.b.Bedevil.class));
|
||||
cards.add(new SetCardInfo("Frenzied Arynx", 173, Rarity.COMMON, mage.cards.f.FrenziedArynx.class));
|
||||
cards.add(new SetCardInfo("Gate Colossus", 232, Rarity.UNCOMMON, mage.cards.g.GateColossus.class));
|
||||
cards.add(new SetCardInfo("Growth Spiral", 178, Rarity.COMMON, mage.cards.g.GrowthSpiral.class));
|
||||
cards.add(new SetCardInfo("Imperious Oligarch", 184, Rarity.COMMON, mage.cards.i.ImperiousOligarch.class));
|
||||
|
|
96
Mage/src/main/java/mage/abilities/keyword/RiotAbility.java
Normal file
96
Mage/src/main/java/mage/abilities/keyword/RiotAbility.java
Normal file
|
@ -0,0 +1,96 @@
|
|||
|
||||
package mage.abilities.keyword;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.Mode;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.ReplacementEffectImpl;
|
||||
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.EntersTheBattlefieldEvent;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.GameEvent.EventType;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class RiotAbility extends SimpleStaticAbility {
|
||||
|
||||
public RiotAbility() {
|
||||
super(Zone.ALL, new RiotReplacementEffect());
|
||||
}
|
||||
|
||||
private RiotAbility(final RiotAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RiotAbility copy() {
|
||||
return new RiotAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Riot <i>(This creature enters the battlefield with your choice of a +1/+1 counter or haste.)</i>";
|
||||
}
|
||||
}
|
||||
|
||||
class RiotReplacementEffect extends ReplacementEffectImpl {
|
||||
|
||||
RiotReplacementEffect() {
|
||||
super(Duration.EndOfGame, Outcome.Detriment);
|
||||
}
|
||||
|
||||
private RiotReplacementEffect(final RiotReplacementEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType() == EventType.ENTERS_THE_BATTLEFIELD;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
return event.getTargetId().equals(source.getSourceId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||
Permanent creature = ((EntersTheBattlefieldEvent) event).getTarget();
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (creature != null && controller != null) {
|
||||
if (controller.chooseUse(outcome, "Have " + creature.getLogName() + " enter the battlefield with a +1/+1 counter on it? (If you don't it has haste)", source, game)) {
|
||||
if (!game.isSimulation()) {
|
||||
game.informPlayers(controller.getLogName() + " choose to put a +1/+1 counter on " + creature.getName());
|
||||
}
|
||||
creature.addCounters(CounterType.P1P1.createInstance(), source, game, event.getAppliedEffects());
|
||||
} else {
|
||||
game.addEffect(new GainAbilitySourceEffect(HasteAbility.getInstance(), Duration.Custom), source);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(Mode mode) {
|
||||
return staticText;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RiotReplacementEffect copy() {
|
||||
return new RiotReplacementEffect(this);
|
||||
}
|
||||
|
||||
}
|
|
@ -76,6 +76,7 @@ Prowess|new|
|
|||
Reach|instance|
|
||||
Rebound|new|
|
||||
Renown|number|
|
||||
Riot|new|
|
||||
Scavenge|cost|
|
||||
Shadow|instance|
|
||||
Shroud|instance|
|
||||
|
|
Loading…
Reference in a new issue