@zerospacegg/iolin
Version:
Pure TypeScript implementation of ZeroSpace game data processing (PKL-free)
73 lines (62 loc) • 2.94 kB
JavaScript
;
/**
* Armor Mitigation - Direct damage reduction system
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.ArmorMitigation = void 0;
const mechanic_js_1 = require("../../engine/mechanic.cjs");
class ArmorMitigation extends mechanic_js_1.GameMechanic {
constructor() {
super();
this.name = "Armor";
this.uuid = "b8f3c2a1-9d7e-4f5a-8b6c-3e2d1a9f8e7d";
// Simple description for API/JSON usage
this.description = "Armor provides direct damage reduction through simple subtraction (Final Damage = Incoming Damage - Armor Value), most effective against rapid, low-damage attacks.";
// Rich wiki content with {{box}} components
this.wiki = `
## Overview
Armor provides direct damage reduction in ZeroSpace through a simple subtraction formula, making it a crucial defensive mechanic.
{{box-grid}}
{{box header="Damage Calculation" icon="mdi-calculator"}}
**Simple Subtraction Formula**
- **Formula**: Final Damage = Incoming Damage - Armor Value
- **Example Unit**: 3 armor value
- **Example Attack**: 8 damage incoming
- **Result**: 5 damage taken (8 - 3 = 5)
- **Minimum Rule**: Attacks always deal at least 1 damage
{{/box}}
{{box header="Strategic Applications" icon="mdi-shield-sword"}}
**Tactical Considerations**
- **Counter-Strategy**: Use fewer, higher-damage attacks against armored units
- **Armor Stacking**: Multiple armor sources create significant reduction
- **Unit Selection**: Armor effectiveness varies by attack patterns
- **Engagement Planning**: Consider armor in target prioritization
{{/box}}
{{/box-grid}}
## Effectiveness Analysis
Armor's impact varies dramatically based on incoming attack patterns:
{{box-grid}}
{{box header="vs High-Frequency Attacks" icon="mdi-gauge-full"}}
**Maximum Effectiveness**
- **Most Effective**: Rapid, low-damage attacks
- **Example Scenario**: 10 attacks of 4 damage vs 3 armor
- **Without Armor**: 40 total damage
- **With Armor**: 10 total damage (4-3=1 per attack)
- **Damage Reduction**: 75% reduction!
{{/box}}
{{box header="vs High-Damage Attacks" icon="mdi-gauge-low"}}
**Limited Effectiveness**
- **Less Effective**: Single high-damage attacks
- **Example Scenario**: 1 attack of 40 damage vs 3 armor
- **Without Armor**: 40 total damage
- **With Armor**: 37 total damage (40-3=37)
- **Damage Reduction**: Only 7.5% reduction
{{/box}}
{{/box-grid}}
`;
}
}
exports.ArmorMitigation = ArmorMitigation;
ArmorMitigation.src = "src/zerospace/mechanic/armor.ts";
exports.default = ArmorMitigation;
//# sourceMappingURL=armor.js.map