richardwilkes / gcs_master_library

GCS Master Library
Mozilla Public License 2.0
61 stars 80 forks source link

Fix parry and block missing from v5.19.0-v5.20.0 edits #269

Closed fishface60 closed 11 months ago

fishface60 commented 11 months ago

This mechanically fixes the missing Block and Parry scores for Basic Set and Goblins equipment.

for f in Basic\ Set/Basic\ Set\ Equipment.eqp Fantasy\ Folk/Goblins\ and\ Hobgoblins/Equipment/Goblin\ Equipment.eqp; do jq --tab 'walk(if (type=="object" and .type=="melee_weapon" and (.parry == null or .block==null)) then {block: "0", parry: "0"} + . else . end)' "$f" >"$f.new" && mv "$f.new" "$f" && gcs --convert "$f"; done

This is sufficient on its own, though gcs --convert currently also adds parry and block scores to ranged attacks, so I've filtered those changes out of the patch.

richardwilkes commented 11 months ago

Argh! I thought I checked that after making that last change. It won't hurt anything, but it is annoying.

richardwilkes commented 11 months ago

... and it looks like the fix I made doesn't cover all the cases I thought it did for the old data. :-(

fishface60 commented 11 months ago

I've updated to the v5.20.2 format. Apart from now omitting the "parry": "No" this also removes the "level" and "block" fields from the "calc" part of cloaks, which appears to be fine.