mirror of
https://github.com/mwisnowski/mtg_python_deckbuilder.git
synced 2025-12-17 08:00:13 +01:00
feature: added 'Web-slinging' tag to tagger modules
This commit is contained in:
parent
0dd5b4cf64
commit
37583ba0c5
4 changed files with 31 additions and 10 deletions
|
|
@ -38,6 +38,7 @@ This format follows Keep a Changelog principles and aims for Semantic Versioning
|
||||||
- Protection scope filtering in deck builder (feature flag: `TAG_PROTECTION_SCOPE`) intelligently selects board-relevant protection
|
- Protection scope filtering in deck builder (feature flag: `TAG_PROTECTION_SCOPE`) intelligently selects board-relevant protection
|
||||||
- Phasing cards with "Your Permanents:" or "Targeted:" metadata now tagged as Protection and included in protection pool
|
- Phasing cards with "Your Permanents:" or "Targeted:" metadata now tagged as Protection and included in protection pool
|
||||||
- Metadata tags temporarily visible in card hover previews for debugging (shows scope like "Your Permanents: Hexproof")
|
- Metadata tags temporarily visible in card hover previews for debugging (shows scope like "Your Permanents: Hexproof")
|
||||||
|
- Web-slinging tagger function to identify cards with web-slinging mechanics
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- Card tags now split between themes (for deck building) and metadata (for diagnostics)
|
- Card tags now split between themes (for deck building) and metadata (for diagnostics)
|
||||||
|
|
|
||||||
|
|
@ -6,13 +6,13 @@
|
||||||
- Keyword normalization reduces specialty keyword noise by 96% while maintaining theme catalog quality
|
- Keyword normalization reduces specialty keyword noise by 96% while maintaining theme catalog quality
|
||||||
- Protection tag now focuses on cards that grant shields to others, not just those with inherent protection
|
- Protection tag now focuses on cards that grant shields to others, not just those with inherent protection
|
||||||
- Web UI improvements: faster polling, fixed progress display, and theme refresh stability
|
- Web UI improvements: faster polling, fixed progress display, and theme refresh stability
|
||||||
- **Protection System Overhaul**: Comprehensive enhancement to protection card detection, classification, and deck building
|
- Comprehensive enhancement to protection card detection, classification, and deck building
|
||||||
- Fine-grained scope metadata distinguishes self-protection from board-wide effects ("Your Permanents: Hexproof" vs "Self: Hexproof")
|
- Fine-grained scope metadata distinguishes self-protection from board-wide effects ("Your Permanents: Hexproof" vs "Self: Hexproof")
|
||||||
- Enhanced grant detection with Equipment/Aura patterns, phasing support, and complex trigger handling
|
- Enhanced grant detection with Equipment/Aura patterns, phasing support, and complex trigger handling
|
||||||
- Intelligent deck builder filtering includes board-relevant protection while excluding self-only and type-specific cards
|
- Intelligent deck builder filtering includes board-relevant protection while excluding self-only and type-specific cards
|
||||||
- Tiered pool limiting focuses on high-quality staples while maintaining variety across builds
|
- Tiered pool limiting focuses on high-quality staples while maintaining variety across builds
|
||||||
- Improved scope tagging for cards with keyword-only protection effects (no grant text, just inherent keywords)
|
- Improved scope tagging for cards with keyword-only protection effects (no grant text, just inherent keywords)
|
||||||
- **Tagging Module Refactoring**: Large-scale refactor to improve code quality and maintainability
|
- Large-scale refactor to improve code quality and maintainability
|
||||||
- Centralized regex patterns, extracted reusable utilities, decomposed complex functions
|
- Centralized regex patterns, extracted reusable utilities, decomposed complex functions
|
||||||
- Improved code organization and readability while maintaining 100% tagging accuracy
|
- Improved code organization and readability while maintaining 100% tagging accuracy
|
||||||
|
|
||||||
|
|
@ -31,6 +31,7 @@
|
||||||
- Protection scope filtering in deck builder (feature flag: `TAG_PROTECTION_SCOPE`) intelligently selects board-relevant protection
|
- Protection scope filtering in deck builder (feature flag: `TAG_PROTECTION_SCOPE`) intelligently selects board-relevant protection
|
||||||
- Phasing cards with "Your Permanents:" or "Targeted:" metadata now tagged as Protection and included in protection pool
|
- Phasing cards with "Your Permanents:" or "Targeted:" metadata now tagged as Protection and included in protection pool
|
||||||
- Metadata tags temporarily visible in card hover previews for debugging (shows scope like "Your Permanents: Hexproof")
|
- Metadata tags temporarily visible in card hover previews for debugging (shows scope like "Your Permanents: Hexproof")
|
||||||
|
- Web-slinging tagger function to identify cards with web-slinging mechanics
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- Card tags now split between themes (for deck building) and metadata (for diagnostics)
|
- Card tags now split between themes (for deck building) and metadata (for diagnostics)
|
||||||
|
|
|
||||||
|
|
@ -417,6 +417,8 @@ def _tag_mechanical_themes(df: pd.DataFrame, color: str) -> None:
|
||||||
print('\n====================\n')
|
print('\n====================\n')
|
||||||
tag_for_bending(df, color)
|
tag_for_bending(df, color)
|
||||||
print('\n====================\n')
|
print('\n====================\n')
|
||||||
|
tag_for_web_slinging(df, color)
|
||||||
|
print('\n====================\n')
|
||||||
tag_for_tokens(df, color)
|
tag_for_tokens(df, color)
|
||||||
print('\n====================\n')
|
print('\n====================\n')
|
||||||
tag_for_rad_counters(df, color)
|
tag_for_rad_counters(df, color)
|
||||||
|
|
@ -4220,6 +4222,23 @@ def tag_for_bending(df: pd.DataFrame, color: str) -> None:
|
||||||
logger.error(f'Error tagging Bending keywords: {str(e)}')
|
logger.error(f'Error tagging Bending keywords: {str(e)}')
|
||||||
raise
|
raise
|
||||||
|
|
||||||
|
### Web-Slinging
|
||||||
|
def tag_for_web_slinging(df: pd.DataFrame, color: str) -> None:
|
||||||
|
"""Tag cards for web-slinging related keywords.
|
||||||
|
|
||||||
|
Looks for 'web-slinging' in rules text and applies tags accordingly.
|
||||||
|
"""
|
||||||
|
try:
|
||||||
|
webslinging_mask = tag_utils.create_text_mask(df, 'web-slinging')
|
||||||
|
rules = [
|
||||||
|
{'mask': webslinging_mask, 'tags': ['Web-slinging']},
|
||||||
|
]
|
||||||
|
tag_utils.tag_with_rules_and_logging(df, rules, 'web-slinging effects', color=color, logger=logger)
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
logger.error(f'Error tagging Web-Slinging keywords: {str(e)}')
|
||||||
|
raise
|
||||||
|
|
||||||
## Big Mana
|
## Big Mana
|
||||||
def create_big_mana_cost_mask(df: pd.DataFrame) -> pd.Series:
|
def create_big_mana_cost_mask(df: pd.DataFrame) -> pd.Series:
|
||||||
"""Create a boolean mask for cards with high mana costs or X costs.
|
"""Create a boolean mask for cards with high mana costs or X costs.
|
||||||
|
|
|
||||||
|
|
@ -10518,8 +10518,8 @@
|
||||||
],
|
],
|
||||||
"synergy_commanders": [
|
"synergy_commanders": [
|
||||||
"Spider-Man, Brooklyn Visionary - Synergy (Web-slinging)",
|
"Spider-Man, Brooklyn Visionary - Synergy (Web-slinging)",
|
||||||
|
"Peter Parker // Amazing Spider-Man - Synergy (Web-slinging)",
|
||||||
"Spider-Man India - Synergy (Web-slinging)",
|
"Spider-Man India - Synergy (Web-slinging)",
|
||||||
"Scarlet Spider, Ben Reilly - Synergy (Web-slinging)",
|
|
||||||
"Arasta of the Endless Web - Synergy (Spider Kindred)"
|
"Arasta of the Endless Web - Synergy (Spider Kindred)"
|
||||||
],
|
],
|
||||||
"popularity_bucket": "Niche",
|
"popularity_bucket": "Niche",
|
||||||
|
|
@ -21139,8 +21139,8 @@
|
||||||
],
|
],
|
||||||
"synergy_commanders": [
|
"synergy_commanders": [
|
||||||
"Spider-Man, Brooklyn Visionary - Synergy (Web-slinging)",
|
"Spider-Man, Brooklyn Visionary - Synergy (Web-slinging)",
|
||||||
|
"Peter Parker // Amazing Spider-Man - Synergy (Web-slinging)",
|
||||||
"Spider-Man India - Synergy (Web-slinging)",
|
"Spider-Man India - Synergy (Web-slinging)",
|
||||||
"Scarlet Spider, Ben Reilly - Synergy (Web-slinging)",
|
|
||||||
"Deadpool, Trading Card - Synergy (Hero Kindred)",
|
"Deadpool, Trading Card - Synergy (Hero Kindred)",
|
||||||
"G'raha Tia, Scion Reborn - Synergy (Hero Kindred)",
|
"G'raha Tia, Scion Reborn - Synergy (Hero Kindred)",
|
||||||
"Six - Synergy (Reach)"
|
"Six - Synergy (Reach)"
|
||||||
|
|
@ -24231,20 +24231,20 @@
|
||||||
"secondary_color": "Green",
|
"secondary_color": "Green",
|
||||||
"example_commanders": [
|
"example_commanders": [
|
||||||
"Spider-Man, Brooklyn Visionary",
|
"Spider-Man, Brooklyn Visionary",
|
||||||
|
"Peter Parker // Amazing Spider-Man",
|
||||||
"Spider-Man India",
|
"Spider-Man India",
|
||||||
"Scarlet Spider, Ben Reilly",
|
"Scarlet Spider, Ben Reilly",
|
||||||
"Silk, Web Weaver",
|
"Silk, Web Weaver"
|
||||||
"Spider-UK"
|
|
||||||
],
|
],
|
||||||
"example_cards": [
|
"example_cards": [
|
||||||
"Spider-Sense",
|
"Spider-Sense",
|
||||||
"Spider-Man, Brooklyn Visionary",
|
"Spider-Man, Brooklyn Visionary",
|
||||||
|
"Peter Parker // Amazing Spider-Man",
|
||||||
"Spider-Man India",
|
"Spider-Man India",
|
||||||
"Scarlet Spider, Ben Reilly",
|
"Scarlet Spider, Ben Reilly",
|
||||||
"Silk, Web Weaver",
|
"Silk, Web Weaver",
|
||||||
"Spider-UK",
|
"Spider-UK",
|
||||||
"Spiders-Man, Heroic Horde",
|
"Spiders-Man, Heroic Horde"
|
||||||
"Spider-Man, Web-Slinger"
|
|
||||||
],
|
],
|
||||||
"synergy_commanders": [
|
"synergy_commanders": [
|
||||||
"Deadpool, Trading Card - Synergy (Hero Kindred)",
|
"Deadpool, Trading Card - Synergy (Hero Kindred)",
|
||||||
|
|
@ -27816,12 +27816,12 @@
|
||||||
"generated_from": "merge (analytics + curated YAML + whitelist)",
|
"generated_from": "merge (analytics + curated YAML + whitelist)",
|
||||||
"metadata_info": {
|
"metadata_info": {
|
||||||
"mode": "merge",
|
"mode": "merge",
|
||||||
"generated_at": "2025-10-13T04:26:36",
|
"generated_at": "2025-10-13T16:39:38",
|
||||||
"curated_yaml_files": 739,
|
"curated_yaml_files": 739,
|
||||||
"synergy_cap": 5,
|
"synergy_cap": 5,
|
||||||
"inference": "pmi",
|
"inference": "pmi",
|
||||||
"version": "phase-b-merge-v1",
|
"version": "phase-b-merge-v1",
|
||||||
"catalog_hash": "a6ca486659ada6088f6cba7e5aab4f5dd64cf66e8d2eb31280e4fbd5b67167b8"
|
"catalog_hash": "7f0baf0c30adae86d1141ba1a6c43d3ffaa2eedbe0000f9c6b20891c909616cb"
|
||||||
},
|
},
|
||||||
"description_fallback_summary": null
|
"description_fallback_summary": null
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue