Beispiel #1
0
def summon_nature(player, epic_monster, monsters, monster_list):
    """Summons two wolf minions"""
    cprint(
        ">The %s cries out, and two wolves \n rush to its aid." %
        epic_monster['Name'].lower(), 'magenta')
    monsters += 2
    monster_list.append({
        "Name": ("Wolf"),
        "HP": (12),
        "MaxHP": (12),
        "Damage": (3),
        "Carries": [],
        "XP": (11),
        "Epic": (False)
    })
    monster_list.append({
        "Name": ("Wolf"),
        "HP": (12),
        "MaxHP": (12),
        "Damage": (3),
        "Carries": [],
        "XP": (11),
        "Epic": (False)
    })
    return player, epic_monster, monsters, monster_list
Beispiel #2
0
def summon_spider(player, epic_monster, monsters, monster_list):
    """Summons three baby spiders of the same type as epic_monster"""
    cprint(
        ">The %s makes a clicking noise, \n \
          and three of its young come to its aid." %
        epic_monster['Name'].lower(), 'magenta')
    monsters += 3
    monster_list.append({
        "Name": ("Baby " + epic_monster["Name"].title()),
        "HP": (8),
        "MaxHP": (8),
        "Damage": (3),
        "Carries": [],
        "XP": (7),
        "Epic": (False)
    })
    monster_list.append({
        "Name": ("Baby " + epic_monster["Name"].title()),
        "HP": (8),
        "MaxHP": (8),
        "Damage": (3),
        "Carries": [],
        "XP": (7),
        "Epic": (False)
    })
    monster_list.append({
        "Name": ("Baby " + epic_monster["Name"].title()),
        "HP": (8),
        "MaxHP": (8),
        "Damage": (3),
        "Carries": [],
        "XP": (7),
        "Epic": (False)
    })
    return player, epic_monster, monsters, monster_list
Beispiel #3
0
def revitalize(monster, monster_list, player):
    '''Restores player's health and grants her XP'''
    cprint('>You cast Revitalize: \n A sudden wave of energy flows through you.', 'cyan')
    player.stats['HP'] = player.stats['MaxHealth']
    player.stats['Stamina'] = player.stats['MaxStamina']
    player.stats['XP'] += player.stats['Power'] * 2
    return monster, monster_list, player
Beispiel #4
0
def thunder(player, epic_monster, monsters, monster_list):
    """Damages the player"""
    cprint(
        ">The %s begins to pound and pulsate, \n \
          and the world is drowned out by a terrifying roar." %
        epic_monster['Name'].lower(), 'magenta')
    player.stats["Health"] -= player.stats["Power"]
    return player, epic_monster, monsters, monster_list
Beispiel #5
0
def phase_in(player, epic_monster, monsters, monster_list):
    """Increases epic_monster's health, but lowers its dodge chance"""
    cprint(
        ">The %s gathers wisps of the stormclouds \n above into its body, becoming stronger \
          and more uniform." % epic_monster['Name'].lower(), 'magenta')
    epic_monster["HP"] += 10
    player.defaults["MissChance"] -= 1
    return player.stats, player.defaults, epic_monster, monsters, monster_list, \
           player.active_status_effects
Beispiel #6
0
def lightning_blast(player, epic_monster, monsters, monster_list):
    """Damages the player, and her maximum health"""
    cprint(
        ">The %s raises an arm and sends a crackling \n \
          bolt of energy towards you." % epic_monster['Name'].lower(),
        'magenta')
    player.stats["Health"] -= random.randint(1, player.stats["MaxHealth"])
    player.stats["MaxHealth"] -= random.randint(1, 4)
    return player, epic_monster, monsters, monster_list
Beispiel #7
0
def flash(player, epic_monster, monsters, monster_list):
    """Increases the player's miss chance"""
    cprint(
        ">The %s shines in a blindingly bright flash \n \
          of light, damaging your eyesight." % epic_monster['Name'].lower(),
        'magenta')
    player.defaults["MissChance"] += 1
    return player.stats, player.defaults, epic_monster, monsters, monster_list, \
           player.active_status_effects
