TheFury: I wrote a new damage type, but I can't seem to figure out how to change the color to ATTR_MULTI. Anyone know how?

 dam.CHAOS = dam.add
{
        color   = function() return iif(rng(7)<6, color.WHITE, iif(rng(4)==1, color.BLUE, color.LIGHT_BLUE)) end,
-- Now I just need to figure out how to set this as ATTR_MULTI
        gfx     = 2,
        desc    = "chaos",
        grid    = function(state)
                local y, x = state.y, state.x
                if cave_is(cave(y, x), FLAG_PERMANENT) then return nil end

                
        end,
        object = function(state)
                if rng.percent(-state.resist) then
                        return {kill=true, note_kill=" evaporate@s@!" }
                end
        end,
        player  = function(state)
                return { fuzzy="You are hit by a wave of anarchy!", obvious=true }
        end,
}

ElvishPillager: Chaos damage in the ToME module uses  color      = function() return rng.range(1, 15) end  ; does this help?

Irrelevantly, I don't think "anarchy" is quite the right word. "Nonsense" would be OK there though ;)

Module Developers Discussion/New Damage Types in ToME 3 (last edited 2006-08-01 09:42:10 by ElvishPillager)