Esempio n. 1
0
def shadowhorde(location):
    shadowhorde = engine.Object('Horde of Shadows', location)
    shadowhorde.describe(
        'You see a mass of hungry-looking shadows in the darkness.', 'short')
    shadowhorde.describe(
        'All around the island of light you stand in, shadows cover the walls. Seems like this is where Melthar is keeping all the shadows she was sending down the tunnel. You suspect that it would be a bad idea to step outside the light.'
    )
    return shadowhorde
Esempio n. 2
0
def ianessastatue(location):
    ianessastatue = engine.Object('Statue of Ianessa', location)
    ianessastatue.describe('You see a statue of Ianessa, the city\'s founder.',
                           'short')
    ianessastatue.describe(
        'The cloud of which this statue has been constructed is beautifully worked, displaying none of the fraying around the edges that lesser statues might. It depicts Ianessa, the founder of Nephosopolis and arguably the greatest sorceress of all time, raising the city into the sky.'
    )
    return ianessastatue
Esempio n. 3
0
def bookshelf(location):
    bookshelf = engine.Object('Bookshelf', location)
    bookshelf.describe(
        'You see a bookshelf which looks particularly frequently used',
        'short')
    bookshelf.describe(
        'This bookshelf appears particularly frequently used, judging by the haphazard state of the books on it. Flipping through them, it seems like Melthar was researching... sources of magic? That\'s interesting. You take a closer look.\n\nAccording to the first book you flip through, power granted by magical creatures is always focused through an object of some sort, and the destruction of that object will remove the user\'s power. You wonder what that implies about your own power, but more importantly, it means that Melthar could be beaten by figuring out what her focus is and destroying it. That\'s potentially very useful information.'
    )
    return bookshelf
Esempio n. 4
0
def blockade(location):
    blockade = engine.Object('Blockade', location)
    blockade.describe(
        'You see a government blockade preventing you from taking the street any further north.',
        'short')
    blockade.describe(
        'A squadron of guards have established a wall across the street to the north, and now keep watch over it, ensuring that nobody attempts to climb it. You don\'t think it would be a good idea to get their attention.'
    )
    return blockade
Esempio n. 5
0
def shadowlocus(location):
    shadowlocus = engine.Object('Dark Sphere', location)
    shadowlocus.describe(
        'You see a huge sphere of darkness floating in the middle of the room.'
    )
    shadowlocus.describe(
        'A huge sphere of darkness, with a diameter probably about as long as you are tall, floating in the middle of the room. It shifts menacingly as you look at it.'
    )
    shadowlocus.spellresponse(
        'flare',
        'print("The sphere of darkness absorbs your flare. Nothing else happens.")'
    )
    return shadowlocus
Esempio n. 6
0
    surface = engine.Surface(window)

    world = engine.World(damping=0.3)

    player = Player(world, thruster_force=40)

    viewport = engine.Viewport(player, min_scale=5, max_scale=50)

    asteroid_models = []
    for i in range(4):
        asteroid_models.append(
            engine.Model("resources/asteroid{}.json".format(i)))
    for i in range(random.randint(20, 50)):
        engine.Object(world,
                      random.choice(asteroid_models),
                      position=(random.uniform(-20,
                                               20), random.uniform(-20, 20)),
                      angle=random.uniform(0, 2 * engine.math.pi),
                      scale=random.uniform(0.1, 2))

    for i in range(random.randint(10, 20)):
        scale = random.uniform(1, 3)
        Thruster(world,
                 position=(random.uniform(-20, 20), random.uniform(-20, 20)),
                 angle=random.uniform(0, 2 * engine.math.pi),
                 scale=scale,
                 force=40 * scale)

    attach_a_point = None
    attach_a = None
    attach_b_point = None
    attach_b = None