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

better

git-svn-id: http://svn.net-core.org/repos/t-engine4@5063 51575b47-30f0-44d4-a5cc-537603b46e54
parent be0ffe1b
No related branches found
No related tags found
No related merge requests found
......@@ -299,6 +299,10 @@ function _M:makeMapObject(tiles, idx)
return self._mo, self.z
end
function _M:loaded()
self:defineDisplayCallback()
end
--- Get all "map objects" representing this entity
-- Do not touch unless you *KNOW* what you are doing.<br/>
-- You do *NOT* need this, this is used by the engine.Map class automatically.<br/>
......
......@@ -45,6 +45,10 @@ function _M:save()
end
function _M:loaded()
-- DPT: I think the line below should be there
-- but somehow this causes projectiles to be duplicated on a chrono load
-- self:defineDisplayCallback()
if self.project and self.project.def and self.project.def.typ and self.project.def.typ.line_function and type(self.project.def.typ.line_function.line) == "table" then
self.project.def.typ.line_function.line = util.isHex() and core.fov.hex_line_import(unpack(self.project.def.typ.line_function.line)) or
core.fov.line_import(unpack(self.project.def.typ.line_function.line))
......
......@@ -109,8 +109,8 @@ newEntity{
rarity = 6,
charm_power_def = {add=5, max=50, floor=true},
resolvers.charm("hardens the skin for 6 turns increasing armour by %d", 20, function(self, who)
who:setEffect(who.EFF_STONE_SKIN, 6, {power=self:getCharmPower()})
resolvers.charm(function(self) return ("hardens the skin for 6 turns increasing armour by %d and armour hardiness by %d%%%%"):format(self:getCharmPower(), 20 + self.material_level * 10) end, 20, function(self, who)
who:setEffect(who.EFF_THORNY_SKIN, 6, {ac=self:getCharmPower(), hard=20 + self.material_level * 10})
game:playSoundNear(who, "talents/heal")
game.logSeen(who, "%s uses %s!", who.name:capitalize(), self:getName{no_count=true})
return {id=true, used=true}
......
......@@ -519,6 +519,24 @@ newEffect{
end,
}
newEffect{
name = "THORNY_SKIN", image = "talents/stoneskin.png",
desc = "Thorny Skin",
long_desc = function(self, eff) return ("The target's skin reacts to damage, granting %d armour and %d%% armour hardiness."):format(eff.ac, eff.hard) end,
type = "physical",
subtype = { nature=true },
status = "beneficial",
parameters = { ac=10, hard=10 },
activate = function(self, eff)
eff.aid = self:addTemporaryValue("combat_armor", eff.ac)
eff.hid = self:addTemporaryValue("combat_armor_hardiness", eff.hard)
end,
deactivate = function(self, eff)
self:removeTemporaryValue("combat_armor", eff.aid)
self:removeTemporaryValue("combat_armor_hardiness", eff.hid)
end,
}
newEffect{
name = "FROZEN_FEET", image = "talents/frozen_ground.png",
desc = "Frozen Feet",
......@@ -1605,11 +1623,11 @@ newEffect{
-- add the remaining healing reduction spread out over the new duration
old_eff.healFactorChange = math.max(-0.75, (old_eff.healFactorChange / old_eff.totalDuration) * old_eff.dur + new_eff.healFactorChange)
old_eff.dur = math.max(old_eff.dur, new_eff.dur)
self:removeTemporaryValue("healing_factor", old_eff.healFactorId)
old_eff.healFactorId = self:addTemporaryValue("healing_factor", old_eff.healFactorChange)
game.logSeen(self, "%s has re-opened a cursed wound!", self.name:capitalize())
return old_eff
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