- Added Wiitigo.

This commit is contained in:
Sloth
2013-08-01 12:39:48 +00:00
parent 4c73af527c
commit 6d93668df5
6 changed files with 48 additions and 0 deletions

1
.gitattributes vendored
View File

@@ -12701,6 +12701,7 @@ res/cardsfolder/w/wicker_warcrawler.txt svneol=native#text/plain
res/cardsfolder/w/wickerbough_elder.txt svneol=native#text/plain res/cardsfolder/w/wickerbough_elder.txt svneol=native#text/plain
res/cardsfolder/w/wielding_the_green_dragon.txt svneol=native#text/plain res/cardsfolder/w/wielding_the_green_dragon.txt svneol=native#text/plain
res/cardsfolder/w/wight_of_precinct_six.txt -text res/cardsfolder/w/wight_of_precinct_six.txt -text
res/cardsfolder/w/wiitigo.txt -text
res/cardsfolder/w/wild_aesthir.txt svneol=native#text/plain res/cardsfolder/w/wild_aesthir.txt svneol=native#text/plain
res/cardsfolder/w/wild_beastmaster.txt -text res/cardsfolder/w/wild_beastmaster.txt -text
res/cardsfolder/w/wild_cantor.txt svneol=native#text/plain res/cardsfolder/w/wild_cantor.txt svneol=native#text/plain

View File

@@ -0,0 +1,10 @@
Name:Wiitigo
ManaCost:3 G G G
Types:Creature Yeti
PT:0/0
K:etbCounter:P1P1:6
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ You | TriggerZones$ Battlefield | Execute$ TrigPutCounter2 | TriggerDescription$ At the beginning of your upkeep, put a +1/+1 counter on CARDNAME if it has blocked or been blocked since your last upkeep. Otherwise, remove a +1/+1 counter from it.
SVar:TrigPutCounter2:AB$ PutCounter | Cost$ 0 | CounterType$ P1P1 | CounterNum$ 1 | ConditionPresent$ Card.Self+blockedOrBeenBlockedSinceYourLastUpkeep | SubAbility$ RemCounter
SVar:RemCounter:DB$ RemoveCounter | CounterType$ P1P1 | CounterNum$ 1 | ConditionPresent$ Card.Self+blockedOrBeenBlockedSinceYourLastUpkeep | ConditionCompare$ EQ0
SVar:Picture:http://www.wizards.com/global/images/magic/general/wiitigo.jpg
Oracle:Wiitigo enters the battlefield with six +1/+1 counters on it.\nAt the beginning of your upkeep, put a +1/+1 counter on Wiitigo if it has blocked or been blocked since your last upkeep. Otherwise, remove a +1/+1 counter from it.

View File

