kikbox.qsrc 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. # kikbox
  2. if $ARGS[0] = 'start':
  3. cla
  4. if pcs_health <= 0:
  5. killvar'damage'
  6. '<b><font color = red>You lost by TKO</font></b>'
  7. xgt 'enderKik','lossKO'
  8. exit
  9. elseif healthV <= 0:
  10. killvar'damage'
  11. '<b><font color = green><<$boydesc>> lost by TKO</font></b>'
  12. xgt 'enderKik','winKO'
  13. exit
  14. end
  15. if round >= 1:
  16. '<center><b>Round <<round>></b></center>'
  17. *nl
  18. if sparing = 1:
  19. '<center><img <<$set_imgh>> src="images/locations/city/citycenter/gym/kickboxing/kik1.jpg"></center>'
  20. else
  21. '<center><img <<$set_imgh>> src="images/locations/city/citycenter/gym/kickboxing/ring<<round>>.jpg"></center>'
  22. end
  23. cla
  24. minround += 1
  25. '<b>= = = = = = = = = = = = = (ROUND <<round>>) = = = = = = = = = = = = =</b>'
  26. if minround = 1:'<b>Start of the round</b>'
  27. if minround = 2:'<b>Time in round 0:30</b>'
  28. if minround = 3:'<b>Time in round 1:00</b>'
  29. if minround = 4:'<b>Time in round 1:30</b>'
  30. if minround = 5:'<b>Time in round 2:00</b>'
  31. if minround = 6:'<b>Time in round 2:30</b>'
  32. '<b><<$boydesc>></b> Life <b><font color="red"><<healthV>></font></b>, Endurance <b><font color="green"><<staminaV>></font></b>'
  33. 'Your life <b><font color="red"><<pcs_health>></font></b>, Endurance <b><font color="green"><<pcs_stam>></font></b>'
  34. '<b>= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =</b>'
  35. 'Your points <<pointKik>> Points opponent <<pointKikV>>'
  36. '<b>= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =</b>'
  37. gs 'initKik'
  38. if hod = 0:
  39. !!Player attacks
  40. '<font color="green">You can attack</font>'
  41. act 'Fast Jab':
  42. cla
  43. damage = rand(pcs_stren/12, pcs_stren/8)
  44. if damage <= 0:damage = 1
  45. koefatak = (pcs_agil + pcs_react + pcs_jab) * 2
  46. koefpop = koefatak * 20 / 100
  47. popad = rand(koefatak - koefpop, koefatak + koefpop)
  48. '<font color="green">You go for the quick jab and step forward.</font>'
  49. gs 'Kikatak', 'player'
  50. xgt 'kikbox', 'sta'
  51. end
  52. act 'Power punch':
  53. cla
  54. damkoef = pcs_stren * 20 / 100
  55. damage = rand(pcs_stren - damkoef, pcs_stren + damkoef)
  56. if damage <= 0:damage = 1
  57. koefatak = (pcs_agil + pcs_react + pcs_punch)
  58. koefpop = koefatak * 20 / 100
  59. popad = rand(koefatak - koefpop, koefatak + koefpop)
  60. '<font color="green">You attempt a powerful punch.</font>'
  61. gs 'Kikatak', 'player'
  62. xgt 'kikbox', 'sta'
  63. end
  64. act 'Big kick':
  65. cla
  66. damkoef = pcs_stren * 20 / 100
  67. damage = rand((pcs_stren - damkoef) * 3, (pcs_stren + damkoef) * 3)
  68. if damage <= 0:damage = 1
  69. koefatak = (pcs_agil + pcs_react + pcs_kick) / 2
  70. koefpop = koefatak * 20 / 100
  71. popad = rand(koefatak - koefpop, koefatak + koefpop)
  72. '<font color="green">You try a powerful kick.</font>'
  73. gs 'Kikatak', 'player'
  74. xgt 'kikbox', 'sta'
  75. end
  76. else
  77. !!Enemy attacks
  78. '<font color="red"><<$boydesc>> attacks</font>'
  79. tiprand = rand(0, 2)
  80. if tiprand = 0:
  81. damage = rand(strenV / 12, strenV / 8)
  82. if damage <= 0:damage = 1
  83. koefatak = (speedV + reactV + JabV) * 2
  84. koefpop = koefatak * 20 / 100
  85. popad = rand(koefatak - koefpop, koefatak + koefpop)
  86. '<font color="red"><<$boydesc>> deals with quick jab, stepping forward.</font>'
  87. gs 'Kikatak', 'enemy'
  88. xgt 'kikbox', 'sta'
  89. elseif tiprand = 1:
  90. damkoef = strenV * 20/100
  91. damage = rand(strenV - damkoef, strenV + damkoef)
  92. if damage <= 0:damage = 1
  93. koefatak = (speedV + reactV + punchV)
  94. koefpop = koefatak * 20 / 100
  95. popad = rand(koefatak - koefpop, koefatak + koefpop)
  96. '<font color="red"><<$boydesc>> applies a power punch.</font>'
  97. gs 'Kikatak', 'enemy'
  98. xgt 'kikbox', 'sta'
  99. elseif tiprand = 2:
  100. damkoef = strenV * 20 / 100
  101. damage = rand((strenV - damkoef) * 3, (strenV + damkoef) * 3)
  102. if damage <= 0:damage = 1
  103. koefatak = (speedV + reactV + kikV) / 2
  104. koefpop = koefatak * 20 / 100
  105. popad = rand(koefatak - koefpop, koefatak + koefpop)
  106. '<font color="red"><<$boydesc>> goes for a kick.</font>'
  107. gs 'Kikatak', 'enemy'
  108. xgt 'kikbox', 'sta'
  109. end
  110. end
  111. end
  112. end
  113. if $ARGS[0] = 'sta':
  114. cla
  115. ionce = 0
  116. '<b>= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =</b>'
  117. if minround = 1:'<b>Time in round 0:30</b>'
  118. if minround = 2:'<b>Time in round 1:00</b>'
  119. if minround = 3:'<b>Time in round 1:30</b>'
  120. if minround = 4:'<b>Time in round 2:00</b>'
  121. if minround = 5:'<b>Time in round 2:30</b>'
  122. if minround = 6:'<b>Time in round 3:00</b>'
  123. '<b>= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =</b>'
  124. '<b><<$boydesc>></b> Life <b><font color="red"><<healthV>></font></b>, Endurance <b><font color="green"><<staminaV>></font></b>'
  125. 'Your life <b><font color="red"><<pcs_health>></font></b>, Endurance <b><font color="green"><<pcs_stam>></font></b>'
  126. '<b>= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =</b>'
  127. act 'Further':gt 'kikbox', 'start'
  128. if minround = 6:
  129. cla
  130. minround = 0
  131. round += 1
  132. 'The bell rings indicating the end of round <<round>>.'
  133. if round <= formula:
  134. act 'Back to the corner':
  135. cls
  136. '<center><img <<$set_imgh>> src="images/locations/city/citycenter/gym/kickboxing/kickboxing_corner.jpg"></center>'
  137. 'You try to rest as best as you can.'
  138. act 'Return to the ring':gt 'kikbox', 'start'
  139. end
  140. elseif round > formula and sparing = 0:
  141. act 'Go to the middle of the ring for the announcement':
  142. cla
  143. if pointKik > pointKikV:
  144. killvar'damage'
  145. gt 'enderKik', 'win'
  146. elseif pointKik < pointKikV:
  147. killvar'damage'
  148. gt 'enderKik', 'loss'
  149. elseif pointKik = pointKikV:
  150. killvar'damage'
  151. gt 'enderKik', 'draw'
  152. end
  153. end
  154. elseif round > formula and sparing = 1:
  155. if pointKik > pointKikV:
  156. killvar'damage'
  157. gt 'enderKik', 'win'
  158. elseif pointKik < pointKikV:
  159. killvar'damage'
  160. gt 'enderKik', 'loss'
  161. elseif pointKik = pointKikV:
  162. killvar'damage'
  163. gt 'enderKik', 'draw'
  164. end
  165. end
  166. end
  167. end
  168. --- kikbox ---------------------------------