ToME: the Tales of Maj'Eyal
http://forums.te4.org/

talent with projection
http://forums.te4.org/viewtopic.php?f=40&t=48447
Page 1 of 1

Author:  Jurriaan [ Tue Dec 05, 2017 6:01 pm ]
Post subject:  talent with projection

Given a description of a talent like this:

Born in the mountains, you are very familiar with boulders. Throw a large boulder at your enemy,
doing 200-600 physical damage. The Boulder interferes with their movement, slowing them down by 20-60%
for 3-7 turns. Each size category above +2 makes you able to throw larger boulders, gaining 25% damage
per size category. Range 3+level.
At talent level 7, you learn to give the boulder a lot of spin, making it have a 75% chance of bouncing towards enemy after killing the first, gaining power as it does so (25% for each kill). The number of enemies you can reach depends on your size - 1 for each level above +1.

in what function or addon source would I best look to implement the projection part?

I now have this (untested, uncompiled) mess:

Code:
newTalent{
        short_name = "bouncingboulder",
        name = "Bouncing Boulder",
        type = {"race/troll", 4},
        require = racial_req4,
        points = 5,
        cooldown = function(self,t) return math.floor(100/self.size_category) end,
        direct_hit = true,
        requires_target = true,
        getDam = function(self, t) return self:combatScale(self:getStr() * self:getTalentLevel(t) * 2, 12, 0, 262, 500) end,
        getDist = function(self, t) return math.floor(self:combatTalentScale(t, 4, 8)) end,
        action = function(self, t)
                local tg = self:getTalentTarget(t)
                local x, y = self:getTarget(tg)
                if not x or not y then return nil end
                local target = game.level.map(x, y, engine.Map.ACTOR) or self.ai_target.actor or {name="something"}
                self:logCombat(target, "#Source# hurls a huge boulder at #target#!")
                self:project(tg, x, y, DamageType.PHYSICAL, {dist=t.getDist(self, t), dam=self:mindCrit(t.getDam(self, t))}, {type="archery"})
                game:playSoundNear(self, "talents/ice")
                return true
        end,
        info = function(self, t)
                return ([[Throw a huge boulder, dealing %0.2f physical damage at a target in range %d and slowing them down for %d%% for %d turns.
                The damage will increase with your Strength.]]):format(damDesc(self, DamageType.PHYSICAL, t.getDam(self, t)), self:getTalentRadius(t))
        end,
}


but I have a hard time finding a talent with projection that seems to resemble what I want.

Thanks!

Author:  PseudoLoneWolf [ Tue Dec 05, 2017 6:12 pm ]
Post subject:  Re: talent with projection

Your description of the skill sounds like something that you could finagle out of Slime Spit with some work. For one thing, Slime Spit always bounces if there's an enemy in range, so you'll have to play around with that behavior (only bouncing when it kills), and the number of bounces is dependent on size rather than TL but that shouldn't be hard to check.

Author:  Jurriaan [ Wed Dec 06, 2017 5:40 am ]
Post subject:  Re: talent with projection

I noticed trick shot getting even closer, now that I saw what to search for. Thanks!

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/