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

gamemode value adjustmands, anti off screen and AP spam hvh #7335

Merged
merged 56 commits into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
e745d48
gamemode value adjustmands
uuuuhuuuu Oct 18, 2024
46070b8
cleanup
uuuuhuuuu Oct 18, 2024
0bef7c0
encapsulates in proc
uuuuhuuuu Oct 19, 2024
41631f2
missing brackets
uuuuhuuuu Oct 19, 2024
657e2c0
new formula cooked up
uuuuhuuuu Nov 6, 2024
2e20f9c
updated m56d
uuuuhuuuu Nov 6, 2024
e1de8ac
reduces type 71 normal ammo ap to 5
uuuuhuuuu Nov 7, 2024
099ca27
Merge branch 'master' into HvH-bullet-balance
cuberound Nov 10, 2024
c600f6f
fixes bad
uuuuhuuuu Nov 10, 2024
e6bcf06
lets halve the accuracy
uuuuhuuuu Nov 10, 2024
b5fc9c5
debug messages for steel
uuuuhuuuu Nov 10, 2024
d74095b
eh that should be tehre
uuuuhuuuu Nov 10, 2024
bfcfcfd
shotgun changes
uuuuhuuuu Nov 11, 2024
22a8c93
increase SG accurate and max and effective ranges
uuuuhuuuu Nov 13, 2024
2190f25
fixes shotgun ammo
uuuuhuuuu Nov 13, 2024
034a030
pistol accuracy buff
uuuuhuuuu Nov 13, 2024
a55bf9a
long ranged pkp
uuuuhuuuu Nov 14, 2024
814a9da
Update code/datums/ammo/bullet/special_ammo.dm
cuberound Nov 19, 2024
5f2577e
Update code/datums/ammo/bullet/special_ammo.dm
cuberound Nov 19, 2024
73a11f2
Update code/datums/ammo/bullet/tank.dm
cuberound Nov 19, 2024
32c3374
eh
uuuuhuuuu Nov 19, 2024
e007c1a
eh
uuuuhuuuu Nov 19, 2024
3f2df1a
eh
uuuuhuuuu Nov 19, 2024
c4734da
Update code/datums/ammo/bullet/pistol.dm
cuberound Nov 21, 2024
68113fe
MOU changes
uuuuhuuuu Nov 23, 2024
242b93f
MOU changed
uuuuhuuuu Nov 23, 2024
51d914b
Merge branch 'master' into HvH-bullet-balance
cuberound Nov 23, 2024
c986004
eh
uuuuhuuuu Nov 23, 2024
69126ad
explosion adjustments
uuuuhuuuu Nov 25, 2024
a533c00
explosion adjustments
uuuuhuuuu Nov 25, 2024
028b9ef
solves istype issue
uuuuhuuuu Nov 25, 2024
0946f04
resolves conflicts with other HvH PR
uuuuhuuuu Nov 27, 2024
d657252
resolves conflicts with other HvH PR
uuuuhuuuu Nov 27, 2024
b906191
m4ra accuracy buff
uuuuhuuuu Dec 6, 2024
963c60a
accuracy improvemnt on m4ra
uuuuhuuuu Dec 6, 2024
fb1dd18
UPP flechette dmg nerf
uuuuhuuuu Dec 6, 2024
6bb6432
normal flachette nerf
uuuuhuuuu Dec 6, 2024
0d1106c
carabine scatter increase
uuuuhuuuu Dec 6, 2024
a2b0918
ehm
uuuuhuuuu Dec 11, 2024
002ad9b
Merge branch 'master' into HvH-bullet-balance
cuberound Dec 13, 2024
8623b2b
Merge branch 'HvH-bullet-balance' of https://github.com/cuberound/cms…
uuuuhuuuu Dec 13, 2024
15d1b80
fixing deconflict
uuuuhuuuu Dec 13, 2024
97fafcd
m2c changes
uuuuhuuuu Dec 13, 2024
4e88f8a
experimental
uuuuhuuuu Dec 13, 2024
28bb3ea
Merge branch 'master' into HvH-bullet-balance
cuberound Dec 16, 2024
89462b5
reduces flame dmg by 80%
uuuuhuuuu Dec 18, 2024
b39ebe8
eh reduces fire dmg
uuuuhuuuu Dec 20, 2024
b815247
hopefuly solves merge conflict
uuuuhuuuu Dec 22, 2024
3d1de50
Merge branch 'master' into HvH-bullet-balance
cuberound Jan 3, 2025
eff0a8a
removes unused modes
uuuuhuuuu Jan 15, 2025
b155da8
Update code/datums/ammo/bullet/special_ammo.dm
cuberound Jan 15, 2025
b02b2ab
removes unused modes
uuuuhuuuu Jan 15, 2025
e17d9cf
Merge branch 'master' into HvH-bullet-balance
cuberound Jan 15, 2025
caad2fa
logic improve
uuuuhuuuu Jan 15, 2025
6dbb7fd
please do not conclict
uuuuhuuuu Jan 23, 2025
75089b7
Merge branch 'master' into HvH-bullet-balance
cuberound Jan 23, 2025
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
5 changes: 5 additions & 0 deletions code/datums/ammo/ammo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@
/datum/ammo/New()
set_bullet_traits()

/datum/ammo/proc/setup_faction_clash_values()
accuracy = (accuracy - 85)/2
penetration = min(penetration, 30) //more ap overpenatrates anyway but makes next calculation cleaner
accurate_range = min(accurate_range, 10 - penetration/5) //this makes AP ammo better at clsoe range (and techinicly super far range when the hitchance gets bottom caped at 5% hitchance)

/datum/ammo/proc/on_bullet_generation(obj/projectile/generated_projectile, mob/bullet_generator) //NOT used on New(), applied to the projectiles.
return

Expand Down
6 changes: 6 additions & 0 deletions code/datums/ammo/bullet/pistol.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@
penetration= ARMOR_PENETRATION_TIER_2
shrapnel_chance = SHRAPNEL_CHANCE_TIER_2

/datum/ammo/bullet/pistol/setup_faction_clash_values()
. = ..()
accuracy += 20
accurate_range -= 2 //we want pistols to be more accurate but only at short range


/datum/ammo/bullet/pistol/tiny
name = "light pistol bullet"

Expand Down
6 changes: 6 additions & 0 deletions code/datums/ammo/bullet/rifle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -202,12 +202,18 @@
damage = 55
penetration = ARMOR_PENETRATION_TIER_3

/datum/ammo/bullet/rifle/type71/setup_faction_clash_values()
if(penetration <= ARMOR_PENETRATION_TIER_3) //so we only reduce AP of normal ammo here
penetration = ARMOR_PENETRATION_TIER_1
. = ..()

/datum/ammo/bullet/rifle/type71/ap
name = "heavy armor-piercing rifle bullet"

damage = 40
penetration = ARMOR_PENETRATION_TIER_10


/datum/ammo/bullet/rifle/type71/heap
name = "heavy high-explosive armor-piercing rifle bullet"

Expand Down
21 changes: 21 additions & 0 deletions code/datums/ammo/bullet/shotgun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
/datum/ammo/bullet/shotgun
headshot_state = HEADSHOT_OVERLAY_HEAVY

/datum/ammo/bullet/shotgun/setup_faction_clash_values()
. = ..()
accuracy = accuracy * 2 + 85 //we revert accuracy reduction that is applied on other bullets shotguns are accurate but already have short range only


/datum/ammo/bullet/shotgun/slug
name = "shotgun slug"
handful_state = "slug_shell"
Expand Down Expand Up @@ -106,6 +111,10 @@
handful_state = "flechette_shell"
multiple_handful_name = TRUE

/datum/ammo/bullet/shotgun/flechette/setup_faction_clash_values()
. = ..()
damage *= 0.7

/datum/ammo/bullet/shotgun/flechette_spread
name = "additional flechette"
icon_state = "flechette"
Expand All @@ -119,6 +128,10 @@
penetration = ARMOR_PENETRATION_TIER_7
scatter = SCATTER_AMOUNT_TIER_5

/datum/ammo/bullet/shotgun/flechette_spread/setup_faction_clash_values()
. = ..()
damage *= 0.7

/datum/ammo/bullet/shotgun/buckshot
name = "buckshot shell"
icon_state = "buckshot"
Expand Down Expand Up @@ -300,6 +313,10 @@
penetration = ARMOR_PENETRATION_TIER_10
bonus_projectiles_amount = EXTRA_PROJECTILES_TIER_2

/datum/ammo/bullet/shotgun/heavy/flechette/setup_faction_clash_values()
. = ..()
damage *= 0.7

