From 7d42a777de46efac94966e2c11596fafe562fde8 Mon Sep 17 00:00:00 2001 From: Zachary Dziura Date: Thu, 8 Sep 2016 16:15:16 -0400 Subject: [PATCH] Fixed Combateer targetting and Empath Clarity Previously, the Combateer "fireTurret" function was being incorrectly defined. Also, the Empath's Clarity skill was not being correctly captured. That has been fixed. --- Dreadnought.xml | 1290 ++++++++++++++++++----------------------------- 1 file changed, 494 insertions(+), 796 deletions(-) diff --git a/Dreadnought.xml b/Dreadnought.xml index a30b165..11be126 100644 --- a/Dreadnought.xml +++ b/Dreadnought.xml @@ -17,193 +17,6 @@ #000000 - - Module Lock - - 0 - 0 - 0 - - - #ff0000 - #ffff00 - - #000000 - #000000 - - ^You step up to (?:a|an|the) (\w+\s?)+ - - - 1 - - - - Module Unlock - - 0 - 0 - 0 - - - #ff0000 - #ffff00 - - #000000 - #000000 - - ^With a long, slow blink, you allow your mind to drift free from the ship, and release your lock on the command of (?:a|an|the) (\w+\s?)+\.$ - - - 1 - - - - Shockwave Timer - - 0 - 0 - 0 - - - #ff0000 - #ffff00 - - #000000 - #000000 - - A nearby turret blankets aetherspace with bolts of crackling energy, which ripple around this space in waves of coruscating power. - You blanket the aetherspace around you with bolts of crackling energy, which ripple around this space in waves of coruscating power. - - - 3 - 3 - - - - Ship Implodes - - 0 - 0 - 0 - - - #ff0000 - #ffff00 - - #000000 - #000000 - - implodes and your body is instantly torn apart by the unstable reality of the Aetherways. - - - 0 - - Prompt @@ -244,6 +57,233 @@ end)) + + Locking/Unlocking + + 0 + 0 + 0 + + + #ff0000 + #ffff00 + + #000000 + #000000 + + + + Chair Locked + + 0 + 0 + 0 + + + #ff0000 + #ffff00 + + #000000 + #000000 + + You step up to the command chair, locking yourself into the module and linking your mind to the controls of the ship. After a moment, you begin to sense your command of the module in your own brain. + + + 3 + + + + Chair Unlocked + + 0 + 39 + 0 + + + #ff0000 + #ffff00 + + #000000 + #000000 + + With a long, slow blink, you allow your mind to drift free from the ship, and release your lock on the command of the command chair. + + + 3 + + + + Grid Locked + + 0 + 99 + 0 + + + #ff0000 + #ffff00 + + #000000 + #000000 + + You step up to the empathic grid, locking yourself into the module and linking your mind to the controls of the ship. After a moment, you begin to sense your command of the module in your own brain. + + + 3 + + + + Grid Unlocked + + 0 + 39 + 0 + + + #ff0000 + #ffff00 + + #000000 + #000000 + + With a long, slow blink, you allow your mind to drift free from the ship, and release your lock on the command of the empathic grid. + + + 3 + + + + Turret Locked + + 0 + 39 + 0 + + + #ff0000 + #ffff00 + + #000000 + #000000 + + You step up to a battle turret, locking yourself into the module and linking your mind to the controls of the ship. After a moment, you begin to sense your command of the module in your own brain. + + + 3 + + + + Turret Unlocked + + 0 + 0 + 0 + + + #ff0000 + #ffff00 + + #000000 + #000000 + + With a long, slow blink, you allow your mind to drift free from the ship, and release your lock on the command of a battle turret. + + + 3 + + + + Collector Locked + + 0 + 39 + 0 + + + #ff0000 + #ffff00 + + #000000 + #000000 + + You step up to an energy collector, locking yourself into the module and linking your mind to the controls of the ship. After a moment, you begin to sense your command of the module in your own brain. + + + 3 + + + + Collector Unlocked + + 0 + 0 + 0 + + + #ff0000 + #ffff00 + + #000000 + #000000 + + With a long, slow blink, you allow your mind to drift free from the ship, and release your lock on the command of an energy collector. + + + 3 + + + Pilot @@ -304,13 +344,8 @@ dreadnought.pilot.siphonCalloutCount = 0 send("shipt Target " .. matches[2]) -local newPosition = dreadnought.autopilot( - dreadnought.balance, - dreadnought.pilot.aetherbeastsPresent, - dreadnought.aetherbeastsTotal, - dreadnought.pilot.currentPosition, - dreadnought.pilot.flags -) +local newPosition = dreadnought.autopilot(dreadnought.balance, dreadnought.pilot.aetherbeastsPresent, + dreadnought.aetherbeastsTotal, dreadnought.pilot.currentPosition, dreadnought.pilot.flags) if newPosition ~= 0 then dreadnought.pilot.currentPosition = newPosition @@ -333,10 +368,14 @@ end ^Drawn by the flux of energy, a \w+ (\w+) suddenly wanders into the nearby area\.$ ^Drawn by the flux of energy, a six-headed (\w+) suddenly wanders into the nearby area\.$ + ^Drawn by the flux of energy, a swarm of (\w+) suddenly wanders into the nearby area\.$ + ^Drawn by the flux of energy, a school ofburning (\w+) suddenly wanders into the nearby area\.$ 1 1 + 1 + 1 @@ -349,19 +388,10 @@ send("shipt Target karibidean") flowerbox("red", "KARIBIDEAN!!!") dmsg("Switching to manual override!") -local newPosition = dreadnought.autopilot( - dreadnought.balance, - dreadnought.pilot.aetherbeastsPresent, - dreadnought.aetherbeastsTotal, - dreadnought.pilot.currentPosition, - dreadnought.pilot.flags -) +dreadnought.autopilot(dreadnought.balance, dreadnought.pilot.aetherbeastsPresent, + dreadnought.aetherbeastsTotal, dreadnought.pilot.currentPosition, dreadnought.pilot.flags) -if newPosition ~= 0 then - dreadnought.pilot.currentPosition = newPosition -end - -disableTrigger("Siphon Callout") +--disableTrigger("Autopilot") 0 0 @@ -384,17 +414,13 @@ disableTrigger("Siphon Callout") Aetherbeast Enters +end + 0 0 0 @@ -440,17 +466,13 @@ end Freed From Shockwave +end + 0 0 0 @@ -478,19 +500,14 @@ end if dreadnought.aetherbeastsTotal > 0 then dreadnought.aetherbeastsTotal = dreadnought.aetherbeastsTotal - 1 - - if dreadnought.aetherbeastsTotal == 0 then - dreadnought.pilot.flags.siphonCallout = true - end end -local newPosition = dreadnought.autopilot( - dreadnought.balance, - dreadnought.pilot.aetherbeastsPresent, - dreadnought.aetherbeastsTotal, - dreadnought.pilot.currentPosition, - dreadnought.pilot.flags -) +if dreadnought.aetherbeastsTotal == 0 then + dreadnought.pilot.flags.siphonCallout = true +end + +local newPosition = dreadnought.autopilot(dreadnought.balance, dreadnought.pilot.aetherbeastsPresent, + dreadnought.aetherbeastsTotal, dreadnought.pilot.currentPosition, dreadnought.pilot.flags) if newPosition ~= 0 then dreadnought.pilot.currentPosition = newPosition @@ -519,13 +536,8 @@ end Pilot Balance - 0 - 0 - 0 - - - #ff0000 - #ffff00 - - #000000 - #000000 - - ^(?:\w+\s){3}suddenly explodes\!$ - A six-headed scyllus suddenly explodes! - - - 1 - 3 - - Ship Move @@ -605,6 +584,7 @@ end) Shockwave Timer 0 0 @@ -794,12 +774,13 @@ dreadnought.repairShip(dreadnought.balance, dreadnought.empath.commands)#000000 #000000 - concussive shock rips through the hull\.$ - swiftly shears through her hull\.$ - rips apart her hull\.$ - shreds deep rends through her hull\.$ + concussive shock rips through the hull.$ + swiftly shears through her hull.$ + rips apart her hull.$ + shreds deep rends through her hull.$ ^Violet sparks fly through the air and - cries out as bolts of jagged energy strike out from the ruptured fabric of aetherspace here\.$ + ^\(Ship\): \w+ says, \"Repair.\"$ + cries out as bolts of jagged energy strike out from the ruptured fabric of aetherspace here.$ 1 @@ -808,12 +789,13 @@ dreadnought.repairShip(dreadnought.balance, dreadnought.empath.commands)1 1 1 + 1 Repaired - 0 0 @@ -849,7 +831,7 @@ end - Damaged - Occupied + Damaged end - heap.insert(dreadnought.empath.commands, action(module, priority, "grid repair module " .. matches[3])) -end - 0 - 0 - 1 - - - #ff0000 - #ffff00 - - #000000 - #000000 - - ^"(\D+)(\d+)"\s+(?:\w+\s){3}\s+\d+\%\ \/\ (\w+) damage \[\w+\] - - - 1 - - - End Damaged - - 0 - 0 - 0 - - - #ff0000 - #ffff00 - - #000000 - #000000 - - return isPrompt() - - - 4 - - - - - Damaged - Unoccupied - 0 0 @@ -954,9 +873,7 @@ end End Damaged - 0 0 @@ -978,8 +895,8 @@ dreadnought.repairShip(dreadnought.balance, dreadnought.empath.commands) Repaired - 0 0 @@ -999,31 +916,10 @@ end - - Rapair Callout - - 0 - 0 - 0 - - - #ff0000 - #ffff00 - - #000000 - #000000 - - ^\(Ship\): \w+ says, \"Repair.\"$ - - - 1 - - Already Repaired 0 0 @@ -1180,7 +1076,7 @@ disableTrigger("Slivven Check") Call @@ -1204,7 +1100,7 @@ end Emergency @@ -1227,10 +1123,10 @@ end Finish - 0 0 @@ -1253,8 +1149,8 @@ end Aetherbeast Dead - 0 @@ -1274,29 +1170,6 @@ end 1 - - Entering Shockwave - - 0 - 0 - 0 - - - #ff0000 - #ffff00 - - #000000 - #000000 - - ^You are thrust forward as(?:\s\w+(?:\'\w+)?)+ shudders violently and comes to a complete stop\.$ - - - 1 - - Grid Balance @@ -1335,12 +1208,12 @@ dreadnought.repairShip(dreadnought.balance, dreadnought.empath.commands)#000000 - + Turret Setup - + 0 0 - 0 + 13 #ff0000 @@ -1349,10 +1222,10 @@ dreadnought.repairShip(dreadnought.balance, dreadnought.empath.commands)#000000 #000000 - The battle turret is a spherical object, half of which is below the floor and the other half above. Made of a gleaming black metal, an opening on top of the turret leads to a cushioned interior. Handholds and other devices are attached within to operate the aetheric battle mechanisms. The entire interior is a sphere within a sphere that can rotate in all directions. An ominous hum vibrates up from deep within the turret itself. + The battle turret is a spherical object - 3 + 2 Can Vortex @@ -1417,7 +1290,7 @@ disableTrigger("Turret Setup") Aetherbeast Summoned +dreadnought.fireTurret() 0 99 0 @@ -1440,7 +1313,7 @@ dreadnought.fireTurret(dreadnought.combateer.targets, dreadnought.combateer.flag Karibidean Summoned +dreadnought.fireTurret() 0 0 0 @@ -1477,7 +1350,7 @@ dreadnought.fireTurret(dreadnought.combateer.targets, dreadnought.combateer.flag Targeting +dreadnought.fireTurret() 0 99 0 @@ -1501,7 +1374,7 @@ dreadnought.fireTurret(dreadnought.combateer.targets, dreadnought.combateer.flag Turret Balance +dreadnought.fireTurret() 0 39 0 @@ -1533,21 +1406,19 @@ dreadnought.fireTurret(dreadnought.combateer.targets, dreadnought.combateer.flag #000000 #000000 - ^You tune the weapon module to target (?:a|an) \w+ \w+\.$ + ^You tune the weapon module to target a \w+ \w+\.$ ^You tune the weapon module to target a six-headed \w+\.$ - ^You tune the weapon module to target a scorpion-like \w+\.$ 1 1 - 1 Vortex 0 0 @@ -1577,7 +1448,7 @@ end #000000 You focus your turret on the fabric of aetherspace itself and fire, ripping open a gaping vortex. - A focused blast rips through the fabric of aetherspace, ripping open a gaping vortex. 3 - 3 Shockwave +dreadnought.fireTurret() 0 99 0 @@ -1646,7 +1515,7 @@ dreadnought.fireTurret(dreadnought.combateer.targets, dreadnought.combateer.flag Targetted Shockwave 0 0 @@ -1693,7 +1562,7 @@ end Beast Dies +dreadnought.fireTurret() 0 0 0 @@ -1737,7 +1606,7 @@ table.remove(dreadnought.combateer.targets, 1) Turret Exhaustion +dreadnought.fireTurret() 0 99 0 @@ -1911,10 +1780,7 @@ end Siphoning Vortex - + 0 99 0 @@ -1977,11 +1843,7 @@ disableTrigger("Siphoning - Callout") Exhaustion +dreadnought.siphonVortex(dreadnought.aetherbeastsTotal) 0 0 0 @@ -2066,7 +1928,6 @@ end Collector On Targetted 0 @@ -2152,45 +2013,29 @@ tempTimer(0.1, [[send("shipt Aye aye, Captain! Deactivating my collector&qu + + Ship Implodes + + 0 + 0 + 0 + + + #ff0000 + #ffff00 + + #000000 + #000000 + + implodes and your body is instantly torn apart by the unstable reality of the Aetherways\.$ + + + 1 + + - - - Dreadnought - - - - - - Shockwaves - - - - - - Shockwaves Expired - - shipt Attention! The shockwaves have expired! - - - - - Five Minute Announcement - - shipt Attention! The shockwaves will expire in five minutes! - - - - - Fifteen Minute Announcement - - shipt Attention! The shockwaves will expire in fifteen minutes! - - - - - - + Dreadnought @@ -2490,24 +2335,25 @@ end + + Grid Modules + + grid modules + + ^gm$ + Grid Repair - ^gr(?: (all|reset))?$ + ^gr(?: (reset))?$ Slivven Check @@ -2519,7 +2365,7 @@ send("grid modules") Clarity - @@ -2583,19 +2429,12 @@ elseif matches[2] == "list" then else table.insert(dreadnought.combateer.targets, matches[2]) dmsg("Adding to the list of targets: " .. matches[2]) - dreadnought.fireTurret(dreadnought.combateer.targets, dreadnought.combateer.flags) + dreadnought.fireTurret() end ^ttar (\w+)$ - - - - - - - Collector @@ -2629,100 +2468,6 @@ end ^smode (call|auto|off)$ - - Gags - - - - - - Gagall - - - - ^gagall$ - - - ungagall - - - - ^ungagall$ - - - gagturret - - - - ^gagturret$ - - - ungagturret - - - - ^ungagturret$ - - - Gagempath - - - - ^gagempath$ - - - ungagempath - - - - ^ungagempath$ - - - Gagbeast - - - - ^gagbeast$ - - - Ungagbeast - - - - ^ungagbeast$ - - - Gagmove - - - - ^gagmove$ - - - Ungagmove - - - - ^ungagmove$ - - Finish Hunting Dreadnought + + Data Structures + + + + + + + + + + Pilot @@ -2783,8 +2666,7 @@ function dreadnought.reset.pilot() aetherbeastsTotal = 0, pilot = { - shockwaveTimers = {}, - siphonCalloutCount = 0, + calloutTimer = 0, aetherbeastsPresent = 0, currentPosition = 1, flags = { @@ -2805,7 +2687,6 @@ end currentPosition = 0, nextPosition = "" } - if balance and not flags.shocked then if aetherbeastsTotal > 0 then if aetherbeastsPresent == aetherbeastsTotal then @@ -2826,25 +2707,6 @@ end - - - cube = "" }, - commands = heap.new(), + commands = dreadnought.ds.heap.new(), flags = { - haveClarity = false, - repairBlacklistedModules = false + haveClarity = false }, slivvensFound = 0 @@ -2935,11 +2796,10 @@ function dreadnought.reset.empath() cube = "" }, - commands = heap.new(), + commands = dreadnought.ds.heap.new(), flags = { - canClarity = false, - repairBlacklistedModules = false + haveClarity = false }, slivvensFound = 0 @@ -2953,58 +2813,51 @@ end + + + Combateer +} Collector - + - - - - - - - - Data Structures - - - - - - -