Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Xedra Evolved] Add the "XEDRA Operative, Department of Extra-Normal Capabilities, SATOR Division" profession #75718

Merged
merged 11 commits into from
Aug 27, 2024
46 changes: 46 additions & 0 deletions data/mods/Xedra_Evolved/effects/effects.json
Original file line number Diff line number Diff line change
Expand Up @@ -1685,6 +1685,13 @@
}
]
},
{
"type": "effect_type",
"id": "effect_xe_deciphering_hedge_tome",
"//": "Hidden effect, used to check that you're still researching.",
"name": [ "" ],
"desc": [ "" ]
},
{
"type": "effect_type",
"id": "effect_hedge_nether_eye_paste",
Expand Down Expand Up @@ -1771,6 +1778,45 @@
"desc": [ "Hunt. Kill. Feed. Sleep." ],
"flags": [ "CANNIBAL", "PRED4", "PSYCHOPATH", "STRICT_HUMANITARIAN" ]
},
{
"type": "effect_type",
"id": "effect_hedge_walk_on_water_magic_square",
"name": [ "Water-Walking" ],
"desc": [ "NAHARIAMA\nA Q\nH E\nA Q\nR\nI\nA Q\nM QA\nA" ],
"//": "The above description replicates a magic square and should not be translated",
"remove_message": "Your water-walking charm has faded.",
"decay_messages": [ [ "Your water-walking charm is about to fade.", "bad" ] ],
"max_duration": "30 m",
"max_intensity": 30,
"int_dur_factor": "1 m",
"flags": [ "ITEM_WATERPROOFING", "WATERWALKING" ]
},
{
"type": "effect_type",
"id": "effect_hedge_breathe_water_magic_square",
"name": [ "Water-Breathing" ],
"desc": [ "BURNAHEU\nULORIPTE\nROMILAPH\nNRITILIA\nAILITIRN\nHPALIMOR\nETPIROLU\nUEHANRUB" ],
"//": "The above description replicates a magic square and should not be translated",
"remove_message": "Your water-breathing charm has faded.",
"decay_messages": [ [ "Your water-breathing charm is about to fade.", "bad" ] ],
"max_duration": "2 h",
"max_intensity": 120,
"int_dur_factor": "1 m",
"flags": [ "ITEM_WATERPROOFING", "GILLS", "EYE_MEMBRANE" ]
},
{
"type": "effect_type",
"id": "effect_invisibility_magic_square",
"name": [ "Invisibility" ],
"desc": [ "TALAC\nA A\nL L\nA A\nCALAT" ],
"//": "The above description replicates a magic square and should not be translated",
"remove_message": "Your invisibility charm has faded.",
"decay_messages": [ [ "Your invisibility charm is about to fade.", "bad" ] ],
"max_duration": "77 m",
"max_intensity": 77,
"int_dur_factor": "1 m",
"flags": [ "INVISIBLE" ]
},
{
"type": "effect_type",
"id": "mutagen_plantkin",
Expand Down
137 changes: 137 additions & 0 deletions data/mods/Xedra_Evolved/eocs/hedge_research_eocs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
[
{
"//": "Rolls below should be -u_skill('deduction') + rng(-2,8) + rng(-2,8)-. This is an average of 6 + Deduction per research period.",
"id": "ACT_XE_DECIPHERING_HEDGE_TOME",
"type": "activity_type",
"activity_level": "NO_EXERCISE",
"verb": "deciphering the secrets of the occult",
"based_on": "time",
"can_resume": false,
"auto_needs": true,
"do_turn_eoc": "EOC_DECIPHERING_NEW_HEDGE_TOME_TIME_TRACKER",
"completion_eoc": "EOC_DECIPHERING_NEW_HEDGE_TOME_PACE_SELF"
},
{
"type": "effect_on_condition",
"id": "EOC_DECIPHERING_NEW_HEDGE_TOME_TIME_TRACKER",
"condition": { "math": [ "u_most_recent_hedge_research_progress", "<=", "u_most_recent_hedge_research_difficulty" ] },
"effect": [ { "math": [ "u_most_recent_hedge_research_time", "+=", "1" ] } ],
"false_effect": [ { "run_eocs": { "u_val": "latest_completion_eoc" } } ]
},
{
"type": "effect_on_condition",
"id": "EOC_DECIPHERING_NEW_HEDGE_TOME_PACE_SELF",
"effect": [
{ "u_message": "You finish your study session.", "type": "neutral" },
{ "u_lose_effect": "effect_xe_deciphering_hedge_tome" }
]
},
{
"type": "effect_on_condition",
"id": "EOC_HEDGE_MAGIC_CANCELLING_ACTIVITY_CANCELS_RESEARCH",
"eoc_type": "EVENT",
"required_event": "character_finished_activity",
"condition": {
"and": [
{ "compare_string": [ "ACT_XE_DECIPHERING_HEDGE_TOME_NEW_POWER", { "context_val": "activity" } ] },
{ "u_has_effect": "effect_xe_deciphering_hedge_tome" }
]
},
"effect": [ { "u_lose_effect": "effect_xe_deciphering_hedge_tome" } ]
},
{
"type": "effect_on_condition",
"id": "EOC_HEDGE_RESEARCH_FOCUS_DRAIN",
"condition": { "u_has_effect": "effect_xe_deciphering_hedge_tome" },
"effect": [
{ "if": { "math": [ "u_val('focus')", ">", "5" ] }, "then": { "math": [ "u_val('focus')", "-=", "1" ] } },
{ "queue_eocs": "EOC_HEDGE_RESEARCH_FOCUS_DRAIN", "time_in_future": [ "1 minutes", "3 minutes" ] }
]
},
{
"type": "effect_on_condition",
"id": "EOC_HEDGE_RESEARCH_PROGRESS_ABRAMELIN_THE_MAGE",
"condition": { "u_has_effect": "effect_xe_deciphering_hedge_tome" },
"effect": [
{
"run_eocs": [
{
"id": "EOC_HEDGE_RESEARCH_PROGRESS_ABRAMELIN_THE_MAGE_2",
"condition": { "math": [ "u_most_recent_hedge_research_time_upper_limit", "<=", "302400" ] },
"effect": [
{
"run_eocs": [
{
"id": "EOC_HEDGE_RESEARCH_PROGRESS_ABRAMELIN_THE_MAGE_3",
"condition": { "math": [ "u_most_recent_hedge_research_progress", "<=", "u_most_recent_hedge_research_difficulty" ] },
"effect": [
{ "math": [ "u_most_recent_hedge_research_progress", "+=", "u_skill('deduction') + rng(-2,8) + rng(-2,8)" ] },
{
"u_run_inv_eocs": "random",
"search_data": [ { "id": "spellbook_hedge_abramelin_the_mage" } ],
"true_eocs": [
{
"id": "EOC_HEDGE_RESEARCH_ABRAMELIN_THE_MAGE_WRITE_VALUES",
"effect": [
{ "math": [ "n_most_recent_hedge_research_time", "=", "u_most_recent_hedge_research_time" ] },
{
"math": [ "n_most_recent_hedge_research_progress", "=", "u_most_recent_hedge_research_progress" ]
}
]
}
]
},
{
"if": { "math": [ "u_val('focus')", ">", "5" ] },
"then": { "math": [ "u_val('focus')", "-=", "5" ] }
},
{
"queue_eocs": "EOC_HEDGE_RESEARCH_PROGRESS_ABRAMELIN_THE_MAGE",
"time_in_future": [
{ "math": [ "3000 / min( scaling_factor(u_val('intelligence') ),2)" ] },
{ "math": [ "4200 / min( scaling_factor(u_val('intelligence') ),2)" ] }
]
}
],
"false_effect": [
{
"run_eocs": [
{
"id": "EOC_HEDGE_RESEARCH_PROGRESS_ABRAMELIN_THE_MAGE_COMPLETION",
"condition": { "math": [ "u_most_recent_hedge_research_progress", ">", "u_most_recent_hedge_research_difficulty" ] },
"effect": [
{ "u_lose_effect": "effect_xe_deciphering_hedge_tome" },
{
"u_message": "You've done it. All the pieces finally fall into place. You've unlocked the occult secrets of this work, and can now study the rituals within.",
"popup": true
},
{ "math": [ "u_deciphered_spellbook_hedge_abramelin_the_mage", "=", "1" ] }
]
}
]
}
]
}
]
}
],
"false_effect": [
{ "u_message": "You can't make heads of tails of this work. You'll have to start over.", "popup": true },
{ "u_lose_effect": "effect_xe_deciphering_hedge_tome" },
{
"u_run_inv_eocs": "random",
"search_data": [ { "id": "spellbook_hedge_abramelin_the_mage" } ],
"true_eocs": [
{
"id": "EOC_HEDGE_RESEARCH_ABRAMELIN_THE_MAGE_WRITE_VALUES_2",
"effect": [ { "math": [ "n_already_failed_research", "=", "1" ] } ]
}
]
}
]
}
]
}
]
}
]
10 changes: 10 additions & 0 deletions data/mods/Xedra_Evolved/eocs/profession_eocs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[
{
"type": "effect_on_condition",
"id": "EOC_XE_XE_OPERATIVE_MAGIC_SQUARES_BOOK_UNDERSTANDING",
"eoc_type": "EVENT",
"required_event": "game_start",
"condition": { "u_profession": "xe_hedge_mage_magic_squares" },
"effect": [ { "math": [ "u_deciphered_spellbook_hedge_abramelin_the_mage", "=", "1" ] } ]
}
]
3 changes: 2 additions & 1 deletion data/mods/Xedra_Evolved/itemgroups/itemgroups.json
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,8 @@
{ "item": "spellbook_hedge_blood_book", "prob": 2 },
{ "item": "spellbook_hedge_ward_dreams", "prob": 3 },
{ "item": "spellbook_hedge_snare_changelings", "prob": 1 },
{ "item": "spellbook_hedge_bathhouse_midnight", "prob": 1 }
{ "item": "spellbook_hedge_bathhouse_midnight", "prob": 1 },
{ "item": "spellbook_hedge_abramelin_the_mage", "prob": 1 }
]
},
{
Expand Down
156 changes: 156 additions & 0 deletions data/mods/Xedra_Evolved/items/hedge_magic_items.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
[
{
"abstract": "magic_square_base",
"name": "Magic Square abstract",
"description": "SATOR AREPO TENET OPERA ROTAS.",
"type": "TOOL",
"weight": "3 g",
"color": "white",
"symbol": "`",
"price": "0 cent",
"price_postapoc": "0 cent",
"material": [ "paper" ],
"flags": [ "TINDER", "PAPER_SHAPED", "SINGLE_USE" ],
"volume": "6 ml",
"longest_side": "297 mm"
},
{
"id": "aura_ward_off_rain",
"type": "ARMOR",
Expand Down Expand Up @@ -262,5 +277,146 @@
"description": "Activate to remove the mantle and end the magic.",
"effect_on_conditions": [ "EOC_HEDGE_TURN_INTO_BEAR_REMOVE_ITEM" ]
}
},
{
"type": "BOOK",
"id": "item_walk_on_water_magic_square",
"copy-from": "magic_square_base",
"name": { "str": "magic square (To Walk Upon the Water)", "str_pl": "magic squares (To Walk Upon the Water)" },
"description": "A piece of paper. A magic square is carefully written on it.",
"extend": { "flags": [ "HEDGE_ENCHANTED" ] },
"use_action": {
"type": "effect_on_conditions",
"description": "Activate the charm using the magic square.",
"effect_on_conditions": [
{
"id": "EOC_HEDGE_WALK_ON_WATER_MAGIC_SQUARE",
"effect": [
{ "u_assign_activity": "ACT_GENERIC_EOC", "duration": 2.5 },
{ "u_add_effect": "effect_hedge_walk_on_water_magic_square", "duration": 1800, "intensity": 30 }
]
}
]
}
},
{
"type": "BOOK",
"id": "item_breathe_water_magic_square",
"copy-from": "magic_square_base",
"name": { "str": "magic square (To Operate Under the Water)", "str_pl": "magic squares (To Operate Under the Water)" },
"description": "A piece of paper. A magic square is carefully written on it.",
"extend": { "flags": [ "HEDGE_ENCHANTED" ] },
"use_action": {
"type": "effect_on_conditions",
"description": "Activate the charm using the magic square.",
"effect_on_conditions": [
{
"id": "EOC_HEDGE_BREATHE_WATER_MAGIC_SQUARE",
"effect": [
{ "u_assign_activity": "ACT_GENERIC_EOC", "duration": 2.5 },
{ "u_add_effect": "effect_hedge_breathe_water_magic_square", "duration": 7200, "intensity": 120 }
]
}
]
}
},
{
"type": "BOOK",
"id": "item_bash_terrain_magic_square",
"copy-from": "magic_square_base",
"name": {
"str": "magic square (To Demolish Buildings and Strongholds)",
"str_pl": "magic squares (To Demolish Buildings and Strongholds)"
},
"description": "A piece of paper. A magic square is carefully written on it.",
"extend": { "flags": [ "HEDGE_ENCHANTED" ] },
"use_action": {
"type": "effect_on_conditions",
"description": "Activate the charm using the magic square.",
"effect_on_conditions": [
{
"id": "EOC_HEDGE_BASH_TERRAIN_MAGIC_SQUARE",
"effect": [
{ "u_assign_activity": "ACT_GENERIC_EOC", "duration": 2.5 },
{ "u_cast_spell": { "id": "hedge_bash_terrain_magic_square_real" }, "targeted": true }
]
}
]
}
},
{
"type": "BOOK",
"id": "item_armed_men_magic_square",
"copy-from": "magic_square_base",
"name": { "str": "magic square (To Cause Armed Men to Appear)", "str_pl": "magic squares (To Cause Armed Men to Appear)" },
"description": "A piece of paper. A magic square is carefully written on it.",
"extend": { "flags": [ "HEDGE_ENCHANTED" ] },
"use_action": {
"type": "effect_on_conditions",
"description": "Activate the charm using the magic square.",
"effect_on_conditions": [
{
"id": "EOC_HEDGE_ARMED_MEN_MAGIC_SQUARE",
"effect": [
{ "u_assign_activity": "ACT_GENERIC_EOC", "duration": 2.5 },
{
"u_spawn_monster": "GROUP_HEDGE_TO_CAUSE_ARMED_MEN",
"real_count": { "math": [ "2 + rand(3)" ] },
"group": true,
"min_radius": 1,
"max_radius": 3,
"lifespan": [ "15 minutes", "45 minutes" ],
"spawn_message": "An armed warrior appears.",
"spawn_message_plural": "Several armed warriors appear."
}
]
}
]
}
},
{
"type": "BOOK",
"id": "item_food_or_drink_magic_square",
"copy-from": "magic_square_base",
"name": {
"str": "magic square (To Cause the Spirits to Bring us Anything We May Wish to Eat or to Drink)",
"str_pl": "magic squares (To Cause the Spirits to Bring us Anything We May Wish to Eat or to Drink)"
},
"description": "A piece of paper. A magic square is carefully written on it.",
"extend": { "flags": [ "HEDGE_ENCHANTED" ] },
"use_action": {
"type": "effect_on_conditions",
"description": "Activate the charm using the magic square.",
"effect_on_conditions": [
{
"id": "EOC_HEDGE_FOOR_OR_DRINK_MAGIC_SQUARE",
"effect": [ { "u_assign_activity": "ACT_GENERIC_EOC", "duration": 2.5 }, { "run_eocs": "EOC_HEDGE_FOOD_OR_DRINK_SELECTOR" } ]
}
]
}
},
{
"type": "BOOK",
"id": "item_invisibility_magic_square",
"copy-from": "magic_square_base",
"name": {
"str": "magic square (To Render Oneself Invisible Unto Every Person)",
"str_pl": "magic squares (To Render Oneself Invisible Unto Every Person)"
},
"description": "A piece of paper. A magic square is carefully written on it.",
"extend": { "flags": [ "HEDGE_ENCHANTED" ] },
"use_action": {
"type": "effect_on_conditions",
"description": "Activate the charm using the magic square.",
"effect_on_conditions": [
{
"id": "EOC_HEDGE_INVISIBILITY_MAGIC_SQUARE",
"effect": [
{ "u_assign_activity": "ACT_GENERIC_EOC", "duration": 2.5 },
{ "u_add_effect": "effect_invisibility_magic_square", "duration": 4620, "intensity": 77 }
]
}
]
}
}
]
Loading
Loading