share/hedgewars/Data/Scripts/Multiplayer/Space_Invasion.lua
changeset 14825 cb5ffe17fdf9
parent 14824 f16868b40f2d
child 14929 f112847eb93e
equal deleted inserted replaced
14824:f16868b40f2d 14825:cb5ffe17fdf9
   964 		if SI.shieldHealth == 80 then
   964 		if SI.shieldHealth == 80 then
   965 			AddCaption(loc("Shield depleted"),SI.colorMsgDepleted,capgrpAmmostate)
   965 			AddCaption(loc("Shield depleted"),SI.colorMsgDepleted,capgrpAmmostate)
   966 			PlaySound(sndDenied)
   966 			PlaySound(sndDenied)
   967 		elseif (SI.beam == false) and (SI.shieldHealth > 80) then
   967 		elseif (SI.beam == false) and (SI.shieldHealth > 80) then
   968 			SI.beam = true
   968 			SI.beam = true
   969 			SetVisualGearValues(SI.pShield, GetX(CurrentHedgehog), GetY(CurrentHedgehog), 40, 255, 1, 10, 0, nil, 1, SI.colorShield-0x000000FF - -math.min(SI.shieldHealth))
   969 			SetVisualGearValues(SI.pShield, GetX(CurrentHedgehog), GetY(CurrentHedgehog), 40, 255, 1, 10, 0, nil, 1, SI.colorShield-0x000000FF - -math.min(SI.shieldHealth, 255))
   970 			AddCaption( string.format(loc("Shield ON: %d power remaining"), SI.shieldHealth - 80), SI.colorShield, capgrpAmmostate)
   970 			AddCaption( string.format(loc("Shield ON: %d power remaining"), SI.shieldHealth - 80), SI.colorShield, capgrpAmmostate)
   971 			PlaySound(sndInvulnerable)
   971 			PlaySound(sndInvulnerable)
   972 		else
   972 		else
   973 			SI.beam = false
   973 			SI.beam = false
   974 			SetVisualGearValues(SI.pShield, GetX(CurrentHedgehog), GetY(CurrentHedgehog), nil, nil, nil, nil, nil, nil, nil, 0x0)
   974 			SetVisualGearValues(SI.pShield, GetX(CurrentHedgehog), GetY(CurrentHedgehog), nil, nil, nil, nil, nil, nil, nil, 0x0)