mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
Modified coin flips to allow just counting heads or tails. Added Fiery Gambit.
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -3416,6 +3416,7 @@ res/cardsfolder/f/fiend_of_the_shadows.txt -text
|
|||||||
res/cardsfolder/f/fierce_empath.txt svneol=native#text/plain
|
res/cardsfolder/f/fierce_empath.txt svneol=native#text/plain
|
||||||
res/cardsfolder/f/fiery_conclusion.txt svneol=native#text/plain
|
res/cardsfolder/f/fiery_conclusion.txt svneol=native#text/plain
|
||||||
res/cardsfolder/f/fiery_fall.txt svneol=native#text/plain
|
res/cardsfolder/f/fiery_fall.txt svneol=native#text/plain
|
||||||
|
res/cardsfolder/f/fiery_gambit.txt -text
|
||||||
res/cardsfolder/f/fiery_hellhound.txt svneol=native#text/plain
|
res/cardsfolder/f/fiery_hellhound.txt svneol=native#text/plain
|
||||||
res/cardsfolder/f/fiery_mantle.txt svneol=native#text/plain
|
res/cardsfolder/f/fiery_mantle.txt svneol=native#text/plain
|
||||||
res/cardsfolder/f/fiery_temper.txt svneol=native#text/plain
|
res/cardsfolder/f/fiery_temper.txt svneol=native#text/plain
|
||||||
|
|||||||
27
res/cardsfolder/f/fiery_gambit.txt
Normal file
27
res/cardsfolder/f/fiery_gambit.txt
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
Name:Fiery Gambit
|
||||||
|
ManaCost:2 R
|
||||||
|
Types:Sorcery
|
||||||
|
Text:no text
|
||||||
|
# Target a creature for three damage
|
||||||
|
A:SP$ Pump | Cost$ 2 R | ValidTgts$ Creature | TgtPrompt$ Choose target creature for 3 damage | SubAbility$ RepeatFlip | StackDescription$ None | SpellDescription$ Flip a coin until you lose a flip or choose to stop flipping. If you lose a flip, CARDNAME has no effect. If you win one or more flips, CARDNAME deals 3 damage to target creature. If you win two or more flips, CARDNAME deals 6 damage to each opponent. If you win three or more flips, draw nine cards and untap all lands you control.
|
||||||
|
# Repeat Flip
|
||||||
|
SVar:RepeatFlip:DB$ Repeat | RepeatSubAbility$ FlipAgain | RepeatCheckSVar$ Tails | RepeatSVarCompare$ EQ0 | RepeatOptional$ True | SubAbility$ DamageCreature
|
||||||
|
SVar:FlipAgain:DB$ FlipACoin | FlipOnly$ True | WinSubAbility$ IncrementHeads | LoseSubAbility$ IncrementTails
|
||||||
|
SVar:IncrementHeads:DB$ StoreSVar | SVar$ Heads | Type$ CountSVar | Expression$ Heads/Plus.1
|
||||||
|
SVar:IncrementTails:DB$ StoreSVar | SVar$ Tails | Type$ CountSVar | Expression$ Tails/Plus.1 | SubAbility$ ResetHeads
|
||||||
|
SVar:ResetHeads:DB$ StoreSVar | SVar$ Heads | Type$ Number | Expression$ 0
|
||||||
|
# Damage target creature
|
||||||
|
SVar:DamageCreature:DB$ DealDamage | Defined$ Targeted | NumDmg$ 3 | ConditionCheckSVar$ Heads | ConditionSVarCompare$ GE1 | SubAbility$ DamageOpponents
|
||||||
|
# Damage each opponent
|
||||||
|
SVar:DamageOpponents:DB$ DealDamage | Defined$ Player.Opponent | NumDmg$ 6 | ConditionCheckSVar$ Heads | ConditionSVarCompare$ GE2 | SubAbility$ DrawNine
|
||||||
|
# Draw Nine Cards
|
||||||
|
SVar:DrawNine:DB$ Draw | Defined$ You | NumCards$ 9 | ConditionCheckSVar$ Heads | ConditionSVarCompare$ GE3 | SubAbility$ UntapLands
|
||||||
|
# Untap Lands
|
||||||
|
SVar:UntapLands:DB$ UntapAll | ValidCards$ Land.YouCtrl | ConditionCheckSVar$ Heads | ConditionSVarCompare$ GE3
|
||||||
|
SVar:Heads:Number$0
|
||||||
|
SVar:Tails:Number$0
|
||||||
|
SVar:Rarity:Rare
|
||||||
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/fiery_gambit.jpg
|
||||||
|
SetInfo:MRD|Rare|http://magiccards.info/scans/en/mi/90.jpg
|
||||||
|
Oracle:Flip a coin until you lose a flip or choose to stop flipping. If you lose a flip, Fiery Gambit has no effect. If you win one or more flips, Fiery Gambit deals 3 damage to target creature. If you win two or more flips, Fiery Gambit deals 6 damage to each opponent. If you win three or more flips, draw nine cards and untap all lands you control.
|
||||||
|
End
|
||||||
@@ -664,20 +664,35 @@ public final class GameActionUtil {
|
|||||||
final String[] choices = { "heads", "tails" };
|
final String[] choices = { "heads", "tails" };
|
||||||
|
|
||||||
final boolean flip = MyRandom.getRandom().nextBoolean();
|
final boolean flip = MyRandom.getRandom().nextBoolean();
|
||||||
if (caller.isHuman()) {
|
if (null == caller) {
|
||||||
|
choice = "heads";
|
||||||
|
}
|
||||||
|
else if (caller.isHuman()) {
|
||||||
choice = GuiChoose.one(source.getName() + " - Call coin flip", choices);
|
choice = GuiChoose.one(source.getName() + " - Call coin flip", choices);
|
||||||
} else {
|
} else {
|
||||||
choice = choices[MyRandom.getRandom().nextInt(2)];
|
choice = choices[MyRandom.getRandom().nextInt(2)];
|
||||||
}
|
}
|
||||||
|
|
||||||
final boolean winFlip = flip == choice.equals("heads");
|
final boolean winFlip = flip == choice.equals("heads");
|
||||||
final String winMsg = winFlip ? " wins flip." : " loses flip.";
|
String winMsg = "";
|
||||||
|
if (null == caller) {
|
||||||
|
winMsg = flip ? "heads." : "tails.";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
winMsg = winFlip ? " wins flip." : " loses flip.";
|
||||||
|
}
|
||||||
|
|
||||||
// Play the Flip A Coin sound
|
// Play the Flip A Coin sound
|
||||||
Singletons.getModel().getGame().getEvents().post(new FlipCoinEvent());
|
Singletons.getModel().getGame().getEvents().post(new FlipCoinEvent());
|
||||||
|
|
||||||
|
if (null == caller) {
|
||||||
|
JOptionPane.showMessageDialog(null, source.getName() + " - Coin flip was " + winMsg, source.getName(),
|
||||||
|
JOptionPane.PLAIN_MESSAGE);
|
||||||
|
}
|
||||||
|
else {
|
||||||
JOptionPane.showMessageDialog(null, source.getName() + " - " + caller + winMsg, source.getName(),
|
JOptionPane.showMessageDialog(null, source.getName() + " - " + caller + winMsg, source.getName(),
|
||||||
JOptionPane.PLAIN_MESSAGE);
|
JOptionPane.PLAIN_MESSAGE);
|
||||||
|
}
|
||||||
return winFlip;
|
return winFlip;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,13 @@ public class FlipCoinEffect extends SpellEffect {
|
|||||||
}
|
}
|
||||||
|
|
||||||
final AbilityFactory afOutcomes = new AbilityFactory();
|
final AbilityFactory afOutcomes = new AbilityFactory();
|
||||||
final boolean victory = GameActionUtil.flipACoin(caller.get(0), sa.getSourceCard());
|
boolean victory;
|
||||||
|
if (sa.hasParam("FlipOnly")) {
|
||||||
|
victory = GameActionUtil.flipACoin(null, sa.getSourceCard());
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
victory = GameActionUtil.flipACoin(caller.get(0), sa.getSourceCard());
|
||||||
|
}
|
||||||
|
|
||||||
// Run triggers
|
// Run triggers
|
||||||
// HashMap<String,Object> runParams = new HashMap<String,Object>();
|
// HashMap<String,Object> runParams = new HashMap<String,Object>();
|
||||||
|
|||||||
Reference in New Issue
Block a user