share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit02.lua
changeset 12933 e65aa3c3d4e6
parent 12680 5a253f158071
child 13583 141cdfe0f3ca
equal deleted inserted replaced
12932:e0da398805b6 12933:e65aa3c3d4e6
   178 	else
   178 	else
   179 		AddAnim(dialog02)
   179 		AddAnim(dialog02)
   180 	end
   180 	end
   181 
   181 
   182 	-- place crates
   182 	-- place crates
   183 	SpawnUtilityCrate(girderCrate.x, girderCrate.y, girderCrate.name)
   183 	SpawnSupplyCrate(girderCrate.x, girderCrate.y, girderCrate.name)
   184 	SpawnAmmoCrate(eagleCrate.x, eagleCrate.y, eagleCrate.name)
   184 	SpawnSupplyCrate(eagleCrate.x, eagleCrate.y, eagleCrate.name)
   185 	deviceCrate.gear = SpawnFakeUtilityCrate(deviceCrate.x, deviceCrate.y, false, false) -- anti-gravity device
   185 	deviceCrate.gear = SpawnFakeUtilityCrate(deviceCrate.x, deviceCrate.y, false, false) -- anti-gravity device
   186 	-- Rope crate is placed after device crate has been collected.
   186 	-- Rope crate is placed after device crate has been collected.
   187 	-- This is done so it is impossible the player can rope before getting
   187 	-- This is done so it is impossible the player can rope before getting
   188 	-- the device part.
   188 	-- the device part.
   189 
   189 
   190 	if tookPartInBattle then
   190 	if tookPartInBattle then
   191 		SpawnAmmoCrate(weaponCrate.x, weaponCrate.y, amWatermelon)
   191 		SpawnSupplyCrate(weaponCrate.x, weaponCrate.y, amWatermelon)
   192 	else
   192 	else
   193 		SpawnAmmoCrate(weaponCrate.x, weaponCrate.y, amSniperRifle)
   193 		SpawnSupplyCrate(weaponCrate.x, weaponCrate.y, amSniperRifle)
   194 	end
   194 	end
   195 
   195 
   196 	SendHealthStatsOff()
   196 	SendHealthStatsOff()
   197 end
   197 end
   198 
   198 
   253 			PlaySound(sndShotgunReload)
   253 			PlaySound(sndShotgunReload)
   254 			AddCaption(loc("Anti-Gravity Device Part (+1)"), GetClanColor(GetHogClan(CurrentHedgehog)), capgrpAmmostate)
   254 			AddCaption(loc("Anti-Gravity Device Part (+1)"), GetClanColor(GetHogClan(CurrentHedgehog)), capgrpAmmostate)
   255 			deviceCrate.collected = true
   255 			deviceCrate.collected = true
   256 			deviceCrate.collector = CurrentHedgehog
   256 			deviceCrate.collector = CurrentHedgehog
   257 			-- Spawn rope crate
   257 			-- Spawn rope crate
   258 			SpawnUtilityCrate(ropeCrate.x, ropeCrate.y, ropeCrate.name)
   258 			SpawnSupplyCrate(ropeCrate.x, ropeCrate.y, ropeCrate.name)
   259 		end
   259 		end
   260 	end
   260 	end
   261 end
   261 end
   262 
   262 
   263 function onGearDamage(gear, damage)
   263 function onGearDamage(gear, damage)