New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Player Blindness status #3746
base: master
Are you sure you want to change the base?
Player Blindness status #3746
Conversation
e09e63b
to
1fbf519
Compare
crawl-ref/source/duration-data.h
Outdated
@@ -636,6 +636,10 @@ static const duration_def duration_data[] = | |||
{ DUR_BEOGH_CAN_RECRUIT, LIGHTBLUE, "Recruit", "", "can recruit", | |||
"You may recruit a defeated apostle into your service", D_EXPIRES, | |||
{{ "", end_beogh_recruit_window}}}, | |||
{ DUR_BLIND, RED, "Blind", "blind", "blindness", | |||
"Your combat accuracy is reduced more the further away your target is," | |||
" and range is reduced for many spells.", D_EXPIRES, {{ "", |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did this (although I wasn't totally sure, as blindness is more a physical effect like poisoning, and comes from at least one poison source anyway, I thought maybe it should only be curable by potion...)
94b8887
to
78304a0
Compare
Since you've put dockerizing webtiles into its own PR by now, shouldn't it be removed from this one? |
5088010
to
831478d
Compare
Webtiles only had a full-screen flash but in desktop it was per-tile (with an optional hitfunc). The colour was already available on screen_cell_t so it was easy to just send this value in the cell json only if it changed, and this even saves redraws as we don't need to invalidate the entire map on a flash, only the changed tiles. And it's much easier on the eyes to boot.
Makes it possibly to specify a custom alpha level per tile for a screen flash. Not actually used anywhere in this commit, it's for blindness effect in forthcoming commit.
A number of improvements to the % displayed while targetting and also on monster information screens. The existing state of things was not ideal, and not made clearer by a lot of duplication of logic. In some places "to hit" was shown while in other places "to evade", meaning the player has to invert their mental arithmetic arbitrarily. This was supposedly intended to convey that some calculations did not take shield blocking into account but others did; however even this logic was not always applied and some cases of "to hit" were still pre-shield, and regardless there was no way for the average player to understand this distinction. (It also doesn't help that in code language, "to hit" is always the roll *before* accuracy penalties and shields take place). The calculations were also not done at all for thrown projectiles, and I uncovered a bug where due to a double negative, Umbra was actually *increasing* accuracy (but the % display got used the *correct* formula so nobody ever noticed). This commit fixes all of that; shields are now taken into account in all estimations, the language is changed to consistently "to hit", throwing now also gets a % display, and Umbra is actually penalising accuracy as intended.
Monster blindness has been available in various forms for some time, but there was no equivalent player effect and obvious sources of blindness just Confused the player if anything. The new Blind status can be inflicted on the player with a wand of light and with atropa darts. While affected your accuracy is reduced, more the further away the target is. Mechanically your "to hit" roll is reduced by 10% for every tile distance (starting at your own tile) so maximum 80% for a normal race or 90% for Barachi. It affects melee and ranged, and also those spells that care about accuracy, so this has most effect on ranged combat.
A flash overlay with opacity increasing with distance from player
Zin recite can blind monsters so it seems reasonable to do the same to the player.
We now have an effect quite close to disraction, we can blind the player when they see the glint of gold.
831478d
to
ab4a611
Compare
Ah that was in by mistake because i was using it for testing |
Cancellation could already remove the status, but since blindness can come from poison (atropa) it also makes sense that curing would work (and it's also a physical affliction rather than magical in nature). This is consistent with Confusion which can also be cured by either.
Now we can blind the player in an interesting way, dazzling flash can be unlocked for player ghosts. The resist mechanism (chance depending on player XL vs spell power) is perhaps not great and should be reviewed. However with this I reintroduced the holiness check on player for both wand of light and dazzling, so there is a little more parity with wand and spell and effect on monster vs players.
Adds a new Blind player enchantment which can be inflicted with a wand of light, instead of confusion. Other existing sources of monster blindness such as darts of atropa will also now use the new status when used on the player.
Under this effect, your accuracy is greatly reduced, and increasingly worse the further away the target is. Mechanically your "to hit" roll is reduced by 10% for every tile distance from the player, starting at 10% on your own tile. 80% malus at max range for a normal species, 90% for Barachi. See individual commits for further detail.
Some additional sources of Blindness are also added:
Not done and can be done in separate PRs: