Xenoarch Expansion Work

This commit is contained in:
Mechoid
2020-03-13 12:26:53 -07:00
parent 4d6156d558
commit a8a09a11ce
8 changed files with 234 additions and 4 deletions

View File

@@ -271,7 +271,36 @@
warn = 1
if(warn)
to_chat(M, "<b>You accidentally touch [src].</b>")
to_chat(M, "<b>You accidentally touch \the [src].</b>")
..()
/obj/machinery/artifact/Bump(var/atom/bumped)
if(istype(bumped,/obj))
if(bumped:throwforce >= 10)
if(my_effect.trigger == TRIGGER_FORCE)
my_effect.ToggleActivate()
if(secondary_effect && secondary_effect.trigger == TRIGGER_FORCE && prob(25))
secondary_effect.ToggleActivate(0)
else if(ishuman(bumped) && GetAnomalySusceptibility(bumped) >= 0.5)
var/warn = 0
if (my_effect.trigger == TRIGGER_TOUCH && prob(50))
my_effect.ToggleActivate()
warn = 1
if(secondary_effect && secondary_effect.trigger == TRIGGER_TOUCH && prob(25))
secondary_effect.ToggleActivate(0)
warn = 1
if (my_effect.effect == EFFECT_TOUCH && prob(50))
my_effect.DoEffectTouch(bumped)
warn = 1
if(secondary_effect && secondary_effect.effect == EFFECT_TOUCH && secondary_effect.activated && prob(50))
secondary_effect.DoEffectTouch(bumped)
warn = 1
if(warn)
to_chat(bumped, "<b>You accidentally touch \the [src] as it hits you.</b>")
..()
/obj/machinery/artifact/bullet_act(var/obj/item/projectile/P)

View File

@@ -0,0 +1,60 @@
/datum/artifact_effect/animate_anomaly
name = "animate anomaly"
effect_type = EFFECT_PSIONIC
var/mob/living/target = null
/datum/artifact_effect/animate_anomaly/ToggleActivate(var/reveal_toggle = 1)
..()
find_target()
/datum/artifact_effect/animate_anomaly/New()
..()
effectrange = max(3, effectrange)
/datum/artifact_effect/animate_anomaly/proc/find_target()
if(!target || target.z != holder.z || get_dist(target, holder) > effectrange)
var/mob/living/ClosestMob = null
for(var/mob/living/L in range(effectrange, holder))
if(!L.mind)
continue
if(!ClosestMob)
ClosestMob = L
continue
if(!L.stat)
if(get_dist(holder, L) < get_dist(holder, ClosestMob))
ClosestMob = L
target = ClosestMob
/datum/artifact_effect/animate_anomaly/DoEffectTouch(var/mob/living/user)
var/obj/O = holder
var/turf/T = get_step_away(O, user)
if(target && istype(T) && istype(O.loc, /turf))
O.Move(T)
O.visible_message("<span class='alien'>\The [holder] lurches away from [user]</span>")
/datum/artifact_effect/animate_anomaly/DoEffectAura()
var/obj/O = holder
if(!target || target.z != O.z || get_dist(target, O) > effectrange)
target = null
find_target()
var/turf/T = get_step_to(O, target)
if(target && istype(T) && istype(O.loc, /turf))
if(get_dist(O, T) > 1)
O.Move(T)
O.visible_message("<span class='alien'>\The [holder] lurches toward [target]</span>")
/datum/artifact_effect/animate_anomaly/DoEffectPulse()
var/obj/O = holder
if(!target || target.z != O.z || get_dist(target, O) > effectrange)
target = null
find_target()
var/turf/T = get_step_to(O, target)
if(target && istype(T) && istype(O.loc, /turf))
if(get_dist(O, T) > 1)
O.Move(T)
O.visible_message("<span class='alien'>\The [holder] lurches toward [target]</span>")

View File

@@ -0,0 +1,25 @@
/datum/artifact_effect/gravity_wave
name = "gravity wave"
effect_type = EFFECT_ENERGY
var/last_wave_pull = 0
/datum/artifact_effect/gravity_wave/DoEffectTouch(var/mob/user)
gravwave(user, effectrange, STAGE_TWO)
/datum/artifact_effect/gravity_wave/DoEffectAura()
var/seconds_since_last_pull = max(0, round((last_wave_pull - world.time) / 10))
if(prob(10 + seconds_since_last_pull))
holder.visible_message("<span class='alien'>\The [holder] distorts as local gravity intensifies, and shifts toward it.</span>")
last_wave_pull = world.time
gravwave(holder, effectrange, STAGE_TWO)
/datum/artifact_effect/gravity_wave/DoEffectPulse()
holder.visible_message("<span class='alien'>\The [holder] distorts as local gravity intensifies, and shifts toward it.</span>")
gravwave(holder, effectrange, STAGE_TWO)
proc/gravwave(var/atom/target, var/pull_range = 7, var/pull_power = STAGE_TWO)
for(var/atom/A in view(pull_range, target))
A.singularity_pull(target, pull_power)

View File

@@ -0,0 +1,47 @@
/datum/artifact_effect/poltergeist
name = "poltergeist"
effect_type = EFFECT_ENERGY
/datum/artifact_effect/poltergeist/proc/throw_at_mob(var/mob/living/target, var/damage = 20)
var/list/valid_targets = list()
for(var/obj/O in view(world.view, target))
if(!O.anchored)
valid_targets |= O
if(valid_targets.len)
var/obj/obj_to_throw = pick(valid_targets)
obj_to_throw.visible_message("<span class='alien'>\The [obj_to_throw] levitates, befure hurtling toward [target]!</span>")
obj_to_throw.throw_at(target, world.view, damage * GetAnomalySusceptibility(target))
/datum/artifact_effect/poltergeist/DoEffectTouch(var/mob/user)
throw_at_mob(user, rand(10, 30))
/datum/artifact_effect/poltergeist/DoEffectAura()
var/mob/living/target = null
for(var/mob/living/L in view(holder, effectrange))
if(L.stat || !L.mind)
continue
if(target && get_dist(holder, L) > get_dist(holder, target))
continue
target = L
if(target)
throw_at_mob(target, rand(15, 30))
/datum/artifact_effect/poltergeist/DoEffectPulse()
var/mob/living/target = null
for(var/mob/living/L in view(holder, effectrange))
if(L.stat || !L.mind)
continue
if(target && get_dist(holder, L) > get_dist(holder, target))
continue
target = L
if(target)
throw_at_mob(target, chargelevelmax)

View File

@@ -21,7 +21,7 @@
var/apply_prefix = 1
if(prob(40))
material_descriptor = pick("rusted ","dusty ","archaic ","fragile ")
material_descriptor = pick("rusted ","dusty ","archaic ","fragile ", "damaged", "pristine")
source_material = pick("cordite","quadrinium",DEFAULT_WALL_MATERIAL,"titanium","aluminium","ferritic-alloy","plasteel","duranium")
var/talkative = 0
@@ -234,6 +234,7 @@
apply_prefix = 0
new_item = new /obj/item/weapon/material/sword(src.loc)
new_item.force = 10
new_item.name = pick("great-sword","claymore","longsword","broadsword","shortsword","gladius")
item_type = new_item.name
if(prob(30))
new_item.icon = 'icons/obj/xenoarchaeology.dmi'
@@ -282,6 +283,7 @@
apply_prefix = 0
new_item = new /obj/item/weapon/material/sword/katana(src.loc)
new_item.force = 10
new_item.name = "katana"
item_type = new_item.name
if(26)
//energy gun
@@ -520,6 +522,62 @@
if(prob(25))
apply_material_decorations = FALSE
new_item = new /obj/item/weapon/telecube/randomized(src.loc)
item_type = new_item.name
if(40)
// Battery!
var/new_path = pick(subtypesof(/obj/item/weapon/cell))
new_item = new new_path(src.loc)
new_item.name = pick("cell", "battery", "device")
if(prob(30))
apply_prefix = FALSE
if(prob(5))
apply_image_decorations = TRUE
if(prob(15))
apply_material_decorations = FALSE
item_type = new_item.name
if(41)
// Syringe.
if(prob(25))
apply_prefix = FALSE
if(prob(75))
apply_image_decorations = TRUE
if(prob(25))
apply_material_decorations = FALSE
new_item = new /obj/item/weapon/reagent_containers/syringe(src.loc)
var/obj/item/weapon/reagent_containers/syringe/S = new_item
S.volume = 30
S.reagents.maximum_volume = 30
item_type = new_item.name
if(42)
// Ring.
if(prob(15))
apply_prefix = FALSE
if(prob(40))
apply_image_decorations = TRUE
if(prob(25))
apply_material_decorations = FALSE
new_item = new /obj/item/clothing/gloves/ring/material(src.loc)
item_type = new_item.name
if(43)
// Baseball Bat
if(prob(30))
apply_prefix = FALSE
if(prob(80))
apply_image_decorations = TRUE
if(prob(10))
apply_material_decorations = FALSE
new_item = new /obj/item/weapon/material/twohanded/baseballbat(src.loc)
new_item.name = pick("great-club","club","billyclub","mace","tenderizer","maul","bat")
item_type = new_item.name
if(istype(new_item, /obj/item/weapon/material))
var/new_item_mat = pickweight(list(
@@ -553,9 +611,13 @@
var/decorations = ""
if(apply_material_decorations)
source_material = pick("cordite","quadrinium",DEFAULT_WALL_MATERIAL,"titanium","aluminium","ferritic-alloy","plasteel","duranium")
if(istype(new_item, /obj/item/weapon/material))
var/obj/item/weapon/material/MW = new_item
source_material = MW.material.display_name
if(istype(new_item, /obj/vehicle/boat))
var/obj/vehicle/boat/B = new_item
source_material = B.material.display_name
desc = "A [material_descriptor ? "[material_descriptor] " : ""][item_type] made of [source_material], all craftsmanship is of [pick("the lowest","low","average","high","the highest")] quality."
var/list/descriptors = list()