JOverseer / joverseer

JOverseer is a desktop application which aims to assist players of the Middle Earth PBM game.
BSD 3-Clause "New" or "Revised" License
3 stars 5 forks source link

585 showing up as duplicate skill order in Order Checker #685

Open ravenzachary opened 5 years ago

ravenzachary commented 5 years ago

585 - Uncover Secrets (Uncover) is showing up as a duplicate skill order in red in the Order Checker if your Emissary is doing an Emissary skill order, such as creating a camp.

585 is not a Emissary skill order, it's an Emissary miscellaneous order.

ravenzachary commented 4 years ago

This is still a bug in JOverseer.

The release notes for 1.16.17 list "* Enh: Orderchecker should now be checking for duplicate skills."

...but it looks like that 585 was not updated for this.

GnarlyDave commented 4 years ago

Some notes to myself while I work out a solution. ah, I 'fixed' something related a while ago and conflated the issue. My 'fix' for spotting duplicate skill orders: eg using two emmy orders was : to expand the ruleset.csv for the RANK rule which is the rule to make sure that you have the minimum relevant skill for an order. The extension was to add an optional 'exclusive' flag. If this flag is set, then only one order of that order number is allowed per character. And (the relevant bit here) it checks for other orders from the same character, and checks for any RANK rules with the same skill. For example, a character checking the other order (say 520) EM rule, is marked as exclusive, so it looks through the rest of the orders, finds a 585 which also has a RANK EM rule and complains that it's a duplicate. orderchecker/Rule.java(2764) One issue is that the RANK rule doesn't distinguish between Misc rules, and Skills. options so far:

  1. Encode Misc 'not-a-skill' explicitly. con: lots of changes.
  2. Add yet another optional parameter to the Rank rule.
  3. Hack an extension to the 'exclusive' flag, which currently is 0/non-zero, eg make it just look at bit0, and use bit1 to indicate that it is a non-match when matching skills.
GnarlyDave commented 3 years ago

I just checked by asking Galadriel to issue 3 585 orders in 1.16.18

GnarlyDave commented 3 years ago

doh.

ravenzachary commented 3 years ago

Does the error show up with a 520 and 585 together? This was my most common condition to show the error.