Go back to previous topic
Forum Name Gameplay
Topic subjectIntoxicate & drunkenness generally
Topic URLhttps://forums.carrionfields.com/dcboard.php?az=show_topic&forum=6&topic_id=39202
39202, Intoxicate & drunkenness generally
Posted by Isildur on Wed 31-Dec-69 07:00 PM
What are the effects of "intoxicate" and, generally, being drunk, in the case of a non-bard?

Does it make you vuln to anything? Mental maybe? Or resistant? Does it degrade your fighting ability in some way other than simple stat loss? Does it make you cast spells at a lower level or have a higher chance of losing concentration? Something else I haven't even thought of?
39237, I found the code for "drunk" in Rom 2.4 awhile ago
Posted by BaronMySoul on Wed 31-Dec-69 07:00 PM
if (dam > 1 && !IS_NPC(victim) && victim->pcdata->condition > 10)
dam = 9 * dam / 10;


So, if you would get hit for 10 damage, your received damage would then be:
9 * (10)/10 = 9

So, the original unedited code* had you receiving 10% less damage if you were drunk. I'd reckon that the basic MUD fighting mechanics are pretty close to intact, though (if it ain't broke, don't fix it).


* keep in mind that CF is ROM 2.3 codebase and has been modified over the last 16 years

//EDIT NOTE// Actually, I think it's dam redux, not dam output, based on the code directly after drunk -
if ( dam > 1 && IS_AFFECTED(victim, AFF_SANCTUARY) )
dam /= 2;
39238, RE: I found the code for
Posted by Daevryn on Wed 31-Dec-69 07:00 PM
I'm pretty sure we don't have that.
39241, Sure? Look in your fight.c file
Posted by BaronMySoul on Wed 31-Dec-69 07:00 PM
Of course, the versions could be totally different. I can't find ROM 2.3 anywhere.

I found it within this statement:

/*
* Inflict damage from a hit.
*/
bool damage(CHAR_DATA *ch,CHAR_DATA *victim,int dam,int dt,int dam_type,
bool show)



....


Then notated as:


/*
* Damage modifiers.
*/

if ( dam > 1 && !IS_NPC(victim)
&& victim->pcdata->condition > 10 )
dam = 9 * dam / 10;

if ( dam > 1 && IS_AFFECTED(victim, AFF_SANCTUARY) )
dam /= 2;

if ( dam > 1 && ((IS_AFFECTED(victim, AFF_PROTECT_EVIL) && IS_EVIL(ch) )
|| (IS_AFFECTED(victim, AFF_PROTECT_GOOD) && IS_GOOD(ch) )))
dam -= dam / 4;

immune = FALSE;
39242, RE: Sure? Look in your fight.c file
Posted by Daevryn on Wed 31-Dec-69 07:00 PM
I'm pretty positive that none of those exact lines of code exist in ours.

There's a pretty big gulf from 2.3 to 2.4, and a lot of deficiencies in 2.3 that we solved that 2.4 also solved, but in fairly different ways.
39264, Dang... I have *got* to find that codebase...
Posted by BaronMySoul on Wed 31-Dec-69 07:00 PM
Because... well, I like to know how things work.
39266, RE: Dang... I have *got* to find that codebase...
Posted by Zulghinlour on Wed 31-Dec-69 07:00 PM
>Because... well, I like to know how things work.

Even if you found stock ROM 2.3, it'd be nothing like what is in CF after 15+ years of changes.
39267, Then you wouldn't still call it a ROM 2.3 :)
Posted by BaronMySoul on Wed 31-Dec-69 07:00 PM
Even heavily modified, you're not going to change everything - especially a lot of the core workings of the MUD. But, yeah... thanks for the info.
39268, RE: Then you wouldn't still call it a ROM 2.3 :)
Posted by Daevryn on Wed 31-Dec-69 07:00 PM
I wouldn't say everything, but close to it. What survives is more the very high level architectural decisions than anything else.

You would be amazed at what people can find reasons to rewrite over 17 years, when you factor in that CF has had probably a couple dozen coders with different ideas of what's interesting or important, and when you factor in the changes in hardware over the years.

(Example: the command parser was gutted and completely replaced at one point in the mid-90s because at the time it was becoming a performance bottleneck. With today's hardware I doubt that'd ever have happened.)

Not that any of that diminishes the huge debt of ideas that CF still owes to the DIKU/ROM folks.
39273, RE: Then you wouldn't still call it a ROM 2.3 :)
Posted by Isildur on Wed 31-Dec-69 07:00 PM
That was all pretty exhilarating, but...uh...what's "drunk" do?
39276, I love when you tech boys talk nerdy to me
Posted by BaronMySoul on Wed 31-Dec-69 07:00 PM
I don't suppose any of y'all have the original, untouched 2.3, do you? I'd still like it.
39269, It is still a derivation of ROM 2.3
Posted by Zulghinlour on Wed 31-Dec-69 07:00 PM
>Even heavily modified, you're not going to change everything
>- especially a lot of the core workings of the MUD. But,
>yeah... thanks for the info.

There has been a lot of the core that has been changed, and some of the core that hasn't been touched. At the end of the day it is still a derivation of ROM 2.3, and we stood on the shoulders of those who built ROM 2.3. So yes...we would still call it based on ROM 2.3 no matter how far we have deviated from their codebase.
39216, Makes you vuln_STD.~
Posted by Homard on Wed 31-Dec-69 07:00 PM
n/t