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:
Qwertytoforty
2025-01-02 08:36:07 +00:00
committed by GitHub
co-authored by DGamerL Burzah
parent 6057ff5c31
commit 7bbebbb23f
62 changed files with 580 additions and 28 deletions
+4
View File
@@ -134,5 +134,9 @@
#define COMPONENT_NO_MOUSEDROP (1<<0)
///from base of atom/MouseDrop_T: (/atom/from, /mob/user)
#define COMSIG_MOUSEDROPPED_ONTO "mousedropped_onto"
/// Called on the atom being hit, from /datum/component/anti_magic/on_attack() : (obj/item/weapon, mob/user, antimagic_flags)
#define COMSIG_ATOM_HOLY_ATTACK "atom_holyattacked"
/// On a ranged attack: base of mob/living/carbon/human/RangedAttack (/mob/living/carbon/human)
#define COMSIG_ATOM_RANGED_ATTACKED "atom_range_attacked"
+6 -3
View File
@@ -22,11 +22,14 @@
#define COMSIG_MOB_ALTCLICKON "mob_altclickon"
#define COMSIG_MOB_CANCEL_CLICKON (1<<0)
///from base of mob/can_cast_magic(): (mob/user, magic_flags, charge_cost)
#define COMSIG_MOB_RESTRICT_MAGIC "mob_cast_magic"
///from base of mob/can_block_magic(): (mob/user, casted_magic_flags, charge_cost)
#define COMSIG_MOB_RECEIVE_MAGIC "mob_receive_magic"
#define COMPONENT_MAGIC_BLOCKED (1<<0)
///from base of obj/allowed(mob/M): (/obj) returns bool, if TRUE the mob has id access to the obj
#define COMSIG_MOB_ALLOWED "mob_allowed"
///from base of mob/anti_magic_check(): (mob/user, magic, holy, tinfoil, chargecost, self, protection_sources)
#define COMSIG_MOB_RECEIVE_MAGIC "mob_receive_magic"
#define COMPONENT_BLOCK_MAGIC (1<<0)
///from base of mob/create_mob_hud(): ()
#define COMSIG_MOB_HUD_CREATED "mob_hud_created"
///from base of atom/attack_hand(): (mob/user)
+16
View File
@@ -0,0 +1,16 @@
// Bitflags for magic resistance types
/// Default magic resistance that blocks normal magic (wizard, spells, magical staff projectiles)
#define MAGIC_RESISTANCE (1<<0)
/// Tinfoil hat magic resistance that blocks mental magic (telepathy / mind links, mind curses, abductors)
#define MAGIC_RESISTANCE_MIND (1<<1)
/// Holy magic resistance that blocks unholy magic (revenant, vampire, voice of god)
#define MAGIC_RESISTANCE_HOLY (1<<2)
DEFINE_BITFIELD(antimagic_flags, list(
"MAGIC_RESISTANCE" = MAGIC_RESISTANCE,
"MAGIC_RESISTANCE_HOLY" = MAGIC_RESISTANCE_HOLY,
"MAGIC_RESISTANCE_MIND" = MAGIC_RESISTANCE_MIND,
))
/// Whether the spell can be cast while the user has antimagic on them that corresponds to the spell's own antimagic flags.
#define SPELL_REQUIRES_NO_ANTIMAGIC (1 << 0)