123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135 |
- # init
- !Calculation initiative
- !Be sure to check for mills
- !hod variable is responsible for who will attack
- !hod = 0 player attacks hod = 1 enemy attacks
- !<font color = red><<$pcs_nickname>> </font>
- if GedoMazo = 1 and stunV > 0:stunV = 0 & manaV = manaV - 1000 &
- initi = pcs_react*20/100
- initi = initi - dospehVes
- if initi < 0:initi = 0
- init = RAND(pcs_react-initi,pcs_react+initi) + initBonus
- initiV = reactV*20/100
- initiV = initiV - dospehVesV
- if initiV < 0:initiV = 0
- initV = RAND(reactV-initiV,reactV+initiV) + initBonusV
- if hodtime >= 3 and stun = 0 and stunV = 0 and initBonus = 0:
- !the player has already attacked three times
-
- hod = 1
- hodtime = 0
- exit
- elseif hodtimeV >= 3 and stun = 0 and stunV = 0 and initBonusV = 0:
- !the opponent three times already attacked
-
- hod = 0
- hodtimeV = 0
- exit
- end
- if stun = 0 and stunV = 0 and hodtime < 3 and hodtimeV < 3 or stun = 0 and stunV = 0 and initBonus > 0 or stun = 0 and stunV = 0 and initBonusV > 0:
- !neither in the camp
- if tuman = 0 and tumanV = 0:
- !no fog
- if init > initV:
- !initiative tackler
-
- hod = 0
- hodtime = hodtime + 1
- exit
- elseif init < initV:
- !the initiative has captured the enemy
-
- hod = 1
- hodtimeV = hodtimeV + 1
- exit
- elseif init = initV:
- hod = RAND(0,1)
- if hod = 0:
- if hod = 1:
- exit
- end
- elseif tuman > 0:
- !fog player
- tuman = tuman - 1
- initV = reactV-initiV
- if init > initV:
- !initiative tackler
-
- hod = 0
- hodtime = hodtime + 1
- exit
- elseif init < initV:
- !the initiative has captured the enemy
-
- hod = 1
- hodtimeV = hodtimeV + 1
- exit
- elseif init = initV:
- hod = RAND(0,1)
- if hod = 0:
- if hod = 1:
- exit
- end
- elseif tumanV > 0:
- !fog opponent
- tumanV = tumanV - 1
- init = pcs_react-initi
- if init > initV:
- !initiative tackler
-
- hod = 0
- hodtime = hodtime + 1
- exit
- elseif init < initV:
- !the initiative has captured the enemy
-
- hod = 1
- hodtimeV = hodtimeV + 1
- exit
- elseif init = initV:
- hod = RAND(0,1)
- if hod = 0:
- if hod = 1:
- exit
- end
- end
- end
- if stun > 0:
- !player in the camp
- stun = stun - 1
- hod = 1
- if tuman > 0:tuman = tuman - 1
- if tumanV > 0:tumanV = tumanV - 1
-
- exit
- elseif stunV > 0:
- !the enemy in the camp
- stunV = stunV - 1
- hod = 0
- if tuman > 0:tuman = tuman - 1
- if tumanV > 0:tumanV = tumanV - 1
-
- exit
- end
- --- init ---------------------------------
|