mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 20:58:03 +00:00
add Mijae Djinn (from Arabian Nights)
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -3024,6 +3024,7 @@ res/cardsfolder/might_sliver.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/might_weaver.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/mightstone.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/mighty_leap.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/mijae_djinn.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/mikokoro_center_of_the_sea.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/millstone.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/minamo_school_at_waters_edge.txt -text svneol=native#text/plain
|
||||
|
||||
8
res/cardsfolder/mijae_djinn.txt
Normal file
8
res/cardsfolder/mijae_djinn.txt
Normal file
@@ -0,0 +1,8 @@
|
||||
Name:Mijae Djinn
|
||||
ManaCost:R R R
|
||||
Types:Creature Djinn
|
||||
Text:Whenever CARDNAME attacks, flip a coin. If you lose the flip, remove CARDNAME from combat and tap it.
|
||||
PT:6/3
|
||||
SVar:Rarity:Rare
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/mijae_djinn.jpg
|
||||
End
|
||||
@@ -1112,6 +1112,17 @@ public class CombatUtil {
|
||||
AllZone.Stack.add(ability);
|
||||
}//Raging Ravine
|
||||
|
||||
//Mijae Djinn
|
||||
if(c.getName().equals("Mijae Djinn")) {
|
||||
if( GameActionUtil.flipACoin(c.getController(), c)) {
|
||||
//attack as normal
|
||||
}
|
||||
else{
|
||||
AllZone.Combat.removeFromCombat(c);
|
||||
c.tap();
|
||||
}
|
||||
}//Raging Ravine
|
||||
|
||||
if ((AllZone.Combat.getAttackers().length + AllZone.pwCombat.getAttackers().length) == 1)
|
||||
{
|
||||
if (c.getKeyword().contains("Whenever this creature attacks alone, it gets +2/+0 until end of turn.") ||
|
||||
|
||||
@@ -4626,6 +4626,27 @@ public class GameActionUtil {
|
||||
if (answer == JOptionPane.YES_OPTION) return true;
|
||||
else return false;
|
||||
}
|
||||
|
||||
public static boolean flipACoin(Player caller, Card source) {
|
||||
String choice = "";
|
||||
String choices[] = {"heads","tails"};
|
||||
boolean flip = MyRandom.percentTrue(50);
|
||||
if(caller.isHuman()) {
|
||||
choice = (String) AllZone.Display.getChoice(source.getName()+" - Call coin flip", choices);
|
||||
}
|
||||
else {
|
||||
choice = choices[MyRandom.random.nextInt(2)];
|
||||
}
|
||||
|
||||
if( (flip == true && choice.equals("heads")) || (flip == false && choice.equals("tails"))) {
|
||||
JOptionPane.showMessageDialog(null, source.getName()+" - "+caller+" wins flip.", source.getName(), JOptionPane.PLAIN_MESSAGE);
|
||||
return true;
|
||||
}
|
||||
else{
|
||||
JOptionPane.showMessageDialog(null, source.getName()+" - "+caller+" loses flip.", source.getName(), JOptionPane.PLAIN_MESSAGE);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
/*
|
||||
private static boolean showDialog(Card c) {
|
||||
String[] choices = {"Yes", "No"};
|
||||
|
||||
Reference in New Issue
Block a user