Skip to content

Commit

Permalink
coercion spells (molti dont be mad)
Browse files Browse the repository at this point in the history
  • Loading branch information
cowbot92 committed Jul 8, 2024
1 parent caeaf27 commit 538d012
Show file tree
Hide file tree
Showing 5 changed files with 170 additions and 38 deletions.
28 changes: 22 additions & 6 deletions code/modules/psionics/complexus/complexus_process.dm
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@
if(get_rank(PSI_COERCION) == 2)
var/datum/action/cooldown/spell/pointed/disarm/disarm = new(owner)
disarm.Grant(owner)
var/datum/action/cooldown/spell/list_target/telepathy/psionic/telepathy = new(owner)
telepathy.Grant(owner)
var/datum/action/cooldown/spell/pointed/psychic_scream/scream = new(owner)
scream.Grant(owner)
if(get_rank(PSI_PSYCHOKINESIS) == 2)
var/datum/action/cooldown/spell/pointed/projectile/fireball/ranged_touch = new(owner)
ranged_touch.Grant(owner)
Expand All @@ -70,8 +74,13 @@

//master level psionics
if(get_rank(PSI_COERCION) == 3)
var/datum/action/cooldown/spell/pointed/projectile/fireball/ranged_touch = new(owner)
ranged_touch.Grant(owner)
var/datum/action/cooldown/spell/disarm = locate(/datum/action/cooldown/spell/pointed/disarm) in owner.actions
if(disarm)
disarm.Remove(owner)
var/datum/action/cooldown/spell/pointed/disarm/master/disarm_master = new(owner)
disarm_master.Grant(owner)
var/datum/action/cooldown/spell/pointed/psychic_scream/psy_scream= new(owner)
psy_scream.Grant(owner)
if(get_rank(PSI_PSYCHOKINESIS) == 3)
var/datum/action/cooldown/spell/pointed/projectile/fireball/ranged_touch = new(owner)
ranged_touch.Grant(owner)
Expand All @@ -84,8 +93,11 @@

//grandmaster level psionics
if(get_rank(PSI_COERCION) == 4)
var/datum/action/cooldown/spell/pointed/projectile/fireball/ranged_touch = new(owner)
ranged_touch.Grant(owner)
var/datum/action/cooldown/spell/disarm_master = locate(/datum/action/cooldown/spell/pointed/disarm/master) in owner.actions
if(disarm_master)
disarm_master.Remove(owner)
var/datum/action/cooldown/spell/pointed/disarm/grandmaster/disarm_gmaster = new(owner)
disarm_gmaster.Grant(owner)
if(get_rank(PSI_PSYCHOKINESIS) == 4)
var/datum/action/cooldown/spell/pointed/projectile/fireball/ranged_touch = new(owner)
ranged_touch.Grant(owner)
Expand All @@ -98,8 +110,12 @@

//paramount psionics
if(get_rank(PSI_COERCION) == 5)
var/datum/action/cooldown/spell/pointed/projectile/fireball/ranged_touch = new(owner)
ranged_touch.Grant(owner)
var/datum/action/cooldown/spell/disarm_gmaster = locate(/datum/action/cooldown/spell/pointed/disarm/grandmaster) in owner.actions
if(disarm_gmaster)
disarm_gmaster.Remove(owner)

var/datum/action/cooldown/spell/pointed/dis_arm/dis_arm = new(owner)
dis_arm.Grant(owner)
if(get_rank(PSI_PSYCHOKINESIS) == 5)
var/datum/action/cooldown/spell/pointed/projectile/fireball/ranged_touch = new(owner)
ranged_touch.Grant(owner)
Expand Down
29 changes: 16 additions & 13 deletions code/modules/psionics/faculties/coercion.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,6 @@
/datum/psionic_power/coercion
faculty = PSI_COERCION


/datum/psionic_power/coercion/mental_freezing
name = "Cognitive Manipulation"
min_rank = PSI_RANK_GRANDMASTER
use_description = "Further increase heat cooldown by another 30%"

