Dungeon and Dragons 4.0 rules implemented in Python