Skip to content

Commit

Permalink
Adds new tool E.G.O.
Browse files Browse the repository at this point in the history
Adds the bulk of the code
  • Loading branch information
Coxswain-Navigator committed May 7, 2024
1 parent 65ecbc7 commit 3ad698f
Show file tree
Hide file tree
Showing 14 changed files with 256 additions and 8 deletions.
52 changes: 52 additions & 0 deletions code/datums/abnormality/_ego_datum/tools.dm
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
/////////////
// ZAYIN //
/////////////

// Wishing Well - Bucket
/datum/ego_datum/weapon/bucket
item_path = /obj/item/gun/ego_gun/bucket
Expand All @@ -7,6 +11,28 @@
item_path = /obj/item/clothing/suit/armor/ego_gear/tools/bucket
cost = 12

//Don't touch me! - Prohibited
/datum/ego_datum/weapon/prohibited
item_path = /obj/item/ego_weapon/prohibited
cost = 12

/datum/ego_datum/armor/prohibited
item_path = /obj/item/clothing/suit/armor/ego_gear/tools/prohibited
cost = 12

//You must be happy - Plastic Smile
/datum/ego_datum/weapon/plastic
item_path = /obj/item/ego_weapon/plastic
cost = 12

/datum/ego_datum/armor/plastic
item_path = /obj/item/clothing/suit/armor/ego_gear/tools/plastic
cost = 12

////////////
// TETH //
////////////

//Heart of Aspiration - Aspiration
/datum/ego_datum/armor/aspiration
item_path = /obj/item/clothing/suit/armor/ego_gear/tools/aspiration
Expand All @@ -16,6 +42,10 @@
item_path = /obj/item/gun/ego_gun/aspiration
cost = 20

//////////
// HE //
//////////

//All-Natural Snake Oil - Swindle
/datum/ego_datum/armor/swindle
item_path = /obj/item/clothing/suit/armor/ego_gear/tools/swindle
Expand Down Expand Up @@ -69,3 +99,25 @@
/datum/ego_datum/armor/giant_tree_branch
item_path = /obj/item/clothing/suit/armor/ego_gear/tools/giant_tree_branch
cost = 35

//Shelter from the 27th of March - Isolation
/datum/ego_datum/weapon/isolation
item_path = /obj/item/ego_weapon/shield/isolation
cost = 35

/datum/ego_datum/armor/isolation
item_path = /obj/item/clothing/suit/armor/ego_gear/tools/isolation
cost = 35

///////////
// WAW //
///////////

//Backwards Clock - Wind-up
/datum/ego_datum/weapon/windup
item_path = /obj/item/ego_weapon/windup
cost = 50

/datum/ego_datum/armor/windup
item_path = /obj/item/clothing/suit/armor/ego_gear/tools/windup
cost = 50
23 changes: 23 additions & 0 deletions code/game/objects/items/ego_weapons/he.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1914,3 +1914,26 @@
playsound(get_turf(src), 'sound/items/drink.ogg', 50, TRUE) //slurp
user.adjustBruteLoss(-amount_filled*2)
amount_filled = 0

/obj/item/ego_weapon/shield/isolation
name = "isolation"
desc = "The shelter still retains the memory of that day."
icon_state = "isolation"
force = 30
attack_speed = 1
damtype = RED_DAMAGE
attack_verb_continuous = list("cuts", "smacks", "bashes")
attack_verb_simple = list("cuts", "smacks", "bashes")
hitsound = 'sound/weapons/ego/axe2.ogg'
reductions = list(10, 20, 40, 10) // 80
projectile_block_duration = 1 SECONDS
block_duration = 1 SECONDS
block_cooldown = 3 SECONDS
block_sound = 'sound/weapons/ego/clash1.ogg'
projectile_block_message = "You swat the projectile out of the air!"
block_message = "You attempt to parry the attack!"
hit_message = "parries the attack!"
block_cooldown_message = "You rearm your E.G.O."
attribute_requirements = list(
FORTITUDE_ATTRIBUTE = 40
)
46 changes: 46 additions & 0 deletions code/game/objects/items/ego_weapons/waw.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2084,3 +2084,49 @@

