Post by sekira on Apr 21, 2008 12:56:49 GMT -5
Here is the fix for Ki Punch not working against monsters standing in walls (Ghosts).
In the edit folder, modify the classes.txt file. This line:
Should be on line 261 or close to it. Change the 3rd parameter to 0, so the line reads
Then, in the script folder, the file abilities.lua, copy and paste this code in the use_ability() function, around line 447 is a good place, just choose a place that is after the end for the heal if statement, and before theline. Here is the code.
I think the accurate strike ability should be similarly modified, though not as important considering it always does physical... It really should be changed to do the base damage type of the weapon used, and then it will mean something to change the code to make use of fire_ball_specific_grid() instead of chain_attack()
In the edit folder, modify the classes.txt file. This line:
A:Ki Punch:1:1:46:1
Should be on line 261 or close to it. Change the 3rd parameter to 0, so the line reads
A:Ki Punch:1:0:46:1
Then, in the script folder, the file abilities.lua, copy and paste this code in the use_ability() function, around line 447 is a good place, just choose a place that is after the end for the heal if statement, and before the
-- Chain Shots
-- Ki Punch
if (powernum == 46) then
local dir
local dir_x
local dir_y
local dam
if (not(unarmed())) then
msg_print("You must be unarmed!")
return
end
-- We need to choose a direction to attack. If used as combat feat,
-- this won't be asked.
-- Get the direction.
dir = lua_get_rep_dir()
-- Determine the coordinates where we will look for a monster.
if (dir == 1) then
dir_x = px - 1
dir_y = py + 1
end
if (dir == 2) then
dir_x = px
dir_y = py + 1
end
if (dir == 3) then
dir_x = px + 1
dir_y = py + 1
end
if (dir == 4) then
dir_x = px - 1
dir_y = py
end
if (dir == 5) then
dir_x = px
dir_y = py
end
if (dir == 6) then
dir_x = px + 1
dir_y = py
end
if (dir == 7) then
dir_x = px - 1
dir_y = py - 1
end
if (dir == 8) then
dir_x = px
dir_y = py - 1
end
if (dir == 9) then
dir_x = px + 1
dir_y = py - 1
end
dam = monk_damages()
dam = dam + ((dam * ((p_ptr.abilities[(CLASS_MONK * 10) + 6]) * 10)) / 100)
-- The "nevermiss" global variable is set to true. This way, the attack
-- will never miss. Once the attack is executed, the variable is set to
-- false again.
nevermiss = TRUE
-- melee_attack = TRUE
-- no_magic_return = TRUE
fire_ball_specific_grid(dam, dir_x, dir_y, 0, GF_MISSILE)
-- no_magic_return = FALSE
-- melee_attack = FALSE
nevermiss = FALSE
energy_use = 100;
end
I think the accurate strike ability should be similarly modified, though not as important considering it always does physical... It really should be changed to do the base damage type of the weapon used, and then it will mean something to change the code to make use of fire_ball_specific_grid() instead of chain_attack()