/datum/ammo/bullet/shotgun/heavy/flechette_spread
name = "additional heavy flechette"
icon_state = "flechette"
Expand All @@ -312,6 +329,10 @@
penetration = ARMOR_PENETRATION_TIER_10
scatter = SCATTER_AMOUNT_TIER_4

/datum/ammo/bullet/shotgun/heavy/flechette_spread/setup_faction_clash_values()
. = ..()
damage *= 0.7

/*
16 GAUGE SHOTGUN AMMO
*/
Expand Down
21 changes: 21 additions & 0 deletions code/datums/ammo/bullet/special_ammo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@
damage_falloff = DAMAGE_FALLOFF_TIER_6
effective_range_max = 7

/datum/ammo/bullet/smartgun/setup_faction_clash_values()
. = ..()
max_range = 17
accurate_range = 12
effective_range_max = 12

/datum/ammo/bullet/smartgun/armor_piercing
name = "\improper AP smartgun tracer bullet"
icon_state = "bullet_ap_iff"
Expand Down Expand Up @@ -161,6 +167,10 @@
penetration= ARMOR_PENETRATION_TIER_10 //Bumped the penetration to serve a different role from sentries, MGs are a bit more offensive
accuracy = HIT_ACCURACY_TIER_3

/datum/ammo/bullet/machinegun/setup_faction_clash_values()
. = ..()
accurate_range = 12 //we revert the reduction

/datum/ammo/bullet/machinegun/set_bullet_traits()
. = ..()
LAZYADD(traits_to_give, list(
Expand All @@ -181,6 +191,13 @@
max_range = 15
effective_range_max = 7
damage_falloff = DAMAGE_FALLOFF_TIER_8
scatter = 0

/datum/ammo/bullet/machinegun/auto/setup_faction_clash_values()
accuracy = HIT_ACCURACY_TIER_4
scatter = SCATTER_AMOUNT_TIER_5
penetration = ARMOR_PENETRATION_TIER_2
. = ..()

/datum/ammo/bullet/machinegun/auto/set_bullet_traits()
return
Expand Down Expand Up @@ -246,3 +263,7 @@
damage = 35
penetration= ARMOR_PENETRATION_TIER_6
shrapnel_chance = SHRAPNEL_CHANCE_TIER_2

/datum/ammo/bullet/pkp/setup_faction_clash_values()
. = ..()
accurate_range = 14
14 changes: 3 additions & 11 deletions code/datums/ammo/bullet/tank.dm
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,6 @@
penetration = ARMOR_PENETRATION_TIER_6
damage_armor_punch = 1

/datum/ammo/bullet/tank/minigun/New()
..()
if(SSticker.mode && MODE_HAS_FLAG(MODE_FACTION_CLASH))
damage = 15
else if(SSticker.current_state < GAME_STATE_PLAYING)
RegisterSignal(SSdcs, COMSIG_GLOB_MODE_PRESETUP, PROC_REF(setup_hvh_damage))

/datum/ammo/bullet/tank/minigun/proc/setup_hvh_damage()
SIGNAL_HANDLER
if(MODE_HAS_FLAG(MODE_FACTION_CLASH))
damage = 15
/datum/ammo/bullet/tank/setup_faction_clash_values()
. = ..()
damage = 15
1 change: 1 addition & 0 deletions code/game/gamemodes/extended/cm_vs_upp.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
/datum/gamemode_modifier/indestructible_splints,
/datum/gamemode_modifier/mortar_laser_warning,
/datum/gamemode_modifier/no_body_c4,
/datum/gamemode_modifier/weaker_explosions_fire,
)

taskbar_icon = 'icons/taskbar/gml_hvh.png'
Expand Down
7 changes: 6 additions & 1 deletion code/game/gamemodes/game_mode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ GLOBAL_VAR_INIT(cas_tracking_id_increment, 0) //this var used to assign unique t
SS.post_setup()
SEND_GLOBAL_SIGNAL(COMSIG_GLOB_MODE_POSTSETUP)
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(display_roundstart_logout_report)), ROUNDSTART_LOGOUT_REPORT_TIME)

adjust_ammo_values()
round_time_lobby = world.time
log_game("Round started at [time2text(world.realtime)]")
log_game("Operation time at round start is [worldtime2text()]")
Expand All @@ -114,6 +114,11 @@ GLOBAL_VAR_INIT(cas_tracking_id_increment, 0) //this var used to assign unique t
log_game("Server IP: [world.internet_address]:[world.port]")
return TRUE

/datum/game_mode/proc/adjust_ammo_values()
if(MODE_HAS_FLAG(MODE_FACTION_CLASH))
for(var/ammo in GLOB.ammo_list)
GLOB.ammo_list[ammo].setup_faction_clash_values()

/datum/game_mode/proc/get_affected_zlevels()
if(is_in_endgame)
. = SSmapping.levels_by_any_trait(list(ZTRAIT_MARINE_MAIN_SHIP))
Expand Down
4 changes: 4 additions & 0 deletions code/game/gamemodes/round_modifiers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@
modifier_name = "Yautja Shipside Large SD"
modifier_desc = "Allows Yautja to large self destruct on the mainship z-level."

/datum/gamemode_modifier/weaker_explosions_fire
modifier_name = "Weaker explosions"
modifier_desc = "Reduces damage from flames and explosion and stun from explosions to humans."

/datum/gamemode_modifier/no_body_c4
modifier_name = "No body c4"
modifier_desc = "Prevents c4 explosives from being planted on dead body."
4 changes: 1 addition & 3 deletions code/modules/cm_marines/m2c.dm
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@

/obj/structure/machinery/m56d_hmg/auto/Initialize()
. = ..()
burst_scatter_mult = 0
for(var/turf/T in range(cadeblockers_range, src))
var/obj/structure/blocker/anti_cade/CB = new(T)
CB.hmg = src
Expand Down Expand Up @@ -435,9 +436,6 @@
ammo_magazine.current_rounds = 0
ammo_magazine.update_icon()

/obj/structure/machinery/m56d_hmg/auto/get_scatter()
return 0

// ACTIVE COOLING

/obj/structure/machinery/m56d_hmg/auto/proc/force_cooldown(mob/user)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/cm_marines/smartgun_mount.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1045,7 +1045,7 @@
UnregisterSignal(target, COMSIG_PARENT_QDELETING)
target = object
if(target)
RegisterSignal(target, COMSIG_PARENT_QDELETING, PROC_REF(clean_target))
RegisterSignal(target, COMSIG_PARENT_QDELETING, PROC_REF(clean_target), override = TRUE)

/// Print how much ammo is left to chat
/obj/structure/machinery/m56d_hmg/proc/display_ammo()
Expand Down
28 changes: 19 additions & 9 deletions code/modules/mob/living/carbon/human/human.dm
Original file line number Diff line number Diff line change
Expand Up @@ -166,18 +166,28 @@

if(severity >= 30)
flash_eyes(flash_timer = 4 SECONDS * bomb_armor_mult)

// Stuns are multiplied by 1 reduced by their medium armor value. So a medium of 30 would mean a 30% reduction.
var/knockdown_value = severity * 0.1
var/knockdown_minus_armor = min(knockdown_value * bomb_armor_mult, 1 SECONDS)
var/obj/item/item1 = get_active_hand()
var/obj/item/item2 = get_inactive_hand()
apply_effect(floor(knockdown_minus_armor), WEAKEN)
apply_effect(floor(knockdown_minus_armor), STUN) // Remove this to let people crawl after an explosion. Funny but perhaps not desirable.
var/knockdown_value = severity * 0.1
var/knockout_value = damage * 0.1
var/knockout_minus_armor = min(knockout_value * bomb_armor_mult * 0.5, 0.5 SECONDS) // the KO time is halved from the knockdown timer. basically same stun time, you just spend less time KO'd.
apply_effect(floor(knockout_minus_armor), PARALYZE)
apply_effect(floor(knockout_minus_armor) * 2, DAZE)
if(SSticker.mode && MODE_HAS_MODIFIER(/datum/gamemode_modifier/weaker_explosions_fire)) //explosions slow down but way less stun
var/knockdown_minus_armor = min(max(knockdown_value * bomb_armor_mult - 0.5 SECONDS, 0), 0.5 SECONDS) //only explosions with more then 20 severity stun
apply_effect(floor(knockdown_minus_armor), WEAKEN)
apply_effect(floor(knockdown_minus_armor), STUN) // Remove this to let people crawl after an explosion. Funny but perhaps not desirable.
var/slowdown_minus_armor =min(knockout_value * bomb_armor_mult * 0.5, 0.5 SECONDS)
apply_effect(floor(slowdown_minus_armor), SUPERSLOW)
apply_effect(floor(slowdown_minus_armor) * 2, SLOW)
damage *= 0.5 //we reduce after checking eye flash and stun and slow
severity *= 0.5
else
// Stuns are multiplied by 1 reduced by their medium armor value. So a medium of 30 would mean a 30% reduction.
var/knockdown_minus_armor = min(knockdown_value * bomb_armor_mult, 1 SECONDS)
apply_effect(floor(knockdown_minus_armor), WEAKEN)
apply_effect(floor(knockdown_minus_armor), STUN) // Remove this to let people crawl after an explosion. Funny but perhaps not desirable.

