LCOV - code coverage report
Current view: top level - omega-rpg-0.90-pa9 - itemf2.c (source / functions) Hit Total Coverage
Test: lcov.info Lines: 3 320 0.9 %
Date: 2017-09-08 22:00:26 Functions: 1 35 2.9 %
Branches: 0 164 0.0 %

           Branch data     Line data    Source code
       1                 :            : /* omega copyright (C) 1987,1988,1989 by Laurence Raphael Brothers */
       2                 :            : /* itemf2.c */
       3                 :            : 
       4                 :            : /* mostly ring, armor, and weapon functions */
       5                 :            : 
       6                 :            : #include "glob.h"
       7                 :            : 
       8                 :            : 
       9                 :            : 
      10                 :            : 
      11                 :            : /* ring functions */
      12                 :          0 : void i_perm_knowledge(pob o)
      13                 :            : {
      14         [ #  # ]:          0 :   if (o->known < 1)
      15                 :          0 :     o->known = 1;
      16         [ #  # ]:          0 :   if (o->blessing > -1)
      17                 :          0 :     Objects[o->id].known = 1;
      18                 :            : /* DAG hack for mirror of self-knowledge
      19                 :            :   if (o->used)
      20                 :            :     knowledge(o->blessing);
      21                 :            : */
      22                 :          0 :   knowledge(o->blessing);
      23                 :          0 : }
      24                 :            : 
      25                 :          0 : void i_perm_strength(pob o)
      26                 :            : {
      27         [ #  # ]:          0 :   if (o->known < 1) o->known = 1;
      28                 :          0 :   Objects[o->id].known = 1;
      29         [ #  # ]:          0 :   if (o->used){
      30         [ #  # ]:          0 :     if (o->blessing > -1)
      31                 :          0 :       Player.str += abs(o->plus)+1;
      32                 :            :     else
      33                 :          0 :       Player.str -= abs(o->plus)+1;
      34                 :            :   }
      35                 :            :   else {
      36         [ #  # ]:          0 :     if (o->blessing > -1)
      37                 :          0 :       Player.str -= abs(o->plus)+1;
      38                 :            :     else
      39                 :          0 :       Player.str += abs(o->plus)+1;
      40                 :            :   }
      41                 :          0 :   calc_melee();
      42                 :          0 : }
      43                 :            : 
      44                 :            : 
      45                 :            : 
      46                 :          0 : void i_perm_burden(pob o)
      47                 :            : {
      48                 :            :   int i;
      49                 :            :   
      50         [ #  # ]:          0 :   if (o->used) {
      51                 :          0 :     o->weight = 1000;
      52                 :          0 :     mprint("You feel heavier.");
      53                 :            :   }
      54                 :            :   else {
      55                 :          0 :     o->weight = 1;
      56                 :          0 :     mprint("Phew. What a relief.");
      57                 :            :   }
      58                 :          0 :   Player.itemweight = 0;
      59         [ #  # ]:          0 :   for (i=0;i<MAXITEMS;i++) {
      60         [ #  # ]:          0 :     if (Player.possessions[i] != NULL)
      61                 :          0 :       Player.itemweight += 
      62                 :          0 :         (Player.possessions[i]->weight*Player.possessions[i]->number);
      63                 :            :   }
      64                 :          0 : }
      65                 :            : 
      66                 :          0 : void i_perm_gaze_immune(pob o)
      67                 :            : {
      68         [ #  # ]:          0 :   if (o->used) Player.immunity[GAZE]++;
      69                 :          0 :   else Player.immunity[GAZE]--;
      70                 :          0 : }
      71                 :            : 
      72                 :          0 : void i_perm_fire_resist(pob o)
      73                 :            : {
      74         [ #  # ]:          0 :   if (o->used) Player.immunity[FLAME]++;
      75                 :          0 :   else Player.immunity[FLAME]--;
      76                 :          0 : }
      77                 :            : 
      78                 :          0 : void i_perm_poison_resist(pob o)
      79                 :            : {
      80         [ #  # ]:          0 :   if (o->used) {
      81         [ #  # ]:          0 :     if (o->blessing < 0) {
      82                 :          0 :       Player.immunity[POISON] = 0;
      83                 :          0 :       p_poison(100);
      84                 :            :     }
      85                 :            :     else {
      86                 :          0 :       Player.immunity[POISON]++;
      87         [ #  # ]:          0 :       if (Player.status[POISONED] > 0) {
      88                 :          0 :         mprint("You feel much better now.");
      89                 :          0 :         Player.status[POISONED] = 0;
      90                 :            :       }
      91                 :            :     }
      92                 :            :   }
      93                 :            :   else {
      94                 :          0 :     Player.status[POISONED] = 0;
      95                 :          0 :     Player.immunity[POISON]--;
      96                 :            :   }
      97                 :          0 : }
      98                 :            : 
      99                 :            : 
     100                 :            : 
     101                 :          0 : void i_perm_regenerate(pob o)
     102                 :            : {
     103         [ #  # ]:          0 :   if (o->known < 1)  o->known = 1;
     104         [ #  # ]:          0 :   if (o->blessing > -1)
     105                 :          0 :     Objects[o->id].known = 1;
     106         [ #  # ]:          0 :   if (o->used) {
     107                 :          0 :     mprint("You seem abnormally healthy.");
     108                 :          0 :     Player.status[REGENERATING] += 1500;
     109                 :            :   }
     110                 :            :   else {
     111                 :          0 :     Player.status[REGENERATING] -= 1500;
     112         [ #  # ]:          0 :     if (Player.status[REGENERATING] < 1) {
     113                 :          0 :       mprint("Your vitality is back to normal");
     114                 :          0 :       Player.status[REGENERATING] = 0;
     115                 :            :     }
     116                 :            :   }
     117                 :          0 : }
     118                 :            : 
     119                 :            : 
     120                 :            : /* armor functions */
     121                 :            : 
     122                 :            : 
     123                 :          0 : void i_normal_armor(pob o)
     124                 :            : {
     125         [ #  # ]:          0 :   if (o->used) mprint("You put on your suit of armor.");
     126                 :          0 : }
     127                 :            : 
     128                 :          0 : void i_perm_energy_resist(pob o)
     129                 :            : {
     130         [ #  # ]:          0 :   if (o->used){
     131                 :          0 :     Player.immunity[FLAME]++;
     132                 :          0 :     Player.immunity[COLD]++;
     133                 :          0 :     Player.immunity[ELECTRICITY]++;
     134                 :            :   }
     135                 :            :   else {
     136                 :          0 :     Player.immunity[FLAME]--;
     137                 :          0 :     Player.immunity[COLD]--;
     138                 :          0 :     Player.immunity[ELECTRICITY]--;
     139                 :            :   }
     140                 :          0 : }
     141                 :            : 
     142                 :            : 
     143                 :            : 
     144                 :          0 : void i_perm_fear_resist(pob o)
     145                 :            : {
     146         [ #  # ]:          0 :   if (o->used){
     147                 :          0 :     Player.immunity[FEAR]++;
     148         [ #  # ]:          0 :     if (o->blessing < 0) {
     149                 :          0 :       Player.status[BERSERK] += 1500;
     150                 :          0 :       mprint("You feel blood-simple!");
     151                 :            :     }
     152                 :            :   }
     153                 :            :   else {
     154                 :          0 :     Player.immunity[FEAR]--;
     155         [ #  # ]:          0 :     if (o->blessing < 0) {
     156                 :          0 :       Player.status[BERSERK] -= 1500;
     157         [ #  # ]:          0 :       if (Player.status[BERSERK] < 1) {
     158                 :          0 :         mprint("You feel less rabid now.");
     159                 :          0 :       Player.status[BERSERK] = 0;
     160                 :            :       }
     161                 :            :     }
     162                 :            :   }
     163                 :          0 : }    
     164                 :            : 
     165                 :            : 
     166                 :            : 
     167                 :          0 : void i_perm_breathing(pob o)
     168                 :            : {
     169         [ #  # ]:          0 :   if (o->known < 1)  o->known = 1;
     170         [ #  # ]:          0 :   if (o->blessing > -1)
     171                 :          0 :     Objects[o->id].known = 1;
     172                 :            : 
     173         [ #  # ]:          0 :   if (o->blessing > -1) {
     174         [ #  # ]:          0 :     if (o->used) {
     175                 :          0 :       mprint("Your breath is energized!");
     176                 :          0 :       Player.status[BREATHING] += 1500;
     177                 :            :     }
     178                 :            :     else  {
     179                 :          0 :       Player.status[BREATHING] -= 1500;
     180         [ #  # ]:          0 :       if (Player.status[BREATHING] < 1) {
     181                 :          0 :         mprint("Your breathing is back to normal.");
     182                 :          0 :         Player.status[BREATHING] = 0;
     183                 :            :       }
     184                 :            :     }
     185                 :            :   }
     186         [ #  # ]:          0 :   else if (o->used) {
     187                 :          0 :     Player.status[BREATHING] = 0;
     188                 :          0 :     p_drown();
     189                 :          0 :     print1("Water pours from the broken suit.");
     190                 :            :   }
     191                 :          0 : }
     192                 :            : 
     193                 :            : 
     194                 :            : 
     195                 :            : /* weapons functions */
     196                 :            : 
     197                 :          0 : void weapon_acidwhip(int dmgmod, pob o, pmt m)
     198                 :            : {
     199 [ #  # ][ #  # ]:          0 :   if ((random_range(2) == 1) && (! m_immunityp(m,NORMAL_DAMAGE))) {
     200                 :          0 :     mprint("You entangle the monster!");
     201                 :          0 :     m_status_reset(m,MOBILE);
     202                 :            :   }
     203                 :          0 :   p_hit(m,Player.dmg+dmgmod,ACID);
     204                 :            : 
     205                 :          0 : }
     206                 :            : 
     207                 :          0 : void weapon_scythe(int dmgmod, pob o, pmt m)
     208                 :            : {
     209                 :          0 :   mprint("Slice!");
     210                 :          0 :   m_death(m);
     211         [ #  # ]:          0 :   if (! Player.rank[ADEPT]) {
     212                 :          0 :     mprint("Ooops!");
     213                 :          0 :     mprint("You accidentally touch yourself on the backswing....");
     214                 :          0 :     p_death("the Scythe of Death");
     215                 :            :   }
     216                 :          0 : }
     217                 :            : 
     218                 :          0 : void weapon_demonblade(int dmgmod, pob o, pmt m)
     219                 :            : { 
     220         [ #  # ]:          0 :   if (o->blessing > -1) {
     221                 :          0 :     mprint("Demonblade disintegrates with a soft sigh.");
     222                 :          0 :     mprint("You stop foaming at the mouth.");
     223                 :          0 :     Player.status[BERSERK] = 0;
     224                 :          0 :     conform_lost_object(o);
     225                 :            :   }
     226         [ #  # ]:          0 :   else if (m->specialf == M_SP_DEMON) {
     227                 :          0 :     mprint("The demon flees in terror before your weapon!");
     228                 :          0 :     m_vanish(m);
     229                 :            :   }
     230         [ #  # ]:          0 :   else if (m->meleef != M_MELEE_SPIRIT) {
     231         [ #  # ]:          0 :     if (m->level > random_range(10)) {
     232         [ #  # ]:          0 :       if( Player.hp < Player.maxhp )
     233                 :          0 :         Player.hp = min(Player.maxhp,Player.hp+m->hp);
     234                 :          0 :       Player.str++;
     235         [ #  # ]:          0 :       if( Player.pow < Player.maxpow )
     236                 :          0 :         Player.pow = min(Player.maxpow,Player.pow+m->level);
     237                 :          0 :       m_death(m);
     238                 :          0 :       mprint("You feel a surge of raw power from Demonblade!");
     239                 :            :     }
     240                 :          0 :     else p_hit(m,Player.dmg+dmgmod,NORMAL_DAMAGE);
     241                 :            : 
     242                 :            :   }
     243                 :            :   else {
     244                 :          0 :     mprint("Demonblade howls as it strikes the spirit!");
     245         [ #  # ]:          0 :     if (random_range(10) == 1) {
     246                 :          0 :       mprint("... and shatters into a thousand lost fragments!");
     247                 :          0 :       morewait();
     248                 :          0 :       p_damage(50,UNSTOPPABLE,"Demonblade exploding");
     249                 :          0 :       conform_lost_object(o);
     250                 :            :     }
     251                 :            :     else {
     252                 :          0 :       mprint("You feel your lifeforce draining....");
     253                 :          0 :       p_damage(25,UNSTOPPABLE,"a backlash of negative energies");
     254                 :          0 :       Player.str -= 3;
     255                 :          0 :       Player.con -= 3;
     256 [ #  # ][ #  # ]:          0 :       if (Player.str < 1 || Player.con < 1)
     257                 :          0 :         p_death("a backlash of negative energies");
     258                 :            :     }
     259                 :            :   }
     260                 :          0 : }
     261                 :            : 
     262                 :          0 : void weapon_lightsabre(int dmgmod, pob o, pmt m)
     263                 :            : {
     264         [ #  # ]:          0 :   if (! o->known) {
     265                 :          0 :     mprint("Fumbling with the cylinder, you press the wrong stud....");
     266                 :          0 :     p_damage(100,UNSTOPPABLE,"fumbling with a lightsabre");
     267                 :          0 :     o->known = 1;
     268                 :            :   }
     269                 :            :   else {
     270                 :            :     /* test prevents confusing immunity messages.... */
     271         [ #  # ]:          0 :     if (! m_immunityp(m,NORMAL_DAMAGE)) {
     272                 :          0 :       mprint("Vzzzzmmm!");
     273                 :          0 :       m_damage(m,20,NORMAL_DAMAGE);
     274                 :            :     }
     275 [ #  # ][ #  # ]:          0 :     if ((m->hp>0) && (! m_immunityp(m,FLAME))) {
     276                 :          0 :       mprint("Zzzzap!");
     277                 :          0 :       m_damage(m,20,FLAME);
     278                 :            :     }
     279                 :            :   }
     280                 :          0 : }
     281                 :            : 
     282                 :          0 : void weapon_tangle(int dmgmod, pob o, pmt m)
     283                 :            : {
     284 [ #  # ][ #  # ]:          0 :   if ((random_range(2) == 1) && (! m_immunityp(m,NORMAL_DAMAGE))) {
     285                 :          0 :     mprint("You entangle the monster!");
     286                 :          0 :     m_status_reset(m,MOBILE);
     287                 :            :   }
     288                 :          0 :   p_hit(m,Player.dmg+dmgmod,NORMAL_DAMAGE);
     289                 :          0 : }
     290                 :            : 
     291                 :            : /* if wielding a bow, add bow damage to arrow damage */
     292                 :          0 : void weapon_arrow(int dmgmod, pob o, pmt m)
     293                 :            : {
     294 [ #  # ][ #  # ]:          0 :   if ((Player.possessions[O_WEAPON_HAND] != NULL) &&
     295                 :          0 :       (Player.possessions[O_WEAPON_HAND]->id == OB_LONGBOW)) /* ie, using a bow */
     296                 :          0 :     p_hit(m,Player.dmg+o->plus+o->dmg+dmgmod,NORMAL_DAMAGE);
     297                 :          0 :   else p_hit(m,o->plus+o->dmg+dmgmod,NORMAL_DAMAGE);
     298                 :          0 : }
     299                 :            : 
     300                 :            : /* if wielding a crossbow, add bow damage to arrow damage */
     301                 :          0 : void weapon_bolt(int dmgmod, pob o, pmt m)
     302                 :            : {
     303 [ #  # ][ #  # ]:          0 :   if ((Player.possessions[O_WEAPON_HAND] != NULL) &&
     304         [ #  # ]:          0 :       (Player.possessions[O_WEAPON_HAND]->id == OB_CROSSBOW) && /*ie using a crossbow */
     305                 :          0 :       (Player.possessions[O_WEAPON_HAND]->aux==LOADED)) {
     306                 :          0 :         p_hit(m,Player.dmg+o->plus+o->dmg+dmgmod,NORMAL_DAMAGE);
     307                 :          0 :         Player.possessions[O_WEAPON_HAND]->aux = UNLOADED;
     308                 :            :       }
     309                 :          0 :   else p_hit(m,o->plus+o->dmg,NORMAL_DAMAGE);
     310                 :          0 : }
     311                 :            : 
     312                 :            : 
     313                 :          0 : void weapon_mace_disrupt(int dmgmod, pob o, pmt m)
     314                 :            : {
     315         [ #  # ]:          0 :   if (m->meleef == M_MELEE_SPIRIT) {
     316                 :          0 :     mprint("The monster crumbles away to dust!");
     317                 :          0 :     m_death(m);
     318                 :            :   }
     319                 :          0 :   else p_hit(m,Player.dmg+dmgmod,UNSTOPPABLE);
     320                 :          0 : }
     321                 :            : 
     322                 :          6 : void weapon_normal_hit(int dmgmod, pob o, pmt m)
     323                 :            : {
     324                 :          6 :   p_hit(m,Player.dmg+dmgmod,NORMAL_DAMAGE);
     325                 :          6 : }
     326                 :            : 
     327                 :            : 
     328                 :            : /* will be updated eventually */
     329                 :          0 : void weapon_bare_hands(int dmgmod, pmt m)
     330                 :            : {
     331                 :            : 
     332                 :          0 :   p_hit(m,Player.dmg+dmgmod,NORMAL_DAMAGE);
     333                 :          0 : }
     334                 :            : 
     335                 :            : 
     336                 :          0 : void i_demonblade(pob o)
     337                 :            : {
     338         [ #  # ]:          0 :   if (o->used) {
     339                 :          0 :     o->known = 2;
     340                 :          0 :     mprint("Demonblade's fangs open and bury themselves in your wrist!");
     341                 :          0 :     mprint("You hear evil laughter in the distance....");
     342                 :          0 :     mprint("You begin to foam at the mouth!");
     343                 :          0 :     Player.status[BERSERK] = 1500;
     344                 :            :   }
     345                 :            :   else {
     346                 :          0 :     mprint("You hear a sound like a demon cursing.");
     347                 :          0 :     mprint("You feel less like biting your shield.");
     348                 :          0 :     Player.status[BERSERK] = 0;
     349                 :            :   }
     350                 :          0 : }
     351                 :            : 
     352                 :          0 : void i_normal_weapon(pob o)
     353                 :            : {
     354         [ #  # ]:          0 :   if (o->used) mprint("You ready your weapon for battle.");
     355                 :          0 : }
     356                 :            : 
     357                 :          0 : void i_lightsabre(pob o)
     358                 :            : {
     359         [ #  # ]:          0 :   if (o->used) mprint("You feel one with the Force.");
     360                 :          0 :   else mprint("You feel out of touch with the Force.");
     361                 :          0 : }
     362                 :            : 
     363                 :          0 : void i_mace_disrupt(pob o)
     364                 :            : {
     365                 :          0 :   mprint("That's a damned heavy mace!");
     366                 :          0 : }
     367                 :            : 
     368                 :            : 
     369                 :          0 : void weapon_vorpal(int dmgmod, pob o, pmt m)
     370                 :            : {
     371 [ #  # ][ #  # ]:          0 :   if ((random_range(10) < 3) && (! m_immunityp(m,NORMAL_DAMAGE))) {
     372                 :          0 :     o->known = 2;
     373         [ #  # ]:          0 :     if (random_range(2) == 1)
     374                 :          0 :       mprint("One Two! One Two! And through and through!");
     375                 :          0 :     else mprint("Your vorpal blade goes snicker-snack!");
     376                 :          0 :     m_death(m);
     377                 :            :   }
     378                 :          0 :   else weapon_normal_hit(dmgmod,o,m);
     379                 :          0 : }
     380                 :            : 
     381                 :          0 : void weapon_desecrate(int dmgmod, pob o, pmt m)
     382                 :            : {
     383                 :          0 :   o->known = 2;
     384         [ #  # ]:          0 :   if (Player.alignment < 0) {
     385                 :          0 :     mprint("Your opponent screams in agony!");
     386                 :          0 :     p_hit(m,Player.dmg+dmgmod,UNSTOPPABLE);
     387                 :          0 :     Player.alignment--;
     388         [ #  # ]:          0 :     if (Player.hp < Player.maxhp) {
     389                 :          0 :       mprint("You feel a thrill of power surging up your blade!");
     390                 :          0 :       Player.hp = min(Player.maxhp,Player.hp+Player.dmg+dmgmod);
     391                 :            :     }
     392                 :            :   }
     393                 :            :   else {
     394                 :          0 :     mprint("Your blade turns in your hands and hits you!");
     395                 :          0 :     mprint("You hear evil laughter....");
     396                 :          0 :     level_drain(Player.dmg,"the sword Desecrator");
     397                 :          0 :     Player.alignment-=10;
     398                 :          0 :     mprint("A strange force spreads from the wound throughout your body...");
     399                 :          0 :     mprint("You feel much more chaotic now.");
     400                 :            :   }
     401                 :          0 : }
     402                 :            : 
     403                 :            : 
     404                 :          0 : void weapon_firestar(int dmgmod, pob o, pmt m)
     405                 :            : {
     406         [ #  # ]:          0 :   if (random_range(3) == 1) {
     407                 :          0 :     o->known = 2;
     408                 :          0 :     fball(Player.x,Player.y,Player.x,Player.y,max(Player.dmg,25));
     409                 :            :   }
     410         [ #  # ]:          0 :   if (m->hp > 0) weapon_normal_hit(dmgmod,o,m);
     411                 :          0 : }
     412                 :            : 
     413                 :          0 : void weapon_defend(int dmgmod, pob o, pmt m)
     414                 :            : {
     415 [ #  # ][ #  # ]:          0 :   if ((Player.alignment < 0) && (o->blessing > 0)) {
     416                 :          0 :       mprint("The Holy Defender screams in your hands....");
     417                 :          0 :       mprint("You stagger before the sound of its rage....");
     418                 :          0 :       p_damage(50,UNSTOPPABLE,"a pissed-off Holy Defender");
     419                 :          0 :       mprint("The weapon finally quiets. It seems less holy now.");
     420                 :          0 :       o->truename = o->cursestr;
     421                 :          0 :       Player.status[PROTECTION] -= (o->hit);
     422                 :          0 :       o->plus = 0-abs(o->plus);
     423                 :          0 :       o->blessing = -1;
     424                 :            :     }
     425 [ #  # ][ #  # ]:          0 :   if ((o->blessing > 0) &&
     426         [ #  # ]:          0 :       ((m->specialf == M_SP_DEMON) ||
     427                 :          0 :        (m->meleef == M_MELEE_SPIRIT))) {
     428                 :          0 :     mprint("Your opponent shies back before your holy weapon!");
     429                 :          0 :     m->hit = 0;
     430                 :          0 :     m->speed *=2;
     431                 :            :   }
     432                 :          0 :   weapon_normal_hit(dmgmod,o,m);
     433                 :          0 : }
     434                 :            : 
     435                 :          0 : void weapon_victrix(int dmgmod, pob o, pmt m)
     436                 :            : {
     437         [ #  # ]:          0 :   if (m->meleef == M_MELEE_SPIRIT) {
     438                 :          0 :     mprint("Your opponent dissipates in a harmless cloud of vapors...");
     439                 :          0 :     m_death(m);
     440                 :            :   }
     441                 :          0 :   else weapon_normal_hit(dmgmod,o,m);
     442                 :          0 : }
     443                 :            : 
     444                 :          0 : void i_defend(pob o)
     445                 :            : {
     446                 :          0 :   o->known = 2;
     447         [ #  # ]:          0 :   if (o->used) {
     448                 :          0 :     mprint("You feel under an aegis!");
     449                 :          0 :     Player.status[PROTECTION] += o->hit;
     450                 :            :   }
     451                 :          0 :   else Player.status[PROTECTION] -= o->hit;
     452                 :          0 : }
     453                 :            : 
     454                 :            : 
     455                 :          0 : void i_victrix(pob o)
     456                 :            : {
     457                 :          0 :   o->known = 2;
     458                 :          0 :   o->blessing = abs(o->blessing);
     459         [ #  # ]:          0 :   if (o->used) {
     460                 :          0 :     Player.immunity[POISON]++;
     461                 :          0 :     Player.immunity[FEAR]++;
     462                 :          0 :     Player.immunity[INFECTION]++;
     463                 :            :   }
     464                 :            :   else {
     465                 :          0 :     Player.immunity[POISON]--;
     466                 :          0 :     Player.immunity[FEAR]--;
     467                 :          0 :     Player.immunity[INFECTION]--;
     468                 :            :   }
     469                 :          0 : }    
     470                 :            : 
     471                 :            : 
     472                 :          0 : void i_desecrate(pob o)
     473                 :            : {
     474         [ #  # ]:          0 :   if (o->known < 1)  o->known = 2;
     475         [ #  # ]:          0 :   if (o->blessing > 0) {
     476                 :          0 :     mprint("How weird, a blessed desecrator... ");
     477                 :          0 :     mprint("The structure of reality cannot permit such a thing....");
     478                 :          0 :     dispose_lost_objects(1,o);
     479                 :            :   }
     480         [ #  # ]:          0 :   else if (Level->site[Player.x][Player.y].locchar == ALTAR)
     481                 :          0 :     sanctify(-1);
     482                 :          0 : }
     483                 :            : 
     484                 :            : 
     485                 :            : /* shield functions */
     486                 :          0 : void i_normal_shield(pob o)
     487                 :            : {
     488         [ #  # ]:          0 :   if (o->used) mprint("You sling your shield across a forearm.");
     489                 :          0 : }
     490                 :            : 
     491                 :            : 
     492                 :          0 : void i_perm_deflect(pob o)
     493                 :            : {
     494         [ #  # ]:          0 :   if (o->known < 1)  o->known = 2;
     495         [ #  # ]:          0 :   if (o->blessing > -1) {
     496         [ #  # ]:          0 :     if (o->used) {
     497                 :          0 :       mprint("You feel buffered.");
     498                 :          0 :       Player.status[DEFLECTION] += 1500;
     499                 :            :     }
     500                 :            :     else {
     501                 :          0 :       Player.status[DEFLECTION] -= 1500;
     502         [ #  # ]:          0 :       if (Player.status[DEFLECTION] < 1) {
     503                 :          0 :         mprint("You feel less defended");
     504                 :          0 :         Player.status[DEFLECTION] = 0;
     505                 :            :       }
     506                 :            :     }
     507                 :            :   }
     508                 :            :   else {
     509         [ #  # ]:          0 :     if (o->used) {
     510                 :          0 :       mprint("You feel naked.");
     511                 :          0 :       Player.status[VULNERABLE] += 1500;
     512                 :          0 :       Player.status[DEFLECTION] = 0;
     513                 :            :     }
     514                 :            :     else {
     515                 :          0 :       Player.status[VULNERABLE] -= 1500;
     516         [ #  # ]:          0 :       if (Player.status[VULNERABLE] < 1) {
     517                 :          0 :         mprint("You feel less vulnerable");
     518                 :          0 :         Player.status[VULNERABLE] = 0;
     519                 :            :       }
     520                 :            :     }
     521                 :            :   }
     522                 :          0 : }

Generated by: LCOV version 1.11