Merge remote-tracking branch 'citadel/master' into combat_rework

This commit is contained in:
kevinz000
2020-06-02 21:49:43 -07:00
120 changed files with 247477 additions and 1758 deletions
@@ -189,6 +189,26 @@
name = "Coffee House"
icon_state = "hair_coffeehouse"
/datum/sprite_accessory/hair/cornrows1
name = "Cornrows"
icon_state = "hair_cornrows"
/datum/sprite_accessory/hair/cornrows2
name = "Cornrows 2"
icon_state = "hair_cornrows2"
/datum/sprite_accessory/hair/cornrowbun
name = "Cornrow Bun"
icon_state = "hair_cornrowbun"
/datum/sprite_accessory/hair/cornrowbraid
name = "Cornrow Braid"
icon_state = "hair_cornrowbraid"
/datum/sprite_accessory/hair/cornrowdualtail
name = "Cornrow Tail"
icon_state = "hair_cornrowtail"
/datum/sprite_accessory/hair/country
name = "Country"
icon_state = "hair_country"
@@ -280,25 +280,15 @@
. = ..()
C.faction |= "plants"
C.faction |= "vines"
C.AddElement(/datum/element/photosynthesis)
/datum/species/golem/wood/on_species_loss(mob/living/carbon/C)
. = ..()
C.faction -= "plants"
C.faction -= "vines"
C.RemoveElement(/datum/element/photosynthesis)
/datum/species/golem/wood/spec_life(mob/living/carbon/human/H)
if(H.stat == DEAD)
return
var/light_amount = 0 //how much light there is in the place, affects receiving nutrition and healing
if(isturf(H.loc)) //else, there's considered to be no light
var/turf/T = H.loc
light_amount = min(1,T.get_lumcount()) - 0.5
H.adjust_nutrition(light_amount * 4, NUTRITION_LEVEL_FULL)
if(light_amount > 0.2) //if there's enough light, heal
H.heal_overall_damage(1,1)
H.adjustToxLoss(-1)
H.adjustOxyLoss(-1)
if(H.nutrition < NUTRITION_LEVEL_STARVING + 50)
H.take_overall_damage(2,0)
@@ -14,34 +14,24 @@
liked_food = VEGETABLES | FRUIT | GRAIN
species_language_holder = /datum/language_holder/sylvan
var/light_nutrition_gain_factor = 4
var/light_toxheal = 1
var/light_oxyheal = 1
var/light_burnheal = 1
var/light_bruteheal = 1
var/light_toxheal = -1
var/light_oxyheal = -1
var/light_burnheal = -1
var/light_bruteheal = -1
/datum/species/pod/on_species_gain(mob/living/carbon/C, datum/species/old_species)
. = ..()
C.faction |= "plants"
C.faction |= "vines"
C.AddElement(/datum/element/photosynthesis, light_bruteheal, light_burnheal, light_toxheal, light_oxyheal, light_nutrition_gain_factor)
/datum/species/pod/on_species_loss(mob/living/carbon/C)
. = ..()
C.faction -= "plants"
C.faction -= "vines"
C.RemoveElement(/datum/element/photosynthesis, light_bruteheal, light_burnheal, light_toxheal, light_oxyheal, light_nutrition_gain_factor)
/datum/species/pod/spec_life(mob/living/carbon/human/H)
if(H.stat == DEAD)
return
var/light_amount = 0 //how much light there is in the place, affects receiving nutrition and healing
if(isturf(H.loc)) //else, there's considered to be no light
var/turf/T = H.loc
light_amount = min(1,T.get_lumcount()) - 0.5
H.adjust_nutrition(light_amount * light_nutrition_gain_factor, NUTRITION_LEVEL_FULL)
if(light_amount > 0.2) //if there's enough light, heal
H.heal_overall_damage(light_bruteheal, light_burnheal)
H.adjustToxLoss(-light_toxheal)
H.adjustOxyLoss(-light_oxyheal)
if(H.nutrition < NUTRITION_LEVEL_STARVING + 50)
H.take_overall_damage(2,0)
@@ -77,9 +67,9 @@
mutant_bodyparts = list("mcolor" = "FFF","mcolor2" = "FFF","mcolor3" = "FFF", "mam_snouts" = "Husky", "mam_tail" = "Husky", "mam_ears" = "Husky", "mam_body_markings" = "Husky", "taur" = "None", "legs" = "Normal Legs")
limbs_id = "pod"
light_nutrition_gain_factor = 3
light_bruteheal = 0.2
light_burnheal = 0.2
light_toxheal = 0.7
light_bruteheal = -0.2
light_burnheal = -0.2
light_toxheal = -0.7
/datum/species/pod/pseudo_weak/spec_death(gibbed, mob/living/carbon/human/H)
if(H)
@@ -15,16 +15,13 @@
dangerous_existence = 1
mutanteyes = /obj/item/organ/eyes/night_vision
/datum/species/shadow/on_species_gain(mob/living/carbon/C, datum/species/old_species)
. = ..()
C.AddElement(/datum/element/photosynthesis, 1, 1, 0, 0, 0, 0, SHADOW_SPECIES_LIGHT_THRESHOLD, SHADOW_SPECIES_LIGHT_THRESHOLD)
/datum/species/shadow/spec_life(mob/living/carbon/human/H)
var/turf/T = H.loc
if(istype(T))
var/light_amount = T.get_lumcount()
if(light_amount > SHADOW_SPECIES_LIGHT_THRESHOLD) //if there's enough light, start dying
H.take_overall_damage(1,1)
else if (light_amount < SHADOW_SPECIES_LIGHT_THRESHOLD) //heal in the dark
H.heal_overall_damage(1,1)
/datum/species/shadow/on_species_loss(mob/living/carbon/C)
. = ..()
C.RemoveElement(/datum/element/photosynthesis, 1, 1, 0, 0, 0, 0, SHADOW_SPECIES_LIGHT_THRESHOLD, SHADOW_SPECIES_LIGHT_THRESHOLD)
/datum/species/shadow/check_roundstart_eligible()
if(SSevents.holidays && SSevents.holidays[HALLOWEEN])
@@ -8,6 +8,8 @@
typing_indicator_enabled = TRUE
var/last_click_move = 0 // Stores the previous next_move value.
var/resize = 1 //Badminnery resize
var/lastattacker = null
var/lastattackerckey = null
@@ -2,15 +2,16 @@
name = "A Perfectly Generic Boss Placeholder"
desc = ""
threat = 10
robust_searching = 1
robust_searching = TRUE
stat_attack = UNCONSCIOUS
status_flags = 0
status_flags = NONE
a_intent = INTENT_HARM
gender = NEUTER
has_field_of_vision = FALSE //You are a frikkin boss
var/list/boss_abilities = list() //list of /datum/action/boss
var/datum/boss_active_timed_battle/atb
var/point_regen_delay = 1
var/point_regen_delay = 20
var/point_regen_amount = 1
/mob/living/simple_animal/hostile/boss/Initialize()
@@ -18,6 +19,7 @@
atb = new()
atb.point_regen_delay = point_regen_delay
atb.point_regen_amount = point_regen_amount
atb.boss = src
for(var/ab in boss_abilities)
@@ -40,6 +42,7 @@
required_mobility_flags = NONE
var/boss_cost = 100 //Cost of usage for the boss' AI 1-100
var/usage_probability = 100
var/list/req_statuses //If set, will only trigger if the mob AI status is present in this list.
var/mob/living/simple_animal/hostile/boss/boss
var/boss_type = /mob/living/simple_animal/hostile/boss
var/needs_target = TRUE //Does the boss need to have a target? (Only matters for the AI)
@@ -57,7 +60,7 @@
. = ..()
boss = null
/datum/action/boss/Trigger()
/datum/action/boss/IsAvailable(silent = FALSE)
. = ..()
if(!.)
return
@@ -69,6 +72,11 @@
return FALSE
if(!boss.client && needs_target && !boss.target)
return FALSE
/datum/action/boss/Trigger()
. = ..()
if(!.)
return
if(!boss.atb.spend(boss_cost))
return FALSE
if(say_when_triggered)
@@ -85,7 +93,8 @@
//Designed for boss mobs only
/datum/boss_active_timed_battle
var/list/abilities //a list of /datum/action/boss owned by a boss mob
var/point_regen_delay = 5
var/point_regen_delay = 20
var/point_regen_amount = 1
var/max_points = 100
var/points = 50 //start with 50 so we can use some abilities but not insta-buttfug somebody
var/next_point_time = 0
@@ -93,48 +102,45 @@
var/highest_cost = 0
var/mob/living/simple_animal/hostile/boss/boss
/datum/boss_active_timed_battle/New()
..()
START_PROCESSING(SSobj, src)
/datum/boss_active_timed_battle/proc/assign_abilities(list/L)
if(!L)
return 0
return FALSE
abilities = L
for(var/ab in abilities)
var/datum/action/boss/AB = ab
if(AB.boss_cost > highest_cost)
highest_cost = AB.boss_cost
/datum/boss_active_timed_battle/proc/spend(cost)
if(cost <= points)
points = max(0,points-cost)
points -= cost
return TRUE
return FALSE
/datum/boss_active_timed_battle/proc/refund(cost)
points = min(points+cost, max_points)
/datum/boss_active_timed_battle/process()
if(world.time >= next_point_time && points < max_points)
next_point_time = world.time + point_regen_delay
points = min(max_points, ++points) //has to be out of 100
points = min(max_points, points + point_regen_amount)
if(abilities)
chance_to_hold_onto_points = highest_cost*0.5
if(points != max_points && prob(chance_to_hold_onto_points))
return //Let's save our points for a better ability (unless we're at max points, in which case we can't save anymore!)
if(!boss.client)
abilities = shuffle(abilities)
for(var/ab in abilities)
var/datum/action/boss/AB = ab
if(prob(AB.usage_probability) && AB.Trigger())
break
if(!abilities)
return
chance_to_hold_onto_points = highest_cost*0.5
if(points != max_points && prob(chance_to_hold_onto_points))
return //Let's save our points for a better ability (unless we're at max points, in which case we can't save anymore!)
if(!boss.client)
abilities = shuffle(abilities)
for(var/ab in abilities)
var/datum/action/boss/AB = ab
if(!boss.client && (!AB.req_statuses || (boss.AIStatus in AB.req_statuses)) && prob(AB.usage_probability) && AB.Trigger())
break
AB.UpdateButtonIcon(TRUE)
/datum/boss_active_timed_battle/Destroy()
@@ -36,6 +36,7 @@
boss_cost = 30
boss_type = /mob/living/simple_animal/hostile/boss/paper_wizard
needs_target = FALSE
req_statuses = list(AI_ON)
say_when_triggered = "Rise, my creations! Jump off your pages and into this realm!"
var/list/summoned_minions = list()
var/maximum_stickmen = 6
@@ -85,6 +86,7 @@
usage_probability = 30
boss_cost = 40
boss_type = /mob/living/simple_animal/hostile/boss/paper_wizard
req_statuses = list(AI_ON)
say_when_triggered = ""
/datum/action/boss/wizard_mimic/Trigger()
@@ -105,6 +105,7 @@ IGNORE_PROC_IF_NOT_TARGET(attack_slime)
/mob/living/simple_animal/hostile/asteroid/curseblob/attacked_by(obj/item/I, mob/living/L, attackchain_flags = NONE, damage_multiplier = 1)
if(L != set_target)
L.changeNext_move(I.click_delay) //pre_attacked_by not called
return
return ..()