Ticket #1693: 0003-Possibly-correct-changes-to-borg.patch

File 0003-Possibly-correct-changes-to-borg.patch, 2.3 KB (added by daniel.santos, 7 years ago)
  • src/borg/borg1.c

    From 8124088e09ca71317eae6700c5edfca6df8a9877 Mon Sep 17 00:00:00 2001
    From: Daniel Santos <daniel.santos@pobox.com>
    Date: Mon, 15 Oct 2012 01:39:52 -0500
    Subject: [PATCH v2 3/3] Possibly correct changes to borg
    
    Hopefully, this correctly accounts for players possibly having light
    vulnerability.
    ---
     src/borg/borg1.c |    1 +
     src/borg/borg1.h |    1 +
     src/borg/borg4.c |    3 +++
     3 files changed, 5 insertions(+), 0 deletions(-)
    
    diff --git a/src/borg/borg1.c b/src/borg/borg1.c
    index 1ffa25f..938c658 100644
    a b char *prefix_pref[] = 
    236236        "_CRSEVULN",    /* Vulnerable to elec */ 
    237237        "_CRSCVULN",    /* Vulnerable to Cold */ 
    238238        "_CRSAVULN",    /* Vulnerable to Acid */ 
     239        "_CRSLVULN",    /* Vulnerable to Light */ 
    239240 
    240241/* weapon attributes */ 
    241242    "_WSANIMAL",  /* WS = weapon slays */ 
  • src/borg/borg1.h

    diff --git a/src/borg/borg1.h b/src/borg/borg1.h
    index fb6bfaa..78efad8 100644
    a b enum 
    10221022        BI_CRSEVULN, 
    10231023        BI_CRSCVULN, 
    10241024        BI_CRSAVULN, 
     1025        BI_CRSLVULN, 
    10251026    BI_WS_ANIMAL, 
    10261027    BI_WS_EVIL, 
    10271028    BI_WS_UNDEAD, 
  • src/borg/borg4.c

    diff --git a/src/borg/borg4.c b/src/borg/borg4.c
    index 12f8515..0b1074b 100644
    a b static void borg_notice_aux1(void) 
    157157        if (rf_has(f, OF_VULN_ACID)) borg_skill[BI_CRSAVULN] = TRUE; 
    158158        if (rf_has(f, OF_VULN_COLD)) borg_skill[BI_CRSCVULN] = TRUE; 
    159159        if (rf_has(f, OF_VULN_ELEC)) borg_skill[BI_CRSEVULN] = TRUE; 
     160        if (rf_has(f, OF_VULN_LIGHT)) borg_skill[BI_CRSLVULN] = TRUE; 
    160161 
    161162    /* Immunity flags */ 
    162163    if (rf_has(f, OF_IM_FIRE)) borg_skill[BI_IFIRE] = TRUE; 
    static void borg_notice_aux1(void) 
    285286                if (of_has(item->flags, OF_VULN_ACID)) borg_skill[BI_CRSAVULN] = TRUE; 
    286287                if (of_has(item->flags, OF_VULN_COLD)) borg_skill[BI_CRSCVULN] = TRUE; 
    287288                if (of_has(item->flags, OF_VULN_ELEC)) borg_skill[BI_CRSEVULN] = TRUE; 
     289                if (of_has(item->flags, OF_VULN_LIGHT)) borg_skill[BI_CRSLVULN] = TRUE; 
    288290 
    289291 
    290292        if (of_has(item->flags, OF_REGEN)) borg_skill[BI_REG] = TRUE; 
    static s32b borg_power_aux1(void) 
    45424544        if (borg_skill[BI_CRSEVULN]) value -=30000; 
    45434545        if (borg_skill[BI_CRSCVULN]) value -=30000; 
    45444546        if (borg_skill[BI_CRSAVULN]) value -=30000; 
     4547        if (borg_skill[BI_CRSLVULN]) value -=30000; 
    45454548 
    45464549 
    45474550    /*** Penalize armor weight ***/