From 2369a3f5adbd570df5c61524e55c0ce86d7f8192 Mon Sep 17 00:00:00 2001 From: Sloth Date: Thu, 9 Feb 2012 16:52:11 +0000 Subject: [PATCH] - Added the keyword "You may have CARDNAME assign its combat damage as though it weren't blocked.". - Added Deathcoil Wurm, Lone Wolf, Thorn Elemental and Wolf Pack. --- .gitattributes | 4 ++++ res/cardsfolder/a/avatar_of_discord.txt | 2 ++ res/cardsfolder/d/deathcoil_wurm.txt | 11 ++++++++++ res/cardsfolder/l/lone_wolf.txt | 16 ++++++++++++++ res/cardsfolder/t/thorn_elemental.txt | 14 +++++++++++++ res/cardsfolder/w/wolf_pack.txt | 11 ++++++++++ src/main/java/forge/Combat.java | 28 +++++++++++++++++++------ 7 files changed, 80 insertions(+), 6 deletions(-) create mode 100644 res/cardsfolder/d/deathcoil_wurm.txt create mode 100644 res/cardsfolder/l/lone_wolf.txt create mode 100644 res/cardsfolder/t/thorn_elemental.txt create mode 100644 res/cardsfolder/w/wolf_pack.txt diff --git a/.gitattributes b/.gitattributes index 238713379d9..c540a3f25e0 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1997,6 +1997,7 @@ res/cardsfolder/d/death_ward.txt svneol=native#text/plain res/cardsfolder/d/death_watch.txt -text res/cardsfolder/d/deathbringer_liege.txt svneol=native#text/plain res/cardsfolder/d/deathbringer_thoctar.txt svneol=native#text/plain +res/cardsfolder/d/deathcoil_wurm.txt -text res/cardsfolder/d/deathcurse_ogre.txt -text res/cardsfolder/d/deathforge_shaman.txt svneol=native#text/plain res/cardsfolder/d/deathgazer.txt svneol=native#text/plain @@ -5061,6 +5062,7 @@ res/cardsfolder/l/lodestone_bauble.txt svneol=native#text/plain res/cardsfolder/l/lodestone_golem.txt svneol=native#text/plain res/cardsfolder/l/lodestone_myr.txt svneol=native#text/plain res/cardsfolder/l/lone_missionary.txt svneol=native#text/plain +res/cardsfolder/l/lone_wolf.txt -text res/cardsfolder/l/lonely_sandbar.txt svneol=native#text/plain res/cardsfolder/l/long_forgotten_gohei.txt svneol=native#text/plain res/cardsfolder/l/long_term_plans.txt svneol=native#text/plain @@ -8962,6 +8964,7 @@ res/cardsfolder/t/thistledown_liege.txt svneol=native#text/plain res/cardsfolder/t/thopter_assembly.txt svneol=native#text/plain res/cardsfolder/t/thopter_foundry.txt svneol=native#text/plain res/cardsfolder/t/thopter_squadron.txt svneol=native#text/plain +res/cardsfolder/t/thorn_elemental.txt -text res/cardsfolder/t/thorn_of_amethyst.txt svneol=native#text/plain res/cardsfolder/t/thorn_thallid.txt svneol=native#text/plain res/cardsfolder/t/thorn_thrash_viashino.txt svneol=native#text/plain @@ -10083,6 +10086,7 @@ res/cardsfolder/w/woebearer.txt svneol=native#text/plain res/cardsfolder/w/wojek_apothecary.txt -text res/cardsfolder/w/wojek_embermage.txt svneol=native#text/plain res/cardsfolder/w/wojek_siren.txt -text +res/cardsfolder/w/wolf_pack.txt -text res/cardsfolder/w/wolf_skull_shaman.txt svneol=native#text/plain res/cardsfolder/w/wolfbitten_captive_krallenhorde_killer.txt -text res/cardsfolder/w/wolfbriar_elemental.txt svneol=native#text/plain diff --git a/res/cardsfolder/a/avatar_of_discord.txt b/res/cardsfolder/a/avatar_of_discord.txt index 3da48333482..5e25f449cda 100644 --- a/res/cardsfolder/a/avatar_of_discord.txt +++ b/res/cardsfolder/a/avatar_of_discord.txt @@ -12,4 +12,6 @@ SVar:X:Remembered$Amount SVar:RemAIDeck:True SVar:Rarity:Rare SVar:Picture:http://www.wizards.com/global/images/magic/general/avatar_of_discord.jpg +SetInfo:DIS|Rare|http://magiccards.info/scans/en/di/140.jpg +Oracle:({B/R} can be paid with either {B} or {R}.)\nFlying\nWhen Avatar of Discord enters the battlefield, sacrifice it unless you discard two cards. End \ No newline at end of file diff --git a/res/cardsfolder/d/deathcoil_wurm.txt b/res/cardsfolder/d/deathcoil_wurm.txt new file mode 100644 index 00000000000..bf467edac4d --- /dev/null +++ b/res/cardsfolder/d/deathcoil_wurm.txt @@ -0,0 +1,11 @@ +Name:Deathcoil Wurm +ManaCost:6 G G +Types:Creature Wurm +Text:no text +PT:7/6 +K:You may have CARDNAME assign its combat damage as though it weren't blocked. +SVar:Rarity:Rare +SVar:Picture:http://www.wizards.com/global/images/magic/general/deathcoil_wurm.jpg +SetInfo:PO2|Rare|http://magiccards.info/scans/en/po2/65.jpg +Oracle:You may have Deathcoil Wurm assign its combat damage as though it weren't blocked. +End \ No newline at end of file diff --git a/res/cardsfolder/l/lone_wolf.txt b/res/cardsfolder/l/lone_wolf.txt new file mode 100644 index 00000000000..6e16ad1fe64 --- /dev/null +++ b/res/cardsfolder/l/lone_wolf.txt @@ -0,0 +1,16 @@ +Name:Lone Wolf +ManaCost:2 G +Types:Creature Wolf +Text:no text +PT:2/2 +K:You may have CARDNAME assign its combat damage as though it weren't blocked. +SVar:Rarity:Common +SVar:Picture:http://www.wizards.com/global/images/magic/general/lone_wolf.jpg +SetInfo:8ED|Common|http://magiccards.info/scans/en/8e/262.jpg +SetInfo:PTK|Uncommon|http://magiccards.info/scans/en/p3k/140.jpg +SetInfo:7ED|Common|http://magiccards.info/scans/en/7e/254.jpg +SetInfo:PO2|Uncommon|http://magiccards.info/scans/en/po2/71.jpg +SetInfo:S99|Common|http://magiccards.info/scans/en/st/130.jpg +SetInfo:ULG|Uncommon|http://magiccards.info/scans/en/ul/105.jpg +Oracle:You may have Lone Wolf assign its combat damage as though it weren't blocked. +End \ No newline at end of file diff --git a/res/cardsfolder/t/thorn_elemental.txt b/res/cardsfolder/t/thorn_elemental.txt new file mode 100644 index 00000000000..eac6b904b2a --- /dev/null +++ b/res/cardsfolder/t/thorn_elemental.txt @@ -0,0 +1,14 @@ +Name:Thorn Elemental +ManaCost:5 G G +Types:Creature Elemental +Text:no text +PT:7/7 +K:You may have CARDNAME assign its combat damage as though it weren't blocked. +SVar:Rarity:Rare +SVar:Picture:http://www.wizards.com/global/images/magic/general/thorn_elemental.jpg +SetInfo:8ED|Rare|http://magiccards.info/scans/en/8e/283.jpg +SetInfo:UDS|Rare|http://magiccards.info/scans/en/ud/123.jpg +SetInfo:S99|Rare|http://magiccards.info/scans/en/st/147.jpg +SetInfo:7ED|Rare|http://magiccards.info/scans/en/7e/273.jpg +Oracle:You may have Thorn Elemental assign its combat damage as though it weren't blocked. +End \ No newline at end of file diff --git a/res/cardsfolder/w/wolf_pack.txt b/res/cardsfolder/w/wolf_pack.txt new file mode 100644 index 00000000000..d9f14d6ca65 --- /dev/null +++ b/res/cardsfolder/w/wolf_pack.txt @@ -0,0 +1,11 @@ +Name:Wolf Pack +ManaCost:6 G G +Types:Creature Wolf +Text:no text +PT:7/6 +K:You may have CARDNAME assign its combat damage as though it weren't blocked. +SVar:Rarity:Rare +SVar:Picture:http://www.wizards.com/global/images/magic/general/wolf_pack.jpg +SetInfo:PTK|Rare|http://magiccards.info/scans/en/p3k/158.jpg +Oracle:You may have Wolf Pack assign its combat damage as though it weren't blocked. +End \ No newline at end of file diff --git a/src/main/java/forge/Combat.java b/src/main/java/forge/Combat.java index f70764be530..263fc21fdea 100644 --- a/src/main/java/forge/Combat.java +++ b/src/main/java/forge/Combat.java @@ -712,10 +712,16 @@ public class Combat { } else if (attacker.hasFirstStrike() || attacker.hasDoubleStrike()) { needFirstStrike = true; if (this.getAttackingPlayer().isHuman()) { // human attacks - if (attacker.hasKeyword("Trample") || (block.size() > 1)) { - AllZone.getDisplay().assignDamage(attacker, block, damageDealt); + if (attacker.hasKeyword("You may have CARDNAME assign its combat damage as though it weren't blocked.") + && GameActionUtil.showYesNoDialog(attacker, "Do you want to assign its combat damage as" + + " though it weren't blocked?")) { + this.addDefendingDamage(damageDealt, attacker); } else { - block.get(0).addAssignedDamage(damageDealt, attacking.get(i)); + if (attacker.hasKeyword("Trample") || (block.size() > 1)) { + AllZone.getDisplay().assignDamage(attacker, block, damageDealt); + } else { + block.get(0).addAssignedDamage(damageDealt, attacking.get(i)); + } } } else { // computer attacks this.distributeAIDamage(attacker, block, damageDealt); @@ -758,10 +764,16 @@ public class Combat { if (this.getAttackingPlayer().isHuman()) { // human attacks - if (attacker.hasKeyword("Trample") || (block.size() > 1)) { - AllZone.getDisplay().assignDamage(attacker, block, damageDealt); + if (attacker.hasKeyword("You may have CARDNAME assign its combat damage as though it weren't blocked.") + && GameActionUtil.showYesNoDialog(attacker, "Do you want to assign its combat damage as" + + " though it weren't blocked?")) { + this.addDefendingDamage(damageDealt, attacker); } else { - block.get(0).addAssignedDamage(damageDealt, attacking.get(i)); + if (attacker.hasKeyword("Trample") || (block.size() > 1)) { + AllZone.getDisplay().assignDamage(attacker, block, damageDealt); + } else { + block.get(0).addAssignedDamage(damageDealt, attacking.get(i)); + } } } else { // computer attacks this.distributeAIDamage(attacker, block, damageDealt); @@ -787,6 +799,10 @@ public class Combat { */ private void distributeAIDamage(final Card attacker, final CardList block, int damage) { final Card c = attacker; + + if (attacker.hasKeyword("You may have CARDNAME assign its combat damage as though it weren't blocked.")) { + this.addDefendingDamage(damage, attacker); + } if (block.size() == 1) {