Skip to content
Commit b38399f3 authored by Hachem_Muche's avatar Hachem_Muche
Browse files

class.cloneFull and class.cloneCustom use table.merge to copy recursively

table.merge correctly handles table.NIL_MERGE for subtables

Added a new function engine.Actor:cloneActor that automatically handles copying and overwriting a number of default fields when cloning actors,  defined in:
_M.clone_nodes and _M.clone_copy, corresponding to the alt_nodes and post_copy tables passed to class:cloneCustom

This allows critical fields for cloning Actors to be specified in one place, so that only the relevant fields need to be specified in talent level calls.

Relevant base fields are specified in engine.Actor and supplemented in mod.class.Actor to manage the usual fields related to Actor spawning/death, AI, and player-specific fields.

Updated the Paradoxology quest, makeParadoxClone, the Rak'Shor Cultist, and a number of talents to use the new calls:
Shadow Simulacrum (enabled for npc use), Paradox Clone, Temporal Fugue, Ambuscade, Elemental Split, Multiply, Projection, Inner Demons, Forgery of Haze, Dreamscape (effect)

Added Actor:unlearnTalentsOnClone() function (similar to removeTimedEffectsOnClone()) to automatically unlearn talents tagged with .unlearn_on_clone.  This allows addons to prevent unwanted chain cloning more easily.

Tagged a number of talents to not be copied for clones:
Guardian Unity, Temporal Clone, Temporal Hounds, Warden's Call, Temporal Fugue, Ambuscade, Call Shadows, Elemental Split, Multiply (copies still get one less use), Projection, Inner Demons, Thought-Forms, Create Minions, Forgery of Haze

Fixed a few typos
parent 388a333d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment