mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
Creates the SyndieReverseCard (#8875)
* Creates the SyndieReverseCard * Jamie makes me cry * thanks kar kar <3 * Update syndicateReverseCard.dm * Apply suggestions from code review Co-authored-by: Jamie D <993128+JamieD1@users.noreply.github.com> * Update syndicateReverseCard.dm * Makes it super obvious this is a big evil item AFTER it's been used * Update items_and_weapons.dmi * makes the overlay sprite a bit better * Update syndicateReverseCard.dm * Update code/game/objects/items/syndicateReverseCard.dm Co-authored-by: Jamie D <993128+JamieD1@users.noreply.github.com> * Update syndicateReverseCard.dm * isCarbon, jamie suggestion * c * Merge conflict: resolved * kar kar Co-authored-by: Jamie D <993128+JamieD1@users.noreply.github.com>
This commit is contained in:
57
code/game/objects/items/syndicateReverseCard.dm
Normal file
57
code/game/objects/items/syndicateReverseCard.dm
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
|
||||||
|
//Syndie Uno reverse card
|
||||||
|
/obj/item/syndicateReverseCard
|
||||||
|
name = "Red Reverse"
|
||||||
|
icon = 'icons/obj/toy.dmi'
|
||||||
|
icon_state = "sc_Red Reverse_uno"
|
||||||
|
desc = "a card."
|
||||||
|
w_class = WEIGHT_CLASS_TINY
|
||||||
|
var/used = FALSE //has this been used before? If not, give no hints about it's nature
|
||||||
|
|
||||||
|
/obj/item/syndicateReverseCard/Initialize()
|
||||||
|
..()
|
||||||
|
var/cardColor = pick ("Red", "Green", "Yellow", "Blue") //this randomizes which color reverse you get!
|
||||||
|
name = "[cardColor] Reverse"
|
||||||
|
icon_state = "sc_[cardColor] Reverse_uno"
|
||||||
|
|
||||||
|
/obj/item/syndicateReverseCard/update_icon()
|
||||||
|
..()
|
||||||
|
if (used)
|
||||||
|
cut_overlays()
|
||||||
|
add_overlay(image('icons/obj/items_and_weapons.dmi', icon_state = "reverse_overlay"))
|
||||||
|
|
||||||
|
/obj/item/syndicateReverseCard/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||||
|
if(!(attack_type == PROJECTILE_ATTACK))
|
||||||
|
return FALSE //this means the attack goes through
|
||||||
|
if(istype(hitby, /obj/item/projectile))
|
||||||
|
var/obj/item/projectile/P = hitby
|
||||||
|
if(P?.firer && P.fired_from && (P.firer != P.fired_from)) //if the projectile comes from YOU, like your spit or some shit, you can't steal that bro. Also protects mechs
|
||||||
|
if(iscarbon(P.firer)) //You can't switcharoo with turrets or simplemobs, or borgs
|
||||||
|
switcharoo(P.firer, owner, P.fired_from)
|
||||||
|
return TRUE //this means the attack is blocked
|
||||||
|
return FALSE
|
||||||
|
|
||||||
|
/obj/item/syndicateReverseCard/proc/switcharoo(mob/firer, mob/user, obj/item/gun/target_gun) //this proc teleports the target_gun out of the firer's hands and into the user's. The firer gets the card.
|
||||||
|
//first, the sparks!
|
||||||
|
var/datum/effect_system/spark_spread/s = new /datum/effect_system/spark_spread
|
||||||
|
s.set_up(12, 1, firer)
|
||||||
|
s.start()
|
||||||
|
var/datum/effect_system/spark_spread/p = new /datum/effect_system/spark_spread
|
||||||
|
p.set_up(12, 1, user)
|
||||||
|
p.start()
|
||||||
|
//next, we move the gun to the user and the card to the firer
|
||||||
|
to_chat(user, "The [src] vanishes from your hands, and [target_gun] appears in them!")
|
||||||
|
to_chat(firer, "<span class='warning'>[target_gun] vanishes from your hands, and a [src] appears in them!</span>")
|
||||||
|
user.put_in_hands(target_gun)
|
||||||
|
firer.put_in_hands(src)
|
||||||
|
used = TRUE
|
||||||
|
update_icon()
|
||||||
|
|
||||||
|
/obj/item/syndicateReverseCard/examine(mob/user)
|
||||||
|
. = ..()
|
||||||
|
if(is_special_character(user))
|
||||||
|
. += "<span class='info'>Hold this in your hand when you are getting shot at to steal your opponent's gun. You'll lose this, so be careful!</span>"
|
||||||
|
return
|
||||||
|
if(used)
|
||||||
|
. += "<span class='warning'>Something sinister is strapped to this card. It looks like it was once masked with some sort of cloaking field, which is now nonfunctional.</span>"
|
||||||
|
return
|
||||||
@@ -1147,6 +1147,12 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
|
|||||||
item = /obj/item/multitool/ai_detect
|
item = /obj/item/multitool/ai_detect
|
||||||
cost = 1
|
cost = 1
|
||||||
|
|
||||||
|
/datum/uplink_item/stealthy_tools/syndireverse
|
||||||
|
name = "Bluespace Projectile Weapon Disrupter"
|
||||||
|
desc = "Hidden in an ordinary-looking playing card, this device will teleport an opponent's gun to your hand when they fire at you. Just make sure to hold this in your hand!"
|
||||||
|
item = /obj/item/syndicateReverseCard
|
||||||
|
cost = 6
|
||||||
|
|
||||||
/datum/uplink_item/stealthy_tools/chameleon
|
/datum/uplink_item/stealthy_tools/chameleon
|
||||||
name = "Chameleon Kit"
|
name = "Chameleon Kit"
|
||||||
desc = "A set of items that contain chameleon technology allowing you to disguise as pretty much anyone on the station, and more! \
|
desc = "A set of items that contain chameleon technology allowing you to disguise as pretty much anyone on the station, and more! \
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 132 KiB After Width: | Height: | Size: 133 KiB |
@@ -917,6 +917,7 @@
|
|||||||
#include "code\game\objects\items\signs.dm"
|
#include "code\game\objects\items\signs.dm"
|
||||||
#include "code\game\objects\items\singularityhammer.dm"
|
#include "code\game\objects\items\singularityhammer.dm"
|
||||||
#include "code\game\objects\items\stunbaton.dm"
|
#include "code\game\objects\items\stunbaton.dm"
|
||||||
|
#include "code\game\objects\items\syndicateReverseCard.dm"
|
||||||
#include "code\game\objects\items\taster.dm"
|
#include "code\game\objects\items\taster.dm"
|
||||||
#include "code\game\objects\items\teleportation.dm"
|
#include "code\game\objects\items\teleportation.dm"
|
||||||
#include "code\game\objects\items\teleprod.dm"
|
#include "code\game\objects\items\teleprod.dm"
|
||||||
|
|||||||
Reference in New Issue
Block a user