This commit is contained in:
boy2mantwicethefam
2019-05-11 23:33:37 +03:00
parent 52879d942d
commit a382efad0b
12 changed files with 58 additions and 69 deletions

View File

@@ -73,7 +73,7 @@
#define SPELL_NECROTIC 16 //Necromantic spells
//Spell specializations, used for spellbook lists
#define DEFAULT 1
#define SPELL_SPECIALIZATION_DEFAULT 1 //So it doesn't gorge on a word that could be used for better things
#define OFFENSIVE 2
#define DEFENSIVE 4
#define UTILITY 8

View File

@@ -149,7 +149,7 @@
dat += "<h1>A Wizard's Catalogue Of Spells And Artifacts</h1><br>"
dat += "<h2>[uses] point\s remaining (<a href='?src=\ref[src];refund=1'>Get a refund</a>)</h2><br>"
dat += "<em>This book contains a list of many useful things that you'll need in your journey.</em><br>"
dat += "<strong>KNOWN SPELLS:</strong><br><br>"
dat += "<span style=\"color:blue\"><strong>KNOWN SPELLS:</strong></span><br><br>"
var/list/shown_spells = get_all_wizard_spells()
var/list/shown_offensive_spells = get_available_offensive_spells()
@@ -203,56 +203,59 @@
//<i>(Description)</i>
//Requires robes to cast
dat += "<span style=\"color:red\"><strong>OFFENSIVE SPELLS:</strong></span><br><br>"
for(var/spell_path in shown_offensive_spells)
var/spell/abstract_spell = spell_path
var/spell_name = initial(abstract_spell.name)
var/spell_cooldown = get_spell_cooldown_string(initial(abstract_spell.charge_max), initial(abstract_spell.charge_type))
var/spell_price = get_spell_price(abstract_spell)
dat += "<strong>[spell_name]</strong>[spell_cooldown] ([buy_href_link(spell_path, spell_price, "buy for [spell_price] point\s")])<br>"
dat += "<em>[initial(abstract_spell.desc)]</em><br>"
var/flags = initial(abstract_spell.spell_flags)
var/list/properties = get_spell_properties(flags, user)
var/property_data
for(var/P in properties)
property_data += "[P] "
if(property_data)
dat += "<span style=\"color:blue\">[property_data]</span><br>"
dat += "<br>"
if(shown_offensive_spells.len)
dat += "<span style=\"color:red\"><strong>OFFENSIVE SPELLS:</strong></span><br><br>"
for(var/spell_path in shown_offensive_spells)
var/spell/abstract_spell = spell_path
var/spell_name = initial(abstract_spell.name)
var/spell_cooldown = get_spell_cooldown_string(initial(abstract_spell.charge_max), initial(abstract_spell.charge_type))
var/spell_price = get_spell_price(abstract_spell)
dat += "<strong>[spell_name]</strong>[spell_cooldown] ([buy_href_link(spell_path, spell_price, "buy for [spell_price] point\s")])<br>"
dat += "<em>[initial(abstract_spell.desc)]</em><br>"
var/flags = initial(abstract_spell.spell_flags)
var/list/properties = get_spell_properties(flags, user)
var/property_data
for(var/P in properties)
property_data += "[P] "
if(property_data)
dat += "<span style=\"color:blue\">[property_data]</span><br>"
dat += "<br>"
dat += "<span style=\"color:blue\"><strong>DEFENSIVE SPELLS:</strong></span><br><br>"
for(var/spell_path in shown_defensive_spells)
var/spell/abstract_spell = spell_path
var/spell_name = initial(abstract_spell.name)
var/spell_cooldown = get_spell_cooldown_string(initial(abstract_spell.charge_max), initial(abstract_spell.charge_type))
var/spell_price = get_spell_price(abstract_spell)
dat += "<strong>[spell_name]</strong>[spell_cooldown] ([buy_href_link(spell_path, spell_price, "buy for [spell_price] point\s")])<br>"
dat += "<em>[initial(abstract_spell.desc)]</em><br>"
var/flags = initial(abstract_spell.spell_flags)
var/list/properties = get_spell_properties(flags, user)
var/property_data
for(var/P in properties)
property_data += "[P] "
if(property_data)
dat += "<span style=\"color:blue\">[property_data]</span><br>"
dat += "<br>"
if(shown_defensive_spells.len)
dat += "<span style=\"color:blue\"><strong>DEFENSIVE SPELLS:</strong></span><br><br>"
for(var/spell_path in shown_defensive_spells)
var/spell/abstract_spell = spell_path
var/spell_name = initial(abstract_spell.name)
var/spell_cooldown = get_spell_cooldown_string(initial(abstract_spell.charge_max), initial(abstract_spell.charge_type))
var/spell_price = get_spell_price(abstract_spell)
dat += "<strong>[spell_name]</strong>[spell_cooldown] ([buy_href_link(spell_path, spell_price, "buy for [spell_price] point\s")])<br>"
dat += "<em>[initial(abstract_spell.desc)]</em><br>"
var/flags = initial(abstract_spell.spell_flags)
var/list/properties = get_spell_properties(flags, user)
var/property_data
for(var/P in properties)
property_data += "[P] "
if(property_data)
dat += "<span style=\"color:blue\">[property_data]</span><br>"
dat += "<br>"
dat += "<span style=\"color:green\"><strong>UTILITY SPELLS:</strong></span><br><br>"
for(var/spell_path in shown_utility_spells)
var/spell/abstract_spell = spell_path
var/spell_name = initial(abstract_spell.name)
var/spell_cooldown = get_spell_cooldown_string(initial(abstract_spell.charge_max), initial(abstract_spell.charge_type))
var/spell_price = get_spell_price(abstract_spell)
dat += "<strong>[spell_name]</strong>[spell_cooldown] ([buy_href_link(spell_path, spell_price, "buy for [spell_price] point\s")])<br>"
dat += "<em>[initial(abstract_spell.desc)]</em><br>"
var/flags = initial(abstract_spell.spell_flags)
var/list/properties = get_spell_properties(flags, user)
var/property_data
for(var/P in properties)
property_data += "[P] "
if(property_data)
dat += "<span style=\"color:blue\">[property_data]</span><br>"
dat += "<br>"
if(shown_utility_spells.len)
dat += "<span style=\"color:green\"><strong>UTILITY SPELLS:</strong></span><br><br>"
for(var/spell_path in shown_utility_spells)
var/spell/abstract_spell = spell_path
var/spell_name = initial(abstract_spell.name)
var/spell_cooldown = get_spell_cooldown_string(initial(abstract_spell.charge_max), initial(abstract_spell.charge_type))
var/spell_price = get_spell_price(abstract_spell)
dat += "<strong>[spell_name]</strong>[spell_cooldown] ([buy_href_link(spell_path, spell_price, "buy for [spell_price] point\s")])<br>"
dat += "<em>[initial(abstract_spell.desc)]</em><br>"
var/flags = initial(abstract_spell.spell_flags)
var/list/properties = get_spell_properties(flags, user)
var/property_data
for(var/P in properties)
property_data += "[P] "
if(property_data)
dat += "<span style=\"color:blue\">[property_data]</span><br>"
dat += "<br>"
if(shown_misc_spells.len)
dat += "<span style=\"color:orange\"><strong>MISCELLANEOUS SPELLS:</strong></span><br><br>"
@@ -272,7 +275,7 @@
dat += "<span style=\"color:blue\">[property_data]</span><br>"
dat += "<br><br>"
dat += "<hr><strong>ARTIFACTS AND BUNDLES<sup>*</sup></strong><br><small>* Non-refundable</small><br><br>"
dat += "<hr><span style=\"color:purple\"><strong>ARTIFACTS AND BUNDLES<sup>*</sup></strong></span><br><small>* Non-refundable</small><br><br>"
for(var/datum/spellbook_artifact/A in available_artifacts)
if(!A.can_buy(user))
@@ -289,7 +292,7 @@
dat += "<strong>[artifact_name]</strong> ([buy_href_link("\ref[A]", artifact_price, "buy for [artifact_price] point\s")])<br>"
dat += "<em>[artifact_desc]</em><br><br>"
dat += "<hr><strong>POTIONS<sup>*</sup></strong><br><small>* Non-refundable</small><br><br>"
dat += "<hr><span style=\"color:green\"><strong>POTIONS<sup>*</sup></strong></span><br><small>* Non-refundable</small><br><br>"
for(var/P in get_available_potions())
var/obj/item/potion/potion = P

