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

Added test for morale check for ranged kill of unaware hostile bandit #78593

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Night-Pryanik
Copy link
Contributor

Summary

None

Purpose of change

@RenechCDDA in #78371 revealed to me that there's a test for morale for killing hostile bandits, but that test is conducting a melee attack versus already angry hostile bandit. I decided to add a test for stealth-ranged-killing of unaware hostile bandit.

Describe the solution

Added a test. Set the time to midnight so bandit won't be able to see us, and give an avatar a debug clairvoyance to clearly see the target to simulate player having some sort of night vision mutation.

Describe alternatives you've considered

None.

Testing

Locally test is completed without any error. Let's see what online tests say.

Additional context

This is my first time I'm writing a test, I hope I've done everything right.

@Night-Pryanik Night-Pryanik added [C++] Changes (can be) made in C++. Previously named `Code` Ranged Ranged (firearms, bows, crossbows, throwing), balance, tactics Mechanics: Character / Player Character / Player mechanics Code: Debug Debugging and troubleshooting the game, also includes the debug menu labels Dec 15, 2024
@github-actions github-actions bot added Code: Tests Measurement, self-control, statistics, balancing. json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels Dec 15, 2024
@mqrause
Copy link
Contributor

mqrause commented Dec 27, 2024

I believe you mixed up the uses of CHECK and REQUIRE. It's not super problematic since the test as a whole passes or fails all the same. The biggest difference is that a test stops running when a REQUIRE fails, because it's a prerequisite for what you want to test and continuing doesn't make sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions [C++] Changes (can be) made in C++. Previously named `Code` Code: Debug Debugging and troubleshooting the game, also includes the debug menu Code: Tests Measurement, self-control, statistics, balancing. json-styled JSON lint passed, label assigned by github actions Mechanics: Character / Player Character / Player mechanics Ranged Ranged (firearms, bows, crossbows, throwing), balance, tactics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants