Maybe I'm way off target here, but why not use the mod operator to pull
the five off.  So, first you would take the 25 / 10 = 2, then 25 % 10 =
5.  You know that the 2 stands for 2 full updates (1 sec), just add a
line or two that would interpret the 5 appropriately (to 1/2 sec which
is equal to one update).  

So, I think something like this should work: (25 / 10) + ((25 % 10) / 5)

The only thing I see is if you wanted to round things out more, so if
someone had a 23, they would still get an update every 1.5 seconds, and
22 would get the next stage of update.

Now that I look a little closer, it appears that a lower number would
give you a slower update time, but using the numbers involved, I'm not
sure how that would work.  For example, a 25 would give an update every
1.5 seconds, but what would a 20 give?  According to what you were
saying, it seems like it would get an update every second, and getting
more attacks for a lower dex seems counter-intuitive.

Boh-Ahz



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dale
Kingston
Sent: Sunday, July 13, 2003 4:43 PM
To: [email protected]
Subject: Combat system implementation help

Ok I'm working on doing a new combat system for my mud.. And I'm trying
to
plan it out before I just start coding it. But I run into a small
implementation problem that I was hoping maybe someone had some insight
on
how I could do it. So let me explain it a bit:



I wanted to have a fight update. Probably have it run twice a second so
ever
2 pulses. Now to figure how often a person would update or hit I was
figuring it like this. I want to take there Dexterity * 4 giving me a 4
-
100 number. Then Each class will have like a modifier so lets say an
assassins is 4. So it would divide that 4 - 100 number by the class
modifier. So ((dex * 4) /  class_mod) So lets say an assassin had 25 dex
and
there mod is 4 so that would return 25. Now I would like that to work
like
this but IDK how to do it. Would like to divide that 25 by 10 so I get
2.5.
And I would like that 2.5 to mean 2 and 1/2  updates. Meaning they would
run
through the update once ever 1 and 1/2 seconds. My problem is how would
I
get that 5 to mean 1/2? Of second? And how would I grab that .5 away
from
the 2.5 so I could use it? Any ideas or suggestions would be a great
help.


-- 
ROM mailing list
[email protected]
http://www.rom.org/cgi-bin/mailman/listinfo/rom


Reply via email to