From 713d2b74c58ecdd6b743cde376822146e2d99c7f Mon Sep 17 00:00:00 2001 From: uporotiy Date: Mon, 5 Sep 2011 04:00:33 +0000 Subject: [PATCH] XCOM alien code by Xerif (Donated by the Foundation project, ss13.org) plus some tweaks of mine added. Of course, I'm going to be enhancing it later. As it is quite unbalanced and not nearly complete yet, try not to spawn it too much, will you? :33 git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2122 316c924e-a436-60f5-8080-3fe189b3f50e --- .../mob/living/carbon/alien/special/_main.dm | 71 ++++++++++++++++++ .../living/carbon/alien/special/chryssalid.dm | 61 +++++++++++++++ .../living/carbon/alien/special/ethereal.dm | 54 +++++++++++++ .../living/carbon/alien/special/floater.dm | 11 +++ .../mob/living/carbon/alien/special/muton.dm | 4 + .../living/carbon/alien/special/sectoid.dm | 4 + .../living/carbon/alien/special/snakeman.dm | 59 +++++++++++++++ icons/mob/xcomalien.dmi | Bin 19404 -> 19412 bytes tgstation.dme | 8 ++ 9 files changed, 272 insertions(+) create mode 100644 code/modules/mob/living/carbon/alien/special/_main.dm create mode 100644 code/modules/mob/living/carbon/alien/special/chryssalid.dm create mode 100644 code/modules/mob/living/carbon/alien/special/ethereal.dm create mode 100644 code/modules/mob/living/carbon/alien/special/floater.dm create mode 100644 code/modules/mob/living/carbon/alien/special/muton.dm create mode 100644 code/modules/mob/living/carbon/alien/special/sectoid.dm create mode 100644 code/modules/mob/living/carbon/alien/special/snakeman.dm diff --git a/code/modules/mob/living/carbon/alien/special/_main.dm b/code/modules/mob/living/carbon/alien/special/_main.dm new file mode 100644 index 00000000000..0b913578f99 --- /dev/null +++ b/code/modules/mob/living/carbon/alien/special/_main.dm @@ -0,0 +1,71 @@ +//XCOM alien code +//By Xerif (Donated by the Foundation project, ss13.org) + +/mob/living/carbon/alien/humanoid/special + has_fine_manipulation = 1 + var/xcom_state + + New() + ..() + spawn (1) + var/datum/reagents/R = new/datum/reagents(100) + reagents = R + R.my_atom = src + + mind = new() + mind.key = key + mind.special_role = "Special Xeno" + + name = "[name] ([rand(1, 1000)])" + real_name = name + + src.stand_icon = new /icon('xcomalien.dmi', xcom_state) + src.lying_icon = new /icon('xcomalien.dmi', xcom_state) + src.icon = src.stand_icon + + remove_special_verbs() + + update_clothing() + + death(gibbed) + ..() + spawn(5) + gib() + + Stat() + statpanel("Status") + if (src.client && src.client.holder) + stat(null, "([x], [y], [z])") + + stat(null, "Intent: [src.a_intent]") + stat(null, "Move Mode: [src.m_intent]") + + if (src.client.statpanel == "Status") + if (src.internal) + if (!src.internal.air_contents) + del(src.internal) + else + stat("Internal Atmosphere Info", src.internal.name) + stat("Tank Pressure", src.internal.air_contents.return_pressure()) + stat("Distribution Pressure", src.internal.distribute_pressure) + return + + alien_talk() + if(istype(src, /mob/living/carbon/alien/humanoid/special/etheral)) + ..() + return + if(istype(src, /mob/living/carbon/alien/humanoid/special/sectoid)) + ..() + return + return + +/mob/living/carbon/alien/humanoid/special/proc/xcom_attack() + return + +/mob/living/carbon/alien/humanoid/special/proc/remove_special_verbs() + verbs -= /mob/living/carbon/alien/humanoid/verb/plant + verbs -= /mob/living/carbon/alien/humanoid/verb/call_to + verbs -= /mob/living/carbon/alien/humanoid/verb/whisp + verbs -= /mob/living/carbon/alien/humanoid/verb/transfer_plasma + verbs -= /mob/living/carbon/alien/humanoid/verb/corrode + return \ No newline at end of file diff --git a/code/modules/mob/living/carbon/alien/special/chryssalid.dm b/code/modules/mob/living/carbon/alien/special/chryssalid.dm new file mode 100644 index 00000000000..048a325622a --- /dev/null +++ b/code/modules/mob/living/carbon/alien/special/chryssalid.dm @@ -0,0 +1,61 @@ +/mob/living/carbon/alien/humanoid/special/chryssalid + name = "Chryssalid" + desc = "The crab-like claws of this creature are a powerful weapon in close combat. The high metabolism and strength of this creature give it speed and dexterity. Instead of killing its victim it impregnates it with an egg and injects a neurotoxin which turns it into a mindless drone. A new Chryssalid will burst from the victim shortly after impregnation. Chryssalids are associated with the Snakeman race. " + xcom_state = "chryssalid" + has_fine_manipulation = 0 + + New() + ..() + var/obj/item/weapon/tank/jetpack/jetpack = new(src) + jetpack.on = !(jetpack.on) + back = jetpack + return + + bullet_act(flags) + take_overall_damage(15,0) + return + + movement_delay() + return -5 + + handle_regular_status_updates() + + health = 200 - (oxyloss + fireloss + bruteloss) + + weakened = 0 + stunned = 0 + paralysis = 0 + + if(health < -100 || src.brain_op_stage == 4.0) + death() + else if(src.health < 0) + + if(!src.reagents.has_reagent("plasma")) src.oxyloss++ + + if(src.stat != 2) src.stat = 1 + src.paralysis = max(src.paralysis, 5) + + if(stat == 2) + lying = 1 + + src.density = !(src.lying ) + + return 1 + + updatehealth() + src.health = 200 - src.oxyloss - src.fireloss - src.bruteloss + + xcom_attack(mob/living/carbon/human/target as mob) + if(!ishuman(target)) + return + if(target.stat != 2 || !target.client) + target.take_overall_damage(20,0) + target.visible_message(pick( + "\red [src] tears at [target]!", + "\red [src] stabs [target] with it's claws!", + "\red [src] slashes [target] with it's claws!")) + else + if(target.client) + target.client.mob = new/mob/living/carbon/alien/humanoid/special/chryssalid(src.loc) + target.gib() + ..() \ No newline at end of file diff --git a/code/modules/mob/living/carbon/alien/special/ethereal.dm b/code/modules/mob/living/carbon/alien/special/ethereal.dm new file mode 100644 index 00000000000..c69b9c10276 --- /dev/null +++ b/code/modules/mob/living/carbon/alien/special/ethereal.dm @@ -0,0 +1,54 @@ +/mob/living/carbon/alien/humanoid/special/etheral + name = "Etheral" + desc = "The apparently weak physical abilities of this creature are sustained by its mental powers. We do not understand how these telekinetic powers work, since they seem to defy the laws of physics as we know them. " + xcom_state = "ethereal" + has_fine_manipulation = 0 + + New() + ..() + var/obj/item/weapon/tank/jetpack/jetpack = new(src) + jetpack.on = !(jetpack.on) + back = jetpack + + mutations |= 1 + + spawn(2) + name = "Etheral" + real_name = "Etheral" + return + + movement_delay() + return 2 + +/mob/living/carbon/alien/humanoid/special/etheral/verb/demoralise() + set name = "Psionic Demoralisation" + set desc = "Confuses and disorients all humanoids in a small radius." + set category = "Etheral" + + if(stat) + return + + visible_message("[src] appears to emit strange throbbing waves.") + + for(var/mob/living/carbon/M in view(3, src)) + if(M == src) + continue + if(M.confused <= 10) + M.confused = 10 + if(M.eye_blurry <= 10) + M.eye_blurry = 10 + M.drop_item() + M << "\red SCREEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE" + M << "You clutch your head in agony as your vision blurs and you succumb to disorientation." + + verbs -= /mob/living/carbon/alien/humanoid/special/etheral/verb/demoralise + spawn(300) + verbs += /mob/living/carbon/alien/humanoid/special/etheral/verb/demoralise + + return + +/atom/attack_alien(mob/user as mob) + if(istype(user, /mob/living/carbon/alien/humanoid/special/etheral)) + attack_ai(user) + return + ..() \ No newline at end of file diff --git a/code/modules/mob/living/carbon/alien/special/floater.dm b/code/modules/mob/living/carbon/alien/special/floater.dm new file mode 100644 index 00000000000..6e3ba6a4adb --- /dev/null +++ b/code/modules/mob/living/carbon/alien/special/floater.dm @@ -0,0 +1,11 @@ +/mob/living/carbon/alien/humanoid/special/floater + name = "Floater" + desc = "These aliens are capable or flight through space and shit" + xcom_state = "floater" + + New() + ..() + var/obj/item/weapon/tank/jetpack/jetpack = new(src) + jetpack.on = !(jetpack.on) + back = jetpack + return \ No newline at end of file diff --git a/code/modules/mob/living/carbon/alien/special/muton.dm b/code/modules/mob/living/carbon/alien/special/muton.dm new file mode 100644 index 00000000000..b45f4dedab9 --- /dev/null +++ b/code/modules/mob/living/carbon/alien/special/muton.dm @@ -0,0 +1,4 @@ +/mob/living/carbon/alien/humanoid/special/muton + name = "Muton" + desc = "This humanoid creature is physically powerful and intelligent. They have a particular appetite for consuming raw flesh of any kind, which they need for sustenance like earth based carnivores. " + xcom_state = "muton" \ No newline at end of file diff --git a/code/modules/mob/living/carbon/alien/special/sectoid.dm b/code/modules/mob/living/carbon/alien/special/sectoid.dm new file mode 100644 index 00000000000..31d07233f68 --- /dev/null +++ b/code/modules/mob/living/carbon/alien/special/sectoid.dm @@ -0,0 +1,4 @@ +/mob/living/carbon/alien/humanoid/special/sectoid + name = "Sectoid" + desc = "The Sectoid hierarchy ranges from soldiers to leaders with powerful psionic abilities. These psionic powers can be used to demoralise opponents in combat, or even take control of their minds." + xcom_state = "sectoid" \ No newline at end of file diff --git a/code/modules/mob/living/carbon/alien/special/snakeman.dm b/code/modules/mob/living/carbon/alien/special/snakeman.dm new file mode 100644 index 00000000000..511e2687619 --- /dev/null +++ b/code/modules/mob/living/carbon/alien/special/snakeman.dm @@ -0,0 +1,59 @@ +/mob/living/carbon/alien/humanoid/special/snakeman + name = "Snakeman" + desc = "This race developed in an extremely hostile environment. They are extremely tough and can resist extreme temperature variations. Their mobility depends on a snake-like giant \"foot\" which protects all the vital organs. " + xcom_state = "snake" + + movement_delay() + return 4 + +/mob/living/carbon/alien/humanoid/special/snakeman/verb/lay_egg(mob/living/carbon/human/M as mob) + set name = "Impregnate" + set desc = "Lays an egg on a corpse, allowing the egg to feed." + set category = "Snakeman" + + set src = view(0) + + if(stat) + return + + if(!M) + return + + if(!M.client) + src << "This being is missing a brain." + return + + visible_message("[src] extends a probiscis and stabs it into [M]") + + if (!do_mob(usr, M, 50)) + usr << "\red The injection of the egg has been interrupted!" + return + + if(M.client) + M.client.mob = new/mob/living/carbon/alien/humanoid/special/snakeman(new/obj/snake_egg(src.loc)) + visible_message("[src] injects [M] with an egg.") + visible_message("The egg absorbs [M]") + M.mutations |= HUSK + M.update_body() + M.death() + else + src << "This being is missing a brain." + + return + +/obj/snake_egg + name = "Egg" + icon = 'alien.dmi' + icon_state = "egg" + density = 1 + anchored = 1 + + New() + ..() + + spawn(300) + for(var/mob/M in src) + M.loc = src.loc + icon_state = "egg_hatched" + density = 0 + return \ No newline at end of file diff --git a/icons/mob/xcomalien.dmi b/icons/mob/xcomalien.dmi index 2698282fe6e9066937a422c5709a5388d747c12f..5dc02cb6078ea287ed63a67fe4742b77dd076642 100644 GIT binary patch delta 269 zcmV+o0rLLLmjTq50gxnr=Xz9FbVOxyV{&P5bZKvH004NLjnc7d!$1sx;o0{TBAHv_ z#Dy-m6o=v=d4(WiId}BVXCyVDZ{MLqx|q`__y*}mTlhGB4rl03gS!(;EHilMUU#l} z#8CryIP6^$DBgnp4Wg(79yZs&KO&goxN*%GS-?Z*nu#%!fQR;fNl61SVXDIXt!1t% znemJ2imqA=%T1}E5?9@FS)yq9cSO4aG3WATW1Wp1Y;131t&Q#K?80$MRCR1C!nPu8 zE5f!SY%9XHA~&WP$9j<|A=lNCP%=K*`}(K9l(hQlTR5J3=udT$=r<}{H8zO9zM>W!xj3=;J%3^mKi*BuLsxs z#IXkOa5}msP<({?Kcr$M@UXiF{uSA|W{fQ0p>xf|m`T7xyE3YOfml`ftCm?+GUJnU zMfa+rDHYV!a$BO*l2+JmK+L(k*;r>|CmTE3SZiYko!vN2iB!k7B5W(dwjyjR!nPu8 zEAn8Pany@U30YT5Ldm$Y_wAFvlr(N#cn{}m5B+6uf3^@8j7{FZ;Q#<207*naRCt{2 Toq2o{W&X!MDfCFQDgmlW{oaMj diff --git a/tgstation.dme b/tgstation.dme index 56753f681bf..811c5b3435c 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -96,6 +96,7 @@ #define FILE_DIR "code/modules/mob/living/carbon/alien/humanoid" #define FILE_DIR "code/modules/mob/living/carbon/alien/humanoid/caste" #define FILE_DIR "code/modules/mob/living/carbon/alien/larva" +#define FILE_DIR "code/modules/mob/living/carbon/alien/special" #define FILE_DIR "code/modules/mob/living/carbon/brain" #define FILE_DIR "code/modules/mob/living/carbon/human" #define FILE_DIR "code/modules/mob/living/carbon/metroid" @@ -739,6 +740,13 @@ #include "code\modules\mob\living\carbon\alien\larva\life.dm" #include "code\modules\mob\living\carbon\alien\larva\login.dm" #include "code\modules\mob\living\carbon\alien\larva\powers.dm" +#include "code\modules\mob\living\carbon\alien\special\_main.dm" +#include "code\modules\mob\living\carbon\alien\special\chryssalid.dm" +#include "code\modules\mob\living\carbon\alien\special\ethereal.dm" +#include "code\modules\mob\living\carbon\alien\special\floater.dm" +#include "code\modules\mob\living\carbon\alien\special\muton.dm" +#include "code\modules\mob\living\carbon\alien\special\sectoid.dm" +#include "code\modules\mob\living\carbon\alien\special\snakeman.dm" #include "code\modules\mob\living\carbon\brain\brain.dm" #include "code\modules\mob\living\carbon\brain\death.dm" #include "code\modules\mob\living\carbon\brain\hud.dm"