Barrel Breaking v1.02;
#5
Barrels and players are completely different things from the code's perspective, so different things are going to happen when different things occupy the same tiles.

Because the game is tiled based, I am going to assume the following happens when a barrel is broken (assuming it will explode). I don't know what the code is exactly for Diablo, but it is how most things are done (so where ever I say "will" it means "most probably"). Let's say we have this, where B is the barrel and X are the adjacent spaces around it.

X X X
X B X
X X X

The game will go to each adjacent square one by one and perform certain checks and actions. The order doesn't really matter, but let's say it is this:

1 2 3
4 B 5
6 7 8

For a barrel that is will explode, the checks could go something like this:

For <spaces 1-8>

If <current space> = empty
do nothing

If <current space> = barrel
{
If <barrel> = <exploding barrel>
<detonate barrel>

Else
do nothing
}

If <current space> = <player>
<possibly damage player>

}

Yes, that was horrible psuedo psuedo-code, but it is simple and understandable. Also, where is says "<possibly damage player>", I couldn't remember what chance a barrel has to hit and what factors it is based on, but that is where all of that goes. I can't read J.P.'s Guide right now :) Also, I only included checks for barrels and players, even if the game checks for other things as well. The game will also check for enemies around the barrel, and will possible damage them as it does a player.

>We all know that exploding barrels can hit adjacent barrels, setting off a whole string of explosions -- especially inside rooms!

Exploding barrels can only detonate adjacent exploding barrels (barrels that would explode if you hit them). Normal barrels will not explode. Many adjacent barrels will explode inside of rooms because there is a high probability in enclosed areas that barrels will be flagged to explode (see J.P.'s guide). Just wanted to make sure this was clear because they only check in the "code" above is for exploding barrels.

>From tile S, if you strike Barrel B, you WILL sustain damage! From tile S, if you strike Barrel b, you WILL sustain damage!

You should have the same chance to get hit as if you were on any of the other adjacent tiles. If you actually did have a 100% chance to get hit from a space that was once occupied by a barrel with a skeleton, then the game would have to keep track of all the tiles that previously contained barrels with skeletons. It would need to check from where the player is hitting the barrel, and then compare the players locatoin to the all the barrel locations it was keeping track of (with skeletons). This doesn't make any sense logically, i.e. it woudn't make sense to have the previous location of skeleton-trapped barrels have a greater chance to hit than any other tile. It would be a "feature" that would use up unnecessary memory for something that didn't make sense in the first place.

It would have to be very deliberate for the programmers to makes those tiles in question have a 100% chance to hit a player(/enemy) and I highly doubt they would do something like that.
--Lang

Diabolic Psyche - the site with Diablo on the Brain!
Reply


Messages In This Thread
Barrel Breaking v1.02; - by Attika - 04-02-2003, 05:04 PM
Barrel Breaking v1.02; - by Vash - 04-02-2003, 06:28 PM
Barrel Breaking v1.02; - by Barsine - 04-02-2003, 08:05 PM
Barrel Breaking v1.02; - by Jarulf - 04-02-2003, 09:36 PM
Barrel Breaking v1.02; - by the Langolier - 04-02-2003, 10:18 PM
Barrel Breaking v1.02; - by !!SaLtMaN!! - 04-02-2003, 11:20 PM
Barrel Breaking v1.02; - by Rhydderch Hael - 04-12-2003, 04:26 PM
Barrel Breaking v1.02; - by Cytrex - 04-13-2003, 11:42 AM
Barrel Breaking v1.02; - by Jarulf - 04-13-2003, 04:03 PM
Barrel Breaking v1.02; - by Something Dutch - 04-23-2003, 03:03 PM
Barrel Breaking v1.02; - by Nystul - 05-09-2003, 12:27 AM
Barrel Breaking v1.02; - by --Pete - 05-09-2003, 01:08 AM
Barrel Breaking v1.02; - by the Langolier - 05-09-2003, 04:47 AM
Barrel Breaking v1.02; - by --Pete - 05-09-2003, 01:41 PM
Barrel Breaking v1.02; - by Nystul - 05-09-2003, 11:36 PM
Barrel Breaking v1.02; - by --Pete - 05-09-2003, 11:54 PM
Barrel Breaking v1.02; - by Guest - 05-14-2003, 04:49 PM
Barrel Breaking v1.02; - by --Pete - 05-14-2003, 05:02 PM
Barrel Breaking v1.02; - by Occhidiangela - 05-14-2003, 06:44 PM
Barrel Breaking v1.02; - by Elric of Grans - 05-14-2003, 10:10 PM
Barrel Breaking v1.02; - by Bolty - 05-15-2003, 01:34 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)