[Hide Content]From 67374e29c135a42de52b2f4ec13fcc72b9885386 Mon Sep 17 00:00:00 2001
From: elliptic <hyperelliptical@gmail.com>
Date: Mon, 28 Mar 2011 04:52:08 -0400
Subject: [PATCH] Add some lua hooks for player stuff.
---
crawl-ref/source/l_you.cc | 31 +++++++++++++++++++++++++++++++
1 files changed, 31 insertions(+), 0 deletions(-)
diff --git a/crawl-ref/source/l_you.cc b/crawl-ref/source/l_you.cc
index 10aecd5..7900929 100644
--- a/crawl-ref/source/l_you.cc
+++ b/crawl-ref/source/l_you.cc
@@ -94,6 +94,22 @@ LUARET1(you_saprovorous, number, player_mutation_level(MUT_SAPROVOROUS))
LUARET1(you_levitating, boolean, you.flight_mode() == FL_LEVITATE)
LUARET1(you_flying, boolean, you.flight_mode() == FL_FLY)
LUARET1(you_transform, string, transform_name())
+LUARET1(you_berserk, boolean, you.berserk())
+LUARET1(you_confused, boolean, you.confused())
+LUARET1(you_paralysed, boolean, you.paralysed())
+LUARET1(you_asleep, boolean, you.asleep())
+LUARET1(you_hasted, boolean, you.duration[DUR_HASTE])
+LUARET1(you_slowed, boolean, you.duration[DUR_SLOW])
+LUARET1(you_exhausted, boolean, you.duration[DUR_EXHAUSTED])
+LUARET1(you_teleporting, boolean, you.duration[DUR_TELEPORT])
+LUARET1(you_poisoned, boolean, you.duration[DUR_POISONING])
+LUARET1(you_invisible, boolean, you.duration[DUR_INVIS])
+LUARET1(you_mesmerised, boolean, you.duration[DUR_MESMERISED])
+LUARET1(you_rotting, boolean, you.rotting)
+LUARET1(you_sick, boolean, you.disease)
+LUARET1(you_deaths, number, you.deaths)
+LUARET1(you_lives, number, you.lives)
+
LUARET1(you_where, string, level_id::current().describe().c_str())
LUARET1(you_branch, string, level_id::current().describe(false, false).c_str())
LUARET1(you_subdepth, number, level_id::current().depth)
@@ -188,6 +204,21 @@ static const struct luaL_reg you_clib[] =
{ "levitating", you_levitating },
{ "flying", you_flying },
{ "transform", you_transform },
+ { "berserk", you_berserk },
+ { "confused", you_confused },
+ { "paralysed", you_paralysed },
+ { "asleep", you_asleep },
+ { "hasted", you_hasted },
+ { "slowed", you_slowed },
+ { "exhausted", you_exhausted },
+ { "teleporting", you_teleporting },
+ { "poisoned", you_poisoned },
+ { "invisible", you_invisible },
+ { "mesmerised", you_mesmerised },
+ { "rotting", you_rotting },
+ { "sick", you_sick },
+ { "deaths", you_deaths },
+ { "lives", you_lives },
{ "god_likes_fresh_corpses", you_god_likes_fresh_corpses },
{ "can_consume_corpses", you_can_consume_corpses },
--
1.7.0.4