Eranziel / foundryvtt-lancer

A Foundry VTT game system for LANCER RPG.
GNU General Public License v3.0
110 stars 64 forks source link

[BUG] NPCs with Legendary suffer a Crushing Hit instead of Direct Hit #768

Open tw-blob opened 2 months ago

tw-blob commented 2 months ago

Describe the bug An NPC with Legendary and two or more structure remaining can roll a Crushing hit result. This happens when they roll two ones on the separate structure rolls grated by Legendary.

To Reproduce

Expected behavior A mech that has 2 or more structure remaining should get a Direct Hit result when rolling a one on the Structure Table. An NPC with the Legendary trait should discard one of the rolls resulting in the same result as a mech without the trait.

Screenshots Same mech with and without the Legendary trait. Capture

Capture2

Platform (please complete the following information): Foundry Virtual Tabletop: Version 11 Stable, 11.315 Game System: lancer, 2.2.4 Active Modules: 0

Discord contact info .lopeck.

Eranziel commented 1 month ago

I've figured out an almost-complete solution for this. image

Unfortunately Foundry will still occasionally pick the less favourable result. For example, if you roll [1,2] and [1,1] in that order, Foundry will pick the 2nd result to keep, which ends up evaluating as a Crushing Hit instead of Direct Hit. image

We'll just have to live with that foible for now, because forcing the Roll object to select the other result would be quite involved. I'll leave this issue open for follow-up, maybe it will become easier in the future.

aWinglessMonkey commented 1 month ago

The solution to this is in the description for "Legendary" itself, specifically the last few words:

The Ultra/Veteran rolls all structure damage and overheating checks twice and chooses either result.

This is a choice, it is not at all a simple monotonic function (particularly with structure rolls, Ultras, and their Juggernaut feature), and the GM has further considerations beyond "optimal" (such as game health) when choosing.

Streamlining a choice is good - for example rolling and displaying two separate checks automatically - but please do not automate the choice out. Automating past decision-points is how we got #379, which has been my biggest frustration-point with this system of late, and which I have been very glad to see is nearly solved.