diff --git a/code/__defines/xenoarcheaology.dm b/code/__defines/xenoarcheaology.dm index 8a4988b78c..8173032d35 100644 --- a/code/__defines/xenoarcheaology.dm +++ b/code/__defines/xenoarcheaology.dm @@ -37,7 +37,11 @@ #define ARCHAEO_ALIEN_BOAT 37 #define ARCHAEO_IMPERION_CIRCUIT 38 #define ARCHAEO_TELECUBE 39 -#define MAX_ARCHAEO 39 +#define ARCHAEO_BATTERY 40 +#define ARCHAEO_SYRINGE 41 +#define ARCHAEO_RING 42 +#define ARCHAEO_BAT 43 +#define MAX_ARCHAEO 43 #define DIGSITE_GARDEN 1 #define DIGSITE_ANIMAL 2 diff --git a/code/modules/xenoarcheaology/artifacts/artifact.dm b/code/modules/xenoarcheaology/artifacts/artifact.dm index 43ccbd9f3c..840c2096c5 100644 --- a/code/modules/xenoarcheaology/artifacts/artifact.dm +++ b/code/modules/xenoarcheaology/artifacts/artifact.dm @@ -271,7 +271,36 @@ warn = 1 if(warn) - to_chat(M, "You accidentally touch [src].") + to_chat(M, "You accidentally touch \the [src].") + ..() + +/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, "You accidentally touch \the [src] as it hits you.") + ..() /obj/machinery/artifact/bullet_act(var/obj/item/projectile/P) diff --git a/code/modules/xenoarcheaology/effects/animate_anomaly.dm b/code/modules/xenoarcheaology/effects/animate_anomaly.dm new file mode 100644 index 0000000000..c0c17e4aaf --- /dev/null +++ b/code/modules/xenoarcheaology/effects/animate_anomaly.dm @@ -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("\The [holder] lurches away from [user]") + +/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("\The [holder] lurches toward [target]") + +/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("\The [holder] lurches toward [target]") diff --git a/code/modules/xenoarcheaology/effects/gravitational_waves.dm b/code/modules/xenoarcheaology/effects/gravitational_waves.dm new file mode 100644 index 0000000000..431a984191 --- /dev/null +++ b/code/modules/xenoarcheaology/effects/gravitational_waves.dm @@ -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("\The [holder] distorts as local gravity intensifies, and shifts toward it.") + last_wave_pull = world.time + gravwave(holder, effectrange, STAGE_TWO) + +/datum/artifact_effect/gravity_wave/DoEffectPulse() + holder.visible_message("\The [holder] distorts as local gravity intensifies, and shifts toward it.") + 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) diff --git a/code/modules/xenoarcheaology/effects/poltergeist.dm b/code/modules/xenoarcheaology/effects/poltergeist.dm new file mode 100644 index 0000000000..dac2b35bec --- /dev/null +++ b/code/modules/xenoarcheaology/effects/poltergeist.dm @@ -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("\The [obj_to_throw] levitates, befure hurtling toward [target]!") + 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) diff --git a/code/modules/xenoarcheaology/finds/find_spawning.dm b/code/modules/xenoarcheaology/finds/find_spawning.dm index 4c091200ca..a462d4866a 100644 --- a/code/modules/xenoarcheaology/finds/find_spawning.dm +++ b/code/modules/xenoarcheaology/finds/find_spawning.dm @@ -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() diff --git a/icons/obj/xenoarchaeology.dmi b/icons/obj/xenoarchaeology.dmi index e484762679..d500a48be0 100644 Binary files a/icons/obj/xenoarchaeology.dmi and b/icons/obj/xenoarchaeology.dmi differ diff --git a/polaris.dme b/polaris.dme index 42381a0812..94633ee193 100644 --- a/polaris.dme +++ b/polaris.dme @@ -2785,6 +2785,7 @@ #include "code\modules\xenoarcheaology\artifacts\crystal.dm" #include "code\modules\xenoarcheaology\artifacts\gigadrill.dm" #include "code\modules\xenoarcheaology\artifacts\replicator.dm" +#include "code\modules\xenoarcheaology\effects\animate_anomaly.dm" #include "code\modules\xenoarcheaology\effects\badfeeling.dm" #include "code\modules\xenoarcheaology\effects\berserk.dm" #include "code\modules\xenoarcheaology\effects\cellcharge.dm" @@ -2799,9 +2800,11 @@ #include "code\modules\xenoarcheaology\effects\gasphoron.dm" #include "code\modules\xenoarcheaology\effects\gassleeping.dm" #include "code\modules\xenoarcheaology\effects\goodfeeling.dm" +#include "code\modules\xenoarcheaology\effects\gravitational_waves.dm" #include "code\modules\xenoarcheaology\effects\heal.dm" #include "code\modules\xenoarcheaology\effects\heat.dm" #include "code\modules\xenoarcheaology\effects\hurt.dm" +#include "code\modules\xenoarcheaology\effects\poltergeist.dm" #include "code\modules\xenoarcheaology\effects\radiate.dm" #include "code\modules\xenoarcheaology\effects\roboheal.dm" #include "code\modules\xenoarcheaology\effects\robohurt.dm" @@ -2860,7 +2863,7 @@ #include "code\ZAS\Zone.dm" #include "interface\interface.dm" #include "interface\skin.dmf" -#include "maps\southern_cross\southern_cross.dm" +#include "maps\example\example.dm" #include "maps\submaps\space_submaps\space.dm" #include "maps\submaps\surface_submaps\mountains\mountains.dm" #include "maps\submaps\surface_submaps\mountains\mountains_areas.dm"