Crossfire Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: saving throw and multiple attacktypes



On Mar 6,  1:16pm, KAWAMOTO Yosihisa wrote:
> > > 1. Is this a specification or just bug of multiple attacktypes?
> >
> >  I personally think it is a bug - if you have something that attacks with
fear
> > and weaponmagic, that should work by doing both damage and possibly causing
> > fear.
>
> If this is a bug, how about following modification?  Is it
> necessary to take account of AT_MAGIC?
>
> --- attack.c-	Tue Jan  2 20:58:39 1996
> +++ attack.c	Wed Mar  6 12:42:46 1996
> @@ -511,7 +511,8 @@
>         /*  the following includes a secret saving throw for magic:
>  	   you get TWO saving throws for magical attacks! */
>         (RANDOM()%20+((op->protected&type)?5:1) >= savethrow[op->level]))
> -      return 0;
> +      type &=~(AT_PARALYZE|AT_FEAR|AT_POISON|AT_CONFUSION|AT_SLOW|
> +        AT_CANCELLATION|AT_DEPLETE);
>
>    CLEAR_FLAG(op,FLAG_SCARED); /* Or the monster won't hit back */
>    if(get_owner(hitter))
>
 I looked at the code a bit last night.  The problem won't happen with physical
atack types (it will do a special attack.)

 I don't think that patch will do the right thing - while you will still do
damage, it will prevent monsters from being feared/slowed/etc.

 While digging through this, it seems like a good rewrite of the related code
would be in order - this would eliminate all the multiple attack type
situations.

 The basic idea would be to attack the creature with each attacktype
individually (this may not work with AT_MAGIC).  Some examples:

PHYSICAL		-just attacks them physically.
PHSYICAL & FIRE		-attack them physical, then attack them with fire
FIRE & FEAR		-attack with fire,then fear.

 Thus, a monster immune to some type can still be hit if your weapon has other
types.

 So what to do with damage?  I see three possibilities:

1) Damage for all the attacks is averaged - thus if you weapon has 4 attack
types, but only 2 of them can affect the creature, you effectively do half
damage.  This is a pretty good weapon - actually means that weapons with a lot
of attack types isn't necessarily what you want.

2) Take the highest damage value.  This makes multiple attacktype weapons more
powerful.

3) Sum all the damage values - this would be outrageous.

 attacktype magic should probably be handled as a special case - if the attack
has magic, and the creature is immune, then all related attack types are
negated (fire, fear, slow, etc - attacks that are magic in idea.)  This is only
really needed to mimmick existing code.  If Option #1 is taken above, this may
not be needed quite so badly (something that does AT_FIRE | AT_MAGIC would at
most do half damage then..)

 The next idea would then be this - should all attack types actually be able do
do damage?  Should you be able to kill someone if all your weapon has is attack
type fear?  OR should some set of attack types only have various effects but
not damage (slow, fear, paralyze, etc.)

 Thoughts/comments on these ideas?


-- 
 --Mark