|
Post by Gando on Aug 7, 2008 15:03:39 GMT -5
Here is something weird though...the same subfunction for Iajutsu:
[pre]
-- Kensai's Iajutsu! if (p_ptr.abilities[(CLASS_KENSAI * 10) + 2] >= 1 and (monster_physical) and (kensai_equip())) then msg_print("With Iajutsu...") if (inven(INVEN_WIELD).itemskill == 12) then current_weapon = inven(INVEN_WIELD) else current_weapon = inven(INVEN_WIELD+1) end local hitbonus = (p_ptr.to_h * p_ptr.stat_ind[A_WIS+1] * 3 / 100) local iajutsudam = weapon_damages() iajutsudam = iajutsudam + (iajutsudam * p_ptr.stat_ind[A_WIS+1] * 3 / 100) iajutsudam = iajutsudam + (iajutsudam * p_ptr.abilities[(CLASS_KENSAI * 10) + 2] * 10 / 100) local damtype = current_weapon.extra1 if (damtype == 0) then damtype = GF_PHYSICAL end if (player_hit_monster(monster(who), hitbonus)) then melee_attack = TRUE no_magic_return = TRUE nevermiss = TRUE fire_ball_specific_grid(iajutsudam, monster(who).fx, monster(who).fy, 0, damtype) melee_attack = FALSE no_magic_return = FALSE nevermiss = FALSE if (monster_died) then
monster_died = FALSE dam = 0 --return 0 -- not sure what to do here. end else msg_print(string.format('Your iajutsu misses %s!', m_race(monster.r_idx).name_char)) end
end [/pre]
Appears in both Elements.lua and Combat.lua...same exact code
|
|
|
Post by phlinn on Aug 7, 2008 15:22:27 GMT -5
Sigh... I was looking for GF_PHYSICAL and didn't even see the set to value 15.
|
|
|
Post by phlinn on Aug 7, 2008 15:30:33 GMT -5
Found it maybe. In elements.lua, it doesn't actually check for ICE in element_hit_player.
|
|
|
Post by Gando on Aug 7, 2008 16:14:22 GMT -5
Well I changed that...hopefully thats the problem.
=EDIT= but come to think of it ...it cant be...Im not using the Ice Katana because the Aria's Soul is a little better AND because the katas don't work with two weapons equipped...so its not a problem with damage type.
|
|
|
Post by sekira on Aug 7, 2008 16:41:20 GMT -5
Well, I just confirmed that with a non-ice sword, putting the check for monster death in after the dragon's fury damage in elements.lua fixes the problem...
I am not sure about the ice sword though.
|
|
|
Post by sekira on Aug 7, 2008 16:50:51 GMT -5
well, did you copy and paste correctly? close to line 1037 of elements.lua you should find this code: -- Brands. if (unarmed()) then if (inven(INVEN_HANDS).brandtype > 0 and not(blocked)) then save_magic_return = no_magic_return melee_attack = FALSE no_magic_return = TRUE fire_jump_ball(inven(INVEN_HANDS).brandtype, (inven(INVEN_HANDS).branddam), inven(INVEN_HANDS).brandrad, meleex, meleey, TRUE) no_magic_return = save_magic_return melee_attack = TRUE end else if (current_weapon.brandtype > 0 and not(blocked)) then save_magic_return = no_magic_return melee_attack = FALSE no_magic_return = TRUE fire_jump_ball(current_weapon.brandtype, (current_weapon.branddam), current_weapon.brandrad, meleex, meleey, TRUE) no_magic_return = save_magic_return melee_attack = TRUE end end
-- Monster is dead due to brands? Return. if (monster_died) then
monster_died = FALSE return -1 end -- Kensai's The Dragon's Fury! if (p_ptr.abilities[(CLASS_KENSAI * 10)+9] > 0 and not(blocked) and (scorptail == 0) and (kensai_equip()) and (current_weapon.itemskill == 12)) then local furydam = originalpower / 5 furydam = furydam + (furydam * p_ptr.stat_ind[A_WIS+1] * 2 / 100) furydam = furydam + (furydam * p_ptr.abilities[(CLASS_KENSAI * 10)+9] * 10 / 100) save_magic_return = no_magic_return melee_attack = FALSE no_magic_return = TRUE fire_jump_ball(GF_MANA, furydam, 0, meleex, meleey, TRUE) no_magic_return = save_magic_return melee_attack = TRUE end
end copy and paste the code in yellow and put it after the code in green like so: -- Brands. if (unarmed()) then if (inven(INVEN_HANDS).brandtype > 0 and not(blocked)) then save_magic_return = no_magic_return melee_attack = FALSE no_magic_return = TRUE fire_jump_ball(inven(INVEN_HANDS).brandtype, (inven(INVEN_HANDS).branddam), inven(INVEN_HANDS).brandrad, meleex, meleey, TRUE) no_magic_return = save_magic_return melee_attack = TRUE end else if (current_weapon.brandtype > 0 and not(blocked)) then save_magic_return = no_magic_return melee_attack = FALSE no_magic_return = TRUE fire_jump_ball(current_weapon.brandtype, (current_weapon.branddam), current_weapon.brandrad, meleex, meleey, TRUE) no_magic_return = save_magic_return melee_attack = TRUE end end
-- Monster is dead due to brands? Return. if (monster_died) then
monster_died = FALSE return -1 end -- Kensai's The Dragon's Fury! if (p_ptr.abilities[(CLASS_KENSAI * 10)+9] > 0 and not(blocked) and (scorptail == 0) and (kensai_equip()) and (current_weapon.itemskill == 12)) then local furydam = originalpower / 5 furydam = furydam + (furydam * p_ptr.stat_ind[A_WIS+1] * 2 / 100) furydam = furydam + (furydam * p_ptr.abilities[(CLASS_KENSAI * 10)+9] * 10 / 100) save_magic_return = no_magic_return melee_attack = FALSE no_magic_return = TRUE fire_jump_ball(GF_MANA, furydam, 0, meleex, meleey, TRUE) no_magic_return = save_magic_return melee_attack = TRUE end -- Monster is dead due to brands? Return. if (monster_died) then
monster_died = FALSE return -1 end
end
|
|
|
Post by Gando on Aug 7, 2008 17:02:29 GMT -5
Still crashing on physical immunes...no idea why.
|
|
|
Post by Gando on Aug 7, 2008 17:04:14 GMT -5
well, did you copy and paste correctly? To whom are you addressing this question? I copy and paste nothing. [pre]-- Brands. if (unarmed()) then if (inven(INVEN_HANDS).brandtype > 0 and not(blocked)) then save_magic_return = no_magic_return melee_attack = FALSE no_magic_return = TRUE fire_jump_ball(inven(INVEN_HANDS).brandtype, (inven(INVEN_HANDS).branddam), inven(INVEN_HANDS).brandrad, meleex, meleey, TRUE) no_magic_return = save_magic_return melee_attack = TRUE end else if (current_weapon.brandtype > 0 and not(blocked)) then save_magic_return = no_magic_return melee_attack = FALSE no_magic_return = TRUE fire_jump_ball(current_weapon.brandtype, (current_weapon.branddam), current_weapon.brandrad, meleex, meleey, TRUE) no_magic_return = save_magic_return melee_attack = TRUE end end
-- Kensai's The Dragon's Fury! if (p_ptr.abilities[(CLASS_KENSAI * 10)+9] > 0 and not(blocked) and (scorptail == 0) and (kensai_equip()) and (current_weapon.itemskill == 12)) then local furydam = originalpower / 5 furydam = furydam + (furydam * p_ptr.stat_ind[A_WIS+1] * 2 / 100) furydam = furydam + (furydam * p_ptr.abilities[(CLASS_KENSAI * 10)+9] * 10 / 100) save_magic_return = no_magic_return melee_attack = FALSE no_magic_return = TRUE fire_jump_ball(GF_MANA, furydam, 0, meleex, meleey, TRUE) no_magic_return = save_magic_return melee_attack = TRUE end -- Monster is dead due to brands? Return. if (monster_died) then
monster_died = FALSE return -1 end [/pre] This is how my elements.lua looks in that section...I typed it in correctly according to what Variaz said. I do not see the point of having the if statement BEFORE the dragon's fury too.
|
|
|
Post by Variaz on Aug 7, 2008 17:04:22 GMT -5
Found it maybe. In elements.lua, it doesn't actually check for ICE in element_hit_player. Thanks, just changed it. Though I don't think that's really the problem... Fixed.
|
|
|
Post by Gando on Aug 7, 2008 17:11:29 GMT -5
btw not a fan of the stretching in this thread...
|
|
|
Post by sekira on Aug 7, 2008 17:26:12 GMT -5
Hmm my dual wielding test Kensai with Dragon's Fury and with the fix I described above just killed a physical immune elite, and I also killed numerous ghost monsters... No crashes. Seems strange since I was crashing just as you described before I did that fix, and now no problems at all. I also tried a fix where I check for the element at the very beginning of the element_hit_monster() function in elements.lua, and set it to GF_PHYSICAL if it is 0. try changing this (near line 99): -- Monster is hit by element! -- If "who" is 0, the source is the player. Otherwise, it's another monster. function element_hit_monster (who, m_idx, element, dam)
local m_name local ppower local mpower local originalpower to this: -- Monster is hit by element! -- If "who" is 0, the source is the player. Otherwise, it's another monster. function element_hit_monster (who, m_idx, element, dam)
if (element == 0) then element = GF_PHYSICAL end
local m_name local ppower local mpower local originalpower
|
|
|
Post by Variaz on Aug 7, 2008 17:28:22 GMT -5
I created a new thread regarding gando's bug. Please post in that new thread for anything regarding this bug.
|
|
|
Post by sekira on Aug 7, 2008 17:30:21 GMT -5
AHA!
ok, you really need both checks for monster death, not just the second one.
I'm not sure why, but if your brand "kills" the monster, and you also have dragon's fury, then I think that is what is crashing your game when the code goes to do the dragon's fury damage as well (because it didn't return from monster death like it should have) then something doesn't work right and the game crashes.
Make sure you have BOTH checks for monster death.
I know you are using aria's soul, and if you have leveled it up a bit, that light brand can be quite decent... if you are fighting undead, well then you are going to get this crash a lot.
EDIT: actually you will get the crash a lot anyway... it doesn't have to kill the monster in one hit, it just has to kill the monster with the brand as the last hit that hit the monster... and that is enough to crash the game... so it can happen with any monster, but is a little more likely with undead when you have a light brand.
|
|
|
Post by Gando on Aug 7, 2008 21:16:37 GMT -5
btw by stretching I meant the forced width of the page...not adding to the thread via diversions from the topic...though I suppose that is to be avoided.
|
|
|
Post by Gando on Aug 8, 2008 0:58:10 GMT -5
Why does the Word of Recall scroll take you back to town sometimes but not when in the quest dungeons like that of "The Fallen"? It seems more logical it would not bring you back to town from a random dungeon. Since as far as I can remember the Word of Recall intent is to take you back to town I'd think they should be consistant in that regards.
|
|