Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create unit_respawning.lua #3009

Merged
merged 8 commits into from
May 18, 2024
Merged

Conversation

Xehrath
Copy link
Contributor

@Xehrath Xehrath commented May 12, 2024

This gadget enables unit respawning at a designated target. This is mainly intended for Evocom.

This gadget enables unit respawning at a designated target.
This is mainly intended for Evocom.
@SethDGamre
Copy link
Contributor

Testing notes

Burstfire weapons will continue to track the transposed(respawning) unit even after transposition across the map. An example of this is the Cortex Pyro. Its burst of flame follows the commander across the map and because it only has 1 HP remaining when transposition occurs, the commander dies immediately. I suggest an "immunity" timer where the commander is immune to all damage. 5 seconds should be sufficient.

When the effigy first spawns in it is offset from commander's starting position. Which means sometimes it can end up in a place from which the commander cannot move. Instead, I think it should spawn in the exact same spot as the commander because the commander can just move away from it. And, if it was a "respawn pad", the commander would have to respawn in that exact spot anyways. in either case, the commander will be able to move, and the initial effigy respawn location will be traversable.

@SethDGamre
Copy link
Contributor

need to add "iseffigy" customparam instructions in the comment section at the top of the gadget

@SethDGamre
Copy link
Contributor

When a unit with an effigy dies, its effigy should die too. Otherwise, since they're invisible and completely undetectable (not talking about the respawn pad method here), games with "kill all units" win condition will be unwinnable because the undetectable effigy still counts as a unit.

This happens when the commander self destructs, currently the effigy doesn't die or transpose with commander.

@SethDGamre
Copy link
Contributor

when transposition occurs, the effigy leaves its corpse at its original position not where the transposed unit (commander) died. We want the corpse to show up where the commander died to give a reward to the attacker.

Made the effigy spawn on the commander.
added 5 second immunity after respawn.
effigy is now destroyed upon commander suicide, unless respawn_pad is true.
Added instructions for iseffigy.
@SethDGamre
Copy link
Contributor

SethDGamre commented May 16, 2024

https://youtu.be/jf6tmAFROkc

Looking good! we need two more things:

  1. A cosmetic indicator of how much time the commander will be paralyzed for after respawn.

  2. Need to clear out all of the respawned unit's commands so it doesn't immediately walk back into battle with 0 HP unexpectedly.

  3. The effigy isn't teleporting to unit location before dying and leaving behind a corpse.

Added a missing return statement
Fixed a bug preventing the effigy wreck from teleporting to the commanders position.

Added clearing of the commanders commands when respawning.
Added export of target unitID when evolving.

Added options:
new conditions: power, and health
Health transfer: "flat", "percentage", and "full
Added transfering/replacing of the effigy when evolving, or destruction if the evolution target do not have respawning enabled.
Added respawn sound
@Xehrath
Copy link
Contributor Author

Xehrath commented May 17, 2024

This should be ready for a merge now, unless someone finds anything else.

@Damgam Damgam merged commit 2d36386 into beyond-all-reason:master May 18, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants