- Added the following properties to hasProperty: attackedThisTurn, attackedLastTurn, blockedThisTurn, notAttackedThisTurn, notAttackedLastTurn and notBlockedThisTurn.

- Added Lurker.
This commit is contained in:
Sloth
2011-11-16 21:34:37 +00:00
parent beba24dca4
commit abd0568eea
5 changed files with 92 additions and 3 deletions

1
.gitattributes vendored
View File

@@ -4861,6 +4861,7 @@ res/cardsfolder/l/lunk_errant.txt svneol=native#text/plain
res/cardsfolder/l/lure.txt svneol=native#text/plain
res/cardsfolder/l/lure_of_prey.txt -text
res/cardsfolder/l/lurebound_scarecrow.txt -text svneol=unset#text/plain
res/cardsfolder/l/lurker.txt -text
res/cardsfolder/l/lurking_crocodile.txt svneol=native#text/plain
res/cardsfolder/l/lurking_informant.txt svneol=native#text/plain
res/cardsfolder/l/lurking_nightstalker.txt svneol=native#text/plain

View File

@@ -0,0 +1,11 @@
Name:Lurker
ManaCost:2 G
Types:Creature Beast
Text:
PT:2/3
S:Mode$ CantTarget | ValidCard$ Card.Self+notAttackedThisTurn+notBlockedThisTurn | Spell$ True | Description$ CARDNAME can't be the target of spells unless it attacked or blocked this turn.
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/lurker.jpg
SetInfo:DRK|Rare|http://magiccards.info/scans/en/dk/43.jpg
Oracle:Lurker can't be the target of spells unless it attacked or blocked this turn.
End

View File

@@ -7,4 +7,6 @@ SVar:DBToken:DB$ Token | TokenAmount$ X | TokenPower$ 1 | TokenToughness$ 1 | To
SVar:X:Targeted$CardPower
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/mercy_killing.jpg
SetInfo:SHM|Uncommon|http://magiccards.info/scans/en/shm/231.jpg
Oracle:Target creature's controller sacrifices it, then puts X 1/1 green and white Elf Warrior creature tokens onto the battlefield, where X is that creature's power.
End

View File

@@ -320,8 +320,10 @@ public class Card extends GameEntity implements Comparable<Card> {
private boolean spellWithChoices = false;
private boolean spellCopyingCard = false;
private boolean creatureAttackedThisTurn = false;
private boolean creatureAttackedLastTurn = false;
private boolean creatureAttackedThisCombat = false;
private boolean creatureBlockedThisCombat = false;
private boolean creatureBlockedThisTurn = false;
private boolean creatureGotBlockedThisCombat = false;
private boolean dealtDmgToHumanThisTurn = false;
private boolean dealtDmgToComputerThisTurn = false;
@@ -867,6 +869,29 @@ public class Card extends GameEntity implements Comparable<Card> {
return this.creatureAttackedThisTurn;
}
/**
* <p>
* Setter for the field <code>creatureAttackedLastTurn</code>.
* </p>
*
* @param b
* a boolean.
*/
public final void setCreatureAttackedLastTurn(final boolean b) {
this.creatureAttackedLastTurn = b;
}
/**
* <p>
* Getter for the field <code>creatureAttackedLastTurn</code>.
* </p>
*
* @return a boolean.
*/
public final boolean getCreatureAttackedLastTurn() {
return this.creatureAttackedLastTurn;
}
/**
* <p>
* Setter for the field <code>creatureBlockedThisCombat</code>.
@@ -877,6 +902,9 @@ public class Card extends GameEntity implements Comparable<Card> {
*/
public final void setCreatureBlockedThisCombat(final boolean b) {
this.creatureBlockedThisCombat = b;
if(b) {
setCreatureBlockedThisTurn(true);
}
}
/**
@@ -890,6 +918,29 @@ public class Card extends GameEntity implements Comparable<Card> {
return this.creatureBlockedThisCombat;
}
/**
* <p>
* Setter for the field <code>creatureBlockedThisTurn</code>.
* </p>
*
* @param b
* a boolean.
*/
public final void setCreatureBlockedThisTurn(final boolean b) {
this.creatureBlockedThisTurn = b;
}
/**
* <p>
* Getter for the field <code>creatureBlockedThisTurn</code>.
* </p>
*
* @return a boolean.
*/
public final boolean getCreatureBlockedThisTurn() {
return this.creatureBlockedThisTurn;
}
/**
* <p>
* Setter for the field <code>creatureGotBlockedThisCombat</code>.
@@ -6634,6 +6685,30 @@ public class Card extends GameEntity implements Comparable<Card> {
if ((this.getReceivedDamageFromThisTurn().keySet()).isEmpty()) {
return false;
}
} else if (property.startsWith("attackedThisTurn")) {
if (!getCreatureAttackedThisTurn()) {
return false;
}
} else if (property.startsWith("attackedLastTurn")) {
if (!getCreatureAttackedLastTurn()) {
return false;
}
} else if (property.startsWith("blockedThisTurn")) {
if (!getCreatureBlockedThisTurn()) {
return false;
}
} else if (property.startsWith("notAttackedThisTurn")) {
if (getCreatureAttackedThisTurn()) {
return false;
}
} else if (property.startsWith("notAttackedLastTurn")) {
if (getCreatureAttackedLastTurn()) {
return false;
}
} else if (property.startsWith("notBlockedThisTurn")) {
if (getCreatureBlockedThisTurn()) {
return false;
}
} else if (property.startsWith("greatestPower")) {
final CardList list = AllZoneUtil.getCreaturesInPlay();
for (final Card crd : list) {

View File

@@ -257,9 +257,9 @@ public class EndOfTurn implements java.io.Serializable {
CardList all2 = AllZoneUtil.getCardsIn(Zone.Battlefield);
for (Card c : all2) {
c.clearMustBlockCards();
if (c.getCreatureAttackedThisTurn()) {
c.setCreatureAttackedThisTurn(false);
}
c.setCreatureAttackedLastTurn(c.getCreatureAttackedThisTurn());
c.setCreatureAttackedThisTurn(false);
c.setCreatureBlockedThisTurn(false);
}
} // executeAt()