chessplay.qsrc 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315
  1. # chessplay
  2. menu_off = 1
  3. if $ARGS[0] = '':
  4. if $chess_name='':$chess_name='girl'
  5. gs'stat'
  6. chess_GG = 20
  7. chess_com = 20
  8. chess_ind = (chessV - pcs_chess) / 100
  9. chess_exp += rand(pcs_intel/20,pcs_intel/10)
  10. intel_exp += 1
  11. minut += 60
  12. gt 'chessplay', 'game'
  13. end
  14. if $ARGS[0] = 'game':
  15. if chess_GG <= 0:
  16. gt 'chessplay', 'lose'
  17. elseif chess_com <= 0:
  18. gt 'chessplay', 'win'
  19. else
  20. gs 'chessplay', 'moves'
  21. end
  22. end
  23. if $ARGS[0] = 'moves':
  24. cla
  25. act 'Go defensive':
  26. chessM = rand (0,5)
  27. if chessM = 0:
  28. 'Your opponent tries to trap you, but you avoid it and gain some advantage.'
  29. if chess_ind > 2:
  30. chess_GG += 2 - chess_ind
  31. chess_com -= 2 + chess_ind
  32. else
  33. 'However their superior skill negates that advantage.'
  34. end
  35. elseif chessM = 1:
  36. 'Your opponent goes offensive much to their advantage.'
  37. if chess_ind < -4:
  38. chess_GG -= 4 + chess_ind
  39. chess_com += 4 - chess_ind
  40. else
  41. 'However your superior skill negates that advantage.'
  42. end
  43. elseif chessM = 2:
  44. 'Your opponent goes aggressive you absorb some of it, but still lose some advantage.'
  45. if chess_ind < -2:
  46. chess_GG -= 2 + chess_ind
  47. chess_com += 2 - chess_ind
  48. else
  49. 'However your superior skill negates that advantage.'
  50. end
  51. elseif chessM = 3:
  52. 'Your opponent tries to manoeuvre the game pieces, but your defensive actions expose all their efforts, much to your advantage.'
  53. if chess_ind > 4:
  54. chess_GG += 4 - chess_ind
  55. chess_com -= 4 + chess_ind
  56. else
  57. 'However their superior skill negates that advantage.'
  58. end
  59. else
  60. 'Your opponent also goes defensive and neither of you gain any advantage.'
  61. end
  62. chess_GG -= 1
  63. chess_com -= 1
  64. gs 'chessplay', 'game'
  65. end
  66. act 'Heavy defense':
  67. chessM = rand (0,5)
  68. if chessM = 0:
  69. 'Your opponent tries to trap you, but you easily avoid it and gain a good advantage.'
  70. if chess_ind > 4:
  71. chess_GG += 4 - chess_ind
  72. chess_com -= 4 + chess_ind
  73. else
  74. 'However their superior skill negates that advantage.'
  75. end
  76. elseif chessM = 1:
  77. 'Your opponent goes offensive you absorb some of it, but still lose some advantage.'
  78. if chess_ind < -2:
  79. chess_GG -= 2 + chess_ind
  80. chess_com += 2 - chess_ind
  81. else
  82. 'However your superior skill negates that advantage.'
  83. end
  84. elseif chessM = 2:
  85. 'Your opponent goes aggressive much to their advantage.'
  86. if chess_ind < -4:
  87. chess_GG -= 4 + chess_ind
  88. chess_com += 4 - chess_ind
  89. else
  90. 'However your superior skill negates that advantage.'
  91. end
  92. elseif chessM = 3:
  93. 'Your opponent tries to manoeuvre the game pieces, but your defensive actions expose some of their efforts, to your advantage.'
  94. if chess_ind > 2:
  95. chess_GG += 2 - chess_ind
  96. chess_com -= 2 + chess_ind
  97. else
  98. 'However their superior skill negates that advantage.'
  99. end
  100. else
  101. 'Your opponent also goes defensive and neither of you gain any advantage.'
  102. end
  103. chess_GG -= 1
  104. chess_com -= 1
  105. gs 'chessplay', 'game'
  106. end
  107. act 'Go offensive':
  108. chessM = rand (0,5)
  109. if chessM = 0:
  110. 'Your opponent tries to trap you, gaining some advantage.'
  111. if chess_ind < -2:
  112. chess_GG -= 2 + chess_ind
  113. chess_com += 2 - chess_ind
  114. else
  115. 'However your superior skill negates that advantage.'
  116. end
  117. elseif chessM = 1:
  118. 'Your opponent goes offensive much to your advantage.'
  119. if chess_ind > 4:
  120. chess_GG += 4 - chess_ind
  121. chess_com -= 4 + chess_ind
  122. else
  123. 'However their superior skill negates that advantage.'
  124. end
  125. elseif chessM = 2:
  126. 'Your opponent goes aggressive you easily absorb it, and gain some advantage.'
  127. if chess_ind > 2:
  128. chess_GG += 2 - chess_ind
  129. chess_com -= 2 + chess_ind
  130. else
  131. 'However their superior skill negates that advantage.'
  132. end
  133. elseif chessM = 3:
  134. 'Your opponent tries to manoeuvre the game pieces, your offensive actions leave you exposed, and they take advantage.'
  135. if chess_ind < -4:
  136. chess_GG -= 4 + chess_ind
  137. chess_com += 4 - chess_ind
  138. else
  139. 'However your superior skill negates that advantage.'
  140. end
  141. else
  142. 'Your opponent also goes on the attack and neither of you gain any advantage.'
  143. end
  144. chess_GG -= 1
  145. chess_com -= 1
  146. gs 'chessplay', 'game'
  147. end
  148. act 'Be aggressive':
  149. chessM = rand (0,5)
  150. if chessM = 0:
  151. 'Your opponent tries to trap you, and you are playing right into their hands.'
  152. if chess_ind < -4:
  153. chess_GG -= 4 + chess_ind
  154. chess_com += 4 - chess_ind
  155. else
  156. 'However your superior skill negates that advantage.'
  157. end
  158. elseif chessM = 1:
  159. 'Your opponent goes defensive to your advantage.'
  160. if chess_ind > 2:
  161. chess_GG += 2 - chess_ind
  162. chess_com -= 2 + chess_ind
  163. else
  164. 'However their superior skill negates that advantage.'
  165. end
  166. elseif chessM = 2:
  167. 'Your opponent goes heavily defensive very much to your advantage.'
  168. if chess_ind > 4:
  169. chess_GG += 4 - chess_ind
  170. chess_com -= 4 + chess_ind
  171. else
  172. 'However their superior skill negates that advantage.'
  173. end
  174. elseif chessM = 3:
  175. 'Your opponent tries to manoeuvre the game pieces, gaining some advantage.'
  176. if chess_ind < -2:
  177. chess_GG -= 2 + chess_ind
  178. chess_com += 2 - chess_ind
  179. else
  180. 'However your superior skill negates that advantage.'
  181. end
  182. else
  183. 'Your opponent also goes on the attack and neither of you gain any advantage.'
  184. end
  185. chess_GG -= 1
  186. chess_com -= 1
  187. gs 'chessplay', 'game'
  188. end
  189. act 'Bait trap':
  190. chessM = rand (0,5)
  191. if chessM = 0:
  192. 'Your opponent goes offensive to your advantage.'
  193. if chess_ind > 2:
  194. chess_GG += 2 - chess_ind
  195. chess_com -= 2 + chess_ind
  196. else
  197. 'However their superior skill negates that advantage.'
  198. end
  199. elseif chessM = 1:
  200. 'Your opponent goes defensive to their advantage.'
  201. if chess_ind < -2:
  202. chess_GG -= 2 + chess_ind
  203. chess_com += 2 - chess_ind
  204. else
  205. 'However your superior skill negates that advantage.'
  206. end
  207. elseif chessM = 2:
  208. 'Your opponent goes heavily defensive exposing your tactics much to their advantage.'
  209. if chess_ind < -4:
  210. chess_GG -= 4 + chess_ind
  211. chess_com += 4 - chess_ind
  212. else
  213. 'However your superior skill negates that advantage.'
  214. end
  215. elseif chessM = 3:
  216. 'Your opponent goes aggressive much to your advantage.'
  217. if chess_ind > 4:
  218. chess_GG += 4 - chess_ind
  219. chess_com -= 4 + chess_ind
  220. else
  221. 'However their superior skill negates that advantage.'
  222. end
  223. else
  224. 'Your opponent also goes tactical and neither of you gain any advantage.'
  225. end
  226. chess_GG -= 1
  227. chess_com -= 1
  228. gs 'chessplay', 'game'
  229. end
  230. act 'Manoeuvre the game pieces':
  231. chessM = rand (0,5)
  232. if chessM = 0:
  233. 'Your opponent goes offensive, much to your advantage.'
  234. if chess_ind > 4:
  235. chess_GG += 4 - chess_ind
  236. chess_com -= 4 + chess_ind
  237. else
  238. 'However their superior skill negates that advantage.'
  239. end
  240. elseif chessM = 1:
  241. 'Your opponent goes defensive much to their advantage.'
  242. if chess_ind < -4:
  243. chess_GG -= 4 + chess_ind
  244. chess_com += 4 - chess_ind
  245. else
  246. 'However your superior skill negates that advantage.'
  247. end
  248. elseif chessM = 2:
  249. 'Your opponent goes heavily defensive exposing your tactics to their advantage.'
  250. if chess_ind < -2:
  251. chess_GG -= 2 + chess_ind
  252. chess_com += 2 - chess_ind
  253. else
  254. 'However your superior skill negates that advantage.'
  255. end
  256. elseif chessM = 3:
  257. 'Your opponent goes aggressive to your advantage.'
  258. if chess_ind > 2:
  259. chess_GG += 2 - chess_ind
  260. chess_com -= 2 + chess_ind
  261. else
  262. 'However their superior skill negates that advantage.'
  263. end
  264. else
  265. 'Your opponent also goes tactical and neither of you gain any advantage.'
  266. end
  267. chess_GG -= 1
  268. chess_com -= 1
  269. gs 'chessplay', 'game'
  270. end
  271. end
  272. if $ARGS[0] = 'win':
  273. *clr & cla
  274. gs 'stat'
  275. chess_win += 1
  276. 'You have won this game.'
  277. act 'Return': gt $loc
  278. end
  279. if $ARGS[0] = 'lose':
  280. *clr & cla
  281. gs 'stat'
  282. 'You have lost this game.'
  283. act 'Return': gt $loc
  284. end
  285. --- chessplay ---------------------------------