def impl(context, character_name): character = get_character(context, character_name) old_hit_points = get_history_value(character, 'hit_points') new_hit_points = character.hit_points assert new_hit_points < old_hit_points
def impl(context, character_name): character = get_character(context, character_name) old_time = get_history_value(character, 'tick') new_time = character.tick assert new_time > old_time
def impl(context, character_name): character = get_character(context, character_name) old_hit_points = get_history_value(character, "hit_points") new_hit_points = character.hit_points assert new_hit_points < old_hit_points
def impl(context, character_name): character = get_character(context, character_name) old_hit_points = get_history_value(character, "hit_points") new_hit_points = character.hit_points total_damage_suffered = old_hit_points - new_hit_points attack_hit_events = (x for x in context.observer.events if e_event_type(x) == "attack hit") matching_events = [x for x in attack_hit_events if e_target(x).name == character_name] hit_event = matching_events[0] attacker = e_attacker(hit_event) total_damage_from_weapon = sum([x[0] for x in attacker.inventory.weapon.weapon_data.damage]) assert total_damage_suffered > total_damage_from_weapon
def impl(context, character_name): character = get_character(context, character_name) old_hit_points = get_history_value(character, 'hit_points') new_hit_points = character.hit_points total_damage_suffered = old_hit_points - new_hit_points attack_hit_events = (x for x in context.observer.events if e_event_type(x) == 'attack hit') matching_events = [ x for x in attack_hit_events if e_target(x).name == character_name ] hit_event = matching_events[0] attacker = e_attacker(hit_event) total_damage_from_weapon = sum( [x[0] for x in attacker.inventory.weapon.weapon_data.damage]) assert (total_damage_suffered > total_damage_from_weapon)