Crossfire Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: CF: multiple protection
On Feb 18, 7:53pm, Frank Tore Johansen wrote:
> Subject: Re: CF: multiple protection
>
> I haven't looked at this code, but I'd like to suggest increasing the
> scale on hitpoints, to enable higher variation in protection. For
> instance, if something damages you for 1 HP, and you have 50% protection,
> you still get 1 damage since you can't go below that (unless something
> changed since my time, that is). Keeping floats out of it is probably a
> very good idea, so hp should ideally be something with even more bits
> (maybe), and your hp should be this value divided by something (for
> instance 100, 1000, 256, or whatever).
I suppose this could be done - internally, multiply all hp values by some
amount when loading a map, and divide when saving. However, this creates
various complications (everything dealing with hp then needs to be adjusted to
multiply or divide a value.)
Going to floats internally would probably be easier, and not that much
costlier (most cpu's have as good or better fp performance than integer
performance, and many cpu's have different pipelines for dealing with floats
compared to ints).
Better long term solution would be keep the internal and external
represenstation the same - ie, multiply all hp and dam values by say 10. So
who cares if a character now gets 100 hp/level - its all just a number.
>
> -Frank.
> [to unsubscribe etc., send mail to crossfire-request@ifi.uio.no]
>-- End of excerpt from Frank Tore Johansen
--
-- Mark Wedel
mark@pyramid.com
[to unsubscribe etc., send mail to crossfire-request@ifi.uio.no]
References: