mpirnat/dndme

Set monster group count in an encounter based on counts from other groups

Closed this issue · 1 comments

Say an encounter specifies "1d6" riders and also says they all come with a particular mount. We need to be able to specify the mounts as well, but we won't know how many to add at the time the encounter is defined. So we need to be able to look at the counts from other groups (after they're rolled & loaded up) in order to be able to spin up the mounts. We should be able to support sums as well if multiple groups will all have the same type of mount.

Let's see some examples that we should support:

[groups.riders]
monster = "knight"
count = "1d6"

[groups.mounts]
monster = "giant_kangaroo"
count = "riders"

In this case, we should generate the same number of mounts as riders.

or with a sum:

[groups.riders1]
monster = "knight"
count = "1d6"

[groups.riders2]
monster = "priest"
count = 1

[groups.mounts]
monster = "giant_kangaroo"
count = "riders1 + riders2"

In this case, we should generate the same number of mounts as all the riders1 and riders2 combined.

Hooray, this works now! Thanks, PyCon Sprints! :-)