@@ -6146,6 +6146,11 @@ public class Card extends GameEntity implements Comparable<Card> {
&& !this.getDamageHistory().hasBlockedSinceLastUpkeepOf(sourceController)) { && !this.getDamageHistory().hasBlockedSinceLastUpkeepOf(sourceController)) {
return false; return false;
} }
} else if (property.equals("blockedOrBeenBlockedSinceYourLastUpkeep")) {
if (!this.getDamageHistory().hasBeenBlockedSinceLastUpkeepOf(sourceController)
&& !this.getDamageHistory().hasBlockedSinceLastUpkeepOf(sourceController)) {
return false;
}
} else if (property.startsWith("dealtDamageToYouThisTurn")) { } else if (property.startsWith("dealtDamageToYouThisTurn")) {
if (!this.getDamageHistory().getThisTurnDamaged().contains(sourceController)) { if (!this.getDamageHistory().getThisTurnDamaged().contains(sourceController)) {
return false; return false;

View File

@@ -22,6 +22,7 @@ public class CardDamageHistory {
private final List<Player> creatureAttackedLastTurnOf = new ArrayList<Player>(); private final List<Player> creatureAttackedLastTurnOf = new ArrayList<Player>();
private final List<Player> NotAttackedSinceLastUpkeepOf = new ArrayList<Player>(); private final List<Player> NotAttackedSinceLastUpkeepOf = new ArrayList<Player>();
private final List<Player> NotBlockedSinceLastUpkeepOf = new ArrayList<Player>(); private final List<Player> NotBlockedSinceLastUpkeepOf = new ArrayList<Player>();
private final List<Player> NotBeenBlockedSinceLastUpkeepOf = new ArrayList<Player>();
private final List<Player> damagedThisTurn = new ArrayList<Player>(); private final List<Player> damagedThisTurn = new ArrayList<Player>();
private final List<Player> damagedThisTurnInCombat = new ArrayList<Player>(); private final List<Player> damagedThisTurnInCombat = new ArrayList<Player>();
private final List<Player> damagedThisGame = new ArrayList<Player>(); private final List<Player> damagedThisGame = new ArrayList<Player>();
@@ -169,6 +170,31 @@ public class CardDamageHistory {
public final boolean hasBlockedSinceLastUpkeepOf(final Player p) { public final boolean hasBlockedSinceLastUpkeepOf(final Player p) {
return !NotBlockedSinceLastUpkeepOf.contains(p); return !NotBlockedSinceLastUpkeepOf.contains(p);
} }
/**
* <p>
* Setter for the field <code>NotAttackedSinceLastUpkeepOf</code>.
* </p>
*
* @param value
* a boolean.
*/
public final void setNotBeenBlockedSinceLastUpkeepOf(final Player p) {
NotBeenBlockedSinceLastUpkeepOf.add(p);
}
public final void clearNotBeenBlockedSinceLastUpkeepOf() {
NotBeenBlockedSinceLastUpkeepOf.clear();
}
/**
* <p>
* Getter for the field <code>NotAttackedSinceLastUpkeepOf</code>.
* </p>
*
* @return a boolean.
*/
public final boolean hasBeenBlockedSinceLastUpkeepOf(final Player p) {
return !NotBeenBlockedSinceLastUpkeepOf.contains(p);
}
/** /**
* <p> * <p>
* Setter for the field <code>creatureBlockedThisCombat</code>. * Setter for the field <code>creatureBlockedThisCombat</code>.

View File

@@ -300,6 +300,7 @@ public class GameAction {
for (Player p : game.getPlayers()) { for (Player p : game.getPlayers()) {
copied.getDamageHistory().setNotAttackedSinceLastUpkeepOf(p); copied.getDamageHistory().setNotAttackedSinceLastUpkeepOf(p);
copied.getDamageHistory().setNotBlockedSinceLastUpkeepOf(p); copied.getDamageHistory().setNotBlockedSinceLastUpkeepOf(p);
copied.getDamageHistory().setNotBeenBlockedSinceLastUpkeepOf(p);
} }
} else if (zoneTo.is(ZoneType.Graveyard)) { } else if (zoneTo.is(ZoneType.Graveyard)) {
copied.setTimestamp(game.getNextTimestamp()); copied.setTimestamp(game.getNextTimestamp());

View File

@@ -446,6 +446,7 @@ public class PhaseHandler implements java.io.Serializable {
for (Card c : game.getCardsIn(ZoneType.Battlefield)) { for (Card c : game.getCardsIn(ZoneType.Battlefield)) {
c.getDamageHistory().setNotAttackedSinceLastUpkeepOf(this.getPlayerTurn()); c.getDamageHistory().setNotAttackedSinceLastUpkeepOf(this.getPlayerTurn());
c.getDamageHistory().setNotBlockedSinceLastUpkeepOf(this.getPlayerTurn()); c.getDamageHistory().setNotBlockedSinceLastUpkeepOf(this.getPlayerTurn());
c.getDamageHistory().setNotBeenBlockedSinceLastUpkeepOf(this.getPlayerTurn());
} }
break; break;
@@ -629,6 +630,10 @@ public class PhaseHandler implements java.io.Serializable {
} }
for (final Card a : combat.getAttackers()) { for (final Card a : combat.getAttackers()) {
if (combat.isBlocked(a)) {
a.getDamageHistory().clearNotBeenBlockedSinceLastUpkeepOf();
}
List<Card> blockers = combat.getBlockers(a); List<Card> blockers = combat.getBlockers(a);
if ( blockers.isEmpty() ) if ( blockers.isEmpty() )
continue; continue;