Message for when Spell Shaping succeeds.

All new ideas for the upcoming releases of ToME 4.x.x should be discussed here

Moderator: Moderator

Post Reply
Message
Author
CheapyPipe
Wayist
Posts: 20
Joined: Thu Jun 17, 2010 1:25 am

Message for when Spell Shaping succeeds.

#1 Post by CheapyPipe »

Hey,

A message being printed to the screen saying you avoided your own spell would be useful. Currently, if you cast Corrosive Vapor (as an example) near yourself, you don't know if Spell Shaping saved you or not until you go to the next turn and take damage. It'd be useful to know if you should Phase Door out or not the next turn.

The code fix for this is simple. The function _M:spellFriendlyFire() in file class/interface/Combat.lua should be changed to this:

Code: Select all

--- Do we get hit by our own AOE ?
function _M:spellFriendlyFire()
    print("[SPELL] friendly fire chance", self:getTalentLevelRaw(self.T_SPELL_SHAPING) * 20 + (self:getLck() - 50) * 0.2)
    if not rng.percent(self:getTalentLevelRaw(self.T_SPELL_SHAPING) * 20 + (self:getLck() - 50) * 0.2)
    then
        game.logSeen(self, "You avoid your own spell!")
        return false
    end
    return true
end
Of course, "You avoid your own spell!" could use some refinement, but I feel it's a step in the right direction.

-cheapy

CheapyPipe
Wayist
Posts: 20
Joined: Thu Jun 17, 2010 1:25 am

Re: Message for when Spell Shaping succeeds.

#2 Post by CheapyPipe »

Whoops, in the excitement of wanting to make another change to the code, I didn't notice you get damaged on the turn you cast the spell if you didn't avoid it! So while this change isn't as useful, it could still be of use because the damage message might be lost in the sea of other damage messages. "You avoid your own spell" stands out a bit.

Post Reply