summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spl-tornado.cc
Commit message (Collapse)AuthorAgeFilesLines
* Create prompt.ccNicholas Feinberg2014-07-271-1/+1
|
* Move canned_message() from stuff.cc to message.ccNicholas Feinberg2014-07-271-0/+1
|
* Separate 'permanent' and 'temporary' monster hit diceNicholas Feinberg2014-07-131-1/+1
| | | | As part of a wider scheme to make draining temporary.
* Move a little more code out of misc.ccNicholas Feinberg2014-07-021-1/+1
|
* Remove some hard-coded 1e38s (floatingatoll, Grunt).Neil Moore2014-05-141-2/+3
| | | | And replace them with DBL_MAX, which could theoretically be as low as 1e37.
* Remove mangroves from vaults.Shmuale Mark2014-03-291-1/+1
| | | | There may still be some vaults that rely on trees to act like glass.
* Remove mangroves, make single trees block LOS.wheals2014-03-291-1/+1
| | | | | | | | | | | Trees are in some ways yet another type of transparent wall, and, as MarvinPA has said, "in general having areas full of trees where you can see lots of enemies but not target them just plays badly." There were two differences between trees and mangroves, besides LOS: the latter didn't start forest fires and left shallow water when destroyed. That behaviour is kept, instead checking whether the tree (technically, the player) is in Swamp.
* Axe a buttload of useless #includes.Adam Borowski2013-11-031-1/+0
| | | | | Can't test Android, MSVC or Mac, but a very brief glance at the diff suggests it's unlikely they're affected.
* Don't blow clouds into mangroves, either. Simplify.Adam Borowski2013-10-181-3/+6
|
* A yet another mangrove+cloud fix: tornado.Adam Borowski2013-10-181-1/+2
|
* Fix a mapstat hang due to dying to a tornado obelisk.Adam Borowski2013-10-031-10/+12
| | | | | | It calls ouch() for 0 during the initial setup; during mapstat the player is actually placed inside the map at some position that can be close to the obelisk. And maxhp is 0, so 0 damage can be fatal...
* Move mons_is_stationary() to struct actor.Adam Borowski2013-09-131-1/+1
| | | | Simplifies code in a number of places, and also fixes a few tree-moving bugs.
* Add MSG_OK when canceling for various promptsPekka Lampila2013-06-101-0/+1
| | | | | Also in a couple of cases add other messages. The goal here is to always print something when a prompt is dealt with.
* Clean up tentacle/tentacle segment handling somewhat.David Lawrence Ramsey2013-05-271-1/+4
| | | | | | | | | | | mons_is_tentacle() now returns true only for actual tentacles, which makes mons_is_tentacle_end() redundant. mons_is_tentacle_or_tentacle_segment() does what mons_is_tentacle() used to do, and is used properly on both sides of Mislead. Handling of child tentacles (everything other than eldritch ones) is now handled more generically, in case more types of them are added.
* Remove a number of dead assignments (SLi).Neil Moore2013-02-211-7/+0
| | | | | | | | | | In the case in spl-data.cc, the comment made it sound like the line was supposed to set min_dist instead of the dead variable dist. However, we could only reach this code path if min_dist == dist, so that assignment wouldn't do anything anyway. I left a few reported dead assignments that I think make the code more maintainable.
* Give tree form -MOVE, -TELE and -Fly.Adam Borowski2012-12-311-4/+12
|
* Some more minor tentacle refactoringDracoOmega2012-12-091-1/+1
|
* Revert "Prevent Tornado from moving monsters through solid features."Adam Borowski2012-12-031-6/+6
| | | | | | | | | | | | | | That commit broke assumptions that if an actor can be swept from A to B and from B to C, he can be swept from A to C as well. This caused crashes on some permutations; also, longer turns (a slowed naga of Chei) tended to pile actors up on one side of an obstacle. For now, I made grates airtight so the main problem that commit was supposed to fix is papered over. Trees are not airtight which allows people to get swept through them; this is not good but has nearly no practical implications. This reverts commit 6f473416a0b6cffe0759a792ac536c739c4a395f.
* Assert that tornado rotation found a valid spot.Adam Borowski2012-11-231-0/+3
|
* Fix tengu EV not getting updated on changes in flight status.elliptic2012-11-101-0/+4
|
* Remove unnecessary calls to burden_change().elliptic2012-11-091-2/+0
| | | | | Since flying no longer increases carrying capacity, these didn't do anything.
* Replace levitation with flight and remove controlled flight (elliott)Chris Campbell2012-11-071-21/+15
|
* Remove unnecessary includes from header files.Jay3.14152012-10-231-1/+2
| | | | | | | | | | For most header files, this only saves on having to recompile a small number of source files, but there are also a few headers where small changes would now take significantly less time. This is most obvious for the Tiles build for which the dependencies have been greatly reduced, so that the only additional includes when compared to console are strictly library or tile related.
* Make most misc effects use victim->apply_ac().Adam Borowski2012-10-031-2/+2
| | | | | | | | | | | Airstrike, Tornado, spines, earth miscasts, Mi headbutts. In the case of Airstrike, this is a nerf by 0.5 points of damage on the average. Monster minotaur headbutts get a big buff as their attacker's (ie, usually your) AC is no longer applied as a constant, but as random2(1 + ac) like in other cases.
* Unify checks for liquefaction, don't slow stationary monstersChris Campbell2012-09-281-3/+3
|
* Use std namespace.Raphael Langella2012-08-261-17/+16
| | | | | | | | | | | | | I had to rename distance() (in coord.h) to distance2() because it conflicts with the STL function to compare 2 iterators. Not a bad change given how it returns the square of the distance anyway. I also had to rename the message global variable (in message.cc) to buffer. I tried to fix and improve the coding style has much as I could, but I probably missed a few given how huge and tedious it is. I also didn't touch crawl-gdb.py, and the stuff in prebuilt, rltiles/tool and util/levcomp.*, because I have no clue about those.
* Prevent Tornado from moving monsters through solid features.Steve Melenchuk2012-08-041-1/+6
| | | | | | | | This adds a check to see if there's an unblocked line between where a monster affected by Tornado started and possible positions it could end up, throwing out any where such a line doesn't exist. Fixes #4296 and #5986.
* Massive style fix (braces, indentation, etc.)Neil Moore2012-08-011-2/+1
|
* Remove a good deal of header inclusion.Adam Borowski2012-05-231-1/+0
| | | | | | | | | These accumulate but never get removed; no wonder compilation times keep rising. The includes.sh script has lots of false negatives (and positives...), and can't check .h files which cause the biggest slowdown, it'd be nice to run multidelta on those somehow.
* Mindexicide: behaviour_event().Adam Borowski2012-04-211-1/+1
| | | | | This also reveals how bad the beam blaming code is, need to rewrite that soon -- mostly because of problems with reflection.
* Use a helper function for a bit of readability.Adam Borowski2012-03-271-6/+2
|
* Replace "atype() == ACT_MONSTER" with "is_monster()" -- half the length.Adam Borowski2012-03-221-2/+2
| | | | Could probably just make it !is_player() instead, too.
* Use actor->is_player() instead of (actor == &you) as well.Adam Borowski2012-03-221-3/+3
| | | | | | | Not so sure here as the latter is a bit faster (comparison with a constant vs a virtual method call), but consistency is good. Perhaps we should use the latter way after all? In any case, it should be the same everywhere -- if someone has some insight, say a word so we can sed it again.
* Use actor->is_player() consistently instead of (actor->atype() == ACT_PLAYER).Adam Borowski2012-03-221-2/+2
| | | | | | | | | | Shorter and more readable. I did not change the similar comparison with ACT_MONSTER yet -- are we ever going to have other actor types? God acts may work as well with a fake monster, but multiplayer/arena can possibly want a third such type. On the other hand, code assumes that non-player implies monster and vice versa, though, so I'm probably worrying without a point.
* "include" -> <include> for system headers.Adam Borowski2012-01-121-1/+1
| | | | GCC allows both forms, contrary to the standard.
* Replace a bunch of floating-point sqrt()s by integer ones.Adam Borowski2011-11-131-4/+1
|
* Simplify.Raphael Langella2011-09-161-5/+3
|
* Tornado adjustments.Raphael Langella2011-09-151-3/+9
| | | | | | * Duration fixed at 60 aut (what you had at power 120). * Damage boosted by 28.5% * Noise reduced to r * 3
* Item mimics use the new generation algorithm too.Raphael Langella2011-09-051-2/+0
| | | | | | | Also remove the teleport and change behaviour. Speed is reduced to 8 so they are still easy to escape. They start being generated at dungeon level 7. Any item has 1 chance in 500 of being a mimic.
* Reduce Tornado damage some moreChris Campbell2011-07-291-1/+1
| | | | | Testing and lots of player feedback indicates it's still far too powerful all game long.
* Don't miscast when the spell can still be aborted (#4281).Raphael Langella2011-07-211-3/+5
| | | | | | | | | | | | | | | | This is a significant refactoring. All the spells now return a spret_type and take a boolean which tells if the spell has actually failed. Also some code clean up in _do_cast(). All spells have their own function now. Also fix the following bugs: * Properly abort fire storm if forced casting on a wall with '!'. Also put a message for forced out of range casting (like cloud spells). * Casting summon elemental on an invisible monster aborted with no cost. * if a summoning spell aborts because create_monster fails, you don't lose a turn. You still get a chance of miscast in this rare case. * s2s, tukima and branding spells abort properly instead of consuming turn and MP when player is not wielding appropriate object. * s2s abort message when wielding a non-snakable.
* Reduce Tornado damageChris Campbell2011-07-211-1/+1
| | | | | | Let's test it at a middle ground for a bit and see how it plays. With 12 dice it was back to trivialising Ziggurats (and everything else, of course).
* Tornado: alter the rules for "short translocation".Adam Borowski2011-07-201-16/+53
| | | | | | | | | You cannot move a tornado to a place where it did not reach yet. Outside of that range, check if a new tornado can possibly intersect with the area the old one reached, and impose a cooldown if yes. Also, clear the cooldown if you went farther away.
* Revert "Don't allow getting round Tornado cooldown by blinking"Adam Borowski2011-07-201-1/+1
| | | | | | There's no way to explain "winds" on the other part of the level. This reverts commit 01c685b658de1769f7e188d98bcfb751377222ed.
* Don't allow getting round Tornado cooldown by blinkingChris Campbell2011-07-191-1/+1
|
* Adjust Tornado damage.Adam Borowski2011-07-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's still a no-brainer to use the alternatives, but a bit less so. In a typical late Zig scenario, damages of various spells are: Refrigeration 600 in 10 aut Tornado 700 in 100 aut Shatter 700 in 10 aut Firestorm (r=2) 650 in 10 aut, 1500 in 100 aut, 2550 in 230 aut Firestorm (r=3) 1000 in 10 aut, 2700 in 100 aut, 3800 in 240 aut (chance for a big Firestorm is 25% at pow 100, 50% at pow 150) After testing a number of scenarios, this one seems to be roughly average. It had a bunch of Pan lords plus two turns worth of spawns, nearest one touching the player. Furniture was: none at radius 1, two squares at radius 2, one at 3, one at 4, seven at 5 (ie, below 10%). Most non-Zig scenarios have plenty of walls. Shatter was strongly biased against: 2/3 Pan lords can fly, so do nearly all spawns (eyes, neqoxecs, balrugs, fiends) -- in this set only a hell beast and two green deaths were on foot among minions. Most lords have rC and rF, spawns rarely. The contender with a direct comparison, Shatter, was strictly better: 10 times better damage per second, same mana efficiency. After the adjustment, 5 times better dps but half the damage per mana makes Shatter still a better choice but at least not strictly. Firestorm is strictly better for this set even after doubling: you can either let them simmer for better total damage, or burn extra mana for rapid fire.
* Fix teleportation moving Tornado with you.Adam Borowski2011-07-181-8/+43
| | | | | | | | It's hard to explain how the winds could follow you, especially as they don't do so between levels. Translocating within the radius doesn't cause an immediate abort, but there is a penalty steep enough that for practical purpose it does. Long distance teleports let you get out of cooldown, short ones don't.
* Tornado: clear the cooldown when taking stairs.Adam Borowski2011-07-171-0/+1
| | | | | | | It's hard to explain the need for "winds to calm down" if the winds were left on the other level. Climbing stairs back and worth takes long enough to prevent that abuse, or at least make it miniscule when pulling a number of monsters with you (Vaults:8).
* Tornado: make the effect of AC independent of the way damage calls are split.Adam Borowski2011-07-131-2/+3
| | | | | | | | | | | | | | | It is also now fully proportional. The new formula formula gives damage reduction of: 0 AC = 0% 10 AC = 11.7% 20 AC = 22% 40 AC = 39% 80 AC = 63% The variance is woefully small, but it appears our math mavens don't remember a thing about iterated Bernoulli trials, so let's rely for the actual damage rolls to provide enough randomness.
* Fix a tornado crash when a Royal Jelly spawn goes into a prepared space.Adam Borowski2011-07-131-10/+38
|