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

Cryokinesis: Chapter 2 #384

Merged
merged 22 commits into from
Jun 23, 2024
Merged
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 maplestation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -6364,6 +6364,7 @@
#include "maplestation_modules\code\modules\magic\story_spells\flare.dm"
#include "maplestation_modules\code\modules\magic\story_spells\freeze_person.dm"
#include "maplestation_modules\code\modules\magic\story_spells\healing_touch.dm"
#include "maplestation_modules\code\modules\magic\story_spells\ice_blast.dm"
#include "maplestation_modules\code\modules\magic\story_spells\ice_knife.dm"
#include "maplestation_modules\code\modules\magic\story_spells\illusion.dm"
#include "maplestation_modules\code\modules\magic\story_spells\mage_hand.dm"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,29 @@
GLOBAL_LIST_INIT(spellbook_cryokinesis_items, generate_spellbook_items(SPELLBOOK_CATEGORY_CRYOKINESIS))

/datum/spellbook_item/spell/ice_blast
name = "Ice Blast"
description = "An incantation to summon a condensed energy proejctile made out of ice. On contact with anything, it'll cover the nearby surfaces with a thin layer of ice."
lore = "The favored tool of Frost Mages, Clowns, and Frost Clowns, Ice Blasts are quick and easy ways of inconveniencing an area for slip and slides alike."

category = SPELLBOOK_CATEGORY_CRYOKINESIS

our_action_typepath = /datum/action/cooldown/spell/pointed/projectile/ice_blast

/datum/spellbook_item/spell/ice_knife
name = "Ice Knife"
description = "An incantation to summon a dagger made out of ice. While dull, it can be tossed to freeze an area."
lore = "The favored tool of Frost Mages, Clowns, and Frost Clowns, Ice Knives are dull implements first created as an attempt to conjure weaponry, later better repurposed as throwing weapons and tools of mischief; creating floors of slippery ice wherever it hits."
description = "Conjures an ice knife at will in your hands."
lore = "A spell not commonly practiced by followers of Cryokinesis for the fact that the knife's durability is much less desirable than a real one, some still sought to learn it for the sake of self defense. \
Even then, the knife does not hold well on it's own and will eventually dissapear as to preserve mana."

category = SPELLBOOK_CATEGORY_CRYOKINESIS
has_params = TRUE

our_action_typepath = /datum/action/cooldown/spell/conjure_item/ice_knife

/datum/spellbook_item/spell/ice_knife/generate_customization_params()
. = list()
.["ice_blade"] = new /datum/spellbook_customization_entry/boolean("ice_blade", "Ice Armblade Variant", "Construct a blade around your arm, in exchange of harming you in the process.")

our_action_typepath = /datum/action/cooldown/spell/pointed/projectile/ice_knife

/datum/spellbook_item/spell/freeze_person
name = "Freeze Person"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@
AddComponent(/datum/component/uses_mana/story_spell/pointed/freeze_person)

/datum/action/cooldown/spell/pointed/freeze_person/is_valid_target(atom/cast_on)
. = ..()
if(!.)
return FALSE
if(!isliving(cast_on))
var/mob/caster = usr || owner
if(caster)
Expand All @@ -52,6 +49,19 @@
steam.set_up(10, FALSE, target.loc)
steam.start()

if (target == caster)
caster.visible_message(
span_danger("[caster] freezes [caster.p_them()]self into a cube!"),
span_danger("You freeze yourself into a cube!"),
span_hear("You hear something being frozen!"),
)
else
caster.visible_message(
span_danger("[caster] freezes [target] into a cube!"),
span_danger("You freeze [target] into a cube!"),
span_hear("You hear something being frozen!"),
)

caster?.Beam(target, icon_state="bsa_beam", time=5)
target.apply_status_effect(/datum/status_effect/freon/magic)

Expand All @@ -60,7 +70,7 @@
duration = 100
status_type = 3
alert_type = /atom/movable/screen/alert/status_effect/magic_frozen
var/trait_list = list(TRAIT_IMMOBILIZED, TRAIT_NOBLOOD, TRAIT_MUTE, TRAIT_EMOTEMUTE, TRAIT_RESISTHEAT)
var/trait_list = list(TRAIT_IMMOBILIZED, TRAIT_NOBLOOD, TRAIT_MUTE, TRAIT_EMOTEMUTE, TRAIT_RESISTHEAT, TRAIT_HANDS_BLOCKED, TRAIT_AI_PAUSED)

/atom/movable/screen/alert/status_effect/magic_frozen
name = "Magically Frozen"
Expand All @@ -78,22 +88,37 @@
air.temperature = max(air.temperature + -15, 0)
air.react(nearby_turf)

for(var/obj/item/whatever in owner)
ADD_TRAIT(whatever, TRAIT_NODROP, REF(src))
owner.add_traits(trait_list, TRAIT_STATUS_EFFECT(id))
owner.status_flags |= GODMODE
owner.adjust_bodytemperature(-50)
owner.adjust_bodytemperature(-70)
owner.move_resist = INFINITY
owner.move_force = INFINITY
owner.pull_force = INFINITY

