Cataclysm-DDA icon indicating copy to clipboard operation
Cataclysm-DDA copied to clipboard

Aftershock: Remove swims flag from terrestrial creatures.

Open John-Candlebury opened this issue 1 year ago • 5 comments

Summary

Mods "Aftershock: Remove swims flag from terrestrial creatures."

Purpose of change

Describe the solution

SWIMS flag does slow down monsters in land, which is a balance discussion for another day, but I't doesnt really make sense for this terrestian creatures to have it.

John-Candlebury avatar Oct 22 '24 16:10 John-Candlebury

SWIMS flag does slow down monsters in land

Seriously? If it actually does, please document this if you can. I was not aware of that.

Karol1223 avatar Oct 22 '24 16:10 Karol1223

SWIMS flag does slow down monsters in land

Seriously? If it actually does, please document this if you can. I was not aware of that.

Yeah if you check monster::calc_movecost swimming monsters pay the full movecost of their current map tile and the full cost of their destination tile when moving. Normal monsters just pay half of each.

I'm actually not sure if this is the intended behavior or not. It's certainly not documented.

John-Candlebury avatar Oct 22 '24 16:10 John-Candlebury

I'm actually not sure if this is the intended behavior or not. It's certainly not documented.

It seems not to be, frankly, given the documentation only says they're supposed to treat water as a 50 movecost terrain. Does it at least do as advertised?

Karol1223 avatar Oct 22 '24 16:10 Karol1223

Yeah water to water is exactly 50 cost.

John-Candlebury avatar Oct 22 '24 17:10 John-Candlebury

https://github.com/CleverRaven/Cataclysm-DDA/blob/8f226e5345ce58030a6b4e921fdf5a5b8017b925/src/monmove.cpp#L1522-L1523 https://github.com/CleverRaven/Cataclysm-DDA/blob/8f226e5345ce58030a6b4e921fdf5a5b8017b925/src/monmove.cpp#L1528-L1538

If I understand this correctly. For tiles without SWIMMABLE flag, the total move_cost is equal to:

move_cost = 0 + 50 * here.move_cost( f ) + movecost + 50 * here.move_cost( t )

And if it didn't have a SWIMS flag, then:

https://github.com/CleverRaven/Cataclysm-DDA/blob/8f226e5345ce58030a6b4e921fdf5a5b8017b925/src/monmove.cpp#L1564-L1566

P.S. Do we have furniture with the SWIMMABLE flag?

IdleSol avatar Oct 22 '24 18:10 IdleSol