diff --git a/game/modules/tome/data/damage_types.lua b/game/modules/tome/data/damage_types.lua index 24090a856e9433f42b1a54561f383e28f1d436f0..835cb842c9f4fba95f65b956281cc364279542c8 100644 --- a/game/modules/tome/data/damage_types.lua +++ b/game/modules/tome/data/damage_types.lua @@ -333,6 +333,10 @@ setDefaultProjector(function(src, x, y, type, dam, tmp, no_martyr) end end + if src.necrotic_minion_be_nice and src.summoner == target then + dam = dam * (1 - src.necrotic_minion_be_nice) + end + print("[PROJECTOR] final dam", dam) local hd = {"DamageProjector:final", src=src, x=x, y=y, type=type, dam=dam} diff --git a/game/modules/tome/data/talents/spells/necrotic-minions.lua b/game/modules/tome/data/talents/spells/necrotic-minions.lua index 76ed2162aa772253b6704587e6b65ff5378576e7..125ec22fb2b7e92a28ca2f61fee1aa83046a0595 100644 --- a/game/modules/tome/data/talents/spells/necrotic-minions.lua +++ b/game/modules/tome/data/talents/spells/necrotic-minions.lua @@ -813,7 +813,8 @@ newTalent{ getPerc = function(self, t) return self:combatTalentSpellDamage(t, 15, 80) end, info = function(self, t) return ([[You share your powers with your minions, granting them %d%% of your resistances and saves. + In addition all damage done by your minions to you is reduced by %d%%. The effect will increase with your Spellpower.]]): - format(t.getPerc(self, t)) + format(t.getPerc(self, t), self:getTalentLevelRaw(t) * 20) end, } diff --git a/game/modules/tome/data/talents/spells/spells.lua b/game/modules/tome/data/talents/spells/spells.lua index 8e2a5999c22a27b9bb10c95197e1489d44b43b27..0d43a61f3c4307138589fecf262c8470b340abc1 100644 --- a/game/modules/tome/data/talents/spells/spells.lua +++ b/game/modules/tome/data/talents/spells/spells.lua @@ -159,6 +159,8 @@ function necroSetupSummon(self, m, x, y, level, no_control, no_decay) m.knockback_immune = (m.knockback_immune or 0) + (self:attr("knockback_immune") or 0) * perc / 100 m.stone_immune = (m.stone_immune or 0) + (self:attr("stone_immune") or 0) * perc / 100 m.teleport_immune = (m.teleport_immune or 0) + (self:attr("teleport_immune") or 0) * perc / 100 + + m.necrotic_minion_be_nice = self:getTalentLevelRaw(self.T_DARK_EMPATHY) * 0.2 end if game.party:hasMember(self) then diff --git a/game/modules/tome/dialogs/LevelupDialog.lua b/game/modules/tome/dialogs/LevelupDialog.lua index efb6d5aec91c9ed80b65f3722be9385d3caeddbc..dd0930093dcefa485142f2d06f86a7ee913c8fb6 100644 --- a/game/modules/tome/dialogs/LevelupDialog.lua +++ b/game/modules/tome/dialogs/LevelupDialog.lua @@ -634,16 +634,20 @@ function _M:createDisplay() if self.actor.inscriptions_slots_added < 2 then self.b_inscriptions = Button.new{text="Inscriptions", fct=function() - if self.actor.unused_talents_types > 0 then - Dialog:yesnoPopup("Inscriptions", ("You can learn %d new slot(s). Do you with to buy with for one category point?"):format(2 - self.actor.inscriptions_slots_added), function(ret) if ret then - self.actor.unused_talents_types = self.actor.unused_talents_types - 1 - self.actor.max_inscriptions = self.actor.max_inscriptions + 1 - self.actor.inscriptions_slots_added = self.actor.inscriptions_slots_added + 1 - self.b_types.text = "Category points: "..self.actor.unused_talents_types - self.b_types:generate() - end end) + if self.actor.inscriptions_slots_added >= 2 then + Dialog:simplePopup("Inscriptions", "You have learnt all the inscription slots you could.") else - Dialog:simplePopup("Inscriptions", ("You can still learn %d new slot(s) but you need a category point."):format(2 - self.actor.inscriptions_slots_added)) + if self.actor.unused_talents_types > 0 then + Dialog:yesnoPopup("Inscriptions", ("You can learn %d new slot(s). Do you with to buy with for one category point?"):format(2 - self.actor.inscriptions_slots_added), function(ret) if ret then + self.actor.unused_talents_types = self.actor.unused_talents_types - 1 + self.actor.max_inscriptions = self.actor.max_inscriptions + 1 + self.actor.inscriptions_slots_added = self.actor.inscriptions_slots_added + 1 + self.b_types.text = "Category points: "..self.actor.unused_talents_types + self.b_types:generate() + end end) + else + Dialog:simplePopup("Inscriptions", ("You can still learn %d new slot(s) but you need a category point."):format(2 - self.actor.inscriptions_slots_added)) + end end end, on_select=function() local str = desc_inscriptions