Original Post
I'm working on an MtG style minis game and I need to generate combinations relating to assigning damage. I do rules enforcement and AI and I've run into a snag. I understand generating basic combinations but this for some reason is throwing me for a loop. I have to generate all the combinations of assigning X damage (just a number) to N minis. Each mini has 2 stats that the damage relates to (defense and life). If I assign >= defense 1 thing happens, >= life something else. Ideally I'd generate all the combinations that go though assigning damage amounting to each mini's life and defense until I run out of damage to assign. Remainder damage that isn't enough for the defense or life would still be assigned. This is really hard to articulate for some reason. I am currently doing it 1 point of damage at a time for each mini over and over but the rules state that damage is assigned all at once for each mini. Any ideas or links to read would be greatly appreciated. I've done some searching and have found lots of stuff, but nothing that seems similar to this. ~telengard