Files
Bubberstation/code/datums/components/wormborn.dm
Xackii 2165300a01 Adds 9 wizard perks (#83262)
## About The Pull Request

Add new spells category for wizards: Perks. perks are not really spells,
but useful (and not so useful) improvements for your wizard which
provide more variety for builds.
https://youtu.be/eeVvUkVE3xQ
All perks cost 2 points, they work without wizard’s uniform, cannot
refund, effect start only at the station (perks will not work at the
wizard’s base). Perk can only be purchased once.

9 added perks:
1. Four Hands - gives you 2 extra hands.
2. Worm Born - on death, wizard turns into a large worm and can no
longer return to his previous form.
![Снимок экрана 2024-06-02
223645](https://github.com/tgstation/tgstation/assets/120736708/2dfac647-4c3c-4824-8320-73fc98cc61fd)
3. Dejavu - every 60 seconds returns wizard to where he was 60 seconds
ago and restores his health to the amount he had 60 seconds ago.
4. Sale Off - When buying something from a book of spells, wizard has a
chance not to spend points for the purchase, depending on the purchase
price. 1/2/3/4 price chance 50/25/15/10%. You can no longer refund
purchases.
5. Gamble - Give wizard 2 random perks.
6. Heart Eater - By eating someone's heart, the wizard has a chance to
either increase his maximum HP and stamina by 25 or lose 10 percent of
his maximum HP but get a random mutation.
7. Slime Friends - Slimes is your friends now. Every 20 Seconds you
spend 50 nutriments to spawn random big angry slime.
8. Transparence - wizard becomes half transparent, any projectiles pass
through, but you loses 25% of max HP and you get a stalker who will
follow you to the station to kill you.
9. Magnetism - Wizard gain gravitational anomaly that orbit around him,
which attracts objects and people.
https://youtu.be/gp6ZtTrZu7I

## Why It's Good For The Game

Gives the wizard more options to create a fun and interesting builds

## Changelog

🆑
add: new wizard spells category - perks.
add: adds 9 wizard perks.
/🆑

---------

Co-authored-by: Jacquerel <hnevard@gmail.com>
2024-07-15 16:28:41 +01:00

75 lines
2.2 KiB
Plaintext

/datum/component/wormborn
/datum/component/wormborn/Initialize(...)
. = ..()
if(!isliving(parent))
return COMPONENT_INCOMPATIBLE
/datum/component/wormborn/RegisterWithParent()
. = ..()
RegisterSignal(parent, COMSIG_LIVING_DEATH, PROC_REF(second_breath))
/datum/component/wormborn/UnregisterFromParent()
. = ..()
UnregisterSignal(parent, COMSIG_LIVING_DEATH)
/datum/component/wormborn/proc/second_breath(mob/living/source)
SIGNAL_HANDLER
if(get_area(source) == GLOB.areas_by_type[/area/centcom/wizard_station])
return
source.buckled?.unbuckle_mob(source, force = TRUE)
if(source.movement_type & VENTCRAWLING)
source.forceMove(get_turf(source))
var/mob/living/worm = new /mob/living/basic/wizard_worm(get_turf(source))
source.mind?.transfer_to(worm)
source.forceMove(worm)
/mob/living/basic/wizard_worm
name = "Magic Worm"
desc = "Large blue worm. What happens if you put your hand in his mouth?."
icon = 'icons/mob/simple/mob.dmi'
icon_state = "wizard_start"
icon_living = "wizard_start"
base_icon_state = "wizard"
maxHealth = 800
health = 800
melee_damage_lower = 20
melee_damage_upper = 30
obj_damage = 200
speed = 0
move_force = MOVE_FORCE_OVERPOWERING
move_resist = MOVE_FORCE_OVERPOWERING
pull_force = MOVE_FORCE_OVERPOWERING
mob_size = MOB_SIZE_HUGE
sentience_type = SENTIENCE_BOSS
mob_biotypes = MOB_ORGANIC|MOB_SPECIAL
/mob/living/basic/wizard_worm/has_gravity(turf/gravity_turf)
return TRUE
/mob/living/basic/wizard_worm/can_be_pulled()
return FALSE
/mob/living/basic/wizard_worm/Initialize(mapload, spawn_bodyparts = TRUE)
. = ..()
AddElement(/datum/element/wall_tearer)
if(spawn_bodyparts)
build_tail()
/mob/living/basic/wizard_worm/proc/build_tail(mob/living/tail)
AddComponent(/datum/component/mob_chain, vary_icon_state = TRUE)
var/mob/living/basic/wizard_worm/prev = src
for(var/i in 1 to 5)
prev = new_segment(behind = prev)
update_appearance(UPDATE_ICON_STATE)
/mob/living/basic/wizard_worm/proc/new_segment(mob/living/basic/wizard_worm/behind)
var/mob/living/segment = new type(drop_location(), FALSE)
ADD_TRAIT(segment, TRAIT_PERMANENTLY_MORTAL, INNATE_TRAIT)
segment.AddComponent(/datum/component/mob_chain, front = behind, vary_icon_state = TRUE)
return segment