Viewing Issue Simple Details Jump to Notes ] Wiki ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000949 [DCSS] Source Cleanup minor N/A 2010-02-26 21:15 2011-04-01 01:18
Reporter marcmagus View Status public  
Assigned To galehar
Priority normal Resolution done  
Status resolved   Product Branch 0.6 ancient branch
Summary 0000949: Landmine in player_adjusted_shield_evasion_penalty
Description There is an odd bug in the new formula for player_adjusted_shield_evasion_penalty. This will never create a problem in the current code, but could be exercised by future development. I suggest fixing it now to avoid the issue.

The problem is in the factor ( - you.skills[SK_SHIELDS] * scale / (5 + player_evasion_size_factor()))

This fragment offsets the shield penalty based on your shield skill, with larger characters benefitting more from skill than small characters.

The problem is that if a player were to somehow be size SIZE_GIANT or larger, the size factor [2 * (SIZE_MEDIUM - size)] would become less than -5, and the bonus would become a malus, where a better shield skill would make things even *worse*.

A quick fix would be to use max(1, 5 + player_evasion_size_vactor()). After a certain point, getting bigger just doesn't make it any easier to move that big shield around.
Additional Information
Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0003077)
dpeg (administrator)
2010-02-27 02:21

Seems alright to me.
(0003089)
evktalo (administrator)
2010-02-27 11:14

I love seeing a thing like this reported. Thanks!

--Eino
(0011979)
jpeg (manager)
2011-03-31 20:12

So, has anything been done about this? (I don't even understand what he's talking about.)
(0011995)
galehar (administrator)
2011-04-01 01:18

I've fixed it in case we ever add a giant race or form able to use shields.

- Issue History
Date Modified Username Field Change
2010-02-26 21:15 marcmagus New Issue
2010-02-26 23:31 marcmagus Issue Monitored: marcmagus
2010-02-27 02:21 dpeg Note Added: 0003077
2010-02-27 11:14 evktalo Note Added: 0003089
2010-02-27 11:14 evktalo Status new => confirmed
2011-03-31 20:12 jpeg Note Added: 0011979
2011-04-01 01:18 galehar Note Added: 0011995
2011-04-01 01:18 galehar Status confirmed => resolved
2011-04-01 01:18 galehar Fixed in Branch => 0.8 development branch
2011-04-01 01:18 galehar Resolution open => done
2011-04-01 01:18 galehar Assigned To => galehar


Mantis 1.1.8[^]
Copyright © 2000 - 2009 Mantis Group
Powered by Mantis Bugtracker