| Crates.io | dofus-dmg-calculator |
| lib.rs | dofus-dmg-calculator |
| version | 1.1.7 |
| created_at | 2025-03-24 19:42:25.337594+00 |
| updated_at | 2025-04-16 22:30:07.812689+00 |
| description | A binary crate to estimate Dofus spells' output damage |
| homepage | |
| repository | https://github.com/Patacode/dofus-dmg-calculator |
| max_upload_size | |
| id | 1604298 |
| size | 49,853 |
A binary crate to estimate Dofus spells' output damage
Current release: 1.1.7
cargo install dofus-dmg-calculator
Available options:
$ dofus-dmg-calculator --help
Usage: dofus-dmg-calculator [OPTIONS]
Estimate Dofus spells' output damage
Options:
-i, --default-min <MIN_DEFAULT_DMG> The spell minimum default damage [default: 0]
-j, --default-max <MAX_DEFAULT_DMG> The spell maximum default damage [default: 0]
-k, --crit-min <MIN_CRIT_DMG> The spell minimum critical damage [default: 0]
-l, --crit-max <MAX_CRIT_DMG> The spell maximum critical damage [default: 0]
-s, --stat-points <STAT_POINTS> The character stat points [default: 0]
-p, --power <POWER> The character power [default: 0]
-f, --fixed-dmg <FIXED_DMG> The character fixed damage [default: 0]
-x, --fixed-res <FIXED_RES> The enemy fixed resistance [default: 0]
-r, --variable-res <VARIABLE_RES> The enemy variable resistance [default: 0]
-a, --author Print author
-h, --help Print help
-V, --version Print version
Version: 1.1.7
Author: Patacode <pata.codegineer@gmail.com>
Examples:
Agility spell inflicting 9 - 11 (12 - 14) (i.e. 9 to 11 damage by default
and 12 to 14 on critical hit) by a character having 128 points allocated in
agility stat and 1 point in fixed agility damage (no power and no resistances):
$ dofus-dmg-calculator \
--default-min 9 \
--default-max 11 \
--crit-min 12 \
--crit-max 14 \
--stat-points 128 \
--fixed-dmg 1
Damage estimation = 21 - 26 (28 - 32)
Same scenario than above but against an enemy with 5 points in fixed agility resistance and 20% in variable agility resistance:
$ dofus-dmg-calculator \
--default-min 9 \
--default-max 11 \
--crit-min 12 \
--crit-max 14 \
--stat-points 128 \
--fixed-dmg 1 \
--fixed-res 5 \
--variable-res 20
Damage estimation = 13 - 16 (18 - 22)
Install cargo-make, dev tools and build the package:
./bootstrap.sh
Run the tests:
cargo test # unit + integration tests
cargo test --lib # unit tests
cargo test --test integration_tests # integration tests
Generate code coverage report in HTML format under target/tarpaulin:
cargo tarpaulin \
--out Html \
--exclude-files src/lib.rs src/main.rs benches/* tests/* \
--output-dir target/tarpaulin
Benchmark binary and library crates:
cargo bench
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual-licensed as above, without any additional terms or conditions.