- Added a new kinship card, Squeaking Pie Grubfellows.

This commit is contained in:
jendave
2011-08-06 10:29:04 +00:00
parent c19bcb21ef
commit 42dc2c47a3
3 changed files with 85 additions and 1 deletions

1
.gitattributes vendored
View File

@@ -4161,6 +4161,7 @@ res/cardsfolder/squadron_hawk.txt -text svneol=native#text/plain
res/cardsfolder/squall.txt -text svneol=native#text/plain
res/cardsfolder/squall_drifter.txt -text svneol=native#text/plain
res/cardsfolder/squall_line.txt -text svneol=native#text/plain
res/cardsfolder/squeaking_pie_grubfellows.txt -text svneol=native#text/plain
res/cardsfolder/squee_goblin_nabob.txt -text svneol=native#text/plain
res/cardsfolder/squees_embrace.txt -text svneol=native#text/plain
res/cardsfolder/squeeze.txt -text svneol=native#text/plain

View File

@@ -0,0 +1,9 @@
Name:Squeaking Pie Grubfellows
ManaCost:3 B
Types:Creature Goblin Shaman
Text:Kinship - At the beginning of your upkeep, you may look at the top card of your library. If it shares a creature type with Squeaking Pie Grubfellows, you may reveal it. If you do, each opponent discards a card.
PT:3/2
SVar:RemAIDeck:True
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/squeaking_pie_grubfellows.jpg
End

View File

@@ -76,6 +76,7 @@ public class GameActionUtil {
upkeep_Wolf_Skull_Shaman();
upkeep_Leaf_Crowned_Elder();
upkeep_Ink_Dissolver();
upkeep_Squeaking_Pie_Grubfellows();
upkeep_Debtors_Knell();
upkeep_Reya();
upkeep_Emeria();
@@ -7554,7 +7555,80 @@ public class GameActionUtil {
ability.setStackDescription(sb.toString());
AllZone.Stack.add(ability);
}// for
}// upkeep_Sensation_Gorger()
}// upkeep_Sensation_Gorger()
private static void upkeep_Squeaking_Pie_Grubfellows() {
final Player player = AllZone.Phase.getPlayerTurn();
CardList kinship = AllZoneUtil.getPlayerCardsInPlay(player, "Squeaking Pie Grubfellows");
final Player opponent = player.getOpponent();
PlayerZone library = AllZone.getZone(Constant.Zone.Library, player);
// Players would not choose to trigger Kinship ability if library is empty.
// Useful for games when the "Milling = Loss Condition" check box is unchecked.
if (kinship.size() == 0 || library.size() <= 0)
return;
final String[] shareTypes = { "Goblin", "Shaman" };
final Card[] prevCardShown = { null };
final Card peek[] = { null };
for (final Card k : kinship) {
Ability ability = new Ability(k, "0") { // change to triggered abilities when ready
@Override
public void resolve() {
PlayerZone library = AllZone.getZone(Constant.Zone.Library, player);
if (library.size() <= 0)
return;
peek[0] = library.get(0);
boolean wantOpponentDiscard = false;
// We assume that both players will want to peek, ask if they want to reveal.
// We do not want to slow down the pace of the game by asking too many questions.
// Dialogs outside of the Ability appear at the previous end of turn phase !!!
if (peek[0].isValidCard(shareTypes)) {
if (player.isHuman()) {
StringBuilder question = new StringBuilder();
question.append("Your top card is ").append(peek[0].getName());
question.append(". Reveal card and have opponent discard a card?");
if (showYesNoDialog(k, question.toString())) {
wantOpponentDiscard = true;
}
}
// player isComputer()
else {
String title = "Computer reveals";
revealTopCard(title);
wantOpponentDiscard = true;
}
} else if (player.isHuman()) {
String title = "Your top card is";
revealTopCard(title);
}
if (wantOpponentDiscard) {
opponent.discard(this);
}
}// resolve()
private void revealTopCard(String title) {
if (peek[0] != prevCardShown[0]) {
AllZone.Display.getChoice(title, peek[0]);
prevCardShown[0] = peek[0];
}
}// revealTopCard()
};// ability
StringBuilder sb = new StringBuilder();
sb.append("Squeaking Pie Grubfellows - ").append(player);
sb.append(" triggers Kinship");
ability.setStackDescription(sb.toString());
AllZone.Stack.add(ability);
}// for
}// upkeep_Squeaking_Pie_Grubfellows()
private static void upkeep_Wandering_Graybeard() {