mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
*Added Lurking Predators.
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -2983,6 +2983,7 @@ res/cardsfolder/lunge.txt -text svneol=native#text/plain
|
|||||||
res/cardsfolder/lure.txt -text svneol=native#text/plain
|
res/cardsfolder/lure.txt -text svneol=native#text/plain
|
||||||
res/cardsfolder/lurking_informant.txt -text svneol=native#text/plain
|
res/cardsfolder/lurking_informant.txt -text svneol=native#text/plain
|
||||||
res/cardsfolder/lurking_nightstalker.txt -text svneol=native#text/plain
|
res/cardsfolder/lurking_nightstalker.txt -text svneol=native#text/plain
|
||||||
|
res/cardsfolder/lurking_predators.txt -text svneol=native#text/plain
|
||||||
res/cardsfolder/lux_cannon.txt -text svneol=native#text/plain
|
res/cardsfolder/lux_cannon.txt -text svneol=native#text/plain
|
||||||
res/cardsfolder/lymph_sliver.txt -text svneol=native#text/plain
|
res/cardsfolder/lymph_sliver.txt -text svneol=native#text/plain
|
||||||
res/cardsfolder/lynx.txt -text svneol=native#text/plain
|
res/cardsfolder/lynx.txt -text svneol=native#text/plain
|
||||||
|
|||||||
8
res/cardsfolder/lurking_predators.txt
Normal file
8
res/cardsfolder/lurking_predators.txt
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
Name:Lurking Predators
|
||||||
|
ManaCost:4 G G
|
||||||
|
Types:Enchantment
|
||||||
|
Text:Whenever an opponent casts a spell, reveal the top card of your library. If it's a creature card, put it onto the battlefield. Otherwise, you may put that card on the bottom of your library.
|
||||||
|
SVar:Rarity:Rare
|
||||||
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/lurking_predators.jpg
|
||||||
|
End
|
||||||
|
#Uses card-specific code!
|
||||||
@@ -100,7 +100,7 @@
|
|||||||
<int>0</int>
|
<int>0</int>
|
||||||
<int>489</int>
|
<int>489</int>
|
||||||
<int>197</int>
|
<int>197</int>
|
||||||
<int>159</int>
|
<int>147</int>
|
||||||
</object>
|
</object>
|
||||||
</void>
|
</void>
|
||||||
<void property="name">
|
<void property="name">
|
||||||
@@ -119,7 +119,7 @@
|
|||||||
<void property="bounds">
|
<void property="bounds">
|
||||||
<object class="java.awt.Rectangle">
|
<object class="java.awt.Rectangle">
|
||||||
<int>0</int>
|
<int>0</int>
|
||||||
<int>648</int>
|
<int>636</int>
|
||||||
<int>197</int>
|
<int>197</int>
|
||||||
<int>5</int>
|
<int>5</int>
|
||||||
</object>
|
</object>
|
||||||
@@ -134,9 +134,9 @@
|
|||||||
<void property="bounds">
|
<void property="bounds">
|
||||||
<object class="java.awt.Rectangle">
|
<object class="java.awt.Rectangle">
|
||||||
<int>0</int>
|
<int>0</int>
|
||||||
<int>653</int>
|
<int>641</int>
|
||||||
<int>197</int>
|
<int>197</int>
|
||||||
<int>182</int>
|
<int>194</int>
|
||||||
</object>
|
</object>
|
||||||
</void>
|
</void>
|
||||||
<void property="name">
|
<void property="name">
|
||||||
|
|||||||
@@ -4633,6 +4633,10 @@ public class GameActionUtil {
|
|||||||
else return false;
|
else return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void showInfoDialg(String message) {
|
||||||
|
JOptionPane.showMessageDialog(null, message);
|
||||||
|
}
|
||||||
|
|
||||||
public static boolean flipACoin(Player caller, Card source) {
|
public static boolean flipACoin(Player caller, Card source) {
|
||||||
String choice = "";
|
String choice = "";
|
||||||
String choices[] = {"heads","tails"};
|
String choices[] = {"heads","tails"};
|
||||||
|
|||||||
@@ -432,6 +432,95 @@ public class MagicStack extends MyObservable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Lurking Predators
|
||||||
|
if(sp.isSpell())
|
||||||
|
{
|
||||||
|
CardListFilter filter = new CardListFilter() {
|
||||||
|
public boolean addCard(Card c)
|
||||||
|
{
|
||||||
|
return c.getName().equals("Lurking Predators");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
CardList lurkingPredators = new CardList();
|
||||||
|
if(sp.getSourceCard().getController() == AllZone.HumanPlayer)
|
||||||
|
{
|
||||||
|
lurkingPredators.add(new CardList(AllZone.Computer_Battlefield.getCards()));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
lurkingPredators.add(new CardList(AllZone.Human_Battlefield.getCards()));
|
||||||
|
}
|
||||||
|
|
||||||
|
lurkingPredators = lurkingPredators.filter(filter);
|
||||||
|
|
||||||
|
for(int i=0;i<lurkingPredators.size();i++)
|
||||||
|
{
|
||||||
|
StringBuilder revealMsg = new StringBuilder("");
|
||||||
|
if(lurkingPredators.get(i).getController() == AllZone.HumanPlayer)
|
||||||
|
{
|
||||||
|
revealMsg.append("You reveal: ");
|
||||||
|
if(AllZone.Human_Library.size() == 0)
|
||||||
|
{
|
||||||
|
revealMsg.append("Nothing!");
|
||||||
|
GameActionUtil.showInfoDialg(revealMsg.toString());
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
Card revealed = AllZone.Human_Library.get(0);
|
||||||
|
AllZone.Human_Library.remove(0);
|
||||||
|
revealMsg.append(revealed.getName());
|
||||||
|
if(!revealed.isType("Creature"))
|
||||||
|
{
|
||||||
|
revealMsg.append("\n\rPut it on the bottom of your library?");
|
||||||
|
if(GameActionUtil.showYesNoDialog(lurkingPredators.get(i), revealMsg.toString()))
|
||||||
|
{
|
||||||
|
AllZone.GameAction.moveToBottomOfLibrary(revealed);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
AllZone.GameAction.moveToTopOfLibrary(revealed);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
GameActionUtil.showInfoDialg(revealMsg.toString());
|
||||||
|
AllZone.GameAction.moveToPlay(revealed);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
revealMsg.append("Computer reveals: ");
|
||||||
|
if(AllZone.Computer_Library.size() == 0)
|
||||||
|
{
|
||||||
|
revealMsg.append("Nothing!");
|
||||||
|
GameActionUtil.showInfoDialg(revealMsg.toString());
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
Card revealed = AllZone.Computer_Library.get(0);
|
||||||
|
AllZone.Computer_Library.remove(0);
|
||||||
|
revealMsg.append(revealed.getName());
|
||||||
|
if(!revealed.isType("Creature"))
|
||||||
|
{
|
||||||
|
GameActionUtil.showInfoDialg(revealMsg.toString());
|
||||||
|
if(lurkingPredators.size() > i)
|
||||||
|
{
|
||||||
|
AllZone.GameAction.moveToBottomOfLibrary(revealed);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
AllZone.GameAction.moveToTopOfLibrary(revealed);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
GameActionUtil.showInfoDialg(revealMsg.toString());
|
||||||
|
AllZone.GameAction.moveToPlay(revealed);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (sp.getTargetCard() != null)
|
if (sp.getTargetCard() != null)
|
||||||
CardFactoryUtil.checkTargetingEffects(sp, sp.getTargetCard());
|
CardFactoryUtil.checkTargetingEffects(sp, sp.getTargetCard());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user