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 bug where mercy or nike cross is erroneously awarded for instance… #1179

Merged
merged 3 commits into from Apr 10, 2018

Conversation

DoxaLogosGit
Copy link
Contributor

@DoxaLogosGit DoxaLogosGit commented Apr 8, 2018

The Nike cross and the mercy cross are only supposed to be awarded to the soldier who single-handedly either kills all the aliens or stuns all the aliens on a mission respectively. This fixes the problem by at least insuring that the aliens were either all killed or all stunned. Before this fix, a soldier could get the mercy cross by stunning all the stunned aliens, but not all aliens in the mission were stunned. Same for kills.

…s where someone gets all the kills and someone else gets all the stuns in a single mission (supposed to be all aliens killed or stunned by single person)
@SupSuper
Copy link
Member

SupSuper commented Apr 9, 2018

What happens if a soldier kills+stuns every alien on a mission?

@DoxaLogosGit
Copy link
Contributor Author

DoxaLogosGit commented Apr 9, 2018

Let me do another test run, but should be no award. In theory, might need to be a new award, since nike implies kill all aliens and mercy implies stun all aliens based on their descriptions. You can't both kill all and stun all at the same time, just kill some and stun some but knock down all.

@DoxaLogosGit
Copy link
Contributor Author

DoxaLogosGit commented Apr 9, 2018

Ran test. No medal as expected. I can handle this two ways: implement a new award for taking out all the aliens with whatever means necessary, or I may have to edit the commendations. I was trying to avoid changing the mod too much, since I didn't write it or the code to go with it. I'm just trying to fix obvious errors based on their descriptions per Meridian's request. Should I see if can get in contact with Shoes?

EDIT: Third option suggested to me by IvanDogovich: Let nike cross be "eliminate all" award that includes both stun and kill (since nike is easier) and let mercy still be stun all since stunning all is harder to obtain. This solution would require less changes over all. 2 lines of code in DebriefingState.cpp to implement over current PR, one comment in BattleUnitStatistics.h and two lines in Commendations.

@MeridianOXC
Copy link
Member

I like Ivan's proposal. Nike cross for "eliminate (=stun or kill) all" and Mercy cross for "stun all".

@SupSuper
Copy link
Member

SupSuper commented Apr 9, 2018

I approve. Let's go with door number 3.

While you're there, please change "if (aliensKilled)" to "if (aliensKilled == 0)", as mixing ints and bools is kinda confusing.

@DoxaLogosGit
Copy link
Contributor Author

Okay. I'll do that. Both door number 3 and fix aliensKilled (aliensStunned).

@DoxaLogosGit
Copy link
Contributor Author

Done, and done

@SupSuper SupSuper merged commit 80d8e9f into OpenXcom:master Apr 10, 2018
@DoxaLogosGit DoxaLogosGit deleted the commendation_fixes branch April 10, 2018 01:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants