ArcanePariah / Night-of-the-Dead

9 stars 14 forks source link

Survival Cronus Persistent Lasers After Death #194

Open ThunderRazor opened 6 years ago

ThunderRazor commented 6 years ago

It took me a while to figure our why Cronus lasers continue to persist after death in survival mode, but fixing the bug may entail a small compromise on the difficulty of fighting Cronus.

Fault:

Cause of Fault:

Proposed Solutions:

I will create two versions of a solution for this. Merge one and close the other! ~ ThunderRazor

NiktosNOTD commented 6 years ago

So are you really sure this sentence is true? Behaviors (Buffs) that modify a unit's Vital Fraction or Maximum Vital bugs persistent effects such as Cronus lasers causing the effects to continue executing after death. Coz you know 'DifficultyScallingHP' buff does just that to all enemies in game yet ac cronus has no issue with persistent laser.

Difference between 'DifficultyScallingHP' and 'UnstableMutation' being one is pre-applied and other added to existing unit. So maybe that is the issue. But just saying VitalMaxFractionArray bugs it up is false, maybe TWO of this modification on same unit are the reason.

ThunderRazor commented 6 years ago

"vitalmaxfraction" and the other field "vital addition multiple" (or something like that) both causes the bug. I came to this conclusion thru the following troubleshooting steps:

  1. I created a dialog item (list box) that records all the behaviors on Cronus after every Effect that Cronus executes. (I figured this was quicker than reading thru many lines of code in many effects.)
  2. I compared the Survival Cronus behavior stacks to the Alpha company behavior stacks.
  3. The difference was "Unstable Mutation".
  4. When I removed "Unstable Mutation" from Survival Cronus, the lasers no longer bugged for Survival Cronus.
  5. Then, I created a new temporary behavior that does the exact same thing as "Unstable Mutation", except that I added the fields one by one to the new temporary behavior.
  6. With only a movement speed modification, Cronus did not bug. But with the vital max fraction field added (at any value), Cronus lasers bugged again. This confirmed that vital max fraction bugs Cronus lasers.
  7. I tried to move the value to another field (vital addition multiple (or w/e)), and the Cronus lasers were still bugged.
  8. The only way to remove the laser bug was to leave all the vital modification fields at 0.
  9. So, as it applies to Cronus, and in the context of the difference between Survival Cronus and Alpha Company Cronus, the sentence is true.
  10. Conclusion, it's tempting to fix Cronus 50% health by using the correct field to modify his health. But, it's still not an option since it bugs the lasers.

If you want to find a way to keep "Unstable Mutation" on Cronus without interfering with "DifficultyScalingHP", then be my guest. Just don't forget to fix "Unstable Mutation"s vital field, since the health modifier is already in the wrong field, to begin with. I would love to see a simpler solution (that works) than the ones I offered.

NiktosNOTD commented 6 years ago

My message wasn't trying to say your solution is wrong, only pointing out/ trying to make sure the reason is clear and it wasn't somewhat accidental fix.

Reason being clear or not has impact on future similiar cases, not just notd related. Lately gaining some more confidence in editor i started trying to answer some questions in sc2mapster discord. Now with your detailed explanation i feel confident i would not feeding bullshit to some guy who has a similiar issue in totally different map.

As for solution itself, i would probably make movespeed modifying behavior and apply it instead of UnitModifyProperty. But that's only coz UnitModifyProperty was a culprit of bug i fixed before and now i rather avoid it. [#176 It was the ac doc dying to sudden negative hp regen after 'injury' period bug] To be precise cause of bug was using UnitModifyProperty multiple times in quick succesion to change value up/down. As such for cronus it's non factor and i won't do anything regarding your suggestions.

ThunderRazor commented 6 years ago

Understood. If we completely drop the health modification, I would re-implement "Unstable Mutation" to apply movespeed modification only, and remove the health modifier. This is under the premise that "Unstable Mutation" is only used by Cronus in Survival, and nothing else. @ArcanePariah What are your thoughts on this?