New Content January 2021 IotM - Miniature Crystal Ball

Malibu Stacey

Active member
Code:
--------------------
10730    miniature crystal ball    320248255    famball.gif    familiar        0
# Item miniature crystal ball: Randomly gives you either +50% Item Drops or +5 Stats After Combat<p>Shows which monster you will encounter next
Item    miniature crystal ball    Initiative: +50, Generic
--------------------
--------------------
10729    packaged miniature crystal ball    347350648    famballbox.gif    usable    t    0
# Item packaged miniature crystal ball
--------------------

Yes it's familiar equipment.
 
Last edited:

gausie

D̰͕̝͚̤̥̙̐̇̑͗̒e͍͔͎͈͔ͥ̉̔̅́̈l̠̪̜͓̲ͧ̍̈́͛v̻̾ͤe͗̃ͥ̐̊ͬp̔͒ͪ
Staff member
I think this is now fully supported in r20596.

Two new prefs (crystalBallMonster and crystalBallLocation) will track the monster predicted at the given location. They're set to empty when the prediction is invalidated.
 

Erosion

Member
crystalBallLocation and crystalBallMonster have been unable to parse the prediction since the change was made to trigger on the first round of combat instead of the last
 

gausie

D̰͕̝͚̤̥̙̐̇̑͗̒e͍͔͎͈͔ͥ̉̔̅́̈l̠̪̜͓̲ͧ̍̈́͛v̻̾ͤe͗̃ͥ̐̊ͬp̔͒ͪ
Staff member
crystalBallLocation and crystalBallMonster have been unable to parse the prediction since the change was made to trigger on the first round of combat instead of the last
r20618
 

fredg1

Member
I've been trying to make a patch for this, but I'm currently stuck.

The logic itself is finished (i.e. the class & methods to call), and the in-fight parsing works (which is actually mostly gausie's), but where I'm stuck at is finding where to put the call to one of the methods.

Context:
  • KoL-wise, it seems like predictions are handled by adventure.php.
  • predictions are zone-specific
  • you can have multiple zones at once with a prediction waiting to happen
  • predictions are only discarded if you spend a turn in an adventure.php (to confirm) zone other than the zone in which the prediction applied.

What I'm looking for is pretty straightforward: a point in the code where we have a confirmation that a turn was spent, but where we also know how that turn started.

I can't seem to find even the former? The only thing I found that updated turns spent was calls to charsheet.php and charpane.php?
If this is really the only way mafia has to tell a turn happened, is it possible to know what the most recent adventure was from there?
 

lostcalpolydude

Developer
Staff member
It is as much of a pain as you suspect. This is why location.turns_spent is incorrectly tracked sometimes; it's very hard to tell if a noncombat took a turn (and sometimes that depends on the timing of page loads I think, which can vary depending on whether it's manual adventuring (for charpane.php) versus automated (for api.php)...), and I gave up trying to handle the edge cases. It's only more recently that KoL reported whether a combat was free; by then (the end of combat), something like lastLocation might be able to tell whether it was adventure.php, but I'm not very confident about that.
 

Erosion

Member
Sometime earlier this year, side pane and maximizer started counting crystal ball as +25% item (when it's actually either 0% or 50%).
Even though it plays out like 25% in practice, this is very misleading when trying to do stat tests (eg 8-bit) or when trying to guarantee drops from specific monsters.
Does anyone know when or why this change was made?
 

Ryo_Sangnoir

Developer
Staff member
On Mar 4, I added the miniature crystal ball's sporadic enchantments: before that, they weren't known about at all. For maximizer, we value sporadics (damage aura, experience, meat, item) at the average value, and have done for a long time (even if there are cases where this isn't a good idea).

I don't think side pane should be counting crystal ball at all.
 
Top