# Magical Staff Percentage

{

function calc_staff_info(school_level, evo_level, multiplier)

    -- multiplier 파라미터 추가, 기본값은 1.575

    multiplier = multiplier or 1.575

    local max_damage = multiplier * (school_level + evo_level/2)

    local activation = (evo_level + school_level/2) * 6.66

    if activation > 100 then activation = 100 end

    return max_damage, activation

end


function staff_info_display()

    local evo = you.skill("Evocations")

    local output = ""

    

    -- Fire staff

    local fire = you.skill("Fire Magic")

    local fire_dmg, fire_chance = calc_staff_info(fire, evo)

    output = output .. string.format("[<lightred>Fire</lightred>] D: 0-%.1f, P: %.1f%% \n", fire_dmg, fire_chance)

    

    -- Cold staff  

    local ice = you.skill("Ice Magic")

    local cold_dmg, cold_chance = calc_staff_info(ice, evo)

    output = output .. string.format("[<lightblue>Cold</lightblue>] D: 0-%.1f, P: %.1f%% \n", cold_dmg, cold_chance)

    

    -- Earth staff (1.5x 공식)

    local earth = you.skill("Earth Magic")

    local earth_dmg, earth_chance = calc_staff_info(earth, evo, 1.5)

    output = output .. string.format("[<brown>Earth</brown>] D: 0-%.1f, P: %.1f%% (33%% to flying)\n", earth_dmg, earth_chance)

    

    -- Air staff (1.25x 공식)

    local air = you.skill("Air Magic")

    local air_dmg, air_chance = calc_staff_info(air, evo, 1.25)

    output = output .. string.format("[<lightcyan>Air</lightcyan>] D: 0-%.1f, P: %.1f%% (Half AC)\n", air_dmg, air_chance)

    

    -- Alchemy staff

    local alchemy = you.skill("Alchemy")

    local poison_dmg, poison_chance = calc_staff_info(alchemy, evo)

    output = output .. string.format("[<lightgreen>Alchemy</lightgreen>] D: 0-%.1f, P: %.1f%% \n", poison_dmg, poison_chance)

    

    -- Death staff

    local necro = you.skill("Necromancy")

    local death_dmg, death_chance = calc_staff_info(necro, evo)

    output = output .. string.format("[<magenta>Death</magenta>] D: 0-%.1f, P: %.1f%% \n", death_dmg, death_chance)

    

    -- Conjuration staff (1.25x 공식)

    local conj = you.skill("Conjurations")

    local conj_dmg, conj_chance = calc_staff_info(conj, evo, 1.25)

    output = output .. string.format("[<white>Conj</white>] D: 0-%.1f, P: %.1f%% (Irresistible)", conj_dmg, conj_chance)

    

    crawl.formatted_mpr(output)

end


crawl.setopt("macros += M \\{F2} ===staff_info_display")

}




하면 아래처럼 보임


1e9ee26bb7826af33eee87e25bd22b300c758a7f9d4043602ef5e265b7e2d8ba


crawl.setopt("macros += M \\{F2} ===staff_info_display") 부분 변경해서 macro 키 변경할 수 있음


근데 evo 11이랑 원소스킬 10근처인데 100% 넘게 계산되는거 맞는거임? 어느정도 이상되면 그냥 때릴때마다 작동하는거네?