Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds a lance to Road home #1516

Merged
merged 9 commits into from
Oct 12, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion code/datums/abnormality/_ego_datum/he.dm
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@
cost = 35

/datum/ego_datum/weapon/homing_instinct
item_path = /obj/item/ego_weapon/homing_instinct
item_path = /obj/item/ego_weapon/lance/homing_instinct
cost = 35

/datum/ego_datum/armor/homing_instinct_old
Expand Down
76 changes: 46 additions & 30 deletions code/game/objects/items/ego_weapons/he.dm
Original file line number Diff line number Diff line change
Expand Up @@ -545,50 +545,66 @@
FORTITUDE_ATTRIBUTE = 40
)

//gains 0.25 force for every step you take, up to 100 damage. However it deals 0 damage by default, making it more useful as a sidearm rather than a main weapon.
/obj/item/ego_weapon/homing_instinct
/obj/item/ego_weapon/lance/homing_instinct
name = "homing instinct"
desc = "It's about the journey AND the destination!"
special = "This weapon's damage scale with the number of steps you've taken before striking."
special = "This weapon leaves slowing yellow bricks from charging"
icon_state = "homing_instinct"
damtype = BLACK_DAMAGE
armortype = BLACK_DAMAGE
force = 22 //Damage is crushed down
attack_speed = 3
force = 40
attack_speed = 2.5//Really really slow due to hitting them with a mini house.
attack_verb_continuous = list("pierces", "stabs")
attack_verb_simple = list("pierce", "stab")
hitsound = 'sound/weapons/fixer/generic/spear2.ogg'
attribute_requirements = list(
JUSTICE_ATTRIBUTE = 40
)
var/mob/current_holder

/obj/item/ego_weapon/homing_instinct/equipped(mob/living/carbon/human/user, slot)
reach = 1//its short
force_cap = 100 //Old max damage when it was damage = amount you walked.
force_per_tile = 5 //if I can read, this means you need to cross 20 tiles for max damage
pierce_force_cost = 20
charge_speed_cap = 2//more of a jog then a ram
couch_cooldown_time = 5 SECONDS //Makes it more risky

/obj/item/ego_weapon/lance/homing_instinct/UserMoved(mob/user)
..()
if(!raised)
playsound(src, 'sound/abnormalities/roadhome/House_MakeRoad.ogg', 100, FALSE, 8)
new /obj/effect/golden_road2(get_turf(user))

//Not an actual floor, but an effect you put on top of it.
/obj/effect/golden_road2
name = "Golden Road"
icon = 'icons/turf/floors.dmi'
icon_state = "gold" //note : find a proper brick road sprite later
alpha = 0
anchored = TRUE
var/slow_down = 0.75//25% slow
CrabbytheCrab marked this conversation as resolved.
Show resolved Hide resolved
var/list/faction = list("neutral")

/obj/effect/golden_road2/Initialize()
. = ..()
if(!user)
return
RegisterSignal(user, COMSIG_MOVABLE_MOVED, .proc/UserMoved)
current_holder = user

/obj/item/ego_weapon/homing_instinct/Destroy(mob/user)
UnregisterSignal(current_holder, COMSIG_MOVABLE_MOVED)
current_holder = null
QDEL_IN(src, 30 SECONDS)
animate(src, alpha = 255,transform= transform, time = 0.5 SECONDS)
addtimer(CALLBACK(src, .proc/FadeOut), 29.5 SECONDS)
for(var/i = 1 to 30)
addtimer(CALLBACK(src, .proc/Slow), i * 1 SECONDS)
CrabbytheCrab marked this conversation as resolved.
Show resolved Hide resolved

/obj/effect/golden_road2/proc/FadeOut()
animate(src, alpha = 0, time = 0.5 SECONDS)

/obj/effect/golden_road2/proc/Slow()
for(var/turf/T in range(0, src))
if(T.z != z)
continue
for(var/mob/living/L in T)
if(faction_check(L.faction, src.faction))
continue
var/mob/living/simple_animal/hostile/H = L
H.TemporarySpeedChange(H.move_to_delay*slow_down , 3 SECONDS)
return ..()

Check failure on line 606 in code/game/objects/items/ego_weapons/he.dm

View workflow job for this annotation

GitHub Actions / Run Linters

proc has no parent: /obj/effect/golden_road2/proc/Slow

/obj/item/ego_weapon/homing_instinct/dropped(mob/user)
. = ..()
UnregisterSignal(current_holder, COMSIG_MOVABLE_MOVED)
current_holder = null

/obj/item/ego_weapon/homing_instinct/attack(mob/living/M, mob/living/carbon/human/user)
..()
force = round(force/2) //It doesn't lose all its force in one go after each hit.

/obj/item/ego_weapon/homing_instinct/proc/UserMoved()
SIGNAL_HANDLER
if(force < 100)
force += 0.25 //It charges pretty slowly, but people walk pretty fast thanks to justice.

/obj/item/ego_weapon/shield/maneater
name = "man eater"
desc = "If friends were flowers, I'd pick you!"
Expand Down
Binary file modified icons/mob/inhands/weapons/ego_lefthand.dmi
Binary file not shown.
Binary file modified icons/mob/inhands/weapons/ego_righthand.dmi
Binary file not shown.
Binary file modified icons/obj/ego_weapons.dmi
Binary file not shown.
Loading