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

Dealer of the Damned (Formerly-ish Six-Shot Sharper) #2331

Merged
merged 8 commits into from
Aug 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
Binary file modified ModularTegustation/Teguicons/64x64.dmi
Binary file not shown.
9 changes: 9 additions & 0 deletions code/datums/abnormality/_ego_datum/teth.dm
Original file line number Diff line number Diff line change
Expand Up @@ -330,3 +330,12 @@
/datum/ego_datum/armor/faelantern
item_path = /obj/item/clothing/suit/armor/ego_gear/teth/faelantern
cost = 20

//Dealer of the Damned - Luck of the Draw
/datum/ego_datum/weapon/luckdraw
item_path = /obj/item/gun/ego_gun/luckdraw
cost = 20

/datum/ego_datum/armor/luckdraw
item_path = /obj/item/clothing/suit/armor/ego_gear/teth/luckdraw
cost = 20
6 changes: 6 additions & 0 deletions code/modules/clothing/suits/ego_gear/teth.dm
Original file line number Diff line number Diff line change
Expand Up @@ -244,3 +244,9 @@ Any attempt to code risk class armor will result in a 10 day Github ban.*/
desc = "Some things are too good to be true."
icon_state = "faelantern"
armor = list(RED_DAMAGE = 20, WHITE_DAMAGE = 30, BLACK_DAMAGE = -30, PALE_DAMAGE = 0) // 20

/obj/item/clothing/suit/armor/ego_gear/teth/luckdraw
name = "luck of the draw"
desc = "How many have lost it all to a simple game of chance?"
icon_state = "luckdraw"
armor = list(RED_DAMAGE = 0, WHITE_DAMAGE = 10, BLACK_DAMAGE = 30, PALE_DAMAGE = -20) // 20
7 changes: 7 additions & 0 deletions code/modules/mob/living/carbon/human/ego_gifts.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1509,3 +1509,10 @@
if(!damage)
return
owner.adjustBruteLoss(-damage*0.75)

/datum/ego_gifts/luckdraw
name = "Luck of the Draw"
icon_state = "luckdraw"
temperance_bonus = -1
justice_bonus = 3
slot = HAT
108 changes: 108 additions & 0 deletions code/modules/mob/living/simple_animal/abnormality/teth/dealerdamned.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
/mob/living/simple_animal/hostile/abnormality/dealerdamned
name = "Dealer of the Damned"
desc = "A floating playing card with what appears to be a cursor acting as its hand."
icon = 'ModularTegustation/Teguicons/64x64.dmi'
icon_state = "dealerdamned"
maxHealth = 400
health = 400
threat_level = TETH_LEVEL
work_chances = list(
ABNORMALITY_WORK_INSTINCT = 35,
ABNORMALITY_WORK_INSIGHT = 55,
ABNORMALITY_WORK_ATTACHMENT = 35,
ABNORMALITY_WORK_REPRESSION = 25,
"Gamble" = 100
)
work_damage_amount = 6
work_damage_type = BLACK_DAMAGE
speak_emote = list("states")
pet_bonus = "waves"

//Forsaken gift is just a placeholder so it doesn't bug tf out when I compile
ego_list = list(
/datum/ego_datum/weapon/luckdraw,
/datum/ego_datum/armor/luckdraw,
)
gift_type = /datum/ego_gifts/luckdraw
pixel_x = -16
abnormality_origin = ABNORMALITY_ORIGIN_ORIGINAL
var/coin_status
var/has_flipped
var/static/gambled_prior = list()
var/work_count = 0

//Coinflip V1; Expect Jank
/mob/living/simple_animal/hostile/abnormality/dealerdamned/funpet(mob/petter)
..()
if(!isliving(petter))
return
if(has_flipped)
say("Woah there, hotshot. We've already had a game recently!")
return

has_flipped = TRUE
var/mob/living/user = petter
user.deal_damage(user.maxHealth*0.2, RED_DAMAGE)
icon_state = "dealerflip"
manual_emote("flips a gold coin.")
SLEEP_CHECK_DEATH(10)
icon_state = "dealerdamned"
if(prob(35))
say("Heads, huh? Looks like you win this one.")
coin_status = TRUE
user.adjustBruteLoss(-user.maxHealth*0.2)
else
say("Tails. Sorry, high roller, but a deal's a deal.")
return

/mob/living/simple_animal/hostile/abnormality/dealerdamned/AttemptWork(mob/living/carbon/human/user, work_type)
..()
if((work_type == "Gamble") && (user.ckey in gambled_prior))
say("Hey, I know I'm all for high stakes, but you've already put your life on the line once. I've got standards.")
return FALSE
else
return TRUE

//TODO: Add the revolver open sprite, replace gibbing with "death" sprite
/mob/living/simple_animal/hostile/abnormality/dealerdamned/PostWorkEffect(mob/living/carbon/human/user, work_type, pe, work_time)
..()
if(work_type == "Gamble")
say("Feelin' like putting your life on the line, huh? Sounds good to me!")
user.Immobilize(15)
SLEEP_CHECK_DEATH(10)
playsound(user, "revolver_spin", 70, FALSE)
gambled_prior |= user.ckey

//We need to set if the game is going on, who's being shot, and then spent chambers
var/russian_roulette = TRUE
var/player_shot = TRUE
var/spent_chambers = 0

while(russian_roulette)
user.Immobilize(spent_chambers*5)
SLEEP_CHECK_DEATH(spent_chambers*5)
spent_chambers+=1
if(prob(16.666*spent_chambers))
playsound(user, 'sound/weapons/gun/revolver/shot_alt.ogg', 100, FALSE)
russian_roulette = FALSE
if(player_shot)
user.gib()
say("Shame. Was quite fun havin' ya here, but you know how it is.")
else
new /obj/item/gun/ego_gun/pistol/deathdealer(get_turf(user))
new /obj/effect/gibspawner/generic/silent(get_turf(src))
gib()
else
playsound(user, 'sound/weapons/gun/revolver/dry_fire.ogg', 100, FALSE)
if(player_shot)
player_shot = FALSE
else
player_shot = TRUE

/mob/living/simple_animal/hostile/abnormality/dealerdamned/WorkChance(mob/living/carbon/human/user, chance)
var/newchance
if(coin_status)
newchance = 20
coin_status = FALSE
has_flipped = FALSE
return chance + newchance
10 changes: 10 additions & 0 deletions code/modules/paperwork/records/info/teth.dm
Original file line number Diff line number Diff line change
Expand Up @@ -368,3 +368,13 @@
"When Insight Work was performed, the abnormality's physical condition improved. If the abnormality was in a \"Pristine\" state, the Qliphoth Counter lowered.",
"When the Qliphoth Counter reached zero, the physical condition of the abnormality improved significantly.",
"After its condition improves beyond a certain point, the abnormality will breach containment and travel through the facility on a horizontal path, dealing massive WHITE damage to everything it impacts.")

//Dealer of the Damned
/obj/item/paper/fluff/info/teth/dealerdamned
abno_type = /mob/living/simple_animal/hostile/abnormality/dealerdamned
abno_code = "T-01-72"
abno_info = list(
"When Agent Jamie poked T-01-72, the abnormality took some of Agent Jamie's health as a wager for a coin flip. When the coin landed heads, Jamie's health was refunded and the next work had a higher success rate. When the coin landed tails, nothing happened.",
"When Agent Jamie tried to coinflip a second time prior to working, T-01-72 refused.",
"When Gambling work was performed, T-01-72 and the agent engaged in a game of Russian Roulette.",
"If the agent survived the game of Russian Roulette, they were awarded with an unique E.G.O. Weapon.")
6 changes: 6 additions & 0 deletions code/modules/projectiles/ammunition/ego_ammunition/teth.dm
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,9 @@
projectile_type = /obj/projectile/ego_bullet/ego_patriot
pellets = 4
variance = 25

/obj/item/ammo_casing/caseless/ego_luckdraw
name = "luckdraw casing"
desc = "A Luck of the Draw casing."
projectile_type = /obj/projectile/ego_bullet/ego_luckdraw

7 changes: 7 additions & 0 deletions code/modules/projectiles/ammunition/ego_ammunition/waw.dm
Original file line number Diff line number Diff line change
Expand Up @@ -144,3 +144,10 @@
name = "bride casing"
desc = "A bride casing."
projectile_type = /obj/projectile/ego_bullet/ego_bride

/obj/item/ammo_casing/caseless/ego_supershotgun
name = "super shotgun casing"
desc = "A super shotgun casing."
projectile_type = /obj/projectile/ego_bullet/ego_supershotgun
pellets = 10
variance = 35
6 changes: 6 additions & 0 deletions code/modules/projectiles/ammunition/ego_ammunition/zayin.dm
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,9 @@
name = "oceanic casing"
desc = "A oceanica casing."
projectile_type = /obj/projectile/ego_bullet/ego_oceanic

/obj/item/ammo_casing/caseless/ego_dud
name = "dud casing"
desc = "A dud casing."
projectile_type = /obj/projectile/ego_bullet/ego_dud
pellets = 0
25 changes: 25 additions & 0 deletions code/modules/projectiles/guns/ego_gun/he.dm
Original file line number Diff line number Diff line change
Expand Up @@ -305,3 +305,28 @@
attribute_requirements = list(
FORTITUDE_ATTRIBUTE = 40
)

/obj/item/gun/ego_gun/pistol/deathdealer
name = "death dealer"
desc = "A gilded revolver which seems to defy all known laws of gun manufacturing... Feel lucky?"
icon_state = "deathdealer" //Placeholder sprite. Will need to comission/replace with proper sprites
inhand_icon_state = "deathdealer"
special = "This weapon changes its projectile each time it is reloaded. It cannot be reloaded without firing all six shots first."
ammo_type = /obj/item/ammo_casing/caseless/ego_gaze
weapon_weight = WEAPON_HEAVY
fire_delay = 8
shotsleft = 6
reloadtime = 1.3 SECONDS
fire_sound = 'sound/weapons/gun/revolver/shot_alt.ogg'
vary_fire_sound = FALSE
var/list/ammotypes = list(/obj/item/ammo_casing/caseless/ego_magicbullet,/obj/item/ammo_casing/caseless/ego_supershotgun,/obj/item/ammo_casing/caseless/ego_solemnlament,/obj/item/ammo_casing/caseless/ego_harmony,/obj/item/ammo_casing/caseless/ego_match,/obj/item/ammo_casing/caseless/ego_gaze)
//TODO: Make it so that the fire_sound manages to match the bullet, I.E. magic bullet shots use the magic bullet sound.
//NOTE: Dud round currently breaks the gun, causing it to no longer fire regardless of current ammo type. Will need help fixing this at some point, but for now the dud's removed from the list.
//If you feel like having a go at fixing it, the projectile's /obj/item/ammo_casing/caseless/ego_dud, under ZAYIN.

/obj/item/gun/ego_gun/pistol/deathdealer/reload_ego(mob/user)
if(shotsleft!=0)
to_chat(user,span_warning("You cannot reload this gun without an empty cylinder!"))
return
ammo_type = pick(ammotypes)
..()
13 changes: 13 additions & 0 deletions code/modules/projectiles/guns/ego_gun/teth.dm
Original file line number Diff line number Diff line change
Expand Up @@ -176,3 +176,16 @@
shotsleft = 8
reloadtime = 1.4 SECONDS
fire_sound = 'sound/weapons/gun/shotgun/shot.ogg'

/obj/item/gun/ego_gun/luckdraw
name = "luck of the draw"
desc = "A seemingly infinite deck of bladed cards. How much are you willing to risk to win it big?"
icon_state = "luckdraw"
inhand_icon_state = "luckdraw"
lefthand_file = 'icons/mob/inhands/items_lefthand.dmi'
righthand_file = 'icons/mob/inhands/items_righthand.dmi'
special = "This weapon's projectiles move slowly and pierce enemies."
ammo_type = /obj/item/ammo_casing/caseless/ego_luckdraw
weapon_weight = WEAPON_HEAVY
autofire = 0.6 SECONDS
fire_sound = 'sound/items/handling/paper_pickup.ogg' //Mostly just using this for a lack of a better "card-flicking" noise
9 changes: 9 additions & 0 deletions code/modules/projectiles/projectile/ego_bullets/teth.dm
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,12 @@
damage = 15
damage_type = RED_DAMAGE

/obj/projectile/ego_bullet/ego_luckdraw
name = "luck_of_the_draw"
icon_state = "drawcard"
damage = 18
damage_type = WHITE_DAMAGE
projectile_piercing = PASSMOB
speed = 0.45
range = 14
hit_nondense_targets = TRUE
4 changes: 4 additions & 0 deletions code/modules/projectiles/projectile/ego_bullets/waw.dm
Original file line number Diff line number Diff line change
Expand Up @@ -341,3 +341,7 @@
damage = 55
damage_type = WHITE_DAMAGE

/obj/projectile/ego_bullet/ego_supershotgun
name = "super shotgun"
damage = 10
damage_type = RED_DAMAGE
9 changes: 9 additions & 0 deletions code/modules/projectiles/projectile/ego_bullets/zayin.dm
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,12 @@
name = "oceanic"
damage = 11 //Worse than tough lol
damage_type = WHITE_DAMAGE

/obj/projectile/ego_bullet/ego_dud
name = "dud"
damage = 1
damage_type = RED_DAMAGE

/obj/projectile/ego_bullet/ego_dud/Initialize()
qdel(src)
..()
Binary file modified icons/mob/clothing/ego_gear/abnormality/teth.dmi
Binary file not shown.
Binary file modified icons/mob/clothing/ego_gear/ego_gifts.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/teth.dmi
Binary file not shown.
Binary file modified icons/obj/ego_weapons.dmi
Binary file not shown.
Binary file modified icons/obj/projectiles.dmi
Binary file not shown.
1 change: 1 addition & 0 deletions lobotomy-corp13.dme
Original file line number Diff line number Diff line change
Expand Up @@ -2894,6 +2894,7 @@
#include "code\modules\mob\living\simple_animal\abnormality\teth\cinderella.dm"
#include "code\modules\mob\living\simple_animal\abnormality\teth\cleaner.dm"
#include "code\modules\mob\living\simple_animal\abnormality\teth\crumbling_armor.dm"
#include "code\modules\mob\living\simple_animal\abnormality\teth\dealerdamned.dm"
#include "code\modules\mob\living\simple_animal\abnormality\teth\dingle_dangle.dm"
#include "code\modules\mob\living\simple_animal\abnormality\teth\drowned_sisters.dm"
#include "code\modules\mob\living\simple_animal\abnormality\teth\faelantern.dm"
Expand Down
Loading