Skip to content

Commit

Permalink
[Xedra Evolved] Only humans can learn dream magick (#77685)
Browse files Browse the repository at this point in the history
* Initial commit

* Inventor EoCs don't run if you can't learn new inventions

* Dreamer/Eater EoCs don't run if you can't learn more spells

* Add condition

* Ban increasing dreamsmith if you're ineligible

* Add recipe-removing EoC

* Add missing recipes
  • Loading branch information
Standing-Storm authored Nov 9, 2024
1 parent ad3a792 commit adfd963
Show file tree
Hide file tree
Showing 11 changed files with 268 additions and 24 deletions.
7 changes: 4 additions & 3 deletions data/mods/Xedra_Evolved/eocs/dreamsmith.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"id": "EOC_DREAMSMITHS_SCORE_TIMER",
"//": "Increase the dreamsmith recipe score for `deduction` amount. Respond for passive score gain. Also gives lvl 1 recipes every day.",
"recurrence": [ "20 hours", "28 hours" ],
"condition": { "u_has_trait": "DREAMSMITH" },
"condition": { "and": [ { "u_has_trait": "DREAMSMITH" }, { "test_eoc": "EOC_CONDITION_BANNED_DREAM_MAGIC_TRAITS" } ] },
"effect": [
{ "math": [ "DREAMSMITH_RECIPE_SCORE", "+=", "u_skill('deduction')" ] },
{
Expand Down Expand Up @@ -33,15 +33,16 @@
"type": "effect_on_condition",
"id": "EOC_DREAMSMITHS_SCORE_TRAIN",
"//": "Increase the dreamsmith recipe score and recipe superscore for each `training` spell cast. Each cast increase the gain score for 1",
"condition": { "u_has_trait": "DREAMSMITH" },
"condition": { "and": [ { "u_has_trait": "DREAMSMITH" }, { "test_eoc": "EOC_CONDITION_BANNED_DREAM_MAGIC_TRAITS" } ] },
"effect": [
{ "math": [ "DREAMSMITH_RECIPE_SCORE", "+=", "DREAMSMITH_RECIPE_SCORE_TRAINS" ] },
{ "math": [ "DREAMSMITH_RECIPE_SCORE_TRAINS", "++" ] },
{ "math": [ "DREAMSMITH_RECIPE_SCORE_SUPER", "+=", "DREAMSMITH_RECIPE_SCORE_TRAINS_SUPER" ] },
{ "math": [ "DREAMSMITH_RECIPE_SCORE_TRAINS_SUPER", "++" ] },
{ "run_eocs": "EOC_DREAMSMITHS_RECIPES_ENCH" },
{ "run_eocs": "EOC_DREAMSMITHS_RECIPES_SUPER" }
]
],
"false_effect": [ { "u_message": "You just can't seem to figure out even the simplest principles of dreamdross.", "type": "info" } ]
},
{
"type": "effect_on_condition",
Expand Down
23 changes: 23 additions & 0 deletions data/mods/Xedra_Evolved/eocs/eoc_conditions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[
{
"type": "effect_on_condition",
"id": "EOC_CONDITION_BANNED_DREAM_MAGIC_TRAITS",
"condition": {
"not": {
"u_has_any_trait": [
"CHANGELING_MAGIC",
"NATIVE_SHAPESHIFTER",
"LILIN_TRAITS",
"ARVORE",
"IERDE",
"HOMULLUS",
"SALAMANDER",
"SYLPH",
"UNDINE",
"VAMPIRE"
]
}
},
"effect": [ ]
}
]
157 changes: 156 additions & 1 deletion data/mods/Xedra_Evolved/eocs/give_a_class_eoc.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
]
},
{ "math": [ "magic_potential", ">", "0" ] },
{ "not": { "u_has_trait": "DREAMLESS" } }
{ "not": { "u_has_trait": "DREAMLESS" } },
{ "test_eoc": "EOC_CONDITION_BANNED_DREAM_MAGIC_TRAITS" }
]
}
},
Expand Down Expand Up @@ -181,5 +182,159 @@
"else": [ { "math": [ "inventor_dreamsmith_sequence", "=", "-99999" ] }, { "math": [ "magic_potential", "=", "-1" ] } ]
}
]
},
{
"type": "effect_on_condition",
"id": "EOC_REMOVE_DREAM_MAGIC",
"effect": [
{ "u_lose_trait": "DREAMER" },
{ "u_lose_trait": "DREAMSMITH" },
{ "u_lose_trait": "EATER" },
{ "u_lose_trait": "INVENTOR" },
{ "u_mutate_towards": "DREAMLESS", "category": "ANY", "use_vitamins": false },
{ "u_forget_recipe": "inventor_leg_weight" },
{ "u_forget_recipe": "inventor_jump_boots" },
{ "u_forget_recipe": "inventor_sniper" },
{ "u_forget_recipe": "inventor_shotgun" },
{ "u_forget_recipe": "inventor_pistol" },
{ "u_forget_recipe": "megachette" },
{ "u_forget_recipe": "software_math_inventor" },
{ "u_forget_recipe": "software_electronics_reference_inventor" },
{ "u_forget_recipe": "combatsaw_spear_off" },
{ "u_forget_recipe": "inventor_research_base_2" },
{ "u_forget_recipe": "helmet_inventor" },
{ "u_forget_recipe": "inventor_fists" },
{ "u_forget_recipe": "wolf_mask" },
{ "u_forget_recipe": "magnetic_holster" },
{ "u_forget_recipe": "binary_sword" },
{ "u_forget_recipe": "bio_launcher" },
{ "u_forget_recipe": "bio_warhead" },
{ "u_forget_recipe": "trinket_damage" },
{ "u_forget_recipe": "trinket_range" },
{ "u_forget_recipe": "trinket_sound" },
{ "u_forget_recipe": "choke_wideshot" },
{ "u_forget_recipe": "mod_inv_pistol_booster" },
{ "u_forget_recipe": "inventor_research_base_3" },
{ "u_forget_recipe": "inventor_research_energy_1" },
{ "u_forget_recipe": "software_AI" },
{ "u_forget_recipe": "stunning_qr_trap" },
{ "u_forget_recipe": "inventor_backpack" },
{ "u_forget_recipe": "vision_halo" },
{ "u_forget_recipe": "sonic_gun" },
{ "u_forget_recipe": "mace_magic" },
{ "u_forget_recipe": "stunning_arg_trap" },
{ "u_forget_recipe": "inventor_fists_plus" },
{ "u_forget_recipe": "inventor_plasma_axe_off" },
{ "u_forget_recipe": "inventor_research_energy_1" },
{ "u_forget_recipe": "battery_gun" },
{ "u_forget_recipe": "ray_gun" },
{ "u_forget_recipe": "inventor_light_minus_cell" },
{ "u_forget_recipe": "inventor_light_cell" },
{ "u_forget_recipe": "inventor_medium_cell" },
{ "u_forget_recipe": "inventor_heavy_cell" },
{ "u_forget_recipe": "inventor_welder" },
{ "u_forget_recipe": "heater_tool" },
{ "u_forget_recipe": "inventor_electric_fist" },
{ "u_forget_recipe": "inventor_research_energy_2" },
{ "u_forget_recipe": "inventor_glauncher" },
{ "u_forget_recipe": "inventor_glauncher_fire" },
{ "u_forget_recipe": "inventor_glauncher_elec" },
{ "u_forget_recipe": "inventor_glauncher_direct" },
{ "u_forget_recipe": "death_ray" },
{ "u_forget_recipe": "inventor_lasmod_mega_capasitor" },
{ "u_forget_recipe": "inventor_lasmod_adv_adv_cooler" },
{ "u_forget_recipe": "inventor_lasmod_recuperator" },
{ "u_forget_recipe": "inventor_lasmod_mega_everything" },
{ "u_forget_recipe": "inventor_lasmod_more_capacitors" },
{ "u_forget_recipe": "inventor_research_ai_1" },
{ "u_forget_recipe": "inventor_research_dimension_1" },
{ "u_forget_recipe": "nre_recorder_inventor" },
{ "u_forget_recipe": "aura_force" },
{ "u_forget_recipe": "ray_rifle" },
{ "u_forget_recipe": "ion_gun" },
{ "u_forget_recipe": "accelerator_gun" },
{ "u_forget_recipe": "inventor_grenade_noise_expl" },
{ "u_forget_recipe": "inventor_grenade_noise_emp" },
{ "u_forget_recipe": "inventor_grenade_noise_fire" },
{ "u_forget_recipe": "heater_gun" },
{ "u_forget_recipe": "inventor_lasmod_close_range" },
{ "u_forget_recipe": "inventor_lasmod_long_range" },
{ "u_forget_recipe": "inventor_lasmod_capasitor" },
{ "u_forget_recipe": "inventor_lasmod_energy_safe" },
{ "u_forget_recipe": "inventor_lasmod_adv_cooler" },
{ "u_forget_recipe": "inventor_lasmod_radiator" },
{ "u_forget_recipe": "inventor_lasmod_chonky_radiator" },
{ "u_forget_recipe": "inventor_lasmod_spooky_heat_sink" },
{ "u_forget_recipe": "inventor_research_energy_3" },
{ "u_forget_recipe": "bot_sniperbot" },
{ "u_forget_recipe": "bot_shotgunbot" },
{ "u_forget_recipe": "bot_meleebot" },
{ "u_forget_recipe": "rip_ticket" },
{ "u_forget_recipe": "inventor_warp_grenade" },
{ "u_forget_recipe": "inventor_portal_closer" },
{ "u_forget_recipe": "teleporter_inventor" },
{ "u_forget_recipe": "dreamdross_bo" },
{ "u_forget_recipe": "dreamdross_knife" },
{ "u_forget_recipe": "dreamdross_club" },
{ "u_forget_recipe": "dreamsmith_research" },
{ "u_forget_recipe": "dreamdross_lump" },
{ "u_forget_recipe": "forged_dreamstuff_ingot" },
{ "u_forget_recipe": "dreamforged_ballistic_plate" },
{ "u_forget_recipe": "dreamforged_ballistic_plate_small" },
{ "u_forget_recipe": "dreamforged_q_staff_ench" },
{ "u_forget_recipe": "dreamforged_longsword_ench" },
{ "u_forget_recipe": "dreamforged_warhammer_ench" },
{ "u_forget_recipe": "dreamforged_spear_ench" },
{ "u_forget_recipe": "dreamforged_halberd_ench" },
{ "u_forget_recipe": "dreamforged_glaive_ench" },
{ "u_forget_recipe": "dreamforged_naginata_ench" },
{ "u_forget_recipe": "dreamforged_mace_ench" },
{ "u_forget_recipe": "dreamforged_morningstar_ench" },
{ "u_forget_recipe": "dreamforged_estoc_ench" },
{ "u_forget_recipe": "dreamforged_arming_sword_ench" },
{ "u_forget_recipe": "dreamforged_broadsword_ench" },
{ "u_forget_recipe": "dreamforged_battleaxe_ench" },
{ "u_forget_recipe": "dreamforged_katana_ench" },
{ "u_forget_recipe": "dreamforged_knife_combat_ench" },
{ "u_forget_recipe": "dreamforged_kris_ench" },
{ "u_forget_recipe": "dreamforged_kukri_ench" },
{ "u_forget_recipe": "dreamforged_nodachi_ench" },
{ "u_forget_recipe": "dreamforged_rapier_ench" },
{ "u_forget_recipe": "dreamforged_tanto_ench" },
{ "u_forget_recipe": "dreamforged_wakizashi_ench" },
{ "u_forget_recipe": "dreamforged_zweihander_ench" },
{ "u_forget_recipe": "dreamforged_khopesh_ench" },
{ "u_forget_recipe": "dreamforged_lucerne_ench" },
{ "u_forget_recipe": "dreamforged_knuckle_ench" },
{ "u_forget_recipe": "dreamforged_fullhelmet_ench" },
{ "u_forget_recipe": "dreamforged_helmet_ench" },
{ "u_forget_recipe": "dreamforged_plate_armor_ench" },
{ "u_forget_recipe": "dreamforged_armguard_plate_ench" },
{ "u_forget_recipe": "dreamforged_boots_ench" },
{ "u_forget_recipe": "dreamforged_longbow" },
{ "u_forget_recipe": "arrow_dreamforged" },
{ "u_forget_recipe": "dreamforged_crossbow" },
{ "u_forget_recipe": "bolt_dreamforged" },
{ "u_forget_recipe": "dreamforged_hacksaw" },
{ "u_forget_recipe": "dreamforged_hammer" },
{ "u_forget_recipe": "dreamforged_halligan" },
{ "u_forget_recipe": "dreamforged_pliers_locking" },
{ "u_forget_recipe": "dreamforged_pickaxe" },
{ "u_forget_recipe": "dreamforged_picklocks" },
{ "u_forget_recipe": "dreamforged_scalpel" },
{ "u_forget_recipe": "dreamforged_e_tool" },
{ "u_forget_recipe": "dreamforged_ax" },
{ "u_forget_recipe": "dreamforged_nail" },
{ "u_forget_recipe": "dreamforged_knuckle_berserk" },
{ "u_forget_recipe": "dreamforged_helmet_berserker" },
{ "u_forget_recipe": "dreamforged_armguard_plate_berserk" },
{ "u_forget_recipe": "dreamforged_boots_berserk" },
{ "u_forget_recipe": "dreamforged_fullhelmet_arcane" },
{ "u_forget_recipe": "dreamforged_glaive_healing" },
{ "u_forget_recipe": "dreamforged_tsurugi_speed" },
{ "u_forget_recipe": "dreamforged_q_staff_exp" },
{ "u_forget_recipe": "dreamforged_armguard_plate_gunslinger" },
{ "u_forget_recipe": "dreamforged_bed_of_restful_repose" }
]
}
]
52 changes: 43 additions & 9 deletions data/mods/Xedra_Evolved/eocs/inventor.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@
"type": "effect_on_condition",
"id": "EOC_INVENTOR_RESEARCH_BASE_1",
"//": "Check, do player has enough processed sparks to beat the difficulty. If true, substract difficulty from vitamin, increase difficulty for 5, roll_remainder recipe, process sparks, print success message. If false, give 1 processed spark, process sparks, print a fail message.",
"condition": { "math": [ "u_vitamin('creative_spark_research')", ">=", "base_difficulty_1" ] },
"condition": {
"and": [
{ "math": [ "u_vitamin('creative_spark_research')", ">=", "base_difficulty_1" ] },
{ "test_eoc": "EOC_CONDITION_BANNED_DREAM_MAGIC_TRAITS" }
]
},
"effect": [
{ "math": [ "u_vitamin('creative_spark_research')", "-=", "base_difficulty_1" ] },
{ "math": [ "base_difficulty_1", "+=", "2" ] },
Expand Down Expand Up @@ -44,7 +49,12 @@
{
"type": "effect_on_condition",
"id": "EOC_INVENTOR_RESEARCH_BASE_2",
"condition": { "math": [ "u_vitamin('creative_spark_research')", ">=", "base_difficulty_2" ] },
"condition": {
"and": [
{ "math": [ "u_vitamin('creative_spark_research')", ">=", "base_difficulty_2" ] },
{ "test_eoc": "EOC_CONDITION_BANNED_DREAM_MAGIC_TRAITS" }
]
},
"effect": [
{ "math": [ "u_vitamin('creative_spark_research')", "-=", "base_difficulty_2" ] },
{ "math": [ "base_difficulty_2", "+=", "3" ] },
Expand Down Expand Up @@ -91,7 +101,12 @@
{
"type": "effect_on_condition",
"id": "EOC_INVENTOR_RESEARCH_BASE_3",
"condition": { "math": [ "u_vitamin('creative_spark_research')", ">=", "base_difficulty_3" ] },
"condition": {
"and": [
{ "math": [ "u_vitamin('creative_spark_research')", ">=", "base_difficulty_3" ] },
{ "test_eoc": "EOC_CONDITION_BANNED_DREAM_MAGIC_TRAITS" }
]
},
"effect": [
{ "math": [ "u_vitamin('creative_spark_research')", "-=", "base_difficulty_3" ] },
{ "math": [ "base_difficulty_3", "+=", "4" ] },
Expand Down Expand Up @@ -130,7 +145,12 @@
{
"type": "effect_on_condition",
"id": "EOC_INVENTOR_RESEARCH_ENERGY_1",
"condition": { "math": [ "u_vitamin('creative_spark_research')", ">=", "energy_difficulty_1" ] },
"condition": {
"and": [
{ "math": [ "u_vitamin('creative_spark_research')", ">=", "energy_difficulty_1" ] },
{ "test_eoc": "EOC_CONDITION_BANNED_DREAM_MAGIC_TRAITS" }
]
},
"effect": [
{ "math": [ "u_vitamin('creative_spark_research')", "-=", "energy_difficulty_1" ] },
{ "math": [ "energy_difficulty_1", "+=", "2" ] },
Expand Down Expand Up @@ -171,7 +191,12 @@
{
"type": "effect_on_condition",
"id": "EOC_INVENTOR_RESEARCH_ENERGY_2",
"condition": { "math": [ "u_vitamin('creative_spark_research')", ">=", "energy_difficulty_2" ] },
"condition": {
"and": [
{ "math": [ "u_vitamin('creative_spark_research')", ">=", "energy_difficulty_2" ] },
{ "test_eoc": "EOC_CONDITION_BANNED_DREAM_MAGIC_TRAITS" }
]
},
"effect": [
{ "math": [ "u_vitamin('creative_spark_research')", "-=", "energy_difficulty_2" ] },
{ "math": [ "energy_difficulty_2", "+=", "3" ] },
Expand Down Expand Up @@ -219,7 +244,12 @@
{
"type": "effect_on_condition",
"id": "EOC_INVENTOR_RESEARCH_ENERGY_3",
"condition": { "math": [ "u_vitamin('creative_spark_research')", ">=", "energy_difficulty_3" ] },
"condition": {
"and": [
{ "math": [ "u_vitamin('creative_spark_research')", ">=", "energy_difficulty_3" ] },
{ "test_eoc": "EOC_CONDITION_BANNED_DREAM_MAGIC_TRAITS" }
]
},
"effect": [
{ "math": [ "u_vitamin('creative_spark_research')", "-=", "energy_difficulty_3" ] },
{ "math": [ "energy_difficulty_3", "+=", "4" ] },
Expand Down Expand Up @@ -266,7 +296,8 @@
"condition": {
"and": [
{ "math": [ "u_vitamin('creative_spark_research')", ">=", "base_difficulty_3" ] },
{ "math": [ "AI_sparks", ">=", "AI_difficulty_1" ] }
{ "math": [ "AI_sparks", ">=", "AI_difficulty_1" ] },
{ "test_eoc": "EOC_CONDITION_BANNED_DREAM_MAGIC_TRAITS" }
]
},
"effect": [
Expand Down Expand Up @@ -303,7 +334,8 @@
"condition": {
"and": [
{ "math": [ "u_vitamin('creative_spark_research')", ">=", "base_difficulty_3" ] },
{ "math": [ "dimension_sparks", ">=", "dimension_difficulty_1" ] }
{ "math": [ "dimension_sparks", ">=", "dimension_difficulty_1" ] },
{ "test_eoc": "EOC_CONDITION_BANNED_DREAM_MAGIC_TRAITS" }
]
},
"effect": [
Expand Down Expand Up @@ -337,7 +369,9 @@
{
"type": "effect_on_condition",
"id": "EOC_INVENTOR_PROCESS_SPARKS",
"condition": { "math": [ "u_vitamin('creative_spark')", ">", "0" ] },
"condition": {
"and": [ { "math": [ "u_vitamin('creative_spark')", ">", "0" ] }, { "test_eoc": "EOC_CONDITION_BANNED_DREAM_MAGIC_TRAITS" } ]
},
"effect": [
{
"math": [
Expand Down
1 change: 1 addition & 0 deletions data/mods/Xedra_Evolved/eocs/spell_learning_eoc.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
"id": "EOC_XE_QUEUE_LEVELING",
"eoc_type": "EVENT",
"required_event": "character_wakes_up",
"condition": { "test_eoc": "EOC_CONDITION_BANNED_DREAM_MAGIC_TRAITS" },
"effect": [
{
"if": { "math": [ "xe_eater_leveling", ">", "0" ] },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"effect": [
{ "finish_mission": "KILL_YOUR_BEST_FRIEND", "success": true },
{ "u_add_trait": "VAMPIRE4" },
{ "run_eocs": "EOC_REMOVE_DREAM_MAGIC" },
{ "u_add_effect": "vampire_virus_ascendant", "intensity": 1, "duration": "PERMANENT" },
{ "u_message": "Your eyes redden even more as you pass a point of no return.", "type": "mixed" }
]
Expand Down
6 changes: 4 additions & 2 deletions data/mods/Xedra_Evolved/mutations/mutations.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
"points": -1,
"starting_trait": true,
"valid": false,
"description": "You live firmly in reality and never experience extremely vivid dreams about choices that have real world consequences. ( You will be unable to gain Dream magicks from sleeping after strange events)"
"description": "You live firmly in reality and never experience extremely vivid dreams about choices that have real world consequences. ( You will be unable to gain Dream magicks from sleeping after strange events)",
"cancels": [ "DREAMER", "DREAMSMITH", "EATER", "INVENTOR" ]
},
{
"type": "mutation",
Expand Down Expand Up @@ -164,7 +165,8 @@
"purifiable": false,
"valid": false,
"vitamin_rates": [ [ "human_blood_vitamin", 180 ] ],
"flags": [ "CANNIBAL", "HEMOVORE" ]
"flags": [ "CANNIBAL", "HEMOVORE" ],
"cancels": [ "DREAMER", "DREAMSMITH", "EATER", "INVENTOR" ]
},
{
"type": "mutation",
Expand Down
Loading

0 comments on commit adfd963

Please sign in to comment.