Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- wOS.ForcePowers:RegisterNewPower({
- name = "Force Absorb",
- icon = "A",
- image = "wos/forceicons/absorb.png",
- cooldown = 0,
- description = "Hold Mouse 2 to protect yourself from harm",
- action = function( self )
- if ( self:GetForce() < 1 ) then return end
- self:SetEnabled(false)
- self:SetForce( self:GetForce() - 0.1 )
- self.Owner:SetNW2Float( "wOS.ForceAnim", CurTime() + 0.6 )
- self:SetNextAttack( 0.3 )
- return true
- end
- },
- wOS.ForcePowers:RegisterNewPower({
- name = "Balance of the Force",
- icon = "BF",
- image = "",
- description = "Concentrate your Force to restore the energy. You won't be able to use skills for some time.",
- action = function( self )
- if ( self:GetForce() < 25 || !self.Owner:IsOnGround() ) then return end
- if self.Owner:GetNWFloat( "wOS.IsChanneling", 0 ) >= CurTime() then return end
- self:SetForce( self.MaxForce )
- self:SetNextAttack( 0.5 )
- self:PlayWeaponSound( "lightsaber/force_leap.wav" )
- self.Owner:SetNWFloat( "ForceBalance", CurTime() + 10 )
- self.Weapon:SetNextSecondaryFire( CurTime() + 5 )
- end
- },
- wOS.ForcePowers:RegisterNewPower({
- name = "Phasewalk",
- icon = "PW",
- image = "",
- cooldown = 10,
- description = "Lässt dich durch die Macht, den Weg verkürzen.",
- action = function(self)
- if (self:GetForce() < 20 ) then return end
- self:SetForce(self:GetForce() - 20)
- self:SetNextAttack(0.5)
- local ply = self.Owner
- local pos = ply:GetShootPos()
- local ang = ply:GetAimVector()
- local td = {}
- td.start = pos
- td.endpos = pos + (ang * 800)
- td.filter = ply
- local trace = util.TraceLine(td)
- self.Owner:SetPos(trace.HitPos - (ang * 10))
- self:SetNextAttack( 4 )
- end
- },
- wOS.ForcePowers:RegisterNewPower({
- name = "Schatten-Angriff",
- icon = "SA",
- image = "",
- cooldown = 0,
- description = "Strike Up to 4 Enemys\n Cost: 80",
- action = function(self)
- if CLIENT then return end
- if self:GetForce() < 60 then return end
- local ent = self:SelectTargets( 1 )[1]
- if (!IsValid(ent)) then return end
- if !ent:IsNPC() and !ent:IsPlayer() then return end
- --Setup damageinfo
- local dmg = DamageInfo()
- dmg:SetDamage( 75 )
- dmg:SetDamageType( DMG_DIRECT )
- dmg:SetInflictor( self.Owner )
- dmg:SetAttacker( self.Owner )
- self:SetForce( self:GetForce() - 60 )
- local Hit = {[ent:EntIndex()] = ent}
- local count = 0
- for x = 1,4 do
- local org = ent:GetPos()
- local sound = CreateSound( ent, Sound( self.SwingSound ) )
- ent:TakeDamageInfo( dmg )
- sound:Play()
- timer.Simple(0.75, function()
- sound:Stop()
- end)
- //sound:ChangeVolume( 0, 0 )
- // ent = nil
- for x,y in pairs(ents.FindInSphere(org, 512) ) do
- if (y:IsPlayer() or y:IsNPC()) and y != self.Owner and !Hit[y:EntIndex()] then
- Hit[y:EntIndex()] = y
- ent = y
- end
- end
- ent = ent or table.Random(Hit)
- if x == 4 then
- pos1 = self.Owner:GetPos()
- pos2 = ent:GetPos()
- self.Owner:SetPos(pos2)
- ent:SetPos(pos1)
- self:SetNextAttack( 2 )
- end
- end
- end
- },
- wOS.ForcePowers:RegisterNewPower({
- name = "Ground Slam",
- icon = "GS",
- image = "",
- cooldown = 120,
- description = "Strike Up to 4 Enemys\n Cost: 80",
- action = function( self )
- if ( self:GetForce() < 120 || CLIENT || !self.Owner:IsOnGround() ) then return end
- local elev = 400
- local time = 60
- ent = self.Owner
- self:SetForce(self:GetForce() - 120)
- self:SetNextAttack( 120 )
- for j = 0,6 do
- for i = 0, 24 do
- local ed = EffectData()
- ed:SetOrigin( self.Owner:GetPos() + Vector(0,0,0) )
- ed:SetStart( self.Owner:GetPos() + Vector(0,0,0) + Angle(0 , i * 15, 0):Forward() * 512)
- util.Effect( "force_groundslam", ed, true, true )
- end
- end
- local maxdist = 90 * 4
- local ed = EffectData()
- ed:SetOrigin( self.Owner:GetPos() + Vector( 0, 0, 36 ) )
- ed:SetRadius( maxdist )
- util.Effect( "rb655_force_repulse_out", ed, true, true )
- for i, e in pairs( ents.FindInSphere( self.Owner:GetPos(), maxdist ) ) do
- if (e.Team and e:Team() == self.Owner:Team()) or (e.PlayerTeam and e.PlayerTeam == self.Owner:Team()) then continue end
- local dist = self.Owner:GetPos():Distance( e:GetPos() )
- local mul = ( maxdist - dist ) / 256
- local v = ( self.Owner:GetPos() - e:GetPos() ):GetNormalized()
- v.z = 0
- local dmg = DamageInfo()
- dmg:SetDamagePosition( e:GetPos() + e:OBBCenter() )
- dmg:SetDamage( 3000 * mul )
- dmg:SetDamageType( DMG_DISSOLVE )
- dmg:SetDamageForce( -v * math.min( mul * 40000, 80000 ) )
- dmg:SetInflictor( self.Owner )
- dmg:SetAttacker( self.Owner )
- e:TakeDamageInfo( dmg )
- if ( e:IsOnGround() ) then
- e:SetVelocity( v * mul * -2048 + Vector( 0, 0, 64 ) )
- elseif ( !e:IsOnGround() ) then
- e:SetVelocity( v * mul * -1024 + Vector( 0, 0, 64 ) )
- end
- end
- if ( !self.SoundLightning ) then
- self.SoundLightning = CreateSound( self.Owner, "lightsaber/force_lightning" .. math.random( 1, 2 ) .. ".wav" )
- self.SoundLightning:Play()
- self.SoundLightning:ChangeVolume(0,0.3)
- else
- self.SoundLightning:Play()
- end
- timer.Create( "test", 0.6, 1, function() if ( self.SoundLightning ) then self.SoundLightning:Stop() self.SoundLightning = nil end end )
- self:PlayWeaponSound( "lightsaber/force_repulse.wav" )
- end
- },
- wOS.ForcePowers:RegisterNewPower({
- name = "Force Levitate",
- icon = "FL",
- image = "",
- target = 1,
- cooldown = 0,
- description = "Use the Force to lift yourself up.",
- action = function( self )
- if ( self:GetForce() < 10 ) then return end
- self:SetForce( self:GetForce() - 0.5 )
- self.Weapon:SetNextSecondaryFire( CurTime() + 0.1 )
- self.Owner:SetVelocity( Vector( 0, 0, 70) )
- end
- },
- wOS.ForcePowers:RegisterNewPower({
- name = "Force Aura Heal",
- icon = "AH",
- image = "wos/forceicons/heal.png",
- cooldown = 0,
- description = "Hold Mouse 2 to slowly heal you",
- action = function( self )
- local pl = self.Owner;
- if pl:Health() >= pl:GetMaxHealth() then pl:Health(pl:GetMaxHealth()) return end
- self.Owner:SetHealth( self.Owner:Health() + (pl:GetMaxHealth() / 100) )
- local ed = EffectData()
- ed:SetOrigin( self.Owner:GetPos() )
- util.Effect( "rb655_force_heal", ed, true, true )
- self:SetNextAttack( 0.2 )
- end
- },
- wOS.ForcePowers:RegisterNewPower({
- name = "Force Lightning",
- icon = "L",
- target = 1,
- image = "wos/forceicons/lightning.png",
- cooldown = 0,
- manualaim = false,
- description = "Torture people ( and monsters ) at will.",
- action = function( self )
- if ( self:GetForce() < 1 ) then return end
- local foundents = 0
- for id, ent in pairs( self:SelectTargets( 1 ) ) do
- if ( !IsValid( ent ) ) then continue end
- foundents = foundents + 1
- local ed = EffectData()
- ed:SetOrigin( self:GetSaberPosAng() )
- ed:SetEntity( ent )
- util.Effect( "rb655_force_lighting_jedi", ed, true, true )
- local dmg = DamageInfo()
- dmg:SetAttacker( self.Owner || self )
- dmg:SetInflictor( self.Owner || self )
- dmg:SetDamage( 4 )
- if ( ent:IsNPC() ) then dmg:SetDamage( 1.6 ) end
- ent:TakeDamageInfo( dmg )
- end
- if ( foundents > 0 ) then
- self:SetForce( self:GetForce() - foundents )
- if ( !self.SoundLightning ) then
- self.SoundLightning = CreateSound( self.Owner, "lightsaber/force_lightning" .. math.random( 1, 2 ) .. ".wav" )
- self.SoundLightning:Play()
- else
- self.SoundLightning:Play()
- end
- timer.Create( "test", 0.2, 1, function() if ( self.SoundLightning ) then self.SoundLightning:Stop() self.SoundLightning = nil end end )
- end
- self:SetNextAttack( 0.1 )
- return true
- end
- },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement