Skip to content
This repository has been archived by the owner on Oct 20, 2024. It is now read-only.

Auto Balancing (for TM) #4

Merged
merged 3 commits into from
Dec 24, 2023
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
4 changes: 2 additions & 2 deletions code/__DEFINES/statistic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ GLOBAL_LIST_INIT_TYPED(balance_formulas, /datum/autobalance_formula_row, setup_f
#define STATISTIC_TYPE_JOB "Role"
#define STATISTIC_TYPE_WEAPON "Weapon"

#define STATISTICS_DEATH_LIST_LEN 20
#define STATISTICS_DEATH_LIST_LEN 20

#define STATISTICS_FF_SHOT_HIT "FF Shot Hit"
#define STATISTICS_SHOT_HIT "Shot Hit"
Expand Down Expand Up @@ -112,7 +112,7 @@ GLOBAL_LIST_INIT_TYPED(balance_formulas, /datum/autobalance_formula_row, setup_f
#define STATISTICS_DESTRUCTION_WINDOWS "Windows Destroyed"


#define STATISTIC_ALL STATISTIC_XENO_ALL + STATISTIC_ASSIST_ALL + STATISTIC_MISC_ALL + STATISTIC_MEDICINE_ALL + STATISTIC_DAMAGE_ALL + STATISTIC_DAMAGE_FF_ALL + STATISTIC_KDA_ALL + STATISTIC_KDA_FF_ALL + STATISTIC_ESCAPE_ALL + STATISTIC_ENGINEERING_ALL + STATISTIC_SURGERY_ALL + STATISTIC_ATTACK_ALL
#define STATISTIC_ALL STATISTIC_XENO_ALL + STATISTIC_ASSIST_ALL + STATISTIC_MISC_ALL + STATISTIC_MEDICINE_ALL + STATISTIC_DAMAGE_ALL + STATISTIC_DAMAGE_FF_ALL + STATISTIC_KDA_ALL + STATISTIC_KDA_FF_ALL + STATISTIC_ESCAPE_ALL + STATISTIC_ENGINEERING_ALL + STATISTIC_SURGERY_ALL + STATISTIC_ATTACK_ALL

#define STATISTIC_XENO_ALL list(STATISTICS_ABILITES, STATISTICS_FACEHUGGE, STATISTIC_XENO_STRUCTURES_BUILD)

Expand Down
7 changes: 3 additions & 4 deletions code/datums/factions/autobalance_payload.dm
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@
average_pop[balance_row.active]++
last_pop[balance_row.active]++

new_esteminated_power += last_pop[1] - average_pop[1] * 100
new_esteminated_power += last_pop[2] - average_pop[2] * 100
new_esteminated_power += last_pop[3] - round_start_pop[3] * average_pop[3]
for(var/i = 1; i <= length(round_start_pop); i++)
new_esteminated_power += (last_pop[i] - average_pop[i] / average_fires - round_start_pop[i]) * 100

esteminated_power = new_esteminated_power
weight = new_weight
Expand Down Expand Up @@ -313,7 +312,7 @@
if("death")
active = 1
if("revive")
if(client.mob.client)
if(client.mob?.client)
active = 3
else
active = 2
2 changes: 0 additions & 2 deletions code/game/objects/shrapnel.dm
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@

/proc/create_shrapnel(turf/epicenter, shrapnel_number = 10, shrapnel_direction, shrapnel_spread = 45, datum/ammo/shrapnel_type = /datum/ammo/bullet/shrapnel, datum/cause_data/cause_data, ignore_source_mob = FALSE, on_hit_coefficient = 0.15)

epicenter = get_turf(epicenter)

var/initial_angle = 0
var/angle_increment = 0

if(shrapnel_direction)
initial_angle = dir2angle(shrapnel_direction) - shrapnel_spread
angle_increment = shrapnel_spread*2/shrapnel_number
Expand Down
Loading