Bug - Fixed appearance_rates(location, false) doesn't take combat modifiers into account

Irrat

Member
So appearance_rates.none will reflect the chance of hitting a non-combat, which makes sense.
What doesn't make is the difference between these two outputs. I am running -25 combat.

Code:
> ash appearance_rates($location[The Jungles of    Ancient Loathing], false)

Returned: aggregate float [monster]
none    => 95.0
giant octopus => 0.0
giant bird-creature => 0.0
giant    jungle python => 0.0
giant spider => 0.0
wumpus => 0.0
high    priest of Ki'rhuss => 0.0
ancient guardian statue => 10.0
tribal    goblin => 10.0
jungle baboon => 10.0
evil cultist => 0.0

>    ash appearance_rates($location[The Jungles of Ancient Loathing], true)

Returned:    aggregate float [monster]
none => 95.0
giant octopus => 0.0
giant    bird-creature => 0.0
giant jungle python => 0.0
giant spider    => 0.0
wumpus => 0.0
high priest of Ki'rhuss => 0.0
ancient    guardian statue => 1.6666666666666667
tribal goblin =>    1.6666666666666667
jungle baboon => 1.6666666666666667
evil    cultist => 0.0

If its not obvious, in the first function the three monsters are not sharing the 5% chance of a combat between each other. Instead its using the encounter rate before the combat rate modifier is applied. The base encounter rate is 70%, so 10% only makes sense when my combat rate is 0. But its 25.
The second function call however is accurate and matches expectations.

Taken from the wiki, this doesn't appear to be intended.

Code:
If queue is true, then the monsters currently in the adventuring queue will be considered when determining the likelihood of future encounters. This is better for a real prediction of what monster will actually occur next while not considering the queue is better for modeling theoretical situations.
 

heeheehee

Developer
Staff member
r25983 apparently changed this behavior. Should be an easy enough fix, although it's a little worrying that nobody seems to have noticed in nearly 2 years.
 
Top