mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
@@ -32,6 +32,7 @@ import forge.card.mana.ManaCost;
|
|||||||
import forge.card.mana.ManaCostParser;
|
import forge.card.mana.ManaCostParser;
|
||||||
import forge.game.ability.AbilityFactory;
|
import forge.game.ability.AbilityFactory;
|
||||||
import forge.game.ability.ApiType;
|
import forge.game.ability.ApiType;
|
||||||
|
import forge.game.ability.SpellAbilityEffect;
|
||||||
import forge.game.card.CardPlayOption.PayManaCost;
|
import forge.game.card.CardPlayOption.PayManaCost;
|
||||||
import forge.game.cost.Cost;
|
import forge.game.cost.Cost;
|
||||||
import forge.game.cost.CostPayment;
|
import forge.game.cost.CostPayment;
|
||||||
@@ -46,7 +47,6 @@ import forge.game.replacement.ReplacementLayer;
|
|||||||
import forge.game.spellability.*;
|
import forge.game.spellability.*;
|
||||||
import forge.game.staticability.StaticAbilityLayer;
|
import forge.game.staticability.StaticAbilityLayer;
|
||||||
import forge.game.trigger.Trigger;
|
import forge.game.trigger.Trigger;
|
||||||
import forge.game.trigger.TriggerHandler;
|
|
||||||
import forge.game.trigger.TriggerType;
|
import forge.game.trigger.TriggerType;
|
||||||
import forge.game.zone.Zone;
|
import forge.game.zone.Zone;
|
||||||
import forge.game.zone.ZoneType;
|
import forge.game.zone.ZoneType;
|
||||||
@@ -799,19 +799,8 @@ public final class GameActionUtil {
|
|||||||
|
|
||||||
eff.addReplacementEffect(re);
|
eff.addReplacementEffect(re);
|
||||||
|
|
||||||
// Forgot Trigger
|
SpellAbilityEffect.addForgetOnMovedTrigger(eff, "Stack");
|
||||||
String trig = "Mode$ ChangesZone | ValidCard$ Card.IsRemembered | Origin$ Stack | Destination$ Any | TriggerZones$ Command | Static$ True";
|
|
||||||
String forgetEffect = "DB$ Pump | ForgetObjects$ TriggeredCard";
|
|
||||||
String exileEffect = "DB$ ChangeZone | Defined$ Self | Origin$ Command | Destination$ Exile"
|
|
||||||
+ " | ConditionDefined$ Remembered | ConditionPresent$ Card | ConditionCompare$ EQ0";
|
|
||||||
|
|
||||||
SpellAbility saForget = AbilityFactory.getAbility(forgetEffect, eff);
|
|
||||||
AbilitySub saExile = (AbilitySub) AbilityFactory.getAbility(exileEffect, eff);
|
|
||||||
saForget.setSubAbility(saExile);
|
|
||||||
|
|
||||||
final Trigger parsedTrigger = TriggerHandler.parseTrigger(trig, eff, true);
|
|
||||||
parsedTrigger.setOverridingAbility(saForget);
|
|
||||||
eff.addTrigger(parsedTrigger);
|
|
||||||
eff.updateStateForView();
|
eff.updateStateForView();
|
||||||
|
|
||||||
// TODO: Add targeting to the effect so it knows who it's dealing with
|
// TODO: Add targeting to the effect so it knows who it's dealing with
|
||||||
|
|||||||
@@ -373,7 +373,7 @@ public abstract class SpellAbilityEffect {
|
|||||||
return saForget;
|
return saForget;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static void addForgetOnMovedTrigger(final Card card, final String zone) {
|
public static void addForgetOnMovedTrigger(final Card card, final String zone) {
|
||||||
String trig = "Mode$ ChangesZone | ValidCard$ Card.IsRemembered | Origin$ " + zone + " | ExcludedDestinations$ Stack | Destination$ Any | TriggerZones$ Command | Static$ True";
|
String trig = "Mode$ ChangesZone | ValidCard$ Card.IsRemembered | Origin$ " + zone + " | ExcludedDestinations$ Stack | Destination$ Any | TriggerZones$ Command | Static$ True";
|
||||||
|
|
||||||
final Trigger parsedTrigger = TriggerHandler.parseTrigger(trig, card, true);
|
final Trigger parsedTrigger = TriggerHandler.parseTrigger(trig, card, true);
|
||||||
|
|||||||
@@ -741,6 +741,12 @@ public class CardProperty {
|
|||||||
case "Commander":
|
case "Commander":
|
||||||
final List<Card> cmdrs = sourceController.getCommanders();
|
final List<Card> cmdrs = sourceController.getCommanders();
|
||||||
for (Card cmdr : cmdrs) {
|
for (Card cmdr : cmdrs) {
|
||||||
|
cmdr = game.getCardState(cmdr);
|
||||||
|
// if your commander is in a hidden zone or phased out
|
||||||
|
// it's considered to have no creature types
|
||||||
|
if (cmdr.getZone().getZoneType().isHidden() || cmdr.isPhasedOut()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (card.sharesCreatureTypeWith(cmdr)) {
|
if (card.sharesCreatureTypeWith(cmdr)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2710,8 +2710,7 @@ public class Player extends GameEntity implements Comparable<Player> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public int getCommanderCast(Card commander) {
|
public int getCommanderCast(Card commander) {
|
||||||
Integer cast = commanderCast.get(commander);
|
return commanderCast.getOrDefault(commander, 0);
|
||||||
return cast == null ? 0 : cast.intValue();
|
|
||||||
}
|
}
|
||||||
public void incCommanderCast(Card commander) {
|
public void incCommanderCast(Card commander) {
|
||||||
commanderCast.put(commander, getCommanderCast(commander) + 1);
|
commanderCast.put(commander, getCommanderCast(commander) + 1);
|
||||||
|
|||||||
@@ -7,4 +7,4 @@ T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.S
|
|||||||
SVar:TrigInvestigate:DB$ Investigate
|
SVar:TrigInvestigate:DB$ Investigate
|
||||||
S:Mode$ Continuous | Affected$ Card.Self | AddPower$ 2 | IsPresent$ Card.token+YouCtrl | Description$ As long as you control a token, CARDNAME gets +2/+0.
|
S:Mode$ Continuous | Affected$ Card.Self | AddPower$ 2 | IsPresent$ Card.token+YouCtrl | Description$ As long as you control a token, CARDNAME gets +2/+0.
|
||||||
DeckHas:Ability$Token|Sacrifice
|
DeckHas:Ability$Token|Sacrifice
|
||||||
Oracle:Vigilance/nWhen Briarbridge Tracker enters the battlefield, investigate. (Create a colorless Clue artifact token with "{2}, Sacrifice this artifact: Draw a card.")\nAs long as you control a token, Briarbridge Tracker gets +2/+0.
|
Oracle:Vigilance\nWhen Briarbridge Tracker enters the battlefield, investigate. (Create a colorless Clue artifact token with "{2}, Sacrifice this artifact: Draw a card.")\nAs long as you control a token, Briarbridge Tracker gets +2/+0.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
Name:Jeweled Lotus
|
Name:Jeweled Lotus
|
||||||
ManaCost:0
|
ManaCost:0
|
||||||
Types:Artifact
|
Types:Artifact
|
||||||
A:AB$ Mana | Cost$ T Sac<1/CARDNAME> | Produced$ Any | Amount$ 3 | RestrictValid$ Spell.IsCommander | SpellDescription$ Add three mana of any one color. Spend this mana only to cast your commander.
|
A:AB$ Mana | Cost$ T Sac<1/CARDNAME> | Produced$ Any | Amount$ 3 | RestrictValid$ Spell.IsCommander+YouOwn | SpellDescription$ Add three mana of any one color. Spend this mana only to cast your commander.
|
||||||
DeckHas:Ability$Sacrifice
|
DeckHas:Ability$Sacrifice
|
||||||
AI:RemoveDeck:NonCommander
|
AI:RemoveDeck:NonCommander
|
||||||
Oracle:{T}, Sacrifice Jeweled Lotus: Add three mana of any one color. Spend this mana only to cast your commander.
|
Oracle:{T}, Sacrifice Jeweled Lotus: Add three mana of any one color. Spend this mana only to cast your commander.
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ Name:Opal Palace
|
|||||||
ManaCost:no cost
|
ManaCost:no cost
|
||||||
Types:Land
|
Types:Land
|
||||||
A:AB$ Mana | Cost$ T | Produced$ C | SpellDescription$ Add {C}.
|
A:AB$ Mana | Cost$ T | Produced$ C | SpellDescription$ Add {C}.
|
||||||
A:AB$ Mana | Cost$ 1 T | Produced$ Combo ColorIdentity | AddsCounters$ Card.IsCommander_P1P1_ManaAddsCounterNum | SpellDescription$ Add one mana of any color in your commander's color identity. If you spend this mana to cast your commander, it enters the battlefield with a number of additional +1/+1 counters on it equal to the number of times it's been cast from the command zone this game.
|
A:AB$ Mana | Cost$ 1 T | Produced$ Combo ColorIdentity | AddsCounters$ Card.YouOwn+IsCommander_P1P1_ManaAddsCounterNum | SpellDescription$ Add one mana of any color in your commander's color identity. If you spend this mana to cast your commander, it enters the battlefield with a number of additional +1/+1 counters on it equal to the number of times it's been cast from the command zone this game.
|
||||||
SVar:ManaAddsCounterNum:Count$CommanderCastFromCommandZone
|
SVar:ManaAddsCounterNum:Count$CommanderCastFromCommandZone
|
||||||
AI:RemoveDeck:NonCommander
|
AI:RemoveDeck:NonCommander
|
||||||
Oracle:{T}: Add {C}.\n{1}, {T}: Add one mana of any color in your commander's color identity. If you spend this mana to cast your commander, it enters the battlefield with a number of additional +1/+1 counters on it equal to the number of times it's been cast from the command zone this game.
|
Oracle:{T}: Add {C}.\n{1}, {T}: Add one mana of any color in your commander's color identity. If you spend this mana to cast your commander, it enters the battlefield with a number of additional +1/+1 counters on it equal to the number of times it's been cast from the command zone this game.
|
||||||
|
|||||||
Reference in New Issue
Block a user