mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
Implementing Blitz mechanic (WIP) (#8835)
* added blitz mechanic (mostly copy/paste of dash) * renamed class * reworked alt cost abilities, greatly reduced redundant code * updated text generation * removed all skips * added test for blitz * changed blitz implementation * [SNC] Implemented Tenacious Underdog
This commit is contained in:
parent
76daf4bd5a
commit
0e3252d256
31 changed files with 620 additions and 722 deletions
|
|
@ -42,7 +42,7 @@ public final class CaldaiaGuardian extends CardImpl {
|
|||
));
|
||||
|
||||
// Blitz {2}{G}
|
||||
this.addAbility(new BlitzAbility("{2}{G}"));
|
||||
this.addAbility(new BlitzAbility(this, "{2}{G}"));
|
||||
}
|
||||
|
||||
private CaldaiaGuardian(final CaldaiaGuardian card) {
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ public final class CaldaiaStrongarm extends CardImpl {
|
|||
this.addAbility(ability);
|
||||
|
||||
// Blitz {3}{G}
|
||||
this.addAbility(new BlitzAbility("{3}{G}"));
|
||||
this.addAbility(new BlitzAbility(this, "{3}{G}"));
|
||||
}
|
||||
|
||||
private CaldaiaStrongarm(final CaldaiaStrongarm card) {
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ public final class GirderGoons extends CardImpl {
|
|||
)));
|
||||
|
||||
// Blitz {3}{B}
|
||||
this.addAbility(new BlitzAbility("{3}{B}"));
|
||||
this.addAbility(new BlitzAbility(this, "{3}{B}"));
|
||||
}
|
||||
|
||||
private GirderGoons(final GirderGoons card) {
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ public final class JaxisTheTroublemaker extends CardImpl {
|
|||
this.addAbility(ability);
|
||||
|
||||
// Blitz {1}{R}
|
||||
this.addAbility(new BlitzAbility("{1}{R}"));
|
||||
this.addAbility(new BlitzAbility(this, "{1}{R}"));
|
||||
}
|
||||
|
||||
private JaxisTheTroublemaker(final JaxisTheTroublemaker card) {
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ public final class MayhemPatrol extends CardImpl {
|
|||
this.addAbility(ability);
|
||||
|
||||
// Blitz {1}{R}
|
||||
this.addAbility(new BlitzAbility("{1}{R}"));
|
||||
this.addAbility(new BlitzAbility(this, "{1}{R}"));
|
||||
}
|
||||
|
||||
private MayhemPatrol(final MayhemPatrol card) {
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ public final class NightClubber extends CardImpl {
|
|||
)));
|
||||
|
||||
// Blitz {2}{B}
|
||||
this.addAbility(new BlitzAbility("{2}{B}"));
|
||||
this.addAbility(new BlitzAbility(this, "{2}{B}"));
|
||||
}
|
||||
|
||||
private NightClubber(final NightClubber card) {
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ public final class PlasmaJockey extends CardImpl {
|
|||
this.addAbility(ability);
|
||||
|
||||
// Blitz {2}{R}
|
||||
this.addAbility(new BlitzAbility("{2}{R}"));
|
||||
this.addAbility(new BlitzAbility(this, "{2}{R}"));
|
||||
}
|
||||
|
||||
private PlasmaJockey(final PlasmaJockey card) {
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ public final class PugnaciousPugilist extends CardImpl {
|
|||
)));
|
||||
|
||||
// Blitz {3}{R}
|
||||
this.addAbility(new BlitzAbility("{3}{R}"));
|
||||
this.addAbility(new BlitzAbility(this, "{3}{R}"));
|
||||
}
|
||||
|
||||
private PugnaciousPugilist(final PugnaciousPugilist card) {
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ public final class RiveteersDecoy extends CardImpl {
|
|||
this.addAbility(new SimpleStaticAbility(new MustBeBlockedByAtLeastOneSourceEffect()));
|
||||
|
||||
// Blitz {3}{G}
|
||||
this.addAbility(new BlitzAbility("{3}{G}"));
|
||||
this.addAbility(new BlitzAbility(this, "{3}{G}"));
|
||||
}
|
||||
|
||||
private RiveteersDecoy(final RiveteersDecoy card) {
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ public final class RiveteersRequisitioner extends CardImpl {
|
|||
this.addAbility(new DiesSourceTriggeredAbility(new CreateTokenEffect(new TreasureToken())));
|
||||
|
||||
// Blitz {2}{R}
|
||||
this.addAbility(new BlitzAbility("{2}{R}"));
|
||||
this.addAbility(new BlitzAbility(this, "{2}{R}"));
|
||||
}
|
||||
|
||||
private RiveteersRequisitioner(final RiveteersRequisitioner card) {
|
||||
|
|
|
|||
82
Mage.Sets/src/mage/cards/t/TenaciousUnderdog.java
Normal file
82
Mage.Sets/src/mage/cards/t/TenaciousUnderdog.java
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
package mage.cards.t;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.common.PayLifeCost;
|
||||
import mage.abilities.effects.AsThoughEffectImpl;
|
||||
import mage.abilities.keyword.BlitzAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.game.Game;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class TenaciousUnderdog extends CardImpl {
|
||||
|
||||
public TenaciousUnderdog(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}");
|
||||
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.WARRIOR);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// Blitz—{2}{B}{B}, Pay 2 life.
|
||||
Ability ability = new BlitzAbility(this, "{2}{B}{B}");
|
||||
ability.addCost(new PayLifeCost(2));
|
||||
this.addAbility(ability);
|
||||
|
||||
// You may cast Tenacious Underdog from your graveyard using its blitz ability.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new TenaciousUnderdogEffect()));
|
||||
}
|
||||
|
||||
private TenaciousUnderdog(final TenaciousUnderdog card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TenaciousUnderdog copy() {
|
||||
return new TenaciousUnderdog(this);
|
||||
}
|
||||
}
|
||||
|
||||
class TenaciousUnderdogEffect extends AsThoughEffectImpl {
|
||||
|
||||
TenaciousUnderdogEffect() {
|
||||
super(AsThoughEffectType.PLAY_FROM_NOT_OWN_HAND_ZONE, Duration.EndOfGame, Outcome.PutCreatureInPlay);
|
||||
staticText = "You may cast {this} from your graveyard";
|
||||
}
|
||||
|
||||
private TenaciousUnderdogEffect(final TenaciousUnderdogEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TenaciousUnderdogEffect copy() {
|
||||
return new TenaciousUnderdogEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(UUID objectId, Ability affectedAbility, Ability source, Game game, UUID playerId) {
|
||||
return objectId.equals(source.getSourceId())
|
||||
&& source.isControlledBy(playerId)
|
||||
&& affectedAbility instanceof BlitzAbility
|
||||
&& game.getState().getZone(source.getSourceId()) == Zone.GRAVEYARD
|
||||
&& game.getCard(source.getSourceId()) != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(UUID sourceId, Ability source, UUID affectedControllerId, Game game) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -38,7 +38,7 @@ public final class WorkshopWarchief extends CardImpl {
|
|||
this.addAbility(new DiesSourceTriggeredAbility(new CreateTokenEffect(new RhinoWarriorToken())));
|
||||
|
||||
// Blitz {4}{G}{G}
|
||||
this.addAbility(new BlitzAbility("{4}{G}{G}"));
|
||||
this.addAbility(new BlitzAbility(this, "{4}{G}{G}"));
|
||||
}
|
||||
|
||||
private WorkshopWarchief(final WorkshopWarchief card) {
|
||||
|
|
|
|||
|
|
@ -4,16 +4,11 @@ import mage.cards.ExpansionSet;
|
|||
import mage.constants.Rarity;
|
||||
import mage.constants.SetType;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class NewCapennaCommander extends ExpansionSet {
|
||||
|
||||
private static final List<String> unfinished = Arrays.asList("Caldaia Guardian", "Henzie \"Toolbox\" Torre", "Mezzio Mugger", "Wave of Rats");
|
||||
|
||||
private static final NewCapennaCommander instance = new NewCapennaCommander();
|
||||
|
||||
public static NewCapennaCommander getInstance() {
|
||||
|
|
@ -302,7 +297,5 @@ public final class NewCapennaCommander extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Writ of Return", 42, Rarity.RARE, mage.cards.w.WritOfReturn.class));
|
||||
cards.add(new SetCardInfo("Zndrsplt's Judgment", 240, Rarity.RARE, mage.cards.z.ZndrspltsJudgment.class));
|
||||
cards.add(new SetCardInfo("Zurzoth, Chaos Rider", 278, Rarity.RARE, mage.cards.z.ZurzothChaosRider.class));
|
||||
|
||||
cards.removeIf(setCardInfo -> unfinished.contains(setCardInfo.getName())); // remove when shield counters are implemented
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,16 +4,11 @@ import mage.cards.ExpansionSet;
|
|||
import mage.constants.Rarity;
|
||||
import mage.constants.SetType;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class StreetsOfNewCapenna extends ExpansionSet {
|
||||
|
||||
private static final List<String> unfinished = Arrays.asList("Caldaia Strongarm", "Girder Goons", "Jaxis, the Troublemaker", "Mayhem Patrol", "Night Clubber", "Plasma Jockey", "Pugnacious Pugilist", "Riveteers Decoy", "Riveteers Requisitioner", "Tenacious Underdog", "Workshop Warchief", "Ziatora's Envoy");
|
||||
|
||||
private static final StreetsOfNewCapenna instance = new StreetsOfNewCapenna();
|
||||
|
||||
public static StreetsOfNewCapenna getInstance() {
|
||||
|
|
@ -260,6 +255,7 @@ public final class StreetsOfNewCapenna extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Tainted Indulgence", 227, Rarity.UNCOMMON, mage.cards.t.TaintedIndulgence.class));
|
||||
cards.add(new SetCardInfo("Take to the Streets", 158, Rarity.UNCOMMON, mage.cards.t.TakeToTheStreets.class));
|
||||
cards.add(new SetCardInfo("Tavern Swindler", 96, Rarity.UNCOMMON, mage.cards.t.TavernSwindler.class));
|
||||
cards.add(new SetCardInfo("Tenacious Underdog", 97, Rarity.RARE, mage.cards.t.TenaciousUnderdog.class));
|
||||
cards.add(new SetCardInfo("Titan of Industry", 159, Rarity.MYTHIC, mage.cards.t.TitanOfIndustry.class));
|
||||
cards.add(new SetCardInfo("Toluz, Clever Conductor", 228, Rarity.RARE, mage.cards.t.ToluzCleverConductor.class));
|
||||
cards.add(new SetCardInfo("Topiary Stomper", 160, Rarity.RARE, mage.cards.t.TopiaryStomper.class));
|
||||
|
|
@ -288,7 +284,5 @@ public final class StreetsOfNewCapenna extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Xander's Lounge", 260, Rarity.RARE, mage.cards.x.XandersLounge.class));
|
||||
cards.add(new SetCardInfo("Ziatora's Proving Ground", 261, Rarity.RARE, mage.cards.z.ZiatorasProvingGround.class));
|
||||
cards.add(new SetCardInfo("Ziatora, the Incinerator", 231, Rarity.MYTHIC, mage.cards.z.ZiatoraTheIncinerator.class));
|
||||
|
||||
cards.removeIf(setCardInfo -> unfinished.contains(setCardInfo.getName())); // remove when shield counters are implemented
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue