summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/player-equip.cc
Commit message (Collapse)AuthorAgeFilesLines
* Allow players to understand stasis messages without a thesaurusreaverb2014-08-081-2/+1
|
* Hide a hack better.Shmuale Mark2014-08-031-1/+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.
* Move canned_message() from stuff.cc to message.ccNicholas Feinberg2014-07-271-1/+1
|
* Refactor weapon_skill()Nicholas Feinberg2014-07-131-1/+1
| | | | | | | | | | | | | | This function was misleadingly named (it only provided the skill used for melee weapons, not ranged weapons), and incomplete; code along the lines of "is_ranged_weapon(*it) ? range_skill(*it) : weapon_skill(*it)" was scattered in about half a dozen different functions. I've corrected both of those problems (renaming weapon_ skill() to melee_skill() and adding item_weapon_skill()), and also possibly fixed two bugs in the process - an l_you.cc function that claimed to provide the skill used for the starting weapon (but actually only gave the melee skill), and unrand creation code that checked if a potential unrand swap used the same (melee) skill as the weapon type being generated.
* Remove the dragon slaying brandreaverb2014-06-181-7/+0
| | | | | | | | Generally it doesn't create interesting decisions because dragons are such a small group and are mostly a subset of monsters slowed by the freezing brand. In addition, it has rather arbitrary effects against players, hitting some for an degenerate amount of damage while ignoring others.
* Message change when putting on ring of teleport when unable to teleportaj.k.adamson@gmail.com2014-06-171-1/+1
|
* Rename "vampiricism" to "vampirism" (ChrisOelmueller, #8435)reaverb2014-06-151-2/+2
| | | | | | | Chris Oelmueller made an excellent patch for this, but unfortunately it was rather rotted by the time somebody decided to look at it. It was easier to recreate than update. I've also added some tiles stuff which was missed in the original patch.
* Don't crash when unwielding a temp-branded weapon.Neil Moore2014-06-121-1/+1
|
* Allow temporary branding to go over a permanent brand.Shmuale Mark2014-06-121-4/+3
| | | | | | | Toting around an unbranded weapon just to be able to swap to it is no fun, and not even that much more of a difficulty; maybe it just means getting pain out takes 0.7 more turns or so. You still can't overwrite artefacts, of course.
* Adjust messaging for (un)equipping faith under GozagChris Campbell2014-06-111-1/+3
|
* Combine the frost/flame and freezing/flaming brands.Shmuale Mark2014-06-101-9/+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.
* Make Gozag actually raise prices when you remove "faithreaverb2014-05-311-34/+2
| | | | | This also removes some dead code from when Gozag abilities where cancellable
* Formatting fixes (add braces).Neil Moore2014-05-121-0/+2
| | | | This fixes all the instances caught by unbrace.
* Remove various references to use-IDing jewellery that now identifies on equipChris Campbell2014-05-121-5/+0
| | | | There's probably a bunch more obsolete code for this still lying around.
* Fix bracesreaverb2014-05-091-4/+0
| | | | Oops.
* Pass equipment slot to artefact equip/unequip effectsEduardo Gonzalez2014-05-091-22/+30
| | | | | This allows the correct ring slot to be registered for art-func hooks if we choose to make any such unrands.
* Recalculate cache of equipped unrands with world_reacts on save loadEduardo Gonzalez2014-05-091-4/+4
| | | | | | This allows us to more easily add or remove those hooks on existing unrands. The data type has also been changed to FixedBitVector from unsigned short, allowing the expanded ring slots to be referenced.
* Gozag ability tweaks and interface improvements.elliptic2014-05-081-10/+1
| | | | | | | | | | | | | | | | This commit has the following effects, which are sufficiently interconnected that separating this into multiple commits seemed hard: * Don't allow players to invoke potion petition unless they have enough gold for the guaranteed porridge/blood potion. * Don't allow players to invoke call merchant unless they have enough gold to pay for any shop that might be offered. * Tweak the formula for shop prices; now it really doesn't depend on the shop type at all, and the maximum price will always be a nice round number. * Display gold requirements in the ability screen. These numbers are slightly misleading because the actual gold cost for potion petition or call merchant will be a bit different from the displayed cost, but these numbers give the player a way to tell whether an ability can be used without committing to using it.
* Gozag: interactions with amulet of faith.Steve Melenchuk2014-05-071-0/+50
| | | | | Prices are 2/3 what they would be otherwise, and removing the amulet counts as two uses of the relevant ability for price purposes.
* Merge branch 'ranged_combat'Steve Melenchuk2014-05-031-6/+0
|\ | | | | | | | | | | | | The implementation is done; from here on out it's all balance work, and that's better done in trunk. Release the ogre hordes!
| * Disallow wearing shields with two-handed launchers.Steve Melenchuk2014-04-271-6/+0
| | | | | | | | | | | | | | This renders it unnecessary to try and preserve the impact of shields on launcher delay. A fair bit of now-dead code goes away as a result as well.
* | Replace rings of hunger/sustenance with loudness/stealth in-placeChris Oelmueller2014-04-301-2/+2
| | | | | | | | | | Those give one level of -50/+50 stealth each. Stealth is priced at old sustenance level (but often comes cursed), loudness around 50-60 after curses.
* | Make the AC display update upon wielding an unrand with ARTP_AC (johnny0, ↵Shmuale Mark2014-04-291-0/+12
| | | | | | | | | | | | | | | | #8465). I removed the message since randarts with +/-/AC/EV ARTPs aren't possible, and accidentally removed the check that tells the screen to re-generate the AC/EV values.
* | Remove some equip/unequip messages.Shmuale Mark2014-04-281-63/+2
|/ | | | | | | | The ones that tell the player that they can evoke a new ability don't seem all that useful, given the fairly clear inscription system on artefacts. The remaining jewellery items that give a message on equip are mostly ones that are potentially dangerous, such as ring of fire/ice and amulet of stasis.
* Fix compilationChris Campbell2014-04-271-2/+2
|
* Auto-id jewellery on equip.Shmuale Mark2014-04-271-202/+29
| | | | | | | | | | | | In the case of rings/amulets that identified themselves when they had an effect, the player would want to try to put themselves in a position where the item would identify, which was techincally optimal but quite annoying. There were a few items that never would identify, but on the whole it's not worth keeping around the behavior just for them. The ID code is pretty confusing and it's quite possible the implementation is not ideal or there are actual bugs.
* Add something missed in the last commit.Shmuale Mark2014-04-251-3/+3
|
* Cut some message spam from str/dex/int artefact [un-]equip (ChrisOelmueller).Shmuale Mark2014-04-251-8/+9
| | | | | | The comments made it clear the only reason for this was statdeath, and 0 stats, while bad, are not bad enough to justify telling the player when he or she has no reason to care.
* Clarify artefact un-/equip messages (wheals)Chris Oelmueller2014-04-251-6/+6
| | | | For some properties, these were cryptic enough to confuse players.
* Give the "powerless spirit" message again.Neil Moore2014-04-141-24/+17
| | | | | Now for everyone with MUT_MANA_SHIELD, not just vine stalkers. Also, refactor out the duplicated code.
* Remove some more djinn code.Shmuale Mark2014-04-101-10/+2
| | | | | | | Nothing that changes functionality or that makes the interface looks too weird. In several of the instances the code would be weird after moving to TAG_MAJOR_VERSION 35, so it seems worth it to remove now rather than leaving it around.
* Make skill training restrictions depend on carried instead of equipped itemsChris Campbell2014-04-091-9/+0
| | | | | | For Shields in particular, carrying a shield is sufficient for training purposes. Remove a number of now-unnecessary checks, including some checks that were already obsolete for curses on wielded weapons.
* Make lava (& deep water) lethalNicholas Feinberg2014-04-061-3/+3
|
* Clean up the player hp change and calculation functionsgammafunk2014-03-181-1/+6
| | | | | | | Move calc_hp() to player.cc, and fix all but a couple instances where you.hp is changed directly to use set_hp() instead. We'll eventually just move these functions to inline methods for the player class, but this reorganization will do for now.
* Fix various issues with invisible monster indicators.gammafunk2014-03-061-2/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently if a monster enters LOS and goes invisible on the same turn, it can disappear from the screen before the player has a proper indication of where it was. This commit makes the following changes: 1. Fixes invisible monster indicators so that they can reliably be set in the monster map knowledge update code at locations that of the current monster being processed in this loop. The previous code tried to set this indicator, but due to how the old loop cleared all flags other than MAP_SEEN_FLAG and did tiles cell draws in the same pass as map knowledge updates, these wouldn't work. This commit adds a MAP_INVISIBLE_UPDATE flag to help retain MAP_INVISIBLE_MONSTER when necessary, as well as a second loop in show_init that loops over a vector of the updated cells found in the radius_iterator loop. This second loop should be fast enough that it doesn't significantly affect performance. 2. Add 'bool went_unseen_this_turn' and 'coord_def unseen_pos' to the monster class (with the necessary save compat code) to allow monsters that go invisible in LOS to always get an invisible indicator. The code prefers to use indicators arising from the monster failing stealth checks if those occur; they are based on the monster's true position and hence are usually more accurate. 3. Somewhat simplify the stealth check code for invis indicators, and only ever allow one invis indicator per monster. The stealth check logic perhaps could be simplified further (there are multiple checks), but I've preserved the existing checks for now. Also turned a coinflip() in one of the secondary checks into a seeded/hashed coinflip so it won't change over screen updates. This commit lets players with antennae always see the location of an invisible monster through an invis indicator, and sets the invis indicator on the monster's last position whenever a monster becomes unseen (e.g. going invis or already being invis but the player removes sinv). If the monster fails a stealth check, that potentially more accurate information is favored over the unseen position.
* Remove djinn.wheals2014-02-241-3/+18
| | | | | | | Djinn games can't be started (hopefully including using the rcfile), and djinn code should be removed on save-compat bump. Also, schedule a few SE things to be removed.
* s/Dithmengos/Dithmenos/ (dpeg).Steve Melenchuk2014-02-101-2/+2
| | | | | At least three devs are probably waiting for this to be pushed if they're not about to push it themselves. So now it's done.
* Don't claim guardian spirit is "protective" for vine stalkers.Adam Borowski2014-01-271-2/+2
|
* Split tracking of "illuminating" and "fiery" conducts.Steve Melenchuk2014-01-141-0/+2
| | | | | This should be a little more clear for players, besides which there's been some hesitation expressed about the latter.
* Dithmengos hates the light.Steve Melenchuk2014-01-111-0/+2
| | | | | | | | | | Dithmengos hates items, spells, and monsters that cause illumination, and particularly appreciates kills of the latter. This hatred extends to most forms of fire (enemy of the darkness since ancient times). There's a few questionable things in here which could stand to be looked at (I'm including items that only glow through their description, most notably freezing-brand melee weapons).
* Suppress distortion unwield effects for Lucy followers.Steve Melenchuk2013-12-311-0/+7
| | | | | | | | | | | | | In my observations of relatively recent wins by Lucy followers, very few actually bother to take advantage of the 6* gift; this might partially be on account of the limitations of the brand itself, but even for weapons which pair well with it (fast-hitting weapons, axes, and the like) players prefer other brands. I theorise this is partially on account of being effectively restricted to use of the one weapon if the player doesn't want to be subject to extreme negatives. I've run this idea by quite a few people and there doesn't seem to be any negative feedback on it as yet, so I think it's worth giving a try.
* Make noisy randarts only make noise when hitting thingsChris Campbell2013-12-221-6/+0
| | | | | They now don't give messages or make noise at all when just travelling or exploring, only when hitting things. Also reduce their noise level slightly.
* Drop pointless empty lines after or before a brace.Adam Borowski2013-12-211-1/+0
| | | | | I left them only where the contents is not indented, like in a namespace or a template.
* Drop double newlines where they seem to serve no purpose.Adam Borowski2013-12-211-1/+0
| | | | | Sometimes, they're there to emphasize a break between two sections of code, which is good. In a majority of cases, though, they're just inconsistent.
* Auto-enable boots of flying when you wear them.Adam Borowski2013-12-111-1/+10
| | | | | You can still disable them later when that titan waltz by, saving you that precious 10 aut over just removing the boots.
* Don't double-announce artefact weapons.Neil Moore2013-12-081-1/+1
|
* Automated brace removal.Adam Borowski2013-11-291-2/+0
|
* Remove mpr_nocap().Adam Borowski2013-11-291-1/+1
| | | | | No particular reason, other than consistency. And all but two used wasteful double-conversion, so this is not a speed regression.
* Replace `mpr(s, ch)` with `mprf(ch, s)`Adam Borowski2013-11-291-8/+7
| | | | | | | | | 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.
* Make a couple of functions static.Adam Borowski2013-11-191-3/+3
|