Пример #1
0
from collections import namedtuple
from creatures import make_kart, Creature
from objects import town_objects

Level = namedtuple(
    "Level",
    "m num_gobbos num_villagers num_gold time inhabitants objects name")

shopkeeper1 = Creature(47, 3, "v", 17, "shoppo")
shopkeeper1.speek = "Welcome to the Flaming Cauldron, home to some of the greatest potions in the underdark."
shopkeeper2 = Creature(47, 9, "v", 17, "shoppo")
shopkeeper2.speek = "Gooday, traveler. What kind of magical clothing do you wish to buy from Devon Malikar's Mystical Garb?"
shopkeeper3 = Creature(2, 3, "v", 17, "shoppo")
shopkeeper3.speek = "So, how can we help you here at the Useful Junk Shoppe?"
old_wizardio = Creature(45, 19, "R", 1, "wizardio")
old_wizardio.speek = "I hear you are going into the gobblin stronghold. 'Tis a perilous place. You shall need this."

levels = [
    Level(m="floorplan_0.txt",
          name="The Begining",
          num_gobbos=0,
          num_villagers=5,
          num_gold=0,
          time=99999,
          inhabitants=[old_wizardio],
          objects=[]),
    Level(m="floorplan.txt",
          name="Surface Stronghold",
          num_gobbos=5,
          num_villagers=0,
          num_gold=5,