Skip to content

Commit

Permalink
rcorp changes Part 2
Browse files Browse the repository at this point in the history
  • Loading branch information
azenkov committed Oct 20, 2024
1 parent 2dc173d commit db71fd8
Show file tree
Hide file tree
Showing 6 changed files with 146 additions and 53 deletions.
1 change: 1 addition & 0 deletions ModularTegustation/tegu_items/rcorp/!abno_overwrites.dm
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
ranged_cooldown_time = 0.5 SECONDS
maxHealth = 1200
health = 1200
casingtype = /obj/item/ammo_casing/caseless/rcorp_true_patriot
return ..()

//Make it so it is harder to stun So That No Cry, since they are inflicting more talisman.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,10 @@
/obj/item/laetitia_gift/proc/explode(turf/TURF)
playsound(get_turf(src), 'sound/abnormalities/laetitia/spider_born.ogg', 50, 1)
var/mob/dummy = new(TURF)
dummy.faction = list("hostile")
for(var/turf/T in range(2, TURF))
new /obj/effect/temp_visual/smash_effect(T)
dummy.HurtInTurf(T, list(), (basepower*strength), RED_DAMAGE, check_faction = FALSE, hurt_mechs = TRUE)
dummy.HurtInTurf(T, list(), (basepower*strength), RED_DAMAGE, check_faction = (strength > 0), hurt_mechs = TRUE)
qdel(dummy)
active_gifts -= src
qdel(src)
Expand Down
29 changes: 29 additions & 0 deletions code/modules/mob/living/simple_animal/abnormality/he/scarecrow.dm
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@
var/braineating = TRUE
var/healthmodifier = 0.05 // Can restore 30% of HP

attack_action_types = list(/datum/action/cooldown/speed)

/mob/living/simple_animal/hostile/abnormality/scarecrow/Login()
. = ..()
if(!. || !client)
Expand Down Expand Up @@ -138,3 +140,30 @@
icon_living = "scarecrow_breach"
icon_state = icon_living
GiveTarget(user)

/datum/action/cooldown/speed
name = "Speed"
icon_icon = 'icons/mob/actions/actions_minor_antag.dmi'
button_icon_state = "Speed"
desc = ""
cooldown_time = 50
var/speeded_up = 1.5
var/old_speed


/datum/action/cooldown/speed/Trigger()
if(!..())
return FALSE
if (istype(owner, /mob/living/simple_animal/hostile))
var/mob/living/simple_animal/hostile/H = owner
old_speed = H.move_to_delay
H.move_to_delay = speeded_up
H.UpdateSpeed()
addtimer(CALLBACK(src, PROC_REF(RestoreSpeed)), 25)
StartCooldown()

/datum/action/cooldown/speed/proc/RestoreSpeed()
if (istype(owner, /mob/living/simple_animal/hostile))
var/mob/living/simple_animal/hostile/H = owner
H.move_to_delay = old_speed
H.UpdateSpeed()
Original file line number Diff line number Diff line change
Expand Up @@ -191,3 +191,17 @@
damage_type = RED_DAMAGE

damage = 8

/obj/item/ammo_casing/caseless/rcorp_true_patriot
name = "true patriot casing"
desc = "a true patriot casing"
projectile_type = /obj/projectile/rcorp_true_patriot
pellets = 6
variance = 25

/obj/projectile/rcorp_true_patriot
name = "american pellet"
desc = "100% real, surplus military ammo."
damage_type = RED_DAMAGE

damage = 14
Original file line number Diff line number Diff line change
Expand Up @@ -91,22 +91,26 @@

//Work Mechanics
/mob/living/simple_animal/hostile/abnormality/so_that_no_cry/proc/Apply_Talisman(mob/living/carbon/human/user)
var/datum/status_effect/stacking/curse_talisman/C = user.has_status_effect(/datum/status_effect/stacking/curse_talisman)
var/datum/status_effect/stacking/talisman/G = user.has_status_effect(/datum/status_effect/stacking/talisman)
playsound(src, 'sound/abnormalities/so_that_no_cry/talisman.ogg', 100, 1)
if (!C)//cant take talismans if cursed already
if(!G)//applying the buff for the first time (it lasts for four minutes)
new /obj/effect/temp_visual/talisman(get_turf(user))
user.apply_status_effect(STATUS_EFFECT_TALISMAN)
to_chat(user, span_nicegreen("A talisman quietly dettaches from the abnormality and sticks to you."))
else//if the employee already has the buff, add a stack and refresh
to_chat(user, span_nicegreen("Another talisman sticks to you."))
if (G.stacks == 5)
playsound(src, 'sound/abnormalities/so_that_no_cry/curse_talisman.ogg', 100, 1)
else
var/loop = 1
if (IsCombatMap())
loop = 3
for (var/i in 1 to loop)
var/datum/status_effect/stacking/curse_talisman/C = user.has_status_effect(/datum/status_effect/stacking/curse_talisman)
var/datum/status_effect/stacking/talisman/G = user.has_status_effect(/datum/status_effect/stacking/talisman)
if (!C)//cant take talismans if cursed already
if(!G)//applying the buff for the first time (it lasts for four minutes)
new /obj/effect/temp_visual/talisman(get_turf(user))
G.add_stacks(1)
G.refresh()
user.apply_status_effect(STATUS_EFFECT_TALISMAN)
to_chat(user, span_nicegreen("A talisman quietly dettaches from the abnormality and sticks to you."))
else//if the employee already has the buff, add a stack and refresh
to_chat(user, span_nicegreen("Another talisman sticks to you."))
if (G.stacks == 5)
playsound(src, 'sound/abnormalities/so_that_no_cry/curse_talisman.ogg', 100, 1)
else
new /obj/effect/temp_visual/talisman(get_turf(user))
G.add_stacks(1)
G.refresh()
return

