kikotheexile / Endless-Sky-Civil-War

A stand alone, content driven Endless Sky fork.
22 stars 17 forks source link

Add morale to ships, affected by various events #174

Closed lukearndt closed 3 years ago

lukearndt commented 3 years ago

Context

We want to make fleets more interesting to manage by introducing a mechanic that keeps track of crew morale. This will reward players that look after their fleets well, keep their crew alive, pay them on time, and share lots of profit with them.

Conversely, it will punish players that fail to pay their crew on time, get lots of them killed, and generally treat them poorly.

Changes

This commit adds a statistic to each ship called morale. Under the hood, morale is a decimal number with a minimum of -1000 and a maximum of 1000.

Ship morale increases and decreases in response to various things that happen in the game. How each in-game event affects morale is configured in the data files; namely in morale affected.txt.

Considerations

Morale doesn't affect ship performance in any way yet; I plan to introduce that in a future commit.

There are a few more morale events that would make sense to implement, but this branch is getting way too big, and I'd rather get it into master for testing.