From a6e6274039a4994bc8e4f4d8a76a1bbb07cacac1 Mon Sep 17 00:00:00 2001 From: Artur Date: Sat, 30 Nov 2019 01:21:07 +0200 Subject: [PATCH] Reviewer fixes and spacing --- .../game/gamemodes/bloodsucker/bloodsucker.dm | 19 +-- code/game/gamemodes/bloodsucker/hunter.dm | 2 +- .../bloodsucker/bloodsucker_integration.dm | 4 +- .../bloodsucker/bloodsucker_life.dm | 11 +- .../bloodsucker/bloodsucker_powers.dm | 140 +----------------- .../bloodsucker/powers/bs_brawn.dm | 22 +-- .../bloodsucker/powers/bs_cloak.dm | 5 +- .../antagonists/bloodsucker/powers/bs_feed.dm | 26 +--- .../bloodsucker/powers/bs_gohome.dm | 5 +- .../bloodsucker/powers/bs_haste.dm | 5 +- .../bloodsucker/powers/bs_lunge.dm | 18 --- .../bloodsucker/powers/bs_mesmerize.dm | 5 +- .../bloodsucker/powers/bs_trespass.dm | 5 +- .../antagonists/bloodsucker/powers/bs_veil.dm | 5 +- .../bloodsucker/powers/v_distress.dm | 13 -- .../bloodsucker/powers/v_recuperate.dm | 5 +- tgstation.dme | 1 - 17 files changed, 53 insertions(+), 238 deletions(-) delete mode 100644 code/modules/antagonists/bloodsucker/powers/v_distress.dm diff --git a/code/game/gamemodes/bloodsucker/bloodsucker.dm b/code/game/gamemodes/bloodsucker/bloodsucker.dm index 2f3514bf6c..c0f5f80c1f 100644 --- a/code/game/gamemodes/bloodsucker/bloodsucker.dm +++ b/code/game/gamemodes/bloodsucker/bloodsucker.dm @@ -161,7 +161,7 @@ // [FLEDGLING] if (creator) - A = new ANTAG_DATUM_BLOODSUCKER(bloodsucker) + A = new (bloodsucker) A.creator = creator bloodsucker.add_antag_datum(A) // Log @@ -200,9 +200,10 @@ if (!am_valid) H.set_species(/datum/species/human) H.real_name = H.client.prefs.custom_names["human"] - if (H.wear_id) - H.wear_id.GetID().registered_name = H.real_name - H.wear_id.GetID().update_label() + var/obj/item/card/id/ID = H.wear_id?.GetID() + if(ID) + ID.registered_name = H.real_name + ID.update_label() /datum/game_mode/proc/can_make_vassal(mob/living/target, datum/mind/creator, display_warning=TRUE)//, check_antag_or_loyal=FALSE) @@ -253,7 +254,6 @@ // No List? if(!islist(M.antag_datums) || M.antag_datums.len == 0) return FALSE - // Am I NOT an invalid Antag? NOTE: We already excluded non-antags above. Don't worry about the "No List?" check in AmInvalidIntag() return !AmInvalidAntag(M) @@ -261,34 +261,29 @@ // No List? if(!islist(M.antag_datums) || M.antag_datums.len == 0) return FALSE - // Does even ONE antag appear in this mind that isn't in the list? Then FAIL! for(var/datum/antagonist/antag_datum in M.antag_datums) if (!(antag_datum.type in vassal_allowed_antags)) // vassal_allowed_antags is a list stored in the game mode, above. //message_admins("DEBUG VASSAL: Found Invalid: [antag_datum] // [antag_datum.type]") return TRUE - //message_admins("DEBUG VASSAL: Valid Antags! (total of [M.antag_datums.len])") // WHEN YOU DELETE THE ABOVE: Remove the 3 second timer on converting the vassal too. return FALSE - /datum/game_mode/proc/make_vassal(mob/living/target, datum/mind/creator) if (!can_make_vassal(target,creator)) return FALSE // Make Vassal - var/datum/antagonist/vassal/V = new ANTAG_DATUM_VASSAL(target.mind) + var/datum/antagonist/vassal/V = new (target.mind) var/datum/antagonist/bloodsucker/B = creator.has_antag_datum(ANTAG_DATUM_BLOODSUCKER) V.master = B target.mind.add_antag_datum(V, V.master.get_team()) // Update Bloodsucker Title (we're a daddy now) B.SelectTitle(am_fledgling = FALSE) // Only works if you have no title yet. - // Log message_admins("[target] has become a Vassal, and is enslaved to [creator].") log_admin("[target] has become a Vassal, and is enslaved to [creator].") - return TRUE /datum/game_mode/proc/remove_vassal(datum/mind/vassal) - vassal.remove_antag_datum(ANTAG_D \ No newline at end of file + vassal.remove_antag_datum(ANTAG_DATUM_VASSAL) diff --git a/code/game/gamemodes/bloodsucker/hunter.dm b/code/game/gamemodes/bloodsucker/hunter.dm index 2092db3154..49b97b0b21 100644 --- a/code/game/gamemodes/bloodsucker/hunter.dm +++ b/code/game/gamemodes/bloodsucker/hunter.dm @@ -43,7 +43,7 @@ /datum/game_mode/proc/finalize_monster_hunters(monster_count = 4) var/amEvil = TRUE // First hunter is always an evil boi for(var/datum/mind/hunter in vamphunters) - var/datum/antagonist/vamphunter/A = new ANTAG_DATUM_HUNTER(hunter) + var/datum/antagonist/vamphunter/A = new (hunter) A.bad_dude = amEvil hunter.add_antag_datum(A) amEvil = FALSE // Every other hunter is just a boring greytider diff --git a/code/modules/antagonists/bloodsucker/bloodsucker_integration.dm b/code/modules/antagonists/bloodsucker/bloodsucker_integration.dm index a48f9c8114..0fa681e435 100644 --- a/code/modules/antagonists/bloodsucker/bloodsucker_integration.dm +++ b/code/modules/antagonists/bloodsucker/bloodsucker_integration.dm @@ -8,11 +8,11 @@ /mob/living/proc/HaveBloodsuckerBodyparts(var/displaymessage="") // displaymessage can be something such as "rising from death" for Torpid Sleep. givewarningto is the person receiving messages. - if (!getorganslot("heart")) + if (!getorganslot(ORGAN_SLOT_HEART)) if (displaymessage != "") to_chat(src, "Without a heart, you are incapable of [displaymessage].") return FALSE - if (!get_bodypart("head")) + if (!get_bodypart(BODY_ZONE_HEAD)) if (displaymessage != "") to_chat(src, "Without a head, you are incapable of [displaymessage].") return FALSE diff --git a/code/modules/antagonists/bloodsucker/bloodsucker_life.dm b/code/modules/antagonists/bloodsucker/bloodsucker_life.dm index f86b3c60ad..be557148bd 100644 --- a/code/modules/antagonists/bloodsucker/bloodsucker_life.dm +++ b/code/modules/antagonists/bloodsucker/bloodsucker_life.dm @@ -103,7 +103,7 @@ // Reagents (NOT Blood!) if(target.reagents && target.reagents.total_volume) - target.reagents.reaction(owner.current, INGEST, 1 / target.reagents.total_volume) // Run Reaction: what happens when what they have mixes with what I have? + target.reagents.reaction(owner.current, INGEST, 1) // Run Reaction: what happens when what they have mixes with what I have? target.reagents.trans_to(owner.current, 1) // Run transfer of 1 unit of reagent from them to me. // Blood Gulp Sound @@ -114,38 +114,47 @@ description = "I have fed greedly from that which nourishes me.\n" mood_change = 10 timeout = 900 + /datum/mood_event/drankblood_bad description = "I drank the blood of a lesser creature. Disgusting.\n" mood_change = -4 timeout = 900 + /datum/mood_event/drankblood_dead description = "I drank dead blood. I am better than this.\n" mood_change = -7 timeout = 900 + /datum/mood_event/drankblood_synth description = "I drank synthetic blood. What is wrong with me?\n" mood_change = -7 timeout = 900 + /datum/mood_event/drankkilled description = "I drank from my victim until they died. I feel...less human.\n" mood_change = -12 timeout = 6000 + /datum/mood_event/madevamp description = "A soul has been cursed to undeath by my own hand.\n" mood_change = -10 timeout = 10000 + /datum/mood_event/vampatefood description = "Mortal nourishment no longer sustains me. I feel unwell.\n" mood_change = -6 timeout = 1000 + /datum/mood_event/coffinsleep description = "I slept in a coffin during the day. I feel whole again.\n" mood_change = 8 timeout = 1200 + /datum/mood_event/daylight_1 description = "I slept poorly in a makeshift coffin during the day.\n" mood_change = -3 timeout = 1000 + /datum/mood_event/daylight_2 description = "I have been scorched by the unforgiving rays of the sun.\n" mood_change = -6 diff --git a/code/modules/antagonists/bloodsucker/bloodsucker_powers.dm b/code/modules/antagonists/bloodsucker/bloodsucker_powers.dm index ad06d54485..a609a502b3 100644 --- a/code/modules/antagonists/bloodsucker/bloodsucker_powers.dm +++ b/code/modules/antagonists/bloodsucker/bloodsucker_powers.dm @@ -1,6 +1,3 @@ - - - /datum/action/bloodsucker name = "Vampiric Gift" desc = "A vampiric gift." @@ -20,8 +17,6 @@ var/active = FALSE var/cooldown = 20 // 10 ticks, 1 second. var/cooldownUntil = 0 // From action.dm: next_use_time = world.time + cooldown_time - - // Power-Related var/level_current = 0 // Can increase to yield new abilities. Each power goes up in strength each Rank. //var/level_max = 1 // @@ -45,37 +40,27 @@ desc += "

