summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/arena.cc
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix compilation (oops).dolorous2009-01-101-0/+4
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8398 c06c8d41-db1a-0410-9941-cceddc491573
* Add more minor cosmetic fixes.dolorous2009-01-101-23/+16
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8397 c06c8d41-db1a-0410-9941-cceddc491573
* Add whitespace fixes.dolorous2009-01-101-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8392 c06c8d41-db1a-0410-9941-cceddc491573
* Typo fix.dolorous2009-01-101-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8388 c06c8d41-db1a-0410-9941-cceddc491573
* Apply Eino's patches 2494428, 2494591 and 2494703. Thanks!j-p-e-g2009-01-091-0/+8
| | | | | | | | | I had to comment out the line set_random_mon_list in icecave.des because that gave an error "Too many arguments" and I couldn't find any example where it was already used. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8356 c06c8d41-db1a-0410-9941-cceddc491573
* Change arena item culling to cull oldest items first instead of most boringzelgadis2009-01-091-152/+158
| | | | | | | | | | | | | | | | | | | items first. Removed arena tag "move_spawners", replaced it with "move_summons", which moves summons to a random location as soon as they're placed. Added tag "summon_throttle:", which if set prevents summons from being placed if the summoner has N or more allies. Make arena monsters ignore test spawners, since spawners are only pseudo-monsters placed in order to summons real monsters (plus attacking them is a waste of time since they're unkillable). Tell the arena when a corpse is placed. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8349 c06c8d41-db1a-0410-9941-cceddc491573
* Yet another fix to the arena win/loss/tie logic.zelgadis2009-01-071-26/+256
| | | | | | | | | | | | | | | | | | | | | | | During arena mode don't reserve any of mitm[] when creating new items, and when mitm[] fills up call arena_cull_items() instead of _cull_items(), since in arena mode we can cull via how boring/interesting the items are rather than having to consider game balance and fairness to the player. Allow the arena to veto monster placement, rather than culling them immediately after they're placed. New arena tags: * "no_bands" prevents band members from being placed. * "move_spawners" teleports test spawners every turn to spread their summons randomly over the arena. * "ban_glyphs:" lists a set of text glyphs of types of monsters which shouldn't be allowed in the arena. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8300 c06c8d41-db1a-0410-9941-cceddc491573
* Add spacing fixes.dolorous2009-01-061-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8272 c06c8d41-db1a-0410-9941-cceddc491573
* Get the arena tied-round and giant spore logic working again, partially byzelgadis2009-01-061-26/+28
| | | | | | | | | making self-initiated explosions happen directly in melee_attack::mons_self_destructs() and by calling arena_monster_died() after the spore has exploded instead of before. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8268 c06c8d41-db1a-0410-9941-cceddc491573
* Slightly improved handling of ties and suicidal giant spores, plus more sanityzelgadis2009-01-061-17/+113
| | | | | | | checking. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8267 c06c8d41-db1a-0410-9941-cceddc491573
* Consider a round a tie if there aren't any monsters at all left at the end of azelgadis2009-01-061-36/+111
| | | | | | | | | | | | | | turn. Unless one of the monster involved was a giant spore or ball lightning, in which case if the explosion caused the death of the final monster then the exploder is considered to be the winner (with "giant spore v giant spore" the first to explode is the winner). Figure out if a fight is still ongoing by doing book-keeping on how many members of each faction is alive, rather than sweeping through menv[] after every turn looking for living monsters. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8263 c06c8d41-db1a-0410-9941-cceddc491573
* Make all the starting equipment of arena monsters fully identified, pluszelgadis2009-01-061-0/+17
| | | | | | | | | | | | | | randomize the colour of their potions and scrolls so as to not leak any info to the player. During arena mode don't display the pluses, curse status or glowing/runed/etc status of items. Don't learn-through-observation the identities of potions/wands/etc during arena mode. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8257 c06c8d41-db1a-0410-9941-cceddc491573
* In arena mode, make mons_friendly() and mons_wont_attack() always return false,zelgadis2009-01-061-1/+2
| | | | | | | | | | | | | with mons_friendly_real() and monst_wont_attack_real() having the old behaviour of ignoring arena mode. Remove all special casing of "mons_friendly(mon) && !crawl_state.arena", instead using mons_friendly_real() and mons_wont_attack_real() in the monster code which distinguishes friend from foe. Might be a bit buggy. Make Zot traps affect all monsters in arena mode, and never the player. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8255 c06c8d41-db1a-0410-9941-cceddc491573
* The arena tag "real_summons" causes summoned monsters to be turned real aszelgadis2009-01-051-16/+42
| | | | | | | | | | | | | | soon as they're placed, allowing them to drop items and corpses and protecting them from abjuration and timing out. (Still doesn't let summoned monster be created with throwing nets, though) The arena tag "no_chain_summons" strips summoning spells from summoned monsters (even in conjunction with "real_summons"), while not stripping such spells from the original arena monsters. (Though for some reason it doesn't prevent summoned Lom Lobon from summoning ball lightning) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8243 c06c8d41-db1a-0410-9941-cceddc491573
* Place arena factions in different order on alternating rounds to prevent one ↵dshaligram2009-01-051-3/+26
| | | | | | team from getting the first move advantage on all rounds. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8241 c06c8d41-db1a-0410-9941-cceddc491573
* Oops, I'd made cycle_random cycle through uniques instead of throughzelgadis2009-01-051-2/+8
| | | | | | | | | place-appropraite monsters. Tags like "no_immobile" now apply to random_uniques git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8227 c06c8d41-db1a-0410-9941-cceddc491573
* Adding REVISION() macro to all source files.ennewalker2009-01-041-0/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8217 c06c8d41-db1a-0410-9941-cceddc491573
* When dumping arena messages to the results file, prefix talk messages withzelgadis2009-01-041-7/+50
| | | | | | | | | | | | | "TALK: " and sound messages with "SOUND: ". The arena tag "names" can be used to give random names to all non-unique monsters. The arena tag "random_uniques" can be used to make Shadow Creatures summon uniques instead of non-unqiues. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8216 c06c8d41-db1a-0410-9941-cceddc491573
* Move arena place setting to take effect before monsters are generated so ↵dshaligram2009-01-041-12/+10
| | | | | | that the "random" monster spec produces the right monsters. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8197 c06c8d41-db1a-0410-9941-cceddc491573
* Add ASSERT(!crawl_state.arena) to a number of places.zelgadis2009-01-031-1/+4
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8184 c06c8d41-db1a-0410-9941-cceddc491573
* [2468791] Reduce distinction between minivaults and floating vaults. All ↵dshaligram2009-01-031-1/+1
| | | | | | vaults are now handled by _build_vaults. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8169 c06c8d41-db1a-0410-9941-cceddc491573
* The arena now prevents undesired random monsters from being placed by tellingzelgadis2009-01-031-66/+88
| | | | | | | | | | | | | | | | | | | | | pick_random_monster() to try something else, rather than by culling them after they're placed. By default the arena prevents zero xp monsters from being randomly placed. To allow them to be placed use the spec tag "allow_zero_xp". Removed the arena spec tag "alert", since it's no longer needed. Added the arena spec tag "cycle_random", which if set causes pick_random_monster() to cycle through all the monsters valid for the level_id chosen as the arena's place. Produces a greater variety of monsters when using test spawners. If arena mode is dumping message to the output file then prefix error messages with "ERROR: " and diagnostic messages with "DIAG: " git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8165 c06c8d41-db1a-0410-9941-cceddc491573
* Add arena_force_ai option (also settable as "force_ai" or "no_force_ai" in ↵dshaligram2009-01-031-0/+3
| | | | | | the arena spec) that when unset, uses the real game's monster AI, and when set, forces monsters to attack. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8160 c06c8d41-db1a-0410-9941-cceddc491573
* Silencing warnings.ennewalker2009-01-021-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8140 c06c8d41-db1a-0410-9941-cceddc491573
* Fix arena not placing water monsters correctly, remove monster habitat ↵dshaligram2009-01-021-5/+5
| | | | | | special-casing for "generation" time. Also fix arena "friendlies" not picking up items. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8130 c06c8d41-db1a-0410-9941-cceddc491573
* Make monster behaviour in arenas smarter, allow delay:N in arena spec to set ↵dshaligram2009-01-021-4/+28
| | | | | | arena_delay. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8129 c06c8d41-db1a-0410-9941-cceddc491573
* Miscellaneous arena improvements: items, lua preludes, tiles fixes.ennewalker2009-01-021-3/+10
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8123 c06c8d41-db1a-0410-9941-cceddc491573
* Reduce arena end-of-round delay, do arena LOS from current LOS center, not ↵dshaligram2009-01-021-2/+2
| | | | | | center of displayed grid (vgrdc can be different from glosc() if view_lock=no). Also fix monster behaviour to seek instead of wander in the arena. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8119 c06c8d41-db1a-0410-9941-cceddc491573
* A place string can be specified via the arena_place tag to control whatzelgadis2009-01-021-5/+49
| | | | | | | | | | monsters are summoned via the Shadow Creatures spell. The no_immobile tag can be used to cause summoned immobile monsters to be immediately culled after they're summoned. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8111 c06c8d41-db1a-0410-9941-cceddc491573
* Fixes for arena mode in tiles mode. It runs now, but there are still some ↵ennewalker2009-01-021-0/+6
| | | | | | | | | visual issues (error tiles) because env.show gets updated weirdly in arena mode. Tangentially related to fixing this, also cleaning up logic in view.cc to use grid2show, adding a number of asserts for tiles-related problems, adding error tiles for all textures, and fixing some incorrect logic about centering on the player instead of vgrdc. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8104 c06c8d41-db1a-0410-9941-cceddc491573
* You can add the tag "alert" to the arena spec in order to alert the factions tozelgadis2009-01-011-0/+42
| | | | | | | each others presence, even if they aren't in LOS of each other. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8078 c06c8d41-db1a-0410-9941-cceddc491573
* Don't let the player starve to death while observing the arena.zelgadis2009-01-011-0/+2
| | | | | | | ouch() asserts if called while in arena mode. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8077 c06c8d41-db1a-0410-9941-cceddc491573
* Added arena game options:zelgadis2009-01-011-2/+58
| | | | | | | | | | | | | | | | | * arena_dump_msgs, which if true will dump all mpr()'d messages into arena.result * arena_dump_msgs_all, which will cause arena_dump_msgs to dump all messages, not just ones considered "dump worthy" * arena_list_eq, which if true will cause all items the monsters came equipped with to be dumped to arena.result Also, made arena_delay option settable, so you can do "arena_delay = 0" to make the simulation zip by. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8071 c06c8d41-db1a-0410-9941-cceddc491573
* If the two factions are identical, like "rat v rat", then name one "rat (A)"zelgadis2009-01-011-8/+33
| | | | | | | | | and the other "rat (B)". Put the monster spec in the arena.result file before the win/loss record. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8070 c06c8d41-db1a-0410-9941-cceddc491573
* Allow choosing different arena layouts (patch by sorear).dshaligram2008-12-311-2/+13
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8060 c06c8d41-db1a-0410-9941-cceddc491573
* Add arena mode, activated on the command-line by 'crawl -arena "monster v ↵dshaligram2008-12-311-0/+450
monster"' (eg: crawl -arena "Sigmund v Jessica") to let monsters fight each other undisturbed by the player. Good to examine monster AI and monster behaviour when the player is AWOL. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8059 c06c8d41-db1a-0410-9941-cceddc491573