summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/clua.cc
Commit message (Collapse)AuthorAgeFilesLines
...
* Fixed slow ziggurat level build, fixed ziggurat dismissals of simulacra ↵dshaligram2008-11-281-30/+12
| | | | | | resulting in messages. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7679 c06c8d41-db1a-0410-9941-cceddc491573
* Added functions print_dlua_stack() and print_clua_stack(), which canzelgadis2008-11-271-0/+28
| | | | | | | | | be called from the debugger to print the call stacks of the dlua interpreter and the clua interpreter. Code borrowed from ToME 3 (code I originally wrote, so borrowing is definitely okay). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7651 c06c8d41-db1a-0410-9941-cceddc491573
* Place external loot chamber for ziggurat levels with jellies.dshaligram2008-11-251-3/+47
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7625 c06c8d41-db1a-0410-9941-cceddc491573
* Make a note about how much you paid to enter a ziggurat.zelgadis2008-11-251-0/+23
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7624 c06c8d41-db1a-0410-9941-cceddc491573
* Fix compile warnings (Napkin).dshaligram2008-11-251-0/+4
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7620 c06c8d41-db1a-0410-9941-cceddc491573
* Ziggurat portals charge gold for entry.dshaligram2008-11-251-6/+62
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7610 c06c8d41-db1a-0410-9941-cceddc491573
* Add pillars to ziggurat, more utility functions for Lua to handle maps.dshaligram2008-11-241-0/+17
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7591 c06c8d41-db1a-0410-9941-cceddc491573
* More steps toward ziggurats.dshaligram2008-11-231-9/+69
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7553 c06c8d41-db1a-0410-9941-cceddc491573
* Spadework for ziggurats and other multilevel portal vaults.dshaligram2008-11-201-0/+30
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7520 c06c8d41-db1a-0410-9941-cceddc491573
* Lua marker code is now converted into an anonymous function in the same ↵dshaligram2008-11-181-2/+19
| | | | | | scope as the rest of the map Lua code so that locals defined in the map Lua are visible to the marker code. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7479 c06c8d41-db1a-0410-9941-cceddc491573
* Added lua_datum to wrap the common task of retaining references to Lua ↵dshaligram2008-11-181-2/+82
| | | | | | objects in the Lua registry. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7477 c06c8d41-db1a-0410-9941-cceddc491573
* Added crawl.process_keys to user Lua API to allow a Lua macro to ask Crawl ↵dshaligram2008-11-121-0/+20
| | | | | | to process keystrokes immediately, i.e., not wait until the macro has finished running. Also removed player EV penalty during run/rest/travel. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7443 c06c8d41-db1a-0410-9941-cceddc491573
* Massive overhaul to move towards coord_def().haranp2008-07-301-8/+8
| | | | | | | | | | This might have introduced some bugs: I now get intermittent crashes on startup (this might have to do with the changes to special_room.) Sorry about that - committing before I need to do any more big conflict resolutions. Fixes coming later. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6732 c06c8d41-db1a-0410-9941-cceddc491573
* FR 2017262: add chunk colour to eat prompt. Impleveted via the two newzelgadis2008-07-231-7/+63
| | | | | | | | | | | C lua functions item.name_coloured() (which gives strings like "<lightgreen>a chunk of golden dragon flesh</lightgreen>") and crawl.formatted_mpr(). Could someone commit this to branch for me? Thanks. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6653 c06c8d41-db1a-0410-9941-cceddc491573
* Add a function x_chance_in_y(x,y) to replace the variousj-p-e-g2008-07-061-1/+1
| | | | | | | | random2(y) < x checks, e.g. x_chance_in_y(weight, totalweight). This should make things a bit more readable. Apply it to a number of files. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6428 c06c8d41-db1a-0410-9941-cceddc491573
* Disallow vampires from draining summoned creatures to be consistent withj-p-e-g2008-07-041-2/+2
| | | | | | | | | | | | | summoned creatures being incapable of bleeding on the floor. This makes things more difficult for Vampires; on the other hand there was a (more or less) recent change that lets them regain 1 hp *per turn* when draining corpses. We might also increase the duration of blood potions... Apart from that, various clean-ups. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6393 c06c8d41-db1a-0410-9941-cceddc491573
* Misc. minor cleanups. (Yes, a huge amount of them but still...)j-p-e-g2008-06-261-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6146 c06c8d41-db1a-0410-9941-cceddc491573
* Really fix pickup.lua not to search for a butchering tool if you'rej-p-e-g2008-06-211-1/+16
| | | | | | | | wielding a cursed sharp-edged weapon. (My previous "fix" was preventing auto-picking up a butchering tool, at all!) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6031 c06c8d41-db1a-0410-9941-cceddc491573
* Bug 1992619: if the player hit '>' on a labyrinth entracnce right before itzelgadis2008-06-141-0/+6
| | | | | | | | | | | timed out, then the entrance *would* time out during the stair climbing delay, removing the marker before the delay ended and thus preventing the player from entering. Now timed feature markers check for this, in which case the marker isn't deleted and a message of "The foo vanishes just as you enter it!" is given. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5809 c06c8d41-db1a-0410-9941-cceddc491573
* Improve performance by only checking whether there are lava or deepj-p-e-g2008-06-121-69/+0
| | | | | | | | | | | | | water grids nearby if the player recently moved (or restarted a game) and if a non-adjacent monster tries to reach the player. Remove now unneeded lua code (was used for the old pickup.lua) and make monsters switch away from ranged weapons when engaging you in melee. If a monster will still insist on hitting you with a sling it's a sure sign said sling is cursed (doesn't autoID, though). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5755 c06c8d41-db1a-0410-9941-cceddc491573
* Clean-up (renaming static methods and comments) in a number of files.j-p-e-g2008-06-101-26/+28
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5703 c06c8d41-db1a-0410-9941-cceddc491573
* Move pickup_butcher_tool.txt into (the recently freed) pickup.lua, j-p-e-g2008-06-101-31/+33
| | | | | | | re-enable it (whoops) and clean up its code. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5698 c06c8d41-db1a-0410-9941-cceddc491573
* Added some C lua functions to simplify pickup_butcher_tool.txt. Also,zelgadis2008-06-101-1/+30
| | | | | | | | pickup_butcher_tool.txt now takes claws mutation and whether or not your god likes butchery into account. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5692 c06c8d41-db1a-0410-9941-cceddc491573
* Yikes, so many files! And all I did was add more item evaluationj-p-e-g2008-06-091-7/+10
| | | | | | | | | | | | | | | | | | | | | | | functions for menu colouring and pickup... Added: emergency_item, good_item, dangerous_item, bad_item, and useless_item, all taking into account player species and mutations, so e.g. =see invisible is useless for Naga, and !poison is always bad but only useless if you don't know Evaporate. Never autopickup useless, dangerous (e.g. ?immolation) or inedible items, and simplify the item colour/pickup options accordingly. I'll have to see if pickup.lua is still even needed after this. Removed the menu_colour_prefix_id option as I can't see any reason to turn it off. Oh, and fixed a bug where Kenku were unable to stop levitating if they gained level 15 while levitating. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5658 c06c8d41-db1a-0410-9941-cceddc491573
* For stash searching, annotate dropped items with {dropped} ifzelgadis2008-06-041-0/+12
| | | | | | | annotate_item_dropped is set to true. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5466 c06c8d41-db1a-0410-9941-cceddc491573
* Can now conditionalize settings based on menu_colour_prefix_class andzelgadis2008-06-011-0/+4
| | | | | | | | | menu_colour_prefix_id being set. Used this to make it so that if both are set that identified ego items are colored light blue, not just runed/glowing/etc non-identified items. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5398 c06c8d41-db1a-0410-9941-cceddc491573
* Better support for settings files that include other files:dshaligram2008-05-261-12/+1
| | | | | | | | | | | | | | | | | | | | | | | - Files can be included as "include foo" in .crawlrc instead of using the Lua call: : crawl.read_options('foo'). include foo and the Lua crawl.read_options('foo') are not equivalent - Lua only runs after the start of a new game, which is too late for some option settings. - Crawl searches for included files in this sequence: - Absolute paths: use the path directly (but not if DATA_DIR_PATH is set, since we don't want Crawl to read arbitrary files on multiuser systems). - Search relative to the including file. - Search relative to any -rcdir(s) provided. - Search in the data file search path. - The data file search path now includes settings/ for when we move rc stuff to settings/ .gitignore: ignore saves and morgue dirs correctly. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5256 c06c8d41-db1a-0410-9941-cceddc491573
* Allow Troggies to autopickup manuals, and change the message whenj-p-e-g2008-05-251-0/+7
| | | | | | | | | gaining the "Book Burn" ability (only when you first join Trog) to explicitly refer to spellbooks. I like the alliteration in the ability name, so kept that as is. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5232 c06c8d41-db1a-0410-9941-cceddc491573
* Pushing some dungeon-related lua functions back into C++.ennewalker2008-05-221-0/+53
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5176 c06c8d41-db1a-0410-9941-cceddc491573
* Allow vampires to mutate when Satiated or higher, and make non-physicalj-p-e-g2008-04-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | mutations only apply at these hunger levels, too. Differentiated mutations into physical (affecting a character's appearance and stuff: scales, hooves, wings, ...) and internal (resistances etc.). I guess this is what people usually refer to as "cosmetic", which I think is an inaccurate description since it makes it sound like they were completely superficial and had no real effect. Here's a list of arbitrarily chosen "physical" mutations: * tough skin, all scales, and fur * strong/clever/agile, and weak/dopey/clumsy * deformed * strong but stiff, and flexible but weak * frail, and robust * claws, fangs, hooves, talons, and horns * stinger, wings * blue/green marks Mutations currently not applying are still listed on the 'A' screen, though in darkgrey and in (brackets). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4246 c06c8d41-db1a-0410-9941-cceddc491573
* Apply Horst von Brand's (first) patch 1887488: gcc-4.3 compile failures.j-p-e-g2008-04-141-51/+53
| | | | | | | I'm not sure what to do about the rest of that tracker item. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4233 c06c8d41-db1a-0410-9941-cceddc491573
* Split potions of blood and potions of coagulated blood into twoj-p-e-g2008-03-261-0/+5
| | | | | | | | | | | | | | | | distinct potion types to make stacking easier. Coagulated blood is not created randomly, and aging potions of blood turn into potions of coagulated blood, so none of that changed. Well, except the name: congealed -> coagulated. This also means that they now have distinct descriptions, though seeing potions in your inventory coagulate will identify both of them. And I checked: potions in shops will coagulate as well and disappear. Coagulated blood is cheaper, but if you need it you won't want to wait around, right? git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3884 c06c8d41-db1a-0410-9941-cceddc491573
* Fix some link errors and a few remaining compile warnings (thepauldubois2008-03-101-2/+0
| | | | | | | | | | | | | ones that aren't bugs) - if static const int foo=VALUE; is in header, don't need to have a definition in a .cc file. The definition goes into every .cc file with "vague linkage" - add sqlite and lua to the sln/vcproj git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3576 c06c8d41-db1a-0410-9941-cceddc491573
* Fix bug caught by MSVC compiler.pauldubois2008-03-101-1/+1
| | | | | | | (!expr == foo) is not the same as (expr != foo) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3569 c06c8d41-db1a-0410-9941-cceddc491573
* Fix crash on shutdown caused by bad order of static destruction (ugh).pauldubois2008-03-091-2/+0
| | | | | | | | | | | | crawl_environment's destructor uses dlua, but dlua was getting destroyed first. Rather than mess with stupidly complicated singleton patterns, I've moved the definition of clua and dlua into acr.cc, to just before crawl_environment. This makes the order of construction/destruction well-defined and should be a workable long-term solution. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3559 c06c8d41-db1a-0410-9941-cceddc491573
* [Bug 1907221] Add "Modified for Crawl Reference" statement and author to aj-p-e-g2008-03-081-0/+3
| | | | | | | | huge number of files. Also correct file name comments. No coding changes. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3539 c06c8d41-db1a-0410-9941-cceddc491573
* Make Options.race and Options.class translate correctly, no matter whether j-p-e-g2008-03-021-0/+1
| | | | | | | | | | | | the old or new species/classes order is used. Entails some more unborking of newgame.cc. Also: make Esc leave the species selection screen (synonym for 'X', quit the game), and use it to jump back to species selection from all other selection possibilities (class, book, weapon, god) as a synonym for Bksp. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3505 c06c8d41-db1a-0410-9941-cceddc491573
* Apply Paul's patch 1901939: including files in init.txtj-p-e-g2008-02-271-0/+22
| | | | | | | | | | | | | with some clean-up and fix in acr.cc to make the results apply at once (instead of only after a screen redraw). I've tested it and everything works fine. Recursive inclusion, e.g. read_options('init.txt'), prints a stack overflow error but doesn't crash the game, so I think that's fine for now. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3469 c06c8d41-db1a-0410-9941-cceddc491573
* 'DD' is now an alias for 'Dy'.haranp2008-01-161-1/+1
| | | | | | | | Clean up some corpse handling, add food_is_rotten() function instead of manually checking special < 100 everywhere. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3283 c06c8d41-db1a-0410-9941-cceddc491573
* Database entries fetched with getLongDescription() can contain embededzelgadis2007-12-061-0/+2
| | | | | | | | | Lua code. The code will be replaced with its return value before being displayed to the user. The Lua code has no access to the thing being described, and so can only rely on global data. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3011 c06c8d41-db1a-0410-9941-cceddc491573
* Nemelex abandonment now shuffles and unmarks all decks.haranp2007-12-011-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2962 c06c8d41-db1a-0410-9941-cceddc491573
* Removed: safe_autopickup, safe_zero_exp, lowercase_invocations,haranp2007-11-161-9/+0
| | | | | | | | always_greet, terse_hand, increasing_skill_progress, use_notes, confirm_self_target. (default_autoprayer still exists.) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2859 c06c8d41-db1a-0410-9941-cceddc491573
* Added an option, always_confirm_butcher.haranp2007-11-151-0/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2857 c06c8d41-db1a-0410-9941-cceddc491573
* 'q' (or Escape) when prompted for food on the floor now cancels out ofharanp2007-11-131-4/+8
| | | | | | | eating completely, rather than moving to inventory. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2847 c06c8d41-db1a-0410-9941-cceddc491573
* Applied bobbens' patch: you.skills("foo") gets skill level of foo from Lua.dshaligram2007-11-021-0/+4
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2721 c06c8d41-db1a-0410-9941-cceddc491573
* Added you.good_god() and you.evil_god() to check if the player is ↵dshaligram2007-11-011-1/+8
| | | | | | worshipping a good/evil god. Passing a god name is optional, and will check if that god is good/evil (you.good_god("Elyvilon") == true). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2715 c06c8d41-db1a-0410-9941-cceddc491573
* [1821098] Fixed bat transform not conferring flight. Fixed ↵dshaligram2007-10-271-2/+2
| | | | | | player_is_levitating and renamed it to player_is_airborne to describe the function better. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2613 c06c8d41-db1a-0410-9941-cceddc491573
* Fixed bug that would allow Lua dofile on arbitrary files using absolute paths.dshaligram2007-10-251-1/+5
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2578 c06c8d41-db1a-0410-9941-cceddc491573
* Use a safer macro for clua ret (doy).dshaligram2007-10-251-2/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2572 c06c8d41-db1a-0410-9941-cceddc491573
* [1819634] Fixed filenames missing in Lua file-not-found error messages.dshaligram2007-10-251-1/+3
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2549 c06c8d41-db1a-0410-9941-cceddc491573