/obj/item/ego_weapon/abyssal_route/proc/DiveReset()
can_attack = TRUE

/obj/item/ego_weapon/windup
name = "wind-up"
desc = "Yes, we can rewind your wasted time. \
Just wind it up, close your eyes, and count to ten. When you open them, you will be standing at the exact moment you wished to be in."
special = "Use in hand to charge this weapon, up to four times. Deals very little damage when uncharged."
icon_state = "totalitarianism" //TODO: add sprite!
force = 10
attack_speed = 0.5
damtype = PALE_DAMAGE
attack_verb_continuous = list("cleaves", "cuts")
attack_verb_simple = list("cleaves", "cuts")
hitsound = 'sound/weapons/fixer/generic/knife3.ogg'
attribute_requirements = list(
JUSTICE_ATTRIBUTE = 80
)
var/charges = 0

/obj/item/ego_weapon/windup/attack(mob/living/M, mob/living/user)
..()
if(charges > 0)
if(charges == 4)
playsound(src, 'sound/abnormalities/clock/finish.ogg', 60)
else
playsound(src, 'sound/machines/clockcult/steam_whoosh.ogg', 100)
charges = max(0, charges - 1)
if(charges == 0)
force = 10

/obj/item/ego_weapon/windup/attack_self(mob/user)
if(charges >= 4)
to_chat(user,span_warning("You can't crank it any further!"))
return
if(do_after(user, 8, src))
charges = min(charges + 1, 4)
force = (charges * 10 + 5)
to_chat(user,span_warning("You crank the [src]."))
playsound(src.loc, 'sound/abnormalities/clock/clank.ogg', 75, TRUE)
PlayChargeSound()

/obj/item/ego_weapon/windup/proc/PlayChargeSound()
set waitfor = FALSE
sleep(10)
if(!charges) //We don't play the sound if the player has already emptied out by now
return
playsound(src.loc, 'sound/abnormalities/clock/turn_on.ogg', 75, TRUE)
74 changes: 73 additions & 1 deletion code/game/objects/items/ego_weapons/zayin.dm
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@
if(!ishuman(owner))
return
var/mob/living/carbon/human/H = owner
to_chat(H, span_nicegreen("A shield from [owner] increases your resistance to pale damage!"))
to_chat(H, span_nicegreen("A shield increases your resistance to pale damage!"))
H.physiology.pale_mod /= 1.1
return ..()

Expand Down Expand Up @@ -323,4 +323,76 @@
attack_verb_continuous = list("smacks", "strikes", "beats")
attack_verb_simple = list("smack", "strike", "beat")

/obj/item/ego_weapon/plastic
name = "plastic smile"
desc = "A mysterious worn-out tool used for operations."
special = "Attack a friendly human while wearing matching armor to buff their JUSTICE by the amount of damage you would have dealt."
icon_state = "plastic"
force = 14
damtype = BLACK_DAMAGE
attack_verb_continuous = list("smacks", "strikes", "beats")
attack_verb_simple = list("smack", "strike", "beat")
hitsound = 'sound/abnormalities/kqe/hitsound1.ogg'

/obj/item/ego_weapon/plastic/attack(mob/living/M, mob/living/user)
if(!ishuman(M) || M == user || !user.faction_check_mob(M) || (user.a_intent != INTENT_HELP))
..()
return
var/obj/item/clothing/suit/armor/ego_gear/tools/plastic/P = user.get_item_by_slot(ITEM_SLOT_OCLOTHING)
if(!istype(P))
..()
return
var/mob/living/carbon/human/HT = M
var/datum/status_effect/you_happy_buff/Y = user.has_status_effect(/datum/status_effect/you_happy_buff)
if(Y)
..()
return
HT.apply_status_effect(/datum/status_effect/evening)
playsound(get_turf(user), 'sound/abnormalities/you_happy/fail.ogg', 25, TRUE, -9)
HT.visible_message(span_nicegreen("[HT] had their justice buffed with [src] by [user]!"))
user.changeNext_move(CLICK_CD_MELEE * 5)

