… | |
… | |
818 | * Updates all abilities given by applied objects in the inventory |
818 | * Updates all abilities given by applied objects in the inventory |
819 | * of the given object. Note: This function works for both monsters |
819 | * of the given object. Note: This function works for both monsters |
820 | * and players; the "player" in the name is purely an archaic inheritance. |
820 | * and players; the "player" in the name is purely an archaic inheritance. |
821 | * This functions starts from base values (archetype or player object) |
821 | * This functions starts from base values (archetype or player object) |
822 | * and then adjusts them according to what the player has equipped. |
822 | * and then adjusts them according to what the player has equipped. |
823 | */ |
823 | * |
824 | |
|
|
825 | /* July 95 - inserted stuff to handle new skills/exp system - b.t. |
824 | * July 95 - inserted stuff to handle new skills/exp system - b.t. |
826 | spell system split, grace points now added to system --peterm |
825 | * spell system split, grace points now added to system --peterm |
827 | */ |
826 | */ |
828 | |
|
|
829 | void |
827 | void |
830 | object::update_stats () |
828 | object::update_stats () |
831 | { |
829 | { |
832 | int i, j; |
830 | int i, j; |
833 | float f, max = 9, added_speed = 0, bonus_speed = 0, sp_tmp, speed_reduce_from_disease = 1; |
831 | float f, max = 9, added_speed = 0, bonus_speed = 0, sp_tmp, speed_reduce_from_disease = 1; |
… | |
… | |
857 | /* Don't clobber all the range_ values. range_golem otherwise |
855 | /* Don't clobber all the range_ values. range_golem otherwise |
858 | * gets reset for no good reason, and we don't want to reset |
856 | * gets reset for no good reason, and we don't want to reset |
859 | * range_magic (what spell is readied). These three below |
857 | * range_magic (what spell is readied). These three below |
860 | * well get filled in based on what the player has equipped. |
858 | * well get filled in based on what the player has equipped. |
861 | */ |
859 | */ |
862 | contr->ranges[range_bow] = NULL; |
860 | contr->ranges[range_bow] = 0; |
863 | contr->ranges[range_misc] = NULL; |
861 | contr->ranges[range_misc] = 0; |
864 | contr->ranges[range_skill] = NULL; |
862 | contr->ranges[range_skill] = 0; |
865 | } |
863 | } |
866 | |
864 | |
867 | memcpy (body_used, body_info, sizeof (body_info)); |
865 | memcpy (body_used, body_info, sizeof (body_info)); |
868 | |
866 | |
869 | slaying = 0; |
867 | slaying = 0; |