/mob/living/simple_animal/hostile/abnormality/so_that_no_cry/proc/Remove_Talisman(mob/living/carbon/human/user)
Expand Down
120 changes: 82 additions & 38 deletions code/modules/mob/living/simple_animal/abnormality/waw/contract.dm
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@
)
var/can_act = TRUE

var/list/contracted_mobs = list()

/mob/living/simple_animal/hostile/abnormality/contract/Login()
. = ..()
if(!. || !client)
Expand Down Expand Up @@ -229,6 +231,24 @@
datum_reference.qliphoth_change(-1)
return

/mob/living/simple_animal/hostile/abnormality/contract/death(gibbed)
for(var/contracted_mob in contracted_mobs)
uncontract_mob(contracted_mob)
return ..()

/mob/living/simple_animal/hostile/abnormality/contract/proc/contract_mob(mob/living/mob_contracted)
if(QDELETED(mob_contracted) || mob_contracted.stat == DEAD)
return FALSE
if(contracted_mobs[mob_contracted])
return FALSE
contracted_mobs += mob_contracted

/mob/living/simple_animal/hostile/abnormality/contract/proc/uncontract_mob(mob/living/mob_contracted)
if(!contracted_mobs[mob_contracted])
return
contracted_mobs -= mob_contracted


/datum/action/spell_action/spell/contract

/datum/action/spell_action/spell/contract/IsAvailable()
Expand All @@ -245,6 +265,7 @@
var/contract_overlay_icon_state = "small_contract"
var/mutable_appearance/colored_overlay
base_action = /datum/action/spell_action/spell/contract
var/mob/living/simple_animal/contracted

/obj/effect/proc_holder/spell/pointed/contract/cast(list/targets, mob/living/user, silent = FALSE)
if(!targets.len)
Expand Down Expand Up @@ -294,22 +315,30 @@
var/ruin_damage = 50
var/ruin_duration = 10


/obj/effect/proc_holder/spell/pointed/contract/ruin/cast(list/targets, mob/user)
var/target = targets[1]
user.visible_message(span_danger("[user] uses the contract of Ruin."), span_alert("You targeted [target]"))
if (istype(target, /mob/living/simple_animal))
var/mob/living/simple_animal/A = target
A.obj_damage += ruin_damage
playsound(A, 'sound/abnormalities/so_that_no_cry/curse_talisman.ogg', 100, 1)
A.apply_status_effect(STATUS_EFFECT_RUIN)
addtimer(CALLBACK(src, PROC_REF(RestoreDamage), A), ruin_duration SECONDS)
AddOverlay(A)
contracted = target
contracted.obj_damage += ruin_damage
playsound(contracted, 'sound/abnormalities/so_that_no_cry/curse_talisman.ogg', 100, 1)
contracted.apply_status_effect(STATUS_EFFECT_RUIN)
addtimer(CALLBACK(src, PROC_REF(RestoreDamage), contracted), ruin_duration SECONDS)
AddOverlay(contracted)
spawn(20)
RemoveOverlay(A)
RemoveOverlay(contracted)

/obj/effect/proc_holder/spell/pointed/contract/ruin/proc/RestoreDamage(mob/living/simple_animal/A)
if (A.stat != DEAD)
A.obj_damage -= ruin_damage
contracted = null

/obj/effect/proc_holder/spell/pointed/contract/ruin/Destroy()
if (contracted)
RestoreDamage(contracted)
..()


/obj/effect/proc_holder/spell/pointed/contract/stealth
name = "Contract of Stealth"
Expand All @@ -327,31 +356,41 @@
var/alpha_level = 35
var/stealth_duration = 15
var/density_duration = 2
var/old_alpha
var/old_density

