JohnnyTheWolf wrote: ↑Mon Aug 26, 2024 1:32 pm
It was going just fine until I came across the newly-introduced Demon Armor, which is a level above the MegaArmor. Weirdly, the game will let me pick it up if I wear the Basic Armor and I can repair the Demon Armor with the Basic Armor, but it will not let me do any of that if I wear the MegaArmor;
This one is on me, actually. I made a redundant check for if the SaveAmount on the armor being picked up is less than the SaveAmount on the armor currently being worn, so if they happened to be exactly equal nothing would happen. Removed that and uploaded, so now it works. This poses a bit of a conundrum, however: due to sharing the same SaveAmount, DemonArmor and BlueArmor can be used to repair each other even though DemonArmor is functionally better against anything that deals "Normal" damage (by reducing that damage to 20%). DemonArmor otherwise is
worse than Blue and GreenArmor, with a SavePercent of 25, so you get bonuses to the amount repaired. Oh well, turn off IS behavior if you want to switch from BlueArmor to DemonArmor and vice versa, and I consider the "lesser" repair option to be cheaty...
JohnnyTheWolf wrote: ↑Mon Aug 26, 2024 1:32 pm
additionally, picking up a MegaSphere will replace the Demon Armor with the MegaArmor.
This would have to be patched separately.
BlueArmorForMegasphere (or in Doom Delta's case, Delta_BlueArmor) is given directly by a Megasphere and overrides any armor you're currently wearing that will have fallen below 200% - just as if you had picked up a BlueArmor without any intelligent behavior at all. If your intention is to replace Megasphere BlueArmor with DemonArmor, I suggest the following simple ZScript code:
Code: Select all
Class DemonMegasphere : Megasphere Replaces Megasphere
{
States
{
Pickup:
TNT1 A 0 A_GiveInventory("Delta_DemonArmor", 1);
TNT1 A 0 A_GiveInventory("MegasphereHealth", 1);
Stop
}
}