share/hedgewars/Data/Missions/Training/Basic_Training_-_Grenade.lua
changeset 13165 89a6b862e692
parent 13075 730db0a3eb43
child 13290 a3b07219a091
equal deleted inserted replaced
13163:a4d257f4b3e0 13165:89a6b862e692
   169 	if gamePhase == 0 then
   169 	if gamePhase == 0 then
   170 		newGamePhase()
   170 		newGamePhase()
   171 	end
   171 	end
   172 end
   172 end
   173 
   173 
   174 function onSetWeapon(ammoType)
   174 function onGameTick20()
   175 	if ammoType == amGrenade and not weaponSelected and gamePhase == 1 then
   175 	if not weaponSelected and gamePhase == 1 and GetCurAmmoType() == amGrenade then
   176 		newGamePhase()
       
   177 		weaponSelected = true
       
   178 	end
       
   179 end
       
   180 
       
   181 function onSlot(msgParam)
       
   182 	if msgParam <= 1 and not weaponSelected and gamePhase == 1 then
       
   183 		newGamePhase()
   176 		newGamePhase()
   184 		weaponSelected = true
   177 		weaponSelected = true
   185 	end
   178 	end
   186 end
   179 end
   187 
   180