About ready.

This commit is contained in:
Ghommie
2020-05-05 20:58:44 +02:00
parent 791b05871f
commit 001109cfcd
13 changed files with 111 additions and 86 deletions
+9
View File
@@ -248,6 +248,15 @@ GLOBAL_LIST_INIT(shove_disarming_types, typecacheof(list(
#define TOTAL_MASS_MEDIEVAL_WEAPON 3.6 //very, very generic average sword/warpick/etc. weight in pounds.
#define TOTAL_MASS_TOY_SWORD 1.5
//stamina cost defines.
#define STAM_COST_ATTACK_OBJ_MULT 1.2
#define STAM_COST_ATTACK_MOB_MULT 0.8
#define STAM_COST_BATON_MOB_MULT 1
#define STAM_COST_NO_COMBAT_MULT 1.25
#define STAM_COST_W_CLASS_MULT 1.25
#define STAM_COST_THROW_MULT 2
//bullet_act() return values
#define BULLET_ACT_HIT "HIT" //It's a successful hit, whatever that means in the context of the thing it's hitting.
#define BULLET_ACT_BLOCK "BLOCK" //It's a blocked hit, whatever that means in the context of the thing it's hitting.
+3
View File
@@ -36,6 +36,9 @@
#define SKILL_TRAIN_ATTACK_MOB (1<<3)
#define SKILL_ATTACK_OBJ (1<<4)
#define SKILL_TRAIN_ATTACK_OBJ (1<<5)
#define SKILL_STAMINA_COST (1<<6) //Influences the stamina cost from weapon usage.
#define SKILL_THROW_STAM_COST (1<<7)
#define SKILL_COMBAT_MODE (1<<8) //The user must have combat mode on.
///competency_threshold index defines
#define THRESHOLD_COMPETENT 1
+21 -19
View File
@@ -13,26 +13,28 @@
}\
target /= (1+(___value-to_check.competency_thresholds[threshold])*to_check.competency_mults[threshold])
/// This is the one that accepts typepaths and lists.
#define LIST_SKILL_MODIFIER(to_check, holder, target, threshold) \
if(!islist(to_check)){\
SKILL_MODIFIER(GLOB.skill_datums[to_check], holder, target, threshold)\
} else {\
var/___sum = 0;\
var/list/___L = to_check;\
for(var/_S in ___L){\
var/___value;\
var/datum/skill/___S = GLOB.skill_datums[_S];\
switch(___S.progression_type){\
if(SKILL_PROGRESSION_LEVEL){\
___value = LAZYACCESS(holder.skill_levels, ___S.type)\
} else {\
___value = LAZYACCESS(holder.skills, ___S.type)\
}\
}\
___sum += (1+(___value - ___S.competency_thresholds[threshold])*___S.competency_mults[threshold])\
/// This is the one that accepts typepaths and lists. if flags are enabled, an associative value check will be done.
#define LIST_SKILL_MODIFIER(list, holder, target, threshold, flags, bad_flags) \
var/___sum = 0;\
var/___divisor = 0;\
for(var/_S in list){\
if((flags && !(list[_S] & (flags))) || (bad_flags && list[_S] & (bad_flags))){\
continue\
}\
target /= (___sum/length(___L))\
var/___value;\
var/datum/skill/___S = GLOB.skill_datums[_S];\
switch(___S.progression_type){\
if(SKILL_PROGRESSION_LEVEL){\
___value = LAZYACCESS(holder.skill_levels, ___S.type)\
} else {\
___value = LAZYACCESS(holder.skills, ___S.type)\
}\
}\
___sum += (1+(___value - ___S.competency_thresholds[threshold])*___S.competency_mults[threshold]);\
___divisor++\
}\
if(___divisor){\
target /= (___sum/___divisor)\
}
//How experience levels are calculated.