|
Post by adelie on Dec 7, 2008 23:34:57 GMT -5
Ok, the above code change fixed some of the problem, single wield/sword+shield counterattacks now work as expected, however, multiple attacks are still bugged.
This is dead simple to reproduce: add the line:
msg_print(string.format('roll: %dd%d', current_weapon.dd, current_weapon.ds))
Below line 307 in combat.lua (after the damroll line). Now, go, make a new human character, wield the dagger and nothing else. Hit a guard or something else that won't die to a single dagger hit)
For the first attack, you'll see the damage roll is 1d3, attacks 2 and 3 are 0d0 (the default for no item if something is wielded in either slot a or b).
Try it with a shield in slot b, and you'll see the shields 1d1 for attacks 2 and 3.
Wielding a second weapon in slot b, but having dual wield off results in slot a for the first strike, and slot b for further strikes.
This happens with or without my cmd2.c change.
|
|
|
Post by adelie on Dec 8, 2008 0:55:37 GMT -5
Potential fix #2:
Abilities.lua (line 144):
-- Attack once for each legal blow while (num < num_blow and cave(y, x).m_idx > 0 and px == oldpx and py == oldpy) do
daggerbonus = 0 usedcombo = 0 blocked = FALSE
num = num + 1 -- Run a script? player_before_melee()
change to:
-- Attack once for each legal blow while (num < num_blow and cave(y, x).m_idx > 0 and px == oldpx and py == oldpy) do
daggerbonus = 0 usedcombo = 0 blocked = FALSE
num = num + 1 current_weapon = inven(INVEN_WIELD + weap) -- <-Add this line -- Run a script? player_before_melee()
current_weapon was getting overwritten by the update_and_handle() call, but not getting updated within the while loop for handling multiple attacks (unless choose_current_weapon() was getting called for a combat feat, but would revert again after the next non-combat feat!)
Works with my change to cmd2.c, seems like hits are coming from the right weapon for feats, multiple attacks and dual strike now, but I'll run it around the block a couple of more times to be sure.
|
|
|
Post by adelie on Dec 8, 2008 15:14:23 GMT -5
Yet another bug report, with fix -
Defender's shield mastery ability at 10 points allows blocking magical attacks, instead results in a lua traceback.
In elements.lua line 3229 change:
local proll
to
local proll = 0
|
|
|
Post by Variaz on Dec 8, 2008 19:17:55 GMT -5
All the above fixes have been applied. Thanks a lot!
|
|
|
Post by Gando on Dec 9, 2008 22:02:36 GMT -5
Any chance of a fix on the storage bug before the new year?
|
|
|
Post by Variaz on Dec 9, 2008 23:49:01 GMT -5
Any chance of a fix on the storage bug before the new year? Of course, don't worry. Shouldn't be too hard to fix. It's just that I haven't really been coding in the last few days. Taking a little break, as I mentionned in another thread.
|
|
|
Post by adelie on Dec 10, 2008 0:22:46 GMT -5
Store bug fix: in define.h (around line 380 or somewhere, doesn't actually matter where) add the line: #define HOME_INVEN_MAX 600
Line 731 load2.c change if (st_ptr->stock_num < 50)
to if (st_ptr->stock_num < HOME_INVEN_MAX)
Line 3810 init2.c change if (j == STORE_HOME) st_ptr->stock_size = 600;
to if (j == STORE_HOME) st_ptr->stock_size = HOME_INVEN_MAX;
Not only fixes the problem, but helps prevent it in the future.
|
|
|
Post by Gando on Dec 10, 2008 12:22:42 GMT -5
Good one Adelie...It certainly is a good practice to use predefined values for constants rather than coding them on the spot.
|
|
khan
Veteran
Posts: 81
|
Post by khan on Dec 12, 2008 5:01:18 GMT -5
If you do another fix before 008, would it be possible to include the fix to the defenders Armoured spellcasting: Changing all the + 10's to +2's should work or I'm going to have to start spending AP's on Aromoured Might to get an SP Boost! . I've already done this on my installation and it seems to work. Finally, looking forward to 008, gettin to lvl 40 and then not being able to find any greens .
|
|
|
Post by Variaz on Dec 14, 2008 12:33:57 GMT -5
All right, armored spellcasting is fixed. Thanks!
|
|
|
Post by Variaz on Dec 14, 2008 12:57:45 GMT -5
Store bug fix: in define.h (around line 380 or somewhere, doesn't actually matter where) add the line: #define HOME_INVEN_MAX 600
Line 731 load2.c change if (st_ptr->stock_num < 50)
to if (st_ptr->stock_num < HOME_INVEN_MAX)
Line 3810 init2.c change if (j == STORE_HOME) st_ptr->stock_size = 600;
to if (j == STORE_HOME) st_ptr->stock_size = HOME_INVEN_MAX;
Not only fixes the problem, but helps prevent it in the future. This worked. Thanks a lot! Indeed, using a constant is a good idea.
|
|
|
Post by Gando on Dec 14, 2008 21:00:31 GMT -5
In the flow on a random level I encountered a special level initially labeled the Palace and then "The Secret Zone" with no way out. Just me and 4 walls. no up no down no teleport no dig nothing. ...as far as sadistic traps go....this tops them all. The only way out is to cheat or die. either way sucks.
|
|
|
Post by Gando on Dec 14, 2008 21:04:39 GMT -5
Further investigation produces the following: 'l' gives me this info: "You are in a portal" 'M' gives me a map of a special dungeon town south east of my position centered on the screen. So it seems like a glitch in the portal system.
|
|
|
Post by Gando on Dec 14, 2008 21:24:28 GMT -5
Found it again...this time managing to crash the game. yay me :/
|
|
|
Post by Variaz on Dec 14, 2008 21:25:44 GMT -5
Found it again...this time managing to crash the game. yay me :/ What did you do when that happened? What portal did you enter? Do you have a save file?
|
|