Skip to content

Commit 56d7e52

Browse files
committed
Fix: monster casting summon minion against another monster.
If a monster cast the spell 'summon minion' against another monster, the spell would still target the player. The function summon_minion() currently isn't setup to handle a target other than the player, so suppress this scenario from occuring for now.
1 parent a0b8572 commit 56d7e52

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

doc/evilhack-changelog.md

+1
Original file line numberDiff line numberDiff line change
@@ -3378,4 +3378,5 @@ The following changes to date are:
33783378
- Proper encyclopedia entries/lookup for the artifact rings
33793379
- Fix: Convicts felt guilty when encountering the guard from a gold vault
33803380
- Hobbit pickpockets are always hostile
3381+
- Fix: monster casting summon minion against another monster
33813382

src/mcastu.c

+7-2
Original file line numberDiff line numberDiff line change
@@ -2364,6 +2364,12 @@ int spellnum;
23642364
return;
23652365
}
23662366

2367+
/* monster vs monster is suppressed, as summon_minion()
2368+
currently does not support anything but the player
2369+
as a target */
2370+
if (!yours)
2371+
return;
2372+
23672373
aligntype = yours ? u.ualign.type : mon_aligntyp(mattk);
23682374
minion = summon_minion(aligntype, FALSE);
23692375
if (minion && canspotmon(minion))
@@ -2620,8 +2626,7 @@ int spellnum;
26202626
shieldeff(mtmp->mx, mtmp->my);
26212627
dmg = (dmg + 1) / 2;
26222628
}
2623-
/* not canseemon; if you can't see it you don't know it was wounded */
2624-
if (yours) {
2629+
if (yours || canseemon(mtmp)) {
26252630
if (dmg <= 5)
26262631
pline("%s looks itchy!", Monnam(mtmp));
26272632
else if (dmg <= 10)

0 commit comments

Comments
 (0)