352 PlaySound(sndShotgunReload) |
350 PlaySound(sndShotgunReload) |
353 DeleteGear(gear) |
351 DeleteGear(gear) |
354 AddCaption(loc("+1 barrel!"), wepCol[0], capgrpAmmoinfo ) |
352 AddCaption(loc("+1 barrel!"), wepCol[0], capgrpAmmoinfo ) |
355 DrawTag(1) |
353 DrawTag(1) |
356 |
354 |
357 barrelsEaten = barrelsEaten + 1 |
|
358 if barrelsEaten == 5 then |
|
359 AddCaption(string.format(loc("Achievement gotten: %s"), loc("Barrel Eater")),0xffba00ff,capgrpMessage2) |
|
360 end |
|
361 |
|
362 elseif (GetGearType(gear) == gtMine) then |
355 elseif (GetGearType(gear) == gtMine) then |
363 wepAmmo[1] = wepAmmo[1] + 1 |
356 wepAmmo[1] = wepAmmo[1] + 1 |
364 PlaySound(sndShotgunReload) |
357 PlaySound(sndShotgunReload) |
365 DeleteGear(gear) |
358 DeleteGear(gear) |
366 AddCaption(loc("+1 mine!"), wepCol[1], capgrpAmmoinfo ) |
359 AddCaption(loc("+1 mine!"), wepCol[1], capgrpAmmoinfo ) |
367 DrawTag(2) |
360 DrawTag(2) |
368 |
|
369 minesEaten = minesEaten + 1 |
|
370 if minesEaten == 5 then |
|
371 AddCaption(string.format(loc("Achievement gotten: %s"), loc("Mine Eater")),0xffba00ff,capgrpMessage2) |
|
372 end |
|
373 |
361 |
374 end |
362 end |
375 |
363 |
376 end |
364 end |
377 |
365 |
413 shotsMsg = loc("Fuel: %d") |
401 shotsMsg = loc("Fuel: %d") |
414 else |
402 else |
415 shotsMsg = loc("Ammo: %d") |
403 shotsMsg = loc("Ammo: %d") |
416 end |
404 end |
417 end |
405 end |
418 AddCaption(string.format(shotsMsg, wepAmmo[wepIndex]), wepCol[wepIndex],capgrpMessage2) |
406 AddCaption(string.format(shotsMsg, wepAmmo[wepIndex]), wepCol[wepIndex],capgrpAmmostate) |
419 end |
407 end |
420 |
408 |
421 function ChangeWeapon(newIndex) |
409 function ChangeWeapon(newIndex) |
422 if newIndex == nil then |
410 if newIndex == nil then |
423 wepIndex = wepIndex + 1 |
411 wepIndex = wepIndex + 1 |
428 wepIndex = newIndex |
416 wepIndex = newIndex |
429 end |
417 end |
430 |
418 |
431 local selText |
419 local selText |
432 if wepIndex == 0 then |
420 if wepIndex == 0 then |
433 selText = loc("Barrel Launcher selected!") |
421 selText = loc("Barrel Launcher") |
434 elseif wepIndex == 1 then |
422 elseif wepIndex == 1 then |
435 selText = loc("Mine Deployer selected!") |
423 selText = loc("Mine Deployer") |
436 else |
424 else |
437 selText = loc("Flamer selected!") |
425 selText = loc("Flamer") |
438 end |
426 end |
439 AddCaption(selText, wepCol[wepIndex],capgrpAmmoinfo ) |
427 AddCaption(selText, wepCol[wepIndex],capgrpAmmoinfo ) |
440 |
428 |
441 shotsRemainingMessage() |
429 shotsRemainingMessage() |
442 end |
430 end |
928 |
914 |
929 if GetHogTeamName(gear) ~= GetHogTeamName(CurrentHedgehog) then |
915 if GetHogTeamName(gear) ~= GetHogTeamName(CurrentHedgehog) then |
930 |
916 |
931 roundKills = roundKills + 1 |
917 roundKills = roundKills + 1 |
932 if roundKills == 2 then |
918 if roundKills == 2 then |
933 AddCaption(loc("Double Kill!"),0xffba00ff,capgrpMessage2) |
919 AddCaption(loc("Double Kill!"),0xffffffff,capgrpMessage2) |
934 elseif roundKills == 3 then |
920 elseif roundKills == 3 then |
935 AddCaption(loc("Killing spree!"),0xffba00ff,capgrpMessage2) |
921 AddCaption(loc("Killing spree!"),0xffffffff,capgrpMessage2) |
936 elseif roundKills >= 4 then |
922 elseif roundKills >= 4 then |
937 AddCaption(loc("Unstoppable!"),0xffba00ff,capgrpMessage2) |
923 AddCaption(loc("Unstoppable!"),0xffffffff,capgrpMessage2) |
938 end |
924 end |
939 |
925 |
940 elseif gear == CurrentHedgehog then |
926 elseif gear == CurrentHedgehog then |
941 DisableTumbler() |
927 DisableTumbler() |
942 |
928 |
943 elseif gear ~= CurrentHedgehog then |
929 elseif gear ~= CurrentHedgehog then |
944 AddCaption(loc("Friendly Fire!"),0xffba00ff,capgrpMessage2) |
930 AddCaption(loc("Friendly Fire!"),0xffffffff,capgrpMessage2) |
945 end |
931 end |
946 |
932 |
947 end |
933 end |
948 |
934 |
949 if CurrentHedgehog ~= nil then |
935 if CurrentHedgehog ~= nil then |