Skip to content
Snippets Groups Projects
Commit 5c94e38f authored by dg's avatar dg
Browse files

Added potions of free action, they are not cheap but they are useful :)

git-svn-id: http://svn.net-core.org/repos/t-engine4@1126 51575b47-30f0-44d4-a5cc-537603b46e54
parent e5acc460
No related branches found
No related tags found
No related merge requests found
......@@ -284,3 +284,16 @@ newEntity{ base = "BASE_POTION",
return "destroy", true
end}
}
newEntity{ base = "BASE_POTION",
name = "potion of free action",
color = colors.YELLOW,
level_range = {15, 50},
rarity = 6,
cost = 7,
use_simple = { name="resist stuns, dazes and pinning", use = function(self, who)
who:setEffect(who.EFF_FREE_ACTION, 4 + math.floor(who:getMag(3)), {power=1})
return "destroy", true
end}
}
......@@ -1041,3 +1041,23 @@ newEffect{
self:removeTemporaryValue("continuum_destabilization", eff.effid)
end,
}
newEffect{
name = "FREE_ACTION",
desc = "Free Action",
type = "magical",
status = "beneficial",
parameters = { power=1 },
on_gain = function(self, err) return "#Target# is moving freely .", "+Free Action" end,
on_lose = function(self, err) return "#Target# is moving less freely.", "-Free Action" end,
activate = function(self, eff)
eff.stun = self:addTemporaryValue("stun_immune", eff.power)
eff.daze = self:addTemporaryValue("daze_immune", eff.power)
eff.pin = self:addTemporaryValue("pin_immune", eff.power)
end,
deactivate = function(self, eff)
self:removeTemporaryValue("stun_immune", eff.stun)
self:removeTemporaryValue("daze_immune", eff.daze)
self:removeTemporaryValue("pin_immune", eff.pin)
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