diff --git a/changes/negate-inanimates.md b/changes/negate-inanimates.md new file mode 100644 index 00000000..43f9aff4 --- /dev/null +++ b/changes/negate-inanimates.md @@ -0,0 +1 @@ +When an inanimate monster is negated (e.g. turret or totem), a combat message is now displayed and the sidebar will show the negated status. \ No newline at end of file diff --git a/src/brogue/IO.c b/src/brogue/IO.c index 65cb5965..74361bb9 100644 --- a/src/brogue/IO.c +++ b/src/brogue/IO.c @@ -4633,10 +4633,13 @@ short printMonsterInfo(creature *monst, short y, boolean dim, boolean highlight) } } - if (monst != &player - && (!(monst->info.flags & MONST_INANIMATE) - || monst->creatureState == MONSTER_ALLY)) { + if (y < ROWS - 1 && monst->wasNegated && monst->newPowerCount == monst->totalPowerCount + && (!player.status[STATUS_HALLUCINATING] || rogue.playbackOmniscience )) { + printString(" Negated ", 0, y++, (dim ? &darkPink : &pink), &black, 0); + } + if (monst != &player + && (!(monst->info.flags & MONST_INANIMATE) || monst->creatureState == MONSTER_ALLY)) { if (y < ROWS - 1) { if (monst->wasNegated && monst->newPowerCount == monst->totalPowerCount diff --git a/src/brogue/Items.c b/src/brogue/Items.c index 1cc4ce0c..bfe9ecd1 100644 --- a/src/brogue/Items.c +++ b/src/brogue/Items.c @@ -3736,9 +3736,10 @@ boolean negate(creature *monst) { } for (i = 0; i < 20; i++) { backupBolts[i] = monst->info.bolts[i]; - monst->info.bolts[i] = BOLT_NONE; if (monst->info.bolts[i] && !(boltCatalog[monst->info.bolts[i]].flags & BF_NOT_NEGATABLE)) { + monst->info.bolts[i] = BOLT_NONE; negated = true; + monst->wasNegated = true; } } for (i = 0, j = 0; i < 20 && backupBolts[i]; i++) {