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

Mountable creatures fail to block attacks for the riders #33361

Closed
RedShakespeare opened this issue Aug 19, 2019 · 0 comments · Fixed by #33388
Closed

Mountable creatures fail to block attacks for the riders #33361

RedShakespeare opened this issue Aug 19, 2019 · 0 comments · Fixed by #33388
Labels
Monsters Monsters both friendly and unfriendly.

Comments

@RedShakespeare
Copy link
Contributor

RedShakespeare commented Aug 19, 2019

Describe the bug

Large-volume mountable animals don't block enemies' attacks as the comments in src/creature.cpp

Steps To Reproduce

Steps to reproduce the behavior:

  1. Write a monster(whatever it is) with incredibly large _volume_attribute.(e.g.,100 times larger than human or more)
  2. Make a player in game, summon this monster and ride on it.
  3. Summon an enemy(zombie or something) and stay there let it hit the player&the mount.

Expected behavior

The larger the mounted monster is, the less chance the player is hit by enemy.

Screenshots

// If carrying a rider, there is a chance the hits may hit rider instead.
// big mounts and small player = big shield for player.
if( one_in( std::max( 2, get_size() - g->u.get_size() ) ) ) {
g->u.deal_projectile_attack( source, attack, print_messages );

↑ the comment in src/creature.cpp
image
↑what actually happened when the player(87500 ml) was riding on a mod mon(87500000 ml)

Versions and configuration

  • Game Version: [0.d-6692-gcf4ce7d or 0.d-9512]

Additional context

I must admit that this bug has misled one of my PRs(#33329 ) which failed to work in the same way.Guess this is because those codes in src/creature.cpp only cover those attacks aimed at the mounted monsters but fail to count in the ones directly aimed at the player itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Monsters Monsters both friendly and unfriendly.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants