ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/server/c_object.C
(Generate patch)

Comparing deliantra/server/server/c_object.C (file contents):
Revision 1.75 by root, Mon Jul 14 23:57:46 2008 UTC vs.
Revision 1.76 by root, Sun Sep 7 21:31:23 2008 UTC

970 dynbuf_text buf (512, 512); 970 dynbuf_text buf (512, 512);
971 971
972 object *mon = head ? head : this; 972 object *mon = head ? head : this;
973 973
974 if (QUERY_FLAG (mon, FLAG_UNDEAD)) 974 if (QUERY_FLAG (mon, FLAG_UNDEAD))
975 buf << "It is an undead force.\n"; 975 buf << " - It is an undead force.\n";
976 976
977 if (mon->level > who->level) 977 if (mon->level > who->level)
978 buf << "It is likely more powerful than you.\n"; 978 buf << " - It is likely more powerful than you.\n";
979 else if (mon->level < who->level) 979 else if (mon->level < who->level)
980 buf << "It is likely less powerful than you.\n"; 980 buf << " - It is likely less powerful than you.\n";
981 else 981 else
982 buf << "It is probably as powerful as you.\n"; 982 buf << " - It is probably as powerful as you.\n";
983 983
984 if (mon->attacktype & AT_ACID) 984 if (mon->attacktype & AT_ACID)
985 buf << "You seem to smell an acrid odor.\n"; 985 buf << " - You seem to smell an acrid odor.\n";
986 986
987 /* Anyone know why this used to use the clone value instead of the 987 /* Anyone know why this used to use the clone value instead of the
988 * maxhp field? This seems that it should give more accurate results. 988 * maxhp field? This seems that it should give more accurate results.
989 */ 989 */
990 switch ((mon->stats.hp + 1) * 4 / (mon->stats.maxhp + 1)) 990 switch ((mon->stats.hp + 1) * 4 / (mon->stats.maxhp + 1))
991 { /* From 1-4 */ 991 { /* From 1-4 */
992 case 1: 992 case 1:
993 buf << "It is in a bad shape.\n"; 993 buf << " - It is in a bad shape.\n";
994 break; 994 break;
995 case 2: 995 case 2:
996 buf << "It is hurt.\n"; 996 buf << " - It is hurt.\n";
997 break; 997 break;
998 case 3: 998 case 3:
999 buf << "It is somewhat hurt.\n"; 999 buf << " - It is somewhat hurt.\n";
1000 break; 1000 break;
1001 case 4: 1001 case 4:
1002 buf << "It is in excellent shape.\n"; 1002 buf << " - It is in excellent shape.\n";
1003 break; 1003 break;
1004 } 1004 }
1005 1005
1006 if (present_in_ob (POISONING, mon)) 1006 if (present_in_ob (POISONING, mon))
1007 buf << "It looks very ill.\n"; 1007 buf << " - It looks very ill.\n";
1008 1008
1009 return buf; 1009 return buf;
1010} 1010}
1011 1011
1012/* tmp is the object being described, pl is who is examing it. */ 1012/* tmp is the object being described, pl is who is examing it. */
1070std::string 1070std::string
1071object::describe (object *who) 1071object::describe (object *who)
1072{ 1072{
1073 dynbuf_text buf (1024, 1024); 1073 dynbuf_text buf (1024, 1024);
1074 1074
1075 buf.printf ("That is: %s.\n", long_desc (who).c_str ()); 1075 buf.printf ("That is: %s.\n\n", long_desc (who).c_str ());
1076 1076
1077 if (custom_name) 1077 if (custom_name)
1078 buf.printf ("You call it %s\n", &custom_name); 1078 buf.printf ("You call it %s.\n\n", &custom_name);
1079 1079
1080 switch (type) 1080 switch (type)
1081 { 1081 {
1082 case SPELLBOOK: 1082 case SPELLBOOK:
1083 if (flag [FLAG_IDENTIFIED] && inv) 1083 if (flag [FLAG_IDENTIFIED] && inv)
1084 buf.printf ("%s is a %s %s spell\n", &inv->name, get_levelnumber (inv->level), &inv->skill); 1084 buf.printf ("%s is a %s %s spell.\n", &inv->name, get_levelnumber (inv->level), &inv->skill);
1085 break; 1085 break;
1086 1086
1087 case BOOK: 1087 case BOOK:
1088 if (msg) 1088 if (msg)
1089 buf << "Something is written in it.\n"; 1089 buf << "Something is written in it.\n";
1154 { 1154 {
1155 /* This is just a hack so when identifying the items, we print 1155 /* This is just a hack so when identifying the items, we print
1156 * out the extra message 1156 * out the extra message
1157 */ 1157 */
1158 if (need_identify (this) && flag [FLAG_IDENTIFIED]) 1158 if (need_identify (this) && flag [FLAG_IDENTIFIED])
1159 buf << "The object has a story:\n"; 1159 buf << "The object has a story:\n\n";
1160 1160
1161 buf << msg << '\n'; 1161 buf << msg << '\n';
1162 } 1162 }
1163 1163
1164 buf << '\n'; 1164 buf << '\n';

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines