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

Fort and prudence buff + Gun overhaul #2589

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
7 changes: 5 additions & 2 deletions ModularTegustation/ego_weapons/_ego_weapon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,13 @@
user.changeNext_move(CLICK_CD_MELEE * attack_speed)
return TRUE

/obj/item/ego_weapon/attack(mob/living/M, mob/living/user)
/obj/item/ego_weapon/attack(mob/living/M, mob/living/carbon/human/user)
. = ..()
if(stuntime)
user.Immobilize(stuntime)
//You can remove a small amount of stuntime, about 30%, based off your fortitude
var/usedstun = stuntime*0.7 + min(get_attribute_level(user, FORTITUDE_ATTRIBUTE)/130, 1)*0.3 //This should help people hate spears and big weapons less.

user.Immobilize(usedstun)
//Visual stuff to give you better feedback
new /obj/effect/temp_visual/weapon_stun(get_turf(user))
new /obj/effect/temp_visual/dir_setting/bloodsplatter(get_turf(M), pick(GLOB.alldirs))
Expand Down
8 changes: 7 additions & 1 deletion ModularTegustation/ego_weapons/ranged/_ranged.dm
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,13 @@
is_reloading = TRUE
to_chat(user,span_notice("You start loading a new magazine."))
playsound(src, 'sound/weapons/gun/general/slide_lock_1.ogg', 50, TRUE)
if(do_after(user, reloadtime, src)) //gotta reload

//Get a bonus of up to 40% reload speed to fortitude
var/passreload = clamp((get_attribute_level(user, FORTITUDE_ATTRIBUTE)-20)/110, 0.01, 1)

passreload = reloadtime - reloadtime*passreload*0.4

if(do_after(user, passreload, src)) //gotta reload
playsound(src, 'sound/weapons/gun/general/bolt_rack.ogg', 50, TRUE)
shotsleft = initial(shotsleft)
forced_melee = FALSE //no longer forced to resort to melee
Expand Down
12 changes: 7 additions & 5 deletions code/game/machinery/regenerator.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
var/alert_icon = "regen_alert"

/// How many HP and SP we restore on each process tick
var/regeneration_amount = 3
var/regeneration_amount = 1.5
/// Pre-declared variable
var/modified = FALSE // Whether or not the regenerator is currently undergoing modified action
var/hp_bonus = 0
Expand Down Expand Up @@ -70,9 +70,11 @@
continue
if(H.health < 0 && !critical_heal)
continue
H.adjustBruteLoss(-H.maxHealth * ((regen_amt+hp_bonus)/100))
H.adjustFireLoss(-H.maxHealth * ((regen_amt+hp_bonus)/1000)) //Heals at 1/10th speed. Supposed to be slower healing than brute and sanity
H.adjustSanityLoss(-H.maxSanity * ((regen_amt+sp_bonus)/100))
var/prudence_healing = get_attribute_level(H, PRUDENCE_ATTRIBUTE)/50 //Give bonus healing based off your prudence. At about 75 prudence you have 5 healing
prudence_healing += regen_amt
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do it this way instead of regen_amt += prudence_healing

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I was writing it I was in a trance

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you could reverse it anytime soon that'd be great

H.adjustBruteLoss(-H.maxHealth * ((prudence_healing+hp_bonus)/100))
H.adjustFireLoss(-H.maxHealth * ((prudence_healing+hp_bonus)/1000)) //Heals at 1/10th speed. Supposed to be slower healing than brute and sanity
H.adjustSanityLoss(-H.maxSanity * ((prudence_healing+sp_bonus)/100))
if(icon_state != "regen" && !Threat)
icon_state = initial(icon_state)

Expand All @@ -81,7 +83,7 @@
if(burst_cooldown)
. += span_warning("[src] is currently offline!")
return
. += span_info("[src] restores [regeneration_amount+hp_bonus]% HP and [regeneration_amount+sp_bonus]% SP every 2 seconds.")
. += span_info("[src] restores [regeneration_amount+hp_bonus]% HP and [regeneration_amount+sp_bonus]% SP every 2 seconds. This is increased by how much prudence the person being healed has.")

/obj/machinery/regenerator/proc/ProduceIcon(Icon_Color, Type) //Used to be called ProduceGas but due to me using it for a button i had to change it. ProduceGas was a cooler name. -IP
var/mutable_appearance/colored_overlay = mutable_appearance(icon, Type)
Expand Down
Loading