Skip to content

Commit

Permalink
Clockcult combat changes (tgstation#29326)
Browse files Browse the repository at this point in the history
* Clockcult combat changes

* boom

* nah, less

* text changes

* compile

* more compile
  • Loading branch information
ChangelingRain authored and KorPhaeron committed Jul 28, 2017
1 parent 3044769 commit eda1a04
Show file tree
Hide file tree
Showing 11 changed files with 69 additions and 251 deletions.
1 change: 1 addition & 0 deletions code/__DEFINES/clockcult.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

GLOBAL_VAR_INIT(clockwork_construction_value, 0) //The total value of all structures built by the clockwork cult
GLOBAL_VAR_INIT(clockwork_caches, 0) //How many clockwork caches exist in the world (not each individual)
GLOBAL_VAR_INIT(clockwork_vitality, 0) //How much Vitality is stored, total
GLOBAL_LIST_EMPTY(active_daemons) //A list of all active tinkerer's daemons
GLOBAL_LIST_EMPTY(all_clockwork_objects) //All clockwork items, structures, and effects in existence
GLOBAL_LIST_EMPTY(all_clockwork_mobs) //All clockwork SERVANTS (not creatures) in existence
Expand Down
26 changes: 11 additions & 15 deletions code/game/gamemodes/clock_cult/clock_effects/clock_sigils.dm
Original file line number Diff line number Diff line change
Expand Up @@ -326,20 +326,19 @@
stat_affected = DEAD
resist_string = "glows shimmering yellow"
sigil_name = "Vitality Matrix"
var/static/vitality = 0
var/base_revive_cost = 20
var/revive_cost = 150
var/sigil_active = FALSE
var/animation_number = 3 //each cycle increments this by 1, at 4 it produces an animation and resets
var/static/list/damage_heal_order = list(CLONE, TOX, BURN, BRUTE, OXY) //we heal damage in this order

/obj/effect/clockwork/sigil/vitality/examine(mob/user)
..()
if(is_servant_of_ratvar(user) || isobserver(user))
to_chat(user, "<span class='[vitality ? "inathneq_small":"alloy"]'>It has access to <b>[GLOB.ratvar_awakens ? "INFINITE":"[vitality]"]</b> units of vitality.</span>")
to_chat(user, "<span class='[GLOB.clockwork_vitality ? "inathneq_small":"alloy"]'>It has access to <b>[GLOB.ratvar_awakens ? "INFINITE":GLOB.clockwork_vitality]</b> units of vitality.</span>")
if(GLOB.ratvar_awakens)
to_chat(user, "<span class='inathneq_small'>It can revive Servants at no cost!</span>")
else
to_chat(user, "<span class='inathneq_small'>It can revive Servants at a cost of <b>[base_revive_cost]</b> vitality plus vitality equal to the non-oxygen damage they have, in addition to being destroyed in the process.</span>")
to_chat(user, "<span class='inathneq_small'>It can revive Servants at a cost of <b>[revive_cost]</b> vitality.</span>")

/obj/effect/clockwork/sigil/vitality/sigil_effects(mob/living/L)
if((is_servant_of_ratvar(L) && L.suiciding) || sigil_active)
Expand All @@ -348,7 +347,7 @@
animate(src, alpha = 255, time = 10, flags = ANIMATION_END_NOW) //we may have a previous animation going. finish it first, then do this one without delay.
sleep(10)
//as long as they're still on the sigil and are either not a servant or they're a servant AND it has remaining vitality
while(L && (!is_servant_of_ratvar(L) || (is_servant_of_ratvar(L) && (GLOB.ratvar_awakens || vitality))) && get_turf(L) == get_turf(src))
while(L && (!is_servant_of_ratvar(L) || (is_servant_of_ratvar(L) && (GLOB.ratvar_awakens || GLOB.clockwork_vitality))) && get_turf(L) == get_turf(src))
sigil_active = TRUE
if(animation_number >= 4)
new /obj/effect/temp_visual/ratvar/sigil/vitality(get_turf(src))
Expand All @@ -373,40 +372,37 @@
else
vitality_drained = L.adjustToxLoss(1.5)
if(vitality_drained)
vitality += vitality_drained
GLOB.clockwork_vitality += vitality_drained
else
break
else
if(L.stat == DEAD)
var/revival_cost = base_revive_cost + L.getCloneLoss() + L.getToxLoss() + L.getFireLoss() + L.getBruteLoss() //ignores oxygen damage
var/revival_cost = revive_cost
if(GLOB.ratvar_awakens)
revival_cost = 0
var/mob/dead/observer/ghost = L.get_ghost(TRUE)
if(vitality >= revival_cost && (ghost || (L.mind && L.mind.active)))
if(GLOB.clockwork_vitality >= revival_cost && (ghost || (L.mind && L.mind.active)))
if(ghost)
ghost.reenter_corpse()
L.revive(1, 1)
var/obj/effect/temp_visual/ratvar/sigil/vitality/V = new /obj/effect/temp_visual/ratvar/sigil/vitality(get_turf(src))
animate(V, alpha = 0, transform = matrix()*2, time = 8)
playsound(L, 'sound/magic/staff_healing.ogg', 50, 1)
L.visible_message("<span class='warning'>[L] suddenly gets back up, [GLOB.ratvar_awakens ? "[L.p_their()] body dripping blue ichor":"even as [src] scatters into blue sparks around [L.p_them()]"]!</span>", \
"<span class='inathneq'>\"[text2ratvar("You will be okay, child.")]\"</span>")
vitality -= revival_cost
if(!GLOB.ratvar_awakens)
qdel(src)
L.visible_message("<span class='warning'>[L] suddenly gets back up, [L.p_their()] body dripping blue ichor!</span>", "<span class='inathneq'>\"[text2ratvar("You will be okay, child.")]\"</span>")
GLOB.clockwork_vitality -= revival_cost
break
var/vitality_for_cycle = 3
if(!GLOB.ratvar_awakens)
if(L.stat == CONSCIOUS)
vitality_for_cycle = 2
vitality_for_cycle = min(vitality, vitality_for_cycle)
vitality_for_cycle = min(GLOB.clockwork_vitality, vitality_for_cycle)
var/vitality_used = L.heal_ordered_damage(vitality_for_cycle, damage_heal_order)

if(!vitality_used)
break

if(!GLOB.ratvar_awakens)
vitality -= vitality_used
GLOB.clockwork_vitality -= vitality_used

sleep(2)

Expand Down
23 changes: 0 additions & 23 deletions code/game/gamemodes/clock_cult/clock_helpers/slab_abilities.dm
Original file line number Diff line number Diff line change
Expand Up @@ -145,29 +145,6 @@

return TRUE

//For the Volt Void scripture, fires a ray of energy at a target location
/obj/effect/proc_holder/slab/volt
ranged_mousepointer = 'icons/effects/volt_target.dmi'

/obj/effect/proc_holder/slab/volt/InterceptClickOn(mob/living/caller, params, atom/target)
if(target == slab || ..()) //we can't cancel
return TRUE

var/turf/T = ranged_ability_user.loc
if(!isturf(T))
return TRUE

if(target in view(7, get_turf(ranged_ability_user)))
successful = TRUE
ranged_ability_user.visible_message("<span class='warning'>[ranged_ability_user] fires a ray of energy at [target]!</span>", "<span class='nzcrentr'>You fire a volt ray at [target].</span>")
playsound(ranged_ability_user, 'sound/effects/light_flicker.ogg', 50, 1)
T = get_turf(target)
new/obj/effect/temp_visual/ratvar/volt_hit(T, ranged_ability_user)
add_logs(ranged_ability_user, T, "fired a volt ray")
remove_ranged_ability()

return TRUE

//For the cyborg Linked Vanguard scripture, grants you and a nearby ally Vanguard
/obj/effect/proc_holder/slab/vanguard
ranged_mousepointer = 'icons/effects/vanguard_target.dmi'
Expand Down
24 changes: 12 additions & 12 deletions code/game/gamemodes/clock_cult/clock_items/clockwork_slab.dm
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,11 @@
quickbound = list(/datum/clockwork_scripture/ranged_ability/linked_vanguard, /datum/clockwork_scripture/ranged_ability/sentinels_compromise, \
/datum/clockwork_scripture/create_object/vitality_matrix, /datum/clockwork_scripture/channeled/mending_mantra, /datum/clockwork_scripture/fellowship_armory)

/obj/item/clockwork/slab/cyborg/security //four scriptures, plus a spear
quickbound = list(/datum/clockwork_scripture/channeled/belligerent, /datum/clockwork_scripture/ranged_ability/judicial_marker, /datum/clockwork_scripture/channeled/taunting_tirade, \
/datum/clockwork_scripture/channeled/volt_blaster)
/obj/item/clockwork/slab/cyborg/security //three scriptures, plus a spear
quickbound = list(/datum/clockwork_scripture/channeled/belligerent, /datum/clockwork_scripture/ranged_ability/judicial_marker, /datum/clockwork_scripture/channeled/taunting_tirade)

/obj/item/clockwork/slab/cyborg/peacekeeper //four scriptures, plus a spear
quickbound = list(/datum/clockwork_scripture/channeled/belligerent, /datum/clockwork_scripture/ranged_ability/judicial_marker, /datum/clockwork_scripture/channeled/taunting_tirade, \
/datum/clockwork_scripture/channeled/volt_blaster)
/obj/item/clockwork/slab/cyborg/peacekeeper //three scriptures, plus a spear
quickbound = list(/datum/clockwork_scripture/channeled/belligerent, /datum/clockwork_scripture/ranged_ability/judicial_marker, /datum/clockwork_scripture/channeled/taunting_tirade)

/obj/item/clockwork/slab/cyborg/janitor //five scriptures, plus a fabricator
quickbound = list(/datum/clockwork_scripture/create_object/replicant, /datum/clockwork_scripture/create_object/sigil_of_transgression, \
Expand All @@ -74,8 +72,8 @@
quickbound = list(/datum/clockwork_scripture/create_object/replicant, /datum/clockwork_scripture/create_object/tinkerers_cache, \
/datum/clockwork_scripture/spatial_gateway, /datum/clockwork_scripture/fellowship_armory, /datum/clockwork_scripture/create_object/clockwork_obelisk)

/obj/item/clockwork/slab/cyborg/miner //three scriptures, plus a spear and xray vision
quickbound = list(/datum/clockwork_scripture/ranged_ability/linked_vanguard, /datum/clockwork_scripture/spatial_gateway, /datum/clockwork_scripture/channeled/volt_blaster)
/obj/item/clockwork/slab/cyborg/miner //two scriptures, plus a spear and xray vision
quickbound = list(/datum/clockwork_scripture/ranged_ability/linked_vanguard, /datum/clockwork_scripture/spatial_gateway)

/obj/item/clockwork/slab/cyborg/access_display(mob/living/user)
if(!GLOB.ratvar_awakens)
Expand Down Expand Up @@ -400,18 +398,19 @@
dat += "<font color=#BE8700><b>Servant:</b></font> A person or robot who serves Ratvar. You are one of these.<br>"
dat += "<font color=#BE8700><b>Cache:</b></font> A <i>Tinkerer's Cache</i>, which is a structure that stores and creates components.<br>"
dat += "<font color=#BE8700><b>CV:</b></font> Construction Value. All clockwork structures, floors, and walls increase this number.<br>"
dat += "<font color=#BE8700><b>Vitality:</b></font> Used for healing effects, produced by Ratvarian spear attacks and Vitality Matrices.<br>"
dat += "<font color=#BE8700><b>Geis:</b></font> An important scripture used to make normal crew and robots into Servants of Ratvar.<br>"
dat += "<font color=#6E001A><b>[get_component_icon(BELLIGERENT_EYE)]BE:</b></font> Belligerent Eye, a component type used in offensive scriptures.<br>"
dat += "<font color=#1E8CE1><b>[get_component_icon(VANGUARD_COGWHEEL)]VC:</b></font> Vanguard Cogwheel, a component type used in defensive scriptures.<br>"
dat += "<font color=#AF0AAF><b>[get_component_icon(GEIS_CAPACITOR)]GC:</b></font> Geis Capacitor, a component type used in mind-related scriptures.<br>"
dat += "<font color=#5A6068><b>[get_component_icon(REPLICANT_ALLOY)]RA:</b></font> Replicant Alloy, a component type used in construction scriptures.<br>"
dat += "<font color=#DAAA18><b>[get_component_icon(HIEROPHANT_ANSIBLE)]HA:</b></font> Hierophant Ansible, a component type used in energy scriptures.<br>"
dat += "<font color=#DAAA18><b>[get_component_icon(HIEROPHANT_ANSIBLE)]HA:</b></font> Hierophant Ansible, a component type used in energy-related scriptures.<br>"
dat += "<font color=#BE8700><b>Ark:</b></font> The cult's win condition, a huge structure that needs to be defended.<br><br>"
dat += "<font color=#BE8700 size=3>Items</font><br>"
dat += "<font color=#BE8700><b>Slab:</b></font> A clockwork slab, a Servant's most important tool. You're holding one! Keep it safe and hidden.<br>"
dat += "<font color=#BE8700><b>Visor:</b></font> A judicial visor, which is a pair of glasses that can stun everything in an area after a delay.<br>"
dat += "<font color=#BE8700><b>Visor:</b></font> A judicial visor, which is a pair of glasses that can smite an area for a brief stun and delayed explosion.<br>"
dat += "<font color=#BE8700><b>Wraith Specs:</b></font> Wraith spectacles, which provide true sight (x-ray, night vision) but damage the wearer's eyes.<br>"
dat += "<font color=#BE8700><b>Spear:</b></font> A Ratvarian spear, which is a very powerful melee weapon.<br>"
dat += "<font color=#BE8700><b>Spear:</b></font> A Ratvarian spear, which is a very powerful melee weapon that produces Vitality.<br>"
dat += "<font color=#BE8700><b>Fabricator:</b></font> A replica fabricator, which converts objects into clockwork versions.<br><br>"
dat += "<font color=#BE8700 size=3>Constructs</font><br>"
dat += "<font color=#BE8700><b>Marauder:</b></font> A clockwork marauder, which is a powerful bodyguard that hides in its owner.<br><br>"
Expand All @@ -425,6 +424,7 @@
dat += "<i>Note: Sigils can be stacked on top of one another, making certain sigils very effective when paired!</i><br>"
dat += "<font color=#BE8700><b>Transgression:</b></font> Stuns the first non-Servant to cross it for ten seconds and blinds others nearby. Disappears on use.<br>"
dat += "<font color=#BE8700><b>Submission:</b></font> Converts the first non-Servant to stand on the sigil for seven seconds. Disappears on use.<br>"
dat += "<font color=#BE8700><b>Matrix:</b></font> Drains health from non-Servants, producing Vitality. Can heal and revive Servants.<br>"
dat += "<font color=#BE8700><b>Accession:</b></font> Identical to the Sigil of Submission, but doesn't disappear on use. It can also convert a single mindshielded target, but will disappear after doing this.<br>"
dat += "<font color=#BE8700><b>Transmission:</b></font> Drains and stores power for clockwork structures. Feeding it brass sheets will create additional power.<br><br>"
dat += "<font color=#BE8700 size=3>-=-=-=-=-=-</font>"
Expand Down Expand Up @@ -458,7 +458,7 @@
dat += "<b>Components</b> are your primary resource as a Servant. There are five types of component, with each one being used in different roles:<br><br>"
dat += "<font color=#6E001A>[get_component_icon(BELLIGERENT_EYE)]BE</font> Belligerent Eyes are aggressive and judgemental, and are used in offensive scripture;<br>"
dat += "<font color=#1E8CE1>[get_component_icon(VANGUARD_COGWHEEL)]VC</font> Vanguard Cogwheels are defensive and repairing, and are used in defensive scripture;<br>"
dat += "<font color=#AF0AAF>[get_component_icon(GEIS_CAPACITOR)]GC</font> Geis Capacitors are for conversion and control, and are used in mind-related scripture;<br>" //References the old name
dat += "<font color=#AF0AAF>[get_component_icon(GEIS_CAPACITOR)]GC</font> Geis Capacitors are for conversion and control, and are used in mind-related scripture;<br>"
dat += "<font color=#5A6068>[get_component_icon(REPLICANT_ALLOY)]RA</font> Replicant Alloy is a strong, malleable metal and is used for construction and creation;<br>"
dat += "<font color=#DAAA18>[get_component_icon(HIEROPHANT_ANSIBLE)]HA</font> Hierophant Ansibles are for transmission and power, and are used in power and teleportation scripture<br><br>"
dat += "Although this is a good rule of thumb, their effects become much more nuanced when used together. For instance, a turret might have both belligerent eyes and \
Expand Down
21 changes: 13 additions & 8 deletions code/game/gamemodes/clock_cult/clock_items/judicial_visor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
return TRUE
return FALSE

//Judicial marker: Created by the judicial visor. After three seconds, knocks down any non-Servants nearby and damages Nar-Sian cultists.
//Judicial marker: Created by the judicial visor. Immediately applies Belligerent and briefly knocks down, then after 3 seconds does large damage and briefly knocks down again
/obj/effect/clockwork/judicial_marker
name = "judicial marker"
desc = "You get the feeling that you shouldn't be standing here."
Expand All @@ -165,11 +165,18 @@
/obj/effect/clockwork/judicial_marker/proc/judicialblast()
playsound(src, 'sound/magic/magic_missile.ogg', 50, 1, 1, 1)
flick("judicial_marker", src)
for(var/mob/living/carbon/C in range(1, src))
var/datum/status_effect/belligerent/B = C.apply_status_effect(STATUS_EFFECT_BELLIGERENT)
if(!QDELETED(B))
B.duration = world.time + 30
C.Knockdown(5) //knocks down for half a second if affected
sleep(16)
name = "judicial blast"
layer = ABOVE_ALL_MOB_LAYER
flick("judicial_explosion", src)
set_light(1.4, 2, "#B451A1")
sleep(13)
name = "judicial explosion"
var/targetsjudged = 0
playsound(src, 'sound/effects/explosionfar.ogg', 100, 1, 1, 1)
set_light(0)
Expand All @@ -181,21 +188,19 @@
L.visible_message("<span class='warning'>Strange energy flows into [L]'s [I.name]!</span>", \
"<span class='userdanger'>Your [I.name] shields you from [src]!</span>")
continue
L.Knockdown(15) //knocks down briefly when exploding
if(!iscultist(L))
L.visible_message("<span class='warning'>[L] is struck by a judicial explosion!</span>", \
"<span class='userdanger'>[!issilicon(L) ? "An unseen force slams you into the ground!" : "ERROR: Motor servos disabled by external source!"]</span>")
L.Knockdown(160) //knocks down targets for 14-16 seconds
else
L.visible_message("<span class='warning'>[L] is struck by a judicial explosion!</span>", \
"<span class='heavy_brass'>\"Keep an eye out, filth.\"</span>\n<span class='userdanger'>A burst of heat crushes you against the ground!</span>")
L.Knockdown(80) //knocks down for 6-8 seconds, but set cultist targets on fire
L.adjust_fire_stacks(2)
L.adjust_fire_stacks(2) //sets cultist targets on fire
L.IgniteMob()
if(iscarbon(L))
var/mob/living/carbon/C = L
C.silent += 6
L.adjustFireLoss(5)
targetsjudged++
L.adjustBruteLoss(10) //do a small amount of damage
if(!QDELETED(L))
L.adjustBruteLoss(20) //does a decent amount of damage
add_logs(user, L, "struck with a judicial blast")
to_chat(user, "<span class='brass'><b>[targetsjudged ? "Successfully judged <span class='neovgre'>[targetsjudged]</span>":"Judged no"] heretic[targetsjudged == 1 ? "":"s"].</b></span>")
sleep(3) //so the animation completes properly
Expand Down
Loading

0 comments on commit eda1a04

Please sign in to comment.