diff --git a/code/datums/mind.dm b/code/datums/mind.dm index f3dcf37940c..8e14801d921 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -1441,7 +1441,6 @@ ticker.mode.wizards += src special_role = "Wizard" assigned_role = "Wizard" - //ticker.mode.learn_basic_spells(current) if(!wizardstart.len) current.loc = pick(latejoin) current << "HOT INSERTION, GO GO GO" @@ -1449,8 +1448,6 @@ current.loc = pick(wizardstart) ticker.mode.equip_wizard(current) - for(var/obj/item/weapon/spellbook/S in current.contents) - S.op = 0 ticker.mode.name_wizard(current) ticker.mode.forge_wizard_objectives(src) ticker.mode.greet_wizard(src) diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index 12113bd29f5..482ff65624f 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -713,25 +713,37 @@ var/global/list/possible_items_special = list() else explanation_text = "Free Objective" -/datum/objective/summon_guns - explanation_text = "Steal at least five guns!" +/datum/objective/steal_five_of_type + explanation_text = "Steal at least five items!" + var/list/wanted_items = list(/obj/item) -/datum/objective/summon_guns/check_completion() +/datum/objective/steal_five_of_type/New() + ..() + wanted_items = typecacheof(wanted_items) + +/datum/objective/steal_five_of_type/summon_guns + explanation_text = "Steal at least five guns!" + wanted_items = list(/obj/item/weapon/gun) + +/datum/objective/steal_five_of_type/summon_magic + explanation_text = "Steal at least five magical artefacts!" + wanted_items = list(/obj/item/weapon/spellbook, /obj/item/weapon/gun/magic, /obj/item/clothing/suit/space/hardsuit/wizard, /obj/item/weapon/scrying, /obj/item/weapon/antag_spawner/contract, /obj/item/device/necromantic_stone) + +/datum/objective/steal_five_of_type/check_completion() if(!isliving(owner.current)) return 0 - var/guncount = 0 + var/stolen_count = 0 var/list/all_items = owner.current.GetAllContents() //this should get things in cheesewheels, books, etc. - for(var/obj/I in all_items) //Check for guns - if(istype(I, /obj/item/weapon/gun)) - guncount++ - if(guncount >= 5) + for(var/obj/I in all_items) //Check for wanted items + if(is_type_in_typecache(I, wanted_items)) + stolen_count++ + if(stolen_count >= 5) return 1 else return 0 return 0 - //////////////////////////////// // Changeling team objectives // //////////////////////////////// diff --git a/code/game/gamemodes/wizard/spellbook.dm b/code/game/gamemodes/wizard/spellbook.dm index ec4ad68610e..9cb69da31c9 100644 --- a/code/game/gamemodes/wizard/spellbook.dm +++ b/code/game/gamemodes/wizard/spellbook.dm @@ -14,14 +14,15 @@ /datum/spellbook_entry/proc/IsAvailible() // For config prefs / gamemode restrictions - these are round applied return 1 + /datum/spellbook_entry/proc/CanBuy(mob/living/carbon/human/user,obj/item/weapon/spellbook/book) // Specific circumstances if(book.usesYou have cast summon guns!" return 1 /datum/spellbook_entry/summon/magic name = "Summon Magic" - category = "Challenges" desc = "Share the wonders of magic with the crew and show them why they aren't to be trusted with it at the same time." - cost = 0 log_name = "SU" /datum/spellbook_entry/summon/magic/IsAvailible() @@ -475,11 +474,10 @@ /datum/spellbook_entry/summon/magic/Buy(mob/living/carbon/human/user,obj/item/weapon/spellbook/book) feedback_add_details("wizard_spell_learned",log_name) - rightandwrong(1, user, 0) - book.uses += 1 + rightandwrong(1, user, 25) active = 1 playsound(get_turf(user),"sound/magic/CastSummon.ogg",50,1) - user << "You have cast summon magic and gained an extra charge for your spellbook." + user << "You have cast summon magic!" return 1 /datum/spellbook_entry/summon/events @@ -518,7 +516,6 @@ w_class = 1 var/uses = 10 var/temp = null - var/op = 1 var/tab = null var/mob/living/carbon/human/owner var/list/datum/spellbook_entry/entries = list() diff --git a/code/modules/spells/spell_types/rightandwrong.dm b/code/modules/spells/spell_types/rightandwrong.dm index 0e9deacf093..29e3e10e9ac 100644 --- a/code/modules/spells/spell_types/rightandwrong.dm +++ b/code/modules/spells/spell_types/rightandwrong.dm @@ -15,15 +15,22 @@ if(H.mind.special_role == "Wizard" || H.mind.special_role == "apprentice" || H.mind.special_role == "survivalist") continue if(prob(survivor_probability) && !(H.mind in ticker.mode.traitors)) ticker.mode.traitors += H.mind - var/datum/objective/summon_guns/guns = new - guns.owner = H.mind - H.mind.objectives += guns - H.mind.special_role = "survivalist" + if(!summon_type) + var/datum/objective/steal_five_of_type/summon_guns/guns = new + guns.owner = H.mind + H.mind.objectives += guns + H.mind.special_role = "survivalist" + H << "You are the survivalist! Your own safety matters above all else, and the only way to ensure your safety is to stockpile weapons! Grab as many guns as possible, by any means necessary. Kill anyone who gets in your way." + else + var/datum/objective/steal_five_of_type/summon_magic/magic = new + magic.owner = H.mind + H.mind.objectives += magic + H.mind.special_role = "amateur magician" + H << "You are the amateur magician! Grow your newfound talent! Grab as many magical artefacts as possible, by any means necessary. Kill anyone who gets in your way." var/datum/objective/survive/survive = new survive.owner = H.mind H.mind.objectives += survive H.attack_log += "\[[time_stamp()]\] Was made into a survivalist, and trusts no one!" - H << "You are the survivalist! Your own safety matters above all else, and the only way to ensure your safety is to stockpile weapons! Grab as many guns as possible, by any means necessary. Kill anyone who gets in your way." H.mind.announce_objectives() var/randomizeguns = pick(gunslist) var/randomizemagic = pick(magiclist)