mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
- Added the parameter "UnlessSwitched" to SpellAbilities (to switch paid and unpaid commands).
- Added Dash Hopes.
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -2221,6 +2221,7 @@ res/cardsfolder/d/daru_sanctifier.txt svneol=native#text/plain
|
||||
res/cardsfolder/d/daru_spiritualist.txt -text
|
||||
res/cardsfolder/d/daru_stinger.txt -text
|
||||
res/cardsfolder/d/daru_warchief.txt svneol=native#text/plain
|
||||
res/cardsfolder/d/dash_hopes.txt -text
|
||||
res/cardsfolder/d/daunting_defender.txt svneol=native#text/plain
|
||||
res/cardsfolder/d/dauntless_dourbark.txt svneol=native#text/plain
|
||||
res/cardsfolder/d/dauntless_escort.txt svneol=native#text/plain
|
||||
|
||||
12
res/cardsfolder/d/dash_hopes.txt
Normal file
12
res/cardsfolder/d/dash_hopes.txt
Normal file
@@ -0,0 +1,12 @@
|
||||
Name:Dash Hopes
|
||||
ManaCost:B B
|
||||
Types:Instant
|
||||
Text:no text
|
||||
T:Mode$ SpellCast | ValidCard$ Card.Self | Execute$ TrigCounter | TriggerDescription$ When you cast CARDNAME, any player may pay 5 life. If a player does, counter CARDNAME.
|
||||
SVar:TrigCounter:DB$ Counter | Cost$ 0 | UnlessCost$ PayLife<5> | Defined$ TriggeredSpellAbility | UnlessPayer$ Player | UnlessSwitched$ True
|
||||
A:SP$ Counter | Cost$ B B | TargetType$ Spell | ValidTgts$ Card | SpellDescription$ Counter target spell.
|
||||
SVar:Rarity:Common
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/dash_hopes.jpg
|
||||
SetInfo:PLC|Common|http://magiccards.info/scans/en/pc/68.jpg
|
||||
Oracle:When you cast Dash Hopes, any player may pay 5 life. If a player does, counter Dash Hopes.\nCounter target spell.
|
||||
End
|
||||
@@ -10,7 +10,7 @@ K:Annihilator 6
|
||||
T:Mode$ ChangesZone | Origin$ Any | Destination$ Graveyard | ValidCard$ Creature.Self | Execute$ TrigShuffle | TriggerDescription$ When CARDNAME is put into a graveyard from anywhere, its owner shuffles his or her graveyard into his or her library.
|
||||
SVar:TrigShuffle:AB$ChangeZoneAll | Cost$ 0 | Defined$ TriggeredCardController | ChangeType$ Card | Origin$ Graveyard | Destination$ Library | Shuffle$ True
|
||||
T:Mode$ SpellCast | ValidCard$ Card.Self | Execute$ TrigAddTurn | TriggerDescription$ When you cast CARDNAME, take an extra turn after this one.
|
||||
SVar:TrigAddTurn:AB$AddTurn | Cost$ 0 | Defined$ You | NumTurns$ 1
|
||||
SVar:TrigAddTurn:AB$ AddTurn | Cost$ 0 | Defined$ You | NumTurns$ 1
|
||||
SVar:Rarity:Mythic
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/emrakul_the_aeons_torn.jpg
|
||||
SetInfo:ROE|Mythic|http://magiccards.info/scans/en/roe/4.jpg
|
||||
|
||||
@@ -1580,7 +1580,7 @@ public class AbilityFactory {
|
||||
}
|
||||
};
|
||||
|
||||
final Command paidCommand = new Command() {
|
||||
Command paidCommand = new Command() {
|
||||
private static final long serialVersionUID = 8094833091127334678L;
|
||||
|
||||
@Override
|
||||
@@ -1601,6 +1601,13 @@ public class AbilityFactory {
|
||||
AbilityFactory.resolveSubAbilities(sa, usedStack);
|
||||
}
|
||||
};
|
||||
|
||||
if (sa.hasParam("UnlessSwitched")) {
|
||||
final Command dummy = paidCommand;
|
||||
paidCommand = unpaidCommand;
|
||||
unpaidCommand = dummy;
|
||||
}
|
||||
|
||||
boolean paid = false;
|
||||
for (Player payer : payers) {
|
||||
if (payer.isComputer()) {
|
||||
|
||||
@@ -420,18 +420,17 @@ public class TriggerHandler {
|
||||
}
|
||||
|
||||
// Torpor Orb check
|
||||
if (!regtrig.isStatic() && mode.equals(TriggerType.ChangesZone)) {
|
||||
if (game.getStaticEffects().getGlobalRuleChange(GlobalRuleChange.noCreatureETBTriggers)
|
||||
&& !regtrig.isStatic() && mode.equals(TriggerType.ChangesZone)) {
|
||||
if (runParams.get("Destination") instanceof String) {
|
||||
String dest = (String) runParams.get("Destination");
|
||||
if (dest.equals("Battlefield") && runParams.get("Card") instanceof Card) {
|
||||
Card card = (Card) runParams.get("Card");
|
||||
if (card.isCreature()
|
||||
&& game.getStaticEffects().getGlobalRuleChange(GlobalRuleChange.noCreatureETBTriggers)) {
|
||||
if (card.isCreature()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // Torpor Orb check
|
||||
|
||||
// Any trigger should cause the phase not to skip
|
||||
@@ -484,12 +483,10 @@ public class TriggerHandler {
|
||||
}
|
||||
|
||||
sa.setStackDescription(sa.toString());
|
||||
// ---TODO - for Charms to supports AI, this needs to be removed
|
||||
//if (sa[0].getActivatingPlayer().isHuman()) {
|
||||
if (sa.getApi() == ApiType.Charm && !sa.isWrapper()) {
|
||||
CharmEffect.makeChoices(sa);
|
||||
}
|
||||
//}
|
||||
|
||||
Player decider = null;
|
||||
boolean mand = false;
|
||||
if (triggerParams.containsKey("OptionalDecider")) {
|
||||
@@ -515,15 +512,6 @@ public class TriggerHandler {
|
||||
wrapperAbility.setTrigger(true);
|
||||
wrapperAbility.setMandatory(isMandatory);
|
||||
wrapperAbility.setDescription(wrapperAbility.getStackDescription());
|
||||
/*
|
||||
* if(host.getController().isHuman()) {
|
||||
* Singletons.getModel().getGameAction().playSpellAbility(wrapperAbility); } else {
|
||||
* wrapperAbility.doTrigger(isMandatory);
|
||||
* ComputerUtil.playStack(wrapperAbility); }
|
||||
*/
|
||||
|
||||
// Card src = (Card)(sa[0].getSourceCard().getTriggeringObject("Card"));
|
||||
// System.out.println("Trigger going on stack for "+mode+". Card = "+src);
|
||||
|
||||
if (regtrig.isStatic()) {
|
||||
if (wrapperAbility.getActivatingPlayer().isHuman()) {
|
||||
@@ -532,7 +520,6 @@ public class TriggerHandler {
|
||||
wrapperAbility.doTrigger(isMandatory);
|
||||
ComputerUtil.playNoStack(wrapperAbility.getActivatingPlayer(), wrapperAbility);
|
||||
}
|
||||
//Singletons.getModel().getGameAction().playSpellAbilityNoStack(wrapperAbility, false);
|
||||
} else {
|
||||
game.getStack().addSimultaneousStackEntry(wrapperAbility);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user