Beispiel #8
0
def phase_out(player, epic_monster, monsters, monster_list):
    """Decreases epic_monster's healht, but increases its dodge chance"""
    cprint(
        ">The %s raises its arms and... thins, \n \
          becoming less corporeal but weaker." % epic_monster['Name'].lower(),
        'magenta')
    player.defaults["MissChance"] += 1
    return player.stats, player.defaults, epic_monster, monsters, monster_list, \
           player.active_status_effects
Beispiel #9
0
def empower(monster, monster_list, player):
    '''Enlarges monster'''
    cprint('>You fumble over the words in the text, and everything near you grows \n 50% larger.', 'cyan')
    for x in monster_list:
        cprint('>The %s becomes an empowered %s.' % (x['Name'].lower(), x['Name'].lower()), 'cyan')
        x['Damage'] += player.stats['Power'] + random.randint(4, 5)
        x['HP'] += player.stats['Power'] + random.randint(2, 3)
        x['XP'] = x['XP'] * 2
        x['Name'] = 'Empowered %s' % x['Name']
    return monster, monster_list, player
Beispiel #10
0
def siphon(player, epic_monster, monsters, monster_list):
    """Siphons health from the player to epic_monster"""
    cprint(
        ">The %s siphons off a little bit of your health." %
        epic_monster['Name'].lower(), 'magenta')
    health_siphon = random.randint(1, 5)
    player.stats["Health"] -= health_siphon
    epic_monster["HP"] += health_siphon
    if epic_monster["HP"] > epic_monster["MaxHP"]:
        epic_monster["HP"] = epic_monster["MaxHP"]
    return player, epic_monster, monsters, monster_list
Beispiel #11
0
def poison(player, epic_monster, monsters, monster_list):
    """Poisons the player"""
    cprint(
        ">The %s spits a yellow-green globule onto you, \n \
          and a burning spreads through your body." %
        epic_monster['Name'].lower(), 'magenta')
    player.active_status_effects["Poisoned"] = {
        "Command": status_effects.poisoned,
        "Stack": 1
    }
    return player.stats, player.defaults, epic_monster, monsters, monster_list, player.active_status_effects
Beispiel #12
0
def soak(player, epic_monster, monsters, monster_list):
    """Damages and waterlogs the player"""
    cprint(
        ">The %s sends forth a blast of \n frigid water, soaking you to the bone and \
          freezing your limbs." % epic_monster['Name'].lower(), 'magenta')
    player.active_status_effects["Waterlogged"] = {
        "Command": status_effects.waterlogged,
        "Stack": 3
    }
    player.stats["Damage"] -= random.randint(1, 6)
    return player, epic_monster, monsters, monster_list
Beispiel #13
0
def mirror(monsters, monster_list, player):
    '''Damages and disorients the monsters'''
    cprint('>You cast Mirror: \n You are surrounded by a shining globe of mirrors. As distant \n \
           lightning flashes, the globe amplifies it, creating a massive \n \
           explosion of light. All nearby creatures are blinded and seared \n by the light.', 'cyan')
    for x in list(monster_list):
        x['HP'] -= player.stats['Power'] * random.randint(2, 3)
        x['Damage'] -= random.randint(4, 7)
        if x['HP'] <= 0 or x['Damage'] <= 0:
            cprint('>The %s claws at its eyes, then disappears in \n a burst of light.' \
                   % x['Name'].lower(), 'green')
            player.stats['XP'] += x['XP']
            monster_list.remove(x)
            monsters -= 1
    return monsters, monster_list, player
Beispiel #14
0
def evaporation(monsters, monster_list, player):
    '''Removes waterlogged status and damages monsters'''
    cprint('>You cast Evaporation: \n A ball of organge-white lights appears above your hand, and \
           \n it begins to suck all nearby moisture into itself,\n \
           drying you off and damaging your foes.', 'cyan')
    if 'Waterlogged' in player.active_status_effects:
        player.active_status_effects.pop('Waterlogged', None)
    for x in list(monster_list):
        x['HP'] -= player.stats['Power'] * random.randint(2, 3) + random.randint(5, 15)
        if x['HP'] <= 0:
            cprint(">The %s's eyes widen in surprise, then crack \n \
                   and explode in a burst of dust, as its body turns to sand." % x['Name'].lower(), 'green')
            player.stats['XP'] += x['XP']
            monster_list.remove(x)
            monsters -= 1
    return monsters, monster_list, player