/datum/status_effect/you_happy_buff
id = "you must be happy ego buff"
status_type = STATUS_EFFECT_UNIQUE
duration = 6 SECONDS
alert_type = null

/datum/status_effect/you_happy_buff/on_apply()
if(!ishuman(owner))
return
var/mob/living/carbon/human/H = owner
H.adjust_attribute_bonus(JUSTICE_ATTRIBUTE, 14)
return ..()

/datum/status_effect/you_happy_buff/on_remove()
if(!ishuman(owner))
return
var/mob/living/carbon/human/H = owner
H.adjust_attribute_bonus(JUSTICE_ATTRIBUTE, 14)
return ..()

/obj/item/ego_weapon/prohibited
name = "PROHIBITED!!!"
desc = "You've pressed it numerous times and you still have something you want to know about it?"
special = "Attack an enemy while wearing matching armor to make them lose interest in you. Might also just make them angry."
icon_state = "touch"
force = 14
damtype = WHITE_DAMAGE
attack_verb_continuous = list("sprays", "hoses", "mists", "drizzles")
attack_verb_simple = list("spray", "hose", "mist", "drizzle")
hitsound = 'sound/effects/spray3.ogg'

/obj/item/ego_weapon/prohibited/attack(mob/living/M, mob/living/user)
. = ..()
if(prob(75)) //75% chance of just not working at all - this ability has the potential to be OP
return
if(user.faction_check_mob(M) || (!istype(M, /mob/living/simple_animal/hostile)))
return
var/obj/item/clothing/suit/armor/ego_gear/tools/prohibited/P = user.get_item_by_slot(ITEM_SLOT_OCLOTHING)
if(!istype(P))
return
var/mob/living/simple_animal/hostile/T = M
if(T.target == user)
T.LoseTarget()
T.visible_message(span_nicegreen("[T] lost interest in [user]!"))
49 changes: 42 additions & 7 deletions code/modules/clothing/suits/ego_gear/tools.dm
Original file line number Diff line number Diff line change
@@ -1,14 +1,35 @@

//Armor from tool abnormalities
/obj/item/clothing/suit/armor/ego_gear/tools
icon = 'icons/obj/clothing/ego_gear/abnormality/tools.dmi'
worn_icon = 'icons/mob/clothing/ego_gear/abnormality/tools.dmi'

//ZAYIN
/obj/item/clothing/suit/armor/ego_gear/tools/bucket
name = "bucket"
desc = "The man lost his balance after seeing what the well's bucket had drawn."
icon_state = "bucket"
armor = list(RED_DAMAGE = 10, WHITE_DAMAGE = 0, BLACK_DAMAGE = 0, PALE_DAMAGE = 0)

/obj/item/clothing/suit/armor/ego_gear/tools/prohibited
name = "PROHIBITED!!!"
desc = "Why would you even want to touch it?"
icon_state = "touch"
armor = list(RED_DAMAGE = 0, WHITE_DAMAGE = 0, BLACK_DAMAGE = 0, PALE_DAMAGE = 10)

/obj/item/clothing/suit/armor/ego_gear/tools/plastic
name = "plastic smile"
desc = "Do you love your city?"
icon_state = "plastic"
armor = list(RED_DAMAGE = 0, WHITE_DAMAGE = 10, BLACK_DAMAGE = 0, PALE_DAMAGE = 0)

//TETH
/obj/item/clothing/suit/armor/ego_gear/tools/aspiration
name = "aspiration"
desc = "Excessive aspiration would bring about unwarranted frenzy."
icon_state = "aspiration"
armor = list(RED_DAMAGE = 20, WHITE_DAMAGE = 0, BLACK_DAMAGE = 0, PALE_DAMAGE = 0) // 20

//HE
/obj/item/clothing/suit/armor/ego_gear/tools/swindle
name = "swindle"
desc = "All-natural snake oil! Cleans the skin, removes pimples, impetigo, and other defects!"
Expand Down Expand Up @@ -54,12 +75,6 @@
FORTITUDE_ATTRIBUTE = 40
)

/obj/item/clothing/suit/armor/ego_gear/tools/aspiration
name = "aspiration"
desc = "Excessive aspiration would bring about unwarranted frenzy."
icon_state = "aspiration"
armor = list(RED_DAMAGE = 20, WHITE_DAMAGE = 0, BLACK_DAMAGE = 0, PALE_DAMAGE = 0) // 20

/obj/item/clothing/suit/armor/ego_gear/tools/giant_tree_branch
name = "giant tree branch"
desc = "The tree simply reaped from what it sowed."
Expand All @@ -68,3 +83,23 @@
attribute_requirements = list(
FORTITUDE_ATTRIBUTE = 40
)

/obj/item/clothing/suit/armor/ego_gear/tools/isolation
name = "isolation"
desc = "Company P wished to construct the safest place on Earth. However, this shelter, while perfectly safe on the inside, \
alters the reality of the outside to be even more hopeless. It literally makes itself into “the safest place on Earth."
icon_state = "shelter"
armor = list(RED_DAMAGE = 30, WHITE_DAMAGE = 20, BLACK_DAMAGE = 0, PALE_DAMAGE = 20) // 70
attribute_requirements = list(
FORTITUDE_ATTRIBUTE = 40
)

//WAW
/obj/item/clothing/suit/armor/ego_gear/tools/windup
name = "wind-up armor"
desc = "Humanity has conquered disease and nature. Now we have come far enough to harness time itself."
icon_state = "windup"
armor = list(RED_DAMAGE = 10, WHITE_DAMAGE = 50, BLACK_DAMAGE = 10, PALE_DAMAGE = 70) // 140
attribute_requirements = list(
JUSTICE_ATTRIBUTE = 80
)
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
max_buckled_mobs = 1
var/obj/structure/toolabnormality/shelter/linked_structure

ego_list = list(
/datum/ego_datum/weapon/isolation,
/datum/ego_datum/armor/isolation,
)

/obj/structure/toolabnormality/shelter/proc/travel(mob/living/carbon/human/user)
if(!linked_structure) //Here we do nothing, just set it up for the substypes
return
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@
/mob/living/simple_animal/hostile/abnormality/nihil,
)

ego_list = list(
/datum/ego_datum/weapon/windup,
/datum/ego_datum/armor/windup,
)

/obj/structure/toolabnormality/clock/attack_hand(mob/living/carbon/human/user)
..()
if(user.ckey in banned)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
var/list/bastards = list()
var/list/breaching_bastards = list()

ego_list = list(
/datum/ego_datum/weapon/prohibited,
/datum/ego_datum/armor/prohibited,
)

/obj/structure/toolabnormality/touch/examine(mob/user)
. = ..()
. += span_info("Pressing it while on help intent will breach all abnormalities instead of ending the shift.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
var/bonus
var/switch_time = 3

ego_list = list(
/datum/ego_datum/weapon/plastic,
/datum/ego_datum/armor/plastic,
)

/obj/structure/toolabnormality/you_happy/user_buckle_mob(mob/living/M, mob/user, check_loc = TRUE)
if (!istype(M, /mob/living/carbon/human))
to_chat(usr, span_warning("It doesn't look like I can't quite fit in."))
Expand Down
Binary file modified icons/mob/clothing/ego_gear/abnormality/tools.dmi
Binary file not shown.
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/clothing/ego_gear/abnormality/tools.dmi
Binary file not shown.
Binary file modified icons/obj/ego_weapons.dmi
Binary file not shown.

0 comments on commit 3ad698f

Please sign in to comment.