Skip to content

Commit

Permalink
toy sword no more lethal
Browse files Browse the repository at this point in the history
  • Loading branch information
LiquidPotroh committed Feb 20, 2024
1 parent 5d013ee commit 72a3ecc
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
11 changes: 11 additions & 0 deletions code/game/objects/items/toys.dm
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,17 @@
if(wielded)
return 2

/obj/item/twohanded/dualsaber/toy/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum, speed)
. = ..(hit_atom, throwingdatum, speed, skip = TRUE)

/obj/item/twohanded/dualsaber/toy/attack(mob/target, mob/living/user, def_zone, delimb_chance)
if((CLUMSY in user.mutations) && (active) && prob(40))
to_chat(user, "<span class='warning'>You twirl around a bit before losing your balance and impaling yourself on the [src].</span>")
return ..(user, user, def_zone, delimb_chance, skip = TRUE)
if(active && prob(50))
INVOKE_ASYNC(src, PROC_REF(jedi_spin), user)
. = ..(target, user, def_zone, delimb_chance, skip = TRUE)

/obj/item/toy/katana
name = "replica katana"
desc = "Woefully underpowered in D20."
Expand Down
10 changes: 8 additions & 2 deletions code/game/objects/items/weapons/twohanded.dm
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,10 @@
set_light(0)


/obj/item/twohanded/dualsaber/attack(mob/target, mob/living/user, def_zone, delimb_chance)
/obj/item/twohanded/dualsaber/attack(mob/target, mob/living/user, def_zone, delimb_chance, skip = FALSE)
if(skip) //if we come from /obj/item/twohanded/dualsaber/toy
return ..()

force = active ? force_wielded : initial(force)

var/datum/martial_art/theforce/MA = user?.mind?.martial_art
Expand Down Expand Up @@ -312,7 +315,10 @@
return FALSE


/obj/item/twohanded/dualsaber/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum)
/obj/item/twohanded/dualsaber/throw_impact(atom/hit_atom, datum/thrownthing/throwingdatum, speed, skip = FALSE)
if(skip) //if we come from /obj/item/twohanded/dualsaber/toy
return ..()

var/datum/martial_art/theforce/MA = throwingdatum?.thrower?.mind?.martial_art
if(istype(MA) && active)
throwingdatum.delimb_chance = MA.throw_sword_delimb_chance
Expand Down
2 changes: 2 additions & 0 deletions code/modules/martial_arts/theforce.dm
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@
/obj/effect/proc_holder/spell/summon_sword/cast(targets, mob/user = usr)
var/obj/item/sword
for(var/obj/item/I in view(user))
if(istype(I, /obj/item/twohanded/dualsaber/toy))
continue
if(is_type_in_list(I, list(/obj/item/melee/energy/sword, /obj/item/twohanded/dualsaber)))
sword = I
break
Expand Down

0 comments on commit 72a3ecc

Please sign in to comment.