Example #1
0
def impl(context, item_name, location_name):
    if 'inventory' in location_name:
        (word1, word2, character_name) = location_name.split(' ')
        item = get_item(context, item_name)
        character = get_character(context, character_name)

        assert item not in character.inventory
    else:
        item = get_item(context, item_name)
        room = get_location(context, location_name)

        assert item.level != room
Example #2
0
def impl(context, item_name, location_name):
    if 'inventory' in location_name:
        (word1, word2, character_name) = location_name.split(' ')
        item = get_item(context, item_name)
        character = get_character(context, character_name)

        assert item not in character.inventory
    else:
        item = get_item(context, item_name)
        room = get_location(context, location_name)

        assert item.level != room
Example #3
0
def impl(context, character_name, delta, armour_name):
    character = get_character(context, character_name)
    armour = get_item(context, armour_name)

    if delta == 'slower':
        assert_that(character.tick,
                    is_(greater_than(character.speed * Duration.fast)))
    elif delta == 'faster':
        assert_that(character.tick,
                    is_(less_than(character.speed * Duration.fast)))
    else:
        assert False
Example #4
0
def impl(context, character_name, weapon_name):
    character = get_character(context, character_name)
    weapon = get_item(context, weapon_name)

    assert_that(character.tick,
                is_(greater_than(character.speed * Duration.normal)))
Example #5
0
def step_impl(context, caster_name, item_name, domain_name):
    caster = get_character(context, caster_name)
    item = get_item(context, item_name)

    make(caster, gain_domain_(item=item, domain=domain_name))
Example #6
0
def impl(context, item_name, character_name):
    item = get_item(context, item_name)
    character = get_character(context, character_name)

    assert item.location == character.location
Example #7
0
def impl(context, character_name, item_name):
    character = get_character(context, character_name)
    item = get_item(context, item_name)

    make(character, drop(item))
Example #8
0
def impl(context, character_name, item_name):
    character = get_character(context, character_name)
    item = get_item(context, item_name)

    make(character, drop(item))
Example #9
0
def impl(context, item_name, character_name):
    item = get_item(context, item_name)
    character = get_character(context, character_name)

    assert item.location == character.location
Example #10
0
def step_impl(context, caster_name, item_name, domain_name):
    caster = get_character(context, caster_name)
    item = get_item(context, item_name)

    make(caster, gain_domain_(item=item,
                              domain=domain_name))