summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spl-transloc.cc
Commit message (Collapse)AuthorAgeFilesLines
* Remove stuffNicholas Feinberg2014-07-291-1/+1
| | | | | | | .cc, moving its contents into the new stepdown.cc and strings.cc. (The latter also got many donations from libutil.h.) Down with stuff! Up the new flesh!
* Move redraw functions from stuff.cc -> output.ccNicholas Feinberg2014-07-281-0/+1
|
* Create prompt.ccNicholas Feinberg2014-07-271-0/+1
|
* Prompt when reading ?blink if it won't allow controlNicholas Feinberg2014-07-061-0/+16
|
* Clean up ?blinkNicholas Feinberg2014-07-061-2/+2
| | | | | | | Make it only prompt for cancellation when that would actually waste the scroll, and remove some archaic checks to avoid iding -tele equipment for free (since that's all auto-id'd now anyway!)
* Rename 'mesclr()' to 'clear_messages()'reaverb2014-06-221-5/+5
|
* Make corpses and skeletons stationary items (minmay)gammafunk2014-05-261-3/+8
| | | | | | | | | Moving corpses and skeletons to other levels or to other locations within a level is tedious but may be optimal for corpse rot and god abilities like Kiku's corpse prayer. This commit prevents the player from picking up or apporting carrion. It generalizes the code used for nets being stationary, and cleans up and documents various bits of related item pickup code.
* Make apportation not depend on item mass at all.Shmuale Mark2014-05-261-34/+2
| | | | The distance formula is now just the same as before if the mass were 0.
* Chance function(void) to function()reaverb2014-05-241-1/+1
|
* Freely allow blinking in the Abyss.Shmuale Mark2014-05-071-20/+0
| | | | | | | This conditional hadn't been changed since blinking in the Abyss was changed to cause a blink to occur. Random blinking seems like just the chaotic thing that fits in well with the chaotic theme of the place, and it can take the buff.
* Remove scrambling.Shmuale Mark2014-04-061-6/+6
| | | | | | | It was something that was almost never relevant but that cluttered up the code regardless. If it were to be more relevant that would not really be a good thing since a chance for instadeath is rather bad design.
* Remove throwing net degradation, instead mulch probabilisticallyDracoOmega2014-03-121-1/+1
| | | | | | | | | | | | | | Instead of throwing nets accumulating persistent damage as monsters struggled against them (and then becoming impossible to stack in your inventory afterward), they are either outright destroyed by the struggle or remain in normal condition. This should make them a little less cumbersome to use. This commit doesn't actually touch any of the escape formulas (which are an impressive snarl that could definitely use tending to), since probably they would need rewriting from scratch and I didn't want to undertake that so close to 0.14, with various other things still in the air.
* Make all abyss teleports shift the Abyss (minmay).Shmuale Mark2014-03-081-15/+7
| | | | | | | | | | | | | | | | Partly this is to (somewhat) make the Abyss a little easier. Teleports still take longer than orbrun teleports to kick in on average, and in general letting the player know what an action will do is a good thing. But the main reason is that, due to maprot, same-area abyss teleports are a pretty awful interface screw. You are prevented from remembering what monsters were around (this was quite annoying when being marked was more common in the abyss), and though you can see for one second what direction you came from, immediately after the screen refreshes and you can't anymore. Possibly this could lead to improving/removing altogether maprot.
* Don't crash on semicontrolled blink (#8236).Steve Melenchuk2014-03-061-4/+4
| | | | Broken by a5274fd.
* Turn Portal Projectile into a durationChris Campbell2014-02-091-26/+7
| | | | While active, all shots are portalled at the cost of 1MP per shot.
* Confirm Portal Projectile attacks against allies etc.blackcustard2014-01-301-0/+2
|
* Simplify butchery handlingChris Campbell2013-12-061-2/+0
| | | | | | Butchery is always allowed except in a few forms (bat, wisp, fungus). Removes a lot of unnecessary/unused code for swapping weapons and removing equipment when butchering.
* Replace `mpr(s, ch)` with `mprf(ch, s)`Adam Borowski2013-11-291-10/+10
| | | | | | | | | Also simplify quite a few cases. It turns out in >90% cases of non-literals the argument had .c_str(), which meant it was pointlessly malloc()ed and converted from and to std::string. I believe a sprintf is faster, so even the argument of miniscule speed-up doesn't apply.
* More formatting fixes for return (...);Neil Moore2013-11-151-1/+1
|
* Drop unnecessary parentheses from return statements.Adam Borowski2013-11-151-3/+3
|
* Axe a buttload of useless #includes.Adam Borowski2013-11-031-2/+0
| | | | | Can't test Android, MSVC or Mac, but a very brief glance at the diff suggests it's unlikely they're affected.
* Use cell_is_solid where appropriate.Neil Moore2013-11-011-2/+2
|
* Prevent a few more potential clouds in solid features.Neil Moore2013-11-011-3/+6
| | | | Some wizmode-only until we get a wall-swimming form.
* Rewrite monster_iterator.Adam Borowski2013-10-311-1/+1
| | | | | It degenerated to a simple loop over menv, hardly worth any syntactic sugar. I kept it for now, though.
* Rewrite (x*y)/z as x*y/zAdam Borowski2013-10-261-1/+1
| | | | Also, simplify an expression such removal of parentheses revealed.
* Fix a wizmode player teleport crash.Adam Borowski2013-10-241-2/+3
|
* Get rid of random_shuffle().Adam Borowski2013-09-101-1/+1
| | | | | | | | | | | | | | | | | | This should hopefully make games from the same seed proceed the same on all architectures[1], as I can't think of anything else that behaves differently based on pointer size, endianness or exact pointer values. I used a NIH implementation instead of passing a third argument to random_shuffle, as the interface is so much nicer. [1]. This will be affected by terminal size (elemental colours are not resolved outside the screen), tile windows size (random animations), tiles/non-tiles and possibly others. Also, I don't think we use STL hashes anywhere, but if we'd do, the STL implementation will matter. Please don't make this stop you: this commit is only to make test cases from my stress tests portable which is a small benefit, perhaps even smaller than the nicer call interface.
* Whitespace fixes.Adam Borowski2013-08-171-1/+1
|
* Use a finer scale for magic contamination.Raphael Langella2013-08-161-6/+6
| | | | | | | | | | | | It's now updated every turn instead of every 20 turns and it's almost deterministic (only the time scaling use randomized rounding). The bad effects still happen every 20 turns though (just like hell effects and other stuff). It has been scaled by 1000. I tried with 100, but I still had some significant rounding issues, especially with scaling to time_taken. It shouldn't be possible anymore to gain yellow glow from a single cast of invisibility even at max power. Although, in theory, it has a slight chance of putting you just 1 point short of yellow (4999).
* Give up if we can't find a spot for player teleport (#7472)Neil Moore2013-08-161-7/+14
| | | | | | | If there were no rtele-permitting safe squares within range, a limited-range teleport would go into an infinite loop. Now break the loop after 500 tries. Since all limited-range teleports are currently involuntary, we do not print a message when this happens.
* Prevent orb apportation in SprintChris Campbell2013-08-041-3/+5
| | | | | | | | Since it turns out to be a good idea to apport the orb all the way across the map after clearing out earlier areas, if possible. This isn't so much the case in the regular game where Zot:5 enemies might still show up but maybe it'd be simpler/more consistent to just make the orb always apportation immune.
* Remove a special case for Minotaurs amusing Xom in LabsChris Campbell2013-07-291-4/+1
|
* Revert "Track who destroys an item; incur Nemelex penance for deck destruction."Adam Borowski2013-06-151-1/+1
| | | | | | | | | | | | | | | | This follows removal of documentation in 747b1a2d. Giving penance for a pointless act you need to go out your way for is quite strange -- it doesn't in any way restrict the player and thus has no balance gains, and there's a cost of making an already long god description even longer. Plus, you can get rid of decks simply by dropping them; on a non-permanent level if you really want to keep ^F clean. Not sure if the source tracking should be kept; for now I reverted it to keep things simple and to avoid an use of deprecated mindex (let's get rid of it already!), but if there's an use, please unrevert this part. This reverts commit 46bfda39a8d584164fa475188367f331314a644d.
* Track who destroys an item; incur Nemelex penance for deck destruction.Steve Melenchuk2013-05-231-1/+1
| | | | | | | | | The framework here could be adopted to, say, give brownie points to Yredelemnul worshippers for destroying holy items, or other creative item-related god conducts. (More importantly, you can now reliably become an Unlucky Tengu. Hooray.)
* Delay all teleports on the orbrun, instead of half of themChris Campbell2013-05-221-1/+1
| | | | | Since previously it was often a good idea to cancel and restart teleports for a chance of getting a non-delayed one.
* Simplify.David Lawrence Ramsey2013-04-191-5/+2
|
* Formatting fixes.Adam Borowski2013-04-101-1/+2
|
* Make controlled teleports take longer to go offChris Campbell2013-04-091-1/+7
| | | | | The delay also kicks in if cTele is gained while a teleport is active. Could do with a better message, possibly.
* End teleport control duration after a controlled blink or teleportChris Campbell2013-04-091-4/+16
| | | | | For blinking this prevents cheap chaining of semicontrolled blinks. For teleportation it won't have so much of an effect but is consistent.
* Make the ring of teleport control's effect evokable instead of passiveChris Campbell2013-04-091-14/+3
| | | | | Making it require investment in evocations to use as well as a turn to activate adds a little more thought to the process of using it.
* Fix teleporter vault trapping players.Adam Borowski2013-03-271-7/+1
| | | | | | | | | | | | | | | | | | Or, robbing them of XP and items unless they're spoiled (Nemelex's Gamble). In other cases, it's a matter of disrobing just to go through, which is a mere inconvenience except for zigsprint, where it was special-cased (yay consistency). It was also inconsistent with all other fixed means of teleportation, such as Passage of Golubria, portal vaults, hell portals, abyss portals, etc, which all are not swayed by mere -TELE. In the first discussion that happened, the only reasoning for the change was similarity of names between "teleporter" and "-TELE", rather than gameplay reasons. So let's deal with that instead. This reverts commit 7f0416492553db52d7613d506b8ab584b7819904.
* Constify.David Lawrence Ramsey2013-03-191-2/+2
|
* #369 #3456 Mesmerisation applies -cTelePete Hurst2013-03-191-1/+3
| | | | #369 advised degenerating cTele into rTele and it makes sense to apply the same for cBlink. It's probably not worth doing anything more complicated just for mesmerisation since cTele might get removed anyway at some point.
* Player is not the Bugblatter Beast. Fixes disjunction not working against ↵Pete Hurst2013-03-141-1/+1
| | | | monsters that can't see you.
* Increase chance that the Orb refuses to be apported.elliptic2013-03-031-2/+2
| | | | Chance increased from 1/6 to 1/3.
* Don't lose mana and time on HUP-aborted cblink.Neil Moore2012-12-311-1/+6
|
* Don't lose mana+time on HUP-aborted cancellable semi-controlled blink.Adam Borowski2012-12-311-1/+7
|
* Avoid an infinite loop when HUPping at the scblink prompt.Neil Moore2012-12-311-1/+1
|
* Handle non-item sources of -TELE.Adam Borowski2012-12-291-5/+5
| | | | | | Currently, that's only sprint, and not for blink. This fixes relevant spells and abilities being usable but then doing nothing.
* Fix teleporters ignoring stasis, add failure messages for some vaultsChris Campbell2012-12-241-1/+7
| | | | | Except for Zigsprint teleporters, Maxwell's users should be encouraged at all costs.