- 313 new markdown files created - 30 relationships embedded - 313 entries indexed - State initialized with usage data
13 lines
997 B
Markdown
13 lines
997 B
Markdown
---
|
|
id: 6fcb5a96-9eda-47c0-a111-38a3197e642a
|
|
type: solution
|
|
title: "Mantimon TCG: Configurable weakness/resistance system"
|
|
tags: [mantimon-tcg, game-engine, pattern, configuration, weakness-resistance]
|
|
importance: 0.8
|
|
confidence: 0.8
|
|
created: "2026-01-25T06:25:55.853014+00:00"
|
|
updated: "2026-01-25T06:25:55.853014+00:00"
|
|
---
|
|
|
|
Implemented configurable weakness/resistance for combat damage. Design: (1) ModifierMode enum (MULTIPLICATIVE, ADDITIVE) in enums.py. (2) CombatConfig in RulesConfig with weakness_mode, weakness_value, resistance_mode, resistance_value defaults. (3) WeaknessResistance model with optional mode/value overrides - cards can use game defaults or specify their own. (4) attack_damage handler uses _apply_modifier() helper to calculate based on mode. (5) Legacy 'modifier' field preserved via get_value() fallback. Key insight: deal_damage is raw primitive (no modifiers), attack_damage is full combat calculation with weakness/resistance. Test coverage: 98% with 418 tests.
|