monster & poison

This forum is for the Lua scriptable clone of DM/CSB called Dungeon Strikes Back by Sophia. Use DSB to build your own highly customised games.

Moderator: Sophia

Forum rules
Please read the Forum rules and policies before posting. You may Image to help finance the hosting costs of this forum.
Post Reply
User avatar
Joramun
Mon Master
Posts: 927
Joined: Thu May 25, 2006 7:05 pm
Location: The Universe

monster & poison

Post by Joramun »

It seems monster can't get poisoned like characters :
it appears they only take initial damage (as in DM).

I know this is to prevent an abuse (poison and retreat),
but as a character eventually gets cured over time, why not monsters ?
I'm pretty sure monster gets poisoned in Conflux, and it only adds in coherence and possible battle tactics.

I've not looked too deep into the DSB code that would have to be modified in order to implement that, so Sophia do you have any insight on the matter ?

I thought of that because i'm currently in the planning stage for a poison-attack monster that would be poison immune,
but have a lot of interaction with other monsters.
What Is Your Quest ?
User avatar
Sophia
Concise and Honest
Posts: 4307
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post by Sophia »

Hmm, the puzzle for me would be where to hook this in order to be the most generic/easy-to-use without screwing up lots of the DSB code or making something unintuitive..

The code that is executed when a des ven spell hits its target is the function poisonbolt_spell, in damage.lua. Swamp slime shots have their own code, slime_spell, but it's very similar code.

The problem, though, is that editing these functions would only affect these magical shots. If you wanted to add new poisoning attacks, or, for example, a melee weapon that poisons when it hits, directly hacking it into every function could get ugly.

There's an on_damage event associated with every monster, but, right now, it doesn't take a damage type... hmm.

This may be something worth looking more deeply into in order to allow the possibility of special status-changing attacks against monsters in general.

As for how to actually handle the poisoning, monsters can't have conditions as such, but you could probably have some sort of a "poison_controller" arch. An instance of this would be spawned in the inventory of any poisoned monster. It would send itself a message and damage its owner. When the monster died, the inst could be deleted. Just a first thought, though... there could be a simpler way...
User avatar
zoom
Grand Master
Posts: 1819
Joined: Tue Sep 23, 2003 1:27 am
Location: far away but close enough

Post by zoom »

yeah, why shouldn't monsters regenerate? Some could maybe, not all ;)
if there was regeneration for monsters, then poison could be "negative regeneration" value. Just a thought..
here some ideas, maybe it is worth a consideration of implementation?

some monsters could regenerate all the time,

some could regenerate a single damage lower than 50,
maybe effectively having its max health as a starting regeneration value, which is,
then lowered by 50 (or above, i.e the single damage over 50) ..

why? powerful weapons/strong champions would really stand out and therefore areas could get doable for the player in the first place..

ghost creatures could regenerate by damaging players only, then
check whether or not the ghost needs regeneration at its attack.
why? vampires feed on party.. thus they regenerate..
could even exceed their initial health value, possibly evolving of the creature>
monster is a small ghost < party gets hit often> small ghost evolves into big ghost>
big ghost has better drop than small ghost... some sort of crystal or so.. no idea

some monsters could regenerate at a certain event>
player leaves level, monsters max hp,
why? player flees , gets punished..

player leaves monster vicinity, slowly start regeneration of monster
why? only fair.. well, not really, but could be interesting, monster tries to flee//chase..

after a set amount of time,
...
player stops to damage monster for 3 minutes.
...more or less the same like above..

monster visits a special dungeon square (its lair)
why? monster tactics?

monster gets "healed" by monster with healing capabilities
(blue trollins have a red shaman trollin that grants regeneration to all blue trollins with
in 5 squares)
some fights would get more interesting, maybe.

2 of a kind> imagine a gelantinous cube that sticks together to heal..
could be that when you damage it , it splits into 2 and so forth..
maybe you don-t know what I mean...
501 hp... 1 damage> 250 hp 250 hp(2 creatures).. at regeneration, they form one 500hp monster again..

some creatures could have an aura, so as that they regenrate each of its kind or just
all kinds of monsters..
ok, last but not least, some monsters could regenerate magic damage or fire damage..

Chances are that this is too complicated to implement, but I can imagine some cool stuff being done with regeneration..
User avatar
Lunever
Grand Druid
Posts: 2712
Joined: Thu Feb 14, 2002 4:47 pm

Post by Lunever »

I remember how disappointed I was when I found out that monsters don't get actually poisoned in DM. I found this out before I got my hands on inside information, simply by repeatedly trying to poison monsters through portcullises and watching. One of the great advantages is that for all creatures, monsters and characters alike, largely the same universal laws apply. So why the hell not in regard to poison? Would allow some tricky puzzles by the way (poison a monster and make it run, so it will die on a certain tile and trigger a floorpad by dropping an item...).

I strongly suport the idea of having a regeneration stat for creatures that will be zero by default for the original FTL dungeons, very low by default (like 1 out of 255) for other creatures, and high for creatures like Trolls or Cthulhoo. Indeed then poison could sinmply lower that stat, odten resulting in a negative regeneration.
Parting is all we know from Heaven, and all we need of hell.
User avatar
Sophia
Concise and Honest
Posts: 4307
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post by Sophia »

zoooom wrote:Chances are that this is too complicated to implement, but I can imagine some cool stuff being done with regeneration..
Actually, not only is none of this too complicated, (almost) all of it can be done using existing mechanics already! :D

These are all special cases of regeneration, though, brought on by special events.

A more general case of regeneration would be just be a timer, and is best implemented as Lunever suggests, with a regeneration factor associated with each monster.

This, too, can already be done with the existing engine. In this case the regeneration would be implemented with an ordinary dsb_msg. I will probably want to think about specializing this and incorporating it into the monster's normal timer, though, to make it easier to use and avoid having to use a specialized msg_handler for every single monster that should have regeneration.
User avatar
Lunever
Grand Druid
Posts: 2712
Joined: Thu Feb 14, 2002 4:47 pm

Post by Lunever »

Uh, in that case - IF you do it, do it consistently, that is, monsters not only with health, but also with mana and a mana regeneration rate (of course default FTL monsters would still have infinite Mana. But a bunch of drow first throwing fireballs, then emptying there quivers before finally daring the direct assault or even employing hit and run tactics, that would be real monsters for a dungeon!)
Parting is all we know from Heaven, and all we need of hell.
User avatar
Sophia
Concise and Honest
Posts: 4307
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post by Sophia »

Ooh, monsters with mana.
I like it. :D

As is seeming to be usual for DSB, this is nothing that requires any changes to the core engine, either, though I'd imagine the Lua code in base could be made more accomodating of such changes.

In theory it's doable right now... ;)

I would likely simply implement the "mana" as an exvar associated with the monster, and have the functions that launched projectiles check whether the monster had enough.
I put mana in quotes, because I'm not sure if using an actual mana system wouldn't just complicate things, because in that case you'd have to determine the spell runes cast and how much it'd cost and whatnot. I could see an alternate approach where the monster has a certain number of "charges," of spells that can be shot. Each time it shoots a spell, it expends one, and they will regenerate over time.
User avatar
Joramun
Mon Master
Posts: 927
Joined: Thu May 25, 2006 7:05 pm
Location: The Universe

Post by Joramun »

Yeah, and let's make monsters with stamina too !
What Is Your Quest ?
User avatar
zoom
Grand Master
Posts: 1819
Joined: Tue Sep 23, 2003 1:27 am
Location: far away but close enough

Post by zoom »

uhh, now we are getting somewhere!! :twisted: :twisted:
User avatar
Sophia
Concise and Honest
Posts: 4307
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post by Sophia »

Joramund wrote:Yeah, and let's make monsters with stamina too !
I honestly can't tell if that's sarcasm or not. :lol:
User avatar
Trantor
Duke of Banville
Posts: 2467
Joined: Wed Mar 09, 2005 4:16 am
Location: Berlin, Germany
Contact:

Post by Trantor »

Well, if you do give monsters stamina, you could also give them some sort of food, like Viagra, to increase stamina. I say this opportunity to expand gameplay has to be explored.
User avatar
ian_scho
High Lord
Posts: 2807
Joined: Fri Apr 07, 2006 8:30 am
Location: Zaragoza, Spain

Post by ian_scho »

Trantor wrote:Well, if you do give monsters stamina, you could also give them some sort of food, like Viagra, to increase stamina. I say this opportunity to expand gameplay has to be explored.
Great minds think alike.... But don't necessarily finish their dungeon within the next 5 years.
User avatar
Joramun
Mon Master
Posts: 927
Joined: Thu May 25, 2006 7:05 pm
Location: The Universe

Post by Joramun »

Well, it was half sarcasm, half an idea : what if monster gets exhausted ?
You can make a monster run after you, and when it's making a break, you finish it !
Also : if monster needs to eat, they will steal food from the party...

As long as you allow new variables, the possibilities become quickly infinite !
What Is Your Quest ?
User avatar
Lunever
Grand Druid
Posts: 2712
Joined: Thu Feb 14, 2002 4:47 pm

Post by Lunever »

Dunno, stamina might be tricky. Gigglers would be out of breath before even having first contact. Don't forget that most monsters move around all the time.
Parting is all we know from Heaven, and all we need of hell.
User avatar
zoom
Grand Master
Posts: 1819
Joined: Tue Sep 23, 2003 1:27 am
Location: far away but close enough

Post by zoom »

you could argue that monsters just enter exhaustion mode when they get near party.
this could be a action related decrease / increase(attacking , moving /idleness)
and you could set an exhaustion parameter . In the swamp level, alll monsters start at
half their stamina... so you don-t care as long as the party is not near.
to make things simple , and because dsb is not yet finished it is maybe a bad idea to
discuss it.. but could be a cool feature. Imagine a spell that saps stamina off of monsters.
there you have your freeze monster spell, if you so like..

poison > maybe different poison effects could take place?
User avatar
Sophia
Concise and Honest
Posts: 4307
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post by Sophia »

On the original issue, I've added a monster_took_damage function to the base code, that is called any time a spell impacts and/or a melee attack method is carried out and a monster loses hp. This allows dungeon designers to add poisoning effects, make special impact noises when a weapon hits (like in Conflux), etc., by overriding this function.
Post Reply