Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wizard den away site update #553

Draft
wants to merge 5 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions baystation12.dme
Original file line number Diff line number Diff line change
Expand Up @@ -2433,6 +2433,7 @@
#include "code\modules\mob\living\simple_animal\hostile\tree.dm"
#include "code\modules\mob\living\simple_animal\hostile\vagrant.dm"
#include "code\modules\mob\living\simple_animal\hostile\voxslug.dm"
#include "code\modules\mob\living\simple_animal\hostile\wizard.dm"
#include "code\modules\mob\living\simple_animal\hostile\commanded\_command_defines.dm"
#include "code\modules\mob\living\simple_animal\hostile\giant_spider\_giant_spider.dm"
#include "code\modules\mob\living\simple_animal\hostile\giant_spider\guard.dm"
Expand Down
23 changes: 22 additions & 1 deletion code/datums/outfits/wizardry.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
back = /obj/item/storage/backpack
backpack_contents = list(/obj/item/storage/box = 1)
hierarchy_type = /decl/hierarchy/outfit/wizard
flags = OUTFIT_HAS_BACKPACK|OUTFIT_RESET_EQUIPMENT
flags = OUTFIT_RESET_EQUIPMENT

/decl/hierarchy/outfit/wizard/blue
name = "Wizard - Blue"
Expand All @@ -25,3 +25,24 @@
head = /obj/item/clothing/head/wizard/marisa
suit = /obj/item/clothing/suit/wizrobe/marisa
shoes = /obj/item/clothing/shoes/sandal/marisa

// Outfits without special equipment
/decl/hierarchy/outfit/wizard/blue/empty
name = "Wizard Empty - Blue"

l_ear = null
r_pocket = null
l_hand = null
r_hand = null
back = null
backpack_contents = list()

/decl/hierarchy/outfit/wizard/red/empty
name = "Wizard Empty - Red"

l_ear = null
r_pocket = null
l_hand = null
r_hand = null
back = null
backpack_contents = list()
8 changes: 8 additions & 0 deletions code/modules/awaymissions/corpse.dm
Original file line number Diff line number Diff line change
Expand Up @@ -190,3 +190,11 @@
/obj/effect/landmark/corpse/scg_explorer
name = "SCG Explorer"
corpse_outfits = list(/decl/hierarchy/outfit/scg_explorer)

/obj/effect/landmark/corpse/wizard_blue
name = "Wizard - Blue"
corpse_outfits = list(/decl/hierarchy/outfit/wizard/blue/empty)

/obj/effect/landmark/corpse/wizard_red
name = "Wizard - Red"
corpse_outfits = list(/decl/hierarchy/outfit/wizard/red/empty)
2 changes: 2 additions & 0 deletions code/modules/mana/mana.dm
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@
var/mob/M = target
if(istype(M.mind))
return M.mind.mana
if("mana" in M.vars)
return M:mana
// Certain items may store mana
if(istype(target, /obj/item))
var/obj/item/I = target
Expand Down
58 changes: 58 additions & 0 deletions code/modules/mob/living/simple_animal/hostile/wizard.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/mob/living/simple_animal/hostile/wizard
name = "wizard"
desc = "A wizard in blue robes."
icon = 'icons/mob/simple_animal/human_enemies.dmi'
icon_state = "wizard_blue"
icon_living = "wizard_blue"
icon_dead = "wizard_blue"
turns_per_move = 5
response_help = "pokes"
response_disarm = "shoves"
response_harm = "hits"
movement_cooldown = 2.5
maxHealth = 70
health = 70
harm_intent_damage = 5
can_escape = TRUE
a_intent = I_HURT
natural_weapon = /obj/item/natural_weapon/punch
unsuitable_atmos_damage = 15
faction = "wizard"
status_flags = CANPUSH

ai_holder_type = /datum/ai_holder/simple_animal/humanoid/hostile

loot_list = list(/obj/effect/landmark/corpse/wizard_blue = 1)

// Mostly for stuff like mana steal and anti-magic stuff
var/datum/mana/mana = new()

