This shield can block a lot of different elemental types and sometimes casts a breath on a blocked attacker.
Left some commented code in to adjust if it should proc only once. Its probably a bit mean against rogues with dual elemental daggers as it is.

Code: Select all
newEntity{ base = "BASE_SHIELD",
power_source = {nature=true},
unique = true,
name = "Rainbow Drop", image = "object/artifact/shield_rainbow.png",
unided_name = "multihued shield",
desc = [[A round shield made from the scales of a multihued dragon. It shimmers in all colors of the rainbow.]],
color = colors.WHITE,
level_range = {10, 25},
rarity = 270,
require = { stat = { str=16 }, },
cost = 400,
material_level = 2,
metallic = false,
special_combat = {
dam = resolvers.rngavg(10, 20),
block = resolvers.rngavg(35, 45),
physcrit = 3,
dammod = {str=1},
},
wielder = {
combat_armor = 2,
combat_def = 6,
combat_def_ranged = 6,
fatigue = 8,
learn_talent = { [Talents.T_BLOCK] = 2, },
resists = { [DamageType.PHYSICAL] = 20, [DamageType.FIRE] = 20, [DamageType.COLD] = 20, [DamageType.ACID] = 20, [DamageType.LIGHTNING] = 20, },
},
on_block = function(self, who, src, type, dam, eff)
local Talents = require "engine.interface.ActorTalents"
--game.player:forceUseTalent(game.player.T_SAND_BREATH, {ignore_cd=true, ignore_energy=true, force_target=src, force_level=1, ignore_ressources=true})
if type == DamageType.PHYSICAL and rng.percent(100) then
--if not src.dead and not who.turn_procs.melee_talent then
--who.turn_procs.melee_talent = true
who:forceUseTalent( who.T_SAND_BREATH, {ignore_cd=true, ignore_energy=true, force_target=src, force_level=1, ignore_ressources=true})
--end
end
if type == DamageType.FIRE and rng.percent(20) then
--if not src.dead and not self.turn_procs.melee_talent then
--self.turn_procs.melee_talent = true
who:forceUseTalent(who.T_FIRE_BREATH, {ignore_cd=true, ignore_energy=true, force_target=src, force_level=1, ignore_ressources=true})
--end
end
if type == DamageType.COLD and rng.percent(20) then
--if not src.dead and not self.turn_procs.melee_talent then
--self.turn_procs.melee_talent = true
who:forceUseTalent(who.T_ICE_BREATH, {ignore_cd=true, ignore_energy=true, force_target=src, force_level=1, ignore_ressources=true})
--end
end
if type == DamageType.ACID and rng.percent(20) then
--if not src.dead and not self.turn_procs.melee_talent then
--self.turn_procs.melee_talent = true
who:forceUseTalent(who.T_ACID_BREATH, {ignore_cd=true, ignore_energy=true, force_target=src, force_level=1, ignore_ressources=true})
--end
end
if type == DamageType.LIGHTNING and rng.percent(20) then
--if not src.dead and not self.turn_procs.melee_talent then
--self.turn_procs.melee_talent = true
who:forceUseTalent(who.T_LIGHTNING_BREATH, {ignore_cd=true, ignore_energy=true, force_target=src, force_level=1, ignore_ressources=true})
--end
end
end,
}