mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 10:18:01 +00:00
- Added Prossh, Skyraider of Kher
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -10162,6 +10162,7 @@ forge-gui/res/cardsfolder/p/prophetic_bolt.txt svneol=native#text/plain
|
||||
forge-gui/res/cardsfolder/p/prophetic_flamespeaker.txt -text
|
||||
forge-gui/res/cardsfolder/p/prophetic_prism.txt svneol=native#text/plain
|
||||
forge-gui/res/cardsfolder/p/prosperity.txt svneol=native#text/plain
|
||||
forge-gui/res/cardsfolder/p/prossh_skyraider_of_kher.txt -text
|
||||
forge-gui/res/cardsfolder/p/protean_hulk.txt -text
|
||||
forge-gui/res/cardsfolder/p/protean_hydra.txt -text
|
||||
forge-gui/res/cardsfolder/p/protect_serve.txt -text
|
||||
|
||||
@@ -951,7 +951,7 @@ public class CardFactoryUtil {
|
||||
if (sq[0].equals("YouDrewThisTurn")) return doXMath(c.getController().getNumDrawnThisTurn(), m, c);
|
||||
if (sq[0].equals("OppDrewThisTurn")) return doXMath(c.getController().getOpponent().getNumDrawnThisTurn(), m, c);
|
||||
|
||||
|
||||
if (sq[0].equals("FirstSpellTotalManaSpent")) return doXMath(c.getFirstSpellAbility().getTotalManaSpent(), m, c);
|
||||
if (sq[0].equals("StormCount")) return doXMath(game.getStack().getCardsCastThisTurn().size() - 1, m, c);
|
||||
if (sq[0].equals("DamageDoneThisTurn")) return doXMath(c.getDamageDoneThisTurn(), m, c);
|
||||
if (sq[0].equals("BloodthirstAmount")) return doXMath(c.getController().getBloodthirstAmount(), m, c);
|
||||
|
||||
@@ -90,6 +90,7 @@ public abstract class SpellAbility extends CardTraitBase implements ISpellAbilit
|
||||
private boolean delve = false;
|
||||
private boolean offering = false;
|
||||
private boolean morphup = false;
|
||||
private int totalManaSpent = 0;
|
||||
|
||||
/** The pay costs. */
|
||||
private Cost payCosts = null;
|
||||
@@ -1757,4 +1758,12 @@ public abstract class SpellAbility extends CardTraitBase implements ISpellAbilit
|
||||
}
|
||||
}
|
||||
|
||||
public void setTotalManaSpent(int totManaSpent) {
|
||||
this.totalManaSpent = totManaSpent;
|
||||
}
|
||||
|
||||
public int getTotalManaSpent() {
|
||||
return this.totalManaSpent;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -288,9 +288,11 @@ public class MagicStack /* extends MyObservable */ implements Iterable<SpellAbil
|
||||
this.frozenStack.push(si);
|
||||
return;
|
||||
}
|
||||
int totManaSpent = sp.getPayingMana().size();
|
||||
|
||||
if ((sp instanceof AbilityTriggered) || (sp instanceof AbilityStatic)) {
|
||||
// TODO: make working triggered ability
|
||||
sp.setTotalManaSpent(totManaSpent);
|
||||
AbilityUtils.resolve(sp);
|
||||
} else {
|
||||
for (OptionalCost s : sp.getOptionalCosts()) {
|
||||
@@ -301,14 +303,16 @@ public class MagicStack /* extends MyObservable */ implements Iterable<SpellAbil
|
||||
} else {
|
||||
if (sp.isMultiKicker()) {
|
||||
final Cost costMultikicker = new Cost(sp.getMultiKickerManaCost(), false);
|
||||
|
||||
boolean hasPaid = false;
|
||||
do {
|
||||
int mkMagnitude = source.getKickerMagnitude();
|
||||
String prompt = String.format("Multikicker for %s\r\nTimes Kicked: %d\r\n", source, mkMagnitude );
|
||||
hasPaid = activator.getController().payManaOptional(source, costMultikicker, sp, prompt, ManaPaymentPurpose.Multikicker);
|
||||
if( hasPaid )
|
||||
if (hasPaid) {
|
||||
source.addMultiKickerMagnitude(1);
|
||||
totManaSpent += sp.getPayingMana().size();
|
||||
// TODO: paying mana is replaced by multikicker cost, this should be fixed in the future
|
||||
}
|
||||
} while( hasPaid );
|
||||
}
|
||||
if (sp.isSpell() && source.isCreature() && Iterables.any(activator.getCardsIn(ZoneType.Battlefield),
|
||||
@@ -323,6 +327,7 @@ public class MagicStack /* extends MyObservable */ implements Iterable<SpellAbil
|
||||
hasPaid = activator.getController().payManaOptional(source, costPseudoKicker, sp, prompt, ManaPaymentPurpose.Multikicker);
|
||||
if (hasPaid) {
|
||||
source.addPseudoMultiKickerMagnitude(1);
|
||||
totManaSpent += 1;
|
||||
}
|
||||
} while (hasPaid);
|
||||
if (source.getPseudoKickerMagnitude() > 0) {
|
||||
@@ -357,12 +362,14 @@ public class MagicStack /* extends MyObservable */ implements Iterable<SpellAbil
|
||||
|
||||
final Cost costReplicate = new Cost(source.getManaCost(), false);
|
||||
boolean hasPaid = false;
|
||||
|
||||
int replicateCMC = source.getManaCost().getCMC();
|
||||
do {
|
||||
String prompt = String.format("Replicate for %s\r\nTimes Replicated: %d\r\n", source, magnitude);
|
||||
hasPaid = activator.getController().payManaOptional(source, costReplicate, sp, prompt, ManaPaymentPurpose.Replicate);
|
||||
if( hasPaid )
|
||||
if (hasPaid) {
|
||||
magnitude++;
|
||||
totManaSpent += replicateCMC;
|
||||
}
|
||||
} while( hasPaid );
|
||||
// Replicate Trigger
|
||||
String effect = String.format("AB$ CopySpellAbility | Cost$ 0 | Defined$ SourceFirstSpell | Amount$ %d", magnitude);
|
||||
@@ -375,6 +382,8 @@ public class MagicStack /* extends MyObservable */ implements Iterable<SpellAbil
|
||||
}
|
||||
}
|
||||
|
||||
sp.setTotalManaSpent(totManaSpent);
|
||||
|
||||
// Copied spells aren't cast per se so triggers shouldn't run for them.
|
||||
HashMap<String, Object> runParams = new HashMap<String, Object>();
|
||||
if (!(sp instanceof AbilityStatic) && !sp.isCopied()) {
|
||||
|
||||
11
forge-gui/res/cardsfolder/p/prossh_skyraider_of_kher.txt
Normal file
11
forge-gui/res/cardsfolder/p/prossh_skyraider_of_kher.txt
Normal file
@@ -0,0 +1,11 @@
|
||||
Name:Prossh, Skyraider of Kher
|
||||
ManaCost:3 B R G
|
||||
Types:Legendary Creature Dragon
|
||||
PT:5/5
|
||||
K:Flying
|
||||
T:Mode$ SpellCast | ValidCard$ Card.Self | Execute$ TrigToken | TriggerDescription$ When you cast CARDNAME, put X 0/1 red Kobold creature tokens named Kobolds of Kher Keep onto the battlefield, where X is the amount of mana spent to cast CARDNAME.
|
||||
SVar:TrigToken:AB$ Token | Cost$ 0 | TokenAmount$ X | TokenName$ Kobolds of Kher Keep | TokenTypes$ Creature,Kobold | TokenOwner$ You | TokenColors$ Red | TokenPower$ 0 | TokenToughness$ 1 | References$ X
|
||||
SVar:X:Count$FirstSpellTotalManaSpent
|
||||
A:AB$ Pump | Cost$ Sac<1/Creature.Other/another creature> | NumAtt$ 1 | SpellDescription$ CARDNAME gets +1/+0 until end of turn.
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/prossh_skyraider_of_kher.jpg
|
||||
Oracle:Flying\nWhen you cast Prossh, Skyraider of Kher, put X 0/1 red Kobold creature tokens named Kobolds of Kher Keep onto the battlefield, where X is the amount of mana spent to cast Prossh.\nSacrifice another creature: Prossh gets +1/+0 until end of turn.
|
||||
Reference in New Issue
Block a user