jdoleary / Spellmasons

https://store.steampowered.com/app/1618380/Spellmasons/
Other
0 stars 1 forks source link

Spell Damage / Functional Player Damage #788

Open SoulMuncher opened 1 month ago

SoulMuncher commented 1 month ago

Closes #578

Spells now scale off of the player unit's damage stat via a damage multiplier, instead of having a constant damage value.

TODO

SoulMuncher commented 1 month ago

@jdoleary

Won't run on headless:


TypeError: Unit.GetSpellDamage is not a function
    at Object.<anonymous> (C:\Users\Jamis\Desktop\Spellmasons\headless-server-build\src\cards\poison.js:104:44)
    at Module._compile (node:internal/modules/cjs/loader:1369:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1427:10)
    at Module.load (node:internal/modules/cjs/loader:1206:32)
    at Module._load (node:internal/modules/cjs/loader:1022:12)
    at Module.require (node:internal/modules/cjs/loader:1231:19)
    at require (node:internal/modules/helpers:179:18)
    at Object.<anonymous> (C:\Users\Jamis\Desktop\Spellmasons\headless-server-build\src\Upgrade.js:39:18)
    at Module._compile (node:internal/modules/cjs/loader:1369:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1427:10)```
jdoleary commented 3 weeks ago

This change is too wide-reaching and I am concerned about the impact of the balance of the game. We may revisit this idea later but for now I'm just modifying empower so that it's clear it doesn't impact players.

jdoleary commented 2 weeks ago

Reopening. Empower needs to be changed so it can't affect players but we'll keep the rest

SoulMuncher commented 2 weeks ago

@jdoleary Two things to do before we can pull the PR

Spell description variables already factor in the client player's stats, I.E. Slash deals X damage, but the problem is that they initialize once on startup and never update after that, meaning any runtime change isn't reflected. They are locked at showing the base values. Do you have a good idea/fix for this? Is there a quick way to "recalc" or update the description whenever its accessed? Maybe if we change it to some kind of => function?