Skip to content

Lumenstone score calculation on loss fix - #808

Merged
tmewett merged 3 commits into
tmewett:masterfrom
HangryHippo:LumenScoreLossFix
Jun 27, 2026
Merged

tmewett merged 3 commits into
tmewett:masterfrom
HangryHippo:LumenScoreLossFix

Conversation

@HangryHippo

Copy link
Copy Markdown
Contributor

Fixed the lumenstone score calculation on death.

I copied the winning score calculation code across, making an adjustment to a variable name (gemCount to numGems).

I tested it with a recording converted to a save and rewinded 1 turn (on 1.14.1). It recorded the score correctly. It should work correctly for 1.15.1.

This is for issue #805.

Fixed the lumenstone score calculation on death.
@HangryHippo HangryHippo changed the title Update RogueMain.c Lumenstone score calculation on loss fix Mar 1, 2026

@brturn brturn left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor cleanup, otherwise looks good.

Comment thread src/brogue/RogueMain.c Outdated
// Count gems as 500 gold each
short numGems = numberOfMatchingPackItems(GEM, 0, 0, false);
short numGems = 0;
for (i = 4, theItem = packItems->nextItem; theItem != NULL; theItem = theItem->nextItem) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’m not seeing any references to ‘i’ in this loop, you can remove the ‘i = 4’ from the loop initializer.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I simply copied line 1274/1279 across making minimal changes. Yeah, it works without 'i=4'. Will fix up.

@HangryHippo
HangryHippo requested a review from brturn March 3, 2026 11:02

@brturn brturn left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Now @tmewett will decide which release to add this to. Since it affects game behavior, it may have to wait for the next version (1.16).

@tmewett

tmewett commented Mar 8, 2026

Copy link
Copy Markdown
Owner

Yeah, this can stay on 'master' for 1.16. I think it needs a change file in changes/ though; see the contribution guide

@HangryHippo

Copy link
Copy Markdown
Contributor Author

Yeah, this can stay on 'master' for 1.16. I think it needs a change file in changes/ though; see the contribution guide

OK. I added a changes file to the changes/ folder in my branch.

@tmewett tmewett linked an issue Jun 27, 2026 that may be closed by this pull request
@tmewett
tmewett merged commit fd8b6ff into tmewett:master Jun 27, 2026
@HangryHippo
HangryHippo deleted the LumenScoreLossFix branch October 21, 2026 03:45
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.

Lumenstone score calculated incorrectly for losing

3 participants