/mob/living/simple_animal/hostile/wizard/Initialize()
. = ..()
mana.mana_level_max = 100
mana.mana_level = mana.mana_level_max
mana.mana_recharge_speed = 2
mana.spell_points = 0

/mob/living/simple_animal/hostile/wizard/death()
. = ..()
check_delete()

/mob/living/simple_animal/hostile/wizard/fireball
ranged = TRUE
ranged_attack_cooldown = DEFAULT_ATTACK_COOLDOWN * 5
projectiletype = /obj/item/projectile/fireball
projectilesound = 'sound/magic/fireball.ogg'
projectile_dispersion = 1

/mob/living/simple_animal/hostile/wizard/fireball/shoot_target(atom/A)
if(!mana.UseMana(15))
return
. = ..()
if(!.)
return

var/say_text = "ONI SOMA![prob(50) ? "!" : ""]"
if(prob(50))
say_text = replacetext(say_text," ","`")
say(say_text)
20 changes: 19 additions & 1 deletion code/modules/projectiles/projectile/special.dm
Original file line number Diff line number Diff line change
Expand Up @@ -197,4 +197,22 @@
var/mob/living/L = target
to_chat(target, SPAN_WARNING("You feel a wave of heat wash over you!"))
L.adjust_fire_stacks(rand(5,8))
L.IgniteMob()
L.IgniteMob()

// Pseudo-spell projectiles used by simple mobs
/obj/item/projectile/fireball
name = "fireball"
icon = 'icons/obj/projectiles.dmi'
icon_state = "fireball"
speed = 2
damage = 50
damage_type = BURN
damage_flags = 0

/obj/item/projectile/fireball/on_impact(atom/target, blocked = 0)
if(QDELETED(src))
return
var/turf/T = get_turf(target)
if(T)
explosion(T, -1, 0, 3)
return ..()
11 changes: 6 additions & 5 deletions code/modules/spells/_spell.dm
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,8 @@

if(isliving(user))
var/mob/living/L = user
if(!istype(L.mind.mana) || L.mind.mana.mana_level < mana_cost)
var/datum/mana/M = GetManaDatum(L)
if(!istype(M) || M.mana_level < mana_cost)
to_chat(L, SPAN_WARNING("You do not have enough mana!"))
return FALSE

Expand Down Expand Up @@ -366,11 +367,11 @@
return FALSE
return TRUE

/datum/spell/proc/TakeMana(mob/user = user, amount = mana_cost)
if(!user.mind)
/datum/spell/proc/TakeMana(mob/living/user = user, amount = mana_cost)
var/datum/mana/M = GetManaDatum(user)
if(!istype(M))
return FALSE
var/mob/living/L = user
return L.mind.mana.UseMana(L, amount, FALSE)
return M.UseMana(user, amount, FALSE)

/datum/spell/proc/invocation(mob/user = usr, var/list/targets) //spelling the spell out and setting it on recharge/reducing charges amount

Expand Down
6 changes: 4 additions & 2 deletions code/modules/spells/general/contract_spells.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@

var/mob/subject

/datum/spell/contract/New(var/mob/M)
..()
/datum/spell/contract/New(mob/M)
. = ..()
if(!istype(M))
return
subject = M
name += " ([M.real_name])"

Expand Down
2 changes: 2 additions & 0 deletions code/modules/spells/general/veil_of_shadows.dm
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@

/datum/spell/veil_of_shadows/proc/cancel_veil()
var/mob/living/carbon/human/H = holder
if(!istype(H))
return
H.RemoveMovementHandler(/datum/movement_handler/mob/incorporeal)
deltimer(timer_id)
timer_id = null
Expand Down
4 changes: 2 additions & 2 deletions code/modules/spells/racial_wizard.dm
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,8 @@
eyeobj.release(src)

/mob/observer/eye/freelook/wizard_eye/Destroy()
if(istype(eyeobj.owner, /mob/living))
if(istype(eyeobj) && istype(eyeobj.owner, /mob/living))
var/mob/living/L = eyeobj.owner
L.release_eye()
qdel(eyeobj)
QDEL_NULL(eyeobj)
return ..()
Binary file modified icons/mob/simple_animal/human_enemies.dmi
Binary file not shown.
Loading
Loading