/datum/psionic_power/coercion/psychic_scream
name = "Psychic Scream"
cost = 50
cooldown = 30 SECONDS
min_rank = PSI_RANK_MASTER
use_description = "Send a blast of psychic energy to another person's mind, applying stamina damage to them."

/datum/psionic_power/coercion/telepathy
name = "Telepathy"
cost = 30
Expand All @@ -41,3 +28,19 @@
min_rank = PSI_RANK_OPERANT
use_description = "Passively upgrades your heat-cooldown by 20%."

/datum/psionic_power/coercion/psychic_scream
name = "Psychic Scream"
cost = 50
cooldown = 30 SECONDS
min_rank = PSI_RANK_MASTER
use_description = "Send a blast of psychic energy to another person's mind, applying stamina damage to them."

/datum/psionic_power/coercion/mental_freezing
name = "Cognitive Manipulation"
min_rank = PSI_RANK_GRANDMASTER
use_description = "Further increase heat cooldown by another 30%"





36 changes: 20 additions & 16 deletions code/modules/psionics/faculties/energistics.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,6 @@
/datum/psionic_power/energistics
faculty = PSI_ENERGISTICS

/datum/psionic_power/energistics/disrupt
name = "Disrupt"
cost = 60
heat = 60
cooldown = 60 SECONDS
min_rank = PSI_RANK_GRANDMASTER
use_description = "Target the head, eyes or mouth while on harm intent to use a melee attack that causes a localized electromagnetic pulse."

/datum/psionic_power/energistics/shock_touch
name = "Shock Touch"
cost = 50
heat = 100
cooldown = 30 SECONDS
min_rank = PSI_RANK_MASTER
use_description = "Grants the ability to charge electricity in the user's hand, shocking anyone touched."

/datum/psionic_power/energistics/spark
name = "Spark"
cost = 1
Expand All @@ -40,3 +24,23 @@
name = "Temperature Regulation"
min_rank = PSI_RANK_OPERANT
use_description = "Passively allows the user to regulate their body temperature."

/datum/psionic_power/energistics/shock_touch
name = "Shock Touch"
cost = 50
heat = 100
cooldown = 30 SECONDS
min_rank = PSI_RANK_MASTER
use_description = "Grants the ability to charge electricity in the user's hand, shocking anyone touched."

/datum/psionic_power/energistics/disrupt
name = "Disrupt"
cost = 60
heat = 60
cooldown = 60 SECONDS
min_rank = PSI_RANK_GRANDMASTER
use_description = "Target the head, eyes or mouth while on harm intent to use a melee attack that causes a localized electromagnetic pulse."




Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
///operant level spells
/datum/action/cooldown/spell/pointed/disarm
name = "Disarm"
desc = "This spell will allow you to disarm someone within 1 tile."
Expand All @@ -11,8 +12,21 @@

spell_requirements = SPELL_CASTABLE_WITHOUT_INVOCATION | SPELL_REQUIRES_NO_ANTIMAGIC

antimagic_flags = MAGIC_RESISTANCE_MIND

active_msg = "You prepare to disarm a target..."

/datum/action/cooldown/spell/pointed/disarm/master

desc = "This spell will allow you to disarm someone within 3 tile."
cooldown_time = 25 SECONDS
cast_range = 3

/datum/action/cooldown/spell/pointed/disarm/grandmaster

desc = "This spell will allow you to disarm someone within 5 tile."
cooldown_time = 15 SECONDS
cast_range = 5

/datum/action/cooldown/spell/pointed/disarm/is_valid_target(atom/cast_on)
. = ..()
Expand All @@ -21,9 +35,6 @@
if(!ishuman(cast_on))
return FALSE

var/mob/living/carbon/human/human_target = cast_on
return !is_blind(human_target)

/datum/action/cooldown/spell/pointed/disarm/cast(mob/living/carbon/human/cast_on)
. = ..()
if(cast_on.can_block_magic(antimagic_flags))
Expand All @@ -37,3 +48,100 @@
if(istype(I))
cast_on.dropItemToGround(I)
return TRUE

