Praytic / youtd2

Classic community-driven session-based Tower Defense game with RPG elements.
https://youtd2.com/
MIT License
95 stars 16 forks source link

Maverick does not reduce wisdom upgrade strength #447

Closed PiotrKaszuba closed 1 month ago

PiotrKaszuba commented 2 months ago

Hello, I just found that Maverick does not reduce wisdom upgrade strength (item find at 112% in the beginning).

The problem seems to origin from not using "player.get_wisdom_upgrade_effect_multiplier()". This could probably be fixed by getting and applying that modifier in:

https://github.com/Praytic/youtd2/blob/09f42261ecc80e1ef257ad045193f5e044018ee4/src/actions/action_select_wisdom_upgrades.gd#L14 and https://github.com/Praytic/youtd2/blob/09f42261ecc80e1ef257ad045193f5e044018ee4/src/actions/action_select_wisdom_upgrades.gd#L27

or handling it internally in "player.set_wisdom_modifier"

Also, in order to handle this correctly this https://github.com/Praytic/youtd2/blob/09f42261ecc80e1ef257ad045193f5e044018ee4/src/builders/instances/builder_maverick.gd#L14

should probably be changed to "player.set_wisdom_upgrade_effect_multiplier(player.get_wisdom_upgrade_effect_multiplier() - 0.375)". It seems that same will apply for Feeble Fender.

I'm not too familiar with the codebase so I might have missed something. I'm currently missing testing/debugging setup - if you could point me to some existing dev workflow/build/test guide of this project I could be able to prepare a pull request for it myself.

image

Kvel2D commented 1 month ago

I checked and managed to reproduce this bug. I will take a look and prepare a fix.

Thank you for reporting this!

Kvel2D commented 1 month ago

Screenshots after fix

Feeble Fender: 2024-09-25 19_51_59-YouTD 2 (DEBUG) 2024-09-25 19_52_08-YouTD 2 (DEBUG) Exp ratio +20% base x 1.25 from feeble fender = +25% = 125% total

Maverick: 2024-09-25 19_52_28-YouTD 2 (DEBUG) 2024-09-25 19_54_24-YouTD 2 (DEBUG) Exp ratio +20% base x0.625 from maverick = +13% = 113% total