Skip to content

Commit

Permalink
Bubblegum
Browse files Browse the repository at this point in the history
  • Loading branch information
imtakingabreakdontatme committed Jun 7, 2016
1 parent de89461 commit 39bdefd
Show file tree
Hide file tree
Showing 8 changed files with 633 additions and 7 deletions.
96 changes: 93 additions & 3 deletions code/modules/mining/lavaland/necropolis_chests.dm
Original file line number Diff line number Diff line change
Expand Up @@ -442,17 +442,33 @@
src.used = TRUE






///Bosses




//Dragon

/obj/structure/closet/crate/necropolis/dragon
name = "dragon chest"

/obj/structure/closet/crate/necropolis/dragon/New()
..()
var/loot = rand(1,2)
var/loot = rand(1,4)
switch(loot)
if(1)
new /obj/item/weapon/melee/ghost_sword(src)
if(2)
new /obj/item/weapon/lava_staff(src)
if(3)
new /obj/item/weapon/spellbook/oneuse/fireball(src)
new /obj/item/weapon/gun/magic/wand/fireball(src)
if(4)
new /obj/item/weapon/dragons_blood(src)

/obj/item/weapon/melee/ghost_sword
name = "spectral blade"
Expand Down Expand Up @@ -549,7 +565,7 @@
return

var/mob/living/carbon/human/H = user
var/random = rand(1,3)
var/random = rand(1,4)

switch(random)
if(1)
Expand All @@ -561,6 +577,9 @@
user << "<span class='danger'>You don't feel so good...</span>"
message_admins("[key_name_admin(user)](<A HREF='?_src_=holder;adminplayerobservefollow=\ref[user]'>FLW</A>) has started transforming into a dragon via dragon's blood.")
H.ForceContractDisease(new /datum/disease/transformation/dragon(0))
if(4)
user << "<span class='danger'>You feel like you could walk straight through lava now.</span>"
H.weather_immunities |= "lava"

playsound(user.loc,'sound/items/drink.ogg', rand(10,50), 1)
qdel(src)
Expand All @@ -578,7 +597,7 @@
stage2 = list("Your skin feels scaley.")
stage3 = list("<span class='danger'>You have an overwhelming urge to terrorize some peasants.</span>", "<span class='danger'>Your teeth feel sharper.</span>")
stage4 = list("<span class='danger'>Your blood burns.</span>")
stage5 = list("<span class='danger'>You're a fucking dragon.</span>")
stage5 = list("<span class='danger'>You're a fucking dragon. However, any previous allegiances you held still apply. It'd be incredibly rude to eat your still human friends for no reason.</span>")
new_form = /mob/living/simple_animal/hostile/megafauna/dragon/lesser


Expand Down Expand Up @@ -620,3 +639,74 @@
O.ChangeTurf(turf_type)
playsound(get_turf(src),'sound/magic/Fireball.ogg', 200, 1)
timer = world.time + cooldown

///Bubblegum

/obj/item/mayhem
name = "mayhem in a bottle"
desc = "A magically infused bottle of blood, the scent of which will drive anyone nearby into a murderous frenzy."
icon = 'icons/obj/wizard.dmi'
icon_state = "vial"

/obj/item/mayhem/attack_self(mob/user)
for(var/mob/living/carbon/human/H in range(7,user))
spawn()
var/obj/effect/mine/pickup/bloodbath/B = new(H)
B.mineEffect(H)
user << "<span class='notice'>You shatter the bottle!</span>"
playsound(user.loc, 'sound/effects/Glassbr1.ogg', 100, 1)
qdel(src)

/obj/structure/closet/crate/necropolis/bubblegum
name = "bubblegum chest"

/obj/structure/closet/crate/necropolis/bubblegum/New()
..()
var/loot = rand(1,3)
switch(loot)
if(1)
new /obj/item/weapon/antag_spawner/slaughter_demon(src)
if(2)
new /obj/item/mayhem(src)
if(3)
new /obj/item/blood_contract(src)

/obj/item/blood_contract
name = "blood contract"
icon = 'icons/obj/wizard.dmi'
icon_state = "scroll2"
color = "#FF0000"
desc = "Mark your target for death. "
var/used = FALSE

/obj/item/blood_contract/attack_self(mob/user)
if(used)
return
used = TRUE
var/choice = input(user,"Who do you want dead?","Pick Reinforcement") as null|anything in player_list

if(!(isliving(choice)))
user << "[choice] is already dead!"
used = FALSE
else

var/mob/living/L = choice

message_admins("<span class='adminnotice'>[L] has been marked for death!</span>")

var/datum/objective/survive/survive = new
survive.owner = L.mind
L.mind.objectives += survive
L << "<span class='userdanger'>You've been marked for death! Don't let the demons get you!</span>"
L.color = "#FF0000"
spawn()
var/obj/effect/mine/pickup/bloodbath/B = new(L)
B.mineEffect(L)

for(var/mob/living/carbon/human/H in player_list)
if(H == L)
continue
H << "<span class='userdanger'>You have an overwhelming desire to kill [L]. They have been marked red! Go kill them!</span>"
H.equip_to_slot_or_del(new /obj/item/weapon/kitchen/knife/butcher(H), slot_l_hand)

qdel(src)
2 changes: 1 addition & 1 deletion code/modules/mining/mine_turfs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@

/turf/open/floor/plating/asteroid/airless/cave/volcanic
mob_spawn_list = list(/mob/living/simple_animal/hostile/asteroid/goldgrub = 10, /mob/living/simple_animal/hostile/asteroid/goliath/beast = 50, /mob/living/simple_animal/hostile/asteroid/basilisk/watcher = 40, /mob/living/simple_animal/hostile/asteroid/hivelord/legion = 30,
/mob/living/simple_animal/hostile/spawner/lavaland = 2, /mob/living/simple_animal/hostile/spawner/lavaland/goliath = 3, /mob/living/simple_animal/hostile/spawner/lavaland/legion = 3, /mob/living/simple_animal/hostile/megafauna/dragon = 2)
/mob/living/simple_animal/hostile/spawner/lavaland = 2, /mob/living/simple_animal/hostile/spawner/lavaland/goliath = 3, /mob/living/simple_animal/hostile/spawner/lavaland/legion = 3, /mob/living/simple_animal/hostile/megafauna/dragon = 1, /mob/living/simple_animal/hostile/megafauna/bubblegum = 0.5, /mob/living/simple_animal/hostile/megafauna/bubblegum = 0.5)

turf_type = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
initial_gas_mix = "o2=14;n2=23;TEMP=300"
Expand Down
167 changes: 167 additions & 0 deletions code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
/mob/living/simple_animal/hostile/megafauna/bubblegum
name = "bubblegum"
desc = "In what passes for a heirarchy among slaughter demons, this one is king."
health = 2500
maxHealth = 2500
attacktext = "rends"
attack_sound = 'sound/magic/demon_attack1.ogg'
icon_state = "bubblegum"
icon_living = "bubblegum"
icon_dead = ""
friendly = "stares down"
icon = 'icons/mob/lavaland/96x96megafauna.dmi'
faction = list("mining")
weather_immunities = list("lava","ash")
speak_emote = list("gurgles")
armour_penetration = 40
melee_damage_lower = 30
melee_damage_upper = 30
speed = 1
move_to_delay = 10
ranged = 1
flying = 1
mob_size = MOB_SIZE_LARGE
pixel_x = -32
del_on_death = 1
aggro_vision_range = 18
idle_vision_range = 5
loot = list(/obj/structure/closet/crate/necropolis/dragon)
var/charging = 0
deathmessage = "sinks into a pool of blood, fleeing the battle. You've won, for now... "
death_sound = 'sound/magic/enter_blood.ogg'

/obj/item/device/gps/internal/bubblegum
icon_state = null
gpstag = "Bloody Signal"
desc = "You're not quite sure how a signal can be bloody."
invisibility = 100

/mob/living/simple_animal/hostile/megafauna/bubblegum/Life()
..()
/* if(!charging)
blood_warp()*/
move_to_delay = Clamp(round((health/maxHealth) * 10), 5, 10)

/mob/living/simple_animal/hostile/megafauna/bubblegum/OpenFire()
var/anger_modifier = Clamp(((maxHealth - health)/50),0,20)
ranged_cooldown = world.time + ranged_cooldown_time

if(!charging)
blood_warp()

if(prob(25))
blood_spray()

else if(prob(5+anger_modifier/2))
slaughterlings()
else
if(health > maxHealth/2 && !client && !charging)
charge()
else
charge()
sleep(10)
charge()
sleep(10)
charge()


/mob/living/simple_animal/hostile/megafauna/bubblegum/New()
..()
for(var/mob/living/simple_animal/hostile/megafauna/bubblegum/B in mob_list)
if(B != src)
qdel(src) //There can be only one
break
var/obj/effect/proc_holder/spell/bloodcrawl/bloodspell = new
AddSpell(bloodspell)
if(istype(loc, /obj/effect/dummy/slaughter))
bloodspell.phased = 1
new/obj/item/device/gps/internal/bubblegum(src)

/mob/living/simple_animal/hostile/megafauna/bubblegum/AttackingTarget()
if(charging)
return
..()

/mob/living/simple_animal/hostile/megafauna/bubblegum/Move()
if(!stat)
playsound(src.loc, 'sound/effects/meteorimpact.ogg', 200, 1)
if(charging)
PoolOrNew(/obj/effect/overlay/temp/decoy, list(loc,src))
for(var/turf/T in range(src, 1))
T.singularity_pull(src, 7)
. = ..()

/mob/living/simple_animal/hostile/megafauna/bubblegum/proc/charge()
var/turf/T = get_step_away(target, src)
charging = 1
new/obj/effect/overlay/temp/dragon_swoop(T)
sleep(5)
throw_at(T, 7, 1, src, 0)
charging = 0


/mob/living/simple_animal/hostile/megafauna/bubblegum/Bump(atom/A)
if(charging)
if(istype(A, /turf) || istype(A, /obj) && A.density)
A.ex_act(2)
..()

/mob/living/simple_animal/hostile/megafauna/bubblegum/throw_impact(atom/A)
if(!charging)
return ..()

else if(A)
if(isliving(A))
var/mob/living/L = A
L.visible_message("<span class='danger'>[src] slams into [L]!</span>", "<span class='userdanger'>[src] slams into you!</span>")
L.apply_damage(40, BRUTE)
playsound(get_turf(L), 'sound/effects/meteorimpact.ogg', 100, 1)
shake_camera(L, 4, 3)
shake_camera(src, 2, 3)
var/throwtarget = get_edge_target_turf(src, get_dir(src, get_step_away(L, src)))
L.throw_at_fast(throwtarget)

charging = 0


/mob/living/simple_animal/hostile/megafauna/bubblegum/proc/blood_warp()
// if(blood_warp_cooldown > world.time)
// return
var/found_bloodpool = FALSE
for(var/obj/effect/decal/cleanable/blood/nearby in view(src,2))
found_bloodpool = TRUE
if(found_bloodpool)
for(var/obj/effect/decal/cleanable/blood/H in view(target,2))
visible_message("<span class='danger'>[src] sinks into the blood...</span>")
playsound(get_turf(src), 'sound/magic/enter_blood.ogg', 100, 1, -1)
forceMove(get_turf(H))
playsound(get_turf(src), 'sound/magic/exit_blood.ogg', 100, 1, -1)
visible_message("<span class='danger'>And springs back out!</span>")
break


/mob/living/simple_animal/hostile/megafauna/bubblegum/proc/blood_spray()
visible_message("<span class='danger'>[src] sprays a stream of gore!</span>")
spawn(0)
var/turf/E = get_edge_target_turf(src, src.dir)
var/range = 10
for(var/turf/open/J in getline(src,E))
if(!range)
break
playsound(J,'sound/effects/splat.ogg', 100, 1, -1)
new /obj/effect/decal/cleanable/blood(J)
range--
sleep(1)

/mob/living/simple_animal/hostile/megafauna/bubblegum/proc/slaughterlings()
visible_message("<span class='danger'>[src] summons a shoal of slaughterlings!</span>")
for(var/obj/effect/decal/cleanable/blood/H in range(src, 10))
if(prob(25))
new /mob/living/simple_animal/hostile/asteroid/hivelordbrood/blood/slaughter(H.loc)

/mob/living/simple_animal/hostile/asteroid/hivelordbrood/blood/slaughter
name = "slaughterling"
desc = "Though not yet strong enough to create a true physical form, it's nonetheless determined to murder you."
faction = list("mining")
weather_immunities = list("lava","ash")

Loading

0 comments on commit 39bdefd

Please sign in to comment.