Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- float hunger_rate = 0.5f;
- if( has_trait("LIGHTEATER") ) {
- hunger_rate -= (0.5f / 3.0f);
- }
- if( has_trait( "HUNGER" ) ) {
- hunger_rate += 0.25f;
- } else if( has_trait( "HUNGER2" ) ) {
- hunger_rate += 0.5f;
- } else if( has_trait( "HUNGER3" ) ) {
- hunger_rate += 1.0f;
- }
- if( has_trait( "MET_RAT" ) ) {
- hunger_rate += (0.5f / 3.0f);
- }
- float thirst_rate = 0.5f;
- if( has_trait("PLANTSKIN") ) {
- thirst_rate -= 0.1f;
- }
- if( has_trait("THIRST") ) {
- thirst_rate += 0.25f;
- } else if( has_trait("THIRST2") ) {
- thirst_rate += 0.5f;
- } else if( has_trait("THIRST3") ) {
- thirst_rate += 1.0f;
- }
- if( has_recycler ) {
- // A LOT! Also works on mutant hunger
- // Should it be so good?
- hunger_rate /= 6.0f;
- thirst_rate /= 2.0f;
- }
- if( asleep && !has_recycler && !hibernating ) {
- // Hunger and thirst advance more slowly while we sleep. This is the standard rate.
- hunger_rate *= 0.25f;
- thirst_rate *= 0.25f;
- } else if( asleep && !has_recycler && hibernating) {
- // Hunger and thirst advance *much* more slowly whilst we hibernate.
- // (int (calendar::turn) % 50 would be zero burn.)
- // Very Thirsty catch deliberately NOT applied here, to fend off Dehydration debuffs
- // until the char wakes. This was time-trial'd quite thoroughly,so kindly don't "rebalance"
- // without a good explanation and taking a night to make sure it works
- // with the extended sleep duration, OK?
- hunger_rate *= (1.0f / 7.0f);
- thirst_rate *= (1.0f / 7.0f);
- }
Advertisement
Add Comment
Please, Sign In to add comment