Page 1 of 1

Message for when Spell Shaping succeeds.

Posted: Tue Jun 22, 2010 6:52 pm
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

Re: Message for when Spell Shaping succeeds.

Posted: Tue Jun 22, 2010 7:08 pm
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.