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.116 by root, Sun Apr 4 04:10:47 2010 UTC vs.
Revision 1.117 by root, Tue Apr 6 21:11:48 2010 UTC

521 { 521 {
522 success = 1; 522 success = 1;
523 DIFF_MSG (flag * tmp->stats.luck, "You feel more lucky.", "You feel less lucky."); 523 DIFF_MSG (flag * tmp->stats.luck, "You feel more lucky.", "You feel less lucky.");
524 } 524 }
525 525
526 if (digest_types [tmp->type])
527 {
526 if (tmp->stats.hp && op->type == PLAYER) 528 if (tmp->stats.hp && op->type == PLAYER)
527 { 529 {
528 success = 1; 530 success = 1;
529 DIFF_MSG (flag * tmp->stats.hp, "You feel much more healthy!", "You feel much less healthy!"); 531 DIFF_MSG (flag * tmp->stats.hp, "You feel much more healthy!", "You feel much less healthy!");
530 } 532 }
531 533
532 if (tmp->stats.sp && op->type == PLAYER && tmp->type != SKILL) 534 if (tmp->stats.sp && op->type == PLAYER
533 { 535 && tmp->type != SKILL && tmp->type != BOW)
536 {
534 success = 1; 537 success = 1;
535 DIFF_MSG (flag * tmp->stats.sp, "You feel one with the powers of magic!", "You suddenly feel very mundane."); 538 DIFF_MSG (flag * tmp->stats.sp, "You feel one with the powers of magic!", "You suddenly feel very mundane.");
536 } 539 }
537 540
538 /* for the future when artifacts set this -b.t. */ 541 /* for the future when artifacts set this -b.t. */
539 if (tmp->stats.grace && op->type == PLAYER) 542 if (tmp->stats.grace && op->type == PLAYER)
540 { 543 {
541 success = 1; 544 success = 1;
542 DIFF_MSG (flag * tmp->stats.grace, "You feel closer to your god!", "You suddenly feel less holy."); 545 DIFF_MSG (flag * tmp->stats.grace, "You feel closer to your god!", "You suddenly feel less holy.");
543 } 546 }
544 547
545 if (tmp->stats.food && op->type == PLAYER) 548 if (tmp->stats.food && op->type == PLAYER)
546 { 549 {
547 success = 1; 550 success = 1;
548 DIFF_MSG (flag * tmp->stats.food, "You feel your digestion slowing down.", "You feel your digestion speeding up."); 551 DIFF_MSG (flag * tmp->stats.food, "You feel your digestion slowing down.", "You feel your digestion speeding up.");
552 }
549 } 553 }
550 554
551 /* Messages for changed resistance */ 555 /* Messages for changed resistance */
552 for (int i = 0; i < NROFATTACKS; i++) 556 for (int i = 0; i < NROFATTACKS; i++)
553 { 557 {
699 sint8 v = arch->stats.stat (i); 703 sint8 v = arch->stats.stat (i);
700 stats.stat (i) += v; 704 stats.stat (i) += v;
701 contr->orig_stats.stat (i) += v; 705 contr->orig_stats.stat (i) += v;
702 } 706 }
703} 707}
704
705/* These are the items that currently can change digestion, regeneration,
706 * spell point recovery and mana point recovery. Seems sort of an arbitary
707 * list, but other items store other info into stats array.
708 */
709static struct digest_types : std::bitset<NUM_TYPES>
710{
711 digest_types ()
712 {
713 set (WEAPON);
714 set (BOW);
715 set (ARMOUR);
716 set (HELMET);
717 set (SHIELD);
718 set (RING);
719 set (BOOTS);
720 set (GLOVES);
721 set (AMULET);
722 set (GIRDLE);
723 set (BRACERS);
724 set (CLOAK);
725 set (DISEASE);
726 set (FORCE);
727 set (SKILL);
728 }
729} digest_types;
730 708
731static struct copy_flags : object::flags_t 709static struct copy_flags : object::flags_t
732{ 710{
733 copy_flags () 711 copy_flags ()
734 { 712 {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines