Commit 37803ad37ccfb989784919e6915a9324a3e57898

Authored by Otowa Kotori
2 parents 996c3743 48c18b71

Merge remote-tracking branch 'upstream/master' into misc174

... ... @@ -1568,7 +1568,7 @@ function _M:aiTalentTactics(t, aitarget, target_list, tactic, tg, wt_mod)
1568 1568 else
1569 1569 val_type, val_wt = next(val, val_type) if not val_wt then break end
1570 1570 end
1571   - if act == self and self:attr("encased_in_ice") and tact == "attack" or tact == "attackarea" then
  1571 + if act == self and self:attr("encased_in_ice") and (tact == "attack" or tact == "attackarea") then
1572 1572 weight = s_mult * math.abs(benefit) -- Frozen status ignores selffire and allows self-fire
1573 1573 elseif act == self then -- hit self
1574 1574 weight = selffire*friendlyfire*s_mult*benefit -- matches actor:project
... ...
... ... @@ -43,7 +43,8 @@ newTalentType{ no_silence=true, is_spell=true, type="celestial/other", name = _t
43 43 newTalentType{ allow_random=false, no_silence=true, is_spell=true, type="celestial/dirges", name = _t("Dirges", "talent type"), description = _t"The songs the Fallen sing." }
44 44 newTalentType{ allow_random=false, no_silence=true, is_spell=true, type="celestial/darkside", name = _t("Darkside", "talent type"), description = _t"Signature magics of the Fallen. The sun shines for the guilty and the innocent alike." }
45 45 newTalentType{ allow_random=false, no_silence=true, is_spell=true, type="celestial/dark-sun", name = _t("Dark Sun", "talent type"), description = _t"Celestial combat techniques inspired by the dark places that are not empty." }
46   -newTalentType{ allow_random=false, no_silence=true, is_spell=true, generic=true, type="celestial/dirge", name = _t("Dirges", "talent type"), description = _t"Sing of death and damnation." }
  46 +
  47 +newTalentType{ allow_random=false, no_silence=true, is_spell=true, generic=true, type="celestial/dirge", name = _t("Dirges", "talent type"), description = _t"Sing of death and damnation.", on_mastery_change = function(self, m, tt) self.talents_types_mastery["celestial/dirges"] = self.talents_types_mastery[tt] end }
47 48
48 49 -- Generic requires for celestial spells based on talent level
49 50 divi_req1 = {
... ...
... ... @@ -162,9 +162,9 @@ newTalent{
162 162 getShield = function(self, t) return self:combatTalentScale(t, 50, 200, 0.75) end,
163 163 getShieldCD = function(self, t) return 5 end,
164 164 callbackOnTemporaryEffectAdd = function(self, t, eff_id, e_def, eff)
165   - if not self:hasProc("dirge_shield") then
  165 + if not self:hasEffect(self.EFF_NO_PESTILENCE) then
166 166 if e_def.status == "detrimental" and e_def.type ~= "other" and eff.src ~= self then
167   - self:setProc("dirge_shield", true, t.getShieldCD(self, t))
  167 + self:setEffect(self.EFF_NO_PESTILENCE, t.getShieldCD(self, t), {src=self})
168 168 if self:hasEffect(self.EFF_DAMAGE_SHIELD) then
169 169 local shield = self:hasEffect(self.EFF_DAMAGE_SHIELD)
170 170 local shield_power = self:spellCrit(t.getShield(self, t))
... ... @@ -289,7 +289,7 @@ newTalent{
289 289 require = divi_req3,
290 290 points = 5,
291 291 mode = "passive",
292   - getDuration = function(self, t) return self:getTalentLevel(t) end,
  292 + getDuration = function(self, t) return math.floor(self:getTalentLevel(t)) end,
293 293 getImmune = function(self, t) return self:combatTalentLimit(t, 1, 0.15, 0.50) end,
294 294 info = function(self, t)
295 295 return ([[Your dirges echo mournfully through the air. When you end a dirge, you continue to gain its acolyte-level effects for %d turns. You can only benefit from one such lingering dirge at a time.
... ...
... ... @@ -158,7 +158,7 @@ newTalent{
158 158 require = cursed_wil_req4,
159 159 points = 5,
160 160 mode = "passive",
161   - getTime = function(self, t) return self:combatTalentScale(t, 3, 5) end,
  161 + getTime = function(self, t) return math.ceil(self:combatTalentScale(t, 3, 5)) end,
162 162 getThreshold = function(self, t) return self:combatTalentLimit(t, 10, 30, 15) end,
163 163 getSpillThreshold = function(self, t) return 40 end,
164 164 callbackOnTakeDamage = function(self, t, src, x, y, type, dam, state)
... ...
... ... @@ -348,10 +348,10 @@ uberTalent{
348 348 ["technique/2hweapon-assault"] = true,
349 349 ["technique/shield-offense"] = true,
350 350 }
351   - if self.__increased_talent_types["technique/2hweapon-assault"] then
  351 + if self.__increased_talent_types["technique/2hweapon-assault"] and self.__increased_talent_types["technique/2hweapon-assault"] > 0 then
352 352 self.unused_talents_types = self.unused_talents_types + 1
353 353 end
354   - if self.__increased_talent_types["technique/shield-offense"] then
  354 + if self.__increased_talent_types["technique/shield-offense"] and self.__increased_talent_types["technique/shield-offense"] > 0 then
355 355 self.unused_talents_types = self.unused_talents_types + 1
356 356 end
357 357 t.unlearnTalents(self, t, removes)
... ...
... ... @@ -672,6 +672,7 @@ newEffect{
672 672 if eff.true_seeing then
673 673 eff.inv = self:addTemporaryValue("invisible", -(self:attr("invisible") or 0))
674 674 eff.stealth = self:addTemporaryValue("stealth", -((self:attr("stealth") or 0) + (self:attr("inc_stealth") or 0)))
  675 + self:resetCanSeeCacheOf() -- updates visual for player instantly
675 676 end
676 677 end,
677 678 deactivate = function(self, eff)
... ... @@ -5509,9 +5510,9 @@ newEffect{
5509 5510 status = "beneficial",
5510 5511 parameters = { shield=50, cd=5 },
5511 5512 callbackOnTemporaryEffectAdd = function(self, eff, eff_id, e_def, eff_incoming)
5512   - if not self:hasProc("dirge_shield") then
  5513 + if not self:hasEffect(self.EFF_NO_PESTILENCE) then
5513 5514 if e_def.status == "detrimental" and e_def.type ~= "other" and eff_incoming.src ~= self then
5514   - self:setProc("dirge_shield", true, eff.cd)
  5515 + self:setEffect(self.EFF_NO_PESTILENCE, eff.cd, {src=self})
5515 5516 if self:hasEffect(self.EFF_DAMAGE_SHIELD) then
5516 5517 local shield = self:hasEffect(self.EFF_DAMAGE_SHIELD)
5517 5518 local shield_power = self:spellCrit(eff.shield)
... ...
... ... @@ -4147,6 +4147,15 @@ newEffect{
4147 4147 deactivate = function(self, eff) end,
4148 4148 }
4149 4149
  4150 +newEffect{
  4151 + name = "NO_PESTILENCE", image = "talents/dirge_of_pestilence.png",
  4152 + desc = _t"Pestilence Saturation",
  4153 + long_desc = function(self, eff) return _t"The target recently benefited from Dirge of Pestilence" end,
  4154 + type = "other",
  4155 + subtype = { dirge=true },
  4156 + status = "neutral",
  4157 + parameters = { },
  4158 +}
4150 4159
4151 4160 newEffect{
4152 4161 name = "SELF_JUDGEMENT", image = "talents/self_judgement.png",
... ...