[ScryMUD] SVN Commit Info r874 - trunk/mud/grrmud/server

scrymud at wanfear.com scrymud at wanfear.com
Sun Feb 11 23:32:27 PST 2007


Author: eroper
Date: 2007-02-11 23:32:27 -0800 (Sun, 11 Feb 2007)
New Revision: 874

Modified:
   trunk/mud/grrmud/server/battle.cc
   trunk/mud/grrmud/server/commands.cc
Log:
A bit more cleanup.


Modified: trunk/mud/grrmud/server/battle.cc
===================================================================
--- trunk/mud/grrmud/server/battle.cc	2007-02-12 07:11:05 UTC (rev 873)
+++ trunk/mud/grrmud/server/battle.cc	2007-02-12 07:32:27 UTC (rev 874)
@@ -1125,7 +1125,7 @@
                   }
                   break;
          case 25: {
-                     Sprintf(buf, "A magnificant tail erupts from %S's back.", crit.getName());
+                     Sprintf(buf, "A magnificant tail erupts from %S's back.\n", crit.getName());
                      show_all(buf,room_list[crit.getCurRoomNum()]);
                      crit.show("A magnificant tails forms behind you, the metamorphosis is complete!\n");
                   }
@@ -1180,8 +1180,9 @@
    crit.MV_MAX += d(1, crit.getDEX(TRUE));
    crit.show("You rise a level.\n");
 
-   if ( crit.RACE == AVIAN )
+   if ( crit.isAvian() ) {
       avian_gain_level(crit);
+   }
 }//gain_level
 
 

Modified: trunk/mud/grrmud/server/commands.cc
===================================================================
--- trunk/mud/grrmud/server/commands.cc	2007-02-12 07:11:05 UTC (rev 873)
+++ trunk/mud/grrmud/server/commands.cc	2007-02-12 07:32:27 UTC (rev 874)
@@ -749,7 +749,7 @@
       show("\n", pc);
    }//if
    else {                        /* look <thing> */
-      if ((crit_ptr = rm.haveCritNamed(i_th, obj, pc, count_sofar))) {
+      if ((crit_ptr = rm.haveCritNamed(i_th, obj, pc, count_sofar))) { // look at a critter
 
          show("\n\n", pc);
          show((crit_ptr->long_desc), pc);
@@ -779,52 +779,50 @@
                Sprintf(buf, cstr(CS_LOOK_GLOWS_BRIGHTLY, pc),
                        get_he_she(*crit_ptr));
                buf.Cap();
-               show(buf, pc);
+               pc.show(buf);
             }//if
          }//while
 
 
-                  // Okay, lets see if crit is AVIAN.
-                  // if crit == AVIAN then lets show what he or she has
-                  // for added features
+         // Okay, lets see if crit is AVIAN.
+         // if crit == AVIAN then lets show what he or she has
+         // for added features
 
-                 if( crit_ptr->getRace() == AVIAN )
-                 {
-                                 String buf2(1024);
+         if( crit_ptr->isAvian() )
+         {
+            String buf2(1024);
 
-                             if( crit_ptr->LEVEL >= 5 )
-                                 {
-                                  Sprintf( buf2, "%S has a sturdy beak for a nose.\n", crit_ptr->getName() );
-                                  pc.show( buf2 );
-                                 }
+            if( crit_ptr->LEVEL >= 5 )
+            {
+               Sprintf( buf2, "%S has a sturdy beak.\n", crit_ptr->getName() );
+               pc.show( buf2 );
+            }
 
-                                 if( crit_ptr->LEVEL >= 10 && crit_ptr->LEVEL < 15)
-                             {
-                                  Sprintf( buf2, "A small pair of wings protrude from %S back.\n", crit_ptr->getName() );
-                                  pc.show( buf2 );
-                             }
+            if( crit_ptr->LEVEL >= 10 && crit_ptr->LEVEL < 15)
+            {
+               Sprintf( buf2, "A small pair of wings protrude from %S's back.\n", crit_ptr->getName() );
+               pc.show( buf2 );
+            }
 
-                                 if( crit_ptr->LEVEL >= 15)
-                                 {
-                                  Sprintf( buf2, "A large set of wings protrude from %S back.\n", crit_ptr->getName() );
-                                  pc.show( buf2 );
-                                 }
+            if( crit_ptr->LEVEL >= 15)
+            {
+               Sprintf( buf2, "A large set of wings protrude from %S's back.\n", crit_ptr->getName() );
+               pc.show( buf2 );
+            }
 
-                                 if( crit_ptr->LEVEL >= 20 )
-                                 {
-                                  Sprintf( buf2, "wicked claws finish off %S legs.\n", crit_ptr->getName() );
-                                  pc.show( buf2 );
-                                 }
+            if( crit_ptr->LEVEL >= 20 )
+            {
+               Sprintf( buf2, "Wicked claws finish off %S's legs.\n", crit_ptr->getName() );
+               pc.show( buf2 );
+            }
 
-                                 if( crit_ptr->LEVEL >= 25)
-                                 {
-                                  Sprintf( buf2, "A powerfull tail trails behind %S.\n", crit_ptr->getName() );
-                                  pc.show( buf2 );
-                                 }
-                }
+            if( crit_ptr->LEVEL >= 25)
+            {
+               Sprintf( buf2, "A powerful tail trails behind %S.\n", crit_ptr->getName() );
+               pc.show( buf2 );
+            }
+         }
 
-
-
          for (int q = 1; q < MAX_EQ; q++) {
             if (crit_ptr->EQ[q]) {
                flag = TRUE;
@@ -839,27 +837,27 @@
 
          if (pc.pc && (pc.shouldSeeInventory() ||
                   (pc.isThief() &&  pc.getLevel() >= crit_ptr->getLevel()))) {
-            out_inv(crit_ptr->inv, pc, CRIT_INV);
+            out_inv(crit_ptr->inv, pc, CRIT_INV); // thief peeking
          }//if
 
          String cmd = "look";
          rm.checkForProc(cmd, NULL_STRING, pc, crit_ptr->MOB_NUM);
       }//if
-      else if ((obj_ptr = rm.haveAccessibleObjNamed(i_th - count_sofar, obj, pc,
-                                                    posn, count_sofar))) {
-         show("\n\n", pc);
-         show((obj_ptr->long_desc), pc);
-         show("\n", pc);
+      else if ((obj_ptr = rm.haveAccessibleObjNamed(i_th - count_sofar, obj, pc, //looking at an object in the room
+                                                    posn, count_sofar))) {       //also checks the players inventory
+         pc.show("\n\n");
+         pc.show(obj_ptr->long_desc);
+         pc.show("\n");
          
          String cmd = "look";
          rm.checkForProc(cmd, NULL_STRING, pc, obj_ptr->OBJ_NUM);
       }
-      else if ((kwd_ptr = rm.haveKeyword(i_th - count_sofar, obj, count_sofar))) {
+      else if ((kwd_ptr = rm.haveKeyword(i_th - count_sofar, obj, count_sofar))) { //check for room keywords
          pc.show("\n\n");
          pc.show(kwd_ptr->desc);
          pc.show("\n");
       }
-      else if ((door_ptr = 
+      else if ((door_ptr =  // looking at a door
            door::findDoor(rm.doors, i_th - count_sofar, obj, pc.SEE_BIT,
                           rm, count_sofar))) {
          show("\n\n", pc);




More information about the ScryMUD mailing list