diff --git a/modular_ss220/antagonists/_antagonists.dme b/modular_ss220/antagonists/_antagonists.dme
index a3ffa7129047..f5c866a3bd7a 100644
--- a/modular_ss220/antagonists/_antagonists.dme
+++ b/modular_ss220/antagonists/_antagonists.dme
@@ -14,3 +14,4 @@
#include "code/rave_wizard/beer_missiles.dm"
#include "code/rave_wizard/great_revelry.dm"
#include "code/rave_wizard/rocker_touch.dm"
+#include "code/rave_wizard/datum/rave_wizard.dm"
diff --git a/modular_ss220/antagonists/code/rave_wizard/beer_missiles.dm b/modular_ss220/antagonists/code/rave_wizard/beer_missiles.dm
index 86f7df7eec8d..3a0b9ee201dd 100644
--- a/modular_ss220/antagonists/code/rave_wizard/beer_missiles.dm
+++ b/modular_ss220/antagonists/code/rave_wizard/beer_missiles.dm
@@ -1,4 +1,4 @@
-/obj/effect/proc_holder/spell/projectile/beer_missile
+/datum/spell/projectile/magic_missile/beer
name = "Beer Missile"
desc = "This spell fires several, slow moving, magic beer bottles at nearby targets"
school = "evocation"
@@ -11,7 +11,7 @@
proj_icon_state = "beer"
proj_name = "A bottle of beer"
proj_lingering = 1
- proj_type = "/obj/effect/proc_holder/spell/inflict_handler/beer_missile"
+ proj_type = "/obj/item/projectile/magic/magic_missile/beer"
proj_lifespan = 20
proj_step_delay = 5
proj_trail_icon = 'icons/obj/drinks.dmi'
@@ -23,29 +23,12 @@
action_icon = 'modular_ss220/antagonists/icons/rave.dmi'
sound = 'sound/magic/magic_missile.ogg'
-/obj/effect/proc_holder/spell/projectile/beer_missile/create_new_targeting()
- var/datum/spell_targeting/targeted/T = new()
- T.allowed_type = /mob/living
- T.max_targets = INFINITY
- return T
-
-/obj/effect/proc_holder/spell/inflict_handler/beer_missile
- sound = "shatter"
+/obj/item/projectile/magic/magic_missile/beer
+ hitsound = "shatter"
var/debuff_effect_duration = 10 SECONDS
-/obj/effect/proc_holder/spell/inflict_handler/beer_missile/cast(list/targets, mob/user = usr)
- for(var/mob/living/target in targets)
- target.AdjustKnockDown(debuff_effect_duration)
- target.AdjustDizzy(debuff_effect_duration)
- target.AdjustSlur(debuff_effect_duration)
- target.AdjustConfused(debuff_effect_duration)
- target.AdjustEyeBlurry(debuff_effect_duration)
- target.AdjustDrowsy(debuff_effect_duration)
- target.AdjustDruggy(debuff_effect_duration)
- . = ..()
-
/datum/spellbook_entry/beer_missile
name = "Magic beer missiles"
- spell_type = /obj/effect/proc_holder/spell/projectile/beer_missile
+ spell_type = /datum/spell/projectile/magic_missile/beer
category = "Rave"
diff --git a/modular_ss220/antagonists/code/rave_wizard/dancing_field.dm b/modular_ss220/antagonists/code/rave_wizard/dancing_field.dm
index 32fae3deae09..d1323a221535 100644
--- a/modular_ss220/antagonists/code/rave_wizard/dancing_field.dm
+++ b/modular_ss220/antagonists/code/rave_wizard/dancing_field.dm
@@ -1,4 +1,4 @@
-/obj/effect/proc_holder/spell/aoe/conjure/timestop/dance
+/datum/spell/aoe/conjure/timestop/dance
name = "Dance Time"
desc = "This spell makes everyone dance in it's range. Enchanted targets cannot attack, but projectiles harm as usual"
invocation = "DAN SIN FIVA"
@@ -55,7 +55,7 @@
/datum/spellbook_entry/dancestop
name = "Dance Stop"
- spell_type = /obj/effect/proc_holder/spell/aoe/conjure/timestop/dance
+ spell_type = /datum/spell/aoe/conjure/timestop/dance
category = "Rave"
/obj/effect/timestop/dancing/wizard
diff --git a/modular_ss220/antagonists/code/rave_wizard/datum/rave_wizard.dm b/modular_ss220/antagonists/code/rave_wizard/datum/rave_wizard.dm
new file mode 100644
index 000000000000..1ea336f12771
--- /dev/null
+++ b/modular_ss220/antagonists/code/rave_wizard/datum/rave_wizard.dm
@@ -0,0 +1,79 @@
+#define SPELLBOOK_AVAILABLE_POINTS 4
+/datum/antagonist/wizard/rave
+
+/datum/objective/wizrave
+ explanation_text = "Устройте вечеринку, о которой потомки будут слагать легенды."
+ needs_target = FALSE
+ completed = TRUE
+
+/datum/antagonist/wizard/rave/give_objectives()
+ add_antag_objective(/datum/objective/wizrave)
+
+/datum/antagonist/wizard/rave/on_gain()
+ . = ..()
+ var/spell_paths = list(/datum/spell/projectile/magic_missile/beer,
+ /datum/spell/aoe/conjure/timestop/dance,
+ /datum/spell/great_revelry,
+ /datum/spell/touch/touch/rocker,
+ /datum/spell/aoe/conjure/summon_disco)
+ for(var/spell_path in spell_paths)
+ var/S = new spell_path
+ owner.AddSpell(S)
+
+/datum/antagonist/wizard/equip_wizard() //copypasta to make spellbook adjustments
+ if(!ishuman(owner.current))
+ return
+ var/mob/living/carbon/human/new_wiz = owner.current
+
+ //So zards properly get their items when they are admin-made.
+ qdel(new_wiz.wear_suit)
+ qdel(new_wiz.head)
+ qdel(new_wiz.shoes)
+ qdel(new_wiz.r_hand)
+ qdel(new_wiz.r_store)
+ qdel(new_wiz.l_store)
+
+ if(isplasmaman(new_wiz))
+ new_wiz.equipOutfit(new /datum/outfit/plasmaman/wizard)
+ new_wiz.internal = new_wiz.r_hand
+ new_wiz.update_action_buttons_icon()
+ else
+ new_wiz.equip_to_slot_or_del(new /obj/item/clothing/under/color/lightpurple(new_wiz), SLOT_HUD_JUMPSUIT)
+ new_wiz.equip_to_slot_or_del(new /obj/item/clothing/head/wizard(new_wiz), SLOT_HUD_HEAD)
+ new_wiz.dna.species.after_equip_job(null, new_wiz)
+ new_wiz.rejuvenate() //fix any damage taken by naked vox/plasmamen/etc while round setups
+ new_wiz.equip_to_slot_or_del(new /obj/item/radio/headset(new_wiz), SLOT_HUD_LEFT_EAR)
+ new_wiz.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal(new_wiz), SLOT_HUD_SHOES)
+ new_wiz.equip_to_slot_or_del(new /obj/item/clothing/suit/wizrobe(new_wiz), SLOT_HUD_OUTER_SUIT)
+ new_wiz.equip_to_slot_or_del(new /obj/item/storage/backpack/satchel(new_wiz), SLOT_HUD_BACK)
+ if(new_wiz.dna.species.speciesbox)
+ new_wiz.equip_to_slot_or_del(new new_wiz.dna.species.speciesbox(new_wiz), SLOT_HUD_IN_BACKPACK)
+ else
+ new_wiz.equip_to_slot_or_del(new /obj/item/storage/box/survival(new_wiz), SLOT_HUD_IN_BACKPACK)
+ new_wiz.equip_to_slot_or_del(new /obj/item/teleportation_scroll(new_wiz), SLOT_HUD_RIGHT_STORE)
+ var/obj/item/spellbook/spellbook = new /obj/item/spellbook(new_wiz)
+ spellbook.owner = new_wiz
+ spellbook.remove_harmful_spells_and_items()
+ spellbook.uses = SPELLBOOK_AVAILABLE_POINTS
+ new_wiz.equip_to_slot_or_del(spellbook, SLOT_HUD_LEFT_HAND)
+
+ var/list/reading = list()
+ reading += "You will find a list of available spells in your spell book. Choose your magic arsenal carefully."
+ reading += "The spellbook is bound to you, and others cannot use it."
+ reading += "In your pockets you will find a teleport scroll. Use it as needed."
+ new_wiz.mind.store_memory("Remember: do not forget to prepare your spells.")
+ new_wiz.update_icons()
+ new_wiz.gene_stability += DEFAULT_GENE_STABILITY //magic
+ return reading
+
+/obj/item/spellbook/proc/remove_harmful_spells_and_items()
+ main_categories -= "Magical Items"
+ main_categories -= "Loadouts"
+ spell_categories -= "Offensive"
+ spell_categories -= "Rituals"
+
+/datum/spellbook_entry/summon_supermatter
+ category = "Offensive"
+
+/datum/spellbook_entry/rathens
+ category = "Offensive"
diff --git a/modular_ss220/antagonists/code/rave_wizard/great_revelry.dm b/modular_ss220/antagonists/code/rave_wizard/great_revelry.dm
index a2142fabaa10..817dbdfdac80 100644
--- a/modular_ss220/antagonists/code/rave_wizard/great_revelry.dm
+++ b/modular_ss220/antagonists/code/rave_wizard/great_revelry.dm
@@ -1,4 +1,4 @@
-/obj/effect/proc_holder/spell/great_revelry
+/datum/spell/great_revelry
name = "Ritual of Great Revelry"
desc = "Gives everyone a beckoning bottle of alcohol, forcing them to drop an item from their hand."
@@ -20,10 +20,10 @@
action_background_icon_state = "revelry"
action_icon = 'modular_ss220/antagonists/icons/rave.dmi'
-/obj/effect/proc_holder/spell/great_revelry/create_new_targeting()
+/datum/spell/great_revelry/create_new_targeting()
return new /datum/spell_targeting/self
-/obj/effect/proc_holder/spell/great_revelry/cast(list/targets, mob/user = usr)
+/datum/spell/great_revelry/cast(list/targets, mob/user = usr)
for(var/mob/living/carbon/human/H in GLOB.player_list)
var/turf/T = get_turf(H)
if(T && is_away_level(T.z))
@@ -36,7 +36,7 @@
give_alcohol(H)
-/obj/effect/proc_holder/spell/great_revelry/proc/give_alcohol(mob/living/carbon/human/H)
+/datum/spell/great_revelry/proc/give_alcohol(mob/living/carbon/human/H)
var/bottle_type = pick(beverages)
var/obj/item/bottle = new bottle_type(get_turf(H))
playsound(get_turf(H),'modular_ss220/antagonists/sound/beer_can_open.ogg', 50, TRUE)
@@ -44,5 +44,5 @@
/datum/spellbook_entry/great_revelry
name = "Ritual of Great Revelry"
- spell_type = /obj/effect/proc_holder/spell/great_revelry
+ spell_type = /datum/spell/great_revelry
category = "Rave"
diff --git a/modular_ss220/antagonists/code/rave_wizard/rave_wizard_event.dm b/modular_ss220/antagonists/code/rave_wizard/rave_wizard_event.dm
index 731cd1b6af61..69ec32d61262 100644
--- a/modular_ss220/antagonists/code/rave_wizard/rave_wizard_event.dm
+++ b/modular_ss220/antagonists/code/rave_wizard/rave_wizard_event.dm
@@ -1,4 +1,3 @@
-#define SPELLBOOK_AVAILABLE_POINTS 4
#define MAGIVENDS_PRODUCTS_REFILL_VALUE 20
#define WIZARD_WIKI ("На вики-странице доступна более подробная информация: ([GLOB.configuration.url.wiki_url]/index.php/Wizard)")
#define RAVE_WIZARD_EVENT_WEIGHT 5
@@ -23,7 +22,9 @@
if(new_wizard)
var/mob/living/carbon/human/new_character = makeBody(new_wizard)
- new_character.mind.make_rave_wizard()
+ var/datum/antagonist/wizard/rave_wizard = new /datum/antagonist/wizard/rave()
+ new_character.mind.add_antag_datum(rave_wizard)
+ new_character.forceMove(pick(GLOB.wizardstart))
// This puts them at the wizard spawn, worry not
new_character.equip_to_slot_or_del(new /obj/item/reagent_containers/drinks/mugwort(new_wizard), SLOT_HUD_IN_BACKPACK)
new_character.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses, SLOT_HUD_GLASSES)
@@ -53,71 +54,6 @@
magic.product_records.Cut()
magic.build_inventory(magic.products, magic.product_records)
-/datum/mind/proc/make_rave_wizard()
- if(!(src in SSticker.mode.wizards))
- SSticker.mode.wizards += src
- special_role = SPECIAL_ROLE_WIZARD
- assigned_role = SPECIAL_ROLE_WIZARD
- //ticker.mode.learn_basic_spells(current)
- if(!GLOB.wizardstart.len)
- current.loc = pick(GLOB.latejoin)
- to_chat(current, "HOT INSERTION, GO GO GO")
- else
- current.loc = pick(GLOB.wizardstart)
-
- SSticker.mode.equip_wizard(current)
- src.learn_rave_spells()
- for(var/obj/item/spellbook/S in current.contents)
- S.op = 0
- S.remove_harmful_spells_and_items()
- S.uses = SPELLBOOK_AVAILABLE_POINTS
- SSticker.mode.forge_rave_wizard_objectives(src)
- SSticker.mode.greet_rave_wizard(src)
- SSticker.mode.update_wiz_icons_added(src)
- SSticker.mode.name_wizard(current)
-
-/datum/mind/proc/learn_rave_spells()
- var/spell_paths = list(/obj/effect/proc_holder/spell/projectile/beer_missile,
- /obj/effect/proc_holder/spell/aoe/conjure/timestop/dance,
- /obj/effect/proc_holder/spell/great_revelry,
- /obj/effect/proc_holder/spell/touch/rocker,
- /obj/effect/proc_holder/spell/aoe/conjure/summon_disco)
- for(var/spell_path in spell_paths)
- var/S = new spell_path
- src.AddSpell(S)
-
-/obj/item/spellbook/proc/remove_harmful_spells_and_items()
- main_categories -= "Magical Items"
- main_categories -= "Loadouts"
- spell_categories -= "Offensive"
- spell_categories -= "Rituals"
-
-
-/datum/spellbook_entry/summon_supermatter
- category = "Offensive"
-
-/datum/spellbook_entry/rathens
- category = "Offensive"
-
-/datum/game_mode/proc/greet_rave_wizard(datum/mind/wizard, you_are=TRUE)
- SEND_SOUND(wizard.current, sound('sound/ambience/antag/ragesmages.ogg'))
- var/list/messages = list()
- if(you_are)
- messages.Add(span_danger("Вы — маг рейва!"))
-
- messages.Add(wizard.prepare_announce_objectives(title = FALSE))
- messages.Add(WIZARD_WIKI)
- to_chat(wizard.current, chat_box_red(messages.Join("
")))
- wizard.current.create_log(MISC_LOG, "[wizard.current] was made into a wizard")
-
-/datum/game_mode/proc/forge_rave_wizard_objectives(datum/mind/wizard)
- wizard.add_mind_objective(/datum/objective/wizrave)
-
-/datum/objective/wizrave
- explanation_text = "Устройте вечеринку, о которой потомки будут слагать легенды."
- needs_target = FALSE
- completed = TRUE
-
/datum/event_container/major/New()
. = ..()
ASSERT(length(available_events) > 0)
@@ -127,5 +63,4 @@
#undef MAGIVENDS_PRODUCTS_REFILL_VALUE
#undef WIZARD_WIKI
-#undef SPELLBOOK_AVAILABLE_POINTS
#undef RAVE_WIZARD_EVENT_WEIGHT
diff --git a/modular_ss220/antagonists/code/rave_wizard/rocker_touch.dm b/modular_ss220/antagonists/code/rave_wizard/rocker_touch.dm
index c67fc6ba2c36..8d6d065311d0 100644
--- a/modular_ss220/antagonists/code/rave_wizard/rocker_touch.dm
+++ b/modular_ss220/antagonists/code/rave_wizard/rocker_touch.dm
@@ -1,7 +1,7 @@
#define DRUGS_AMOUNT_INJECTED_BY_TUMOR 20
#define ALCOHOL_AMOUNT_INJECTED_BY_TUMOR 20
-/obj/effect/proc_holder/spell/touch/rocker
+/datum/spell/touch/touch/rocker
name = "Rocker Touch"
desc = "Teach those foolish suits how to spend time in style"
hand_path = /obj/item/melee/touch_attack/rocker
@@ -22,7 +22,7 @@
/datum/spellbook_entry/rocker_curse
name = "Alcoholism curse"
- spell_type = /obj/effect/proc_holder/spell/touch/rocker
+ spell_type = /datum/spell/touch/touch/rocker
category = "Rave"
cost = 1
diff --git a/modular_ss220/antagonists/code/rave_wizard/summon_disco_ball.dm b/modular_ss220/antagonists/code/rave_wizard/summon_disco_ball.dm
index e4ac6d6ec424..44b360510383 100644
--- a/modular_ss220/antagonists/code/rave_wizard/summon_disco_ball.dm
+++ b/modular_ss220/antagonists/code/rave_wizard/summon_disco_ball.dm
@@ -1,4 +1,4 @@
-/obj/effect/proc_holder/spell/aoe/conjure/summon_disco
+/datum/spell/aoe/conjure/summon_disco
name = "Summon Disco Ball"
desc = "Summons a disco ball"
base_cooldown = 400 SECONDS
@@ -13,7 +13,7 @@
action_icon = 'modular_ss220/antagonists/icons/rave.dmi'
var/obj/machinery/jukebox/disco/indestructible/our_disco
-/obj/effect/proc_holder/spell/aoe/conjure/summon_disco/cast(list/targets, mob/living/user = usr)
+/datum/spell/aoe/conjure/summon_disco/cast(list/targets, mob/living/user = usr)
if(!our_disco)
var/list/summoned_items = ..()
if(summoned_items || summoned_items.len > 0)
@@ -25,6 +25,6 @@
/datum/spellbook_entry/summon_disco
name = "Summon Disco Ball"
- spell_type = /obj/effect/proc_holder/spell/aoe/conjure/summon_disco
+ spell_type = /datum/spell/aoe/conjure/summon_disco
cost = 1
category = "Rave"