123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576 |
- # KGOLfight
- <<<<<<< 425_KGOLfight
- minut += 1
- gs 'stat'
- if otkathirki > 0: otkathirki -= 1
- if KGHP < KGHPMAX and KGOLhirka > 0 and otkathirki <= 0:
- kghneed = KGHPMAX - KGHP
- otkathirki = 3
- if KGOLhirka >= kghneed:
- KGOLhirka -= kghneed
- KGHP = KGHPMAX
- else
- KGHP = KGOLhirka
- KGOLhirka = 0
- end
- end
- if KGOLdist < 0: KGOLdist = 0
- if KGOLtimer > 0:
- KGOLtimer -= 1
- if KGOLtimer <= 0:
- KGOLbrona -= KGOLbronaMod
- KGOLbronaMod = 0
- KGOLstren -= KGOLstrenMod
- KGOLstrenMod = 0
- KGOLspeed -= KGOLspeedMod
- KGOLspeedMod = 0
- KGOLvital -= KGOLvitalMod
- KGOLvitalMod = 0
- KGOLintel -= KGOLintelMod
- KGOLintelMod = 0
- KGOLwpower -= KGOLwpowerMod
- KGOLwpowerMod = 0
- end
- end
- if unvis > 0: 'You are invisible'
- if poison > 0: poison -= 1 & KGHPV -= KGOLspell4 * 10 & 'The poison causes damage to the enemy <<KGOLspell4*10>>'
- if firecircle > 0: firecircle -= 1 & KGHPV -= KGOLspell9 * 50 & 'Circle of fire causes damage to the enemy <<KGOLspell9*50>>'
- 'Life <<KGHP>>, the manna <<KGManna>>'
- '<<$KGname>> Life <<KGHPV>>manna <<KGMannaV>>'
- if KGOLhirka > 0: 'Hirka can restore automatically <<KGOLhirka>> health units'
- if otkathirki > 0: 'Hirka retrace through <<otkathirki>> moves.'
- 'Distance <<KGOLdist>>'
- if KGOLtimer > 0: 'Obkast will act more <<KGOLtimer>> Rounds'
- if KGOLcooldown > 0: 'Rollback skills completed by <<KGOLcooldown>> Rounds'
- !конец боя
- if KGHP <= 0:
- KGOLloss += 1
- poison = 0
- firecircle = 0
- manna -= 100
- 'You lost the fight'
- act 'Go to Rep.': gt 'KGOLgame'
- =======
- minut+=1
- gs'stat'
- if otkathirki>0:otkathirki-=1
- if KGHP<KGHPMAX and KGOLhirka>0 and otkathirki<=0:
- kghneed=KGHPMAX-KGHP
- otkathirki=3
- if KGOLhirka>=kghneed:
- KGOLhirka-=kghneed
- KGHP=KGHPMAX
- else
- KGHP=KGOLhirka
- KGOLhirka=0
- end
- end
- if KGOLdist<0:KGOLdist=0
- if KGOLtimer>0:
- KGOLtimer-=1
- if KGOLtimer<=0:
- KGOLbrona-=KGOLbronaMod
- KGOLbronaMod=0
- KGOLstren-=KGOLstrenMod
- KGOLstrenMod=0
- KGOLspeed-=KGOLspeedMod
- KGOLspeedMod=0
- KGOLvital-=KGOLvitalMod
- KGOLvitalMod=0
- KGOLintel-=KGOLintelMod
- KGOLintelMod=0
- KGOLwpower-=KGOLwpowerMod
- KGOLwpowerMod=0
- end
- end
- if unvis>0:'you are invisible'
- if poison>0:poison-=1&KGHPV-=KGOLspell4*10&'The poison causes damage to the enemy <<KGOLspell4*10>>'
- if firecircle>0:firecircle-=1&KGHPV-=KGOLspell9*50&'Circle of fire causes damage to the enemy <<KGOLspell9*50>>'
- 'life <<KGHP>>, manna <<KGManna>>'
- '<<$KGname>> life <<KGHPV>>, manna <<KGMannaV>>'
- if KGOLhirka>0:'Khirqa can recover automatically <<KGOLhirka>> health units'
- if otkathirki>0:'Khirqa retrace through <<otkathirki>> moves.'
- 'distance <<KGOLdist>>'
- if KGOLtimer>0:'Obkast will act more <<KGOLtimer>> Rounds'
- if KGOLcooldown>0:'Rollback skills completed in <<KGOLcooldown>> Rounds'
- !end of the fight
- if KGHP<=0:
- KGOLloss+=1
- poison=0
- firecircle=0
- manna-=100
- 'You lost the fight'
- act 'Leave for rep':gt'KGOLgame'
- >>>>>>> 425_KGOLfight
- exit
- end
- <<<<<<< 425_KGOLfight
- if KGHPV <= 0:
- poison = 0
- firecircle = 0
- KGOLWin += 1
- KGOLmoney += KGOLPrizeM
- KGOLexp += KGOLPrizeExp
- manna += 100
- '<<$KGname>> fell. You win the fight.'
- 'You got <<KGOLPrizeM>> coins and <<KGOLPrizeExp>> experience'
- if KGOLennumBoss = 1 and boss5lvl = 0: boss5lvl = 1 & KGOLhirka += 5000 & 'With boss tumbled small hirka'
- if KGOLennum = 0 and KGOLmqw = 1: KGOLqwvip += 1 & 'Another mob zafarmlen quest for'
- if KGOLennum = 1 and KGOLmqw = 3: KGOLqwvip += 1 & 'Another mob zafarmlen quest for'
- if KGOLennum = 2 and KGOLmqw = 5: KGOLqwvip += 1 & 'Another mob zafarmlen quest for'
- if KGOLennum = 3 and KGOLmqw = 7: KGOLqwvip += 1 & 'Another mob zafarmlen quest for'
- if KGOLennum = 4 and KGOLmqw = 9: KGOLqwvip += 1 & 'Another mob zafarmlen quest for'
- if KGOLennum = 5 and KGOLmqw = 11: KGOLqwvip += 1 & 'Another mob zafarmlen quest for'
- if KGOLennum = 6 and KGOLmqw = 13: KGOLqwvip += 1 & 'Another mob zafarmlen quest for'
- act 'Disengage': gt 'KGOLgame'
- =======
- if KGHPV<=0:
- poison=0
- firecircle=0
- KGOLWin+=1
- KGOLmoney+=KGOLPrizeM
- KGOLexp+=KGOLPrizeExp
- manna+=100
- '<<$KGname>> down. You win the fight.'
- 'you got <<KGOLPrizeM>> coins and <<KGOLPrizeExp>> experience'
- if KGOLennumBoss=1 and boss5lvl=0:boss5lvl=1&KGOLhirka+=5000&'With boss fell out small Khirqa'
- if KGOLennum=0 and KGOLmqw=1:KGOLqwvip+=1&'Another mob zafarmlen for Quest'
- if KGOLennum=1 and KGOLmqw=3:KGOLqwvip+=1&'Another mob zafarmlen for Quest'
- if KGOLennum=2 and KGOLmqw=5:KGOLqwvip+=1&'Another mob zafarmlen for Quest'
- if KGOLennum=3 and KGOLmqw=7:KGOLqwvip+=1&'Another mob zafarmlen for Quest'
- if KGOLennum=4 and KGOLmqw=9:KGOLqwvip+=1&'Another mob zafarmlen for Quest'
- if KGOLennum=5 and KGOLmqw=11:KGOLqwvip+=1&'Another mob zafarmlen for Quest'
- if KGOLennum=6 and KGOLmqw=13:KGOLqwvip+=1&'Another mob zafarmlen for Quest'
- act 'Out of combat':gt'KGOLgame'
- >>>>>>> 425_KGOLfight
- exit
- end
- <<<<<<< 425_KGOLfight
- !инициатива
- KGOLiniV = RAND(KGOLspeedV/2, KGOLspeedV * 2)
- KGOLini = RAND(KGOLspeed/2, KGOLspeed * 2)
- if KGOLini = KGOLiniV:
- hodrand = RAND(0,1)
- if hodrand = 0: KGOLini = 1 & KGOLiniV = 0
- if hodrand = 1: KGOLini = 0 & KGOLiniV = 1
- end
- if KGOLini > KGOLiniV: KGOLiniSUM += 1
- if KGOLini < KGOLiniV: KGOLiniSUM -= 1
- if KGOLiniSUM > 3: KGOLini = 0 & KGOLiniV = 1 & KGOLiniSUM = 0
- if KGOLiniSUM<-3: KGOLini = 1 & KGOLiniV = 0 & KGOLiniSUM = 0
- !ходы
- if KGOLini > KGOLiniV or unvis > 0:
- 'Now your turn'
- if KGOLklass = 1:
- !воин
- if KGOLdist < 3:
- act 'Attack':
- cla
- KGOLpower = KGOLstren + KGOLwpower
- dynamic $KGOLatk
- act 'Further': gt $curloc
- end
- if KGOLspell > 0 and KGManna >= KGOLspell * 10:
- act 'Powerful blow (<<KGOLspell*10>> manna)':
- cla
- KGManna -= KGOLspell
- KGOLpower = KGOLstren + KGOLwpower+(KGOLspell * 100)
- dynamic $KGOLatk
- act 'Further': gt $curloc
- end
- end
- if KGOLspell2 > 0 and KGManna >= KGOLspell2 * 10:
- act 'Multiple shot (<<KGOLspell2*10>> manna)':
- cla
- KGManna -= KGOLspell2
- KGOLpower = KGOLstren + KGOLwpower
- KGLOloop = KGOLspell2 + 1
- dynamic $KGOLatkKGOLspell2
- act 'Further': gt $curloc
- end
- end
- if KGOLspell3 > 0 and KGManna >= KGOLspell3 * 10 and KGOLcooldown <= 0:
- act 'Increase armor (<<KGOLspell3*10>> manna)':
- cla
- KGManna -= KGOLspell3
- KGOLbronaMod += KGOLspell3 * 5
- KGOLtimer += KGOLspell3 + 1
- KGOLcooldown += KGOLspell3 + 3
- act 'Further': gt $curloc
- end
- end
- end
- elseif KGOLklass = 2:
- !вор
- if KGOLdist < 5:
- act 'Attack':
- cla
- KGOLpower = KGOLstren + KGOLwpower
- dynamic $KGOLatk
- act 'Further': gt $curloc
- end
- if KGOLspell4 > 0 and KGManna >= KGOLspell4 * 10:
- act 'Sneaky shot (<<KGOLspell4*10>> manna)':
- cla
- KGManna -= KGOLspell4
- KGOLpower = KGOLstren + KGOLwpower+(KGOLspell5 * 100)
- dynamic $KGOLatk
- act 'Further': gt $curloc
- end
- end
- if KGOLspell5 > 0 and KGManna >= KGOLspell5 * 10:
- act 'Poison Blade (<<KGOLspell5*10>>manna)':
- cla
- KGManna -= KGOLspell5
- KGOLpower = KGOLstren + KGOLwpower
- dynamic $KGOLatkPoison
- act 'Further': gt $curloc
- end
- end
- if KGOLspell6 > 0 and KGManna >= KGOLspell6 * 10 and KGOLcooldown <= 0:
- act 'Invisibility (<<KGOLspell6*10>> manna)':
- cla
- KGManna -= KGOLspell6
- unvis += KGOLspell6 + 1
- KGOLcooldown += KGOLspell6 + 3
- act 'Further': gt $curloc
- end
- end
- end
- elseif KGOLklass = 3:
- !маг
- act 'Attack':
- cla
- KGOLpower = KGOLintel + KGOLwpower
- dynamic $KGOLatk
- act 'Further': gt $curloc
- end
- if KGOLspell7 > 0 and KGManna >= KGOLspell7 * 10:
- act 'Faerboll (<<KGOLspell7*10>> manna)':
- cla
- KGManna -= KGOLspell7
- KGOLpower = RAND(KGOLspell7 * 100, KGOLspell7 * 200)
- dynamic $KGOLatkFB
- act 'Further': gt $curloc
- end
- end
- if KGOLspell8 > 0 and KGManna >= KGOLspell8 * 10:
- act 'Dropping (<<KGOLspell5*10>> manna)':
- cla
- KGManna -= KGOLspell5
- KGOLdist += RAND(KGOLspell5 * 10, KGOLspell5 * 50)
- 'You flung the enemy and now the distance between you <<KGOLdist>> meter'
- act 'Further': gt $curloc
- end
- end
- if KGOLspell9 > 0 and KGManna >= KGOLspell9 * 10 and KGOLcooldown <= 0:
- act 'Circle of fire (<<KGOLspell9*10>> manna)':
- cla
- KGManna -= KGOLspell9
- firecircle += KGOLspell9 + 1
- KGOLcooldown += KGOLspell9 + 3
- 'Everything around you is burning hellfire'
- act 'Further': gt $curloc
- end
- end
- elseif KGOLklass = 4:
- !жрец
- act 'Attack':
- cla
- KGOLpower = KGOLintel + KGOLwpower
- dynamic $KGOLatk
- act 'Further': gt $curloc
- end
- elseif KGOLklass = 5:
- !лучник
- act 'Attack':
- cla
- KGOLpower = KGOLspeed + KGOLwpower
- dynamic $KGOLatk
- act 'Further': gt $curloc
- end
- else
- !варвар
- if KGOLdist < 2:
- act 'Attack':
- cla
- KGOLpower = KGOLstren + KGOLwpower
- dynamic $KGOLatk
- act 'Further': gt $curloc
- end
- end
- end
- if KGOLdist > 0:
- act 'Flee to the enemy':
- KGOLdist -= RAND(KGOLspeed/20, KGOLspeed/10)
- gt $curloc
- end
- end
- act 'Flee from the enemy':
- KGOLdist += RAND(KGOLspeed/20, KGOLspeed/10)
- gt $curloc
- end
- if KGOLpotionH > 0:
- act 'Drink a health potion':
- KGOLpotionH -= 1
- KGHP += 100
- gt $curloc
- end
- end
- if KGOLpotionM > 0:
- act 'Drink the potion manna':
- KGOLpotionM -= 1
- KGManna += 100
- gt $curloc
- end
- end
- else
- 'Now opponents'
- if KGOLdist <= KGOLneedDist:
- '<<$KGname>> attacks you'
- dynamic $KGOLatkV
- else
- KGOLdist -= RAND(KGOLspeedV/20, KGOLspeedV/10)
- '<<$KGname>> running toward you'
- end
- act 'Further': gt $curloc
- end
- =======
- !initiative
- KGOLiniV=RAND(KGOLspeedV/2,KGOLspeedV*2)
- KGOLini=RAND(KGOLspeed/2,KGOLspeed*2)
- if KGOLini=KGOLiniV:
- hodrand=RAND(0,1)
- if hodrand=0:KGOLini=1&KGOLiniV=0
- if hodrand=1:KGOLini=0&KGOLiniV=1
- end
- if KGOLini>KGOLiniV:KGOLiniSUM+=1
- if KGOLini<KGOLiniV:KGOLiniSUM-=1
- if KGOLiniSUM>3:KGOLini=0&KGOLiniV=1&KGOLiniSUM=0
- if KGOLiniSUM<-3:KGOLini=1&KGOLiniV=0&KGOLiniSUM=0
- !moves
- if KGOLini>KGOLiniV or unvis>0:
- 'Now your turn'
- if KGOLklass=1:
- !warrior
- if KGOLdist<3:
- act 'attack':
- cla
- KGOLpower=KGOLstren+KGOLwpower
- dynamic $KGOLatk
- act 'further':gt $curloc
- end
-
- if KGOLspell>0 and KGManna>=KGOLspell*10:
- act 'powerful blow (<<KGOLspell*10>> manna)':
- cla
- KGManna-=KGOLspell
- KGOLpower=KGOLstren+KGOLwpower+(KGOLspell*100)
- dynamic $KGOLatk
- act 'further':gt $curloc
- end
- end
-
- if KGOLspell2>0 and KGManna>=KGOLspell2*10:
- act 'multiple punch (<<KGOLspell2*10>> manna)':
- cla
- KGManna-=KGOLspell2
- KGOLpower=KGOLstren+KGOLwpower
- KGLOloop=KGOLspell2+1
- dynamic $KGOLatkKGOLspell2
- act 'further':gt $curloc
- end
- end
-
- if KGOLspell3>0 and KGManna>=KGOLspell3*10 and KGOLcooldown<=0:
- act 'increase armor (<<KGOLspell3*10>> manna)':
- cla
- KGManna-=KGOLspell3
- KGOLbronaMod+=KGOLspell3*5
- KGOLtimer+=KGOLspell3+1
- KGOLcooldown+=KGOLspell3+3
- act 'further':gt $curloc
- end
- end
- end
- elseif KGOLklass=2:
- !thief
- if KGOLdist<5:
- act 'attack':
- cla
- KGOLpower=KGOLstren+KGOLwpower
- dynamic $KGOLatk
- act 'further':gt $curloc
- end
-
- if KGOLspell4>0 and KGManna>=KGOLspell4*10:
- act 'sneaky punch (<<KGOLspell4*10>> manna)':
- cla
- KGManna-=KGOLspell4
- KGOLpower=KGOLstren+KGOLwpower+(KGOLspell5*100)
- dynamic $KGOLatk
- act 'further':gt $curloc
- end
- end
-
- if KGOLspell5>0 and KGManna>=KGOLspell5*10:
- act 'Poison Blade (<<KGOLspell5*10>> manna)':
- cla
- KGManna-=KGOLspell5
- KGOLpower=KGOLstren+KGOLwpower
- dynamic $KGOLatkPoison
- act 'further':gt $curloc
- end
- end
-
- if KGOLspell6>0 and KGManna>=KGOLspell6*10 and KGOLcooldown<=0:
- act 'invisibility (<<KGOLspell6*10>> manna)':
- cla
- KGManna-=KGOLspell6
- unvis+=KGOLspell6+1
- KGOLcooldown+=KGOLspell6+3
- act 'further':gt $curloc
- end
- end
- end
- elseif KGOLklass=3:
- !magician
- act 'attack':
- cla
- KGOLpower=KGOLintel+KGOLwpower
- dynamic $KGOLatk
- act 'further':gt $curloc
- end
-
- if KGOLspell7>0 and KGManna>=KGOLspell7*10:
- act 'Faerboll (<<KGOLspell7*10>> manna)':
- cla
- KGManna-=KGOLspell7
- KGOLpower=RAND(KGOLspell7*100,KGOLspell7*200)
- dynamic $KGOLatkFB
- act 'further':gt $curloc
- end
- end
-
- if KGOLspell8>0 and KGManna>=KGOLspell8*10:
- act 'Dropping (<<KGOLspell5*10>> manna)':
- cla
- KGManna-=KGOLspell5
- KGOLdist+=RAND(KGOLspell5*10,KGOLspell5*50)
- 'You flung the enemy and now the distance between you <<KGOLdist>> meters'
- act 'further':gt $curloc
- end
- end
-
- if KGOLspell9>0 and KGManna>=KGOLspell9*10 and KGOLcooldown<=0:
- act 'circle of fire (<<KGOLspell9*10>> manna)':
- cla
- KGManna-=KGOLspell9
- firecircle+=KGOLspell9+1
- KGOLcooldown+=KGOLspell9+3
- 'All around you is burning flames of hell'
- act 'further':gt $curloc
- end
- end
- elseif KGOLklass=4:
- !priest
- act 'attack':
- cla
- KGOLpower=KGOLintel+KGOLwpower
- dynamic $KGOLatk
- act 'further':gt $curloc
- end
- elseif KGOLklass=5:
- !archer
- act 'attack':
- cla
- KGOLpower=KGOLspeed+KGOLwpower
- dynamic $KGOLatk
- act 'further':gt $curloc
- end
- else
- !barbarian
- if KGOLdist<2:
- act 'attack':
- cla
- KGOLpower=KGOLstren+KGOLwpower
- dynamic $KGOLatk
- act 'further':gt $curloc
- end
- end
- end
-
- if KGOLdist>0:
- act 'Run to the enemy':
- KGOLdist-=RAND(KGOLspeed/20,KGOLspeed/10)
- gt $curloc
- end
- end
- act 'Run away from the enemy':
- KGOLdist+=RAND(KGOLspeed/20,KGOLspeed/10)
- gt $curloc
- end
-
- if KGOLpotionH>0:
- act 'Drink a health potion':
- KGOLpotionH-=1
- KGHP+=100
- gt $curloc
- end
- end
-
- if KGOLpotionM>0:
- act 'Drink the potion of mana':
- KGOLpotionM-=1
- KGManna+=100
- gt $curloc
- end
- end
- else
- 'Now move the enemy'
- if KGOLdist<=KGOLneedDist:
- '<<$KGname>> attacks you'
- dynamic $KGOLatkV
- else
- KGOLdist-=RAND(KGOLspeedV/20,KGOLspeedV/10)
- '<<$KGname>> run to you'
- end
-
- act 'further':gt $curloc
- end
- >>>>>>> 425_KGOLfight
- --- KGOLfight ---------------------------------
|