Someone Else
Level: Smitemaster
Rank Points: 2338
Registered: 06-14-2005
IP: Logged
|
Re: New serpent (+3)
Okay, for tar:
You can't use any other NPCs in the room - at least not visible ones. Each turn, the tar checks each space around it and determines its shape based on the spaces that are filled. If there aren't enough for that space to be stable, it turns into a tar baby. Unfortunately, I don't believe that with this system you can make it turn into a baby that's the right colour... but that's beside the point.
Every 30 turns, if there's a mother in the room, each tar space attempts to place another tar NPC in every empty space beside it, causing the tar to grow.
In order to make vulnerable spots, the tarstuff simply changes vulnerability based on what image it appears as.
I was attempting to make a tarstuff that would reassemble itself if possible. This required leaving the babies as NPCs and having them attempt to turn back into tarstuff each turn.
Difficulties:
- Sometimes Beethro would be killed by the babies that formed that turn.
- Sometimes expanding tar wouldn't lead to correct images.
- Sometimes some babies would attempt to reform while others (looking like they should be in the same blob) just moved.
Most of these would be fixed with Wait For Entity (NPC_TYPE). The rest would be fixed by by messing around with the code - upon growth, the tarstuff would have to check for stability, then grow, then check for appearance.
For Serpents:
Right now, a serpent can be made by having that serpent's length recorded in a variable. Then, each piece remembers which piece of the serpent is ahead of it and which piece is behind (the latter takes place the next turn, when it turns into a body part from the head). At L-1 turns after it appears, the piece turns into a tail. After L turns, it disappears. This is a basic serpent. Each piece would have to be invulnerable.
To move, the head would create a serpent NPC adjacent to itself, then change its appearance to the correct picture.
For a rattlesnake, the tail would be vulnerable. The piece in front of the tail would check "Wait for Event (NPC slain)" and if true, check the tile behind it, decrementing the length by one if there's no NPC there. The head would also have to signal to the rest of the body if it's not moving so that it doesn't shrink. There would be issues with these:
- They couldn't move on to swords. It's possible that each part could just move, but that would be horrendously complex. Now that I think of it, though, you might be able to have each piece tell the one behind where to move... Still might not be able to move on to swords, though.
- As it stands, the movement order would be wrong - the tail would get its turn first, and the head last. So the tail wouldn't know if the head couldn't move.
- There would be little or no possibility of multiple cuts in a turn.
As for adders... I don't know. It's impossible right now, as monsters can't kill other monsters without a sword.
|