| summaryrefslogtreecommitdiff |
diff options
| author | nsensfel <SpamShield0@noot-noot.org> | 2018-08-27 18:03:22 +0200 |
|---|---|---|
| committer | nsensfel <SpamShield0@noot-noot.org> | 2018-08-27 18:03:22 +0200 |
| commit | 92c21e348391af5fc3c2d68af0e6c6bfd7a40b03 (patch) | |
| tree | 0c796b0ac0926836be68643eda7ef1aeb2993365 /weapon/global.m4.conf | |
| parent | e30f2f4b5911bece4da090af4dc749cfce37e100 (diff) | |
...
Diffstat (limited to 'weapon/global.m4.conf')
| -rw-r--r-- | weapon/global.m4.conf | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/weapon/global.m4.conf b/weapon/global.m4.conf index d733be0..498ea01 100644 --- a/weapon/global.m4.conf +++ b/weapon/global.m4.conf @@ -1,30 +1,29 @@ +m4_include(__MAKEFILE_DATA_DIR`/modifiers.m4.conf')m4_dnl m4_define(`__WEAPON_CHOOSE_STYLE', `m4_define(`__WEAPON',m4_defn(`$1'))m4_undefine(`$1')')m4_dnl m4_define(`__WEAPON_ERLANG_STYLE',`from_id (`$1') -> #weapon { id = $1, name = <<"$2">>, - range_type = $3, - range_mod = $4, - damage_type = $5, - damage_mod = $6, - coef = $7 + max_range = $3, + min_range = $4, + attr_mod = $5, + stat_mod = $6, + atk_mod = $7, + def_mod = $8 }; ')m4_dnl -m4_define(`__WEAPON_RANGE_TYPE_TO_CHAR',`m4_ifelse($1,melee,m,$1,ranged,r)')m4_dnl -m4_define(`__WEAPON_RANGE_MOD_TO_CHAR',`m4_ifelse($1,long,l,$1,short,s)')m4_dnl -m4_define(`__WEAPON_DAMAGE_TYPE_TO_CHAR',`m4_ifelse($1,slash,s,$1,pierce,p,$1,blunt,b)')m4_dnl -m4_define(`__WEAPON_DAMAGE_MOD_TO_CHAR',`m4_ifelse($1,heavy,h,$1,light,l)')m4_dnl m4_define(`__WEAPON_JSON_STYLE',` { "msg": "add_weapon", "id": $1, "nam": "$2", - "rt": "__WEAPON_RANGE_TYPE_TO_CHAR($3)", - "rm": "__WEAPON_RANGE_MOD_TO_CHAR($4)", - "dt": "__WEAPON_DAMAGE_TYPE_TO_CHAR($5)", - "dm": "__WEAPON_DAMAGE_MOD_TO_CHAR($6)", - "cf": $7 + "rma": $3, + "rmi": $4, + "attm": $5, + "stam": $6, + "atkm": $7, + "defm": $8 }, ')m4_dnl -m4_define(`__WEAPON_USE_ERLANG_STYLE',`__WEAPON_CHOOSE_STYLE(`__WEAPON_ERLANG_STYLE')')m4_dnl -m4_define(`__WEAPON_USE_JSON_STYLE',`__WEAPON_CHOOSE_STYLE(`__WEAPON_JSON_STYLE')')m4_dnl +m4_define(`__WEAPON_USE_ERLANG_STYLE',`__WEAPON_CHOOSE_STYLE(`__WEAPON_ERLANG_STYLE')__MOD_USE_ERLANG_STYLE()')m4_dnl +m4_define(`__WEAPON_USE_JSON_STYLE',`__WEAPON_CHOOSE_STYLE(`__WEAPON_JSON_STYLE')__MOD_USE_JSON_STYLE()')m4_dnl |


