mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-27 18:12:00 +00:00
* Arcane/Blood Barrage fixes, cleans up cult spell code, autofire barrage, more responsive/sane blood collection (#76852) ## About The Pull Request Refactors arcane barrage (the wizard spell) and blood barrage (the weird version of the same spell that cultists get) into the magic subtype. No longer are they rifles...for some reason. Also they have sprites once again! Yay. Fixes https://github.com/tgstation/tgstation/issues/76561 So as to not replicate a really crappy system used to get the hand swapping working, I've just opted to take this opportunity to make arcane barrage an automatic fire weapon. Yes, this is kind of a feature, but it's...it's appropriate, don't you think? And I don't think meaningfully changes its fire rate? Blood Barrage no longer harms cultists/constructs shot by it and now properly just heals them/injects them with unholy water. Why all this was shoved into the Bump() proc is beyond me, but it works now. Fixes https://github.com/tgstation/tgstation/issues/76560 I've improved the variables for some of the cult spells, and I've also fixed what I think is one the most pesky parts of how drawing blood works. So, rather than using range(), it uses view(), which seems to cause the spell to be a bit funky with lighting? So if you're in darkness (gosh cultists in dim light, how unheard of), this spell struggles to gather up blood. Not anymore it doesn't! Lastly, it only worked on blood pools or droplets, not blood trails. So, you could bleed a character out by dragging them around, but not sap up the blood they're dropping from doing so. Only the intermittent blood splatters or your own bloody footprints count. Here is the funny thing with that. It still cleans up the blood trail. You just couldn't activate the blood draw from the trail or treat it as blood. Now you can. Blood trails now give you +5 charges, and you can activate the blood draw using blood trails. ## Why It's Good For The Game Arcane Barrage/Blood Barrage: This was some really old code and I'm still not sure why they were made as a separate spell to the madoka reference, which at this stage is still better than this spell. But at least it is using a sensible subtype with a reasonable, more modern component to facilitate the 'rapid firing barrage of magical bullet' image this spell is meant to invoke. As a result of all this nonsense, this spell had its sprites broken because it kept being attached to stuff in the rifles folder. Let's put a stop to that here and now and break it independently instead. Oh also cultists getting shot by healing bullets that still killed them is both funny and dumb and the way it worked was bonkers. Blood Draw: A cultist trying to determine, on the fly, what blood is a valid for the blood draw is nearly impossible from visual alone. You'd be convinced this part of the spell is broken just because having a splatter and a trail on the same tile massively obfuscates whether you're looking at valid sources of blood. I've struggled to understand as a player what was going on and why it was so selective about what was acceptable. Now I see that the problem was one of visual accuracy, bad type checking, and really, really outdated code that should have been improved with better procs. Blood trails are also actually made from dragging out a creature's bloody corpse. For humans, the most common source of blood trails, this does actually mean they're losing blood to produce these trails. It stands to reason this should be a valid source (bloody footprints are, after all). I gave them a...somewhat minor amount of charge contribution just to keep it moderately sane for how much blood it generates. ## Changelog 🆑 refactor: Arcane Barrage and Blood Barrage are magic gun subtypes and not rifle subtypes. Also they have sprites again. qol: The barrage spells now use the automatic component to do its thing. fix: Blood Barrage once again heals cultists and constructs without hurting them. code: Cleans up how Blood Rites finds blood to draw in. You can now just click turfs as well as blood, and it should now be much more accurate about it. qol: Blood trails contribute to charges gained using Blood Rites. You can also activate Blood Rite's blood draw using blood trails. /🆑 * Arcane/Blood Barrage fixes, cleans up cult spell code, autofire barrage, more responsive/sane blood collection --------- Co-authored-by: necromanceranne <40847847+necromanceranne@users.noreply.github.com>
28 lines
970 B
Plaintext
28 lines
970 B
Plaintext
/obj/item/gun/magic/wand/arcane_barrage
|
|
name = "arcane barrage"
|
|
desc = "Pew Pew Pew."
|
|
fire_sound = 'sound/weapons/emitter.ogg'
|
|
icon = 'icons/obj/weapons/guns/ballistic.dmi'
|
|
icon_state = "arcane_barrage"
|
|
inhand_icon_state = "arcane_barrage"
|
|
base_icon_state = "arcane_barrage"
|
|
lefthand_file = 'icons/mob/inhands/weapons/guns_lefthand.dmi'
|
|
righthand_file = 'icons/mob/inhands/weapons/guns_righthand.dmi'
|
|
slot_flags = null
|
|
item_flags = NEEDS_PERMIT | DROPDEL | ABSTRACT | NOBLUDGEON
|
|
flags_1 = NONE
|
|
weapon_weight = WEAPON_HEAVY
|
|
max_charges = 30
|
|
ammo_type = /obj/item/ammo_casing/magic/arcane_barrage
|
|
|
|
/obj/item/gun/magic/wand/arcane_barrage/Initialize(mapload)
|
|
. = ..()
|
|
AddComponent(/datum/component/automatic_fire, 0.2 SECONDS)
|
|
|
|
/obj/item/gun/magic/wand/arcane_barrage/process_fire(atom/target, mob/living/user, message = TRUE, params = null, zone_override = "", bonus_spread = 0)
|
|
. = ..()
|
|
if(!.)
|
|
return
|
|
if(!charges)
|
|
user.dropItemToGround(src, TRUE)
|