#2839

 · 
vanilla

Allow quest monster generation to be specified more precisely than having a fixed set of probabilities for two specific monsters and two monster classes (e.g. the Wizard quest has a certain distribution of vampire bats, B, xorns, W, and random monsters; it is not possible to change this distribution without changing it for every quest).

Implementation details: keep the definitions within struct Role, but do it with, say, a struct of { int, bool, int } repeated however many times a quest needs. The first int is the % chance out of a hundred for this struct to be selected. The third is either a PM_* monster index or S_* monster class constant. The second just informs it which of those options it is.

When generating a quest monster, the game can then roll a d100 and iterate through this array of possible monsters, decrementing as it goes, until it hits the right element; if it goes all the way to the end without hitting any monster or class it generates a normal random monster. (This is more or less the same as the algorithm for picking items generated in shops.)