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

Implode has a distortion effect

Archers now get access to both Poisons and Traps trees
Poisons now work on both arrows and shots
parent a87e20a7
No related branches found
No related tags found
No related merge requests found
......@@ -167,7 +167,7 @@ local function archery_projectile(tx, ty, tg, self, tmp)
local target = game.level.map(tx, ty, game.level.map.ACTOR)
if talent.archery_onreach then
talent.archery_onreach(self, talent, tx, ty)
talent.archery_onreach(self, talent, tx, ty, tg, target)
end
if not target then return end
......@@ -221,6 +221,8 @@ local function archery_projectile(tx, ty, tg, self, tmp)
dam = dam * mult
print("[ATTACK ARCHERY] after mult", dam)
local hd = {"Combat:archeryDamage", hitted=hitted, target=target, weapon=weapon, ammo=ammo, damtype=damtype, mult=1, dam=dam}
if self:triggerHook(hd) then
dam = dam * hd.mult
......@@ -360,7 +362,7 @@ local function archery_projectile(tx, ty, tg, self, tmp)
end
-- Poison coating
if hitted and not target.dead and self.vile_poisons and next(self.vile_poisons) and target:canBe("poison") and weapon and weapon.talented == "sling" then
if hitted and not target.dead and self.vile_poisons and next(self.vile_poisons) and target:canBe("poison") and weapon and (weapon.talented == "sling" or weapon.talented == "bow") then
local tid = rng.table(table.keys(self.vile_poisons))
if tid then
local t = self:getTalentFromId(tid)
......
......@@ -159,9 +159,13 @@ newBirthDescriptor{
["technique/combat-techniques-passive"]={true, -0.1},
["technique/combat-training"]={true, 0.3},
["technique/field-control"]={true, 0},
["cunning/trapping"]={false, 0.2},
["cunning/survival"]={true, 0},
["cunning/dirty"]={false, 0},
},
unlockable_talents_types = {
["cunning/poisons"]={false, 0.2, "rogue_poisons"},
},
talents = {
[ActorTalents.T_FLARE] = 1,
[ActorTalents.T_STEADY_SHOT] = 1,
......
......@@ -60,7 +60,7 @@ newTalent{
end
end,
info = function(self, t)
return ([[Learn how to coat your melee weapons or sling ammo with poison. Each level, you will learn a new kind of poison:
return ([[Learn how to coat your melee weapons, sling and bow ammo with poison. Each level, you will learn a new kind of poison:
Level 1: Deadly Poison
Level 2: Numbing Poison
Level 3: Insidious Poison
......@@ -92,20 +92,35 @@ newTalent{
end
return { NATURE = nb}
end },
action = function(self, t)
local tg = {type="hit", range=self:getTalentRange(t)}
local x, y, target = self:getTarget(tg)
if not x or not y or not target then return nil end
if core.fov.distance(self.x, self.y, x, y) > 1 then return nil end
archery_onreach = function(self, t, x, y, tg, target)
if not target then return end
local nb = 0
for eff_id, p in pairs(target.tmp) do
local e = target.tempeffect_def[eff_id]
if e.subtype.poison then nb = nb + 1 end
end
local dam = self:combatTalentWeaponDamage(t, 0.5 + nb * 0.6, 0.9 + nb * 1)
tg.archery.mult = self:combatTalentWeaponDamage(t, 0.5 + nb * 0.6, 0.9 + nb * 1)
end,
action = function(self, t)
if not self:hasArcheryWeapon() then
local tg = {type="hit", range=self:getTalentRange(t)}
local x, y, target = self:getTarget(tg)
if not x or not y or not target then return nil end
if core.fov.distance(self.x, self.y, x, y) > 1 then return nil end
self:attackTarget(target, DamageType.NATURE, dam, true)
local nb = 0
for eff_id, p in pairs(target.tmp) do
local e = target.tempeffect_def[eff_id]
if e.subtype.poison then nb = nb + 1 end
end
local dam = self:combatTalentWeaponDamage(t, 0.5 + nb * 0.6, 0.9 + nb * 1)
self:attackTarget(target, DamageType.NATURE, dam, true)
else
local targets = self:archeryAcquireTargets(nil, {one_shot=true})
if not targets then return end
self:archeryShoot(targets, t, nil, {mult=1})
end
return true
end,
......@@ -119,6 +134,7 @@ newTalent{
- 1 poisons: %d%%
- 2 poisons: %d%%
- 3 poisons: %d%%
If you wield a bow or sling you shoot instead.
]]):
format(dam0, dam1, dam2, dam3)
end,
......
......@@ -21,10 +21,10 @@ return "New Talent Category: #LIGHT_GREEN#Poisons",
[[Extracted from plants, wildlife or more exotic locations, poisons have always existed.
Many creatures use them, along with some shady people.
You have made a deal with such a person and can now create new Rogue characters that can learn the #LIGHT_GREEN#Poisons talents#WHITE#.
You have made a deal with such a person and can now create new Rogue or Archer characters that can learn the #LIGHT_GREEN#Poisons talents#WHITE#.
Talents:
- #YELLOW#Vile Poisons: #WHITE#Learn new dangerous and terrible poisons to coat your weapons with, infecting your foes
- #YELLOW#Vile Poisons: #WHITE#Learn new dangerous and terrible poisons to coat your weapons or ammo with, infecting your foes
- #YELLOW#Venomous Strike: #WHITE#A terrible strike that deals increased nature damage based on the number of poison effects
- #YELLOW#Empower Poisons: #WHITE#Learn to make your poisons even more lethal and fast
- #YELLOW#Toxic Death: #WHITE#Spread the toxic joy to your foe's friends!
......
......@@ -1377,9 +1377,11 @@ newEffect{
on_gain = function(self, err) return "#Target# is being crushed.", "+Imploding" end,
on_lose = function(self, err) return "#Target# shakes off the crushing forces.", "-Imploding" end,
activate = function(self, eff)
if core.shader.allow("distort") then eff.particle = self:addParticles(Particles.new("gravity_well2", 1, {radius=1})) end
eff.tmpid = self:addTemporaryValue("global_speed_add", -0.5)
end,
deactivate = function(self, eff)
if eff.particle then self:removeParticles(eff.particle) end
self:removeTemporaryValue("global_speed_add", eff.tmpid)
end,
on_timeout = function(self, eff)
......
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