|
1 | | -/datum/action/cooldown/bloodsucker/cloak |
| 1 | +/datum/action/cooldown/spell/toggle/cloak |
2 | 2 | name = "Cloak of Darkness" |
3 | 3 | desc = "Blend into the shadows and become invisible to the untrained and Artificial eye." |
| 4 | + |
| 5 | + background_icon = 'icons/mob/actions/actions_bloodsucker.dmi' |
| 6 | + background_icon_state = "vamp_power_off" |
| 7 | + button_icon = 'icons/mob/actions/actions_bloodsucker.dmi' |
4 | 8 | button_icon_state = "power_cloak" |
5 | | - power_explanation = "Cloak of Darkness<:\n\ |
6 | | - Activate this Power in the shadows and you will slowly turn nearly invisible.\n\ |
7 | | - While using Cloak of Darkness, attempting to run will crush you.\n\ |
8 | | - Additionally, while Cloak is active, you are completely invisible to the AI.\n\ |
9 | | - Higher levels will increase how invisible you are." |
10 | | - power_flags = BP_AM_TOGGLE |
| 9 | + buttontooltipstyle = "cult" |
| 10 | + transparent_when_unavailable = TRUE |
| 11 | + |
| 12 | + // power_explanation = "Cloak of Darkness<:\n\ |
| 13 | + // Activate this Power in the shadows and you will slowly turn nearly invisible.\n\ |
| 14 | + // While using Cloak of Darkness, attempting to run will crush you.\n\ |
| 15 | + // Additionally, while Cloak is active, you are completely invisible to the AI.\n\ |
| 16 | + // Higher levels will increase how invisible you are." |
| 17 | + |
11 | 18 | check_flags = BP_CANT_USE_IN_TORPOR|BP_CANT_USE_IN_FRENZY|BP_CANT_USE_WHILE_UNCONSCIOUS |
12 | 19 | purchase_flags = BLOODSUCKER_CAN_BUY|VASSAL_CAN_BUY |
13 | | - bloodcost = 5 |
14 | | - constant_bloodcost = 0.2 |
| 20 | + resource_costs = list(ANTAG_RESOURCE_BLOODSUCKER = 5) |
| 21 | + maintain_costs = list(ANTAG_RESOURCE_BLOODSUCKER = 0.2) |
15 | 22 | cooldown_time = 5 SECONDS |
16 | | - ascended_power = /datum/action/cooldown/bloodsucker/cloak/shadow |
17 | 23 | var/was_running |
18 | 24 | var/runbound = TRUE |
19 | 25 |
|
20 | 26 | /// Must have nobody around to see the cloak |
21 | | -/datum/action/cooldown/bloodsucker/cloak/CanUse(mob/living/carbon/user) |
| 27 | +/datum/action/cooldown/spell/toggle/cloak/can_cast_spell(feedback) |
22 | 28 | . = ..() |
23 | 29 | if(!.) |
24 | 30 | return FALSE |
25 | 31 | for(var/mob/living/watchers in viewers(9, owner) - owner) |
26 | | - owner.balloon_alert(owner, "you can only vanish unseen.") |
| 32 | + if(feedback) |
| 33 | + owner.balloon_alert(owner, "you can only vanish unseen.") |
27 | 34 | return FALSE |
28 | 35 | return TRUE |
29 | 36 |
|
30 | | -/datum/action/cooldown/bloodsucker/cloak/ActivatePower() |
31 | | - . = ..() |
32 | | - var/mob/living/user = owner |
33 | | - was_running = (user.m_intent == MOVE_INTENT_RUN) |
34 | | - if(runbound) |
35 | | - if(was_running) |
36 | | - user.toggle_move_intent() |
37 | | - user.digitalinvis = 1 |
38 | | - user.digitalcamo = 1 |
39 | | - user.balloon_alert(user, "cloak turned on.") |
40 | | - |
41 | | -/datum/action/cooldown/bloodsucker/cloak/process() |
| 37 | +/datum/action/cooldown/spell/toggle/cloak/process() |
42 | 38 | // Checks that we can keep using this. |
43 | 39 | . = ..() |
44 | 40 | if(!.) |
|
54 | 50 | user.toggle_move_intent() |
55 | 51 | user.adjustBruteLoss(rand(5,15)) |
56 | 52 |
|
57 | | -/datum/action/cooldown/bloodsucker/cloak/ContinueActive(mob/living/user, mob/living/target) |
| 53 | +/datum/action/cooldown/spell/toggle/cloak/Enable() |
58 | 54 | . = ..() |
59 | | - if(!.) |
60 | | - return FALSE |
61 | | - /// Must be CONSCIOUS |
62 | | - if(user.stat != CONSCIOUS) |
63 | | - to_chat(owner, span_warning("Your Cloak of Darkness fell off due to you falling unconscious!")) |
64 | | - return FALSE |
65 | | - return TRUE |
| 55 | + var/mob/living/user = owner |
| 56 | + was_running = (user.m_intent == MOVE_INTENT_RUN) |
| 57 | + if(runbound) |
| 58 | + if(was_running) |
| 59 | + user.toggle_move_intent() |
| 60 | + user.digitalinvis = 1 |
| 61 | + user.digitalcamo = 1 |
| 62 | + user.balloon_alert(user, "cloak turned on.") |
66 | 63 |
|
67 | | -/datum/action/cooldown/bloodsucker/cloak/DeactivatePower() |
68 | | - . = ..() |
| 64 | +/datum/action/cooldown/spell/toggle/cloak/Disable() |
69 | 65 | var/mob/living/user = owner |
70 | 66 | animate(user, alpha = 255, time = 1 SECONDS) |
71 | 67 | user.digitalinvis = 0 |
|
75 | 71 | user.toggle_move_intent() |
76 | 72 | user.balloon_alert(user, "cloak turned off.") |
77 | 73 |
|
78 | | -/datum/action/cooldown/bloodsucker/cloak/shadow |
| 74 | +/datum/action/cooldown/spell/toggle/cloak/shadow |
79 | 75 | name = "Cloak of Shadows" |
80 | 76 | desc = "Empowered to the abyss, fortitude will now grant you a shadow armor, making your grip harder to escape and reduce projectile damage while in darkness." |
81 | 77 | background_icon = 'icons/mob/actions/actions_lasombra_bloodsucker.dmi' |
|
85 | 81 | button_icon_state = "power_state" |
86 | 82 | additional_text = "Additionally allows you to run during cloak and gain a physical cloak while in darkness." |
87 | 83 | purchase_flags = LASOMBRA_CAN_BUY |
88 | | - constant_bloodcost = 0.3 |
89 | 84 | runbound = FALSE |
90 | | - ascended_power = null |
| 85 | + |
| 86 | +/datum/action/cooldown/spell/toggle/cloak/shadow/Enable() |
| 87 | + . = ..() |
| 88 | + var/turf/T = get_turf(owner) |
| 89 | + var/light_amount = T.get_lumcount() |
| 90 | + if(light_amount <= LIGHTING_TILE_IS_DARK) |
| 91 | + if(!owner.get_item_by_slot(ITEM_SLOT_NECK)) |
| 92 | + owner.equip_to_slot_or_del( new /obj/item/clothing/neck/yogs/sith_cloak/cloak(null), ITEM_SLOT_NECK) |
| 93 | + |
| 94 | +/datum/action/cooldown/spell/toggle/cloak/shadow/Disable() |
| 95 | + . = ..() |
| 96 | + var/obj/item/I = owner.get_item_by_slot(ITEM_SLOT_NECK) |
| 97 | + if(istype(I, /obj/item/clothing/neck/yogs/sith_cloak/cloak)) |
| 98 | + qdel(I) |
91 | 99 |
|
92 | 100 | /obj/item/clothing/neck/yogs/sith_cloak/cloak |
93 | 101 | name = "cloak of shadows" |
94 | 102 | desc = "Fancy stuff." |
95 | | - icon = 'icons/obj/vamp_obj.dmi' |
96 | | - worn_icon = 'icons/obj/vamp_obj.dmi' |
97 | | - icon_state = "cloak" |
98 | | - item_state = "cloak" |
99 | 103 | armor = list(MELEE = 0, BULLET = 0, LASER = 10, ENERGY = 10, BOMB = 0, BIO = 0, RAD = 0, FIRE = 10, ACID = 100) //good if you haven nothing |
100 | 104 |
|
101 | 105 | /obj/item/clothing/neck/yogs/sith_cloak/cloak/Initialize(mapload) |
|
111 | 115 | STOP_PROCESSING(SSobj, src) |
112 | 116 | src.visible_message(span_warning("The cape desintegrates as the light contacts it's surface!")) |
113 | 117 |
|
114 | | -/datum/action/cooldown/bloodsucker/cloak/shadow/ActivatePower() |
115 | | - . = ..() |
116 | | - var/turf/T = get_turf(owner) |
117 | | - var/light_amount = T.get_lumcount() |
118 | | - if(light_amount <= LIGHTING_TILE_IS_DARK) |
119 | | - if(!owner.get_item_by_slot(ITEM_SLOT_NECK)) |
120 | | - owner.equip_to_slot_or_del( new /obj/item/clothing/neck/yogs/sith_cloak/cloak(null), ITEM_SLOT_NECK) |
121 | | - |
122 | | -/datum/action/cooldown/bloodsucker/cloak/shadow/DeactivatePower() |
123 | | - . = ..() |
124 | | - var/obj/item/I = owner.get_item_by_slot(ITEM_SLOT_NECK) |
125 | | - if(istype(I, /obj/item/clothing/neck/yogs/sith_cloak/cloak)) |
126 | | - qdel(I) |
0 commit comments