Merge branch 'master' into Projectile_Rework

This commit is contained in:
Lin
2022-04-09 04:19:56 +00:00
committed by GitHub
410 changed files with 7476 additions and 7443 deletions

View File

@@ -8,7 +8,7 @@
var/obj/item/radio/radio = null //Let's give it a radio.
var/mob/living/brain/brainmob = null //The current occupant.
var/mob/living/silicon/robot = null //Appears unused.
var/obj/mecha = null //This does not appear to be used outside of reference in mecha.dm.
var/obj/vehicle/sealed/mecha = null //This does not appear to be used outside of reference in mecha.dm.
var/obj/item/organ/brain/brain = null //The actual brain
var/datum/ai_laws/laws = new()
var/force_replace_ai_name = FALSE

View File

@@ -41,7 +41,7 @@
return ..()
/mob/living/brain/update_mobility()
return ((mobility_flags = (container?.in_contents_of(/obj/mecha)? MOBILITY_FLAGS_DEFAULT : NONE)))
return ((mobility_flags = (container?.in_contents_of(/obj/vehicle/sealed/mecha)? MOBILITY_FLAGS_DEFAULT : NONE)))
/mob/living/brain/ex_act(severity, target, origin) //you cant blow up brainmobs because it makes transfer_to() freak out when borgs blow up.
return
@@ -71,13 +71,6 @@
if(stored_dna)
stored_dna.real_name = real_name
/mob/living/brain/ClickOn(atom/A, params)
..()
if(container)
var/obj/mecha/M = container.mecha
if(istype(M))
return M.click_action(A,src,params)
/mob/living/brain/forceMove(atom/destination)
if(container)
return container.forceMove(destination)
@@ -98,7 +91,7 @@
if(!container)
return
if (container.mecha)
var/obj/mecha/M = container.mecha
var/obj/vehicle/sealed/mecha/M = container.mecha
if(M.mouse_pointer)
client.mouse_pointer_icon = M.mouse_pointer
if (client && ranged_ability && ranged_ability.ranged_mousepointer)

View File

@@ -209,7 +209,7 @@
if(!parts.len)
return
var/obj/item/bodypart/picked = pick(parts)
if(picked.receive_damage(brute, burn, stamina,check_armor ? run_armor_check(picked, (brute ? "melee" : burn ? "fire" : stamina ? "bullet" : null)) : FALSE, wound_bonus = wound_bonus, bare_wound_bonus = bare_wound_bonus, sharpness = sharpness))
if(picked.receive_damage(brute, burn, stamina,check_armor ? run_armor_check(picked, (brute ? MELEE : burn ? FIRE : stamina ? BULLET : null)) : FALSE, wound_bonus = wound_bonus, bare_wound_bonus = bare_wound_bonus, sharpness = sharpness))
update_damage_overlays()
//Heal MANY bodyparts, in random order

View File

@@ -43,10 +43,6 @@ GLOBAL_LIST_EMPTY(dead_players_during_shift)
if(client && !suiciding && !(client in GLOB.dead_players_during_shift))
GLOB.dead_players_during_shift += client
GLOB.deaths_during_shift++
if(ismecha(loc))
var/obj/mecha/M = loc
if(M.occupant == src)
M.go_out()
if(!QDELETED(dna)) //The gibbed param is bit redundant here since dna won't exist at this point if they got deleted.
dna.species.spec_death(gibbed, src)

View File

