Skip to content

Commit

Permalink
explosion adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
uuuuhuuuu committed Nov 25, 2024
1 parent 242b93f commit 69126ad
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 11 deletions.
1 change: 1 addition & 0 deletions code/__DEFINES/mode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
#define MODE_NO_INTERNAL_BLEEDING (1<<14) // Toggles all internal bleeding behavior to cause normal bleeding instead
#define MODE_LZ_HAZARD_ACTIVATED (1<<15) // Distress Signal: Spawns miasma 3 minutes after round start
#define MODE_MORTAR_LASER_WARNING (1<<16) // Blinking laser before mortar impact
#define MODE_WEAKER_EXPLOSIONS (1<<17) // Reduces effects explosions have on humans


#define ROUNDSTATUS_FOG_DOWN 1
Expand Down
2 changes: 1 addition & 1 deletion code/game/gamemodes/extended/cm_vs_upp.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "Faction Clash UPP CM"
config_tag = "Faction Clash UPP CM"
flags_round_type = MODE_THUNDERSTORM|MODE_FACTION_CLASH
toggleable_flags = MODE_NO_SNIPER_SENTRY|MODE_NO_ATTACK_DEAD|MODE_NO_STRIPDRAG_ENEMY|MODE_STRONG_DEFIBS|MODE_BLOOD_OPTIMIZATION|MODE_NO_COMBAT_CAS|MODE_INDESTRUCTIBLE_SPLINTS|MODE_NO_INTERNAL_BLEEDING|MODE_MORTAR_LASER_WARNING
toggleable_flags = MODE_NO_SNIPER_SENTRY|MODE_NO_ATTACK_DEAD|MODE_NO_STRIPDRAG_ENEMY|MODE_STRONG_DEFIBS|MODE_BLOOD_OPTIMIZATION|MODE_NO_COMBAT_CAS|MODE_INDESTRUCTIBLE_SPLINTS|MODE_NO_INTERNAL_BLEEDING|MODE_MORTAR_LASER_WARNING|MODE_WEAKER_EXPLOSIONS
taskbar_icon = 'icons/taskbar/gml_hvh.png'

/datum/game_mode/extended/faction_clash/cm_vs_upp/get_roles_list()
Expand Down
30 changes: 20 additions & 10 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_TOGGLEABLE_FLAG(MODE_WEAKER_EXPLOSIONS)) //explosions slow down but way less stun
var/knockdown_minus_armor = min(max(knockdown_value * bomb_armor_mult - 2 SECONDS, 0), 1 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 Expand Up @@ -1767,7 +1777,7 @@

/// generates realistic-ish pulse output based on preset levels.
/// method == GETPULSE_HAND is for hands, GETPULSE_TOOL is for machines, more accurate
/mob/living/carbon/human/proc/get_pulse(method)
/mob/living/carbon/human/proc/get_pulse(method)
var/temp = 0 //see setup.dm:694

if(species && species.flags & NO_BLOOD)
Expand Down

0 comments on commit 69126ad

Please sign in to comment.