structs.lisp 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. ;; This gets created when travelling to a
  2. ;; new sector
  3. (defclass sector ()
  4. ((market
  5. :initarg :market
  6. :accessor market)
  7. (hazards
  8. :initarg :hazards
  9. :accessor hazards
  10. :initform NIL)
  11. (boons
  12. :initarg :boons
  13. :accessor boons
  14. :initform NIL)
  15. (player-ship-obj
  16. :initarg :player-ship-obj
  17. :accessor player-ship-obj
  18. :initform NIL)
  19. (enemy-ships
  20. :initarg :enemy-ships
  21. :accessor enemy-ships
  22. :initform NIL)))
  23. (defclass ship ()
  24. ((armor-val
  25. :initarg :armor-val
  26. :accessor armor-val
  27. :initform 10)
  28. (rep-shield-val
  29. :initarg :rep-shield-val
  30. :accessor rep-shield-val
  31. :initform 10)
  32. (warp-drive-power ; 0 off, 1 on
  33. :initarg :warp-drive-power
  34. :accessor warp-drive-power
  35. :initform 1)
  36. (reactor-str ; 0 - low power, 1 - full power, 2 - overdrive
  37. :initarg :reactor-str
  38. :accessor reactor-str
  39. :initform 1)
  40. (warp-field ; 0 - low power, 1 - full power
  41. :initarg :warp-field
  42. :accessor warp-field
  43. :initform 1)
  44. (weapons
  45. :initarg :weapons
  46. :accessor weapons)
  47. (credits
  48. :initarg :credits
  49. :accessor credits
  50. :initform 1000)
  51. (crew
  52. :initarg :crew
  53. :accessor crew)
  54. (inventory
  55. :initarg :inventory
  56. :accessor inventory)))
  57. (defclass ai-ship (ship)
  58. ((name
  59. :initarg :name
  60. :accessor name
  61. :initform NIL)
  62. (ai-type
  63. :initarg :ai-type
  64. :accessor ai-type
  65. :initform NIL)))
  66. (defclass player-inventory ()
  67. ((petrofuel
  68. :initarg :petrofuel
  69. :accessor petrofuel
  70. :initform 20)
  71. (gruel
  72. :initarg :gruel
  73. :accessor gruel
  74. :initform 20)
  75. (spice
  76. :initarg :spice
  77. :accessor spice
  78. :initform 0)
  79. (ammo
  80. :initarg :ammo
  81. :accessor ammo
  82. :initform 20)
  83. (archeotech
  84. :initarg :archeotech
  85. :accessor archeotech
  86. :initform 0)))
  87. (defclass crew ()
  88. ((sanity-val ; Max 100
  89. :initarg :sanity-val
  90. :accessor sanity-val
  91. :initform 100)
  92. (moral-val
  93. :initarg :moral-val
  94. :accessor moral-val
  95. :initform 100)
  96. (crew-members
  97. :initarg :crew-members ; List of *uniq-crew-mem*
  98. :accessor crew-members)))
  99. ;;; Unique crew member that can provide an abstract buff
  100. ;;; or nerf to some internal game system
  101. (defclass uniq-crew-mem ()
  102. ((name
  103. :initarg :name
  104. :accessor name)
  105. (buff
  106. :initarg :buff
  107. :accessor buff
  108. :initform NIL)))
  109. (defclass crew-buff ()
  110. ((name
  111. :initarg :name
  112. :accessor name)
  113. (buff-type
  114. :initarg :buff-type
  115. :accessor buff-type
  116. :initform NIL)
  117. (buff-value
  118. :initarg :buff-value
  119. :accessor buff-value
  120. :initform NIL)))
  121. (defclass weapon ()
  122. ((name
  123. :initarg :name
  124. :accessor name)
  125. (shield-dmg
  126. :initarg :shield-dmg
  127. :accessor shield-dmg)
  128. (hull-dmg
  129. :initarg :hull-dmg
  130. :accessor hull-dmg)
  131. (ammo-cost
  132. :initarg :ammo-cost
  133. :accessor ammo-cost)))
  134. (defclass market ()
  135. ((price-of-petrofuel
  136. :initarg :petrofuel
  137. :accessor price-of-petrofuel
  138. :initform 10)
  139. (price-of-gruel
  140. :initarg :gruel
  141. :accessor price-of-gruel
  142. :initform 5)
  143. (price-of-spice
  144. :initarg :spice
  145. :accessor price-of-spice
  146. :initform 100)
  147. (price-of-ammo
  148. :initarg :ammo
  149. :accessor price-of-ammo
  150. :initform 20)
  151. (price-of-archeotech
  152. :initarg :archeotech
  153. :accessor price-of-archeotech
  154. :initform 2000)))