Change the default value of atk, def to Empty (-1) #21
Merged
Conversation
There was a problem hiding this comment.
⚠️ Not ready to approve
The UI currently displays unknown ATK/DEF (-2) as “-2” instead of “?”, and the updated readmes don’t fully document the new blank/0 ATK/DEF search semantics.
Pull request overview
This PR updates DataEditorX to treat ATK/DEF default values as “empty” (-1) in the editor, and adjusts search/save behavior so blank ATK/DEF inputs are interpreted as “no filter” while still supporting unknown (-2 / ?) values.
Changes:
- Introduces
Card.Emptyand changesCard’s defaultatk/definitialization to-1. - Updates the editor UI to display blank ATK/DEF and ID/alias when values are “empty”/zero, and updates parsing so blank ATK/DEF maps to
-1. - Updates database parameter binding and search condition building to account for the new “empty” sentinel behavior.
File summaries
| File | Description |
|---|---|
| DataEditorX/readme.txt | Updates Chinese documentation for ATK/DEF search behavior (currently incomplete for new semantics). |
| DataEditorX/readme_english.txt | Updates English documentation for card search (currently missing key cases; also contains a typo). |
| DataEditorX/DataEditForm.Designer.cs | Removes default "0" text values from ATK/DEF/ID/alias textboxes. |
| DataEditorX/DataEditForm.cs | Implements new empty/unknown parsing and blank rendering for ATK/DEF and IDs; improves binding update for strs. |
| DataEditorX/Core/Database.cs | Maps -1 to 0 on write; updates ATK/DEF query conditions to treat -1 as “no filter”. |
| DataEditorX/Core/Card.cs | Adds Card.Empty and changes default atk/def initialization to -1. |
Copilot's findings
Files not reviewed (1)
- DataEditorX/DataEditForm.Designer.cs: Generated file
- Files reviewed: 5/6 changed files
- Comments generated: 5
Note
Your feedback helps us improve the quality of this feature.
Please use 👍 or 👎 to tell us whether this assessment is correct.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| If there is a "0", input"-1"or"." | ||
| If there is a "?", input"-2"or"?" | ||
| 4. Search by card name: | ||
| 1. You can search card with card name/effect/Attribute/Types/Level(racnk)/effect type/card id |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.