-
Notifications
You must be signed in to change notification settings - Fork 11
Description
Which Command
god
What should it do?
Include (or make a new command) an extra parameter for "true" godmode. The current godmode matches with what the game defines as godmode.
This secondary version should include immunity to HealthComponent's Suicide() and by extension, TrueKill (preventing the method from running, as it alters the Dio's Best Friend item count).
It shouldn't be replacing the first version as it will still be desirable to test the game's definition of godmode.
For this secondary version, consider marking the player as this "true godmode" state.
For MapZone.TryZoneStart, consider a subscription that mirrors this: https://github.com/KomradeSpectre/AetheriumMod/blob/rewrite-master/Aetherium/Items/UnstableDesign.cs#L505-L520
For HealthComponent.Suicide, consider returning after doing a NetworkServer check and checking for true godmode
For CharacterMaster.TrueKill, consider the same as the above.
Issue
godmode does not protect against HealthComponent.Suicide(), which is (iirc) called by: MapZone.TryZoneStart (if it's not on the player team), kill_all DT command, and the death attack of Void Reavers.
CharacterMaster.TrueKill() seems to just call HealthComponent.Suicide() and also cancel the invocation of the respawning methods.
The MapZone death can be accomplished by using change_team to switch to a non-player team.