summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/fight.cc
Commit message (Collapse)AuthorAgeFilesLines
...
* Split shouting and stealth code from view.cc.Robert Vollmert2009-11-101-0/+1
|
* Add an is_holy() function to the actor interface.David Lawrence Ramsey2009-11-091-1/+1
| | | | | | | | | | | | This is consistent with similar functions in that it checks not only for MH_HOLY holiness, but whether the monster is a priest of a good god (currently, there are none) and whether it uses holy spells (currently, there are none after the changes described below). Minor and Major Healing are now enchantments rather than holy spells. The beam code treats them as such; wands of healing aren't holy items the way e.g. wands of draining are evil items; and unholy monsters (among others, Lom Lobon!) can cast these spells.
* Replace mons_wont_attack with monsters::wont_attack.Vsevolod Kozlov2009-11-091-2/+2
|
* EV feedback for melee: Phase Shift and helplessnessStefan O'Rear2009-11-081-19/+94
|
* Prevent chaos weapons from using SPWPN_CONFUSE on the playerCharles Otto2009-11-081-0/+6
| | | | | | | | | | | | | SPWPN_CONFUSE is what confusing touch uses to inflict confusion. The SPWPN_CONFUSE case in melee_attack::apply_damage_brand isn't set up to work on the player, and when that case came up with the player defending an assertion failure was triggered. I made the case in apply_damage_brand do nothing if used on the player. The case could be made more general, but it might make sense to implement a confuse brand specifically for chaose weapons since the HD check used for confusing touch isn't consistent with how the other chaos-weapon-caused status effects work.
* Fix a crash when the player is hit by a distortion weaponCharles Otto2009-11-081-1/+2
|
* Move blink frogs into their own genus, in order to make checks for bothDavid Lawrence Ramsey2009-11-081-2/+1
| | | | | | blink frogs and Prince Ribbit in blink frog form consistent (i.e., so if Prince Ribbit is polymorphed into another form, he'll no longer erroneously act like a blink frog in some cases).
* Split map knowledge and FPROPs.Robert Vollmert2009-11-081-1/+2
| | | | | | | | map_cell no longer has the field "properties", which has been replaced by the unsigned long array env.pgrid. env.map has been renamed to env.map_knowledge. It should really be moved into player.
* Replace mons_is_petrifying with monsters::petrifying.Vsevolod Kozlov2009-11-081-2/+2
|
* fight: Generate noise on fightingMatthew Cline2009-11-081-4/+144
| | | | | | | | | Very rough draft of "make noise when fighting". Needs extensive play-testing and tuning. Noise scales linearly with damage done, and also linearly with noise_factor, which is determined by weapon type (clubs make more noise than dagger) or monster attack type (tail slaps make more noise than stinging). Plus, a litle extra noise is added on for the flaming and electrocution brands.
* fight: base_damage member unused, removingMatthew Cline2009-11-081-18/+14
|
* Patch to satisfy FR 2892713. Hunger on wielding VAMP weaponsBrendan Hickey2009-11-081-3/+16
| | | | | | They are now wieldable by mummies and ghouls, but no healing effect. Vampires get nourished per hit. Signed-off-by: Jude Brown <bookofjude@users.sourceforge.net>
* Merge from chaotic_experiment branch:Eino Keskitalo2009-11-071-2/+2
| | | | Replace mons_is_shapeshifter(const monsters *m) in mon-util.cc with is_shapeshifter() in monster.cc
* Remove mons_is_holy(), as it's redundant.David Lawrence Ramsey2009-11-071-1/+1
|
* Tweak the message when distortion heals blink frogs.David Lawrence Ramsey2009-11-061-1/+1
|
* Replace global see_cell by observe_cell and disambiguate old uses.Robert Vollmert2009-11-061-5/+5
| | | | | | | Calls to plain see_cell(pos) were replaced with either observe_cell(pos) or you.see_cell(pos). observe_cell where related to drawing the interface and messaging, you.see_cell for game mechanics, and one or the other in less clear cases (targetting, say).
* Move checks for the berserk state into actor::berserk().David Lawrence Ramsey2009-11-061-2/+1
|
* Move mons_is_friendly to monsters::friendly.Vsevolod Kozlov2009-11-061-8/+8
| | | | Signed-off-by: Robert Vollmert <rvollmert@gmx.net>
* 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>
* Collect attitude changing code.Robert Vollmert2009-11-061-0/+1
|
* Rename is_valid_item to item_def::is_valid.Vsevolod Kozlov2009-11-061-2/+2
| | | | Signed-off-by: Jude Brown <bookofjude@users.sourceforge.net>
* Add actor::petrified, which replaces mons_is_petrified.Vsevolod Kozlov2009-11-061-2/+2
| | | | Signed-off-by: Robert Vollmert <rvollmert@gmx.net>
* Replace mons_is_caught with monsters::caught.Vsevolod Kozlov2009-11-051-1/+1
| | | | Signed-off-by: Robert Vollmert <rvollmert@gmx.net>
* Replace uses of player_is_swimming with you.swimming.Vsevolod Kozlov2009-11-051-3/+3
| | | | Signed-off-by: Robert Vollmert <rvollmert@gmx.net>
* Let clubs (small ordinary ones only) stun back-coshed targets for 1-3 turns.Adam Borowski2009-11-051-0/+13
|
* Give middling backstab bonus to ordinary clubs and spears.Adam Borowski2009-11-051-0/+7
| | | | Also, mention that daggers do awesome stab damage.
* Move *_res(ist)_magic to relevant classes, provide actor interface.Vsevolod Kozlov2009-11-051-1/+1
| | | | Signed-off-by: Jude Brown <bookofjude@users.sourceforge.net>
* Split up view.cc.Robert Vollmert2009-11-041-0/+2
|
* Split game_options from externs.h into options.h.Robert Vollmert2009-11-041-0/+1
|
* Rename "Fling Icicle" to "Throw Icicle".David Ploog2009-11-031-1/+1
|
* Split up monstuff.ccMatthew Cline2009-11-011-1/+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.
* Merge mons_holiness() into monster::holiness(), and add an is_unholy()David Lawrence Ramsey2009-10-311-11/+2
| | | | convenience function.
* When using items that can directly turn monsters to zombies (weapons ofDavid Lawrence Ramsey2009-10-291-2/+4
| | | | | | shadows or chaos) as a good god worshipper, ensure that the "turns into a zombie" message always comes before the "enraged by your holy aura" message.
* Bolt of Iron->Iron Shot, Ice Bolt->Fling Icicleabrahamwl2009-10-291-1/+1
| | | | | | | | | | | | | | | | | | | | Based on FR 1801710 Bolt of Iron and Ice Bolt were both mechanically different from the other "bolts" in that they didn't penetrate targets. In addition, Ice Bolt was very easy to confuse with Bolt of Cold. So they got their names changed to Iron Shot and Fling Icicle, respectively. This change is both external (in the game output) and internal (how the code refers to the spells). This commit also changes the names of the spells in the data files (ie. for tiles) and the names of some data files themselves (tile images). (See the file list.) Note that Lemuel's comment about the concept (and tile art)of "bolt" not fitting with the way the "bolt" spells behave is still valid, but that's another issue. I think this stems from a confusion between lightning "bolts" and crossbow "bolts." Signed-off-by: Eino Keskitalo <evktalo@users.sourceforge.net>
* Remove mons_friendly special casing in arena.Robert Vollmert2009-10-291-0/+1
| | | | | | | | This was preventing _mons_check_set_foe from choosing targets in the arena. Also some checks to avoid setting MHITYOU and you.pet_target to fail triggering arena asserts.
* FR 2839627: notify when player has enough goldMatthew Cline2009-10-291-1/+2
| | | | | | The basics of a wish-list/shopping-list. While in a shop the shopping-list can be modified, and the player is notified as soon as they have enough money to buy things on the shopping-list.
* Electrocution discharge in water ala FR 1637214abrahamwl2009-10-281-6/+43
| | | | | | | | | | | | | | | | | | | Weapons of electrocution now discharge in water, if the target is touching the water and not rElec, hitting all adjacent water-touching non-rElec creatures for about half the normal electrocution damage. Particularly notable new code is the implementation of an area-of-effect callback for beams, as well as a function and structure for weapon effects that should only happen after the target would have died, if it was going to die, and therefore cannot safely make use of its data. Issues that still need to be decided: - How doe Xom feel about this? (eg. If creatures hurt themselves this way.) - Should it ask you if you want to attack when you know the discharge will hit yourself?
* (MONS_PROGRAM_BUG || -1) --> MONS_NO_MONSTERMatthew Cline2009-10-271-1/+1
| | | | | | | | | Change MONS_PROGRAM_BUG to MONS_NO_MONSTER when "no monster" is what was meant. Now all instances of MONS_PROGRAM_BUG should indicated some sort of failure or error. Also, fixed some places which were still using -1 instead of MONS_NO_MONSTER.
* Convert some ints to monster_type.Robert Vollmert2009-10-271-3/+1
| | | | | | | | | There's a whole lot of places that pass monster_type as int, often with varying meanings for the value -1. This moves some of these to monster_type, introducing MONS_NO_MONSTER and MONS_PLAYER as new invalid special values. Also improve on the autoexclude descriptions.
* Extract newgame character restrictions from newgame.cc.Robert Vollmert2009-10-241-3/+3
| | | | | | | | | | | | | | | | | The functions in the new ng-restr.cc are "pure": They don't access global state; data is passed in via the new and incomplete newgame_def. Eventually, new_game should be split into something like newgame_def choose_game(); that doesn't access "you", and void setup_game(newgame_def); that sets up the player. Also get rid of player_size in favour of player::body_size. Rename player_size_type to size_part_type since it's not really player-specific (used in actor::body_size). Move parts of player_genus, player::has_claws, body_size out into species.cc.
* Rename actor::visible to actor::observable.Robert Vollmert2009-10-221-3/+2
| | | | | | This should reduce potential for confusion -- compare mon->visible() and mon->invisible(). The uses of actor::visible for messaging are replaced by actor::observable, others by you.can_see(...) or actor::visible_to(&you).
* Simply visibility checks in fight.cc.Robert Vollmert2009-10-221-5/+4
| | | | | Make use of actor::visible_to. Also fix player::visible_to to make the player invisible to himself when not seeing invisible.
* Add minor cosmetic fixes.David Lawrence Ramsey2009-10-211-1/+3
|
* Consider quick blades to be weapons of speed for Chronos' purposes.Adam Borowski2009-10-221-1/+2
|
* Merge branch 'master' of ↵Matthew Cline2009-10-211-0/+1
|\ | | | | | | ssh://zelgadis@crawl-ref.git.sourceforge.net/gitroot/crawl-ref/crawl-ref
| * Slightly reduce religion.cc by yanking item-handling stuff to goditem.ccAdam Borowski2009-10-211-0/+1
| |
* | Don't disturb monsters witth their own soundMatthew Cline2009-10-211-1/+1
|/ | | | | | | | | | A monster making noise was causing an ME_DISTURB behaviour_event() for itself, possibly causing it to get a new foe, which could cause strange results if it switched foes during the middle of spell-casting when it made noise from chanting. Now noisy() can accept a "who" parameter, in which case the monster which caused the noise will ignore the noise. This is done in all cases except for when a monster of animal or lower intelligence sets off an alarm trap or does a spell miscast.
* Add missing Chronos conducts for hasting yourself, casting swiftness,Adam Borowski2009-10-211-0/+2
| | | | using weapons of speed and boots of running.
* fight.cc: Fix undrandart/unarmed crashMatthew Cline2009-10-191-1/+1
| | | | | The game would crash if a monster wielding an unrandart with a special melee function could do an armed an unarmed attack in the same round.
* versioning: remove SVN-specific revision data, add Git versioningSteven Noonan2009-10-181-1/+0
| | | | Signed-off-by: Steven Noonan <steven@uplinklabs.net>