Skip to content

Commit

Permalink
Merge pull request #1120 from FreeStylaLT/werewolf_knock
Browse files Browse the repository at this point in the history
Point blank charges always fail
  • Loading branch information
Lutowski authored Dec 30, 2024
2 parents 02f4ba5 + 8505363 commit 0fe67c1
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions code/modules/mob/living/living.dm
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@
if(m_intent == MOVE_INTENT_RUN && dir == get_dir(src, M))
if(isliving(M))
var/sprint_distance = sprinted_tiles
var/instafail = FALSE
toggle_rogmove_intent(MOVE_INTENT_WALK, TRUE)

var/mob/living/L = M
Expand All @@ -173,7 +174,8 @@
switch(sprint_distance)
// Point blank
if(0 to 1)
self_points -= 4
self_points -= 99
instafail = TRUE
// One to two tile between the people
if(2 to 3)
self_points -= 2
Expand All @@ -199,11 +201,15 @@
var/playsound = FALSE
if(apply_damage(15, BRUTE, "head", run_armor_check("head", "blunt", damage = 20)))
playsound = TRUE
if(L.apply_damage(15, BRUTE, "chest", L.run_armor_check("chest", "blunt", damage = 10)))
playsound = TRUE
if(!instafail)
if(L.apply_damage(15, BRUTE, "chest", L.run_armor_check("chest", "blunt", damage = 10)))
playsound = TRUE
if(playsound)
playsound(src, "genblunt", 100, TRUE)
visible_message(span_warning("[src] charges into [L]!"), span_warning("I charge into [L]!"))
if(!instafail)
visible_message(span_warning("[src] charges into [L]!"), span_warning("I charge into [L]!"))
else
visible_message(span_warning("[src] smashes into [L] with no headstart!"), span_warning("I charge into [L] too early!"))
return TRUE

//okay, so we didn't switch. but should we push?
Expand Down

0 comments on commit 0fe67c1

Please sign in to comment.