Skip to content

Commit d8b8100

Browse files
authored
Pruning the old to-hit syntax - Part 12 (CleverRaven#78496)
* ranged folder * wood and tailoring * stone and misc * glass, metal, and home improvement * get started on tools * clean up the comments in this one or I'll go insane * deployables * the booms * Update throwing.json * please the tests
1 parent 2a8e243 commit d8b8100

File tree

18 files changed

+149
-281
lines changed

18 files changed

+149
-281
lines changed

data/json/items/ranged/slings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
"volume": "1375 ml",
8282
"longest_side": "150 cm",
8383
"price_postapoc": "2 USD 50 cent",
84-
"to_hit": 1,
84+
"to_hit": { "grip": "solid", "length": "long", "surface": "any", "balance": "uneven" },
8585
"ranged_damage": { "damage_type": "bullet", "amount": 10 },
8686
"range": 10,
8787
"dispersion": 200,
@@ -90,7 +90,7 @@
9090
"valid_mod_locations": [ [ "bore", 1 ] ],
9191
"reload": 50,
9292
"pocket_data": [ { "pocket_type": "MAGAZINE", "ammo_restriction": { "rock": 1 }, "open_container": true } ],
93-
"melee_damage": { "bash": 16 }
93+
"melee_damage": { "bash": 14 }
9494
},
9595
{
9696
"id": "wristrocket",

data/json/items/ranged/throwing.json

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
"material": [ "cotton", "stone" ],
1313
"symbol": ";",
1414
"color": "blue",
15-
"to_hit": -1,
1615
"ammo_type": "thrown",
1716
"flags": [ "NOGIB", "TANGLE", "PRIMITIVE_RANGED_WEAPON" ]
1817
},
@@ -44,9 +43,7 @@
4443
"description": "A plastic frisbee made for outdoor games.",
4544
"material": [ "plastic" ],
4645
"volume": "500 ml",
47-
"weight": "175 g",
48-
"thrown_damage": [ { "damage_type": "bash", "amount": 1 } ],
49-
"melee_damage": { "bash": 1 }
46+
"weight": "175 g"
5047
},
5148
{
5249
"id": "net",
@@ -78,9 +75,9 @@
7875
"volume": "500 ml",
7976
"weight": "175 g",
8077
"longest_side": "30 cm",
81-
"to_hit": -1,
82-
"thrown_damage": [ { "damage_type": "stab", "amount": 16 } ],
83-
"melee_damage": { "cut": 8 }
78+
"to_hit": { "grip": "weapon", "length": "short", "surface": "point", "balance": "neutral" },
79+
"thrown_damage": [ { "damage_type": "stab", "amount": 12 } ],
80+
"melee_damage": { "cut": 4 }
8481
},
8582
{
8683
"type": "GENERIC",
@@ -97,7 +94,7 @@
9794
"volume": "500 ml",
9895
"weight": "300 g",
9996
"longest_side": "30 cm",
100-
"to_hit": -1,
97+
"to_hit": { "grip": "weapon", "length": "short", "surface": "point", "balance": "neutral" },
10198
"thrown_damage": [ { "damage_type": "stab", "amount": 18 }, { "damage_type": "bash", "amount": 4 } ],
10299
"melee_damage": { "cut": 8 }
103100
},
@@ -115,7 +112,7 @@
115112
"volume": "3058 ml",
116113
"weight": "1000 g",
117114
"longest_side": "43 cm",
118-
"to_hit": -1,
115+
"to_hit": { "grip": "weapon", "length": "short", "surface": "line", "balance": "uneven" },
119116
"weapon_category": [ "HAND_AXES" ],
120117
"thrown_damage": [ { "damage_type": "bash", "amount": 6 }, { "damage_type": "cut", "amount": 16 } ],
121118
"melee_damage": { "bash": 10, "cut": 17 }
@@ -126,7 +123,7 @@
126123
"category": "weapons",
127124
"price": "52 USD",
128125
"price_postapoc": "5 USD",
129-
"to_hit": { "grip": "none", "length": "hand", "surface": "line", "balance": "neutral" },
126+
"to_hit": { "grip": "none", "length": "hand", "surface": "point", "balance": "neutral" },
130127
"name": { "str": "throwing knife", "str_pl": "throwing knives" },
131128
"symbol": ";",
132129
"color": "light_gray",
@@ -138,7 +135,7 @@
138135
"flags": [ "SHEATH_KNIFE", "ALLOWS_BODY_BLOCK" ],
139136
"weapon_category": [ "KNIVES" ],
140137
"thrown_damage": [ { "damage_type": "stab", "amount": 14 } ],
141-
"melee_damage": { "bash": 1, "stab": 10 }
138+
"melee_damage": { "stab": 10 }
142139
},
143140
{
144141
"id": "throwing_stick",

data/json/items/resources/glass.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"done_message": "You carefully place the shards on the ground, ready to be cracked by something passing by."
1919
},
2020
"flags": [ "HURT_WHEN_WIELDED", "TRADER_AVOID", "SINGLE_USE", "FRAGILE_MELEE", "ALLOWS_BODY_BLOCK" ],
21-
"to_hit": -1,
21+
"to_hit": { "grip": "bad", "length": "hand", "surface": "point", "balance": "neutral" },
2222
"melee_damage": { "cut": 6 },
2323
"weapon_category": [ "SHIVS" ]
2424
},
@@ -36,7 +36,7 @@
3636
"weight": "6577 g",
3737
"volume": "2655 ml",
3838
"longest_side": "122 cm",
39-
"to_hit": -5,
39+
"to_hit": { "grip": "bad", "length": "long", "surface": "any", "balance": "clumsy" },
4040
"use_action": {
4141
"type": "place_trap",
4242
"trap": "tr_glass",
@@ -61,7 +61,7 @@
6161
"weight": "45900 g",
6262
"volume": "21200 ml",
6363
"longest_side": "122 cm",
64-
"to_hit": -6,
64+
"to_hit": { "grip": "bad", "length": "long", "surface": "any", "balance": "clumsy" },
6565
"melee_damage": { "bash": 6 }
6666
},
6767
{
@@ -94,7 +94,7 @@
9494
"weight": "17514 g",
9595
"volume": "7070 ml",
9696
"longest_side": "122 cm",
97-
"to_hit": -5,
97+
"to_hit": { "grip": "bad", "length": "long", "surface": "any", "balance": "clumsy" },
9898
"melee_damage": { "bash": 6 }
9999
}
100100
]

data/json/items/resources/home_improvement.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,7 @@
182182
"price_postapoc": "50 cent",
183183
"material": [ "brass", "glass" ],
184184
"weight": "5 g",
185-
"volume": "250 ml",
186-
"to_hit": -3
185+
"volume": "250 ml"
187186
},
188187
{
189188
"type": "GENERIC",
@@ -198,7 +197,6 @@
198197
"price_postapoc": "50 cent",
199198
"material": [ "plastic" ],
200199
"weight": "25 g",
201-
"volume": "1000 ml",
202-
"to_hit": -3
200+
"volume": "1000 ml"
203201
}
204202
]

data/json/items/resources/metal.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
"category": "spare_parts",
6666
"weight": "345 g",
6767
"longest_side": "60 cm",
68-
"to_hit": -1,
68+
"to_hit": { "grip": "solid", "length": "short", "surface": "any", "balance": "neutral" },
6969
"color": "light_red",
7070
"symbol": "/",
7171
"material": [ "copper" ],
@@ -248,7 +248,7 @@
248248
"//": "Roughly in the 15cm×15cm to 20cm×20cm range. Compact and stacks well, so equally dense as a solid block.",
249249
"price": "20 USD",
250250
"price_postapoc": "10 cent",
251-
"to_hit": -3,
251+
"to_hit": { "grip": "bad", "length": "hand", "surface": "any", "balance": "clumsy" },
252252
"stack_size": 8,
253253
"material": [ "lc_steel" ],
254254
"symbol": "]",
@@ -288,7 +288,7 @@
288288
"//1": "250ml × 8.0 = 2kg -> 1000g/unit @ stack 2; formed as a solid ingot so weight is 100% of this",
289289
"price": "20 USD",
290290
"price_postapoc": "50 cent",
291-
"to_hit": -4,
291+
"to_hit": { "grip": "bad", "length": "hand", "surface": "any", "balance": "clumsy" },
292292
"stack_size": 2,
293293
"material": [ "steel" ],
294294
"symbol": ",",

data/json/items/resources/misc.json

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
"type": "GENERIC",
44
"id": "bee_sting",
55
"name": { "str": "bee stinger" },
6-
"description": "A six-inch stinger from a giant bee. Makes a mediocre melee weapon.",
6+
"description": "A six-inch stinger from a giant bee. Makes a poor melee weapon.",
77
"weight": "540 g",
8-
"to_hit": -1,
8+
"to_hit": { "grip": "bad", "length": "hand", "surface": "point", "balance": "neutral" },
99
"color": "white",
1010
"symbol": ",",
1111
"material": [ "flesh" ],
@@ -14,7 +14,7 @@
1414
"weapon_category": [ "SHIVS" ],
1515
"price": "30 USD",
1616
"price_postapoc": "0 cent",
17-
"melee_damage": { "stab": 10 }
17+
"melee_damage": { "stab": 8 }
1818
},
1919
{
2020
"type": "GENERIC",
@@ -23,7 +23,7 @@
2323
"description": "A long-handled broom. Makes a terrible weapon unless you're chasing cats.",
2424
"weight": "929 g",
2525
"longest_side": "140 cm",
26-
"to_hit": 1,
26+
"to_hit": { "grip": "solid", "length": "long", "surface": "any", "balance": "neutral" },
2727
"color": "yellow",
2828
"symbol": "/",
2929
"material": [ "wood" ],
@@ -57,7 +57,7 @@
5757
"name": { "str": "fungal fighter stinger" },
5858
"description": "A short dart from a fungal fighter. Makes a poor melee weapon.",
5959
"weight": "270 g",
60-
"to_hit": -1,
60+
"to_hit": { "grip": "bad", "length": "hand", "surface": "point", "balance": "neutral" },
6161
"color": "green",
6262
"symbol": ",",
6363
"material": [ "veggy" ],
@@ -165,7 +165,7 @@
165165
"weight": "500 g",
166166
"volume": "250 ml",
167167
"longest_side": "8 cm",
168-
"to_hit": -3,
168+
"to_hit": { "grip": "none", "length": "hand", "surface": "line", "balance": "neutral" },
169169
"qualities": [ [ "CUT", 1 ], [ "BUTCHER", -50 ] ],
170170
"flags": [ "ALLOWS_BODY_BLOCK" ],
171171
"melee_damage": { "bash": 5, "cut": 3 },
@@ -228,16 +228,15 @@
228228
"price_postapoc": "2 USD 50 cent",
229229
"material": [ "plastic", "steel" ],
230230
"weight": "600 g",
231-
"volume": "250 ml",
232-
"to_hit": 1
231+
"volume": "250 ml"
233232
},
234233
{
235234
"type": "GENERIC",
236235
"id": "wasp_sting",
237236
"name": { "str": "wasp stinger" },
238237
"description": "A six-inch stinger from a giant wasp. Makes a poor melee weapon.",
239238
"weight": "540 g",
240-
"to_hit": -1,
239+
"to_hit": { "grip": "bad", "length": "hand", "surface": "point", "balance": "neutral" },
241240
"color": "dark_gray",
242241
"symbol": ",",
243242
"material": [ "flesh" ],
@@ -258,7 +257,7 @@
258257
"material": [ "steel" ],
259258
"weight": "1814 g",
260259
"volume": "200 ml",
261-
"to_hit": -5,
260+
"to_hit": { "grip": "bad", "length": "hand", "surface": "any", "balance": "clumsy" },
262261
"flags": [ "TRADER_AVOID" ],
263262
"melee_damage": { "bash": 15 }
264263
},

data/json/items/resources/stone.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"range": 10,
1818
"dispersion": 14,
1919
"loudness": 0,
20-
"to_hit": -1,
20+
"to_hit": { "grip": "none", "length": "hand", "surface": "any", "balance": "neutral" },
2121
"recovery_chance": 98,
2222
"effects": [ "NEVER_MISFIRES", "NON_FOULING" ],
2323
"melee_damage": { "bash": 7 }
@@ -85,7 +85,7 @@
8585
"material": [ "stone" ],
8686
"volume": "250 ml",
8787
"longest_side": "40 cm",
88-
"to_hit": -1,
88+
"to_hit": { "grip": "none", "length": "short", "surface": "any", "balance": "uneven" },
8989
"melee_damage": { "bash": 7 }
9090
},
9191
{
@@ -101,8 +101,8 @@
101101
"price_postapoc": "20 cent",
102102
"material": [ "stone" ],
103103
"volume": "36 L",
104-
"longest_side": "2000 cm",
105-
"to_hit": { "grip": "bad", "length": "short", "surface": "any", "balance": "clumsy" },
104+
"longest_side": "200 cm",
105+
"to_hit": { "grip": "bad", "length": "long", "surface": "any", "balance": "clumsy" },
106106
"melee_damage": { "bash": 28 }
107107
},
108108
{
@@ -119,8 +119,8 @@
119119
"material": [ "stone" ],
120120
"volume": "250 ml",
121121
"longest_side": "40 cm",
122-
"to_hit": -1,
123-
"melee_damage": { "bash": 7 }
122+
"to_hit": { "grip": "none", "length": "short", "surface": "any", "balance": "uneven" },
123+
"melee_damage": { "bash": 5 }
124124
},
125125
{
126126
"type": "GENERIC",
@@ -135,8 +135,8 @@
135135
"price_postapoc": "20 cent",
136136
"material": [ "stone" ],
137137
"volume": "36 L",
138-
"longest_side": "2000 cm",
139-
"to_hit": { "grip": "bad", "length": "short", "surface": "any", "balance": "clumsy" },
138+
"longest_side": "200 cm",
139+
"to_hit": { "grip": "bad", "length": "long", "surface": "any", "balance": "clumsy" },
140140
"melee_damage": { "bash": 28 }
141141
}
142142
]

data/json/items/resources/tailoring.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -259,8 +259,7 @@
259259
"flags": [ "NO_SALVAGE" ],
260260
"weight": "40 g",
261261
"volume": "125 ml",
262-
"category": "spare_parts",
263-
"to_hit": -1
262+
"category": "spare_parts"
264263
},
265264
{
266265
"type": "GENERIC",
@@ -310,8 +309,7 @@
310309
"flags": [ "NO_SALVAGE" ],
311310
"weight": "372 g",
312311
"volume": "465 ml",
313-
"category": "spare_parts",
314-
"to_hit": -1
312+
"category": "spare_parts"
315313
},
316314
{
317315
"type": "GENERIC",

data/json/items/resources/wood.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"weight": "30 kg",
1414
"volume": "50 L",
1515
"longest_side": "140 cm",
16-
"to_hit": -10,
16+
"to_hit": { "grip": "none", "length": "long", "surface": "any", "balance": "clumsy" },
1717
"flags": [ "FIREWOOD" ],
1818
"melee_damage": { "bash": 10 }
1919
},
@@ -29,11 +29,11 @@
2929
"weight": "150 g",
3030
"volume": "250 ml",
3131
"longest_side": "30 cm",
32-
"to_hit": 1,
32+
"to_hit": { "grip": "bad", "length": "hand", "surface": "any", "balance": "neutral" },
3333
"qualities": [ [ "COOK", 1 ] ],
3434
"use_action": [ "HEAT_SOLID_ITEMS" ],
3535
"flags": [ "NO_SALVAGE", "TRADER_AVOID", "FIREWOOD" ],
36-
"melee_damage": { "bash": 4 }
36+
"melee_damage": { "bash": 2 }
3737
},
3838
{
3939
"type": "GENERIC",
@@ -363,7 +363,7 @@
363363
"category": "spare_parts",
364364
"weight": "12 kg",
365365
"longest_side": "122 cm",
366-
"to_hit": 1,
366+
"to_hit": { "grip": "none", "length": "long", "surface": "any", "balance": "clumsy" },
367367
"color": "brown",
368368
"looks_like": "2x4",
369369
"symbol": "H",
@@ -383,7 +383,7 @@
383383
"//": "Weight and volume assumes 32 square feet of 1/2 inch plywood. Due to its enormously bulky shape, volume is higher than actual displacement volume",
384384
"category": "spare_parts",
385385
"weight": "24 kg",
386-
"to_hit": 1,
386+
"to_hit": { "grip": "none", "length": "long", "surface": "any", "balance": "clumsy" },
387387
"color": "brown",
388388
"symbol": "H",
389389
"material": [ "wood" ],
@@ -402,8 +402,8 @@
402402
"description": "A giant screw carved out of solid wood, a simple component used to convert rotational energy into a downward movement of greater force.",
403403
"category": "spare_parts",
404404
"//": "weight for a bit less than 3x3x4 wooden beam at 0.60 g/cm3 density, substracted from wood beam stats above",
405-
"weight": "15000 g",
406-
"volume": "25000 ml",
405+
"weight": "15 kg",
406+
"volume": "25 L",
407407
"longest_side": "120 cm",
408408
"color": "brown",
409409
"symbol": "§",

0 commit comments

Comments
 (0)