mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
[KHM] Implemented Birgi, God of Storytelling
This commit is contained in:
parent
8e47f00716
commit
6837a02518
4 changed files with 138 additions and 1 deletions
91
Mage.Sets/src/mage/cards/b/BirgiGodOfStorytelling.java
Normal file
91
Mage.Sets/src/mage/cards/b/BirgiGodOfStorytelling.java
Normal file
|
@ -0,0 +1,91 @@
|
|||
package mage.cards.b;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.Mana;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.costs.common.DiscardCardCost;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.ExileTopXMayPlayUntilEndOfTurnEffect;
|
||||
import mage.abilities.keyword.BoastAbility;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.cards.ModalDoubleFacesCard;
|
||||
import mage.constants.*;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class BirgiGodOfStorytelling extends ModalDoubleFacesCard {
|
||||
|
||||
public BirgiGodOfStorytelling(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo,
|
||||
new CardType[]{CardType.CREATURE}, new SubType[]{SubType.GOD}, "{2}{R}",
|
||||
"Harnfel, Horn of Bounty", new CardType[]{CardType.ARTIFACT}, new SubType[]{}, "{4}{R}"
|
||||
);
|
||||
|
||||
// 1.
|
||||
// Birgi, God of Storytelling
|
||||
// Legendary Creature - God
|
||||
this.getLeftHalfCard().addSuperType(SuperType.LEGENDARY);
|
||||
this.getLeftHalfCard().setPT(new MageInt(3), new MageInt(3));
|
||||
|
||||
// Whenever you cast a spell, add {R}. Until end of turn, you don't lose this mana as steps and phases end.
|
||||
this.getLeftHalfCard().addAbility(new SpellCastControllerTriggeredAbility(
|
||||
new BirgiGodOfStorytellingManaEffect(), false
|
||||
));
|
||||
|
||||
// Creatures you control can boast twice during each of your turns rather than once.
|
||||
this.getLeftHalfCard().addAbility(BoastAbility.makeBoastTwiceAbility());
|
||||
|
||||
// 2.
|
||||
// Harnfel, Horn of Bounty
|
||||
// Legendary Artifact
|
||||
this.getRightHalfCard().addSuperType(SuperType.LEGENDARY);
|
||||
|
||||
// Discard a card: Exile the top two cards of your library. You may play those cards this turn.
|
||||
this.getRightHalfCard().addAbility(new SimpleActivatedAbility(
|
||||
new ExileTopXMayPlayUntilEndOfTurnEffect(2), new DiscardCardCost()
|
||||
));
|
||||
}
|
||||
|
||||
private BirgiGodOfStorytelling(final BirgiGodOfStorytelling card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BirgiGodOfStorytelling copy() {
|
||||
return new BirgiGodOfStorytelling(this);
|
||||
}
|
||||
}
|
||||
|
||||
class BirgiGodOfStorytellingManaEffect extends OneShotEffect {
|
||||
|
||||
BirgiGodOfStorytellingManaEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "add {R}. Until end of turn, you don't lose this mana as steps and phases end";
|
||||
}
|
||||
|
||||
private BirgiGodOfStorytellingManaEffect(final BirgiGodOfStorytellingManaEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BirgiGodOfStorytellingManaEffect copy() {
|
||||
return new BirgiGodOfStorytellingManaEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
player.getManaPool().addMana(new Mana(ManaType.RED, 1), game, source, true);
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -96,6 +96,7 @@ public final class Kaldheim extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Behold the Multiverse", 46, Rarity.COMMON, mage.cards.b.BeholdTheMultiverse.class));
|
||||
cards.add(new SetCardInfo("Beskir Shieldmate", 4, Rarity.COMMON, mage.cards.b.BeskirShieldmate.class));
|
||||
cards.add(new SetCardInfo("Binding the Old Gods", 206, Rarity.UNCOMMON, mage.cards.b.BindingTheOldGods.class));
|
||||
cards.add(new SetCardInfo("Birgi, God of Storytelling", 123, Rarity.RARE, mage.cards.b.BirgiGodOfStorytelling.class));
|
||||
cards.add(new SetCardInfo("Blightstep Pathway", 252, Rarity.RARE, mage.cards.b.BlightstepPathway.class));
|
||||
cards.add(new SetCardInfo("Blizzard Brawl", 162, Rarity.UNCOMMON, mage.cards.b.BlizzardBrawl.class));
|
||||
cards.add(new SetCardInfo("Bloodline Pretender", 235, Rarity.UNCOMMON, mage.cards.b.BloodlinePretender.class));
|
||||
|
|
|
@ -1,15 +1,21 @@
|
|||
package mage.abilities.keyword;
|
||||
|
||||
import mage.abilities.ActivatedAbilityImpl;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.BoastCondition;
|
||||
import mage.abilities.costs.Cost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.InfoEffect;
|
||||
import mage.abilities.hint.common.BoastHint;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.watchers.common.AttackedThisTurnWatcher;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* @author weirddan455
|
||||
*/
|
||||
|
@ -42,8 +48,47 @@ public class BoastAbility extends ActivatedAbilityImpl {
|
|||
return super.hasMoreActivationsThisTurn(game);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxActivationsPerTurn(Game game) {
|
||||
if (!game.isActivePlayer(getControllerId())) {
|
||||
return 1;
|
||||
}
|
||||
Permanent permanent = game.getPermanent(getSourceId());
|
||||
if (permanent != null && !permanent.isCreature()) {
|
||||
return 1;
|
||||
}
|
||||
return game.getBattlefield()
|
||||
.getActivePermanents(
|
||||
StaticFilters.FILTER_CONTROLLED_PERMANENT,
|
||||
getControllerId(), getSourceId(), game
|
||||
).stream()
|
||||
.map(p -> p.getAbilities(game))
|
||||
.flatMap(Collection::stream)
|
||||
.anyMatch(BoastTwiceAbility.class::isInstance) ? 2 : 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Boast — " + super.getRule() + " <i>(Activate this ability only if this creature attacked this turn and only once each turn.)</i>";
|
||||
}
|
||||
|
||||
private static final class BoastTwiceAbility extends SimpleStaticAbility {
|
||||
|
||||
private BoastTwiceAbility() {
|
||||
super(new InfoEffect("Creatures you control can boast twice during each of your turns rather than once."));
|
||||
}
|
||||
|
||||
private BoastTwiceAbility(final BoastTwiceAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BoastTwiceAbility copy() {
|
||||
return new BoastTwiceAbility(this);
|
||||
}
|
||||
}
|
||||
|
||||
public static BoastTwiceAbility makeBoastTwiceAbility() {
|
||||
return new BoastTwiceAbility();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40135,7 +40135,7 @@ Arni Brokenbrow|Kaldheim|120|R|{2}{R}|Legendary Creature - Human Berserker|3|3|H
|
|||
Axgard Cavalry|Kaldheim|121|C|{1}{R}|Creature - Dwarf Berserker|2|2|{T}: Target creature gains haste until end of turn.|
|
||||
Basalt Ravager|Kaldheim|122|U|{3}{R}|Creature - Giant Wizard|4|2|When Basalt Ravager enters the battlefield, it deals X damage to any target, where X is the greatest number of creatures you control that have a creature type in common.|
|
||||
Birgi, God of Storytelling|Kaldheim|123|R|{2}{R}|Legendary Creature - God|3|3|Whenever you cast a spell, add {R}. Until end of turn, you don't lose this mana as steps and phases end.$Creatures you control can boast twice during each of your turns rather than once.|
|
||||
Harnfel, Horn of Abundance|Kaldheim|123|R|{4}{R}|Legendary Artifact|||Discard a card: Exile the top two cards of your library. You may play those cards this turn.|
|
||||
Harnfel, Horn of Bounty|Kaldheim|123|R|{4}{R}|Legendary Artifact|||Discard a card: Exile the top two cards of your library. You may play those cards this turn.|
|
||||
Breakneck Berserker|Kaldheim|124|C|{2}{R}|Creature - Dwarf Berserker|3|2|Haste|
|
||||
Calamity Bearer|Kaldheim|125|R|{2}{R}{R}|Creature - Giant Berserker|3|4|If a Giant source you control would deal damage to a permanent or player, it deals double that damage to that permanent or player instead.|
|
||||
Cinderheart Giant|Kaldheim|126|C|{5}{R}{R}|Creature - Giant Berserker|7|6|Trample$When Cinderheart Giant dies, it deals 7 damage to a creature an opponent controls chosen at random.|
|
||||
|
|
Loading…
Reference in a new issue