Commit 136a2c6e5860128368bc98ef11920fec3f2b7f74

Authored by DarkGod
1 parent 77bbf0ad

Bathe in Light does not provide nor strengthen shields anymore, instead it gives…

… a fire and light damage buff if the creature already has a shield
@@ -2559,7 +2559,7 @@ newDamageType{ @@ -2559,7 +2559,7 @@ newDamageType{
2559 end, 2559 end,
2560 } 2560 }
2561 2561
2562 --- Used by Bathe in Light, healing+shielding 2562 +-- Used by Bathe in Light, healing
2563 -- Keep an eye on this and Weapon of Light for any infinite stack shield then engage combos 2563 -- Keep an eye on this and Weapon of Light for any infinite stack shield then engage combos
2564 newDamageType{ 2564 newDamageType{
2565 name = "healing light", type = "HEALING_POWER", 2565 name = "healing light", type = "HEALING_POWER",
@@ -2571,29 +2571,11 @@ newDamageType{ @@ -2571,29 +2571,11 @@ newDamageType{
2571 target:setEffect(target.EFF_EMPOWERED_HEALING, 1, {power=(dam/200)}) 2571 target:setEffect(target.EFF_EMPOWERED_HEALING, 1, {power=(dam/200)})
2572 if dam >= 100 then target:attr("allow_on_heal", 1) end 2572 if dam >= 100 then target:attr("allow_on_heal", 1) end
2573 target:heal(dam, src) 2573 target:heal(dam, src)
  2574 + if dam >= 100 then target:attr("allow_on_heal", -1) end
2574 2575
2575 - -- If the target is shielded already then add to the shield power, else add a shield  
2576 - local shield_power = dam * util.bound((target.healing_factor or 1), 0, 2.5)  
2577 - if not target:hasEffect(target.EFF_DAMAGE_SHIELD) then  
2578 - target:setEffect(target.EFF_DAMAGE_SHIELD, 2, {power=shield_power})  
2579 - else  
2580 - -- Shields can't usually merge, so change the parameters manually  
2581 - local shield = target:hasEffect(target.EFF_DAMAGE_SHIELD)  
2582 - shield.power = shield.power + shield_power  
2583 - target.damage_shield_absorb = target.damage_shield_absorb + shield_power  
2584 - target.damage_shield_absorb_max = target.damage_shield_absorb_max + shield_power  
2585 - shield.dur = math.max(2, shield.dur)  
2586 -  
2587 - -- Limit the number of times a shield can be extended  
2588 - if shield.dur_extended then  
2589 - shield.dur_extended = shield.dur_extended + 1  
2590 - if shield.dur_extended >= 20 then  
2591 - game.logPlayer(target, "#DARK_ORCHID#Your damage shield cannot be extended any farther and has exploded.")  
2592 - target:removeEffect(target.EFF_DAMAGE_SHIELD)  
2593 - end  
2594 - else shield.dur_extended = 1 end 2576 + if target:attr("damage_shield") then
  2577 + target:setEffect(target.EFF_BATHE_IN_LIGHT, 3, {power=dam / 4})
2595 end 2578 end
2596 - if dam >= 100 then target:attr("allow_on_heal", -1) end  
2597 end 2579 end
2598 end, 2580 end,
2599 } 2581 }
@@ -82,12 +82,11 @@ newTalent{ @@ -82,12 +82,11 @@ newTalent{
82 local radius = self:getTalentRadius(t) 82 local radius = self:getTalentRadius(t)
83 local heal = t.getHeal(self, t) 83 local heal = t.getHeal(self, t)
84 local duration = t.getDuration(self, t) 84 local duration = t.getDuration(self, t)
85 - return ([[A magical zone of Sunlight appears around you, healing and shielding all within a radius of %d for %0.2f per turn and increasing healing effects on everyone within by %d%%. The effect lasts for %d turns.  
86 - Existing damage shields will be added to instead of overwritten and have their duration set to 2 if it isn't higher.  
87 - If the same shield is refreshed 20 times it will become unstable and explode, removing it. 85 + return ([[A magical zone of Sunlight appears around you, healing all within a radius of %d for %0.2f per turn and increasing healing effects on everyone within by %d%%. The effect lasts for %d turns.
  86 + Creatures that currently have a damage shield up also gain %d%% fire and light damage for 3 turns.
88 It also lights up the affected zone. 87 It also lights up the affected zone.
89 The amount healed will increase with the Magic stat]]): 88 The amount healed will increase with the Magic stat]]):
90 - format(radius, heal, heal / 2, duration) 89 + format(radius, heal, heal / 2, duration, heal / 4)
91 end, 90 end,
92 } 91 }
93 92
@@ -3948,3 +3948,21 @@ newEffect{ @@ -3948,3 +3948,21 @@ newEffect{
3948 game.level.map:updateMap(self.x, self.y) 3948 game.level.map:updateMap(self.x, self.y)
3949 end, 3949 end,
3950 } 3950 }
  3951 +
  3952 +newEffect{
  3953 + name = "BATHE_IN_LIGHT", image = "talents/bathe_in_light.png",
  3954 + desc = "Bathe in Light",
  3955 + long_desc = function(self, eff) return ("Fire and Light damage increased by %d%%."):format(eff.power)
  3956 + end,
  3957 + type = "magical",
  3958 + subtype = { celestial=true, light=true },
  3959 + status = "beneficial",
  3960 + parameters = { power = 10 },
  3961 + on_gain = function(self, err) return "#Target# glows intensely!", true end,
  3962 + on_lose = function(self, err) return "#Target# is no longer glowing .", true end,
  3963 + activate = function(self, eff)
  3964 + self:effectTemporaryValue(eff, "inc_damage", {[DamageType.FIRE]=eff.power, [DamageType.LIGHT]=eff.power})
  3965 + end,
  3966 + deactivate = function(self, eff)
  3967 + end,
  3968 +}