Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suppression Rewards #181

Closed
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
blood_volume = BLOOD_VOLUME_NORMAL // THERE WILL BE BLOOD. SHED.
simple_mob_flags = SILENCE_RANGED_MESSAGE
can_patrol = TRUE
exp = FALSE // Manually set later
/// Can this abnormality spawn normally during the round?
var/can_spawn = TRUE
/// Reference to the datum we use
Expand Down Expand Up @@ -112,6 +113,34 @@
gift_chance = 1
else
gift_chance = 0
switch(threat_level) // Gives EXP = (max_level/20)-1. Reduced to discourage abnormality breach farming. At this level it is inefficient.
if(TETH_LEVEL)
max_level = 60
exp = 2
if(HE_LEVEL)
max_level = 80
exp = 3
if(WAW_LEVEL)
max_level = 100
exp = 4
if(ALEPH_LEVEL)
max_level = 130
exp = 5
else
max_level = 40
exp = 1
var/highest_rate = 0
for(var/work_rate in work_chances)
if(!(work_rate in work_attribute_types))
continue
var/rate = 0
if(islist(work_chances[work_rate]))
rate = work_chances[work_rate][threat_level]
else
rate = work_chances[work_rate]
if((rate > highest_rate) || (rate == highest_rate && prob(50)))
highest_rate = rate
exp_attribute = work_attribute_types[work_rate]
if(isnull(gift_message))
gift_message = "You are granted a gift by [src]!"
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,9 @@ GLOBAL_LIST_EMPTY(army)
del_on_death = FALSE
density = FALSE
is_flying_animal = TRUE
exp = 4
max_level = 130
exp_attribute = JUSTICE_ATTRIBUTE
var/list/fear_affected = list()
var/shot_cooldown
var/shot_cooldown_time = 5 SECONDS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,9 @@
stat_attack = HARD_CRIT
del_on_death = TRUE
density = FALSE
exp = 3
max_level = 130
exp_attribute = PRUDENCE_ATTRIBUTE
var/list/breach_affected = list()

/mob/living/simple_animal/hostile/mini_censored/Initialize()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,9 @@
rapid_melee = 2
speed = 2
move_to_delay = 2.5
exp = 3
max_level = 80
exp_attribute = TEMPERANCE_ATTRIBUTE
/* Sounds */
deathsound = 'sound/abnormalities/meltinglove/pawn_death.ogg'
attack_sound = 'sound/abnormalities/meltinglove/pawn_attack.ogg'
Expand Down Expand Up @@ -297,3 +300,6 @@
melee_damage_lower = 35
melee_damage_upper = 40
spawn_sound = 'sound/abnormalities/meltinglove/pawn_big_convert.ogg'
exp = 4
max_level = 100
exp_attribute = TEMPERANCE_ATTRIBUTE
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ GLOBAL_LIST_EMPTY(apostles)
mob_size = MOB_SIZE_HUGE
blood_volume = BLOOD_VOLUME_NORMAL
can_patrol = TRUE // You have legs, use them.
exp = FALSE
var/can_act = TRUE
var/death_counter = 0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,11 @@
melee_damage_type = RED_DAMAGE
speed = 1
move_to_delay = 3

max_level = 80
exp = 3
exp_attribute = FORTITUDE_ATTRIBUTE

var/steppy = 0

/mob/living/simple_animal/hostile/red_shoe/AttackingTarget()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,10 @@

del_on_death = FALSE

max_level = 80
exp = 3
exp_attribute = FORTITUDE_ATTRIBUTE

var/gear = 2
COOLDOWN_DECLARE(gear_shift)
var/gear_cooldown = 1 MINUTES
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@
attack_verb_simple = "slash"
attack_sound = 'sound/abnormalities/babayaga/attack.ogg'
speak_emote = list("whispers")
max_level = 60
exp_attribute = PRUDENCE_ATTRIBUTE

/obj/effect/temp_visual/giantwarning
name = "giant warning"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,9 @@
attack_verb_simple = "bite"
attack_sound = 'sound/weapons/bite.ogg'
speak_emote = list("buzzes")
exp = 1
max_level = 100
exp_attribute = JUSTICE_ATTRIBUTE

/* Artillery bees */
/mob/living/simple_animal/hostile/artillery_bee
Expand All @@ -197,6 +200,9 @@
del_on_death = TRUE
deathsound = 'sound/abnormalities/bee/death.ogg'
speak_emote = list("buzzes")
exp = 3
max_level = 100
exp_attribute = JUSTICE_ATTRIBUTE

