Skip to content

Commit

Permalink
Temporary Starting Commit
Browse files Browse the repository at this point in the history
Changes "damage_coeff =" to "ChangeResistances("
  • Loading branch information
LanceSmites328 committed Sep 3, 2023
1 parent b30a01b commit a2a3329
Show file tree
Hide file tree
Showing 30 changed files with 301 additions and 134 deletions.
4 changes: 2 additions & 2 deletions ModularTegustation/tegu_mobs/chaos_marine.dm
Original file line number Diff line number Diff line change
Expand Up @@ -394,12 +394,12 @@
playsound(src, 'sound/magic/clockwork/narsie_attack.ogg', 200, TRUE)

/mob/living/simple_animal/hostile/megafauna/chaos_marine/proc/cmempower()
damage_coeff = list(BRUTE = 1, RED_DAMAGE = 0.25, WHITE_DAMAGE = 2, BLACK_DAMAGE = 0.5, PALE_DAMAGE = 0.1)
ChangeResistances(list(RED_DAMAGE = 0.25, WHITE_DAMAGE = 2, BLACK_DAMAGE = 0.5, PALE_DAMAGE = 0.1))
add_atom_colour(newcolor, TEMPORARY_COLOUR_PRIORITY)
new /obj/effect/temp_visual/cult/sparks(get_turf(src))

/mob/living/simple_animal/hostile/megafauna/chaos_marine/proc/cmdepower()
damage_coeff = list(BRUTE = 1, RED_DAMAGE = 0.5, WHITE_DAMAGE = 0, BLACK_DAMAGE = 1, PALE_DAMAGE = 0.2)
ChangeResistances(list(RED_DAMAGE = 0.5, WHITE_DAMAGE = 0, BLACK_DAMAGE = 1, PALE_DAMAGE = 0.2))
remove_atom_colour(TEMPORARY_COLOUR_PRIORITY, newcolor)
new /obj/effect/temp_visual/cult/sparks(get_turf(src))

Expand Down
2 changes: 1 addition & 1 deletion code/controllers/subsystem/lobotomy_events.dm
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ SUBSYSTEM_DEF(lobotomy_events)
A.density = FALSE // They ignore you and walk past you.
A.AIStatus = AI_OFF
A.can_patrol = FALSE
A.damage_coeff = list(BRUTE = 0, RED_DAMAGE = 0, WHITE_DAMAGE = 0, BLACK_DAMAGE = 0, PALE_DAMAGE = 0) // You can kill the portal but not them.
A.ChangeResistances(list(BRUTE = 0, RED_DAMAGE = 0, WHITE_DAMAGE = 0, BLACK_DAMAGE = 0, PALE_DAMAGE = 0)) // You can kill the portal but not them.
AB_types = list() // So the event can't run again.
return
if(YINYANG)
Expand Down
24 changes: 11 additions & 13 deletions code/datums/status_effects/buffs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -513,33 +513,31 @@

//LC13 AI entity Buffs
//Buff Maroon Ordeal Soldiers, Feel free to cannibalize and rework to work for other creatures.

/datum/status_effect/all_armor_buff //due to multiplication the effect works more on entities that are weak to the damage value.
id = "all armor armor"
status_type = STATUS_EFFECT_UNIQUE
duration = 120 //6 seconds
duration = 120 //12 seconds
alert_type = null
var/visual

/datum/status_effect/all_armor_buff/on_apply()
. = ..()
if(!isanimal(owner))
qdel(src)
return
visual = mutable_appearance('ModularTegustation/Teguicons/tegu_effects.dmi', "manager_shield")
if(isanimal(owner))
var/mob/living/simple_animal/M = owner
M.add_overlay(visual)
M.damage_coeff[RED_DAMAGE] *= 0.8 //20% damage decrease
M.damage_coeff[WHITE_DAMAGE] *= 0.8
M.damage_coeff[BLACK_DAMAGE] *= 0.8
M.damage_coeff[PALE_DAMAGE] *= 0.8
var/mob/living/simple_animal/M = owner
M.add_overlay(visual)
M.AddModifier(/datum/dc_change/maroon_buff)

/datum/status_effect/all_armor_buff/on_remove()
. = ..()
if(isanimal(owner))
var/mob/living/simple_animal/M = owner
M.damage_coeff[RED_DAMAGE] /= 0.8
M.damage_coeff[WHITE_DAMAGE] /= 0.8
M.damage_coeff[BLACK_DAMAGE] /= 0.8
M.damage_coeff[PALE_DAMAGE] /= 0.8
owner.cut_overlay(visual)
M.RemoveModifier(/datum/dc_change/maroon_buff)
if(visual)
owner.cut_overlay(visual)


/datum/status_effect/minor_damage_buff
Expand Down
45 changes: 29 additions & 16 deletions code/datums/status_effects/debuffs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1012,28 +1012,33 @@
owner.cut_overlay(statuseffectvisual)
return ..()

/datum/status_effect/sunder_red
id = "sunder red armor"
//update_stamina() is move_to_delay = (initial(move_to_delay) + (staminaloss * 0.06))
// 100 stamina damage equals 6 additional move_to_delay. So 167*0.06 = 10.02

/datum/status_effect/rend_red
id = "rend red armor"
status_type = STATUS_EFFECT_UNIQUE
duration = 60 //3 seconds
duration = 60 //6 seconds
alert_type = null

/datum/status_effect/sunder_red/on_apply()
/datum/status_effect/rend_red/on_apply()
. = ..()
if(isanimal(owner))
var/mob/living/simple_animal/M = owner
M.damage_coeff[RED_DAMAGE] *= 1.2
if(!isanimal(owner))
qdel(src)
return
var/mob/living/simple_animal/M = owner
M.AddModifier(/datum/dc_change/rend/red)
//20% damage increase. Hitting any abnormality that has a negative value will cause this
//to be a buff to their healing.

/datum/status_effect/sunder_red/on_remove()
/datum/status_effect/rend_red/on_remove()
. = ..()
if(isanimal(owner))
var/mob/living/simple_animal/M = owner
M.damage_coeff[RED_DAMAGE] /= 1.2
M.RemoveModifier(/datum/dc_change/rend/red)

//White Damage Debuff

//White Damage Debuff
/datum/status_effect/rend_white
id = "rend white armor"
status_type = STATUS_EFFECT_UNIQUE
Expand All @@ -1042,13 +1047,17 @@

/datum/status_effect/rend_white/on_apply()
. = ..()
if(!isanimal(owner))
qdel(src)
return
var/mob/living/simple_animal/M = owner
M.damage_coeff[WHITE_DAMAGE] *= 1.2
M.AddModifier(/datum/dc_change/rend/white)

/datum/status_effect/rend_white/on_remove()
. = ..()
var/mob/living/simple_animal/M = owner
M.damage_coeff[WHITE_DAMAGE] /= 1.2
if(isanimal(owner))
var/mob/living/simple_animal/M = owner
M.RemoveModifier(/datum/dc_change/rend/white)

//Black Damage Debuff

Expand All @@ -1060,12 +1069,16 @@

/datum/status_effect/rend_black/on_apply()
. = ..()
if(!isanimal(owner))
qdel(src)
return
var/mob/living/simple_animal/M = owner
M.damage_coeff[BLACK_DAMAGE] *= 1.2
M.AddModifier(/datum/dc_change/rend/black)

/datum/status_effect/rend_black/on_remove()
. = ..()
var/mob/living/simple_animal/M = owner
M.damage_coeff[BLACK_DAMAGE] /= 1.2
if(isanimal(owner))
var/mob/living/simple_animal/M = owner
M.RemoveModifier(/datum/dc_change/rend/black)

#undef CARBON_HALFSPEED
22 changes: 3 additions & 19 deletions code/game/objects/items/ego_weapons/non_abnormality/wcorp.dm
Original file line number Diff line number Diff line change
Expand Up @@ -223,26 +223,10 @@
to_chat(user, "<span class='notice'>[release_message].</span>")
sleep(5)
target.apply_damage(force*2, damtype, null, target.run_armor_check(null, damtype), spread_damage = TRUE)
target.apply_status_effect(/datum/status_effect/rendBlackArmor)
target.apply_status_effect(/datum/status_effect/rend_black/w_corp)
playsound(src, 'sound/abnormalities/thunderbird/tbird_bolt.ogg', 50, TRUE)
var/turf/T = get_turf(target)
new /obj/effect/temp_visual/justitia_effect(T)

/datum/status_effect/rendBlackArmor
id = "rend Black armor"
status_type = STATUS_EFFECT_UNIQUE
duration = 50 //5 seconds since it's melee-ish
alert_type = null

/datum/status_effect/rendBlackArmor/on_apply()
. = ..()
if(isanimal(owner))
var/mob/living/simple_animal/M = owner
M.damage_coeff[BLACK_DAMAGE] *= 1.2

