Post by quaan on Aug 20, 2007 9:56:36 GMT -5
Finally made it to high monk, put 1 point in disabling blow as soon as I could. All was well till I encounterd my first boss
(ie the first mob that actualy survived one round) at wich point the game crashed at the 2nd round. Thought it might
have been a freak accident so reloaded and tried again, with the same result. So I peeked in the script for it and well...
some typos there
I think it was mentioned before but not for 0.2.1? Not sure tho, anyways all three of hitrate defense and mspeed
where set to "old hitrate - hitratereduction", having changed that little cut and paste error I tried again and again it
crashed. After some debug printing I realized that it was when the monster got negative defense.
I'm guessing thats not allowed
So with a simple check disabling blow is now actualy useful!
I was however wondering if there's any use of negative hitrate? Does hitrate -10 hit worse than 0? Either way
-hitrate isn't a problem so doesn't really matter.
(ie the first mob that actualy survived one round) at wich point the game crashed at the 2nd round. Thought it might
have been a freak accident so reloaded and tried again, with the same result. So I peeked in the script for it and well...
some typos there
I think it was mentioned before but not for 0.2.1? Not sure tho, anyways all three of hitrate defense and mspeed
where set to "old hitrate - hitratereduction", having changed that little cut and paste error I tried again and again it
crashed. After some debug printing I realized that it was when the monster got negative defense.
I'm guessing thats not allowed
So with a simple check disabling blow is now actualy useful!
I was however wondering if there's any use of negative hitrate? Does hitrate -10 hit worse than 0? Either way
-hitrate isn't a problem so doesn't really matter.
-- Fixed High Monk's Disabling Blows!
if (unarmed() == TRUE and p_ptr.abilities[(CLASS_ZELAR * 10) + 6] >= 1 and blocked == FALSE) then
local defreduction = (p_ptr.abilities[(CLASS_ZELAR * 10) + 6] * 15)
local speedreduction = 1 + (p_ptr.abilities[(CLASS_ZELAR * 10) + 6] / 2)
if (not (get_monster_ability(monster(cave(y, x).m_idx), BOSS_IMMUNE_WEAPONS))
and not (get_monster_flag1(monster(cave(y, x).m_idx).r_idx, RF1_UNIQUE))) then
monster(cave(y, x).m_idx).hitrate = monster(cave(y, x).m_idx).hitrate - defreduction
if(monster(cave(y, x).m_idx).defense - defreduction > 0) then
monster(cave(y, x).m_idx).defense = monster(cave(y, x).m_idx).defense - defreduction
else
monster(cave(y, x).m_idx).defense = 0;
end
monster(cave(y, x).m_idx).mspeed = monster(cave(y, x).m_idx).mspeed - speedreduction
msg_print(string.format('Def/Hit loss: %d, Speed loss: %d.', defreduction, speedreduction))
end
end