chessplay 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295
  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 - chess) / 100
  8. chess += rand(intel/20,intel/10)
  9. intel += 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. gs 'chessplay', 'game'
  62. end
  63. act 'Heavy defense':
  64. chessM = rand (0,5)
  65. if chessM = 0:
  66. 'Your opponent tries to trap you, but you easily avoid it and gain a good advantage.'
  67. if chess_ind < 4:
  68. chess_GG += 4 - chess_ind
  69. chess_com -= 4 + chess_ind
  70. else
  71. 'However their superior skill negates that advantage.'
  72. end
  73. elseif chessM = 1:
  74. 'Your opponent goes offensive you absorb some of it, but still lose some advantage.'
  75. if chess_ind > -2:
  76. chess_GG -= 2 + chess_ind
  77. chess_com += 2 - chess_ind
  78. else
  79. 'However your superior skill negates that advantage.'
  80. end
  81. elseif chessM = 2:
  82. 'Your opponent goes aggressive much to their advantage.'
  83. if chess_ind > -4:
  84. chess_GG -= 4 + chess_ind
  85. chess_com += 4 - chess_ind
  86. else
  87. 'However your superior skill negates that advantage.'
  88. end
  89. elseif chessM = 3:
  90. 'Your opponent tries to manoeuvre the game pieces, but your defensive actions expose some of their efforts, to your advantage.'
  91. if chess_ind < 2:
  92. chess_GG += 2 - chess_ind
  93. chess_com -= 2 + chess_ind
  94. else
  95. 'However their superior skill negates that advantage.'
  96. end
  97. else
  98. 'Your opponent also goes defensive and neither of you gain any advantage.'
  99. end
  100. gs 'chessplay', 'game'
  101. end
  102. act 'Go offensive':
  103. chessM = rand (0,5)
  104. if chessM = 0:
  105. 'Your opponent tries to trap you, gaining some advantage.'
  106. if chess_ind > -2:
  107. chess_GG -= 2 + chess_ind
  108. chess_com += 2 - chess_ind
  109. else
  110. 'However your superior skill negates that advantage.'
  111. end
  112. elseif chessM = 1:
  113. 'Your opponent goes offensive much to your advantage.'
  114. if chess_ind < 4:
  115. chess_GG += 4 - chess_ind
  116. chess_com -= 4 + chess_ind
  117. else
  118. 'However their superior skill negates that advantage.'
  119. end
  120. elseif chessM = 2:
  121. 'Your opponent goes aggressive you easily absorb it, and gain some advantage.'
  122. if chess_ind < 2:
  123. chess_GG += 2 - chess_ind
  124. chess_com -= 2 + chess_ind
  125. else
  126. 'However their superior skill negates that advantage.'
  127. end
  128. elseif chessM = 3:
  129. 'Your opponent tries to manoeuvre the game pieces, your offensive actions leave you exposed, and they take advantage.'
  130. if chess_ind > -4:
  131. chess_GG -= 4 + chess_ind
  132. chess_com += 4 - chess_ind
  133. else
  134. 'However your superior skill negates that advantage.'
  135. end
  136. else
  137. 'Your opponent also goes on the attack and neither of you gain any advantage.'
  138. end
  139. gs 'chessplay', 'game'
  140. end
  141. act 'Be aggressive':
  142. chessM = rand (0,5)
  143. if chessM = 0:
  144. 'Your opponent tries to trap you, and you are playing right into their hands.'
  145. if chess_ind > -4:
  146. chess_GG -= 4 + chess_ind
  147. chess_com += 4 - chess_ind
  148. else
  149. 'However your superior skill negates that advantage.'
  150. end
  151. elseif chessM = 1:
  152. 'Your opponent goes defensive to your advantage.'
  153. if chess_ind < 2:
  154. chess_GG += 2 - chess_ind
  155. chess_com -= 2 + chess_ind
  156. else
  157. 'However their superior skill negates that advantage.'
  158. end
  159. elseif chessM = 2:
  160. 'Your opponent goes heavily defensive very much to your advantage.'
  161. if chess_ind < 4:
  162. chess_GG += 4 - chess_ind
  163. chess_com -= 4 + chess_ind
  164. else
  165. 'However their superior skill negates that advantage.'
  166. end
  167. elseif chessM = 3:
  168. 'Your opponent tries to manoeuvre the game pieces, gaining some advantage.'
  169. if chess_ind > -2:
  170. chess_GG -= 2 + chess_ind
  171. chess_com += 2 - chess_ind
  172. else
  173. 'However your superior skill negates that advantage.'
  174. end
  175. else
  176. 'Your opponent also goes on the attack and neither of you gain any advantage.'
  177. end
  178. gs 'chessplay', 'game'
  179. end
  180. act 'Bait trap':
  181. chessM = rand (0,5)
  182. if chessM = 0:
  183. 'Your opponent goes offensive to your advantage.'
  184. if chess_ind < 2:
  185. chess_GG += 2 - chess_ind
  186. chess_com -= 2 + chess_ind
  187. else
  188. 'However their superior skill negates that advantage.'
  189. end
  190. elseif chessM = 1:
  191. 'Your opponent goes defensive to their advantage.'
  192. if chess_ind > -2:
  193. chess_GG -= 2 + chess_ind
  194. chess_com += 2 - chess_ind
  195. else
  196. 'However your superior skill negates that advantage.'
  197. end
  198. elseif chessM = 2:
  199. 'Your opponent goes heavily defensive exposing your tactics much to their advantage.'
  200. if chess_ind > -4:
  201. chess_GG -= 4 + chess_ind
  202. chess_com += 4 - chess_ind
  203. else
  204. 'However your superior skill negates that advantage.'
  205. end
  206. elseif chessM = 3:
  207. 'Your opponent goes aggressive much to your advantage.'
  208. if chess_ind < 4:
  209. chess_GG += 4 - chess_ind
  210. chess_com -= 4 + chess_ind
  211. else
  212. 'However their superior skill negates that advantage.'
  213. end
  214. else
  215. 'Your opponent also goes tactical and neither of you gain any advantage.'
  216. end
  217. gs 'chessplay', 'game'
  218. end
  219. act 'Manoeuvre the game pieces':
  220. chessM = rand (0,5)
  221. if chessM = 0:
  222. 'Your opponent goes offensive, much to your advantage.'
  223. if chess_ind < 4:
  224. chess_GG += 4 - chess_ind
  225. chess_com -= 4 + chess_ind
  226. else
  227. 'However their superior skill negates that advantage.'
  228. end
  229. elseif chessM = 1:
  230. 'Your opponent goes defensive much to their advantage.'
  231. if chess_ind > -4:
  232. chess_GG -= 4 + chess_ind
  233. chess_com += 4 - chess_ind
  234. else
  235. 'However your superior skill negates that advantage.'
  236. end
  237. elseif chessM = 2:
  238. 'Your opponent goes heavily defensive exposing your tactics to their advantage.'
  239. if chess_ind > -2:
  240. chess_GG -= 2 + chess_ind
  241. chess_com += 2 - chess_ind
  242. else
  243. 'However your superior skill negates that advantage.'
  244. end
  245. elseif chessM = 3:
  246. 'Your opponent goes aggressive to your advantage.'
  247. if chess_ind < 2:
  248. chess_GG += 2 - chess_ind
  249. chess_com -= 2 + chess_ind
  250. else
  251. 'However their superior skill negates that advantage.'
  252. end
  253. else
  254. 'Your opponent also goes tactical and neither of you gain any advantage.'
  255. end
  256. gs 'chessplay', 'game'
  257. end
  258. end
  259. if $ARGS[0] = 'win':
  260. cls
  261. gs 'stat'
  262. chess_win += 1
  263. 'You have won this game.'
  264. act 'Return': gt $loc
  265. end
  266. if $ARGS[0] = 'lose':
  267. cls
  268. gs 'stat'
  269. 'You have lost this game.'
  270. act 'Return': gt $loc
  271. end
  272. --- chessplay ---------------------------------