var/knockout_minus_armor = min(knockout_value * bomb_armor_mult * 0.5, 0.5 SECONDS) // the KO time is halved from the knockdown timer. basically same stun time, you just spend less time KO'd.
apply_effect(floor(knockout_minus_armor), PARALYZE)
apply_effect(floor(knockout_minus_armor) * 2, DAZE)
explosion_throw(severity, direction)

if(item1 && isturf(item1.loc))
Expand Down
3 changes: 3 additions & 0 deletions code/modules/organs/limbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,9 @@
if((brute <= 0) && (burn <= 0))
return 0

if(burn > 0 && MODE_HAS_MODIFIER(/datum/gamemode_modifier/weaker_explosions_fire))
burn /= 4 //reduce the flame dmg by 75% for HvH, it is still super strong

if(status & LIMB_DESTROYED)
return 0

Expand Down
4 changes: 4 additions & 0 deletions code/modules/projectiles/guns/rifles.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1513,6 +1513,8 @@
set_fire_delay(FIRE_DELAY_TIER_11)//same fire rate as m41
damage_mult = BASE_BULLET_DAMAGE_MULT - BULLET_DAMAGE_MULT_TIER_4//same damage as m41 reg bullets probably
scatter_unwielded = SCATTER_AMOUNT_TIER_5
if(SSticker.mode && MODE_HAS_FLAG(MODE_FACTION_CLASH))
scatter = SCATTER_AMOUNT_TIER_5
recoil_unwielded = RECOIL_AMOUNT_TIER_4

/obj/item/weapon/gun/rifle/type71/carbine/dual
Expand Down Expand Up @@ -1633,6 +1635,8 @@
set_fire_delay(FIRE_DELAY_TIER_9)
set_burst_amount(0)
accuracy_mult = BASE_ACCURACY_MULT + HIT_ACCURACY_MULT_TIER_5
if(SSticker.mode && MODE_HAS_FLAG(MODE_FACTION_CLASH))
accuracy_mult = BASE_ACCURACY_MULT + HIT_ACCURACY_MULT_TIER_8
accuracy_mult_unwielded = BASE_ACCURACY_MULT - HIT_ACCURACY_MULT_TIER_4
damage_mult = BASE_BULLET_DAMAGE_MULT + BULLET_DAMAGE_MULT_TIER_8
recoil_unwielded = RECOIL_AMOUNT_TIER_4
Expand Down
2 changes: 2 additions & 0 deletions code/modules/projectiles/guns/shotguns.dm
Original file line number Diff line number Diff line change
Expand Up @@ -807,6 +807,8 @@ can cause issues with ammo types getting mixed up during the burst.
..()
set_burst_amount(BURST_AMOUNT_TIER_1)
set_fire_delay(FIRE_DELAY_TIER_11)
if(SSticker.mode && MODE_HAS_FLAG(MODE_FACTION_CLASH))
set_fire_delay(FIRE_DELAY_TIER_1)
accuracy_mult = BASE_ACCURACY_MULT
accuracy_mult_unwielded = BASE_ACCURACY_MULT - HIT_ACCURACY_MULT_TIER_10
scatter = SCATTER_AMOUNT_TIER_10
Expand Down
2 changes: 1 addition & 1 deletion code/modules/projectiles/projectile.dm
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@

/obj/projectile/proc/get_effective_accuracy()
#if DEBUG_HIT_CHANCE
to_world(SPAN_DEBUG("Base accuracy is <b>[accuracy]</b>; scatter: <b>[scatter]</b>; distance: <b>[distance_travelled]</b>"))
to_world(SPAN_DEBUG("Base accuracy is <b>[accuracy]</b>; scatter: <b>[scatter]</b>;accurate_range: <b>[ammo.accurate_range]<b>; distance: <b>[distance_travelled]</b>"))
#endif

var/effective_accuracy = accuracy //We want a temporary variable so accuracy doesn't change every time the bullet misses.
Expand Down
Loading