From 6243e38c2f13754d11b750ffee069dd1542f905e Mon Sep 17 00:00:00 2001 From: ewew ukek Date: Wed, 20 Mar 2024 23:59:46 +0000 Subject: 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 **** --- src/being/being.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/being') 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, -- cgit v1.2.3-70-g09d2