Various cult 2.0 bugfixes (#19944)

* Various cult 2.0 bugfixes

* Forgot

* I accidentaly removed the ability to draw runes

* Fixed a few things. Removed outdated comment.
This commit is contained in:
ShiftyRail
2018-10-04 04:38:53 +00:00
committed by Exxion
parent 6630a07d0a
commit 140a1a663e
6 changed files with 41 additions and 65 deletions

View File

@@ -7,7 +7,7 @@
/datum/faction/cult/AdminPanelEntry()
var/list/dat = ..()
dat += "<br/><a href='?src=\ref[src];cult_mindspeak_global=\ref[src]'>Voice of [eldergod]</a>"
dat += "<br/><a href='?src=\ref[src];cult_mindspeak_global=\ref[src]'>Voice of [deity_name]</a>"
return dat
/datum/faction/cult/proc/grant_runeword(mob/living/carbon/human/cult_mob, var/word)
@@ -25,7 +25,7 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa","
desc = "A group of shady blood-obsessed individuals whose souls are devoted to Nar-Sie, the Geometer of Blood.\
From his teachings, they were granted the ability to perform blood magic rituals allowing them to fight and grow their ranks, and given the goal of pushing his agenda.\
Nar-Sie's ultimate goal is to tear open a breach through reality so he can pull the station into his realm and feast on the crew's blood and souls."
deity_name = "Geometer of Blood"
deity_name = "Nar-Sie"
var/list/allwords = list("travel","self","see","hell","blood","join","tech","destroy", "other", "hide")
var/list/startwords = list("blood","join","self","hell")
var/list/bloody_floors = list()

View File

@@ -265,14 +265,11 @@ var/runedec = 0 // Rune cap ?
/obj/item/weapon/tome_legacy/New(var/datum/faction/cult/narsie/our_cult) // Multiple cults with multiple words ? Why not
if (!istype(our_cult))
our_cult = find_active_faction_by_type(/datum/faction/cult/narsie) // No cult given, let's find ours
if (!istype(our_cult))
message_admins("Error: trying to spawn a cult tome without an active cult! Create one first.")
visible_message("<span class='warning'>The tome suddendly catches fire and fades out in a dark puff of smoke.</span>")
qdel(src)
return FALSE
my_cult = our_cult
cultwords = my_cult.cult_words
return ..()
if (istype(our_cult))
my_cult = our_cult
cultwords = my_cult.cult_words
return ..()
return FALSE
/obj/item/weapon/tome_legacy/Topic(href,href_list[])
if (src.loc == usr)
@@ -358,6 +355,9 @@ var/runedec = 0 // Rune cap ?
if(!usr.canmove || usr.stat || usr.restrained())
return
if (!my_cult) // Has been spawned without a cult ; likely an emagged library console
return
if(!cultwords["travel"])
my_cult.randomiseWords()
if(islegacycultist(user))
@@ -432,42 +432,10 @@ var/runedec = 0 // Rune cap ?
if(user.get_active_hand() != src)
return
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(!H.held_items.len)
to_chat(user, "<span class='notice'>You have no hands to draw with!</span>")
return
if(H.species.anatomy_flags & NO_BLOOD) //No blood, going to have to improvise
if(H.bloody_hands) //Blood on hand to use, and hands on hand to use
user.visible_message("<span class='warning'>[user] starts to paint drawings on the floor with the blood on their hands, whilst chanting.</span>",\
"<span class='warning'>You use the blood smeared on your hands to begin drawing a rune on the floor whilst chanting the ritual that binds your life essence with the dark arcane energies flowing through the surrounding world.</span>",\
"<span class='warning'>You hear chanting.</span>")
H.bloody_hands = max(0, H.bloody_hands - 1)
else //We'll have to search around for blood
var/turf/T = get_turf(user)
var/found = 0
for (var/obj/effect/decal/cleanable/blood/B in T)
if(B.amount && B.counts_as_blood)
user.visible_message("<span class='warning'>[user] paws at the blood puddles splattered on \the [T], and begins to chant and paint symbols on the floor.</span>",\
"<span class='warning'>You use the blood splattered across \the [T], and begin drawing a rune on the floor whilst chanting the ritual that binds your life essence with the dark arcane energies flowing through the surrounding world.</span>",\
"<span class='warning'>You hear chanting.</span>")
B.amount--
found = 1
break
if(!found)
to_chat(user, "<span class='notice'>You have no blood in, on, or around you that you can use to draw a rune!</span>")
return
else
user.visible_message("<span class='warning'>[user] slices open a finger and begins to chant and paint symbols on the floor.</span>",\
"<span class='warning'>You slice open one of your fingers and begin drawing a rune on the floor whilst chanting the ritual that binds your life essence with the dark arcane energies flowing through the surrounding world.</span>",\
"<span class='warning'>You hear chanting.</span>")
H.vessel.remove_reagent(BLOOD, rand(9)+2)
user.take_overall_damage((rand(9)+1)/10) // 0.1 to 1.0 damage
else //Monkeys, diona, let's just assume it's normal apefoolery
user.visible_message("<span class='warning'>[user] slices open a finger and begins to chant and paint symbols on the floor.</span>",\
"<span class='warning'>You slice open one of your fingers and begin drawing a rune on the floor whilst chanting the ritual that binds your life essence with the dark arcane energies flowing through the surrounding world.</span>",\
"<span class='warning'>You hear chanting.</span>")
user.take_overall_damage((rand(9)+1)/10) // 0.1 to 1.0 damage
for (var/mob/V in viewers(src))
V.show_message("<span class='warning'>[user] slices open a finger and begins to chant and paint symbols on the floor.</span>", 1, "<span class='warning'>You hear chanting.</span>", 2)
to_chat(user, "<span class='warning'>You slice open one of your fingers and begin drawing a rune on the floor whilst chanting the ritual that binds your life essence with the dark arcane energies flowing through the surrounding world.</span>")
user.take_overall_damage((rand(9)+1)/10) // 0.1 to 1.0 damage
if(do_after(user, user.loc, 50))
if(user.get_active_hand() != src)
return
@@ -481,7 +449,6 @@ var/runedec = 0 // Rune cap ?
R.blood_DNA = list()
R.blood_DNA[H.dna.unique_enzymes] = H.dna.b_type
R.blood_color = H.species.blood_color
return
else
to_chat(user, "The book seems full of illegible scribbles. Is this a joke?")
return

View File

@@ -780,6 +780,7 @@
imbued_from = R
break
if (imbued_from)
T.uses = talisman_charges(T.imbue)
for (var/mob/V in viewers(src))
V.show_message("<span class='warning'>The runes turn into dust, which then forms into an arcane image on the paper.</span>", 1)
usr.say("H'drak v[pick("'","`")]loso, mir'kanas verbot!")

View File

@@ -1,7 +1,7 @@
/obj/item/weapon/paper/talisman
icon_state = "paper_talisman"
var/imbue = null
var/uses = 0
var/uses = 1
var/nullblock = 0
/obj/item/weapon/paper/talisman/update_icon()
@@ -65,7 +65,7 @@
/obj/item/weapon/paper/talisman/attack_self(mob/living/user as mob)
if(islegacycultist(user))
var/delete = 1
var/use_charge = 1
var/obj/effect/rune_legacy/R = new
R.my_cult = find_active_faction_by_type(/datum/faction/cult/narsie)
switch(imbue)
@@ -86,8 +86,7 @@
if(T1!=T2)
T1.turf_animation('icons/effects/effects.dmi',"rune_teleport")
if("communicate")
//If the user cancels the talisman this var will be set to 0
delete = R.communicate(TRUE)
use_charge = R.communicate(TRUE)
if("deafen")
deafen()
qdel(src)
@@ -100,9 +99,10 @@
if("supply")
supply()
user.take_organ_damage(5, 0)
if(src && src.imbue!="supply" && src.imbue!="runestun")
if(delete)
qdel(src)
if(use_charge)
uses--
if(!src.uses)
qdel(src)
return
else
to_chat(user, "You see strange symbols on the paper. Are they supposed to mean something?")
@@ -167,7 +167,7 @@
var/obj/item/weapon/paper/talisman/T = new /obj/item/weapon/paper/talisman(get_turf(usr))
T.imbue = "conceal"
if("communicate")
var/obj/item/weapon/paper/talisman/T = new /obj/item/weapon/paper/talisman(get_turf(usr))
var/obj/item/weapon/paper/talisman/T = new /obj/item/weapon/paper/talisman/communicate(get_turf(usr))
T.imbue = "communicate"
if("runestun")
var/obj/item/weapon/paper/talisman/T = new /obj/item/weapon/paper/talisman(get_turf(usr))
@@ -188,6 +188,9 @@
imbue = "supply"
uses = 5
/obj/item/weapon/paper/talisman/communicate
imbue = "communicate"
uses = 5
//imbued talismans invocation for a few runes, since calling the proc causes a runtime error due to src = null
/obj/item/weapon/paper/talisman/proc/runestun(var/mob/living/T as mob)//When invoked as talisman, stun and mute the target mob.
@@ -252,3 +255,12 @@
for (var/mob/V in orange(1,src))
if(!(islegacycultist(V)))
V.show_message("<span class='warning'>Dust flows from [usr]'s hands for a moment, and the world suddenly becomes quiet..</span>")
/proc/talisman_charges(var/imbue)
switch(imbue)
if("communicate")
return 5
if("supply")
return 5
else // Tele talisman's imbue is the final word.
return 1

View File

@@ -334,8 +334,8 @@
to_chat(user, "<span class='notice'>You carve out the pages from [title]! You didn't want to read it anyway.</span>")
carved = 1
return
/*
else if(istype(W, /obj/item/weapon/paper/talisman))// TODO rolefix
else if(istype(W, /obj/item/weapon/paper/talisman))
var/obj/item/weapon/paper/talisman/talisman = W
if(runestun)
to_chat(user, "<span class='notice'>There is already a talisman between the pages.</span>")
@@ -344,7 +344,6 @@
to_chat(user, "<span class='notice'>You slide the talisman between the pages.</span>")
qdel(talisman)
runestun = 1
*/

View File

@@ -17,12 +17,11 @@
/spell/rune_write/choose_targets(mob/user = usr)
return list(user)
/spell/rune_write/cast(null, mob/user = usr)/*
if(!cultwords["travel"])
runerandom()
/spell/rune_write/cast(null, mob/user = usr)
var/list/runes = list("Teleport", "Teleport Other", "Spawn a Tome", "Change Construct Type", "Convert", "EMP", "Drain Blood", "See Invisible", "Resurrect", "Hide Runes", "Reveal Runes", "Astral Journey", "Manifest a Ghost", "Imbue Talisman", "Sacrifice", "Wall", "Free Cultist", "Summon Cultist", "Deafen", "Blind", "BloodBoil", "Communicate", "Stun")
var/r = input(user, "Choose a rune to scribe", "Rune Scribing") in runes //not cancellable.
var/obj/effect/rune/R = new /obj/effect/rune(user.loc)
var/obj/effect/rune_legacy/R = new /obj/effect/rune_legacy(user.loc)
var/list/cultwords = R.cultwords
if(istype(user.loc,/turf))
switch(r)
if("Teleport")
@@ -170,6 +169,4 @@
R.word3=cultwords["technology"]
R.check_icon()
else
to_chat(user, "<span class='warning'>You do not have enough space to write a proper rune.</span>")
return
*/
to_chat(user, "<span class='warning'>You do not have enough space to write a proper rune.</span>")