FSfight.qsrc 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. # FSfight
  2. menu_off = 1
  3. minut += 1
  4. gs 'stat'
  5. 'Your health <<FSHP>>.'
  6. '<<$FSnameV>>Health <<FSHPV>>'
  7. !!end of the fight
  8. if FSHP <= 0:
  9. FSloss += 1
  10. 'You lost the fight'
  11. act 'Leave':gt 'FSgame'
  12. exit
  13. end
  14. if FSHPV <= 0:
  15. FSWin += 1
  16. '<<$FSnameV>> fell. You win the fight.'
  17. 'You got <<FSPrizeM>> coins and <<FSPrizeExp>> experience'
  18. act 'Disengage':gt 'FSgame'
  19. exit
  20. end
  21. !!initiative
  22. KGOLiniV = rand(FSreaktV / 2, FSreaktV * 2)
  23. KGOLini = rand(FSreakt / 2, FSreakt * 2)
  24. if KGOLini = KGOLiniV:
  25. hodrand = rand(0, 1)
  26. if hodrand = 0:KGOLini = 1 & KGOLiniV = 0
  27. if hodrand = 1:KGOLini = 0 & KGOLiniV = 1
  28. end
  29. if KGOLini > KGOLiniV:KGOLiniSUM += 1
  30. if KGOLini < KGOLiniV:KGOLiniSUM -= 1
  31. if KGOLiniSUM > 3:KGOLini = 0 & KGOLiniV = 1 & KGOLiniSUM = 0
  32. if KGOLiniSUM < -3:KGOLini = 1 & KGOLiniV = 0 & KGOLiniSUM = 0
  33. !!moves
  34. if KGOLini > KGOLiniV:
  35. 'Now your turn'
  36. act 'Attack':
  37. cls
  38. ''
  39. dynamic $FSatk
  40. act 'Further':gt $curloc
  41. end
  42. else
  43. 'Now opponents'
  44. '<<$FSnameV>> attacks you'
  45. dynamic $FSatkV
  46. act 'Further':gt $curloc
  47. end
  48. --- FSfight ---------------------------------