예제 #1
0
def victory() -> None:
    '''
        It is called when Hero wins a combat.
    '''
    cinematics_block()
    print_cinematics(Hero.declare_status)
    print_cinematics('You win!\n')
예제 #2
0
def killed_enemy(you: Hero, enemy: NPC) -> None:
    '''
        It is called when Hero kills an enemy on combat.
    '''
    cinematics_block()
    print_cinematics(
        f'You give a mortal thrust of your {you.weapon.name} and {enemy.name} falls dead.\n'
    )
    victory()
예제 #3
0
def mutual_death_by_combat(enemy: NPC) -> None:
    '''
        It is called when both Hero and the enemy kill each other simultaneously on combat
    '''
    cinematics_block()
    print_cinematics(f'''
        Terrifying cries of pain are heard from both sides when you and {enemy.name}\'s weapons crush each others bodies.
        Both of you fall almost simultaneously on the ground to never get up again.
        ''')
    the_end()
예제 #4
0
def death_by_combat(Hero, enemy: NPC) -> None:
    '''
        It is called when Hero is killed by an enemy on combat.
    '''
    cinematics_block()
    print_cinematics(f'''
        You feel an intense pain with the blow of {enemy.name} seconds after everything turns black
        and your body falls without life on the ground.\n
        ''')
    the_end()
예제 #5
0
def killed_enemy_on_simultaneous_attack(you: Hero, enemy: NPC) -> None:
    '''
        It is called when Hero kills an enemy on combat on a simultaneous attack.
    '''
    cinematics_block()
    print_cinematics(f'''
        You give a heavy blow on {enemy.name} and hear some bones crushing while {enemy.pronom[1]} body falls with a last moan.
        You breath deeply with relief starting to feel the pain of the damage you took.
        ''')
    victory()
예제 #6
0
def disastrous_fail_on_attack(fails: int, attacker: Character,
                              defendant: Character) -> None:
    '''
        It is called when someone gets a critical fail when attacking.
    '''
    fail_types = {}
    if attacker.weapon.type == 'range':
        if fails >= 3:
            fails = 3
        fail_types = {
            1: [
                f'You miss {defendant.name} by far and your arrow is lost.',
                f'{attacker.name} misses by far and the arrow is lost.'
            ],
            2: [
                'Your arrow gets stuck on the quiver as you try to draw, and as you push it all your arrows slip out to the ground.',
                f'You start laughing as you see {attacker.name} droping all his arrows when trying to reach for one.'
            ],
            3: [
                f'As you stretch the arroy back to attack, the string just splits in half, making the {attacker.weapon.name} useless.',
                f'As {attacker.name} pushes the arrow back on its {attacker.weapon.name}, his string just splits.',
            ]
        }
    else:
        if fails >= 4:
            fails = 4
        fail_types = {
            1: [
                'You miss your attack, leaving your guard partially opened.',
                f'{attacker.name} misses the attack, leaving the guard partially opened.'
            ],
            2: [
                'You miss your attack very badly and leave your guard completely opened.',
                f'{attacker.name} misses very badly the attack and leaves the guard completely opened.'
            ],
            3: [
                f'Your attack was very predictable and {defendant.name} parres it sending your {attacker.weapon.name} to the ground.',
                f'{attacker.name}\'s attack was very predictable you take the opportunity to parry it and send its {defendant.weapon.name} to the ground.',
            ],
            4: [
                'As you step forward to attack and misses it, you lose your balance and ungainly fall to the ground.',
                f'{attacker.name} does  a very weird attack, losing its balance and falling ridiculously to the ground.'
            ]
        }

    cinematics_block()
    if attacker == Hero:
        print_cinematics(f'{fail_types[fails][0]}\n')
    else:
        print_cinematics(f'{fail_types[fails][1]}\n')
    cinematics_block()

    combat_mechanics.next_round(attacker, defendant)
예제 #7
0
def cause_damage(attacker: Character, defendant: Character, severity: int) -> None:
    '''
        It is called in combat situations when a character inflicts
        damage upon another one
    '''
    cinematics_block()
    if attacker == Hero:
        print_cinematics(
            f'You strike a blow on {defendant.name}, causing some blood to spill.\n')
    else:
        print_cinematics(
            f'{attacker.name} hits you causing a painful bruise.\n')

    cinematics_block()
예제 #8
0
def death_by_simultaneous_attack(enemy, results_number_hero: int) -> None:
    '''
        It is called when Hero dies on a simultaneous attack, but the enemy survives
    '''
    cinematics_block()
    if results_number_hero == 0:
        print_cinematics(f'''
        You realize with horror that you missed your attack on {enemy.name} at the same time its {enemy.weapon.name} crushes your head.
        Feeling the most intense pain ever, everything turns black and you feel your dying body falling on the ground.
                ''')
    else:
        print_cinematics(f'''
        You feel a milisecond of joy when your {Hero.weapon.name} pierces the body of {enemy.name}.
        But you have no time to celebrate, as {enemy.pronom[1]} weapon falls heavily on the top of your head crushing your skull and brains on a bloody mess.
                ''')
    the_end()