throw at mobs laying down
This commit is contained in:
@@ -112,7 +112,8 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
var/list/attack_verb //Used in attackby() to say how something was attacked "[x] has been [z.attack_verb] by [y] with [z]"
|
||||
var/list/species_exception = null // list() of species types, if a species cannot put items in a certain slot, but species type is in list, it will be able to wear that item
|
||||
|
||||
var/mob/thrownby = null
|
||||
///A weakref to the mob who threw the item
|
||||
var/datum/weakref/thrownby = null //I cannot verbally describe how much I hate this var
|
||||
|
||||
mouse_drag_pointer = MOUSE_ACTIVE_POINTER //the icon to indicate this object is being dragged
|
||||
|
||||
@@ -739,7 +740,7 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
return hit_atom.hitby(src, 0, itempush, throwingdatum=throwingdatum)
|
||||
|
||||
/obj/item/throw_at(atom/target, range, speed, mob/thrower, spin=1, diagonals_first = 0, datum/callback/callback, force, messy_throw = TRUE)
|
||||
thrownby = thrower
|
||||
thrownby = WEAKREF(thrower)
|
||||
callback = CALLBACK(src, .proc/after_throw, callback, (spin && messy_throw)) //replace their callback with our own
|
||||
. = ..(target, range, speed, thrower, spin, diagonals_first, callback, force)
|
||||
|
||||
@@ -834,7 +835,7 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
|
||||
. = ""
|
||||
|
||||
/obj/item/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum)
|
||||
return
|
||||
return // SEND_SIGNAL(src, COMSIG_ATOM_HITBY, AM, skipcatch, hitpush, blocked, throwingdatum)
|
||||
|
||||
/obj/item/attack_hulk(mob/living/carbon/human/user)
|
||||
return 0
|
||||
|
||||
@@ -168,7 +168,9 @@
|
||||
diceroll(user)
|
||||
|
||||
/obj/item/dice/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
|
||||
diceroll(thrownby)
|
||||
var/mob/thrown_by = thrownby?.resolve()
|
||||
if(thrown_by)
|
||||
diceroll(thrown_by)
|
||||
. = ..()
|
||||
|
||||
/obj/item/dice/proc/diceroll(mob/user)
|
||||
|
||||
@@ -289,10 +289,11 @@
|
||||
"<span class='userdanger'>[M] has been splashed with something!</span>")
|
||||
var/turf/TT = get_turf(hit_atom)
|
||||
var/throwerstring
|
||||
if(thrownby)
|
||||
log_combat(thrownby, M, "splashed", R)
|
||||
var/turf/AT = get_turf(thrownby)
|
||||
throwerstring = " THROWN BY [key_name(thrownby)] at [AT] (AREACOORD(AT)]"
|
||||
var/mob/thrown_by = thrownby?.resolve()
|
||||
if(thrown_by)
|
||||
log_combat(thrown_by, M, "splashed", R)
|
||||
var/turf/AT = get_turf(thrown_by)
|
||||
throwerstring = " THROWN BY [key_name(thrown_by)] at [AT] (AREACOORD(AT)]"
|
||||
log_reagent("SPLASH: [src] mob throw_impact() onto [key_name(hit_atom)] at [TT] ([AREACOORD(TT)])[throwerstring] - [R]")
|
||||
reagents.reaction(hit_atom, TOUCH)
|
||||
reagents.clear_reagents()
|
||||
|
||||
@@ -61,9 +61,10 @@
|
||||
|
||||
/obj/item/melee/baton/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
|
||||
..()
|
||||
var/mob/thrown_by = thrownby?.resolve()
|
||||
//Only mob/living types have stun handling
|
||||
if(turned_on && prob(throw_hit_chance) && iscarbon(hit_atom) && thrownby)
|
||||
baton_stun(hit_atom, thrownby, shoving = TRUE)
|
||||
if(turned_on && prob(throw_hit_chance) && iscarbon(hit_atom) && thrown_by)
|
||||
baton_stun(hit_atom, thrown_by, shoving = TRUE)
|
||||
|
||||
/obj/item/melee/baton/loaded //this one starts with a cell pre-installed.
|
||||
preload_cell_type = /obj/item/stock_parts/cell/high/plus
|
||||
@@ -387,8 +388,9 @@
|
||||
/obj/item/melee/baton/boomerang/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
|
||||
if(turned_on)
|
||||
var/caught = hit_atom.hitby(src, FALSE, FALSE, throwingdatum=throwingdatum)
|
||||
if(ishuman(hit_atom) && !caught && prob(throw_hit_chance) && thrownby)//if they are a carbon and they didn't catch it
|
||||
baton_stun(hit_atom, thrownby, shoving = TRUE)
|
||||
var/mob/thrown_by = thrownby?.resolve()
|
||||
if(ishuman(hit_atom) && !caught && prob(throw_hit_chance) && thrown_by)//if they are a carbon and they didn't catch it
|
||||
baton_stun(hit_atom, thrown_by, shoving = TRUE)
|
||||
if(thrownby && !caught)
|
||||
throw_back()
|
||||
else
|
||||
@@ -397,8 +399,9 @@
|
||||
/obj/item/melee/baton/boomerang/proc/throw_back()
|
||||
set waitfor = FALSE
|
||||
sleep(1)
|
||||
var/mob/thrown_by = thrownby?.resolve()
|
||||
if(!QDELETED(src))
|
||||
throw_at(thrownby, throw_range+2, throw_speed, null, TRUE)
|
||||
throw_at(thrown_by, throw_range+2, throw_speed, null, TRUE)
|
||||
|
||||
/obj/item/melee/baton/boomerang/update_icon()
|
||||
if(turned_on)
|
||||
|
||||
@@ -268,7 +268,7 @@
|
||||
var/turf/T = get_turf(src)
|
||||
var/obj/structure/cable/C = T.get_cable_node()
|
||||
if(C)
|
||||
playsound(src, 'sound/magic/lightningshock.ogg', 100, 1, extrarange = 5)
|
||||
playsound(src, 'sound/magic/lightningshock.ogg', 100, TRUE, extrarange = 5)
|
||||
tesla_zap(src, 3, C.newavail() * 0.01, ZAP_MOB_DAMAGE | ZAP_OBJ_DAMAGE | ZAP_MOB_STUN | ZAP_ALLOW_DUPLICATES) //Zap for 1/100 of the amount of power. At a million watts in the grid, it will be as powerful as a tesla revolver shot.
|
||||
C.add_delayedload(C.newavail() * 0.0375) // you can gain up to 3.5 via the 4x upgrades power is halved by the pole so thats 2x then 1X then .5X for 3.5x the 3 bounces shock.
|
||||
return ..()
|
||||
|
||||
Reference in New Issue
Block a user