@@ -163,7 +163,7 @@
if(can_inject(M, 1, affecting))//Thick suits can stop monkey bites.
if(..()) //successful monkey bite, this handles disease contraction.
var/damage = rand(1, 3)
apply_damage(damage, BRUTE, affecting, run_armor_check(affecting, "melee"))
apply_damage(damage, BRUTE, affecting, run_armor_check(affecting, MELEE))
return 1
/mob/living/carbon/human/attack_alien(mob/living/carbon/alien/humanoid/M)
@@ -183,7 +183,7 @@
var/obj/item/bodypart/affecting = get_bodypart(ran_zone(M.zone_selected))
if(!affecting)
affecting = get_bodypart(BODY_ZONE_CHEST)
var/armor_block = run_armor_check(affecting, "melee", null, null,10)
var/armor_block = run_armor_check(affecting, MELEE, null, null,10)
playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1)
visible_message("<span class='danger'>[M] has slashed at [src]!</span>", \
@@ -219,7 +219,7 @@
var/obj/item/bodypart/affecting = get_bodypart(ran_zone(L.zone_selected))
if(!affecting)
affecting = get_bodypart(BODY_ZONE_CHEST)
var/armor_block = run_armor_check(affecting, "melee")
var/armor_block = run_armor_check(affecting, MELEE)
apply_damage(damage, BRUTE, affecting, armor_block)
@@ -233,7 +233,7 @@
var/obj/item/bodypart/affecting = get_bodypart(ran_zone(dam_zone))
if(!affecting)
affecting = get_bodypart(BODY_ZONE_CHEST)
var/armor = run_armor_check(affecting, "melee", armour_penetration = M.armour_penetration)
var/armor = run_armor_check(affecting, MELEE, armour_penetration = M.armour_penetration)
apply_damage(damage, M.melee_damage_type, affecting, armor, wound_bonus = M.wound_bonus, bare_wound_bonus = M.bare_wound_bonus, sharpness = M.sharpness)
/mob/living/carbon/human/attack_slime(mob/living/simple_animal/slime/M)
@@ -253,51 +253,9 @@
var/obj/item/bodypart/affecting = get_bodypart(ran_zone(dam_zone))
if(!affecting)
affecting = get_bodypart(BODY_ZONE_CHEST)
var/armor_block = run_armor_check(affecting, "melee")
var/armor_block = run_armor_check(affecting, MELEE)
apply_damage(damage, BRUTE, affecting, armor_block, wound_bonus=wound_mod)
/mob/living/carbon/human/mech_melee_attack(obj/mecha/M)
if(M.occupant.a_intent == INTENT_HARM)
if(HAS_TRAIT(M.occupant, TRAIT_PACIFISM))
to_chat(M.occupant, "<span class='warning'>You don't want to harm other living beings!</span>")
return
M.do_attack_animation(src)
if(M.damtype == "brute")
step_away(src,M,15)
var/obj/item/bodypart/temp = get_bodypart(pick(BODY_ZONE_CHEST, BODY_ZONE_CHEST, BODY_ZONE_CHEST, BODY_ZONE_HEAD))
if(temp)
var/update = 0
var/dmg = rand(M.force/2, M.force)
var/atom/throw_target = get_edge_target_turf(src, M.dir)
switch(M.damtype)
if("brute")
if(M.force > 35) // durand and other heavy mechas
DefaultCombatKnockdown(50)
src.throw_at(throw_target, rand(1,5), 7)
else if(M.force >= 20 && CHECK_MOBILITY(src, MOBILITY_STAND)) // lightweight mechas like gygax
DefaultCombatKnockdown(30)
src.throw_at(throw_target, rand(1,3), 7)
update |= temp.receive_damage(dmg, 0)
playsound(src, 'sound/weapons/punch4.ogg', 50, 1)
if("fire")
update |= temp.receive_damage(0, dmg)
playsound(src, 'sound/items/welder.ogg', 50, 1)
if("tox")
M.mech_toxin_damage(src)
else
return
if(update)
update_damage_overlays()
updatehealth()
visible_message("<span class='danger'>[M.name] has hit [src]!</span>", \
"<span class='userdanger'>[M.name] has hit you!</span>", null, COMBAT_MESSAGE_RANGE, target = M,
target_message = "<span class='danger'>You have hit [src]!</span>")
log_combat(M.occupant, src, "attacked", M, "(INTENT: [uppertext(M.occupant.a_intent)]) (DAMTYPE: [uppertext(M.damtype)])")
else
..()
/mob/living/carbon/human/ex_act(severity, target, origin)
if(TRAIT_BOMBIMMUNE in dna.species.species_traits)
@@ -307,7 +265,7 @@
return
var/brute_loss = 0
var/burn_loss = 0
var/bomb_armor = getarmor(null, "bomb")
var/bomb_armor = getarmor(null, BOMB)
//200 max knockdown for EXPLODE_HEAVY
//160 max knockdown for EXPLODE_LIGHT
@@ -328,7 +286,7 @@
brute_loss = 500
var/atom/throw_target = get_edge_target_turf(src, get_dir(src, get_step_away(src, src)))
throw_at(throw_target, 200, 4)
damage_clothes(400 - bomb_armor, BRUTE, "bomb")
damage_clothes(400 - bomb_armor, BRUTE, BOMB)
if (EXPLODE_HEAVY)
brute_loss = 60
@@ -336,7 +294,7 @@
if(bomb_armor)
brute_loss = 30*(2 - round(bomb_armor*0.01, 0.05))
burn_loss = brute_loss //damage gets reduced from 120 to up to 60 combined brute+burn
damage_clothes(200 - bomb_armor, BRUTE, "bomb")
damage_clothes(200 - bomb_armor, BRUTE, BOMB)
if (!istype(ears, /obj/item/clothing/ears/earmuffs))
adjustEarDamage(30, 120)
Unconscious(20) //short amount of time for follow up attacks against elusive enemies like wizards
@@ -347,7 +305,7 @@
brute_loss = 30
if(bomb_armor)
brute_loss = 15*(2 - round(bomb_armor*0.01, 0.05))
damage_clothes(max(50 - bomb_armor, 0), BRUTE, "bomb")
damage_clothes(max(50 - bomb_armor, 0), BRUTE, BOMB)
if (!istype(ears, /obj/item/clothing/ears/earmuffs))
adjustEarDamage(15,60)
Knockdown((160 - (bomb_armor * 1.6)) / 4) //100 bomb armor will prevent knockdown altogether
@@ -360,7 +318,7 @@
var/max_limb_loss = round(4/severity) //so you don't lose four limbs at severity 3.
for(var/X in bodyparts)
var/obj/item/bodypart/BP = X
if(prob(50/severity) && !prob(getarmor(BP, "bomb")) && BP.body_zone != BODY_ZONE_HEAD && BP.body_zone != BODY_ZONE_CHEST)
if(prob(50/severity) && !prob(getarmor(BP, BOMB)) && BP.body_zone != BODY_ZONE_HEAD && BP.body_zone != BODY_ZONE_CHEST)
BP.brute_dam = BP.max_damage
BP.dismember()
max_limb_loss--
@@ -374,7 +332,7 @@
show_message("<span class='userdanger'>The blob attacks you!</span>")
var/dam_zone = pick(BODY_ZONE_CHEST, BODY_ZONE_PRECISE_L_HAND, BODY_ZONE_PRECISE_R_HAND, BODY_ZONE_L_LEG, BODY_ZONE_R_LEG)
var/obj/item/bodypart/affecting = get_bodypart(ran_zone(dam_zone))
apply_damage(5, BRUTE, affecting, run_armor_check(affecting, "melee"))
apply_damage(5, BRUTE, affecting, run_armor_check(affecting, MELEE))
///Calculates the siemens coeff based on clothing and species, can also restart hearts.

View File

@@ -1696,7 +1696,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
return FALSE
var/armor_block = target.run_armor_check(affecting, "melee")
var/armor_block = target.run_armor_check(affecting, MELEE)
playsound(target.loc, user.dna.species.attack_sound_override || attack_sound, 25, 1, -1)
target.visible_message("<span class='danger'>[user] [atk_verb]ed [target]!</span>", \
"<span class='userdanger'>[user] [atk_verb]ed you!</span>", null, COMBAT_MESSAGE_RANGE, null, \
@@ -1905,7 +1905,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
hit_area = affecting.name
var/def_zone = affecting.body_zone
var/armor_block = H.run_armor_check(affecting, "melee", "<span class='notice'>Your armor has protected your [hit_area].</span>", "<span class='notice'>Your armor has softened a hit to your [hit_area].</span>",I.armour_penetration)
var/armor_block = H.run_armor_check(affecting, MELEE, "<span class='notice'>Your armor has protected your [hit_area].</span>", "<span class='notice'>Your armor has softened a hit to your [hit_area].</span>",I.armour_penetration)
armor_block = min(90,armor_block) //cap damage reduction at 90%
var/Iforce = I.force //to avoid runtimes on the forcesay checks at the bottom. Some items might delete themselves if you drop them. (stunning yourself, ninja swords)
var/Iwound_bonus = I.wound_bonus
@@ -2404,7 +2404,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
for(var/X in burning_items)
var/obj/item/I = X
if(!(I.resistance_flags & FIRE_PROOF))
I.take_damage(H.fire_stacks, BURN, "fire", 0)
I.take_damage(H.fire_stacks, BURN, FIRE, 0)
var/thermal_protection = H.easy_thermal_protection()

View File

@@ -347,7 +347,7 @@
/datum/species/golem/sand/bullet_act(obj/item/projectile/P, mob/living/carbon/human/H)
if(!(P.original == H && P.firer == H))
if(P.flag == "bullet" || P.flag == "bomb")
if(P.flag == BULLET || P.flag == BOMB)
playsound(H, 'sound/effects/shovel_dig.ogg', 70, 1)
H.visible_message("<span class='danger'>The [P.name] sinks harmlessly in [H]'s sandy body!</span>", \
"<span class='userdanger'>The [P.name] sinks harmlessly in [H]'s sandy body!</span>")
@@ -379,7 +379,7 @@
/datum/species/golem/glass/bullet_act(obj/item/projectile/P, mob/living/carbon/human/H)
if(!(P.original == H && P.firer == H)) //self-shots don't reflect
if(P.flag == "laser" || P.flag == "energy")
if(P.flag == LASER || P.flag == ENERGY)
H.visible_message("<span class='danger'>The [P.name] gets reflected by [H]'s glass skin!</span>", \
"<span class='userdanger'>The [P.name] gets reflected by [H]'s glass skin!</span>")
if(P.starting)
@@ -741,7 +741,7 @@
name = "pile of bandages"
desc = "It emits a strange aura, as if there was still life within it..."
max_integrity = 50
armor = list("melee" = 90, "bullet" = 90, "laser" = 25, "energy" = 80, "bomb" = 50, "bio" = 100, "fire" = -50, "acid" = -50)
armor = list(MELEE = 90, BULLET = 90, LASER = 25, ENERGY = 80, BOMB = 50, BIO = 100, FIRE = -50, ACID = -50)
icon = 'icons/obj/items_and_weapons.dmi'
icon_state = "pile_bandages"
resistance_flags = FLAMMABLE
@@ -829,7 +829,7 @@
/datum/species/golem/bronze/bullet_act(obj/item/projectile/P, mob/living/carbon/human/H)
if(!(world.time > last_gong_time + gong_cooldown))
return ..()
if(P.flag == "bullet" || P.flag == "bomb")
if(P.flag == BULLET || P.flag == BOMB)
gong(H)
return ..()

View File

@@ -211,7 +211,7 @@
visible_message("<span class='danger'>[S] is disintegrated by [src]!</span>")
else if(AM.light_range && AM.light_power && !(istype(AM, /obj/machinery/power/apc) || istype(AM, /obj/machinery/airalarm)))
var/obj/target_object = AM
target_object.take_damage(force * 5, BRUTE, "melee", 0)
target_object.take_damage(force * 5, BRUTE, MELEE, 0)
/obj/item/light_eater/proc/disintegrate(obj/item/O)

View File

@@ -162,7 +162,7 @@
for(var/X in burning_items)
var/obj/item/I = X
if(!(I.resistance_flags & FIRE_PROOF))
I.take_damage(fire_stacks, BURN, "fire", 0)
I.take_damage(fire_stacks, BURN, FIRE, 0)
adjust_bodytemperature(BODYTEMP_HEATING_MAX)
SEND_SIGNAL(src, COMSIG_ADD_MOOD_EVENT, "on_fire", /datum/mood_event/on_fire)

View File

@@ -195,14 +195,14 @@
if (EXPLODE_HEAVY)
take_overall_damage(60, 60)
damage_clothes(200, BRUTE, "bomb")
damage_clothes(200, BRUTE, BOMB)
adjustEarDamage(30, 120)
if(prob(70))
Unconscious(200)
if(EXPLODE_LIGHT)
take_overall_damage(30, 0)
damage_clothes(50, BRUTE, "bomb")
damage_clothes(50, BRUTE, BOMB)
adjustEarDamage(15,60)
if (prob(50))
Unconscious(160)

View File

@@ -6,13 +6,13 @@
SHOULD_NOT_SLEEP(TRUE)
if(mob_transforming)
return
. = SEND_SIGNAL(src, COMSIG_LIVING_LIFE, seconds, times_fired)
if(!(. & COMPONENT_INTERRUPT_LIFE_PHYSICAL))
PhysicalLife(seconds, times_fired)
if(!(. & COMPONENT_INTERRUPT_LIFE_BIOLOGICAL))
BiologicalLife(seconds, times_fired)
if(!(. & COMPONET_INTERRUPT_STATUS_EFFECTS))
handle_status_effects() //all special effects, stun, knockdown, jitteryness, hallucination, sleeping, etc
// CODE BELOW SHOULD ONLY BE THINGS THAT SHOULD HAPPEN NO MATTER WHAT AND CAN NOT BE SUSPENDED!
// Otherwise, it goes into one of the two split Life procs!
@@ -69,9 +69,8 @@
handle_block_parry(seconds)
// These two MIGHT need to be moved to base Life() if we get any in the future that's a "physical" effect that needs to fire even while in stasis.
handle_traits() // eye, ear, brain damages
handle_status_effects() //all special effects, stun, knockdown, jitteryness, hallucination, sleeping, etc
return TRUE
/**

View File

@@ -433,8 +433,8 @@
to_chat(src, "<span class='notice'>You have given up life and succumbed to death.</span>")
death()
/mob/living/incapacitated(ignore_restraints = FALSE, ignore_grab = FALSE, check_immobilized = FALSE)
if(stat || IsUnconscious() || IsStun() || IsParalyzed() || (combat_flags & COMBAT_FLAG_HARD_STAMCRIT) || (check_immobilized && IsImmobilized()) || (!ignore_restraints && restrained(ignore_grab)))
/mob/living/incapacitated(ignore_restraints = FALSE, ignore_grab = FALSE, check_immobilized = FALSE, ignore_stasis = FALSE)
if(stat || IsUnconscious() || IsStun() || IsParalyzed() || (combat_flags & COMBAT_FLAG_HARD_STAMCRIT) || (check_immobilized && IsImmobilized()) || (!ignore_restraints && restrained(ignore_grab)) || (!ignore_stasis && IS_IN_STASIS(src)))
return TRUE
/mob/living/canUseStorage()
@@ -1124,7 +1124,7 @@
amount -= RAD_BACKGROUND_RADIATION // This will always be at least 1 because of how skin protection is calculated
var/blocked = getarmor(null, "rad")
var/blocked = getarmor(null, RAD)
if(amount > RAD_BURN_THRESHOLD)
apply_damage((amount-RAD_BURN_THRESHOLD)/RAD_BURN_THRESHOLD, BURN, null, blocked)
@@ -1153,7 +1153,7 @@
visible_message("<span class='warning'>[src] catches fire!</span>", \
"<span class='userdanger'>You're set on fire!</span>")
new/obj/effect/dummy/lighting_obj/moblight/fire(src)
throw_alert("fire", /atom/movable/screen/alert/fire)
throw_alert(FIRE, /atom/movable/screen/alert/fire)
update_fire()
SEND_SIGNAL(src, COMSIG_LIVING_IGNITED,src)
return TRUE

View File

@@ -1,5 +1,5 @@
/mob/living/proc/run_armor_check(def_zone = null, attack_flag = "melee", absorb_text = "Your armor absorbs the blow!", soften_text = "Your armor softens the blow!", armour_penetration, penetrated_text = "Your armor was penetrated!", silent=FALSE)
/mob/living/proc/run_armor_check(def_zone = null, attack_flag = MELEE, absorb_text = "Your armor absorbs the blow!", soften_text = "Your armor softens the blow!", armour_penetration, penetrated_text = "Your armor was penetrated!", silent=FALSE)
var/armor = getarmor(def_zone, attack_flag)
if(silent)
@@ -141,7 +141,7 @@
"<span class='userdanger'>You're hit by [I]!</span>")
if(!I.throwforce)
return
var/armor = run_armor_check(impacting_zone, "melee", "Your armor has protected your [parse_zone(impacting_zone)].", "Your armor has softened hit to your [parse_zone(impacting_zone)].",I.armour_penetration)
var/armor = run_armor_check(impacting_zone, MELEE, "Your armor has protected your [parse_zone(impacting_zone)].", "Your armor has softened hit to your [parse_zone(impacting_zone)].",I.armour_penetration)
apply_damage(I.throwforce, dtype, impacting_zone, armor, sharpness=I.get_sharpness(), wound_bonus=(nosell_hit * CANT_WOUND))
else
return 1
@@ -149,39 +149,6 @@
playsound(loc, 'sound/weapons/genhit.ogg', 50, 1, -1)
..()
/mob/living/mech_melee_attack(obj/mecha/M)
if(M.occupant.a_intent == INTENT_HARM)
if(HAS_TRAIT(M.occupant, TRAIT_PACIFISM))
to_chat(M.occupant, "<span class='warning'>You don't want to harm other living beings!</span>")
return
M.do_attack_animation(src)
if(M.damtype == "brute")
step_away(src,M,15)
switch(M.damtype)
if(BRUTE)
Unconscious(20)
take_overall_damage(rand(M.force/2, M.force))
playsound(src, 'sound/weapons/punch4.ogg', 50, 1)
if(BURN)
take_overall_damage(0, rand(M.force/2, M.force))
playsound(src, 'sound/items/welder.ogg', 50, 1)
if(TOX)
M.mech_toxin_damage(src)
else
return
updatehealth()
visible_message("<span class='danger'>[M.name] has hit [src]!</span>", \
"<span class='userdanger'>[M.name] has hit you!</span>", null, COMBAT_MESSAGE_RANGE, null,
M.occupant, "<span class='danger'>You hit [src] with your [M.name]!</span>")
log_combat(M.occupant, src, "attacked", M, "(INTENT: [uppertext(M.occupant.a_intent)]) (DAMTYPE: [uppertext(M.damtype)])")
else
step_away(src,M)
log_combat(M.occupant, src, "pushed", M)
visible_message("<span class='warning'>[M] pushes [src] out of the way.</span>", \
"<span class='warning'>[M] pushes you out of the way.</span>", null, COMBAT_MESSAGE_RANGE, null,
M.occupant, "<span class='warning'>You push [src] out of the way with your [M.name].</span>")
/mob/living/fire_act()
adjust_fire_stacks(3)
IgniteMob()

View File

@@ -39,7 +39,7 @@
var/alarms = list("Motion"=list(), "Fire"=list(), "Atmosphere"=list(), "Power"=list(), "Camera"=list(), "Burglar"=list())
var/viewalerts = 0
var/icon/holo_icon//Female is assigned when AI is created.
var/obj/mecha/controlled_mech //For controlled_mech a mech, to determine whether to relaymove or use the AI eye.
var/obj/vehicle/sealed/mecha/controlled_mech //For controlled_mech a mech, to determine whether to relaymove or use the AI eye.
var/radio_enabled = TRUE //Determins if a carded AI can speak with its built in radio or not.
radiomod = ";" //AIs will, by default, state their laws on the internal radio.
var/obj/item/pda/ai/aiPDA
@@ -408,7 +408,7 @@
return
if (href_list["ai_take_control"]) //Mech domination
var/obj/mecha/M = locate(href_list["ai_take_control"])
var/obj/vehicle/sealed/mecha/M = locate(href_list["ai_take_control"])
if(controlled_mech)
to_chat(src, "<span class='warning'>You are already loaded into an onboard computer!</span>")
return

View File

@@ -53,11 +53,11 @@
if(NONE)
return FALSE
if(POWER_REQ_ALL)
return !T || !A || ((!A.powered(EQUIP) || isspaceturf(T)) && !is_type_in_list(loc, list(/obj/item, /obj/mecha)))
return !T || !A || ((!A.powered(EQUIP) || isspaceturf(T)) && !is_type_in_list(loc, list(/obj/item, /obj/vehicle/sealed/mecha)))
if(POWER_REQ_CLOCKCULT)
for(var/obj/effect/clockwork/sigil/transmission/ST in range(src, SIGIL_ACCESS_RANGE))
return FALSE
return !T || !A || (!istype(T, /turf/open/floor/clockwork) && (!A.powered(EQUIP) || isspaceturf(T)) && !is_type_in_list(loc, list(/obj/item, /obj/mecha)))
return !T || !A || (!istype(T, /turf/open/floor/clockwork) && (!A.powered(EQUIP) || isspaceturf(T)) && !is_type_in_list(loc, list(/obj/item, /obj/vehicle/sealed/mecha)))
/mob/living/silicon/ai/updatehealth()
if(status_flags & GODMODE)

View File

@@ -110,7 +110,7 @@
return
return ..()
/mob/living/simple_animal/proc/attack_threshold_check(damage, damagetype = BRUTE, armorcheck = "melee")
/mob/living/simple_animal/proc/attack_threshold_check(damage, damagetype = BRUTE, armorcheck = MELEE)
var/temp_damage = damage
if(!damage_coeff[damagetype])
temp_damage = 0
@@ -135,7 +135,7 @@
if(origin && istype(origin, /datum/spacevine_mutation) && isvineimmune(src))
return
..()
var/bomb_armor = getarmor(null, "bomb")
var/bomb_armor = getarmor(null, BOMB)
switch (severity)
if (EXPLODE_DEVASTATE)
if(prob(bomb_armor))

View File

@@ -631,12 +631,12 @@
playsound(loc, 'sound/effects/splat.ogg', 50, TRUE)
var/damage = rand(5,15)
H.apply_damage(2*damage, BRUTE, BODY_ZONE_HEAD, run_armor_check(BODY_ZONE_HEAD, "melee"))
H.apply_damage(2*damage, BRUTE, BODY_ZONE_CHEST, run_armor_check(BODY_ZONE_CHEST, "melee"))
H.apply_damage(0.5*damage, BRUTE, BODY_ZONE_L_LEG, run_armor_check(BODY_ZONE_L_LEG, "melee"))
H.apply_damage(0.5*damage, BRUTE, BODY_ZONE_R_LEG, run_armor_check(BODY_ZONE_R_LEG, "melee"))
H.apply_damage(0.5*damage, BRUTE, BODY_ZONE_L_ARM, run_armor_check(BODY_ZONE_L_ARM, "melee"))
H.apply_damage(0.5*damage, BRUTE, BODY_ZONE_R_ARM, run_armor_check(BODY_ZONE_R_ARM, "melee"))
H.apply_damage(2*damage, BRUTE, BODY_ZONE_HEAD, run_armor_check(BODY_ZONE_HEAD, MELEE))
H.apply_damage(2*damage, BRUTE, BODY_ZONE_CHEST, run_armor_check(BODY_ZONE_CHEST, MELEE))
H.apply_damage(0.5*damage, BRUTE, BODY_ZONE_L_LEG, run_armor_check(BODY_ZONE_L_LEG, MELEE))
H.apply_damage(0.5*damage, BRUTE, BODY_ZONE_R_LEG, run_armor_check(BODY_ZONE_R_LEG, MELEE))
H.apply_damage(0.5*damage, BRUTE, BODY_ZONE_L_ARM, run_armor_check(BODY_ZONE_L_ARM, MELEE))
H.apply_damage(0.5*damage, BRUTE, BODY_ZONE_R_ARM, run_armor_check(BODY_ZONE_R_ARM, MELEE))
var/turf/T = get_turf(src)
T.add_mob_blood(H)

View File

@@ -37,4 +37,4 @@
icon_state = "declone"
damage = 4
damage_type = BURN
flag = "energy"
flag = ENERGY

View File

@@ -146,7 +146,7 @@
if(!search_objects)
. = hearers(vision_range, targets_from) - src //Remove self, so we don't suicide
var/static/hostile_machines = typecacheof(list(/obj/machinery/porta_turret, /obj/mecha, /obj/structure/destructible/clockwork/ocular_warden,/obj/item/electronic_assembly))
var/static/hostile_machines = typecacheof(list(/obj/machinery/porta_turret, /obj/vehicle/sealed/mecha, /obj/structure/destructible/clockwork/ocular_warden,/obj/item/electronic_assembly))
for(var/HM in typecache_filter_list(range(vision_range, targets_from), hostile_machines))
if(can_see(targets_from, HM, vision_range))
@@ -236,9 +236,9 @@
return TRUE
if(ismecha(the_target))
var/obj/mecha/M = the_target
if(M.occupant)//Just so we don't attack empty mechs
if(CanAttack(M.occupant))
var/obj/vehicle/sealed/mecha/M = the_target
for(var/occupant in M.occupants)
if(CanAttack(occupant))
return TRUE
if(istype(the_target, /obj/machinery/porta_turret))
@@ -604,7 +604,7 @@
toggle_ai(AI_ON)
/mob/living/simple_animal/hostile/proc/ListTargetsLazy(var/_Z)//Step 1, find out what we can see
var/static/hostile_machines = typecacheof(list(/obj/machinery/porta_turret, /obj/mecha, /obj/structure/destructible/clockwork/ocular_warden))
var/static/hostile_machines = typecacheof(list(/obj/machinery/porta_turret, /obj/vehicle/sealed/mecha, /obj/structure/destructible/clockwork/ocular_warden))
. = list()
for (var/I in SSmobs.clients_by_zlevel[_Z])
var/mob/M = I

View File

@@ -42,7 +42,7 @@
damage = 10
damage_type = BURN
light_range = 2
flag = "energy"
flag = ENERGY
light_color = LIGHT_COLOR_YELLOW
hitsound = 'sound/weapons/sear.ogg'
hitsound_wall = 'sound/weapons/effects/searwall.ogg'

View File

@@ -25,14 +25,14 @@
search_objects = 0
mob_biotypes = MOB_ORGANIC|MOB_HUMANOID
var/spawn_mecha_type = /obj/mecha/combat/marauder/mauler/loaded
var/obj/mecha/mecha //Ref to pilot's mecha instance
var/spawn_mecha_type = /obj/vehicle/sealed/mecha/combat/marauder/mauler/loaded
var/obj/vehicle/sealed/mecha/mecha //Ref to pilot's mecha instance
var/required_mecha_charge = 7500 //If the pilot doesn't have a mecha, what charge does a potential Grand Theft Mecha need? (Defaults to half a battery)
var/mecha_charge_evacuate = 50 //Amount of charge at which the pilot tries to abandon the mecha
//Vars that control when the pilot uses their mecha's abilities (if the mecha has that ability)
var/threat_use_mecha_smoke = 5 //5 mobs is enough to engage crowd control
var/defence_mode_chance = 35 //Chance to engage Defence mode when damaged
var/defense_mode_chance = 35 //Chance to engage Defense mode when damaged
var/smoke_chance = 20 //Chance to deploy smoke for crowd control
var/retreat_chance = 40 //Chance to run away
@@ -42,18 +42,18 @@
/mob/living/simple_animal/hostile/syndicate/mecha_pilot/no_mech/Initialize()
. = ..()
wanted_objects = typecacheof(/obj/mecha/combat, TRUE)
wanted_objects = typecacheof(/obj/vehicle/sealed/mecha/combat, TRUE)
/mob/living/simple_animal/hostile/syndicate/mecha_pilot/nanotrasen //nanotrasen are syndies! no it's just a weird path.
name = "Nanotrasen Mecha Pilot"
name = "\improper Nanotrasen Mecha Pilot"
desc = "Death to the Syndicate. This variant comes in MECHA DEATH flavour."
icon_living = "nanotrasen"
icon_state = "nanotrasen"
faction = list("nanotrasen")
spawn_mecha_type = /obj/mecha/combat/marauder/loaded
spawn_mecha_type = /obj/vehicle/sealed/mecha/combat/marauder/loaded
/mob/living/simple_animal/hostile/syndicate/mecha_pilot/no_mech/nanotrasen
name = "Nanotrasen Mecha Pilot"
name = "\improper Nanotrasen Mecha Pilot"
desc = "Death to the Syndicate. This variant comes in MECHA DEATH flavour."
icon_living = "nanotrasen"
icon_state = "nanotrasen"
@@ -63,12 +63,12 @@
/mob/living/simple_animal/hostile/syndicate/mecha_pilot/Initialize()
. = ..()
if(spawn_mecha_type)
var/obj/mecha/M = new spawn_mecha_type (get_turf(src))
var/obj/vehicle/sealed/mecha/M = new spawn_mecha_type (get_turf(src))
if(istype(M))
enter_mecha(M)
INVOKE_ASYNC(src, .proc/enter_mecha, M)
/mob/living/simple_animal/hostile/syndicate/mecha_pilot/proc/enter_mecha(obj/mecha/M)
/mob/living/simple_animal/hostile/syndicate/mecha_pilot/proc/enter_mecha(obj/vehicle/sealed/mecha/M)
if(!M)
return 0
target = null //Target was our mecha, so null it out
@@ -78,7 +78,7 @@
var/do_ranged = 0
for(var/equip in mecha.equipment)
var/obj/item/mecha_parts/mecha_equipment/ME = equip
if(ME.range & RANGED)
if(ME.range & MECHA_RANGED)
do_ranged = 1
break
if(do_ranged)
@@ -89,11 +89,11 @@
ranged = 0
wanted_objects = list()
search_objects = 0
if(mecha && mecha.lights_action) //an AI mecha is an EVIL EVIL thing, so let's not hide them in the dark
mecha.lights_action.Activate()
if(LAZYACCESSASSOC(mecha.occupant_actions, src, /datum/action/vehicle/sealed/mecha/mech_defense_mode) && !mecha.defense_mode)
var/datum/action/action = mecha.occupant_actions[src][/datum/action/vehicle/sealed/mecha/mech_defense_mode]
action.Trigger(TRUE)
/mob/living/simple_animal/hostile/syndicate/mecha_pilot/proc/exit_mecha(obj/mecha/M)
/mob/living/simple_animal/hostile/syndicate/mecha_pilot/proc/exit_mecha(obj/vehicle/sealed/mecha/M)
if(!M)
return 0
@@ -102,9 +102,9 @@
targets_from = src
//Find a new mecha
wanted_objects = typecacheof(/obj/mecha/combat, TRUE)
wanted_objects = typecacheof(/obj/vehicle/sealed/mecha/combat, TRUE)
var/search_aggressiveness = 2
for(var/obj/mecha/combat/C in range(vision_range,src))
for(var/obj/vehicle/sealed/mecha/combat/C in range(vision_range,src))
if(is_valid_mecha(C))
target = C
search_aggressiveness = 3 //We can see a mech? RUN FOR IT, IGNORE MOBS!
@@ -116,23 +116,23 @@
walk(M,0)//end any lingering movement loops, to prevent the haunted mecha bug
//Checks if a mecha is valid for theft
/mob/living/simple_animal/hostile/syndicate/mecha_pilot/proc/is_valid_mecha(obj/mecha/M)
/mob/living/simple_animal/hostile/syndicate/mecha_pilot/proc/is_valid_mecha(obj/vehicle/sealed/mecha/M)
if(!M)
return 0
if(M.occupant)
return 0
return FALSE
if(LAZYLEN(M.occupants))
return FALSE
if(!M.has_charge(required_mecha_charge))
return 0
return FALSE
if(M.obj_integrity < M.max_integrity*0.5)
return 0
return 1
return FALSE
return TRUE
/mob/living/simple_animal/hostile/syndicate/mecha_pilot/proc/mecha_face_target(atom/A)
if(mecha)
var/dirto = get_dir(mecha,A)
if(mecha.dir != dirto) //checking, because otherwise the mecha makes too many turn noises
mecha.mechturn(dirto)
mecha.vehicle_move(dirto, TRUE)
@@ -144,7 +144,7 @@
ME.rearm()
/mob/living/simple_animal/hostile/syndicate/mecha_pilot/proc/get_mecha_equip_by_flag(flag = RANGED)
/mob/living/simple_animal/hostile/syndicate/mecha_pilot/proc/get_mecha_equip_by_flag(flag = MECHA_RANGED)
. = list()
if(mecha)
for(var/equip in mecha.equipment)
@@ -160,11 +160,10 @@
if(mecha)
mecha_reload()
mecha_face_target(A)
var/list/possible_weapons = get_mecha_equip_by_flag(RANGED)
var/list/possible_weapons = get_mecha_equip_by_flag(MECHA_RANGED)
if(possible_weapons.len)
var/obj/item/mecha_parts/mecha_equipment/ME = pick(possible_weapons) //so we don't favor mecha.equipment[1] forever
if(ME.action(A))
ME.start_cooldown()
if(ME.action(src,A))
return
else
@@ -173,20 +172,19 @@
/mob/living/simple_animal/hostile/syndicate/mecha_pilot/AttackingTarget()
if(mecha)
var/list/possible_weapons = get_mecha_equip_by_flag(MELEE)
var/list/possible_weapons = get_mecha_equip_by_flag(MECHA_MELEE)
if(possible_weapons.len)
var/obj/item/mecha_parts/mecha_equipment/ME = pick(possible_weapons)
mecha_face_target(target)
if(ME.action(target))
ME.start_cooldown()
if(ME.action(src,target))
return
if(mecha.melee_can_hit)
if(!TIMER_COOLDOWN_CHECK(mecha, COOLDOWN_MECHA_MELEE_ATTACK))
mecha_face_target(target)
target.mech_melee_attack(mecha)
target.mech_melee_attack(mecha, src)
else
if(ismecha(target))
var/obj/mecha/M = target
var/obj/vehicle/sealed/mecha/M = target
if(is_valid_mecha(M))
enter_mecha(M)
return
@@ -199,50 +197,54 @@
/mob/living/simple_animal/hostile/syndicate/mecha_pilot/handle_automated_action()
if(..())
if(!mecha)
for(var/obj/mecha/combat/C in range(src,vision_range))
if(is_valid_mecha(C))
target = C //Let's nab it!
minimum_distance = 1
ranged = 0
break
if(mecha)
var/list/L = PossibleThreats()
var/threat_count = L.len
. = ..()
if(!.)
return
if(!mecha)
for(var/obj/vehicle/sealed/mecha/combat/mecha_in_range in range(src,vision_range))
if(is_valid_mecha(mecha_in_range))
target = mecha_in_range //Let's nab it!
minimum_distance = 1
ranged = 0
break
if(mecha)
var/list/L = PossibleThreats()
var/threat_count = L.len
//Low Charge - Eject
if(!mecha.has_charge(mecha_charge_evacuate))
exit_mecha(mecha)
return
//Low Charge - Eject
if(!mecha.has_charge(mecha_charge_evacuate))
exit_mecha(mecha)
return
//Too Much Damage - Eject
if(mecha.obj_integrity < mecha.max_integrity*0.1)
exit_mecha(mecha)
return
if(mecha.obj_integrity < mecha.max_integrity*0.1)
exit_mecha(mecha)
return
//Smoke if there's too many targets - Smoke Power
if(threat_count >= threat_use_mecha_smoke && prob(smoke_chance))
if(mecha.smoke_action && mecha.smoke_action.owner && mecha.smoke)
mecha.smoke_action.Activate()
//Smoke if there's too many targets - Smoke Power
if(threat_count >= threat_use_mecha_smoke && prob(smoke_chance))
if(LAZYACCESSASSOC(mecha.occupant_actions, src, /datum/action/vehicle/sealed/mecha/mech_smoke) && !mecha.smoke_charges)
var/datum/action/action = mecha.occupant_actions[src][/datum/action/vehicle/sealed/mecha/mech_smoke]
action.Trigger()
//Heavy damage - Defence Power or Retreat
if(mecha.obj_integrity < mecha.max_integrity*0.25)
if(prob(defence_mode_chance))
if(mecha.defense_action && mecha.defense_action.owner && !mecha.defence_mode)
mecha.leg_overload_mode = 0
mecha.defense_action.Activate(TRUE)
addtimer(CALLBACK(mecha.defense_action, /datum/action/innate/mecha/mech_defence_mode.proc/Activate, FALSE), 100) //10 seconds of defence, then toggle off
//Heavy damage - Defense Power or Retreat
if(mecha.obj_integrity < mecha.max_integrity*0.25)
if(prob(defense_mode_chance))
if(LAZYACCESSASSOC(mecha.occupant_actions, src, /datum/action/vehicle/sealed/mecha/mech_defense_mode) && !mecha.defense_mode)
var/datum/action/action = mecha.occupant_actions[src][/datum/action/vehicle/sealed/mecha/mech_defense_mode]
action.Trigger(TRUE)
addtimer(CALLBACK(action, /datum/action/vehicle/sealed/mecha/mech_defense_mode.proc/Trigger, FALSE), 100) //10 seconds of defense, then toggle off
else if(prob(retreat_chance))
//Speed boost if possible
if(mecha.overload_action && mecha.overload_action.owner && !mecha.leg_overload_mode)
mecha.overload_action.Activate(TRUE)
addtimer(CALLBACK(mecha.overload_action, /datum/action/innate/mecha/mech_defence_mode.proc/Activate, FALSE), 100) //10 seconds of speeeeed, then toggle off
else if(prob(retreat_chance))
//Speed boost if possible
if(LAZYACCESSASSOC(mecha.occupant_actions, src, /datum/action/vehicle/sealed/mecha/mech_overload_mode) && !mecha.leg_overload_mode)
var/datum/action/action = mecha.occupant_actions[src][/datum/action/vehicle/sealed/mecha/mech_overload_mode]
mecha.leg_overload_mode = FALSE
action.Trigger(TRUE)
addtimer(CALLBACK(action, /datum/action/vehicle/sealed/mecha/mech_overload_mode.proc/Trigger, FALSE), 100) //10 seconds of speeeeed, then toggle off
retreat_distance = 50
spawn(100)
retreat_distance = 0
retreat_distance = 50
addtimer(VARSET_CALLBACK(src, retreat_distance, 0), 10 SECONDS)
@@ -261,17 +263,17 @@
//~simple animals~
/mob/living/simple_animal/hostile/syndicate/mecha_pilot/CanAttack(atom/the_target)
if(ismecha(the_target))
var/obj/mecha/M = the_target
var/obj/vehicle/sealed/mecha/M = the_target
if(mecha)
if(M == mecha || !CanAttack(M.occupant))
return 0
if(M == mecha) //Dont kill yourself
return FALSE
else //we're not in a mecha, so we check if we can steal it instead.
if(is_valid_mecha(M))
return 1
else if (M.occupant && CanAttack(M.occupant))
return 1
else
return 0
return TRUE
for(var/occupant in M.occupants)
if(CanAttack(occupant))
return TRUE
return FALSE
. = ..()
@@ -290,6 +292,6 @@
/mob/living/simple_animal/hostile/syndicate/mecha_pilot/Goto(target, delay, minimum_distance)
if(mecha)
walk_to(mecha, target, minimum_distance, mecha.step_in)
walk_to(mecha, target, minimum_distance, mecha.movedelay)
else
..()

View File

@@ -299,7 +299,7 @@ Difficulty: Hard
to_chat(L, "<span class='userdanger'>[src] rends you!</span>")
playsound(T, attack_sound, 100, 1, -1)
var/limb_to_hit = L.get_bodypart(pick(BODY_ZONE_HEAD, BODY_ZONE_CHEST, BODY_ZONE_R_ARM, BODY_ZONE_L_ARM, BODY_ZONE_R_LEG, BODY_ZONE_L_LEG))
L.apply_damage(10, BRUTE, limb_to_hit, L.run_armor_check(limb_to_hit, "melee", null, null, armour_penetration))
L.apply_damage(10, BRUTE, limb_to_hit, L.run_armor_check(limb_to_hit, MELEE, null, null, armour_penetration))
sleep(3)
/mob/living/simple_animal/hostile/megafauna/bubblegum/proc/bloodgrab(turf/T, handedness)

View File

@@ -195,7 +195,7 @@ Difficulty: Medium
if(L.client)
empty += pick(((RANGE_TURFS(2, L) - RANGE_TURFS(1, L)) & turfs) - empty) // picks a turf within 2 of the creature not outside or in the shield
any_attack = 1
for(var/obj/mecha/M in T.contents)
for(var/obj/vehicle/sealed/mecha/M in T.contents)
empty += pick(((RANGE_TURFS(2, M) - RANGE_TURFS(1, M)) & turfs) - empty)
any_attack = 1
if(!any_attack)
@@ -264,11 +264,11 @@ Difficulty: Medium
to_chat(L, "<span class='userdanger'>You're hit by [src]'s fire breath!</span>")
// deals damage to mechs
for(var/obj/mecha/M in T.contents)
for(var/obj/vehicle/sealed/mecha/M in T.contents)
if(M in hit_list)
continue
hit_list += M
M.take_damage(45, BRUTE, "melee", 1)
M.take_damage(45, BRUTE, MELEE, 1)
sleep(1.5)
/mob/living/simple_animal/hostile/megafauna/dragon/proc/swoop_attack(lava_arena = FALSE, atom/movable/manual_target, var/swoop_cooldown = 30)
@@ -350,8 +350,8 @@ Difficulty: Medium
var/throwtarget = get_edge_target_turf(src, throw_dir)
L.throw_at(throwtarget, 3)
visible_message("<span class='warning'>[L] is thrown clear of [src]!</span>")
for(var/obj/mecha/M in orange(1, src))
M.take_damage(75, BRUTE, "melee", 1)
for(var/obj/vehicle/sealed/mecha/M in orange(1, src))
M.take_damage(75, BRUTE, MELEE, 1)
for(var/mob/M in range(7, src))
shake_camera(M, 15, 1)
@@ -409,8 +409,8 @@ Difficulty: Medium
to_chat(L, "<span class='userdanger'>You fall directly into the pool of lava!</span>")
// deals damage to mechs
for(var/obj/mecha/M in T.contents)
M.take_damage(45, BRUTE, "melee", 1)
for(var/obj/vehicle/sealed/mecha/M in T.contents)
M.take_damage(45, BRUTE, MELEE, 1)
// changes turf to lava temporarily
if(!istype(T, /turf/closed) && !istype(T, /turf/open/lava))
@@ -538,9 +538,9 @@ Difficulty: Medium
to_chat(L, "<span class='userdanger'>You're hit by [source]'s fire breath!</span>")
// deals damage to mechs
for(var/obj/mecha/M in T.contents)
for(var/obj/vehicle/sealed/mecha/M in T.contents)
if(M in hit_list)
continue
hit_list += M
M.take_damage(45, BRUTE, "melee", 1)
M.take_damage(45, BRUTE, MELEE, 1)
sleep(1.5)

View File

@@ -643,7 +643,7 @@ Difficulty: Normal
playsound(L,'sound/weapons/sear.ogg', 50, 1, -4)
to_chat(L, "<span class='userdanger'>You're struck by a [name]!</span>")
var/limb_to_hit = L.get_bodypart(pick(BODY_ZONE_HEAD, BODY_ZONE_CHEST, BODY_ZONE_R_ARM, BODY_ZONE_L_ARM, BODY_ZONE_R_LEG, BODY_ZONE_L_LEG))
var/armor = L.run_armor_check(limb_to_hit, "melee", "Your armor absorbs [src]!", "Your armor blocks part of [src]!", 50, "Your armor was penetrated by [src]!")
var/armor = L.run_armor_check(limb_to_hit, MELEE, "Your armor absorbs [src]!", "Your armor blocks part of [src]!", 50, "Your armor was penetrated by [src]!")
L.apply_damage(damage, BURN, limb_to_hit, armor, wound_bonus=CANT_WOUND)
if(ishostile(L))
var/mob/living/simple_animal/hostile/H = L //mobs find and damage you...
@@ -656,14 +656,16 @@ Difficulty: Normal
if(monster_damage_boost && (ismegafauna(L) || istype(L, /mob/living/simple_animal/hostile/asteroid)))
L.adjustBruteLoss(damage)
log_combat(caster, L, "struck with a [name]")
for(var/obj/mecha/M in T.contents - hit_things) //also damage mechs.
for(var/obj/vehicle/sealed/mecha/M in T.contents - hit_things) //also damage mechs.
hit_things += M
if(M.occupant)
if(friendly_fire_check && caster && caster.faction_check_mob(M.occupant))
for(var/O in M.occupants)
var/mob/living/occupant = O
if(friendly_fire_check && caster && caster.faction_check_mob(occupant))
continue
to_chat(M.occupant, "<span class='userdanger'>Your [M.name] is struck by a [name]!</span>")
playsound(M,'sound/weapons/sear.ogg', 50, 1, -4)
M.take_damage(damage, BURN, 0, 0, null, 50)
to_chat(occupant, "<span class='userdanger'>Your [M.name] is struck by a [name]!</span>")
playsound(M,'sound/weapons/sear.ogg', 50, TRUE, -4)
M.take_damage(damage, BURN, 0, 0)
/obj/effect/hierophant
name = "hierophant beacon"

View File

@@ -335,7 +335,7 @@ SHITCODE AHEAD. BE ADVISED. Also comment extravaganza
anchored = TRUE
density = TRUE
layer = ABOVE_OBJ_LAYER
armor = list("melee" = 0, "bullet" = 0, "laser" = 100,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 0)
armor = list(MELEE = 0, BULLET = 0, LASER = 100,ENERGY = 0, BOMB = 0, BIO = 0, RAD = 0, FIRE = 0, ACID = 0)
///What kind of projectile the actual damaging part should be.
var/projectile_type = /obj/item/projectile/beam/legion
///Time until the tracer gets shot

View File

@@ -42,7 +42,7 @@
damage = 0
damage_type = BURN
nodamage = 1
flag = "energy"
flag = ENERGY
temperature = 50
/mob/living/simple_animal/hostile/asteroid/basilisk/GiveTarget(new_target)

View File

@@ -122,7 +122,7 @@ While using this makes the system rely on OnFire, it still gives options for tim
/obj/structure/elite_tumor
name = "pulsing tumor"
desc = "An odd, pulsing tumor sticking out of the ground. You feel compelled to reach out and touch it..."
armor = list("melee" = 100, "bullet" = 100, "laser" = 100, "energy" = 100, "bomb" = 100, "bio" = 100, "rad" = 100, "fire" = 100, "acid" = 100)
armor = list(MELEE = 100, BULLET = 100, LASER = 100, ENERGY = 100, BOMB = 100, BIO = 100, RAD = 100, FIRE = 100, ACID = 100)
resistance_flags = INDESTRUCTIBLE
var/activity = TUMOR_INACTIVE
var/boosted = FALSE

View File

@@ -200,7 +200,7 @@
L.Stun(75)
L.adjustBruteLoss(rand(15,20)) // Less stun more harm
latched = TRUE
for(var/obj/mecha/M in loc)
for(var/obj/vehicle/sealed/mecha/M in loc)
M.take_damage(20, BRUTE, null, null, null, 25)
if(!latched)
retract()

View File

@@ -9,8 +9,8 @@
else
enemies -= L
else if(ismecha(A))
var/obj/mecha/M = A
if(M.occupant)
var/obj/vehicle/sealed/mecha/M = A
if(LAZYLEN(M.occupants))
return A
/mob/living/simple_animal/hostile/retaliate/ListTargets()
@@ -31,10 +31,10 @@
if(faction_check_mob(M) && attack_same || !faction_check_mob(M))
enemies |= M
else if(ismecha(A))
var/obj/mecha/M = A
if(M.occupant)
var/obj/vehicle/sealed/mecha/M = A
if(LAZYLEN(M.occupants))
enemies |= M
enemies |= M.occupant
enemies |= M.occupants
for(var/mob/living/simple_animal/hostile/retaliate/H in around)
if(faction_check_mob(H) && !attack_same && !H.attack_same)

View File

@@ -99,7 +99,7 @@
if(!chosen_color)
dragon_name()
color_selection()
/mob/living/simple_animal/hostile/space_dragon/Life()
. = ..()
@@ -158,8 +158,8 @@
adjustHealth(-L.maxHealth * 0.5)
return
. = ..()
if(istype(target, /obj/mecha))
var/obj/mecha/M = target
if(istype(target, /obj/vehicle/sealed/mecha))
var/obj/vehicle/sealed/mecha/M = target
M.take_damage(50, BRUTE, MELEE, 1)
/mob/living/simple_animal/hostile/space_dragon/AltClickOn(atom/A)
@@ -322,7 +322,7 @@
L.adjustFireLoss(30)
to_chat(L, "<span class='userdanger'>You're hit by [src]'s fire breath!</span>")
// deals damage to mechs
for(var/obj/mecha/M in T.contents)
for(var/obj/vehicle/sealed/mecha/M in T.contents)
if(M in hit_list)
continue
hit_list += M
@@ -530,7 +530,7 @@
/obj/structure/carp_rift
name = "carp rift"
desc = "A rift akin to the ones space carp use to travel long distances."
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 100, "bomb" = 50, "bio" = 100, "rad" = 100, "fire" = 100, "acid" = 100)
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 100, BOMB = 50, BIO = 100, RAD = 100, FIRE = 100, ACID = 100)
max_integrity = 300
icon = 'icons/obj/carp_rift.dmi'
icon_state = "carp_rift_carpspawn"
@@ -637,7 +637,7 @@
icon_state = "carp_rift_charged"
light_color = LIGHT_COLOR_YELLOW
update_light()
armor = list("melee" = 100, "bullet" = 100, "laser" = 100, "energy" = 100, "bomb" = 100, "bio" = 100, "rad" = 100, "fire" = 100, "acid" = 100)
armor = list(MELEE = 100, BULLET = 100, LASER = 100, ENERGY = 100, BOMB = 100, BIO = 100, RAD = 100, FIRE = 100, ACID = 100)
resistance_flags = INDESTRUCTIBLE
dragon.rifts_charged += 1
if(dragon.rifts_charged != 3 && !dragon.objective_complete)

View File

@@ -394,8 +394,8 @@
if(L.stat != CONSCIOUS)
return FALSE
if (ismecha(the_target))
var/obj/mecha/M = the_target
if (M.occupant)
var/obj/vehicle/sealed/mecha/M = the_target
if(LAZYLEN(M.occupants))
return FALSE
return TRUE