mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
- Added the following properties to hasProperty: attackedThisTurn, attackedLastTurn, blockedThisTurn, notAttackedThisTurn, notAttackedLastTurn and notBlockedThisTurn.
- Added Lurker.
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -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
|
||||
|
||||
11
res/cardsfolder/l/lurker.txt
Normal file
11
res/cardsfolder/l/lurker.txt
Normal 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
|
||||
@@ -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
|
||||
@@ -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;
|
||||
@@ -866,6 +868,29 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
public final boolean getCreatureAttackedThisTurn() {
|
||||
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>
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -889,6 +917,29 @@ public class Card extends GameEntity implements Comparable<Card> {
|
||||
public final boolean getCreatureBlockedThisCombat() {
|
||||
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>
|
||||
@@ -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) {
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user