summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2019-10-20 21:43:05 +0200
committerNathanael Sensfelder <SpamShield0@MultiAgentSystems.org>2019-10-20 21:43:05 +0200
commit44d4dbc70bda12d57205a35b69e883c8f52b61f7 (patch)
tree8d323f17416ce947a29a75b22d2246588124bd3e
parent3c7aec4446fe5a9d9447268a124a4746d0e2345a (diff)
downloadtacticians-data-master.zip
tacticians-data-master.tar.bz2
Adds skills.HEADmaster
-rw-r--r--condition/trigger.m4.conf36
-rw-r--r--skill/basic.m4d60
-rw-r--r--skill/global.m4.conf50
3 files changed, 110 insertions, 36 deletions
diff --git a/condition/trigger.m4.conf b/condition/trigger.m4.conf
deleted file mode 100644
index 90203e7..0000000
--- a/condition/trigger.m4.conf
+++ /dev/null
@@ -1,36 +0,0 @@
-m4_define(`__COND_TRIG_START_OF_PLAYER_TURN', sopt)m4_dnl
-m4_define(`__COND_TRIG_END_OF_PLAYER_TURN', eopt)m4_dnl
-m4_define(`__COND_TRIG_START_OF_CHARACTER_TURN', soct)m4_dnl
-m4_define(`__COND_TRIG_END_OF_CHARACTER_TURN', eoct)m4_dnl
-m4_dnl
-m4_define(`__COND_TRIG_START_OF_OWN_ATTACK', sooa)m4_dnl
-m4_define(`__COND_TRIG_END_OF_OWN_ATTACK', eooa)m4_dnl
-m4_define(`__COND_TRIG_START_OF_OWN_HIT', sooh)m4_dnl
-m4_define(`__COND_TRIG_END_OF_OWN_HIT', eooh)m4_dnl
-m4_dnl
-m4_define(`__COND_TRIG_OWN_DODGE', od)m4_dnl
-m4_define(`__COND_TRIG_OWN_CRITICAL', oc)m4_dnl
-m4_define(`__COND_TRIG_OWN_DOUBLE_HIT', odh)m4_dnl
-m4_define(`__COND_TRIG_OWN_DAMAGE', oda)m4_dnl
-m4_dnl
-m4_define(`__COND_TRIG_START_OF_TARGET_ATTACK', sota)m4_dnl
-m4_define(`__COND_TRIG_END_OF_TARGET_ATTACK', eota)m4_dnl
-m4_define(`__COND_TRIG_START_OF_TARGET_HIT', soth)m4_dnl
-m4_define(`__COND_TRIG_END_OF_TARGET_HIT', eoth)m4_dnl
-m4_dnl
-m4_define(`__COND_TRIG_TARGET_DODGE', td)m4_dnl
-m4_define(`__COND_TRIG_TARGET_CRITICAL', tc)m4_dnl
-m4_define(`__COND_TRIG_TARGET_DOUBLE_HIT', tdh)m4_dnl
-m4_define(`__COND_TRIG_TARGET_DAMAGE', tda)m4_dnl
-m4_dnl
-m4_define(`__COND_TRIG_START_OF_MOVEMENT', som)m4_dnl
-m4_define(`__COND_TRIG_END_OF_MOVEMENT', eom)m4_dnl
-m4_define(`__COND_TRIG_WEAPON_SWITCH', ws)m4_dnl
-m4_define(`__COND_TRIG_SKILL_USE', su)m4_dnl
-m4_dnl
-m4_define(`__COND_TRIG_DEATH', de)m4_dnl
-m4_dnl
-m4_define(`__COND_TRIG_START_OF_BATTLE', sob)m4_dnl
-m4_define(`__COND_TRIG_END_OF_BATTLE', eob)m4_dnl
-m4_dnl
-m4_define(`__COND_TRIG_IMMEDIATELY', im)m4_dnl
diff --git a/skill/basic.m4d b/skill/basic.m4d
new file mode 100644
index 0000000..9f883eb
--- /dev/null
+++ b/skill/basic.m4d
@@ -0,0 +1,60 @@
+__SKILL(0,
+ btl_skill_static_heal,
+ Small Improvised Bandage,
+ 5,
+ 10,
+ 1,
+ 0,
+ 0,
+ 1,
+ -1,
+ 10,
+ 1)m4_dnl
+__SKILL(1,
+ btl_skill_static_heal,
+ Improvised Bandage,
+ 8,
+ 10,
+ 1,
+ 0,
+ 0,
+ 1,
+ -1,
+ 20,
+ 1)m4_dnl
+__SKILL(2,
+ btl_skill_static_heal,
+ Bandage,
+ 10,
+ 10,
+ 1,
+ 0,
+ 0,
+ 1,
+ -1,
+ 30,
+ 1)m4_dnl
+__SKILL(3,
+ btl_skill_shields_up,
+ Protection,
+ 7,
+ 7,
+ 1,
+ 0,
+ 0,
+ 1,
+ -1,
+ 5,
+ 0)m4_dnl
+__SKILL(4,
+ btl_skill_attack_anywhere,
+ Attack Anywhere,
+ 10,
+ 10,
+ 1,
+ 0,
+ 0,
+ 1,
+ -1,
+ 0,
+ -1)m4_dnl
diff --git a/skill/global.m4.conf b/skill/global.m4.conf
new file mode 100644
index 0000000..7a7cd10
--- /dev/null
+++ b/skill/global.m4.conf
@@ -0,0 +1,50 @@
+m4_define(`__SKILL_CHOOSE_STYLE',
+ `m4_define(`__SKILL',m4_defn(`$1'))m4_undefine(`$1')')m4_dnl
+m4_dnl
+m4_dnl
+m4_dnl
+m4_define(`__SKILL_ERLANG_STYLE',`from_id (<<"`$1'">>) ->
+ #skill
+ {
+ id = <<"$1">>,
+ module = $2,
+ name = <<"$3">>,
+ cost = $4,
+ reserve = $5,
+ targets = $6,
+ locations = $7,
+ duration = $8,
+ uses = $9,
+ chance = $10,
+ power = $11,
+ range = $12
+ };
+')m4_dnl
+m4_define(`__SKILL_USE_ERLANG_STYLE',
+ `__SKILL_CHOOSE_STYLE(`__SKILL_ERLANG_STYLE')')m4_dnl
+m4_dnl
+m4_dnl
+m4_dnl
+m4_define(`__SKILL_JSON_STYLE',` {
+ "msg": "add_skill",
+ "id": "$1",
+ "nam": "$3",
+ "cos": $4,
+ "res": $5,
+ "tar": $6,
+ "loc": $7,
+ "dur": $8,
+ "use": $9,
+ "cha": $10,
+ "pow": $11,
+ "ran": $12
+ },
+')m4_dnl
+m4_define(`__SKILL_USE_JSON_STYLE',
+ `__SKILL_CHOOSE_STYLE(`__SKILL_JSON_STYLE')')m4_dnl
+m4_dnl
+m4_dnl
+m4_dnl
+m4_ifelse(__CODE_STYLE(),
+ erlang, `__SKILL_USE_ERLANG_STYLE()',
+ __CODE_STYLE(), json, `__SKILL_USE_JSON_STYLE()')m4_dnl