Skip to content

Commit

Permalink
TGS Test Merge (#6667)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevinz authored and Kevinz committed Aug 23, 2024
2 parents b3016ec + bb8204d commit fdcbc28
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
3 changes: 3 additions & 0 deletions code/modules/mob/living/carbon/human/human_defense.dm
Original file line number Diff line number Diff line change
Expand Up @@ -372,10 +372,13 @@ meteor_act
zone = ran_zone(BP_TORSO,75) //Hits a random part of the body, geared towards the chest

//check if we hit
/*
var/miss_chance = 15
var/distance = get_dist(TT.initial_turf, loc)
miss_chance = max(5 * (distance - 2), 0)
zone = get_zone_with_miss_chance(zone, src, miss_chance, ranged_attack=1)
*/
//Removes baymiss.

if(zone && TT.thrower != src)
var/shield_check = check_shields(throw_damage, O, TT.thrower, zone, "[O]")
Expand Down
4 changes: 2 additions & 2 deletions code/modules/mob/living/defense.dm
Original file line number Diff line number Diff line change
Expand Up @@ -276,13 +276,13 @@
var/dtype = O.damtype
var/throw_damage = O.throw_force * TT.get_damage_multiplier(src)

var/miss_chance = 15
/*var/miss_chance = 15
var/distance = get_dist(TT.initial_turf, loc)
miss_chance = max(5 * (distance - 2), 0)
if (prob(miss_chance))
visible_message("<font color=#4F49AF>\The [O] misses [src] narrowly!</font>")
return COMPONENT_THROW_HIT_PIERCE | COMPONENT_THROW_HIT_NEVERMIND
return COMPONENT_THROW_HIT_PIERCE | COMPONENT_THROW_HIT_NEVERMIND */ //Removes baymiss

src.visible_message("<font color='red'>[src] has been hit by [O].</font>")
var/armor = run_armor_check(null, "melee")
Expand Down
8 changes: 5 additions & 3 deletions code/modules/mob/mob_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,12 @@
miss_chance = base_miss_chance[zone]
if (zone == "eyes" || zone == "mouth")
miss_chance = base_miss_chance["head"]
miss_chance = max(miss_chance + miss_chance_mod, 0)
//miss_chance = max(miss_chance + miss_chance_mod, 0) --Removes baymiss--
if(prob(miss_chance_mod)) //this is here in case I missed any baymiss removal fringe cases or if anyone makes uses of the evasion stat e.g. in mobs otherwise removal very similar to other bay adapted servers
return null
if(prob(miss_chance))
if(prob(70))
return null
//if(prob(70))
// return null --Baymiss removal--
return pick(base_miss_chance)
return zone

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 @@ -551,7 +551,7 @@
return

//roll to-hit
miss_modifier = max(15*(distance-2) - accuracy + miss_modifier + target_mob.get_evasion(), 0)
miss_modifier = max(miss_modifier + target_mob.get_evasion(), -100) //Altered to remove baymiss components, hopefully this doesnt break anything with the fifty or so gun refactors we got -Irkalla
var/hit_zone = get_zone_with_miss_chance(def_zone, target_mob, miss_modifier, ranged_attack=(distance > 1 || original != target_mob)) //if the projectile hits a target we weren't originally aiming at then retain the chance to miss

var/result = PROJECTILE_FORCE_MISS
Expand Down

0 comments on commit fdcbc28

Please sign in to comment.