shop damage repair
Fixes #121 Fix githib issue #121 - shopkeepers don't charge for consecutive acts of vandalism on the same square. pay_for_damage() keys its action on the 'when' field of the damage structure, and when a second type of damage gets added to existing damage, that wasn't being updated. Both bits of damage (broken door or dug wall plus trap created at same spot) get repaired together but shopkeeper wasn't challanging hero to pay for the second one (trap). The repair process had issues too. If you broke a shop door, paid off the shopkeeper, then left the level before the repair took place and came back after (or rather, catching up for lost time repaired it when you returned to the level), it didn't actually get fixed and remained a doorless doorway that was considered to have been successfully repaired (record of damage discarded). Unless there was also a trap there; then the door did get properly fixed when the trap was removed. Object scattering during wall repair was bypassed if trap removal took place. Also, trap removal while off level still gave messages when it took place after you returned. I didn't try to verify that; it's possible that vision is in a state where you can't see the repair even if you return to a spot where it would be visible. But the return value from the repair routine was one which wanted a message instead of the one to suppress messages. Not addressed: digging a pit inside a shop (aside from in doorway or breached wall) is not treated as damage which should be repaired. This includes the case of digging up a grave which converts the spot into ordinary floor (plus pit trap).
This commit is contained in:
@@ -87,6 +87,12 @@ wallifying a special level might go out of map bounds (not with 3.6.x levels)
|
||||
and corrupt other level data
|
||||
if a random grave produced during level creation included some gold, that gold
|
||||
was left on the ground instead of being buried with other treasure
|
||||
multiple instances of shop damage at same spot (before repairs, so a broken
|
||||
door or dug wall plus trap creation) only charged hero for first one
|
||||
shop door repair which took place when hero was on another level only worked
|
||||
correctly if a trap at the same spot was removed
|
||||
object scattering during shop wall repair was skipped if a trap at the same
|
||||
spot was also being removed
|
||||
|
||||
|
||||
Fixes to Post-3.6.1 Problems that Were Exposed Via git Repository
|
||||
|
||||
Reference in New Issue
Block a user