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

Fixed ressource generating charms

git-svn-id: http://svn.net-core.org/repos/t-engine4@5937 51575b47-30f0-44d4-a5cc-537603b46e54
parent 38cc8b63
No related branches found
No related tags found
No related merge requests found
......@@ -97,8 +97,8 @@ function _M:use(who, typ, inven, item)
local ret = self:useObject(who, inven, item)
if ret.used then
if self.charm_on_use then
for fct, d in pairs(self.charm_on_use) do
if rng.percent(d[1]) then fct(self, who) end
for i, d in ipairs(self.charm_on_use) do
if rng.percent(d[1]) then d[3](self, who) end
end
end
......@@ -1218,7 +1218,7 @@ function _M:getUseDesc()
if self.charm_on_use then
ret:add(true, "When used:", true)
for fct, d in pairs(self.charm_on_use) do
for i, d in ipairs(self.charm_on_use) do
ret:add(tostring(d[1]), "% chances to ", d[2](self, game.player), ".", true)
end
end
......
......@@ -30,9 +30,9 @@ newEntity{
cost = 5,
charm_on_use = {
[function(self, who)
{100, function(self, who) return ("regenerate %d psi"):format(self:getCharmPower(true) / 7) end, function(self, who)
who:incPsi(self:getCharmPower(true) / 7)
end] = {100, function(self, who) return ("regenerate %d psi"):format(self:getCharmPower(true) / 7) end},
end},
}
}
......@@ -44,9 +44,9 @@ newEntity{
cost = 5,
charm_on_use = {
[function(self, who)
{100, function(self, who) return ("regenerate %d hate"):format(self:getCharmPower(true) / 7) end, function(self, who)
who:incHate(self:getCharmPower(true) / 7)
end] = {100, function(self, who) return ("regenerate %d hate"):format(self:getCharmPower(true) / 7) end},
end},
}
}
......
......@@ -30,9 +30,9 @@ newEntity{
cost = 5,
charm_on_use = {
[function(self, who)
{100, function(self, who) return ("regenerate %d equilibrium"):format(self:getCharmPower(true) / 5) end, function(self, who)
who:incEquilibrium(-self:getCharmPower(true) / 5)
end] = {100, function(self, who) return ("regenerate %d equilibrium"):format(self:getCharmPower(true) / 5) end},
end},
}
}
......@@ -44,9 +44,9 @@ newEntity{
cost = 5,
charm_on_use = {
[function(self, who)
{100, function(self, who) return ("regenerate %d stamina"):format(self:getCharmPower(true) / 6) end, function(self, who)
who:incStamina(self:getCharmPower(true) / 6)
end] = {100, function(self, who) return ("regenerate %d stamina"):format(self:getCharmPower(true) / 6) end},
end},
}
}
......
......@@ -30,9 +30,9 @@ newEntity{
cost = 5,
charm_on_use = {
[function(self, who)
{100, function(self, who) return ("regenerate %d mana"):format(self:getCharmPower(true) / 5) end, function(self, who)
who:incMana(self:getCharmPower(true) / 5)
end] = {100, function(self, who) return ("regenerate %d mana"):format(self:getCharmPower(true) / 5) end},
end},
}
}
......@@ -44,9 +44,9 @@ newEntity{
cost = 5,
charm_on_use = {
[function(self, who)
{100, function(self, who) return ("regenerate %d vim"):format(self:getCharmPower(true) / 6) end, function(self, who)
who:incVim(self:getCharmPower(true) / 6)
end] = {100, function(self, who) return ("regenerate %d vim"):format(self:getCharmPower(true) / 6) end},
end},
}
}
......@@ -58,9 +58,9 @@ newEntity{
cost = 5,
charm_on_use = {
[function(self, who)
{100, function(self, who) return ("regenerate %d positive energy"):format(self:getCharmPower(true) / 8) end, function(self, who)
who:incPositive(self:getCharmPower(true) / 8)
end] = {100, function(self, who) return ("regenerate %d positive energy"):format(self:getCharmPower(true) / 8) end},
end},
}
}
......@@ -72,9 +72,9 @@ newEntity{
cost = 5,
charm_on_use = {
[function(self, who)
{100, function(self, who) return ("regenerate %d negative energy"):format(self:getCharmPower(true) / 8) end, function(self, who)
who:incNegative(self:getCharmPower(true) / 8)
end] = {100, function(self, who) return ("regenerate %d negative energy"):format(self:getCharmPower(true) / 8) end},
end},
}
}
......
......@@ -225,7 +225,7 @@ newTalent{
end)
local ret = {
vim = self:addTemporaryValue("vim_regen", -3),
vim = self:addTemporaryValue("vim_regen", -5),
target = target,
x = self.x, y = self.y,
}
......
......@@ -58,6 +58,10 @@ newEntity{ define_as = "SUPREME_ARCHMAGE_LINANIIL",
resists = {[DamageType.ARCANE]=100},
combat_spellresist = 250,
combat_mentalresist = 250,
combat_physresist = 250,
resolvers.equip{
{type="weapon", subtype="staff", autoreq=true, forbid_power_source={antimagic=true}, tome_drops="boss"},
{type="armor", subtype="cloth", autoreq=true, forbid_power_source={antimagic=true}, tome_drops="boss"},
......
......@@ -2,3 +2,5 @@
rm out.ogv out.avi
recordmydesktop --windowid $1 --fps 50 --full-shots --no-sound
mencoder out.ogv -ovc xvid -oac mp3lame -xvidencopts pass=1 -o out.avi
#ffmpeg -i input.ogv -c copy output.mkv
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