fix: character death entry with lowercased of-creature#505
Conversation
|
There was a problem hiding this comment.
Pull Request Overview
This pull request fixes character death entry parsing for creature names that contain the preposition "of" by making the creature detection case-insensitive. It also adds comprehensive test coverage for a specific character's death data parsing.
- Improved case-insensitive creature name detection in killer parsing logic
- Added comprehensive test coverage for character death data parsing with "Tirador Azteca" test case
Reviewed Changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/TibiaCharactersCharacter.go | Modified containsCreaturesWithOf function to convert input to lowercase before matching |
| src/TibiaCharactersCharacter_test.go | Added TestNumber18 with detailed death data validation for "Tirador Azteca" character |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #505 +/- ##
=======================================
Coverage 80.30% 80.30%
=======================================
Files 22 22
Lines 3697 3697
=======================================
Hits 2969 2969
Misses 587 587
Partials 141 141 🚀 New features to boost your workflow:
|



This pull request improves the handling of creature names in the killer parsing logic and adds a new comprehensive test case to verify death data parsing for a specific character. The main changes focus on increasing the robustness of string matching for special creatures and expanding test coverage for death parsing scenarios.
Parsing improvements:
containsCreaturesWithOffunction now converts input strings to lowercase before matching, making creature name detection case-insensitive and more reliable.Test coverage enhancements:
TestNumber18insrc/TibiaCharactersCharacter_test.gothat verifies the parsing of death data for the character "Tirador Azteca," including detailed checks for killer names, death reasons, levels, and timestamps.fix #504