anyone interested in collaborating? I was thinking that it should not
be that hard.... for some reason is it not playing nicely. It is a huge
complaint that elves can use iron armour when it says they are allergic
to it.
in fight.c it checks damtype
switch (check_immune(victim, dam_type))
{
case (IS_IMMUNE):
immune = TRUE;
dam = 0;
break;
case (IS_RESISTANT):
dam -= dam / 3;
break;
case (IS_VULNERABLE):
dam += dam / 2;
break;
}
should be able to add this.
switch (check_immune_material(victim, wield))
{
case (IS_IMMUNE):
immune = TRUE;
dam = 0;
break;
case (IS_RESISTANT):
dam -= dam / 3;
break;
case (IS_VULNERABLE):
dam += dam / 2;
break;
}
in handler.c there is the immunity check. Which honestly,
I am totally lost in since I am new. I did not paste it because it
would be huge.
But here is the snippet I am working on for materials. And I crash
hard. I get lost quickly with pointers. it is very much like the
check_immune function, but is slightly different It bombs really
badly, and I have no idea even where to look. It would be nice to
post as a snippet. Should only have to check things in two places,
do_wear and in fight.c
int check_immune_material(CHAR_DATA * ch, OBJ_DATA * wield)
{
int immune, def;
int bit;
immune = -1;
def = IS_NORMAL;
if (str_cmp(wield->material, "iron"))
bit = IMM_IRON;
else if (str_cmp(wield->material, "silver"))
bit = IMM_SILVER;
else if (str_cmp(wield->material, "wood"))
bit = IMM_WOOD;
else
return def;
if (IS_SET(ch->imm_flags, bit))
immune = IS_IMMUNE;
else if (IS_SET(ch->res_flags, bit) && immune != IS_IMMUNE)
immune = IS_RESISTANT;
else if (IS_SET(ch->vuln_flags, bit))
{
if (immune == IS_IMMUNE)
immune = IS_RESISTANT;
else if (immune == IS_RESISTANT)
immune = IS_NORMAL;
else
immune = IS_VULNERABLE;
}
if (immune == -1)
return def;
else
return immune;
}
---------- Original Message ----------------------------------
From: Tom Whiting <[EMAIL PROTECTED]>
Date: Sun, 30 Nov 2003 13:12:33 -0600
>> Right now we successfully check for immunity for damtypes with
>> check_immune(victim, dam_type) but does anyone have any for
>> check_immune_material(victim, material_type)?
>
>In rom, material is pretty much not used, so there being a material "immunity"
> is
>pretty much unlikely at best. Material could be used easily, but, like I said,
>for
>the most part, it's not.
>---------
>http://www.hosting-talk.com :Hosting Talk Forums - Hosting discussion.
>http://www.linux-tech.net: Quality, affordable Linux Systems Administration
>http://www.mudservers.net : Mud hosting from $10 a month
>
>
>
>
>
>
>--
>ROM mailing list
>[email protected]
>http://www.rom.org/cgi-bin/mailman/listinfo/rom
>