Skip to content

Commit

Permalink
Merge pull request #2591 from RinPin/boomerang
Browse files Browse the repository at this point in the history
New boomerang weapon + "fixes" regarding boomerang code
  • Loading branch information
Tk420634 committed Jul 2, 2023
2 parents 5a1cf13 + 3653c52 commit 1cb0951
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 4 deletions.
8 changes: 7 additions & 1 deletion code/game/objects/items/loadout_beacons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -783,6 +783,12 @@ GLOBAL_LIST_EMPTY(loadout_boxes)
/obj/item/storage/box/gun/melee/switchblade/PopulateContents()
new /obj/item/melee/onehanded/knife/switchblade(src)

/datum/loadout_box/boomerang
entry_tag = "Boomerang"
entry_flags = LOADOUT_FLAG_WASTER | LOADOUT_FLAG_TRIBAL
entry_class = LOADOUT_CAT_MELEE_ONE
spawn_thing = /obj/item/melee/f13onehanded/boomerang

/obj/item/storage/box/gun/melee/throwing
name = "throwing knife case"

Expand Down Expand Up @@ -2164,7 +2170,7 @@ GLOBAL_LIST_EMPTY(loadout_boxes)
entry_flags = LOADOUT_FLAG_TRIBAL
entry_class = LOADOUT_CAT_MELEE_TWO
spawn_thing = /obj/item/storage/box/gun/tribal/bmprsword
*/
*/

/datum/loadout_box/warmace
entry_tag = "Warmace"
Expand Down
31 changes: 31 additions & 0 deletions code/game/objects/items/melee/f13onehanded.dm
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,37 @@ obj/item/melee/onehanded/knife/switchblade
add_fingerprint(user)


/obj/item/melee/f13onehanded/boomerang
name = "boomerang"
desc = "An ancient, primitive weapon used by hunters, able to return when thrown and surprisingly powerful for a piece of wood, this one seems to be equipped with non functioning electronics"
icon_state = "boomerang"
item_state = "boomerang"
force = 30
throwforce = 18 //so it can kill weak trash mobs in one throw, a bug causes boomerang type weapons to deal double the intended damage, so this is a bandaid fix meanwhile
throw_speed = 4
attack_verb = list("beat", "smacked", "clubbed", "clobbered")
sharpness = SHARP_NONE
attack_speed = CLICK_CD_MELEE
var/throw_hit_chance = 99

/obj/item/melee/f13onehanded/boomerang/throw_at(atom/target, range, speed, mob/thrower, spin=1, diagonals_first = 0, datum/callback/callback, force)
if(ishuman(thrower))
var/mob/living/carbon/human/H = thrower
H.throw_mode_on() //so they can catch it on the return.
return ..()

/obj/item/melee/f13onehanded/boomerang/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
var/caught = hit_atom.hitby(src, FALSE, FALSE, throwingdatum=throwingdatum)
if(thrownby && !caught)
sleep(1)
if(!QDELETED(src))
throw_at(thrownby, throw_range+2, throw_speed, null, TRUE)
else if(!thrownby)
return
return



// Slave whip
/obj/item/melee/onehanded/slavewhip
name = "slave whip"
Expand Down
6 changes: 3 additions & 3 deletions code/modules/clothing/glasses/_glasses.dm
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@
icon_state = "garb"
item_state = "garb"
force = 23
throwforce = 23
throwforce = 12
throw_speed = 4
attack_verb = list("sliced")
hitsound = 'sound/weapons/bladeslice.ogg'
Expand Down Expand Up @@ -306,7 +306,7 @@
icon_state = "gar"
item_state = "gar"
force = 23
throwforce = 23
throwforce = 12
throw_speed = 4
attack_verb = list("sliced")
hitsound = 'sound/weapons/bladeslice.ogg'
Expand Down Expand Up @@ -337,7 +337,7 @@
icon_state = "supergar"
item_state = "gar"
force = 23
throwforce = 23
throwforce = 12
sharpness = SHARP_EDGED
glass_colour_type = /datum/client_colour/glass_colour/red
attack_speed = CLICK_CD_MELEE * 0.8
Expand Down

0 comments on commit 1cb0951

Please sign in to comment.