CleverRaven / Cataclysm-DDA

Cataclysm - Dark Days Ahead. A turn-based survival game set in a post-apocalyptic world.
http://cataclysmdda.org
Other
10.1k stars 4.1k forks source link

Water's movecost of 0 #3676

Closed ianestrachan closed 10 years ago

ianestrachan commented 10 years ago

Water is currently represented as having a move-cost of 0, same as a wall. Except that, since water is actually passable, this means that any time something can legitimately go into water, all kinds of explicit checks and crazy hacks are involved, looking at the exact terrain type. It also causes some weird issues like NPCs spawning on top of the water and floating there, unable to move, forever.

Water should probably act something like this:

kevingranade commented 10 years ago

Sounds good in general.

BDR1985 commented 10 years ago

Unrelated, but this makes me want boats and jetskis. Their engine would conversely only operate in a DEEP_WATER tile.

ianestrachan commented 10 years ago

I don't think it would make much difference to the engine (it just drives other mechanical parts) as that the vehicle would need propellers instead of wheels.

You'd also probably need to waterproof the vehicle somehow, probably by putting some kind of new vehicle part on the underside of each square.

KA101 commented 10 years ago

Just re-read this. Aquatic critters ought to be able to handle shallow water, perhaps at reduced movement?

ianestrachan commented 10 years ago

Sounds reasonable, since shallow water is used on river banks and such - I figure it's waist-deep at most.