mirror of
https://github.com/mwisnowski/mtg_python_deckbuilder.git
synced 2025-12-16 07:30: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
|
||||
- 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")
|
||||
- Web-slinging tagger function to identify cards with web-slinging mechanics
|
||||
|
||||
### Changed
|
||||
- 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
|
||||
- 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
|
||||
- **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")
|
||||
- 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
|
||||
- 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)
|
||||
- **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
|
||||
- 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
|
||||
- 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")
|
||||
- Web-slinging tagger function to identify cards with web-slinging mechanics
|
||||
|
||||
### Changed
|
||||
- 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')
|
||||
tag_for_bending(df, color)
|
||||
print('\n====================\n')
|
||||
tag_for_web_slinging(df, color)
|
||||
print('\n====================\n')
|
||||
tag_for_tokens(df, color)
|
||||
print('\n====================\n')
|
||||
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)}')
|
||||
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
|
||||
def create_big_mana_cost_mask(df: pd.DataFrame) -> pd.Series:
|
||||
"""Create a boolean mask for cards with high mana costs or X costs.
|
||||
|
|
|
|||
|
|
@ -10518,8 +10518,8 @@
|
|||
],
|
||||
"synergy_commanders": [
|
||||
"Spider-Man, Brooklyn Visionary - Synergy (Web-slinging)",
|
||||
"Peter Parker // Amazing Spider-Man - Synergy (Web-slinging)",
|
||||
"Spider-Man India - Synergy (Web-slinging)",
|
||||
"Scarlet Spider, Ben Reilly - Synergy (Web-slinging)",
|
||||
"Arasta of the Endless Web - Synergy (Spider Kindred)"
|
||||
],
|
||||
"popularity_bucket": "Niche",
|
||||
|
|
@ -21139,8 +21139,8 @@
|
|||
],
|
||||
"synergy_commanders": [
|
||||
"Spider-Man, Brooklyn Visionary - Synergy (Web-slinging)",
|
||||
"Peter Parker // Amazing Spider-Man - Synergy (Web-slinging)",
|
||||
"Spider-Man India - Synergy (Web-slinging)",
|
||||
"Scarlet Spider, Ben Reilly - Synergy (Web-slinging)",
|
||||
"Deadpool, Trading Card - Synergy (Hero Kindred)",
|
||||
"G'raha Tia, Scion Reborn - Synergy (Hero Kindred)",
|
||||
"Six - Synergy (Reach)"
|
||||
|
|
@ -24231,20 +24231,20 @@
|
|||
"secondary_color": "Green",
|
||||
"example_commanders": [
|
||||
"Spider-Man, Brooklyn Visionary",
|
||||
"Peter Parker // Amazing Spider-Man",
|
||||
"Spider-Man India",
|
||||
"Scarlet Spider, Ben Reilly",
|
||||
"Silk, Web Weaver",
|
||||
"Spider-UK"
|
||||
"Silk, Web Weaver"
|
||||
],
|
||||
"example_cards": [
|
||||
"Spider-Sense",
|
||||
"Spider-Man, Brooklyn Visionary",
|
||||
"Peter Parker // Amazing Spider-Man",
|
||||
"Spider-Man India",
|
||||
"Scarlet Spider, Ben Reilly",
|
||||
"Silk, Web Weaver",
|
||||
"Spider-UK",
|
||||
"Spiders-Man, Heroic Horde",
|
||||
"Spider-Man, Web-Slinger"
|
||||
"Spiders-Man, Heroic Horde"
|
||||
],
|
||||
"synergy_commanders": [
|
||||
"Deadpool, Trading Card - Synergy (Hero Kindred)",
|
||||
|
|
@ -27816,12 +27816,12 @@
|
|||
"generated_from": "merge (analytics + curated YAML + whitelist)",
|
||||
"metadata_info": {
|
||||
"mode": "merge",
|
||||
"generated_at": "2025-10-13T04:26:36",
|
||||
"generated_at": "2025-10-13T16:39:38",
|
||||
"curated_yaml_files": 739,
|
||||
"synergy_cap": 5,
|
||||
"inference": "pmi",
|
||||
"version": "phase-b-merge-v1",
|
||||
"catalog_hash": "a6ca486659ada6088f6cba7e5aab4f5dd64cf66e8d2eb31280e4fbd5b67167b8"
|
||||
"catalog_hash": "7f0baf0c30adae86d1141ba1a6c43d3ffaa2eedbe0000f9c6b20891c909616cb"
|
||||
},
|
||||
"description_fallback_summary": null
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue