Skip to content
This repository has been archived by the owner on Oct 15, 2023. It is now read-only.

Commit

Permalink
Merge pull request #12270 from Fox-McCloud/ash-drake-rework
Browse files Browse the repository at this point in the history
Reworks Ash Drake and Bubblegum, Refactors Colossus, Fixes Endless Animal Attacks
  • Loading branch information
variableundefined committed Sep 12, 2019
2 parents 74fe924 + 6f516d0 commit fb4568a
Show file tree
Hide file tree
Showing 26 changed files with 1,175 additions and 585 deletions.
12 changes: 6 additions & 6 deletions code/datums/spells/wizard.dm
Original file line number Diff line number Diff line change
Expand Up @@ -383,18 +383,18 @@
name = "Repulse"
desc = "This spell throws everything around the user away."
charge_max = 400
clothes_req = 1
clothes_req = TRUE
invocation = "GITTAH WEIGH"
invocation_type = "shout"
range = 5
cooldown_min = 150
selection_type = "view"
sound = 'sound/magic/repulse.ogg'
var/maxthrow = 5
var/sparkle_path = /obj/effect/temp_visual/gravpush
action_icon_state = "repulse"
sound = 'sound/magic/repulse.ogg'

/obj/effect/proc_holder/spell/aoe_turf/repulse/cast(list/targets, mob/user = usr)
/obj/effect/proc_holder/spell/aoe_turf/repulse/cast(list/targets, mob/user = usr, stun_amt = 2)
var/list/thrownatoms = list()
var/atom/throwtarget
var/distfromcaster
Expand All @@ -411,16 +411,16 @@
throwtarget = get_edge_target_turf(user, get_dir(user, get_step_away(AM, user)))
distfromcaster = get_dist(user, AM)
if(distfromcaster == 0)
if(istype(AM, /mob/living))
if(isliving(AM))
var/mob/living/M = AM
M.Weaken(5)
M.adjustBruteLoss(5)
to_chat(M, "<span class='userdanger'>You're slammed into the floor by a mystical force!</span>")
else
new sparkle_path(get_turf(AM), get_dir(user, AM)) //created sparkles will disappear on their own
if(istype(AM, /mob/living))
if(isliving(AM))
var/mob/living/M = AM
M.Weaken(2)
M.Weaken(stun_amt)
to_chat(M, "<span class='userdanger'>You're thrown back by a mystical force!</span>")
spawn(0)
AM.throw_at(throwtarget, ((Clamp((maxthrow - (Clamp(distfromcaster - 2, 0, distfromcaster))), 3, maxthrow))), 1)//So stuff gets tossed around at the same time.
Expand Down
1 change: 0 additions & 1 deletion code/game/gamemodes/miniantags/abduction/abduction_gear.dm
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@

/obj/item/clothing/suit/armor/abductor/vest/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
DeactivateStealth()
return 0

/obj/item/clothing/suit/armor/abductor/vest/IsReflect()
DeactivateStealth()
Expand Down
4 changes: 4 additions & 0 deletions code/game/objects/effects/temporary_visuals/miscellaneous.dm
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@
/obj/effect/temp_visual/dir_setting/wraith/out
icon_state = "phase_shift"

/obj/effect/temp_visual/dir_setting/tailsweep
icon_state = "tailsweep"
duration = 4

/obj/effect/temp_visual/wizard
name = "water"
icon = 'icons/mob/mob.dmi'
Expand Down
3 changes: 2 additions & 1 deletion code/game/objects/items/weapons/flamethrower.dm
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,8 @@
create_with_tank = TRUE

/obj/item/flamethrower/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
if(ptank && damage && attack_type == PROJECTILE_ATTACK && prob(15))
var/obj/item/projectile/P = hitby
if(damage && attack_type == PROJECTILE_ATTACK && P.damage_type != STAMINA && prob(15))
owner.visible_message("<span class='danger'>[attack_text] hits the fueltank on [owner]'s [src], rupturing it! What a shot!</span>")
var/turf/target_turf = get_turf(owner)
log_game("A projectile ([hitby]) detonated a flamethrower tank held by [key_name(owner)] at [COORD(target_turf)]")
Expand Down
3 changes: 2 additions & 1 deletion code/game/objects/items/weapons/grenades/chem_grenade.dm
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@
prime()

/obj/item/grenade/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
if(damage && attack_type == PROJECTILE_ATTACK && prob(15))
var/obj/item/projectile/P = hitby
if(damage && attack_type == PROJECTILE_ATTACK && P.damage_type != STAMINA && prob(15))
owner.visible_message("<span class='danger'>[attack_text] hits [owner]'s [src], setting it off! What a shot!</span>")
var/turf/T = get_turf(src)
log_game("A projectile ([hitby]) detonated a grenade held by [key_name(owner)] at [COORD(T)]")
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/weapons/stunbaton.dm
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@

if(ishuman(L))
var/mob/living/carbon/human/H = L
if(H.check_shields(src, "[user]'s [name]", MELEE_ATTACK)) //No message; check_shields() handles that
if(H.check_shields(src, 0, "[user]'s [name]", MELEE_ATTACK)) //No message; check_shields() handles that
playsound(L, 'sound/weapons/genhit.ogg', 50, 1)
return

Expand Down
74 changes: 41 additions & 33 deletions code/modules/flufftext/Hallucination.dm
Original file line number Diff line number Diff line change
Expand Up @@ -269,51 +269,59 @@ Gunshots/explosions/opening doors/less rare audio (done)
px = -32

/obj/effect/hallucination/oh_yeah
var/turf/simulated/wall/wall
var/obj/effect/hallucination/simple/bubblegum/bubblegum = null
var/obj/effect/hallucination/simple/bubblegum/bubblegum
var/image/fakebroken
var/image/fakerune

/obj/effect/hallucination/oh_yeah/New(loc, mob/living/carbon/T)
/obj/effect/hallucination/oh_yeah/New(loc, mob/living/carbon/C)
set waitfor = FALSE
..()
target = T
for(var/turf/simulated/wall/W in range(7,target))
target = C
var/turf/simulated/wall/wall
for(var/turf/simulated/wall/W in range(7, target))
wall = W
break
if(wall)
fakebroken = image('icons/turf/floors.dmi', wall, "plating", layer = TURF_LAYER)
var/turf/landing = get_turf(target)
var/turf/landing_image_turf = get_step(landing, SOUTHWEST) //the icon is 3x3
fakerune = image('icons/effects/96x96.dmi', landing_image_turf, "landing", layer = ABOVE_OPEN_TURF_LAYER)
fakebroken.override = TRUE
if(target.client)
target.client.images |= fakebroken
target.client.images |= fakerune
target.playsound_local(wall,'sound/effects/meteorimpact.ogg', 150, 1)
bubblegum = new(wall, target)
sleep(10) //ominous wait
var/charged = FALSE //only get hit once
while(get_turf(bubblegum) != landing && target)
bubblegum.forceMove(get_step_towards(bubblegum, landing))
bubblegum.setDir(get_dir(bubblegum, landing))
target.playsound_local(get_turf(bubblegum), 'sound/effects/meteorimpact.ogg', 150, 1)
shake_camera(target, 2, 1)
if(bubblegum.Adjacent(target) && !charged)
charged = TRUE
target.Weaken(4)
target.adjustStaminaLoss(40)
step_away(target, bubblegum)
shake_camera(target, 4, 3)
target.visible_message("<span class='warning'>[target] jumps backwards, falling on the ground!</span>","<span class='userdanger'>[bubblegum] slams into you!</span>")
sleep(2)
sleep(30)
qdel(bubblegum)
if(!wall)
qdel(src)
return

fakebroken = image('icons/turf/floors.dmi', wall, "plating", layer = TURF_LAYER)
var/turf/landing = get_turf(target)
var/turf/landing_image_turf = get_step(landing, SOUTHWEST) //the icon is 3x3
fakerune = image('icons/effects/96x96.dmi', landing_image_turf, "landing", layer = ABOVE_OPEN_TURF_LAYER)
fakebroken.override = TRUE
if(target.client)
target.client.images |= fakebroken
target.client.images |= fakerune
target.playsound_local(wall,'sound/effects/meteorimpact.ogg', 150, 1)
bubblegum = new(wall, target)
addtimer(CALLBACK(src, .proc/bubble_attack, landing), 10)

/obj/effect/hallucination/oh_yeah/proc/bubble_attack(turf/landing)
var/charged = FALSE //only get hit once
while(get_turf(bubblegum) != landing && target && target.stat != DEAD)
bubblegum.forceMove(get_step_towards(bubblegum, landing))
bubblegum.setDir(get_dir(bubblegum, landing))
target.playsound_local(get_turf(bubblegum), 'sound/effects/meteorimpact.ogg', 150, 1)
shake_camera(target, 2, 1)
if(bubblegum.Adjacent(target) && !charged)
charged = TRUE
target.Weaken(4)
target.adjustStaminaLoss(40)
step_away(target, bubblegum)
shake_camera(target, 4, 3)
target.visible_message("<span class='warning'>[target] jumps backwards, falling on the ground!</span>", "<span class='userdanger'>[bubblegum] slams into you!</span>")
sleep(2)
sleep(30)
qdel(src)

/obj/effect/hallucination/oh_yeah/Destroy()
if(target.client)
target.client.images.Remove(fakebroken)
target.client.images.Remove(fakerune)
QDEL_NULL(fakebroken)
QDEL_NULL(fakerune)
QDEL_NULL(bubblegum)
return ..()

/obj/effect/hallucination/singularity_scare
Expand Down
3 changes: 2 additions & 1 deletion code/modules/mob/living/carbon/alien/alien_defense.dm
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ In all, this is a lot like the monkey code. /N
return 0

/mob/living/carbon/alien/attack_animal(mob/living/simple_animal/M)
if(..())
. = ..()
if(.)
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
switch(M.melee_damage_type)
if(BRUTE)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/human/human_damage.dm
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ This function restores all organs.
return 0


/mob/living/carbon/human/proc/get_organ(zone)
/mob/living/carbon/human/get_organ(zone)
if(!zone)
zone = "chest"
if(zone in list("eyes", "mouth"))
Expand Down
13 changes: 7 additions & 6 deletions code/modules/mob/living/carbon/human/human_defense.dm
Original file line number Diff line number Diff line change
Expand Up @@ -437,16 +437,17 @@ emp_act
visible_message("<span class='danger'>[M] has tried to disarm [src]!</span>")

/mob/living/carbon/human/attack_animal(mob/living/simple_animal/M)
if(..())
. = ..()
if(.)
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
if(check_shields(M, damage, "the [M.name]", null, MELEE_ATTACK, M.armour_penetration))
return 0
if(check_shields(M, damage, "the [M.name]", MELEE_ATTACK, M.armour_penetration))
return FALSE
var/dam_zone = pick("head", "chest", "groin", "l_arm", "l_hand", "r_arm", "r_hand", "l_leg", "l_foot", "r_leg", "r_foot")
var/obj/item/organ/external/affecting = get_organ(ran_zone(dam_zone))
if(!affecting)
affecting = get_organ("chest")
affecting.add_autopsy_data(M.name, damage) // Add the mob's name to the autopsy data
var/armor = run_armor_check(affecting, "melee", armour_penetration = M.armour_penetration)
var/obj/item/organ/external/affected = src.get_organ(dam_zone)
if(affected)
affected.add_autopsy_data(M.name, damage) // Add the mob's name to the autopsy data
apply_damage(damage, M.melee_damage_type, affecting, armor)
updatehealth("animal attack")

Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/human/species/_species.dm
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@
to_chat(M, "<span class='warning'>You can't use your hand.</span>")
return

if((M != H) && M.a_intent != INTENT_HELP && H.check_shields(0, M.name, attack_type = UNARMED_ATTACK))
if((M != H) && M.a_intent != INTENT_HELP && H.check_shields(M, 0, M.name, attack_type = UNARMED_ATTACK))
add_attack_logs(M, H, "Melee attacked with fists (miss/block)")
H.visible_message("<span class='warning'>[M] attempted to touch [H]!</span>")
return FALSE
Expand Down
3 changes: 2 additions & 1 deletion code/modules/mob/living/carbon/slime/slime.dm
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,8 @@
M.updatehealth()

/mob/living/carbon/slime/attack_animal(mob/living/simple_animal/M)
if(..())
. = ..()
if(.)
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
attacked += 10
adjustBruteLoss(damage)
Expand Down
18 changes: 9 additions & 9 deletions code/modules/mob/living/living_defense.dm
Original file line number Diff line number Diff line change
Expand Up @@ -303,17 +303,17 @@
return

/mob/living/attack_animal(mob/living/simple_animal/M)
M.face_atom(src)
if((M.a_intent == INTENT_HELP && M.ckey) || M.melee_damage_upper == 0)
M.custom_emote(1, "[M.friendly] [src].")
return 0
else
if(M.attack_sound)
playsound(loc, M.attack_sound, 50, 1, 1)
M.do_attack_animation(src)
visible_message("<span class='danger'>\The [M] [M.attacktext] [src]!</span>", \
"<span class='userdanger'>\The [M] [M.attacktext] [src]!</span>")
add_attack_logs(M, src, "Animal attacked")
return 1
return FALSE
if(M.attack_sound)
playsound(loc, M.attack_sound, 50, 1, 1)
M.do_attack_animation(src)
visible_message("<span class='danger'>\The [M] [M.attacktext] [src]!</span>", \
"<span class='userdanger'>\The [M] [M.attacktext] [src]!</span>")
add_attack_logs(M, src, "Animal attacked")
return TRUE

/mob/living/attack_larva(mob/living/carbon/alien/larva/L)
switch(L.a_intent)
Expand Down
10 changes: 2 additions & 8 deletions code/modules/mob/living/silicon/pai/pai.dm
Original file line number Diff line number Diff line change
Expand Up @@ -227,14 +227,8 @@
// See software.dm for Topic()

/mob/living/silicon/pai/attack_animal(mob/living/simple_animal/M)
if((M.a_intent == INTENT_HELP && M.ckey) || M.melee_damage_upper == 0)
M.custom_emote(1, "[M.friendly] [src].")
else
M.do_attack_animation(src)
if(M.attack_sound)
playsound(loc, M.attack_sound, 50, 1, 1)
for(var/mob/O in viewers(src, null))
O.show_message("<span class='danger'>[M]</span> [M.attacktext] [src]!", 1)
. = ..()
if(.)
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
add_attack_logs(M, src, "Animal attacked for [damage] damage")
adjustBruteLoss(damage)
Expand Down
3 changes: 2 additions & 1 deletion code/modules/mob/living/silicon/silicon_defense.dm
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
return

/mob/living/silicon/attack_animal(mob/living/simple_animal/M)
if(..())
. = ..()
if(.)
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
switch(M.melee_damage_type)
if(BRUTE)
Expand Down
5 changes: 3 additions & 2 deletions code/modules/mob/living/simple_animal/animal_defense.dm
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,10 @@
L.amount_grown = min(L.amount_grown + damage, L.max_grown)

/mob/living/simple_animal/attack_animal(mob/living/simple_animal/M)
if(..())
. = ..()
if(.)
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
attack_threshold_check(damage, M.melee_damage_type)
return attack_threshold_check(damage, M.melee_damage_type)

/mob/living/simple_animal/attack_slime(mob/living/carbon/slime/M)
..()
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/simple_animal/constructs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
else
to_chat(M, "<span class='cult'>You cannot repair your own dents, as you have none!</span>")
else if(src != M)
..()
return ..()


/mob/living/simple_animal/hostile/construct/narsie_act()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Difficulty: Medium
icon = 'icons/mob/alienqueen.dmi'
light_color = "#E4C7C5"
speak_emote = list("roars")
speed = 1
speed = 3
move_to_delay = 3
projectiletype = /obj/item/projectile/kinetic/miner
projectilesound = 'sound/weapons/kenetic_accel.ogg'
Expand Down
Loading

0 comments on commit fb4568a

Please sign in to comment.