View File

@@ -2,7 +2,6 @@
name = "Summon Spares"
desc = "this spell summons spare IDs in the nearby vicinity."
user_type = USER_TYPE_SPELLBOOK
specialization = UTILITY
summon_type = list(/obj/item/weapon/card/id/captains_spare)
summon_amt = 5

View File

@@ -24,5 +24,4 @@
for(var/turf/T in targets)
for(var/obj/machinery/light/L in T)
L.broken()
sleep(1)
sleep(1)

View File

@@ -55,4 +55,4 @@
/proc/getAllUtilitySpells()
return getAllWizSpellsBySpecialization(UTILITY)
/proc/getAllMiscSpells()
return getAllWizSpellsBySpecialization(DEFAULT)
return getAllWizSpellsBySpecialization(SPELL_SPECIALIZATION_DEFAULT)

View File

@@ -10,7 +10,7 @@ var/list/spells = typesof(/spell) //needed for the badmin verb for now
var/school = "evocation" //not relevant at now, but may be important later if there are changes to how spells work. the ones I used for now will probably be changed... maybe spell presets? lacking flexibility but with some other benefit?
var/user_type = USER_TYPE_NOUSER // What kind of mob uses this spell
var/specialization = DEFAULT //Used for what list they belong to in the spellbook. DEFAULT, OFFENSIVE, DEFENSIVE, UTILITY
var/specialization = SPELL_SPECIALIZATION_DEFAULT //Used for what list they belong to in the spellbook. DEFAULT, OFFENSIVE, DEFENSIVE, UTILITY
var/charge_type = Sp_RECHARGE //can be recharge or charges, see charge_max and charge_counter descriptions; can also be based on the holder's vars now, use "holder_var" for that; can ALSO be made to gradually drain the charge with Sp_GRADUAL
//The following are allowed: Sp_RECHARGE (Recharges), Sp_CHARGE (Limited uses), Sp_GRADUAL (Gradually lose charges), Sp_PASSIVE (Does not cast)

