Skip to content

Commit

Permalink
Sensible Benzin roaches (#4987)
Browse files Browse the repository at this point in the history
* seems fine?

* bullet stuff!
  • Loading branch information
benj8560 authored Jan 31, 2024
1 parent bfd86ec commit 8a1090e
Show file tree
Hide file tree
Showing 12 changed files with 79 additions and 36 deletions.
4 changes: 2 additions & 2 deletions code/game/objects/items/weapons/tools/_tools.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1010,8 +1010,8 @@
var/obj/item/weldpack/P = O
P.explode()
return
else if(istype(O, /mob/living/carbon/superior_animal/roach/benzin))
var/mob/living/carbon/superior_animal/roach/benzin/B = O
else if(istype(O, /mob/living/carbon/superior_animal/roach/nitro))
var/mob/living/carbon/superior_animal/roach/nitro/B = O
if(B.stat != DEAD)
if(has_quality(QUALITY_WELDING))
B.fire_act()
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/random/mob/roach.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
/mob/living/carbon/superior_animal/roach/glowing = 2,
/mob/living/carbon/superior_animal/roach/nanite = 2,
/mob/living/carbon/superior_animal/roach/glowing = 1,
/mob/living/carbon/superior_animal/roach/benzin = 0.5,
/mob/living/carbon/superior_animal/roach/nitro = 0.5,
/mob/living/carbon/superior_animal/roach/hunter = 4,
/mob/living/carbon/superior_animal/roach/support = 4,
/mob/living/carbon/superior_animal/roach/fuhrer = 0.5,
Expand Down
4 changes: 2 additions & 2 deletions code/game/objects/structures/crates_lockers/largecrate.dm
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@

/obj/structure/largecrate/animal/welder_roach
name = "Benzin Roach crate"
held_type = /mob/living/carbon/superior_animal/roach/benzin
held_type = /mob/living/carbon/superior_animal/roach/nitro

/obj/structure/largecrate/animal/piano
held_type = /obj/structure/synthesized_instrument/synthesizer/piano
held_type = /obj/structure/synthesized_instrument/synthesizer/piano
Original file line number Diff line number Diff line change
@@ -1,43 +1,65 @@
/mob/living/carbon/superior_animal/roach/benzin
/mob/living/carbon/superior_animal/roach/nitro
name = "Benzin Roach"
desc = "A monstrous, dog-sized cockroach. This one smells like welding fuel and will likely explode when shot!."
desc = "A monstrous, dog-sized cockroach. This one smells like welding fuel. Likely to explode when shot!"
icon_state = "boomroach"
turns_per_move = 4
maxHealth = 25
health = 25
melee_damage_upper = 3
meat_type = /obj/item/reagent_containers/food/snacks/meat/roachmeat/benzin
meat_type = /obj/item/reagent_containers/food/snacks/meat/roachmeat/nitro
meat_amount = 3
var/fuel_amount = 50
var/leaking = FALSE
var/impending_explosion = FALSE

contaminant_immunity = TRUE
toxin_immune = TRUE
var/exploded = FALSE

/mob/living/carbon/superior_animal/roach/benzin/Initialize(mapload)
. = ..()
set_light(0.5)
reagents.maximum_volume = 40
/mob/living/carbon/superior_animal/roach/nitro/ex_act()
if(!exploded)
kerplode()

/mob/living/carbon/superior_animal/roach/benzin/Life()
if(reagents.total_volume < reagents.maximum_volume)
reagents.add_reagent("fuel", 1)
/mob/living/carbon/superior_animal/roach/nitro/Move()
..()
if(leaking && (fuel_amount > 0.5))
var/transfer = fuel_amount * 0.2
new /obj/effect/decal/cleanable/liquid_fuel(src.loc, transfer, 1)
fuel_amount -= transfer

/mob/living/carbon/superior_animal/roach/benzin/bullet_act(obj/item/projectile/P, def_zone)
. = ..()
if(prob(80) && (!(P.testing)))
explosion(src.loc, 0,1,2) //slightly weaker radius than a plasma spider, still hurts like a bitch

/mob/living/carbon/superior_animal/roach/benzin/attackby(obj/item/I, mob/living/user, params)
if(user.a_intent == I_HELP && istool(I))
var/obj/item/tool/T = I
if(T.use_fuel_cost)
return FALSE
/mob/living/carbon/superior_animal/roach/nitro/bullet_act(obj/item/projectile/slug)
if(!exploded && slug.ignition_source)
kerplode()
else
. = ..()

/mob/living/carbon/superior_animal/roach/nitro/fire_act()
if(!exploded && !impending_explosion)
impending_explosion = TRUE
spawn(rand(30,150))
kerplode()
. = ..()

/mob/living/carbon/superior_animal/roach/benzin/fire_act()
if(stat != DEAD)
explosion(src.loc, 0,1,2) //slightly weaker radius than a plasma spider, still hurts like a bitch
/mob/living/carbon/superior_animal/roach/nitro/proc/kerplode()
impending_explosion = TRUE
if(!exploded)
exploded = TRUE
visible_message(SPAN_DANGER("\the [src] violently explodes!"))
explosion(src.loc, -1, -1, 2, 3) //explosion weaker than a welding tank
gib()

/mob/living/carbon/superior_animal/roach/nitro/attackby(obj/item/I)
if(isflamesource(I))
kerplode()
else
if(I.sharp)
leaking = TRUE
. = ..()

/mob/living/carbon/superior_animal/roach/benzin/death()
/mob/living/carbon/superior_animal/roach/nitro/death()
. = ..()
new /obj/effect/decal/cleanable/liquid_fuel(loc, reagents.get_reagent_amount("fuel"), 1)
if(src)
if(!exploded && !leaking)
new /obj/effect/decal/cleanable/liquid_fuel(src.loc, max((fuel_amount - 5),2), 1) //A welderfuel tank below 50 units makes the explosion above (with no flash).
leaking = TRUE



2 changes: 2 additions & 0 deletions code/modules/projectiles/projectile.dm
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@

var/recoil = 0

var/ignition_source = TRUE //Used for deciding if a projectile should blow up a benzin.

/obj/item/projectile/New()

penetration_holder = new /datum/penetration_holder
Expand Down
12 changes: 12 additions & 0 deletions code/modules/projectiles/projectile/bullettypes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
sharp = FALSE
can_ricochet = TRUE
recoil = 4
ignition_source = FALSE

/obj/item/projectile/bullet/pistol_35/rubber/soporific
name = "soporific coated rubber bullet"
Expand Down Expand Up @@ -196,6 +197,7 @@
can_ricochet = TRUE
step_delay = 0.5
recoil = 6
ignition_source = FALSE

/obj/item/projectile/bullet/magnum_40/rubber/pepperball
name = "pepperball"
Expand Down Expand Up @@ -282,6 +284,7 @@
can_ricochet = TRUE
step_delay = 0.7
recoil = 10
ignition_source = FALSE

/obj/item/projectile/bullet/kurtz_50/rubber/pepperball
name = "pepperball"
Expand Down Expand Up @@ -388,6 +391,7 @@
can_ricochet = TRUE
step_delay = 0.9
recoil = 4
ignition_source = FALSE

/obj/item/projectile/bullet/light_rifle_257/rubber/pepperball
name = "pepperball"
Expand Down Expand Up @@ -490,6 +494,7 @@
can_ricochet = TRUE
step_delay = 0.9
recoil = 6
ignition_source = FALSE

/obj/item/projectile/bullet/rifle_75/rubber/soporific
name = "soporific coated rubber bullet"
Expand Down Expand Up @@ -566,6 +571,7 @@
can_ricochet = TRUE
step_delay = 0.9
recoil = 14
ignition_source = FALSE

/obj/item/projectile/bullet/heavy_rifle_408/practice
name = "practice bullet"
Expand Down Expand Up @@ -840,6 +846,7 @@
affective_damage_range = 5
affective_ap_range = 2
recoil = 10
ignition_source = FALSE

/obj/item/projectile/bullet/shotgun/beanbag/pepperball
name = "pepperball slug"
Expand Down Expand Up @@ -965,6 +972,7 @@
hitscan = TRUE
can_ricochet = FALSE
recoil = 9
ignition_source = FALSE

/obj/item/projectile/bullet/kurtz_50/incendiary
damage_types = list(BRUTE = 5)
Expand Down Expand Up @@ -1097,6 +1105,7 @@
sharp = FALSE
recoil = 1
kill_count = 0 //cap gun so projectile dies the second it fires. -Benl8561
ignition_source = FALSE //dunno how you'd manage it but just in case.

/obj/item/projectile/bullet/crossbow_bolt
name = "bolt"
Expand Down Expand Up @@ -1212,6 +1221,7 @@
affective_ap_range = 6
create_type = /obj/item/ammo_casing/arrow
recoil = 0 //arrow moment
ignition_source = FALSE

/obj/item/projectile/bullet/reusable/arrow/serrated //Lower base damage, higher embed rate, higher AP. Arrow HV's, though not as good as the Lodge's.
name = "serrated arrow"
Expand All @@ -1226,6 +1236,7 @@
affective_ap_range = 8
create_type = null
shrapnel_type = /obj/item/ammo_casing/arrow/serrated //the ENTIRE arrow!
ignition_source = FALSE

/obj/item/projectile/bullet/reusable/arrow/broadhead
name = "broadhead arrow"
Expand Down Expand Up @@ -1327,6 +1338,7 @@
affective_ap_range = 6
kill_count = 7 //heavy arrow, worse aerodynamics
create_type = null
ignition_source = TRUE

/obj/item/projectile/bullet/reusable/arrow/explosive/on_impact(atom/target)
if (!testing)
Expand Down
1 change: 1 addition & 0 deletions code/modules/projectiles/projectile/fragment.dm
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
agony = 25 // 70 x 25 = 1750 pain, if all hit, rather then 32 x 150
embed = FALSE
sharp = FALSE
ignition_source = FALSE

/obj/item/projectile/bullet/pellet/fragment/ember
name = "phosphorous ember"
Expand Down
5 changes: 5 additions & 0 deletions code/modules/projectiles/projectile/plasma.dm
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
check_armour = ARMOR_ENERGY
recoil = 1
fire_stacks = 0
ignition_source = FALSE

/obj/item/projectile/plasma/lastertag/blue/on_hit(atom/target)
if (!testing)
Expand All @@ -98,6 +99,7 @@
check_armour = ARMOR_ENERGY
recoil = 1
fire_stacks = 0
ignition_source = FALSE

/obj/item/projectile/plasma/lastertag/red/on_hit(atom/target)
if (!testing)
Expand All @@ -119,6 +121,7 @@
check_armour = ARMOR_ENERGY
recoil = 1
fire_stacks = 0
ignition_source = FALSE

/obj/item/projectile/plasma/lastertag/green/on_hit(atom/target)
if (!testing)
Expand All @@ -140,6 +143,7 @@
check_armour = ARMOR_ENERGY
recoil = 1
fire_stacks = 0
ignition_source = FALSE

/obj/item/projectile/plasma/lastertag/yellow/on_hit(atom/target)
if (!testing)
Expand All @@ -160,6 +164,7 @@
check_armour = ARMOR_ENERGY
recoil = 1
fire_stacks = 0
ignition_source = FALSE

muzzle_type = /obj/effect/projectile/laser_omni/muzzle
tracer_type = /obj/effect/projectile/laser_omni/tracer
Expand Down
1 change: 1 addition & 0 deletions code/modules/projectiles/projectile/special.dm
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@
embed = 0 // nope
nodamage = TRUE
muzzle_type = /obj/effect/projectile/bullet/muzzle
ignition_source = FALSE


/obj/item/projectile/flamer_lob
Expand Down
4 changes: 2 additions & 2 deletions code/modules/reagents/reagent_containers/food/cubes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@
//taste_tag = list(MEAT_FOOD,BLAND_FOOD)
grow_into = /mob/living/carbon/superior_animal/roach/toxic

/obj/item/reagent_containers/food/snacks/cube/roach/benzin
/obj/item/reagent_containers/food/snacks/cube/roach/nitro
name = "Benzin Cube"
desc = "Just add Blood!"
reagent_flags = REFILLABLE
Expand All @@ -223,4 +223,4 @@
center_of_mass = list("x"=16, "y"=14)
preloaded_reagents = list("protein" = 10)
//taste_tag = list(MEAT_FOOD,BLAND_FOOD)
grow_into = /mob/living/carbon/superior_animal/roach/benzin
grow_into = /mob/living/carbon/superior_animal/roach/nitro
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
/obj/item/reagent_containers/food/snacks/meat/roachmeat/elektromagnetisch
preloaded_reagents = list("protein" = 4, "seligitillin" = 8, "diplopterum" = 6, "iron" = 5)

/obj/item/reagent_containers/food/snacks/meat/roachmeat/benzin
/obj/item/reagent_containers/food/snacks/meat/roachmeat/nitro
desc = "A slab of sickly-green meat cut from a benzin roach. Stinks of welding fuel. Delicious!"
preloaded_reagents = list("protein" = 4, "blattedin" = 6, "fuel" = 30)

Expand Down
2 changes: 1 addition & 1 deletion maps/__Nadezhda/map/_Nadezhda_Colony_New.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -85242,7 +85242,7 @@
/turf/simulated/floor/tiled/dark/danger,
/area/nadezhda/medical/sleeper)
"rUO" = (
/mob/living/carbon/superior_animal/roach/benzin,
/mob/living/carbon/superior_animal/roach/nitro,
/turf/simulated/floor/tiled/dark/golden,
/area/nadezhda/maintenance/undergroundfloor2west)
"rUW" = (
Expand Down

0 comments on commit 8a1090e

Please sign in to comment.