summaryrefslogtreecommitdiff
path: root/src/being/being.cpp
diff options
context:
space:
mode:
authorewew ukek <ewewukek@gmail.com>2024-03-20 23:59:46 +0000
committerFedja Beader <fedja@protonmail.ch>2024-03-20 23:59:46 +0000
commit6243e38c2f13754d11b750ffee069dd1542f905e (patch)
tree0b3d7bb9962df0f440515d23b79473215c272d3c /src/being/being.cpp
parent4f7bcdb0af1d3f2a02f55613e851770a489d91d6 (diff)
downloadmanaverse-6243e38c2f13754d11b750ffee069dd1542f905e.tar.gz
manaverse-6243e38c2f13754d11b750ffee069dd1542f905e.tar.bz2
manaverse-6243e38c2f13754d11b750ffee069dd1542f905e.tar.xz
manaverse-6243e38c2f13754d11b750ffee069dd1542f905e.zip
Color setting for attack range of monsters from ignore list
This MR displays attack range of monsters from ignore attack list in different color. I picked magenta as default, this may be changed if needed. There are actor types other than monsters but looks like it's not possible to add them to ignore list anyway. * Flip if branches for readability * Color setting for attack range of monsters from ignore list ****
Diffstat (limited to 'src/being/being.cpp')
-rw-r--r--src/being/being.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp
index 3f30ae4b0..1aef0abea 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -4046,8 +4046,16 @@ void Being::drawMonsterSpriteAt(Graphics *restrict const graphics,
else
attackRange = mapTileSize;
- graphics->setColor(userPalette->getColorWithAlpha(
- UserColorId::MONSTER_ATTACK_RANGE));
+ if (actorManager->isInIgnoreAttackList(mName))
+ {
+ graphics->setColor(userPalette->getColorWithAlpha(
+ UserColorId::IGNORED_MONSTER_ATTACK_RANGE));
+ }
+ else
+ {
+ graphics->setColor(userPalette->getColorWithAlpha(
+ UserColorId::MONSTER_ATTACK_RANGE));
+ }
graphics->fillRectangle(Rect(
x - attackRange, y - attackRange,