Пример #1
0
    def __init__ (self, controller, request=[]):
        idx = arkham.ModuleIndex ()
        modules.discover_modules (idx)
        controller.add_modules (idx)
        idx.add_module (ModuleProto (controller, request))
        idx.request ("test")

        arkham.Game.__init__ (self, idx.requested_modules (),
                              TestUI (controller))
        self.m_controller = controller

        @self.normal_one_dice_roll_hook.match \
            (fun.matchclass (TestGame), fun.any, fun.any, fun.any)
        def do (game, investigator, subject, skill_name):
            return game.roll ()
Пример #2
0
                    else:
                        dump_head(monster, 3)
                    already_shown.add(monster)

                item = action.bound_item()
                if item:
                    if item not in already_shown:
                        dump_item_info(item, 3)
                    else:
                        dump_head(item, 3)
                    already_shown.add(item)

            id_act = dict(id_act)
            try:
                sel = int(raw_input())
            except ValueError:
                continue

            if sel in id_act:
                print "=>", id_act[sel].name()
                print "-------------------------------------------------------"
                return id_act[sel]


idx = arkham.ModuleIndex()
modules.discover_modules(idx)
idx.request("ah")

game = arkham.Game(idx.requested_modules(), TUI())
game.run()
Пример #3
0
                        dump_monster_info (monster, 3)
                    else:
                        dump_head (monster, 3)
                    already_shown.add (monster)

                item = action.bound_item ()
                if item:
                    if item not in already_shown:
                        dump_item_info (item, 3)
                    else:
                        dump_head (item, 3)
                    already_shown.add (item)

            id_act = dict (id_act)
            try:
                sel = int (raw_input ())
            except ValueError:
                continue

            if sel in id_act:
                print "=>", id_act[sel].name ()
                print "-------------------------------------------------------"
                return id_act[sel]

idx = arkham.ModuleIndex ()
modules.discover_modules (idx)
idx.request ("ah")

game = arkham.Game (idx.requested_modules (), TUI ())
game.run ()