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

Fixes giving the staffof absorption to the apprentice mage

Ressource cost in talent display now correctly accounts for fatigue


git-svn-id: http://svn.net-core.org/repos/t-engine4@1002 51575b47-30f0-44d4-a5cc-537603b46e54
parent a815747e
No related branches found
No related tags found
No related merge requests found
......@@ -1016,12 +1016,12 @@ function _M:getTalentFullDescription(t, addlevel)
else d[#d+1] = "#6fff83#Use mode: #00FF00#Activated"
end
if t.mana or t.sustain_mana then d[#d+1] = "#6fff83#Mana cost: #7fffd4#"..(t.mana or t.sustain_mana) end
if t.stamina or t.sustain_stamina then d[#d+1] = "#6fff83#Stamina cost: #ffcc80#"..(t.stamina or t.sustain_stamina) end
if t.mana or t.sustain_mana then d[#d+1] = "#6fff83#Mana cost: #7fffd4#"..(t.sustain_mana or t.mana * (100 + self.fatigue) / 100) end
if t.stamina or t.sustain_stamina then d[#d+1] = "#6fff83#Stamina cost: #ffcc80#"..(t.sustain_stamina or t.stamina * (100 + self.fatigue) / 100) end
if t.equilibrium or t.sustain_equilibrium then d[#d+1] = "#6fff83#Equilibrium cost: #00ff74#"..(t.equilibrium or t.sustain_equilibrium) end
if t.vim or t.sustain_vim then d[#d+1] = "#6fff83#Vim cost: #888888#"..(t.vim or t.sustain_vim) end
if t.positive or t.sustain_positive then d[#d+1] = "#6fff83#Positive energy cost: #GOLD#"..(t.positive or t.sustain_positive) end
if t.negative or t.sustain_negative then d[#d+1] = "#6fff83#Negative energy cost: #GREY#"..(t.negative or t.sustain_negative) end
if t.vim or t.sustain_vim then d[#d+1] = "#6fff83#Vim cost: #888888#"..(t.sustain_vim or t.vim * (100 + self.fatigue) / 100) end
if t.positive or t.sustain_positive then d[#d+1] = "#6fff83#Positive energy cost: #GOLD#"..(t.sustain_positive or t.positive * (100 + self.fatigue) / 100) end
if t.negative or t.sustain_negative then d[#d+1] = "#6fff83#Negative energy cost: #GREY#"..(t.sustain_negative or t.negative * (100 + self.fatigue) / 100) end
if self:getTalentRange(t) > 1 then d[#d+1] = "#6fff83#Range: #FFFFFF#"..self:getTalentRange(t)
else d[#d+1] = "#6fff83#Range: #FFFFFF#melee/personal"
end
......
......@@ -45,6 +45,14 @@ collect_staff = function(self, who, dialog)
who:showEquipInven("Offer which item?",
function(o) return (o.type == "weapon" and o.subtype == "staff" and (not o.define_as or o.define_as ~= "STAFF_ANGMAR")) or (o.type == "jewelry" and o.subtype == "ring") or (o.type == "jewelry" and o.subtype == "amulet") end,
function(o, inven, item)
-- Special handling for the staff of absorption
if o.define_as ans o.define_as == "STAFF_ABSORPTION" then
game.logPlayer(who, "#LIGHT_RED#As the apprentice touches the staff he begins to consume, flames bursting out of his mouth, life seems to be drained away from him and in an instant he collapses in a lifeless husk.")
who:setQuestStatus(self, self.FAILED)
game:unregisterDialog(dialog)
return true
end
self.nb_collect = self.nb_collect + 1
if self.nb_collect >= 15 then who:setQuestStatus(self, self.COMPLETED) end
who:removeObject(who:getInven(inven), item)
......
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