Merge pull request #10451 from kevinz000/mobility_flags
Mobility flags + combat rework stuff refactoring, fixes a few edge cases including the Oh Dreaded Xenomorph Hardstuns, etc etc time to break the game
This commit is contained in:
+14
-9
@@ -8,6 +8,7 @@
|
||||
var/desc = null
|
||||
var/obj/target = null
|
||||
var/check_flags = 0
|
||||
var/required_mobility_flags = MOBILITY_USE
|
||||
var/processing = FALSE
|
||||
var/obj/screen/movable/action_button/button = null
|
||||
var/buttontooltipstyle = ""
|
||||
@@ -96,20 +97,23 @@
|
||||
|
||||
/datum/action/proc/IsAvailable()
|
||||
if(!owner)
|
||||
return 0
|
||||
return FALSE
|
||||
var/mob/living/L = owner
|
||||
if(istype(L) && !CHECK_ALL_MOBILITY(L, required_mobility_flags))
|
||||
return FALSE
|
||||
if(check_flags & AB_CHECK_RESTRAINED)
|
||||
if(owner.restrained())
|
||||
return 0
|
||||
return FALSE
|
||||
if(check_flags & AB_CHECK_STUN)
|
||||
if(owner.IsKnockdown() || owner.IsStun())
|
||||
return 0
|
||||
if(istype(L) && !CHECK_MOBILITY(L, MOBILITY_USE))
|
||||
return FALSE
|
||||
if(check_flags & AB_CHECK_LYING)
|
||||
if(owner.lying)
|
||||
return 0
|
||||
if(istype(L) && !CHECK_MOBILITY(L, MOBILITY_STAND))
|
||||
return FALSE
|
||||
if(check_flags & AB_CHECK_CONSCIOUS)
|
||||
if(owner.stat)
|
||||
return 0
|
||||
return 1
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/datum/action/proc/UpdateButtonIcon(status_only = FALSE, force = FALSE)
|
||||
if(button)
|
||||
@@ -430,7 +434,8 @@
|
||||
name = "Shift Nerves"
|
||||
|
||||
/datum/action/item_action/explosive_implant
|
||||
check_flags = 0
|
||||
check_flags = NONE
|
||||
required_mobility_flags = NONE
|
||||
name = "Activate Explosive Implant"
|
||||
|
||||
/datum/action/item_action/toggle_research_scanner
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
fall_chance += 2
|
||||
if(prob(fall_chance) && !owner.lying && !owner.buckled)
|
||||
to_chat(owner, "<span class='warning'>Your leg gives out!</span>")
|
||||
owner.Knockdown(35)
|
||||
owner.DefaultCombatKnockdown(35)
|
||||
|
||||
else if(owner.get_active_held_item())
|
||||
var/drop_chance = 1
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
/datum/brain_trauma/special/godwoken/on_life()
|
||||
..()
|
||||
if(prob(4))
|
||||
if(prob(33) && (owner.IsStun() || owner.IsKnockdown() || owner.IsUnconscious()))
|
||||
if(prob(33) && owner.HighestImmobilityAmount())
|
||||
speak("unstun", TRUE)
|
||||
else if(prob(60) && owner.health <= owner.crit_threshold)
|
||||
speak("heal", TRUE)
|
||||
|
||||
@@ -59,4 +59,4 @@
|
||||
"<span class='userdanger'>You slide on [A]!</span>")
|
||||
|
||||
cooldown = world.time
|
||||
H.Knockdown(60)
|
||||
H.DefaultCombatKnockdown(60)
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
AM.forceMove(T)
|
||||
if(isliving(AM))
|
||||
var/mob/living/L = AM
|
||||
L.Knockdown(100)
|
||||
L.DefaultCombatKnockdown(100)
|
||||
L.adjustBruteLoss(30)
|
||||
falling_atoms -= AM
|
||||
|
||||
@@ -110,8 +110,7 @@
|
||||
if (isliving(AM))
|
||||
var/mob/living/L = AM
|
||||
L.notransform = TRUE
|
||||
L.Stun(200)
|
||||
L.resting = TRUE
|
||||
L.Paralyze(200)
|
||||
|
||||
var/oldtransform = AM.transform
|
||||
var/oldcolor = AM.color
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
var/mob/living/LM = parent
|
||||
var/v = volume
|
||||
var/e = e_range
|
||||
if(!T.footstep || LM.buckled || LM.lying || !LM.canmove || LM.resting || LM.buckled || LM.throwing || LM.movement_type & (VENTCRAWLING | FLYING))
|
||||
if(!T.footstep || LM.buckled || !CHECK_MOBILITY(LM, MOBILITY_STAND) || LM.buckled || LM.throwing || (LM.movement_type & (VENTCRAWLING | FLYING)))
|
||||
if (LM.lying && !LM.buckled && !(!T.footstep || LM.movement_type & (VENTCRAWLING | FLYING))) //play crawling sound if we're lying
|
||||
playsound(T, 'sound/effects/footstep/crawl1.ogg', 15 * v)
|
||||
return
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
msg += " and knocks [target] [target_buckled? "off of [target.buckled]" : "down"]"
|
||||
if(target_buckled)
|
||||
target.buckled.unbuckle_mob(target)
|
||||
target.Knockdown(knockdown_time)
|
||||
target.DefaultCombatKnockdown(knockdown_time)
|
||||
if(length(msg))
|
||||
user.visible_message("<span class='danger'>[msg]!</span>")
|
||||
|
||||
|
||||
@@ -240,7 +240,7 @@
|
||||
/datum/component/riding/human/force_dismount(mob/living/user)
|
||||
var/atom/movable/AM = parent
|
||||
AM.unbuckle_mob(user)
|
||||
user.Knockdown(60)
|
||||
user.DefaultCombatKnockdown(60)
|
||||
user.visible_message("<span class='warning'>[AM] pushes [user] off of [AM.p_them()]!</span>")
|
||||
|
||||
/datum/component/riding/cyborg
|
||||
@@ -298,7 +298,7 @@
|
||||
M.Move(targetm)
|
||||
M.visible_message("<span class='warning'>[M] is thrown clear of [AM]!</span>")
|
||||
M.throw_at(target, 14, 5, AM)
|
||||
M.Knockdown(60)
|
||||
M.DefaultCombatKnockdown(60)
|
||||
|
||||
/datum/component/riding/proc/equip_buckle_inhands(mob/living/carbon/human/user, amount_required = 1, mob/living/riding_target_override)
|
||||
var/list/equipped
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
return //undeads are unaffected by the spook-pocalypse.
|
||||
if(istype(H.dna.species, /datum/species/zombie))
|
||||
H.adjustStaminaLoss(25)
|
||||
H.Knockdown(15) //zombies can't resist the doot
|
||||
H.DefaultCombatKnockdown(15) //zombies can't resist the doot
|
||||
C.Jitter(35)
|
||||
C.stuttering = 20
|
||||
if((!istype(H.dna.species, /datum/species/skeleton)) && (!istype(H.dna.species, /datum/species/golem)) && (!istype(H.dna.species, /datum/species/android)) && (!istype(H.dna.species, /datum/species/jelly)))
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
/datum/component/spooky/proc/spectral_change(mob/living/carbon/human/H, mob/user)
|
||||
if((H.getStaminaLoss() > 95) && (!istype(H.dna.species, /datum/species/skeleton)) && (!istype(H.dna.species, /datum/species/golem)) && (!istype(H.dna.species, /datum/species/android)) && (!istype(H.dna.species, /datum/species/jelly)))
|
||||
H.Knockdown(20)
|
||||
H.DefaultCombatKnockdown(20)
|
||||
H.set_species(/datum/species/skeleton)
|
||||
H.visible_message("<span class='warning'>[H] has given up on life as a mortal.</span>")
|
||||
var/T = get_turf(H)
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
var/turf/loccheck = get_turf(A)
|
||||
if(is_reebe(loccheck.z))
|
||||
user.visible_message("<span class='warning'>An unseen force knocks [user] to the ground!</span>", "<span class='big_brass'>\"I think not!\"</span>")
|
||||
user.Knockdown(60)
|
||||
user.DefaultCombatKnockdown(60)
|
||||
return
|
||||
if(istype(loccheck.loc, /area/fabric_of_reality))
|
||||
to_chat(user, "<span class='danger'>You can't do that here!</span>")
|
||||
@@ -25,7 +25,7 @@
|
||||
for(var/mob/living/M in T)
|
||||
if(M.movement_type & FLYING)
|
||||
M.visible_message("<span class='danger'>The bluespace collapse crushes the air towards it, pulling [M] towards the ground...</span>")
|
||||
M.Knockdown(5, TRUE, TRUE) //Overrides stun absorbs.
|
||||
M.DefaultCombatKnockdown(5, TRUE, TRUE) //Overrides stun absorbs.
|
||||
T.TerraformTurf(/turf/open/chasm/magic, /turf/open/chasm/magic)
|
||||
for (var/obj/structure/ladder/unbreakable/binary/ladder in GLOB.ladders)
|
||||
ladder.ActivateAlmonds()
|
||||
|
||||
@@ -279,7 +279,7 @@
|
||||
M.emote("deathgasp")
|
||||
M.fakedeath("regenerative_coma")
|
||||
M.update_stat()
|
||||
M.update_canmove()
|
||||
M.update_mobility()
|
||||
addtimer(CALLBACK(src, .proc/uncoma, M), 300)
|
||||
|
||||
/datum/symptom/heal/coma/proc/uncoma(mob/living/M)
|
||||
@@ -288,7 +288,7 @@
|
||||
active_coma = FALSE
|
||||
M.cure_fakedeath("regenerative_coma")
|
||||
M.update_stat()
|
||||
M.update_canmove()
|
||||
M.update_mobility()
|
||||
|
||||
/datum/symptom/heal/coma/Heal(mob/living/carbon/M, datum/disease/advance/A, actual_power)
|
||||
var/heal_amt = 4 * actual_power
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
if(prob(25))
|
||||
affected_mob.vomit(95)
|
||||
H.emote("cough")
|
||||
H.Knockdown(40)
|
||||
H.DefaultCombatKnockdown(40)
|
||||
H.losebreath += 4
|
||||
if(prob(3))
|
||||
to_chat(H, "<span class='danger'>You feel very weak and dizzy...</span>")
|
||||
|
||||
@@ -118,7 +118,8 @@
|
||||
if(DEAD)
|
||||
to_chat(user, "<span class='notice'>You cannot [key] while dead.</span>")
|
||||
return FALSE
|
||||
if(restraint_check && (user.IsStun() || user.IsKnockdown()))
|
||||
var/mob/living/L = user
|
||||
if(restraint_check && (istype(L) && !CHECK_MOBILITY(L, MOBILITY_USE)))
|
||||
if(!intentional)
|
||||
return FALSE
|
||||
to_chat(user, "<span class='notice'>You cannot [key] while stunned.</span>")
|
||||
|
||||
@@ -42,19 +42,19 @@
|
||||
/datum/martial_art/cqc/proc/Slam(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
if(!can_use(A))
|
||||
return FALSE
|
||||
if(!D.stat || !D.IsKnockdown())
|
||||
if(CHECK_MOBILITY(D, MOBILITY_STAND))
|
||||
D.visible_message("<span class='warning'>[A] slams [D] into the ground!</span>", \
|
||||
"<span class='userdanger'>[A] slams you into the ground!</span>")
|
||||
playsound(get_turf(A), 'sound/weapons/slam.ogg', 50, 1, -1)
|
||||
D.apply_damage(10, BRUTE)
|
||||
D.Knockdown(120)
|
||||
D.DefaultCombatKnockdown(120)
|
||||
log_combat(A, D, "slammed (CQC)")
|
||||
return TRUE
|
||||
|
||||
/datum/martial_art/cqc/proc/Kick(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
if(!can_use(A))
|
||||
return FALSE
|
||||
if(!D.stat || !D.IsKnockdown())
|
||||
if(CHECK_MOBILITY(D, MOBILITY_STAND))
|
||||
D.visible_message("<span class='warning'>[A] kicks [D] back!</span>", \
|
||||
"<span class='userdanger'>[A] kicks you back!</span>")
|
||||
playsound(get_turf(A), 'sound/weapons/cqchit1.ogg', 50, 1, -1)
|
||||
@@ -62,7 +62,7 @@
|
||||
D.throw_at(throw_target, 1, 14, A)
|
||||
D.apply_damage(10, BRUTE)
|
||||
log_combat(A, D, "kicked (CQC)")
|
||||
if(D.IsKnockdown() && !D.stat)
|
||||
if(!CHECK_MOBILITY(D, MOBILITY_STAND) && CHECK_MOBILITY(D, MOBILITY_USE))
|
||||
log_combat(A, D, "knocked out (Head kick)(CQC)")
|
||||
D.visible_message("<span class='warning'>[A] kicks [D]'s head, knocking [D.p_them()] out!</span>", \
|
||||
"<span class='userdanger'>[A] kicks your head, knocking you out!</span>")
|
||||
@@ -136,7 +136,7 @@
|
||||
A.do_attack_animation(D)
|
||||
var/picked_hit_type = pick("CQC'd", "Big Bossed")
|
||||
var/bonus_damage = 13
|
||||
if(D.IsKnockdown() || D.resting || D.lying)
|
||||
if(!CHECK_MOBILITY(D, MOBILITY_STAND))
|
||||
bonus_damage += 5
|
||||
picked_hit_type = "stomps on"
|
||||
D.apply_damage(bonus_damage, BRUTE)
|
||||
@@ -147,12 +147,12 @@
|
||||
D.visible_message("<span class='danger'>[A] [picked_hit_type] [D]!</span>", \
|
||||
"<span class='userdanger'>[A] [picked_hit_type] you!</span>")
|
||||
log_combat(A, D, "[picked_hit_type] (CQC)")
|
||||
if(A.resting && !D.stat && !D.IsKnockdown())
|
||||
if(!CHECK_MOBILITY(A, MOBILITY_STAND) && !D.stat && CHECK_MOBILITY(D, MOBILITY_STAND))
|
||||
D.visible_message("<span class='warning'>[A] leg sweeps [D]!", \
|
||||
"<span class='userdanger'>[A] leg sweeps you!</span>")
|
||||
playsound(get_turf(A), 'sound/effects/hit_kick.ogg', 50, 1, -1)
|
||||
D.apply_damage(10, BRUTE)
|
||||
D.Knockdown(60)
|
||||
D.DefaultCombatKnockdown(60)
|
||||
log_combat(A, D, "sweeped (CQC)")
|
||||
return TRUE
|
||||
|
||||
@@ -164,7 +164,7 @@
|
||||
if(check_streak(A,D))
|
||||
return TRUE
|
||||
if(prob(65))
|
||||
if(!D.stat || !D.IsKnockdown() || !restraining)
|
||||
if(CHECK_MOBILITY(D, MOBILITY_MOVE) || !restraining)
|
||||
I = D.get_active_held_item()
|
||||
D.visible_message("<span class='warning'>[A] strikes [D]'s jaw with their hand!</span>", \
|
||||
"<span class='userdanger'>[A] strikes your jaw, disorienting you!</span>")
|
||||
|
||||
@@ -96,13 +96,13 @@
|
||||
return 0
|
||||
|
||||
/datum/martial_art/krav_maga/proc/leg_sweep(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
if(D.lying || D.IsKnockdown())
|
||||
if(!CHECK_MOBILITY(D, MOBILITY_STAND))
|
||||
return 0
|
||||
D.visible_message("<span class='warning'>[A] leg sweeps [D]!</span>", \
|
||||
"<span class='userdanger'>[A] leg sweeps you!</span>")
|
||||
playsound(get_turf(A), 'sound/effects/hit_kick.ogg', 50, 1, -1)
|
||||
D.apply_damage(5, BRUTE)
|
||||
D.Knockdown(40, override_hardstun = 0.01, override_stamdmg = 25)
|
||||
D.DefaultCombatKnockdown(40, override_hardstun = 0.01, override_stamdmg = 25)
|
||||
log_combat(A, D, "leg sweeped")
|
||||
return 1
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
log_combat(A, D, "punched")
|
||||
var/picked_hit_type = pick("punches", "kicks")
|
||||
var/bonus_damage = 10
|
||||
if(D.IsKnockdown() || D.resting || D.lying)
|
||||
if(CHECK_MOBILITY(D, MOBILITY_STAND))
|
||||
bonus_damage += 5
|
||||
picked_hit_type = "stomps on"
|
||||
D.apply_damage(bonus_damage, BRUTE)
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
playsound(D, 'sound/effects/meteorimpact.ogg', 25, 1, -1)
|
||||
var/throwtarget = get_edge_target_turf(A, get_dir(A, get_step_away(D, A)))
|
||||
D.throw_at(throwtarget, 4, 2, A)//So stuff gets tossed around at the same time.
|
||||
D.Knockdown(20)
|
||||
D.DefaultCombatKnockdown(20)
|
||||
if(atk_verb)
|
||||
log_combat(A, D, "[atk_verb] (Mushroom Punch)")
|
||||
return TRUE
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
if(!istype(D.head,/obj/item/clothing/head/helmet/) && !istype(D.head,/obj/item/clothing/head/hardhat))
|
||||
D.adjustOrganLoss(ORGAN_SLOT_BRAIN, 5)
|
||||
A.Stun(rand(10,45))
|
||||
D.Knockdown(rand(5,30))//CIT CHANGE - makes stuns from martial arts always use Knockdown instead of Stun for the sake of consistency
|
||||
D.DefaultCombatKnockdown(rand(5,30))//CIT CHANGE - makes stuns from martial arts always use Knockdown instead of Stun for the sake of consistency
|
||||
if(5,6)
|
||||
A.do_attack_animation(D, ATTACK_EFFECT_PUNCH)
|
||||
atk_verb = pick("punches", "kicks", "hits", "slams into")
|
||||
@@ -59,7 +59,7 @@
|
||||
playsound(get_turf(D), 'sound/effects/meteorimpact.ogg', 25, 1, -1)
|
||||
var/throwtarget = get_edge_target_turf(A, get_dir(A, get_step_away(D, A)))
|
||||
D.throw_at(throwtarget, 4, 2, A)//So stuff gets tossed around at the same time.
|
||||
D.Knockdown(60)
|
||||
D.DefaultCombatKnockdown(60)
|
||||
if(7,8)
|
||||
basic_hit(A,D)
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
return TRUE
|
||||
|
||||
/datum/martial_art/the_rising_bass/proc/sideKick(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
if(!D.IsKnockdown() || D.lying == 0)
|
||||
if(CHECK_MOBILITY(D, MOBILITY_STAND))
|
||||
var/dir = A.dir & (NORTH | SOUTH) ? pick(EAST, WEST) : pick(NORTH, SOUTH)
|
||||
var/oppdir = dir == NORTH ? SOUTH : dir == SOUTH ? NORTH : dir == EAST ? WEST : EAST
|
||||
var/turf/H = get_step(D, dir)
|
||||
@@ -89,7 +89,7 @@
|
||||
"<span class='userdanger'>[A] kicks you in the side, forcing you to step away!</span>")
|
||||
playsound(get_turf(A), 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
D.apply_damage(5, BRUTE, BODY_ZONE_CHEST)
|
||||
D.Knockdown(60)
|
||||
D.DefaultCombatKnockdown(60)
|
||||
var/L = !checkfordensity(H,D) ? (!checkfordensity(K,D) ? D.loc : K) : H
|
||||
D.forceMove(L)
|
||||
log_combat(A, D, "side kicked (Rising Bass)")
|
||||
@@ -97,7 +97,7 @@
|
||||
return basic_hit(A,D)
|
||||
|
||||
/datum/martial_art/the_rising_bass/proc/shoulderFlip(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
if(!D.IsKnockdown() || !D.lying)
|
||||
if(CHECK_MOBILITY(D, MOBILITY_STAND))
|
||||
var/turf/H = get_step(A, get_dir(D,A))
|
||||
var/L = checkfordensity(H,D) ? H : A.loc
|
||||
A.do_attack_animation(D, ATTACK_EFFECT_PUNCH)
|
||||
@@ -108,14 +108,14 @@
|
||||
D.apply_damage(10, BRUTE, BODY_ZONE_CHEST)
|
||||
D.apply_damage(30, BRUTE, BODY_ZONE_HEAD)
|
||||
D.Sleeping(60)
|
||||
D.Knockdown(300)
|
||||
D.DefaultCombatKnockdown(300)
|
||||
D.forceMove(L)
|
||||
log_combat(A, D, "shoulder flipped (Rising Bass)")
|
||||
return TRUE
|
||||
return basic_hit(A,D)
|
||||
|
||||
/datum/martial_art/the_rising_bass/proc/repulsePunch(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
if((!D.IsKnockdown() || !D.lying) && repulsecool > world.time)
|
||||
if(CHECK_MOBILITY(D, MOBILITY_STAND) && repulsecool < world.time)
|
||||
A.do_attack_animation(D, ATTACK_EFFECT_PUNCH)
|
||||
D.visible_message("<span class='warning'>[A] smashes [D] in the chest, throwing them away!</span>", \
|
||||
"<span class='userdanger'>[A] smashes you in the chest, repelling you away!</span>")
|
||||
@@ -123,14 +123,14 @@
|
||||
var/atom/F = get_edge_target_turf(D, get_dir(A, get_step_away(D, A)))
|
||||
D.throw_at(F, 10, 1)
|
||||
D.apply_damage(10, BRUTE, BODY_ZONE_CHEST)
|
||||
D.Knockdown(90)
|
||||
D.DefaultCombatKnockdown(90)
|
||||
log_combat(A, D, "repulse punched (Rising Bass)")
|
||||
repulsecool = world.time + 3 SECONDS
|
||||
return TRUE
|
||||
return basic_hit(A,D)
|
||||
|
||||
/datum/martial_art/the_rising_bass/proc/footSmash(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
if(!D.IsKnockdown() || !D.lying)
|
||||
if(CHECK_MOBILITY(D, MOBILITY_STAND))
|
||||
A.do_attack_animation(D, ATTACK_EFFECT_KICK)
|
||||
D.visible_message("<span class='warning'>[A] smashes their foot down on [D]'s foot!</span>", \
|
||||
"<span class='userdanger'>[A] smashes your foot!</span>")
|
||||
@@ -142,7 +142,7 @@
|
||||
return basic_hit(A,D)
|
||||
|
||||
/datum/martial_art/the_rising_bass/proc/deftSwitch(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
if(!D.IsKnockdown() || !D.lying)
|
||||
if(CHECK_MOBILITY(D, MOBILITY_STAND))
|
||||
if (D.get_active_held_item())
|
||||
var/obj/item/G = D.get_active_held_item()
|
||||
if (G && !(G.item_flags & (ABSTRACT|DROPDEL)) && D.temporarilyRemoveItemFromInventory(G))
|
||||
@@ -205,4 +205,4 @@
|
||||
deftswitch.Remove(H)
|
||||
sidekick.Remove(H)
|
||||
REMOVE_TRAIT(H, TRAIT_NOGUNS, RISING_BASS_TRAIT)
|
||||
REMOVE_TRAIT(H, TRAIT_AUTO_CATCH_ITEM, RISING_BASS_TRAIT)
|
||||
REMOVE_TRAIT(H, TRAIT_AUTO_CATCH_ITEM, RISING_BASS_TRAIT)
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
return FALSE
|
||||
|
||||
/datum/martial_art/the_sleeping_carp/proc/wristWrench(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
if(!D.stat && !D.IsStun() && !D.IsKnockdown())
|
||||
if(CHECK_MOBILITY(D, MOBILITY_USE))
|
||||
log_combat(A, D, "wrist wrenched (Sleeping Carp)")
|
||||
A.do_attack_animation(D, ATTACK_EFFECT_PUNCH)
|
||||
D.visible_message("<span class='warning'>[A] grabs [D]'s wrist and wrenches it sideways!</span>", \
|
||||
@@ -46,19 +46,19 @@
|
||||
D.emote("scream")
|
||||
D.dropItemToGround(D.get_active_held_item())
|
||||
D.apply_damage(5, BRUTE, pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM))
|
||||
D.Knockdown(60)//CIT CHANGE - makes sleepingcarp use knockdown() for its stuns instead of stun()
|
||||
D.DefaultCombatKnockdown(60)//CIT CHANGE - makes sleepingcarp use knockdown() for its stuns instead of stun()
|
||||
return TRUE
|
||||
return basic_hit(A,D)
|
||||
|
||||
/datum/martial_art/the_sleeping_carp/proc/backKick(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
if(!D.stat && !D.IsKnockdown())
|
||||
if(CHECK_MOBILITY(D, MOBILITY_STAND))
|
||||
if(A.dir == D.dir)
|
||||
log_combat(A, D, "back-kicked (Sleeping Carp)")
|
||||
A.do_attack_animation(D, ATTACK_EFFECT_PUNCH)
|
||||
D.visible_message("<span class='warning'>[A] kicks [D] in the back!</span>", \
|
||||
"<span class='userdanger'>[A] kicks you in the back, making you stumble and fall!</span>")
|
||||
step_to(D,get_step(D,D.dir),1)
|
||||
D.Knockdown(80)
|
||||
D.DefaultCombatKnockdown(80)
|
||||
playsound(get_turf(D), 'sound/weapons/punch1.ogg', 50, 1, -1)
|
||||
return TRUE
|
||||
else
|
||||
@@ -68,20 +68,20 @@
|
||||
return basic_hit(A,D)
|
||||
|
||||
/datum/martial_art/the_sleeping_carp/proc/kneeStomach(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
if(!D.stat && !D.IsKnockdown())
|
||||
if(CHECK_MOBILITY(D, MOBILITY_STAND))
|
||||
log_combat(A, D, "stomach kneed (Sleeping Carp)")
|
||||
A.do_attack_animation(D, ATTACK_EFFECT_KICK)
|
||||
D.visible_message("<span class='warning'>[A] knees [D] in the stomach!</span>", \
|
||||
"<span class='userdanger'>[A] winds you with a knee in the stomach!</span>")
|
||||
D.audible_message("<b>[D]</b> gags!")
|
||||
D.losebreath += 3
|
||||
D.Knockdown(40)//CIT CHANGE - makes sleepingcarp use knockdown() for its stuns instead of stun()
|
||||
D.DefaultCombatKnockdown(40)//CIT CHANGE - makes sleepingcarp use knockdown() for its stuns instead of stun()
|
||||
playsound(get_turf(D), 'sound/weapons/punch1.ogg', 50, 1, -1)
|
||||
return TRUE
|
||||
return basic_hit(A,D)
|
||||
|
||||
/datum/martial_art/the_sleeping_carp/proc/headKick(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
if(!D.stat && !D.IsKnockdown())
|
||||
if(CHECK_MOBILITY(D, MOBILITY_STAND))
|
||||
log_combat(A, D, "head kicked (Sleeping Carp)")
|
||||
A.do_attack_animation(D, ATTACK_EFFECT_KICK)
|
||||
D.visible_message("<span class='warning'>[A] kicks [D] in the head!</span>", \
|
||||
@@ -89,12 +89,12 @@
|
||||
D.apply_damage(20, BRUTE, BODY_ZONE_HEAD)
|
||||
D.drop_all_held_items()
|
||||
playsound(get_turf(D), 'sound/weapons/punch1.ogg', 50, 1, -1)
|
||||
D.Knockdown(80)//CIT CHANGE - makes sleepingcarp use knockdown() for its stuns instead of stun()
|
||||
D.DefaultCombatKnockdown(80)//CIT CHANGE - makes sleepingcarp use knockdown() for its stuns instead of stun()
|
||||
return TRUE
|
||||
return basic_hit(A,D)
|
||||
|
||||
/datum/martial_art/the_sleeping_carp/proc/elbowDrop(mob/living/carbon/human/A, mob/living/carbon/human/D)
|
||||
if(D.IsKnockdown() || D.resting || D.stat)
|
||||
if(!CHECK_MOBILITY(D, MOBILITY_STAND))
|
||||
log_combat(A, D, "elbow dropped (Sleeping Carp)")
|
||||
A.do_attack_animation(D, ATTACK_EFFECT_PUNCH)
|
||||
D.visible_message("<span class='warning'>[A] elbow drops [D]!</span>", \
|
||||
@@ -134,7 +134,7 @@
|
||||
playsound(get_turf(D), 'sound/weapons/punch1.ogg', 25, 1, -1)
|
||||
if(prob(D.getBruteLoss()) && !D.lying)
|
||||
D.visible_message("<span class='warning'>[D] stumbles and falls!</span>", "<span class='userdanger'>The blow sends you to the ground!</span>")
|
||||
D.Knockdown(80)
|
||||
D.DefaultCombatKnockdown(80)
|
||||
log_combat(A, D, "[atk_verb] (Sleeping Carp)")
|
||||
return TRUE
|
||||
|
||||
@@ -192,7 +192,7 @@
|
||||
add_fingerprint(user)
|
||||
if((HAS_TRAIT(user, TRAIT_CLUMSY)) && prob(50))
|
||||
to_chat(user, "<span class ='warning'>You club yourself over the head with [src].</span>")
|
||||
user.Knockdown(60)
|
||||
user.DefaultCombatKnockdown(60)
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
H.apply_damage(2*force, BRUTE, BODY_ZONE_HEAD)
|
||||
@@ -226,7 +226,7 @@
|
||||
if(prob(10))
|
||||
H.visible_message("<span class='warning'>[H] collapses!</span>", \
|
||||
"<span class='userdanger'>Your legs give out!</span>")
|
||||
H.Knockdown(80)
|
||||
H.DefaultCombatKnockdown(80)
|
||||
if(H.staminaloss && !H.IsSleeping())
|
||||
var/total_health = (H.health - H.staminaloss)
|
||||
if(total_health <= HEALTH_THRESHOLD_CRIT && !H.stat)
|
||||
|
||||
@@ -207,7 +207,7 @@
|
||||
if (T && isturf(T))
|
||||
if (!D.stat)
|
||||
D.emote("scream")
|
||||
D.throw_at(T, 10, 4, A, TRUE, TRUE, callback = CALLBACK(D, /mob/living/carbon/human.proc/Knockdown, 20))
|
||||
D.throw_at(T, 10, 4, A, TRUE, TRUE, callback = CALLBACK(D, /mob/living/carbon/human.proc/DefaultCombatKnockdown, 20))
|
||||
log_combat(A, D, "has thrown with wrestling")
|
||||
return 0
|
||||
|
||||
@@ -303,7 +303,7 @@
|
||||
playsound(A.loc, "swing_hit", 50, 1)
|
||||
if (!D.stat)
|
||||
D.emote("scream")
|
||||
D.Knockdown(40)
|
||||
D.DefaultCombatKnockdown(40)
|
||||
|
||||
switch(rand(1,3))
|
||||
if (2)
|
||||
@@ -361,7 +361,7 @@
|
||||
|
||||
var/turf/T = get_edge_target_turf(A, get_dir(A, get_step_away(D, A)))
|
||||
if (T && isturf(T))
|
||||
D.Knockdown(20)
|
||||
D.DefaultCombatKnockdown(20)
|
||||
D.throw_at(T, 3, 2)
|
||||
log_combat(A, D, "roundhouse-kicked")
|
||||
|
||||
@@ -400,7 +400,7 @@
|
||||
if (falling == 1)
|
||||
A.visible_message("<span class = 'danger'><B>...and dives head-first into the ground, ouch!</b></span>")
|
||||
A.adjustBruteLoss(rand(10,20))
|
||||
A.Knockdown(60)
|
||||
A.DefaultCombatKnockdown(60)
|
||||
to_chat(A, "[D] is too far away!")
|
||||
return 0
|
||||
|
||||
@@ -429,7 +429,7 @@
|
||||
else
|
||||
D.adjustBruteLoss(rand(20,30))
|
||||
|
||||
D.Knockdown(40)
|
||||
D.DefaultCombatKnockdown(40)
|
||||
|
||||
A.pixel_y = 0
|
||||
|
||||
|
||||
@@ -73,8 +73,7 @@
|
||||
owner.log_message("gained Vanguard stun immunity", LOG_ATTACK)
|
||||
owner.add_stun_absorption("vanguard", INFINITY, 1, "'s yellow aura momentarily intensifies!", "Your ward absorbs the stun!", " radiating with a soft yellow light!")
|
||||
owner.visible_message("<span class='warning'>[owner] begins to faintly glow!</span>", "<span class='brass'>You will absorb all stuns for the next twenty seconds.</span>")
|
||||
owner.SetStun(0, FALSE)
|
||||
owner.SetKnockdown(0)
|
||||
owner.SetAllImmobility(0, FALSE)
|
||||
owner.setStaminaLoss(0, FALSE)
|
||||
progbar = new(owner, duration, owner)
|
||||
progbar.bar.color = list("#FAE48C", "#FAE48C", "#FAE48C", rgb(0,0,0))
|
||||
@@ -97,7 +96,7 @@
|
||||
if(owner.stun_absorption[i]["end_time"] > world.time && owner.stun_absorption[i]["priority"] > vanguard["priority"])
|
||||
otheractiveabsorptions = TRUE
|
||||
if(!GLOB.ratvar_awakens && stuns_blocked && !otheractiveabsorptions)
|
||||
owner.Knockdown(stuns_blocked)
|
||||
owner.DefaultCombatKnockdown(stuns_blocked)
|
||||
message_to_owner = "<span class='boldwarning'>The weight of the Vanguard's protection crashes down upon you!</span>"
|
||||
if(stuns_blocked >= 300)
|
||||
message_to_owner += "\n<span class='userdanger'>You faint from the exertion!</span>"
|
||||
@@ -226,9 +225,8 @@
|
||||
return ..()
|
||||
|
||||
/datum/status_effect/wish_granters_gift/on_remove()
|
||||
owner.revive(full_heal = 1, admin_revive = 1)
|
||||
owner.revive(full_heal = TRUE, admin_revive = TRUE)
|
||||
owner.visible_message("<span class='warning'>[owner] appears to wake from the dead, having healed all wounds!</span>", "<span class='notice'>You have regenerated.</span>")
|
||||
owner.update_canmove()
|
||||
|
||||
/obj/screen/alert/status_effect/wish_granters_gift
|
||||
name = "Wish Granter's Immortality"
|
||||
|
||||
@@ -12,12 +12,12 @@
|
||||
. = ..()
|
||||
if(.)
|
||||
if(updating_canmove)
|
||||
owner.update_canmove()
|
||||
owner.update_mobility()
|
||||
if(needs_update_stat || issilicon(owner))
|
||||
owner.update_stat()
|
||||
|
||||
/datum/status_effect/incapacitating/on_remove()
|
||||
owner.update_canmove()
|
||||
owner.update_mobility()
|
||||
if(needs_update_stat || issilicon(owner)) //silicons need stat updates in addition to normal canmove updates
|
||||
owner.update_stat()
|
||||
|
||||
@@ -29,10 +29,22 @@
|
||||
/datum/status_effect/incapacitating/knockdown
|
||||
id = "knockdown"
|
||||
|
||||
/datum/status_effect/incapacitating/knockdown/tick()
|
||||
//IMMOBILIZED
|
||||
/datum/status_effect/incapacitating/immobilized
|
||||
id = "immobilized"
|
||||
|
||||
//PARALYZED
|
||||
/datum/status_effect/incapacitating/paralyzed
|
||||
id = "paralyzed"
|
||||
|
||||
/datum/status_effect/incapacitating/paralyzed/tick()
|
||||
if(owner.getStaminaLoss())
|
||||
owner.adjustStaminaLoss(-0.3) //reduce stamina loss by 0.3 per tick, 6 per 2 seconds
|
||||
|
||||
//DAZED
|
||||
/datum/status_effect/incapacitating/dazed
|
||||
id = "dazed"
|
||||
|
||||
//UNCONSCIOUS
|
||||
/datum/status_effect/incapacitating/unconscious
|
||||
id = "unconscious"
|
||||
@@ -211,7 +223,7 @@
|
||||
if(iscarbon(owner) && !is_servant_of_ratvar(owner) && !owner.anti_magic_check(chargecost = 0) && number_legs)
|
||||
if(force_damage || owner.m_intent != MOVE_INTENT_WALK)
|
||||
if(GLOB.ratvar_awakens)
|
||||
owner.Knockdown(20)
|
||||
owner.DefaultCombatKnockdown(20)
|
||||
if(iscultist(owner))
|
||||
owner.apply_damage(cultist_damage_on_toggle * 0.5, BURN, BODY_ZONE_L_LEG)
|
||||
owner.apply_damage(cultist_damage_on_toggle * 0.5, BURN, BODY_ZONE_R_LEG)
|
||||
@@ -558,7 +570,7 @@
|
||||
var/old_oxyloss
|
||||
|
||||
/datum/status_effect/kindle/tick()
|
||||
owner.Knockdown(15, TRUE, FALSE, 15)
|
||||
owner.DefaultCombatKnockdown(15, TRUE, FALSE, 15)
|
||||
if(iscarbon(owner))
|
||||
var/mob/living/carbon/C = owner
|
||||
C.silent = max(2, C.silent)
|
||||
|
||||
@@ -17,11 +17,11 @@
|
||||
to_chat(owner, "<span class='userdanger'>You become frozen in a cube!</span>")
|
||||
cube = icon('icons/effects/freeze.dmi', "ice_cube")
|
||||
owner.add_overlay(cube)
|
||||
owner.update_canmove()
|
||||
owner.update_mobility()
|
||||
return ..()
|
||||
|
||||
/datum/status_effect/freon/tick()
|
||||
owner.update_canmove()
|
||||
owner.update_mobility()
|
||||
if(can_melt && owner.bodytemperature >= BODYTEMP_NORMAL)
|
||||
qdel(src)
|
||||
|
||||
@@ -31,14 +31,14 @@
|
||||
if(!QDELETED(src))
|
||||
to_chat(owner, "You break out of the ice cube!")
|
||||
owner.remove_status_effect(/datum/status_effect/freon)
|
||||
owner.update_canmove()
|
||||
owner.update_mobility()
|
||||
|
||||
/datum/status_effect/freon/on_remove()
|
||||
if(!owner.stat)
|
||||
to_chat(owner, "The cube melts!")
|
||||
owner.cut_overlay(cube)
|
||||
owner.adjust_bodytemperature(100)
|
||||
owner.update_canmove()
|
||||
owner.update_mobility()
|
||||
UnregisterSignal(owner, COMSIG_LIVING_RESIST)
|
||||
|
||||
/datum/status_effect/freon/watcher
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
status += "The law sync module is [R.lawupdate ? "on" : "off"]."
|
||||
status += "The intelligence link display shows [R.connected_ai ? R.connected_ai.name : "NULL"]."
|
||||
status += "The camera light is [!isnull(R.builtInCamera) && R.builtInCamera.status ? "on" : "off"]."
|
||||
status += "The lockdown indicator is [R.lockcharge ? "on" : "off"]."
|
||||
status += "The lockdown indicator is [R.locked_down ? "on" : "off"]."
|
||||
status += "The reset module hardware light is [R.has_module() ? "on" : "off"]."
|
||||
return status
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
R.lawsync()
|
||||
R.show_laws()
|
||||
if(WIRE_LOCKDOWN)
|
||||
R.SetLockdown(!R.lockcharge) // Toggle
|
||||
R.SetLockdown(!R.locked_down) // Toggle
|
||||
if(WIRE_RESET_MODULE)
|
||||
if(R.has_module())
|
||||
R.visible_message("[R]'s module servos twitch.", "Your module display flickers.")
|
||||
|
||||
@@ -172,7 +172,7 @@
|
||||
.["security_level"] = get_security_level()
|
||||
.["round_duration"] = SSticker ? round((world.time-SSticker.round_start_time)/10) : 0
|
||||
// Amount of world's ticks in seconds, useful for calculating round duration
|
||||
|
||||
|
||||
//Time dilation stats.
|
||||
.["time_dilation_current"] = SStime_track.time_dilation_current
|
||||
.["time_dilation_avg"] = SStime_track.time_dilation_avg
|
||||
@@ -187,3 +187,4 @@
|
||||
|
||||
if(!key_valid)
|
||||
GLOB.topic_status_cache = .
|
||||
|
||||
|
||||
Reference in New Issue
Block a user