Skip to content

Commit

Permalink
Add NPC traits
Browse files Browse the repository at this point in the history
  • Loading branch information
Standing-Storm committed Sep 8, 2024
1 parent f1622b5 commit 973f885
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 18 deletions.
32 changes: 16 additions & 16 deletions data/mods/Magiclysm/eoc_spell_difficulty_modifiers.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
"required_event": "opens_spellbook",
"condition": { "u_has_trait": "NO_CASTING_CHANNELING_SPELLS" },
"effect": [
{ "math": [ "u_spellcasting_adjustment('difficulty', 'flag_whitelist': 'CHANNELING_SPELL')", "=", "1000" ] },
{ "math": [ "u_spellcasting_adjustment('cost', 'flag_whitelist': 'CHANNELING_SPELL')", "=", "1000" ] }
{ "math": [ "u_spellcasting_adjustment('difficulty', 'flag_whitelist': 'CHANNELING_SPELL')", "=", "999" ] },
{ "math": [ "u_spellcasting_adjustment('cost', 'flag_whitelist': 'CHANNELING_SPELL')", "=", "999" ] }
]
},
{
Expand All @@ -59,8 +59,8 @@
"required_event": "opens_spellbook",
"condition": { "u_has_trait": "NO_CASTING_EVOCATION_SPELLS" },
"effect": [
{ "math": [ "u_spellcasting_adjustment('difficulty', 'flag_whitelist': 'EVOCATION_SPELL')", "=", "1000" ] },
{ "math": [ "u_spellcasting_adjustment('cost', 'flag_whitelist': 'EVOCATION_SPELL')", "=", "1000" ] }
{ "math": [ "u_spellcasting_adjustment('difficulty', 'flag_whitelist': 'EVOCATION_SPELL')", "=", "999" ] },
{ "math": [ "u_spellcasting_adjustment('cost', 'flag_whitelist': 'EVOCATION_SPELL')", "=", "999" ] }
]
},
{
Expand All @@ -70,8 +70,8 @@
"required_event": "opens_spellbook",
"condition": { "u_has_trait": "NO_CASTING_CONJURATION_SPELLS" },
"effect": [
{ "math": [ "u_spellcasting_adjustment('difficulty', 'flag_whitelist': 'CONJURATION_SPELL')", "=", "1000" ] },
{ "math": [ "u_spellcasting_adjustment('cost', 'flag_whitelist': 'CONJURATION_SPELL')", "=", "1000" ] }
{ "math": [ "u_spellcasting_adjustment('difficulty', 'flag_whitelist': 'CONJURATION_SPELL')", "=", "999" ] },
{ "math": [ "u_spellcasting_adjustment('cost', 'flag_whitelist': 'CONJURATION_SPELL')", "=", "999" ] }
]
},
{
Expand All @@ -81,8 +81,8 @@
"required_event": "opens_spellbook",
"condition": { "u_has_trait": "NO_CASTING_ENHANCEMENT_SPELLS" },
"effect": [
{ "math": [ "u_spellcasting_adjustment('difficulty', 'flag_whitelist': 'ENHANCEMENT_SPELL')", "=", "1000" ] },
{ "math": [ "u_spellcasting_adjustment('cost', 'flag_whitelist': 'ENHANCEMENT_SPELL')", "=", "1000" ] }
{ "math": [ "u_spellcasting_adjustment('difficulty', 'flag_whitelist': 'ENHANCEMENT_SPELL')", "=", "999" ] },
{ "math": [ "u_spellcasting_adjustment('cost', 'flag_whitelist': 'ENHANCEMENT_SPELL')", "=", "999" ] }
]
},
{
Expand All @@ -92,8 +92,8 @@
"required_event": "opens_spellbook",
"condition": { "u_has_trait": "NO_CASTING_ENERVATION_SPELLS" },
"effect": [
{ "math": [ "u_spellcasting_adjustment('difficulty', 'flag_whitelist': 'ENERVATION_SPELL')", "=", "1000" ] },
{ "math": [ "u_spellcasting_adjustment('cost', 'flag_whitelist': 'ENERVATION_SPELL')", "=", "1000" ] }
{ "math": [ "u_spellcasting_adjustment('difficulty', 'flag_whitelist': 'ENERVATION_SPELL')", "=", "999" ] },
{ "math": [ "u_spellcasting_adjustment('cost', 'flag_whitelist': 'ENERVATION_SPELL')", "=", "999" ] }
]
},
{
Expand All @@ -103,8 +103,8 @@
"required_event": "opens_spellbook",
"condition": { "u_has_trait": "NO_CASTING_CONVEYANCE_SPELLS" },
"effect": [
{ "math": [ "u_spellcasting_adjustment('difficulty', 'flag_whitelist': 'CONVEYANCE_SPELL')", "=", "1000" ] },
{ "math": [ "u_spellcasting_adjustment('cost', 'flag_whitelist': 'CONVEYANCE_SPELL')", "=", "1000" ] }
{ "math": [ "u_spellcasting_adjustment('difficulty', 'flag_whitelist': 'CONVEYANCE_SPELL')", "=", "999" ] },
{ "math": [ "u_spellcasting_adjustment('cost', 'flag_whitelist': 'CONVEYANCE_SPELL')", "=", "999" ] }
]
},
{
Expand All @@ -114,8 +114,8 @@
"required_event": "opens_spellbook",
"condition": { "u_has_trait": "NO_CASTING_RESTORATION_SPELLS" },
"effect": [
{ "math": [ "u_spellcasting_adjustment('difficulty', 'flag_whitelist': 'RESTORATION_SPELL')", "=", "1000" ] },
{ "math": [ "u_spellcasting_adjustment('cost', 'flag_whitelist': 'RESTORATION_SPELL')", "=", "1000" ] }
{ "math": [ "u_spellcasting_adjustment('difficulty', 'flag_whitelist': 'RESTORATION_SPELL')", "=", "999" ] },
{ "math": [ "u_spellcasting_adjustment('cost', 'flag_whitelist': 'RESTORATION_SPELL')", "=", "999" ] }
]
},
{
Expand All @@ -125,8 +125,8 @@
"required_event": "opens_spellbook",
"condition": { "u_has_trait": "NO_CASTING_TRANSFORMATION_SPELLS" },
"effect": [
{ "math": [ "u_spellcasting_adjustment('difficulty', 'flag_whitelist': 'TRANSFORMATION_SPELL')", "=", "1000" ] },
{ "math": [ "u_spellcasting_adjustment('cost', 'flag_whitelist': 'TRANSFORMATION_SPELL')", "=", "1000" ] }
{ "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 }
]
}
]

0 comments on commit 973f885

Please sign in to comment.