Beispiel #15
0
def do_player_attack(monster, player):
    """Calculates damage of player attack"""
    if player.stats['Stamina'] <= 0:
        cprint(
            '>You are tiring... Your arms feel weak and your attacks begin to fail.',
            'red')
        stamina_mod = player.stats['Stamina']
    if player.stats['Stamina'] == player.stats['MaxStamina']:
        stamina_mod = player.stats['Stamina']
    else:
        stamina_mod = player.defaults['DefStamMod']
    hit_true = random.randint(
        0, player.stats['Level'] + player.defaults['MaxDmgMod'])
    if hit_true <= player.defaults['MissChance']:
        print('>You fail to hit the %s.' % monster['Name'].lower())
        hit = False
        if player.stats['Sneaking'] is True:
            cprint('>The %s sees you!' % monster['Name'].lower(), 'yellow')
            player.stats['Sneaking'] = False
    else:
        damage = random.randint(1, player.stats['Damage'])
        if player.stats['TempDamage'] > 0:
            damage += player.stats['TempDamage']
            player.stats['TempDamage'] = 0
        if player.stats['Sneaking'] is True:
            damage = damage * player.defaults['SnkAtkMult']
            print('>You sneak up on the %s.' % monster['Name'].lower())
            print('>You stop sneaking.')
            player.stats['Sneaking'] = False
        monster['HP'] -= damage + stamina_mod + player.defaults['StamModXtra']
        cprint('>You hit the %s.' % monster['Name'].lower(), 'blue')
        hit = True
    return monster, hit, player
Beispiel #16
0
def summon_undead(player, epic_monster, monsters, monster_list):
    """Summons two zombie minions"""
    cprint(">The %s raises its arms, and two \n zombies rise from the earth." % \
          epic_monster['Name'].lower(), 'magenta')
    monsters += 2
    monster_list.append({
        "Name": ("Zombie"),
        "HP": (12),
        "MaxHP": (12),
        "Damage": (3),
        "Carries": [],
        "XP": (11),
        "Epic": (False)
    })
    monster_list.append({
        "Name": ("Zombie"),
        "HP": (12),
        "MaxHP": (12),
        "Damage": (3),
        "Carries": [],
        "XP": (11),
        "Epic": (False)
    })
    return player, epic_monster, monsters, monster_list
Beispiel #17
0
def flame(monster, monster_list, player):
    '''Damages monster'''
    cprint('>You cast Flame: \n A massive gout of flame bursts forth from your hand.', 'cyan')
    for x in list(monster_list):
        cprint('>You hit the %s.' % x['Name'].lower(), 'blue')
        x['HP'] -= player.stats['Power'] + random.randint(5, 7) * 2
        if x['HP'] <= 0:
            cprint('>The %s was incinerated.' % x['Name'].lower(), 'green')
            player.stats['XP'] += x['XP']
            monster_list.remove(x)
            monster -= 1
    return monster, monster_list, player
Beispiel #18
0
def frost(monster, monster_list, player):
    '''Reduces monster's damage'''
    cprint('>You cast Frost: \n A creeping wave of cold spreads forward from you, freezing the \n \
           drenched ground.', 'cyan')
    for x in list(monster_list):
        cprint('>A layer of frost spreads over the %s.' % x['Name'].lower(), 'blue')
        x['Damage'] -= player.stats['Power'] + random.randint(2, 3)
        if x['Damage'] <= 0:
            cprint('>The %s freezes in place, then shatters.' % x['Name'].lower(), 'green')
            player.stats['XP'] += x['XP']
            monster_list.remove(x)
            monster -= 1
    return monster, monster_list, player