mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
[DSK] Implement Winter, Misanthropic Guide
This commit is contained in:
parent
f7c7938c29
commit
4eba575ce3
2 changed files with 92 additions and 0 deletions
91
Mage.Sets/src/mage/cards/w/WinterMisanthropicGuide.java
Normal file
91
Mage.Sets/src/mage/cards/w/WinterMisanthropicGuide.java
Normal file
|
|
@ -0,0 +1,91 @@
|
|||
package mage.cards.w;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.dynamicvalue.common.CardTypesInGraveyardCount;
|
||||
import mage.abilities.effects.ContinuousEffectImpl;
|
||||
import mage.abilities.effects.common.DrawCardAllEffect;
|
||||
import mage.abilities.hint.common.CardTypesInGraveyardHint;
|
||||
import mage.abilities.keyword.WardAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class WinterMisanthropicGuide extends CardImpl {
|
||||
|
||||
public WinterMisanthropicGuide(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{R}{G}");
|
||||
|
||||
this.supertype.add(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.WARLOCK);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// Ward {2}
|
||||
this.addAbility(new WardAbility(new ManaCostsImpl<>("{2}")));
|
||||
|
||||
// At the beginning of your upkeep, each player draws two cards.
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(
|
||||
new DrawCardAllEffect(2), TargetController.YOU, false
|
||||
));
|
||||
|
||||
// Delirium -- As long as there are four or more card types among cards in your graveyard, each opponent's maximum hand size is equal to seven minus the number of those card types.
|
||||
this.addAbility(new SimpleStaticAbility(new WinterMisanthropicGuideEffect())
|
||||
.setAbilityWord(AbilityWord.DELIRIUM)
|
||||
.addHint(CardTypesInGraveyardHint.YOU));
|
||||
}
|
||||
|
||||
private WinterMisanthropicGuide(final WinterMisanthropicGuide card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WinterMisanthropicGuide copy() {
|
||||
return new WinterMisanthropicGuide(this);
|
||||
}
|
||||
}
|
||||
|
||||
class WinterMisanthropicGuideEffect extends ContinuousEffectImpl {
|
||||
|
||||
WinterMisanthropicGuideEffect() {
|
||||
super(Duration.WhileOnBattlefield, Layer.PlayerEffects, SubLayer.NA, Outcome.Neutral);
|
||||
staticText = "as long as there are four or more card types among cards in your graveyard, " +
|
||||
"each opponent's maximum hand size is equal to seven minus the number of those card types";
|
||||
}
|
||||
|
||||
private WinterMisanthropicGuideEffect(final WinterMisanthropicGuideEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WinterMisanthropicGuideEffect copy() {
|
||||
return new WinterMisanthropicGuideEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
int count = CardTypesInGraveyardCount.YOU.calculate(game, source, this);
|
||||
if (count < 4) {
|
||||
return false;
|
||||
}
|
||||
for (UUID opponentId : game.getOpponents(source.getControllerId())) {
|
||||
Player player = game.getPlayer(opponentId);
|
||||
if (player == null) {
|
||||
continue;
|
||||
}
|
||||
player.setMaxHandSize(Math.max(7 - count, 0));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -39,6 +39,7 @@ public final class DuskmournHouseOfHorror extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Swamp", 274, Rarity.LAND, mage.cards.basiclands.Swamp.class, FULL_ART_BFZ_VARIOUS));
|
||||
cards.add(new SetCardInfo("The Wandering Rescuer", 41, Rarity.MYTHIC, mage.cards.t.TheWanderingRescuer.class));
|
||||
cards.add(new SetCardInfo("Toby, Beastie Befriender", 35, Rarity.RARE, mage.cards.t.TobyBeastieBefriender.class));
|
||||
cards.add(new SetCardInfo("Winter, Misanthropic Guide", 240, Rarity.RARE, mage.cards.w.WinterMisanthropicGuide.class));
|
||||
cards.add(new SetCardInfo("Zimone, All-Questioning", 241, Rarity.RARE, mage.cards.z.ZimoneAllQuestioning.class));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue