mirror of
https://github.com/magefree/mage.git
synced 2025-12-28 14:32:06 -08:00
Implemented God-Eternal Rhonas
This commit is contained in:
parent
b28bef8f62
commit
c780838d29
4 changed files with 110 additions and 7 deletions
|
|
@ -3,7 +3,7 @@ package mage.cards.g;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.GodEternalTriggeredAbility;
|
||||
import mage.abilities.common.GodEternalDiesTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.keyword.MenaceAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
@ -44,7 +44,7 @@ public final class GodEternalBontu extends CardImpl {
|
|||
this.addAbility(new EntersBattlefieldTriggeredAbility(new GodEternalBontuEffect()));
|
||||
|
||||
// When God-Eternal Bontu dies or is put into exile from the battlefield, you may put it into its owner's library third from the top.
|
||||
this.addAbility(new GodEternalTriggeredAbility());
|
||||
this.addAbility(new GodEternalDiesTriggeredAbility());
|
||||
}
|
||||
|
||||
private GodEternalBontu(final GodEternalBontu card) {
|
||||
|
|
|
|||
102
Mage.Sets/src/mage/cards/g/GodEternalRhonas.java
Normal file
102
Mage.Sets/src/mage/cards/g/GodEternalRhonas.java
Normal file
|
|
@ -0,0 +1,102 @@
|
|||
package mage.cards.g;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.GodEternalDiesTriggeredAbility;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
|
||||
import mage.abilities.keyword.DeathtouchAbility;
|
||||
import mage.abilities.keyword.VigilanceAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.AnotherPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class GodEternalRhonas extends CardImpl {
|
||||
|
||||
public GodEternalRhonas(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}{G}");
|
||||
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.ZOMBIE);
|
||||
this.subtype.add(SubType.GOD);
|
||||
this.power = new MageInt(5);
|
||||
this.toughness = new MageInt(5);
|
||||
|
||||
// Deathtouch
|
||||
this.addAbility(DeathtouchAbility.getInstance());
|
||||
|
||||
// When God-Eternal Rhonas enters the battlefield, double the power of each other creature you control until end of turn. Those creatures gain vigilance until end of turn.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new GodEternalRhonasEffect()));
|
||||
|
||||
// When God-Eternal Rhonas dies or is put into exile from the battlefield, you may put it into its owner's library third from the top.
|
||||
this.addAbility(new GodEternalDiesTriggeredAbility());
|
||||
}
|
||||
|
||||
private GodEternalRhonas(final GodEternalRhonas card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GodEternalRhonas copy() {
|
||||
return new GodEternalRhonas(this);
|
||||
}
|
||||
}
|
||||
|
||||
class GodEternalRhonasEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterPermanent filter = new FilterControlledCreaturePermanent();
|
||||
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
}
|
||||
|
||||
GodEternalRhonasEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "double the power of each other creature you control until end of turn. " +
|
||||
"Those creatures gain vigilance until end of turn.";
|
||||
}
|
||||
|
||||
private GodEternalRhonasEffect(final GodEternalRhonasEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GodEternalRhonasEffect copy() {
|
||||
return new GodEternalRhonasEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), game)) {
|
||||
if (permanent == null) {
|
||||
continue;
|
||||
}
|
||||
ContinuousEffect effect = new BoostTargetEffect(
|
||||
permanent.getPower().getValue(),
|
||||
permanent.getToughness().getValue(),
|
||||
Duration.EndOfTurn
|
||||
);
|
||||
effect.setTargetPointer(new FixedTarget(permanent, game));
|
||||
game.addEffect(effect, source);
|
||||
}
|
||||
game.addEffect(new GainAbilityControlledEffect(
|
||||
VigilanceAbility.getInstance(),
|
||||
Duration.EndOfTurn, filter
|
||||
), source);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -86,6 +86,7 @@ public final class WarOfTheSpark extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Goblin Assailant", 128, Rarity.COMMON, mage.cards.g.GoblinAssailant.class));
|
||||
cards.add(new SetCardInfo("Goblin Assault Team", 129, Rarity.COMMON, mage.cards.g.GoblinAssaultTeam.class));
|
||||
cards.add(new SetCardInfo("God-Eternal Bontu", 92, Rarity.MYTHIC, mage.cards.g.GodEternalBontu.class));
|
||||
cards.add(new SetCardInfo("God-Eternal Rhonas", 163, Rarity.MYTHIC, mage.cards.g.GodEternalRhonas.class));
|
||||
cards.add(new SetCardInfo("God-Pharaoh's Statue", 238, Rarity.UNCOMMON, mage.cards.g.GodPharaohsStatue.class));
|
||||
cards.add(new SetCardInfo("Grateful Apparition", 17, Rarity.UNCOMMON, mage.cards.g.GratefulApparition.class));
|
||||
cards.add(new SetCardInfo("Grim Initiate", 130, Rarity.COMMON, mage.cards.g.GrimInitiate.class));
|
||||
|
|
|
|||
|
|
@ -16,13 +16,13 @@ import mage.players.Player;
|
|||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public class GodEternalTriggeredAbility extends TriggeredAbilityImpl {
|
||||
public class GodEternalDiesTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
public GodEternalTriggeredAbility() {
|
||||
public GodEternalDiesTriggeredAbility() {
|
||||
super(Zone.ALL, null, true);
|
||||
}
|
||||
|
||||
private GodEternalTriggeredAbility(GodEternalTriggeredAbility ability) {
|
||||
private GodEternalDiesTriggeredAbility(GodEternalDiesTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
|
|
@ -46,8 +46,8 @@ public class GodEternalTriggeredAbility extends TriggeredAbilityImpl {
|
|||
}
|
||||
|
||||
@Override
|
||||
public GodEternalTriggeredAbility copy() {
|
||||
return new GodEternalTriggeredAbility(this);
|
||||
public GodEternalDiesTriggeredAbility copy() {
|
||||
return new GodEternalDiesTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
Loading…
Add table
Add a link
Reference in a new issue