From a1efd3440d01b4eb5e459e4c801a68e277eb2e91 Mon Sep 17 00:00:00 2001 From: jendave Date: Sat, 6 Aug 2011 08:40:23 +0000 Subject: [PATCH] - Added Hateflayer, Merrow Wavebreakers, Safehold Sentry, Staff of the Ages, Horobi, Death's Wail and Cowardice. --- .gitattributes | 6 ++++++ res/cardsfolder/cowardice.txt | 8 ++++++++ res/cardsfolder/hateflayer.txt | 11 +++++++++++ res/cardsfolder/horobi_deaths_wail.txt | 9 +++++++++ res/cardsfolder/merrow_grimeblotter.txt | 1 + res/cardsfolder/merrow_wavebreakers.txt | 10 ++++++++++ res/cardsfolder/safehold_sentry.txt | 10 ++++++++++ res/cardsfolder/staff_of_the_ages.txt | 8 ++++++++ src/forge/CardFactoryUtil.java | 6 ++++-- src/forge/CombatUtil.java | 20 +++++++++++++++----- 10 files changed, 82 insertions(+), 7 deletions(-) create mode 100644 res/cardsfolder/cowardice.txt create mode 100644 res/cardsfolder/hateflayer.txt create mode 100644 res/cardsfolder/horobi_deaths_wail.txt create mode 100644 res/cardsfolder/merrow_wavebreakers.txt create mode 100644 res/cardsfolder/safehold_sentry.txt create mode 100644 res/cardsfolder/staff_of_the_ages.txt diff --git a/.gitattributes b/.gitattributes index e6975b22315..a5fa0f98b8e 100644 --- a/.gitattributes +++ b/.gitattributes @@ -776,6 +776,7 @@ res/cardsfolder/court_archers.txt -text svneol=native#text/plain res/cardsfolder/cover_of_darkness.txt -text svneol=native#text/plain res/cardsfolder/covert_operative.txt -text svneol=native#text/plain res/cardsfolder/covetous_dragon.txt -text svneol=native#text/plain +res/cardsfolder/cowardice.txt -text svneol=native#text/plain res/cardsfolder/crabapple_cohort.txt -text svneol=native#text/plain res/cardsfolder/crackdown.txt -text svneol=native#text/plain res/cardsfolder/cradle_guard.txt -text svneol=native#text/plain @@ -1754,6 +1755,7 @@ res/cardsfolder/haru_onna.txt -text svneol=native#text/plain res/cardsfolder/harvest_gwyllion.txt -text svneol=native#text/plain res/cardsfolder/harvester_druid.txt -text svneol=native#text/plain res/cardsfolder/hatching_plans.txt -text svneol=native#text/plain +res/cardsfolder/hateflayer.txt -text svneol=native#text/plain res/cardsfolder/haunted_angel.txt -text svneol=native#text/plain res/cardsfolder/haunting_echoes.txt -text svneol=native#text/plain res/cardsfolder/haunting_hymn.txt -text svneol=native#text/plain @@ -1843,6 +1845,7 @@ res/cardsfolder/horned_troll.txt -text svneol=native#text/plain res/cardsfolder/horned_turtle.txt -text svneol=native#text/plain res/cardsfolder/hornet_cobra.txt -text svneol=native#text/plain res/cardsfolder/hornet_sting.txt -text svneol=native#text/plain +res/cardsfolder/horobi_deaths_wail.txt -text svneol=native#text/plain res/cardsfolder/horrible_hordes.txt -text svneol=native#text/plain res/cardsfolder/horseshoe_crab.txt -text svneol=native#text/plain res/cardsfolder/hoverguard_observer.txt -text svneol=native#text/plain @@ -2435,6 +2438,7 @@ res/cardsfolder/merfolk_sovereign.txt -text svneol=native#text/plain res/cardsfolder/merrow_grimeblotter.txt -text svneol=native#text/plain res/cardsfolder/merrow_harbinger.txt -text svneol=native#text/plain res/cardsfolder/merrow_levitator.txt -text svneol=native#text/plain +res/cardsfolder/merrow_wavebreakers.txt -text svneol=native#text/plain res/cardsfolder/mesa_enchantress.txt -text svneol=native#text/plain res/cardsfolder/mesa_falcon.txt -text svneol=native#text/plain res/cardsfolder/mesmeric_orb.txt -text svneol=native#text/plain @@ -3212,6 +3216,7 @@ res/cardsfolder/sacred_prey.txt -text svneol=native#text/plain res/cardsfolder/sacred_wolf.txt -text svneol=native#text/plain res/cardsfolder/safehold_duo.txt -text svneol=native#text/plain res/cardsfolder/safehold_elite.txt -text svneol=native#text/plain +res/cardsfolder/safehold_sentry.txt -text svneol=native#text/plain res/cardsfolder/safewright_quest.txt -text svneol=native#text/plain res/cardsfolder/sage_aven.txt -text svneol=native#text/plain res/cardsfolder/sage_of_epityr.txt -text svneol=native#text/plain @@ -3672,6 +3677,7 @@ res/cardsfolder/squirrel_mob.txt -text svneol=native#text/plain res/cardsfolder/squirrel_nest.txt -text svneol=native#text/plain res/cardsfolder/stabbing_pain.txt -text svneol=native#text/plain res/cardsfolder/staff_of_domination.txt -text svneol=native#text/plain +res/cardsfolder/staff_of_the_ages.txt -text svneol=native#text/plain res/cardsfolder/stalker_hag.txt -text svneol=native#text/plain res/cardsfolder/stalking_assassin.txt -text svneol=native#text/plain res/cardsfolder/stalking_stones.txt -text svneol=native#text/plain diff --git a/res/cardsfolder/cowardice.txt b/res/cardsfolder/cowardice.txt new file mode 100644 index 00000000000..79dbb037606 --- /dev/null +++ b/res/cardsfolder/cowardice.txt @@ -0,0 +1,8 @@ +Name:Cowardice +ManaCost:3 U U +Types:Enchantment +Text:Whenever a creature becomes the target of a spell or ability, return that creature to its owner's hand. (It won't be affected by the spell or ability.) +SVar:RemAIDeck:True +SVar:Rarity:Rare +SVar:Picture:http://www.wizards.com/global/images/magic/general/cowardice.jpg +End diff --git a/res/cardsfolder/hateflayer.txt b/res/cardsfolder/hateflayer.txt new file mode 100644 index 00000000000..0b887f552dd --- /dev/null +++ b/res/cardsfolder/hateflayer.txt @@ -0,0 +1,11 @@ +Name:Hateflayer +ManaCost:5 R R +Types:Creature Elemental +Text:no text +PT:5/5 +K:Wither +K:abDamageTgtCP 2 R Untap:X:Hateflayer deals damage equal to its power to target creature or player. +SVar:X:Count$CardPower +SVar:Rarity:Rare +SVar:Picture:http://www.wizards.com/global/images/magic/general/hateflayer.jpg +End diff --git a/res/cardsfolder/horobi_deaths_wail.txt b/res/cardsfolder/horobi_deaths_wail.txt new file mode 100644 index 00000000000..cd3d421dec3 --- /dev/null +++ b/res/cardsfolder/horobi_deaths_wail.txt @@ -0,0 +1,9 @@ +Name:Horobi, Death's Wail +ManaCost:2 B B +Types:Legendary Creature Spirit +Text:Whenever a creature becomes the target of a spell or ability, destroy that creature. +PT:4/4 +K:Flying +SVar:Rarity:Rare +SVar:Picture:http://www.wizards.com/global/images/magic/general/horobi_deaths_wail.jpg +End diff --git a/res/cardsfolder/merrow_grimeblotter.txt b/res/cardsfolder/merrow_grimeblotter.txt index f5af0d8c3ae..5c0490ef914 100644 --- a/res/cardsfolder/merrow_grimeblotter.txt +++ b/res/cardsfolder/merrow_grimeblotter.txt @@ -4,6 +4,7 @@ Types:Creature Merfolk Wizard Text:no text PT:2/2 K:abPumpTgtC 1 UB Untap:-2/-0 +SVar:RemAIDeck:True SVar:Rarity:Uncommon SVar:Picture:http://www.wizards.com/global/images/magic/general/merrow_grimeblotter.jpg End diff --git a/res/cardsfolder/merrow_wavebreakers.txt b/res/cardsfolder/merrow_wavebreakers.txt new file mode 100644 index 00000000000..79daeef6973 --- /dev/null +++ b/res/cardsfolder/merrow_wavebreakers.txt @@ -0,0 +1,10 @@ +Name:Merrow Wavebreakers +ManaCost:4 U +Types:Creature Merfolk Soldier +Text:no text +PT:3/3 +K:abPump 1 U Untap:Flying +SVar:RemAIDeck:True +SVar:Rarity:Common +SVar:Picture:http://www.wizards.com/global/images/magic/general/merrow_wavebreakers.jpg +End diff --git a/res/cardsfolder/safehold_sentry.txt b/res/cardsfolder/safehold_sentry.txt new file mode 100644 index 00000000000..505ceb53730 --- /dev/null +++ b/res/cardsfolder/safehold_sentry.txt @@ -0,0 +1,10 @@ +Name:Safehold Sentry +ManaCost:1 W +Types:Creature Elf Warrior +Text:no text +PT:2/2 +K:abPump 2 W Untap:+0/+2 +SVar:RemAIDeck:True +SVar:Rarity:Common +SVar:Picture:http://www.wizards.com/global/images/magic/general/safehold_sentry.jpg +End diff --git a/res/cardsfolder/staff_of_the_ages.txt b/res/cardsfolder/staff_of_the_ages.txt new file mode 100644 index 00000000000..dca7ea0c1d5 --- /dev/null +++ b/res/cardsfolder/staff_of_the_ages.txt @@ -0,0 +1,8 @@ +Name:Staff of the Ages +ManaCost:3 +Types:Artifact +Text:Creatures with landwalk abilities can be blocked as though they didn't have those abilities. +SVar:RemAIDeck:True +SVar:Rarity:Rare +SVar:Picture:http://www.wizards.com/global/images/magic/general/staff_of_the_ages.jpg +End diff --git a/src/forge/CardFactoryUtil.java b/src/forge/CardFactoryUtil.java index aa7c54e0ab1..fc4a6c4b4b8 100644 --- a/src/forge/CardFactoryUtil.java +++ b/src/forge/CardFactoryUtil.java @@ -4642,7 +4642,8 @@ public class CardFactoryUtil { //if (AllZone.GameAction.isCardInPlay(c)) //{ - if (c.getKeyword().contains("When CARDNAME becomes the target of a spell or ability, return CARDNAME to its owner's hand.")) { + if (c.getKeyword().contains("When CARDNAME becomes the target of a spell or ability, return CARDNAME to its owner's hand.") + || AllZoneUtil.isCardInPlay("Cowardice")) { SpellAbility ability = new Ability(c, "0") { public void resolve() @@ -4653,7 +4654,8 @@ public class CardFactoryUtil { ability.setStackDescription(c + " - return CARDNAME to its owner's hand."); AllZone.Stack.add(ability); } - if (c.getKeyword().contains("When CARDNAME becomes the target of a spell or ability, destroy CARDNAME.")) { + if (c.getKeyword().contains("When CARDNAME becomes the target of a spell or ability, destroy CARDNAME.") + || AllZoneUtil.isCardInPlay("Horobi, Death's Wail")) { SpellAbility ability = new Ability(c, "0") { diff --git a/src/forge/CombatUtil.java b/src/forge/CombatUtil.java index 4d96f0aab4b..d8001560d12 100644 --- a/src/forge/CombatUtil.java +++ b/src/forge/CombatUtil.java @@ -120,28 +120,38 @@ public class CombatUtil { temp = blkCL.getType("Plains"); if(!AllZoneUtil.isCardInPlay("Lord Magnus") && !AllZoneUtil.isCardInPlay("Great Wall") + && !AllZoneUtil.isCardInPlay("Staff of the Ages") && !temp.isEmpty()) return false; } if(attacker.getKeyword().contains("Islandwalk")) { temp = blkCL.getType("Island"); - if(!AllZoneUtil.isCardInPlay("Undertow") && !AllZoneUtil.isCardInPlay("Gosta Dirk") && !temp.isEmpty()) return false; + if(!AllZoneUtil.isCardInPlay("Undertow") + && !AllZoneUtil.isCardInPlay("Gosta Dirk") + && !AllZoneUtil.isCardInPlay("Staff of the Ages") + && !temp.isEmpty()) return false; } if(attacker.getKeyword().contains("Swampwalk")) { temp = blkCL.getType("Swamp"); - if(!AllZoneUtil.isCardInPlay("Ur-drago") && !AllZoneUtil.isCardInPlay("Quagmire") && !temp.isEmpty()) return false; + if(!AllZoneUtil.isCardInPlay("Ur-drago") + && !AllZoneUtil.isCardInPlay("Quagmire") + && !AllZoneUtil.isCardInPlay("Staff of the Ages") + && !temp.isEmpty()) return false; } if(attacker.getKeyword().contains("Mountainwalk")) { temp = blkCL.getType("Mountain"); - if(!AllZoneUtil.isCardInPlay("Crevasse") && !temp.isEmpty()) return false; + if(!AllZoneUtil.isCardInPlay("Crevasse") + && !AllZoneUtil.isCardInPlay("Staff of the Ages") + && !temp.isEmpty()) return false; } if(attacker.getKeyword().contains("Forestwalk")) { temp = blkCL.getType("Forest"); if(!AllZoneUtil.isCardInPlay("Lord Magnus") && !AllZoneUtil.isCardInPlay("Deadfall") + && !AllZoneUtil.isCardInPlay("Staff of the Ages") && !temp.isEmpty()) return false; } @@ -151,7 +161,7 @@ public class CombatUtil { return c.isLand() && c.getType().contains("Legendary"); } }); - if(!temp.isEmpty()) return false; + if(!temp.isEmpty() && !AllZoneUtil.isCardInPlay("Staff of the Ages")) return false; } if(attacker.getKeyword().contains("Nonbasic landwalk")) { @@ -160,7 +170,7 @@ public class CombatUtil { return c.isLand() && !c.isBasicLand(); } }); - if(!temp.isEmpty()) return false; + if(!temp.isEmpty() && !AllZoneUtil.isCardInPlay("Staff of the Ages")) return false; }