Add an attrition table row for age gap 2 and a test
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 78/100
Research direction
Read data/rules/rules.ron, docs/design/attrition.md, and the adjacent attrition_age_gap_table_and_late_harrying_bonus test in crates/sim/tests/m5a.rs; also find the loads_repo_data test in the rules crate. Add and verify the gap-2 value, update the pinned test value, bump rules_version, then run the listed data check, tests, just rerecord, and just verify. Done when the data validates, the Charter-versus-Hearth test reads the value from Rules, and required fixtures are re-recorded.
Written by the indexing model from the issue text.
Description
What
This is M5a's good first issue from docs/ROADMAP.md: "Add an attrition table row for age gap 2 and a test."
Attrition damage per pulse depends on the age gap between the territory's owner and the intruder: max(0, owner age - intruder age). data/rules/rules.ron holds the table:
attrition_age_gap_hp: [1, 2],
Row 0 is the same age and row 1 is one age ahead. The last row also covers larger gaps, so today a Charter owner (age 2) against a Hearth intruder (age 0) deals 2, the same as gap 1. Add a third row for gap 2 so that being two ages ahead hurts more. docs/design/attrition.md explains the design.
- Change only data, in
data/rules/rules.ron. The validator requires the table to be non-decreasing, and it namesattrition_age_gap_hp[i]when a row breaks that. - Add a sim test next to
attrition_age_gap_table_and_late_harrying_bonusincrates/sim/tests/m5a.rs: a Charter owner against a Hearth intruder deals the new gap-2 value per pulse. Read the value fromRulesthe way the other attrition tests do; don't hard-code it. - Update the pinned value in the rules crate's
loads_repo_datatest. That is the one test a data edit is expected to change (data/rules/README.md).
Watch out
- Bump
rules_version. Every RON edit changesrules_hash. Bumprules_versionwith a one-line reason, runjust rerecord, and include the re-recorded fixtures. A fixture whose units never reach a two-age gap keeps its.hash. If a.hashchanges, say why in the PR. - Overflow. Keep the value under
MAX_ATTRITION_HP.sim-cli data-checkreports it if not.
How to verify
cargo run -p sim-cli -- data-check data
cargo test -p rules
cargo test -p sim attrition -- --nocapture
just rerecord && just verify
Works on any OS. Comment to claim; the claim lapses after 14 days of silence.
Generated by Claude Code
- Dominant language
- Rust
- Stars
- 0
- Forks
- 1
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 10
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from tonianev/eonmark
-
area:sim good first issue kind:feature
Difficulty 2/5 1-3 hours Newbie friendliness 87/100
Maintainers usually reply within 1 day
-
area:sim good first issue kind:feature
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
area:game good first issue kind:feature
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
area:infra good first issue kind:feature
Difficulty 1/5 Under an hour Newbie friendliness 90/100
Maintainers usually reply within 1 day
-
Test that a Statecraft level researched during an annexation timer keeps the territory field exactOpenarea:sim good first issue kind:feature
Difficulty 3/5 1-2 days Newbie friendliness 78/100
Maintainers usually reply within 1 day
All issues in tonianev/eonmark
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
farion1231/cc-switch#8829 ·
Maintainers usually reply within 1 day
-
bug ci good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
longbridge/gpui-kit#3677 ·
Maintainers usually reply within 1 day
-
E-pr-welcome
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
seanmonstar/reqwest#3121 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
ilya-zlobintsev/LACT#1235 ·
Maintainers usually reply within 1 day