Commit graph

20 commits

Author SHA1 Message Date
eb924c14c2 Change how we handle seed codes
Rather than "normalize" seed codes to BCEX format (which causes issues
with delimiter usage in some scenarios), leave the seed code alone and
break its data out into fields that can/should be parsed instead.
2024-10-09 16:32:08 -07:00
4b72709ae8 Small formatting changes 2024-10-09 16:06:13 -07:00
c782c3a79b Make character command data consistent typing
Previously a character's command data could be a list or a dict
depending on if command randomization was on. This resulted in having to
inspect the object and determine its type in tools using the output.

This change guarantees character command data will be a dict of
name->description. The description is pulled from the COMMANDS section
of the spoiler log. If it doesn't exist (or the command is not present,
which should never happen), the description will simply be the command
name again.
2024-10-09 15:47:15 -07:00
087025fdd4 Code cleanup and version bump
- Tidy parse_MONSTERS and use a loop for all the sub-sections that use
the same logic rather than repeat the logic over and over.
- Docstring and type hint everything
- Use Pathlib for opening the log file
- Use `.values()` instead of `.items()` where I only want values
- Bump to 0.3
2024-10-07 03:10:01 -07:00
e26f849215 Fix crash of a monster's name contains "Level" 2024-10-07 02:25:50 -07:00
db4091f41f Make pyright shut up about dicts
Apparently if you create a dict with pre-populated data, pyright infers
the dict's types for type checking purposes, and this can be wrong here
where my data dicts are massive sprawling affairs of dynamic info.

The right thing to do is probably turn this into a class, but for now
I'll just split the dicts pyright complains about up differently.
2024-10-06 18:59:19 -07:00
0954975374 Fix crash if BCCE log lacks a COMMANDS section 2024-10-06 16:41:16 -07:00
62978cf9f0 Update gitignore to include FF3.* format logs 2024-06-30 23:00:08 -07:00
9c3c02d959 Update readme to mention BCCE support 2024-06-30 22:59:21 -07:00
86f6e85785 Add monster and BCCE Remonsterate support
- Monster data for all versions
- Remonsterate data added to MONSTERS section for BCCE with remons on
2024-06-30 22:47:27 -07:00
9a5b27e744 Parse the BCCE Secret Items section 2024-06-30 22:02:46 -07:00
49d5e1260f Add seed and version info to output
- Add seed
- Normalize seed code to BCEX format
- Add is_bcce
- Bump version to 0.2
2024-06-30 21:51:44 -07:00
8697253ea6 Comment STATS code, misc lint fixes 2024-06-30 21:41:28 -07:00
9f7b525683 Support BCCE and its distinct STATS block
For now this just brings us to parity so a BCCE spoiler log will produce
the same JSON output as a BCEX log. More testing needed on how else BCCE
differs.
2024-06-30 21:26:11 -07:00
eb20e0561d Format pass 2024-06-30 20:55:47 -07:00
305d44bc1b Add readme and authorship variables 2021-03-28 19:44:31 -07:00
b7b8a08f77 Fix glitch in command string handling
Due to inconsistent structure of spoiler logs, r- spells with "Equal
chance of any of the following" could end a line with a ':;". This just
find-and-replaces ':;' with ':' because that should never happen in
reality.
2021-03-28 19:12:58 -07:00
48f38d9672 Clean up command hash generation
Rather than COMMANDS and its join to CHRACTERS['commands'] be a messy
cluster of \n, do some string parsing to make it look much cleaner and
more readable.
2021-03-28 19:07:41 -07:00
cf1d7c0703 Initial commit 2021-03-27 23:44:02 -07:00
9ad4b01c32 Initial commit 2021-03-28 06:13:23 +00:00