-
Notifications
You must be signed in to change notification settings - Fork 69
PK Anomaly Modkits #367
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
PK Anomaly Modkits #367
Changes from 28 commits
e7d4624
d5c7998
dd11b59
6f3dde7
0f485c5
06f6b42
ee6971b
a451978
af25ea2
e7ad3cd
8bad0a6
a40be31
4297b8b
a2f658b
4b4ab3f
b037737
d1755a7
e7dd1f7
41a0a0e
6a67a17
4feed91
4063dbf
5b1e53c
5e2be39
2290ae0
ca68ba2
7e815d2
0767330
fd36121
551bc28
199265d
0ffc3c5
57d60ee
3435008
f48eff9
399530b
9b6c330
924abe4
0b10cfa
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -679,7 +679,6 @@ | |
| KA.trigger_guard = TRIGGER_GUARD_NORMAL | ||
| ..() | ||
|
|
||
|
|
||
| //Cosmetic | ||
|
|
||
| /obj/item/borg/upgrade/modkit/chassis_mod | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,184 @@ | ||
| //Blank PK modkit, able to be fit with an anomaly core | ||
| /obj/item/borg/upgrade/modkit/blank | ||
| name = "blank anomaly kit" | ||
| desc = "A specialized PK anomaly modkit. This one is currently empty, awaiting an anomaly core for completion." | ||
| cost = 10 | ||
| icon = 'modular_oculis/modules/anomalykits/icons/obj/anomalykits.dmi' | ||
| icon_state = "anomalykitempty" | ||
|
|
||
| /obj/item/borg/upgrade/modkit/blank/item_interaction(mob/living/user, obj/item/tool, list/modifiers) | ||
| . = ..() | ||
| var/static/list/anomaly_kit_types = list( | ||
| /obj/effect/anomaly/grav = /obj/item/borg/upgrade/modkit/cooldown/gravity, | ||
| /obj/effect/anomaly/weather = /obj/item/borg/upgrade/modkit/weather, | ||
| /obj/effect/anomaly/ectoplasm = /obj/item/borg/upgrade/modkit/ectoplasm, | ||
| /obj/effect/anomaly/bluespace = /obj/item/borg/upgrade/modkit/cooldown/bluespace, | ||
| /obj/effect/anomaly/bhole = /obj/item/borg/upgrade/modkit/vortex, | ||
| /obj/effect/anomaly/flux = /obj/item/borg/upgrade/modkit/flux, | ||
| /obj/effect/anomaly/bioscrambler = /obj/item/borg/upgrade/modkit/bioscrambler, | ||
| ) | ||
|
|
||
| if(istype(tool, /obj/item/assembly/signaler/anomaly)) | ||
| var/obj/item/assembly/signaler/anomaly/anomaly = tool | ||
| var/anomkit_path = is_path_in_list(anomaly.anomaly_type, anomaly_kit_types, TRUE) | ||
| if(!anomkit_path) | ||
| anomkit_path = /obj/item/borg/upgrade/modkit/cooldown/gravity //If an anomaly is inserted without a specifically coded modifier, give the gravity one so that the player isn't unrewarded | ||
| to_chat(user, span_notice("You insert [anomaly] into the modkit, and it gently hums to life.")) | ||
| new anomkit_path(get_turf(src)) | ||
| qdel(src) | ||
| qdel(anomaly) | ||
| return ITEM_INTERACT_SUCCESS | ||
|
|
||
| /datum/design/anomaly_mod | ||
| name = "Kinetic Accelerator Blank Anomaly Mod" | ||
| desc = "Ask Research to slot an anomaly core into this for a specialized proto-kinetic accelerator upgrade." | ||
| id = "anomalymod" | ||
| build_type = PROTOLATHE | AWAY_LATHE | ||
| materials = list( | ||
| /datum/material/iron =SHEET_MATERIAL_AMOUNT * 3, | ||
| /datum/material/glass =SHEET_MATERIAL_AMOUNT * 2, | ||
| /datum/material/silver =SHEET_MATERIAL_AMOUNT * 2, | ||
| /datum/material/gold =SHEET_MATERIAL_AMOUNT * 2, | ||
| /datum/material/uranium =SHEET_MATERIAL_AMOUNT, | ||
| /datum/material/diamond =SHEET_MATERIAL_AMOUNT, | ||
| ) | ||
| build_path = /obj/item/borg/upgrade/modkit/blank | ||
| category = list( | ||
| RND_CATEGORY_TOOLS + RND_SUBCATEGORY_TOOLS_PKA_MODS | ||
| ) | ||
| departmental_flags = DEPARTMENT_BITFLAG_CARGO | ||
|
|
||
| /obj/item/borg/upgrade/modkit/cooldown/gravity | ||
| name = "gravitic pulverizer" | ||
| desc = "A specialized PK anomaly modkit. This one vastly increases the weapon's damage at the cost of cooldown, as well as allowing it to knock targets back." | ||
| icon = 'modular_oculis/modules/anomalykits/icons/obj/anomalykits.dmi' | ||
| icon_state = "anomalykit" | ||
| modifier = -10 | ||
| cost = 35 | ||
| maximum_of_type = 1 | ||
|
|
||
| /obj/item/borg/upgrade/modkit/cooldown/gravity/modify_projectile(obj/projectile/kinetic/K) | ||
| K.damage -= modifier * 5 | ||
|
|
||
| /obj/item/borg/upgrade/modkit/cooldown/gravity/projectile_strike(obj/projectile/kinetic/K, turf/target_turf, atom/movable/target, obj/item/gun/energy/recharge/kinetic_accelerator/KA) | ||
| var/relative_direction = get_cardinal_dir(src, target) | ||
| var/atom/throw_target = get_edge_target_turf(target, relative_direction) | ||
| . = ..() | ||
| if(!QDELETED(target) && istype(target, /mob)) | ||
| var/whack_speed = (2) | ||
| target.throw_at(throw_target, 2, whack_speed, K, gentle = TRUE) | ||
|
|
||
| /obj/item/borg/upgrade/modkit/weather | ||
| name = "storm capacitor" | ||
| desc = "A specialized PK anomaly modkit. This one allows the weapon to call lightning from above, electrocuting targets." | ||
| icon = 'modular_oculis/modules/anomalykits/icons/obj/anomalykits.dmi' | ||
| icon_state = "anomalykit" | ||
| cost = 35 | ||
| maximum_of_type = 1 | ||
|
|
||
| /obj/item/borg/upgrade/modkit/weather/projectile_strike(obj/projectile/kinetic/K, turf/target_turf, atom/target, obj/item/gun/energy/recharge/kinetic_accelerator/KA) | ||
| new /obj/effect/temp_visual/telegraphing/thunderbolt(target_turf) | ||
| addtimer(CALLBACK(src, PROC_REF(shock_turf), target_turf), 1 SECONDS) | ||
|
|
||
| /obj/item/borg/upgrade/modkit/weather/proc/shock_turf(turf/target) | ||
| playsound(target, 'sound/effects/magic/lightningbolt.ogg', 66, TRUE) | ||
| new /obj/effect/temp_visual/thunderbolt(target) | ||
| for(var/turf/open/adjacent_turf in oview(1, target)) | ||
| new /obj/effect/temp_visual/electricity(adjacent_turf) | ||
|
|
||
| for(var/mob/living/hit_mob in target) | ||
| to_chat(hit_mob, span_userdanger("You've been struck by lightning!")) | ||
| hit_mob.electrocute_act(30, src, flags = SHOCK_TESLA|SHOCK_NOSTUN) | ||
| hit_mob.Knockdown(1 SECONDS, 5 SECONDS) | ||
|
|
||
| for(var/mob/living/nearby_target in oview(1, target)) | ||
| to_chat(nearby_target, span_userdanger("You've been struck by an arc of lightning!")) | ||
| nearby_target.electrocute_act(10, src, flags = SHOCK_TESLA|SHOCK_NOSTUN) | ||
|
|
||
| for(var/obj/hit_thing in target) | ||
| hit_thing.take_damage(20, BURN, ENERGY, FALSE) | ||
|
|
||
| for(var/obj/nearby_thing in oview(1, target)) | ||
| nearby_thing.take_damage(10, BURN, ENERGY, FALSE) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. don't we have tesla ball code that you can use for this? Also- Five for loops...?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This reuses the storm-staff code. I can take a look at the tesla ball code and try that. |
||
|
|
||
| /obj/item/borg/upgrade/modkit/ectoplasm | ||
| name = "poltergeist projector" | ||
| desc = "A specialized PK anomaly modkit. This one grants the weapon a chance to haunt nearby objects, throwing them at the target. Comes with a large range increase." | ||
| icon = 'modular_oculis/modules/anomalykits/icons/obj/anomalykits.dmi' | ||
| icon_state = "anomalykit" | ||
| cost = 35 | ||
| modifier = 3 | ||
| maximum_of_type = 1 | ||
|
|
||
| /obj/item/borg/upgrade/modkit/ectoplasm/modify_projectile(obj/projectile/kinetic/K) | ||
| K.range += modifier | ||
|
|
||
| /obj/item/borg/upgrade/modkit/ectoplasm/projectile_strike(obj/projectile/kinetic/K, turf/target_turf, atom/movable/target, obj/item/gun/energy/recharge/kinetic_accelerator/KA) | ||
| if(!QDELETED(target) && istype(target, /mob)) | ||
| for(var/obj/item/throwable in view(modifier, target)) | ||
| if(prob(30)) | ||
| playsound(target_turf,'sound/effects/hallucinations/veryfar_noise.ogg', 50, TRUE) | ||
| var/relative_direction = get_cardinal_dir(throwable, target) | ||
| var/atom/throw_target = get_edge_target_turf(target, relative_direction) | ||
| var/whack_speed = (2) | ||
| throwable.throw_at(throw_target, modifier, whack_speed, K, gentle = TRUE) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please unindent this, also it'd be mildly funny to be able to send anything flying if you hit it, not just mobs, ala wizard's mjolnir hammer, maybe you can use code from that? |
||
|
|
||
| /obj/item/borg/upgrade/modkit/cooldown/bluespace | ||
| name = "bluespace aberrator" | ||
| desc = "A specialized PK anomaly modkit. This one allows the weapon to chaotically teleport targets, alongside increased cooling rates." | ||
| icon = 'modular_oculis/modules/anomalykits/icons/obj/anomalykits.dmi' | ||
| icon_state = "anomalykit" | ||
| cost = 35 | ||
| modifier = 4 | ||
|
|
||
| /obj/item/borg/upgrade/modkit/cooldown/bluespace/projectile_strike(obj/projectile/kinetic/K, turf/target_turf, atom/movable/target, obj/item/gun/energy/recharge/kinetic_accelerator/KA) | ||
| if(!QDELETED(target) && istype(target, /mob)) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I also dont really see any reason for these
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry, new to BYOND code and saw a bunch of !QDELETED checks elsewhere, so I figured it must be necessary? I'll do some testing without it. |
||
| do_teleport(target, target_turf, 1, asoundin = 'sound/effects/phasein.ogg', channel = TELEPORT_CHANNEL_BLUESPACE) | ||
|
|
||
| /obj/item/borg/upgrade/modkit/vortex | ||
| name = "vortex attractor" | ||
| desc = "A specialized PK anomaly modkit. This one allows the weapon to pull enemies in, along with an increase to force output." | ||
| icon = 'modular_oculis/modules/anomalykits/icons/obj/anomalykits.dmi' | ||
| icon_state = "anomalykit" | ||
| modifier = 10 | ||
| cost = 35 | ||
| maximum_of_type = 1 | ||
|
|
||
| /obj/item/borg/upgrade/modkit/vortex/modify_projectile(obj/projectile/kinetic/K) | ||
| K.damage += modifier | ||
|
|
||
| /obj/item/borg/upgrade/modkit/vortex/projectile_strike(obj/projectile/kinetic/K, turf/target_turf, atom/movable/target, obj/item/gun/energy/recharge/kinetic_accelerator/KA) | ||
| var/relative_direction = get_cardinal_dir(target, src) | ||
| var/atom/throw_target = get_edge_target_turf(target, relative_direction) | ||
| . = ..() | ||
| if(!QDELETED(target) && istype(target, /mob)) | ||
| var/whack_speed = (2) | ||
| target.throw_at(throw_target, 2, whack_speed, K, gentle = TRUE) | ||
|
Comment on lines
+147
to
+151
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same as above |
||
|
|
||
| /obj/item/borg/upgrade/modkit/flux | ||
| name = "flux charger" | ||
| desc = "A specialized PK anomaly modkit. This one gives the weapon a slight damage and range increase at no modularity cost. Push the limit." | ||
| icon = 'modular_oculis/modules/anomalykits/icons/obj/anomalykits.dmi' | ||
| icon_state = "anomalykit" | ||
| modifier = 10 | ||
| cost = 0 | ||
| maximum_of_type = 1 | ||
|
|
||
| /obj/item/borg/upgrade/modkit/flux/modify_projectile(obj/projectile/kinetic/K) | ||
| K.damage += modifier | ||
| K.range += 1 | ||
|
|
||
| /obj/item/borg/upgrade/modkit/bioscrambler | ||
| name = "genetic inducer" | ||
| desc = "A specialized PK anomaly modkit. This one allows the weapon to genetically batter its opponent, giving it a chance to deal critical internal damage." | ||
| icon = 'modular_oculis/modules/anomalykits/icons/obj/anomalykits.dmi' | ||
| icon_state = "anomalykit" | ||
| modifier = 20 | ||
| cost = 35 | ||
| maximum_of_type = 1 | ||
|
|
||
| /obj/item/borg/upgrade/modkit/bioscrambler/projectile_strike(obj/projectile/kinetic/K, turf/target_turf, atom/movable/target, obj/item/gun/energy/recharge/kinetic_accelerator/KA) | ||
| if(!QDELETED(target) && istype(target, /mob) && prob(modifier)) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. and here |
||
| playsound(target, 'sound/items/weapons/zapbang.ogg', 100, TRUE) | ||
| if(target.uses_integrity) | ||
| target.take_damage(60, BRUTE, ENERGY, FALSE) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| <!-- This should be copy-pasted into the root of your module folder as readme.md --> | ||
|
|
||
| https://github.com/Monkestation/OculisStation/pull/367<!--PR Number--> | ||
|
|
||
| ## \<PK Anomaly Modkits> <!--Title of your addition.--> | ||
|
|
||
| Module ID: ANOMALY_KITS | ||
|
|
||
| ### Description: | ||
|
|
||
| Adds a blank anomaly modkit, which allows insertion of an anomaly core to create specialized PKA upgrades. It must be researched in the same technode as the other craftable PKA upgrades, fabricated, then fit with an anomaly core. | ||
|
|
||
| <!-- Here, try to describe what your PR does, what features it provides and any other directly useful information. --> | ||
|
|
||
| ### TG Proc/File Changes: | ||
|
|
||
| - N/A | ||
| <!-- If you edited any core procs, you should list them here. You should specify the files and procs you changed. | ||
| E.g: | ||
| - `code/modules/mob/living.dm`: `proc/overriden_proc`, `var/overriden_var` | ||
| --> | ||
|
|
||
| ### Modular Overrides: | ||
|
|
||
| - N/A | ||
| <!-- If you added a new modular override (file or code-wise) for your module, you should list it here. Code files should specify what procs they changed, in case of multiple modules using the same file. | ||
| E.g: | ||
| - `modular_oculis/master_files/sound/my_cool_sound.ogg` | ||
| - `modular_oculis/master_files/code/my_modular_override.dm`: `proc/overriden_proc`, `var/overriden_var` | ||
| --> | ||
|
|
||
| ### Defines: | ||
|
|
||
| - N/A | ||
| <!-- If you needed to add any defines, mention the files you added those defines in, along with the name of the defines. --> | ||
|
|
||
| ### Included files that are not contained in this module: | ||
|
|
||
| - N/A | ||
| <!-- Likewise, be it a non-modular file or a modular one that's not contained within the folder belonging to this specific module, it should be mentioned here. Good examples are icons or sounds that are used between multiple modules, or other such edge-cases. --> | ||
|
|
||
| ### Credits: | ||
|
|
||
| Keygenpie - Programmer | ||
| Xeonmations - Getting me to modularize the damn thing |
Uh oh!
There was an error while loading. Please reload this page.