Khaligufzel / Dimensionfall

A survival game inspired by Cataclysm: Dark Days Ahead and Bright Nights.
MIT License
12 stars 5 forks source link

Ranged skills #201

Closed snipercup closed 3 months ago

snipercup commented 3 months ago

Requires #199. I will set this to draft until that one is merged. Fixes #194

This PR implements all requirements from #194

This is the player's skill after firing about 6 magazines with 1 xp per shot: image

This is the player firing a weapon that uses rifle skill and the player has 1 rifle skill: https://github.com/Khaligufzel/CataX/assets/50166150/604670fb-e53a-4756-b2e4-bc0ff6720b35

This is the player firing a weapon that uses rifle skill and the player has 99 rifle skill: https://github.com/Khaligufzel/CataX/assets/50166150/fff1aaff-11fe-4dc1-899c-38ca7a9a4124

The current calculations say that the player fires with 100% accuracy starting from level 30 rifle skill (if that weapon uses rifle skill). The player does get the normal recoil penalty. If the ranged weapon has no skill defined, the calculations will work as though the player has level 0 in that skill. These calculations are far from perfect, but it's a start