/datum/status_effect/rendBlackArmor/on_remove()
. = ..()
if(isanimal(owner))
var/mob/living/simple_animal/M = owner
M.damage_coeff[BLACK_DAMAGE] /= 1.2

/datum/status_effect/rend_black/w_corp // Duplicate of "rend_black", giving it a unique id so it can stack.
id = "w-corp rend black armor"
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
return
can_act = FALSE
forceMove(get_turf(H))
damage_coeff = list(BRUTE = 1, RED_DAMAGE = 0, WHITE_DAMAGE = 0, BLACK_DAMAGE = 0, PALE_DAMAGE = 0)
ChangeResistances(list(RED_DAMAGE = 0, WHITE_DAMAGE = 0, BLACK_DAMAGE = 0, PALE_DAMAGE = 0))
playsound(src, 'sound/abnormalities/censored/convert.ogg', 45, FALSE, 5)
SLEEP_CHECK_DEATH(3)
new /obj/effect/temp_visual/censored(get_turf(src))
Expand All @@ -104,7 +104,7 @@
if(!QDELETED(H))
C.desc = "What the hell is this? It shouldn't exist... On the second thought, it reminds you of [H.real_name]..."
H.gib()
damage_coeff = list(BRUTE = 1, RED_DAMAGE = 0.6, WHITE_DAMAGE = 0.8, BLACK_DAMAGE = 0.4, PALE_DAMAGE = 1)
ChangeResistances(list(RED_DAMAGE = 0.6, WHITE_DAMAGE = 0.8, BLACK_DAMAGE = 0.4, PALE_DAMAGE = 1))
adjustBruteLoss(-(maxHealth*0.1))
can_act = TRUE

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@
switch(current_stage)
if(1)
icon_state = "nothing_egg"
damage_coeff = list(BRUTE = 1, RED_DAMAGE = 0, WHITE_DAMAGE = 0.6, BLACK_DAMAGE = 0.6, PALE_DAMAGE = 1)
ChangeResistances(list(RED_DAMAGE = 0, WHITE_DAMAGE = 0.6, BLACK_DAMAGE = 0.6, PALE_DAMAGE = 1))
can_act = FALSE
next_transform = world.time + rand(10 SECONDS, 25 SECONDS)
heartbeat.start()
Expand All @@ -287,7 +287,7 @@
icon_state = icon_living
pixel_x = -16
base_pixel_x = -16
damage_coeff = list(BRUTE = 1, RED_DAMAGE = 0, WHITE_DAMAGE = 0.4, BLACK_DAMAGE = 0.4, PALE_DAMAGE = 0.8)
ChangeResistances(list(WHITE_DAMAGE = 0.4, BLACK_DAMAGE = 0.4, PALE_DAMAGE = 0.8))
can_act = TRUE
melee_damage_lower = 65
melee_damage_upper = 75
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,26 +81,26 @@
next_movement_time = world.time + 4 SECONDS
if(1)
next_movement_time = world.time + 22 SECONDS
damage_coeff = list(BRUTE = 1, RED_DAMAGE = 0, WHITE_DAMAGE = 0, BLACK_DAMAGE = 0, PALE_DAMAGE = 1)
ChangeResistances(list(PALE_DAMAGE = 1))
spawn_performer(1, WEST)
if(2)
next_movement_time = world.time + 14.5 SECONDS
damage_coeff = list(BRUTE = 1, RED_DAMAGE = 0, WHITE_DAMAGE = 0, BLACK_DAMAGE = 1, PALE_DAMAGE = 0)
ChangeResistances(list(BLACK_DAMAGE = 1, PALE_DAMAGE = 0))
spawn_performer(2, WEST)
if(3)
next_movement_time = world.time + 11.5 SECONDS
damage_coeff = list(BRUTE = 1, RED_DAMAGE = 0, WHITE_DAMAGE = 1, BLACK_DAMAGE = 0, PALE_DAMAGE = 0)
ChangeResistances(list(WHITE_DAMAGE = 1, BLACK_DAMAGE = 0))
symphony_damage = 18
movement_volume = 3 // No more tinnitus
spawn_performer(1, EAST)
if(4)
next_movement_time = world.time + 23 SECONDS
damage_coeff = list(BRUTE = 1, RED_DAMAGE = 1, WHITE_DAMAGE = 0, BLACK_DAMAGE = 0, PALE_DAMAGE = 0)
ChangeResistances(list(RED_DAMAGE = 1, WHITE_DAMAGE = 0))
symphony_damage = 12
spawn_performer(2, EAST)
if(5)
next_movement_time = world.time + 999 SECONDS // Never
damage_coeff = list(BRUTE = 1, RED_DAMAGE = 0, WHITE_DAMAGE = 0, BLACK_DAMAGE = 0, PALE_DAMAGE = 0)
ChangeResistances(list(RED_DAMAGE = 0))
movement_volume = 65 // TA-DA!!!
if(current_movement_num < 6)
sound_to_playing_players_on_level("sound/abnormalities/silentorchestra/movement[current_movement_num].ogg", movement_volume, zlevel = z)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,10 @@

if(currentlaw == "fairies")
for(var/mob/living/simple_animal/L in spawned_mobs)
L.damage_coeff = list(BRUTE = 1, RED_DAMAGE = 0.2, WHITE_DAMAGE = 0.2, BLACK_DAMAGE = 0.2, PALE_DAMAGE = 1)
L.ChangeResistances(list(RED_DAMAGE = 0.2, WHITE_DAMAGE = 0.2, BLACK_DAMAGE = 0.2, PALE_DAMAGE = 1))
else
for(var/mob/living/simple_animal/L in spawned_mobs)
L.damage_coeff = list(BRUTE = 1, RED_DAMAGE = 1, WHITE_DAMAGE = 1, BLACK_DAMAGE = 1, PALE_DAMAGE = 1)
L.ChangeResistances(list(RED_DAMAGE = 1, WHITE_DAMAGE = 1, BLACK_DAMAGE = 1, PALE_DAMAGE = 1))


/mob/living/simple_animal/hostile/abnormality/titania/proc/Punishment(mob/living/sinner)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -305,10 +305,7 @@
adjustBruteLoss(100)
pulse_damage -= 1
playsound(get_turf(src),'sound/abnormalities/doomsdaycalendar/Limbus_Dead_Generic.ogg', 50, 1)
for(var/damtype in src.damage_coeff)
if(damtype == BRUTE)
continue
damage_coeff[damtype] += 0.1
AddModifier(/datum/dc_change/sacrified)

//***Simple Mobs***//
//clay dolls
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@
attack_verb_continuous = "pummels"
attack_verb_simple = "pummel"
move_to_delay = 3
damage_coeff = list(BRUTE = 1, RED_DAMAGE = 1.5, WHITE_DAMAGE = 1.5, BLACK_DAMAGE = 1, PALE_DAMAGE = 0.5)
ChangeResistances(list(RED_DAMAGE = 1.5, WHITE_DAMAGE = 1.5, BLACK_DAMAGE = 1, PALE_DAMAGE = 0.5))
melee_damage_type = BLACK_DAMAGE
fear_level = WAW_LEVEL
revive(full_heal = TRUE, admin_revive = FALSE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
pixel_y = -16
base_pixel_y = -16
if(!isnull(crown?.loved))
damage_coeff = list(BRUTE = 1, RED_DAMAGE = 0.3, WHITE_DAMAGE = 0.3, BLACK_DAMAGE = 0.3, PALE_DAMAGE = 0.3) //others can still help but it's going to take a lot of damage
ChangeResistances(list(RED_DAMAGE = 0.3, WHITE_DAMAGE = 0.3, BLACK_DAMAGE = 0.3, PALE_DAMAGE = 0.3)) //others can still help but it's going to take a lot of damage
love_target = crown.loved
qdel(crown)
love_target.add_or_update_variable_movespeed_modifier(/datum/movespeed_modifier/unrequited_slowdown)
Expand Down Expand Up @@ -137,7 +137,7 @@

if(love_target.stat == DEAD)
say("[love_target.name]? Are you okay? I'm sorry, is it my fault? Will you come back if I love you enough? Will you love me back in death at least?")
damage_coeff = list(BRUTE = 1, RED_DAMAGE = 1.5, WHITE_DAMAGE = 1.5, BLACK_DAMAGE = 0.5, PALE_DAMAGE = 2) //back to being a pushover
ChangeResistances(list(RED_DAMAGE = 1.5, WHITE_DAMAGE = 1.5, BLACK_DAMAGE = 0.5, PALE_DAMAGE = 2)) //back to being a pushover
love_target = null
return
//Not having a cooldown on the oxyloss sounds bad, but people's breathing is dictated by Life(), so it's actually the perfect pace of oxyloss
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@
if(courage)
melee_damage_lower = 15
melee_damage_upper = 20
damage_coeff = list(BRUTE = 1, RED_DAMAGE = 0.5, WHITE_DAMAGE = 2, BLACK_DAMAGE = 1.5, PALE_DAMAGE = 0.5)
ChangeResistances(list(RED_DAMAGE = 0.5, WHITE_DAMAGE = 2, BLACK_DAMAGE = 1.5, PALE_DAMAGE = 0.5))
icon = 'ModularTegustation/Teguicons/48x48.dmi'
icon_living = "cat_courage"
icon_dead = "dead_courage"
Expand All @@ -181,7 +181,7 @@
faction = list("neutral")
melee_damage_lower = initial(melee_damage_lower)
melee_damage_upper = initial(melee_damage_upper) //it shouldn't attack in that form in the first place but...
damage_coeff = list(BRUTE = 1, RED_DAMAGE = 4, WHITE_DAMAGE = 4, BLACK_DAMAGE = 4, PALE_DAMAGE = 4)
ChangeResistances(list(RED_DAMAGE = 4, WHITE_DAMAGE = 4, BLACK_DAMAGE = 4, PALE_DAMAGE = 4))
playsound(src, 'sound/abnormalities/scaredycat/catchange.ogg', 75, FALSE, 4)
icon = 'ModularTegustation/Teguicons/32x32.dmi'
icon_living = "scaredy_cat"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
solo_punish = TRUE
if(living_players == 1)
seen = TRUE
damage_coeff = list(BRUTE = 1, RED_DAMAGE = 1.2, WHITE_DAMAGE = 0.5, BLACK_DAMAGE = 1.0, PALE_DAMAGE = 1.5)
ChangeResistances(list(RED_DAMAGE = 1.2, WHITE_DAMAGE = 0.5, BLACK_DAMAGE = 1.0, PALE_DAMAGE = 1.5))
return
solo_punish = FALSE //Reset to normal if the amount of living players on your z-level is something other than 1, to allow normal behavior.

Expand All @@ -70,10 +70,10 @@
datum_reference.qliphoth_change(-1)
if(people_watching == 1)
seen = FALSE
damage_coeff = list(BRUTE = 1, RED_DAMAGE = 0.6, WHITE_DAMAGE = 0.2, BLACK_DAMAGE = 0.5, PALE_DAMAGE = 0.7)
ChangeResistances(list(RED_DAMAGE = 0.6, WHITE_DAMAGE = 0.2, BLACK_DAMAGE = 0.5, PALE_DAMAGE = 0.7))
else //any amount of people that's not 1.
seen = TRUE
damage_coeff = list(BRUTE = 1, RED_DAMAGE = 1.2, WHITE_DAMAGE = 0.5, BLACK_DAMAGE = 1.0, PALE_DAMAGE = 1.5)
ChangeResistances(list(RED_DAMAGE = 1.2, WHITE_DAMAGE = 0.5, BLACK_DAMAGE = 1.0, PALE_DAMAGE = 1.5))

//Stuff that needs sight check
/mob/living/simple_animal/hostile/abnormality/schadenfreude/Move()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
obj_damage = 2500
environment_smash = ENVIRONMENT_SMASH_STRUCTURES
stat_attack = DEAD
damage_coeff = list(BRUTE = 1, RED_DAMAGE = 0.5, WHITE_DAMAGE = 0.5, BLACK_DAMAGE = 0.5, PALE_DAMAGE = 0.5)
ChangeResistances(list(RED_DAMAGE = 0.5, WHITE_DAMAGE = 0.5, BLACK_DAMAGE = 0.5, PALE_DAMAGE = 0.5))
bird_angry = TRUE
update_icon()

Expand All @@ -114,7 +114,7 @@
environment_smash = initial(environment_smash)
stat_attack = initial(stat_attack)
adjustHealth(-maxHealth) // Full restoration
damage_coeff = list(BRUTE = 1, RED_DAMAGE = 2, WHITE_DAMAGE = 2, BLACK_DAMAGE = 2, PALE_DAMAGE = 2)
ChangeResistances(list(RED_DAMAGE = 2, WHITE_DAMAGE = 2, BLACK_DAMAGE = 2, PALE_DAMAGE = 2))
bird_angry = FALSE
update_icon()

Expand Down
Loading

0 comments on commit a2a3329

Please sign in to comment.