ToME: the Tales of Maj'Eyal

Everything about ToME
It is currently Mon Mar 19, 2018 10:22 pm

All times are UTC

Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: talent with projection
PostPosted: Tue Dec 05, 2017 6:01 pm 

Joined: Mon Mar 25, 2013 9:39 am
Posts: 159
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:

        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 =, y, engine.Map.ACTOR) or 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
        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))

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


PostPosted: Tue Dec 05, 2017 6:12 pm 

Joined: Tue Jan 03, 2017 7:12 pm
Posts: 138
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.

Let slip the toast of war.

PostPosted: Wed Dec 06, 2017 5:40 am 

Joined: Mon Mar 25, 2013 9:39 am
Posts: 159
I noticed trick shot getting even closer, now that I saw what to search for. Thanks!

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group