diff --git a/data/mods/Isolation-Protocol/Player/Perks/enchantments.json b/data/mods/Isolation-Protocol/Player/Perks/enchantments.json index 1647ae4acc321..b9e03412a6960 100644 --- a/data/mods/Isolation-Protocol/Player/Perks/enchantments.json +++ b/data/mods/Isolation-Protocol/Player/Perks/enchantments.json @@ -34,5 +34,17 @@ "description": "OH you aren't getting away with that.", "condition": { "u_has_effect": "iso_eff_hypo_o" }, "values": [ { "value": "MELEE_DAMAGE", "multiply": 0.5 }, { "value": "RANGED_DAMAGE", "multiply": 0.5 } ] + }, + { + "type": "enchantment", + "id": "iso_ench_geas_buff", + "name": { "str": "Ancient vow" }, + "description": "Lightless monste! I give you oblivion!\n\n Deal 15% more damage and regen 100% more stamine per turn when fighting high danger enemies.", + "condition": { "u_has_effect": "iso_eff_geas_buff" }, + "values": [ + { "value": "RANGED_DAMAGE", "multiply": 0.15 }, + { "value": "MELEE_DAMAGE", "multiply": 0.15 }, + { "value": "STAMINA_REGEN_MOD", "add": 1 } + ] } ] diff --git a/data/mods/Isolation-Protocol/Player/Perks/perk_effect.json b/data/mods/Isolation-Protocol/Player/Perks/perk_effect.json index d7560023fa538..ec61f2cc08df9 100644 --- a/data/mods/Isolation-Protocol/Player/Perks/perk_effect.json +++ b/data/mods/Isolation-Protocol/Player/Perks/perk_effect.json @@ -23,5 +23,13 @@ "name": [ "Rapid Healing" ], "max_duration": "6 s", "base_mods": { "hurt_amount": [ -10 ] } + }, + { + "type": "effect_type", + "id": "iso_eff_geas_buff", + "rating": "good", + "int_dur_factor": "1 s", + "max_duration": "6 s", + "show_in_info": false } ] diff --git a/data/mods/Isolation-Protocol/Player/Perks/perk_eoc.json b/data/mods/Isolation-Protocol/Player/Perks/perk_eoc.json index 130687336add7..47403fc710200 100644 --- a/data/mods/Isolation-Protocol/Player/Perks/perk_eoc.json +++ b/data/mods/Isolation-Protocol/Player/Perks/perk_eoc.json @@ -35,5 +35,54 @@ "required_event": "character_takes_damage", "condition": { "u_has_trait": "iso_hypo_o" }, "effect": [ { "u_add_effect": "iso_eff_hypo_o", "duration": "2 seconds" } ] + }, + { + "type": "effect_on_condition", + "id": "EOC_ISO_GEAS", + "eoc_type": "EVENT", + "required_event": "avatar_moves", + "condition": { "u_has_trait": "iso_geas" }, + "effect": [ + { "u_location_variable": { "u_val": "avatar_new_pos" }, "min_radius": 0, "max_radius": 0 }, + { + "u_run_monster_eocs": [ + { + "id": "_EOC_ISO_GEAS", + "condition": { "math": [ "u_val('difficulty')", ">=", "30" ] }, + "effect": [ { "run_eoc_with": "geas_monster", "beta_talker": "avatar" } ] + } + ], + "monster_range": 65, + "monster_must_see": true + }, + { "u_location_variable": { "u_val": "avatar_old_pos" }, "min_radius": 0, "max_radius": 0 } + ] + }, + { + "type": "effect_on_condition", + "id": "geas_monster", + "effect": [ + { "math": [ "u_new_distance", "=", "distance('u', 'npc')" ] }, + { "u_location_variable": { "u_val": "monster_pos" }, "min_radius": 0, "max_radius": 0 }, + { + "if": { + "and": [ + { "math": [ "has_var(u_old_distance)" ] }, + { "math": [ "u_new_distance", ">", "u_old_distance" ] }, + { "npc_can_see_location": { "u_val": "monster_pos" } } + ] + }, + "then": [ + { "npc_teleport": { "npc_val": "avatar_old_pos" } }, + { "npc_message": "You cannot flee from the abomination." }, + { "npc_add_effect": "iso_eff_geas_buff", "duration": "10 seconds" } + ], + "else": [ + { "u_message": "Oh ho! Then come as close as you like." }, + { "npc_add_effect": "iso_eff_geas_buff", "duration": "10 seconds" } + ] + }, + { "math": [ "u_old_distance", "=", "distance('u', 'npc')" ] } + ] } ] diff --git a/data/mods/Isolation-Protocol/Player/Perks/perks.json b/data/mods/Isolation-Protocol/Player/Perks/perks.json index 59c69be3b8d92..025f00c23e802 100644 --- a/data/mods/Isolation-Protocol/Player/Perks/perks.json +++ b/data/mods/Isolation-Protocol/Player/Perks/perks.json @@ -49,5 +49,16 @@ "category": [ "iso_start_perk" ], "purifiable": false, "valid": false + }, + { + "type": "mutation", + "id": "iso_geas", + "name": { "str": "Ancient Vow" }, + "points": 0, + "description": "A lifetime ago you swore to protect your vanished homeland. This oath binds you still.\n\nYou cannot flee from high danger enemies but gain increased damage and stamina regeneration when fighting them.", + "category": [ "iso_start_perk" ], + "enchantments": [ "iso_ench_geas_buff" ], + "purifiable": false, + "valid": false } ] diff --git a/data/mods/Isolation-Protocol/Player/profession.json b/data/mods/Isolation-Protocol/Player/profession.json index f3ebdfce87c53..ecc4ab23b9735 100644 --- a/data/mods/Isolation-Protocol/Player/profession.json +++ b/data/mods/Isolation-Protocol/Player/profession.json @@ -132,5 +132,45 @@ "male": { "entries": [ { "item": "boxer_shorts" } ] }, "female": { "entries": [ { "item": "bra" }, { "item": "panties" } ] } } + }, + { + "type": "item_group", + "subtype": "collection", + "id": "quiver_geas_knight", + "entries": [ { "item": "iso_bolt_blackwood_bodkin", "charges": 16 } ] + }, + { + "type": "profession", + "id": "iso_geas_knight", + "name": "Geas Knight", + "description": "A warrior from a destroyed land, still bound by ancient oaths sworn to mountains and stars.", + "points": 6, + "skills": [ + { "level": 3, "name": "melee" }, + { "level": 3, "name": "bashing" }, + { "level": 3, "name": "cutting" }, + { "level": 3, "name": "stabbing" }, + { "level": 2, "name": "gun" }, + { "level": 2, "name": "rifle" }, + { "level": 3, "name": "dodge" } + ], + "traits": [ "iso_trait" ], + "items": { + "both": { + "entries": [ + { "item": "iso_old_cloak" }, + { "item": "iso_old_armor" }, + { "item": "iso_crossbow_sling" }, + { "item": "socks_wool" }, + { "item": "boots" }, + { "item": "iso_old_sword" }, + { "item": "iso_repeating_crossbow", "ammo-item": "iso_bolt_blackwood_bodkin", "charges": 4 }, + { "item": "quiver", "contents-group": "quiver_geas_knight" }, + { "item": "baldric" }, + { "item": "loincloth" } + ] + }, + "female": { "entries": [ { "item": "undershirt" } ] } + } } ] diff --git a/data/mods/Isolation-Protocol/scenarios.json b/data/mods/Isolation-Protocol/scenarios.json index 89d8ee497e136..74853d2ffdaf8 100644 --- a/data/mods/Isolation-Protocol/scenarios.json +++ b/data/mods/Isolation-Protocol/scenarios.json @@ -6,7 +6,7 @@ "points": 0, "description": "Room by room and level by level the facility drills into depths beyond the logical. An endless mode where the only goal is to reach the lowest level possible.", "allowed_locs": [ "iso_entry_setpiece" ], - "professions": [ "iso_deliveryboy", "iso_cop", "iso_paramedic", "iso_hacker" ], + "professions": [ "iso_deliveryboy", "iso_cop", "iso_paramedic", "iso_hacker", "iso_geas_knight" ], "flags": [ "LONE_START" ], "start_name": "Facility Lobby", "forbidden_traits": [ "ROBUST", "XS", "XXXL", "CHAOTIC_BAD", "QUICK", "NOMAD", "WAYFARER", "NYCTOPHOBIA" ], diff --git a/data/mods/Isolation-Protocol/unique_items.json b/data/mods/Isolation-Protocol/unique_items.json new file mode 100644 index 0000000000000..5eef8af51bbad --- /dev/null +++ b/data/mods/Isolation-Protocol/unique_items.json @@ -0,0 +1,127 @@ +[ + { + "id": "iso_repeating_crossbow", + "looks_like": "crossbow", + "type": "GUN", + "symbol": "(", + "color": "light_gray", + "name": { "str": "repeating crossbow" }, + "reload_noise_volume": 4, + "description": "A crossbow fit with an automatic spanning mechanism that allows for the rapid firing of up to 4 bolts.\n\nIn an age long past, these weapons where issued to expeditions sent to contain a cursing plague in the northen reaches.", + "price": "890 USD", + "price_postapoc": "80 USD", + "material": [ "wood", "bone", "steel" ], + "flags": [ "PRIMITIVE_RANGED_WEAPON", "FRAGILE_MELEE", "RELOAD_ONE", "NEVER_JAMS", "NO_UNLOAD", "NO_TURRET", "NON_FOULING" ], + "modes": [ [ "DEFAULT", "standard", 1 ], [ "AUTO", "repeat fire", 2 ] ], + "skill": "rifle", + "min_strength": 6, + "ammo": [ "bolt" ], + "weight": "4500 g", + "volume": "1750 ml", + "longest_side": "86 cm", + "to_hit": 1, + "ranged_damage": { "damage_type": "stab", "amount": 4 }, + "range": 16, + "loudness": 8, + "dispersion": 350, + "sight_dispersion": 90, + "durability": 6, + "clip_size": 4, + "reload": 1500, + "valid_mod_locations": [ [ "sling", 1 ] ], + "pocket_data": [ { "pocket_type": "MAGAZINE", "ammo_restriction": { "bolt": 4 } } ], + "melee_damage": { "bash": 5 } + }, + { + "id": "iso_crossbow_sling", + "type": "ARMOR", + "name": { "str": "crossbow sling" }, + "description": "A complex sling designed to carry a repeating crossbow while keeping it ready for use. The sling is designed to be worn across the torso and can be quickly adjusted to bring the crossbow to bear.", + "weight": "320 g", + "volume": "500 ml", + "price": "80 USD", + "price_postapoc": "5 USD", + "material": [ "leather" ], + "symbol": "[", + "looks_like": "slingpack", + "color": "green", + "material_thickness": 1, + "flags": [ "OVERSIZE", "BELTED" ], + "pocket_data": [ + { + "pocket_type": "CONTAINER", + "holster": true, + "min_item_volume": "500 ml", + "max_contains_volume": "7 L", + "max_contains_weight": "5 kg", + "max_item_length": "200 cm", + "moves": 50, + "flag_restriction": [ "PRIMITIVE_RANGED_WEAPON" ] + } + ], + "use_action": { "type": "holster" }, + "armor": [ { "encumbrance": [ 3, 7 ], "coverage": 5, "covers": [ "torso" ], "specifically_covers": [ "torso_hanging_back" ] } ] + }, + { + "type": "AMMO", + "id": "iso_bolt_blackwood_bodkin", + "name": { "str": "blackwood bolt" }, + "symbol": "=", + "color": "light_gray", + "description": "A bodkin bolt expertly carved from blessed blackwood. Traces of its former power still linger.", + "copy-from": "bolt_wood_bodkin", + "relative": { "dispersion": -40 }, + "damage": { "damage_type": "stab", "constant_damage_multiplier": 1.75 }, + "range": 4, + "recovery_chance": 100 + }, + { + "id": "iso_old_cloak", + "type": "ARMOR", + "copy-from": "cape_sci_fi", + "name": { "str": "tattered cloak" }, + "description": "The cloak of an imperial envoy, depicting a star chart in gold thread. Its terribly worn and frayed.", + "material": [ "wool" ] + }, + { + "id": "iso_old_sword", + "type": "TOOL", + "copy-from": "mc_longsword", + "name": { "str": "ancient sword" }, + "description": "A longsword worn down by countless battles. It was once finely engraved.", + "flags": [ "UNBREAKABLE_MELEE", "CONDUCTIVE", "SHEATH_SWORD" ] + }, + { + "id": "iso_old_armor", + "type": "TOOL_ARMOR", + "copy-from": "armor_lc_plate", + "name": { "str": "envoy's armor" }, + "description": "A suit of armor worn down by an endless journey. Only its sturdiest parts remain now.", + "material": [ "qt_steel", "qt_steel_chain", "leather", "wool" ], + "armor": [ + { + "material": [ + { "type": "qt_steel", "covered_by_mat": 95, "thickness": 0.55 }, + { "type": "wool", "covered_by_mat": 100, "thickness": 2.8 }, + { "type": "leather", "covered_by_mat": 5, "thickness": 1.5 } + ], + "covers": [ "leg_l", "leg_r", "arm_l", "arm_r" ], + "layers": [ "NORMAL", "OUTER" ], + "coverage": 100, + "encumbrance": 2 + }, + { + "material": [ + { "type": "qt_steel", "covered_by_mat": 95, "thickness": 2.8 }, + { "type": "wool", "covered_by_mat": 100, "thickness": 2.8 }, + { "type": "leather", "covered_by_mat": 5, "thickness": 1.5 } + ], + "covers": [ "torso" ], + "coverage": 100, + "cover_vitals": 60, + "layers": [ "NORMAL", "OUTER" ], + "encumbrance": 10 + } + ] + } +] diff --git a/src/condition.cpp b/src/condition.cpp index 5748b49829fbf..ff4c9a56a5892 100644 --- a/src/condition.cpp +++ b/src/condition.cpp @@ -2150,6 +2150,7 @@ std::unordered_map const f_get_vals { "anger", &talker::get_anger }, { "bmi_permil", &talker::get_bmi_permil }, { "cash", &talker::cash }, + { "difficulty", &talker::get_difficulty }, { "dexterity_base", &talker::get_dex_max }, { "dexterity_bonus", &talker::get_dex_bonus }, { "dexterity", &talker::dex_cur }, diff --git a/src/talker.h b/src/talker.h index 71752fc6a72a9..bbb70d8e0fb98 100644 --- a/src/talker.h +++ b/src/talker.h @@ -652,6 +652,9 @@ class talker virtual int get_friendly() const { return 0; } + virtual int get_difficulty() const { + return 0; + } virtual void set_friendly( int ) {} virtual void add_morale( const morale_type &, int, int, time_duration, time_duration, bool ) {} virtual void remove_morale( const morale_type & ) {} diff --git a/src/talker_monster.cpp b/src/talker_monster.cpp index 9de4b67dc24fd..7a4c2e3745d77 100644 --- a/src/talker_monster.cpp +++ b/src/talker_monster.cpp @@ -168,6 +168,11 @@ int talker_monster_const::get_friendly() const return me_mon_const->friendly; } +int talker_monster_const::get_difficulty() const +{ + return me_mon_const->type->difficulty; +} + int talker_monster_const::get_size() const { add_msg_debug( debugmode::DF_TALKER, "Size category of monster %s = %d", me_mon_const->name(), diff --git a/src/talker_monster.h b/src/talker_monster.h index f735f604c2f7a..e0594c4436926 100644 --- a/src/talker_monster.h +++ b/src/talker_monster.h @@ -57,6 +57,7 @@ class talker_monster_const: public talker_cloner std::string short_description() const override; int get_anger() const override; + int get_difficulty() const override; int morale_cur() const override; int get_friendly() const override; int get_size() const override;