Guest User

Untitled

a guest
Jan 21st, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.21 KB | None | 0 0
  1. (24*14,
  2. [
  3. (try_for_range, ":town_no", towns_begin, towns_end), # Floris // Adjust Population Depending on Prosperity
  4. (party_get_slot, ":prosperity", ":town_no", slot_town_prosperity),
  5. (party_get_slot, ":population", ":town_no", slot_center_population),
  6. (assign,":change",1),
  7. (try_begin),
  8. (ge, ":prosperity", 60),
  9. (store_sub, ":change", ":prosperity",60),
  10. (val_div, ":change", 5),
  11. (val_add, ":change", 3),
  12. (else_try),
  13. (le, ":prosperity", 40),
  14. (store_sub, ":change", 40),
  15. (val_div, ":change", 5),
  16. (val_sub, ":change", 3),
  17. (try_end),
  18. (store_div,":base",":population",100), # Base population change is 1% of pop
  19. (val_mul,":change",":base"),
  20. (val_add,":population", ":change"),
  21. (try_begin),
  22. (gt, ":population", 30000),
  23. (assign, ":population", 30000),
  24. (party_set_slot, ":town_no", slot_center_population, ":population"),
  25. (else_try),
  26. (lt, ":population", 5000),
  27. (assign, ":population", 5000),
  28. (party_set_slot, ":town_no", slot_center_population, ":population"),
  29. (else_try),
  30. (party_set_slot, ":town_no", slot_center_population, ":population"),
  31. (try_end),
  32. (try_end),
  33.  
  34.  
  35. (try_for_range, ":town_no", towns_begin, towns_end), # Floris // Calculating Land Demand and Consequences for supply, pricing and renting
  36. (party_get_slot, ":population", ":town_no", slot_center_population),
  37. (party_get_slot, ":land_town", ":town_no", slot_town_acres),
  38. (party_get_slot, ":land_player", ":town_no", slot_player_acres),
  39. (try_begin),
  40. (store_div, ":acres_needed", ":population", 200), # 200 People warrant 1 acre of cultivated land
  41. (store_add, ":total_land", ":land_town", ":land_player"),
  42. (store_sub, ":surplus", ":total_land", ":acres_needed"),
  43. (try_begin),
  44. (lt, ":total_land", ":acres_needed"),
  45. (store_sub, ":new_acres", ":acres_needed", ":total_land"),
  46. (val_add, ":land_town", ":new_acres"),
  47. (party_set_slot, ":town_no", slot_town_acres, ":land_town"),
  48. (else_try),
  49. (ge, ":surplus", 20),
  50. (val_sub, ":land_town", 2),
  51. (party_set_slot, ":town_no", slot_town_acres, ":land_town"),
  52. (try_end),
  53.  
  54. (try_begin),
  55. (le, ":total_land", ":acres_needed"),
  56. (val_mul, ":land_player", 100), # Rent
  57. (party_set_slot, ":town_no", slot_rent, ":land_player"),
  58. (else_try),
  59. (store_mul, ":penalty", ":surplus", -3),
  60. (val_add, ":penalty", 100),
  61. (try_begin),
  62. (ge, ":penalty", 70),
  63. (val_mul, ":land_player", ":penalty"),
  64. (party_set_slot, ":town_no", slot_rent, ":land_player"),
  65. (else_try),
  66. (store_sub, ":non_rented", ":surplus", 10),
  67. (val_sub, ":land_player", ":non_rented"),
  68. (val_mul, ":land_player", 70),
  69. (party_set_slot, ":town_no", slot_rent, ":land_player"),
  70. (val_mul, ":non_rented", -50),
  71. (party_set_slot, ":town_no", slot_upkeep, ":non_rented"),
  72. (try_end),
  73. (try_end),
  74. (try_end),
  75. (party_get_slot, ":assets", ":town_no", slot_assets), # Adding/Subtracting profits/losses
  76. (val_add, ":assets", slot_rent),
  77. (val_sub, ":assets", slot_upkeep),
  78. (party_set_slot, ":town_no", slot_assets, ":assets"),
  79. (try_end),
  80.  
  81. ]),
Add Comment
Please, Sign In to add comment