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 23 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()
.=..()
cuberound marked this conversation as resolved.
Show resolved Hide resolved
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
8 changes: 8 additions & 0 deletions code/datums/ammo/bullet/rifle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -202,12 +202,20 @@
damage = 55
penetration = ARMOR_PENETRATION_TIER_3

/datum/ammo/bullet/rifle/type71/setup_faction_clash_values()
if(istype(src,/datum/ammo/bullet/rifle/type71/ap)||istype(src,/datum/ammo/bullet/rifle/type71/heap))
cuberound marked this conversation as resolved.
Show resolved Hide resolved
penetration = ARMOR_PENETRATION_TIER_6
else
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
5 changes: 5 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
14 changes: 14 additions & 0 deletions code/datums/ammo/bullet/special_ammo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@
penetration = 0
effective_range_max = 5

/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 = "armor-piercing smartgun bullet"
icon_state = "bullet"
Expand Down Expand Up @@ -110,6 +116,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 Down Expand Up @@ -180,3 +190,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
7 changes: 6 additions & 1 deletion code/game/gamemodes/game_mode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,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()
for(var/mob/new_player/np in GLOB.new_player_list)
np.new_player_panel_proc()
round_time_lobby = world.time
Expand All @@ -112,6 +112,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()
for(var/ammo in GLOB.ammo_list)
if(MODE_HAS_FLAG(MODE_FACTION_CLASH))
GLOB.ammo_list[ammo].setup_faction_clash_values()
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
for(var/ammo in GLOB.ammo_list)
if(MODE_HAS_FLAG(MODE_FACTION_CLASH))
GLOB.ammo_list[ammo].setup_faction_clash_values()
if(!MODE_HAS_FLAG(MODE_FACTION_CLASH))
return
for(var/ammo in GLOB.ammo_list)
GLOB.ammo_list[ammo].setup_faction_clash_values()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

welp I want to make it expandable in soem way to be usable with other gamemode changes, for exaple if UPP had gamemdoe to fight xenos to change up their values

Copy link
Contributor Author

Choose a reason for hiding this comment

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

but jeh I needs some improvemnt

Copy link
Member

Choose a reason for hiding this comment

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

bump


/datum/game_mode/proc/get_affected_zlevels()
if(is_in_endgame)
. = SSmapping.levels_by_any_trait(list(ZTRAIT_MARINE_MAIN_SHIP))
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