View File

@@ -2,7 +2,6 @@
name = "Baleful Mutation"
desc = "A spell that gives its victm random limbs from different species."
user_type = USER_TYPE_SPELLBOOK
specialization = OFFENSIVE
school = "transmutation"
charge_max = 600
invocation = "MAHNSTUR MACH!"

View File

@@ -3,7 +3,6 @@
desc = "This spell instantly kills somebody adjacent to you with the vilest of magick."
abbreviation = "DG"
user_type = USER_TYPE_SPELLBOOK
specialization = OFFENSIVE
school = "evocation"
charge_max = 600

View File

@@ -2,7 +2,6 @@
name = "Ice Barrage"
desc = "Freezes the target in a block of ice. Also inflicts psychological damage."
user_type = USER_TYPE_ARTIFACT
specialization = OFFENSIVE
school = "abjuration"
charge_max = 300

View File

@@ -3,7 +3,6 @@ spell/targeted/parrotmorph
desc = "This spell turns the victim into a harmless and near-invincible parrot for a short amount of time."
abbreviation = "PM"
user_type = USER_TYPE_SPELLBOOK
specialization = OFFENSIVE
school = "evocation"
charge_type = Sp_RECHARGE

View File

@@ -2,7 +2,6 @@
name = "Spark"
desc = "Creates a spark in the targeted location."
abbreviation = "SP"
specialization = UTILITY
school = "evocation"
invocation = "M'tch st'ck"
@@ -22,7 +21,6 @@
name = "Clean item"
desc = "Applies magic soap to a piece of clothing."
abbreviation = "CI"
specialization = UTILITY
school = "evocation"
invocation = "s'ap s'ds"
@@ -44,7 +42,6 @@
name = "Bloody item"
desc = "Drops an item into the realm of blood for just a moment, covering it in ichor."
abbreviation = "BI"
specialization = UTILITY
school = "evocation"
invocation = "bl'odso'k"
@@ -62,7 +59,6 @@
name = "Create mundane temporary trinket"
desc = "Creates a small trinket for a duration."
abbreviation = "CT"
specialization = UTILITY
school = "evocation"
invocation = "Id'e h'nds m'k' l'ght w'rk"
@@ -87,7 +83,6 @@
name = "Warm object"
desc = "Warms an object."
abbreviation = "WO"
specialization = UTILITY
school = "evocation"
invocation = "sp'cy k'ych'in"
@@ -116,7 +111,6 @@
name = "Cool object"
desc = "Cools an object."
abbreviation = "WO"
specialization = UTILITY
school = "evocation"
invocation = "I'ce c'ld!"
@@ -145,7 +139,6 @@
name = "Extinguish"
desc = "Extinguishes an object."
abbreviation = "EO"
specialization = UTILITY
school = "evocation"
invocation = "Splash"

View File

@@ -2,7 +2,6 @@
name = "Wrap Gift"
desc = "This spell turns a single person into an inert statue for a long period of time."
user_type = USER_TYPE_ARTIFACT
specialization = OFFENSIVE
school = "transmutation"
charge_max = 300