From c7933aa79ae8c720a9b986821af7c3c26c0026a4 Mon Sep 17 00:00:00 2001 From: HeroWithYay Date: Sun, 15 Dec 2024 00:16:50 +1300 Subject: [PATCH] Adds new trait to RG --- code/__DEFINES/traits.dm | 4 +++- .../job_types/roguetown/nobility/knight.dm | 3 +++ code/modules/mob/living/roguetownprocs.dm | 24 ++++++++++++++----- 3 files changed, 24 insertions(+), 7 deletions(-) diff --git a/code/__DEFINES/traits.dm b/code/__DEFINES/traits.dm index 7f051647520..b27616ec7bb 100644 --- a/code/__DEFINES/traits.dm +++ b/code/__DEFINES/traits.dm @@ -46,6 +46,7 @@ #define TRAIT_KNIGHTSMAN "Royal Defiance" #define TRAIT_WOODSMAN "Talented Woodsman" #define TRAIT_INQUISITION "Member of the Otavan Inquisition" +#define TRAIT_GOODTRAINER "Good Trainer" //Hearthstone port (Tracking) #define TRAIT_PERFECT_TRACKER "Perfect Tracker" //Will always find any tracks and analyzes them perfectly. @@ -171,7 +172,8 @@ GLOBAL_LIST_INIT(roguetraits, list( TRAIT_FORTITUDE = span_info("The typical drain I feel from day to day life is lessened, my athleticism greater."), TRAIT_GUIDANCE = span_info("Arcyne assistance guides my weapons."), TRAIT_DEPRAVED = span_info("The languid scent of Her debauchery is known to me, and I can detect its sordid presence upon others."), - TRAIT_SILVER_BLESSED = span_info("I am anointed with holy silver, which preserves me from curses that bite.") + TRAIT_SILVER_BLESSED = span_info("I am anointed with holy silver, which preserves me from curses that bite."), + TRAIT_GOODTRAINER = span_info("I am a good teacher, and when it comes to weaponry I can train others to be just as skilled as I am.") )) // trait accessor defines diff --git a/code/modules/jobs/job_types/roguetown/nobility/knight.dm b/code/modules/jobs/job_types/roguetown/nobility/knight.dm index a333f51acef..eb04a9e8ef2 100644 --- a/code/modules/jobs/job_types/roguetown/nobility/knight.dm +++ b/code/modules/jobs/job_types/roguetown/nobility/knight.dm @@ -95,6 +95,7 @@ ADD_TRAIT(H, TRAIT_STEELHEARTED, TRAIT_GENERIC) //Knights should be used to the horrors of war if they're tride-and-true. ADD_TRAIT(H, TRAIT_NOBLE, TRAIT_GENERIC) //Knights are /technically/ nobles? But they are of the lower-tiers; mainly that a non-blue-blood could become a knight ADD_TRAIT(H, TRAIT_KNIGHTSMAN, TRAIT_GENERIC) //if they can't figure out how to win vs someone in leather armor with this i literally can not help them anymore + ADD_TRAIT(H, TRAIT_GOODTRAINER, TRAIT_GENERIC) //Knights can train their squires. H.dna.species.soundpack_m = new /datum/voicepack/male/knight() //For knightly voices; even though I despise them. H.verbs |= /mob/proc/haltyell @@ -157,6 +158,7 @@ ADD_TRAIT(H, TRAIT_STEELHEARTED, TRAIT_GENERIC) //Knights should be used to the horrors of war if they're tride-and-true. ADD_TRAIT(H, TRAIT_NOBLE, TRAIT_GENERIC) //Knights are /technically/ nobles? But they are of the lower-tiers; mainly that a non-blue-blood could become a knight. ADD_TRAIT(H, TRAIT_KNIGHTSMAN, TRAIT_GENERIC) //if they can't figure out how to win vs someone in leather armor with this i literally can not help them anymore + ADD_TRAIT(H, TRAIT_GOODTRAINER, TRAIT_GENERIC) //Knights can train their squires. H.dna.species.soundpack_m = new /datum/voicepack/male/knight() //For knightly voices; even though I despise them. H.verbs |= /mob/proc/haltyell @@ -213,6 +215,7 @@ ADD_TRAIT(H, TRAIT_STEELHEARTED, TRAIT_GENERIC) //Knights should be used to the horrors of war if they're tride-and-true. ADD_TRAIT(H, TRAIT_NOBLE, TRAIT_GENERIC) //Knights are /technically/ nobles? But they are of the lower-tiers; mainly that a non-blue-blood could become a knight. ADD_TRAIT(H, TRAIT_KNIGHTSMAN, TRAIT_GENERIC) //if they can't figure out how to win vs someone in leather armor with this i literally can not help them anymore + ADD_TRAIT(H, TRAIT_GOODTRAINER, TRAIT_GENERIC) //Knights can train their squires. H.dna.species.soundpack_m = new /datum/voicepack/male/knight() //For knightly voices; even though I despise them. H.verbs |= /mob/proc/haltyell diff --git a/code/modules/mob/living/roguetownprocs.dm b/code/modules/mob/living/roguetownprocs.dm index 87b023b1573..3ed3fb0162d 100644 --- a/code/modules/mob/living/roguetownprocs.dm +++ b/code/modules/mob/living/roguetownprocs.dm @@ -217,9 +217,13 @@ if(weapon_parry == TRUE) if(do_parry(used_weapon, drained, user)) //show message + if ((mobility_flags & MOBILITY_STAND)) + var/skill_target = attacker_skill + if(!HAS_TRAIT(U, TRAIT_GOODTRAINER)) + skill_target -= SKILL_LEVEL_NOVICE + if (can_train_combat_skill(src, used_weapon.associated_skill, skill_target)) + mind.add_sleep_experience(used_weapon.associated_skill, max(round(STAINT*exp_multi), 0), FALSE) - if((mobility_flags & MOBILITY_STAND) && can_train_combat_skill(src, used_weapon.associated_skill, attacker_skill - SKILL_LEVEL_NOVICE)) - mind.add_sleep_experience(used_weapon.associated_skill, max(round(STAINT*exp_multi), 0), FALSE) var/obj/item/AB = intenty.masteritem //attacker skill gain @@ -230,8 +234,12 @@ attacker_skill_type = AB.associated_skill else attacker_skill_type = /datum/skill/combat/unarmed - if((U.mobility_flags & MOBILITY_STAND) && can_train_combat_skill(U, attacker_skill_type, defender_skill - SKILL_LEVEL_NOVICE)) - U.mind.add_sleep_experience(attacker_skill_type, max(round(STAINT*exp_multi), 0), FALSE) + if ((mobility_flags & MOBILITY_STAND)) + var/skill_target = defender_skill + if(!HAS_TRAIT(src, TRAIT_GOODTRAINER)) + skill_target -= SKILL_LEVEL_NOVICE + if (can_train_combat_skill(U, attacker_skill_type, skill_target)) + U.mind.add_sleep_experience(attacker_skill_type, max(round(STAINT*exp_multi), 0), FALSE) if(prob(66) && AB) if((used_weapon.flags_1 & CONDUCT_1) && (AB.flags_1 & CONDUCT_1)) @@ -255,8 +263,12 @@ if(weapon_parry == FALSE) if(do_unarmed_parry(drained, user)) - if((mobility_flags & MOBILITY_STAND) && can_train_combat_skill(H, /datum/skill/combat/unarmed, attacker_skill - SKILL_LEVEL_NOVICE)) - H.mind?.add_sleep_experience(/datum/skill/combat/unarmed, max(round(STAINT*exp_multi), 0), FALSE) + if((mobility_flags & MOBILITY_STAND)) + var/skill_target = attacker_skill + if(!HAS_TRAIT(U, TRAIT_GOODTRAINER)) + skill_target -= SKILL_LEVEL_NOVICE + if(can_train_combat_skill(H, /datum/skill/combat/unarmed, skill_target)) + H.mind?.add_sleep_experience(/datum/skill/combat/unarmed, max(round(STAINT*exp_multi), 0), FALSE) flash_fullscreen("blackflash2") return TRUE else