Skip to content

Commit

Permalink
Replaces cqc with unarmed
Browse files Browse the repository at this point in the history
  • Loading branch information
Wisemonster committed May 31, 2024
1 parent c6c1f94 commit 61eb5d6
Show file tree
Hide file tree
Showing 9 changed files with 63 additions and 63 deletions.
26 changes: 13 additions & 13 deletions code/__DEFINES/skills.dm
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
// Skill defines
///CQC skill; higher disarm chance on humans(+5% per level); slight increase in punch damage.
#define SKILL_CQC "cqc"

#define SKILL_CQC_WEAK -1
#define SKILL_CQC_DEFAULT 0
#define SKILL_CQC_TRAINED 1
#define SKILL_CQC_MP 2
#define SKILL_CQC_MASTER 5

///Unarmed damage mod from CQC skill
#define CQC_SKILL_DAMAGE_MOD 5
///Disarm chance mod from CQC skill
#define CQC_SKILL_DISARM_MOD 5
///UNARMED skill; higher disarm chance on humans(+5% per level); slight increase in punch damage.
#define SKILL_UNARMED "UNARMED"

#define SKILL_UNARMED_WEAK -1
#define SKILL_UNARMED_DEFAULT 0
#define SKILL_UNARMED_TRAINED 1
#define SKILL_UNARMED_MP 2
#define SKILL_UNARMED_MASTER 5

///Unarmed damage mod from UNARMED skill
#define UNARMED_SKILL_DAMAGE_MOD 5
///Disarm chance mod from UNARMED skill
#define UNARMED_SKILL_DISARM_MOD 5

///Melee skill; 15% extra damage per skill level
#define SKILL_MELEE_WEAPONS "melee_weapons"
Expand Down
80 changes: 40 additions & 40 deletions code/datums/skills.dm
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
#define SKILLSID "skills-[cqc]-[melee_weapons]\
#define SKILLSID "skills-[unarmed]-[melee_weapons]\
-[firearms]-[pistols]-[shotguns]-[rifles]-[smgs]-[heavy_weapons]-[smartgun]\
-[engineer]-[construction]-[leadership]-[medical]-[surgery]-[pilot]-[police]-[powerloader]-[large_vehicle]-[stamina]"

#define SKILLSIDSRC(S) "skills-[S.cqc]-[S.melee_weapons]\
#define SKILLSIDSRC(S) "skills-[S.unarmed]-[S.melee_weapons]\
-[S.firearms]-[S.pistols]-[S.shotguns]-[S.rifles]-[S.smgs]-[S.heavy_weapons]-[S.smartgun]\
-[S.engineer]-[S.construction]-[S.leadership]-[S.medical]-[S.surgery]-[S.pilot]-[S.police]-[S.powerloader]-[S.large_vehicle]-[S.stamina]"

