From 9aeadb168910a3bdbb794a6dcfbf4c410f69a08f Mon Sep 17 00:00:00 2001 From: Jamis Buck Date: Sun, 10 Jul 2011 14:23:03 -0700 Subject: [PATCH] wizard paragon paths --- src/paragon_paths.coffee | 4 + src/paragon_paths/battle_mage.coffee | 27 ++++++ src/paragon_paths/blood_mage.coffee | 27 ++++++ src/paragon_paths/spellstorm_mage.coffee | 27 ++++++ .../wizard_of_the_spiral_tower.coffee | 33 ++++++++ test/paragon_paths/test_battle_mage.coffee | 62 ++++++++++++++ test/paragon_paths/test_blood_mage.coffee | 62 ++++++++++++++ .../paragon_paths/test_spellstorm_mage.coffee | 62 ++++++++++++++ .../test_wizard_of_the_spiral_tower.coffee | 82 +++++++++++++++++++ 9 files changed, 386 insertions(+) create mode 100644 src/paragon_paths/battle_mage.coffee create mode 100644 src/paragon_paths/blood_mage.coffee create mode 100644 src/paragon_paths/spellstorm_mage.coffee create mode 100644 src/paragon_paths/wizard_of_the_spiral_tower.coffee create mode 100644 test/paragon_paths/test_battle_mage.coffee create mode 100644 test/paragon_paths/test_blood_mage.coffee create mode 100644 test/paragon_paths/test_spellstorm_mage.coffee create mode 100644 test/paragon_paths/test_wizard_of_the_spiral_tower.coffee diff --git a/src/paragon_paths.coffee b/src/paragon_paths.coffee index 8f4b878..3b9f7ec 100644 --- a/src/paragon_paths.coffee +++ b/src/paragon_paths.coffee @@ -2,8 +2,10 @@ module.exports = AngelicAvenger : require './paragon_paths/angelic_avenger' AstralWeapon : require './paragon_paths/astral_weapon' BattleCaptain : require './paragon_paths/battle_captain' + BattleMage : require './paragon_paths/battle_mage' BattlefieldArcher: require './paragon_paths/battlefield_archer' BeastStalker : require './paragon_paths/beast_stalker' + BloodMage : require './paragon_paths/blood_mage' CatBurglar : require './paragon_paths/cat_burglar' ChampionOfOrder : require './paragon_paths/champion_of_order' CombatVeteran : require './paragon_paths/combat_veteran' @@ -22,7 +24,9 @@ module.exports = PitFighter : require './paragon_paths/pit_fighter' RadiantServant : require './paragon_paths/radiant_servant' ShadowAssassin : require './paragon_paths/shadow_assassin' + SpellstormMage : require './paragon_paths/spellstorm_mage' Stormwarden : require './paragon_paths/stormwarden' SwordMarshal : require './paragon_paths/sword_marshal' Swordmaster : require './paragon_paths/swordmaster' Warpriest : require './paragon_paths/warpriest' + WizardOfTheSpiralTower: require './paragon_paths/wizard_of_the_spiral_tower' diff --git a/src/paragon_paths/battle_mage.coffee b/src/paragon_paths/battle_mage.coffee new file mode 100644 index 0000000..ef01378 --- /dev/null +++ b/src/paragon_paths/battle_mage.coffee @@ -0,0 +1,27 @@ +module.exports = class BattleMage + constructor: (npc) -> + @id = BattleMage.id + @name = BattleMage.simpleName + @powers = BattleMage.powers + @npc = npc + + npc.feature "class", "Arcane Riposte" + npc.feature "class", "Battle Mage Action" + + advance: -> + if @npc.level >= 16 and not @npc.hasFeature("class", "Battle Edge") + @npc.feature "class", "Battle Edge" + +BattleMage.id = "battleMage" +BattleMage.simpleName = "battle mage" +BattleMage.accepts = (npc) -> npc.class.name is "wizard" + +BattleMage.powers = + encounter: + 11: [ "ForcefulRetort" ] + + daily: + 20: [ "ClosingSpell" ] + + utility: + 12: [ "ArcaneRejuvenation" ] diff --git a/src/paragon_paths/blood_mage.coffee b/src/paragon_paths/blood_mage.coffee new file mode 100644 index 0000000..d0fb643 --- /dev/null +++ b/src/paragon_paths/blood_mage.coffee @@ -0,0 +1,27 @@ +module.exports = class BloodMage + constructor: (npc) -> + @id = BloodMage.id + @name = BloodMage.simpleName + @powers = BloodMage.powers + @npc = npc + + npc.feature "class", "Blood Action" + npc.feature "class", "Bolstering Blood" + + advance: -> + if @npc.level >= 16 and not @npc.hasFeature("class", "Burning Blood") + @npc.feature "class", "Burning Blood" + +BloodMage.id = "bloodMage" +BloodMage.simpleName = "blood mage" +BloodMage.accepts = (npc) -> npc.class.name is "wizard" + +BloodMage.powers = + encounter: + 11: [ "BloodPulse" ] + + daily: + 20: [ "DestructiveSalutation" ] + + utility: + 12: [ "SoulBurn" ] diff --git a/src/paragon_paths/spellstorm_mage.coffee b/src/paragon_paths/spellstorm_mage.coffee new file mode 100644 index 0000000..4dc0e46 --- /dev/null +++ b/src/paragon_paths/spellstorm_mage.coffee @@ -0,0 +1,27 @@ +module.exports = class SpellstormMage + constructor: (npc) -> + @id = SpellstormMage.id + @name = SpellstormMage.simpleName + @powers = SpellstormMage.powers + @npc = npc + + npc.feature "class", "Extra Damage Action" + npc.feature "class", "Storm Spell" + + advance: -> + if @npc.level >= 16 and not @npc.hasFeature("class", "Storm Fury") + @npc.feature "class", "Storm Fury" + +SpellstormMage.id = "spellstormMage" +SpellstormMage.simpleName = "spellstorm mage" +SpellstormMage.accepts = (npc) -> npc.class.name is "wizard" + +SpellstormMage.powers = + encounter: + 11: [ "StormCage" ] + + daily: + 20: [ "MaelstromOfChaos" ] + + utility: + 12: [ "SuddenStorm" ] diff --git a/src/paragon_paths/wizard_of_the_spiral_tower.coffee b/src/paragon_paths/wizard_of_the_spiral_tower.coffee new file mode 100644 index 0000000..c3c61e7 --- /dev/null +++ b/src/paragon_paths/wizard_of_the_spiral_tower.coffee @@ -0,0 +1,33 @@ +Weapons = require '../weapons' + +module.exports = class WizardOfTheSpiralTower + constructor: (npc) -> + @id = WizardOfTheSpiralTower.id + @name = WizardOfTheSpiralTower.simpleName + @powers = WizardOfTheSpiralTower.powers + @npc = npc + + npc.feature "class", "Corellon's Implement" + npc.feature "class", "Spiral Tower Action" + + unless "longsword" in npc.equipment.weapons() + npc.equipment.push "longsword" + + advance: -> + if @npc.level >= 16 and not @npc.hasFeature("class", "Radiant Censure") + @npc.feature "class", "Radiant Censure" + +WizardOfTheSpiralTower.id = "wizardOfTheSpiralTower" +WizardOfTheSpiralTower.simpleName = "wizard of the spiral tower" +WizardOfTheSpiralTower.accepts = (npc) -> + npc.class.name is "wizard" and Weapons.proficient(npc, "longsword") + +WizardOfTheSpiralTower.powers = + encounter: + 11: [ "TheOneSword" ] + + daily: + 20: [ "CorellonsBlade" ] + + utility: + 12: [ "ShapeTheDream" ] diff --git a/test/paragon_paths/test_battle_mage.coffee b/test/paragon_paths/test_battle_mage.coffee new file mode 100644 index 0000000..b9df7a0 --- /dev/null +++ b/test/paragon_paths/test_battle_mage.coffee @@ -0,0 +1,62 @@ +{Classes, ParagonPaths, NPC} = require '../..' + +BattleMage = ParagonPaths.BattleMage + +newWizard = -> + npc = new NPC + npc.class = new Classes.Wizard npc + npc + +module.exports = + "should have id": (test) -> + test.equal BattleMage.id, "battleMage" + path = new BattleMage(newWizard()) + test.equal path.id, "battleMage" + test.done() + + "should have name": (test) -> + test.equal BattleMage.simpleName, "battle mage" + path = new BattleMage(newWizard()) + test.equal path.name, "battle mage" + test.done() + + "should require wizard": (test) -> + npc = new NPC + npc.class = new Classes.Cleric npc + test.ok not BattleMage.accepts(npc) + test.ok BattleMage.accepts(newWizard()) + test.done() + + "constructor should set initial path features": (test) -> + new BattleMage(npc = newWizard()) + test.ok npc.hasFeature("class", "Arcane Riposte"), "expected Arcane Riposte" + test.ok npc.hasFeature("class", "Battle Mage Action"), "expected Battle Mage Action" + test.ok not npc.hasFeature("class", "Battle Edge") + test.done() + + "powers are accounted for": (test) -> + test.ok "ForcefulRetort" in BattleMage.powers.encounter[11] + test.ok "ArcaneRejuvenation" in BattleMage.powers.utility[12] + test.ok "ClosingSpell" in BattleMage.powers.daily[20] + + klass = new BattleMage(newWizard()) + test.equal BattleMage.powers, klass.powers + test.done() + + "advance should do nothing if level is not significant": (test) -> + klass = new BattleMage(npc = newWizard()) + npc.paragonPath = klass + npc.level = 13 + count = npc.features.class.length + npc.paragonPath.advance() + test.equal npc.features.class.length, count + test.done() + + "advance should add class feature if level is significant": (test) -> + klass = new BattleMage(npc = newWizard()) + npc.paragonPath = klass + npc.level = 16 + test.ok not npc.hasFeature("class", "Battle Edge") + npc.paragonPath.advance() + test.ok npc.hasFeature("class", "Battle Edge") + test.done() diff --git a/test/paragon_paths/test_blood_mage.coffee b/test/paragon_paths/test_blood_mage.coffee new file mode 100644 index 0000000..6877ea8 --- /dev/null +++ b/test/paragon_paths/test_blood_mage.coffee @@ -0,0 +1,62 @@ +{Classes, ParagonPaths, NPC} = require '../..' + +BloodMage = ParagonPaths.BloodMage + +newWizard = -> + npc = new NPC + npc.class = new Classes.Wizard npc + npc + +module.exports = + "should have id": (test) -> + test.equal BloodMage.id, "bloodMage" + path = new BloodMage(newWizard()) + test.equal path.id, "bloodMage" + test.done() + + "should have name": (test) -> + test.equal BloodMage.simpleName, "blood mage" + path = new BloodMage(newWizard()) + test.equal path.name, "blood mage" + test.done() + + "should require wizard": (test) -> + npc = new NPC + npc.class = new Classes.Cleric npc + test.ok not BloodMage.accepts(npc) + test.ok BloodMage.accepts(newWizard()) + test.done() + + "constructor should set initial path features": (test) -> + new BloodMage(npc = newWizard()) + test.ok npc.hasFeature("class", "Blood Action"), "expected Blood Action" + test.ok npc.hasFeature("class", "Bolstering Blood"), "expected Bolstering Blood" + test.ok not npc.hasFeature("class", "Burning Blood") + test.done() + + "powers are accounted for": (test) -> + test.ok "BloodPulse" in BloodMage.powers.encounter[11] + test.ok "SoulBurn" in BloodMage.powers.utility[12] + test.ok "DestructiveSalutation" in BloodMage.powers.daily[20] + + klass = new BloodMage(newWizard()) + test.equal BloodMage.powers, klass.powers + test.done() + + "advance should do nothing if level is not significant": (test) -> + klass = new BloodMage(npc = newWizard()) + npc.paragonPath = klass + npc.level = 13 + count = npc.features.class.length + npc.paragonPath.advance() + test.equal npc.features.class.length, count + test.done() + + "advance should add class feature if level is significant": (test) -> + klass = new BloodMage(npc = newWizard()) + npc.paragonPath = klass + npc.level = 16 + test.ok not npc.hasFeature("class", "Burning Blood") + npc.paragonPath.advance() + test.ok npc.hasFeature("class", "Burning Blood") + test.done() diff --git a/test/paragon_paths/test_spellstorm_mage.coffee b/test/paragon_paths/test_spellstorm_mage.coffee new file mode 100644 index 0000000..6381ff0 --- /dev/null +++ b/test/paragon_paths/test_spellstorm_mage.coffee @@ -0,0 +1,62 @@ +{Classes, ParagonPaths, NPC} = require '../..' + +SpellstormMage = ParagonPaths.SpellstormMage + +newWizard = -> + npc = new NPC + npc.class = new Classes.Wizard npc + npc + +module.exports = + "should have id": (test) -> + test.equal SpellstormMage.id, "spellstormMage" + path = new SpellstormMage(newWizard()) + test.equal path.id, "spellstormMage" + test.done() + + "should have name": (test) -> + test.equal SpellstormMage.simpleName, "spellstorm mage" + path = new SpellstormMage(newWizard()) + test.equal path.name, "spellstorm mage" + test.done() + + "should require wizard": (test) -> + npc = new NPC + npc.class = new Classes.Cleric npc + test.ok not SpellstormMage.accepts(npc) + test.ok SpellstormMage.accepts(newWizard()) + test.done() + + "constructor should set initial path features": (test) -> + new SpellstormMage(npc = newWizard()) + test.ok npc.hasFeature("class", "Extra Damage Action"), "expected Extra Damage Action" + test.ok npc.hasFeature("class", "Storm Spell"), "expected Storm Spell" + test.ok not npc.hasFeature("class", "Storm Fury") + test.done() + + "powers are accounted for": (test) -> + test.ok "StormCage" in SpellstormMage.powers.encounter[11] + test.ok "SuddenStorm" in SpellstormMage.powers.utility[12] + test.ok "MaelstromOfChaos" in SpellstormMage.powers.daily[20] + + klass = new SpellstormMage(newWizard()) + test.equal SpellstormMage.powers, klass.powers + test.done() + + "advance should do nothing if level is not significant": (test) -> + klass = new SpellstormMage(npc = newWizard()) + npc.paragonPath = klass + npc.level = 13 + count = npc.features.class.length + npc.paragonPath.advance() + test.equal npc.features.class.length, count + test.done() + + "advance should add class feature if level is significant": (test) -> + klass = new SpellstormMage(npc = newWizard()) + npc.paragonPath = klass + npc.level = 16 + test.ok not npc.hasFeature("class", "Storm Fury") + npc.paragonPath.advance() + test.ok npc.hasFeature("class", "Storm Fury") + test.done() diff --git a/test/paragon_paths/test_wizard_of_the_spiral_tower.coffee b/test/paragon_paths/test_wizard_of_the_spiral_tower.coffee new file mode 100644 index 0000000..0bbe313 --- /dev/null +++ b/test/paragon_paths/test_wizard_of_the_spiral_tower.coffee @@ -0,0 +1,82 @@ +{Classes, ParagonPaths, NPC} = require '../..' + +WizardOfTheSpiralTower = ParagonPaths.WizardOfTheSpiralTower + +newWizard = -> + npc = new NPC + npc.class = new Classes.Wizard npc + npc + +module.exports = + "should have id": (test) -> + test.equal WizardOfTheSpiralTower.id, "wizardOfTheSpiralTower" + path = new WizardOfTheSpiralTower(newWizard()) + test.equal path.id, "wizardOfTheSpiralTower" + test.done() + + "should have name": (test) -> + test.equal WizardOfTheSpiralTower.simpleName, "wizard of the spiral tower" + path = new WizardOfTheSpiralTower(newWizard()) + test.equal path.name, "wizard of the spiral tower" + test.done() + + "should require wizard with longsword proficiency": (test) -> + npc = new NPC + npc.class = new Classes.Cleric npc + test.ok not WizardOfTheSpiralTower.accepts(npc) + npc = newWizard() + test.ok not WizardOfTheSpiralTower.accepts(npc) + npc.proficiencies.weapons.push "longsword" + test.ok WizardOfTheSpiralTower.accepts(npc) + test.done() + + "constructor should set initial path features": (test) -> + new WizardOfTheSpiralTower(npc = newWizard()) + test.ok npc.hasFeature("class", "Corellon's Implement"), "expected Corellon's Implement" + test.ok npc.hasFeature("class", "Spiral Tower Action"), "expected Spiral Tower Action" + test.ok not npc.hasFeature("class", "Radiant Censure") + test.done() + + "should add longsword to equipment if longsword is not already present": (test) -> + npc = newWizard() + test.ok "longsword" not in npc.equipment + new WizardOfTheSpiralTower npc + test.ok "longsword" in npc.equipment + test.done() + + "should not add longsword to equipment if longsword is already present": (test) -> + npc = newWizard() + npc.equipment.push "longsword" + new WizardOfTheSpiralTower npc + count = 0 + for weapon in npc.equipment.weapons() + count += 1 if weapon is "longsword" + test.equal count, 1 + test.done() + + "powers are accounted for": (test) -> + test.ok "TheOneSword" in WizardOfTheSpiralTower.powers.encounter[11] + test.ok "ShapeTheDream" in WizardOfTheSpiralTower.powers.utility[12] + test.ok "CorellonsBlade" in WizardOfTheSpiralTower.powers.daily[20] + + klass = new WizardOfTheSpiralTower(newWizard()) + test.equal WizardOfTheSpiralTower.powers, klass.powers + test.done() + + "advance should do nothing if level is not significant": (test) -> + klass = new WizardOfTheSpiralTower(npc = newWizard()) + npc.paragonPath = klass + npc.level = 13 + count = npc.features.class.length + npc.paragonPath.advance() + test.equal npc.features.class.length, count + test.done() + + "advance should add class feature if level is significant": (test) -> + klass = new WizardOfTheSpiralTower(npc = newWizard()) + npc.paragonPath = klass + npc.level = 16 + test.ok not npc.hasFeature("class", "Radiant Censure") + npc.paragonPath.advance() + test.ok npc.hasFeature("class", "Radiant Censure") + test.done()