summaryrefslogtreecommitdiff
path: root/weapon
diff options
context:
space:
mode:
authornsensfel <SpamShield0@noot-noot.org>2018-07-13 16:01:16 +0200
committernsensfel <SpamShield0@noot-noot.org>2018-07-13 16:01:16 +0200
commitea725eaeda94d47b4d1e4cf5cc0029f3d99760f9 (patch)
tree716657217aa3edc674993af5d76ea69b8efe2f12 /weapon
Adds current data.
Diffstat (limited to 'weapon')
-rw-r--r--weapon/basic.m4d25
-rw-r--r--weapon/global.m4.conf30
2 files changed, 55 insertions, 0 deletions
diff --git a/weapon/basic.m4d b/weapon/basic.m4d
new file mode 100644
index 0000000..7824217
--- /dev/null
+++ b/weapon/basic.m4d
@@ -0,0 +1,25 @@
+__WEAPON(0,None,melee,short,blunt,light,0.3)m4_dnl
+__WEAPON(1,Dagger,melee,short,slash,light,1.0)m4_dnl
+__WEAPON(2,Sword,melee,short,slash,heavy,1.0)m4_dnl
+__WEAPON(3,Claymore,melee,long,slash,light,1.0)m4_dnl
+__WEAPON(4,Bardiche,melee,long,slash,heavy,1.0)m4_dnl
+__WEAPON(5,Stiletto,melee,short,pierce,light,1.0)m4_dnl
+__WEAPON(6,Pickaxe,melee,short,pierce,heavy,1.0)m4_dnl
+__WEAPON(7,Rapier,melee,long,pierce,light,1.0)m4_dnl
+__WEAPON(8,Pike,melee,long,pierce,heavy,1.0)m4_dnl
+__WEAPON(9,Club,melee,short,blunt,light,1.0)m4_dnl
+__WEAPON(10,Mace,melee,short,blunt,heavy,1.0)m4_dnl
+__WEAPON(11,Staff,melee,long,blunt,light,1.0)m4_dnl
+__WEAPON(12,War Hammer,melee,long,blunt,heavy,1.0)m4_dnl
+__WEAPON(13,Short Bow (Broadhead),ranged,short,slash,light,1.0)m4_dnl
+__WEAPON(14,Short Bow (Blunt),ranged,short,blunt,light,1.0)m4_dnl
+__WEAPON(15,Short Bow (Bodkin Point),ranged,short,pierce,light,1.0)m4_dnl
+__WEAPON(16,Long Bow (Broadhead),ranged,long,slash,light,1.0)m4_dnl
+__WEAPON(17,Long Bow (Blunt),ranged,long,blunt,light,1.0)m4_dnl
+__WEAPON(18,Long Bow (Bodkin Point),ranged,long,pierce,light,1.0)m4_dnl
+__WEAPON(19,Crossbow (Broadhead),ranged,short,slash,heavy,1.0)m4_dnl
+__WEAPON(20,Crossbow (Blunt),ranged,short,blunt,heavy,1.0)m4_dnl
+__WEAPON(21,Crossbow (Bodkin Point),ranged,short,pierce,heavy,1.0)m4_dnl
+__WEAPON(22,Arbalest (Broadhead),ranged,long,slash,heavy,1.0)m4_dnl
+__WEAPON(23,Arbalest (Blunt),ranged,long,blunt,heavy,1.0)m4_dnl
+__WEAPON(24,Arbalest (Bodkin Point),ranged,long,pierce,heavy,1.0)m4_dnl
diff --git a/weapon/global.m4.conf b/weapon/global.m4.conf
new file mode 100644
index 0000000..4e6fbd9
--- /dev/null
+++ b/weapon/global.m4.conf
@@ -0,0 +1,30 @@
+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
+ };
+')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
+ },
+')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