Useable once per night." ..() - // NOTES // // click.dm <--- Where we can take over mouse clicks // spells.dm /add_ranged_ability() <--- How we take over the mouse click to use a power on a target. - /datum/action/bloodsucker/Trigger() - // Active? DEACTIVATE AND END! if (active && CheckCanDeactivate(TRUE)) DeactivatePower() return - if (!CheckCanPayCost(TRUE) || !CheckCanUse(TRUE)) return - PayCost() - if (amToggle) active = !active UpdateButtonIcon() - if (!amToggle || !active) StartCooldown() // Must come AFTER UpdateButton(), otherwise icon will revert. - ActivatePower() // NOTE: ActivatePower() freezes this power in place until it ends. - if (active) // Did we not manually disable? Handle it here. DeactivatePower() - if (amSingleUse) RemoveAfterUse() @@ -110,7 +95,7 @@ // Incap? if(must_be_capacitated) var/mob/living/L = owner - if (L.incapacitated(ignore_restraints=TRUE,ignore_grab=TRUE) || L.lying && !can_be_immobilized) + if (L.incapacitated(TRUE, TRUE) || L.lying && !can_be_immobilized) if(display_error) to_chat(owner, "Not while you're incapacitated!") return FALSE @@ -123,7 +108,6 @@ return FALSE return TRUE - /datum/action/bloodsucker/proc/StartCooldown() set waitfor = FALSE // Alpha Out @@ -140,8 +124,6 @@ button.color = rgb(255,255,255,255) button.alpha = 255 - - /datum/action/bloodsucker/proc/CheckCanDeactivate(display_error) return TRUE @@ -159,7 +141,6 @@ /datum/action/bloodsucker/proc/ActivatePower() - /datum/action/bloodsucker/proc/DeactivatePower(mob/living/user = owner, mob/living/target) active = FALSE UpdateButtonIcon() @@ -168,7 +149,6 @@ /datum/action/bloodsucker/proc/ContinueActive(mob/living/user, mob/living/target) // Used by loops to make sure this power can stay active. return active && user && (!warn_constant_cost || user.blood_volume > 0) - /datum/action/bloodsucker/proc/RemoveAfterUse() // Un-Learn Me! (GO HOME var/datum/antagonist/bloodsucker/bloodsuckerdatum = owner.mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER) @@ -176,13 +156,11 @@ bloodsuckerdatum.powers -= src Remove(owner) - /datum/action/bloodsucker/proc/Upgrade() level_current ++ /////////////////////////////////// PASSIVE POWERS /////////////////////////////////// - // New Type: Passive (Always on, no button) /datum/action/bloodsucker/passive @@ -218,18 +196,14 @@ // Click power: Begin Aim /datum/action/bloodsucker/targeted/Trigger() - if (active && CheckCanDeactivate(TRUE)) DeactivateRangedAbility() DeactivatePower() return - if (!CheckCanPayCost(TRUE) || !CheckCanUse(TRUE)) return - active = !active UpdateButtonIcon() - // Create & Link Targeting Proc var/mob/living/L = owner if (L.ranged_ability) @@ -240,13 +214,13 @@ to_chat(owner, "[message_Trigger]") /datum/action/bloodsucker/targeted/CheckCanUse(display_error) - if (!..()) - return FALSE + . = ..() + if(!.) + return if (!owner.client) // <--- We don't allow non client usage so that using powers like mesmerize will FAIL if you try to use them as ghost. Why? because ranged_abvility in spell.dm return FALSE // doesn't let you remove powers if you're not there. So, let's just cancel the power entirely. return TRUE - /datum/action/bloodsucker/targeted/DeactivatePower(mob/living/user = owner, mob/living/target) // Don't run ..(), we don't want to engage the cooldown until we USE this power! active = FALSE @@ -255,7 +229,6 @@ /datum/action/bloodsucker/targeted/proc/DeactivateRangedAbility() // Only Turned off when CLICK is disabled...aka, when you successfully clicked (or bs_proc_holder.remove_ranged_ability() - //qdel(bs_proc_holder) // Check if target is VALID (wall, turf, or character?) /datum/action/bloodsucker/targeted/proc/CheckValidTarget(atom/A) @@ -278,15 +251,12 @@ // Valid? (return true means DON'T cancel power!) if (!CheckCanPayCost(TRUE) || !CheckCanUse(TRUE) || !CheckCanTarget(A, TRUE)) return TRUE - // Skip this part so we can return TRUE right away. if (power_activates_immediately) PowerActivatedSuccessfully() // Mesmerize pays only after success. - power_in_use = TRUE // Lock us into this ability until it successfully fires off. Otherwise, we pay the blood even if we fail. FireTargetedPower(A) // We use this instead of ActivatePower(), which has no input power_in_use = FALSE - return TRUE /datum/action/bloodsucker/targeted/proc/FireTargetedPower(atom/A) @@ -294,17 +264,13 @@ /datum/action/bloodsucker/targeted/proc/PowerActivatedSuccessfully() // The power went off! We now pay the cost of the power. - PayCost() DeactivateRangedAbility() DeactivatePower() StartCooldown() // Do AFTER UpdateIcon() inside of DeactivatePower. Otherwise icon just gets wiped. /datum/action/bloodsucker/targeted/ContinueActive(mob/living/user, mob/living/target) // Used by loops to make sure this power can stay active. - return ..() // active// && user.mind && user.mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER) - - - + return ..() // Target Proc Holder /obj/effect/proc_holder/bloodsucker var/datum/action/bloodsucker/targeted/linked_power @@ -312,102 +278,6 @@ /obj/effect/proc_holder/bloodsucker/remove_ranged_ability(msg) ..() linked_power.DeactivatePower() - //qdel(src) /obj/effect/proc_holder/bloodsucker/InterceptClickOn(mob/living/caller, params, atom/A) return linked_power.ClickWithPower(A) - - - -// P O W E R S -// * BLOOD -// ADDICTIVE: A) Your blood is dangerously addictive, and causes consumers to rendew their own blood at an increased rate (as well as heal). B) Vassals on your blood get special gifts. -// -// * HASTE -// SPRINT: A) Hastily speed in a direction faster than the eye can see. B) Spin and dizzy people you pass. C) Chance to knock down people you pass. -// LUNGE: Leap toward a location and put your target into an agressive hold. -// -// * AGILITY -// CELERITY: Dodge projectiles and even bullets. Perhaps avoid explosions! -// REFLEXES TRAIT_NOSLIPWATER, TRAIT_NOSLIPALL -// -// * STEALTH -// CLOAK: A) Vanish into the shadows when stationary. B) Moving does not break your current level of invisibility (but stops you from hiding further). -// DISGUISE: A) Bear the face and voice of a new person. B) Bear a random outfit of an unknown profession. -// -// * FEED -// A) Mute victim while Feeding (and slowly deal Stamina damage) B) Paralyze victim while feeding C) Sleep victim while Feeding -// -// * MEZMERIZE -// LOVE: Target falls in love with you. Being harmed directly causes them harm if they see it? -// STAY: Target will do everything they can to stand in the same place. -// FOLLOW: Target follows you, spouting random phrases from their history (or maybe Poly's or NPC's vocab?) -// ATTACK: Target finds a nearby non-Bloodsucker victim to attack. -// -// * EXPEL -// TAINT: Mark areas with your corrupting blood. Your coffin must remain in an area so marked to gain any benefit. Spiders, roaches, and rats will infest the area, cobwebs grow rapidly, and trespassers are overcome with fear. -// SERVITUDE: Your blood binds a mortal to your will. Vassals feel your pain and can locate you anywhere. Your death causes them agony. -// HEIR: Raise a moral corpse into a Bloodsucker. The change will take a while, and the body must be brought to a tainted coffin to rise. -// -// * NIGHTMARE -// BOGEYMAN: Terrify those who view you in your death-form, causing them to shake, pale, and drop possessions. -// HORROR: Horrified characters cannot speak, shake, and slowly push away from the source. -// - - - - - - - - - -/* POWERS: VERSION TWO - - * FEED - 1: Paralyze - 2: Unconscious - 3: Sleep - - * LUNGE - 1: Grab: Aggressive - 2: Grab from Behind: Neck - 3: Grab from Darkness: Neck - - * CLOAK - 1: Hide - 2: Move - 3: Full Speed - - * MESMERIZE - 1: Stay - 2: Mute - 3: Follow + Blind - - * BRAWN - 1: Punch Hard - 2: Open Doors and Lockers - 3: - - * HASTE - 1: Speed to location - 2: Dodge Bullets - 3: - - * VEIL - 1: - 2: - 3: - - * FORTITUDE - 1: Break Bonds and Grapples - 2: - 3: Immune to Brute Damage - - * DEMENT - 1: Shuffle Names - 2: - 3: - - -*/ diff --git a/code/modules/antagonists/bloodsucker/powers/bs_brawn.dm b/code/modules/antagonists/bloodsucker/powers/bs_brawn.dm index 95acab082c..a09cc1358c 100644 --- a/code/modules/antagonists/bloodsucker/powers/bs_brawn.dm +++ b/code/modules/antagonists/bloodsucker/powers/bs_brawn.dm @@ -17,8 +17,9 @@ var/upgrade_canDoor = FALSE /datum/action/bloodsucker/targeted/brawn/CheckCanUse(display_error) - if(!..(display_error))// DEFAULT CHECKS - return FALSE + . = ..() + if(!.) + return . = TRUE // Break Out of Restraints! (And then cancel) if (CheckBreakRestraints()) @@ -61,38 +62,31 @@ /datum/action/bloodsucker/targeted/brawn/FireTargetedPower(atom/A) // set waitfor = FALSE <---- DONT DO THIS!We WANT this power to hold up ClickWithPower(), so that we can unlock the power when it's done. - var/mob/living/carbon/target = A var/mob/living/user = owner - // Target Type: Mob if (isliving(target)) var/mob/living/carbon/user_C = user var/hitStrength = user_C.dna.species.punchdamagehigh * 1.25 + 2 - // Knockdown! var/powerlevel = min(7, 1 + level_current) if (rand(10 + powerlevel) >= 5) target.visible_message("[user] has knocked [target] down!", \ "[user] has knocked you down!", null, COMBAT_MESSAGE_RANGE) - target.Knockdown( min(5, rand(10, 10 * powerlevel)) ) // Chance of KO if (rand(5 + powerlevel) >= 5 && target.stat <= UNCONSCIOUS) target.Unconscious(40) - // Attack! playsound(get_turf(target), 'sound/weapons/punch4.ogg', 60, 1, -1) user.do_attack_animation(target, ATTACK_EFFECT_SMASH) var/obj/item/bodypart/affecting = target.get_bodypart(ran_zone(target.zone_selected)) target.apply_damage(hitStrength, BRUTE, affecting) - // Knockback var/send_dir = get_dir(owner, target) var/turf/T = get_ranged_target_turf(target, send_dir, powerlevel) owner.newtonian_move(send_dir) // Bounce back in 0 G target.throw_at(T, powerlevel, TRUE, owner) //new /datum/forced_movement(target, get_ranged_target_turf(target, send_dir, (hitStrength / 4)), 1, FALSE) - // Target Type: Door else if (upgrade_canDoor && istype(target, /obj/machinery/door)) playsound(get_turf(usr), 'sound/machines/airlock_alien_prying.ogg', 40, 1, -1) @@ -104,7 +98,6 @@ user.do_attack_animation(D, ATTACK_EFFECT_SMASH) playsound(get_turf(D), 'sound/effects/bang.ogg', 30, 1, -1) D.open(2) // open(2) is like a crowbar or jaws of life. - // Target Type: Closet else if (upgrade_canLocker && istype(target, /obj/structure/closet)) playsound(get_turf(usr), 'sound/machines/airlock_alien_prying.ogg', 40, 1, -1) @@ -116,7 +109,6 @@ playsound(get_turf(C), 'sound/effects/bang.ogg', 30, 1, -1) C.bust_open() - /datum/action/bloodsucker/targeted/brawn/proc/CheckBreakRestraints() if (!iscarbon(owner)) // || !owner.restrained() @@ -145,7 +137,6 @@ user_C.clear_cuffs(S,TRUE) playsound(get_turf(usr), 'sound/effects/grillehit.ogg', 80, 1, -1) return TRUE - // Destroy Leg Cuffs if(user_C.legcuffed) var/obj/O = user_C.get_item_by_slot(SLOT_LEGCUFFED) @@ -155,32 +146,25 @@ user_C.clear_cuffs(O,TRUE) playsound(get_turf(usr), 'sound/effects/grillehit.ogg', 80, 1, -1) return TRUE - return FALSE /datum/action/bloodsucker/targeted/brawn/proc/CheckEscapePuller() if (!owner.pulledby)// || owner.pulledby.grab_state <= GRAB_PASSIVE) return FALSE - var/mob/M = owner.pulledby var/pull_power = M.grab_state playsound(get_turf(M), 'sound/effects/woodhit.ogg', 75, 1, -1) - // Knock Down (if Living) if (isliving(M)) var/mob/living/L = M L.Knockdown(pull_power * 10 + 20) - // Knock Back (before Knockdown, which probably cancels pull) var/send_dir = get_dir(owner, M) var/turf/T = get_ranged_target_turf(M, send_dir, pull_power) owner.newtonian_move(send_dir) // Bounce back in 0 G M.throw_at(T, pull_power, TRUE, owner, FALSE) // Throw distance based on grab state! Harder grabs punished more aggressively. - - // /proc/log_combat(atom/user, atom/target, what_done, atom/object=null, addition=null) log_combat(owner, M, "used Brawn power") - owner.visible_message("[owner] tears free of [M]'s grasp!", \ "You shrug off [M]'s grasp!") owner.pulledby = null // It's already done, but JUST IN CASE. diff --git a/code/modules/antagonists/bloodsucker/powers/bs_cloak.dm b/code/modules/antagonists/bloodsucker/powers/bs_cloak.dm index 52d7f24f45..2612ad659e 100644 --- a/code/modules/antagonists/bloodsucker/powers/bs_cloak.dm +++ b/code/modules/antagonists/bloodsucker/powers/bs_cloak.dm @@ -16,8 +16,9 @@ var/upgrade_canMove = FALSE // Can I move around with this power? /datum/action/bloodsucker/cloak/CheckCanUse(display_error) - if(!..(display_error))// DEFAULT CHECKS - return FALSE + . = ..() + if(!.) + return // Must be Dark var/turf/T = owner.loc if(istype(T) && T.get_lumcount() > light_min) diff --git a/code/modules/antagonists/bloodsucker/powers/bs_feed.dm b/code/modules/antagonists/bloodsucker/powers/bs_feed.dm index 157938e0fb..7c4cf46e3c 100644 --- a/code/modules/antagonists/bloodsucker/powers/bs_feed.dm +++ b/code/modules/antagonists/bloodsucker/powers/bs_feed.dm @@ -17,25 +17,19 @@ var/target_grappled = FALSE // If you started grappled, then ending it will end your Feed. /datum/action/bloodsucker/feed/CheckCanUse(display_error) - if(!..(display_error))// DEFAULT CHECKS - return FALSE - + . = ..() + if(!.) + return // Wearing mask var/mob/living/L = owner if (L.is_mouth_covered()) if (display_error) to_chat(owner, "You cannot feed with your mouth covered! Remove your mask.") return FALSE - // Find my Target! if (!FindMyTarget(display_error)) // Sets feed_target within after Validating return FALSE - - // Not in correct state - //if (owner.grab_state < GRAB_PASSIVE)//GRAB_AGGRESSIVEs) - // to_chat(owner, "You aren't grabbing anyone!") - // return FALSE - + // Not in correct state // DONE! return TRUE @@ -80,7 +74,6 @@ // Default feed_target = null target_grappled = FALSE - // If you are pulling a mob, that's your target. If you don't like it, then release them. if (owner.pulling && ismob(owner.pulling)) // Check grapple target Valid @@ -89,20 +82,17 @@ target_grappled = TRUE feed_target = owner.pulling return TRUE - // Find Targets var/list/mob/living/seen_targets = view(1, owner) var/list/mob/living/seen_mobs = list() for(var/mob/living/M in seen_targets) if (isliving(M) && M != owner) seen_mobs += M - // None Seen! if (seen_mobs.len == 0) if (display_error) to_chat(owner, "You must be next to or grabbing a victim to feed from them.") return FALSE - // Check Valids... var/list/targets_valid = list() var/list/targets_dead = list() @@ -114,7 +104,6 @@ targets_valid += M else targets_dead += M - // No Living? Try dead. if (targets_valid.len == 0 && targets_dead.len > 0) targets_valid = targets_dead @@ -137,17 +126,13 @@ feed_target = pick(targets_valid)//targets[1] return TRUE - /datum/action/bloodsucker/feed/ActivatePower() // set waitfor = FALSE <---- DONT DO THIS!We WANT this power to hold up Activate(), so Deactivate() can happen after. - var/mob/living/target = feed_target // Stored during CheckCanUse(). Can be a grabbed OR adjecent character. var/mob/living/user = owner var/datum/antagonist/bloodsucker/bloodsuckerdatum = user.mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER) - // Am I SECRET or LOUD? It stays this way the whole time! I must END IT to try it the other way. var/amSilent = (!target_grappled || owner.grab_state <= GRAB_PASSIVE) // && iscarbon(target) // Non-carbons (animals) not passive. They go straight into aggressive. - // Initial Wait var/feed_time = (amSilent ? 45 : 25) - (2.5 * level_current) feed_time = max(15, feed_time) @@ -159,7 +144,6 @@ to_chat(user, "Your feeding was interrupted.") //DeactivatePower(user,target) return - // Put target to Sleep (Bloodsuckers are immune to their own bite's sleep effect) if (!amSilent) ApplyVictimEffects(target) // Sleep, paralysis, immobile, unconscious, and mute @@ -172,7 +156,6 @@ // Pull Target Close if (!target.density) // Pull target to you if they don't take up space. target.Move(user.loc) - // Broadcast Message if (amSilent) //if (!iscarbon(target)) @@ -198,7 +181,6 @@ else // /atom/proc/visible_message(message, self_message, blind_message, vision_distance, ignored_mobs) user.visible_message("[user] closes [user.p_their()] mouth around [target]'s neck!", \ "You sink your fangs into [target]'s neck.") - // My mouth is full! ADD_TRAIT(user, TRAIT_MUTE, "bloodsucker_feed") diff --git a/code/modules/antagonists/bloodsucker/powers/bs_gohome.dm b/code/modules/antagonists/bloodsucker/powers/bs_gohome.dm index 81cfa48241..4d76b93418 100644 --- a/code/modules/antagonists/bloodsucker/powers/bs_gohome.dm +++ b/code/modules/antagonists/bloodsucker/powers/bs_gohome.dm @@ -19,8 +19,9 @@ /datum/action/bloodsucker/gohome/CheckCanUse(display_error) - if(!..(display_error))// DEFAULT CHECKS - return FALSE + . = ..() + if(!.) + return // Have No Lair (NOTE: You only got this power if you had a lair, so this means it's destroyed) var/datum/antagonist/bloodsucker/bloodsuckerdatum = owner.mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER) if (!istype(bloodsuckerdatum) || !bloodsuckerdatum.coffin) diff --git a/code/modules/antagonists/bloodsucker/powers/bs_haste.dm b/code/modules/antagonists/bloodsucker/powers/bs_haste.dm index 118bbb308c..8cfed3192a 100644 --- a/code/modules/antagonists/bloodsucker/powers/bs_haste.dm +++ b/code/modules/antagonists/bloodsucker/powers/bs_haste.dm @@ -20,8 +20,9 @@ /datum/action/bloodsucker/targeted/haste/CheckCanUse(display_error) - if(!..(display_error))// DEFAULT CHECKS - return FALSE + . = ..() + if(!.) + return // Being Grabbed if (owner.pulledby && owner.pulledby.grab_state >= GRAB_AGGRESSIVE) if (display_error) diff --git a/code/modules/antagonists/bloodsucker/powers/bs_lunge.dm b/code/modules/antagonists/bloodsucker/powers/bs_lunge.dm index d809bddc99..e507b3a14f 100644 --- a/code/modules/antagonists/bloodsucker/powers/bs_lunge.dm +++ b/code/modules/antagonists/bloodsucker/powers/bs_lunge.dm @@ -1,8 +1,6 @@ - // Level 1: Grapple level 2 // Level 2: Grapple 3 from Behind // Level 3: Grapple 3 from Shadows - /datum/action/bloodsucker/targeted/lunge name = "Predatory Lunge" desc = "Spring at your target and aggressively grapple them without warning. Attacks from concealment or the rear may even knock them down." @@ -15,7 +13,6 @@ must_be_capacitated = TRUE bloodsucker_can_buy = TRUE - /datum/action/bloodsucker/targeted/lunge/CheckCanUse(display_error) if(!..(display_error))// DEFAULT CHECKS return FALSE @@ -26,11 +23,9 @@ return FALSE return TRUE - /datum/action/bloodsucker/targeted/lunge/CheckValidTarget(atom/A) return isliving(A) - /datum/action/bloodsucker/targeted/lunge/CheckCanTarget(atom/A, display_error) // Check: Self if (target == owner) @@ -51,18 +46,14 @@ /datum/action/bloodsucker/targeted/lunge/FireTargetedPower(atom/A) // set waitfor = FALSE <---- DONT DO THIS!We WANT this power to hold up ClickWithPower(), so that we can unlock the power when it's done. - var/mob/living/user = owner var/mob/living/carbon/target = A var/turf/T = get_turf(target) - // Clear Vars owner.pulling = null - // Will we Knock them Down? var/do_knockdown = !is_A_facing_B(target,owner) || owner.alpha <= 0 || istype(owner.loc, /obj/structure/closet) // CAUSES: Target has their back to me, I'm invisible, or I'm in a Closet - // Step One: Heatseek toward Target's Turf walk_towards(owner, T, 0.1, 10) // NOTE: this runs in the background! to cancel it, you need to use walk(owner.current,0), or give them a new path. var/safety = 10 @@ -70,7 +61,6 @@ if(owner.incapacitated()) sleep(1) safety -- - // Did I get knocked down? if (owner && owner.incapacitated()) if (user.lying) @@ -78,8 +68,6 @@ new /datum/forced_movement(owner, get_ranged_target_turf(owner, send_dir, 1), 1, FALSE) owner.spin(10) break - - // Step Two: Check if I'm at/adjectent to Target's CURRENT turf (not original...that was just a destination) if (target.Adjacent(owner)) // LEVEL 2: If behind target, mute or unconscious! @@ -91,12 +79,6 @@ target.grabbedby(owner) // Taken from mutations.dm under changelings target.grippedby(owner, instant = TRUE) //instant aggro grab - // UNCONSCIOUS or MUTE! - //owner.start_pulling(target,GRAB_AGGRESSIVE) // GRAB_PASSIVE, GRAB_AGGRESSIVE, GRAB_NECK, GRAB_KILL - - //DeactivatePower() - - /datum/action/bloodsucker/targeted/lunge/DeactivatePower(mob/living/user = owner, mob/living/target) ..() // activate = FALSE user.update_canmove() diff --git a/code/modules/antagonists/bloodsucker/powers/bs_mesmerize.dm b/code/modules/antagonists/bloodsucker/powers/bs_mesmerize.dm index 1977f9717e..fc396dbeea 100644 --- a/code/modules/antagonists/bloodsucker/powers/bs_mesmerize.dm +++ b/code/modules/antagonists/bloodsucker/powers/bs_mesmerize.dm @@ -19,8 +19,9 @@ bloodsucker_can_buy = TRUE /datum/action/bloodsucker/targeted/mesmerize/CheckCanUse(display_error) - if(!..(display_error))// DEFAULT CHECKS - return FALSE + . = ..() + if(!.) + return if (!owner.getorganslot(ORGAN_SLOT_EYES)) if (display_error) to_chat(owner, "You have no eyes with which to mesmerize.") diff --git a/code/modules/antagonists/bloodsucker/powers/bs_trespass.dm b/code/modules/antagonists/bloodsucker/powers/bs_trespass.dm index e74a2715ab..9e3ee8939d 100644 --- a/code/modules/antagonists/bloodsucker/powers/bs_trespass.dm +++ b/code/modules/antagonists/bloodsucker/powers/bs_trespass.dm @@ -17,8 +17,9 @@ var/turf/target_turf // We need to decide where we're going based on where we clicked. It's not actually the tile we clicked. /datum/action/bloodsucker/targeted/trespass/CheckCanUse(display_error) - if(!..(display_error))// DEFAULT CHECKS - return FALSE + . = ..() + if(!.) + return if(owner.notransform || !get_turf(owner)) return FALSE diff --git a/code/modules/antagonists/bloodsucker/powers/bs_veil.dm b/code/modules/antagonists/bloodsucker/powers/bs_veil.dm index 1301ccd727..1985f6be13 100644 --- a/code/modules/antagonists/bloodsucker/powers/bs_veil.dm +++ b/code/modules/antagonists/bloodsucker/powers/bs_veil.dm @@ -31,8 +31,9 @@ /datum/action/bloodsucker/veil/CheckCanUse(display_error) - if(!..(display_error))// DEFAULT CHECKS - return FALSE + . = ..() + if(!.) + return return TRUE diff --git a/code/modules/antagonists/bloodsucker/powers/v_distress.dm b/code/modules/antagonists/bloodsucker/powers/v_distress.dm deleted file mode 100644 index ebf4ee2e21..0000000000 --- a/code/modules/antagonists/bloodsucker/powers/v_distress.dm +++ /dev/null @@ -1,13 +0,0 @@ - - - -/* -/datum/action/bloodsucker/vassal/distress - name = "Distress" - desc = "Call out to your master and other vassals for aid" - button_icon_state = "power_recup" - amToggle = TRUE - bloodcost = 10 - cooldown = 100 - not_bloodsucker = TRUE -*/ diff --git a/code/modules/antagonists/bloodsucker/powers/v_recuperate.dm b/code/modules/antagonists/bloodsucker/powers/v_recuperate.dm index f972e1f0aa..f2496e63cc 100644 --- a/code/modules/antagonists/bloodsucker/powers/v_recuperate.dm +++ b/code/modules/antagonists/bloodsucker/powers/v_recuperate.dm @@ -15,8 +15,9 @@ // Deal STAMINA damage over time, trickle down blood, and heal wounds. /datum/action/bloodsucker/vassal/recuperate/CheckCanUse(display_error) - if(!..(display_error))// DEFAULT CHECKS - return FALSE + . = ..() + if(!.) + return if (owner.stat >= DEAD) return FALSE var/mob/living/carbon/C = owner diff --git a/tgstation.dme b/tgstation.dme index b61bc9dacc..f21f7345a2 100755 --- a/tgstation.dme +++ b/tgstation.dme @@ -1243,7 +1243,6 @@ #include "code\modules\antagonists\bloodsucker\powers\bs_mesmerize.dm" #include "code\modules\antagonists\bloodsucker\powers\bs_trespass.dm" #include "code\modules\antagonists\bloodsucker\powers\bs_veil.dm" -#include "code\modules\antagonists\bloodsucker\powers\v_distress.dm" #include "code\modules\antagonists\bloodsucker\powers\v_recuperate.dm" #include "code\modules\antagonists\brainwashing\brainwashing.dm" #include "code\modules\antagonists\brother\brother.dm"