- Re-added Gaze of the Gorgon.

This commit is contained in:
Sloth
2012-02-24 19:11:11 +00:00
parent 736704f86c
commit 0f54f0b4ce
6 changed files with 64 additions and 19 deletions

1
.gitattributes vendored
View File

@@ -3343,6 +3343,7 @@ res/cardsfolder/g/gavony_township.txt -text
res/cardsfolder/g/gaze_of_adamaro.txt svneol=native#text/plain
res/cardsfolder/g/gaze_of_justice.txt svneol=native#text/plain
res/cardsfolder/g/gaze_of_pain.txt svneol=native#text/plain
res/cardsfolder/g/gaze_of_the_gorgon.txt -text
res/cardsfolder/g/geist_honored_monk.txt -text
res/cardsfolder/g/geist_of_saint_traft.txt -text
res/cardsfolder/g/geistcatchers_rig.txt -text

View File

@@ -0,0 +1,13 @@
Name:Gaze of the Gorgon
ManaCost:3 BG
Types:Instant
Text:no text
A:SP$ Regenerate | Cost$ 3 BG | ValidTgts$ Creature | TgtPrompt$ Select target creature | SubAbility$ TrigGorgonEffect | SpellDescription$ Regenerate target creature. At end of combat, destroy all creatures that blocked or were blocked by that creature this turn.
SVar:TrigGorgonEffect:DB$ Effect | Name$ Gaze of the Gorgon Effect | Triggers$ DelGorgonTrig | SVars$ TrigGorgonDestroy | RememberObjects$ Targeted
SVar:DelGorgonTrig:Mode$ Phase | Phase$ EndCombat | TriggerZones$ Battlefield | ValidPlayer$ Player | Execute$ TrigGorgonDestroy | TriggerDescription$ At end of combat, destroy all creatures that blocked or were blocked by that creature this turn.
SVar:TrigGorgonDestroy:AB$ DestroyAll | Cost$ 0 | ValidCards$ Creature.blockedRemembered,Creature.blockedByRemembered
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/gaze_of_the_gorgon.jpg
SetInfo:RAV|Common|http://magiccards.info/scans/en/rav/246.jpg
Oracle:({B/G} can be paid with either {B} or {G}.)\nRegenerate target creature. At end of combat, destroy all creatures that blocked or were blocked by that creature this turn.
End

View File

@@ -363,6 +363,8 @@ public class Card extends GameEntity implements Comparable<Card> {
private Map<Card, Integer> receivedDamageFromThisTurn = new TreeMap<Card, Integer>();
private Map<Card, Integer> dealtDamageToThisTurn = new TreeMap<Card, Integer>();
private final Map<Card, Integer> assignedDamageMap = new TreeMap<Card, Integer>();
private CardList blockedThisTurn = new CardList();
private CardList blockedByThisTurn = new CardList();
private boolean drawnThisTurn = false;
private boolean tapped = false;
@@ -1073,6 +1075,42 @@ public class Card extends GameEntity implements Comparable<Card> {
return this.creatureGotBlockedThisTurn;
}
/**
* @return the blockedThisTurn
*/
public CardList getBlockedThisTurn() {
return blockedThisTurn;
}
/**
* @param attacker the blockedThisTurn to set
*/
public void addBlockedThisTurn(Card attacker) {
this.blockedThisTurn.add(attacker);
}
void clearBlockedThisTurn() {
this.blockedThisTurn.clear();
}
/**
* @return the blockedByThisTurn
*/
public CardList getBlockedByThisTurn() {
return blockedByThisTurn;
}
/**
* @param blockedByThisTurn0 the blockedByThisTurn to set
*/
public void addBlockedByThisTurn(Card blocker) {
this.blockedByThisTurn.add(blocker);
}
void clearBlockedByThisTurn() {
this.blockedByThisTurn.clear();
}
/**
* <p>
* canAnyPlayerActivate.
@@ -7115,22 +7153,22 @@ public class Card extends GameEntity implements Comparable<Card> {
if (!this.isBlocking(source)) {
return false;
}
} else if (property.startsWith("blockingHostRemembered")) {
} else if (property.startsWith("blockedRemembered")) {
Card rememberedcard;
for (final Object o : source.getRemembered()) {
if (o instanceof Card) {
rememberedcard = (Card) o;
if (!this.isBlocking(rememberedcard)) {
if (!this.getBlockedThisTurn().contains(rememberedcard)) {
return false;
}
}
}
} else if (property.startsWith("blockedByHostRemembered")) {
} else if (property.startsWith("blockedByRemembered")) {
Card rememberedcard;
for (final Object o : source.getRemembered()) {
if (o instanceof Card) {
rememberedcard = (Card) o;
if (!this.isBlockedBy(rememberedcard)) {
if (!this.getBlockedByThisTurn().contains(rememberedcard)) {
return false;
}
}

View File

@@ -2766,7 +2766,8 @@ public class CombatUtil {
} // flanking
a.setCreatureGotBlockedThisCombat(true);
b.addBlockedThisTurn(a);
a.addBlockedByThisTurn(b);
}
/**

View File

@@ -275,24 +275,14 @@ public class EndOfTurn extends Phase implements java.io.Serializable {
private static void removeAttackedBlockedThisTurn() {
// resets the status of attacked/blocked this turn
final Player player = AllZone.getPhaseHandler().getPlayerTurn();
final CardList list = AllZoneUtil.getCreaturesInPlay(player);
final CardList list = AllZoneUtil.getCreaturesInPlay();
for (int i = 0; i < list.size(); i++) {
final Card c = list.get(i);
if (c.getCreatureAttackedThisCombat()) {
c.setCreatureAttackedThisCombat(false);
}
if (c.getCreatureBlockedThisCombat()) {
c.setCreatureBlockedThisCombat(false);
// do not reset setCreatureAttackedThisTurn(), this appears to
// be combat specific
}
if (c.getCreatureGotBlockedThisCombat()) {
c.setCreatureGotBlockedThisCombat(false);
}
}
}
} // end class EndOfTurn

View File

@@ -445,6 +445,8 @@ public class PhaseHandler extends MyObservable implements java.io.Serializable {
c.setCreatureAttackedThisTurn(false);
c.setCreatureBlockedThisTurn(false);
c.setCreatureGotBlockedThisTurn(false);
c.clearBlockedByThisTurn();
c.clearBlockedThisTurn();
}
AllZone.getHumanPlayer().resetPreventNextDamage();
AllZone.getComputerPlayer().resetPreventNextDamage();