- Changed "Draw a card at the beginning of the next turn's upkeep." to a delayed triggered ability.

This commit is contained in:
jendave
2011-08-06 10:27:11 +00:00
parent 820c10d96c
commit 31b5b71b6c
4 changed files with 30 additions and 16 deletions

View File

@@ -70,7 +70,7 @@ public class ComputerUtil
if (sa.getSourceCard().getKeyword().contains("Draw a card."))
sa.getSourceCard().getController().drawCard();
if (sa.getSourceCard().getKeyword().contains("Draw a card at the beginning of the next turn's upkeep."))
sa.getSourceCard().getController().addSlowtripCount(1);
sa.getSourceCard().getController().addSlowtripList(sa.getSourceCard());
payManaCost(sa);
AllZone.Stack.add(sa);
@@ -88,7 +88,7 @@ public class ComputerUtil
if (sa.getSourceCard().getKeyword().contains("Draw a card."))
sa.getSourceCard().getController().drawCard();
if (sa.getSourceCard().getKeyword().contains("Draw a card at the beginning of the next turn's upkeep."))
sa.getSourceCard().getController().addSlowtripCount(1);
sa.getSourceCard().getController().addSlowtripList(sa.getSourceCard());
AllZone.Stack.add(sa);
}
@@ -117,7 +117,7 @@ public class ComputerUtil
if (sa.getSourceCard().getKeyword().contains("Draw a card."))
sa.getSourceCard().getController().drawCard();
if (sa.getSourceCard().getKeyword().contains("Draw a card at the beginning of the next turn's upkeep."))
sa.getSourceCard().getController().addSlowtripCount(1);
sa.getSourceCard().getController().addSlowtripList(sa.getSourceCard());
for (int i=0; i<sa.getSourceCard().getKeyword().size(); i++)
{

View File

@@ -3376,14 +3376,28 @@ public class GameActionUtil {
}//echo
private static void upkeep_Slowtrips() { // Draw a card at the beginning of the next turn's upkeep.
Player player = AllZone.Phase.getPlayerTurn();
final Player player = AllZone.Phase.getPlayerTurn();
int cards = player.getSlowtripCount();
player.drawCards(cards);
player.setSlowtripCount(0);
CardList list = player.getSlowtripList();
for (int i = 0; i < list.size(); i++) {
Card card = list.get(i);
card.removeIntrinsicKeyword("Draw a card at the beginning of the next turn's upkeep."); //otherwise another slowtrip gets added
final Ability slowtrip = new Ability(card, "0") {
@Override
public void resolve() {
player.drawCard();
}
};
slowtrip.setStackDescription(card.getName() + " - Draw a card");
AllZone.Stack.add(slowtrip);
}
player.clearSlowtripList();
}
private static void upkeep_UpkeepCost() {
CardList list = AllZoneUtil.getPlayerCardsInPlay(AllZone.Phase.getPlayerTurn());
list = list.filter(new CardListFilter() {

View File

@@ -475,7 +475,7 @@ public class MagicStack extends MyObservable {
&& !(sa.getSourceCard().getKeyword().contains("Ripple:4") && sa.isAbility()))
sa.getSourceCard().getController().drawCard();
if (sa.getSourceCard().getKeyword().contains("Draw a card at the beginning of the next turn's upkeep."))
sa.getSourceCard().getController().addSlowtripCount(1);
sa.getSourceCard().getController().addSlowtripList(sa.getSourceCard());
if (sa.getSourceCard().getKeyword().contains("Proliferate"))
AllZone.GameAction.getProliferateAbility(sa.getSourceCard(), "0").resolve();

View File

@@ -23,7 +23,7 @@ public abstract class Player extends MyObservable{
protected Card lastDrawnCard;
protected int numDrawnThisTurn = 0;
protected int slowtripCount = 0;
protected CardList slowtripList = new CardList();
public Player(String myName) {
this(myName, 20, 0);
@@ -51,7 +51,7 @@ public abstract class Player extends MyObservable{
assignedDamage = 0;
lastDrawnCard = null;
numDrawnThisTurn = 0;
slowtripCount = 0;
slowtripList = new CardList();
bFirstTurn = true;
altWin = false;
altLose = false;
@@ -531,16 +531,16 @@ public abstract class Player extends MyObservable{
return old;
}
public int getSlowtripCount() {
return slowtripCount;
public CardList getSlowtripList() {
return slowtripList;
}
public void setSlowtripCount(int count) {
slowtripCount = count;
public void clearSlowtripList() {
slowtripList.clear();
}
public void addSlowtripCount(int count) {
slowtripCount += count;
public void addSlowtripList(Card card) {
slowtripList.add(card);
}
public boolean isFirstTurn() { return bFirstTurn; }