summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/arena.cc
Commit message (Collapse)AuthorAgeFilesLines
* Move mons_is_friendly to monsters::friendly.Vsevolod Kozlov2009-11-061-1/+1
| | | | Signed-off-by: Robert Vollmert <rvollmert@gmx.net>
* Restore direct setting of you.position in arena.Robert Vollmert2009-11-061-1/+1
| | | | The call to set_position was triggering an ASSERT.
* Add actor::set_position.Robert Vollmert2009-11-061-1/+1
| | | | | | | | | | | | This should be used instead of setting position directly. actor::position could be made "protected" except for the arena's unwind_var(you.position), which is too difficult for me to fix. The reason behind this change is that actors should get their own LOS, whose origin should be synchronized with the actor's position. This change also removes the non-const "coord_def& actor::pos()" (yuk).
* Remove mons_friendly_real and mons_wont_attack_real.Vsevolod Kozlov2009-11-061-1/+1
| | | | | | They were the same as non-_real functions. Signed-off-by: Robert Vollmert <rvollmert@gmx.net>
* arena.cc: different msgs for respawns and summonsMatthew Cline2009-11-061-2/+12
| | | | | Say "A monster respawns!" or "A monster is summoned!" instead of "A monster enters the arena!" for respawns and (non-real) summons.
* Make many checks for monster (non)existence on squares use monster_at().David Lawrence Ramsey2009-11-051-1/+1
| | | | | | | Not all are changed yet, as there are several index checks still needed for debugging purposes. Also, make many checks for player/monster (non)existence use actor_at().
* Split up view.cc.Robert Vollmert2009-11-041-0/+1
|
* Split game_options from externs.h into options.h.Robert Vollmert2009-11-041-0/+1
|
* arena: respawning slime creaturesMatthew Cline2009-11-021-7/+26
| | | | Deal with two respawning slime creatures merging and then splitting.
* Split up monstuff.ccMatthew Cline2009-11-011-2/+2
| | | | | | | A lot of monstuff.cc was moved into mon-abil.cc (monster abilities), mon-act.cc (the main monster loop), mon-behv.cc (monster behaviour) and mon-cast.cc (monster spells). mstuff2.cc was completely merged into other files.
* arena.cc: Respawning merged slime creaturesMatthew Cline2009-10-311-1/+19
| | | | | Deal with slime creatures 'dying' when they merge with another slime creature. Still not quite working 100% properly.
* Splitting up stuff.cc.Robert Vollmert2009-10-301-0/+1
| | | | New: colour.cc, coord.cc, coordit.cc, random.cc, rng.cc.
* Convert player::your_name to std::string.Robert Vollmert2009-10-241-1/+1
| | | | Doesn't seem to break anything...
* Add more minor cosmetic fixes.David Lawrence Ramsey2009-10-211-0/+2
|
* arena.cc: Make sure adjust_spells() gets all monsMatthew Cline2009-10-211-14/+6
| | | | | Apply arena::adjust_spells() in arena_placed_monster() to make sure that it gets absolutely everything.
* Create l_defs.h and move stuff there.Robert Vollmert2009-10-211-0/+1
| | | | | l_defs.h contains headers for things defined in the Lua functions but used elsewhere. This should probably not exist long-term.
* arena: Respawn fix, "move_respawns" option, msgsMatthew Cline2009-10-201-6/+17
| | | | | | | | | | | Give dgn_place_monster() the proper monster level when respawning. New "move_respawns" option teleports respawned monsters as soon as they're placed, so that monsters don't clump up together in a brawl at the center of the arena. Don't filter out monster death messages when dumping messages to arena.result
* arena.cc: Try harder to preserve respawnersMatthew Cline2009-10-191-3/+49
| | | | | | | | If there isn't any room to place a respawning monster in, then rather than letting it vanish, keep it on the list of pending-respawns and hope that space clears up later. Also, if a side with pending-respawns is about to loose because it has 0 active members, then *make* room to place a respawn.
* arena.cc: Don't dump examination messagesMatthew Cline2009-10-191-0/+10
| | | | | Don't dump message to arena.result if they're the result of the user examine the arena.
* New arena option "respawn"Matthew Cline2009-10-191-0/+59
| | | | | If the arena option "respawn" is used then when one of the originally placed monster dies it will be replaced by a copy.
* arena.cc: Avoid divide-by-zero errorMatthew Cline2009-10-181-0/+8
|
* versioning: remove SVN-specific revision data, add Git versioningSteven Noonan2009-10-181-3/+1
| | | | Signed-off-by: Steven Noonan <steven@uplinklabs.net>
* remove unnecessary "version.h" includes, AppHdr.h does it alreadySteven Noonan2009-10-181-1/+0
| | | | Signed-off-by: Steven Noonan <steven@uplinklabs.net>
* Remove a lot of unneccessary includes.Robert Vollmert2009-10-091-3/+0
| | | | | | | The console version still compiles on Linux; both console and tiles version compile in OS X. I haven't been able to test the DOS and Windows compiles -- please fix or tell me about any errors that show up.
* Drop obsolete CVS last-committed headers ($Author$).Adam Borowski2009-10-061-3/+0
|
* Add whitespace fixes.dolorous2009-09-191-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10732 c06c8d41-db1a-0410-9941-cceddc491573
* Some arena tweaks:zelgadis2009-07-221-2/+12
| | | | | | | | | | | | | * When Kirke dies and hogs are turned into humans, don't change their attitute if in arena mode, since that messes up arena book-keeping. * Give an error if a neutral monster is placed in the arena. * If a summoned band leader makes it past the summon throttle restriction, let in all of its band members, even if that will exceed the throttle. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10368 c06c8d41-db1a-0410-9941-cceddc491573
* Apply r10037 to trunk: arena documentation.j-p-e-g2009-06-251-1/+7
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10039 c06c8d41-db1a-0410-9941-cceddc491573
* First part of the merger of fixed artefacts into unrandom artefactszelgadis2009-06-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (further changes will be much smaller). Breaks savefile compatibility, and bumps the major savefile version up to 6. Some changes made to some tiles files, but it hasn't been tested with a tiles build. Overview of changes: * Unrand artefacts are now defined in art-data.txt and is turned into C code via util/art-data.pl. This has the dual advantage of being more readable by humans, and that if the unrand data structure changes then you can just change util/art-data.pl and regenerate the C code rather than having to change some 70 different C structs by hand. * util/art-data.pl automatically updates NO_UNRANDARTS, and also automatically generates an enumeration of all the unrands which are equal to their item.special field. * randart.cc and randart.h have been renamed to artefact.cc and artefact.h, since the files covers all types of artefacts, and the differences between randarts, unrandarts and (former) fixed arts have been minimized since the terms were introduced. Also renamed unrand.h to art-data.h * The brands and resistances of former fixed arts are now handled via artefact properties, but the rest of their special behaviours are still hardcoded. * Unrandarts are now distinguished between normal and "special", with the special ones currently just being identical to the list of the formed fixed arts. Special unrandarts are randomly generated less often than normal unrandarts, can be generated in the Abyss if they've been lost, can't be picked up by monsters, and can't be affected by Tukima's Dance. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10035 c06c8d41-db1a-0410-9941-cceddc491573
* Add spacing fixes.dolorous2009-04-301-2/+2
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9709 c06c8d41-db1a-0410-9941-cceddc491573
* * Fix 2744875 (mutation screen assert).j-p-e-g2009-04-111-1/+1
| | | | | | | | | | * Rename KeymapContext KC_* -> KMC_* to avoid overlap with kill_category KC_*. * Increase odds for chaos brands mimicking brands that hurt the defender. * Tweak chaos_affects_attacker(). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9595 c06c8d41-db1a-0410-9941-cceddc491573
* * Add tile for Nergalle, who's actually not all that ugly but apparently j-p-e-g2009-03-091-4/+6
| | | | | | | | | | | has a really bad fashion sense. * Add a sticky flame marker for monsters. * Replace the trapdoor spider tile with a less original, but nicer one. * Improve shopping interface: replace "examine item" command with a toggle between browsing and shopping. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9397 c06c8d41-db1a-0410-9941-cceddc491573
* If a faction has a new member enter the arena after the faction is defeated butzelgadis2009-01-271-0/+6
| | | | | | | | before the other faction is declared the winner then forget the win and continue the fighting. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8820 c06c8d41-db1a-0410-9941-cceddc491573
* Added the arena tag "miscasts", which causes each monster to randomly miscastzelgadis2009-01-271-0/+22
| | | | | | | each turn. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8817 c06c8d41-db1a-0410-9941-cceddc491573
* Fix bug #2482254: a giant spore exploding was having the mgrd where it used tozelgadis2009-01-181-5/+0
| | | | | | | | | | | | be set to NON_MONSTER *twice*, the second time after the royal jelly had responded to the explosion and spat out a new jelly on the spot the spore used to occupy, leading to the new jelly becoming detached from the mgrd. Allowing the royal jelly to be radnomly generated in the arena with the random_uniques tag, since it's no longer causing a crash. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8545 c06c8d41-db1a-0410-9941-cceddc491573
* Fix [2498711]: In arena mode, mark monsters duplicated by chaos as dolorous2009-01-161-3/+1
| | | | | | | having entered the arena. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8475 c06c8d41-db1a-0410-9941-cceddc491573
* A limited set of commands are now available to use during arena mode:zelgadis2009-01-111-6/+50
| | | | | | | look around ('x'), message history (Control-P) and suspend game (Control-Z). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8408 c06c8d41-db1a-0410-9941-cceddc491573
* Attempt to fix [2498635]: Use memset() instead of bzero().dolorous2009-01-111-1/+1
| | | | git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8406 c06c8d41-db1a-0410-9941-cceddc491573
* 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