Guest User

Untitled

a guest
Jan 28th, 2016
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.69 KB | None | 0 0
  1. float hunger_rate = 0.5f;
  2. if( has_trait("LIGHTEATER") ) {
  3. hunger_rate -= (0.5f / 3.0f);
  4. }
  5.  
  6. if( has_trait( "HUNGER" ) ) {
  7. hunger_rate += 0.25f;
  8. } else if( has_trait( "HUNGER2" ) ) {
  9. hunger_rate += 0.5f;
  10. } else if( has_trait( "HUNGER3" ) ) {
  11. hunger_rate += 1.0f;
  12. }
  13.  
  14. if( has_trait( "MET_RAT" ) ) {
  15. hunger_rate += (0.5f / 3.0f);
  16. }
  17.  
  18. float thirst_rate = 0.5f;
  19. if( has_trait("PLANTSKIN") ) {
  20. thirst_rate -= 0.1f;
  21. }
  22.  
  23. if( has_trait("THIRST") ) {
  24. thirst_rate += 0.25f;
  25. } else if( has_trait("THIRST2") ) {
  26. thirst_rate += 0.5f;
  27. } else if( has_trait("THIRST3") ) {
  28. thirst_rate += 1.0f;
  29. }
  30.  
  31. if( has_recycler ) {
  32. // A LOT! Also works on mutant hunger
  33. // Should it be so good?
  34. hunger_rate /= 6.0f;
  35. thirst_rate /= 2.0f;
  36. }
  37.  
  38. if( asleep && !has_recycler && !hibernating ) {
  39. // Hunger and thirst advance more slowly while we sleep. This is the standard rate.
  40. hunger_rate *= 0.25f;
  41. thirst_rate *= 0.25f;
  42. } else if( asleep && !has_recycler && hibernating) {
  43. // Hunger and thirst advance *much* more slowly whilst we hibernate.
  44. // (int (calendar::turn) % 50 would be zero burn.)
  45. // Very Thirsty catch deliberately NOT applied here, to fend off Dehydration debuffs
  46. // until the char wakes. This was time-trial'd quite thoroughly,so kindly don't "rebalance"
  47. // without a good explanation and taking a night to make sure it works
  48. // with the extended sleep duration, OK?
  49. hunger_rate *= (1.0f / 7.0f);
  50. thirst_rate *= (1.0f / 7.0f);
  51. }
Advertisement
Add Comment
Please, Sign In to add comment