mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 19:47:22 +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
@@ -3,6 +3,7 @@
|
||||
desc = "This spell needs a description!"
|
||||
human_req = TRUE
|
||||
clothes_req = FALSE
|
||||
antimagic_flags = NONE
|
||||
/// A reference to the owner mindflayer's antag datum.
|
||||
var/datum/antagonist/mindflayer/flayer
|
||||
|
||||
|
||||
@@ -93,6 +93,7 @@ RESTRICT_TYPE(/datum/antagonist/vampire)
|
||||
mob_override.dna?.species.hunger_icon = initial(mob_override.dna.species.hunger_icon)
|
||||
owner.current.alpha = 255
|
||||
REMOVE_TRAITS_IN(owner.current, "vampire")
|
||||
UnregisterSignal(owner, COMSIG_ATOM_HOLY_ATTACK)
|
||||
|
||||
#define BLOOD_GAINED_MODIFIER 0.5
|
||||
|
||||
@@ -362,8 +363,21 @@ RESTRICT_TYPE(/datum/antagonist/vampire)
|
||||
|
||||
mob_override.dna?.species.hunger_icon = 'icons/mob/screen_hunger_vampire.dmi'
|
||||
check_vampire_upgrade(FALSE)
|
||||
RegisterSignal(mob_override, COMSIG_ATOM_HOLY_ATTACK, PROC_REF(holy_attack_reaction))
|
||||
|
||||
|
||||
/datum/antagonist/vampire/proc/holy_attack_reaction(mob/target, obj/item/source, mob/user, antimagic_flags)
|
||||
SIGNAL_HANDLER // COMSIG_ATOM_HOLY_ATTACK
|
||||
if(!HAS_MIND_TRAIT(user, TRAIT_HOLY)) // Sec officer with a nullrod, or miner with a talisman, does not get to do this
|
||||
return
|
||||
if(!source.force) // Needs force to work.
|
||||
return
|
||||
var/bonus_force = 0
|
||||
if(istype(source, /obj/item/nullrod))
|
||||
var/obj/item/nullrod/N = source
|
||||
bonus_force = N.sanctify_force
|
||||
if(!get_ability(/datum/vampire_passive/full))
|
||||
to_chat(owner.current, "<span class='warning'>[source]'s power interferes with your own!</span>")
|
||||
adjust_nullification(30 + bonus_force, 15 + bonus_force)
|
||||
|
||||
/datum/antagonist/vampire/custom_blurb()
|
||||
return "On the date [GLOB.current_date_string], at [station_time_timestamp()],\n in the [station_name()], [get_area_name(owner.current, TRUE)]...\nThe hunt begins again..."
|
||||
|
||||
@@ -161,6 +161,10 @@
|
||||
|
||||
/datum/spell/vampire/switch_places/cast(list/targets, mob/user)
|
||||
var/mob/living/target = targets[1]
|
||||
if(target.can_block_magic(antimagic_flags))
|
||||
to_chat(user, "<span class='warning'>The spell had no effect!</span>")
|
||||
to_chat(target, "<span class='warning'>You feel space bending, but it rapidly dissipates.</span>")
|
||||
return FALSE
|
||||
var/turf/user_turf = get_turf(user)
|
||||
var/turf/target_turf = get_turf(target)
|
||||
if(!(SEND_SIGNAL(target, COMSIG_MOVABLE_TELEPORTING, user_turf) & COMPONENT_BLOCK_TELEPORT))
|
||||
|
||||
@@ -157,6 +157,8 @@
|
||||
|
||||
/obj/item/projectile/magic/demonic_grasp/on_hit(atom/target, blocked, hit_zone)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
if(!isliving(target))
|
||||
return
|
||||
var/mob/living/L = target
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
//Other vampires and thralls aren't affected
|
||||
if(mind?.has_antag_datum(/datum/antagonist/vampire) || mind?.has_antag_datum(/datum/antagonist/mindslave/thrall))
|
||||
return FALSE
|
||||
/// Chaplains with their nullrod can block a full power vampire, but a chaplain by themselfs or a crew with a null rod can not.
|
||||
if(can_block_magic(MAGIC_RESISTANCE_HOLY) && HAS_MIND_TRAIT(src, TRAIT_HOLY))
|
||||
return FALSE
|
||||
//Vampires who have reached their full potential can affect nearly everything
|
||||
var/datum/antagonist/vampire/V = user?.mind.has_antag_datum(/datum/antagonist/vampire)
|
||||
if(V?.get_ability(/datum/vampire_passive/full))
|
||||
@@ -10,12 +13,15 @@
|
||||
//Holy characters are resistant to vampire powers
|
||||
if(HAS_MIND_TRAIT(src, TRAIT_HOLY))
|
||||
return FALSE
|
||||
if(can_block_magic(MAGIC_RESISTANCE_HOLY))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/datum/spell/vampire
|
||||
action_background_icon_state = "bg_vampire"
|
||||
human_req = TRUE
|
||||
clothes_req = FALSE
|
||||
antimagic_flags = MAGIC_RESISTANCE_HOLY
|
||||
/// How much blood this ability costs to use
|
||||
var/required_blood
|
||||
var/deduct_blood_on_cast = TRUE
|
||||
@@ -52,6 +58,7 @@
|
||||
action_icon_state = "vampire_rejuvinate"
|
||||
base_cooldown = 20 SECONDS
|
||||
stat_allowed = UNCONSCIOUS
|
||||
antimagic_flags = NONE // So. If you have a null rod on your person, you can't cast vampire spells. I would rather not have officers abuse this by putting a nullrod in their pocket or something to block rejuvinate.
|
||||
|
||||
/datum/spell/vampire/self/rejuvenate/cast(list/targets, mob/user = usr)
|
||||
var/mob/living/U = user
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
action_background_icon_state = "bg_vampire"
|
||||
human_req = TRUE
|
||||
clothes_req = FALSE
|
||||
antimagic_flags = NONE
|
||||
base_cooldown = 0 SECONDS
|
||||
var/list/our_claws = list()
|
||||
var/infection_stage = 1 // mostly for adminbus and testing
|
||||
|
||||
Reference in New Issue
Block a user