steven4547466 / AdvancedSubclassing

Adds very advanced subclassing to SCP: SL
Other
5 stars 6 forks source link

MaxHealth lower than HealthOnSpawn let me heal over the MaxHealth value #12

Closed coco9515 closed 4 years ago

coco9515 commented 4 years ago

Describe the bug I would expect that this code :

integer_options:
  # Max health of the class.
  MaxHealth: 1
  # The health the class spawns with.
  HealthOnSpawn: 500

Would have spawn me with 500HP (that works) but I could not heal since I would already be over my max HP - but I can actually heal myself.

To Reproduce Steps to reproduce the behavior:

  1. Create a class with "MaxHealth: 1" and "HealthOnSpawn: 500"
  2. Spawn this class and hurt yourself
  3. Try to heal yourself, you can heal.

Expected behavior Any kind of heal would fail as I would already be above my "MaxHealth"

Screenshots N/A

Console Logs N/A

Versioning

Additional context Another way to do it could be an ability that make the class unable to heal.

PS : Sorry, I realised I failed with the title of this post and I modified after

steven4547466 commented 4 years ago

Being able to heal while past your max health is likely a base game issue, as I don't mess with healing. If I had to guess they only check if their heath is equal to their max health and not greater than. I can make a patch myself to fix this issue in 1.1.5.

EDIT: This is actually a just a thing in exiled, when you set health to something greater than max health, it sets max health to that value. I'll have to make it an ability.

steven4547466 commented 4 years ago

Prerelease 1.2.0 1 added a CantHeal ability (it is untested as of writing this)