Commit 90e3b6c186f613815abda64280c6283d9a1bca54

Authored by Andrew Minton
1 parent 23956754

Fix some overlapping set bugs

This fixes the Kinetic/Thermal/Charged set.

Previously, if you equipped all three mindstars, then removed Kinetic Focus, the
other two would lose ALL their set bonuses - including the Thermal/Charged set
bonus, even though both are still equipped. If you re-equipped the Kinetic
Focus, you would get the Kinetic/Thermal and Kinetic/Charged set bonuses, but
not the Thermal/Charged one.
In the general case, removing one item from any set would remove all set bonuses
from all items in that set. This worked fine for non-overlapping sets, but does
not work for overlapping ones: if X+Y, Y+Z, and X+Z are all sets, then removing
X would take away the set bonuses for Y+Z, which it obviously should not.

This commit changes set behaviour so that only set bonuses from the sets that
were *actually broken* are removed. If you remove X, the bonuses for X+Y and X+Z
are still removed, but the bonus for Y+Z remains. This fixes the
Kinetic/Thermal/Charged Focus set.

Object:specialSetAdd() now takes the set_id as a third parameter. This is
only needed for overlapping sets and can safely be omitted for sets that do not
overlap. Therefore, existing addons that use specialSetAdd() will not break.

There are still other problems with mindstar ego sets that need to be addressed
separately.

Additionally, if you had e.g. two Mighty Girdles, one worn and one in your pack, it was
possible that Actor:findInAllInventories() would find the one in your pack
first, meaning that the set would not be completed. This is mainly relevant for
mitotic mindstars, but could happen with any set in the game.

The set code now only looks in worn inventories if no inven_id is specified,
preventing this bug from happening. This also allows sets specifying non-worn
inven_ids to work.
... ... @@ -3915,11 +3915,26 @@ function _M:onWear(o, inven_id, bypass_set, silent)
3915 3915 object_inven, conditions[1], conditions[2])
3916 3916 end
3917 3917 else
3918   - object, index, object_inven_id =
3919   - self:findInAllInventoriesBy(conditions[1], conditions[2])
  3918 + -- Can't use Actor:findInAllInventories() here;
  3919 + -- if a matching item is worn but there's also a
  3920 + -- matching item in the pack,
  3921 + -- findInAllInventories() may return the one that
  3922 + -- is in the pack instead of the worn one
  3923 + --
  3924 + -- So manually search only the worn inventories
  3925 + -- instead
  3926 + for inven_id, inven in pairs(self.inven) do
  3927 + if self:getInven(inven_id).worn then
  3928 + object, index = self:findInInventoryBy(inven, conditions[1], conditions[2])
  3929 + if object then
  3930 + object_inven_id = inven_id
  3931 + break
  3932 + end
  3933 + end
  3934 + end
3920 3935 end
3921 3936 -- If we're wearing it, add it to the list.
3922   - if object and self:getInven(object_inven_id).worn and
  3937 + if object and
