Quick, semi-hack way of doing such:
In fight.c, function bool damage:
==================================================
    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;
    }

    if (show)
        dam_message (ch, victim, dam, dt, immune);

    if (dam == 0)
        return FALSE;

Modify this to look like:
==================================================
    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;
    }

   if (IS_AFFECTED(victim, AFF_FIRESHIELD) && dt == DAM_FIRE)
   {
       dam = 0;
       immune = TRUE;
   }

    if (show)
        dam_message (ch, victim, dam, dt, immune);

    if (dam == 0)
        return FALSE;

=======================
etc.  Above just an example.  (You'd have to make the spell, and the spell would
obviously need to set AFF_FIRESHIELD, in this example.)

----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Sunday, August 04, 2002 3:27 PM
Subject: Temporary Immunity?


> Does anyone know of a Rom snippet that would give
> Immunity to fire or cold or such for a certain amount of
> time (to a person)? If not, do you have any advice on
> how to make such a spell?
>
> --
> ROM mailing list
> [email protected]
> http://www.rom.org/cgi-bin/mailman/listinfo/rom


Reply via email to