diff --git a/game/engines/default/engine/Zone.lua b/game/engines/default/engine/Zone.lua index dde1a57007bf06924c5cdc8b082a38a7a0a25d40..33144e38e8a037cb509b767a931cf0b300c4f2f2 100644 --- a/game/engines/default/engine/Zone.lua +++ b/game/engines/default/engine/Zone.lua @@ -501,10 +501,10 @@ function _M:applyEgo(e, ego, type, no_name_change) end e.ego_list = e.ego_list or {} e.ego_list[#e.ego_list + 1] = {orig_ego, type, no_name_change} - e:resolve() end -local function reapplyEgos(e) +-- WARNING the thing may be in need of re-identifying after this +local function reapplyEgos(self, e) if not e.__original then return e end local brandNew = e.__original -- it will be cloned upon first ego application if e.ego_list and #e.ego_list > 0 then @@ -512,7 +512,6 @@ local function reapplyEgos(e) self:applyEgo(brandNew, unpack(ego_args)) end end - brandNew:resolve(nil, true) e:replaceWith(brandNew) end @@ -526,7 +525,7 @@ function _M:removeEgo(e, ego) end if not idx then return end table.remove(e.ego_list, idx) - reapplyEgos(e) + reapplyEgos(self, e) return ego end @@ -542,6 +541,12 @@ function _M:removeEgoByName(e, ego_name) end end +function _M:setEntityEgoList(e, list) + e.ego_list = table.clone(list) + reapplyEgos(self, e) + return e +end + --- Finishes generating an entity function _M:finishEntity(level, type, e, ego_filter) e = e:clone() diff --git a/game/modules/tome/class/GameState.lua b/game/modules/tome/class/GameState.lua index f65ed3d05c6a9c3d3f8dac85624f5bf080084564..ece6537e15afedd639ef0458e5f71f162a086e7b 100644 --- a/game/modules/tome/class/GameState.lua +++ b/game/modules/tome/class/GameState.lua @@ -597,7 +597,6 @@ function _M:generateRandart(data) end -- Re-resolve with the (possibly) new resolvers o:resolve() - o:resolve(nil, true) ----------------------------------------------------------- -- Imbue random powers into the randart according to themes @@ -674,7 +673,8 @@ function _M:generateRandart(data) game.zone:applyEgo(o, ego, "object", true) end - o:resolve() o:resolve(nil, true) + o:resolve() + o:resolve(nil, true) -- Always assign at least one power source based on themes and restrictions if not o.power_source then diff --git a/game/modules/tome/data/talents/cursed/cursed-aura.lua b/game/modules/tome/data/talents/cursed/cursed-aura.lua index 8229a8af7d2863e994dbd6aa39dc558aa9b0a32c..1dd5ec558714f99a6137e6b067b08f26fd3bb355 100644 --- a/game/modules/tome/data/talents/cursed/cursed-aura.lua +++ b/game/modules/tome/data/talents/cursed/cursed-aura.lua @@ -85,7 +85,6 @@ newTalent{ local def = self.tempeffect_def[curse] local ego = Entity.new{ name = "curse", - special = true, display_string = " ("..def.short_desc..")", curse = curse, fake_ego = true, unvault_ego = true, diff --git a/game/modules/tome/data/talents/psionic/finer-energy-manipulations.lua b/game/modules/tome/data/talents/psionic/finer-energy-manipulations.lua index a9a3e0f337ec13027f92a8ee5539d93e27f8a50d..f9ee68e1c43cd37eb0cc276f6f027e8fcbf4a51e 100644 --- a/game/modules/tome/data/talents/psionic/finer-energy-manipulations.lua +++ b/game/modules/tome/data/talents/psionic/finer-energy-manipulations.lua @@ -133,7 +133,7 @@ newTalent{ local new_ego = Entity.new{ name = "reshape weapon", display_string = "reshaped("..tostring(atk_boost)..","..tostring(dam_boost)..") ", display_prefix = true, - special = true, + been_reshaped = true, combat = {atk=atk_boost, dam=dam_boost}, old_atk = atk_boost, old_dam = dam_boost, orig_atk = o.combat.atk, orig_dam = o.combat.dam, -- Easier this way fake_ego = true, unvault_ego = true, @@ -174,7 +174,6 @@ newTalent{ name = "reshape armour", display_string = "reshaped["..tostring(armour)..","..tostring(real_fat).."%] ", display_prefix = true, been_reshaped = true, - special = true, wielder = {combat_armour=arm, fatigue=-real_fat}, fatigue_reduction = fat, old_fat = fat, orig_fat = o.wielder.fatigue, orig_arm = o.wielder.armour, -- Easier this way