Add Forge Master strategy optimizer

This commit is contained in:
Jan Bader
2026-06-16 14:45:10 +02:00
commit d4f3d6609b
4 changed files with 738 additions and 0 deletions
+105
View File
@@ -0,0 +1,105 @@
# Forge Master Strategy Optimizer
A small browser-only webpage for planning Forge Master gear upgrades and sacrifice decisions.
Forge Master characters can equip:
- 8 items
- 1 mount
- 3 pets
Each equipped piece has:
- A base stat: `damage` or `health`
- A base stat value
- 0, 1, or 2 effects depending on rarity
Effects start at `1%` and can be upgraded up to their cap.
## Supported effects
| Effect | Maximum |
| --- | ---: |
| Crit chance | 12% |
| Crit damage | 80% |
| Block chance | 5% |
| Health regen | 4% |
| Lifesteal | 20% |
| Double chance | 20% |
| Damage | 15% |
| Melee damage | 50% |
| Ranged damage | 15% |
| Attack speed | 40% |
| Skill damage | 30% |
| Skill cooldown reduction | 7% |
| Health | 15% |
## Optimizer goals
The app lets you enter the current state of all equipment and then recommends:
1. **What to increase next**
- Prioritizes effects by weighted strategic value.
- Accounts for each effect's remaining room to grow before cap.
- Highlights high-value underleveled effects.
2. **What is best to sacrifice instead**
- Scores every equipped piece from its base stat and effects.
- Identifies the lowest-value pieces as likely sacrifice candidates.
- Explains why a piece is weak, such as missing effects, low base stat, or low-impact effects.
3. **Overall build summary**
- Totals base damage and health.
- Totals effect percentages across all items, mount, and pets.
- Shows a simple offensive and defensive score to compare save slots.
## Strategy profile
The first version includes an adjustable strategy profile:
- Balanced
- Damage focused
- Survivability focused
- Skill focused
Each profile changes effect weights used for recommendations. These weights are intentionally transparent in the code so they can be tuned as better Forge Master formulas become known.
## Save slots
All data is saved in `localStorage` only. No server is used.
Features:
- Multiple named save slots
- Save current build to a slot
- Load an existing slot
- Delete a slot
- Automatic draft saving for the current unsaved work
## Running locally
Open `index.html` in a browser.
No build step is required.
If serving from a local web server is preferred:
```bash
python3 -m http.server 8080
```
Then open:
```text
http://localhost:8080
```
## Implementation notes
This project is intentionally dependency-free:
- `index.html` contains the page structure.
- `styles.css` contains responsive styling.
- `app.js` contains state management, localStorage persistence, scoring, and recommendations.
The optimizer is heuristic, not a perfect simulator. It is designed to be useful immediately and easy to tune once exact Forge Master combat formulas are known.