Water - using Special Items and SDFs to keep track of water Inspired by Brett Bixler's Destiny of the Spheres Author: Skyle - clarkj@oit.edu Used in: None Created: 26 September 1999 Setup 10 Special Items (1= 1 Unit of Water to 10= 10 Units of Water) SDF 292,0 is for Units of Water (20= 10 units to 11= 1 unit) at 10 is no water (normal hydration) 9 is health damage at 8 is health damage and dumbfounding 7 is party death SDF 292,1 is the consume/add/top-off water flag (0 consume, 1 add, 2 top-off) Before the party can get the water, set SDF 292,1 to 1 (like when they enter a room with a water source) When the water source is depleted (via a local incrementing counter as the party searches the water source) or leaves the room set SDF 292,1 to 0 Every 1200 moves (outdoors, town, and combat), call: 0 Stuff Done Flag? - 292,0, >= 1A= 20 goto 20, < 1B= 11 goto 21, else jump to 0A 0A Stuff Done Flag? - 292,0, >= 1A= 19 goto 19, < 1B= 12 goto 11, else jump to 0B 0B Stuff Done Flag? - 292,0, >= 1A= 18 goto 18, < 1B= 13 goto 12, else jump to 0C 0C Stuff Done Flag? - 292,0, >= 1A= 17 goto 17, < 1B= 14 goto 13, else jump to 0D 0D Stuff Done Flag? - 292,0, >= 1A= 16 goto 16, < 1B= 15 goto 14, else jump to 15 11 Give Special Item - 1A= 1 Water, 1B= 1 take, jump to 21 12 Give Special Item - 1A= 2 Water, 1B= 1 take, jump to 21 13 Give Special Item - 1A= 3 Water, 1B= 1 take, jump to 21 14 Give Special Item - 1A= 4 Water, 1B= 1 take, jump to 21 15 Give Special Item - 1A= 5 Water, 1B= 1 take, jump to 21 16 Give Special Item - 1A= 6 Water, 1B= 1 take, jump to 21 17 Give Special Item - 1A= 7 Water, 1B= 1 take, jump to 21 18 Give Special Item - 1A= 8 Water, 1B= 1 take, jump to 21 19 Give Special Item - 1A= 9 Water, 1B= 1 take, jump to 21 20 Give Special Item - 1A= 10 Water, 1B= 1 take, jump to 21 21 Stuff Done Flag? - 292,1, >= 1A= 2 goto 21G, < 1B= 1 goto 21A, else jump to 21B 21A Increment Flag - 292,0, 1A= 1, 1B= 1 decrease Stuff Done Flag? - 292,0, >= 1A= 10 goto 21D, < 1B= 8 goto 26, else jump to 21C 21C Display Small Message - 'more dehydrated' Play a Sound - 1A = 17 Short cough, jump to 23 21D Display Small Message - 'consumed 1 unit of water' Play a Sound - 1A = 56 Swallow, jump to 23 21B Increment Flag - 292,0, 1A= 1, 1B= 0 increase Stuff Done Flag? - 292,0, >= 1A= 20 goto 21G, < 1B= 11 goto 21E, else jump to 21F 21E Display Small Message - 'more hydrated', jump to 22 21F Display Small Message - 'gained 1 unit of water', jump to 22 22 Play a Sound - 1A = 62 Hmmmmm, jump to 23 21G Set Flag - 292,0, 1A= 20, jump to 40 23 Stuff Done Flag? - 292,0, >= 1A= 19 goto 39, < 1B= 8 goto 26, else jump to 23A 23A Stuff Done Flag? - 292,0, >= 1A= 18 goto 18, < 1B= 11 goto 27, else jump to 23B 23B Stuff Done Flag? - 292,0, >= 1A= 17 goto 17, < 1B= 12 goto 31, else jump to 23C 23C Stuff Done Flag? - 292,0, >= 1A= 16 goto 16, < 1B= 13 goto 32, else jump to 23D 23D Stuff Done Flag? - 292,0, >= 1A= 15 goto 15, < 1B= 14 goto 33, else jump to 34 26 Kill/Raise Dead - 'death message,' 1A= 1 dust, 1B= 1 hurt Kill/Raise Dead - 1A= 1 dust, 1B= 1 hurt, -1 27 Stuff Done Equal? - 292,1, = 1A= 0 goto 27A, else jump to 27B 27A Stuff Done Flag? - 292,0, >= 1A= 10 goto 30A, < 1B= 9 goto 28A, else jump to 29A 27B Stuff Done Flag? - 292,0, >= 1A= 10 goto 30B, < 1B= 9 goto 28B, else jump to 29B 28A AP Affect Health - 'extremely weak and disoriented', 1A= 120, 1B= 1 lower AP Dumbfounding - 1A= 2, 1B= 1 inflict, -1 28B AP Affect Health - 'still very weak, need to find water', 1A= 20, 1B= 0 raise, -1 29A AP Affect Health - 'lack of water, weaker', 1A= 70, 1B= 1 lower, -1 29B AP Affect Health - 'still weak, need to find water', 1A= 10, 1B= 0 raise, -1 30A Display Message - 'out of water, find some soon before you weaken', -1 30B Display Message - 'at normal hydration levels, but you need to find some water', -1 31 Give Special Item - 1A= 1 Water, 1B= 0 give, -1 32 Give Special Item - 1A= 2 Water, 1B= 0 give, -1 33 Give Special Item - 1A= 3 Water, 1B= 0 give, -1 34 Give Special Item - 1A= 4 Water, 1B= 0 give, -1 35 Give Special Item - 1A= 5 Water, 1B= 0 give, -1 36 Give Special Item - 1A= 6 Water, 1B= 0 give, -1 37 Give Special Item - 1A= 7 Water, 1B= 0 give, -1 38 Give Special Item - 1A= 8 Water, 1B= 0 give, -1 39 Give Special Item - 1A= 9 Water, 1B= 0 give, -1 40 Give Special Item - '10 units of water,' 1A= 10 Water, 1B= 0 give, -1