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

Comparing deliantra/server/common/living.C (file contents):
Revision 1.85 by root, Sun May 4 19:14:23 2008 UTC vs.
Revision 1.88 by root, Tue Jul 15 20:41:58 2008 UTC

400 /* MOVE_FLY_HIGH trumps MOVE_FLY_LOW - changing your move_fly_low 400 /* MOVE_FLY_HIGH trumps MOVE_FLY_LOW - changing your move_fly_low
401 * status doesn't make a difference if you are flying high 401 * status doesn't make a difference if you are flying high
402 */ 402 */
403 if (tmp->move_type & MOVE_FLY_LOW && !(op->move_type & MOVE_FLY_HIGH)) 403 if (tmp->move_type & MOVE_FLY_LOW && !(op->move_type & MOVE_FLY_HIGH))
404 { 404 {
405 DIFF_MSG (flag, "You start to float in the air!.", "You float down to the ground."); 405 DIFF_MSG (flag, "You start to float in the air!", "You float down to the ground.");
406 } 406 }
407 407
408 if (tmp->move_type & MOVE_FLY_HIGH) 408 if (tmp->move_type & MOVE_FLY_HIGH)
409 { 409 {
410 /* double conditional - second case covers if you have move_fly_low - 410 /* double conditional - second case covers if you have move_fly_low -
917 917
918 if (digest_types [tmp->type]) 918 if (digest_types [tmp->type])
919 { 919 {
920 contr->digestion += tmp->stats.food; 920 contr->digestion += tmp->stats.food;
921 contr->gen_hp += tmp->stats.hp; 921 contr->gen_hp += tmp->stats.hp;
922 if (tmp->type != BOW) // ugly exception for bows
922 contr->gen_sp += tmp->stats.sp; 923 contr->gen_sp += tmp->stats.sp;
923 contr->gen_grace += tmp->stats.grace; 924 contr->gen_grace += tmp->stats.grace;
924 contr->gen_sp_armour += tmp->gen_sp_armour; 925 contr->gen_sp_armour += tmp->gen_sp_armour;
925 } 926 }
926 } /* if this is a player */ 927 } /* if this is a player */
927 else 928 else
1441 1442
1442/* 1443/*
1443 * set the new dragon name after gaining levels or 1444 * set the new dragon name after gaining levels or
1444 * changing ability focus (later this can be extended to 1445 * changing ability focus (later this can be extended to
1445 * eventually change the player's face and animation) 1446 * eventually change the player's face and animation)
1446 *
1447 * Note that the title is written to 'own_title' in the
1448 * player struct. This should be changed to 'ext_title'
1449 * as soon as clients support this!
1450 * Please, anyone, write support for 'ext_title'.
1451 */ 1447 */
1452void 1448void
1453set_dragon_name (object *pl, const object *abil, const object *skin) 1449set_dragon_name (object *pl, const object *abil, const object *skin)
1454{ 1450{
1455 int atnr = -1; /* attacknumber of highest level */ 1451 int atnr = -1; /* attacknumber of highest level */
1473 /* now if there are equals at highest level, pick the one with focus, 1469 /* now if there are equals at highest level, pick the one with focus,
1474 or else at random */ 1470 or else at random */
1475 if (atnr_is_dragon_enabled (abil->stats.exp) && abil->resist[abil->stats.exp] >= level) 1471 if (atnr_is_dragon_enabled (abil->stats.exp) && abil->resist[abil->stats.exp] >= level)
1476 atnr = abil->stats.exp; 1472 atnr = abil->stats.exp;
1477 1473
1478 level = (int) (level / 25.);
1479
1480 /* now set the new title */ 1474 /* now set the new title */
1481 if (pl->contr)
1482 {
1483 if (level == 0)
1484 sprintf (pl->contr->title, "%s hatchling", attacks[atnr]); 1475 if (level < 25) sprintf (pl->contr->title, "%s hatchling", attacks[atnr]);
1485 else if (level == 1)
1486 sprintf (pl->contr->title, "%s wyrm", attacks[atnr]); 1476 else if (level < 50) sprintf (pl->contr->title, "%s wyrm" , attacks[atnr]);
1487 else if (level == 2)
1488 sprintf (pl->contr->title, "%s wyvern", attacks[atnr]); 1477 else if (level < 75) sprintf (pl->contr->title, "%s wyvern" , attacks[atnr]);
1489 else if (level == 3)
1490 sprintf (pl->contr->title, "%s dragon", attacks[atnr]); 1478 else if (level < 100) sprintf (pl->contr->title, "%s dragon" , attacks[atnr]);
1491 else 1479 else
1492 { 1480 {
1493 /* special titles for extra high resistance! */ 1481 /* special titles for extra high resistance! */
1494 if (skin->resist[atnr] > 80)
1495 sprintf (pl->contr->title, "legendary %s dragon", attacks[atnr]); 1482 if (skin->resist[atnr] > 80) sprintf (pl->contr->title, "legendary %s dragon", attacks[atnr]);
1496 else if (skin->resist[atnr] > 50)
1497 sprintf (pl->contr->title, "ancient %s dragon", attacks[atnr]); 1483 else if (skin->resist[atnr] > 50) sprintf (pl->contr->title, "ancient %s dragon" , attacks[atnr]);
1498 else
1499 sprintf (pl->contr->title, "big %s dragon", attacks[atnr]); 1484 else sprintf (pl->contr->title, "big %s dragon" , attacks[atnr]);
1500 }
1501 } 1485 }
1502 1486
1503 strcpy (pl->contr->own_title, ""); 1487 strcpy (pl->contr->own_title, "");
1504} 1488}
1505 1489

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines