mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-21 20:20:33 +01:00
Bubblegum now charges past its target's location
This commit is contained in:
@@ -45,7 +45,7 @@
|
||||
if(leaping || stat || buckled || lying)
|
||||
return
|
||||
|
||||
if(!has_gravity(src) || !has_gravity(A))
|
||||
if(!has_gravity() || !A.has_gravity())
|
||||
src << "<span class='alertalien'>It is unsafe to leap without gravity!</span>"
|
||||
//It's also extremely buggy visually, so it's balance+bugfix
|
||||
return
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/mob_has_gravity()
|
||||
/mob/living/carbon/human/has_gravity()
|
||||
. = ..()
|
||||
if(!.)
|
||||
if(mob_negates_gravity())
|
||||
|
||||
@@ -849,7 +849,7 @@
|
||||
. -= 2
|
||||
|
||||
if(!(H.status_flags & IGNORESLOWDOWN))
|
||||
if(!has_gravity(H))
|
||||
if(!H.has_gravity())
|
||||
if(FLYING in specflags)
|
||||
. += speedmod
|
||||
return
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
//stuff in the stomach
|
||||
handle_stomach()
|
||||
|
||||
update_gravity(mob_has_gravity())
|
||||
update_gravity(has_gravity())
|
||||
|
||||
if(machine)
|
||||
machine.check_eye(src)
|
||||
|
||||
@@ -602,7 +602,7 @@
|
||||
. += config.walk_speed
|
||||
|
||||
/mob/living/proc/makeTrail(turf/T)
|
||||
if(!has_gravity(src))
|
||||
if(!has_gravity())
|
||||
return
|
||||
var/blood_exists = 0
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
else //I'm not removing that shitton of tabs, unneeded as they are. -- Urist
|
||||
//Being dead doesn't mean your temperature never changes
|
||||
|
||||
update_gravity(mob_has_gravity())
|
||||
update_gravity(has_gravity())
|
||||
|
||||
if(malfhack && malfhack.aidisabled)
|
||||
deltimer(malfhacking)
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
/mob/living/silicon/robot/mob_negates_gravity()
|
||||
return magpulse
|
||||
|
||||
/mob/living/silicon/robot/mob_has_gravity()
|
||||
/mob/living/silicon/robot/has_gravity()
|
||||
return ..() || mob_negates_gravity()
|
||||
|
||||
/mob/living/silicon/robot/experience_pressure_difference(pressure_difference, direction)
|
||||
|
||||
@@ -251,7 +251,7 @@
|
||||
/mob/living/simple_animal/drone/mob_negates_gravity()
|
||||
return 1
|
||||
|
||||
/mob/living/simple_animal/drone/mob_has_gravity()
|
||||
/mob/living/simple_animal/drone/has_gravity()
|
||||
return ..() || mob_negates_gravity()
|
||||
|
||||
/mob/living/simple_animal/drone/experience_pressure_difference(pressure_difference, direction)
|
||||
|
||||
@@ -46,6 +46,8 @@ Difficulty: Hard
|
||||
del_on_death = 1
|
||||
loot = list(/obj/structure/closet/crate/necropolis/bubblegum)
|
||||
var/charging = 0
|
||||
var/charge_range = 10
|
||||
var/turf/original_charge_loc
|
||||
medal_type = MEDAL_PREFIX
|
||||
score_type = BUBBLEGUM_SCORE
|
||||
deathmessage = "sinks into a pool of blood, fleeing the battle. You've won, for now... "
|
||||
@@ -118,6 +120,11 @@ Difficulty: Hard
|
||||
if(charging)
|
||||
DestroySurroundings()
|
||||
|
||||
/mob/living/simple_animal/hostile/megafauna/bubblegum/has_gravity(turf/T)
|
||||
if(charging && original_charge_loc && target && target.z && original_charge_loc.z == target.z && get_dist(src, original_charge_loc) < charge_range)
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_animal/hostile/megafauna/bubblegum/proc/triple_charge()
|
||||
charge()
|
||||
sleep(10)
|
||||
@@ -126,15 +133,22 @@ Difficulty: Hard
|
||||
charge()
|
||||
|
||||
/mob/living/simple_animal/hostile/megafauna/bubblegum/proc/charge()
|
||||
var/turf/T = get_step_away(target, src)
|
||||
charging = 1
|
||||
DestroySurroundings()
|
||||
var/turf/T = get_turf(target)
|
||||
if(!T)
|
||||
return
|
||||
PoolOrNew(/obj/effect/overlay/temp/dragon_swoop, T)
|
||||
charging = 1
|
||||
original_charge_loc = get_turf(src)
|
||||
if(get_dist(src, T) > 7) //the target is far enough away we can charge longer without losing vision
|
||||
charge_range = 18
|
||||
else
|
||||
charge_range = initial(charge_range) //the target is closer we need to do shorter charges to avoid losing vision
|
||||
DestroySurroundings()
|
||||
walk(src, 0)
|
||||
sleep(5)
|
||||
walk(src,0)
|
||||
throw_at(T, 7, 1, src, 0)
|
||||
throw_at(T, charge_range, 1, src, 0, 1)
|
||||
charging = 0
|
||||
Goto(target,move_to_delay,minimum_distance)
|
||||
Goto(target, move_to_delay, minimum_distance)
|
||||
|
||||
|
||||
/mob/living/simple_animal/hostile/megafauna/bubblegum/Bump(atom/A)
|
||||
@@ -148,16 +162,15 @@ Difficulty: Hard
|
||||
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)
|
||||
else 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, 3)
|
||||
|
||||
charging = 0
|
||||
|
||||
|
||||
@@ -303,9 +303,6 @@
|
||||
break
|
||||
. = dense_object_backup
|
||||
|
||||
/mob/proc/mob_has_gravity(turf/T)
|
||||
return has_gravity(src, T)
|
||||
|
||||
/mob/proc/mob_negates_gravity()
|
||||
return 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user