Share and discuss strategies for playing the game, and get help and tips from other players.

Moderator: Forum Moderators

Post Reply
Inactive Developer
Posts: 838
Joined: September 28th, 2004, 10:20 am


Post by ott »

Many people seem to struggle with the distribution of damage in a skirmish, and the in-game calculations are a bit skimpy (they don't deal with drain, and only give the probability of either unit being killed). For more detailed analysis of the probabilities that either unit kills the other in a given skirmish, please see the Perl script prkill, available from the SVN repository or from http://svn.gna.org/viewcvs/wesnoth/trun ... 7&view=log (use save as on the download link of the latest revision).

Version 1.11 can tell you, using

Code: Select all

prkill -p 0.5 -P 0.6 -n 2 -N 4 -d 13 -D 14 -h 58 -H 25 -R
that a Knight attacking a Wraith at night, with both units standing on Grassland, has only a 10% chance of being killed, while there is a 64.96% chance that the Wraith will still have 25hp at the end of the skirmish. You still need to get the raw values out of the unit files, or just read them off the game attack dialog.

Earlier versions were posted to (and discussed) at the forum at http://www.wesnoth.org/forum/viewtopic.php?t=5867 and the method used in version 1.5 is the one currently used in the game Show Calculations dialog.
This quote is not attributable to Antoine de Saint-Exupéry.
Posts: 240
Joined: October 11th, 2005, 6:22 am

Post by Beleth »

Thanks! :D
Post Reply