mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
- dealtDamageToYouThisTurn will now work correctly even in corner cases where one of your own creatures damages you.
- Added Retaliate.
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -3773,6 +3773,7 @@ res/cardsfolder/restless_bones.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/restless_dead.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/resurrection.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/resuscitate.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/retaliate.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/retribution_of_the_meek.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/return_to_battle.txt -text svneol=native#text/plain
|
||||
res/cardsfolder/reveillark.txt -text svneol=native#text/plain
|
||||
|
||||
9
res/cardsfolder/retaliate.txt
Normal file
9
res/cardsfolder/retaliate.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
Name:Retaliate
|
||||
ManaCost:2 W W
|
||||
Types:Instant
|
||||
Text:no text
|
||||
A:SP$DestroyAll | Cost$ 2 W W | ValidCards$ Creature.dealtDamageToYouThisTurn | SpellDescription$ Destroy all creatures that dealt damage to you this turn.
|
||||
SVar:RemAIDeck:True
|
||||
SVar:Rarity:Rare
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/retaliate.jpg
|
||||
End
|
||||
@@ -58,7 +58,8 @@ public class Card extends MyObservable {
|
||||
private boolean creatureBlockedThisCombat = false;
|
||||
private boolean creatureGotBlockedThisCombat = false;
|
||||
//private boolean dealtCombatDmgToOppThisTurn = false;
|
||||
private boolean dealtDmgToOppThisTurn = false;
|
||||
private boolean dealtDmgToHumanThisTurn = false;
|
||||
private boolean dealtDmgToComputerThisTurn = false;
|
||||
private boolean sirenAttackOrDestroy = false;
|
||||
private boolean exaltedBonus = false;
|
||||
private boolean faceDown = false;
|
||||
@@ -271,12 +272,20 @@ public class Card extends MyObservable {
|
||||
return false;
|
||||
}
|
||||
|
||||
public void setDealtDmgToOppThisTurn(boolean b) {
|
||||
dealtDmgToOppThisTurn = b;
|
||||
public void setDealtDmgToHumanThisTurn(boolean b) {
|
||||
dealtDmgToHumanThisTurn = b;
|
||||
}
|
||||
|
||||
public boolean getDealtDmgToOppThisTurn() {
|
||||
return dealtDmgToOppThisTurn;
|
||||
public boolean getDealtDmgToHumanThisTurn() {
|
||||
return dealtDmgToHumanThisTurn;
|
||||
}
|
||||
|
||||
public void setDealtDmgToComputerThisTurn(boolean b) {
|
||||
dealtDmgToComputerThisTurn = b;
|
||||
}
|
||||
|
||||
public boolean getDealtDmgToComputerThisTurn() {
|
||||
return dealtDmgToComputerThisTurn;
|
||||
}
|
||||
|
||||
public void setSirenAttackOrDestroy(boolean b) {
|
||||
@@ -2443,8 +2452,9 @@ public class Card extends MyObservable {
|
||||
{ if(!isFaceDown()) return false;}
|
||||
else if (Property.startsWith("enteredBattlefieldThisTurn"))
|
||||
{ if(!(getTurnInZone() == AllZone.Phase.getTurn())) return false;}
|
||||
else if (Property.startsWith("dealtDamageToYouThisTurn"))
|
||||
{ if(!(dealtDmgToOppThisTurn && !getController().isPlayer(sourceController))) return false;}
|
||||
else if (Property.startsWith("dealtDamageToYouThisTurn")){
|
||||
if(!(dealtDmgToHumanThisTurn && getController().isPlayer(AllZone.ComputerPlayer))
|
||||
&& !(dealtDmgToComputerThisTurn && getController().isPlayer(AllZone.HumanPlayer))) return false;}
|
||||
|
||||
else if (Property.startsWith("enchanted"))
|
||||
{ if(!isEnchanted()) return false;}
|
||||
@@ -2643,7 +2653,7 @@ public class Card extends MyObservable {
|
||||
//the amount of damage needed to kill the creature
|
||||
public int getKillDamage() {
|
||||
int killDamage = getNetDefense() + preventNextDamage - getDamage();
|
||||
if(killDamage > preventNextDamage && getKeyword().contains("When CARDNAME is dealt damage, destroy it.")) killDamage = 1 + preventNextDamage;
|
||||
if(killDamage > preventNextDamage && hasStartOfKeyword("When CARDNAME is dealt damage, destroy it.")) killDamage = 1 + preventNextDamage;
|
||||
|
||||
return killDamage;
|
||||
}
|
||||
|
||||
@@ -9866,18 +9866,6 @@ public class CardFactory_Creatures {
|
||||
Player opponent = player.getOpponent();
|
||||
|
||||
opponent.addDamage(power, card);
|
||||
|
||||
//unTODO: this may not be needed - definitely not needed (slapshot5)
|
||||
//GameActionUtil.executeLifeLinkEffects(card, power);
|
||||
/*
|
||||
CardList cl = CardFactoryUtil.getAurasEnchanting(card, "Guilty Conscience");
|
||||
for(Card crd:cl) {
|
||||
GameActionUtil.executeGuiltyConscienceEffects(card, crd, power);
|
||||
}
|
||||
*/
|
||||
|
||||
//TODO - this may not bee needed (or may need to be added in player.addDamage
|
||||
card.setDealtDmgToOppThisTurn(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3131,7 +3131,8 @@ public class GameActionUtil {
|
||||
for(int i = 0; i < list.size(); i++) {
|
||||
Card c = list.get(i);
|
||||
//c.setDealtCombatDmgToOppThisTurn(false);
|
||||
c.setDealtDmgToOppThisTurn(false);
|
||||
c.setDealtDmgToHumanThisTurn(false);
|
||||
c.setDealtDmgToComputerThisTurn(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5876,7 +5877,8 @@ public class GameActionUtil {
|
||||
else if(c.getName().equals("Whirling Dervish") || c.getName().equals("Dunerider Outlaw"))
|
||||
playerCombatDamage_Whirling_Dervish(c);
|
||||
|
||||
if (!c.getController().isPlayer(player)) c.setDealtDmgToOppThisTurn(true);
|
||||
if (player.isPlayer(AllZone.HumanPlayer)) c.setDealtDmgToHumanThisTurn(true);
|
||||
if (player.isPlayer(AllZone.ComputerPlayer)) c.setDealtDmgToComputerThisTurn(true);
|
||||
}
|
||||
}
|
||||
//restricted to combat damage, restricted to players
|
||||
|
||||
Reference in New Issue
Block a user