diff --git a/.github/workflows/msvc-full-features.yml b/.github/workflows/msvc-full-features.yml index cdc648b21145e..6dde983aa1894 100644 --- a/.github/workflows/msvc-full-features.yml +++ b/.github/workflows/msvc-full-features.yml @@ -76,7 +76,7 @@ jobs: id: runvcpkg with: vcpkgDirectory: '${{ runner.workspace }}/b/vcpkg' - vcpkgGitCommitId: '5b1214315250939257ef5d62ecdcbca18cf4fb1c' + vcpkgGitCommitId: '66444e13a86da7087ee24c342f91801cc6eb9877' - name: Integrate vcpkg run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e8b2ade85d42b..4bd98dae635cb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -166,7 +166,7 @@ jobs: id: runvcpkg with: vcpkgDirectory: '${{ runner.workspace }}/b/vcpkg' - vcpkgGitCommitId: '5b1214315250939257ef5d62ecdcbca18cf4fb1c' + vcpkgGitCommitId: '66444e13a86da7087ee24c342f91801cc6eb9877' - name: Install dependencies (windows msvc) (3/3) if: runner.os == 'Windows' run: | diff --git a/data/json/harvest.json b/data/json/harvest.json index 36ef069dddd0d..844bd17180141 100644 --- a/data/json/harvest.json +++ b/data/json/harvest.json @@ -1925,6 +1925,7 @@ { "id": "fungaloid", "type": "harvest", + "message": "", "entries": [ { "drop": "veggy_tainted", "type": "flesh", "mass_ratio": 0.5 }, { "drop": "plant_sac", "type": "offal", "mass_ratio": 0.2 }, @@ -1962,6 +1963,7 @@ { "id": "biollante", "type": "harvest", + "message": "", "//": "todo: add biollante item", "entries": [ { "drop": "stick_fiber", "type": "bone", "mass_ratio": 0.5 }, @@ -1972,6 +1974,7 @@ { "id": "triffid_small", "type": "harvest", + "message": "", "entries": [ { "drop": "stick_fiber", "type": "bone", "mass_ratio": 0.5 }, { "drop": "veggy", "type": "flesh", "mass_ratio": 0.2 }, @@ -1981,6 +1984,7 @@ { "id": "triffid_paralytic", "type": "harvest", + "message": "", "entries": [ { "drop": "stick_fiber", "type": "bone", "mass_ratio": 0.4 }, { "drop": "veggy", "type": "flesh", "mass_ratio": 0.2 }, @@ -1993,6 +1997,7 @@ "id": "triffid_acid", "//": "acid blood type for plant based creaturs.", "type": "harvest", + "message": "", "entries": [ { "drop": "blood_acid_plant", "type": "blood", "mass_ratio": 0.1 }, { "drop": "stick_fiber", "type": "bone", "mass_ratio": 0.5 }, @@ -2003,6 +2008,7 @@ { "id": "triffid_fungal_fighter", "type": "harvest", + "message": "", "entries": [ { "drop": "stick_fiber", "type": "bone", "mass_ratio": 0.4 }, { "drop": "veggy", "type": "flesh", "mass_ratio": 0.2 }, @@ -2015,6 +2021,7 @@ { "id": "triffid_queen", "type": "harvest", + "message": "", "entries": [ { "drop": "log", "type": "bone", "mass_ratio": 0.35 }, { "drop": "stick_fiber", "type": "bone", "mass_ratio": 0.15 }, diff --git a/data/json/mapgen/map_extras/laststand.json b/data/json/mapgen/map_extras/laststand.json new file mode 100644 index 0000000000000..6952e46ad8043 --- /dev/null +++ b/data/json/mapgen/map_extras/laststand.json @@ -0,0 +1,74 @@ +[ + { + "type": "monstergroup", + "name": "GROUP_LAST_STAND", + "default": "mon_null", + "monsters": [ + { "monster": "mon_civilian_police", "weight": 1, "cost_multiplier": 1, "ends": "5 days" }, + { "monster": "mon_civilian_zombiefighter", "weight": 4, "cost_multiplier": 1, "ends": "5 days" } + ] + }, + { + "type": "mapgen", + "method": "json", + "update_mapgen_id": "mx_laststand", + "object": { + "rows": [ + " ", + " ", + " ", + " ", + " ################## ", + " ################## ", + " ################## ", + " ### ### ", + " ### ### ", + " ### ### ", + " ### ### ", + " ### ### ", + " ### ### ", + " ### ### ", + " ### ### ", + " ### ### ", + " ################## ", + " ################## ", + " ################## ", + " ", + " ", + " ", + " ", + " " + ], + "furniture": { + "#": [ + [ "f_barricade_road", 10 ], + [ "f_sandbag_half", 10 ], + [ "f_earthbag_half", 10 ], + [ "f_gravelbag_half", 10 ], + [ "f_table", 10 ], + [ "f_bench", 10 ], + "f_55gal_firebarrel", + "f_30gal_firebarrel", + "f_pallet_brick", + "f_pallet_cement", + "f_stack_plank", + "f_metal_table", + "f_armchair", + "f_chair", + "f_rack", + "f_locker", + "f_displaycase", + "f_recycle_bin", + "f_trashcan", + "f_metal_trashcan", + "f_rubble", + "f_wreckage", + [ "f_null", 150 ] + ] + }, + "place_monster": [ { "group": "GROUP_LAST_STAND", "x": [ 6, 17 ], "y": [ 6, 16 ], "chance": 100, "repeat": [ 10, 15 ] } ], + "place_loot": [ { "group": "trash", "x": [ 6, 17 ], "y": [ 6, 16 ], "repeat": [ 5, 10 ] } ], + "flags": [ "ERASE_ALL_BEFORE_PLACING_TERRAIN" ] + } + } +] diff --git a/data/json/monster_weakpoints/fungaloid_weakpoints.json b/data/json/monster_weakpoints/fungaloid_weakpoints.json new file mode 100644 index 0000000000000..e212b215d2d60 --- /dev/null +++ b/data/json/monster_weakpoints/fungaloid_weakpoints.json @@ -0,0 +1,99 @@ +[ + { + "type": "weakpoint_set", + "id": "wps_fungaloid", + "weakpoints": [ + { + "id": "arm", + "name": "the arm", + "crit_mult": { "all": 0.75 }, + "difficulty": { "ranged": 4, "melee": 3 }, + "coverage_mult": { "point": 0.75 }, + "effects": [ + { "effect": "staggered", "chance": 15, "message": "The %s is knocked off-balance!", "damage_required": [ 10, 30 ] }, + { + "effect": "staggered", + "chance": 25, + "message": "The %s is knocked off-balance!", + "damage_required": [ 31, 100 ] + } + ], + "coverage": 6 + }, + { + "id": "leg", + "name": "the leg", + "crit_mult": { "all": 0.75 }, + "difficulty": { "ranged": 3, "melee": 1 }, + "coverage_mult": { "point": 0.75 }, + "effects": [ + { "effect": "downed", "chance": 5, "message": "The %s is knocked down!", "damage_required": [ 10, 30 ] }, + { "effect": "downed", "chance": 15, "message": "The %s is knocked down!", "damage_required": [ 31, 50 ] }, + { "effect": "downed", "chance": 25, "message": "The %s is knocked down!", "damage_required": [ 51, 100 ] } + ], + "coverage": 15 + }, + { + "id": "head", + "name": "the head", + "coverage": 5, + "crit_mult": { "all": 1.1 }, + "armor_mult": { "physical": 0.75 }, + "difficulty": { "melee": 2, "ranged": 5 }, + "effects": [ + { + "effect": "stunned", + "duration": [ 1, 2 ], + "chance": 5, + "message": "The %s is stunned!", + "damage_required": [ 1, 10 ] + }, + { + "effect": "stunned", + "duration": [ 1, 2 ], + "chance": 25, + "message": "The %s is stunned!", + "damage_required": [ 11, 50 ] + }, + { + "effect": "stunned", + "duration": [ 1, 2 ], + "chance": 45, + "message": "The %s is stunned!", + "damage_required": [ 51, 100 ] + } + ] + } + ] + }, + { + "type": "weakpoint_set", + "id": "wps_fungaloid_structure", + "weakpoints": [ + { + "id": "gap", + "name": "a small gap in the thick wall", + "coverage": 5, + "difficulty": { "melee": 4, "ranged": 5 }, + "coverage_mult": { "broad": 0.5 }, + "armor_mult": { "all": 0.25 } + }, + { + "id": "joint", + "name": "a soft fold in the thick wall", + "coverage": 10, + "difficulty": { "melee": 3, "ranged": 5 }, + "coverage_mult": { "point": 0.75 }, + "armor_mult": { "all": 0.5 } + }, + { + "id": "hard_hide", + "name": "a particularly thick patch of the wall", + "armor_mult": { "all": 1.25 }, + "crit_mult": { "all": 0.75 }, + "coverage_mult": { "melee": 0.75 }, + "coverage": 3 + } + ] + } +] diff --git a/data/json/monster_weakpoints/slime_weakpoints.json b/data/json/monster_weakpoints/slime_weakpoints.json new file mode 100644 index 0000000000000..8226ae9e6fe0f --- /dev/null +++ b/data/json/monster_weakpoints/slime_weakpoints.json @@ -0,0 +1,80 @@ +[ + { + "type": "weakpoint_set", + "id": "wps_slime", + "weakpoints": [ + { + "id": "body", + "name": "the body", + "crit_mult": { "all": 0.75 }, + "difficulty": { "ranged": 4, "melee": 3 }, + "coverage_mult": { "point": 0.75 }, + "effects": [ + { "effect": "staggered", "chance": 15, "message": "The %s is knocked off-balance!", "damage_required": [ 10, 30 ] }, + { + "effect": "staggered", + "chance": 25, + "message": "The %s is knocked off-balance!", + "damage_required": [ 31, 100 ] + } + ], + "coverage": 6 + }, + { + "id": "insensitive_spot", + "name": "a spot with virtually nothing to damage", + "armor_mult": { "all": 1.25 }, + "crit_mult": { "all": 0.75 }, + "coverage_mult": { "melee": 0.75 }, + "coverage": 3 + }, + { + "id": "organ", + "name": "an organ inside the slime, causing the slime to freeze up briefly as it reconstitutes it", + "crit_mult": { "all": 0.75 }, + "difficulty": { "melee": 3, "ranged": 5 }, + "coverage_mult": { "melee": 0.75 }, + "effects": [ + { + "effect": "stunned", + "duration": [ 1, 2 ], + "chance": 5, + "message": "The %s is stunned!", + "damage_required": [ 1, 10 ] + }, + { + "effect": "stunned", + "duration": [ 1, 2 ], + "chance": 25, + "message": "The %s is stunned!", + "damage_required": [ 11, 50 ] + }, + { + "effect": "stunned", + "duration": [ 1, 2 ], + "chance": 45, + "message": "The %s is stunned!", + "damage_required": [ 51, 100 ] + } + ], + "coverage": 3 + }, + { + "id": "fragment", + "name": "the body, separating a fragment that you manage to keep from rejoining the slime until the fragment melts away", + "crit_mult": { "all": 0.75 }, + "difficulty": { "ranged": 3, "melee": 1 }, + "coverage_mult": { "point": 0.75 }, + "coverage": 5 + }, + { + "id": "pseudopod", + "name": "a pseudopod reaching out to strike you when you deftly counter strike it", + "crit_mult": { "all": 0.75 }, + "difficulty": { "ranged": 7, "melee": 5 }, + "coverage_mult": { "point": 0.75 }, + "coverage": 5 + } + ] + } +] diff --git a/data/json/monster_weakpoints/triffid_weakpoints.json b/data/json/monster_weakpoints/triffid_weakpoints.json new file mode 100644 index 0000000000000..baa865e108e72 --- /dev/null +++ b/data/json/monster_weakpoints/triffid_weakpoints.json @@ -0,0 +1,93 @@ +[ + { + "type": "weakpoint_set", + "id": "wps_triffid", + "weakpoints": [ + { + "id": "branch", + "name": "the branch", + "crit_mult": { "all": 0.75 }, + "difficulty": { "ranged": 4, "melee": 3 }, + "coverage_mult": { "point": 0.75 }, + "effects": [ + { "effect": "staggered", "chance": 15, "message": "The %s is knocked off-balance!", "damage_required": [ 10, 30 ] }, + { + "effect": "staggered", + "chance": 25, + "message": "The %s is knocked off-balance!", + "damage_required": [ 31, 100 ] + } + ], + "coverage": 6 + }, + { + "id": "root", + "name": "the root", + "crit_mult": { "all": 0.75 }, + "difficulty": { "ranged": 3, "melee": 1 }, + "coverage_mult": { "point": 0.75 }, + "effects": [ + { "effect": "downed", "chance": 5, "message": "The %s is knocked down!", "damage_required": [ 10, 30 ] }, + { "effect": "downed", "chance": 15, "message": "The %s is knocked down!", "damage_required": [ 31, 50 ] }, + { "effect": "downed", "chance": 25, "message": "The %s is knocked down!", "damage_required": [ 51, 100 ] } + ], + "coverage": 15 + }, + { + "id": "flower", + "name": "the flower", + "coverage": 5, + "crit_mult": { "all": 1.1 }, + "armor_mult": { "physical": 0.75 }, + "difficulty": { "melee": 2, "ranged": 5 }, + "effects": [ + { + "effect": "stunned", + "duration": [ 1, 2 ], + "chance": 5, + "message": "The %s is stunned!", + "damage_required": [ 1, 10 ] + }, + { + "effect": "stunned", + "duration": [ 1, 2 ], + "chance": 25, + "message": "The %s is stunned!", + "damage_required": [ 11, 50 ] + }, + { + "effect": "stunned", + "duration": [ 1, 2 ], + "chance": 45, + "message": "The %s is stunned!", + "damage_required": [ 51, 100 ] + } + ] + }, + { + "id": "gap", + "name": "a small gap in the bark", + "coverage": 5, + "difficulty": { "melee": 4, "ranged": 5 }, + "coverage_mult": { "broad": 0.5 }, + "armor_mult": { "all": 0.25 } + }, + { + "id": "joint", + "name": "a soft fold in the thick bark", + "coverage": 10, + "difficulty": { "melee": 3, "ranged": 5 }, + "coverage_mult": { "point": 0.75 }, + "armor_mult": { "all": 0.5 } + }, + { + "id": "thick bark", + "name": "a particularly thick patch of the bark", + "armor_mult": { "all": 1.25 }, + "crit_mult": { "all": 0.75 }, + "coverage_mult": { "melee": 0.75 }, + "coverage": 3 + } + ] + } +] diff --git a/data/json/monsters/fungus.json b/data/json/monsters/fungus.json index 0660140e83df5..2f565c6c8f452 100644 --- a/data/json/monsters/fungus.json +++ b/data/json/monsters/fungus.json @@ -18,6 +18,8 @@ "morale": 100, "melee_damage": [ { "damage_type": "cut", "amount": 0 } ], "bleed_rate": 0, + "weakpoint_sets": [ "wps_fungaloid_structure" ], + "families": [ "prof_intro_biology", "prof_physiology", "prof_wp_fungaloid_basic", "prof_wp_fungaloid_advanced" ], "luminance": 40, "harvest": "exempt", "special_attacks": [ [ "FUNGUS_HAZE", 25 ] ], @@ -47,6 +49,8 @@ "melee_dice_sides": 3, "melee_damage": [ { "damage_type": "cut", "amount": 4 } ], "bleed_rate": 0, + "weakpoint_sets": [ "wps_fungaloid_structure" ], + "families": [ "prof_intro_biology", "prof_physiology", "prof_wp_fungaloid_basic", "prof_wp_fungaloid_advanced" ], "harvest": "exempt", "special_attacks": [ [ "FUNGUS_BRISTLE", 10 ] ], "death_function": { "message": "The %s disintegrates!", "corpse_type": "NO_CORPSE" }, @@ -76,6 +80,8 @@ "melee_damage": [ { "damage_type": "cut", "amount": 3 } ], "dodge": 4, "bleed_rate": 0, + "weakpoint_sets": [ "wps_fungaloid_structure" ], + "families": [ "prof_intro_biology", "prof_physiology", "prof_wp_fungaloid_basic", "prof_wp_fungaloid_advanced" ], "harvest": "exempt", "special_attacks": [ [ "FUNGUS_INJECT", 10 ] ], "death_function": { "corpse_type": "NO_CORPSE", "effect": { "id": "death_fungus", "hit_self": true } }, @@ -104,6 +110,8 @@ "melee_dice_sides": 10, "melee_damage": [ { "damage_type": "cut", "amount": 0 } ], "bleed_rate": 0, + "weakpoint_sets": [ "wps_fungaloid_structure" ], + "families": [ "prof_intro_biology", "prof_physiology", "prof_wp_fungaloid_basic", "prof_wp_fungaloid_advanced" ], "harvest": "exempt", "special_attacks": [ [ "FUNGUS", 10 ] ], "death_function": { "message": "The %s disintegrates!", "corpse_type": "NO_CORPSE" }, @@ -133,6 +141,8 @@ "melee_dice_sides": 4, "melee_damage": [ { "damage_type": "cut", "amount": 0 } ], "bleed_rate": 0, + "weakpoint_sets": [ "wps_fungaloid_structure" ], + "families": [ "prof_intro_biology", "prof_physiology", "prof_wp_fungaloid_basic", "prof_wp_fungaloid_advanced" ], "harvest": "fungaloid", "special_attacks": [ [ "FUNGUS", 30 ] ], "death_function": { "effect": { "id": "death_fungus", "hit_self": true } }, @@ -151,6 +161,8 @@ "hp": 150, "speed": 20, "bleed_rate": 0, + "weakpoint_sets": [ "wps_fungaloid_structure" ], + "families": [ "prof_intro_biology", "prof_physiology", "prof_wp_fungaloid_basic", "prof_wp_fungaloid_advanced" ], "special_attacks": [ [ "FUNGUS", 20 ], { @@ -187,6 +199,8 @@ "aggression": 100, "morale": 100, "melee_damage": [ { "damage_type": "cut", "amount": 0 } ], + "weakpoint_sets": [ "wps_fungaloid_structure" ], + "families": [ "prof_intro_biology", "prof_physiology", "prof_wp_fungaloid_basic", "prof_wp_fungaloid_advanced" ], "special_attacks": [ [ "FUNGUS_SPROUT", 10 ] ], "death_function": { "effect": { "id": "death_fungus", "hit_self": true } }, "harvest": "fungaloid_mass", @@ -211,6 +225,8 @@ "aggression": 100, "morale": 100, "melee_damage": [ { "damage_type": "cut", "amount": 0 } ], + "weakpoint_sets": [ "wps_fungaloid_structure" ], + "families": [ "prof_intro_biology", "prof_physiology", "prof_wp_fungaloid_basic", "prof_wp_fungaloid_advanced" ], "luminance": 200, "special_attacks": [ [ "FUNGUS_BIG_BLOSSOM", 10 ] ], "death_function": { "effect": { "id": "death_fungus", "hit_self": true } }, @@ -239,6 +255,8 @@ "melee_dice": 3, "melee_dice_sides": 4, "melee_damage": [ { "damage_type": "cut", "amount": 5 } ], + "weakpoint_sets": [ "wps_fungaloid_structure" ], + "families": [ "prof_intro_biology", "prof_physiology", "prof_wp_fungaloid_basic", "prof_wp_fungaloid_advanced" ], "dodge": 3, "special_attacks": [ [ "FUNGUS_FORTIFY", 10 ] ], "death_drops": "marloss_yellow_drops", @@ -270,6 +288,8 @@ "melee_damage": [ { "damage_type": "cut", "amount": 2 } ], "dodge": 1, "bleed_rate": 0, + "weakpoint_sets": [ "wps_fungaloid_structure" ], + "families": [ "prof_intro_biology", "prof_physiology", "prof_wp_fungaloid_basic", "prof_wp_fungaloid_advanced" ], "harvest": "fungaloid", "special_attacks": [ [ "FUNGUS_GROWTH", 10000 ] ], "flags": [ "HEARS", "POISON", "NO_BREATHE", "NOHEAD" ], @@ -295,6 +315,8 @@ "melee_damage": [ { "damage_type": "cut", "amount": 0 } ], "dodge": 2, "bleed_rate": 0, + "weakpoint_sets": [ "wps_fungaloid_structure" ], + "families": [ "prof_intro_biology", "prof_physiology", "prof_wp_fungaloid_basic", "prof_wp_fungaloid_advanced" ], "harvest": "exempt", "special_attacks": [ [ "PLANT", 100 ] ], "death_function": { "message": "The %s disintegrates!", "corpse_type": "NO_CORPSE" }, diff --git a/data/json/monsters/slimes.json b/data/json/monsters/slimes.json index 308faeee9bb5a..b265f3f1571c8 100644 --- a/data/json/monsters/slimes.json +++ b/data/json/monsters/slimes.json @@ -23,6 +23,8 @@ "melee_dice_sides": 4, "melee_damage": [ { "damage_type": "cut", "amount": 0 } ], "bleed_rate": 30, + "weakpoint_sets": [ "wps_slime" ], + "families": [ "prof_intro_biology", "prof_wp_slime_basic", "prof_wp_slime_advanced" ], "harvest": "exempt", "special_attacks": [ [ "FORMBLOB", 30 ] ], "death_function": { @@ -57,6 +59,8 @@ "melee_dice_sides": 4, "melee_damage": [ { "damage_type": "cut", "amount": 0 } ], "bleed_rate": 20, + "weakpoint_sets": [ "wps_slime" ], + "families": [ "prof_intro_biology", "prof_wp_slime_basic", "prof_wp_slime_advanced" ], "harvest": "exempt", "special_attacks": [ [ "CALLBLOBS", 0 ] ], "death_function": { @@ -92,6 +96,8 @@ "melee_dice_sides": 6, "melee_damage": [ { "damage_type": "cut", "amount": 0 } ], "bleed_rate": 30, + "weakpoint_sets": [ "wps_slime" ], + "families": [ "prof_intro_biology", "prof_wp_slime_basic", "prof_wp_slime_advanced" ], "harvest": "exempt", "special_attacks": [ [ "FORMBLOB", 20 ] ], "death_function": { @@ -125,6 +131,8 @@ "melee_dice": 1, "melee_dice_sides": 4, "melee_damage": [ { "damage_type": "cut", "amount": 0 } ], + "weakpoint_sets": [ "wps_slime" ], + "families": [ "prof_intro_biology", "prof_wp_slime_basic", "prof_wp_slime_advanced" ], "harvest": "exempt", "death_function": { "message": "The %s's body melts away.", "corpse_type": "NO_CORPSE" }, "death_drops": "mon_blob_small_deathdrops", @@ -152,6 +160,8 @@ "melee_dice": 2, "melee_dice_sides": 3, "melee_damage": [ { "damage_type": "cut", "amount": 0 } ], + "weakpoint_sets": [ "wps_slime" ], + "families": [ "prof_intro_biology", "prof_wp_slime_basic", "prof_wp_slime_advanced" ], "harvest": "exempt", "death_drops": "slime_sample_small", "special_attacks": [ [ "FORMBLOB", 4 ] ], @@ -182,6 +192,8 @@ "melee_dice": 2, "melee_dice_sides": 4, "melee_damage": [ { "damage_type": "cut", "amount": 0 } ], + "weakpoint_sets": [ "wps_slime" ], + "families": [ "prof_intro_biology", "prof_wp_slime_basic", "prof_wp_slime_advanced" ], "dodge": 1, "vision_day": 16, "vision_night": 10, @@ -219,6 +231,8 @@ "melee_dice": 4, "melee_dice_sides": 6, "melee_damage": [ { "damage_type": "cut", "amount": 0 } ], + "weakpoint_sets": [ "wps_slime" ], + "families": [ "prof_intro_biology", "prof_wp_slime_basic", "prof_wp_slime_advanced" ], "vision_day": 30, "vision_night": 10, "harvest": "exempt", diff --git a/data/json/monsters/triffid.json b/data/json/monsters/triffid.json index 08dabe3a2a763..7a43a184d91e5 100644 --- a/data/json/monsters/triffid.json +++ b/data/json/monsters/triffid.json @@ -45,6 +45,8 @@ "morale": 100, "melee_damage": [ { "damage_type": "cut", "amount": 0 } ], "bleed_rate": 80, + "weakpoint_sets": [ "wps_triffid" ], + "families": [ "prof_intro_biology", "prof_wp_triffid_basic", "prof_wp_triffid_advanced" ], "harvest": "biollante", "dissect": "dissect_plant_sample_single", "special_attacks": [ [ "SPIT_SAP", 2 ] ], @@ -70,6 +72,8 @@ "morale": 100, "melee_damage": [ { "damage_type": "cut", "amount": 0 } ], "bleed_rate": 50, + "weakpoint_sets": [ "wps_triffid" ], + "families": [ "prof_intro_biology", "prof_wp_triffid_basic", "prof_wp_triffid_advanced" ], "harvest": "exempt", "special_attacks": [ [ "GROW_VINE", 60 ] ], "death_function": { "effect": { "id": "death_kill_vines", "hit_self": true, "min_level": 1 }, "corpse_type": "NO_CORPSE" }, @@ -94,6 +98,8 @@ "morale": 100, "melee_damage": [ { "damage_type": "cut", "amount": 0 } ], "bleed_rate": 80, + "weakpoint_sets": [ "wps_triffid" ], + "families": [ "prof_intro_biology", "prof_wp_triffid_basic", "prof_wp_triffid_advanced" ], "harvest": "exempt", "special_attacks": [ [ "VINE", 100 ] ], "death_function": { "effect": { "id": "death_kill_vines", "hit_self": true }, "corpse_type": "NO_CORPSE" }, @@ -120,6 +126,8 @@ "melee_dice": 1, "melee_dice_sides": 1, "melee_damage": [ { "damage_type": "cut", "amount": 1 } ], + "weakpoint_sets": [ "wps_triffid" ], + "families": [ "prof_intro_biology", "prof_wp_triffid_basic", "prof_wp_triffid_advanced" ], "harvest": "triffid_small", "upgrades": { "age_grow": 14, "into": "mon_triffid_young" }, "flags": [ "HEARS", "SMELLS", "NOHEAD", "STUMBLES" ], @@ -145,6 +153,8 @@ "melee_dice_sides": 4, "melee_damage": [ { "damage_type": "cut", "amount": 4 } ], "bleed_rate": 75, + "weakpoint_sets": [ "wps_triffid" ], + "families": [ "prof_intro_biology", "prof_wp_triffid_basic", "prof_wp_triffid_advanced" ], "harvest": "triffid_paralytic", "dissect": "dissect_plant_sample_single", "upgrades": { "age_grow": 14, "into": "mon_triffid" }, @@ -174,6 +184,8 @@ "melee_dice_sides": 4, "melee_damage": [ { "damage_type": "cut", "amount": 6 } ], "bleed_rate": 60, + "weakpoint_sets": [ "wps_triffid" ], + "families": [ "prof_intro_biology", "prof_wp_triffid_basic", "prof_wp_triffid_advanced" ], "harvest": "triffid_paralytic", "dissect": "dissect_plant_sample_single", "fungalize_into": "mon_fungaloid", @@ -201,6 +213,8 @@ "melee_dice_sides": 8, "melee_damage": [ { "damage_type": "cut", "amount": 8 } ], "bleed_rate": 40, + "weakpoint_sets": [ "wps_triffid" ], + "families": [ "prof_intro_biology", "prof_wp_triffid_basic", "prof_wp_triffid_advanced" ], "harvest": "triffid_queen", "dissect": "dissect_plant_sample_small", "special_attacks": [ [ "GROWPLANTS", 20 ] ], @@ -231,6 +245,8 @@ "special_attacks": [ { "id": "grab", "cooldown": 7 }, { "id": "grab_2", "cooldown": 12 } ], "dodge": 4, "bleed_rate": 10, + "weakpoint_sets": [ "wps_triffid" ], + "families": [ "prof_intro_biology", "prof_wp_triffid_basic", "prof_wp_triffid_advanced" ], "harvest": "triffid_small", "dissect": "dissect_plant_sample_single", "flags": [ "HEARS", "GOODHEARING", "NOHEAD", "HARDTOSHOOT", "GRABS", "SWIMS", "PLASTIC", "WATER_CAMOUFLAGE" ], @@ -257,6 +273,8 @@ "melee_dice_sides": 6, "melee_damage": [ { "damage_type": "cut", "amount": 4 } ], "bleed_rate": 60, + "weakpoint_sets": [ "wps_triffid" ], + "families": [ "prof_intro_biology", "prof_wp_triffid_basic", "prof_wp_triffid_advanced" ], "harvest": "triffid_fungal_fighter", "dissect": "dissect_plant_sample_single", "attack_effs": [ { "id": "paralyzepoison", "intensity": [ 3, 6 ], "duration": [ 20, 60 ] } ], @@ -284,6 +302,8 @@ "morale": 100, "melee_damage": [ { "damage_type": "cut", "amount": 0 } ], "bleed_rate": 60, + "weakpoint_sets": [ "wps_triffid" ], + "families": [ "prof_intro_biology", "prof_wp_triffid_basic", "prof_wp_triffid_advanced" ], "emit_fields": [ { "emit_id": "emit_pollen_stream", "delay": "1 s" } ], "harvest": "triffid_paralytic", "dissect": "dissect_plant_sample_small", @@ -309,6 +329,8 @@ "aggression": 100, "morale": 100, "melee_damage": [ { "damage_type": "cut", "amount": 0 } ], + "weakpoint_sets": [ "wps_triffid" ], + "families": [ "prof_intro_biology", "prof_wp_triffid_basic", "prof_wp_triffid_advanced" ], "harvest": "triffid_small", "dissect": "dissect_plant_sample_huge", "special_attacks": [ [ "TRIFFID_HEARTBEAT", 50 ] ], diff --git a/data/json/overmap/map_extras.json b/data/json/overmap/map_extras.json index 9ee41be231690..6c7ab3667f602 100644 --- a/data/json/overmap/map_extras.json +++ b/data/json/overmap/map_extras.json @@ -10,6 +10,18 @@ "color": "red", "autonote": true }, + { + "id": "mx_laststand", + "type": "map_extra", + "name": { "str": "Last Stand" }, + "description": "Some people made a last stand against the zombies here.", + "generator": { "generator_method": "update_mapgen", "generator_id": "mx_laststand" }, + "sym": "X", + "color": "green", + "autonote": true, + "min_max_zlevel": [ 0, 0 ], + "flags": [ "MAN_MADE" ] + }, { "id": "mx_collegekids", "type": "map_extra", diff --git a/data/json/proficiencies/weakpoints.json b/data/json/proficiencies/weakpoints.json index 19cc472fafd3d..2479b8b3c2dd9 100644 --- a/data/json/proficiencies/weakpoints.json +++ b/data/json/proficiencies/weakpoints.json @@ -206,5 +206,77 @@ "required_proficiencies": [ "prof_intro_biology" ], "default_weakpoint_bonus": 4, "default_weakpoint_penalty": -2 + }, + { + "type": "proficiency", + "id": "prof_wp_triffid_basic", + "category": "prof_weakpoint", + "name": { "str": "Triffid basic anatomy" }, + "description": "Study of triffids has given you insights into their anatomy that allows you to aim for some weak spots.", + "can_learn": true, + "required_proficiencies": [ "prof_intro_biology" ], + "time_to_learn": "6 h", + "default_weakpoint_bonus": 1, + "default_weakpoint_penalty": -2 + }, + { + "type": "proficiency", + "id": "prof_wp_triffid_advanced", + "category": "prof_weakpoint", + "name": { "str": "Triffid detailed anatomy" }, + "description": "Extensive study of triffids has provided you with a good understanding of their strengths and weaknesses when it comes to combat. A scientific study of them might yield further biological insights, but you don't have the time to spend years cooped up in a lab.", + "can_learn": true, + "time_to_learn": "24 h", + "required_proficiencies": [ "prof_wp_triffid_basic" ], + "default_weakpoint_bonus": 2, + "default_weakpoint_penalty": -2 + }, + { + "type": "proficiency", + "id": "prof_wp_slime_basic", + "category": "prof_weakpoint", + "name": { "str": "Slime basic weaknesses" }, + "description": "After having engaged slimes to a significant extent you have started to get better at exploiting weaknesses in their behavior and, for lack of better terms, \"physiology\".", + "can_learn": true, + "required_proficiencies": [ "prof_intro_biology" ], + "time_to_learn": "6 h", + "default_weakpoint_bonus": 1, + "default_weakpoint_penalty": -2 + }, + { + "type": "proficiency", + "id": "prof_wp_slime_advanced", + "category": "prof_weakpoint", + "name": { "str": "Slime detailed weaknesses" }, + "description": "You've probably reached the pinnacle of slime weakness exploitation, but it has taken an enormous amount of combat to acquire it.", + "can_learn": true, + "time_to_learn": "24 h", + "required_proficiencies": [ "prof_wp_slime_basic" ], + "default_weakpoint_bonus": 2, + "default_weakpoint_penalty": -2 + }, + { + "type": "proficiency", + "id": "prof_wp_fungaloid_basic", + "category": "prof_weakpoint", + "name": { "str": "Fungaloid basic anatomy" }, + "description": "You have studied fungaloids sufficiently to get an idea of which parts are the more sensitive ones. While seeming to be a weird mixture of fungus and animal, it at least has a structure with commonalities between different types of fungaloids.", + "can_learn": true, + "required_proficiencies": [ "prof_intro_biology" ], + "time_to_learn": "6 h", + "default_weakpoint_bonus": 1, + "default_weakpoint_penalty": -2 + }, + { + "type": "proficiency", + "id": "prof_wp_fungaloid_advanced", + "category": "prof_weakpoint", + "name": { "str": "Fungaloid detailed anatomy" }, + "description": "You have advanced your understanding of the fungaloid body sufficiently to have a pretty good idea of where you can harm it and where it's better protected. You don't really understand it's biological functions, although it seems it would be possible for someone with much more time than you have to glean some insight into it, but you've gotten an understanding of how to hurt it, and that's what's important here.", + "can_learn": true, + "time_to_learn": "24 h", + "required_proficiencies": [ "prof_wp_fungaloid_basic" ], + "default_weakpoint_bonus": 2, + "default_weakpoint_penalty": -2 } ] diff --git a/data/json/regional_map_settings.json b/data/json/regional_map_settings.json index aeb350ce2a0ae..c2ecc2801ebee 100644 --- a/data/json/regional_map_settings.json +++ b/data/json/regional_map_settings.json @@ -779,7 +779,7 @@ } }, "bridgehead_ground": { "chance": 5, "extras": { "mx_minefield": 100 } }, - "road_nesw_manhole": { "chance": 20, "extras": { "mx_city_trap": 100 } }, + "road_nesw_manhole": { "chance": 20, "extras": { "mx_city_trap": 50, "mx_laststand": 50 } }, "build": { "chance": 90, "extras": { diff --git a/data/json/snippets/epilogue_npc.json b/data/json/snippets/epilogue_npc.json index f75942f0d9de0..6a2f2b4030f6a 100644 --- a/data/json/snippets/epilogue_npc.json +++ b/data/json/snippets/epilogue_npc.json @@ -218,6 +218,38 @@ { "id": "epilogue_npc_male_55", "text": " He got sick soon after your death, and died without any medical help. His last words were 'Why did I live long enough to suffer like that?'" + }, + { + "id": "epilogue_npc_male_56", + "text": " Went mad soon after learning of your death, leading him to believe he was the predestined savior who would bring sinners into paradise. Ended up perishing in a siege against the Hell's Raiders that lasted for a grueling, protracted month." + }, + { + "id": "epilogue_npc_male_57", + "text": " He had a dream he told no other about. It was a grand ideal, a fantasy out of a long-dead era. He aspired to become a leader who would shield humanity from the tribulations of the new world. He gathered survivors and built a settlement with the fledging numbers he had. They held out for as long as they could, but the dream of civilization could not flourish. He died a heartbroken man." + }, + { + "id": "epilogue_npc_male_58", + "text": " He had a dream he told no other about. It was a grand ideal, a fantasy out of a long-dead era. He aspired to become a leader who would shield humanity from the tribulations of the new world. He gathered survivors and built a settlement with the fledging numbers he had. With his unshakeable spirit and exceptional talent, he managed to lift up his people into a brighter dawn. Before long, his realm encompassed vast swaths of land. He honored you as one of the founders of his kingdom." + }, + { + "id": "epilogue_npc_male_59", + "text": " Lived a troubled life after your passing. Trusting no one but himself, he struggled viciously at the end of the world. Through great effort, he formed a minor village that would end up becoming a safe haven for mutants. In their humble hovel, he would later be acclaimed as a saint." + }, + { + "id": "epilogue_npc_male_60", + "text": " He increasingly grew fanatical as the whole world decayed around him. In due time, he saw himself as something more than human. Arriving at an abandoned cathedral, he climbed to the top of its spire before ringing the bells again and again. He belched out holy harangues at the heathens below and laughed maniacally as the undead eventually tore through his body." + }, + { + "id": "epilogue_npc_male_61", + "text": " Started fervently devouring the Gospel and soon had absolute conviction that he was the Godson. In his anguished throes of madness, he ended up seeing the vision of a land without sin over the horizon as he stepped off the edge of a skyscraper. Upon cold lips, his last breath was uttered. 'Eden.'" + }, + { + "id": "epilogue_npc_male_62", + "text": " He lost his mind as he witnessed the death of all around him. He began to accept the notion that he brought about all this chaos. With bloody tears streaming down his cheeks, he sacrificed himself to save the world." + }, + { + "id": "epilogue_npc_male_63", + "text": " He lived desperately in the Cataclysm for a few years before meeting a female survivor while digging through a dumpster. Both were wary of one another and were soon at each other's throats. Neither side secured a victory. Wounded and scarred, they each went to their respective hideouts. Not long after, they met again. The woman initiated a conversation with him, asking for his help. It was foolish to fight when they could work together instead. He acquiesced. In this cruel and forlorn world, they soon fell in love. If they had each other, everything would be all right. Decades passed and they grew old holding hands. One day, the wife fell ill, and with her dying breath, she said she was happy all these years with him. Stay strong without me. The husband wept and laid down beside his wife. Without you, nothing else matters. He swallowed a bitter poison and departed this world to find his wife who was waiting for him." } ] }, @@ -428,6 +460,38 @@ { "id": "epilogue_npc_female_51", "text": " Became obsessed with chems, and died of an overdose a few months after your death." + }, + { + "id": "epilogue_npc_female_52", + "text": " Started fervently devouring the Gospel and soon had absolute conviction that she was the Virgin Mother. In her anguished throes of madness, she ended up seeing the vision of the good sheperd over the horizon as she stepped off the edge of a skyscraper." + }, + { + "id": "epilogue_npc_female_53", + "text": " She lost her mind as she witnessed the death of all around her. She began to accept the notion that she brought about all this chaos. With bloody tears streaming down her cheeks, she sacrificed herself to save the world." + }, + { + "id": "epilogue_npc_female_54", + "text": " She lived desperately in the Cataclysm for a few years before meeting a male survivor while digging through a dumpster. Both were wary of one another and were soon at each other's throats. Neither side secured a victory. Wounded and scarred, they each went to their respective hideouts. Not long after, they met again. The man initiated a conversation with her, asking for her help. It was foolish to fight when they could work together instead. She acquiesced. In this cruel and forlorn world, they soon fell in love. If they had each other, everything would be all right. Decades passed and they grew old holding hands. One day, the husband fell ill, and with his dying breath, he said he was happy all these years with her. Stay strong without me. The wife wept and laid down beside her husband. Without you, nothing else matters. She swallowed a bitter poison and departed this world to find her husband who was waiting for her." + }, + { + "id": "epilogue_npc_female_55", + "text": " Went mad soon after learning of your death, leading her to believe she was the predestined savior who would bring sinners into paradise. Ended up perishing in a siege against the Hell's Raiders that lasted for a grueling, protracted month." + }, + { + "id": "epilogue_npc_female_56", + "text": " She had a dream she told no other about. It was a grand ideal, a fantasy out of a long-dead era. She aspired to become a leader who would shield humanity from the tribulations of the new world. She gathered survivors and built a settlement with the fledging numbers she had. They held out for as long as they could, but the dream of civilization could not flourish. She died a heartbroken woman." + }, + { + "id": "epilogue_npc_female_57", + "text": " She had a dream she told no other about. It was a grand ideal, a fantasy out of a long-dead era. She aspired to become a leader who would shield humanity from the tribulations of the new world. She gathered survivors and built a settlement with the fledging numbers she had. With her infinite grace and unyielding devotion, she managed to lift up her people into a brighter dawn. Before long, her realm encompassed vast swaths of land. She honored you as one of the founders of her kingdom." + }, + { + "id": "epilogue_npc_female_58", + "text": " Lived a troubled life after your passing. Trusting no one but herself, she struggled viciously at the end of the world. Through great effort, she formed a minor village that would end up becoming a safe haven for mutants. In their humble hovel, she would later be acclaimed as a saintess." + }, + { + "id": "epilogue_npc_female_59", + "text": " She increasingly grew fanatical as the whole world decayed around her. In due time, she saw herself as something more than human. Arriving at an abandoned cathedral, she climbed to the top of its spire before ringing the bells again and again. She belched out holy harangues at the heathens below and laughed maniacally as the undead eventually tore through her body." } ] } diff --git a/data/json/snippets/fungaloid_anatomy.json b/data/json/snippets/fungaloid_anatomy.json new file mode 100644 index 0000000000000..356e93f658a1b --- /dev/null +++ b/data/json/snippets/fungaloid_anatomy.json @@ -0,0 +1,32 @@ +[ + { + "type": "snippet", + "category": "", + "text": [ + "While cutting through the skin of the creature you notice a resemblance to both mushroom skin and animal skin. Odd.", + "Cutting the creature open makes its smell more noticeable. The smell is strange, but not unpleasant, and has a hint of mushroom.", + "What passes for blood in this creature is a clear fluid, but there isn't a lot of it outside of sacs distributed around the body.", + "What you think are muscles aren't too dissimilar from that of animals, if you're looking at it from a very general perspective and disregard the pale color and rubbery texture.", + "The fibers you find inside the creatures are more akin to plant fibers than anything found in animals or terrestial fungii.", + "You narrowly dodge a puff of spores when you accidentally cut into the spore sac.", + "The fungaloid has a number of rather primitive looking eyes, but they're distributed all over the body." + ] + }, + { + "type": "snippet", + "category": "", + "text": [ + "You cannot find anything resembling a vascular system, but instead the whole structure is slightly spongy and rubbery.", + "The creature seems to have regions of slightly different tissue, but you cannot find any regular organs to speak of.", + "The gills of the fungaloid seems to be used to release spores only, with no discernible connection to anything resembling blood vessels and with the connected sac used to expel spores being smooth with no hint of having a respiratory function.", + "You find that the tendrils at the base of the creature seem to serve a dual role of providing mobility as well as to connect to a mycelium, with a capillary network within them possibly serving to transfer nutrients, but the network ends a short distance into the base.", + "A further look at some of the creatures eyes indicates they may are lense less membranes over cavities probably operating according to the camera obscura principle. However, you cannot distinguish the tissue where a retina ought to be from the general structure of the creature.", + "Despite searching, you're unable to find anything resembling a brain, or even anything resembling nerves. You can't find any clue to how the creature is able to think or coordinate movements." + ] + }, + { + "type": "snippet", + "category": "", + "text": [ "", "", " " ] + } +] diff --git a/data/json/snippets/triffid_anatomy.json b/data/json/snippets/triffid_anatomy.json new file mode 100644 index 0000000000000..0102623c2ce10 --- /dev/null +++ b/data/json/snippets/triffid_anatomy.json @@ -0,0 +1,30 @@ +[ + { + "type": "snippet", + "category": "", + "text": [ + "The bark of this \"plant\" has a bark like texture, but is more leathery in consistency.", + "The smell emanating from the creature when you dissect it reminds you of vegetables.", + "The monster's sap is sticky and somewhat greenish.", + "While outwardly plant like, the creature's muscles look surprisingly similar to those of normal animals.", + "Thick fibers are found throughout the body of the creature. Perhaps they serve a scaffolding purpose similar to that of (very flexible) bones.", + "The creature's whip like sting drips from poison. You take extra care not to accidentally scratch yourself on it." + ] + }, + { + "type": "snippet", + "category": "", + "text": [ + "The creature appears to have a vascular system vaguely similar to those of animals, with a branching network of vein, although the organization is unfamiliar.", + "You find what you think is a heart, although it doesn't look like any configuration you know of from Earth. In fact, you find four hearts, each seemingly supporting a lateral quarter of the body.", + "A sac connected to the sting is filled with some fluid. Might it perhaps have some useful properties?", + "While the roots of the plant creature contain muscles and veins, they also contain finer networks indicating a use for nutrient uptake when the roots are lodged into the soil.", + "At the top of the creature you find what you assume is a brain, although it seems to employ quadrilateral symmetry and thus is shaped and organized completely differently from that of terrestial versions." + ] + }, + { + "type": "snippet", + "category": "", + "text": [ "", "", " " ] + } +] diff --git a/src/condition.cpp b/src/condition.cpp index 090b0d32c76c1..1488fe74a6cee 100644 --- a/src/condition.cpp +++ b/src/condition.cpp @@ -3087,6 +3087,16 @@ void conditional_t::set_has_wielded_with_flag( const JsonObject &jo, const std:: }; } +void conditional_t::set_has_wielded_with_weapon_category( const JsonObject &jo, + const std::string &member, + bool is_npc ) +{ + str_or_var w_cat = get_str_or_var( jo.get_member( member ), member, true ); + condition = [w_cat, is_npc]( dialogue const & d ) { + return d.actor( is_npc )->wielded_with_weapon_category( weapon_category_id( w_cat.evaluate( d ) ) ); + }; +} + void conditional_t::set_can_see( bool is_npc ) { condition = [is_npc]( dialogue const & d ) { @@ -3388,6 +3398,10 @@ conditional_t::conditional_t( const JsonObject &jo ) set_has_wielded_with_flag( jo, "u_has_wielded_with_flag" ); } else if( jo.has_member( "npc_has_wielded_with_flag" ) ) { set_has_wielded_with_flag( jo, "npc_has_wielded_with_flag", is_npc ); + } else if( jo.has_member( "u_has_wielded_with_weapon_category" ) ) { + set_has_wielded_with_weapon_category( jo, "u_has_wielded_with_weapon_category" ); + } else if( jo.has_member( "npc_has_wielded_with_weapon_category" ) ) { + set_has_wielded_with_weapon_category( jo, "npc_has_wielded_with_weapon_category", is_npc ); } else if( jo.has_member( "u_is_on_terrain" ) ) { set_is_on_terrain( jo, "u_is_on_terrain" ); } else if( jo.has_member( "npc_is_on_terrain" ) ) { diff --git a/src/condition.h b/src/condition.h index 480f4b80501d9..1d815321aae1c 100644 --- a/src/condition.h +++ b/src/condition.h @@ -31,7 +31,7 @@ const std::unordered_set simple_string_conds = { { } }; const std::unordered_set complex_conds = { { - "u_has_any_trait", "npc_has_any_trait", "u_has_trait", "npc_has_trait", + "u_has_any_trait", "u_has_wielded_with_weapon_category", "npc_has_wielded_with_weapon_category", "npc_has_any_trait", "u_has_trait", "npc_has_trait", "u_has_flag", "npc_has_flag", "u_has_species", "npc_has_species", "u_bodytype", "npc_bodytype", "npc_has_class", "u_has_mission", "u_monsters_in_direction", "u_safe_mode_trigger", "u_has_strength", "npc_has_strength", "u_has_dexterity", "npc_has_dexterity", "u_has_intelligence", "npc_has_intelligence", "u_has_perception", "npc_has_perception", @@ -130,6 +130,7 @@ struct conditional_t { void set_is_on_terrain_with_flag( const JsonObject &jo, const std::string &member, bool is_npc = false ); void set_is_in_field( const JsonObject &jo, const std::string &member, bool is_npc = false ); + void set_has_wielded_with_weapon_category( const JsonObject &jo, const std::string &member, bool is_npc = false ); void set_one_in_chance( const JsonObject &jo, const std::string &member ); void set_query( const JsonObject &jo, const std::string &member, bool is_npc = false ); void set_x_in_y_chance( const JsonObject &jo, std::string_view member ); diff --git a/src/talker.h b/src/talker.h index d55687393a782..26f28af912a28 100644 --- a/src/talker.h +++ b/src/talker.h @@ -528,6 +528,9 @@ class talker virtual double armor_at( damage_type_id &, bodypart_id & ) const { return 0; } + virtual bool wielded_with_weapon_category( const weapon_category_id & ) const { + return false; + } virtual bool worn_with_flag( const flag_id &, const bodypart_id & ) const { return false; } diff --git a/src/talker_character.cpp b/src/talker_character.cpp index 771e68121c320..f7508b85642f3 100644 --- a/src/talker_character.cpp +++ b/src/talker_character.cpp @@ -4,8 +4,10 @@ #include "character_martial_arts.h" #include "effect.h" #include "item.h" +#include "itype.h" #include "magic.h" #include "npc.h" +#include "npctalk.h" #include "pimpl.h" #include "player_activity.h" #include "point.h" @@ -654,6 +656,12 @@ bool talker_character_const::wielded_with_flag( const flag_id &flag ) const return me_chr_const->get_wielded_item() && me_chr_const->get_wielded_item()->has_flag( flag ); } +bool talker_character_const::wielded_with_weapon_category( const weapon_category_id &w_cat ) const +{ + return me_chr_const->get_wielded_item() && + me_chr_const->get_wielded_item()->typeId()->weapon_category.count( w_cat ) > 0; +} + bool talker_character_const::has_item_with_flag( const flag_id &flag ) const { return me_chr_const->has_item_with_flag( flag ); diff --git a/src/talker_character.h b/src/talker_character.h index 3e31dbf58e98a..9be25bef18e1f 100644 --- a/src/talker_character.h +++ b/src/talker_character.h @@ -125,6 +125,7 @@ class talker_character_const: public talker_cloner bool worn_with_flag( const flag_id &flag, const bodypart_id &bp ) const override; bool wielded_with_flag( const flag_id &flag ) const override; + bool wielded_with_weapon_category( const weapon_category_id &w_cat ) const override; bool has_item_with_flag( const flag_id &flag ) const override; int item_rads( const flag_id &flag, aggregate_type agg_func ) const override;