Bug - Fixed crystalBallMonster incorrectly reset

ckb

Minion
Staff member
In some cases, "crystalBallMonster" will be incorrectly reset to nothing (the property will be cleared) when the prediction is still true.

I believe this happens when the prediction gets set during a free turn (such as a free banish) and the next single turn is in the same location, "crystalBallLocation"
 

gausie

D̰͕̝͚̤̥̙̐̇̑͗̒e͍͔͎͈͔ͥ̉̔̅́̈l̠̪̜͓̲ͧ̍̈́͛v̻̾ͤe͗̃ͥ̐̊ͬp̔͒ͪ
Staff member
The whole thing needs implemented differently, as each location can have a concurrent prediction. We need to be able to track free noncombats to do it fully accurately
 

ckb

Minion
Staff member
Two possible options that would allow a scripter to parse or script around the predictions :

A single preference, "crystalBallPrediction" or some such, that is a delimited list of location, monster, and turncount of when that prediction happened. It could just add to any existing list:
"LocationA:MonsterA:TurnA|LocationB:MonsterB:TurnB|LocationC:MonsterC:TurnC"

Option 2 would be to add a set of proxy records to each location, one for crystalBallMonster, one for crystalBallTurn
 

fredg1

Member
A single preference, "crystalBallPrediction" or some such, that is a delimited list of location, monster, and turncount of when that prediction happened. It could just add to any existing list:
"LocationA:MonsterA:TurnA|LocationB:MonsterB:TurnB|LocationC:MonsterC:TurnC"
I did exactly that
 

Attachments

  • CrystalBallManager.java.patch
    8.2 KB · Views: 0

gausie

D̰͕̝͚̤̥̙̐̇̑͗̒e͍͔͎͈͔ͥ̉̔̅́̈l̠̪̜͓̲ͧ̍̈́͛v̻̾ͤe͗̃ͥ̐̊ͬp̔͒ͪ
Staff member
This is now merged r25998 - please see the announcements for the new preference
 

ckb

Minion
Staff member
Thank you! Looing forward to untangling the Orb mess even more in my script now.
 

fewyn

Administrator
Staff member
Code:
> Task :test

FightRequestTest > crystalBallPredictions() FAILED
    org.opentest4j.AssertionFailedError at FightRequestTest.java:173

ChatRequestTest > isShouldBuildAModernChatRequest() FAILED
    org.opentest4j.AssertionFailedError at ChatRequestTest.java:70

ChatRequestTest > isShouldBuildAnOlderChatRequest() FAILED
    org.opentest4j.AssertionFailedError at ChatRequestTest.java:80

744 tests completed, 3 failed, 7 skipped

> Task :test FAILED
 

gausie

D̰͕̝͚̤̥̙̐̇̑͗̒e͍͔͎͈͔ͥ̉̔̅́̈l̠̪̜͓̲ͧ̍̈́͛v̻̾ͤe͗̃ͥ̐̊ͬp̔͒ͪ
Staff member
Code:
> Task :test

FightRequestTest > crystalBallPredictions() FAILED
    org.opentest4j.AssertionFailedError at FightRequestTest.java:173

ChatRequestTest > isShouldBuildAModernChatRequest() FAILED
    org.opentest4j.AssertionFailedError at ChatRequestTest.java:70

ChatRequestTest > isShouldBuildAnOlderChatRequest() FAILED
    org.opentest4j.AssertionFailedError at ChatRequestTest.java:80

744 tests completed, 3 failed, 7 skipped

> Task :test FAILED
These aren't failing vocally or on GitHub. Can you post the test output?
 

fronobulax

Developer
Staff member
Given the quantity of work I did to fix leaks as well as the fact that this isn't happening locally I think I'd like to know more.
 

heeheehee

Developer
Staff member
I saw pwd mismatch issues in ChatRequestTest and turncount mismatch in FightRequest, I can look into it
 

heeheehee

Developer
Staff member
Yep. Both of these are leaking from the charpane decorator tests (which parse `var turnsthisrun = 236` from the javascript, and set GenericRequest.passwordHash = abc123).
 

fronobulax

Developer
Staff member
Yep. Both of these are leaking from the charpane decorator tests (which parse `var turnsthisrun = 236` from the javascript, and set GenericRequest.passwordHash = abc123).
OK. AFAIK the charpane test was added within the last 24 hours so that explains at least part of the reason why it pops up now. I'll put the clean up on my list although I am not working through my list as quickly as I'd like. If someone does it first, that's fine.
 
Top