Ejemplo n.º 1
0
             conditions.PlayerHasItem(item.holy_cross)
         ],
     ),
     choices.ChoiceInspectRoom(
         text=
         'Stand your ground. There is nothing to fear. God is on your side.',
         scene='ghast_illusion',
         conditions=[
             conditions.OnlyOnce(),
             conditions.RoomFlagFalse('ghast_dead')
         ],
     ),
     choices.ChoiceInspectRoom(
         text='Go to the Iron Gate',
         scene='iron_gate',
         conditions=[conditions.RoomFlagTrue('ghast_dead')]),
 ],
 scenes={
     'ghast_destroyed':
     interactions.thing.Thing(
         name='Ghast Destroyed',
         opening_text=
         's soon as you raise the cross the ghast darts away from its light.\n'
         'You continue reciting prayer as you advance at the ever shrinking cloud of evil.\n'
         'As you finish the prayer the cross lets out a blinding light,\n'
         'the ghast shrieks and vanishes into thin air.',
         choices=[
             choices.ChoiceInspectRoom(
                 text=
                 'Move towards the iron gate at the far end of the room',
                 scene='iron_gate'),
Ejemplo n.º 2
0
                                          conditions=[conditions.PlayerHasItem(item.nitro)]),
                choices.ChoiceNavigate('Retreat to the Grande Hall', level='level_2', room='grande_hall',
                                       scene='gargoyle_fight')
            ],
            events=[events.RemoveItem(item.flammable_oil)]
        ),
        'fight_nitro': interactions.thing.Thing(
            name='Gargoyle attacks!',
            opening_text='You toss the vial of nitroglycerin and duck for cover\n'
                         'as a large explosion sends debris in all directions.',
            choices=[
                choices.ChoiceInspectRoom('Wait for the dust to settle', scene='gargoyle_defeated'),
            ],
            events=[events.RemoveItem(item.nitro)]
        ),
        'gargoyle_defeated': interactions.thing.Thing(
            name='Gargoyle Defeated!',
            opening_text='When the dust settles, where the gargoyle once was there but a pile of rubble.\n'
                         'The path is cleared.',
            choices=[
                choices.ChoiceNavigate('Descend through the stone arch', level='level_3', room='temple_room',
                                       conditions=[conditions.RoomFlagFalse('retreated')]),
                choices.ChoiceNavigate('Go back to the Grande Hall', level='level_2', room='grande_hall',
                                       conditions=[conditions.RoomFlagFalse('retreated')]),
                choices.ChoiceBackToRoom('Back to the Statue Room', conditions=[conditions.RoomFlagTrue('retreated')]),
            ],
            events=[events.SetRoomScreen('clear')]
        )
    }
)
Ejemplo n.º 3
0
from game_code import interactions
from game_code.interactions.lib import choices, events, conditions
from game_code.objects import item, entry


dining_room = interactions.room.Room(
    name='Dining Room',
    opening_text='You enter the dining room. A long marble table runs the length of the decorated chamber.\n'
                 'Carved wooden chairs surround the table on both sides.',
    room_flags={'found_treasure': False, 'door_open': False, 'shoot': False, 'water': False},
    choices=[
        choices.ChoiceInspectRoom('Examine the Table', 'table'),
        choices.ChoiceInspectRoom('Hidden Door', 'hidden_door',
                                  conditions=[conditions.RoomFlagTrue('door_open'),
                                              conditions.RoomFlagFalse('found_treasure')]),
        choices.ChoiceNavigate('Leave room', level='level_2', room='grande_hall'),
    ],
    scenes={
        'table': interactions.thing.Thing(
            name='Table',
            opening_text='After observing the table from all sides you decide to take a look underneath.\n'
                         'You lift the silken table cloth to find an inscription carved into one of the legs\n'
                         '"Fortunes close. Masked by time"',
            future_text='The inscription carved into one of the legs reads: "Fortunes close. Masked by time"',
            events=[events.UnlockJournal(entry.examine_table)]
        ),
        'hidden_door': interactions.thing.Thing(
            name='Hidden Door',
            opening_text='The clock mechanism seems to have revealed a hidden door.\n'
                         'Perhaps it will lead to something of worth.',
            choices=[
Ejemplo n.º 4
0
                                    level='level_2',
                                    room='library'),
             choices.ChoiceNavigate('Laboratory',
                                    level='level_2',
                                    room='laboratory'),
             choices.ChoiceNavigate('Bedroom',
                                    level='level_2',
                                    room='bedroom'),
             choices.ChoiceInspectRoom(
                 'Wooden Clock',
                 'clock',
                 conditions=[conditions.RoomFlagFalse('clock_changed')]),
             choices.ChoiceInspectRoom(
                 'Wooden Clock',
                 'clock_changed',
                 conditions=[conditions.RoomFlagTrue('clock_changed')]),
             choices.ChoiceNavigate('Go back to the living room',
                                    level='level_1',
                                    room='living_room'),
         ]),
 },
 scenes={
     # ghoul scenes
     'attack':
     interactions.thing.Thing(
         name='Combat with Ghoul',
         opening_text='Choose your weapon',
         choices=[
             choices.ChoiceInspectRoom(
                 'Holy Cross',
                 'cross',
Ejemplo n.º 5
0
             'Burn her with fire',
             scene='fight_fire',
             conditions=[conditions.PlayerHasItem(item.flammable_oil)]),
         choices.ChoiceInspectRoom(
             'Shoot her!',
             scene='fight_shoot1',
             conditions=[
                 conditions.PlayerHasItem(item.crossbow),
                 conditions.RoomFlagFalse('shots_fired')
             ]),
         choices.ChoiceInspectRoom(
             'Shoot her again!',
             scene='fight_shoot2',
             conditions=[
                 conditions.PlayerHasItem(item.crossbow),
                 conditions.RoomFlagTrue('shots_fired')
             ]),
         choices.ChoiceInspectRoom(
             'Melt her with holy water!',
             scene='fight_water',
             conditions=[conditions.PlayerHasItem(item.holy_water)]),
         choices.ChoiceInspectRoom(
             'Throw Nitroglycerin!',
             scene='fight_nitro',
             conditions=[conditions.PlayerHasItem(item.nitro)]),
     ],
 ),
 # == to here
 'fight_fire':
 interactions.thing.Thing(
     name='Mistress',