pyrogue package

Submodules

pyrogue.animals module

pyrogue.astar module

pyrogue.creature_families module

pyrogue.creatures module

pyrogue.dungeon_features module

class pyrogue.dungeon_features.Door[source]

Bases: pyrogue.dungeon_features.Feature

Close(mob)[source]
FailedMove(mob)[source]
Open(mob)[source]
describe = False
name = 'door'
class pyrogue.dungeon_features.Feature[source]

Bases: object

block_type = '.'
color = 13
describe = True

Dungeon features (stairs, fountains, doors, etc).

name = '>>no name<<'
potentially_passable = True
tile = '@'
class pyrogue.dungeon_features.SmallFire[source]

Bases: pyrogue.dungeon_features.Feature

color = 9
name = 'small fire'
tile = '#'
class pyrogue.dungeon_features.Staircase(direction)[source]

Bases: pyrogue.dungeon_features.Feature

Ascend(mob)[source]
Descend(mob)[source]
block_type = '.'
color = 7
name = 'staircase'
class pyrogue.dungeon_features.TopStairs(direction)[source]

Bases: pyrogue.dungeon_features.Staircase

Ascend(mob)[source]

pyrogue.dungeon_gen module

pyrogue.dungeons module

pyrogue.fov module

fov.py - Field-of-view calculation for Pyro.

class pyrogue.fov.FOVMap(width, height, blocked_function)[source]

Bases: object

Ball(x, y, radius, ignore_walls=False)[source]
FOVList(x, y, radius)[source]

Return a list of squares that are in view from (x, y) within the given radius.

GetOctant(dx, dy)[source]

Return which octant the given offset lies in.

LOSExists(x1, y1, x2, y2)[source]

Return whether a line of sight exists between (x1, y1) and (x2, y2).

Lit(x, y)[source]
SetLit(x, y=None)[source]
UnlightAll()[source]
cast_fov(cx, cy, row, start, end, radius, xx, xy, yx, yy)[source]

Lightcasting function for a single octant.

mult = [[1, 0, 0, -1, -1, 0, 0, 1], [0, 1, -1, 0, 0, -1, 1, 0], [0, 1, 1, 0, 0, -1, -1, 0], [1, 0, 0, 1, -1, 0, 0, -1]]

pyrogue.humanoids module

pyrogue.imps module

pyrogue.io_curses module

class pyrogue.io_curses.IOWrapper(stdscr)[source]

Bases: object

AnimateAreaEffect(tx, ty, radius, char, color)[source]

Show a ‘Ball’ effect, returning the affected points

Args
tx (int) : x position ty (int) : y position radius (int) radius in squares char (char): character to draw color (curses color): mapped in util
Returns
pts affected (As calculated by fov.Ball
AnimateProjectile(path, char, color)[source]

Show a projectile traveling the specified path.

Ask(question, opts, attr=3)[source]

Ask the player a question.

BeginTurn()[source]

Called right after input is taken from the player.

ChoiceWindow(title='Menu', msg=[['H', 'Hello This is a very long option consisting of lots of words', 'Description of Hello'], ['W', 'World', 'Description of World, which is quite a lot of text.\nIt should wrap around as a test.'], ['A', 'A', 'A'], ['B', 'B', 'B'], ['C', 'C', 'C'], ['D', 'D', 'D'], ['E', 'E', 'E'], ['F', 'F', 'F'], ['G', 'G', 'G'], ['H', 'H', 'H'], ['I', 'I', 'I'], ['J', 'J', 'J'], ['K', 'K', 'K'], ['L', 'L', 'L'], ['M', 'M', 'M'], ['N', 'N', 'N'], ['O', 'O', 'O'], ['P', 'P', 'P'], ['Q', 'Q', 'Q'], ['R', 'R', 'R'], ['S', 'S', 'S'], ['T', 'T', 'T'], ['U', 'U', 'U'], ['V', 'V', 'V'], ['W', 'W', 'W'], ['X', 'X', 'X'], ['Y', 'Y', 'Y'], ['Z', 'Z', 'Z'], ['1', '1', '1'], ['2', '2', '2'], ['3', '3', '3'], ['4', '4', '4'], ['5', '5', '5'], ['6', '6', '6'], ['7', '7', '7'], ['9', '9', '9'], ['1', '10', '10'], ['1', '11', '11'], ['1', '12', '12'], ['1', '13', '13'], ['1', '14', '14']], cmds=None)[source]

Popup Panel with List of Choices

params:
msg: list of lists, each containing [ char/shortcut, string ]

win: list, up/down highlights, half-width win2: description

ClearScreen()[source]
CommandList(pc, lattr=3, hattr=11)[source]

Display the keyboard commands to the player.

CreatureSymbol(mob)[source]

Return a message code for a mob’s symbol.

DetailedStats(pc)[source]
DisplayInventory(mob, norefresh=False, equipped=False, types='')[source]

Display inventory.

DisplayText(text, attr=7)[source]

Display multiline text ( separated) and wait for a keypress.

DrawPathToTarget()[source]
EndTurn()[source]

Called right before input is taken from the player.

GetChoice(item_list, prompt='Choose one: ', nohelp=False, nocancel=True)[source]

Allow the player to choose from a list of options with descriptions.

GetDetailedStats(pc)[source]

Show a detailed player stats screen.

GetDirection()[source]

Ask the player for a direction.

GetDirectionOrTarget(caster, target_range=None)[source]

Return a direction or a target for targetting.

Returns
class TargettingCommand:
mode = ‘x’ # x = cancel, t = mob, d = direction direction = [0,0] target = None path = [] blocked = []
GetItemFromInventory(mob, prompt=None, equipped=False, types='', notoggle=False)[source]

Ask the player to choose an item from inventory.

GetKey()[source]

Return the next keystroke in queue, blocking if none.

GetLocation(prompt='Choose a location')[source]

Ask the player to specify a square in the current level.

GetMonsterChoice(prompt)[source]
GetQuantity(max_qty=None, prompt='How many?')[source]
GetSpell()[source]

Ask the player to choose a spell.

GetString(prompt, x=0, y=0, pattr=3, iattr=3, max_length=999, noblank=False, nostrip=False, mask=None)[source]

Prompt the user for a string and return it.

GetTarget(prompt='Select a target', LOS=True, target=None, target_range=None)[source]

Ask the player to target a mob.

Returns:a creature selected for targetting (path, blocked) : list of Squares in the path, list of blocked squres
Return type:mob
Menu(items=[], x=0, y=0, doublewide=False, extra_opts='', prompt='Choose an option $opts$: ', question='', attr=3, key_attr=11, prompt_attr=11)[source]

Display a list of options to the user and get their choice.

Message(msg, attr=3, nowait=False, forcewait=False)[source]

Display a message to the player, wrapping and pausing if necessary.

MessageLog()[source]
MorePrompt()[source]
MsgWindow(msg=['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15'])[source]

Popup Panel with text

params:
msg: list of strings - display one per line center: boolean - if true, center the message
NearbyMobCycler(target_range=None)[source]

Return a Cycler instance for mobs near the PC.

PutChar(y, x, ch, attr)[source]
PutTile(x, y, tile, color)[source]
ShowMessage(msg, attr, nowait, forcewait)[source]
ShowStatus()[source]

Show key stats to the player.

Shutdown()[source]

Shut down the IO system.

TabTarget()[source]

Allow the player to cycle through available targets.

WaitPrompt(y, attr=7, prompt='[Press any key]')[source]
YesNo(question, attr=3)[source]

Ask the player a yes or no question.

addstr(y, x, s, win, attr=3)[source]
addstr_color(y, x, text, win, attr=3, inverse=False)[source]

addstr with embedded color code support.

calc_layout()[source]
clear()[source]
clearline(lines, win)[source]

Clear one or more lines.

getch()[source]
keypad(arg)[source]
move(y, x)[source]
refresh()[source]
set_status(lines)[source]
class pyrogue.io_curses.TargettingCommand[source]
blocked = []
direction = [0, 0]
mode = 'x'
path = []
target = None
pyrogue.io_curses.main(stdscr)[source]

pyrogue.kobolds module

pyrogue.magic module

magic.py - Magic spells and effects for Pyro

class pyrogue.magic.AgilitySpell[source]

Bases: pyrogue.magic.SelfBuffSpell

Duration(caster)[source]
Effect(caster)[source]
desc = "Improves the caster's hand-eye coordination for a brief time."
harmful = False
level = 1
mp_cost = 3
name = 'Agility'
shortcut = 'agi'
class pyrogue.magic.AreaEffectSpell[source]

Bases: pyrogue.magic.Spell

Spells that affect an area

Requirements:
  • area affect:
    direction: go until you hit something or end of range target: hit the target if visible
  • bolt
    direction: go until you hit something or end of range target: go towards target or end of range
Attempt(caster, target)[source]
Cast(caster)[source]

Cast a ball spell at a target.

Requirements
If the user gives a direction, hit the first thing in that direction If the user gives a target, hit that target
Args
caster - the player
Returns
None

Bases: pyrogue.magic.TeleportSpell

desc = 'Teleports the caster short distances'
harmful = False
level = 2
mp_cost = 3
name = 'Blink'
radius = 5
range = 999
shortcut = 'bnk'
class pyrogue.magic.BoltSpell[source]

Bases: pyrogue.magic.Spell

Spells that fire a projectile by line-of-sight toward the target mob.

Attempt(caster, target)[source]
Cast(caster)[source]

Cast a ball spell at a target.

Requirements
If the user gives a direction, hit the first thing in that direction If the user gives a target, hit that first thing along the path
Args
caster - the player
Returns
None
class pyrogue.magic.Buff[source]

Bases: pyrogue.magic.Effect

A beneficial effect that targets a creature.

class pyrogue.magic.ConfuseOther[source]

Bases: pyrogue.magic.OtherEffectSpell

Duration(target)[source]
Effect(target)[source]
damage_type = 'confusion'
desc = 'Confuse the other guy'
harmful = True
level = 1
mp_cost = 1
name = 'Confuse Other'
projectile_char = '*'
projectile_color = 14
range = 20
shortcut = 'cot'
class pyrogue.magic.ConfuseOtherBuff(amount=1, desc='Confusion')[source]

Bases: pyrogue.magic.Buff

Apply(target, silent=False)[source]

Make whatever change the effect applies.

Remove(target, silent=False)[source]

Remove the effect from the target.

name = 'Confusion'
class pyrogue.magic.DexBuff(amount=1, desc='Agility')[source]

Bases: pyrogue.magic.Buff

Apply(target, silent=False)[source]

Make whatever change the effect applies.

Remove(target, silent=False)[source]

Remove the effect from the target.

name = 'Agility'
class pyrogue.magic.Effect[source]

Bases: object

Apply(target)[source]

Make whatever change the effect applies.

Duration(target)[source]
Overrides(other)[source]

Return whether this effect should override the other.

Remove(target, silent=False)[source]

Remove the effect from the target.

duration = None
power = 0
type = 'none'

Some temporary mod that can apply to creatures, items, etc.

class pyrogue.magic.EquipStatBonus(item, stat, power)[source]

Bases: pyrogue.magic.Effect

Bonus to a stat gained from equipping an item.

Apply(target, silent=False)[source]

Make whatever change the effect applies.

Duration(target)[source]
Remove(target, silent=False)[source]

Remove the effect from the target.

class pyrogue.magic.FireBall[source]

Bases: pyrogue.magic.AreaEffectSpell

Damage(caster)[source]
damage_type = 'fire'
desc = 'A ball of fire, radius=3'
harmful = True
level = 9
mp_cost = 15
name = 'Fire Ball'
projectile_char = '*'
projectile_color = 9
radius = 3
range = 11
shortcut = 'fbt'
class pyrogue.magic.FireBolt[source]

Bases: pyrogue.magic.BoltSpell

Damage(caster)[source]
damage_type = 'fire'
desc = 'A bolt of fire'
harmful = True
level = 4
mp_cost = 7
name = 'Fire Bolt'
projectile_char = '*'
projectile_color = 9
radius = 1
range = 9
shortcut = 'fbt'
class pyrogue.magic.IceBall[source]

Bases: pyrogue.magic.AreaEffectSpell

Damage(caster)[source]
damage_type = 'ice'
desc = 'A ball of ice, radius=3'
harmful = True
level = 7
mp_cost = 11
name = 'Ice Ball'
projectile_char = '*'
projectile_color = 15
radius = 3
range = 9
shortcut = 'ibt'
class pyrogue.magic.IceBolt[source]

Bases: pyrogue.magic.BoltSpell

Damage(caster)[source]
damage_type = 'ice'
desc = 'A bolt of ice'
harmful = True
level = 3
mp_cost = 5
name = 'Ice Bolt'
projectile_char = '*'
projectile_color = 15
radius = 1
range = 7
shortcut = 'ibt'
class pyrogue.magic.LightningBall[source]

Bases: pyrogue.magic.AreaEffectSpell

Damage(caster)[source]
damage_type = 'electricty'
desc = 'A ball of lightning, radius=3'
harmful = True
level = 3
mp_cost = 7
name = 'Lightning Ball'
projectile_char = '*'
projectile_color = 14
radius = 3
range = 5
shortcut = 'lba'
class pyrogue.magic.LightningBolt[source]

Bases: pyrogue.magic.BoltSpell

Damage(caster)[source]
damage_type = 'electricty'
desc = 'A bolt of lightning'
harmful = True
level = 2
mp_cost = 3
name = 'Lightning Bolt'
projectile_char = '*'
projectile_color = 14
radius = 1
range = 7
shortcut = 'lbt'
class pyrogue.magic.MagicBall[source]

Bases: pyrogue.magic.AreaEffectSpell

Damage(caster)[source]
damage_type = ''
desc = 'A ball of magic, radius=3'
harmful = True
level = 2
mp_cost = 3
name = 'Magic Ball'
projectile_char = '*'
projectile_color = 11
radius = 3
range = 5
shortcut = 'mba'
class pyrogue.magic.MagicMissile[source]

Bases: pyrogue.magic.BoltSpell

Damage(caster)[source]
damage_type = ''
desc = "A small bolt of arcane energy leaps from the caster's finger and strikes the target. The damage is light, but cannot be resisted."
harmful = True
level = 1
mp_cost = 1
name = 'Magic Missile'
projectile_char = '-|/\\'
projectile_color = 9
range = 7
shortcut = 'mis'
class pyrogue.magic.OtherEffectSpell[source]

Bases: pyrogue.magic.Spell

Spells that place a temporary effect on a target

Attempt(caster, target)[source]
Cast(caster)[source]

Cast a ball spell at a target.

Requirements
If the user gives a direction, hit the first thing in that direction If the user gives a target, hit that first thing along the path
Args
caster - the player
Returns
None
class pyrogue.magic.SelfBuffSpell[source]

Bases: pyrogue.magic.Spell

Spells that confer a temporary effect upon the caster.

Cast(caster)[source]
harmful = False
class pyrogue.magic.SleepOther[source]

Bases: pyrogue.magic.OtherEffectSpell

Duration(target)[source]
Effect(target)[source]
damage_type = 'sleep'
desc = 'Make the other guy sleep'
harmful = True
level = 1
mp_cost = 1
name = 'Sleep Other'
projectile_char = '*'
projectile_color = 14
range = 20
shortcut = 'sot'
class pyrogue.magic.SleepOtherBuff(desc='Cause Sleep')[source]

Bases: pyrogue.magic.Buff

Apply(target, silent=False)[source]

Make whatever change the effect applies.

Remove(target, silent=False)[source]

Remove the effect from the target.

name = 'Sleep'
class pyrogue.magic.SlowOther[source]

Bases: pyrogue.magic.OtherEffectSpell

Duration(target)[source]
Effect(target)[source]
damage_type = 'speed'
desc = 'Slow the other guy'
harmful = True
level = 1
mp_cost = 1
name = 'Slow Other'
projectile_char = '*'
projectile_color = 14
range = 20
shortcut = 'wot'
class pyrogue.magic.SpeedBuff(amount=1, desc='Speed')[source]

Bases: pyrogue.magic.Buff

Apply(target, silent=False)[source]

Make whatever change the effect applies.

Remove(target, silent=False)[source]

Remove the effect from the target.

name = 'Speed'
class pyrogue.magic.Spell[source]

Bases: object

AfterCast(caster)[source]

Called after the spell is finished casting.

CanCast(caster)[source]
Name()[source]
class pyrogue.magic.StrBuff(amount=1, desc='Might')[source]

Bases: pyrogue.magic.Buff

Apply(target, silent=False)[source]

Make whatever change the effect applies.

Remove(target, silent=False)[source]

Remove the effect from the target.

name = 'Might'
class pyrogue.magic.Teleport[source]

Bases: pyrogue.magic.TeleportSpell

desc = 'Teleports the caster long distances'
harmful = False
level = 11
mp_cost = 11
name = 'Teleport'
radius = 999
range = 999
shortcut = 'tpt'
class pyrogue.magic.TeleportSpell[source]

Bases: pyrogue.magic.Spell

spells that move the caster

Attempt(caster, target)[source]
Cast(caster)[source]
harmful = False

pyrogue.player module

pyrogue.pyro module

pyrogue.pyro_items module

pyro_items.py - Pyro things and objects

class pyrogue.pyro_items.Ammunition[source]

Bases: pyrogue.pyro_items.Weapon

color = 3
equip_slot = 'projectile'
projectile_char = '-|/\\'
tile = '|'
type = 'Ammunition/Thrown Weapons'
class pyrogue.pyro_items.Amulet[source]

Bases: pyrogue.pyro_items.Jewelry

equip_slot = 'neck'
tile = '"'
type = 'Amulets'
class pyrogue.pyro_items.Armor[source]

Bases: pyrogue.pyro_items.Item

ArmorStats()[source]
StacksWith(other)[source]

Return whether the item stacks with another item.

color = 3
material = None
prefix = None
suffix = None
tile = '['
type = 'Armor'
class pyrogue.pyro_items.Arrow[source]

Bases: pyrogue.pyro_items.Ammunition

damage_type = 'pierce'
class pyrogue.pyro_items.AttackType[source]

Bases: object

Any mode of attack.

speed = 100
class pyrogue.pyro_items.BattleAxe[source]

Bases: pyrogue.pyro_items.MeleeWeapon

desc = 'A large, heavy, two-bladed axe used for hacking at the foe.'
name = 'battle axe'
weight = 5.0
class pyrogue.pyro_items.Bludgeon(damage=None, speed=None)[source]

Bases: pyrogue.pyro_items.MeleeAttackType

name = 'bludgeon'
range = 1
verbs = ['swings at', 'clubs', 'bludgeons']
verbs_sp = ['swing at', 'club', 'bludgeon']
class pyrogue.pyro_items.BodyArmor[source]

Bases: pyrogue.pyro_items.Armor

equip_slot = 'torso'
class pyrogue.pyro_items.Boots[source]

Bases: pyrogue.pyro_items.Armor

equip_slot = 'feet'
class pyrogue.pyro_items.Bow[source]

Bases: pyrogue.pyro_items.MissileWeapon

CanFire(ammo)[source]

Return whether this weapon can fire the given ammo.

OnEquip(mob)[source]

Called when mob equips the item.

OnUnequip(mob)[source]

Called when mob unequips the item.

range = 8
class pyrogue.pyro_items.BowAttackType(damage=None, speed=None, range=1)[source]

Bases: pyrogue.pyro_items.AttackType

Some mode of melee attack.

Attempt(attacker, target)[source]

Attempt this attack on the given target.

Parameters:
  • attacker – a Creature
  • target – a Creature
Returns:

true if attack successful, else false

damage = '1d3'
damage_type = 'physical'
speed = 100
class pyrogue.pyro_items.ChainArmor[source]

Bases: pyrogue.pyro_items.Armor

color = 6
class pyrogue.pyro_items.ChainShirt[source]

Bases: pyrogue.pyro_items.BodyArmor, pyrogue.pyro_items.ChainArmor

armor_points = 9
desc = 'A long shirt of interlocking metal rings covering the torso and legs.'
name = 'chain shirt'
weight = 6.0
class pyrogue.pyro_items.Chop(damage=None, speed=None)[source]

Bases: pyrogue.pyro_items.MeleeAttackType

name = 'chop'
range = 1
verbs = ['hacks at', 'chops', 'cleaves']
verbs_sp = ['hack at', 'chop', 'cleave']
class pyrogue.pyro_items.ClothArmor[source]

Bases: pyrogue.pyro_items.Armor

class pyrogue.pyro_items.ClothGloves[source]

Bases: pyrogue.pyro_items.Gloves, pyrogue.pyro_items.ClothArmor

armor_points = 2
desc = 'A pair of cloth gloves offering slight protection.'
name = 'gloves'
weight = 0.5
class pyrogue.pyro_items.Club[source]

Bases: pyrogue.pyro_items.MeleeWeapon

color = 3
desc = 'A stout length of wood, heavier at one end. About as low-tech as it gets.'
name = 'club'
weight = 4.0
class pyrogue.pyro_items.Dagger[source]

Bases: pyrogue.pyro_items.MeleeWeapon

desc = "A small blade about a foot long with a sharp tip, used for stabbing. It is very quick, but doesn't do much damage."
name = 'dagger'
weight = 1.0
class pyrogue.pyro_items.DefaultAttack(damage=None, speed=None)[source]

Bases: pyrogue.pyro_items.MeleeAttackType

damage = '1d2'
name = 'attack'
verbs = ['attacks', 'hits', 'whacks']
verbs_sp = ['attack', 'hit', 'whack']
class pyrogue.pyro_items.EnchantWeaponDamageScroll[source]

Bases: pyrogue.pyro_items.Scroll

ApplyEffect(reader)[source]
name = 'scroll of enchant weapon II'
class pyrogue.pyro_items.EnchantWeaponToHitScroll[source]

Bases: pyrogue.pyro_items.Scroll

ApplyEffect(reader)[source]
name = 'scroll of enchant weapon I'
class pyrogue.pyro_items.GiantStrengthPotion[source]

Bases: pyrogue.pyro_items.MightPotion

bonus = 8
color = 11
duration = 10000
name = 'potion of giant strength'
class pyrogue.pyro_items.Gloves[source]

Bases: pyrogue.pyro_items.Armor

equip_slot = 'hands'
class pyrogue.pyro_items.GreatSword[source]

Bases: pyrogue.pyro_items.MeleeWeapon

desc = 'A huge, heavy sword with a blunt tip, used for slashing and crushing. It is slow but very powerful.'
melee_twohand = True
name = 'greatsword'
weight = 8.0
class pyrogue.pyro_items.Helm[source]

Bases: pyrogue.pyro_items.Armor

equip_slot = 'head'
class pyrogue.pyro_items.IronArrow[source]

Bases: pyrogue.pyro_items.Arrow

color = 1
desc = "It's an iron arrow."
name = 'iron arrow'
weight = 0.1
class pyrogue.pyro_items.Item[source]

Bases: object

Inanimate objects

Duplicate()[source]

Return an exact duplicate of this item.

LongDescription()[source]

Long description of the item.

Name(noweight=False)[source]
OnEquip(mob)[source]

Called when mob equips the item.

OnUnequip(mob)[source]

Called when mob unequips the item.

StacksWith(other)[source]

Return whether the item stacks with another item.

Weight()[source]
armor_points = 0
damage_bonus = 0
desc = 'A Generic Item'
equip_effects = []
hit_bonus = 0
identified = False
material = None
melee_attack = <pyrogue.pyro_items.DefaultAttack object>
melee_twohand = False
name = '>>Generic Item<<'
prefix = None
quantity = 1
rarity = 1.0
suffix = None
thrown_damage = '1d2'
type = 'Other'
weight = 1.0
class pyrogue.pyro_items.Jerkin[source]

Bases: pyrogue.pyro_items.BodyArmor, pyrogue.pyro_items.LeatherArmor

armor_points = 7
desc = 'This leather jerkin provides protection from physical attack, while giving the wearer freedom of movement.'
name = 'jerkin'
weight = 3.0
class pyrogue.pyro_items.Jewelry[source]

Bases: pyrogue.pyro_items.Item

evade = 0
protect = 0
type = 'Jewelry'
class pyrogue.pyro_items.Lash(damage=None, speed=None)[source]

Bases: pyrogue.pyro_items.MeleeAttackType

name = 'lash'
range = 1
verbs = ['lashes at', 'whips', 'scourges']
verbs_sp = ['lash at', 'whip', 'scourge']
class pyrogue.pyro_items.LeatherArmor[source]

Bases: pyrogue.pyro_items.Armor

color = 3
class pyrogue.pyro_items.LongSword[source]

Bases: pyrogue.pyro_items.MeleeWeapon

desc = 'A long sword, slightly over two feet long. It is mostly used for slashing attacks, and is somewhat slower and more powerful than a short sword.'
name = 'long sword'
weight = 4.0
class pyrogue.pyro_items.MeleeAttackType(damage=None, speed=None)[source]

Bases: pyrogue.pyro_items.AttackType

Some mode of melee attack.

Attempt(attacker, target)[source]

Attempt this attack on the given target.

Parameters:
  • attacker – a Creature
  • target – a Creature
Returns:

true if attack successful, else false

damage = '1d3'
damage_type = 'physical'
range = 1
speed = 100
class pyrogue.pyro_items.MeleeWeapon[source]

Bases: pyrogue.pyro_items.Weapon

BonusString()[source]
MeleeStats()[source]
OnEquip(mob)[source]

Called when mob equips the item.

OnUnequip(mob)[source]

Called when mob unequips the item.

color = 14
equip_slot = 'melee weapon'
range = 1
tile = '('
type = 'Melee Weapons'
class pyrogue.pyro_items.MightPotion[source]

Bases: pyrogue.pyro_items.Potion

ApplyEffect(quaffer)[source]
bonus = 3
color = 3
duration = 20000
name = 'potion of might'
class pyrogue.pyro_items.MinorHealPotion[source]

Bases: pyrogue.pyro_items.Potion

ApplyEffect(quaffer)[source]
color = 9
healing = '1d3+3'
name = 'minor potion of healing'
class pyrogue.pyro_items.MissileWeapon[source]

Bases: pyrogue.pyro_items.Weapon

CanFire(ammo)[source]

Return whether this weapon can fire the given ammo.

color = 3
equip_slot = 'missile weapon'
fire_damage = '1d2'
fire_speed = 100
tile = '{'
type = 'Missile Weapons'
verbs = ['shoots', 'shoots', 'shoots']
verbs_sp = ['shoot', 'shoot', 'shoot']
class pyrogue.pyro_items.PlateArmor[source]

Bases: pyrogue.pyro_items.Armor

color = 14
class pyrogue.pyro_items.PlateMail[source]

Bases: pyrogue.pyro_items.BodyArmor, pyrogue.pyro_items.PlateArmor

armor_points = 12
desc = 'A very heavy suit of metal plates. It provides excellent protection, but limits movement significantly.'
name = 'plate armor'
weight = 10.0
class pyrogue.pyro_items.Potion[source]

Bases: pyrogue.pyro_items.Item

Quaff(quaffer)[source]
QuaffMessage(quaffer)[source]
desc = 'A small vial with a magical concoction inside.'
tile = '!'
type = 'Potions'
weight = 0.2
class pyrogue.pyro_items.Punch(damage=None, speed=None)[source]

Bases: pyrogue.pyro_items.MeleeAttackType

damage = '1d2'
name = 'punch'
range = 1
speed = 150
verbs = ['swings at', 'punches', 'clocks']
verbs_sp = ['swing at', 'punch', 'clock']
class pyrogue.pyro_items.Ring[source]

Bases: pyrogue.pyro_items.Jewelry

equip_slot = 'finger'
tile = '='
type = 'Rings'
class pyrogue.pyro_items.RingOfStrength[source]

Bases: pyrogue.pyro_items.Ring

color = 9
name = 'ring of strength'
class pyrogue.pyro_items.Robe[source]

Bases: pyrogue.pyro_items.BodyArmor, pyrogue.pyro_items.ClothArmor

armor_points = 5
desc = "This long, flowing robe does not hinder the wearer's movements, but the cloth provides only very minimal protection against physical attack."
name = 'robe'
weight = 1.0
class pyrogue.pyro_items.Scroll[source]

Bases: pyrogue.pyro_items.Item

Read(reader)[source]
color = 15
desc = 'A scroll'
tile = '?'
type = 'Scrolls'
weight = 0.1
class pyrogue.pyro_items.SelfImprovementScroll[source]

Bases: pyrogue.pyro_items.Scroll

ApplyEffect(reader)[source]
name = 'scroll of self-improvement'
class pyrogue.pyro_items.ShortBow[source]

Bases: pyrogue.pyro_items.Bow

desc = 'A small, simple bow constructed from a single piece of wood. It is not as powerful as a longbow, but is lighter and easier to manage.'
name = 'short bow'
range = 8
weight = 3.0
class pyrogue.pyro_items.ShortSword[source]

Bases: pyrogue.pyro_items.MeleeWeapon

desc = 'A sword about eighteen inches long with a sharp tip, designed for slashing and stabbing.'
name = 'short sword'
weight = 3.0
class pyrogue.pyro_items.Slash(damage=None, speed=None)[source]

Bases: pyrogue.pyro_items.MeleeAttackType

name = 'slash'
range = 1
verbs = ['swings at', 'slashes', 'slices']
verbs_sp = ['swing at', 'slash', 'slice']
class pyrogue.pyro_items.SmallBag[source]

Bases: pyrogue.pyro_items.Tool

name = 'small bag'
reduction = 0.05
slots = 10
type = 'Tools'
class pyrogue.pyro_items.Stab(damage=None, speed=None)[source]

Bases: pyrogue.pyro_items.MeleeAttackType

name = 'stab'
range = 1
verbs = ['pokes at', 'stabs', 'impales']
verbs_sp = ['poke at', 'stab', 'impale']
class pyrogue.pyro_items.Tool[source]

Bases: pyrogue.pyro_items.Item

color = 3
tile = '~'
type = 'Tools'
class pyrogue.pyro_items.Weapon[source]

Bases: pyrogue.pyro_items.Item

class pyrogue.pyro_items.Whip[source]

Bases: pyrogue.pyro_items.MeleeWeapon

color = 3
desc = 'This weapon does little damage, and is somewhat slow to attack with.'
name = 'whip'
weight = 1.0
class pyrogue.pyro_items.WoodArrow[source]

Bases: pyrogue.pyro_items.Arrow

desc = 'A long, straight wooden shaft, feathered at one end and pointed at the other, meant to be fired from a bow.'
name = 'wooden arrow'
weight = 0.02
pyrogue.pyro_items.random_ammo(level)[source]
pyrogue.pyro_items.random_armor(level, a=None, nospecial=False)[source]

Return a random piece of armor for the given level.

pyrogue.pyro_items.random_bonus(level)[source]

Return a bonus appropriate to the given level.

pyrogue.pyro_items.random_item(level)[source]

Return a random item suitable for the given character level.

pyrogue.pyro_items.random_melee_weapon(level, w=None, nospecial=False)[source]

Return a random melee weapon suitable for the given character level.

pyrogue.pyro_items.random_missile_weapon(level, w=None, nospecial=False)[source]
pyrogue.pyro_items.random_potion(level)[source]
pyrogue.pyro_items.random_ring(level)[source]
pyrogue.pyro_items.random_scroll(level)[source]

pyrogue.rodents module

pyrogue.strings module

strings.py - Multi-language support for Pyro.

class pyrogue.strings.English[source]

Bases: object

ArticleName(article, item)[source]
archdesc_disdwarf = "Dwarves are said to horde vast treasures in their mountan halls. In keeping with the Dwarves' affinity with the earth, rare gems and precious metals are especially prized. The Treasure Hunter is a tough-as-nails explorer who braves the dangers of the dungeon to retrieve the raw materials used by Dwarven smiths in their incomparable craftwork. His skills are focused on observation and survival."
archdesc_diself = "Although the Elves never grow old, they are not quite immortal and can die by violence. Perhaps this fact, together with the Elves' naturally subtle disposition, explains why so many who choose to risk their lives in the dungeons follow the underworld god Dis. Enchanters are versatile characters with a wide selection of spells, though not as powerful as those of the Wizard."
archdesc_dishuman = 'Krol does not have a monopoly on violence--the Humans who follow the underworld god Dis are as deadly, and are perhaps even more feared for their mystery and subtlety. The Assassin is a master of stealth and treachery, preferring to strike his enemy by surprise, and if possible, to finish the job with the first blow.'
archdesc_kroldwarf = 'The Dwarves were old when the Humans and Elves arrived thousands of years ago, and the Dwarves will remain in their stone halls when the other races have come and gone. The Warrior embodies the steadfast determination of his Dwarven ancestors. He can withstand tremendous physical punishment, and his offensive skills are formidable.'
archdesc_krolelf = 'It is true that Krol values superior force over subtlety, but it would be a mistake to assume that all his followers are unsophisticated brutes. The Wizard harnesses his formidable intellect to wield magical energies of tremendous power. Though physically unimposing, the Wizard is the most powerful destructive force in the natural world.'
archdesc_krolhuman = 'Humans have the briefest lives of all the natural races, which perhaps explains the fervor with which the Berserker serves his god Krol. Unmatched in physical ferocity, the Berserker throws himself into battle without hesitation, consumed by the desire to kill for his god.'
archname_disdwarf = 'Dwarf of Dis (Treasure Hunter)'
archname_disdwarf_short = 'Treasure Hunter'
archname_diself = 'Elf of Dis (Enchanter)'
archname_diself_short = 'Enchanter'
archname_dishuman = 'Human of Dis (Assassin)'
archname_dishuman_short = 'Assassin'
archname_kroldwarf = 'Dwarf of Krol (Warrior)'
archname_kroldwarf_short = 'Warrior'
archname_krolelf = 'Elf of Krol (Wizard)'
archname_krolelf_short = 'Wizard'
archname_krolhuman = 'Human of Krol (Berserker)'
archname_krolhuman_short = 'Berserker'
cmdname_ascend = 'Ascend staircase'
cmdname_autorest = 'Rest 100 turns or until healed'
cmdname_autorun = 'Auto-run'
cmdname_cast = 'Cast a spell'
cmdname_cheat = 'Cheat menu'
cmdname_descend = 'Descend staircase'
cmdname_detailedplayerstats = 'Detailed character info'
cmdname_drop = 'Drop an item'
cmdname_equipment = 'View equipped items'
cmdname_examine = 'Examine an item'
cmdname_fire = 'Fire equipped missile weapon'
cmdname_help = 'List all commands'
cmdname_inventory = 'View inventory'
cmdname_message_log = 'Message log'
cmdname_openclosedoor = 'Open or close a door'
cmdname_pickup = 'Pick up items'
cmdname_quaff = 'Quaff a potion'
cmdname_quit = 'Quit'
cmdname_read = 'Read a scroll'
cmdname_save = 'Save Game'
cmdname_targetnext = 'Target next nearby enemy'
cmdname_throw = 'Throw an object'
cmdname_untarget = 'Forget current target'
cmdname_unwear = 'Unequip an item'
cmdname_wear = 'Wear or wield an item'
combat_mob_hit_mob = '%s %s %s.'
combat_mob_hit_you = '%s ^R^%s^0^ you. [^R^%s^0^]'
combat_mob_hit_you_no_damage = '%s %s you, but does no damage.'
combat_mob_misses_mob = '%s tries to %s %s, but misses.'
combat_mob_misses_you = '%s tries to %s you, but misses.'
combat_you_hit = 'You ^G^%s^0^ %s. [^G^%s^0^]'
combat_you_hit_no_damage = 'You %s %s, but do no damage.'
combat_you_killed = '^G^You have killed %s! (%s xp)'
combat_you_miss = 'You try to %s %s, but miss.'
effect_agility_buff_gone_mob = '%s is moving less gracefully.'
effect_agility_buff_gone_you = '^B^You no longer feel exceptionally agile.'
effect_agility_buff_mob = '%s appears to move more gracefully.'
effect_agility_buff_you = '^G^You feel more agile.'
effect_healpotion_gain_maxhp = '^W^You feel better than ever!'
effect_healpotion_wasted = 'It tasted healthy, but you feel the same.'
effect_improvement = 'You gain insight about how you can improve yourself.'
effect_mob_minor_healing = '%s looks healthier.'
effect_scroll_none = 'The scroll vanishes...nothing seemed to happen.'
effect_speed_buff_gone_mob = '%s no longer looks so slow.'
effect_speed_buff_gone_you = '^B^You speed up.'
effect_speed_buff_mob = '%s appears to slow down.'
effect_speed_buff_you = '^G^You slow down.'
effect_strength_buff_gone_mob = '%s no longer looks so strong.'
effect_strength_buff_gone_you = '^B^You no longer feel exceptionally strong.'
effect_strength_buff_mob = '%s appears to grow stronger.'
effect_strength_buff_you = '^G^You feel mighty.'
effect_weapon_plus_dam = '%s glows ^R^bright red^0^ momentarily.'
effect_weapon_plus_hit = '%s glows ^G^bright green^0^ momentarily.'
effect_you_minor_healing = '^G^You feel better.'
equip_slot_ammo = 'projectile'
equip_slot_back = 'back'
equip_slot_feet = 'feet'
equip_slot_finger = 'finger'
equip_slot_hands = 'hands'
equip_slot_head = 'head'
equip_slot_meleeweapon = 'melee weapon'
equip_slot_missileweapon = 'missile weapon'
equip_slot_neck = 'neck'
equip_slot_offhand = 'offhand'
equip_slot_torso = 'torso'
equip_slot_waist = 'waist'
error_bad_qty = '^R^Invalid quantity.'
error_bad_spell_shortcut = "^R^You've never heard of that spell before."
error_cannot_drink_item = '^R^You want to drink a %s? No.'
error_cannot_equip_item = '^R^That item is not made to be equipped.'
error_cannot_leave = "^R^You can't leave without the widget!"
error_cannot_read_item = "^R^There's nothing interesting written on the %s."
error_carrying_nothing = '^R^You are not carrying anything.'
error_door_already_closed = '^R^The door is already closed.'
error_door_blocked_by_creature = '^R^%s is blocking the door.'
error_door_blocked_by_item = "^R^You can't close the door--something is in the way."
error_insufficient_mana = '^R^You do not have enough mana to cast %s.'
error_item_does_not_fit = "^R^That item doesn't fit your body."
error_mob_carrying_nothing = 'The creature has no items.'
error_no_ammo = '^R^You do not have any ammunition for %s.'
error_no_enemies_to_target = '^R^Cannot target--no enemies in range.'
error_no_missile_weapon = '^R^You have no missile weapon equipped.'
error_no_spells_known = "^R^You don't know any spells."
error_no_stairs_here = '^R^There are no stairs here.'
error_nothing_here_to_pickup = '^R^There is nothing here to pick up.'
error_nothing_near_to_openclose = '^R^There is nothing nearby to open or close.'
error_nothing_there_to_openclose = '^R^There is nothing there to open or close.'
error_stairs_not_down = '^R^These stairs do not lead down.'
error_stairs_not_up = '^R^These stairs do not lead up.'
error_too_heavy = "^R^You can't carry that much weight."
feature_name_door = 'door'
feature_name_staircase = 'staircase'
feature_name_staircase_down = 'staircase down'
feature_name_staircase_up = 'staircase up'
goddesc_dis = 'Dis rules the shadowy realm of the Underworld. Subtle and mysterious, he bestows upon his faithful the dark powers of stealth, trickery, and death.'
goddesc_krol = "Almighty and vengeful Krol is the god of violent conflict. Krol is not evil, though many who give him allegiance are. Krol values strength and aggression, and expects his followers to overcome life's obstacles through overwhelming force. Krol and his adherents are not known for subtlety or patience."
itemdesc_battleaxe = 'A large, heavy, two-bladed axe used for hacking at the foe.'
itemdesc_chainshirt = 'A long shirt of interlocking metal rings covering the torso and legs.'
itemdesc_club = 'A stout length of wood, heavier at one end. About as low-tech as it gets.'
itemdesc_dagger = "A small blade about a foot long with a sharp tip, used for stabbing. It is very quick, but doesn't do much damage."
itemdesc_gloves = 'A pair of cloth gloves offering slight protection.'
itemdesc_greatsword = 'A huge, heavy sword with a blunt tip, used for slashing and crushing. It is slow but very powerful.'
itemdesc_jerkin = 'This leather jerkin provides protection from physical attack, while giving the wearer freedom of movement.'
itemdesc_longsword = 'A long sword, slightly over two feet long. It is mostly used for slashing attacks, and is somewhat slower and more powerful than a short sword.'
itemdesc_platemail = 'A very heavy suit of metal plates. It provides excellent protection, but limits movement significantly.'
itemdesc_potion = 'A small vial with a magical concoction inside.'
itemdesc_robe = "This long, flowing robe does not hinder the wearer's movements, but the cloth provides only very minimal protection against physical attack."
itemdesc_shortbow = 'A small, simple bow constructed from a single piece of wood. It is not as powerful as a longbow, but is lighter and easier to manage.'
itemdesc_shortsword = 'A sword about eighteen inches long with a sharp tip, designed for slashing and stabbing.'
itemdesc_whip = 'This weapon does little damage, and is somewhat slow to attack with.'
itemdesc_woodarrow = 'A long, straight wooden shaft, feathered at one end and pointed at the other, meant to be fired from a bow.'
itemname_battleaxe = 'battle axe'
itemname_chainshirt = 'chain shirt'
itemname_club = 'club'
itemname_dagger = 'dagger'
itemname_gloves = 'gloves'
itemname_greatsword = 'greatsword'
itemname_jerkin = 'jerkin'
itemname_longsword = 'long sword'
itemname_platemail = 'plate armor'
itemname_potion_of_giantstrength = 'potion of giant strength'
itemname_potion_of_might = 'potion of might'
itemname_potion_of_minor_heal = 'minor potion of healing'
itemname_ring_of_strength = 'ring of strength'
itemname_robe = 'robe'
itemname_scroll_of_improvement = 'scroll of self-improvement'
itemname_scroll_of_weapon_dam = 'scroll of enchant weapon II'
itemname_scroll_of_weapon_hit = 'scroll of enchant weapon I'
itemname_shortbow = 'short bow'
itemname_shortsword = 'short sword'
itemname_whip = 'whip'
itemname_woodarrow = 'wooden arrow'
itemtype_ammo_or_thrown = 'Ammunition/Thrown Weapons'
itemtype_amulets = 'Amulets'
itemtype_armor = 'Armor'
itemtype_books = 'Books'
itemtype_food = 'Food'
itemtype_jewelry = 'Jewelry'
itemtype_meleeweapons = 'Melee Weapons'
itemtype_missileweapons = 'Missile Weapons'
itemtype_other = 'Other'
itemtype_potions = 'Potions'
itemtype_rings = 'Rings'
itemtype_scrolls = 'Scrolls'
itemtype_tools = 'Tools'
itemtype_valuables = 'Valuables'
itemtype_wands = 'Wands'
key_tab = 'Tab'
label_armor_desc = 'When equipped on your %s, it grants %s armor points.'
label_attack_speed = 'with speed %s'
label_attack_tohit = ' and %s to hit'
label_backpack_items = 'Items in backpack'
label_char_title = '%s, the level %s %s'
label_equipped_items = 'Equipped items'
label_evasion_limited = '[limited by eSTR]'
label_help_title = '-= Pyro Help =-'
label_inventory_weight = '(Total: %ss, Capacity: %ss)'
label_it_weighs = 'It weighs %s stones.'
label_item_use_failure = 'item use failure'
label_keyboard_commands = '- Keyboard Commands -'
label_melee_attack_desc = 'In melee combat, it %s for %s damage '
label_melee_damage = 'melee damage'
label_movement_keys = ' - Movement Keys -'
label_now_targeting = 'Now targeting'
label_of_lightness = 'of lightness'
label_rest_one_turn = 'to rest a single turn'
label_run = 'then a ^Y^direction^y^ to run'
label_space_to_cancel = 'space to cancel'
label_spell_failure = 'spell failure'
label_to_hit = 'to hit'
label_twohand = 'It requires both hands to wield.'
material_armor_cloth = ['burlap', 'linen', 'silk', 'ironweave', 'highcloth']
material_armor_leather = ['leather', 'thick leather', 'hard leather', 'basilisk hide', 'dragonscale']
material_armor_metal = ['iron', 'steel', 'mithril', 'adamantium', 'divinium']
mob_desc_goblin = 'You can just stretch the word "humanoid" to cover Goblins, if you\'re feeling generous. Short, stocky, fugly, green, and nasty pretty much fills in the rest.'
mob_desc_greater_rat = 'Bigger and meaner than the rat. This rat is big, mean, and fast.'
mob_desc_imp = 'Imps are nastly little demons, usually summoned to this plane by a nefarious magic user. Though small and weak, imps are phenomenally quick and very difficult to hit.'
mob_desc_kobold = 'Kobolds are a vile race of dimunitive lizard-men with mottled brownish-green scaly skin, dozens of small, sharp teeth. They are not known for their intellectual or physical prowess, although in groups they can be dangerous (mostly due to their obnoxious odor).'
mob_desc_ogre = 'Ogres are gigantic humanoids, seven to nine feet tall and weighing up to eight hundred pounds. Muscular and fat in roughly equal measure, they are deadly opponents in combat. Luckily, they are rather slow.'
mob_desc_rat = 'This rodent is definitely of an unusual size--you estimate it weighs at least twenty pounds. Its red eyes stare at you with no trace of fear.'
mob_desc_wolf = "Your generic two-hundred-pound wolf. Don't run; he can smell fear, and he's faster than you."
mob_drinks = '%s drinks %s.'
mob_name_goblin = 'goblin'
mob_name_greater_rat = 'greater rat'
mob_name_imp = 'imp'
mob_name_kobold = 'kobold'
mob_name_ogre = 'ogre'
mob_name_rat = 'rat'
mob_name_wolf = 'wolf'
mob_opens_door = '%s opens the door.'
msg_done_resting = 'Done resting.'
msg_feature_here = 'There is a %s here.'
msg_item_here = 'You see %s lying here.'
msg_resting = 'Resting...'
msg_several_items_here = 'There are several things lying here.'
msg_stop_resting_enemy = 'You see an enemy and stop resting.'
msg_you_die = '^R^You die.'
msg_you_equip = 'You equip %s.'
msg_you_feel_improved = '^G^You feel %s!'
msg_you_gain_effect = 'You gain %s.'
msg_you_gain_level = 'Welcome to level ^G^%s^0^!'
msg_you_unequip = 'You unequip %s.'
msg_you_wield = 'You are now wielding %s.'
prompt_any_key = '[Press any key]'
prompt_choose_item = 'Choose an item'
prompt_choose_location = 'Choose a location'
prompt_choose_spell = 'Cast which spell? (Type shortcut or <enter>=last, ?=list, space=cancel): '
prompt_choose_spell2 = 'Cast which spell? (space to cancel)'
prompt_choose_target = 'Select a target'
prompt_choose_target2 = 'Choose a target: <enter>=%s, <tab>=cycle, <space>=cancel.'
prompt_describe_which_item = 'View description for which item? '
prompt_direction_or_target = 'Which direction? [1-9/arrows, or t for target]'
prompt_drop = 'Drop which item?'
prompt_drop_howmany = 'Drop how many?'
prompt_enter_select_space_cancel = 'Enter to select, Space to cancel'
prompt_enter_to_target = 'Press enter to target %s, or space to cancel.'
prompt_examine = 'Examine which item?'
prompt_harmful_spell_at_self = 'Really cast %s on yourself?'
prompt_menu_default = 'Choose an option $opts$: '
prompt_more = '[more]'
prompt_pickup = 'Pick up the %s?'
prompt_pickup_howmany = 'Pick up how many %s?'
prompt_player_god = 'Which god will you follow, %s?'
prompt_player_name = 'What is your name, adventurer? '
prompt_player_race = 'Choose your race, %s:'
prompt_quaff = 'Quaff which potion?'
prompt_quit = 'Really quit the game?'
prompt_read = 'Read which scroll?'
prompt_remove_which = 'Remove which item?'
prompt_save = 'Save game?'
prompt_unwear = 'Unequip which item?'
prompt_wear = 'Equip which item?'
prompt_which_ammo = 'Fire which ammunition?'
prompt_which_direction = 'Which direction? [1-9/arrows, or space to cancel]'
prompt_wield = 'Wield/unwield which item?'
quality_armor = ['tattered', 'decrepit', 'shabby', 'worn', 'sturdy', 'strong', 'formidable', 'impenetrable']
saving_game = 'Saving Game To: {0}'
spellcode_agility = 'agi'
spellcode_fire_ball = 'fbt'
spellcode_fire_bolt = 'fbt'
spellcode_ice_ball = 'ibt'
spellcode_ice_bolt = 'ibt'
spellcode_lightning_ball = 'lba'
spellcode_lightning_bolt = 'lbt'
spellcode_magic_ball = 'mba'
spellcode_magic_missile = 'mis'
spellcode_sleep_monster = 'smb'
spelldesc_agility = "Improves the caster's hand-eye coordination for a brief time."
spelldesc_fire_ball = 'A ball of fire, radius=3'
spelldesc_fire_bolt = 'A bolt of fire'
spelldesc_ice_ball = 'A ball of ice, radius=3'
spelldesc_ice_bolt = 'A bolt of ice'
spelldesc_lightning_ball = 'A ball of lightning, radius=3'
spelldesc_lightning_bolt = 'A bolt of lightning'
spelldesc_magic_ball = 'A ball of magic, radius=3'
spelldesc_magic_missile = "A small bolt of arcane energy leaps from the caster's finger and strikes the target. The damage is light, but cannot be resisted."
spelldesc_sleep_monster_bolt = 'Sleep Monster'
spelldesc_teleport = 'Teleports the caster long distances'
spellname_agility = 'Agility'
spellname_fire_ball = 'Fire Ball'
spellname_fire_bolt = 'Fire Bolt'
spellname_ice_ball = 'Ice Ball'
spellname_ice_bolt = 'Ice Bolt'
spellname_lightning_ball = 'Lightning Ball'
spellname_lightning_bolt = 'Lightning Bolt'
spellname_magic_ball = 'Magic Ball'
spellname_magic_missile = 'Magic Missile'
spellname_sleep_monster_bolt = 'Sleep Monster'
spellname_teleport = 'Teleport'
stat_abbr_dex = 'dex'
stat_abbr_estr = 'eSTR'
stat_abbr_int = 'int'
stat_abbr_str = 'str'
stat_key_dex = 'd'
stat_key_int = 'i'
stat_key_str = 's'
stat_name_dex = 'Dexterity'
stat_name_estr = 'Excess Strength'
stat_name_int = 'Intellect'
stat_name_str = 'Strength'
verbs_bite = ['nibbles at', 'bites', 'chomps']
verbs_bite_2p = ['nibble at', 'bite', 'chomp']
verbs_bludgeon = ['swings at', 'clubs', 'bludgeons']
verbs_bludgeon_2p = ['swing at', 'club', 'bludgeon']
verbs_chop = ['hacks at', 'chops', 'cleaves']
verbs_chop_2p = ['hack at', 'chop', 'cleave']
verbs_claw = ['scratches at', 'claws', 'rends']
verbs_claw_2p = ['scratch at', 'claw', 'rend']
verbs_default_attack = ['attacks', 'hits', 'whacks']
verbs_default_attack_2p = ['attack', 'hit', 'whack']
verbs_lash = ['lashes at', 'whips', 'scourges']
verbs_lash_2p = ['lash at', 'whip', 'scourge']
verbs_punch = ['swings at', 'punches', 'clocks']
verbs_punch_2p = ['swing at', 'punch', 'clock']
verbs_slash = ['swings at', 'slashes', 'slices']
verbs_slash_2p = ['swing at', 'slash', 'slice']
verbs_stab = ['pokes at', 'stabs', 'impales']
verbs_stab_2p = ['poke at', 'stab', 'impale']
word_agiler = 'more agile'
word_blocked = 'blocked'
word_bludgeon = 'bludgeon'
word_chop = 'chop'
word_dungeonlevel_abbr = 'DLvl'
word_evasion = 'evasion'
word_evasion_abbr = 'ev'
word_hitpoints_abbr = 'hp'
word_hits = 'hits'
word_lash = 'lash'
word_level_abbr = 'lvl'
word_mana_abbr = 'mp'
word_no = 'no'
word_no_key = 'n'
word_none = 'none'
word_or = 'or'
word_protection = 'protection'
word_protection_abbr = 'pr'
word_punch = 'punch'
word_slash = 'slash'
word_slightly = 'slightly'
word_smarter = 'smarter'
word_space = 'space'
word_stab = 'stab'
word_stronger = 'stronger'
word_target = 'target'
word_yes = 'yes'
word_yes_key = 'y'
you_ascend_stairs = 'You ascend the stairs.'
you_close_door = 'You close the door.'
you_descend_stairs = 'You descend the stairs.'
you_drink = 'You drink %s.'
you_drop_item = 'You drop %s.'
you_open_door = 'You open the door.'
you_pick_up_item = 'You pick up %s (%s).'
you_unequip_and_drop_item = 'You unequip and drop %s.'

pyrogue.util module

util.py - Pyro utility functions

class pyrogue.util.Cycler(iterable)[source]

Bases: object

next()[source]
prev()[source]
exception pyrogue.util.GameOver[source]

Bases: exceptions.Exception

class pyrogue.util.Global[source]

Bases: object

FullDungeonRefresh = True
KeyBuffer = ''
current_level = None
pc = None
pyrogue.util.adjacent(a, b)[source]

Return whether a is 8-way adjacent to b. a and b need to have .x and .y members. Sitting on the same spot counts as adjacent.

pyrogue.util.animation_delay()[source]
pyrogue.util.bonus_str(bonus)[source]

Return -1, +0, +1, etc. from a given bonus.

pyrogue.util.bresenham(x1, y1, x2, y2, initial_error=0)[source]

Bresenham’s famous algorithm.

pyrogue.util.calc_distance(x1, y1, x2, y2)[source]

Calculate simple hypotenuse

Arguments
x1, y1: Position 1 x2, y2: Position 2
Returns
h (int): rounded integer hypotenuse
pyrogue.util.clen(s)[source]

Return the length of a string, excluding embedded color codes.

pyrogue.util.d(p1, p2=None)[source]

Roll dice

pyrogue.util.delay(speed)[source]

Return the delay for a given speed.

pyrogue.util.hit_chance(differential, level=1)[source]

Return the chance to hit a target.

pyrogue.util.int_range(mean, std_dev=None, max_std_dev=2)[source]

Return an random integer normally distributed around mean, with the given std dev.

pyrogue.util.irand(a, b, n=1)[source]
pyrogue.util.linear_path(x1, y1, x2, y2, blocked)[source]

Return a list of (x, y) tuples along a line from (x1, y1) to (x2, y2).

pyrogue.util.path_clear(path, blocked)[source]
pyrogue.util.quantize(r)[source]

Quantize a real number. Returns int(r), and adds 1 if rnd(0, 1) < frac(r).

pyrogue.util.range_direction_path(x, y, target_range, direction, blocked)[source]

Calculate the linear path in a given direction

pyrogue.util.report_combat_hit(attacker, target, damage_taken, verbs=['hits', 'hits', 'hits'], verbs_sp=['hit', 'hit', 'hit'])[source]

Display a text message about a successful attack.

pyrogue.util.report_combat_miss(attacker, target, verbs=['hits', 'hits', 'hits'], verbs_sp=['hit', 'hit', 'hit'])[source]
pyrogue.util.seen(mob)[source]

Return whether the mob is seen by the PC

pyrogue.util.successful_hit(differential, level=1)[source]
pyrogue.util.weighted_choice(lst)[source]

Given a list like [[item1, wieght1], …, [itemN, weightN]], with weights given as real numbers, return one of the items randomly according to weights.

pyrogue.util.wrap(text, width)[source]

A word-wrap function that preserves existing line breaks and most spaces in the text. Expects that existing line breaks are posix newlines (n).

EDB: I didn’t write this beast–I fear and respect it.

Module contents