-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
bullets.dm
305 lines (250 loc) · 7.74 KB
/
bullets.dm
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
/obj/item/projectile/bullet
name = "bullet"
icon_state = "bullet"
damage = 60
damage_type = BRUTE
flag = "bullet"
hitsound_wall = "ricochet"
impact_effect_type = /obj/effect/temp_visual/impact_effect
/obj/item/projectile/bullet/weakbullet //beanbag, heavy stamina damage
name = "beanbag slug"
damage = 5
stamina = 40
/obj/item/projectile/bullet/weakbullet/booze
/obj/item/projectile/bullet/weakbullet/booze/on_hit(atom/target, blocked = 0)
if(..(target, blocked))
var/mob/living/M = target
M.AdjustDizzy(40 SECONDS)
M.AdjustSlur(40 SECONDS)
M.AdjustConfused(40 SECONDS)
M.AdjustEyeBlurry(40 SECONDS)
M.AdjustDrowsy(40 SECONDS)
for(var/datum/reagent/consumable/ethanol/A in M.reagents.reagent_list)
M.AdjustParalysis(4 SECONDS)
M.AdjustDizzy(20 SECONDS)
M.AdjustSlur(20 SECONDS)
M.AdjustConfused(20 SECONDS)
M.AdjustEyeBlurry(20 SECONDS)
M.AdjustDrowsy(20 SECONDS)
A.volume += 5 //Because we can
/obj/item/projectile/bullet/weakbullet2
name = "rubber bullet"
damage = 5
stamina = 35
icon_state = "bullet-r"
/obj/item/projectile/bullet/weakbullet3
damage = 20
/obj/item/projectile/bullet/weakbullet4
name = "rubber bullet"
damage = 5
stamina = 30
icon_state = "bullet-r"
/obj/item/projectile/bullet/toxinbullet
damage = 15
damage_type = TOX
/obj/item/projectile/bullet/incendiary
/obj/item/projectile/bullet/incendiary/on_hit(atom/target, blocked = 0)
. = ..()
if(iscarbon(target))
var/mob/living/carbon/M = target
M.adjust_fire_stacks(4)
M.IgniteMob()
/obj/item/projectile/bullet/incendiary/firebullet
damage = 10
/obj/item/projectile/bullet/armourpiercing
damage = 17
armour_penetration_flat = 10
/obj/item/projectile/bullet/armourpiercing/wt550
damage = 15
armour_penetration_percentage = 50
armour_penetration_flat = 25
/obj/item/projectile/bullet/pellet
name = "pellet"
damage = 12.5
tile_dropoff = 0.75
tile_dropoff_s = 1.25
armour_penetration_flat = -20
/obj/item/projectile/bullet/pellet/rubber
name = "rubber pellet"
damage = 3
stamina = 12.5
icon_state = "bullet-r"
armour_penetration_flat = -10
/obj/item/projectile/bullet/pellet/rubber/on_hit(atom/target, blocked = 0)
. = ..()
if(!ishuman(target))
return
var/mob/living/carbon/human/H = target
if(H.getStaminaLoss() >= 60)
H.KnockDown(8 SECONDS)
/obj/item/projectile/bullet/pellet/weak
tile_dropoff = 0.55 //Come on it does 6 damage don't be like that.
damage = 6
/obj/item/projectile/bullet/pellet/weak/New()
range = rand(1, 8)
..()
/obj/item/projectile/bullet/pellet/weak/on_range()
do_sparks(1, 1, src)
..()
/obj/item/projectile/bullet/pellet/overload
damage = 3
/obj/item/projectile/bullet/pellet/overload/New()
range = rand(1, 10)
..()
/obj/item/projectile/bullet/pellet/assassination
damage = 12
tile_dropoff = 1 // slightly less damage and greater damage falloff compared to normal buckshot
/obj/item/projectile/bullet/pellet/assassination/on_hit(atom/target, blocked = 0)
if(..(target, blocked))
var/mob/living/M = target
M.AdjustSilence(4 SECONDS) // HELP MIME KILLING ME IN MAINT
/obj/item/projectile/bullet/pellet/overload/on_hit(atom/target, blocked = 0)
..()
explosion(target, 0, 0, 2)
/obj/item/projectile/bullet/pellet/overload/on_range()
explosion(src, 0, 0, 2)
do_sparks(3, 3, src)
..()
/obj/item/projectile/bullet/midbullet
damage = 20
stamina = 65 //two rounds from the c20r knocks people down
/obj/item/projectile/bullet/midbullet_r
damage = 5
stamina = 75 //Still two rounds to knock people down
/obj/item/projectile/bullet/midbullet2
damage = 25
/obj/item/projectile/bullet/midbullet3
damage = 30
/obj/item/projectile/bullet/midbullet3/hp
damage = 40
armour_penetration_flat = -40
/obj/item/projectile/bullet/midbullet3/ap
damage = 27
armour_penetration_flat = 40
/obj/item/projectile/bullet/midbullet3/fire/on_hit(atom/target, blocked = 0)
if(..(target, blocked))
var/mob/living/M = target
M.adjust_fire_stacks(1)
M.IgniteMob()
/obj/item/projectile/bullet/heavybullet
damage = 35
/obj/item/projectile/bullet/stunshot //taser slugs for shotguns, nothing special
name = "stunshot"
damage = 5
weaken = 10 SECONDS
stutter = 10 SECONDS
jitter = 40 SECONDS
range = 7
icon_state = "spark"
color = "#FFFF00"
/obj/item/projectile/bullet/incendiary/shell
name = "incendiary slug"
damage = 20
/obj/item/projectile/bullet/incendiary/shell/Move()
..()
var/turf/location = get_turf(src)
if(location)
new /obj/effect/hotspot(location)
location.hotspot_expose(700, 50, 1)
/obj/item/projectile/bullet/incendiary/shell/dragonsbreath
name = "dragonsbreath round"
damage = 5
/obj/item/projectile/bullet/meteorshot
name = "meteor"
icon = 'icons/obj/meteor.dmi'
icon_state = "dust"
damage = 30
knockdown = 8 SECONDS
hitsound = 'sound/effects/meteorimpact.ogg'
/obj/item/projectile/bullet/meteorshot/on_hit(atom/target, blocked = 0)
..()
if(ismovable(target))
var/atom/movable/M = target
if(M.move_resist < INFINITY)
var/atom/throw_target = get_edge_target_turf(M, get_dir(src, get_step_away(M, src)))
M.throw_at(throw_target, 3, 2)
/obj/item/projectile/bullet/meteorshot/New()
..()
SpinAnimation()
/obj/item/projectile/bullet/mime
damage = 40
var/special_effects = TRUE
/obj/item/projectile/bullet/mime/on_hit(atom/target, blocked = 0)
..(target, blocked)
if(special_effects)
if(iscarbon(target))
var/mob/living/carbon/M = target
M.Silence(20 SECONDS)
else if(istype(target, /obj/mecha/combat/honker))
var/obj/mecha/chassis = target
chassis.occupant_message("A mimetech anti-honk bullet has hit \the [chassis]!")
chassis.use_power(chassis.get_charge() / 2)
for(var/obj/item/mecha_parts/mecha_equipment/weapon/honker in chassis.equipment)
honker.set_ready_state(0)
/obj/item/projectile/bullet/mime/nonlethal
damage = 0 /// We deal no normal damage...
stamina = 40 /// ...Rather a large amount of stamina damage. Used in the mime mecha
/obj/item/projectile/bullet/mime/fake
damage = 0
nodamage = TRUE
special_effects = FALSE
log_override = TRUE
/obj/item/projectile/bullet/dart
name = "dart"
icon_state = "cbbolt"
damage = 6
var/piercing = FALSE
/obj/item/projectile/bullet/dart/New()
..()
create_reagents(50)
reagents.set_reacting(FALSE)
/obj/item/projectile/bullet/dart/on_hit(atom/target, blocked = 0, hit_zone)
if(iscarbon(target))
var/mob/living/carbon/M = target
if(blocked != INFINITY)
if(M.can_inject(null, FALSE, hit_zone, piercing)) // Pass the hit zone to see if it can inject by whether it hit the head or the body.
..()
reagents.trans_to(M, reagents.total_volume)
return 1
else
blocked = INFINITY
target.visible_message("<span class='danger'>[src] was deflected!</span>", \
"<span class='userdanger'>You were protected against [src]!</span>")
..(target, blocked, hit_zone)
reagents.set_reacting(TRUE)
reagents.handle_reactions()
return 1
/obj/item/projectile/bullet/dart/metalfoam
/obj/item/projectile/bullet/dart/metalfoam/New()
..()
reagents.add_reagent("aluminum", 15)
reagents.add_reagent("fluorosurfactant", 5)
reagents.add_reagent("sacid", 5)
//This one is for future syringe guns update
/obj/item/projectile/bullet/dart/syringe
name = "syringe"
icon = 'icons/obj/chemical.dmi'
icon_state = "syringeproj"
/obj/item/projectile/bullet/dart/syringe/tranquilizer
/obj/item/projectile/bullet/dart/syringe/tranquilizer/New()
..()
reagents.add_reagent("haloperidol", 15)
/obj/item/projectile/bullet/neurotoxin
name = "neurotoxin spit"
icon_state = "neurotoxin"
damage = 5
damage_type = TOX
stamina = 40
knockdown = 10 SECONDS
/obj/item/projectile/bullet/neurotoxin/on_hit(atom/target, blocked = 0)
if(isalien(target))
knockdown = 0
nodamage = TRUE
. = ..() // Execute the rest of the code.
/obj/item/projectile/bullet/cap
name = "cap"
damage = 0
nodamage = 1
/obj/item/projectile/bullet/cap/fire()
loc = null
qdel(src)