Skip to content
Snippets Groups Projects
Commit 735d206f authored by dg's avatar dg
Browse files

Potion of dragon blood

git-svn-id: http://svn.net-core.org/repos/t-engine4@1578 51575b47-30f0-44d4-a5cc-537603b46e54
parent 522e8009
No related branches found
No related tags found
No related merge requests found
...@@ -298,3 +298,16 @@ newEntity{ base = "BASE_POTION", ...@@ -298,3 +298,16 @@ newEntity{ base = "BASE_POTION",
return "destroy", true return "destroy", true
end} end}
} }
newEntity{ base = "BASE_POTION",
name = "dragon's blood",
color = colors.LIGHT_RED, image="object/potion-0x3.png",
level_range = {30, 50},
rarity = 9,
cost = 20,
use_simple = { name="brings out the dragon in you", use = function(self, who)
who:setEffect(who.EFF_DRAGONS_FIRE, who:getWil(10) + 15, {})
return "destroy", true
end}
}
...@@ -1808,3 +1808,42 @@ newEffect{ ...@@ -1808,3 +1808,42 @@ newEffect{
self:removeTemporaryValue("energy", eff.moveid) self:removeTemporaryValue("energy", eff.moveid)
end, end,
} }
newEffect{
name = "DRAGONS_FIRE",
desc = "Dragon's Fire",
long_desc = function(self, eff) return ("Dragon blood runs through your veins. You can breathe fire (or have it improved if you already could)."):format() end,
type = "magical",
status = "beneficial",
parameters = {power=1},
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)
local t_id = self.T_FIRE_BREATH
if not self.talents[t_id] then
-- Auto assign to hotkey
if self.hotkey then
for i = 1, 36 do
if not self.hotkey[i] then
self.hotkey[i] = {"talent", t_id}
break
end
end
end
end
eff.tmpid = self:addTemporaryValue("talents", {[t_id] = eff.power})
end,
deactivate = function(self, eff)
local t_id = self.T_FIRE_BREATH
self:removeTemporaryValue("talents", eff.tmpid)
if self.talents[t_id] == 0 then
self.talents[t_id] = nil
if self.hotkey then
for i, known_t_id in pairs(self.hotkey) do
if known_t_id[1] == "talent" and known_t_id[2] == t_id then self.hotkey[i] = nil end
end
end
end
end,
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment