… | |
… | |
1289 | object *god = find_god (determine_god (owner)); |
1289 | object *god = find_god (determine_god (owner)); |
1290 | int div = 1; |
1290 | int div = 1; |
1291 | |
1291 | |
1292 | /* if undead are not an enemy of your god, you turn them |
1292 | /* if undead are not an enemy of your god, you turn them |
1293 | * at half strength */ |
1293 | * at half strength */ |
1294 | if (!god || !god->slaying || strstr (god->slaying, undead_name) == NULL) |
1294 | if (!god || !god->slaying || strstr (god->slaying, shstr_undead) == NULL) |
1295 | div = 2; |
1295 | div = 2; |
1296 | |
1296 | |
1297 | /* Give a bonus if you resist turn undead */ |
1297 | /* Give a bonus if you resist turn undead */ |
1298 | if (op->level * div < (turn_bonus[owner->stats.Wis] + owner->level + (op->resist[ATNR_TURN_UNDEAD] / 100))) |
1298 | if (op->level * div < (turn_bonus[owner->stats.Wis] + owner->level + (op->resist[ATNR_TURN_UNDEAD] / 100))) |
1299 | scare_creature (op, owner); |
1299 | scare_creature (op, owner); |
… | |
… | |
1808 | if ((!hitter->slaying || |
1808 | if ((!hitter->slaying || |
1809 | (!(op->race && strstr (hitter->slaying, op->race)) && |
1809 | (!(op->race && strstr (hitter->slaying, op->race)) && |
1810 | !(op->name && strstr (hitter->slaying, op->name)))) && |
1810 | !(op->name && strstr (hitter->slaying, op->name)))) && |
1811 | (!QUERY_FLAG (op, FLAG_UNDEAD) || |
1811 | (!QUERY_FLAG (op, FLAG_UNDEAD) || |
1812 | (hitter->title != NULL |
1812 | (hitter->title != NULL |
1813 | && (god = find_god (determine_god (hitter))) != NULL && god->race != NULL && strstr (god->race, undead_name) != NULL))) |
1813 | && (god = find_god (determine_god (hitter))) != NULL && god->race != NULL && strstr (god->race, shstr_undead) != NULL))) |
1814 | return 0; |
1814 | return 0; |
1815 | } |
1815 | } |
1816 | |
1816 | |
1817 | maxattacktype = type; /* initialise this to something */ |
1817 | maxattacktype = type; /* initialise this to something */ |
1818 | for (attacknum = 0; attacknum < NROFATTACKS; attacknum++, attacktype = 1 << attacknum) |
1818 | for (attacknum = 0; attacknum < NROFATTACKS; attacknum++, attacktype = 1 << attacknum) |
… | |
… | |
2192 | ** field of the deathstriking object */ |
2192 | ** field of the deathstriking object */ |
2193 | |
2193 | |
2194 | int atk_lev, def_lev, kill_lev; |
2194 | int atk_lev, def_lev, kill_lev; |
2195 | |
2195 | |
2196 | if (hitter->slaying) |
2196 | if (hitter->slaying) |
2197 | if (!((QUERY_FLAG (op, FLAG_UNDEAD) && strstr (hitter->slaying, undead_name)) || (op->race && strstr (hitter->slaying, op->race)))) |
2197 | if (!((QUERY_FLAG (op, FLAG_UNDEAD) && strstr (hitter->slaying, shstr_undead)) || (op->race && strstr (hitter->slaying, op->race)))) |
2198 | return; |
2198 | return; |
2199 | |
2199 | |
2200 | def_lev = op->level; |
2200 | def_lev = op->level; |
2201 | if (def_lev < 1) |
2201 | if (def_lev < 1) |
2202 | { |
2202 | { |