Skip to content

Commit e246459

Browse files
committed
Fix: if burning hands or shocking grasp is active, don't activate whilst using thievery skill.
Ideally, you shouldn't be able to even attempt to pickpocket while your hands are aflame or electrified, but this will do for now.
1 parent 0436ba6 commit e246459

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

doc/evilhack-changelog.md

+3
Original file line numberDiff line numberDiff line change
@@ -3445,3 +3445,6 @@ The following changes to date are:
34453445
- Draugr infidels don't cast spells
34463446
- Allow player monsters to be Draugr, part two
34473447
- Draugr can revive
3448+
- Fix: if burning hands or shocking grasp is active, don't activate
3449+
whilst using thievery skill
3450+

src/do.c

+1
Original file line numberDiff line numberDiff line change
@@ -2375,6 +2375,7 @@ long timeout;
23752375
struct obj *body = arg->a_obj;
23762376
struct permonst *mptr = &mons[body->corpsenm];
23772377
int zmon;
2378+
23782379
if (!body->zombie_corpse && has_omonst(body) && has_erac(OMONST(body)))
23792380
mptr = r_data(OMONST(body));
23802381
if (has_omonst(body) && has_erac(OMONST(body))

src/uhitm.c

+6-4
Original file line numberDiff line numberDiff line change
@@ -1023,11 +1023,13 @@ struct attack *uattk;
10231023
int race = (flags.female && urace.femalenum != NON_PM)
10241024
? urace.femalenum : urace.malenum;
10251025
struct attack *attacks = mons[race].mattk;
1026+
10261027
if (((Race_if(PM_ILLITHID) || Race_if(PM_DRAUGR)) && rn2(4))
10271028
|| Race_if(PM_CENTAUR))
10281029
return 0;
10291030
for (i = 0; i < NATTK; i++) {
1030-
if (attacks[i].aatyp != AT_WEAP && attacks[i].aatyp != AT_NONE) {
1031+
if (attacks[i].aatyp != AT_WEAP
1032+
&& attacks[i].aatyp != AT_NONE) {
10311033
malive = hmonas(mon, race, FALSE);
10321034
break;
10331035
}
@@ -1777,7 +1779,7 @@ int dieroll;
17771779

17781780
/* burning hands spell */
17791781
if (!destroyed && u.umburn
1780-
&& hand_to_hand && actually_unarmed) {
1782+
&& hand_to_hand && actually_unarmed && !thievery) {
17811783
int enchant_skill = ((P_SKILL(P_ENCHANTMENT_SPELL) >= P_EXPERT)
17821784
? 4 : (P_SKILL(P_ENCHANTMENT_SPELL) == P_SKILLED)
17831785
? 3 : (P_SKILL(P_ENCHANTMENT_SPELL) == P_BASIC)
@@ -1818,7 +1820,7 @@ int dieroll;
18181820

18191821
/* shocking grasp spell */
18201822
if (!destroyed && u.umshock
1821-
&& hand_to_hand && actually_unarmed) {
1823+
&& hand_to_hand && actually_unarmed && !thievery) {
18221824
int enchant_skill = ((P_SKILL(P_ENCHANTMENT_SPELL) >= P_EXPERT)
18231825
? 4 : (P_SKILL(P_ENCHANTMENT_SPELL) == P_SKILLED)
18241826
? 3 : (P_SKILL(P_ENCHANTMENT_SPELL) == P_BASIC)
@@ -1979,7 +1981,7 @@ int dieroll;
19791981
the skill without risk */
19801982
if (mon->mtame) {
19811983
You_cant("bring yourself to steal from %s.",
1982-
mon_nam(mon));
1984+
mon_nam(mon));
19831985
return 0;
19841986
}
19851987
/* engulfed? ummm no */

0 commit comments

Comments
 (0)