summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/ranged_attack.cc
Commit message (Collapse)AuthorAgeFilesLines
* Tweak defender_name method and use it more.Neil Moore2014-08-071-7/+4
| | | | | Have it take a parameter indicating whether reflexive is allowed, and replace existing calls to defender_name() and def_name(DESC_THE).
* Hide a hack better.Shmuale Mark2014-08-031-2/+1
| | | | | | | Ideally, we wouldn't be using special for unrands totally different from how items of the same type do, but that's less trivial than this commit. A centralised place to check for being an unrand should at least make such a change easier.
* Make ranged attacks ablate *msl (Kvaak)Nicholas Feinberg2014-07-301-0/+3
|
* Avoid a few more incorrect reflexives.Neil Moore2014-07-301-1/+2
|
* Don't let reflected projectiles miss themselves (PleasingFungus)Neil Moore2014-07-301-1/+2
|
* Remove stuffNicholas Feinberg2014-07-291-0/+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 canned_message() from stuff.cc to message.ccNicholas Feinberg2014-07-271-1/+1
|
* Make projectiles not hit themselves (Humans Among Us)Neil Moore2014-07-171-1/+2
| | | | | Don't use a reflexive pronoun for attacker == defender when the subject isn't the attacker.
* Use correct stats for reflected range attacks (#8794)Neil Moore2014-07-171-4/+4
| | | | | | This should make reflected needles work while preserving the old blaming behaviour (a player reflector gets kill credit but not god blame). Needs more thorough testing.
* Separate 'permanent' and 'temporary' monster hit diceNicholas Feinberg2014-07-131-9/+9
| | | | As part of a wider scheme to make draining temporary.
* Fix steel arrowsNicholas Feinberg2014-07-091-1/+4
|
* Don't apply unarmed melee bonuses from forms to throwing weaponsChris Campbell2014-07-091-1/+3
|
* Remove darts (from a comment)Nicholas Feinberg2014-07-081-1/+1
|
* The great mon-stuff migration.Shmuale Mark2014-06-221-1/+1
| | | | | | | | | A good deal of functions move to the two new files, mon-poly and mon-message. Of the others, some go to where they are used, some to mon-util, and a few are made member methods of monster. This probably breaks Xcode compilation, and I'm not able to test the changes I made to MSVC that will (hopefully) keep it working.
* Don't give launcher penetration to thrown missiles (#8679)Neil Moore2014-06-131-3/+3
|
* Revert "Make random_choose_weighted() end on -1 weight"reaverb2014-06-101-1/+1
| | | | | | | This reverts commit 7e81480cda18144ff185f5248639a072b654deff. Turns out I missed some calls to random_choose_weighted(), this change might not even be worth doing.
* Make random_choose_weighted() end on -1 weightreaverb2014-06-101-1/+1
| | | | For consistency with random_choose().
* Combine the frost/flame and freezing/flaming brands.Shmuale Mark2014-06-101-6/+2
| | | | | | | Elec and venom launchers already use the same brands, and with ranged code more similar to melee code this change actually simplifies most code. There should be no gameplay change though some weird brand picking code for launchers was refactored, which might have some effect.
* Frost ammo no longer causes Dithmenos penanceNicholas Feinberg2014-06-061-1/+1
| | | | | | | When fired from a flame launcher, or vice versa. If someone else wants to refactor the throw.cc code to check brands at launch-time, feel free!
* Destroy item destructiongammafunk2014-05-281-1/+1
| | | | | | | | | | | | | | | | | | | Now that inventory weight and player burden states are gone, item destruction doesn't serve one purpose it clearly accomplished: help prevent the player from being at or next to burden capacity at all times. Outright destruction of strategic consumables encourages more needless inventory management, so we'd like to exclude these from any form of destruction and possibly prevent them from taking up inventory space at all. Denial of tactical consumables, either temporarily or permanently, is something we're going to look into later on, possibly in the release after next, since it can create interesting and generally not frustrating gameplay if done correctly. Needless to say, item destruction wasn't a player favorite and may have a sparsely attended funeral. RIP in peace. For now we aren't adjusting the rate of consumable generation to compensate for no item destruction, but that balancing will happen after play-testing shows how much adjustment is necessary.
* Restore calc_to_hit determinism when requested.Neil Moore2014-05-211-1/+1
|
* Make needles of sleep do something again (bmfx).Steve Melenchuk2014-05-211-3/+6
| | | | | | They were alerting the attacker on the impact, making the effect completely useless; thus successfully hitting something with a needle of sleep does not alert them.
* Let needles of frenzy wake up and thus affect sleeping enemies.Steve Melenchuk2014-05-211-1/+7
| | | | Not that they benefit from blowgun stabbing; it just seems odd.
* Don't announce out-of-sight ranged combat hits (#8526).Steve Melenchuk2014-05-191-0/+3
| | | | Oops.
* Condense three functions into one.Steve Melenchuk2014-05-191-3/+3
|
* Fix "if(" and friends.Neil Moore2014-05-121-1/+1
|
* Don't trigger berserkitis on ranged attacks (#8516).Steve Melenchuk2014-05-081-1/+1
| | | | Oops.
* Rescale base throwing skill damage bonus.Steve Melenchuk2014-05-071-2/+2
| | | | Darts and stones get half bonus; other throwables get the full bonus.
* Don't apply ranged weapon brand if not using the weapon (MarvinPA).Steve Melenchuk2014-05-041-1/+4
|
* Nerf throwing (#8493).Steve Melenchuk2014-05-041-15/+14
| | | | i.e. don't consider the weapon the player is using when throwing things.
* Fix a crash on hitting yourself with a dart of dispersal (Grunt).Shmuale Mark2014-05-041-1/+1
| | | | Possibly it shouldn't let you blink either, but that's for another time.
* Fix reflection brand for ranged combat.Steve Melenchuk2014-05-031-3/+32
| | | | Oops.
* The triumphant return of the blowgun of the Assassin.Shmuale Mark2014-05-031-0/+9
| | | | | | | It now has a chance to effect a stab versus a target (with the same effects as a usual stab with a needle) even when the victim is aware. Now that being invisible while shooting needles actually helps a bit, the +Inv isn't quite as weird, either.
* Only print ranged attack wounds if the attack connects.Steve Melenchuk2014-05-011-1/+4
|
* Adjust scaling of throwing damage with throwing skill.Steve Melenchuk2014-05-011-0/+14
| | | | | | Namely, weapons smaller than large rocks have their bonus nerfed. No darting Elf:3 to death.
* More fixes for throwing.Steve Melenchuk2014-05-011-2/+7
| | | | | In particular, give the damage bonus for skill that was supposed to happen with the rewrite.
* De-special-case throwing stone damage.Steve Melenchuk2014-05-011-5/+0
| | | | | | | | ...by setting sling base damage to 2 and reducing the projectile damages by 2 each. With the new code this should be essentially identical to the current behaviour, but a lot of the damage values might end up changing anyway.
* Make needle poisoning consistent with ! display (78291).Steve Melenchuk2014-04-291-1/+6
| | | | | That is, if the needle is dealing out poison (causing !s to display), make sure the enemy is actually poisoned.
* Handle action counts and exercise properly for ranged (78291).Steve Melenchuk2014-04-281-16/+0
|
* Don't crash on throwing flame/frost projectiles without a weapon.Steve Melenchuk2014-04-281-4/+6
|
* Print monster wounds for ranged attacks.Steve Melenchuk2014-04-281-0/+3
|
* Let stabbing with blowgun attacks extend effect duration (elliptic).Steve Melenchuk2014-04-271-9/+51
| | | | | | | | | | | | Poisoned needles deal more poison damage; curare has its effect amplified; duration-based needles have their durations extended (except frenzy, possibly for now). The needle of paralysis hits the stone giant in a vulnerable spot!!!! This code might have some side effects based on the dur paramater of enchant_monster_with_flavour being meaningful for the duration-base needle enchantment types; if so, that'll need fixing.
* Disable ranged stabbing.Steve Melenchuk2014-04-271-0/+6
| | | | | There are a couple of ideas for what could use this, but for now nothing should do so.
* Give M_ARCHER monsters their acc/dam bonuses back.Steve Melenchuk2014-04-271-0/+13
| | | | | | | | | | Sort of similar to how M_FIGHTER gets a melee accuracy bonus, I think this has a place here. The numbers are a bit complicated; the old code gave an ammoHitBonus of random2avg(HD * 4 / 3, 2) to the beam hit which is later added to the damage bonus. Since the randomisation here works differently the 4/3 is straight-up added to the to_hit and randomised when added to the damage.
* Make throwing nets do something on hit again.Steve Melenchuk2014-04-271-12/+28
|
* Ranged attack brands!Steve Melenchuk2014-04-271-6/+413
| | | | | | | | | | | Launchers use the equivalent melee brand effects if the missile isn't an elemental brand (or the attacker is Nessos). Missiles have their own set of effects; flame, frost, and poison use effects basically identical to weapon brands, and everything else has its old effect back. The lajatang of Order works again. Hooray!
* Basic ranged attack functionality.Steve Melenchuk2014-04-271-20/+277
| | | | | | | | | | Moves a lot of code from melee_attack to attack to be shared with ranged weapons. Handles the entire basic attack process - checks to-hit, calculates damage, prints messages as necessary. TODO: attack delay, brands.
* Hook up ranged_attack to the beam code.Steve Melenchuk2014-04-271-1/+7
|
* A skeleton ranged_attack class, derived from attack.Steve Melenchuk2014-04-271-0/+68
TODO: tie this up to the beam code; move shared code between melee and ranged to plain attack; write ranged-specific code.