/datum/status_effect/freon/magic/do_resist()
return
to_chat(owner, span_notice("You start breaking out of the ice cube..."))
if(do_after(owner, (duration - world.time) / 2))
if(!QDELETED(src))
owner.visible_message(
span_danger("[owner] breaks out of the ice cube!"),
span_danger("You break out of the ice cube!"),
span_hear("You hear cracking!")
)
owner.remove_status_effect(/datum/status_effect/freon/magic)
owner.Knockdown(3 SECONDS)

/datum/status_effect/freon/magic/on_remove()
playsound(owner, 'sound/effects/glass_step.ogg', 70, TRUE, FALSE)
owner.adjust_bodytemperature(-100)
owner.visible_message(
span_danger("The cube around [owner] melts!"),
span_danger("The cube around you melts!"),
)
for(var/obj/item/whatever in owner)
REMOVE_TRAIT(whatever, TRAIT_NODROP, REF(src))
owner.remove_traits(trait_list, TRAIT_STATUS_EFFECT(id))
owner.status_flags &= ~GODMODE
owner.Knockdown(3 SECONDS)
owner.move_resist = initial(owner.move_resist)
owner.move_force = initial(owner.move_force)
owner.pull_force = initial(owner.pull_force)
Expand Down
86 changes: 86 additions & 0 deletions maplestation_modules/code/modules/magic/story_spells/ice_blast.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
/datum/component/uses_mana/story_spell/pointed/ice_blast
var/ice_blast_attunement = 0.5
var/ice_blast_cost = 25

/datum/component/uses_mana/story_spell/pointed/ice_blast/get_attunement_dispositions()
. = ..()
.[/datum/attunement/ice] = ice_blast_attunement

/datum/component/uses_mana/story_spell/pointed/ice_blast/get_mana_required(atom/caster, atom/cast_on, ...)
return ..() * ice_blast_cost

/datum/action/cooldown/spell/pointed/projectile/ice_blast
name = "Ice blast"
desc = "Throw an ice blast which'll cover nearby floor with a thin, slippery sheet of ice."
button_icon = 'maplestation_modules/icons/mob/actions/actions_cantrips.dmi'
button_icon_state = "ice_blast"
sound = 'sound/effects/parry.ogg'

cooldown_time = 1 MINUTES
spell_requirements = SPELL_REQUIRES_NO_ANTIMAGIC

invocation = "Frig'dus humer'm!" //this one sucks, ireally wis hi had something better
invocation_type = INVOCATION_SHOUT
school = SCHOOL_CONJURATION

active_msg = "You prepare to throw an ice blast."
deactive_msg = "You stop preparing to throw an ice blast."

cast_range = 8
projectile_type = /obj/projectile/magic/ice_blast

/datum/action/cooldown/spell/pointed/projectile/ice_blast/New(Target, original)
. = ..()

AddComponent(/datum/component/uses_mana/story_spell/pointed/ice_blast)

/// Special ice made so that I can replace it's Initialize's MakeSlippery call to have a different property.
/turf/open/misc/funny_ice
name = "thin ice sheet"
desc = "A thin sheet of solid ice. Looks slippery."
icon = 'icons/turf/floors/ice_turf.dmi'
icon_state = "ice_turf-0"
base_icon_state = "ice_turf-0"
slowdown = 1
bullet_sizzle = TRUE
underfloor_accessibility = UNDERFLOOR_HIDDEN
footstep = FOOTSTEP_FLOOR
barefootstep = FOOTSTEP_HARD_BAREFOOT
clawfootstep = FOOTSTEP_HARD_CLAW
heavyfootstep = FOOTSTEP_GENERIC_HEAVY

/turf/open/misc/funny_ice/Initialize(mapload)
. = ..()
MakeSlippery(TURF_WET_ICE, INFINITY, 0, INFINITY, TRUE)

/obj/projectile/magic/ice_blast
name = "ice blast"
icon_state = "ice_2"
damage_type = BRUTE
damage = 15
wound_bonus = 10

/obj/projectile/magic/ice_blast/on_hit(atom/target, blocked = FALSE, pierce_hit)
. = ..()
if(. != BULLET_ACT_HIT)
return
playsound(loc, 'sound/weapons/ionrifle.ogg', 70, TRUE, FALSE)

var/datum/effect_system/steam_spread/steam = new()
steam.set_up(10, FALSE, target.loc)
steam.start()

for(var/turf/open/nearby_turf in range(3, target))
var/datum/gas_mixture/air = nearby_turf.return_air()
var/datum/gas_mixture/turf_air = nearby_turf.return_air()
if (air && air != turf_air)
air.temperature = max(air.temperature + -15, TCMB)
air.react(nearby_turf)

for(var/turf/open/nearby_turf in range(1, src)) // this is fuck ugly, could make a new MakeSlippery flag instead.
if(isgroundlessturf(nearby_turf))
continue
var/ice_turf = /turf/open/misc/funny_ice
var/reset_turf = nearby_turf.type
nearby_turf.TerraformTurf(ice_turf, flags = CHANGETURF_INHERIT_AIR) // this will also delete decals! consider the comment above. i'm tired.
addtimer(CALLBACK(nearby_turf, TYPE_PROC_REF(/turf, TerraformTurf), reset_turf, null, CHANGETURF_INHERIT_AIR), 20 SECONDS, TIMER_OVERRIDE|TIMER_UNIQUE)
Loading
Loading