Skip to content

Commit

Permalink
adds data gathered from various breakpoint tests into a comment
Browse files Browse the repository at this point in the history
  • Loading branch information
zimon9 committed Sep 27, 2024
1 parent ca356d7 commit 806094d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions code/game/objects/items/grenades/grenade.dm
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,16 @@

/obj/item/grenade/attack_paw(mob/user)
return attack_hand(user)

//I should add a check to see if the projectile hits the active_hand_index -- hand_bodyparts [1] = left arm, [2] = right arm -- held_items[2] == type(obj/item/grenade) -- hitby.def_zone = "r_arm"
/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)
var/obj/projectile/P = hitby
if(damage && attack_type == PROJECTILE_ATTACK && P.damage_type != STAMINA && prob(0.5)) //0.5%, not 50%. Yeah. DM is weird like that.
var/list/valid_hands = list(FALSE, FALSE)
if (owner.held_items[1] != null)
valid_hands[1] = TRUE
if (owner.held_items[2] != null)
valid_hands[2] = TRUE

if(damage && attack_type == PROJECTILE_ATTACK && P.damage_type != STAMINA && prob(2)) //2% chance to go off
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

0 comments on commit 806094d

Please sign in to comment.