[Cult 3.0] Tomes & Talismans, Runes III & IV, Books in-hands (#18817)

* arcane tomes and talismans

* fixes

* defines

* feedback

* user type cult

* derp
This commit is contained in:
DeityLink
2018-07-15 00:06:44 +02:00
committed by MadmanMartian
parent 67a8746e9e
commit 8efa8aadad
21 changed files with 705 additions and 59 deletions

View File

@@ -52,3 +52,13 @@
#define BE_TRAITOR "Be_Traitor" #define BE_TRAITOR "Be_Traitor"
#define BE_PAI "Be_PAI" #define BE_PAI "Be_PAI"
#define BE_NINJA "Be_Ninja" #define BE_NINJA "Be_Ninja"
#define TOME_CLOSED 1
#define TOME_OPEN 2
#define RUNE_CAN_ATTUNE 0
#define RUNE_CAN_IMBUE 1
#define RUNE_CANNOT 2
#define MAX_TALISMAN_PER_TOME 5

View File

@@ -1,16 +1,355 @@
#define PAGE_FOREWORD 0
#define PAGE_LORE1 101
var/list/arcane_tomes = list()
///////////////////////////////////////ARCANE TOME////////////////////////////////////////////////
/obj/item/weapon/tome /obj/item/weapon/tome
name = "arcane tome" name = "arcane tome"
desc = "An old, dusty tome with frayed edges and a sinister looking cover." desc = "A dark, dusty tome with frayed edges and a sinister looking cover. It's surface is hard and cold to the touch."
icon = 'icons/obj/cult.dmi' icon = 'icons/obj/cult.dmi'
icon_state ="tome" icon_state ="tome"
inhand_states = list("left_hand" = 'icons/mob/in-hand/left/books.dmi', "right_hand" = 'icons/mob/in-hand/right/books.dmi')
item_state = "tome"
throw_speed = 1 throw_speed = 1
throw_range = 5 throw_range = 5
w_class = W_CLASS_SMALL w_class = W_CLASS_SMALL
flags = FPRINT flags = FPRINT
var/state = TOME_CLOSED
var/can_flick = 1
var/list/talismans = list()
var/current_page = PAGE_FOREWORD
/obj/item/weapon/tome/New()
..()
arcane_tomes.Add(src)
/obj/item/weapon/tome/Destroy()
arcane_tomes.Remove(src)
for(var/obj/O in talismans)
talismans.Remove(O)
qdel(O)
talismans = list()
..()
/obj/item/weapon/tome/proc/tome_text()
var/page_data = null
var/dat = {"<title>arcane tome</title><body style="color:#5C1D12" background="tomebg.png">
<style>
label {display: inline-block; width: 50px;text-align: right;float: left;margin: 0 0 0 -45px;}
ul {list-style-type: none;}
li:before {content: "-";padding-left: 4px;}
a {text-decoration: none; color:#5C1D12}
.column {float: left; width: 250px; padding: 0px; height: 300px;}
.row:after {content: ""; display: table; clear: both;}
</style>
<div class="row">
<div class="column">
<div align="center" style="margin: 0 0 0 -10px;"><div style="font-size:20px"><b>The scriptures of <font color=#AE250F>Nar-Sie</b></font></div>The Geometer of Blood</div>
<ul>
<a href='byond://?src=\ref[src];page=[PAGE_FOREWORD]'><label> * </label> <li> Foreword</a> </li>"}
var i = 1
for(var/subtype in subtypesof(/datum/rune_spell))
var/datum/rune_spell/instance = subtype
if (initial(instance.Act_restriction) <= 1000)//TODO: SET TO CURRENT CULT FACTION ACT
dat += "<a href='byond://?src=\ref[src];page=[i]'><label> \Roman[i] </label> <li> [initial(instance.name)] </li></a>"
if (i == current_page)
var/datum/cultword/word1 = initial(instance.word1)
var/datum/cultword/word2 = initial(instance.word2)
var/datum/cultword/word3 = initial(instance.word3)
page_data = {"<div align="center"><b>\Roman[i]<br>[initial(instance.name)]</b><br><i>[initial(word1.english)], [initial(word2.english)], [word3 ? "[initial(word3.english)]" : "<any>"]</i></div><br>"}
page_data += initial(instance.page)
else
dat += "<label> \Roman[i] </label> <li> __________ </li>"
i++
dat += {"<a href='byond://?src=\ref[src];page=[PAGE_LORE1]'><label> * </label> <li> about this tome and our goal </li></a>
</ul></div>
<div class="column"> <div align="left"> <b><ul>"}
for (var/obj/item/weapon/talisman/T in talismans)
var/datum/rune_spell/instance = T.spell_type
var/talisman_name = "\[blank\]"
if (instance)
talisman_name = initial(instance.name)
dat += {"<label> * </label><li> <a style="color:#AE250F" href='byond://?src=\ref[src];talisman=\ref[T]'>[talisman_name]</a> <a style="color:#AE250F" href='byond://?src=\ref[src];remove=\ref[T]'>(x)</a> </li>"}
dat += {"</ul></b></div><div style="margin: 0px 20px;" align="justify">"}
if (page_data)
dat += page_data
else
dat += page_special()
dat += {"</div></div></div></body>"}
return dat
/obj/item/weapon/tome/proc/page_special()
var/dat = null
switch (current_page)
if (PAGE_FOREWORD)
dat = {"<div align="center"><b>Foreword</b></div><br>
This tome in your hands is both a guide to the ways of the devotes to Nar-Sie, and a tool to help them performing the cult's rituals.
Inside are gathered notes on the various rituals, which you can read to study their use, and learn their runes. You don't have to learn
the runes by heart however, as keeping this tome open allows you to immediately remember them when tracing words. Additional pieces of lore
are available in the latter pages, aiming to satisfy the curiosity of the assiduous cultists.
"}
if (PAGE_LORE1)
dat = {"<div align="center"><b>About this tome and our goal</b></div><br>
This tome was written under the guidance of Nar-Sie, by devotes who have left behind their flesh enveloppes and taken residence in the realm of the Geometer of Blood.
Our goal is to help our kin in the physical world, that is you, achieve the Tear Reality ritual, so that you can all join us and bring along lots of value, in other words blood.
This goal has been achieved countless times before by different beings in different place, and this tome has been updated thanks to the knowledge of those who joined us.
"}
return dat
/obj/item/weapon/tome/Topic(href, href_list)
if (..())
return
if(href_list["page"])
current_page = text2num(href_list["page"])
flick("tome-flick",src)
if(href_list["talisman"])
var/obj/item/weapon/talisman/T = locate(href_list["talisman"])
T.trigger(usr)
if(href_list["remove"])
var/obj/item/weapon/talisman/T = locate(href_list["remove"])
talismans.Remove(T)
usr.put_in_hands(T)
usr << browse_rsc('icons/tomebg.png', "tomebg.png")
usr << browse(tome_text(), "window=arcanetome;size=512x375")
/obj/item/weapon/tome/attack(var/mob/living/M, var/mob/living/user)
M.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has had the [name] used on him by [user.name] ([user.ckey])</font>")
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Used [name] on [M.name] ([M.ckey])</font>")
msg_admin_attack("[user.name] ([user.ckey]) used [name] on [M.name] ([M.ckey]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
if(!iscarbon(M))
M.LAssailant = null
else
M.LAssailant = user
if(!istype(M))
return
if(iscultist(M))//don't want to harm our team mates using tomes
return
..()
M.take_organ_damage(0,10)
to_chat(M, "<span class='warning'>You feel a searing heat inside of you!</span>")
/obj/item/weapon/tome/attack_hand(var/mob/living/user)
if(!iscultist(user) && state == TOME_OPEN)
user.take_organ_damage(0,10)
to_chat(user, "<span class='warning'>As you reach to pick up \the [src], you feel a searing heat inside of you!</span>")
playsound(loc, 'sound/effects/sparks2.ogg', 50, 1, 0,0,0)
user.Knockdown(5)
user.Stun(5)
icon_state = "tome"
item_state = "tome"
flick("tome-stun",src)
state = TOME_CLOSED
if(iscarbon(loc))
var/mob/living/carbon/M = loc
M.update_inv_hands()
return
..()
/obj/item/weapon/tome/pickup(var/mob/user)
if(iscultist(user) && state == TOME_OPEN)
usr << browse_rsc('icons/tomebg.png', "tomebg.png")
usr << browse(tome_text(), "window=arcanetome;size=512x375")
/obj/item/weapon/tome/dropped(var/mob/user)
usr << browse(null, "window=arcanetome")
/obj/item/weapon/tome/attack_self(var/mob/living/user)
if(!iscultist(user))//Too dumb to live.
user.take_organ_damage(0,10)
to_chat(user, "<span class='warning'>You try to peek inside \the [src], only to feel a discharge of energy and a searing heat inside of you!</span>")
playsound(loc, 'sound/effects/sparks2.ogg', 50, 1, 0,0,0)
user.Knockdown(5)
user.Stun(5)
if (state == TOME_OPEN)
icon_state = "tome"
item_state = "tome"
flick("tome-stun",src)
state = TOME_CLOSED
else
flick("tome-stun2",src)
return
else
if (state == TOME_CLOSED)
icon_state = "tome-open"
item_state = "tome-open"
flick("tome-flickopen",src)
state = TOME_OPEN
usr << browse_rsc('icons/tomebg.png', "tomebg.png")
usr << browse(tome_text(), "window=arcanetome;size=537x375")
else
icon_state = "tome"
item_state = "tome"
flick("tome-flickclose",src)
state = TOME_CLOSED
usr << browse(null, "window=arcanetome")
if(iscarbon(loc))
var/mob/living/carbon/M = loc
M.update_inv_hands()
//absolutely no use except letting cultists know that you're here.
/obj/item/weapon/tome/attack_ghost(var/mob/dead/observer/user)
if (state == TOME_OPEN && can_flick)
if (Adjacent(user))
to_chat(user, "You flick a page.")
flick("tome-flick",src)
can_flick = 0
spawn(5)
can_flick = 1
else
to_chat(user, "<span class='warning'>You need to get closer to interact with the pages.</span>")
/obj/item/weapon/tome/attackby(var/obj/item/I, var/mob/user)
if (..())
return
if (istype(I, /obj/item/weapon/talisman))
if (talismans.len < MAX_TALISMAN_PER_TOME)
if(user.drop_item(I))
talismans.Add(I)
I.forceMove(src)
to_chat(user, "<span class='notice'>You slip \the [I] into \the [src].</span>")
if (state == TOME_OPEN)
usr << browse_rsc('icons/tomebg.png', "tomebg.png")
usr << browse(tome_text(), "window=arcanetome;size=512x375")
else
to_chat(user, "<span class='warning'>This tome cannot contain any more talismans. Use or remove some first.</span>")
#undef PAGE_FOREWORD
#undef PAGE_LORE1
///////////////////////////////////////TALISMAN////////////////////////////////////////////////
/obj/item/weapon/talisman
name = "talisman"
desc = "A tattered parchment. You feel a dark energy emanating from it."
gender = NEUTER
icon = 'icons/obj/cult.dmi'
icon_state = "talisman"
throwforce = 0
w_class = W_CLASS_TINY
w_type = RECYK_WOOD
throw_range = 1
throw_speed = 1
layer = ABOVE_DOOR_LAYER
pressure_resistance = 1
attack_verb = list("slaps")
autoignition_temperature = AUTOIGNITION_PAPER
fire_fuel = 1
var/obj/effect/rune/attuned_rune = null
var/spell_type = null
/obj/item/weapon/talisman/New()
..()
pixel_x=0
pixel_y=0
/obj/item/weapon/talisman/examine(var/mob/user)
..()
if (!spell_type)
to_chat(user, "<span class='info'>This one however seems pretty unremarkable.</span>")
return
var/datum/rune_spell/instance = spell_type
if (iscultist(user) || isobserver(user))
if (attuned_rune)
to_chat(user, "<span class='info'>This one was attuned to a <b>[initial(instance.name)]</b> rune.</span>")
else
to_chat(user, "<span class='info'>This one was imbued with a <b>[initial(instance.name)]</b> rune.</span>")
else
to_chat(user, "<span class='info'>This one was some arcane drawings on it. You cannot read them.</span>")
/obj/item/weapon/talisman/attack_self(var/mob/living/user)
if (iscultist(user))
trigger(user)
/obj/item/weapon/talisman/proc/trigger(var/mob/user)
if (!user)
return
if (!spell_type)
if (!(src in user.held_items))//triggering an empty rune from a tome removes it.
user.put_in_hands(src)
return
if (attuned_rune)
attuned_rune.trigger(user)
else
new spell_type(user, src)
if (istype(loc,/obj/item/weapon/tome))
var/obj/item/weapon/tome/T = loc
T.talismans.Remove(src)
qdel(src)
/obj/item/weapon/talisman/proc/imbue(var/mob/user, var/obj/effect/rune/R)
if (!user || !R)
return
var/datum/rune_spell/spell = get_rune_spell(user,null,"examine",R.word1, R.word2, R.word3)
if(initial(spell.talisman_absorb) == RUNE_CANNOT)
user.drop_item(src)
src.forceMove(get_turf(R))
R.attack_hand(user)
else
if (attuned_rune)
to_chat(user, "<span class='warning'>This talisman is already linked to a rune.</span>")
return
if (attuned_rune)
to_chat(user, "<span class='warning'>This talisman is already imbued with the power of a rune.</span>")
return
if (!spell)
to_chat(user, "<span class='warning'>There is no power in those runes. The talisman isn't reacting to it.</span>")
return
if (initial(spell.Act_restriction) > 1000)//TODO: SET TO CURRENT CULT FACTION ACT
to_chat(user, "<span class='danger'>The veil is still too thick for a talisman to draw power from this rune.</span>")
return
//blood markings
overlays += image(icon,"talisman-[R.word1.icon_state]a")
overlays += image(icon,"talisman-[R.word2.icon_state]a")
overlays += image(icon,"talisman-[R.word3.icon_state]a")
//black markings
overlays += image(icon,"talisman-[R.word1.icon_state]")
overlays += image(icon,"talisman-[R.word2.icon_state]")
overlays += image(icon,"talisman-[R.word3.icon_state]")
spell_type = spell
switch(initial(spell.talisman_absorb))
if (RUNE_CAN_ATTUNE)
user.playsound_local(src, 'sound/effects/talisman_attune.ogg', 50, 0, 0, 0, 0)
to_chat(user, "<span class='notice'>The talisman can now remotely trigger the [initial(spell.name)] rune.</span>")
attuned_rune = R
if (RUNE_CAN_IMBUE)
user.playsound_local(src, 'sound/effects/talisman_imbue.ogg', 50, 0, 0, 0, 0)
to_chat(user, "<span class='notice'>The talisman absorbs the power of the [initial(spell.name)] rune.</span>")
qdel(R)
if (RUNE_CANNOT)//like, that shouldn't even be possible because of the earlier if() check, but just in case.
message_admins("Error! Some bloke ([key_name(user)]) managed to imbue a Conjure Talisman rune. That shouldn't be possible!")
return
/obj/item/weapon/paper/talisman
icon_state = "paper_talisman"
/obj/item/weapon/melee/cultblade /obj/item/weapon/melee/cultblade
name = "cult blade" name = "cult blade"

View File

@@ -42,7 +42,6 @@ var/list/uristrune_cache = list()//icon cache, so the whole blending process is
//Used when a nullrod is preventing a rune's activation //Used when a nullrod is preventing a rune's activation
var/nullblock = 0 var/nullblock = 0
var/datum/rune_spell/active_spell = null var/datum/rune_spell/active_spell = null
/obj/effect/rune/New() /obj/effect/rune/New()
@@ -275,6 +274,11 @@ var/list/uristrune_cache = list()//icon cache, so the whole blending process is
to_chat(user, "<span class='notice'>You disrupt the vile magic with the deadening field of \the [I]!</span>") to_chat(user, "<span class='notice'>You disrupt the vile magic with the deadening field of \the [I]!</span>")
qdel(src) qdel(src)
return return
if(istype(I, /obj/item/weapon/tome))
trigger(user)
if(istype(I, /obj/item/weapon/talisman))
var/obj/item/weapon/talisman/T = I
T.imbue(user,src)
return return
/proc/write_rune_word(var/turf/T,var/datum/reagent/blood/source,var/word = null) /proc/write_rune_word(var/turf/T,var/datum/reagent/blood/source,var/word = null)
@@ -414,9 +418,11 @@ var/list/uristrune_cache = list()//icon cache, so the whole blending process is
active_spell = get_rune_spell(user, src, "ritual" , word1, word2, word3) active_spell = get_rune_spell(user, src, "ritual" , word1, word2, word3)
if (!active_spell) if (!active_spell)
return fizzle(user) return fizzle(user)
else if (active_spell.destroying_self)
active_spell = null
/obj/effect/rune/proc/fizzle(var/mob/living/user) /obj/effect/rune/proc/fizzle(var/mob/living/user)
user.say(pick("B'ADMINES SP'WNIN SH'T","IC'IN O'OC","RO'SHA'M I'SA GRI'FF'N ME'AI","TOX'IN'S O'NM FI'RAH","IA BL'AME TOX'IN'S","FIR'A NON'AN RE'SONA","A'OI I'RS ROUA'GE","LE'OAN JU'STA SP'A'C Z'EE SH'EF","IA PT'WOBEA'RD, IA A'DMI'NEH'LP")) user.say(pick("B'ADMINES SP'WNIN SH'T","IC'IN O'OC","RO'SHA'M I'SA GRI'FF'N ME'AI","TOX'IN'S O'NM FI'RAH","IA BL'AME TOX'IN'S","FIR'A NON'AN RE'SONA","A'OI I'RS ROUA'GE","LE'OAN JU'STA SP'A'C Z'EE SH'EF","IA PT'WOBEA'RD, IA A'DMI'NEH'LP"))

View File

@@ -20,6 +20,15 @@
var/image/progbar = null var/image/progbar = null
var/remaining_cost = 0 var/remaining_cost = 0
var/accumulated_blood = 0 var/accumulated_blood = 0
var/destroying_self = 0
var/cancelling = 3
var/talisman_absorb = RUNE_CAN_IMBUE
var/page = "Lorem ipsum dolor sit amet, consectetur adipiscing elit,\
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut\
aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in\
voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint\
occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
/datum/rune_spell/New(var/mob/user, var/obj/holder, var/use = "ritual") /datum/rune_spell/New(var/mob/user, var/obj/holder, var/use = "ritual")
spell_holder = holder spell_holder = holder
@@ -30,6 +39,7 @@
pre_cast() pre_cast()
/datum/rune_spell/Destroy() /datum/rune_spell/Destroy()
destroying_self = 1
if (spell_holder) if (spell_holder)
if (istype(spell_holder, /obj/effect/rune)) if (istype(spell_holder, /obj/effect/rune))
var/obj/effect/rune/rune_holder = spell_holder var/obj/effect/rune/rune_holder = spell_holder
@@ -43,15 +53,23 @@
/datum/rune_spell/proc/pre_cast() /datum/rune_spell/proc/pre_cast()
var/mob/living/user = activator var/mob/living/user = activator
if (istype (spell_holder,/obj/effect/rune))
if ((rune_flags & RUNE_STAND) && (user.loc != spell_holder.loc)) if ((rune_flags & RUNE_STAND) && (user.loc != spell_holder.loc))
abort("too far") abort("too far")
else else
user.say(invocation) user.say(invocation,"C")
cast() cast()
else if (istype (spell_holder,/obj/item/weapon/talisman))
user.whisper(invocation)
cast_talisman()
/datum/rune_spell/proc/midcast(var/mob/add_cultist) /datum/rune_spell/proc/midcast(var/mob/add_cultist)
return return
/datum/rune_spell/proc/cast_talisman(var/mob/user, var/mob/target)
cast()//by default, talismans work just like runes, but may be set to work differently.
/datum/rune_spell/proc/cast() /datum/rune_spell/proc/cast()
spell_holder.visible_message("<span class='warning'>This rune wasn't properly set up, tell a coder.</span>") spell_holder.visible_message("<span class='warning'>This rune wasn't properly set up, tell a coder.</span>")
qdel(src) qdel(src)
@@ -69,6 +87,8 @@
to_chat(activator, "<span class='warning'>The ritual ends as you move away from the rune.</span>") to_chat(activator, "<span class='warning'>The ritual ends as you move away from the rune.</span>")
if ("channel cancel") if ("channel cancel")
spell_holder.visible_message("<span class='warning'>Deprived of blood, the channeling is disrupted.</span>") spell_holder.visible_message("<span class='warning'>Deprived of blood, the channeling is disrupted.</span>")
if ("moved talisman")
spell_holder.visible_message("<span class='warning'>The necessary tools have been misplaced.</span>")
for(var/mob/living/L in contributors) for(var/mob/living/L in contributors)
if (L.client) if (L.client)
@@ -77,7 +97,10 @@
if (progbar) if (progbar)
progbar.loc = null progbar.loc = null
del(src) if (spell_holder.icon_state == "temp")
qdel(spell_holder)
else
qdel(src)
/datum/rune_spell/proc/update_progbar() /datum/rune_spell/proc/update_progbar()
if (!progbar) if (!progbar)
@@ -101,12 +124,16 @@
return new subtype(user, spell_holder, use, word3) return new subtype(user, spell_holder, use, word3)
if ("examine") if ("examine")
return instance return instance
if ("imbue")
return subtype
else if (word1.type == initial(instance.word1) && word2.type == initial(instance.word2) && word3.type == initial(instance.word3)) else if (word1.type == initial(instance.word1) && word2.type == initial(instance.word2) && word3.type == initial(instance.word3))
switch (use) switch (use)
if ("ritual") if ("ritual")
return new subtype(user, spell_holder, use) return new subtype(user, spell_holder, use)
if ("examine") if ("examine")
return instance return instance
if ("imbue")
return subtype
return new subtype(user, spell_holder, use) return new subtype(user, spell_holder, use)
return null return null
@@ -121,12 +148,16 @@
cost_upkeep = 1 cost_upkeep = 1
remaining_cost = 300 remaining_cost = 300
accumulated_blood = 0 accumulated_blood = 0
var/cancelling = 3 page = "A very greedy rune. very thirsty. Alone, the ritual will be long and exhausting. With others, it will be quick and effortless. \
Nevertheless, an essential rune, for the cult needs an altar where to commune with Nar-Sie, and perform the Sacrifice when the time has come. \
As the veil thins and the blood flows, the altar will allow the cultists to perform new rituals, namely, the exchange of blood, for a shard of the Soulstone. \
You may use them to trap the souls of defeated foes, or channel those the dead. You can make even better use of them after raising a forge, and placing them \
inside a Construct Shell, or a Cult Blade. Lastly, raising an Arcaneum will let you permanently imbue your skin with a gift from Nar Sie. Follow your purpose \
and you may see even more gifts come your way."
/datum/rune_spell/raisestructure/cast() /datum/rune_spell/raisestructure/cast()
var/mob/living/user = activator var/mob/living/user = activator
contributors.Add(user) contributors.Add(user)
contributors[user] = ""
update_progbar() update_progbar()
if (user.client) if (user.client)
user.client.images |= progbar user.client.images |= progbar
@@ -135,12 +166,17 @@
spawn() spawn()
payment() payment()
/datum/rune_spell/raisestructure/cast_talisman()//we spawn an invisible rune under our feet that works like the regular one
var/obj/effect/rune/R = new(get_turf(activator))
R.icon_state = "temp"
R.active_spell = new type(activator,R)
qdel(src)
/datum/rune_spell/raisestructure/midcast(var/mob/add_cultist) /datum/rune_spell/raisestructure/midcast(var/mob/add_cultist)
if (add_cultist in contributors) if (add_cultist in contributors)
return return
add_cultist.say(invocation) add_cultist.say(invocation)
contributors.Add(add_cultist) contributors.Add(add_cultist)
contributors[add_cultist] = ""
if (add_cultist.client) if (add_cultist.client)
add_cultist.client.images |= progbar add_cultist.client.images |= progbar
@@ -219,15 +255,33 @@
invocation = "O bidai nabora se'sma!" invocation = "O bidai nabora se'sma!"
rune_flags = RUNE_STAND rune_flags = RUNE_STAND
var/obj/effect/cult_ritual/cult_communication/comms = null var/obj/effect/cult_ritual/cult_communication/comms = null
var/destroying_self = 0
word1 = /datum/cultword/self word1 = /datum/cultword/self
word2 = /datum/cultword/other word2 = /datum/cultword/other
word3 = /datum/cultword/technology word3 = /datum/cultword/technology
page = "You are not alone. Never forget it. The cult's true strength lies in its numbers, and how well each individual cooperates with the rest. \
This rune is your main mean of cooperation. Its ritual lets you open a communication channel straight into the mind of every other cultists, \
including constructs and soul blades. Just speak, and your words will instantly reach their minds. Keep the cult updated on your activities."
/datum/rune_spell/communication/cast() /datum/rune_spell/communication/cast()
var/mob/living/user = activator var/mob/living/user = activator
comms = new /obj/effect/cult_ritual/cult_communication(spell_holder.loc,user,src) comms = new /obj/effect/cult_ritual/cult_communication(spell_holder.loc,user,src)
/datum/rune_spell/communication/cast_talisman()//we write our message on the talisman, like in previous versions.
var/message = sanitize(input("Write a message to send to your acolytes.", "Blood Letter", "") as null|message, MAX_MESSAGE_LEN)
if(!message)
return
var/datum/faction/bloodcult = find_active_faction(BLOODCULT)
for(var/datum/mind/M in bloodcult.members)
to_chat(M.current, "<span class='game say'><b>[activator.real_name]</b>'s voice echoes in your head, <B><span class='sinister'>[message]</span></B></span>")
for(var/mob/dead/observer/O in player_list)
to_chat(O, "<span class='game say'><b>[activator.real_name]</b> communicates, <span class='sinister'>[message]</span></span>")
log_cultspeak("[key_name(activator)] Cult Communicate Talisman: [message]")
qdel(src)
/datum/rune_spell/communication/Destroy() /datum/rune_spell/communication/Destroy()
if (destroying_self) if (destroying_self)
return return
@@ -248,7 +302,6 @@
flags = HEAR|PROXMOVE flags = HEAR|PROXMOVE
var/mob/living/caster = null var/mob/living/caster = null
var/datum/rune_spell/communication/source = null var/datum/rune_spell/communication/source = null
var/ending = ""
/obj/effect/cult_ritual/cult_communication/New(var/turf/loc, var/mob/living/user, var/datum/rune_spell/communication/runespell) /obj/effect/cult_ritual/cult_communication/New(var/turf/loc, var/mob/living/user, var/datum/rune_spell/communication/runespell)
@@ -258,7 +311,6 @@
/obj/effect/cult_ritual/cult_communication/Destroy() /obj/effect/cult_ritual/cult_communication/Destroy()
caster = null caster = null
source.abort(ending)
source = null source = null
..() ..()
@@ -273,15 +325,19 @@
var/mob/living/carbon/human/H = speech.speaker var/mob/living/carbon/human/H = speech.speaker
speaker_name = H.real_name speaker_name = H.real_name
rendered_message = speech.render_message() rendered_message = speech.render_message()
for(var/mob/living/L in player_list) var/datum/faction/bloodcult = find_active_faction(BLOODCULT)
if (iscultist(L)) for(var/datum/mind/M in bloodcult.members)
to_chat(L, "<span class='game say'><b>[speaker_name]</b>'s voice echoes in your head, <B><span class='sinister'>[speech.message]</span></B></span>") if (M.current == speech.speaker)//echoes are annoying
continue
to_chat(M.current, "<span class='game say'><b>[speaker_name]</b>'s voice echoes in your head, <B><span class='sinister'>[speech.message]</span></B></span>")
for(var/mob/dead/observer/O in player_list) for(var/mob/dead/observer/O in player_list)
to_chat(O, "<span class='game say'><b>[speaker_name]</b> communicates, <span class='sinister'>[speech.message]</span></span>") to_chat(O, "<span class='game say'><b>[speaker_name]</b> communicates, <span class='sinister'>[speech.message]</span></span>")
log_cultspeak("[key_name(speech.speaker)] Cult Communicate Rune: [rendered_message]") log_cultspeak("[key_name(speech.speaker)] Cult Communicate Rune: [rendered_message]")
/obj/effect/cult_ritual/cult_communication/HasProximity(var/atom/movable/AM) /obj/effect/cult_ritual/cult_communication/HasProximity(var/atom/movable/AM)
if (!caster || caster.loc != loc) if (!caster || caster.loc != loc)
if (source)
source.abort("moved away")
qdel(src) qdel(src)
/obj/effect/cult_ritual/cultify() /obj/effect/cult_ritual/cultify()
@@ -306,6 +362,29 @@
word1 = /datum/cultword/see word1 = /datum/cultword/see
word2 = /datum/cultword/blood word2 = /datum/cultword/blood
word3 = /datum/cultword/hell word3 = /datum/cultword/hell
cost_invoke = 4
page = "Knowledge is of the essence. Becoming useful to the cult isn't simple, but having a desire to learn and improve is the first step. \
This rune is the first step on this journey, you don't have to study all the runes right away but the answer to your current conundrum could be in one of them. \
The tome in your hands is the produce of this ritual, by having it open in your hands, the meaning of every rune can freely flow into your mind, \
which means that you can trace them more easily. Be mindful though, if anyone spots this tome in your hand, your devotion to Nar-Sie will be immediately exposed."
/datum/rune_spell/summontome/cast()
spell_holder.visible_message("<span class='rose'>The rune's symbols merge into each others, and an Arcane Tome takes form in their place</span>")
var/turf/T = get_turf(spell_holder)
var/obj/item/weapon/tome/AT = new (T)
anim(target = AT, a_icon = 'icons/effects/effects.dmi', flick_anim = "tome_spawn")
qdel(spell_holder)
/datum/rune_spell/summontome/cast_talisman()//The talisman simply turns into a tome.
var/turf/T = get_turf(spell_holder)
var/obj/item/weapon/tome/AT = new (T)
if (spell_holder == activator.get_active_hand())
activator.drop_item(spell_holder, T)
activator.put_in_active_hand(AT)
else//are we using the talisman from a tome?
activator.put_in_hands(AT)
flick("tome_spawn",AT)
qdel(src)
//RUNE IV //RUNE IV
/datum/rune_spell/conjuretalisman /datum/rune_spell/conjuretalisman
@@ -316,6 +395,144 @@
word1 = /datum/cultword/hell word1 = /datum/cultword/hell
word2 = /datum/cultword/technology word2 = /datum/cultword/technology
word3 = /datum/cultword/join word3 = /datum/cultword/join
cost_invoke = 2
cost_upkeep = 1
remaining_cost = 5
talisman_absorb = RUNE_CANNOT
var/obj/item/weapon/tome/target = null
var/obj/item/weapon/talisman/tool = null
page = "Runes are powerful, but they're not always convenient. They require time to be set up, cannot be moved, and more importantly, are highly visible, unless hidden, \
which would require additional preparation. With that in mind, cultists need an alternative to use their powers reliably. This rune provides that alternative in the form \
of talismans. Created in exchange of a drop of blood, these sheets can absorb a rune, and then be used to channel its power. They're easy to conceal until used, and can be stored \
inside an arcane tome however most talismans are weaker than the rune they're imbued from. Exceptions exist, as the Stun rune which becomes much more potent when used directly in contact with a target. \
Other exceptions are the Door, Portal Entrance, and Conversion runes which will be attuned with the talisman instead of absorbed, allowing them to be triggered remotely, and also \
the Portal Exit rune, which can be used to immediately jaunt toward the Exit it was attuned to. One last use for this rune, is a ritual allowing a talisman to be transmitted directly \
inside an arcane tome carried by a fellow cultist. The ritual takes a bit of time and blood, but can save your acolyte some precious time."
/datum/rune_spell/conjuretalisman/cast()
var/obj/item/weapon/talisman/AT = locate() in get_turf(spell_holder)
if (AT)
if (AT.spell_type)
var/mob/living/user = activator
var/list/valid_tomes = list()
var/i = 0
for (var/obj/item/weapon/tome/T in arcane_tomes)
i++
var/mob/M = T.loc
if (!M) continue
if (!istype(M))
M = M.loc
if (!istype(M))
M = M.loc
if (!istype(M))
continue
else
valid_tomes["[i] - Tome carried by [M.real_name] ([T.talismans.len]/[MAX_TALISMAN_PER_TOME])"] = T
if (valid_tomes.len <= 0)
to_chat(user, "<span class='warning'>No cultists are currently carrying a tome.</span>")
qdel(src)
return
var/datum/rune_spell/spell = AT.spell_type
var/chosen_tome = input(user,"Choose a tome where to transfer this [initial(spell.name)] talisman.", "Transfer talisman", null) as null|anything in valid_tomes
if (!chosen_tome)
qdel(src)
return
target = valid_tomes[chosen_tome]
tool = AT
if (target.talismans.len >= MAX_TALISMAN_PER_TOME)
to_chat(activator, "<span class='warning'>This tome cannot contain any more talismans.</span>")
abort("no room")
contributors.Add(user)
update_progbar()
if (user.client)
user.client.images |= progbar
spell_holder.overlays += image('icons/obj/cult.dmi',"runetrigger-build")
spawn()
payment()
else
to_chat(activator, "<span class='warning'>You may only transfer an imbued or attuned talisman.</span>")
else
spell_holder.visible_message("<span class='rose'>The blood drops merge into each others, and a talisman takes form in their place</span>")
var/turf/T = get_turf(spell_holder)
AT = new (T)
anim(target = AT, a_icon = 'icons/effects/effects.dmi', flick_anim = "rune_imbue")
qdel(src)
/datum/rune_spell/conjuretalisman/abort(var/cause = "erased")
spell_holder.overlays -= image('icons/obj/cult.dmi',"runetrigger-build")
..()
/datum/rune_spell/conjuretalisman/proc/payment()
var/failsafe = 0
while(failsafe < 1000)
failsafe++
if (tool && tool.loc != spell_holder.loc)
abort("moved talisman")
//are our payers still here and about?
for(var/mob/living/L in contributors)
if (!iscultist(L) || !(L in range(spell_holder,1)) || (L.stat != CONSCIOUS))
if (L.client)
L.client.images -= progbar
contributors.Remove(L)
//alright then, time to pay in blood
var/amount_paid = 0
for(var/mob/living/L in contributors)
var/data = use_available_blood(L, cost_upkeep,contributors[L])
if (data["result"] == "failure")//out of blood are we?
contributors.Remove(L)
else
amount_paid += data["total"]
contributors[L] = data["result"]
make_tracker_effects(L.loc,spell_holder, 1, "soul", 3, /obj/effect/tracker/drain, 1)//visual feedback
accumulated_blood += amount_paid
//if there's no blood for over 3 seconds, the channeling fails
if (amount_paid)
cancelling = 3
else
cancelling--
if (cancelling <= 0)
abort("channel cancel")
return
if (accumulated_blood >= remaining_cost)
success()
return
update_progbar()
sleep(10)
message_admins("A rune ritual has iterated for over 1000 blood payment procs. Something's wrong there.")
/datum/rune_spell/conjuretalisman/proc/success()
for(var/mob/living/L in contributors)
if (L.client)
L.client.images -= progbar
contributors.Remove(L)
if (progbar)
progbar.loc = null
spell_holder.overlays -= image('icons/obj/cult.dmi',"runetrigger-build")
if (target.talismans.len < MAX_TALISMAN_PER_TOME)
target.talismans.Add(tool)
tool.forceMove(target)
to_chat(activator, "<span class='notice'>You slip \the [tool] into \the [target].</span>")
if (target.state == TOME_OPEN && ismob(target.loc))
var/mob/M = target.loc
M << browse_rsc('icons/tomebg.png', "tomebg.png")
M << browse(target.tome_text(), "window=arcanetome;size=512x375")
else
to_chat(activator, "<span class='warning'>This tome cannot contain any more talismans.</span>")
qdel(src)
//RUNE V //RUNE V
/datum/rune_spell/conversion /datum/rune_spell/conversion
@@ -326,6 +543,7 @@
word1 = /datum/cultword/join word1 = /datum/cultword/join
word2 = /datum/cultword/blood word2 = /datum/cultword/blood
word3 = /datum/cultword/self word3 = /datum/cultword/self
talisman_absorb = RUNE_CAN_ATTUNE
//RUNE VI //RUNE VI
/datum/rune_spell/stun /datum/rune_spell/stun
@@ -350,7 +568,7 @@
//RUNE VIII //RUNE VIII
/datum/rune_spell/mute /datum/rune_spell/mute
name = "Mute" name = "Deaf-Mute"
desc = "Silence and deafen nearby enemies." desc = "Silence and deafen nearby enemies."
Act_restriction = CULT_ACT_I Act_restriction = CULT_ACT_I
invocation = "Sti' kaliedir!" invocation = "Sti' kaliedir!"
@@ -407,6 +625,7 @@
word1 = /datum/cultword/destroy word1 = /datum/cultword/destroy
word2 = /datum/cultword/travel word2 = /datum/cultword/travel
word3 = /datum/cultword/self word3 = /datum/cultword/self
talisman_absorb = RUNE_CAN_ATTUNE
//RUNE XIV //RUNE XIV
/datum/rune_spell/fervor /datum/rune_spell/fervor
@@ -436,10 +655,11 @@
invocation = "Sas'so c'arta forbici!" invocation = "Sas'so c'arta forbici!"
word1 = /datum/cultword/travel word1 = /datum/cultword/travel
word2 = /datum/cultword/self word2 = /datum/cultword/self
teleporter = 1
talisman_absorb = RUNE_CAN_ATTUNE
/datum/rune_spell/portalentrance/New(var/mob/user, var/obj/holder, var/datum/cultword/w3) /datum/rune_spell/portalentrance/New(var/mob/user, var/obj/holder, var/datum/cultword/w3)
..() ..()
teleporter = 1
if (w3) if (w3)
word3 = w3.type word3 = w3.type
@@ -450,10 +670,11 @@
Act_restriction = CULT_ACT_II Act_restriction = CULT_ACT_II
word1 = /datum/cultword/travel word1 = /datum/cultword/travel
word2 = /datum/cultword/other word2 = /datum/cultword/other
teleporter = 1
talisman_absorb = RUNE_CAN_ATTUNE
/datum/rune_spell/portalexit/New(var/mob/user, var/obj/holder, var/datum/cultword/w3) /datum/rune_spell/portalexit/New(var/mob/user, var/obj/holder, var/datum/cultword/w3)
..() ..()
teleporter = 1
if (w3) if (w3)
word3 = w3.type word3 = w3.type

View File

@@ -1,11 +1,14 @@
/spell/cult
panel = "Cult"
override_base = "cult"
user_type = USER_TYPE_CULT
//SPELL I //SPELL I
/spell/cult/trace_rune /spell/cult/trace_rune
name = "Trace Rune" name = "Trace Rune"
desc = "Use available blood to write down words. Three words form a rune." desc = "Use available blood to write down words. Three words form a rune."
panel = "Cult"
hud_state = "cult_word" hud_state = "cult_word"
override_base = "cult"
invocation_type = SpI_NONE invocation_type = SpI_NONE
charge_type = Sp_RECHARGE charge_type = Sp_RECHARGE
@@ -20,38 +23,89 @@
var/list/data = list() var/list/data = list()
var/datum/cultword/word = null var/datum/cultword/word = null
var/obj/effect/rune/rune = null var/obj/effect/rune/rune = null
var/datum/rune_spell/spell = null
var/remember = 0
/spell/cult/trace_rune/choose_targets(var/mob/user = usr) /spell/cult/trace_rune/choose_targets(var/mob/user = usr)
return list(user) return list(user)
/spell/cult/trace_rune/before_channel(mob/user) /spell/cult/trace_rune/before_channel(mob/user)
if (remember)
remember = 0
else
spell = null//so we're not stuck trying to write the same spell over and over again
var/mob/living/carbon/C = user var/mob/living/carbon/C = user
var/muted = C.muted() var/muted = C.muted()
if (muted) if (muted)
to_chat(user,"<span class='danger'>You find yourself unable to focus your mind on the words of Nar-Sie.</span>") to_chat(user,"<span class='danger'>You find yourself unable to focus your mind on the words of Nar-Sie.</span>")
return muted return muted
/spell/cult/trace_rune/spell_do_after(var/mob/user, var/delay, var/numticks = 3) /spell/cult/trace_rune/spell_do_after(var/mob/user, var/delay, var/numticks = 3)
if(block) if(block)
return 0 return 0
block = 1 block = 1
var/tome = 0
if(!istype(user.loc, /turf)) if(!istype(user.loc, /turf))
to_chat(user, "<span class='warning'>You do not have enough space to write a proper rune.</span>") to_chat(user, "<span class='warning'>You do not have enough space to write a proper rune.</span>")
return 0 return 0
var/turf/T = user.loc var/obj/item/weapon/tome/A = null
A = user.get_active_hand()
tome = (istype(A) && A.state == TOME_OPEN)
if (!tome)
A = user.get_inactive_hand()
tome = (istype(A) && A.state == TOME_OPEN)
var/turf/T = get_turf(user)
rune = locate() in T rune = locate() in T
if (rune && rune.word1 && rune.word2 && rune.word3) if (rune && rune.word1 && rune.word2 && rune.word3)
to_chat(user, "<span class='warning'>You cannot add more than 3 words to a rune.</span>") to_chat(user, "<span class='warning'>You cannot add more than 3 words to a rune.</span>")
return 0 return 0
word = input(user,"Choose a word to add to the rune.", "Trace Rune", null) as null|anything in cultwords if (spell || tome)
if (spell)
if (!tome)
to_chat(user, "<span class='warning'>Without reading the tome, you have trouble remembering the arcane words.</span>")
return 0
else
var/list/available_runes = list()
var/i = 1
for(var/subtype in subtypesof(/datum/rune_spell))
var/datum/rune_spell/instance = subtype
if (initial(instance.Act_restriction) <= 1000)//TODO: SET TO CURRENT CULT FACTION ACT
available_runes.Add("\Roman[i]-[initial(instance.name)]")
available_runes["\Roman[i]-[initial(instance.name)]"] = instance
i++
var/spell_name = input(user,"Draw a rune with the help of the Arcane Tome.", "Trace Complete Rune", null) as null|anything in available_runes
spell = available_runes[spell_name]
var/datum/cultword/instance
if (!rune)
instance = initial(spell.word1)
else if (rune.word1.type != initial(spell.word1))
to_chat(user, "<span class='warning'>This rune's first word conflicts with the [initial(spell.name)] rune's syntax.</span>")
return 0
else if (!rune.word2)
instance = initial(spell.word2)
else if (rune.word2.type != initial(spell.word2))
to_chat(user, "<span class='warning'>This rune's second word conflicts with the [initial(spell.name)] rune's syntax.</span>")
return 0
else if (!rune.word3)
instance = initial(spell.word3)
else//wtf?
to_chat(user, "<span class='warning'>You cannot add more than 3 words to a rune.</span>")
return 0
word = initial(instance.english)
else
word = input(user,"Choose a word to add to the rune.", "Trace Rune Word", null) as null|anything in cultwords
if (!word) if (!word)
return 0 return 0
@@ -80,15 +134,14 @@
to_chat(user, "<span class='warning'>You cannot add more than 3 words to a rune.</span>") to_chat(user, "<span class='warning'>You cannot add more than 3 words to a rune.</span>")
return return
if (write_rune_word(get_turf(user) ,data["blood"] ,word = cultwords[word]) > 1) if (write_rune_word(get_turf(user) ,data["blood"] ,word = cultwords[word]) > 1)
remember = 1
perform(user)//imediately try writing another word perform(user)//imediately try writing another word
//SPELL II //SPELL II
/spell/cult/erase_rune /spell/cult/erase_rune
name = "Erase Rune" name = "Erase Rune"
desc = "Remove the last word written of the rune you're standing above." desc = "Remove the last word written of the rune you're standing above."
panel = "Cult"
hud_state = "cult_erase" hud_state = "cult_erase"
override_base = "cult"
invocation_type = SpI_NONE invocation_type = SpI_NONE
charge_type = Sp_RECHARGE charge_type = Sp_RECHARGE

View File

@@ -4,6 +4,8 @@
name = "bible" name = "bible"
desc = "Apply to head repeatedly." desc = "Apply to head repeatedly."
icon_state = "bible" icon_state = "bible"
inhand_states = list("left_hand" = 'icons/mob/in-hand/left/books.dmi', "right_hand" = 'icons/mob/in-hand/right/books.dmi')
item_state = "bible"
throw_speed = 1 throw_speed = 1
throw_range = 5 throw_range = 5
w_class = W_CLASS_MEDIUM w_class = W_CLASS_MEDIUM

View File

@@ -182,6 +182,8 @@
name = "book" name = "book"
icon = 'icons/obj/library.dmi' icon = 'icons/obj/library.dmi'
icon_state ="book" icon_state ="book"
inhand_states = list("left_hand" = 'icons/mob/in-hand/left/books.dmi', "right_hand" = 'icons/mob/in-hand/right/books.dmi')
item_state = "book"
throw_speed = 1 throw_speed = 1
throw_range = 5 throw_range = 5
w_class = W_CLASS_MEDIUM //upped to three because books are, y'know, pretty big. (and you could hide them inside eachother recursively forever) w_class = W_CLASS_MEDIUM //upped to three because books are, y'know, pretty big. (and you could hide them inside eachother recursively forever)

View File

@@ -128,18 +128,13 @@
/mob/dead/attackby(obj/item/W, mob/user) /mob/dead/attackby(obj/item/W, mob/user)
if(istype(W,/obj/item/weapon/tome)) if(istype(W,/obj/item/weapon/tome))
var/mob/dead/M = src if(invisibility != 0 || icon_state != "ghost-narsie")
if(src.invisibility != 0) cultify()
M.invisibility = 0
user.visible_message( user.visible_message(
"<span class='warning'>[user] drags ghost, [M], to our plane of reality!</span>", "<span class='warning'>[user] drags a ghost to our plane of reality!</span>",
"<span class='warning'>You drag [M] to our plane of reality!</span>" "<span class='warning'>You drag a ghost to our plane of reality!</span>"
)
else
user.visible_message (
"<span class='warning'>[user] just tried to smash his book into that ghost! It's not very effective</span>",
"<span class='warning'>You get the feeling that the ghost can't become any more visible.</span>"
) )
return
if(istype(W,/obj/item/weapon/storage/bible) || istype(W,/obj/item/weapon/nullrod)) if(istype(W,/obj/item/weapon/storage/bible) || istype(W,/obj/item/weapon/nullrod))
var/mob/dead/M = src var/mob/dead/M = src

View File

@@ -310,7 +310,6 @@ Doesn't work on other aliens/AI.*/
cast_sound = 'sound/effects/evolve.ogg' cast_sound = 'sound/effects/evolve.ogg'
cast_delay = 50 cast_delay = 50
use_progress_bar = TRUE
/spell/aoe_turf/evolve/drone /spell/aoe_turf/evolve/drone
desc = "Produce an interal egg sac capable of spawning children. Only one queen can exist at a time." desc = "Produce an interal egg sac capable of spawning children. Only one queen can exist at a time."

View File

@@ -39,6 +39,9 @@
var/list/construct_spells = list() var/list/construct_spells = list()
/mob/living/simple_animal/construct/say(var/message)
. = ..(message, "C")
/mob/living/simple_animal/construct/construct_chat_check(setting) /mob/living/simple_animal/construct/construct_chat_check(setting)
if(!mind) if(!mind)
return return

View File

@@ -131,9 +131,7 @@
if(amount > 0) if(amount > 0)
if(papers.len > 0) if(papers.len > 0)
var/obj/item/weapon/paper/P = papers[papers.len] var/obj/item/weapon/paper/P = papers[papers.len]
if(istype(P,/obj/item/weapon/paper/talisman)) if(P.info)
icon_state = "paper_bin3"
else if(P.info)
icon_state = "paper_bin2" icon_state = "paper_bin2"
else else
icon_state = "paper_bin1" icon_state = "paper_bin1"

View File

@@ -84,7 +84,6 @@ var/list/spells = typesof(/spell) //needed for the badmin verb for now
var/cast_delay = 1 var/cast_delay = 1
var/cast_sound = "" var/cast_sound = ""
var/use_progress_bar = FALSE
var/hud_state = "" //name of the icon used in generating the spell hud object var/hud_state = "" //name of the icon used in generating the spell hud object
var/override_base = "" var/override_base = ""
@@ -518,26 +517,45 @@ var/list/spells = typesof(/spell) //needed for the badmin verb for now
return 0 return 0
var/delayfraction = round(delay/numticks) var/delayfraction = round(delay/numticks)
var/original_location = user.loc
var/originalstat = user.stat var/originalstat = user.stat
var/image/progress_bar var/Location = user.loc
if(use_progress_bar) var/image/progbar
if(user.client && user.client.prefs.progress_bars)
progress_bar = create_progress_bar_on(user)
user.client.images += progress_bar
for(var/i = 0, i<numticks, i++)
if(use_progress_bar)
if(user && user.client && user.client.prefs.progress_bars) if(user && user.client && user.client.prefs.progress_bars)
progress_bar.icon_state = "prog_bar_[round(((i / numticks) * 100), 10)]" if(!progbar)
progbar = image("icon" = 'icons/effects/doafter_icon.dmi', "loc" = user, "icon_state" = "prog_bar_0")
progbar.pixel_z = WORLD_ICON_SIZE
progbar.plane = HUD_PLANE
progbar.layer = HUD_ABOVE_ITEM_LAYER
progbar.appearance_flags = RESET_COLOR
for (var/i = 1 to numticks)
if(user && user.client && user.client.prefs.progress_bars)
if(!progbar)
progbar = image("icon" = 'icons/effects/doafter_icon.dmi', "loc" = user, "icon_state" = "prog_bar_0")
progbar.pixel_z = WORLD_ICON_SIZE
progbar.plane = HUD_PLANE
progbar.layer = HUD_ABOVE_ITEM_LAYER
progbar.appearance_flags = RESET_COLOR
progbar.icon_state = "prog_bar_[round(((i / numticks) * 100), 10)]"
user.client.images |= progbar
sleep(delayfraction) sleep(delayfraction)
if(!user || (!(spell_flags & (STATALLOWED|GHOSTCAST)) && user.stat != originalstat) || !(user.loc == original_location)) if(!user || (!(spell_flags & (STATALLOWED|GHOSTCAST)) && user.stat != originalstat) || !(user.loc == Location))
if(use_progress_bar) if(progbar)
stop_progress_bar(user, progress_bar) progbar.icon_state = "prog_bar_stopped"
spawn(2)
if(user && user.client)
user.client.images -= progbar
if(progbar)
progbar.loc = null
return 0 return 0
if(user && user.client)
user.client.images -= progbar
if(progbar)
progbar.loc = null
return 1 return 1
//UPGRADES //UPGRADES

Binary file not shown.

Before

Width:  |  Height:  |  Size: 448 KiB

After

Width:  |  Height:  |  Size: 452 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 775 B

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 50 KiB

BIN
icons/tomebg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 418 KiB

Binary file not shown.

Binary file not shown.