mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
[ONC] Implement Vulshok Factory (#10075)
This commit is contained in:
parent
a4721487b1
commit
79606ce1a8
2 changed files with 88 additions and 0 deletions
87
Mage.Sets/src/mage/cards/v/VulshokFactory.java
Normal file
87
Mage.Sets/src/mage/cards/v/VulshokFactory.java
Normal file
|
@ -0,0 +1,87 @@
|
|||
package mage.cards.v;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.abilities.mana.RedManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.abilities.common.ActivateAsSorceryActivatedAbility;
|
||||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.constants.Outcome;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.token.GolemXXToken;
|
||||
import mage.game.permanent.token.Token;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author @stwalsh4118
|
||||
*/
|
||||
public final class VulshokFactory extends CardImpl {
|
||||
|
||||
private static final DynamicValue xValue = new CountersSourceCount(CounterType.CHARGE);
|
||||
|
||||
|
||||
public VulshokFactory(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}{R}");
|
||||
|
||||
|
||||
// {T}: Add {R}. Put a charge counter on Vulshok Factory.
|
||||
Ability ability = new RedManaAbility();
|
||||
ability.addEffect(new AddCountersSourceEffect(CounterType.CHARGE.createInstance(1)));
|
||||
this.addAbility(ability);
|
||||
|
||||
// {2}{R}, {T}, Sacrifice Vulshok Factory: Create an X/X colorless Golem artifact creature token with haste, where X is the number of charge counters on Vulshok Factory. Activate only as a sorcery.
|
||||
Ability sacAbility = new ActivateAsSorceryActivatedAbility(new VulshokFactoryEffect(xValue), new ManaCostsImpl<>("{2}{R}"));
|
||||
sacAbility.addCost(new TapSourceCost());
|
||||
sacAbility.addCost(new SacrificeSourceCost());
|
||||
this.addAbility(sacAbility);
|
||||
}
|
||||
|
||||
private VulshokFactory(final VulshokFactory card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public VulshokFactory copy() {
|
||||
return new VulshokFactory(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class VulshokFactoryEffect extends OneShotEffect {
|
||||
|
||||
private final DynamicValue xValue;
|
||||
|
||||
VulshokFactoryEffect(DynamicValue xValue) {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "create an X/X colorless Golem artifact creature token with haste, where X is the number of charge counters on {this}";
|
||||
this.xValue = xValue;
|
||||
}
|
||||
|
||||
private VulshokFactoryEffect(final VulshokFactoryEffect effect) {
|
||||
super(effect);
|
||||
this.xValue = effect.xValue;
|
||||
}
|
||||
|
||||
@Override
|
||||
public VulshokFactoryEffect copy() {
|
||||
return new VulshokFactoryEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Token token = new GolemXXToken(xValue.calculate(game, source, this));
|
||||
token.addAbility(HasteAbility.getInstance());
|
||||
return token.putOntoBattlefield(1, game, source);
|
||||
}
|
||||
}
|
||||
|
|
@ -167,6 +167,7 @@ public final class PhyrexiaAllWillBeOneCommander extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Viridian Corrupter", 113, Rarity.UNCOMMON, mage.cards.v.ViridianCorrupter.class));
|
||||
cards.add(new SetCardInfo("Vishgraz, the Doomhive", 4, Rarity.MYTHIC, mage.cards.v.VishgrazTheDoomhive.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Vishgraz, the Doomhive", 40, Rarity.MYTHIC, mage.cards.v.VishgrazTheDoomhive.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Vulshok Factory", 16, Rarity.RARE, mage.cards.v.VulshokFactory.class));
|
||||
cards.add(new SetCardInfo("White Sun's Zenith", 90, Rarity.RARE, mage.cards.w.WhiteSunsZenith.class));
|
||||
cards.add(new SetCardInfo("Windborn Muse", 91, Rarity.RARE, mage.cards.w.WindbornMuse.class));
|
||||
cards.add(new SetCardInfo("Windbrisk Heights", 174, Rarity.RARE, mage.cards.w.WindbriskHeights.class));
|
||||
|
|
Loading…
Reference in a new issue