add Sorcerer's Strongbox (from Archenemy)

This commit is contained in:
jendave
2011-08-06 09:48:26 +00:00
parent 157c6e8cc5
commit 914ab64ccd
3 changed files with 97 additions and 51 deletions

1
.gitattributes vendored
View File

@@ -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/sootwalkers.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/sosukes_summons.txt -text svneol=native#text/plain
res/cardsfolder/soul_bleed.txt -text svneol=native#text/plain

View 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

View File

@@ -10328,7 +10328,6 @@ public class CardFactory implements NewConstants {
@Override
public boolean canPlayAI() {
//PlayerLife life = AllZone.GameAction.getPlayerLife(AllZone.ComputerPlayer);
if( AllZone.ComputerPlayer.getLife() > 10 ) {
return true;
}
@@ -11510,6 +11509,45 @@ public class CardFactory implements NewConstants {
card.addSpellAbility(draw);
}//*************** 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);
}//getCard2