|
13 | 13 | var/deflect_cooldown = 3 SECONDS //monke edit start
|
14 | 14 | var/deflect_stamcost = 15 //how much stamina it costs per bullet deflected
|
15 | 15 | var/log_name = "Sleeping Carp"
|
16 |
| - var/damage = 0 |
| 16 | + var/damage = 20 |
17 | 17 | var/kick_speed = 0 //how fast you get punted into the stratosphere on launchkick
|
18 | 18 | var/wounding = 0 //whether or not you get wounded by the attack
|
19 | 19 | var/zone_message = "" //string for where the attack is targetting
|
|
52 | 52 | return FALSE
|
53 | 53 |
|
54 | 54 | ///Gnashing Teeth: Harm Harm, consistent 20 force punch on every second harm punch
|
55 |
| -/datum/martial_art/the_sleeping_carp/proc/strongPunch(mob/living/attacker, mob/living/defender) |
56 |
| - damage = 20 |
57 |
| - wounding = 0 |
| 55 | +/datum/martial_art/the_sleeping_carp/proc/strongPunch(mob/living/attacker, mob/living/defender, set_damage = TRUE) |
| 56 | + if(set_damage) |
| 57 | + damage = 20 |
| 58 | + wounding = 0 |
58 | 59 | ///this var is so that the strong punch is always aiming for the body part the user is targeting and not trying to apply to the chest before deviating
|
59 | 60 | var/obj/item/bodypart/affecting = defender.get_bodypart(defender.get_random_valid_zone(attacker.zone_selected))
|
60 | 61 | attacker.do_attack_animation(defender, ATTACK_EFFECT_PUNCH)
|
61 | 62 | var/atk_verb = pick("precisely kick", "brutally chop", "cleanly hit", "viciously slam")
|
62 |
| - defender.visible_message(span_danger("[attacker] [atk_verb]s [defender]!"), \ |
63 |
| - span_userdanger("[attacker] [atk_verb]s you!"), null, null, attacker) |
| 63 | + defender.visible_message( |
| 64 | + span_danger("[attacker] [atk_verb]s [defender]!"), |
| 65 | + span_userdanger("[attacker] [atk_verb]s you!"), |
| 66 | + ignored_mobs = attacker |
| 67 | + ) |
64 | 68 | to_chat(attacker, span_danger("You [atk_verb] [defender]!"))
|
65 | 69 | playsound(defender, 'sound/weapons/punch1.ogg', vol = 25, vary = TRUE, extrarange = -1)
|
66 | 70 | log_combat(attacker, defender, "strong punched ([log_name])") //monke edit
|
67 | 71 | defender.apply_damage(damage, attacker.get_attack_type(), affecting, wound_bonus = wounding)
|
68 |
| - return |
69 | 72 |
|
70 | 73 | ///Crashing Wave Kick: Harm Disarm combo, throws people seven tiles backwards
|
71 |
| -/datum/martial_art/the_sleeping_carp/proc/launchKick(mob/living/attacker, mob/living/defender) |
72 |
| - damage = 15 //monke edit start |
73 |
| - kick_speed = 4 |
74 |
| - wounding = CANT_WOUND |
75 |
| - zone_message = "chest" |
76 |
| - zone = BODY_ZONE_CHEST |
| 74 | +/datum/martial_art/the_sleeping_carp/proc/launchKick(mob/living/attacker, mob/living/defender, set_damage = TRUE) |
| 75 | + //monke edit start |
| 76 | + if(set_damage) |
| 77 | + damage = 15 |
| 78 | + kick_speed = 4 |
| 79 | + wounding = CANT_WOUND |
| 80 | + zone_message = "chest" |
| 81 | + zone = BODY_ZONE_CHEST |
77 | 82 | attacker.do_attack_animation(defender, ATTACK_EFFECT_KICK)
|
78 |
| - defender.visible_message(span_warning("[attacker] kicks [defender] square in the [zone_message], sending them flying!"), \ |
79 |
| - span_userdanger("You are kicked square in the [zone_message] by [attacker], sending you flying!"), span_hear("You hear a sickening sound of flesh hitting flesh!"), COMBAT_MESSAGE_RANGE, attacker) |
| 83 | + defender.visible_message( |
| 84 | + span_warning("[attacker] kicks [defender] square in the [zone_message], sending [defender.p_them()] flying!"), |
| 85 | + span_userdanger("You are kicked square in the [zone_message] by [attacker], sending you flying!"), |
| 86 | + span_hear("You hear a sickening sound of flesh hitting flesh!"), |
| 87 | + vision_distance = COMBAT_MESSAGE_RANGE, |
| 88 | + ignored_mobs = attacker, |
| 89 | + ) |
80 | 90 | playsound(get_turf(attacker), 'sound/effects/hit_kick.ogg', vol = 50, vary = TRUE, extrarange = -1)
|
81 | 91 | var/atom/throw_target = get_edge_target_turf(defender, attacker.dir)
|
82 | 92 | defender.throw_at(throw_target, 7, kick_speed, attacker)
|
|
85 | 95 | return
|
86 | 96 |
|
87 | 97 | ///Keelhaul: Disarm Disarm combo, knocks people down and deals substantial stamina damage, and also discombobulates them. Knocks objects out of their hands if they're already on the ground.
|
88 |
| -/datum/martial_art/the_sleeping_carp/proc/dropKick(mob/living/attacker, mob/living/defender) |
89 |
| - stamina_damage = 100 //monke edit start |
| 98 | +/datum/martial_art/the_sleeping_carp/proc/dropKick(mob/living/attacker, mob/living/defender, set_damage = TRUE) |
| 99 | + //monke edit start |
| 100 | + if(set_damage) |
| 101 | + stamina_damage = 100 |
90 | 102 | attacker.do_attack_animation(defender, ATTACK_EFFECT_KICK)
|
91 | 103 | playsound(get_turf(attacker), 'sound/effects/hit_kick.ogg', vol = 50, vary = TRUE, extrarange = -1)
|
92 | 104 | if(defender.body_position == STANDING_UP)
|
93 | 105 | defender.Knockdown(2 SECONDS)
|
94 | 106 | defender.visible_message(
|
95 |
| - span_warning("[attacker] kicks [defender] in the head, sending them face first into the floor!"), |
| 107 | + span_warning("[attacker] kicks [defender] in the head, sending [defender.p_them()] face first into the floor!"), |
96 | 108 | span_userdanger("You are kicked in the head by [attacker], sending you crashing to the floor!"),
|
97 |
| - span_hear("You hear a sickening sound of flesh hitting flesh!"), COMBAT_MESSAGE_RANGE, attacker |
98 |
| - ) |
| 109 | + span_hear("You hear a sickening sound of flesh hitting flesh!"), |
| 110 | + vision_distance = COMBAT_MESSAGE_RANGE, |
| 111 | + ignored_mobs = attacker, |
| 112 | + ) |
99 | 113 | else
|
100 | 114 | defender.drop_all_held_items()
|
101 | 115 | defender.visible_message(
|
102 | 116 | span_warning("[attacker] kicks [defender] in the head!"),
|
103 | 117 | span_userdanger("You are kicked in the head by [attacker]!"),
|
104 |
| - span_hear("You hear a sickening sound of flesh hitting flesh!"), COMBAT_MESSAGE_RANGE, attacker |
105 |
| - ) |
| 118 | + span_hear("You hear a sickening sound of flesh hitting flesh!"), |
| 119 | + vision_distance = COMBAT_MESSAGE_RANGE, |
| 120 | + ignored_mobs = attacker, |
| 121 | + ) |
106 | 122 | defender.stamina.adjust(stamina_damage)
|
107 | 123 | defender.adjust_dizzy_up_to(10 SECONDS, 10 SECONDS)
|
108 | 124 | defender.adjust_temp_blindness_up_to(2 SECONDS, 10 SECONDS)
|
|
121 | 137 | playsound(defender, 'sound/weapons/punch1.ogg', vol = 25, vary = TRUE, extrarange = -1)
|
122 | 138 | if(defender.stat != DEAD && !defender.IsUnconscious() && defender.stamina.current <= 50) //We put our target to sleep.
|
123 | 139 | defender.visible_message(
|
124 |
| - span_danger("[attacker] carefully pinch a nerve in [defender]'s neck, knocking them out cold"), |
| 140 | + span_danger("[attacker] carefully pinch a nerve in [defender]'s neck, knocking [defender.p_them()] out cold"), |
125 | 141 | span_userdanger("[attacker] pinches something in your neck, and you fall unconscious!"),
|
126 | 142 | )
|
127 | 143 | grab_log_description = "grabbed and nerve pinched"
|
|
143 | 159 | span_danger("[attacker] snaps the neck of [defender]!"),
|
144 | 160 | span_userdanger("Your neck is snapped by [attacker]!"),
|
145 | 161 | span_hear("You hear a sickening snap!"),
|
146 |
| - ignored_mobs = attacker |
| 162 | + ignored_mobs = attacker, |
147 | 163 | )
|
148 |
| - to_chat(attacker, span_danger("In a swift motion, you snap the neck of [defender]!")) |
| 164 | + to_chat(attacker, span_danger("In a swift motion, you snap the neck of [defender]!"), type = MESSAGE_TYPE_COMBAT) |
149 | 165 | log_combat(attacker, defender, "snapped neck")
|
150 | 166 | defender.apply_damage(100, BRUTE, BODY_ZONE_HEAD, wound_bonus=CANT_WOUND)
|
151 | 167 | if(!HAS_TRAIT(defender, TRAIT_NODEATH))
|
|
164 | 180 | span_danger("[attacker] [atk_verb]s [defender]!"),
|
165 | 181 | span_userdanger("[attacker] [atk_verb]s you!"), null, null, attacker
|
166 | 182 | )
|
167 |
| - to_chat(attacker, span_danger("You [atk_verb] [defender]!")) |
| 183 | + to_chat(attacker, span_danger("You [atk_verb] [defender]!"), type = MESSAGE_TYPE_COMBAT) |
168 | 184 |
|
169 | 185 | defender.apply_damage(rand(10,15), attacker.get_attack_type(), affecting, wound_bonus = CANT_WOUND)
|
170 | 186 | playsound(defender, 'sound/weapons/punch1.ogg', 25, TRUE, -1)
|
|
186 | 202 |
|
187 | 203 | return ..()
|
188 | 204 |
|
189 |
| -/datum/martial_art/the_sleeping_carp/proc/can_deflect(mob/living/carp_user) |
| 205 | +/datum/martial_art/the_sleeping_carp/proc/can_deflect(mob/living/carp_user, check_intent = TRUE) |
190 | 206 | if(!COOLDOWN_FINISHED(src, block_cooldown)) //monke edit
|
191 | 207 | return FALSE
|
192 | 208 | if(!can_use(carp_user))
|
193 | 209 | return FALSE
|
194 |
| - if(!(carp_user.istate & ISTATE_HARM)) // monke edit: istates/intents |
| 210 | + if(check_intent && !(carp_user.istate & ISTATE_HARM)) // monke edit: istates/intents |
195 | 211 | return FALSE
|
196 | 212 | if(carp_user.incapacitated(IGNORE_GRAB)) //NO STUN
|
197 | 213 | return FALSE
|
|
222 | 238 | return COMPONENT_BULLET_PIERCED
|
223 | 239 |
|
224 | 240 | ///Signal from getting attacked with an item, for a special interaction with touch spells
|
225 |
| -/datum/martial_art/the_sleeping_carp/proc/on_attackby(mob/living/carbon/human/carp_user, obj/item/attack_weapon, mob/attacker, params) //no signal handler or this proc will explode |
226 |
| - if(!istype(attack_weapon, /obj/item/melee/touch_attack) || !can_deflect(carp_user)) |
| 241 | +/datum/martial_art/the_sleeping_carp/proc/on_attackby(mob/living/carbon/human/carp_user, obj/item/melee/touch_attack/touch_weapon, mob/attacker, params) |
| 242 | + SIGNAL_HANDLER |
| 243 | + |
| 244 | + if(!istype(touch_weapon) || !can_deflect(carp_user, check_intent = !touch_weapon.dangerous)) |
227 | 245 | return
|
228 |
| - var/obj/item/melee/touch_attack/touch_weapon = attack_weapon |
229 | 246 | var/datum/action/cooldown/spell/touch/touch_spell = touch_weapon.spell_which_made_us?.resolve()
|
230 | 247 | // monkestation edit: flavor tweaks
|
231 | 248 | if(!counter)
|
|
239 | 256 | playsound(carp_user, 'monkestation/sound/effects/miss.ogg', vol = 50, vary = TRUE, extrarange = SHORT_RANGE_SOUND_EXTRARANGE)
|
240 | 257 | else
|
241 | 258 | carp_user.visible_message(
|
242 |
| - span_danger("[carp_user] twists [attacker]'s arm, sending their [attack_weapon] back towards them!"), |
243 |
| - span_userdanger("Making sure to avoid [attacker]'s [attack_weapon], you twist their arm to send it right back at them!"), |
244 |
| - ignored_mobs = list(attacker), |
245 |
| - ) |
246 |
| - to_chat(attacker, span_userdanger("[carp_user] swiftly grabs and twists your arm, hitting you with your own [attack_weapon]!"), type = MESSAGE_TYPE_COMBAT) |
247 |
| - carp_user.say(message = "PATHETIC!", language = /datum/language/common, ignore_spam = TRUE, forced = src) |
248 |
| - if(!touch_spell) |
249 |
| - return |
250 |
| - INVOKE_ASYNC(touch_spell, TYPE_PROC_REF(/datum/action/cooldown/spell/touch, do_hand_hit), touch_weapon, attacker, attacker) |
| 259 | + span_danger("[carp_user] twists [attacker]'s arm, sending [attacker.p_their()] [touch_weapon] back towards [attacker.p_them()]!"), |
| 260 | + span_userdanger("Making sure to avoid [attacker]'s [touch_weapon], you twist [attacker.p_their()] arm to send it right back at [attacker.p_them()]!"), |
| 261 | + ignored_mobs = list(attacker), |
| 262 | + ) |
| 263 | + to_chat(attacker, span_userdanger("[carp_user] swiftly grabs and twists your arm, hitting you with your own [touch_weapon]!"), type = MESSAGE_TYPE_COMBAT) |
| 264 | + INVOKE_ASYNC(carp_user, TYPE_PROC_REF(/atom/movable, say), message = "PATHETIC!", language = /datum/language/common, ignore_spam = TRUE, forced = src) |
| 265 | + if(touch_spell) |
| 266 | + INVOKE_ASYNC(touch_spell, TYPE_PROC_REF(/datum/action/cooldown/spell/touch, do_hand_hit), touch_weapon, attacker, attacker) |
| 267 | + attacker.changeNext_move(CLICK_CD_MELEE) |
251 | 268 | // monkestation end
|
252 | 269 | return COMPONENT_NO_AFTERATTACK
|
253 | 270 |
|
|
0 commit comments