364_FSfight 1.0 KB

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