Exemple #1
0
class StoreRoom(MapTile):
	items = [items.Rusty_Scalpel("A rusty scalpel is propped against a shelf in the corner of the room."), \
			items.PurdueScholarship_Potion("A glowing bottle of mysterious red potion sits on one of the shelves."), \
			items.Old_Chest([items.Mountain_of_Gold()]), \
			items.Gold_Coins("A shiny handful of gold coins is on the ground near the chest.")]

	description = """You seem to have entered an underground storeroom!"""
Exemple #2
0
class StoreRoom(MapTile):
    items = [items.RPG("There is a rocket launcher lying on the ground."), \
      items.Red_Potion("A glowing bottle of mysterious red potion sits on one of the shelves."), \
      items.Old_Chest([items.Mountain_of_Gold()]), \
      items.Gold_Coins("A shiny handful of gold coins is on the ground near the chest.")]

    description = """You seem to have entered an underground storeroom!"""
Exemple #3
0
class FalseVictory(MapTile):
    description = "The light you saw turned out to be a fire..."


class SlimeTile(MapTile):
    description = "You enter a dimly lit room with a goo that looks like...slime?"
    enemies = [enemies.BossSlime('e')]


class FinalBattle(MapTile):
    description = "You enter a room that looks to be an arena."
    enemies = [enemies.BossElf('w', 'e')]


normalChest = items.Old_Chest()
goldCoins = items.Gold_Coins()
goldCoins.Gold_Amount(5)
normalChest.contents = [items.Dagger(), goldCoins]
bossChest1 = items.Locked_Chest()
bossChest1.contents = [items.Flame_Sword(), items.Red_Potion()]


class World:  # I choose to define the world as a class. This makes it more straightforward to import into the game.
    map = [
        [
            SlimeTile(),
            FinalBattle(),
            NearVictory(), None, None,
            FalseVictory(enemies=[enemies.BossOgre('e')], items=[bossChest1]),
            NearFalseVictory(), None