Skip to content
Snippets Groups Projects
Commit b5dbdfaf authored by DarkGod's avatar DarkGod
Browse files

Through the Crowd now also makes you like being in the crowd, +10 all saves...

Through the Crowd now also makes you like being in the crowd, +10 all saves for each friendlies in sight
parent fbf80d07
No related branches found
No related tags found
No related merge requests found
......@@ -29,6 +29,18 @@ uberTalent{
on_unlearn = function(self, t)
self:attr("bump_swap_speed_divide", -10)
end,
callbackOnAct = function(self, t)
local nb_friends = 0
local act
for i = 1, #self.fov.actors_dist do
act = self.fov.actors_dist[i]
if act and self:reactionToward(act) > 0 and self:canSee(act) then nb_friends = nb_friends + 1 end
end
if nb_friends > 1 then
nb_friends = math.min(nb_friends, 5)
self:setEffect(self.EFF_THROUGH_THE_CROWD, 4, {power=nb_friends * 10})
end
end,
activate = function(self, t)
local ret = {}
self:talentTemporaryValue(ret, "nullify_all_friendlyfire", 1)
......@@ -38,8 +50,10 @@ uberTalent{
return true
end,
info = function(self, t)
return ([[You are used to a crowded party; you can swap place with friendly creatures in only one tenth of a turn (this does not require the prodigy to be active, it is a passive effect).
You have also learnt to fight cleanly in a crowded area, you can never damage your friends of neutral creatures when this talent is active.]])
return ([[You are used to a crowded party:
- you can swap place with friendly creatures in only one tenth of a turn (this does not require the prodigy to be active, it is a passive effect).
- you can never damage your friends of neutral creatures when this talent is active.
- you love being surrounded by friends, for each friendly creature in sight you gain +10 to all saves]])
:format()
end,
}
......
......@@ -2282,3 +2282,23 @@ newEffect{
self:setTarget(eff.src)
end,
}
newEffect{
name = "THROUGH_THE_CROWD", image = "talents/through_the_crowd.png",
desc = "Through The Crowd",
long_desc = function(self, eff) return ("Increases physical save, spell save, and mental save by %d."):format(eff.power) end,
type = "other",
subtype = { miscellaneous=true },
status = "beneficial",
parameters = { power=10 },
activate = function(self, eff)
eff.presid = self:addTemporaryValue("combat_physresist", eff.power)
eff.sresid = self:addTemporaryValue("combat_spellresist", eff.power)
eff.mresid = self:addTemporaryValue("combat_mentalresist", eff.power)
end,
deactivate = function(self, eff)
self:removeTemporaryValue("combat_physresist", eff.presid)
self:removeTemporaryValue("combat_spellresist", eff.sresid)
self:removeTemporaryValue("combat_mentalresist", eff.mresid)
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