Skip to content

Commit

Permalink
Merge pull request CleverRaven#17632 from mugling/format4
Browse files Browse the repository at this point in the history
JSON linter ruleset (part 4)
  • Loading branch information
Coolthulhu authored Jul 12, 2016
2 parents 3734eed + 1bd8ebc commit ebe14bb
Show file tree
Hide file tree
Showing 6 changed files with 764 additions and 248 deletions.
38 changes: 38 additions & 0 deletions tools/format/examples/furniture.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
[
{
"id": "f_canvas_wall",
"type": "furniture",
"name": "canvas wall",
"symbol": "#",
"color": [ "blue" ],
"move_cost_mod": -1,
"required_str": -1,
"bash": {
"str_min": 1,
"str_max": 8,
"tent_centers": [ "f_groundsheet", "f_fema_groundsheet", "f_skin_groundsheet" ],
"sound": "rrrrip!",
"sound_fail": "slap!",
"sound_vol": 8
},
"flags": [ "FLAMMABLE_HARD", "NOITEM" ]
},
{
"id": "f_egg_sackbw",
"type": "furniture",
"name": "spider egg sack",
"symbol": "O",
"color": [ "white" ],
"move_cost_mod": 3,
"required_str": 6,
"examine_action": "egg_sackbw",
"bash": {
"str_min": 8,
"str_max": 16,
"furn_set": "f_egg_sacke",
"sound": "splat!",
"sound_fail": "whump."
},
"flags": [ "TRANSPARENT", "FLAMMABLE_ASH", "ORGANIC", "MOUNTABLE", "TINY" ]
}
]
101 changes: 101 additions & 0 deletions tools/format/examples/item_group.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
[
{
"id": "misc_smoking",
"type": "item_group",
"//": "Smokable item and something to light it with",
"subtype": "collection",
"items": [
{
"distribution": [
{ "item": "cig", "prob": 70, "charges": [ 1, 10 ] },
{
"collection": [
{ "item": "tobacco" },
{
"distribution": [
{ "item": "rolling_paper", "prob": 70 },
{ "item": "pipe_tobacco", "prob": 30 }
]
}
], "prob": 20
},
{ "item": "cigar", "prob": 5, "charges": [ 1, 1 ] },
{ "item": "joint", "prob": 5 }
]
},
{
"distribution": [
{ "item": "lighter" },
{ "item": "matches" }
]
}
]
},
{
"id": "mon_zombie_soldier_death_drops",
"type": "item_group",
"subtype": "collection",
"magazine": 100,
"ammo": 60,
"entries": [
{
"distribution": [
{ "group": "clothing_soldier_set", "prob": 65, "damage-min": 1, "damage-max": 4 },
{ "group": "clothing_soldier_winter_set", "prob": 35, "damage-min": 1, "damage-max": 4 }
]
},
{ "group": "gear_soldier_sidearm", "prob": 30, "damage-min": 1, "damage-max": 4 },
{
"collection": [
{
"distribution": [
{ "group": "guns_rifle_milspec", "prob": 75, "damage-min": 1, "damage-max": 4 },
{ "group": "guns_shotgun_milspec", "prob": 25, "damage-min": 1, "damage-max": 4 }
]
},
{
"distribution": [
{ "item": "red_dot_sight", "prob": 100 },
{ "item": "bayonet", "prob": 50 },
{ "item": "suppressor", "prob": 100 },
{ "item": "laser_sight", "prob": 50 },
{
"collection": [
{ "item": "m320" },
{ "group": "ammo_launcher_grenade" }
], "prob": 100
}
], "prob": 30
}
], "prob": 20
},
{
"distribution": [
{ "item": "LAW_Packed", "prob": 20 },
{ "item": "e_tool", "prob": 100 },
{ "item": "mask_gas", "prob": 100, "damage-min": 1, "damage-max": 4 },
{ "item": "two_way_radio", "prob": 50 },
{ "item": "c4", "prob": 10 }
], "prob": 20
},
{ "item": "grenade", "prob": 5 },
{ "group": "drugs_soldier", "prob": 20 },
{ "group": "mil_food", "prob": 15 },
{ "item": "id_military", "prob": 5 },
{ "item": "cash_card" },
{ "group": "misc_smoking", "prob": 30 }
]
},
{
"id": "tools_carpentry",
"type": "item_group",
"//": "Portable tools used for carpentry",
"items": [
{ "group": "tools_common", "prob": 100 },
[ "circsaw_off", 100 ],
[ "cordless_drill", 100 ],
[ "hand_drill", 20 ],
[ "nailgun", 100 ]
]
}
]
128 changes: 128 additions & 0 deletions tools/format/examples/monster.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
[
{
"id": "mon_razorclaw",
"type": "MONSTER",
"name": "razorclaw",
"description": "A man-sized crustacean clad in an iron-like chitin, capable of emitting the most horrible of shrieks. Often spotted near shipwrecks or other dark damp places, which it uses as nesting grounds.",
"default_faction": "razorclaw",
"species": [ "MUTANT" ],
"diff": 20,
"size": "MEDIUM",
"hp": 80,
"speed": 85,
"material": [ "flesh" ],
"symbol": "Y",
"color": "magenta",
"aggression": 4,
"morale": 100,
"melee_skill": 6,
"melee_dice": 4,
"melee_dice_sides": 6,
"melee_cut": 7,
"dodge": 2,
"armor_bash": 10,
"armor_cut": 18,
"vision_day": 30,
"vision_night": 15,
"special_attacks": [
[ "SHRIEK_ALERT", 6 ],
[ "SHRIEK_STUN", 1 ]
],
"anger_triggers": [ "PLAYER_CLOSE", "FRIEND_DIED", "FRIEND_ATTACKED", "HURT" ],
"fear_triggers": [ "FIRE" ],
"death_function": [ "NORMAL" ],
"flags": [ "SMELLS", "HEARS", "SEES", "CHITIN", "SWIMS", "GRABS", "ARTHROPOD_BLOOD" ]
},
{
"id": "mon_turret_rifle",
"type": "MONSTER",
"name": "milspec turret",
"description": "Leadworks LLC's T-4A1 Sentry. It features improved firmware over General Atomics' TX-1 9mm model and an automated M4 carbine.",
"default_faction": "military",
"species": [ "ROBOT" ],
"diff": 20,
"size": "SMALL",
"hp": 40,
"speed": 100,
"material": [ "steel" ],
"symbol": "2",
"color": "green",
"aggression": 100,
"morale": 100,
"armor_bash": 14,
"armor_cut": 16,
"luminance": 210,
"revert_to_itype": "bot_rifleturret",
"starting_ammo": { "556": 100 },
"special_attacks": [
{
"type": "gun",
"cooldown": 1,
"gun_type": "m4a1",
"ammo_type": "556",
"fake_skills": [ [ "gun", 6 ], [ "rifle", 8 ] ],
"fake_dex": 10,
"range": 18,
"ranges": [
[ 0, 8, "AUTO" ],
[ 9, 16, "DEFAULT" ]
]
}
],
"death_drops": {
"groups": [
[ "robots", 9 ],
[ "turret_rifle", 2 ]
]
},
"death_function": [ "EXPLODE" ],
"flags": [ "SEES", "NOHEAD", "ELECTRONIC", "IMMOBILE", "NO_BREATHE" ]
},
{
"id": "mon_zombie_runner",
"type": "MONSTER",
"name": "feral runner",
"description": "This recently-risen body moves quickly, darting its head back and forth and gnawing at its hands.",
"default_faction": "zombie",
"species": [ "ZOMBIE" ],
"diff": 4,
"size": "MEDIUM",
"hp": 70,
"speed": 105,
"material": [ "flesh" ],
"symbol": "Z",
"color": "brown_white",
"aggression": 100,
"morale": 100,
"melee_skill": 4,
"melee_dice": 4,
"melee_dice_sides": 3,
"melee_cut": 1,
"dodge": 1,
"armor_bash": 0,
"armor_cut": 0,
"vision_day": 40,
"vision_night": 3,
"special_attacks": [
{
"type": "bite",
"cooldown": 5,
"damage_max_instance": [
{
"damage_type": "stab",
"amount": 10,
"armor_multiplier": 0.7
}
]
}
],
"death_drops": "default_zombie_death_drops",
"death_function": [ "NORMAL" ],
"burn_into": "mon_zombie_scorched",
"upgrades": {
"half_life": 10,
"into": "mon_zombie_hunter"
},
"flags": [ "SEES", "HEARS", "SMELLS", "WARM", "BASHES", "POISON", "NO_BREATHE", "REVIVES", "BONES", "PUSH_MON" ]
}
]
61 changes: 61 additions & 0 deletions tools/format/examples/terrain.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
[
{
"id": "t_oil_circ_brkr_l",
"type": "terrain",
"name": "HV oil circuit breaker",
"symbol": "B",
"color": [ "ltgray" ],
"move_cost": 0,
"bash": {
"str_min": 20,
"str_max": 150,
"ter_set": "t_concrete",
"explosive": 6,
"sound": "pow!",
"sound_fail": "clang!",
"items": [
{ "item": "scrap", "count": [ 8, 16 ] },
{ "item": "steel_chunk", "count": [ 2, 6 ] },
{ "item": "ceramic_shard", "count": [ 0, 4 ] }
]
},
"deconstruct": {
"ter_set": "t_concrete",
"items": [
{ "item": "cable", "charges": [ 8, 24 ] },
{ "item": "power_supply", "count": [ 4, 8 ] },
{ "item": "amplifier", "count": [ 8, 16 ] },
{ "item": "steel_chunk", "count": [ 4, 16 ] },
{ "item": "scrap", "count": [ 12, 24 ] },
{ "item": "sheet_metal", "count": [ 6, 12 ] },
{ "item": "ceramic_shard", "count": [ 2, 6 ] }
]
},
"flags": [ "TRANSPARENT", "FLAMMABLE", "NOITEM", "WALL", "PERMEABLE" ]
},
{
"id": "t_tree_hickory",
"type": "terrain",
"name": "hickory tree",
"//": "barren in winter, harvestable in autum",
"symbol": "7",
"color": [ "light_green", "light_green", "brown_green", "brown" ],
"move_cost": 0,
"harvest_season": "AUTUMN",
"harvestable": "hickory_nut",
"transforms_into": "t_tree_hickory_harvested",
"examine_action": "tree_hickory",
"bash": {
"str_min": 80,
"str_max": 180,
"ter_set": "t_dirt",
"sound": "crunch!",
"sound_fail": "whack!",
"items": [
{ "item": "stick", "count": [ 3, 10 ] },
{ "item": "splinter", "count": [ 10, 25 ] }
]
},
"flags": [ "FLAMMABLE_ASH", "NOITEM", "SUPPORTS_ROOF", "TREE", "REDUCE_SCENT" ]
}
]
Loading

0 comments on commit ebe14bb

Please sign in to comment.