Skip to content

Commit

Permalink
Health analyze improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
EgorDinamit committed Sep 30, 2023
1 parent e567df9 commit 7d4a2e7
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 22 deletions.
2 changes: 1 addition & 1 deletion baystation12.dme
Original file line number Diff line number Diff line change
Expand Up @@ -3164,10 +3164,10 @@
#include "code\modules\spells\hand\entangle.dm"
#include "code\modules\spells\hand\hand.dm"
#include "code\modules\spells\hand\hand_item.dm"
#include "code\modules\spells\hand\health_scan.dm"
#include "code\modules\spells\hand\slippery_surface.dm"
#include "code\modules\spells\hand\sunwrath.dm"
#include "code\modules\spells\targeted\_targeted.dm"
#include "code\modules\spells\targeted\analyze.dm"
#include "code\modules\spells\targeted\blood_boil.dm"
#include "code\modules\spells\targeted\ethereal_jaunt.dm"
#include "code\modules\spells\targeted\exhude_pleasantness.dm"
Expand Down
12 changes: 12 additions & 0 deletions code/modules/spellbook/_spellbook.dm
Original file line number Diff line number Diff line change
Expand Up @@ -250,3 +250,15 @@ GLOBAL_LIST_EMPTY(spells_by_categories)
/datum/spell/aoe_turf/exchange_wounds,
/datum/spell/aoe_turf/smoke,
)

// Most healing-related spells, any user
/obj/item/spellbook/healing
book_flags = NO_OWNER
allowed_spells = list(
/datum/spell/hand/analyze_health,
/datum/spell/aimed/heal_target/touch,
/datum/spell/aimed/heal_target,
/datum/spell/aimed/heal_target/major,
/datum/spell/aimed/heal_target/trance,
/datum/spell/aimed/heal_target/sacrifice,
)
2 changes: 1 addition & 1 deletion code/modules/spells/artifacts/spellbound_servants.dm
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
/datum/spell/aimed/heal_target/touch,
/datum/spell/aoe_turf/knock/slow,
/datum/spell/targeted/heal_target/area,
/datum/spell/targeted/analyze,
/datum/spell/hand/analyze_health,
/datum/spell/aimed/heal_target/trance
)

Expand Down
33 changes: 33 additions & 0 deletions code/modules/spells/hand/health_scan.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/datum/spell/hand/analyze_health
name = "Analyze Health"
desc = "Using your powers, you can detect the inner destructions of a persons body."

range = 2
level_max = list(UPGRADE_TOTAL = 2, UPGRADE_SPEED = 0, UPGRADE_POWER = 2)
charge_max = 5
invocation_type = INVOKE_WHISPER
invocation = "Fu Yi Fim"
compatible_targets = list(/mob/living/carbon/human)
hud_state = "analyze"

spell_cost = 1
mana_cost = 3

/datum/spell/hand/analyze_health/cast_hand(mob/living/carbon/human/H, mob/user)
new /obj/effect/temp_visual/temporary(get_turf(H), 5, 'icons/effects/effects.dmi', "repel_missiles")
var/skill_level = SKILL_UNTRAINED
switch(spell_levels[UPGRADE_POWER])
if(1)
skill_level = SKILL_TRAINED
if(2)
skill_level = SKILL_MAX
var/datum/browser/popup = new(user, "analyze_health", "Health Scan")
popup.set_content(display_medical_data(H.get_raw_medical_data(), skill_level))
popup.open()
return TRUE

/datum/spell/hand/analyze_health/empower_spell()
if(!..())
return FALSE

return "[src] is now more precise."
20 changes: 0 additions & 20 deletions code/modules/spells/targeted/analyze.dm

This file was deleted.

0 comments on commit 7d4a2e7

Please sign in to comment.