/obj/effect/proc_holder/spell/pointed/contract/stealth/cast(list/targets, mob/user)
var/target = targets[1]
user.visible_message(span_danger("[user] uses the contract of Stealth."), span_alert("You targeted [target]"))
if (istype(target, /mob/living/simple_animal))
var/mob/living/simple_animal/A = target
var/old_alpha = A.alpha
var/old_density = A.density
A.alpha = alpha_level
A.density = FALSE
A.apply_status_effect(STATUS_EFFECT_STEALTH)
playsound(A, 'sound/abnormalities/so_that_no_cry/curse_talisman.ogg', 100, 1)
addtimer(CALLBACK(src, PROC_REF(RestoreAlpha), A, old_alpha), stealth_duration SECONDS)
addtimer(CALLBACK(src, PROC_REF(RestoreDensity), A, old_density), density_duration SECONDS)
AddOverlay(A)
contracted = target
old_alpha = contracted.alpha
old_density = contracted.density
contracted.alpha = alpha_level
contracted.density = FALSE
contracted.apply_status_effect(STATUS_EFFECT_STEALTH)
playsound(contracted, 'sound/abnormalities/so_that_no_cry/curse_talisman.ogg', 100, 1)
addtimer(CALLBACK(src, PROC_REF(RestoreAlpha)), stealth_duration SECONDS)
addtimer(CALLBACK(src, PROC_REF(RestoreDensity)), density_duration SECONDS)
AddOverlay(contracted)
spawn(20)
RemoveOverlay(A)
RemoveOverlay(contracted)

/obj/effect/proc_holder/spell/pointed/contract/stealth/proc/RestoreAlpha(mob/living/simple_animal/A, old_alpha)
if (A.stat != DEAD)
A.alpha = old_alpha

/obj/effect/proc_holder/spell/pointed/contract/stealth/proc/RestoreDensity(mob/living/simple_animal/A, old_density)
if (A.stat != DEAD)
A.density = old_density
/obj/effect/proc_holder/spell/pointed/contract/stealth/proc/RestoreAlpha()
if (contracted.stat != DEAD)
contracted.alpha = old_alpha
contracted = null

/obj/effect/proc_holder/spell/pointed/contract/stealth/proc/RestoreDensity()
if (contracted.stat != DEAD)
contracted.density = old_density

/obj/effect/proc_holder/spell/pointed/contract/stealth/Destroy()
if (contracted)
RestoreDensity(contracted)
RestoreAlpha(contracted)
..()

/obj/effect/proc_holder/spell/pointed/contract/recall
name = "Contract of Recall"
Expand All @@ -366,25 +405,24 @@
selection_type = "range"
active_msg = "You prepare your Contract of Recall..."
deactive_msg = "You put away your Contract of Recall..."
var/mob/living/simple_animal/marked_animal = null
var/long_cooldown = 450
var/base_cooldown = 10
var/target_stun_time = 30
var/pulling_time = 30

/obj/effect/proc_holder/spell/pointed/contract/recall/Click()
if (marked_animal != null)
if (contracted != null)
// do recall
playsound(marked_animal, 'sound/magic/ethereal_exit.ogg', 50, TRUE, -1)
playsound(contracted, 'sound/magic/ethereal_exit.ogg', 50, TRUE, -1)
playsound(src, 'sound/magic/ethereal_exit.ogg', 50, TRUE, -1)
to_chat(marked_animal, span_warning("You are about to be pulled over by A Contract, Signed!"))
to_chat(contracted, span_warning("You are about to be pulled over by A Contract, Signed!"))
spawn(pulling_time)
marked_animal.forceMove(action.owner.loc)
playsound(marked_animal.loc, 'sound/magic/ethereal_enter.ogg', 50, TRUE, -1)
marked_animal.Stun(target_stun_time)
RemoveOverlay(marked_animal)
marked_animal.remove_status_effect(STATUS_EFFECT_RECALL)
marked_animal = null
contracted.forceMove(action.owner.loc)
playsound(contracted.loc, 'sound/magic/ethereal_enter.ogg', 50, TRUE, -1)
contracted.Stun(target_stun_time)
RemoveOverlay(contracted)
contracted.remove_status_effect(STATUS_EFFECT_RECALL)
contracted = null
charge_counter = 0
charge_max = long_cooldown
recharging = TRUE
Expand All @@ -397,10 +435,16 @@
var/target = targets[1]
user.visible_message(span_danger("[user] uses the contract of Recall."), span_alert("You targeted [target]"))
if (istype(target, /mob/living/simple_animal))
marked_animal = target
AddOverlay(marked_animal)
marked_animal.apply_status_effect(STATUS_EFFECT_RECALL)
playsound(marked_animal, 'sound/abnormalities/so_that_no_cry/curse_talisman.ogg', 100, 1)
contracted = target
AddOverlay(contracted)
contracted.apply_status_effect(STATUS_EFFECT_RECALL)
playsound(contracted, 'sound/abnormalities/so_that_no_cry/curse_talisman.ogg', 100, 1)

/obj/effect/proc_holder/spell/pointed/contract/recall/Destroy()
if (contracted)
RemoveOverlay(contracted)
contracted.remove_status_effect(STATUS_EFFECT_RECALL)
..()

/datum/action/cooldown/contracted_passage
name = "Contracted Passage"
Expand Down

0 comments on commit db71fd8

Please sign in to comment.