Barrel Breaking v1.02;
#9
>For a barrel that is will explode, the checks could go
>something like this:


Quite good, although the order is not correct :)


>For <spaces 1-8>
>
>If <current space> = empty
> do nothing

This is not done, since if we get to the end, there was nothing and we can move on.



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

The detonation actually includes a full, recursive, call to the handle of a barrel, which in turn will check all the 8 squares surrounding THAT barell.

> Else
> do nothing
>}

These elses are not really needed, although they don't do harm of course.


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

> 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.

Correct. First it check for a monster. Then it check for a player and finally it check for another exploding barell. Obviously the order is not that important and is of course impossible to know unless you check the code :)

Ohh, the ToHit chances are that of a trap since that is how the attack from the barrel is flaged. See my guide for trap ToHit, I really have no idea about them without checking myself.
There are three types of people in the world. Those who can count and those who can't.
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)