Skip to content

Commit

Permalink
Creates new type of asteroid boss (#33674)
Browse files Browse the repository at this point in the history
* Creates new type of asteroid boss

* name suggested

* frost oil perfectly revives hivelord hearts

* frost oil perfectly revives hivelord hearts

* frost oil perfectly revives hivelord hearts

* frost oil perfectly revives hivelord hearts

* frost oil perfectly revives hivelord hearts

* wrong way round

* makes the boss less actually impossible

Co-authored-by: SECBATON GRIFFON <sage>
  • Loading branch information
SECBATON-GRIFFON authored Nov 23, 2022
1 parent 79b8dc3 commit 4ba1550
Show file tree
Hide file tree
Showing 8 changed files with 119 additions and 17 deletions.
6 changes: 3 additions & 3 deletions __DEFINES/turfs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
#define TURF_WET_LUBE 2
#define TURF_WET_ICE 3

#define TURF_CONTAINS_REGULAR_ROCKERNAUT 1
#define TURF_CONTAINS_BOSS_ROCKERNAUT 2
#define TURF_CONTAINS_ROCKERNAUT 1
#define TURF_CONTAINS_BOSS 2

#define SLIP_HAS_MAGBOOTS -1 // Magbooties !

Expand All @@ -14,4 +14,4 @@
#define MINE_DIFFICULTY_DENSE 5
#define MINE_DIFFICULTY_GLHF 9

#define MINE_DURATION 100
#define MINE_DURATION 100
3 changes: 3 additions & 0 deletions code/datums/helper_datums/butchering.dm
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,9 @@
return "Its core has been taken. "


/datum/butchering_product/hivelord_core/heart
result = /obj/item/organ/internal/heart/hivelord

//======deer head

/datum/butchering_product/deer_head
Expand Down
16 changes: 10 additions & 6 deletions code/modules/mining/mine_turfs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ var/list/icon_state_to_appearance = list()
var/turf/unsimulated/mineral/random/target_turf = get_step(src, trydir)
if(istype(target_turf) && !target_turf.mineral)
if(prob(1) && prob(25)) //People wanted them rarer
rockernaut = TURF_CONTAINS_REGULAR_ROCKERNAUT
rockernaut = TURF_CONTAINS_ROCKERNAUT
target_turf.mineral = mineral
target_turf.UpdateMineral()
target_turf.MineralSpread()
Expand Down Expand Up @@ -482,14 +482,18 @@ var/list/icon_state_to_appearance = list()
if (mineral && mineral.result_amount)
DropMineral()
switch(rockernaut)
if(TURF_CONTAINS_REGULAR_ROCKERNAUT)
if(TURF_CONTAINS_ROCKERNAUT)
var/mob/living/simple_animal/hostile/asteroid/rockernaut/R = new(src)
if(mineral)
R.possessed_ore = mineral.ore
if(TURF_CONTAINS_BOSS_ROCKERNAUT)
var/mob/living/simple_animal/hostile/asteroid/rockernaut/boss/R = new(src)
if(mineral)
R.possessed_ore = mineral.ore
if(TURF_CONTAINS_BOSS)
switch(rand(1,2))
if(1)
var/mob/living/simple_animal/hostile/asteroid/rockernaut/boss/R = new(src)
if(mineral)
R.possessed_ore = mineral.ore
if(2)
new /mob/living/simple_animal/hostile/asteroid/hivelord/boss(src)
//destroyed artifacts have weird, unpleasant effects
//make sure to destroy them before changing the turf though
if(artifact_find && artifact_fail)
Expand Down
5 changes: 4 additions & 1 deletion code/modules/mob/living/carbon/human/human_damage.dm
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,10 @@ In most cases it makes more sense to use apply_damage() instead! And make sure t
//Heal MANY external organs, in random order
/mob/living/carbon/human/heal_overall_damage(var/brute, var/burn)
var/list/datum/organ/external/parts = get_damaged_organs(brute,burn)

var/datum/organ/internal/heart/hivelord/H = get_heart()
if(istype(H)) // hivelord hearts just heal better
brute *= 2
burn *= 2
var/update = 0
while(parts.len && (brute>0 || burn>0) )
var/datum/organ/external/picked = pick(parts)
Expand Down
3 changes: 3 additions & 0 deletions code/modules/mob/living/living.dm
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,9 @@
var/mob/living/carbon/human/H = src
if(H.species.tox_mod)
mult = H.species.tox_mod
var/datum/organ/internal/heart/hivelord/HL = H.get_heart()
if(istype(HL) && amount < 0) // hivelord hearts just heal better
mult *= 2

toxloss = min(max(toxloss + (amount * tox_damage_modifier * mult), 0),(maxHealth*2))

Expand Down
9 changes: 9 additions & 0 deletions code/modules/mob/living/simple_animal/hostile/hostile.dm
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
var/list/target_rules = list()

var/can_ventcrawl = FALSE // If the mob can ventcrawl
var/mob/living/simple_animal/hostile/asteroid/hivelord/hivelord = null

/mob/living/simple_animal/hostile/New()
..()
Expand All @@ -44,6 +45,10 @@
for(var/datum/fuzzy_ruling/D in target_rules)
qdel(D)
target_rules = null
if(hivelord)
if(src in hivelord.broods)
hivelord.broods.Remove(src)
hivelord = null
..()

/mob/living/simple_animal/hostile/proc/initialize_rules()
Expand Down Expand Up @@ -351,6 +356,10 @@
/mob/living/simple_animal/hostile/death(var/gibbed = FALSE)
LoseAggro()
walk(src, 0)
if(hivelord)
if(src in hivelord.broods)
hivelord.broods.Remove(src)
hivelord = null
..(gibbed)

/mob/living/simple_animal/hostile/inherit_mind(mob/living/simple_animal/from)
Expand Down
77 changes: 71 additions & 6 deletions code/modules/mob/living/simple_animal/hostile/mining_mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -312,16 +312,22 @@
minimum_distance = 3
pass_flags = PASSTABLE
hostile_interest = 15 //Very persistent
var/open_fire_type = /mob/living/simple_animal/hostile/asteroid/hivelordbrood
var/list/mob/living/simple_animal/hostile/broods = list()
var/brood_limit = 0

/mob/living/simple_animal/hostile/asteroid/hivelord/get_butchering_products()
return list(/datum/butchering_product/hivelord_core)

/mob/living/simple_animal/hostile/asteroid/hivelord/OpenFire(var/the_target)
var/mob/living/simple_animal/hostile/asteroid/hivelordbrood/A = new /mob/living/simple_animal/hostile/asteroid/hivelordbrood(src.loc)
A.GiveTarget(target)
A.friends = friends
A.faction = faction
return
if(!brood_limit || broods.len < brood_limit)
var/mob/living/simple_animal/hostile/A = new open_fire_type(src.loc)
if(istype(A))
A.GiveTarget(target)
A.friends = friends
A.faction = faction
A.hivelord = src
broods.Add(A)

/mob/living/simple_animal/hostile/asteroid/hivelord/AttackingTarget()
OpenFire()
Expand Down Expand Up @@ -354,6 +360,29 @@
return core.amount
return 1

/mob/living/simple_animal/hostile/asteroid/hivelord/boss
name = "Maria"
size = SIZE_HUGE
maxHealth = 300
health = 300
pixel_y = 16 * PIXEL_MULTIPLIER
status_flags = UNPACIFIABLE
move_to_delay = 30
harm_intent_damage = 10
hostile_interest = 5 //Less persistent
open_fire_type = /mob/living/simple_animal/hostile/asteroid/hivelord
brood_limit = 5

/mob/living/simple_animal/hostile/asteroid/hivelord/boss/New()
..()
appearance_flags |= PIXEL_SCALE
var/matrix/M = matrix()
M.Scale(2,2)
transform = M

/mob/living/simple_animal/hostile/asteroid/hivelord/boss/get_butchering_products()
return list(/datum/butchering_product/hivelord_core/heart)

/obj/item/asteroid/hivelord_core
name = "hivelord remains"
desc = "All that remains of a hivelord, it seems to be what allows it to break pieces of itself off without being hurt... its healing properties will soon become inert if not used quickly. Try not to think about what you're eating."
Expand Down Expand Up @@ -467,6 +496,42 @@
qdel(src)
return TRUE

/obj/item/organ/internal/heart/hivelord
name = "hivelord heart"
desc = "All that remains of a greater hivelord, works as a drop-in replacement for any species heart, granting protection from bone damage or internal bleeding, as well as boosting any healing processes. Try not to think about what's beating inside you."
icon = 'icons/obj/food.dmi'
icon_state = "boiledrorocore"
organ_tag = "heart"
prosthetic_name = null
prosthetic_icon = null
dead_icon = null
fresh = 6 // Juicy.
organ_type = /datum/organ/internal/heart/hivelord

/obj/item/organ/internal/heart/hivelord/die()
..()
desc = "The remains of a greater hivelord that have become useless, having been left alone too long after being out of a body."

/obj/item/organ/internal/heart/hivelord/revive()
..()
desc = initial(desc)

/datum/organ/internal/heart/hivelord
name = "hivelord heart"
removed_type = /obj/item/organ/internal/heart/hivelord
min_bruised_damage = 15
min_broken_damage = 30

/datum/organ/internal/heart/hivelord/Life()
for(var/datum/organ/external/E in owner.organs)
if(prob(10))
E.status &= ~ORGAN_BROKEN
E.status &= ~ORGAN_SPLINTED
for(var/datum/wound/W in E.wounds)
if(W.internal && prob(10))
E.wounds -= W
E.update_damages()

/mob/living/simple_animal/hostile/asteroid/hivelordbrood
name = "hivelord brood"
desc = "A fragment of the original Hivelord, rallying behind its original. One isn't much of a threat, but..."
Expand Down Expand Up @@ -827,7 +892,7 @@
if(Adjacent(M))
//Climb in
visible_message("<span class = 'warning'>\The [src] burrows itself into \the [M]!</span>")
M.rockernaut = istype(src, /mob/living/simple_animal/hostile/asteroid/rockernaut/boss) ? TURF_CONTAINS_BOSS_ROCKERNAUT : TURF_CONTAINS_REGULAR_ROCKERNAUT
M.rockernaut = istype(src, /mob/living/simple_animal/hostile/asteroid/rockernaut/boss) ? TURF_CONTAINS_BOSS : TURF_CONTAINS_ROCKERNAUT
qdel(src)
return
else
Expand Down
17 changes: 16 additions & 1 deletion code/modules/reagents/Chemistry-Reagents.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2447,7 +2447,7 @@
for(var/obj/item/I in H.held_items)
I.clean_blood()

for(var/obj/item/clothing/C in M.get_equipped_items())
for(var/obj/item/clothing/C in M.get_equipped_items())
if(C.clean_blood())
H.update_inv_by_slot(C.slot_flags)

Expand Down Expand Up @@ -5065,6 +5065,21 @@ var/procizine_tolerance = 0
if(isslimeperson(H))
H.adjustToxLoss(rand(5, 15))

/datum/reagent/frostoil/reaction_obj(var/obj/O, var/volume)

if(..())
return 1

if(istype(O, /obj/item/organ/internal/heart/hivelord))
var/obj/item/organ/internal/heart/hivelord/I = O
if(I.health <= 0)
I.revive()
I.health = initial(I.health)
if(I.organ_data)
var/datum/organ/internal/OD = I.organ_data
if(OD.damage > 0)
OD.damage = 0

/datum/reagent/sodiumchloride
name = "Table Salt"
id = SODIUMCHLORIDE
Expand Down

0 comments on commit 4ba1550

Please sign in to comment.