/proc/getSkills(cqc = 0, melee_weapons = 0,\
/proc/getSkills(unarmed = 0, melee_weapons = 0,\
firearms = 0, pistols = 0, shotguns = 0, rifles = 0, smgs = 0, heavy_weapons = 0, smartgun = 0,\
engineer = 0, construction = 0, leadership = 0, medical = 0, surgery = 0, pilot = 0, police = 0, powerloader = 0, large_vehicle = 0, stamina = 0)
. = locate(SKILLSID)
if(!.)
. = new /datum/skills(cqc, melee_weapons,\
. = new /datum/skills(unarmed, melee_weapons,\
firearms, pistols, shotguns, rifles, smgs, heavy_weapons, smartgun,\
engineer, construction, leadership, medical, surgery, pilot, police, powerloader, large_vehicle, stamina)

/proc/getSkillsType(skills_type = /datum/skills)
var/datum/skills/new_skill = skills_type
var/cqc = initial(new_skill.cqc)
var/unarmed = initial(new_skill.unarmed)
var/melee_weapons = initial(new_skill.melee_weapons)
var/firearms = initial(new_skill.firearms)
var/pistols = initial(new_skill.pistols)
Expand All @@ -43,7 +43,7 @@ engineer = 0, construction = 0, leadership = 0, medical = 0, surgery = 0, pilot
/datum/skills
datum_flags = DF_USE_TAG
var/name = "Default/Custom"
var/cqc = SKILL_CQC_DEFAULT
var/unarmed = SKILL_UNARMED_DEFAULT
var/melee_weapons = SKILL_MELEE_DEFAULT

var/firearms = SKILL_FIREARMS_DEFAULT
Expand All @@ -67,11 +67,11 @@ engineer = 0, construction = 0, leadership = 0, medical = 0, surgery = 0, pilot
var/stamina = SKILL_STAMINA_DEFAULT


/datum/skills/New(cqc, melee_weapons,\
/datum/skills/New(unarmed, melee_weapons,\
firearms, pistols, shotguns, rifles, smgs, heavy_weapons, smartgun,\
engineer, construction, leadership, medical, surgery, pilot, police, powerloader, large_vehicle, stamina)
if(!isnull(cqc))
src.cqc = cqc
if(!isnull(unarmed))
src.unarmed = unarmed
if(!isnull(melee_weapons))
src.melee_weapons = melee_weapons
if(!isnull(firearms))
Expand Down Expand Up @@ -111,10 +111,10 @@ engineer, construction, leadership, medical, surgery, pilot, police, powerloader
tag = SKILLSIDSRC(src)

/// returns/gets a new skills datum with values changed according to the args passed
/datum/skills/proc/modifyRating(cqc, melee_weapons,\
/datum/skills/proc/modifyRating(unarmed, melee_weapons,\
firearms, pistols, shotguns, rifles, smgs, heavy_weapons, smartgun,\
engineer, construction, leadership, medical, surgery, pilot, police, powerloader, large_vehicle, stamina)
return getSkills(src.cqc+cqc,\
return getSkills(src.unarmed+unarmed,\
src.melee_weapons+melee_weapons,\
src.firearms+firearms,\
src.pistols+pistols,\
Expand All @@ -136,7 +136,7 @@ engineer, construction, leadership, medical, surgery, pilot, police, powerloader

/// acts as [/proc/modifyRating] but instead modifies all values rather than several specific ones
/datum/skills/proc/modifyAllRatings(difference)
return getSkills(src.cqc+difference,\
return getSkills(src.unarmed+difference,\
src.melee_weapons+difference,\
src.firearms+difference,\
src.pistols+difference,\
Expand All @@ -157,10 +157,10 @@ engineer, construction, leadership, medical, surgery, pilot, police, powerloader
src.stamina+difference)

/// acts as [/proc/modifyRating] but sets the rating directly rather than modify it
/datum/skills/proc/setRating(cqc, melee_weapons,\
/datum/skills/proc/setRating(unarmed, melee_weapons,\
firearms, pistols, shotguns, rifles, smgs, heavy_weapons, smartgun,\
engineer, construction, leadership, medical, surgery, pilot, police, powerloader, large_vehicle, stamina)
return getSkills((isnull(cqc) ? src.cqc : cqc),\
return getSkills((isnull(unarmed) ? src.unarmed : unarmed),\
(isnull(melee_weapons) ? src.melee_weapons : melee_weapons),\
(isnull(firearms) ? src.firearms : firearms),\
(isnull(pistols) ? src.pistols : pistols),\
Expand Down Expand Up @@ -199,7 +199,7 @@ engineer, construction, leadership, medical, surgery, pilot, police, powerloader
/// returns an assoc list (SKILL_X = VALUE) of all skills for this skill datum
/datum/skills/proc/getList()
return list(
SKILL_CQC = cqc,
SKILL_UNARMED = unarmed,
SKILL_MELEE_WEAPONS = melee_weapons,
SKILL_FIREARMS = firearms,
SKILL_PISTOLS = pistols,
Expand All @@ -222,7 +222,7 @@ engineer, construction, leadership, medical, surgery, pilot, police, powerloader

/datum/skills/civilian
name = "Civilian"
cqc = SKILL_CQC_WEAK
unarmed = SKILL_UNARMED_WEAK
firearms = SKILL_FIREARMS_UNTRAINED
melee_weapons = SKILL_MELEE_WEAK

Expand Down Expand Up @@ -271,7 +271,7 @@ engineer, construction, leadership, medical, surgery, pilot, police, powerloader

/datum/skills/civilian/survivor/marshal
name = "Survivor Marshal"
cqc = SKILL_CQC_MP
unarmed = SKILL_UNARMED_MP
firearms = SKILL_FIREARMS_DEFAULT
melee_weapons = SKILL_MELEE_DEFAULT
pistols = SKILL_PISTOLS_TRAINED
Expand Down Expand Up @@ -303,23 +303,23 @@ engineer, construction, leadership, medical, surgery, pilot, police, powerloader

/datum/skills/doctor
name = "Doctor"
cqc = SKILL_CQC_WEAK
unarmed = SKILL_UNARMED_WEAK
firearms = SKILL_FIREARMS_UNTRAINED
medical = SKILL_MEDICAL_EXPERT
surgery = SKILL_SURGERY_EXPERT
melee_weapons = SKILL_MELEE_WEAK

/datum/skills/researcher
name = "Researcher"
cqc = SKILL_CQC_WEAK
unarmed = SKILL_UNARMED_WEAK
firearms = SKILL_FIREARMS_UNTRAINED
medical = SKILL_MEDICAL_EXPERT
surgery = SKILL_SURGERY_PROFESSIONAL
melee_weapons = SKILL_MELEE_WEAK

/datum/skills/cmo
name = "CMO"
cqc = SKILL_CQC_WEAK
unarmed = SKILL_UNARMED_WEAK
firearms = SKILL_FIREARMS_UNTRAINED
leadership = SKILL_LEAD_TRAINED
medical = SKILL_MEDICAL_MASTER
Expand All @@ -345,7 +345,7 @@ engineer, construction, leadership, medical, surgery, pilot, police, powerloader
construction = SKILL_CONSTRUCTION_EXPERT
firearms = SKILL_FIREARMS_UNTRAINED
medical = SKILL_MEDICAL_EXPERT
cqc = SKILL_CQC_MASTER
unarmed = SKILL_UNARMED_MASTER
surgery = SKILL_SURGERY_EXPERT
pilot = SKILL_PILOT_TRAINED
melee_weapons = SKILL_MELEE_WEAK
Expand All @@ -359,7 +359,7 @@ engineer, construction, leadership, medical, surgery, pilot, police, powerloader
construction = SKILL_CONSTRUCTION_MASTER
firearms = SKILL_FIREARMS_UNTRAINED
medical = SKILL_MEDICAL_COMPETENT
cqc = SKILL_CQC_MASTER
unarmed = SKILL_UNARMED_MASTER
surgery = SKILL_SURGERY_PROFESSIONAL
pilot = SKILL_PILOT_TRAINED
melee_weapons = SKILL_MELEE_WEAK
Expand Down Expand Up @@ -389,7 +389,7 @@ engineer, construction, leadership, medical, surgery, pilot, police, powerloader
surgery = SKILL_SURGERY_AMATEUR
police = SKILL_POLICE_MP
powerloader = SKILL_POWERLOADER_TRAINED
cqc = SKILL_CQC_TRAINED
unarmed = SKILL_UNARMED_TRAINED

/datum/skills/veteran
name = "TGMC Retired Veteran"
Expand All @@ -400,7 +400,7 @@ engineer, construction, leadership, medical, surgery, pilot, police, powerloader
surgery = SKILL_SURGERY_AMATEUR
police = SKILL_POLICE_MP
powerloader = SKILL_POWERLOADER_TRAINED
cqc = SKILL_CQC_TRAINED
unarmed = SKILL_UNARMED_TRAINED
firearms = SKILL_FIREARMS_TRAINED
rifles = SKILL_RIFLES_TRAINED

Expand Down Expand Up @@ -506,7 +506,7 @@ engineer, construction, leadership, medical, surgery, pilot, police, powerloader

/datum/skills/sl
name = SQUAD_LEADER
cqc = SKILL_CQC_TRAINED
unarmed = SKILL_UNARMED_TRAINED
construction = SKILL_CONSTRUCTION_PLASTEEL
engineer = SKILL_ENGINEER_PLASTEEL
leadership = SKILL_LEAD_EXPERT
Expand Down Expand Up @@ -554,7 +554,7 @@ engineer, construction, leadership, medical, surgery, pilot, police, powerloader

/datum/skills/specialist
name = SQUAD_SPECIALIST
cqc = SKILL_CQC_TRAINED
unarmed = SKILL_UNARMED_TRAINED
construction = SKILL_CONSTRUCTION_METAL
engineer = SKILL_ENGINEER_METAL //to use c4 in scout set.
smartgun = SKILL_SMART_TRAINED
Expand All @@ -581,7 +581,7 @@ engineer, construction, leadership, medical, surgery, pilot, police, powerloader

/datum/skills/smartgunner/pmc
name = "PMC Smartgunner"
cqc = SKILL_CQC_TRAINED
unarmed = SKILL_UNARMED_TRAINED
construction = SKILL_CONSTRUCTION_METAL
firearms = SKILL_FIREARMS_TRAINED
smartgun = SKILL_SMART_TRAINED
Expand All @@ -595,7 +595,7 @@ engineer, construction, leadership, medical, surgery, pilot, police, powerloader

/datum/skills/commando
name = "Commando"
cqc = 3
unarmed = 3
engineer = SKILL_ENGINEER_ENGI
construction = SKILL_CONSTRUCTION_PLASTEEL
firearms = SKILL_FIREARMS_TRAINED
Expand All @@ -620,7 +620,7 @@ engineer, construction, leadership, medical, surgery, pilot, police, powerloader

/datum/skills/mercenary
name = "Mercenary"
cqc = SKILL_CQC_MP
unarmed = SKILL_UNARMED_MP
engineer = SKILL_ENGINEER_ENGI
construction = SKILL_CONSTRUCTION_PLASTEEL
firearms = SKILL_FIREARMS_TRAINED
Expand Down Expand Up @@ -650,7 +650,7 @@ engineer, construction, leadership, medical, surgery, pilot, police, powerloader
firearms = SKILL_FIREARMS_TRAINED
smartgun = SKILL_SMART_TRAINED
medical = SKILL_MEDICAL_MASTER
cqc = SKILL_CQC_MASTER
unarmed = SKILL_UNARMED_MASTER
surgery = SKILL_SURGERY_EXPERT
melee_weapons = SKILL_MELEE_SUPER
leadership = SKILL_LEAD_MASTER
Expand All @@ -667,7 +667,7 @@ engineer, construction, leadership, medical, surgery, pilot, police, powerloader
/* Deathsquad */
/datum/skills/deathsquad
name = "Deathsquad Elite"
cqc = SKILL_CQC_TRAINED
unarmed = SKILL_UNARMED_TRAINED
construction = SKILL_CONSTRUCTION_METAL
firearms = SKILL_FIREARMS_TRAINED
smartgun = SKILL_SMART_TRAINED
Expand All @@ -683,7 +683,7 @@ engineer, construction, leadership, medical, surgery, pilot, police, powerloader

/datum/skills/smartgunner/deathsquad
name = "Deathsquad Elite Gunner"
cqc = SKILL_CQC_TRAINED
unarmed = SKILL_UNARMED_TRAINED
construction = SKILL_CONSTRUCTION_METAL
firearms = SKILL_FIREARMS_TRAINED
smartgun = SKILL_SMART_MASTER
Expand All @@ -699,7 +699,7 @@ engineer, construction, leadership, medical, surgery, pilot, police, powerloader

/datum/skills/sl/deathsquad
name = "Deathsquad Elite Captain"
cqc = SKILL_CQC_TRAINED
unarmed = SKILL_UNARMED_TRAINED
construction = SKILL_CONSTRUCTION_METAL
firearms = SKILL_FIREARMS_TRAINED
smartgun = SKILL_SMART_TRAINED
Expand All @@ -717,7 +717,7 @@ engineer, construction, leadership, medical, surgery, pilot, police, powerloader

/datum/skills/imperial
name = "Guardsman"
cqc = SKILL_CQC_TRAINED
unarmed = SKILL_UNARMED_TRAINED
melee_weapons = SKILL_MELEE_TRAINED

firearms = SKILL_FIREARMS_TRAINED
Expand All @@ -744,7 +744,7 @@ engineer, construction, leadership, medical, surgery, pilot, police, powerloader

/datum/skills/imperial/astartes
name = "Space Marine"
cqc = SKILL_CQC_MASTER
unarmed = SKILL_UNARMED_MASTER
melee_weapons = SKILL_MELEE_SUPER

firearms = SKILL_FIREARMS_TRAINED
Expand All @@ -765,7 +765,7 @@ engineer, construction, leadership, medical, surgery, pilot, police, powerloader

/datum/skills/imperial/astartes/apothecary
name = "Space Marine Apothecary" // a slightly less stronger space marine with medical skills
cqc = 4 // below SKILL_CQC_MASTER, no define for it
unarmed = 4 // below SKILL_UNARMED_MASTER, no define for it
melee_weapons = SKILL_MELEE_TRAINED

medical = SKILL_MEDICAL_EXPERT
Expand All @@ -778,14 +778,14 @@ engineer, construction, leadership, medical, surgery, pilot, police, powerloader

/datum/skills/vatgrown/early
name = "Vat Grown"
cqc = SKILL_CQC_WEAK
unarmed = SKILL_UNARMED_WEAK
firearms = SKILL_FIREARMS_UNTRAINED
melee_weapons = SKILL_MELEE_WEAK

/datum/skills/sectoid
name = "Sectoid"

cqc = SKILL_CQC_WEAK
unarmed = SKILL_UNARMED_WEAK
engineer = SKILL_ENGINEER_ENGI
construction = SKILL_CONSTRUCTION_PLASTEEL
firearms = SKILL_FIREARMS_TRAINED
Expand All @@ -800,14 +800,14 @@ engineer, construction, leadership, medical, surgery, pilot, police, powerloader

/datum/skills/skeleton
name = "Skeleton"
cqc = SKILL_CQC_TRAINED
unarmed = SKILL_UNARMED_TRAINED
melee_weapons = SKILL_MELEE_TRAINED

//SOM veterans
/datum/skills/som_veteran
name = "SOM Veteran"
leadership = SKILL_LEAD_BEGINNER
cqc = SKILL_CQC_TRAINED
unarmed = SKILL_UNARMED_TRAINED
melee_weapons = SKILL_MELEE_TRAINED
construction = SKILL_CONSTRUCTION_METAL
engineer = SKILL_ENGINEER_METAL
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/objs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@
grabbed_mob.Paralyze(2 SECONDS)
user.drop_held_item()
step_towards(grabbed_mob, src)
var/damage = base_damage + (user.skills.getRating(SKILL_CQC) * CQC_SKILL_DAMAGE_MOD)
var/damage = base_damage + (user.skills.getRating(UNARMED_CQC) * UNARMED_SKILL_DAMAGE_MOD)

Check failure on line 376 in code/game/objects/objs.dm

View workflow job for this annotation

GitHub Actions / Run Linters

undefined var: "UNARMED_CQC"

Check failure on line 376 in code/game/objects/objs.dm

View workflow job for this annotation

GitHub Actions / Run Linters

OD0000: Unknown identifier "UNARMED_CQC"
grabbed_mob.apply_damage(damage, BRUTE, "head", MELEE, is_sharp, updating_health = TRUE)
user.visible_message(span_danger("[user] slams [grabbed_mob]'s face against [src]!"),
span_danger("You slam [grabbed_mob]'s face against [src]!"))
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/structures/fence.dm
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
var/mob/living/grabbed_mob = grab.grabbed_thing
var/state = user.grab_state
user.drop_held_item()
var/damage = (user.skills.getRating(SKILL_CQC) * CQC_SKILL_DAMAGE_MOD)
var/damage = (user.skills.getRating(UNARMED_CQC) * UNARMED_SKILL_DAMAGE_MOD)

Check failure on line 98 in code/game/objects/structures/fence.dm

View workflow job for this annotation

GitHub Actions / Run Linters

undefined var: "UNARMED_CQC"

Check failure on line 98 in code/game/objects/structures/fence.dm

View workflow job for this annotation

GitHub Actions / Run Linters

OD0000: Unknown identifier "UNARMED_CQC"
switch(state)
if(GRAB_PASSIVE)
damage += BASE_OBJ_SLAM_DAMAGE
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/structures/window.dm
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
var/state = user.grab_state
user.drop_held_item()
step_towards(grabbed_mob, src)
var/damage = (user.skills.getRating(SKILL_CQC) * CQC_SKILL_DAMAGE_MOD)
var/damage = (user.skills.getRating(UNARMED_CQC) * UNARMED_SKILL_DAMAGE_MOD)

Check failure on line 139 in code/game/objects/structures/window.dm

View workflow job for this annotation

GitHub Actions / Run Linters

undefined var: "UNARMED_CQC"

Check failure on line 139 in code/game/objects/structures/window.dm

View workflow job for this annotation

GitHub Actions / Run Linters

OD0000: Unknown identifier "UNARMED_CQC"
switch(state)
if(GRAB_PASSIVE)
damage += base_damage
Expand Down
2 changes: 1 addition & 1 deletion code/game/turfs/walls/walls.dm
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@

var/mob/living/grabbed_mob = grab.grabbed_thing
step_towards(grabbed_mob, src)
var/damage = (user.skills.getRating(SKILL_CQC) * CQC_SKILL_DAMAGE_MOD)
var/damage = (user.skills.getRating(SKILL_UNARMED) * UNARMED_SKILL_DAMAGE_MOD)
var/state = user.grab_state
switch(state)
if(GRAB_PASSIVE)
Expand Down
Loading

0 comments on commit 61eb5d6

Please sign in to comment.