1# Martial arts and techniques JSON file contents
2
3### Martial arts
4
5```C++
6"type" : "martial_art",
7"id" : "style_debug",       // Unique ID. Must be one continuous word,
8                            // use underscores if necessary.
9"name" : "Debug Mastery",   // In-game name displayed
10"description": "A secret martial art used only by developers and cheaters.",    // In-game description
11"initiate": [ "You stand ready.", "%s stands ready." ],     // Message shown when player or NPC chooses this art
12"autolearn": [ [ "unarmed", "2" ] ],     // A list of skill requirements that if met, automatically teach the player the martial art
13"learn_difficulty": 5,      // Difficulty to learn a style from book based on "primary skill"
14                            // Total chance to learn a style from a single read of the book is equal to one in (10 + learn_difficulty - primary_skill)
15"arm_block" : 99,           // Unarmed skill level at which arm blocking is unlocked
16"leg_block" : 99,           // Unarmed skill level at which arm blocking is unlocked
17"static_buffs" : [          // List of buffs that are automatically applied every turn
18    "id" : "debug_elem_resist",
19    "heat_arm_per" : 1.0
20],
21"ondodge_buffs" : []        // List of buffs that are automatically applied on successful dodge
22"onattack_buffs" : []       // List of buffs that are automatically applied after any attack, hit or miss
23"onhit_buffs" : []          // List of buffs that are automatically applied on successful hit
24"onmove_buffs" : []         // List of buffs that are automatically applied on movement
25"onmiss_buffs" : []         // List of buffs that are automatically applied on a miss
26"oncrit_buffs" : []         // List of buffs that are automatically applied on a crit
27"onkill_buffs" : []         // List of buffs that are automatically applied upon killing an enemy
28"techniques" : [            // List of techniques available when this martial art is used
29    "tec_debug_slow",
30    "tec_debug_arpen"
31]
32"weapons": [ "tonfa" ]      // List of weapons usable with this art
33
34```
35
36### Techniques
37
38```C++
39"id" : "tec_debug_arpen",   // Unique ID. Must be one continuous word
40"name" : "phasing strike",  // In-game name displayed
41"unarmed_allowed" : true,   // Can an unarmed character use this technique
42"unarmed_weapons_allowed" : true,    // Does this technique require the character to be actually unarmed or does it allow unarmed weapons
43"melee_allowed" : true,     // Means that ANY melee weapon can be used, NOT just the martial art's weapons
44"skill_requirements": [ { "name": "melee", "level": 3 } ],     // Skills and their minimum levels required to use this technique. Can be any skill.
45"weapon_damage_requirements": [ { "type": "bash", "min": 5 } ],     // Minimum weapon damage required to use this technique. Can be any damage type.
46"req_buffs": [ "eskrima_hit_buff" ],    // This technique requires a named buff to be active
47"crit_tec" : true,          // This technique only works on a critical hit
48"crit_ok" : true,           // This technique works on both normal and critical hits
49"downed_target": true,      // Technique only works on a downed target
50"stunned_target": true,     // Technique only works on a stunned target
51"human_target": true,       // Technique only works on a human-like target
52"knockback_dist": 1,        // Distance target is knocked back
53"knockback_spread": 1,      // The knockback may not send the target straight back
54"knockback_follow": 1,      // Attacker will follow target if they are knocked back
55"stun_dur": 2,              // Duration that target is stunned for
56"down_dur": 2,              // Duration that target is downed for
57"side_switch": true,        // Technique moves the target behind user
58"disarms": true,            // This technique can disarm the opponent
59"take_weapon": true,        // Technique will disarm and equip target's weapon if hands are free
60"grab_break": true,         // This technique may break a grab against the user
61"aoe": "spin",              // This technique has an area-of-effect; doesn't work against solo targets
62"block_counter": true,      // This technique may automatically counterattack on a successful block
63"dodge_counter": true,      // This technique may automatically counterattack on a successful dodge
64"weighting": 2,             // Affects likelihood this technique will be seleted when many are available
65"defensive": true,          // Game won't try to select this technique when attacking
66"miss_recovery": true,      // Misses while attacking will use fewer moves
67"messages" : [              // What is printed when this technique is used by the player and by an npc
68    "You phase-strike %s",
69    "<npcname> phase-strikes %s"
70]
71"movecost_mult" : 0.3       // Any bonuses, as described below
72```
73
74### Buffs
75
76```C++
77"id" : "debug_elem_resist",         // Unique ID. Must be one continuous word
78"name" : "Elemental resistance",    // In-game name displayed
79"description" : "+Strength bash armor, +Dexterity acid armor, +Intelligence electricity armor, +Perception fire armor.",    // In-game description
80"buff_duration": 2,                 // Duration in turns that this buff lasts
81"unarmed_allowed" : true,           // Can this buff be applied to an unarmed character
82"unarmed_allowed" : false,          // Can this buff be applied to an armed character
83"unarmed_weapons_allowed" : true,          // Does this buff require the character to be actually unarmed. If true, allows unarmed weapons (brass knuckles, punch daggers)
84"max_stacks" : 8,                   // Maximum number of stacks on the buff. Buff bonuses are multiplied by current buff intensity
85"bonus_blocks": 1       // Extra blocks per turn
86"bonus_dodges": 1       // Extra dodges per turn
87"flat_bonuses" : [                  // Flat bonuses, see below
88],
89"mult_bonuses" : [                  // Multiplicative bonuses, see below
90]
91```
92
93### Bonuses
94
95The bonuses arrays contain any number of bonus entries like this:
96
97```C++
98{
99  "stat": "damage",
100  "type": "bash",
101  "scaling-stat": "per",
102  "scale": 0.15
103}
104```
105
106"stat": affected statistic, any of: "hit", "dodge", "block", "speed", "movecost", "damage", "armor", "arpen",
107"type": damage type for the affected statistic ("bash", "cut", "heat", etc.), only needed if the affected statistic is "damage", "armor", or "arpen".
108"scale": the value of the bonus itself.
109"scaling-stat": scaling stat, any of: "str", "dex", "int", "per". Optional. If the scaling stat is specified, the value of the bonus is multiplied by the corresponding user stat.
110
111Bonuses must be written in the correct order.
112
113Tokens of `useless` type will not cause an error, but will not have any effect.
114For example, `speed` in a technique will have no effect (`movecost` should be used for techniques).
115
116Currently extra elemental damage is not applied, but extra elemental armor is (after regular armor).
117
118Examples:
119Incoming bashing damage is decreased by 30% of strength value. Only useful on buffs:
120* `flat_bonuses : [ { "stat": "armor", "type": "bash", "scaling-stat": "str", "scale": 0.3 } ]`
121
122All cutting damage dealt is multiplied by `(10% of dexterity)*(damage)`:
123* `mult_bonuses : [ { "stat": "damage", "type": "cut", "scaling-stat": "dex", "scale": 0.1 } ]`
124
125Move cost is decreased by 100% of strength value
126* `flat_bonuses : [ { "stat": "movecost", "scaling-stat": "str", "scale": -1.0 } ]`
127
128### Place relevant items in the world and chargen
129
130Starting trait selection of your martial art goes in mutations.json. Place your art in the right category (self-defense, Shaolin animal form, melee style, etc)
131
132Use json/itemgroups/ to place your martial art book and any martial weapons you've made for the art into spawns in various locations in the world. If you don't place your weapons in there, only recipes to craft them will be an option.
133