/datum/action/cooldown/spell/pointed/dis_arm

name = "Dis-arm"
desc = "This spell will allow you to dis-arm someone within 10 tile."
button_icon_state = "blind"
ranged_mousepointer = 'icons/effects/mouse_pointers/blind_target.dmi'

sound = 'sound/effects/psi/power_used.ogg'
school = SCHOOL_PSIONIC
cooldown_time = 60 SECONDS
cast_range = 10

spell_requirements = SPELL_CASTABLE_WITHOUT_INVOCATION | SPELL_REQUIRES_NO_ANTIMAGIC

antimagic_flags = MAGIC_RESISTANCE_MIND

active_msg = "You prepare to disarm a target..."

/datum/action/cooldown/spell/pointed/dis_arm/is_valid_target(atom/cast_on)
. = ..()
if(!.)
return FALSE
if(!ishuman(cast_on))
return FALSE

/datum/action/cooldown/spell/pointed/dis_arm/cast(mob/living/carbon/human/cast_on)
. = ..()
if(cast_on.can_block_magic(antimagic_flags))
to_chat(cast_on, span_notice("You feel like someone just tried to shake your hand..."))
to_chat(owner, span_warning("The psionic had no effect!"))
return FALSE

to_chat(cast_on, span_warning("You feel an invisible force rip off your arms!"))
if(iscarbon(cast_on))
var/mob/living/carbon/CM = cast_on
for(var/obj/item/bodypart/bodypart in CM.bodyparts)
if(!(bodypart.body_part & (HEAD|CHEST|LEGS)))
if(bodypart.dismemberable)
bodypart.dismember()
return TRUE

/datum/action/cooldown/spell/list_target/telepathy/psionic

name = "Psionic Telepathy"
desc = "Telepathically transmits a message to the target."
button_icon = 'icons/mob/actions/actions_revenant.dmi'
button_icon_state = "r_transmit"

cooldown_time = 5 SECONDS

spell_requirements = SPELL_CASTABLE_WITHOUT_INVOCATION | SPELL_REQUIRES_NO_ANTIMAGIC

antimagic_flags = MAGIC_RESISTANCE_MIND

choose_target_message = "Choose a target to whisper to."

///master level spells

/datum/action/cooldown/spell/pointed/psychic_scream
name = "Psychic Scream"
desc = "This spell sends a blast of psychic energy to another person, heavily damaging their mental stamina."
button_icon_state = "blind"
ranged_mousepointer = 'icons/effects/mouse_pointers/blind_target.dmi'

sound = 'sound/effects/psi/power_used.ogg'
school = SCHOOL_PSIONIC
cooldown_time = 30 SECONDS
cast_range = 3

spell_requirements = SPELL_CASTABLE_WITHOUT_INVOCATION | SPELL_REQUIRES_NO_ANTIMAGIC

antimagic_flags = MAGIC_RESISTANCE_MIND

active_msg = "You prepare to send a blast of psionic energy at a target..."


/datum/action/cooldown/spell/pointed/psychic_scream/is_valid_target(atom/cast_on)
. = ..()
if(!.)
return FALSE
if(!ishuman(cast_on))
return FALSE

var/mob/living/carbon/human/human_target = cast_on
return !is_blind(human_target)

/datum/action/cooldown/spell/pointed/psychic_scream/cast(mob/living/carbon/human/cast_on)
. = ..()
if(cast_on.can_block_magic(antimagic_flags))
to_chat(cast_on, span_notice("You feel like someone turned their speakers on too loud..."))
to_chat(owner, span_warning("The psionic had no effect!"))
return FALSE

to_chat(cast_on, span_warning("You feel an invisible force punch your brain!"))
cast_on.adjustStaminaLoss(25)
return TRUE
1 change: 1 addition & 0 deletions code/modules/psionics/interfaces/ui.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ obj/screen/psi
invisibility = 101
else
invisibility = 0
. = ..()

0 comments on commit 538d012

Please sign in to comment.