… | |
… | |
1068 | if (attacknum == ATNR_INTERNAL) |
1068 | if (attacknum == ATNR_INTERNAL) |
1069 | return dam; |
1069 | return dam; |
1070 | |
1070 | |
1071 | if (hitter->slaying) |
1071 | if (hitter->slaying) |
1072 | { |
1072 | { |
1073 | if ((op->race && strstr (hitter->slaying, op->race)) |
1073 | if ((op->race && hitter->slaying.contains (op->race)) |
1074 | || (op->arch && op->arch->archname && strstr (op->arch->archname, hitter->slaying))) |
1074 | || (op->arch && op->arch->archname && op->arch->archname.contains (hitter->slaying))) |
1075 | { |
1075 | { |
1076 | doesnt_slay = 0; |
1076 | doesnt_slay = 0; |
1077 | dam *= 3; |
1077 | dam *= 3; |
1078 | } |
1078 | } |
1079 | } |
1079 | } |
… | |
… | |
1281 | object *god = find_god (determine_god (owner)); |
1281 | object *god = find_god (determine_god (owner)); |
1282 | int div = 1; |
1282 | int div = 1; |
1283 | |
1283 | |
1284 | /* if undead are not an enemy of your god, you turn them |
1284 | /* if undead are not an enemy of your god, you turn them |
1285 | * at half strength */ |
1285 | * at half strength */ |
1286 | if (!god || !god->slaying || strstr (god->slaying, shstr_undead) == NULL) |
1286 | if (!god || !god->slaying || !god->slaying.contains (shstr_undead)) |
1287 | div = 2; |
1287 | div = 2; |
1288 | |
1288 | |
1289 | /* Give a bonus if you resist turn undead */ |
1289 | /* Give a bonus if you resist turn undead */ |
1290 | if (op->level * div < (turn_bonus[owner->stats.Wis] + owner->level + (op->resist[ATNR_TURN_UNDEAD] / 100))) |
1290 | if (op->level * div < (turn_bonus[owner->stats.Wis] + owner->level + (op->resist[ATNR_TURN_UNDEAD] / 100))) |
1291 | scare_creature (op, owner); |
1291 | scare_creature (op, owner); |
… | |
… | |
1769 | */ |
1769 | */ |
1770 | if (type & AT_HOLYWORD) |
1770 | if (type & AT_HOLYWORD) |
1771 | { |
1771 | { |
1772 | object *god; |
1772 | object *god; |
1773 | |
1773 | |
1774 | if ((!hitter->slaying || |
1774 | if ((!hitter->slaying |
1775 | (!(op->race && strstr (hitter->slaying, op->race)) && |
1775 | || (!(op->race && hitter->slaying.contains (op->race)) |
1776 | !(op->name && strstr (hitter->slaying, op->name)))) && |
1776 | && !(op->name && hitter->slaying.contains (op->name)))) |
1777 | (!QUERY_FLAG (op, FLAG_UNDEAD) || |
1777 | && (!QUERY_FLAG (op, FLAG_UNDEAD) |
1778 | (hitter->title |
1778 | || (hitter->title |
1779 | && (god = find_god (determine_god (hitter))) != NULL && god->race && strstr (god->race, shstr_undead)))) |
1779 | && (god = find_god (determine_god (hitter))) != NULL |
|
|
1780 | && god->race |
|
|
1781 | && god->race.contains (shstr_undead)))) |
1780 | return 0; |
1782 | return 0; |
1781 | } |
1783 | } |
1782 | |
1784 | |
1783 | maxattacktype = type; /* initialise this to something */ |
1785 | maxattacktype = type; /* initialise this to something */ |
1784 | for (attacknum = 0; attacknum < NROFATTACKS; attacknum++, attacktype = 1 << attacknum) |
1786 | for (attacknum = 0; attacknum < NROFATTACKS; attacknum++, attacktype = 1 << attacknum) |
… | |
… | |
2157 | ** field of the deathstriking object */ |
2159 | ** field of the deathstriking object */ |
2158 | |
2160 | |
2159 | int atk_lev, def_lev, kill_lev; |
2161 | int atk_lev, def_lev, kill_lev; |
2160 | |
2162 | |
2161 | if (hitter->slaying) |
2163 | if (hitter->slaying) |
2162 | if (!((QUERY_FLAG (op, FLAG_UNDEAD) && strstr (hitter->slaying, shstr_undead)) || (op->race && strstr (hitter->slaying, op->race)))) |
2164 | if (!((QUERY_FLAG (op, FLAG_UNDEAD) && hitter->slaying.contains (shstr_undead)) |
|
|
2165 | || (op->race && hitter->slaying.contains (op->race)))) |
2163 | return; |
2166 | return; |
2164 | |
2167 | |
2165 | def_lev = op->level; |
2168 | def_lev = op->level; |
2166 | if (def_lev < 1) |
2169 | if (def_lev < 1) |
2167 | { |
2170 | { |