3923 3938 (not object.set_complete or not object.set_complete[set_id])
3924 3939 then
3925 3940 table.insert(set_objects, {
... ... @@ -4069,19 +4084,30 @@ function _M:onTakeoff(o, inven_id, bypass_set, silent)
4069 4084 if type(broken) == "table" then broken = broken[set_id] end
4070 4085 if broken then broken(d.object, self, d.inven_id, set_objects) end
4071 4086 if d.object._special_set then
4072   - for k, id in pairs(d.object._special_set) do
4073   - d.object:removeTemporaryValue(k, id)
  4087 + if d.object._special_set[set_id] then
  4088 + for k, id in pairs(d.object._special_set[set_id]) do
  4089 + d.object:removeTemporaryValue(k, id)
  4090 + end
  4091 + d.object._special_set[set_id] = nil
  4092 + -- Remove if empty.
  4093 + if not next(d.object._special_set) then
  4094 + d.object._special_set = nil
  4095 + end
  4096 + else -- Object only has one set (old behaviour)
  4097 + for k, id in pairs(d.object._special_set) do
  4098 + d.object:removeTemporaryValue(k, id)
  4099 + end
  4100 + d.object._special_set = nil
4074 4101 end
4075   - d.object._special_set = nil
4076 4102 end
4077 4103 if d.object ~= o then self:onWear(d.object, d.inven_id, true) end
4078 4104 self:useObjectDisable(d.object)
4079 4105 self:useObjectEnable(d.object)
4080 4106 d.object.set_complete[set_id] = nil
4081 4107 -- Remove if empty.
4082   - local empty = true
4083   - for k, v in pairs(d.object.set_complete) do empty = false break end
4084   - if empty then d.object.set_complete = nil end
  4108 + if not next(d.object.set_complete) then
  4109 + d.object.set_complete = nil
  4110 + end
4085 4111 end
4086 4112 end
4087 4113 end
... ...
... ... @@ -2337,10 +2337,19 @@ function _M:specialWearAdd(prop, value)
2337 2337 self._special_wear[prop] = self:addTemporaryValue(prop, value)
2338 2338 end
2339 2339
2340   ---- Add some special properties right when completting a set
2341   -function _M:specialSetAdd(prop, value)
  2340 +--- Add some special properties right when completing a set
  2341 +-- Items with overlapping sets (such as Kinetic/Thermal/Charged focus) must
  2342 +-- include the set_id parameter identifying which of the overlapping sets the
  2343 +-- bonus belongs to. Otherwise, breaking one of the overlapping sets will
  2344 +-- remove ALL set bonuses from the other item(s).
  2345 +function _M:specialSetAdd(prop, value, set_id)
2342 2346 self._special_set = self._special_set or {}
2343   - self._special_set[prop] = self:addTemporaryValue(prop, value)
  2347 + if set_id then
  2348 + self._special_set[set_id] = self._special_set[set_id] or {}
  2349 + self._special_set[set_id][prop] = self:addTemporaryValue(prop, value)
  2350 + else
  2351 + self._special_set[prop] = self:addTemporaryValue(prop, value)
  2352 + end
2344 2353 end
2345 2354
2346 2355 function _M:getCharmPower(who, raw)
... ... @@ -2512,4 +2521,4 @@ function _M:getStaffPreferredElement(who, force)
2512 2521 end
2513 2522 if wt > 0 then aspect = aspects[best] end
2514 2523 return wt > 0 and best, aspect, damweights
2515   -end
\ No newline at end of file
  2524 +end
... ...
... ... @@ -2726,15 +2726,15 @@ newEntity{ base = "BASE_MINDSTAR",
2726 2726 if inven_id == "MAINHAND" then
2727 2727 game.logPlayer(who, "#PURPLE#You feel the spirit of the wyrm stirring inside you!")
2728 2728 end
2729   - self:specialSetAdd({"wielder","blind_immune"}, self.material_level / 10)
2730   - self:specialSetAdd({"wielder","stun_immune"}, self.material_level / 10)
  2729 + self:specialSetAdd({"wielder","blind_immune"}, self.material_level / 10, "harmonious")
  2730 + self:specialSetAdd({"wielder","stun_immune"}, self.material_level / 10, "harmonious")
2731 2731 end,
2732 2732 wyrm = function(self, who, inven_id)
2733 2733 if inven_id == "MAINHAND" then
2734 2734 game.logPlayer(who, "#PURPLE#You feel the spirit of the wyrm stirring inside you!")
2735 2735 end
2736   - self:specialSetAdd({"wielder","blind_immune"}, self.material_level / 10)
2737   - self:specialSetAdd({"wielder","stun_immune"}, self.material_level / 10)
  2736 + self:specialSetAdd({"wielder","blind_immune"}, self.material_level / 10, "wyrm")
  2737 + self:specialSetAdd({"wielder","stun_immune"}, self.material_level / 10, "wyrm")
2738 2738 end,
2739 2739 },
2740 2740 on_set_broken = {
... ... @@ -7823,13 +7823,13 @@ newEntity{ base = "BASE_MINDSTAR", define_as = "EYE_OF_SUMMER",
7823 7823 on_set_complete = {
7824 7824 multiple = true,
7825 7825 seasons = function(self, who)
7826   - self:specialSetAdd({"wielder","resists"}, { [engine.DamageType.COLD]=20 })
7827   - self:specialSetAdd({"wielder","combat_mindpower"}, 4)
  7826 + self:specialSetAdd({"wielder","resists"}, { [engine.DamageType.COLD]=20 }, "seasons")
  7827 + self:specialSetAdd({"wielder","combat_mindpower"}, 4, "seasons")
7828 7828 game.logSeen(who, "#GREEN#You feel the seasons in perfect balance.")
7829 7829 end,
7830 7830 harmonious = function(self, who)
7831   - self:specialSetAdd({"wielder","resists"}, { [engine.DamageType.COLD]=20 })
7832   - self:specialSetAdd({"wielder","combat_mindpower"}, 4)
  7831 + self:specialSetAdd({"wielder","resists"}, { [engine.DamageType.COLD]=20 }, "harmonious")
  7832 + self:specialSetAdd({"wielder","combat_mindpower"}, 4, "harmonious")
7833 7833 game.logSeen(who, "#GREEN#You feel the seasons in perfect balance.")
7834 7834 end,
7835 7835 },
... ... @@ -7879,12 +7879,12 @@ newEntity{ base = "BASE_MINDSTAR", define_as = "EYE_OF_WINTER",
7879 7879 on_set_complete = {
7880 7880 multiple = true,
7881 7881 seasons = function(self, who)
7882   - self:specialSetAdd({"wielder","resists"}, { [engine.DamageType.FIRE]=20 })
7883   - self:specialSetAdd({"wielder","combat_mindpower"}, 4)
  7882 + self:specialSetAdd({"wielder","resists"}, { [engine.DamageType.FIRE]=20 }, "seasons")
  7883 + self:specialSetAdd({"wielder","combat_mindpower"}, 4, "seasons")
7884 7884 end,
7885 7885 harmonious = function(self, who)
7886   - self:specialSetAdd({"wielder","resists"}, { [engine.DamageType.FIRE]=20 })
7887   - self:specialSetAdd({"wielder","combat_mindpower"}, 4)
  7886 + self:specialSetAdd({"wielder","resists"}, { [engine.DamageType.FIRE]=20 }, "harmonious")
  7887 + self:specialSetAdd({"wielder","combat_mindpower"}, 4, "harmonious")
7888 7888 end,
7889 7889 },
7890 7890 on_set_broken = function(self, who)
... ... @@ -8085,36 +8085,36 @@ newEntity{ base = "BASE_MINDSTAR", define_as = "KINETIC_FOCUS",
8085 8085 on_set_complete = {
8086 8086 multiple = true,
8087 8087 kinchar = function(self, who)
8088   - self:specialSetAdd({"wielder","combat_mindpower"}, 6)
8089   - self:specialSetAdd({"wielder","combat_mindcrit"}, 3)
8090   - self:specialSetAdd({"wielder","inc_damage"}, { [engine.DamageType.PHYSICAL]=10 })
8091   - self:specialSetAdd({"wielder","resists_pen"}, { [engine.DamageType.PHYSICAL]=6 })
8092   - self:specialSetAdd({"wielder","resists"}, { [engine.DamageType.PHYSICAL]=10 })
8093   - self:specialSetAdd({"wielder","psi_on_crit"}, 1)
8094   - self:specialSetAdd({"wielder","combat_physresist"}, 6)
8095   - self:specialSetAdd({"wielder","talents_types_mastery"},{ ["psionic/kinetic-mastery"] = 0.1 })
  8088 + self:specialSetAdd({"wielder","combat_mindpower"}, 6, "kinchar")
  8089 + self:specialSetAdd({"wielder","combat_mindcrit"}, 3, "kinchar")
  8090 + self:specialSetAdd({"wielder","inc_damage"}, { [engine.DamageType.PHYSICAL]=10 }, "kinchar")
  8091 + self:specialSetAdd({"wielder","resists_pen"}, { [engine.DamageType.PHYSICAL]=6 }, "kinchar")
  8092 + self:specialSetAdd({"wielder","resists"}, { [engine.DamageType.PHYSICAL]=10 }, "kinchar")
  8093 + self:specialSetAdd({"wielder","psi_on_crit"}, 1, "kinchar")
  8094 + self:specialSetAdd({"wielder","combat_physresist"}, 6, "kinchar")
  8095 + self:specialSetAdd({"wielder","talents_types_mastery"},{ ["psionic/kinetic-mastery"] = 0.1 }, "kinchar")
8096 8096 game.logSeen(who, "#YELLOW#You feel psionic energy linking the mindstars.")
8097 8097 end,
8098 8098 kinther = function(self, who)
8099   - self:specialSetAdd({"wielder","combat_mindpower"}, 6)
8100   - self:specialSetAdd({"wielder","combat_mindcrit"}, 3)
8101   - self:specialSetAdd({"wielder","inc_damage"}, { [engine.DamageType.PHYSICAL]=10 })
8102   - self:specialSetAdd({"wielder","resists_pen"}, { [engine.DamageType.PHYSICAL]=6 })
8103   - self:specialSetAdd({"wielder","resists"}, { [engine.DamageType.PHYSICAL]=10 })
8104   - self:specialSetAdd({"wielder","psi_on_crit"}, 1)
8105   - self:specialSetAdd({"wielder","combat_physresist"}, 6)
8106   - self:specialSetAdd({"wielder","talents_types_mastery"},{ ["psionic/kinetic-mastery"] = 0.1 })
  8099 + self:specialSetAdd({"wielder","combat_mindpower"}, 6, "kinther")
  8100 + self:specialSetAdd({"wielder","combat_mindcrit"}, 3, "kinther")
  8101 + self:specialSetAdd({"wielder","inc_damage"}, { [engine.DamageType.PHYSICAL]=10 }, "kinther")
  8102 + self:specialSetAdd({"wielder","resists_pen"}, { [engine.DamageType.PHYSICAL]=6 }, "kinther")
  8103 + self:specialSetAdd({"wielder","resists"}, { [engine.DamageType.PHYSICAL]=10 }, "kinther")
  8104 + self:specialSetAdd({"wielder","psi_on_crit"}, 1, "kinther")
  8105 + self:specialSetAdd({"wielder","combat_physresist"}, 6, "kinther")
  8106 + self:specialSetAdd({"wielder","talents_types_mastery"},{ ["psionic/kinetic-mastery"] = 0.1 }, "kinther")
8107 8107 game.logSeen(who, "#YELLOW#You feel psionic energy linking the mindstars.")
8108 8108 end,
8109 8109 resonating = function(self, who)
8110   - self:specialSetAdd({"wielder","combat_mindpower"}, 2)
8111   - self:specialSetAdd({"wielder","combat_mindcrit"}, 1)
8112   - self:specialSetAdd({"wielder","inc_damage"}, { [engine.DamageType.PHYSICAL]=5 })
8113   - self:specialSetAdd({"wielder","resists_pen"}, { [engine.DamageType.PHYSICAL]=3 })
8114   - self:specialSetAdd({"wielder","resists"}, { [engine.DamageType.PHYSICAL]=5 })
8115   - self:specialSetAdd({"wielder","psi_on_crit"}, 0.5)
8116   - self:specialSetAdd({"wielder","combat_physresist"}, 3)
8117   - self:specialSetAdd({"wielder","talents_types_mastery"},{ ["psionic/kinetic-mastery"] = 0.05 })
  8110 + self:specialSetAdd({"wielder","combat_mindpower"}, 2, "resonating")
  8111 + self:specialSetAdd({"wielder","combat_mindcrit"}, 1, "resonating")
  8112 + self:specialSetAdd({"wielder","inc_damage"}, { [engine.DamageType.PHYSICAL]=5 }, "resonating")
  8113 + self:specialSetAdd({"wielder","resists_pen"}, { [engine.DamageType.PHYSICAL]=3 }, "resonating")
  8114 + self:specialSetAdd({"wielder","resists"}, { [engine.DamageType.PHYSICAL]=5 }, "resonating")
  8115 + self:specialSetAdd({"wielder","psi_on_crit"}, 0.5, "resonating")
  8116 + self:specialSetAdd({"wielder","combat_physresist"}, 3, "resonating")
  8117 + self:specialSetAdd({"wielder","talents_types_mastery"},{ ["psionic/kinetic-mastery"] = 0.05 }, "resonating")
8118 8118 game.logSeen(who, "#YELLOW#You feel psionic energy linking the mindstars.")
8119 8119 end,
8120 8120 },
... ... @@ -8166,34 +8166,34 @@ newEntity{ base = "BASE_MINDSTAR", define_as = "CHARGED_FOCUS",
8166 8166 on_set_complete = {
8167 8167 multiple = true,
8168 8168 kinchar = function(self, who)
8169   - self:specialSetAdd({"wielder","combat_mindpower"}, 2)
8170   - self:specialSetAdd({"wielder","combat_mindcrit"}, 1)
8171   - self:specialSetAdd({"wielder","inc_damage"}, { [engine.DamageType.LIGHTNING]=5 })
8172   - self:specialSetAdd({"wielder","resists_pen"}, { [engine.DamageType.LIGHTNING]=3 })
8173   - self:specialSetAdd({"wielder","resists"}, { [engine.DamageType.LIGHTNING]=5 })
8174   - self:specialSetAdd({"wielder","max_psi"}, 10)
8175   - self:specialSetAdd({"wielder","combat_mentalresist"}, 3)
8176   - self:specialSetAdd({"wielder","talents_types_mastery"},{ ["psionic/charged-mastery"] = 0.05 })
  8169 + self:specialSetAdd({"wielder","combat_mindpower"}, 2, "kinchar")
  8170 + self:specialSetAdd({"wielder","combat_mindcrit"}, 1, "kinchar")
  8171 + self:specialSetAdd({"wielder","inc_damage"}, { [engine.DamageType.LIGHTNING]=5 }, "kinchar")
  8172 + self:specialSetAdd({"wielder","resists_pen"}, { [engine.DamageType.LIGHTNING]=3 }, "kinchar")
  8173 + self:specialSetAdd({"wielder","resists"}, { [engine.DamageType.LIGHTNING]=5 }, "kinchar")
  8174 + self:specialSetAdd({"wielder","max_psi"}, 10, "kinchar")
  8175 + self:specialSetAdd({"wielder","combat_mentalresist"}, 3, "kinchar")
  8176 + self:specialSetAdd({"wielder","talents_types_mastery"},{ ["psionic/charged-mastery"] = 0.05 }, "kinchar")
8177 8177 end,
8178 8178 charther = function(self, who)
8179   - self:specialSetAdd({"wielder","combat_mindpower"}, 6)
8180   - self:specialSetAdd({"wielder","combat_mindcrit"}, 3)
8181   - self:specialSetAdd({"wielder","inc_damage"}, { [engine.DamageType.LIGHTNING]=10 })
8182   - self:specialSetAdd({"wielder","resists_pen"}, { [engine.DamageType.LIGHTNING]=6 })
8183   - self:specialSetAdd({"wielder","resists"}, { [engine.DamageType.LIGHTNING]=10 })
8184   - self:specialSetAdd({"wielder","max_psi"}, 20)
8185   - self:specialSetAdd({"wielder","combat_mentalresist"}, 6)
8186   - self:specialSetAdd({"wielder","talents_types_mastery"},{ ["psionic/charged-mastery"] = 0.1 })
  8179 + self:specialSetAdd({"wielder","combat_mindpower"}, 6, "charther")
  8180 + self:specialSetAdd({"wielder","combat_mindcrit"}, 3, "charther")
  8181 + self:specialSetAdd({"wielder","inc_damage"}, { [engine.DamageType.LIGHTNING]=10 }, "charther")
  8182 + self:specialSetAdd({"wielder","resists_pen"}, { [engine.DamageType.LIGHTNING]=6 }, "charther")
  8183 + self:specialSetAdd({"wielder","resists"}, { [engine.DamageType.LIGHTNING]=10 }, "charther")
  8184 + self:specialSetAdd({"wielder","max_psi"}, 20, "charther")
  8185 + self:specialSetAdd({"wielder","combat_mentalresist"}, 6, "charther")
  8186 + self:specialSetAdd({"wielder","talents_types_mastery"},{ ["psionic/charged-mastery"] = 0.1 }, "charther")
8187 8187 end,
8188 8188 resonating = function(self, who)
8189   - self:specialSetAdd({"wielder","combat_mindpower"}, 2)
8190   - self:specialSetAdd({"wielder","combat_mindcrit"}, 1)
8191   - self:specialSetAdd({"wielder","inc_damage"}, { [engine.DamageType.LIGHTNING]=5 })
8192   - self:specialSetAdd({"wielder","resists_pen"}, { [engine.DamageType.LIGHTNING]=3 })
8193   - self:specialSetAdd({"wielder","resists"}, { [engine.DamageType.LIGHTNING]=5 })
8194   - self:specialSetAdd({"wielder","max_psi"}, 10)
8195   - self:specialSetAdd({"wielder","combat_mentalresist"}, 3)
8196   - self:specialSetAdd({"wielder","talents_types_mastery"},{ ["psionic/charged-mastery"] = 0.05 })
  8189 + self:specialSetAdd({"wielder","combat_mindpower"}, 2, "resonating")
  8190 + self:specialSetAdd({"wielder","combat_mindcrit"}, 1, "resonating")
  8191 + self:specialSetAdd({"wielder","inc_damage"}, { [engine.DamageType.LIGHTNING]=5 }, "resonating")
  8192 + self:specialSetAdd({"wielder","resists_pen"}, { [engine.DamageType.LIGHTNING]=3 }, "resonating")
  8193 + self:specialSetAdd({"wielder","resists"}, { [engine.DamageType.LIGHTNING]=5 }, "resonating")
  8194 + self:specialSetAdd({"wielder","max_psi"}, 10, "resonating")
  8195 + self:specialSetAdd({"wielder","combat_mentalresist"}, 3, "resonating")
  8196 + self:specialSetAdd({"wielder","talents_types_mastery"},{ ["psionic/charged-mastery"] = 0.05 }, "resonating")
8197 8197 end,
8198 8198 },
8199 8199 on_set_broken = function(self, who)
... ... @@ -8247,34 +8247,34 @@ newEntity{ base = "BASE_MINDSTAR", define_as = "THERMAL_FOCUS",
8247 8247 on_set_complete = {
8248 8248 multiple = true,
8249 8249 kinther = function(self, who)
8250   - self:specialSetAdd({"wielder","combat_mindpower"}, 2)
8251   - self:specialSetAdd({"wielder","combat_mindcrit"}, 1)
8252   - self:specialSetAdd({"wielder","inc_damage"}, { [engine.DamageType.FIRE]=5, [engine.DamageType.COLD]=5, })
8253   - self:specialSetAdd({"wielder","resists_pen"}, { [engine.DamageType.FIRE]=3, [engine.DamageType.COLD]=3, })
8254   - self:specialSetAdd({"wielder","resists"}, { [engine.DamageType.FIRE]=5, [engine.DamageType.COLD]=5, })
8255   - self:specialSetAdd({"wielder","psi_regen"}, 1)
8256   - self:specialSetAdd({"wielder","combat_spellresist"}, 3)
8257   - self:specialSetAdd({"wielder","talents_types_mastery"},{ ["psionic/thermal-mastery"] = 0.05 })
  8250 + self:specialSetAdd({"wielder","combat_mindpower"}, 2, "kinther")
  8251 + self:specialSetAdd({"wielder","combat_mindcrit"}, 1, "kinther")
  8252 + self:specialSetAdd({"wielder","inc_damage"}, { [engine.DamageType.FIRE]=5, [engine.DamageType.COLD]=5, }, "kinther")
  8253 + self:specialSetAdd({"wielder","resists_pen"}, { [engine.DamageType.FIRE]=3, [engine.DamageType.COLD]=3, }, "kinther")
  8254 + self:specialSetAdd({"wielder","resists"}, { [engine.DamageType.FIRE]=5, [engine.DamageType.COLD]=5, }, "kinther")
  8255 + self:specialSetAdd({"wielder","psi_regen"}, 1, "kinther")
  8256 + self:specialSetAdd({"wielder","combat_spellresist"}, 3, "kinther")
  8257 + self:specialSetAdd({"wielder","talents_types_mastery"},{ ["psionic/thermal-mastery"] = 0.05 }, "kinther")
8258 8258 end,
8259 8259 charther = function(self, who)
8260   - self:specialSetAdd({"wielder","combat_mindpower"}, 2)
8261   - self:specialSetAdd({"wielder","combat_mindcrit"}, 1)
8262   - self:specialSetAdd({"wielder","inc_damage"}, { [engine.DamageType.FIRE]=5, [engine.DamageType.COLD]=5, })
8263   - self:specialSetAdd({"wielder","resists_pen"}, { [engine.DamageType.FIRE]=3, [engine.DamageType.COLD]=3, })
8264   - self:specialSetAdd({"wielder","resists"}, { [engine.DamageType.FIRE]=5, [engine.DamageType.COLD]=5, })
8265   - self:specialSetAdd({"wielder","psi_regen"}, 1)
8266   - self:specialSetAdd({"wielder","combat_spellresist"}, 3)
8267   - self:specialSetAdd({"wielder","talents_types_mastery"},{ ["psionic/thermal-mastery"] = 0.05 })
  8260 + self:specialSetAdd({"wielder","combat_mindpower"}, 2, "charther")
  8261 + self:specialSetAdd({"wielder","combat_mindcrit"}, 1, "charther")
  8262 + self:specialSetAdd({"wielder","inc_damage"}, { [engine.DamageType.FIRE]=5, [engine.DamageType.COLD]=5, }, "charther")
  8263 + self:specialSetAdd({"wielder","resists_pen"}, { [engine.DamageType.FIRE]=3, [engine.DamageType.COLD]=3, }, "charther")
  8264 + self:specialSetAdd({"wielder","resists"}, { [engine.DamageType.FIRE]=5, [engine.DamageType.COLD]=5, }, "charther")
  8265 + self:specialSetAdd({"wielder","psi_regen"}, 1, "charther")
  8266 + self:specialSetAdd({"wielder","combat_spellresist"}, 3, "charther")
  8267 + self:specialSetAdd({"wielder","talents_types_mastery"},{ ["psionic/thermal-mastery"] = 0.05 }, "charther")
8268 8268 end,
8269 8269 resonating = function(self, who)
8270   - self:specialSetAdd({"wielder","combat_mindpower"}, 2)
8271   - self:specialSetAdd({"wielder","combat_mindcrit"}, 1)
8272   - self:specialSetAdd({"wielder","inc_damage"}, { [engine.DamageType.FIRE]=5, [engine.DamageType.COLD]=5, })
8273   - self:specialSetAdd({"wielder","resists_pen"}, { [engine.DamageType.FIRE]=3, [engine.DamageType.COLD]=3, })
8274   - self:specialSetAdd({"wielder","resists"}, { [engine.DamageType.FIRE]=5, [engine.DamageType.COLD]=5, })
8275   - self:specialSetAdd({"wielder","psi_regen"}, 1)
8276   - self:specialSetAdd({"wielder","combat_spellresist"}, 3)
8277   - self:specialSetAdd({"wielder","talents_types_mastery"},{ ["psionic/thermal-mastery"] = 0.05 })
  8270 + self:specialSetAdd({"wielder","combat_mindpower"}, 2, "resonating")
  8271 + self:specialSetAdd({"wielder","combat_mindcrit"}, 1, "resonating")
  8272 + self:specialSetAdd({"wielder","inc_damage"}, { [engine.DamageType.FIRE]=5, [engine.DamageType.COLD]=5, }, "resonating")
  8273 + self:specialSetAdd({"wielder","resists_pen"}, { [engine.DamageType.FIRE]=3, [engine.DamageType.COLD]=3, }, "resonating")
  8274 + self:specialSetAdd({"wielder","resists"}, { [engine.DamageType.FIRE]=5, [engine.DamageType.COLD]=5, }, "resonating")
  8275 + self:specialSetAdd({"wielder","psi_regen"}, 1, "resonating")
  8276 + self:specialSetAdd({"wielder","combat_spellresist"}, 3, "resonating")
  8277 + self:specialSetAdd({"wielder","talents_types_mastery"},{ ["psionic/thermal-mastery"] = 0.05 }, "resonating")
8278 8278 end,
8279 8279 },
8280 8280 on_set_broken = function(self, who)
... ...