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

Activable items do not say they use 0 turns even fi the talent they use does....

Activable items do not say they use 0 turns even fi the talent they use does. Activated items always use a turn


git-svn-id: http://svn.net-core.org/repos/t-engine4@4474 51575b47-30f0-44d4-a5cc-537603b46e54
parent 9d70eae2
No related branches found
No related tags found
No related merge requests found
......@@ -2621,8 +2621,8 @@ function _M:getTalentFullDescription(t, addlevel, config)
else d:add({"color",0x6f,0xff,0x83}, "Use mode: ", {"color",0x00,0xFF,0x00}, "Activated", true)
end
if not config.custom then
d:merge(custom)
if config.custom then
d:merge(config.custom)
d:add(true)
end
if not config.ignore_ressources then
......@@ -2646,9 +2646,11 @@ function _M:getTalentFullDescription(t, addlevel, config)
if speed then d:add({"color",0x6f,0xff,0x83}, "Travel Speed: ", {"color",0xFF,0xFF,0xFF}, ""..(speed * 100).."% of base", true)
else d:add({"color",0x6f,0xff,0x83}, "Travel Speed: ", {"color",0xFF,0xFF,0xFF}, "instantaneous", true)
end
local uspeed = "1 turn"
if t.no_energy and type(t.no_energy) == "boolean" and t.no_energy == true then uspeed = "instant" end
d:add({"color",0x6f,0xff,0x83}, "Usage Speed: ", {"color",0xFF,0xFF,0xFF}, uspeed, true)
if not config.ignore_use_time then
local uspeed = "1 turn"
if t.no_energy and type(t.no_energy) == "boolean" and t.no_energy == true then uspeed = "instant" end
d:add({"color",0x6f,0xff,0x83}, "Usage Speed: ", {"color",0xFF,0xFF,0xFF}, uspeed, true)
end
d:add({"color",0x6f,0xff,0x83}, "Description: ", {"color",0xFF,0xFF,0xFF})
d:merge(t.info(self, t):toTString():tokenize(" ()[]"))
......
......@@ -899,7 +899,7 @@ function _M:getUseDesc()
return tstring{{"color","YELLOW"}, ("It can be used to %s."):format(self.use_simple.name), {"color","LAST"}}
elseif self.use_talent then
local t = game.player:getTalentFromId(self.use_talent.id)
local desc = game.player:getTalentFullDescription(t, nil, {force_level=self.use_talent.level, ignore_cd=true, ignore_ressources=true, custom=self.use_talent.power and tstring{{"color",0x6f,0xff,0x83}, "Power cost: ", {"color",0x7f,0xff,0xd4},("%d out of %d/%d."):format(self.use_talent.power, self.power, self.max_power)}})
local desc = game.player:getTalentFullDescription(t, nil, {force_level=self.use_talent.level, ignore_cd=true, ignore_ressources=true, ignore_use_time=true, custom=self.use_talent.power and tstring{{"color",0x6f,0xff,0x83}, "Power cost: ", {"color",0x7f,0xff,0xd4},("%d out of %d/%d."):format(self.use_talent.power, self.power, self.max_power)}})
local ret = tstring{{"color","YELLOW"}, "It can be used to activate talent ", t.name," (costing ", tostring(math.floor(self.use_talent.power)), " power out of ", tostring(math.floor(self.power)), "/", tostring(math.floor(self.max_power)), ") :", {"color","LAST"}, true}
ret:merge(desc)
return ret
......
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