Skip to content

Commit

Permalink
[Magiclysm] Add spell school deficiency traits (#76230)
Browse files Browse the repository at this point in the history
* Initial commit

* Add cost too

* Fix names

* Add NPC traits
  • Loading branch information
Standing-Storm authored Sep 8, 2024
1 parent 515ac7b commit ced900e
Show file tree
Hide file tree
Showing 5 changed files with 233 additions and 2 deletions.
88 changes: 88 additions & 0 deletions data/mods/Magiclysm/eoc_spell_difficulty_modifiers.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,93 @@
]
}
]
},
{
"type": "effect_on_condition",
"id": "EOC_NO_CASTING_CHANNELING_SPELLS_EFFECTS",
"eoc_type": "EVENT",
"required_event": "opens_spellbook",
"condition": { "u_has_trait": "NO_CASTING_CHANNELING_SPELLS" },
"effect": [
{ "math": [ "u_spellcasting_adjustment('difficulty', 'flag_whitelist': 'CHANNELING_SPELL')", "=", "999" ] },
{ "math": [ "u_spellcasting_adjustment('cost', 'flag_whitelist': 'CHANNELING_SPELL')", "=", "999" ] }
]
},
{
"type": "effect_on_condition",
"id": "EOC_NO_CASTING_EVOCATION_SPELLS_EFFECTS",
"eoc_type": "EVENT",
"required_event": "opens_spellbook",
"condition": { "u_has_trait": "NO_CASTING_EVOCATION_SPELLS" },
"effect": [
{ "math": [ "u_spellcasting_adjustment('difficulty', 'flag_whitelist': 'EVOCATION_SPELL')", "=", "999" ] },
{ "math": [ "u_spellcasting_adjustment('cost', 'flag_whitelist': 'EVOCATION_SPELL')", "=", "999" ] }
]
},
{
"type": "effect_on_condition",
"id": "EOC_NO_CASTING_CONJURATION_SPELLS_EFFECTS",
"eoc_type": "EVENT",
"required_event": "opens_spellbook",
"condition": { "u_has_trait": "NO_CASTING_CONJURATION_SPELLS" },
"effect": [
{ "math": [ "u_spellcasting_adjustment('difficulty', 'flag_whitelist': 'CONJURATION_SPELL')", "=", "999" ] },
{ "math": [ "u_spellcasting_adjustment('cost', 'flag_whitelist': 'CONJURATION_SPELL')", "=", "999" ] }
]
},
{
"type": "effect_on_condition",
"id": "EOC_NO_CASTING_ENHANCEMENT_SPELLS_EFFECTS",
"eoc_type": "EVENT",
"required_event": "opens_spellbook",
"condition": { "u_has_trait": "NO_CASTING_ENHANCEMENT_SPELLS" },
"effect": [
{ "math": [ "u_spellcasting_adjustment('difficulty', 'flag_whitelist': 'ENHANCEMENT_SPELL')", "=", "999" ] },
{ "math": [ "u_spellcasting_adjustment('cost', 'flag_whitelist': 'ENHANCEMENT_SPELL')", "=", "999" ] }
]
},
{
"type": "effect_on_condition",
"id": "EOC_NO_CASTING_ENERVATION_SPELLS_EFFECTS",
"eoc_type": "EVENT",
"required_event": "opens_spellbook",
"condition": { "u_has_trait": "NO_CASTING_ENERVATION_SPELLS" },
"effect": [
{ "math": [ "u_spellcasting_adjustment('difficulty', 'flag_whitelist': 'ENERVATION_SPELL')", "=", "999" ] },
{ "math": [ "u_spellcasting_adjustment('cost', 'flag_whitelist': 'ENERVATION_SPELL')", "=", "999" ] }
]
},
{
"type": "effect_on_condition",
"id": "EOC_NO_CASTING_CONVEYANCE_SPELLS_EFFECTS",
"eoc_type": "EVENT",
"required_event": "opens_spellbook",
"condition": { "u_has_trait": "NO_CASTING_CONVEYANCE_SPELLS" },
"effect": [
{ "math": [ "u_spellcasting_adjustment('difficulty', 'flag_whitelist': 'CONVEYANCE_SPELL')", "=", "999" ] },
{ "math": [ "u_spellcasting_adjustment('cost', 'flag_whitelist': 'CONVEYANCE_SPELL')", "=", "999" ] }
]
},
{
"type": "effect_on_condition",
"id": "EOC_NO_CASTING_RESTORATION_SPELLS_EFFECTS",
"eoc_type": "EVENT",
"required_event": "opens_spellbook",
"condition": { "u_has_trait": "NO_CASTING_RESTORATION_SPELLS" },
"effect": [
{ "math": [ "u_spellcasting_adjustment('difficulty', 'flag_whitelist': 'RESTORATION_SPELL')", "=", "999" ] },
{ "math": [ "u_spellcasting_adjustment('cost', 'flag_whitelist': 'RESTORATION_SPELL')", "=", "999" ] }
]
},
{
"type": "effect_on_condition",
"id": "EOC_NO_CASTING_TRANSFORMATION_SPELLS_EFFECTS",
"eoc_type": "EVENT",
"required_event": "opens_spellbook",
"condition": { "u_has_trait": "NO_CASTING_TRANSFORMATION_SPELLS" },
"effect": [
{ "math": [ "u_spellcasting_adjustment('difficulty', 'flag_whitelist': 'TRANSFORMATION_SPELL')", "=", "999" ] },
{ "math": [ "u_spellcasting_adjustment('cost', 'flag_whitelist': 'TRANSFORMATION_SPELL')", "=", "999" ] }
]
}
]
7 changes: 6 additions & 1 deletion data/mods/Magiclysm/itemgroups/itemgroups.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@
"type": "item_group",
"id": "SUS_book_nonf_soft",
"copy-from": "SUS_book_nonf_soft",
"extend": { "items": [ { "item": "book_nonf_magic_origin_of_species", "prob": 1 } ] }
"extend": {
"items": [
{ "item": "book_nonf_magic_origin_of_species", "prob": 1 },
{ "item": "book_nonf_empty_social_history_no_magic", "prob": 3 }
]
}
},
{
"type": "item_group",
Expand Down
24 changes: 24 additions & 0 deletions data/mods/Magiclysm/items/books_lore.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,29 @@
"material": [ "paper" ],
"copy-from": "book_nonf_soft_tpl",
"melee_damage": { "bash": 2 }
},
{
"type": "BOOK",
"id": "book_nonf_empty_social_history_no_magic",
"name": {
"str": "Running on Empty: A Social History of those Born Without Magic",
"str_pl": "copies of Running on Empty: A Social History of those Born Without Magic"
},
"description": "A history of the treatment of the \"Empty\", people born with the inability to master even the simplest of spells. From persecution to favored positions (since rulers could be sure the Empty had no magical means of plotting against them), this book chronicles their treatment across the ages.",
"intelligence": 7,
"symbol": "?",
"looks_like": "story_book",
"color": "light_gray",
"time": "20 m",
"chapters": 15,
"fun": 1,
"weight": "1000 g",
"volume": "885 ml",
"longest_side": "23 cm",
"price": "20 USD 89 cent",
"price_postapoc": "10 USD",
"material": [ "paper" ],
"copy-from": "book_nonf_soft_tpl",
"melee_damage": { "bash": 2 }
}
]
34 changes: 33 additions & 1 deletion data/mods/Magiclysm/npc/trait_groups.json
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,9 @@
{ "group": "trait_group_fantasy_species", "prob": 50 },
{ "group": "trait_group_MANA_REGEN", "prob": 15 },
{ "group": "trait_group_MANA_MULT", "prob": 5 },
{ "group": "trait_group_MANA_ADD", "prob": 10 }
{ "group": "trait_group_MANA_ADD", "prob": 10 },
{ "group": "trait_group_SCHOOL_DEFICIENCY_SINGLE", "prob": 15 },
{ "group": "trait_group_SCHOOL_DEFICIENCY_MULTIPLE", "prob": 2 }
]
},
{
Expand Down Expand Up @@ -317,5 +319,35 @@
{ "trait": "MANA_SUB2", "prob": 15 },
{ "trait": "MANA_SUB3", "prob": 1 }
]
},
{
"type": "trait_group",
"id": "trait_group_SCHOOL_DEFICIENCY_SINGLE",
"subtype": "distribution",
"traits": [
{ "trait": "NO_CASTING_CHANNELING_SPELLS", "prob": 1 },
{ "trait": "NO_CASTING_EVOCATION_SPELLS", "prob": 1 },
{ "trait": "NO_CASTING_CONJURATION_SPELLS", "prob": 1 },
{ "trait": "NO_CASTING_ENHANCEMENT_SPELLS", "prob": 1 },
{ "trait": "NO_CASTING_ENERVATION_SPELLS", "prob": 1 },
{ "trait": "NO_CASTING_CONVEYANCE_SPELLS", "prob": 1 },
{ "trait": "NO_CASTING_RESTORATION_SPELLS", "prob": 1 },
{ "trait": "NO_CASTING_TRANSFORMATION_SPELLS", "prob": 1 }
]
},
{
"type": "trait_group",
"id": "trait_group_SCHOOL_DEFICIENCY_MULTIPLE",
"subtype": "collection",
"traits": [
{ "trait": "NO_CASTING_CHANNELING_SPELLS", "prob": 25 },
{ "trait": "NO_CASTING_EVOCATION_SPELLS", "prob": 25 },
{ "trait": "NO_CASTING_CONJURATION_SPELLS", "prob": 25 },
{ "trait": "NO_CASTING_ENHANCEMENT_SPELLS", "prob": 25 },
{ "trait": "NO_CASTING_ENERVATION_SPELLS", "prob": 25 },
{ "trait": "NO_CASTING_CONVEYANCE_SPELLS", "prob": 25 },
{ "trait": "NO_CASTING_RESTORATION_SPELLS", "prob": 25 },
{ "trait": "NO_CASTING_TRANSFORMATION_SPELLS", "prob": 25 }
]
}
]
82 changes: 82 additions & 0 deletions data/mods/Magiclysm/traits/school_deficiencies.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
[
{
"type": "mutation",
"id": "NO_CASTING_CHANNELING_SPELLS",
"name": "School Deficiency: Channeling",
"points": -2,
"description": "No matter how hard you try, you never managed to master channeling spells. You are unable to cast any spell of the channeling school.",
"starting_trait": true,
"purifiable": false,
"valid": false
},
{
"type": "mutation",
"id": "NO_CASTING_EVOCATION_SPELLS",
"name": "School Deficiency: Evocation",
"points": -2,
"description": "No matter how hard you try, you never managed to master evocation spells. You are unable to cast any spell of the evocation school.",
"starting_trait": true,
"purifiable": false,
"valid": false
},
{
"type": "mutation",
"id": "NO_CASTING_CONJURATION_SPELLS",
"name": "School Deficiency: Conjuration",
"points": -2,
"description": "No matter how hard you try, you never managed to master conjuration spells. You are unable to cast any spell of the conjuration school.",
"starting_trait": true,
"purifiable": false,
"valid": false
},
{
"type": "mutation",
"id": "NO_CASTING_ENHANCEMENT_SPELLS",
"name": "School Deficiency: Enhancement",
"points": -2,
"description": "No matter how hard you try, you never managed to master enhancement spells. You are unable to cast any spell of the enhancement school.",
"starting_trait": true,
"purifiable": false,
"valid": false
},
{
"type": "mutation",
"id": "NO_CASTING_ENERVATION_SPELLS",
"name": "School Deficiency: Enervation",
"points": -2,
"description": "No matter how hard you try, you never managed to master enervation spells. You are unable to cast any spell of the enervation school.",
"starting_trait": true,
"purifiable": false,
"valid": false
},
{
"type": "mutation",
"id": "NO_CASTING_CONVEYANCE_SPELLS",
"name": "School Deficiency: Conveyance",
"points": -2,
"description": "No matter how hard you try, you never managed to master conveyance spells. You are unable to cast any spell of the conveyance school.",
"starting_trait": true,
"purifiable": false,
"valid": false
},
{
"type": "mutation",
"id": "NO_CASTING_RESTORATION_SPELLS",
"name": "School Deficiency: Restoration",
"points": -2,
"description": "No matter how hard you try, you never managed to master restoration spells. You are unable to cast any spell of the restoration school.",
"starting_trait": true,
"purifiable": false,
"valid": false
},
{
"type": "mutation",
"id": "NO_CASTING_TRANSFORMATION_SPELLS",
"name": "School Deficiency: Transformation",
"points": -2,
"description": "No matter how hard you try, you never managed to master transformation spells. You are unable to cast any spell of the transformation school.",
"starting_trait": true,
"purifiable": false,
"valid": false
}
]

0 comments on commit ced900e

Please sign in to comment.