Module you

Information about the player.

Functions

abil_letters () Ability letters in use.
abil_table () Ability table.
abils () Available abilities
absdepth () The current "absolute depth".
agile () Are you agile?
anchored () Are you dimensionally anchored?
asleep () Are you asleep?
base_mp () Base max mp.
base_skill (name) Base skill level.
berserk () Are you berserk?
best_skill () Best skill.
branch () What branch are you in?
breath_timeout () Are you out of breath?
brilliant () Are you brilliant?
can_smell () Can you smell?
can_train_skill (name) Can a skill be trained?
caught () Are you caught in something?
class () Get name of player's background.
confused () Are you confused?
constricted () Are you currently constricted?
constricting () Are you currently constricting anything?
contaminated () Are you contaminated?
corrosion () Corrosion amount.
deaths () How many times have you died?
depth () Your current depth in that branch.
depth_fraction () What fraction of the branch you've gone into.
dexterity () Dexterity.
evil_god ([god=you.god()]) Is this [player's] god evil?
exhausted () Are you exhausted?
extra_resistant () Are you extra resistant?
feel_safe () Do you feel safe?
floor_items () The items on your cell on the floor.
flying () Are you flying?
genus () Your genus.
get_base_mutation_level (mutationname[, innate=true[, temp=true[, normal=true]]]) Get the mutation level of a mutation.
get_training_target (name) Get a training target.
god () Get name of player's god
gold () How much gold do you have?
good_god ([god=you.god()]) Is this [player's] god good?
gourmond () Gourmand.
has_claws () Do you have claws?
hasted () Are you hasted?
have_orb () Do you have the orb?
how_mutated (innate, levels, temp) How mutated are you?
hp () Hit points.
hunger () Hunger state number.
hunger_name () Hunger state string.
intelligence () Intelligence.
invisible () Are you invisible?
is_level_on_stack (levelname) Check the level stack.
like_chunks () Do you like to eat chunks?
lives () How many extra lives do you have?
los () LOS Radius.
mem_spells () Get memorisable spells.
mesmerised () Are you mesmerised?
mighty () Are you mighty?
monster () The name of your monster type.
mp () Magic points.
mutation (mutation) Deprecated: use you.get_base_mutation_level.
mutation_overview () Mutation overview string.
name () Get player's name.
num_runes () How many runes do you have?
on_fire () Are you on fire?
one_time_ability_used () Has the [player's] current god's one-time ability been used?
paralysed () Are you paralysed?
petrifying () Are you petrifying?
piety_rank () Stars of piety.
poison_survival () Minimum hp after poison wears off.
poisoned () Are you poisoned?
race () Get name of player's race.
regenerating () Are you regenerating?
res_cold () Cold resistance (rC).
res_corr () Corrosion resistance (rCorr).
res_draining () Negative energy resistance (rN).
res_drowning () Drowning resistance (rDrown).
res_fire () Fire resistance (rF).
res_mutation () Mutation resistance (rMut).
res_poison () Poison resistance (rPois).
res_shock () Electric resistance (rElec).
rooted () Are you rooted?
rot () How much rot.
see_cell (x, y) Can you see a cell?
see_cell_no_trans (x, y) Can you see this cell without looking through a window?
see_cell_solid (x, y) Can you see this cell without something solid in the way?
see_cell_solid_see (x, y) Can you see this cell with nothing in the way?
see_invisible () See invisible (sInv).
set_training_target (name, target) Set a training target.
shrouded () Do you have a Shroud of Golubria?
sick () Are you sick?
silenced () Are you silenced?
silencing () Are you silencing the world around you?
skill (name) Current skill level.
skill_cost (name) Cost of training this skill.
skill_progress (name) Skill progress.
slowed () Are you slowed?
spell_letters () Currently used spell letters
spell_levels () How many spell levels are currently available.
spell_table () Get the spell table.
spells () List your spells
spirit_shield () Guardian spirit.
status ([stat]) Check status effects.
stop_activity () Interrupt the current multi-turn activity or macro sequence.
strength () Strength.
swift () Are you currently +Swift or -Swift?
taking_stairs () Are you taking the stairs?
teleporting () Are you teleporting?
temp_mutation (mutation) Deprecated: use you.get_base_mutation_level.
temp_mutations () How many temporary mutations do you have?
time () Total elapsed time in auts.
train_skill (name[, level]) Train a skill.
transform () Current transformation, if any.
turn_is_over () Has player done something that takes time?
turns () How many turns have been taken.
under_penance () Are you under penance?
where () Where are you?
wizard () Is player in wizard mode?
xl_progress () XL progress.
you_can_consume_corpses () Can you eat chunks?


Functions

abil_letters ()
Ability letters in use.

Returns:

    array An array of ability letters
abil_table ()
Ability table.

Returns:

    table A map of letters to ability names
abils ()
Available abilities

Returns:

    array An array of ability names.
absdepth ()
The current "absolute depth". Absolute depth of the current location.

Returns:

    number
agile ()
Are you agile?

Returns:

    boolean
anchored ()
Are you dimensionally anchored?

Returns:

    boolean
asleep ()
Are you asleep?

Returns:

    boolean
base_mp ()
Base max mp.

Returns:

    int
base_skill (name)
Base skill level. Ignores drain, crosstraining, &c.

Parameters:

  • name string
berserk ()
Are you berserk?

Returns:

    boolean
best_skill ()
Best skill.

Returns:

    string
branch ()
What branch are you in?

Returns:

    string
breath_timeout ()
Are you out of breath?

Returns:

    boolean
brilliant ()
Are you brilliant?

Returns:

    boolean
can_smell ()
Can you smell?

Returns:

    boolean
can_train_skill (name)
Can a skill be trained?

Parameters:

  • name string skill name

Returns:

    boolean
caught ()
Are you caught in something?

Returns:

    string or nil what's got you
class ()
Get name of player's background.

Returns:

    string
confused ()
Are you confused?

Returns:

    boolean
constricted ()
Are you currently constricted?

Returns:

    boolean
constricting ()
Are you currently constricting anything?

Returns:

    boolean
contaminated ()
Are you contaminated?

Returns:

    boolean
corrosion ()
Corrosion amount.

Returns:

    int
deaths ()
How many times have you died?

Returns:

    int
depth ()
Your current depth in that branch.

Returns:

    int
depth_fraction ()
What fraction of the branch you've gone into.

Returns:

    number
dexterity ()
Dexterity.

Returns:

  1. int current dexterity
  2. int max dexterity
evil_god ([god=you.god()])
Is this [player's] god evil?

Parameters:

  • god string (default you.god())

Returns:

    boolean
exhausted ()
Are you exhausted?

Returns:

    boolean
extra_resistant ()
Are you extra resistant?

Returns:

    boolean
feel_safe ()
Do you feel safe?

Returns:

    boolean
floor_items ()
The items on your cell on the floor.

Returns:

    array an Array of items.Item objects
flying ()
Are you flying?

Returns:

    boolean
genus ()
Your genus. As a lower-case plural string.

Returns:

    string
get_base_mutation_level (mutationname[, innate=true[, temp=true[, normal=true]]])
Get the mutation level of a mutation. If all optional parameters are false this returns zero.

Parameters:

  • mutationname string
  • innate boolean include innate mutations (default true)
  • temp boolean include temporary mutations (default true)
  • normal boolean include normal mutations (default true)

Returns:

    int level
get_training_target (name)
Get a training target.

Parameters:

  • name string

Returns:

    number
god ()
Get name of player's god

Returns:

    string
gold ()
How much gold do you have?

Returns:

    int
good_god ([god=you.god()])
Is this [player's] god good?

Parameters:

  • god string (default you.god())

Returns:

    boolean
gourmond ()
Gourmand.

Returns:

    boolean
has_claws ()
Do you have claws?

Returns:

    int claws level
hasted ()
Are you hasted?

Returns:

    boolean
have_orb ()
Do you have the orb?

Returns:

    boolean
how_mutated (innate, levels, temp)
How mutated are you? Adds up the total number (including levels if requested) of mutations.

Parameters:

  • innate boolean include innate mutations
  • levels boolean count levels
  • temp boolean include temporary mutations

Returns:

    int
hp ()
Hit points.

Returns:

  1. int current hp
  2. int current max hp
hunger ()
Hunger state number.

Returns:

    int
hunger_name ()
Hunger state string.

Returns:

    string
intelligence ()
Intelligence.

Returns:

  1. int current intelligence
  2. int max intelligence
invisible ()
Are you invisible?

Returns:

    boolean
is_level_on_stack (levelname)
Check the level stack. When entering portal branches or the abyss crawl tracks where we came from with a level stack, which we can query. Can take a Branch or Branch:depth string.

Parameters:

  • levelname string

Returns:

    boolean
like_chunks ()
Do you like to eat chunks? Returns a number so as not to break existing scripts.

Returns:

    int
lives ()
How many extra lives do you have?

Returns:

    int
los ()
LOS Radius.

Returns:

    int
mem_spells ()
Get memorisable spells. This lists the spells available in the spell library.

Returns:

    array An array of spell names.
mesmerised ()
Are you mesmerised?

Returns:

    boolean
mighty ()
Are you mighty?

Returns:

    boolean
monster ()
The name of your monster type.

Returns:

    string
mp ()
Magic points.

Returns:

  1. int current mp
  2. int current max mp
mutation (mutation)
Deprecated: use you.get_base_mutation_level. Equivalent to you.get_base_mutation_level(name)

Parameters:

  • mutation string name

Returns:

    int num
mutation_overview ()
Mutation overview string.

Returns:

    string
name ()
Get player's name.

Returns:

    string
num_runes ()
How many runes do you have?

Returns:

    int
on_fire ()
Are you on fire?

Returns:

    boolean
one_time_ability_used ()
Has the [player's] current god's one-time ability been used? (if any).

Returns:

    boolean
paralysed ()
Are you paralysed?

Returns:

    boolean
petrifying ()
Are you petrifying?

Returns:

    boolean
piety_rank ()
Stars of piety.

Returns:

    int
poison_survival ()
Minimum hp after poison wears off.

Returns:

    int
poisoned ()
Are you poisoned?

Returns:

    boolean
race ()
Get name of player's race.

Returns:

    string
regenerating ()
Are you regenerating?

Returns:

    boolean
res_cold ()
Cold resistance (rC).

Returns:

    int resistance level
res_corr ()
Corrosion resistance (rCorr).

Returns:

    int resistance level
res_draining ()
Negative energy resistance (rN).

Returns:

    int resistance level
res_drowning ()
Drowning resistance (rDrown).

Returns:

    int resistance level
res_fire ()
Fire resistance (rF).

Returns:

    int resistance level
res_mutation ()
Mutation resistance (rMut).

Returns:

    int resistance level
res_poison ()
Poison resistance (rPois).

Returns:

    int resistance level
res_shock ()
Electric resistance (rElec).

Returns:

    int resistance level
rooted ()
Are you rooted?

Returns:

    boolean
rot ()
How much rot.

Returns:

    int
see_cell (x, y)
Can you see a cell? Uses player-centered coordinates

Parameters:

  • x int
  • y int

Returns:

    boolean
see_cell_no_trans (x, y)
Can you see this cell without looking through a window? Checks line of sight treating transparent rock and stone as opaque. Uses player-centered coordinates.

Parameters:

  • x int
  • y int

Returns:

    boolean
see_cell_solid (x, y)
Can you see this cell without something solid in the way? Checks line of sight treating all solid features as opaque. Uses player-centered coordinates.

Parameters:

  • x int
  • y int

Returns:

    boolean
see_cell_solid_see (x, y)
Can you see this cell with nothing in the way? Checks line of sight treating all solid features as opaque and properly checking bushes and clouds. Uses player-centered coordinates.

Parameters:

  • x int
  • y int

Returns:

    boolean
see_invisible ()
See invisible (sInv).

Returns:

    boolean
set_training_target (name, target)
Set a training target.

Parameters:

  • name string
  • target number

Returns:

    number or nil if successfully set the new target
shrouded ()
Do you have a Shroud of Golubria?

Returns:

    boolean
sick ()
Are you sick?

Returns:

    boolean
silenced ()
Are you silenced?

Returns:

    boolean
silencing ()
Are you silencing the world around you?

Returns:

    boolean
skill (name)
Current skill level.

Parameters:

  • name string

Returns:

    number
skill_cost (name)
Cost of training this skill.

Parameters:

  • name string

Returns:

    number
skill_progress (name)
Skill progress.

Parameters:

  • name string skill name

Returns:

    number percentage of the way to the next skill level
slowed ()
Are you slowed?

Returns:

    boolean
spell_letters ()
Currently used spell letters

Returns:

    array An array of letters

See also:

spell_levels ()
How many spell levels are currently available.

Returns:

    int
spell_table ()
Get the spell table.

Returns:

    table A table matching spell letters to spell names

See also:

spells ()
List your spells

Returns:

    array An array of spell names

See also:

spirit_shield ()
Guardian spirit. Returns a number for backwards compatibility.

Returns:

    int
status ([stat])
Check status effects. Given a specific status name, checks for that status. Otherwise, lists all statuses.

Parameters:

  • stat string (optional)

Returns:

    string or boolean
stop_activity ()
Interrupt the current multi-turn activity or macro sequence.
strength ()
Strength.

Returns:

  1. int current strength
  2. int max strength
swift ()
Are you currently +Swift or -Swift? If you have neither, returns 0. If you are +Swift, +1, and -Swift, -1.

Returns:

    int Swift level
taking_stairs ()
Are you taking the stairs?

Returns:

    boolean
teleporting ()
Are you teleporting?

Returns:

    boolean
temp_mutation (mutation)
Deprecated: use you.get_base_mutation_level. Equivalent to you.get_base_mutation_level(name, false, true, false)

Parameters:

  • mutation string name

Returns:

    int num
temp_mutations ()
How many temporary mutations do you have?

Returns:

    int
time ()
Total elapsed time in auts.

Returns:

    int
train_skill (name[, level])
Train a skill. Training levels:

  • 0 is disable
  • 1 is enable
  • 2 is focus

If no level is passed, does not change the current training.

Parameters:

  • name string
  • level int set training level (optional)

Returns:

    int training level
transform ()
Current transformation, if any.

Returns:

    string transformation name
turn_is_over ()
Has player done something that takes time?

Returns:

    boolean
turns ()
How many turns have been taken.

Returns:

    int
under_penance ()
Are you under penance?

Returns:

    boolean
where ()
Where are you?

Returns:

    string
wizard ()
Is player in wizard mode?

Returns:

    boolean
xl_progress ()
XL progress.

Returns:

    number percentage of the way to the next xl [0,100]
you_can_consume_corpses ()
Can you eat chunks?

Returns:

    boolean
generated by LDoc 1.4.6 Last updated 2018-08-21 11:24:55