mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 12:07:27 +01:00
Ports Anti-magic from TG. (#27560)
* the rest of the fucking owl * OK hands need work but otherwise good * fuck time out fix vampire after * temporary codersprite do not merge this lmao * codersprite up * pause, time out * deploy the antimagic * Update code/__HELPERS/trait_helpers.dm Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com> Signed-off-by: Qwertytoforty <52090703+Qwertytoforty@users.noreply.github.com> * Update code/datums/status_effects/buffs.dm Signed-off-by: Burzah <116982774+Burzah@users.noreply.github.com> * Update code/game/gamemodes/wizard/magic_tarot.dm Signed-off-by: Burzah <116982774+Burzah@users.noreply.github.com> --------- Signed-off-by: Qwertytoforty <52090703+Qwertytoforty@users.noreply.github.com> Signed-off-by: Burzah <116982774+Burzah@users.noreply.github.com> Co-authored-by: DGamerL <108773801+DGamerL@users.noreply.github.com> Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
This commit is contained in:
co-authored by
DGamerL
Burzah
parent
6057ff5c31
commit
7bbebbb23f
@@ -24,6 +24,7 @@ Updates the spell's actions on use as well, so they know when they can or can't
|
||||
create_attack_logs = FALSE
|
||||
/// Every alien spell creates only logs, no attack messages on someone placing weeds, but you DO get attack messages on neurotoxin and corrosive acid
|
||||
create_custom_logs = TRUE
|
||||
antimagic_flags = NONE
|
||||
/// How much plasma it costs to use this
|
||||
var/plasma_cost = 0
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
base_cooldown = 1
|
||||
action_background_icon_state = "bg_alien"
|
||||
clothes_req = FALSE
|
||||
antimagic_flags = NONE
|
||||
create_attack_logs = FALSE
|
||||
/// Every alien spell creates only logs, no attack messages on someone placing weeds, but you DO get attack messages on neurotoxin and corrosive acid
|
||||
create_custom_logs = TRUE
|
||||
|
||||
@@ -27,10 +27,11 @@
|
||||
|
||||
/obj/item/melee/touch_attack/banana/after_attack(atom/target, mob/user, proximity_flag, click_parameters)
|
||||
. = ..()
|
||||
|
||||
if(is_apprentice_spell && iswizard(target) && target != user)
|
||||
to_chat(user, "<span class='danger'>Seriously?! Honk THEM, not me!</span>")
|
||||
return
|
||||
if(!proximity_flag || target == user || !ishuman(target) || !iscarbon(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED))
|
||||
if(!proximity_flag || target == user || blocked_by_antimagic || !ishuman(target) || !iscarbon(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED))
|
||||
return
|
||||
|
||||
var/datum/effect_system/smoke_spread/s = new
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
overlay = null
|
||||
action_icon_state = "bloodcrawl"
|
||||
action_background_icon_state = "bg_demon"
|
||||
antimagic_flags = NONE
|
||||
var/allowed_type = /obj/effect/decal/cleanable
|
||||
var/phased = FALSE
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
clothes_req = FALSE
|
||||
invocation = "none"
|
||||
invocation_type = "none"
|
||||
antimagic_flags = NONE
|
||||
|
||||
selection_activated_message = "<span class='notice'>You prepare a blessing. Click on a target to start blessing.</span>"
|
||||
selection_deactivated_message = "<span class='notice'>The crew will be blessed another time.</span>"
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
clothes_req = FALSE
|
||||
base_cooldown = 5 SECONDS
|
||||
human_req = TRUE
|
||||
antimagic_flags = NONE
|
||||
action_icon_state = "chef"
|
||||
action_background_icon_state = "bg_default"
|
||||
still_recharging_msg = "All this thinking makes your head hurt, wait a bit longer."
|
||||
|
||||
@@ -27,6 +27,13 @@
|
||||
|
||||
var/mob/living/carbon/human/target = targets[1]
|
||||
|
||||
if(target.can_block_magic(antimagic_flags))
|
||||
target.visible_message("<span class='danger'>[target]'s face bursts into flames, which instantly burst outward, leaving [target.p_them()] unharmed!</span>",
|
||||
"<span class='danger'>Your face starts burning up, but the flames are repulsed by your anti-magic protection!</span>",
|
||||
)
|
||||
to_chat(user, "<span class='warning'>The spell had no effect!</span>")
|
||||
return FALSE
|
||||
|
||||
var/obj/item/clothing/mask/horsehead/magichead = new /obj/item/clothing/mask/horsehead
|
||||
magichead.flags |= NODROP | DROPDEL //curses!
|
||||
magichead.flags_inv = null //so you can still see their face
|
||||
|
||||
@@ -38,6 +38,12 @@
|
||||
origin.Beam(target, icon_state = "lightning[rand(1, 12)]", icon = 'icons/effects/effects.dmi', time = 5)
|
||||
|
||||
/datum/spell/charge_up/bounce/lightning/apply_bounce_effect(mob/origin, mob/living/target, energy, mob/user)
|
||||
if(target.can_block_magic(antimagic_flags))
|
||||
target.visible_message(
|
||||
"<span class='warning'>[target] absorbs the spell, remaining unharmed!</span>",
|
||||
"<span class='danger'>You absorb the spell, remaining unharmed!</span>"
|
||||
)
|
||||
return
|
||||
if(damaging)
|
||||
target.electrocute_act(energy, "Lightning Bolt", flags = SHOCK_NOGLOVES)
|
||||
else
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
clothes_req = FALSE
|
||||
cast_sound = null
|
||||
human_req = TRUE
|
||||
antimagic_flags = NONE
|
||||
|
||||
action_icon_state = "mime"
|
||||
action_background_icon_state = "bg_mime"
|
||||
@@ -87,6 +88,7 @@
|
||||
clothes_req = FALSE
|
||||
base_cooldown = 30 SECONDS
|
||||
human_req = TRUE
|
||||
antimagic_flags = NONE
|
||||
|
||||
action_icon_state = "fingergun"
|
||||
action_background_icon_state = "bg_mime"
|
||||
|
||||
@@ -20,7 +20,8 @@
|
||||
|
||||
/obj/item/melee/touch_attack/mime_malaise/after_attack(atom/target, mob/user, proximity_flag, click_parameters)
|
||||
. = ..()
|
||||
if(!proximity_flag || target == user || !ishuman(target) || !iscarbon(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED))
|
||||
|
||||
if(!proximity_flag || target == user || blocked_by_antimagic || !ishuman(target) || !iscarbon(user) || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED))
|
||||
return
|
||||
|
||||
var/datum/effect_system/smoke_spread/s = new
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
selection_activated_message = "<span class='notice'>You prepare to transfer your mind. Click on a target to cast the spell.</span>"
|
||||
selection_deactivated_message = "<span class='notice'>You decide that your current form is good enough.</span>"
|
||||
cooldown_min = 200 //100 deciseconds reduction per rank
|
||||
antimagic_flags = MAGIC_RESISTANCE|MAGIC_RESISTANCE_MIND
|
||||
var/list/protected_roles = list(SPECIAL_ROLE_WIZARD, SPECIAL_ROLE_CHANGELING, SPECIAL_ROLE_CULTIST) //which roles are immune to the spell
|
||||
var/paralysis_amount_caster = 40 SECONDS //how much the caster is paralysed for after the spell
|
||||
var/paralysis_amount_victim = 40 SECONDS //how much the victim is paralysed for after the spell
|
||||
@@ -47,6 +48,9 @@ Also, you never added distance checking after target is selected. I've went ahea
|
||||
if(issilicon(target))
|
||||
to_chat(user, "<span class='warning'>You feel this enslaved being is just as dead as its cold, hard exoskeleton.</span>")
|
||||
return
|
||||
if(target.can_block_magic(antimagic_flags))
|
||||
to_chat(user, "<span class='danger'>Their mind is resisting your spell.</span>")
|
||||
return
|
||||
|
||||
var/mob/living/victim = target//The target of the spell whos body will be transferred to.
|
||||
var/mob/living/caster = user//The wizard/whomever doing the body transferring.
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
base_cooldown = 10
|
||||
clothes_req = FALSE
|
||||
antimagic_flags = NONE
|
||||
|
||||
message = "<span class='notice'>You toggle your night vision!</span>"
|
||||
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
|
||||
/datum/spell/rathens/cast(list/targets, mob/user = usr)
|
||||
for(var/mob/living/carbon/human/H in targets)
|
||||
if(H.can_block_magic(antimagic_flags))
|
||||
continue
|
||||
var/datum/effect_system/smoke_spread/s = new
|
||||
s.set_up(5, FALSE, H)
|
||||
s.start()
|
||||
|
||||
@@ -82,6 +82,8 @@
|
||||
desc = "A distortion in spacetime. You can hear faint music..."
|
||||
icon_state = "nothing"
|
||||
/// A flags which save people from being thrown about
|
||||
var/antimagic_flags = MAGIC_RESISTANCE
|
||||
/// A flags which save people from being thrown about
|
||||
var/obj/effect/cross_action/spacetime_dist/linked_dist
|
||||
/// Used to prevent an infinite loop in the space tiime continuum
|
||||
var/cant_teleport = FALSE
|
||||
@@ -101,6 +103,10 @@
|
||||
AddElement(/datum/element/connect_loc, loc_connections)
|
||||
|
||||
/obj/effect/cross_action/spacetime_dist/proc/walk_link(atom/movable/AM)
|
||||
if(ismob(AM))
|
||||
var/mob/M = AM
|
||||
if(M.can_block_magic(antimagic_flags, charge_cost = 0))
|
||||
return
|
||||
if(linked_dist && walks_left > 0)
|
||||
flick("purplesparkles", src)
|
||||
linked_dist.get_walker(AM)
|
||||
|
||||
@@ -313,6 +313,10 @@
|
||||
return
|
||||
|
||||
var/mob/living/target = targets[1]
|
||||
if(target.can_block_magic(antimagic_flags))
|
||||
to_chat(target, "<span class='notice'>Your eye itches, but it passes momentarily.</span>")
|
||||
to_chat(user, "<span class='notice'>The spell had no effect!</span>")
|
||||
return FALSE
|
||||
target.EyeBlurry(40 SECONDS)
|
||||
target.EyeBlind(30 SECONDS)
|
||||
|
||||
@@ -414,6 +418,10 @@
|
||||
playMagSound()
|
||||
for(var/turf/T in targets) //Done this way so things don't get thrown all around hilariously.
|
||||
for(var/atom/movable/AM in T)
|
||||
if(ismob(AM))
|
||||
var/mob/victim_mob = AM
|
||||
if(victim_mob.can_block_magic(antimagic_flags))
|
||||
continue
|
||||
thrownatoms += AM
|
||||
|
||||
for(var/am in thrownatoms)
|
||||
@@ -457,6 +465,8 @@
|
||||
|
||||
/datum/spell/sacred_flame/cast(list/targets, mob/user = usr)
|
||||
for(var/mob/living/L in targets)
|
||||
if(L.can_block_magic(antimagic_flags))
|
||||
continue
|
||||
L.adjust_fire_stacks(20)
|
||||
if(isliving(user))
|
||||
var/mob/living/U = user
|
||||
|
||||
Reference in New Issue
Block a user