Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix target UI regressions caused by #39785 #40221

Merged
merged 4 commits into from
May 6, 2020
Merged

Fix target UI regressions caused by #39785 #40221

merged 4 commits into from
May 6, 2020

Conversation

olanti-p
Copy link
Contributor

@olanti-p olanti-p commented May 6, 2020

Summary

SUMMARY: None

Purpose of change

Fixes #40215
Fixes #40176
Fixes #40243

Describe the solution

Add missing check for spell damage; allow aiming at yourself with spells that consider target_self a valid target; properly select between square/circle distances

Describe alternatives you've considered

Not making bugs is a good alternative I guess

Testing

Casted Bless on myself, received Blessed (torso).
Spawned an NPC, tried to cast Bless on them - nothing happened (not an ally).
Befriended them and tried to casted Bless once again - succeeded. NPC did not become angry, checked NPC's status - the have Blessed (torso).
Tried to cast Cone of Cold on myself - nothing happened (not a valid target).
Casted Cone of Cold on NPC - they got hurt and became angry.
Tried to use steel spear to attack an NPC across a 1-tile diagonal gap - can't reach (range 3 with circular distances). Disabled circular distances, tried again - success.

@KorGgenT KorGgenT added <Bugfix> This is a fix for a bug (or closes open issue) Mods: Magiclysm Anything to do with the Magiclysm mod Ranged Ranged (firearms, bows, crossbows, throwing), balance, tactics labels May 6, 2020
@ZhilkinSerg ZhilkinSerg merged commit 09e6310 into CleverRaven:master May 6, 2020
@olanti-p olanti-p deleted the fix-target-ui-regressions branch May 6, 2020 22:16
@jbytheway
Copy link
Contributor

If you feel inspired to do more, these seem like some excellent things to have unit tests for.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bugfix> This is a fix for a bug (or closes open issue) Mods: Magiclysm Anything to do with the Magiclysm mod Ranged Ranged (firearms, bows, crossbows, throwing), balance, tactics
Projects
None yet
4 participants