Code: Select all
newEntity{ base = "BASE_POTION",
name = "dragon's blood",
color = colors.LIGHT_RED, image="object/potion-0x3.png",
level_range = {30, 50},
rarity = 7,
cost = 20,
use_simple = { name="brings out the dragon in you", use = function(self, who)
self:setEffect(self.EFF_DRAGONS_FIRE, self:getWil()+15, {})
return "destroy", true
end}
}
newEffect{
name = "DRAGONS_FIRE",
desc = "Your throat feels like it is burning.",
type = "magical",
status = "beneficial",
parameters = {},
on_gain = function(self, err) return "#Target#'s throat seems to be burning.", "+Dragon's fire" end,
on_lose = function(self, err) return "#Target#'s throat seems to cool down.", "-Dragon's fire" end,
activate = function(self, eff)
self.talents.T_FIRE_BREATH = (self.talents.T_FIRE_BREATH or 0) + 2
end,
deactivate = function(self, eff)
self.talents.T_FIRE_BREATH = self.talents.T_FIRE_BREATH - 2
if self.talents.T_FIRE_BREATH == 0 then self.talents.T_FIRE_BREATH = nil end
end,
}