share/hedgewars/Data/Scripts/Multiplayer/Mutant.lua
changeset 14271 9b5a8147386f
parent 14270 2b54c956813e
child 14274 47af42f7ca8b
equal deleted inserted replaced
14270:2b54c956813e 14271:9b5a8147386f
   533             SetGearAIHints(hhs[i], aihUsualProcessing)
   533             SetGearAIHints(hhs[i], aihUsualProcessing)
   534         else
   534         else
   535             SetGearAIHints(hhs[i], aihDoesntMatter)
   535             SetGearAIHints(hhs[i], aihDoesntMatter)
   536         end
   536         end
   537     end
   537     end
   538     for i = 0, #crates do
   538     for k,v in pairs(crates) do
   539         if CurrentHedgehog == mutant and crate[i] ~= nil  then
   539         if CurrentHedgehog == mutant and v ~= nil  then
   540             SetGearAIHints(crates[i], aihDoesntMatter)
   540             SetGearAIHints(v, aihDoesntMatter)
   541         else
   541         else
   542             SetGearAIHints(crates[i], aihUsualProcessing)
   542             SetGearAIHints(v, aihUsualProcessing)
   543         end
   543         end
   544     end
   544     end
   545 end
   545 end
   546 
   546 
   547 function removeFeeder(gear)
   547 function removeFeeder(gear)
   727         trackGear(gear)
   727         trackGear(gear)
   728         hhs[numhhs] = gear
   728         hhs[numhhs] = gear
   729         numhhs = numhhs + 1
   729         numhhs = numhhs + 1
   730         SetEffect(gear, heResurrectable, 1)
   730         SetEffect(gear, heResurrectable, 1)
   731     elseif GetGearType(gear) == gtCase then
   731     elseif GetGearType(gear) == gtCase then
   732         crates[#crates] = gear
   732         crates[gear] = gear
   733     elseif GetGearType(gear) == gtATFinishGame then
   733     elseif GetGearType(gear) == gtATFinishGame then
   734         if not gameOver then
   734         if not gameOver then
   735             local winner = createEndGameStats()
   735             local winner = createEndGameStats()
   736             if winner then
   736             if winner then
   737                 SendStat(siGameResult, string.format(loc("%s wins!"), winner))
   737                 SendStat(siGameResult, string.format(loc("%s wins!"), winner))