Skip to content
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

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

chucksellick
Copy link
Contributor

@chucksellick chucksellick commented Mar 31, 2024

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:

  • It's in the possible chaos brand effects (in the "rare" list) - for weapons and clouds
  • Klown pies now have a chance to get glitter in your eyes (for now there's an artificially high chance for this particular pie, but will be lowered after some testing and feedback)
  • Zin wrath can blind you with silver when reciting at you
  • Gozag wrath can dazzle you at the sight of coin (only when dropped on monster death, it's more interesting if it happens during combat)

Not done and can be done in separate PRs:

  • Dazzling Flash is still a player-only spell so ghosts will not be blinding you yet
  • Perhaps the visual effect can be improved (with a tiles overlay) but I think it's ok as a placeholder
  • Vhi's Electric Charge has a slight issue as it reports the to-hit from your current position but actually it'll be more accurate as you'll be close

@@ -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.

Copy link
Contributor Author

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...)

@chucksellick chucksellick marked this pull request as draft April 6, 2024 00:45
@pooka109
Copy link
Contributor

Since you've put dockerizing webtiles into its own PR by now, shouldn't it be removed from this one?

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.
@chucksellick chucksellick changed the title Wand of Light can now Blind players Player Blindness status Apr 22, 2024
@chucksellick chucksellick marked this pull request as ready for review April 22, 2024 00:09
@chucksellick
Copy link
Contributor Author

Since you've put dockerizing webtiles into its own PR by now, shouldn't it be removed from this one?

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants