Viewing Issue Advanced Details Jump to Notes ] Wiki ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0008272 [DCSS] Source Cleanup minor N/A 2014-03-14 02:27 2014-03-15 07:17
Reporter Reaver View Status public  
Assigned To gammafunk
Priority normal Resolution done Local or Remote Both
Status resolved   Operating System All
Projection none   Console or Tiles Both
ETA none Fixed in Branch 0.14 ancient branch Product Branch 0.14 ancient branch
  Product Version
Summary 0008272: Clean-up selecting the item type for miscellaneous acquirement.
Description The old function was mess. This clean-up changes the outcome in less than 1% of cases. This makes miscellaneous aquirement easier to change in case new miscellaneous items are added or somebody wants to make it a viable option.
Steps To Reproduce
Additional Information
Tags No tags attached.
Attached Files ? file icon misc_acquire_clean_up.patch [^] (4,347 bytes) 2014-03-14 22:53 [Show Content]

- Relationships

-  Notes
(0025608)
Reaver (developer)
2014-03-14 22:54

Added an updated attachment and deleted the old one.
(0025621)
gammafunk (administrator)
2014-03-15 07:17

Thanks! In 0.14-a0-3320-geb0b70c is a commit based on your patch (random_choose_weighted() and the cboe formula) and a discussion in ##crawl-dev as to what the item weights should be. I keep a single function here because the functions you created are really just simple code blocks that work fine in the parent function. Using a functions for code blocks works better when the blocks are larger and are more secondary or isolated from the surrounding code. For a weighted list like this it's better to just see everything.

Also, something that I initially copied from your patch and didn't catch :)

23:35:10 <|amethyst> err
23:35:31 <|amethyst> if (x_chance_in_y(skills, MAX_SKILL_LEVEL^2)
23:35:44 <|amethyst> that's not how you square things in C++

- Issue History
Date Modified Username Field Change
2014-03-14 02:27 Reaver New Issue
2014-03-14 02:27 Reaver File Added: misc_acquire.patch
2014-03-14 22:53 Reaver File Added: misc_acquire_clean_up.patch
2014-03-14 22:53 Reaver File Deleted: misc_acquire.patch
2014-03-14 22:54 Reaver Note Added: 0025608
2014-03-15 07:17 gammafunk Note Added: 0025620
2014-03-15 07:17 gammafunk Note Deleted: 0025620
2014-03-15 07:17 gammafunk Note Added: 0025621
2014-03-15 07:17 gammafunk Status new => resolved
2014-03-15 07:17 gammafunk Fixed in Branch => 0.14 development branch
2014-03-15 07:17 gammafunk Resolution open => done
2014-03-15 07:17 gammafunk Assigned To => gammafunk


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