From 6eb36763437fbdd210ddcd89d235ed30df574b39 Mon Sep 17 00:00:00 2001 From: Viv Date: Mon, 24 Jul 2023 16:41:34 -0400 Subject: [PATCH] Add double Kusudama test --- README.md | 40 +++++++++---------- src/tja2fumen/types.py | 2 +- .../data/dummy_tjas/notes_double_kusudama.tja | 14 +++++++ testing/test_command_support.py | 1 + 4 files changed, 36 insertions(+), 21 deletions(-) create mode 100644 testing/data/dummy_tjas/notes_double_kusudama.tja diff --git a/README.md b/README.md index 397ef85..7d3fdfa 100644 --- a/README.md +++ b/README.md @@ -59,26 +59,26 @@ If there is an unsupported feature that you would like support for, please make > **Legend**: `✅` = Fully supported, `⚪️` = Ignored, `⚠️` = Incorrect behavior, `❌` = Not supported -| Note/command | tja2fumen | tja2bin | Comments | -|-------------------------------------------------|-----------|---------|----------------------------------------------------------------------| -| `0`, `1`, `2`, `3`, `4` `5`, `6`, `7`, `8`, `9` | `✅` | `✅` | | -| `A`, `B` | `✅` | `❌` | | -| `C`, `D`, `E`, `F`, `G`, `H`, `I` | `⚠️` | `❌` | Replaced by normal notes/rolls in tja2fumen. | -| `9000,`
`9008,` | `⚪️` | `❔` | Double Kusudama note to reset accuracy. | -| `#START`, `#END` | `✅` | `✅` | | -| `#START P1`, `START P2` | `✅` | `❔` | | -| `#MEASURE` | `✅` | `✅` | | -| `#BPMCHANGE` | `✅` | `⚠️` | See https://github.com/Fluto/TakoTako/issues/16 | -| `#DELAY` | `✅` | `❌` | | -| `#SCROLL` | `✅` | `✅` | | -| `#GOGOSTART`, `#GOGOEND` | `✅` | `✅` | | -| `#BARLINEOFF`, `#BARLINEON` | `✅` | `✅` | | -| `#BRANCHSTART` | `✅` | `✅` | | -| `#SECTION` | `✅` | `✅` | | -| `#LEVELHOLD` | `❔` | `❔` | | -| `#N`, `#E`, `#M` | `✅` | `✅` | | -| `#BRANCHEND` | `✅` | `✅` | | -| `#BMSCROLL`, `#LYRIC`,
`#DIRECTION`, etc. | `⚪️` | `❌` | Other simulator-specific chart commands are not currently supported. | +| Note/command | tja2fumen | tja2bin | Comments | +|-------------------------------------------------|-----------|---------|--------------------------------------------------------------------------------------------------| +| `0`, `1`, `2`, `3`, `4` `5`, `6`, `7`, `8`, `9` | `✅` | `✅` | | +| `A`, `B` | `✅` | `❌` | | +| `C`, `D`, `E`, `F`, `G`, `H`, `I` | `⚠️` | `❌` | Replaced by normal notes/rolls in tja2fumen. | +| `9000,`
`9008,` | `⚪️` | `⚠️` | Double Kusudama note treated as 1 drumroll by tja2fumen, but 2 overlapping drumrolls by tja2bin. | +| `#START`, `#END` | `✅` | `✅` | | +| `#START P1`, `START P2` | `✅` | `❔` | | +| `#MEASURE` | `✅` | `✅` | | +| `#BPMCHANGE` | `✅` | `⚠️` | See https://github.com/Fluto/TakoTako/issues/16 | +| `#DELAY` | `✅` | `❌` | | +| `#SCROLL` | `✅` | `✅` | | +| `#GOGOSTART`, `#GOGOEND` | `✅` | `✅` | | +| `#BARLINEOFF`, `#BARLINEON` | `✅` | `✅` | | +| `#BRANCHSTART` | `✅` | `✅` | | +| `#SECTION` | `✅` | `✅` | | +| `#LEVELHOLD` | `❔` | `❔` | | +| `#N`, `#E`, `#M` | `✅` | `✅` | | +| `#BRANCHEND` | `✅` | `✅` | | +| `#BMSCROLL`, `#LYRIC`,
`#DIRECTION`, etc. | `⚪️` | `❌` | Other simulator-specific chart commands are not currently supported. | ## Reporting bugs diff --git a/src/tja2fumen/types.py b/src/tja2fumen/types.py index 5739bd9..df8e612 100644 --- a/src/tja2fumen/types.py +++ b/src/tja2fumen/types.py @@ -232,7 +232,7 @@ class FumenHeader: 'Hard': 7000, 'Oni': 8000}[difficulty] def _get_hp_from_LUTs(self, n_notes, difficulty, stars): - if n_notes > 2500: + if not 0 < n_notes <= 2500: return star_to_key = { 'Oni': {1: '17', 2: '17', 3: '17', 4: '17', 5: '17', diff --git a/testing/data/dummy_tjas/notes_double_kusudama.tja b/testing/data/dummy_tjas/notes_double_kusudama.tja new file mode 100644 index 0000000..919a5db --- /dev/null +++ b/testing/data/dummy_tjas/notes_double_kusudama.tja @@ -0,0 +1,14 @@ +// This song contains only basic notes. +BPM:120 +OFFSET:-1.00 + +COURSE:Oni +LEVEL:10 +BALLOON:8,8 +SCOREINIT:400 +SCOREDIFF:100 + +#START +9000, +9008, +#END diff --git a/testing/test_command_support.py b/testing/test_command_support.py index b6479da..3d9d48e 100644 --- a/testing/test_command_support.py +++ b/testing/test_command_support.py @@ -8,6 +8,7 @@ from conftest import convert @pytest.mark.parametrize('id_song,err_msg', [ ['basic_song', None], + ['notes_double_kusudama', None], ['notes_hands', None], ['notes_sim_only', None], ['missing_score', None],