var/fire_cooldown_time = 10 SECONDS
var/fire_cooldown
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@
ranged = 1
retreat_distance = 3
minimum_distance = 1
max_level = 80
exp = 2 // On one hand, agony. On the other, 2 dollar fortnite gift card.
exp_attribute = JUSTICE_ATTRIBUTE

/mob/living/simple_animal/hostile/runawaybird/AttackingTarget()
. = ..()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,9 @@
attack_sound = 'sound/abnormalities/littleprince/Prince_Attack.ogg'
deathmessage = "shakes violently."
can_patrol = TRUE
max_level = 100
exp = 3
exp_attribute = PRUDENCE_ATTRIBUTE

/mob/living/simple_animal/hostile/little_prince_1/Initialize()
. = ..()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@
del_on_death = 1
vision_range = 18 //two screens away
minbodytemp = INHOSPITABLE_FOR_NESTING
exp = 0.5
max_level = 100
exp_attribute = FORTITUDE_ATTRIBUTE
var/panic_timer = 0
var/mob/living/simple_animal/hostile/abnormality/naked_nest/origin_nest

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,9 @@
ranged = 1
retreat_distance = 3
minimum_distance = 1
exp = 1
max_level = 100
exp_attribute = FORTITUDE_ATTRIBUTE

/mob/living/simple_animal/hostile/nosferatu_mob/AttackingTarget() //they spawn blood on hit
if(ishuman(target))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@
attack_verb_simple = "bite"
attack_sound = 'sound/weapons/bite.ogg'
speak_emote = list("buzzes")
exp = 1
max_level = 100
exp_attribute = FORTITUDE_ATTRIBUTE

/mob/living/simple_animal/hostile/worker_bee/Initialize()
. = ..()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,9 @@ Defeating the murderer also surpresses the abnormality.
attack_sound = 'sound/effects/ordeals/white/pale_knife.ogg'
del_on_death = FALSE
can_patrol = TRUE
exp = 4
exp_attribute = PRUDENCE_ATTRIBUTE
max_level = 100

/mob/living/simple_animal/hostile/actor/Initialize()
. = ..()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,9 @@
attack_verb_simple = "punches"
attack_sound = 'sound/weapons/bite.ogg'
speak_emote = list("burbles")
exp = 1
max_level = 100
exp_attribute = FORTITUDE_ATTRIBUTE

//You can put these guys about to guard an area.
/mob/living/simple_animal/hostile/shrimp_soldier
Expand All @@ -165,7 +168,7 @@
icon_living = "wellcheers_bad"
faction = list("shrimp")
health = 500 //They're here to help
maxHealth = 500
maxHealth = 500 // THEY ARE NOT
melee_damage_type = RED_DAMAGE
damage_coeff = list(RED_DAMAGE = 0.6, WHITE_DAMAGE = 0.7, BLACK_DAMAGE = 1.2, PALE_DAMAGE = 2)
melee_damage_lower = 14
Expand All @@ -182,12 +185,16 @@
minimum_distance = 3
casingtype = /obj/item/ammo_casing/caseless/ego_shrimpsoldier
projectilesound = 'sound/weapons/gun/pistol/shot_alt.ogg'
exp = 2
max_level = 100
exp_attribute = JUSTICE_ATTRIBUTE

/mob/living/simple_animal/hostile/shrimp_soldier/friendly
name = "wellcheers corp assault officer"
icon_state = "wellcheers_soldier"
icon_living = "wellcheers_soldier"
faction = list("neutral", "shrimp")
exp = FALSE

/obj/item/grenade/spawnergrenade/shrimp
name = "instant shrimp task force grenade"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,11 @@
del_on_death = FALSE
density = TRUE
guaranteed_butcher_results = list(/obj/item/food/badrecipe = 1)

exp = 2
max_level = 80
exp_attribute = FORTITUDE_ATTRIBUTE

var/list/breach_affected = list()
var/can_act = TRUE
var/mob/living/simple_animal/hostile/abnormality/thunder_bird/master
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@
say("I've... failed. S-Sorry...")
SLEEP_CHECK_DEATH(1 SECONDS)
Teleport(src.datum_reference.landmark)
breach_affected = list()
breach_affected.Cut()
toggle_ai(AI_OFF)
adjustBruteLoss(-maxHealth)
can_act = TRUE
Expand Down
49 changes: 42 additions & 7 deletions code/modules/mob/living/simple_animal/hostile/hostile.dm
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,22 @@
var/patrol_tries = 0 //max of 5
var/patrol_move_timer = null

// Suppression Rewards
/// Associative List of those who have attacked the mob, EXP is gained up to 100% of "exp" based on damage dealt, multiple people can gain 100% exp.
var/list/attackers = list()
/// Highest amount EXP from this mob can get someone to
var/max_level = 40
/// Maximum Attainable EXP from this mob per person, if TRUE/1: defaults to max_level/20
var/exp = TRUE
/// Attribute that gains EXP
var/exp_attribute = FORTITUDE_ATTRIBUTE

/mob/living/simple_animal/hostile/Initialize()
. = ..()

if(exp == TRUE)
exp = round(max_level/20, 0.1)

if(!targets_from)
targets_from = src
/*Update Speed overrides set speed and sets it
Expand Down Expand Up @@ -166,16 +179,31 @@
face_atom(target) //Looks better if they keep looking at you when dodging

/mob/living/simple_animal/hostile/attacked_by(obj/item/I, mob/living/user)
if(stat == CONSCIOUS && !target && AIStatus != AI_OFF && !client && user)
FindTarget(list(user), 1)
if(stat == CONSCIOUS && user)
if(!target && AIStatus != AI_OFF && !client)
FindTarget(list(user), 1)
if(ishuman(user) && exp)
var/dam = max(damage_coeff.getCoeff(I.damtype)*(1+(get_attribute_level(user, JUSTICE_ATTRIBUTE)/100))*I.force, 0)
dam = round(dam/(maxHealth*0.25), 0.01)
if(user in attackers)
attackers[user] = clamp(attackers[user] + dam, 0, 1)
else
attackers[user] = clamp(0.5 + dam, 0, 1)
return ..()

/mob/living/simple_animal/hostile/bullet_act(obj/projectile/P)
if(stat == CONSCIOUS && !target && AIStatus != AI_OFF && !client)
if(P.firer && get_dist(src, P.firer) <= aggro_vision_range)
FindTarget(list(P.firer), 1)
Goto(P.starting, move_to_delay, 3)

if(stat == CONSCIOUS)
if(!target && AIStatus != AI_OFF && !client)
if(P.firer && get_dist(src, P.firer) <= aggro_vision_range)
FindTarget(list(P.firer), 1)
Goto(P.starting, move_to_delay, 3)
if(ishuman(P.firer) && exp)
var/dam = max(damage_coeff.getCoeff(P.damtype)*P.damage, 0)
dam = round(dam/(maxHealth*0.25), 0.01)
if(P.firer in attackers)
attackers[P.firer] = clamp(attackers[P.firer] + dam, 0, 1)
else
attackers[P.firer] = clamp(0.25 + dam, 0, 1)
. = ..()
DamageEffect(P.damage, P.damage_type)

Expand Down Expand Up @@ -471,6 +499,13 @@

/mob/living/simple_animal/hostile/death(gibbed)
LoseTarget()
for(var/mob/living/carbon/human/H in attackers)
if(!(H.job in GLOB.security_positions))
continue
var/exp_grant = attackers[H] * exp
if(exp_grant + get_raw_level(H, exp_attribute) > max_level)
exp_grant = max(max_level - get_raw_level(H, exp_attribute), 0)
H.adjust_attribute_level(exp_attribute, exp_grant)
..(gibbed)

/mob/living/simple_animal/hostile/proc/summon_backup(distance, exact_faction_match)
Expand Down
7 changes: 7 additions & 0 deletions code/modules/mob/living/simple_animal/hostile/ordeal/amber.dm
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
/mob/living/simple_animal/hostile/ordeal/amber_bug/spawned
butcher_results = list()
guaranteed_butcher_results = list()
exp = FALSE

/mob/living/simple_animal/hostile/ordeal/amber_bug/spawned/death(gibbed)
density = FALSE
Expand Down Expand Up @@ -94,6 +95,8 @@
alpha = 0 // It burrows in on spawn
density = FALSE

max_level = 100

/// This cooldown responds for both the burrowing and spawning in the dawns
var/burrow_cooldown
var/burrow_cooldown_time = 18 SECONDS
Expand Down Expand Up @@ -190,6 +193,8 @@
/mob/living/simple_animal/hostile/ordeal/amber_dusk/spawned
butcher_results = list()
guaranteed_butcher_results = list()
max_level = 80 // If you're somehow below level 4 at midnight... this is a pitty bonus.
exp = 2

/mob/living/simple_animal/hostile/ordeal/amber_dusk/spawned/death(gibbed)
animate(src, alpha = 0, time = 5 SECONDS)
Expand Down Expand Up @@ -223,6 +228,8 @@
blood_volume = BLOOD_VOLUME_NORMAL
deathsound = 'sound/effects/ordeals/amber/midnight_dead.ogg'

max_level = 130

var/burrowing = FALSE
var/burrow_cooldown
var/burrow_cooldown_time = 20 SECONDS
Expand Down
Loading
Loading