diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1d522aab17e09..95dcad2dc42f9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -73,7 +73,7 @@ jobs: ext: zip content: application/zip - name: Linux Tiles x64 - os: ubuntu-latest + os: ubuntu-18.04 mxe: none android: none tiles: 1 @@ -81,7 +81,7 @@ jobs: ext: tar.gz content: application/gzip - name: linux-curses-x64 - os: ubuntu-latest + os: ubuntu-18.04 mxe: none android: none tiles: 0 diff --git a/data/json/construction.json b/data/json/construction.json index d7eadbd567952..55772a710de09 100644 --- a/data/json/construction.json +++ b/data/json/construction.json @@ -2593,6 +2593,7 @@ "time": "60 m", "qualities": [ [ { "id": "HAMMER", "level": 2 } ] ], "components": [ [ [ "2x4", 6 ] ], [ [ "nail", 20 ] ], [ [ "wood_panel", 3 ] ] ], + "pre_special": "check_nofloor_above", "pre_terrain": "t_wood_stairs_up_broken", "post_terrain": "t_wood_stairs_up", "post_special": "done_wood_stairs" @@ -2620,6 +2621,7 @@ "time": "360 m", "qualities": [ [ { "id": "HAMMER", "level": 2 } ], [ { "id": "SAW_W", "level": 2 } ] ], "components": [ [ [ "wood_panel", 4 ] ], [ [ "nail", 30 ] ] ], + "pre_special": "check_nofloor_above", "pre_terrain": "t_wood_stairs_up_half", "post_terrain": "t_wood_stairs_up", "post_special": "done_wood_stairs" @@ -2668,7 +2670,6 @@ "tools": [ [ [ "con_mix", 125 ] ] ], "qualities": [ [ { "id": "SMOOTH", "level": 1 } ] ], "components": [ [ [ "concrete", 5 ] ], [ [ "water", 5 ] ] ], - "pre_terrain": "t_pit_shallow", "pre_special": "check_ramp_low", "post_terrain": "t_ramp_up_low", "post_special": "done_ramp_low" @@ -2685,7 +2686,6 @@ "tools": [ [ [ "con_mix", 125 ] ] ], "qualities": [ [ { "id": "SMOOTH", "level": 1 } ] ], "components": [ [ [ "concrete", 5 ] ], [ [ "water", 5 ] ] ], - "pre_terrain": "t_pit_shallow", "pre_special": "check_ramp_high", "post_terrain": "t_ramp_up_high", "post_special": "done_ramp_high" diff --git a/data/json/items/comestibles/egg.json b/data/json/items/comestibles/egg.json index f6e1070108758..bd244808b3edf 100644 --- a/data/json/items/comestibles/egg.json +++ b/data/json/items/comestibles/egg.json @@ -241,6 +241,18 @@ "rot_spawn": "GROUP_EGG_CENTIPEDE", "rot_spawn_chance": 50 }, + { + "type": "COMESTIBLE", + "id": "egg_antlion", + "name": { "str": "antlion egg" }, + "copy-from": "egg_insect", + "color": "yellow", + "symbol": "o", + "spoils_in": "5 days", + "description": "A large white antlion egg. There is something hard inside.", + "rot_spawn": "GROUP_EGG_ANTLION", + "rot_spawn_chance": 50 + }, { "type": "COMESTIBLE", "id": "razorclaw_roe", diff --git a/data/json/mapgen/lab/lab_floorplans_finale1level.json b/data/json/mapgen/lab/lab_floorplans_finale1level.json index afbed610fbf09..24722b1cd9803 100644 --- a/data/json/mapgen/lab/lab_floorplans_finale1level.json +++ b/data/json/mapgen/lab/lab_floorplans_finale1level.json @@ -177,7 +177,8 @@ { "item": "sample_t_substrate" }, { "item": "log_immersion27" }, { "item": "HAADF_t_substrate" }, - { "item": "report_t_substrate" } + { "item": "report_t_substrate" }, + { "item": "id_science" } ] } }, diff --git a/data/json/monster_factions.json b/data/json/monster_factions.json index b2afbe38ac595..a7bf7aa6b13e2 100644 --- a/data/json/monster_factions.json +++ b/data/json/monster_factions.json @@ -376,14 +376,20 @@ }, { "type": "MONSTER_FACTION", - "name": "antlion", + "name": "antlion_grub", "base_faction": "insect", - "neutral": [ "antlion" ], + "neutral": [ "antlion_grub", "antlion_adult" ], "by_mood": [ "zombie", "fungus", "bee" ], "hate": [ "insect", "small_animal", "ant", "acid_ant" ] }, { "type": "MONSTER_FACTION", + "name": "antlion_adult", + "base_faction": "insect", + "neutral": [ "antlion_grub", "antlion_adult" ] + }, + { + "type": "MONSTER_FACTION", "name": "ladybug", "base_faction": "insect", "by_mood": [ "zombie", "bee", "insect" ], diff --git a/data/json/monstergroups/eggs.json b/data/json/monstergroups/eggs.json index 6a0e75b2774e3..45a2da1cac5a0 100644 --- a/data/json/monstergroups/eggs.json +++ b/data/json/monstergroups/eggs.json @@ -111,5 +111,11 @@ { "monster": "mon_dragonfly_naiad", "freq": 500, "cost_multiplier": 1, "conditions": [ "SPRING", "SUMMER", "AUTUMN" ] }, { "monster": "mon_dragonfly_naiad", "freq": 500, "cost_multiplier": 1, "conditions": [ "SUMMER" ] } ] + }, + { + "name": "GROUP_EGG_ANTLION", + "type": "monstergroup", + "default": "mon_antlion_larva", + "monsters": [ { "monster": "mon_antlion_larva", "freq": 1000, "cost_multiplier": 1 } ] } ] diff --git a/data/json/monsters/insect_spider.json b/data/json/monsters/insect_spider.json index 6d134f9921083..3a04c8e5b548f 100644 --- a/data/json/monsters/insect_spider.json +++ b/data/json/monsters/insect_spider.json @@ -2136,8 +2136,8 @@ "id": "mon_antlion_giant", "type": "MONSTER", "name": { "str": "giant adult antlion" }, - "description": "A ferocious mutant flying antlion as big as a cat, darting through the air with a cluster of fangs for a mouth.", - "default_faction": "antlion", + "description": "A ferocious mutant flying antlion as big as a cat, darting through the air with a cluster of fangs for a mouth. Despite dangerous looks it doesn't seem interested in you.", + "default_faction": "antlion_adult", "bodytype": "flying insect", "species": [ "INSECT_FLYING" ], "volume": "30 L", @@ -2147,8 +2147,8 @@ "material": [ "iflesh" ], "symbol": "y", "color": "yellow", - "aggression": 20, - "morale": 100, + "aggression": -10, + "morale": 20, "melee_skill": 6, "melee_dice": 1, "melee_dice_sides": 6, @@ -2158,8 +2158,10 @@ "vision_day": 25, "vision_night": 5, "harvest": "arachnid", - "anger_triggers": [ "PLAYER_WEAK" ], - "fear_triggers": [ "PLAYER_CLOSE" ], + "reproduction": { "baby_egg": "egg_antlion", "baby_count": 1, "baby_timer": 15 }, + "baby_flags": [ "SPRING", "SUMMER", "AUTUMN" ], + "anger_triggers": [ "HURT" ], + "fear_triggers": [ "PLAYER_CLOSE", "FIRE" ], "death_function": [ "NORMAL" ], "flags": [ "SEES", "SMELLS", "FLIES", "HEARS", "HIT_AND_RUN", "PATH_AVOID_FIRE" ] }, diff --git a/data/json/recipes/armor/feet.json b/data/json/recipes/armor/feet.json index 7ec67854577b0..1748c4da478c1 100644 --- a/data/json/recipes/armor/feet.json +++ b/data/json/recipes/armor/feet.json @@ -681,7 +681,6 @@ "difficulty": 1, "time": "2 h", "autolearn": true, - "qualities": [ { "id": "KNIT", "level": 1 } ], "proficiencies": [ { "proficiency": "prof_knitting" }, { "proficiency": "prof_knitting_speed" } ], "using": [ [ "tailoring_wool_knitting", 40 ] ] }, diff --git a/data/json/recipes/armor/hands.json b/data/json/recipes/armor/hands.json index 606b902c1a850..ae4d8597341ce 100644 --- a/data/json/recipes/armor/hands.json +++ b/data/json/recipes/armor/hands.json @@ -609,7 +609,6 @@ "time": "50 m", "autolearn": true, "reversible": true, - "qualities": [ { "id": "KNIT", "level": 1 } ], "proficiencies": [ { "proficiency": "prof_knitting" }, { "proficiency": "prof_knitting_speed" } ], "using": [ [ "tailoring_wool_knitting", 36 ] ] }, diff --git a/data/json/recipes/armor/head.json b/data/json/recipes/armor/head.json index db1dd5992ce26..2fe1c07ecaac2 100644 --- a/data/json/recipes/armor/head.json +++ b/data/json/recipes/armor/head.json @@ -428,7 +428,6 @@ "time": "40 m", "reversible": true, "autolearn": true, - "qualities": [ { "id": "KNIT", "level": 1 } ], "proficiencies": [ { "proficiency": "prof_knitting" }, { "proficiency": "prof_knitting_speed" } ], "using": [ [ "tailoring_wool_knitting", 120 ] ] }, @@ -1042,7 +1041,6 @@ "time": "40 m", "reversible": true, "autolearn": true, - "qualities": [ { "id": "KNIT", "level": 1 } ], "proficiencies": [ { "proficiency": "prof_knitting" }, { "proficiency": "prof_knitting_speed" } ], "using": [ [ "tailoring_wool_knitting", 100 ] ] }, @@ -1071,7 +1069,6 @@ "time": "4 h", "reversible": true, "autolearn": true, - "qualities": [ { "id": "KNIT", "level": 1 } ], "proficiencies": [ { "proficiency": "prof_knitting" }, { "proficiency": "prof_knitting_speed" } ], "using": [ [ "tailoring_wool_knitting", 190 ] ] }, @@ -1579,7 +1576,6 @@ "time": "1 h", "autolearn": true, "reversible": true, - "qualities": [ { "id": "KNIT", "level": 1 } ], "proficiencies": [ { "proficiency": "prof_knitting" }, { "proficiency": "prof_knitting_speed" } ], "using": [ [ "tailoring_wool_knitting", 80 ] ] }, @@ -1643,7 +1639,6 @@ "difficulty": 3, "time": "1 h 20 m", "autolearn": true, - "qualities": [ { "id": "KNIT", "level": 1 } ], "proficiencies": [ { "proficiency": "prof_knitting" }, { "proficiency": "prof_knitting_speed" } ], "using": [ [ "tailoring_wool_knitting", 160 ] ] }, diff --git a/data/json/recipes/armor/torso.json b/data/json/recipes/armor/torso.json index 104f62b32d8cd..4da2b62969353 100644 --- a/data/json/recipes/armor/torso.json +++ b/data/json/recipes/armor/torso.json @@ -851,7 +851,6 @@ "difficulty": 4, "time": "5 h", "autolearn": true, - "qualities": [ { "id": "KNIT", "level": 1 } ], "proficiencies": [ { "proficiency": "prof_knitting" }, { "proficiency": "prof_knitting_speed" } ], "using": [ [ "tailoring_wool_knitting", 910 ] ] }, @@ -1349,7 +1348,6 @@ "time": "6 h", "autolearn": true, "reversible": true, - "qualities": [ { "id": "KNIT", "level": 1 } ], "proficiencies": [ { "proficiency": "prof_knitting" }, { "proficiency": "prof_knitting_speed" } ], "using": [ [ "tailoring_wool_knitting", 550 ] ] }, @@ -1365,7 +1363,6 @@ "autolearn": true, "reversible": true, "book_learn": [ [ "mag_tailor", 1 ], [ "manual_tailor", 1 ], [ "mag_beauty", 1 ] ], - "qualities": [ { "id": "KNIT", "level": 1 } ], "proficiencies": [ { "proficiency": "prof_knitting" }, { "proficiency": "prof_knitting_speed" } ], "using": [ [ "tailoring_wool_knitting", 620 ] ] }, diff --git a/data/json/recipes/recipe_vehicle.json b/data/json/recipes/recipe_vehicle.json index 1066d7a99eaf5..fa294e4684606 100644 --- a/data/json/recipes/recipe_vehicle.json +++ b/data/json/recipes/recipe_vehicle.json @@ -861,22 +861,6 @@ "tools": [ [ [ "welder", 100 ], [ "welder_crude", 150 ], [ "toolset", 150 ], [ "forge", 100 ], [ "oxy_torch", 20 ] ] ], "components": [ [ [ "steel_lump", 8 ], [ "steel_plate", 1 ] ], [ [ "steel_chunk", 4 ], [ "scrap", 12 ], [ "spike", 4 ] ] ] }, - { - "type": "recipe", - "activity_level": "BRISK_EXERCISE", - "result": "hard_plate", - "category": "CC_OTHER", - "subcategory": "CSC_OTHER_PARTS", - "skill_used": "fabrication", - "difficulty": 6, - "//": "hardened metal tools require high fabrication, so +1 diff here", - "time": "12 m", - "reversible": true, - "book_learn": [ [ "textbook_fabrication", 5 ], [ "adv_chemistry", 6 ], [ "welding_book", 5 ] ], - "qualities": [ { "id": "GLARE", "level": 2 } ], - "tools": [ [ [ "welder", 100 ], [ "welder_crude", 150 ], [ "toolset", 150 ], [ "forge", 100 ], [ "oxy_torch", 20 ] ] ], - "components": [ [ [ "steel_lump", 24 ] ] ] - }, { "result": "fridgetank", "type": "recipe", diff --git a/data/json/vehicleparts/battery.json b/data/json/vehicleparts/battery.json index 55b911a5c1e98..544165fde0e7f 100644 --- a/data/json/vehicleparts/battery.json +++ b/data/json/vehicleparts/battery.json @@ -22,7 +22,8 @@ "removal": { "skills": [ [ "mechanics", 0 ] ], "time": "50 s", "qualities": [ { "id": "WRENCH", "level": 1 } ] }, "repair": { "skills": [ [ "mechanics", 3 ] ], "time": "600 s", "using": [ [ "welding_standard", 5 ] ] } }, - "flags": [ "FOLDABLE" ] + "flags": [ "FOLDABLE" ], + "damage_reduction": { "bash": 10 } }, { "id": "battery_motorbike", @@ -133,7 +134,8 @@ "requirements": { "install": { "skills": [ [ "mechanics", 2 ] ], "time": "600 s", "using": [ [ "welding_standard", 5 ] ] }, "removal": { "skills": [ [ "mechanics", 2 ] ], "time": "300 s", "using": "vehicle_weld_removal" } - } + }, + "damage_reduction": { "bash": 10 } }, { "id": "storage_battery_removable", diff --git a/data/json/vehicleparts/boards.json b/data/json/vehicleparts/boards.json index eb1e6e064af23..3c9b340566fdb 100644 --- a/data/json/vehicleparts/boards.json +++ b/data/json/vehicleparts/boards.json @@ -31,7 +31,7 @@ "removal": { "skills": [ [ "mechanics", 2 ] ], "time": "30 m", "using": [ [ "vehicle_weld_removal", 1 ] ] }, "repair": { "skills": [ [ "mechanics", 2 ] ], "time": "60 m", "using": [ [ "welding_standard", 5 ] ] } }, - "damage_reduction": { "all": 28 } + "damage_reduction": { "all": 7 } }, { "id": "board", @@ -63,7 +63,8 @@ "install": { "skills": [ [ "mechanics", 1 ] ], "time": "30 m", "using": [ [ "vehicle_nail_install", 1 ] ] }, "removal": { "skills": [ [ "mechanics", 2 ] ], "time": "15 m", "using": [ [ "vehicle_nail_removal", 1 ] ] }, "repair": { "skills": [ [ "mechanics", 2 ] ], "time": "30 m", "using": [ [ "adhesive", 2 ] ] } - } + }, + "damage_reduction": { "all": 0, "bash": 3 } }, { "id": "clothboard", @@ -100,7 +101,7 @@ "repair": { "skills": [ [ "mechanics", 3 ] ], "time": "60 m", "using": [ [ "welding_standard", 5 ] ] } }, "extend": { "categories": [ "cargo" ], "flags": [ "OPAQUE", "CARGO", "COVERED", "FULL_BOARD", "LOCKABLE_CARGO" ] }, - "damage_reduction": { "all": 28 } + "damage_reduction": { "all": 7 } }, { "id": "hdstowboard", @@ -111,7 +112,7 @@ "color": "brown", "broken_color": "dark_gray", "proportional": { "durability": 4.15, "size": 0.76 }, - "damage_reduction": { "all": 72, "cut": 80, "stab": 80 } + "damage_reduction": { "all": 20 } }, { "abstract": "hdboard_abstract", @@ -127,7 +128,7 @@ "removal": { "skills": [ [ "mechanics", 2 ] ], "time": "30 m", "using": [ [ "vehicle_weld_removal", 1 ] ] }, "repair": { "skills": [ [ "mechanics", 2 ] ], "time": "60 m", "using": [ [ "welding_standard", 5 ] ] } }, - "damage_reduction": { "all": 75, "cut": 80, "stab": 80 } + "damage_reduction": { "all": 20 } }, { "id": "hdboard", @@ -160,7 +161,7 @@ "removal": { "skills": [ [ "mechanics", 2 ] ], "time": "15 m", "using": [ [ "vehicle_nail_removal", 1 ] ] }, "repair": { "skills": [ [ "mechanics", 2 ] ], "time": "30 m", "using": [ [ "adhesive", 2 ] ] } }, - "damage_reduction": { "all": 16, "cut": 8, "stab": 8 } + "damage_reduction": { "all": 5 } }, { "id": "woodboard", @@ -195,6 +196,6 @@ "repair": { "skills": [ [ "mechanics", 2 ] ], "time": "60 m", "using": [ [ "welding_standard", 5 ] ] } }, "extend": { "flags": [ "HALF_BOARD" ] }, - "damage_reduction": { "all": 8 } + "damage_reduction": { "all": 5 } } ] diff --git a/data/json/vehicleparts/doors.json b/data/json/vehicleparts/doors.json index 6dfbb2489e329..6468d72c0cbcd 100644 --- a/data/json/vehicleparts/doors.json +++ b/data/json/vehicleparts/doors.json @@ -7,7 +7,7 @@ "categories": [ "hull" ], "color": "cyan", "damage_modifier": 80, - "damage_reduction": { "all": 21 }, + "damage_reduction": { "all": 20 }, "description": "A door. Has a window so you can see out of it, even when closed.", "durability": 225, "flags": [ "CARGO", "OBSTACLE", "OPENABLE", "BOARDABLE", "WINDOW", "DOOR" ], @@ -33,7 +33,7 @@ "categories": [ "hull" ], "color": "cyan", "damage_modifier": 80, - "damage_reduction": { "all": 28 }, + "damage_reduction": { "all": 20 }, "description": "A door. Solid construction means you can't see through it when closed.", "durability": 240, "flags": [ "CARGO", "OBSTACLE", "OPAQUE", "OPENABLE", "BOARDABLE", "DOOR" ], @@ -59,7 +59,7 @@ "categories": [ "hull" ], "color": "cyan", "damage_modifier": 80, - "damage_reduction": { "all": 68 }, + "damage_reduction": { "all": 30 }, "description": "A strong door. Has a window so you can see out of it, even when closed.", "durability": 600, "flags": [ "CARGO", "OBSTACLE", "OPENABLE", "BOARDABLE", "WINDOW", "DOOR" ], @@ -85,7 +85,7 @@ "categories": [ "hull" ], "color": "cyan", "damage_modifier": 80, - "damage_reduction": { "all": 75 }, + "damage_reduction": { "all": 30 }, "description": "A strong door. Solid construction means you can't see through it when closed.", "durability": 660, "flags": [ "CARGO", "OBSTACLE", "OPAQUE", "OPENABLE", "BOARDABLE", "DOOR" ], @@ -111,7 +111,7 @@ "categories": [ "hull" ], "color": "cyan", "damage_modifier": 75, - "damage_reduction": { "all": 28 }, + "damage_reduction": { "all": 20 }, "description": "An interior door. Solid construction means you can't see through it when closed.", "durability": 240, "flags": [ "OBSTACLE", "OPAQUE", "OPENABLE", "ROOF", "BOARDABLE", "DOOR" ], @@ -136,7 +136,7 @@ "categories": [ "hull" ], "color": "light_gray", "damage_modifier": 80, - "damage_reduction": { "all": 30 }, + "damage_reduction": { "all": 20 }, "description": "A strong door. A window lets you see through it when closed.", "durability": 420, "flags": [ "CARGO", "LOCKABLE_CARGO", "OBSTACLE", "OPENABLE", "MULTISQUARE", "BOARDABLE", "COVERED", "DOOR", "WINDOW" ], @@ -162,7 +162,7 @@ "categories": [ "hull" ], "color": "light_gray", "damage_modifier": 80, - "damage_reduction": { "all": 34 }, + "damage_reduction": { "all": 20 }, "description": "A strong door. Solid construction means you can't see through it when closed.", "durability": 450, "flags": [ "CARGO", "LOCKABLE_CARGO", "OBSTACLE", "OPENABLE", "MULTISQUARE", "BOARDABLE", "COVERED", "OPAQUE", "DOOR" ], @@ -188,7 +188,7 @@ "categories": [ "hull" ], "color": "dark_gray", "damage_modifier": 80, - "damage_reduction": { "all": 78 }, + "damage_reduction": { "all": 30 }, "description": "A very strong door. A window lets you see through it when closed.", "durability": 900, "flags": [ "CARGO", "LOCKABLE_CARGO", "OBSTACLE", "OPENABLE", "MULTISQUARE", "BOARDABLE", "COVERED", "DOOR", "WINDOW" ], @@ -214,7 +214,7 @@ "categories": [ "hull" ], "color": "dark_gray", "damage_modifier": 80, - "damage_reduction": { "all": 80 }, + "damage_reduction": { "all": 30 }, "description": "A very strong door. Solid construction means you can't see through it when closed.", "durability": 1000, "flags": [ "CARGO", "LOCKABLE_CARGO", "OBSTACLE", "OPENABLE", "MULTISQUARE", "BOARDABLE", "COVERED", "OPAQUE", "DOOR" ], diff --git a/data/json/vehicleparts/frames.json b/data/json/vehicleparts/frames.json index c0bcbb1097171..3f0bdf791b828 100644 --- a/data/json/vehicleparts/frames.json +++ b/data/json/vehicleparts/frames.json @@ -17,7 +17,7 @@ }, "flags": [ "INITIAL_PART", "MOUNTABLE", "FOLDABLE" ], "categories": [ "hull" ], - "damage_reduction": { "all": 8 } + "damage_reduction": { "all": 10 } }, { "id": "folding_wooden_frame", @@ -39,7 +39,7 @@ "repair": { "skills": [ [ "mechanics", 3 ] ], "time": "30 m", "using": [ [ "adhesive", 2 ] ] } }, "flags": [ "INITIAL_PART", "MOUNTABLE", "FOLDABLE" ], - "damage_reduction": { "all": 12 } + "damage_reduction": { "all": 3 } }, { "id": "frame", @@ -58,7 +58,7 @@ }, "flags": [ "MOUNTABLE", "INITIAL_PART" ], "categories": [ "hull" ], - "damage_reduction": { "all": 52 } + "damage_reduction": { "all": 20 } }, { "id": "frame_wood", @@ -79,7 +79,7 @@ "repair": { "skills": [ [ "mechanics", 2 ] ], "time": "30 m", "using": [ [ "adhesive", 2 ] ] } }, "flags": [ "MOUNTABLE", "INITIAL_PART" ], - "damage_reduction": { "all": 52 } + "damage_reduction": { "all": 5 } }, { "id": "frame_wood_light", @@ -99,7 +99,7 @@ "repair": { "skills": [ [ "mechanics", 0 ] ], "time": "5 m", "using": [ [ "adhesive", 1 ] ] } }, "flags": [ "MOUNTABLE", "INITIAL_PART" ], - "damage_reduction": { "all": 46 } + "damage_reduction": { "all": 4 } }, { "id": "hdframe", @@ -119,7 +119,7 @@ "repair": { "skills": [ [ "mechanics", 3 ] ], "time": "10 m", "using": [ [ "welding_standard", 10 ] ] } }, "flags": [ "MOUNTABLE", "INITIAL_PART" ], - "damage_reduction": { "all": 112 } + "damage_reduction": { "all": 30 } }, { "id": "xlframe", @@ -139,6 +139,6 @@ "repair": { "skills": [ [ "mechanics", 2 ] ], "time": "60 m", "using": [ [ "welding_standard", 10 ] ] } }, "flags": [ "MOUNTABLE", "INITIAL_PART" ], - "damage_reduction": { "all": 28 } + "damage_reduction": { "all": 7 } } ] diff --git a/data/json/vehicleparts/rams.json b/data/json/vehicleparts/rams.json index 7ebc31e0ee833..c04f68d6ce507 100644 --- a/data/json/vehicleparts/rams.json +++ b/data/json/vehicleparts/rams.json @@ -23,7 +23,7 @@ "item": "alloy_plate", "color": "dark_gray", "broken_color": "dark_gray", - "durability": 650, + "durability": 750, "breaks_into": [ { "item": "steel_lump", "count": [ 4, 6 ] }, { "item": "steel_chunk", "count": [ 4, 6 ] }, @@ -34,7 +34,7 @@ "removal": { "skills": [ [ "mechanics", 2 ] ], "time": "30 m", "using": [ [ "vehicle_weld_removal", 1 ] ] }, "repair": { "skills": [ [ "mechanics", 5 ] ], "time": "60 m", "using": [ [ "welding_standard", 5 ] ] } }, - "damage_reduction": { "all": 120 } + "damage_reduction": { "all": 70 } }, { "id": "ram_hardsteel", @@ -55,7 +55,7 @@ "removal": { "skills": [ [ "mechanics", 2 ] ], "time": "30 m", "using": [ [ "vehicle_weld_removal", 1 ] ] }, "repair": { "skills": [ [ "mechanics", 5 ] ], "time": "60 m", "using": [ [ "welding_standard", 5 ] ] } }, - "damage_reduction": { "all": 200 } + "damage_reduction": { "all": 87 } }, { "id": "ram_military_horizontal", @@ -65,7 +65,7 @@ "item": "mil_plate", "color": "green", "broken_color": "green", - "durability": 800, + "durability": 875, "breaks_into": [ { "item": "steel_lump", "count": [ 4, 6 ] }, { "item": "steel_chunk", "count": [ 4, 6 ] }, @@ -77,7 +77,7 @@ "removal": { "skills": [ [ "mechanics", 4 ] ], "time": "30 m", "using": [ [ "vehicle_weld_removal", 1 ] ] }, "repair": { "skills": [ [ "mechanics", 7 ] ], "time": "60 m", "using": [ [ "welding_standard", 5 ] ] } }, - "damage_reduction": { "all": 180, "cut": 210, "stab": 280 } + "damage_reduction": { "all": 75, "bullet": 131 } }, { "id": "ram_spiked", @@ -87,7 +87,7 @@ "item": "spiked_plate", "color": "red", "broken_color": "red", - "durability": 550, + "durability": 775, "damage_modifier": 200, "breaks_into": [ { "item": "steel_lump", "count": [ 4, 6 ] }, @@ -100,7 +100,7 @@ "removal": { "skills": [ [ "mechanics", 2 ] ], "time": "30 m", "using": [ [ "vehicle_weld_removal", 1 ] ] }, "repair": { "skills": [ [ "mechanics", 4 ] ], "time": "60 m", "using": [ [ "welding_standard", 5 ] ] } }, - "damage_reduction": { "all": 148 } + "damage_reduction": { "all": 60 } }, { "id": "ram_steel", @@ -110,9 +110,9 @@ "item": "steel_plate", "color": "light_cyan", "broken_color": "light_cyan", - "durability": 650, + "durability": 825, "breaks_into": "ig_vp_steel_plate", - "damage_reduction": { "all": 156 } + "damage_reduction": { "all": 70 } }, { "id": "ram_wood", @@ -122,14 +122,14 @@ "item": "wood_plate", "color": "brown", "broken_color": "brown", - "durability": 300, + "durability": 312, "breaks_into": "ig_vp_wood_plate", "requirements": { "install": { "skills": [ [ "mechanics", 2 ] ], "time": "60 m", "using": [ [ "vehicle_nail_install", 1 ] ] }, "removal": { "skills": [ [ "mechanics", 2 ] ], "time": "30 m", "using": [ [ "vehicle_nail_removal", 1 ] ] }, "repair": { "skills": [ [ "mechanics", 3 ] ], "time": "60 m", "using": [ [ "adhesive", 2 ] ] } }, - "damage_reduction": { "all": 75 } + "damage_reduction": { "all": 20, "cut": 10, "stab": 10 } }, { "id": "ram_chitin", @@ -140,9 +140,9 @@ "color": "yellow", "broken_color": "light_gray", "looks_like": "ram_wood", - "durability": 320, + "durability": 250, "breaks_into": [ { "item": "chitin_piece", "count": [ 5, 15 ] } ], - "damage_reduction": { "all": 80 } + "damage_reduction": { "all": 25 } }, { "id": "ram_acidchitin", @@ -150,9 +150,8 @@ "type": "vehicle_part", "name": { "str": "biosilicified chitin ram" }, "item": "acidchitin_plate", - "proportional": { "durability": 1.5 }, "breaks_into": [ { "item": "chitin_piece", "count": [ 6, 19 ] } ], - "damage_reduction": { "all": 110 } + "damage_reduction": { "all": 30 } }, { "id": "ram_mattress", @@ -195,6 +194,6 @@ "repair": { "skills": [ [ "mechanics", 6 ] ], "time": "60 m", "using": [ [ "welding_standard", 5 ] ] } }, "flags": [ "UNMOUNT_ON_DAMAGE", "SHARP", "PROTRUSION" ], - "damage_reduction": { "all": 82 } + "damage_reduction": { "all": 40 } } ] diff --git a/data/json/vehicleparts/seats.json b/data/json/vehicleparts/seats.json index 5d5e51dc514d5..19c8ae1e261eb 100644 --- a/data/json/vehicleparts/seats.json +++ b/data/json/vehicleparts/seats.json @@ -31,7 +31,7 @@ "color": "red", "comfort": 2, "damage_modifier": 60, - "damage_reduction": { "all": 2 }, + "damage_reduction": { "all": 2, "bash": 5 }, "description": "A place to sit, or sleep if you're desperate.", "durability": 300, "flags": [ "SEAT", "BOARDABLE", "CARGO", "BELTABLE" ], @@ -67,7 +67,7 @@ "color": "red", "comfort": 3, "damage_modifier": 60, - "damage_reduction": { "all": 3 }, + "damage_reduction": { "all": 3, "bash": 5 }, "description": "A place to sit, and the backrest reclines to make it an uncomfortable bed.", "durability": 100, "flags": [ "BED", "SEAT", "BOARDABLE", "BELTABLE", "CARGO" ], @@ -103,7 +103,7 @@ "color": "red", "comfort": 4, "damage_modifier": 60, - "damage_reduction": { "all": 3 }, + "damage_reduction": { "all": 3, "bash": 5 }, "description": "A benchlike seat. Mostly found in the second row, also known as the back or rear seat.", "durability": 300, "flags": [ "BED", "SEAT", "BOARDABLE", "BELTABLE", "CARGO" ], @@ -142,6 +142,7 @@ "broken_symbol": "*", "broken_color": "red", "damage_modifier": 20, + "damage_reduction": { "all": 3, "bash": 5 }, "durability": 80, "description": "A padded wedge that you straddle, like a bicycle or motorcycle.", "folded_volume": "1250 ml", @@ -168,6 +169,7 @@ "broken_symbol": "*", "broken_color": "red", "damage_modifier": 10, + "damage_reduction": { "all": 3, "bash": 5 }, "durability": 20, "description": "A crude seat, too uncomfortable to sleep in.", "item": "sheet", diff --git a/data/json/vehicleparts/vehicle_parts.json b/data/json/vehicleparts/vehicle_parts.json index 3a78173645f3f..423d526fff9eb 100644 --- a/data/json/vehicleparts/vehicle_parts.json +++ b/data/json/vehicleparts/vehicle_parts.json @@ -191,7 +191,7 @@ }, "flags": [ "BED", "BOARDABLE", "CARGO", "MOUNTABLE", "NONBELTABLE" ], "breaks_into": "ig_vp_seat", - "damage_reduction": { "all": 3 } + "damage_reduction": { "all": 3, "bash": 5 } }, { "type": "vehicle_part", @@ -375,7 +375,7 @@ }, "flags": [ "ROOF" ], "breaks_into": "ig_vp_sheet_metal", - "damage_reduction": { "all": 28 } + "damage_reduction": { "all": 20 } }, { "type": "vehicle_part", @@ -397,7 +397,7 @@ }, "flags": [ "ROOF" ], "breaks_into": "ig_vp_steel_plate", - "damage_reduction": { "all": 75 } + "damage_reduction": { "all": 30 } }, { "type": "vehicle_part", @@ -504,7 +504,7 @@ { "item": "steel_chunk", "count": [ 1, 2 ] }, { "item": "scrap", "count": [ 0, 3 ] } ], - "damage_reduction": { "all": 8 } + "damage_reduction": { "all": 8, "bash": 10 } }, { "type": "vehicle_part", @@ -762,7 +762,7 @@ "install": { "time": "10 m", "using": [ [ "rope_natural_short", 1 ] ] }, "repair": { "time": "5 m", "using": [ [ "adhesive", 1 ] ] } }, - "damage_reduction": { "all": 18, "stab": 8, "cut": 8 } + "damage_reduction": { "all": 4 } }, { "type": "vehicle_part", @@ -786,7 +786,7 @@ }, "flags": [ "CARGO", "BOARDABLE", "COVERED", "LOCKABLE_CARGO" ], "breaks_into": [ { "item": "splinter", "count": [ 3, 5 ] }, { "item": "nail", "charges": [ 10, 15 ] } ], - "damage_reduction": { "all": 16, "stab": 6, "cut": 6 } + "damage_reduction": { "all": 5 } }, { "type": "vehicle_part", @@ -811,7 +811,7 @@ }, "flags": [ "CARGO", "BOARDABLE", "COVERED", "FOLDABLE", "LOCKABLE_CARGO" ], "breaks_into": [ { "item": "splinter", "count": [ 3, 5 ] }, { "item": "nail", "charges": [ 10, 15 ] } ], - "damage_reduction": { "all": 10, "stab": 4, "cut": 5 } + "damage_reduction": { "all": 4 } }, { "type": "vehicle_part", @@ -1332,7 +1332,8 @@ "repair": { "skills": [ [ "mechanics", 1 ] ], "time": "20 s", "using": [ [ "adhesive", 1 ] ] } }, "flags": [ "SEATBELT", "FOLDABLE", "SIMPLE_PART" ], - "breaks_into": [ { "item": "string_36", "count": [ 0, 3 ] } ] + "breaks_into": [ { "item": "string_36", "count": [ 0, 3 ] } ], + "damage_reduction": { "bash": 15 } }, { "type": "vehicle_part", @@ -1418,7 +1419,8 @@ "repair": { "skills": [ [ "mechanics", 2 ] ], "time": "20 s", "using": [ [ "adhesive", 1 ] ] } }, "flags": [ "SEATBELT", "FOLDABLE", "SIMPLE_PART" ], - "breaks_into": [ { "item": "string_36", "count": [ 0, 3 ] } ] + "breaks_into": [ { "item": "string_36", "count": [ 0, 3 ] } ], + "damage_reduction": { "bash": 15 } }, { "type": "vehicle_part", @@ -1833,7 +1835,7 @@ { "item": "scrap", "count": [ 4, 6 ] }, { "item": "spike", "count": [ 0, 2 ] } ], - "damage_reduction": { "all": 58 } + "damage_reduction": { "all": 48 } }, { "type": "vehicle_part", @@ -1858,7 +1860,7 @@ { "item": "steel_chunk", "count": [ 4, 6 ] }, { "item": "scrap", "count": [ 4, 6 ] } ], - "damage_reduction": { "all": 75 } + "damage_reduction": { "all": 70 } }, { "type": "vehicle_part", @@ -1884,7 +1886,7 @@ { "item": "scrap", "count": [ 4, 6 ] }, { "item": "ceramic_armor", "count": [ 0, 4 ] } ], - "damage_reduction": { "all": 70, "cut": 95, "stab": 88 } + "damage_reduction": { "all": 60, "bullet": 105 } }, { "type": "vehicle_part", @@ -2008,7 +2010,7 @@ "DOOR" ], "breaks_into": "ig_vp_frame", - "damage_reduction": { "all": 25 } + "damage_reduction": { "all": 20 } }, { "type": "vehicle_part", @@ -2032,7 +2034,7 @@ }, "flags": [ "OBSTACLE", "OPENABLE", "MULTISQUARE", "BOARDABLE", "LOW_FINAL_AIR_DRAG", "WINDOW", "SIMPLE_PART", "DOOR" ], "breaks_into": "ig_vp_hdframe", - "damage_reduction": { "all": 78 } + "damage_reduction": { "all": 30 } }, { "type": "vehicle_part", @@ -2056,7 +2058,7 @@ }, "flags": [ "OPAQUE", "OBSTACLE", "OPENABLE", "MULTISQUARE", "BOARDABLE", "SIMPLE_PART", "DOOR" ], "breaks_into": "ig_vp_sheet_metal", - "damage_reduction": { "all": 24 } + "damage_reduction": { "all": 7 } }, { "type": "vehicle_part", @@ -2080,7 +2082,7 @@ }, "flags": [ "OBSTACLE", "OPENABLE", "MULTISQUARE", "BOARDABLE", "SIMPLE_PART", "DOOR" ], "breaks_into": "ig_vp_frame", - "damage_reduction": { "all": 26 } + "damage_reduction": { "all": 20 } }, { "type": "vehicle_part", @@ -2213,6 +2215,7 @@ "broken_color": "light_gray", "damage_modifier": 0, "durability": 60, + "damage_reduction": { "bash": 5 }, "description": "A stereo system. When turned on, it plays music, improving your mood.", "epower": -50, "bonus": 80, @@ -2486,7 +2489,7 @@ "color": "yellow", "broken_symbol": ")", "broken_color": "light_gray", - "durability": 320, + "durability": 200, "item": "chitin_plate", "location": "armor", "requirements": { @@ -2496,17 +2499,16 @@ }, "flags": [ "ARMOR" ], "breaks_into": [ { "item": "chitin_piece", "count": [ 5, 15 ] } ], - "damage_reduction": { "all": 58 } + "damage_reduction": { "all": 20 } }, { "type": "vehicle_part", "id": "plating_acidchitin", "copy-from": "plating_chitin", "name": { "str": "biosilicified chitin plating" }, - "proportional": { "durability": 1.5 }, "item": "acidchitin_plate", "breaks_into": [ { "item": "acidchitin_piece", "count": [ 6, 19 ] } ], - "damage_reduction": { "all": 72 } + "damage_reduction": { "all": 24 } }, { "type": "vehicle_part", @@ -2648,7 +2650,8 @@ "repair": { "skills": [ [ "mechanics", 1 ] ], "time": "20 s", "using": [ [ "adhesive", 1 ] ] } }, "flags": [ "WATCH", "ALARMCLOCK", "FOLDABLE" ], - "breaks_into": [ { "item": "scrap", "prob": 50 } ] + "breaks_into": [ { "item": "scrap", "prob": 50 } ], + "damage_reduction": { "bash": 5 } }, { "type": "vehicle_part", diff --git a/data/mods/Magiclysm/mutations/overlay_ordering.json b/data/mods/Magiclysm/mutations/overlay_ordering.json new file mode 100644 index 0000000000000..4cb678b7a0f60 --- /dev/null +++ b/data/mods/Magiclysm/mutations/overlay_ordering.json @@ -0,0 +1,11 @@ +[ + { + "type": "overlay_order", + "overlay_ordering": [ + { "id": [ "DRAGON_WINGS_BLACK" ], "order": 500 }, + { "id": [ "DRAGON_SCALES_BLACK" ], "order": 1500 }, + { "id": [ "DRAGON_TAIL_STUB", "DRAGON_TAIL_SCALED", "DRAGON_TAIL" ], "order": 400 }, + { "id": [ "MUZZLE_DRAGON", "DRAGON_MAW_BLACK" ], "order": 7000 } + ] + } +] diff --git a/data/mods/Magiclysm/vehicleparts/frames.json b/data/mods/Magiclysm/vehicleparts/frames.json index f620e5ed294f3..dffed89eb8982 100644 --- a/data/mods/Magiclysm/vehicleparts/frames.json +++ b/data/mods/Magiclysm/vehicleparts/frames.json @@ -16,7 +16,7 @@ "repair": { "skills": [ [ "mechanics", 2 ] ], "time": "4 m", "using": [ [ "welding_standard", 4 ] ] } }, "flags": [ "INITIAL_PART", "MOUNTABLE" ], - "damage_reduction": { "all": 58 } + "damage_reduction": { "all": 30 } }, { "id": "folding_orichalcum_frame", @@ -55,7 +55,7 @@ }, "flags": [ "MOUNTABLE" ], "categories": [ "hull" ], - "damage_reduction": { "all": 78 } + "damage_reduction": { "all": 50 } }, { "id": "frame_orichalcum_cover", diff --git a/doc/JSON_INFO.md b/doc/JSON_INFO.md index 05f6a358c2cea..54e95359086f4 100644 --- a/doc/JSON_INFO.md +++ b/doc/JSON_INFO.md @@ -1498,6 +1498,9 @@ request](https://github.com/CleverRaven/Cataclysm-DDA/pull/36657) and the |--- |--- | `check_empty` | Tile is empty | `check_support` | Must have at least two solid walls/obstructions nearby on orthogonals (non-diagonal directions only) to support the tile +| `check_stable` | Tile on level below has a flag `SUPPORTS_ROOF` +| `check_empty_stable` | Tile is empty and stable +| `check_nofloor_above` | Tile on level above has a flag `NO_FLOOR` | `check_deconstruction` | The furniture (or tile, if no furniture) in the target tile must have a "deconstruct" entry | `check_empty_up_OK` | Tile is empty and is below the maximum possible elevation (can build up here) | `check_up_OK` | Tile is below the maximum possible elevation (can build up here) diff --git a/src/construction.cpp b/src/construction.cpp index 37bff408b3a50..5bfdd965b56d2 100644 --- a/src/construction.cpp +++ b/src/construction.cpp @@ -92,6 +92,7 @@ static const trait_id trait_STOCKY_TROGLO( "STOCKY_TROGLO" ); static const std::string flag_FLAT( "FLAT" ); static const std::string flag_INITIAL_PART( "INITIAL_PART" ); static const std::string flag_SUPPORTS_ROOF( "SUPPORTS_ROOF" ); +static const std::string flag_NO_FLOOR( "NO_FLOOR" ); static bool finalized = false; @@ -105,6 +106,9 @@ static bool check_nothing( const tripoint & ) } bool check_empty( const tripoint & ); // tile is empty bool check_support( const tripoint & ); // at least two orthogonal supports +bool check_stable( const tripoint & ); // tile below has a flag SUPPORTS_ROOF +bool check_empty_stable( const tripoint & ); // tile is empty, tile below has a flag SUPPORTS_ROOF +bool check_nofloor_above( const tripoint & ); // tile above has a flag NO_FLOOR bool check_deconstruct( const tripoint & ); // either terrain or furniture must be deconstructible bool check_empty_up_OK( const tripoint & ); // tile is empty and below OVERMAP_HEIGHT bool check_up_OK( const tripoint & ); // tile is below OVERMAP_HEIGHT @@ -1071,6 +1075,16 @@ void complete_construction( player *p ) here.furn_set( terp, furn_str_id( built.post_terrain ) ); } else { here.ter_set( terp, ter_str_id( built.post_terrain ) ); + // Make a roof if constructed terrain should have it and it's an open air + if( construct::check_up_OK( terp ) ) { + const int_id post_terrain = ter_id( built.post_terrain ); + if( post_terrain->roof ) { + const tripoint top = terp + tripoint_above; + if( here.ter( top ) == t_open_air ) { + here.ter_set( top, ter_id( post_terrain->roof ) ); + } + } + } } } @@ -1131,6 +1145,21 @@ bool construct::check_support( const tripoint &p ) return num_supports >= 2; } +bool construct::check_stable( const tripoint &p ) +{ + return get_map().has_flag( flag_SUPPORTS_ROOF, p + tripoint_below ); +} + +bool construct::check_empty_stable( const tripoint &p ) +{ + return check_empty( p ) && check_stable( p ); +} + +bool construct::check_nofloor_above( const tripoint &p ) +{ + return get_map().has_flag( flag_NO_FLOOR, p + tripoint_above ); +} + bool construct::check_deconstruct( const tripoint &p ) { map &here = get_map(); @@ -1165,7 +1194,7 @@ bool construct::check_no_trap( const tripoint &p ) bool construct::check_ramp_high( const tripoint &p ) { - if( check_up_OK( p ) && check_up_OK( p + tripoint_above ) ) { + if( check_empty_stable( p ) && check_up_OK( p ) && check_nofloor_above( p ) ) { for( const point &car_d : four_cardinal_directions ) { // check adjacent points on the z-level above for a completed down ramp if( get_map().has_flag( TFLAG_RAMP_DOWN, p + car_d + tripoint_above ) ) { @@ -1178,7 +1207,7 @@ bool construct::check_ramp_high( const tripoint &p ) bool construct::check_ramp_low( const tripoint &p ) { - return check_up_OK( p ) && check_up_OK( p + tripoint_above ); + return check_empty_stable( p ) && check_up_OK( p ) && check_nofloor_above( p ); } void construct::done_trunk_plank( const tripoint &/*p*/ ) @@ -1619,6 +1648,9 @@ void load_construction( const JsonObject &jo ) { "", construct::check_nothing }, { "check_empty", construct::check_empty }, { "check_support", construct::check_support }, + { "check_stable", construct::check_stable }, + { "check_empty_stable", construct::check_empty_stable }, + { "check_nofloor_above", construct::check_nofloor_above }, { "check_deconstruct", construct::check_deconstruct }, { "check_empty_up_OK", construct::check_empty_up_OK }, { "check_up_OK", construct::check_up_OK }, diff --git a/src/melee.cpp b/src/melee.cpp index 134aed15759d2..e48e75d52bf53 100644 --- a/src/melee.cpp +++ b/src/melee.cpp @@ -1816,7 +1816,7 @@ bool Character::block_hit( Creature *source, bodypart_id &bp_hit, damage_instanc // weapon blocks are preferred to limb blocks std::string thing_blocked_with; - if( !force_unarmed && has_shield ) { + if( !( unarmed || force_unarmed ) && has_shield ) { thing_blocked_with = shield.tname(); // TODO: Change this depending on damage blocked float wear_modifier = 1.0f; diff --git a/src/savegame_json.cpp b/src/savegame_json.cpp index 3f6e79ff311e9..8a45ef8d831f2 100644 --- a/src/savegame_json.cpp +++ b/src/savegame_json.cpp @@ -3361,6 +3361,19 @@ void Creature::load( const JsonObject &jsin ) } else { jsin.read( "effects", *effects ); } + + // Remove legacy vitamin effects - they don't do anything, and can't be removed + // Remove this code whenever they actually do anything (0.F or later) + std::set blacklisted = { + efftype_id( "hypocalcemia" ), + efftype_id( "hypovitA" ), + efftype_id( "hypovitB" ), + efftype_id( "scurvy" ) + }; + for( const efftype_id &remove : blacklisted ) { + remove_effect( remove ); + } + jsin.read( "values", values ); jsin.read( "damage_over_time_map", damage_over_time_map ); diff --git a/tests/explosion_balance_test.cpp b/tests/explosion_balance_test.cpp index a95c167f7f21e..ed8d6c338de09 100644 --- a/tests/explosion_balance_test.cpp +++ b/tests/explosion_balance_test.cpp @@ -108,7 +108,7 @@ static std::vector get_part_hp( vehicle *veh ) } static void check_vehicle_damage( const std::string &explosive_id, const std::string &vehicle_id, - const int range ) + const int range, const double damage_lower_bound, const double damage_upper_bound = 1.0 ) { // Clear map clear_map_and_put_player_underground(); @@ -131,19 +131,20 @@ static void check_vehicle_damage( const std::string &explosive_id, const std::st std::vector after_hp = get_part_hp( target_vehicle ); + // running sums of all parts, so we can do tests for hp range for the whole vehicle + int before_hp_total = 0; + int after_hp_total = 0; + // We don't expect any destroyed parts. REQUIRE( before_hp.size() == after_hp.size() ); for( size_t i = 0; i < before_hp.size(); ++i ) { - CAPTURE( i ); - INFO( target_vehicle->part( i ).name() ); - if( target_vehicle->part( i ).info().get_id() == vpart_battery_car || - target_vehicle->part( i ).info().get_id() == vpart_headlight || - target_vehicle->part( i ).info().get_id() == vpart_windshield ) { - CHECK( before_hp[ i ] >= after_hp[ i ] ); - } else if( !( target_vehicle->part( i ).info().get_id() == vpart_vehicle_clock ) ) { - CHECK( before_hp[ i ] == after_hp[ i ] ); - } + before_hp_total += before_hp[ i ]; + after_hp_total += after_hp[ i ]; } + CAPTURE( before_hp_total ); + INFO( vehicle_id ); + CHECK( after_hp_total >= floor( before_hp_total * damage_lower_bound ) ); + CHECK( after_hp_total <= ceil( before_hp_total * damage_upper_bound ) ); } TEST_CASE( "grenade_lethality", "[grenade],[explosion],[balance],[slow]" ) @@ -154,5 +155,24 @@ TEST_CASE( "grenade_lethality", "[grenade],[explosion],[balance],[slow]" ) TEST_CASE( "grenade_vs_vehicle", "[grenade],[explosion],[balance]" ) { - check_vehicle_damage( "grenade_act", "car", 5 ); + /* as of test writing, car hp is 17653. 0.998 of that means the grenade + * has to do more than 36 points of damage to 'fail', which isn't remotely + * enough to disable a car even if it all happens to a single component + * + * also as of test writing: + * motorcycle = 3173 hp, 0.997 is 3163 (so <= 10 points of damage) + * at a range of 0, we expect motorcycles to take damage from a grenade. + * should be between 3093 and 3166 (or 7 to 80 damage) + * + * humvee absolutely does not believe in a grenade damaging it. + * this might change if we adjust the default armor loadout of a humvee, + * but i would still expect less damage than with the car due to + * heavy duty frames. + */ + for( size_t i = 0; i <= 20 ; ++i ) { + check_vehicle_damage( "grenade_act", "car", 5, 0.998 ); + check_vehicle_damage( "grenade_act", "motorcycle", 5, 0.997 ); + check_vehicle_damage( "grenade_act", "motorcycle", 0, 0.975, 0.9975 ); + check_vehicle_damage( "grenade_act", "humvee", 5, 1 ); + } }