Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 33 additions & 12 deletions lib/gemstone/infomon/xmlparser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ module Pattern
/As(?: the)?/,
/An intangible ripple of pure energy courses through the air as/,
/A monstrous, too-wide smile spreads across/,
/With a final discordant squeal,/,
/With a final (?:discordant|silent) squeal,/,
/A rush of silent thunder explodes outward from/,
/Rage flickers in/,
/A plaintive look passes across/,
Expand All @@ -75,6 +75,11 @@ module Pattern
/Half-formed arms grasp futilely at empty air and melting mouths work soundlessly as/,
/Electric blue light pours from/,
/Acid belches from/,
/Upon expiration,/,
/Emitting one final squeal,/,
/A shocked expression passes over the/,
/A shock of disbelief briefly registers on the/,
/Freezing in mid-air, the/,
)
NpcDeathPostfix = Regexp.union(
/body as it rises, disappearing into the heavens/,
Expand Down Expand Up @@ -154,9 +159,9 @@ module Pattern
/gives a last angry stare and falls to the ground dead/,
/shudders violently as it dies/,
/is a charred ashen figure of its former self lying upon the (?:floor|ground)/,
/rears up its head, then (?:falls to the (?:floor|ground) and )?curls up into a ball, dead/,
/rears up (?:his|her|its) head, then (?:falls to the (?:floor|ground) and )?curls up into a ball, dead/,
/rolls over on its back, emits a final screech and dies/,
/arches its back in a tortured spasm and dies/,
/arches (?:his|her|its) back in a tortured spasm and dies/,
/shudders violently before scattering into a disorganized pile/,
/shudders violently, before falling to the ground in a disorganized pile/,
/gurgles eerily and collapses into the water/,
Expand Down Expand Up @@ -258,7 +263,7 @@ module Pattern
/drops to the floor, quite dead/,
/thrashes violently and then dies/,
/rasps a final scream and dies/,
/(?:rolls over on its back, )?emits a final hiss and dies/,
/(?:rolls over on (?:his|her|its) back, )?emits a final hiss and dies/,
/coughs, causing a greenish fluid to dribble down <pushBold\/><a exist="[^"]+" noun="[^"]+">(?:hi[ms]|her|s?he|its?)<\/a><popBold\/> lips as <pushBold\/><a exist="[^"]+" noun="[^"]+">(?:hi[ms]|her|s?he|its?)<\/a><popBold\/> falls/,
/cries out in cold agony one last time and dies/,
/collapses, <pushBold\/><a exist="[^"]+" noun="[^"]+">(?:hi[ms]|her|s?he|its?)<\/a><popBold\/> eyes fading to a lifeless gaze and stone shell cracking into a barely discernible form/,
Expand Down Expand Up @@ -368,8 +373,8 @@ module Pattern
/face muscles slacken, (?:hi[ms]|her|s?he|its?) hard-bitten features disappearing in death/,
/muscles collapse and (?:hi[ms]|her|s?he|its?) shrinks into a pitiful pile of rags and bones, (?:hi[ms]|her|s?he|its?) hard-bitten features disappearing in death/,
/body goes stiff and cold as <pushBold\/><a exist="[^"]+" noun="[^"]+">(?:hi[ms]|her|s?he|its?)<\/a><popBold\/> dies/,
/slams to the deck, dead as a salmon bear snack/,
/collapses to the deck, dead as a pickled herring/,
/slams to the (?:deck|floor|ground), dead as a salmon bear snack/,
/collapses to the (?:deck|floor|ground), dead as a pickled herring/,
/thuds to the deck in a plume of dust/,
/clatters to the ground into a heap of jumbled bones/,
/glares forward, then collapses in a motionless heap/,
Expand Down Expand Up @@ -408,13 +413,12 @@ module Pattern
/screams (?:emotionlessly )?one last time and lies still/,
/collapses into a heap of quivering jelly/,
/tries to crawl away on the (?:floor|ground|deck) but collapses and goes still/,
/collapses to the ground, dead as a pickled herring/,
/crashes to the ground in a plume of dust/,
/flattens out on the ground, dead as a salted flounder/,
/spins to the ground, dead as an iced halibut/,
/flattens out on the (?:floor|ground), dead as a salted flounder/,
/spins to the (?:floor|ground), dead as an iced halibut/,
/falls lifeless to the ground with a heavy thump/,
/slams to the ground, dead as a salmon bear snack/,
/crashes to the ground, dead as a carp on a rock/,
/slams to the (?:floor|ground), dead as a salmon bear snack/,
/crashes to the (?:floor|ground), dead as a carp on a rock/,
/thuds to the ground in a plume of dust/,
/collapses to the ground as <pushBold\/><a exist="[^"]+" noun="[^"]+">(?:hi[ms]|her|s?he|its?)<\/a><popBold\/> flickers in and out of existence/,
/falls to the ground motionless as small motes of light encompass <pushBold\/><a exist="[^"]+" noun="[^"]+">(?:hi[ms]|her|s?he|its?)<\/a><popBold\/> body/,
Expand Down Expand Up @@ -451,7 +455,7 @@ module Pattern
/staggers dramatically, a phantasmal hand trailing wisps of fog as it rises to <pushBold\/><a exist="[^"]+" noun="[^"]+">(?:hi[ms]|her|s?he|its?)<\/a><popBold\/> chest. With a last, surprised blink, <pushBold\/><a exist="[^"]+" noun="[^"]+">(?:hi[ms]|her|s?he|its?)<\/a><popBold\/> collapses and rapidly begins losing cohesion/,
/twitches and writhes spasmodically before collapsing to the (?:floor|ground)/,
/writhes in black agony and dies/,
/slumps to the floor, the darkly lined tattoos traversing <pushBold\/><a exist="[^"]+" noun="[^"]+">(?:hi[ms]|her|s?he|its?)<\/a><popBold\/> skin lose the luminescence that had seemed to radiate from them/,
/slumps to the (?:floor|ground), the darkly lined tattoos traversing <pushBold\/><a exist="[^"]+" noun="[^"]+">(?:hi[ms]|her|s?he|its?)<\/a><popBold\/> skin lose the luminescence that had seemed to radiate from them/,
/eyes as <pushBold\/><a exist="[^"]+" noun="[^"]+">(?:hi[ms]|her|s?he|its?)<\/a><popBold\/> grasps at the <a exist="[^"]+" noun="phylactery">gnarled bone phylactery<\/a> hanging around <pushBold\/><a exist="[^"]+" noun="[^"]+">(?:hi[ms]|her|s?he|its?)<\/a><popBold\/> neck and collapses to the ground/,
/skin as <pushBold\/><a exist="[^"]+" noun="[^"]+">(?:hi[ms]|her|s?he|its?)<\/a><popBold\/> movement completely ceases/,
/as <pushBold\/><a exist="[^"]+" noun="[^"]+">(?:hi[ms]|her|s?he|its?)<\/a><popBold\/> stone skin cracks open in a myriad of deep gashes/,
Expand Down Expand Up @@ -487,6 +491,23 @@ module Pattern
/crashes to the floor in a plume of dust/,
/falls lifeless to the floor with a heavy thump/,
/screams, shudders one last time and dies/,
/vainly struggles to remain standing, then falls to the ground motionless/,
/grunts and lays still, the life going out of <pushBold\/><a exist="[^"]+" noun="[^"]+">(?:hi[ms]|her|s?he|its?)<\/a><popBold\/> warm brown eyes/,
/lets out a harsh denial, the sound violent and agonizing, but <pushBold\/><a exist="[^"]+" noun="[^"]+">(?:hi[ms]|her|s?he|its?)<\/a><popBold\/> cry is cut off along with <pushBold\/><a exist="[^"]+" noun="[^"]+">(?:hi[ms]|her|s?he|its?)<\/a><popBold\/> life/,
/lets out a ragged gasp, collapsing to one knee and looking sightlessly to the heavens. <pushBold\/><a exist="[^"]+" noun="[^"]+">(?:He|She)<\/a><popBold\/> dies with a knowing smile on <pushBold\/><a exist="[^"]+" noun="[^"]+">(?:hi[ms]|her|s?he|its?)<\/a><popBold\/> face/,
/emits a rancid cloud from <pushBold\/><a exist="[^"]+" noun="[^"]+">(?:hi[ms]|her|s?he|its?)<\/a><popBold\/> hind end/,
/falls over and remains still/,
/face before <pushBold\/><a exist="[^"]+" noun="[^"]+">(?:hi[ms]|her|s?he|its?)<\/a><popBold\/> falls over lifeless/,
/face, the expression almost human, before the light leaves <pushBold\/><a exist="[^"]+" noun="[^"]+">(?:hi[ms]|her|s?he|its?)<\/a><popBold\/> eyes and <pushBold\/><a exist="[^"]+" noun="[^"]+">(?:hi[ms]|her|s?he|its?)<\/a><popBold\/> falls over dead/,
/suddenly ceases all movement and plunges lifeless to the ground/,
/gasps a final prayer, then falls to the ground dead/,
/thrashes one last time and goes still/,
/dies and collapses to the floor/,
/moans in agony and then goes still/,
/spasms in death and then goes still/,
/staggers, then falls to the floor and dies/,
/dies unceremoniously/,
/slumps to <pushBold\/><a exist="[^"]+" noun="[^"]+">(?:hi[ms]|her|s?he|its?)<\/a><popBold\/> side and dies/,
)
NpcDeathMessage = /^(?:<pushBold\/>)?#{NpcDeathPrefix}\s(?:<pushBold\/>)?(?:(?:an?|some|the)\s)?<a exist="(?<npc_id>[^"]+)" noun="[^"]+">[^<]+<\/a><popBold\/>(?:'s)?,?\s#{NpcDeathPostfix}[\.!"]\s?\r?\n?$/

Expand Down
25 changes: 25 additions & 0 deletions spec/lib/gemstone/infomon/xmlparser_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1900,6 +1900,31 @@
The <pushBold/><a exist="12345678" noun="farmhand">rotting farmhand</a><popBold/> wails in terrifying pain one last time and lies still.
The <pushBold/><a exist="12345678" noun="wight">tomb wight</a><popBold/> screams evilly one last time and goes still.
The <pushBold/><a exist="12345678" noun="spider">tomb spider's</a><popBold/> body jerks one last time and dies.
Upon expiration, <pushBold/>a <a exist="12345678" noun="bully">cloud sprite bully</a><popBold/> emits a rancid cloud from <pushBold/><a exist="12345678" noun="bully">her</a><popBold/> hind end.
Emitting one final squeal, <pushBold/>a <a exist="12345678" noun="tapir">bristly black tapir</a><popBold/> falls over and remains still.
A shocked expression passes over the <pushBold/><a exist="12345678" noun="feyling">feyling</a><popBold/> face before <pushBold/><a exist="12345678" noun="feyling">she</a><popBold/> falls over lifeless.
A shock of disbelief briefly registers on the <pushBold/><a exist="12345678" noun="lemur">ring-tail lemur's</a><popBold/> face, the expression almost human, before the light leaves <pushBold/><a exist="12345678" noun="lemur">his</a><popBold/> eyes and <pushBold/><a exist="12345678" noun="lemur">he</a><popBold/> falls over dead.
Freezing in mid-air, the <pushBold/><a exist="12345678" noun="mosquito">enormous mosquito</a><popBold/> suddenly ceases all movement and plunges lifeless to the ground.
The <pushBold/><a exist="12345678" noun="seer">Ithzir seer</a><popBold/> vainly struggles to remain standing, then falls to the ground motionless.
As <pushBold/>a <a exist="12345678" noun="master">darkly inked fetish master</a><popBold/> slumps to the ground, the darkly lined tattoos traversing <pushBold/><a exist="12345678" noun="master">its</a><popBold/> skin lose the luminescence that had seemed to radiate from them.
<pushBold/>A <a exist="12345678" noun="ape">hulking forest ape</a><popBold/> grunts and lays still, the life going out of <pushBold/><a exist="12345678" noun="ape">her</a><popBold/> warm brown eyes.
<pushBold/>A <a exist="12345678" noun="meddler">cloud sprite meddler</a><popBold/> lets out a harsh denial, the sound violent and agonizing, but <pushBold/><a exist="12345678" noun="meddler">his</a><popBold/> cry is cut off along with <pushBold/><a exist="12345678" noun="meddler">his</a><popBold/> life.
<pushBold/>A <a exist="12345678" noun="sentinel">lithe veiled sentinel</a><popBold/> lets out a ragged gasp, collapsing to one knee and looking sightlessly to the heavens. <pushBold/><a exist="12345678" noun="sentinel">He</a><popBold/> dies with a knowing smile on <pushBold/><a exist="12345678" noun="sentinel">his</a><popBold/> face.
With a final squeal the <pushBold/><a exist="12345678" noun="burgee">scaly burgee</a><popBold/> rears up her head, then falls to the floor and curls up into a ball, dead.
The <pushBold/><a exist="12345678" noun="tegu">tri-toed tegu</a><popBold/> arches her back in a tortured spasm and dies.
The <pushBold/><a exist="12345678" noun="basilisk">dark-crested basilisk</a><popBold/> rolls over on her back, emits a final hiss and dies.
The <pushBold/><a exist="12345678" noun="marauder">krolvin marauder</a><popBold/> slams to the floor, dead as a salmon bear snack.
The <pushBold/><a exist="12345678" noun="marauder">krolvin marauder</a><popBold/> collapses to the floor, dead as a pickled herring.
The <pushBold/><a exist="12345678" noun="marauder">krolvin marauder</a><popBold/> flattens out on the floor, dead as a salted flounder.
The <pushBold/><a exist="12345678" noun="marauder">krolvin marauder</a><popBold/> crashes to the floor, dead as a carp on a rock.
The <pushBold/><a exist="12345678" noun="shaman">hobgoblin shaman</a><popBold/> gasps a final prayer, then falls to the ground dead.
<pushBold/>A <a exist="12345678" noun="champion">muscular tattooed champion</a><popBold/> thrashes one last time and goes still.
<pushBold/>A <a exist="12345678" noun="champion">muscular tattooed champion</a><popBold/> spasms in death and then goes still.
<pushBold/>A <a exist="12345678" noun="champion">muscular tattooed champion</a><popBold/> moans in agony and then goes still.
<pushBold/>A <a exist="12345678" noun="champion">muscular tattooed champion</a><popBold/> dies and collapses to the floor.
<pushBold/>A <a exist="12345678" noun="champion">muscular tattooed champion</a><popBold/> staggers, then falls to the floor and dies.
The <pushBold/><a exist="12345678" noun="servant">kobold servant</a><popBold/> dies unceremoniously.
<pushBold/>The <a exist="12345678" noun="siren">siren</a><popBold/> slumps to <pushBold/><a exist="12345678" noun="siren">her</a><popBold/> side and dies.
__DEATH_CORPUS__

CONTROL_CORPUS = <<'__CONTROL_CORPUS__'.freeze
Expand Down
Loading