forked from ReikaKalseki/EndgameCombat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
plasmabeam.lua
63 lines (58 loc) · 1.35 KB
/
plasmabeam.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
function createPlasmaAttack()
local ret = {
type = "beam",
ammo_category = "electric",
cooldown = 12,
damage_modifier = 5,
--projectile_center = {0, -0.2},
--projectile_creation_distance = 1.4,
range = 30,
sound = { filename = "__EndgameCombat__/sounds/plasmashot.ogg", volume = 0.75 },
ammo_type =
{
category = "plasma-turret",
energy_consumption = "600kJ",
action =
{
type = "direct",
action_delivery =
{
type = "beam",
beam = "laser-beam-purple",
max_length = 30,
duration = 12,
source_offset = {0, -1.3},
}
}
}
}
return ret
end
function createPlasmaBeam()
local ret = table.deepcopy(data.raw.beam["laser-beam-red"])
local color = {r = 0.8, g = 0.0, b = 1.0}
ret.name = "laser-beam-purple"
ret.damage_interval = 12
ret.light = {intensity = 0.75, size = 10}
ret.working_sound = {
{
filename = "__EndgameCombat__/sounds/laserbeam/laser-beam-01.ogg",
volume = 0.9
},
{
filename = "__EndgameCombat__/sounds/laserbeam/laser-beam-02.ogg",
volume = 0.9
},
{
filename = "__EndgameCombat__/sounds/laserbeam/laser-beam-03.ogg",
volume = 0.9
}
}
ret.action.action_delivery.target_effects[1].damage.amount = 7.5
ret.head.tint = color
ret.start.tint = color
ret.ending.tint = color
ret.tail.tint = color
ret.body[1].tint = color
return ret
end