… | |
… | |
962 | * in the praying skill, and the player should always get those. |
962 | * in the praying skill, and the player should always get those. |
963 | * It also means we need to put in additional checks for applied below, |
963 | * It also means we need to put in additional checks for applied below, |
964 | * because the skill shouldn't count against body positions being used |
964 | * because the skill shouldn't count against body positions being used |
965 | * up, etc. |
965 | * up, etc. |
966 | */ |
966 | */ |
967 | if ((QUERY_FLAG (tmp, FLAG_APPLIED) |
967 | if ((tmp->flag [FLAG_APPLIED] |
968 | && tmp->type != CONTAINER |
968 | && tmp->type != CONTAINER |
969 | && tmp->type != CLOSE_CON) |
969 | && tmp->type != CLOSE_CON) |
970 | || (tmp->type == SKILL |
970 | || (tmp->type == SKILL |
971 | && tmp->subtype == SK_PRAYING)) |
971 | && tmp->subtype == SK_PRAYING)) |
972 | { |
972 | { |
973 | if (type == PLAYER) |
973 | if (type == PLAYER) |
974 | { |
974 | { |
975 | if ((tmp->type == WEAPON || tmp->type == BOW) |
975 | if (tmp == contr->combat_ob || tmp == contr->ranged_ob) |
976 | && tmp != current_weapon) |
976 | if (tmp != current_weapon && (tmp->type != SKILL || tmp->subtype != SK_PRAYING)) |
977 | continue; |
977 | continue; |
978 | |
978 | |
979 | for (i = 0; i < NUM_STATS; i++) |
979 | for (i = 0; i < NUM_STATS; i++) |
980 | change_attr_value (&stats, i, get_attr_value (&tmp->stats, i)); |
980 | change_attr_value (&stats, i, get_attr_value (&tmp->stats, i)); |
981 | |
981 | |
982 | /* these are the items that currently can change digestion, regeneration, |
982 | /* these are the items that currently can change digestion, regeneration, |
983 | * spell point recovery and mana point recovery. Seems sort of an arbitary |
983 | * spell point recovery and mana point recovery. Seems sort of an arbitary |
984 | * list, but other items store other info into stats array. |
984 | * list, but other items store other info into stats array. |
985 | */ |
985 | */ |
986 | if ((tmp->type == WEAPON) || (tmp->type == BOW) || |
986 | if (tmp->type == WEAPON || tmp->type == BOW || |
987 | (tmp->type == ARMOUR) || (tmp->type == HELMET) || |
987 | tmp->type == ARMOUR || tmp->type == HELMET || |
988 | (tmp->type == SHIELD) || (tmp->type == RING) || |
988 | tmp->type == SHIELD || tmp->type == RING || |
989 | (tmp->type == BOOTS) || (tmp->type == GLOVES) || |
989 | tmp->type == BOOTS || tmp->type == GLOVES || |
990 | (tmp->type == AMULET) || (tmp->type == GIRDLE) || |
990 | tmp->type == AMULET || tmp->type == GIRDLE || |
991 | (tmp->type == BRACERS) || (tmp->type == CLOAK) || |
991 | tmp->type == BRACERS || tmp->type == CLOAK || |
992 | (tmp->type == DISEASE) || (tmp->type == FORCE) || |
992 | tmp->type == DISEASE || tmp->type == FORCE || |
993 | (tmp->type == SKILL)) |
993 | tmp->type == SKILL) |
994 | { |
994 | { |
995 | contr->digestion += tmp->stats.food; |
995 | contr->digestion += tmp->stats.food; |
996 | contr->gen_hp += tmp->stats.hp; |
996 | contr->gen_hp += tmp->stats.hp; |
997 | contr->gen_sp += tmp->stats.sp; |
997 | contr->gen_sp += tmp->stats.sp; |
998 | contr->gen_grace += tmp->stats.grace; |
998 | contr->gen_grace += tmp->stats.grace; |