mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
add Sorcerer's Strongbox (from Archenemy)
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -3933,6 +3933,7 @@ res/cardsfolder/sootfeather_flock.txt -text svneol=native#text/plain
|
|||||||
res/cardsfolder/soothing_balm.txt -text svneol=native#text/plain
|
res/cardsfolder/soothing_balm.txt -text svneol=native#text/plain
|
||||||
res/cardsfolder/sootwalkers.txt -text svneol=native#text/plain
|
res/cardsfolder/sootwalkers.txt -text svneol=native#text/plain
|
||||||
res/cardsfolder/soratami_cloudskater.txt -text svneol=native#text/plain
|
res/cardsfolder/soratami_cloudskater.txt -text svneol=native#text/plain
|
||||||
|
res/cardsfolder/sorcerers_strongbox.txt -text svneol=native#text/plain
|
||||||
res/cardsfolder/sorceress_queen.txt -text svneol=native#text/plain
|
res/cardsfolder/sorceress_queen.txt -text svneol=native#text/plain
|
||||||
res/cardsfolder/sosukes_summons.txt -text svneol=native#text/plain
|
res/cardsfolder/sosukes_summons.txt -text svneol=native#text/plain
|
||||||
res/cardsfolder/soul_bleed.txt -text svneol=native#text/plain
|
res/cardsfolder/soul_bleed.txt -text svneol=native#text/plain
|
||||||
|
|||||||
7
res/cardsfolder/sorcerers_strongbox.txt
Normal file
7
res/cardsfolder/sorcerers_strongbox.txt
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
Name:Sorcerer's Strongbox
|
||||||
|
ManaCost:4
|
||||||
|
Types:Artifact
|
||||||
|
Text:no text
|
||||||
|
SVar:Rarity:Uncommon
|
||||||
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/sorcerers_strongbox.jpg
|
||||||
|
End
|
||||||
@@ -10315,59 +10315,58 @@ public class CardFactory implements NewConstants {
|
|||||||
|
|
||||||
|
|
||||||
//*************** START *********** START **************************
|
//*************** START *********** START **************************
|
||||||
else if(cardName.equals("Bottle of Suleiman")) {
|
else if(cardName.equals("Bottle of Suleiman")) {
|
||||||
/*
|
/*
|
||||||
* Sacrifice Bottle of Suleiman: Flip a coin. If you lose the flip,
|
* Sacrifice Bottle of Suleiman: Flip a coin. If you lose the flip,
|
||||||
* Bottle of Suleiman deals 5 damage to you. If you win the flip,
|
* Bottle of Suleiman deals 5 damage to you. If you win the flip,
|
||||||
* put a 5/5 colorless Djinn artifact creature token with flying
|
* put a 5/5 colorless Djinn artifact creature token with flying
|
||||||
* onto the battlefield.
|
* onto the battlefield.
|
||||||
*/
|
*/
|
||||||
Ability_Cost abCost = new Ability_Cost("1 Sac<1/CARDNAME>", cardName, true);
|
Ability_Cost abCost = new Ability_Cost("1 Sac<1/CARDNAME>", cardName, true);
|
||||||
final SpellAbility ability = new Ability_Activated(card, abCost, null) {
|
final SpellAbility ability = new Ability_Activated(card, abCost, null) {
|
||||||
private static final long serialVersionUID = -5741302550353410000L;
|
private static final long serialVersionUID = -5741302550353410000L;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canPlayAI() {
|
public boolean canPlayAI() {
|
||||||
//PlayerLife life = AllZone.GameAction.getPlayerLife(AllZone.ComputerPlayer);
|
if( AllZone.ComputerPlayer.getLife() > 10 ) {
|
||||||
if( AllZone.ComputerPlayer.getLife() > 10 ) {
|
return true;
|
||||||
return true;
|
}
|
||||||
}
|
CardList play = new CardList(AllZone.Computer_Play.getCards());
|
||||||
CardList play = new CardList(AllZone.Computer_Play.getCards());
|
play = play.getType("Creature");
|
||||||
play = play.getType("Creature");
|
if( play.size() == 0 ) {
|
||||||
if( play.size() == 0 ) {
|
return true;
|
||||||
return true;
|
}
|
||||||
}
|
return false;
|
||||||
return false;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void resolve() {
|
public void resolve() {
|
||||||
final Player player = AllZone.Phase.getActivePlayer();
|
final Player player = AllZone.Phase.getActivePlayer();
|
||||||
String choice = "";
|
String choice = "";
|
||||||
String choices[] = {"heads","tails"};
|
String choices[] = {"heads","tails"};
|
||||||
boolean flip = MyRandom.percentTrue(50);
|
boolean flip = MyRandom.percentTrue(50);
|
||||||
if(card.getController().equals(AllZone.HumanPlayer)) {
|
if(card.getController().equals(AllZone.HumanPlayer)) {
|
||||||
choice = (String) AllZone.Display.getChoice("Choose one", choices);
|
choice = (String) AllZone.Display.getChoice("Choose one", choices);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
choice = choices[MyRandom.random.nextInt(2)];
|
choice = choices[MyRandom.random.nextInt(2)];
|
||||||
}
|
}
|
||||||
|
|
||||||
if( (flip == true && choice.equals("heads")) || (flip == false && choice.equals("tails"))) {
|
if( (flip == true && choice.equals("heads")) || (flip == false && choice.equals("tails"))) {
|
||||||
JOptionPane.showMessageDialog(null, "Bottle of Suleiman - Win! - "+player+" puts a 5/5 Flying Djinn in play.", "Bottle of Suleiman", JOptionPane.PLAIN_MESSAGE);
|
JOptionPane.showMessageDialog(null, "Bottle of Suleiman - Win! - "+player+" puts a 5/5 Flying Djinn in play.", "Bottle of Suleiman", JOptionPane.PLAIN_MESSAGE);
|
||||||
CardFactoryUtil.makeToken("Djinn", "C 5 5 Djinn", card.getController(), "", new String[] {"Creature", "Artifact", "Djinn"}, 5, 5, new String[] {"Flying"});
|
CardFactoryUtil.makeToken("Djinn", "C 5 5 Djinn", card.getController(), "", new String[] {"Creature", "Artifact", "Djinn"}, 5, 5, new String[] {"Flying"});
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
JOptionPane.showMessageDialog(null, "Bottle of Suleiman - Lose - Bottle does 5 damage to "+player+".", "Bottle of Suleiman", JOptionPane.PLAIN_MESSAGE);
|
JOptionPane.showMessageDialog(null, "Bottle of Suleiman - Lose - Bottle does 5 damage to "+player+".", "Bottle of Suleiman", JOptionPane.PLAIN_MESSAGE);
|
||||||
card.getController().addDamage(5, card);
|
card.getController().addDamage(5, card);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};//SpellAbility
|
};//SpellAbility
|
||||||
|
|
||||||
card.addSpellAbility(ability);
|
card.addSpellAbility(ability);
|
||||||
ability.setDescription("1, Sacrifice Bottle of Suleiman: Flip a coin. Win: Put 5/5 Djinn in play. Lose: Does 5 damage to you.");
|
ability.setDescription("1, Sacrifice Bottle of Suleiman: Flip a coin. Win: Put 5/5 Djinn in play. Lose: Does 5 damage to you.");
|
||||||
ability.setStackDescription("Bottle of Suleiman - flip a coin");
|
ability.setStackDescription("Bottle of Suleiman - flip a coin");
|
||||||
}//*************** END ************ END **************************
|
}//*************** END ************ END **************************
|
||||||
|
|
||||||
|
|
||||||
//*************** START *********** START **************************
|
//*************** START *********** START **************************
|
||||||
@@ -11510,6 +11509,45 @@ public class CardFactory implements NewConstants {
|
|||||||
card.addSpellAbility(draw);
|
card.addSpellAbility(draw);
|
||||||
}//*************** END ************ END **************************
|
}//*************** END ************ END **************************
|
||||||
|
|
||||||
|
//*************** START *********** START **************************
|
||||||
|
else if(cardName.equals("Sorcerer's Strongbox")) {
|
||||||
|
/*
|
||||||
|
* 2, Tap: Flip a coin. If you win the flip, sacrifice Sorcerer's
|
||||||
|
* Strongbox and draw three cards.
|
||||||
|
*/
|
||||||
|
Ability_Cost abCost = new Ability_Cost("2 T", cardName, true);
|
||||||
|
final SpellAbility ability = new Ability_Activated(card, abCost, null) {
|
||||||
|
private static final long serialVersionUID = 5152381570537520053L;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void resolve() {
|
||||||
|
final Player player = AllZone.Phase.getActivePlayer();
|
||||||
|
String choice = "";
|
||||||
|
String choices[] = {"heads","tails"};
|
||||||
|
boolean flip = MyRandom.percentTrue(50);
|
||||||
|
if(card.getController().equals(AllZone.HumanPlayer)) {
|
||||||
|
choice = (String) AllZone.Display.getChoice("Choose one", choices);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
choice = choices[MyRandom.random.nextInt(2)];
|
||||||
|
}
|
||||||
|
|
||||||
|
if( (flip == true && choice.equals("heads")) || (flip == false && choice.equals("tails"))) {
|
||||||
|
JOptionPane.showMessageDialog(null, card.getName()+" - Win! - "+player+" draws 3 cards.", card.getName(), JOptionPane.PLAIN_MESSAGE);
|
||||||
|
AllZone.GameAction.sacrifice(card);
|
||||||
|
player.drawCards(3);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
JOptionPane.showMessageDialog(null, card.getName()+" - Lose.", card.getName(), JOptionPane.PLAIN_MESSAGE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};//SpellAbility
|
||||||
|
|
||||||
|
card.addSpellAbility(ability);
|
||||||
|
ability.setDescription(abCost+"Flip a coin. If you win the flip, sacrifice Sorcerer's Strongbox and draw three cards.");
|
||||||
|
ability.setStackDescription(card.getName()+" - flip a coin");
|
||||||
|
}//*************** END ************ END **************************
|
||||||
|
|
||||||
return postFactoryKeywords(card);
|
return postFactoryKeywords(card);
|
||||||
}//getCard2
|
}//getCard2
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user