mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 19:41:59 -08:00
Implemented Grumgully, the Generous
This commit is contained in:
parent
417a582365
commit
c06a7b35a1
2 changed files with 87 additions and 0 deletions
86
Mage.Sets/src/mage/cards/g/GrumgullyTheGenerous.java
Normal file
86
Mage.Sets/src/mage/cards/g/GrumgullyTheGenerous.java
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
package mage.cards.g;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.ReplacementEffectImpl;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.counters.CounterType;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.EntersTheBattlefieldEvent;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class GrumgullyTheGenerous extends CardImpl {
|
||||
|
||||
public GrumgullyTheGenerous(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}{G}");
|
||||
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.GOBLIN);
|
||||
this.subtype.add(SubType.SHAMAN);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// Each other non-Human creature you controls enters the battlefield with an additional +1/+1 counter on it.
|
||||
this.addAbility(new SimpleStaticAbility(new GrumgullyTheGenerousReplacementEffect()));
|
||||
}
|
||||
|
||||
private GrumgullyTheGenerous(final GrumgullyTheGenerous card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GrumgullyTheGenerous copy() {
|
||||
return new GrumgullyTheGenerous(this);
|
||||
}
|
||||
}
|
||||
|
||||
class GrumgullyTheGenerousReplacementEffect extends ReplacementEffectImpl {
|
||||
|
||||
GrumgullyTheGenerousReplacementEffect() {
|
||||
super(Duration.WhileOnBattlefield, Outcome.BoostCreature);
|
||||
staticText = "Each other non-Human creature you controls " +
|
||||
"enters the battlefield with an additional +1/+1 counter on it.";
|
||||
}
|
||||
|
||||
private GrumgullyTheGenerousReplacementEffect(final GrumgullyTheGenerousReplacementEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.ENTERS_THE_BATTLEFIELD;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
Permanent creature = ((EntersTheBattlefieldEvent) event).getTarget();
|
||||
return creature != null
|
||||
&& creature.isCreature()
|
||||
&& !source.getSourceId().equals(creature.getId())
|
||||
&& creature.isControlledBy(source.getControllerId())
|
||||
&& !creature.hasSubtype(SubType.HUMAN, game);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
|
||||
Permanent creature = ((EntersTheBattlefieldEvent) event).getTarget();
|
||||
if (creature != null) {
|
||||
creature.addCounters(CounterType.P1P1.createInstance(), source, game, event.getAppliedEffects());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public GrumgullyTheGenerousReplacementEffect copy() {
|
||||
return new GrumgullyTheGenerousReplacementEffect(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -90,6 +90,7 @@ public final class ThroneOfEldraine extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Glass Casket", 15, Rarity.UNCOMMON, mage.cards.g.GlassCasket.class));
|
||||
cards.add(new SetCardInfo("Gluttonous Troll", 327, Rarity.RARE, mage.cards.g.GluttonousTroll.class));
|
||||
cards.add(new SetCardInfo("Golden Egg", 220, Rarity.COMMON, mage.cards.g.GoldenEgg.class));
|
||||
cards.add(new SetCardInfo("Grumgully, the Generous", 192, Rarity.UNCOMMON, mage.cards.g.GrumgullyTheGenerous.class));
|
||||
cards.add(new SetCardInfo("Harmonious Archon", 17, Rarity.MYTHIC, mage.cards.h.HarmoniousArchon.class));
|
||||
cards.add(new SetCardInfo("Heraldic Banner", 222, Rarity.UNCOMMON, mage.cards.h.HeraldicBanner.class));
|
||||
cards.add(new SetCardInfo("Hypnotic Sprite", 49, Rarity.UNCOMMON, mage.cards.h.HypnoticSprite.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue