Viewing Issue Simple Details Jump to Notes ] Wiki ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0009733 [DCSS] Bug Report minor have not tried 2015-05-20 04:22 2015-07-24 04:41
Reporter triorph View Status public  
Assigned To doy
Priority normal Resolution done  
Status resolved   Product Branch 0.17 ancient branch
Summary 0009733: -5 EV penalty picked up by sequell when winning the game
Description When finishing a game, there is a -5 EV penalty applied to your char on the last action, when picked up by sequell.

For example:

!lg doubtofbuddha VSHu won x=ac,ev

1. [ac=46;ev=29] doubtofbuddha the Slayer (L27 VSHu of Trog), escaped with the Orb and 3 runes on 2015-05-20 01:28:25, with 1775207 points after 60430 turns and 5:39:40.

Yet the log file shows:

Health: 161/161 AC: 46 Str: 24 XL: 27
Magic: 35/35 EV: 34 Int: 14 God: Trog [******]
Gold: 3122 SH: 16 Dex: 22 Spells: 0 memorised, 26 levels left

Its possible this is related to a -5 EV penalty when "climbing stairs", but I'm only speculating.
Additional Information
Tags No tags attached.
Attached Files txt file icon patch.txt [^] (493 bytes) 2015-07-23 06:40 [Show Content]
? file icon 0001-Clear-all-delays-on-non-death-leaving-the-game-clear.patch [^] (829 bytes) 2015-07-23 07:13 [Show Content]
? file icon 0001-Clear-the-stairs-before-calculating-the-scorefile-en.patch [^] (891 bytes) 2015-07-24 03:26 [Show Content]

- Relationships

-  Notes
(0029075)
PleasingFungus (administrator)
2015-05-20 04:38

Yeah, it's definitely the stair EV penalty. I think the 'won game' milestone is getting emitted before the stair penalty is being cleared, but I'm not familiar enough with the code to fix it.
(0029076)
Rast (reporter)
2015-05-21 00:57

Just remove the stair EV penalty already.
(0029343)
triorph (reporter)
2015-07-23 06:40

I decided to take a look in to this. in end_game (in end.cc) there are the lines

else
    you.delay_queue.clear(); // don't lose ev for taking the exit...

so I've added a similar line to ouch() in ouch.cc, with patch uploaded.
(0029344)
doy (developer)
2015-07-23 07:55

Did this work when you tested it? It doesn't seem to make a difference for me. It seems like a better option would be to just tell the game to ignore EV penalties when calculating the evasion to store in the log file. scorefile_entry::init() calls you.evasion() with no args, but player::evasion() takes an optional arg to tell it which kinds of EV penalties to ignore. Populating this properly will probably be a lot more robust to possible changes in the future (as well as hopefully also working!(: )
(0029345)
triorph (reporter)
2015-07-23 12:19

I might have to work a bit harder on this, but I'm not sure that's 100% the answer. If the player actually dies to a monster hit while ascending the stairs, then I think the log should include that penalty in the final EV.
(0029346)
triorph (reporter)
2015-07-24 02:44

the you.evasion() is called when the scorefile entry is instantiated (not when the log save is called), so I think moving the delay_queue.clear() to above the scorefile_entry line should do the trick. Am having trouble figuring out exactly how to test this though, so will wait until I've done that before submitting the patch.
(0029347)
doy (developer)
2015-07-24 02:55

I tested it by starting a wizmode game, creating the orb, and then using the save file editor (./crawl -edit-save) to turn the wizmode bit back off. You could probably just comment out the code that prevents wizmode games from ending up in the scorefile though.
(0029348)
triorph (reporter)
2015-07-24 02:57

My confusion was how to access the logfile. This bug actually occurred in every instance of leaving via the stairs (e.g. ktyp=leaving as well as ktyp=winning). I've figured it out and yes this latest patch fixes it, so just formatting it for submission now.
(0029349)
doy (developer)
2015-07-24 04:41

Applied as 7a1422d3, thanks!

- Issue History
Date Modified Username Field Change
2015-05-20 04:22 triorph New Issue
2015-05-20 04:38 PleasingFungus Note Added: 0029075
2015-05-21 00:57 Rast Note Added: 0029076
2015-07-23 06:40 triorph Note Added: 0029343
2015-07-23 06:40 triorph File Added: patch.txt
2015-07-23 07:13 triorph File Added: 0001-Clear-all-delays-on-non-death-leaving-the-game-clear.patch
2015-07-23 07:55 doy Note Added: 0029344
2015-07-23 12:19 triorph Note Added: 0029345
2015-07-24 02:44 triorph Note Added: 0029346
2015-07-24 02:55 doy Note Added: 0029347
2015-07-24 02:57 triorph Note Added: 0029348
2015-07-24 03:26 triorph File Added: 0001-Clear-the-stairs-before-calculating-the-scorefile-en.patch
2015-07-24 04:41 doy Note Added: 0029349
2015-07-24 04:41 doy Status new => resolved
2015-07-24 04:41 doy Fixed in Branch => 0.17 development branch
2015-07-24 04:41 doy Resolution open => done
2015-07-24 04:41 doy Assigned To => doy


Mantis 1.1.8[^]
Copyright © 2000 - 2009 Mantis Group
Powered by Mantis Bugtracker