added Lord of the Pit (from original base Alpha)

This commit is contained in:
jendave
2011-08-06 07:18:50 +00:00
parent 939144fb2b
commit 4267ddce95
3 changed files with 60 additions and 0 deletions

1
.gitattributes vendored
View File

@@ -2077,6 +2077,7 @@ res/cardsfolder/longbow_archer.txt -text svneol=native#text/plain
res/cardsfolder/looming_shade.txt -text svneol=native#text/plain
res/cardsfolder/lord_of_atlantis.txt -text svneol=native#text/plain
res/cardsfolder/lord_of_extinction.txt -text svneol=native#text/plain
res/cardsfolder/lord_of_the_pit.txt -text svneol=native#text/plain
res/cardsfolder/lord_of_the_undead.txt -text svneol=native#text/plain
res/cardsfolder/lorescale_coatl.txt -text svneol=native#text/plain
res/cardsfolder/lorthos_the_tidemaker.txt -text svneol=native#text/plain

View File

@@ -0,0 +1,10 @@
Name:Lord of the Pit
ManaCost:4 B B B
Types:Creature Demon
Text:At the beginning of your upkeep, sacrifice a creature other than Lord of the Pit. If you can't, Lord of the Pit deals 7 damage to you.
PT:7/7
K:Flying
K:Trample
K:SVar:Rarity:Rare
K:SVar:Picture:http://www.wizards.com/global/images/magic/general/lord_of_the_pit.jpg
End

View File

@@ -23,6 +23,7 @@ public class GameActionUtil {
AllZone.GameAction.CheckWheneverKeyword(AllZone.CardFactory.HumanNullCard, "BeginningOfUpkeep", null);
upkeep_Lord_of_the_Pit();
upkeep_Drop_of_Honey();
upkeep_Genesis();
upkeep_Phyrexian_Arena();
@@ -3529,6 +3530,54 @@ public class GameActionUtil {
}
}//damageUpkeepCost
private static void upkeep_Lord_of_the_Pit() {
/*
* At the beginning of your upkeep, sacrifice a creature other than
* Lord of the Pit. If you can't, Lord of the Pit deals 7 damage to you.
*/
final String player = AllZone.Phase.getActivePlayer();
final CardList cards = AllZoneUtil.getPlayerCardsInPlay(player, "Lord of the Pit");
for(int i = 0; i < cards.size(); i++) {
final Card c = cards.get(i);
final Ability sacrificeCreature = new Ability(c, "") {
@Override
public void resolve() {
//TODO: this should handle the case where you sacrifice 2 LOTPs to each other
CardList creatures = AllZoneUtil.getCreaturesInPlay(player);
creatures.remove(c);
if(player.equals(Constant.Player.Human)) {
AllZone.InputControl.setInput(CardFactoryUtil.input_sacrificePermanent(creatures, c.getName()+" - Select a creature to sacrifice."));
}
else { //computer
Card target = CardFactoryUtil.AI_getWorstCreature(creatures);
AllZone.GameAction.sacrifice(target);
}
}//resolve
};
final Ability sevenDamage = new Ability(c, "") {
@Override
public void resolve() {
AllZone.GameAction.addDamage(player, c, 7);
}
};
CardList creatures = AllZoneUtil.getCreaturesInPlay(player);
creatures.remove(c);
if(creatures.size() == 0) {
//there are no creatures to sacrifice, so we must do the 7 damage
sevenDamage.setStackDescription(c.getName()+" - deals 7 damage to controller");
AllZone.Stack.add(sevenDamage);
}
else {
sacrificeCreature.setStackDescription(c.getName()+" - sacrifice a creature.");
AllZone.Stack.add(sacrificeCreature);
}
}//end for
}
private static void upkeep_Drop_of_Honey() {
/*
* At the beginning of your upkeep, destroy the creature with the