mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
@@ -131,24 +131,26 @@
|
||||
/*
|
||||
This is kind of convoluted, but it seems to break down like this:
|
||||
(note that the chance to miss is exaggerated here since ran_zone() might roll "chest"
|
||||
|
||||
|
||||
If aiming for chest:
|
||||
80% chance you hit your target
|
||||
17% chance you hit a random zone
|
||||
3% chance you miss
|
||||
|
||||
|
||||
If aiming for something else:
|
||||
68% chance you hit your target
|
||||
17% chance you hit a random zone
|
||||
15% chance you miss
|
||||
|
||||
|
||||
Why don't we just use get_zone_with_miss_chance() ???
|
||||
*/
|
||||
if(prob(80))
|
||||
hit_zone = ran_zone(hit_zone)
|
||||
if(prob(15) && hit_zone != "chest") // Missed!
|
||||
attack_message = "[H] attempted to [pick(attack.attack_verb)] [src], but the [attack.attack_noun] missed!"
|
||||
attack_message = "[H] attempted to strike [src], but missed!"
|
||||
miss_type = 1
|
||||
else
|
||||
hit_zone = ran_zone(hit_zone)
|
||||
|
||||
if(!miss_type && block)
|
||||
attack_message = "[H] went for [src]'s [affecting.display_name] but was blocked!"
|
||||
@@ -160,9 +162,9 @@
|
||||
H.visible_message("<span class='danger'>[attack_message]</span>")
|
||||
|
||||
playsound(loc, ((miss_type) ? (miss_type == 1 ? attack.miss_sound : 'sound/weapons/thudswoosh.ogg') : attack.attack_sound), 25, 1, -1)
|
||||
H.attack_log += text("\[[time_stamp()]\] <font color='red'>[miss_type ? (miss_type == 1 ? "Missed" : "Blocked") : "[pick(attack.attack_verb)]ed"] [src.name] ([src.ckey])</font>")
|
||||
H.attack_log += text("\[[time_stamp()]\] <font color='red'>[miss_type ? (miss_type == 1 ? "Missed" : "Blocked") : "[pick(attack.attack_verb)]"] [src.name] ([src.ckey])</font>")
|
||||
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>[miss_type ? (miss_type == 1 ? "Was missed by" : "Has blocked") : "Has Been [pick(attack.attack_verb)]ed"] by [H.name] ([H.ckey])</font>")
|
||||
msg_admin_attack("[key_name(H)] [miss_type ? (miss_type == 1 ? "has missed" : "was blocked by") : "has [pick(attack.attack_verb)]ed"] [key_name(src)]")
|
||||
msg_admin_attack("[key_name(H)] [miss_type ? (miss_type == 1 ? "has missed" : "was blocked by") : "has [pick(attack.attack_verb)]"] [key_name(src)]")
|
||||
|
||||
if(miss_type)
|
||||
return 0
|
||||
|
||||
@@ -107,6 +107,7 @@
|
||||
var/organ = affecting.display_name
|
||||
|
||||
if(!skill) skill = 1
|
||||
attack_damage = Clamp(attack_damage, 1, 5)
|
||||
|
||||
if(target == user)
|
||||
user.visible_message("<span class='danger'>[user] [pick(attack_verb)] \himself in the [organ]!</span>")
|
||||
@@ -125,7 +126,7 @@
|
||||
switch(attack_damage)
|
||||
if(1 to 2) user.visible_message("<span class='danger'>[user] slapped [target]'s [organ]!</span>")
|
||||
if(3 to 4) user.visible_message("<span class='danger'>[user] [pick(attack_verb)] [target] in \his [organ]!</span>")
|
||||
if(5) user.visible_message("<span class='danger'>[user] slams \his [pick(attack_noun)] into [target]'s [organ]!</span>")
|
||||
if(5) user.visible_message("<span class='danger'>[user] slammed \his [pick(attack_noun)] into [target]'s [organ]!</span>")
|
||||
if("groin", "l_leg", "r_leg")
|
||||
// -- LOWER BODY -- //
|
||||
switch(attack_damage)
|
||||
@@ -138,7 +139,7 @@
|
||||
if(1 to 4) user.visible_message("<span class='danger'>[user] kicked [target] in \his [organ]!</span>")
|
||||
if(5) user.visible_message("<span class='danger'>[user] stomped down hard on [target]'s [organ]!</span>")
|
||||
else if (user.loc != target.loc)
|
||||
user.visible_message("<span class='danger'>[user] [pick("stomped down hard on", "kicked against", "gave a strong kick against", "slams their foot into")] [target]'s [organ]!</span>")
|
||||
user.visible_message("<span class='danger'>[user] [pick("stomped down hard on", "kicked against", "gave a strong kick against", "slammed their foot into")] [target]'s [organ]!</span>")
|
||||
else
|
||||
user.visible_message("<span class='danger'>[user] [pick("punched", "threw a punch", "struck", "slapped", "rammed their [pick(attack_noun)] into")] [target]'s [organ]!</span>")
|
||||
|
||||
@@ -171,13 +172,13 @@
|
||||
switch(zone)
|
||||
if("head", "mouth", "eyes")
|
||||
// ----- HEAD ----- //
|
||||
switch(damage)
|
||||
switch(attack_damage)
|
||||
if(1 to 2) user.visible_message("<span class='danger'>[user] scratched [target] across \his cheek!</span>")
|
||||
if(3 to 4) user.visible_message("<span class='danger'>[user] [pick(attack_verb)] [target]'s [pick("head", "neck")] [pick("", "", "", "with spread [pick(attack_noun)]")]!</span>")
|
||||
if(5) user.visible_message("<span class='danger'>[pick("[user] [pick(attack_verb)] [target] across \his face!", "[user] rakes \his [pick(attack_noun)] across [target]'s face!")]</span>")
|
||||
if("chest", "l_arm", "r_arm", "l_hand", "r_hand", "groin", "l_leg", "r_leg", "l_foot", "r_foot")
|
||||
// ----- BODY ----- //
|
||||
switch(damage)
|
||||
switch(attack_damage)
|
||||
if(1 to 2) user.visible_message("<span class='danger'>[user] scratched [target]'s [affecting.display_name]!</span>")
|
||||
if(3 to 4) user.visible_message("<span class='danger'>[user] [pick(attack_verb)] [pick("", "", "the side of")] [target]'s [affecting.display_name]!</span>")
|
||||
if(5) user.visible_message("<span class='danger'>[user] tears \his [pick(attack_noun)] deep into [target]'s [affecting.display_name]!</span>")
|
||||
|
||||
Reference in New Issue
Block a user