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

show current effects in character sheet

prevent going into the wilds with a detrimental effect


git-svn-id: http://svn.net-core.org/repos/t-engine4@487 51575b47-30f0-44d4-a5cc-537603b46e54
parent c969541c
No related branches found
No related tags found
No related merge requests found
......@@ -481,8 +481,18 @@ function _M:setupCommands()
CHANGE_LEVEL = function()
local e = self.level.map(self.player.x, self.player.y, Map.TERRAIN)
if self.player:enoughEnergy() and e.change_level then
-- Do not unpause, the player is allowed first move on next level
self:changeLevel(e.change_zone and e.change_level or self.level.level + e.change_level, e.change_zone)
local stop = {}
for eff_id, p in pairs(game.player.tmp) do
local e = game.player.tempeffect_def[eff_id]
if e.status == "detrimental" then stop[#stop+1] = e.desc end
end
if not e.change_zone or (#stop > 0 and e.change_zone ~= "wilderness") or #stop == 0 then
-- Do not unpause, the player is allowed first move on next level
self:changeLevel(e.change_zone and e.change_level or self.level.level + e.change_level, e.change_zone)
else
self.log("You can not go into the wilds wit hthe following effects: %s", table.concat(stop, ", "))
end
else
self.log("There is no way out of this level here.")
end
......
......@@ -90,14 +90,14 @@ newEntity{
cost = 15,
wielder = {
inc_damage = {
[DamageType.ARCANE] = resolvers.mbonus(15, 5)
[DamageType.FIRE] = resolvers.mbonus(15, 5)
[DamageType.COLD] = resolvers.mbonus(15, 5)
[DamageType.ACID] = resolvers.mbonus(15, 5)
[DamageType.LIGHTNING] = resolvers.mbonus(15, 5)
[DamageType.NATURE] = resolvers.mbonus(15, 5)
[DamageType.BLIGHT] = resolvers.mbonus(15, 5)
[DamageType.PHYSICAL] = resolvers.mbonus(15, 5)
[DamageType.ARCANE] = resolvers.mbonus(15, 5),
[DamageType.FIRE] = resolvers.mbonus(15, 5),
[DamageType.COLD] = resolvers.mbonus(15, 5),
[DamageType.ACID] = resolvers.mbonus(15, 5),
[DamageType.LIGHTNING] = resolvers.mbonus(15, 5),
[DamageType.NATURE] = resolvers.mbonus(15, 5),
[DamageType.BLIGHT] = resolvers.mbonus(15, 5),
[DamageType.PHYSICAL] = resolvers.mbonus(15, 5),
},
combat_spellpower = 4,
},
......
......@@ -128,5 +128,20 @@ function _M:drawDialog(s)
end
end
h = 0
w = 600
s:drawColorString(self.font, ("#LIGHT_BLUE#Current effects:"):format(game.player.fatigue), w, h, 255, 255, 255) h = h + self.font_h
for tid, act in pairs(game.player.sustain_talents) do
if act then s:drawColorString(self.font, ("#LIGHT_GREEN#%s"):format(game.player:getTalentFromId(tid).name), w, h, 255, 255, 255) h = h + self.font_h end
end
for eff_id, p in pairs(game.player.tmp) do
local e = game.player.tempeffect_def[eff_id]
if e.status == "detrimental" then
s:drawColorString(self.font, ("#LIGHT_RED#%s"):format(e.desc), w, h, 255, 255, 255) h = h + self.font_h
else
s:drawColorString(self.font, ("#LIGHT_GREEN#%s"):format(e.desc), w, h, 255, 255, 255) h = h + self.font_h
end
end
self.changed = false
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