chessplay.qsrc 7.8 KB

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