- Minor fixes for Necropotence and Yawgmoth's Bargain.

--Can only pay life that is available 
--Cards are still gained even if Necro isn't in play during the end step.
--Bargain now uses the draw function
This commit is contained in:
jendave
2011-08-06 05:22:53 +00:00
parent 01aa211d5a
commit 765b102c48

View File

@@ -13313,13 +13313,7 @@ public class CardFactory implements NewConstants {
final SpellAbility ability = new Ability(card, "0") {
@Override
public void resolve() {
PlayerZone library = AllZone.getZone(Constant.Zone.Library, card.getController());
PlayerZone hand = AllZone.getZone(Constant.Zone.Hand, card.getController());
if(library.size() != 0) {
Card c = library.get(0);
library.remove(0);
hand.add(c);
}
AllZone.GameAction.drawCard(card.getController());
}
@Override
@@ -13341,10 +13335,11 @@ public class CardFactory implements NewConstants {
@Override
public void showMessage() {
AllZone.GameAction.getPlayerLife(card.getController()).subtractLife(1,card);
boolean paid = AllZone.GameAction.payLife(card.getController(), 1, card);
//this order is very important, do not change
stop();
if (paid)
AllZone.Stack.push(ability);
}
};//Input
@@ -13359,7 +13354,6 @@ public class CardFactory implements NewConstants {
private static final long serialVersionUID = 4511445425867383336L;
public void execute() {
if(AllZone.GameAction.isCardInPlay(card)) {
//put cards removed by Necropotence into player's hand
if(necroCards.size() > 0) {
PlayerZone hand = AllZone.getZone(Constant.Zone.Hand, card.getController());
@@ -13370,7 +13364,6 @@ public class CardFactory implements NewConstants {
necroCards.clear();
}
}
}
};
final SpellAbility ability = new Ability(card, "0") {
@@ -13405,10 +13398,11 @@ public class CardFactory implements NewConstants {
@Override
public void showMessage() {
AllZone.GameAction.getPlayerLife(card.getController()).subtractLife(1,card);
boolean paid = AllZone.GameAction.payLife(card.getController(), 1, card);
//this order is very important, do not change
stop();
if (paid)
AllZone.Stack.push(ability);
}
};//Input
@@ -15863,7 +15857,6 @@ public class CardFactory implements NewConstants {
}//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Nameless Inversion")) {
SpellAbility spell = new Spell(card) {