Skip to content

Commit

Permalink
Allow Lilin to drain ruach while under the effects of NO_SPELLCASTING (
Browse files Browse the repository at this point in the history
…#77998)

* Add NON_MAGICAL to Lilin ruach drain abilities

* Owl-form lilin cannot drain (even through dialogue)

* Warn player about drain restrictions in the owl forms

* Fix drain block not working
  • Loading branch information
SariusSkelrets authored Nov 20, 2024
1 parent 0d10948 commit 91af05b
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 7 deletions.
4 changes: 2 additions & 2 deletions data/mods/Xedra_Evolved/mutations/xe_lilin.json
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
"id": "LILIN_TURN_INTO_OWL",
"name": { "str": "On Silent Wings" },
"points": 8,
"description": "You can transform yourself into an owl and take wing on the night air.",
"description": "You can transform yourself into an owl and take wing on the night air. You won't be able to drain ruach while you are in this form.",
"starting_trait": false,
"purifiable": false,
"active": true,
Expand Down Expand Up @@ -816,7 +816,7 @@
"id": "LILIN_TRANSFORM_INTO_WAR_OWL_FORM",
"name": { "str": "The Strix's Wrath" },
"points": 10,
"description": "You can combine your forms, transforming into a large owl-human hybrid with wings, rending talons, and a deadly beak.",
"description": "You can combine your forms, transforming into a large owl-human hybrid with wings, rending talons, and a deadly beak. You won't be able to drain ruach while you are in this form.",
"starting_trait": false,
"purifiable": false,
"active": true,
Expand Down
39 changes: 37 additions & 2 deletions data/mods/Xedra_Evolved/npc/lilin_askruach.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
{ "u_has_trait": "LILIN_TRAITS" },
{ "not": { "npc_has_trait": "LILIN_TRAITS" } },
{ "not": { "npc_has_trait": "BLOOD_OF_SAINTS" } },
{ "not": { "u_has_trait": "TURN_INTO_OWL_TRAITS" } },
{ "not": { "u_has_trait": "LILIN_WAR_OWL_FORM_TRAITS" } },
{ "math": [ "n_npc_trust()", ">=", "10" ] },
{ "math": [ "n_npc_value()", ">=", "10" ] }
]
Expand All @@ -33,6 +35,8 @@
{ "u_has_trait": "LILIN_TRAITS" },
{ "not": { "npc_has_trait": "LILIN_TRAITS" } },
{ "not": { "npc_has_trait": "BLOOD_OF_SAINTS" } },
{ "not": { "u_has_trait": "TURN_INTO_OWL_TRAITS" } },
{ "not": { "u_has_trait": "LILIN_WAR_OWL_FORM_TRAITS" } },
{
"not": { "and": [ { "math": [ "n_npc_trust()", ">=", "10" ] }, { "math": [ "n_npc_value()", ">=", "10" ] } ] }
},
Expand All @@ -54,7 +58,9 @@
"condition": {
"and": [
{ "u_has_trait": "LILIN_TRAITS" },
{ "or": [ { "npc_has_trait": "LILIN_TRAITS" }, { "npc_has_trait": "BLOOD_OF_SAINTS" } ] }
{ "or": [ { "npc_has_trait": "LILIN_TRAITS" }, { "npc_has_trait": "BLOOD_OF_SAINTS" } ] },
{ "not": { "u_has_trait": "TURN_INTO_OWL_TRAITS" } },
{ "not": { "u_has_trait": "LILIN_WAR_OWL_FORM_TRAITS" } }
]
}
}
Expand All @@ -73,7 +79,26 @@
{ "or": [ { "math": [ "n_npc_trust()", "<=", "0" ] }, { "math": [ "n_npc_value()", "<=", "0" ] } ] },
{ "u_has_trait": "LILIN_TRAITS" },
{ "not": { "npc_has_trait": "LILIN_TRAITS" } },
{ "not": { "npc_has_trait": "BLOOD_OF_SAINTS" } }
{ "not": { "npc_has_trait": "BLOOD_OF_SAINTS" } },
{ "not": { "u_has_trait": "TURN_INTO_OWL_TRAITS" } },
{ "not": { "u_has_trait": "LILIN_WAR_OWL_FORM_TRAITS" } }
]
}
}
]
},
{
"id": [ "TALK_FRIEND" ],
"type": "talk_topic",
"insert_before_standard_exits": true,
"responses": [
{
"text": "Can I take a little bit of your energy? I really need some of it.",
"topic": "TALK_FRIEND_FOLLOWER_RUACH_DRAIN_OWL_FORM",
"condition": {
"and": [
{ "u_has_trait": "LILIN_TRAITS" },
{ "or": [ { "u_has_trait": "TURN_INTO_OWL_TRAITS" }, { "u_has_trait": "LILIN_WAR_OWL_FORM_TRAITS" } ] }
]
}
}
Expand Down Expand Up @@ -144,6 +169,16 @@
{ "text": "(Go do something else)", "topic": "TALK_DONE" }
]
},
{
"type": "talk_topic",
"id": "TALK_FRIEND_FOLLOWER_RUACH_DRAIN_OWL_FORM",
"//": "separate dialogue to include a more explicit message about why the follower cannot be drained.",
"dynamic_line": "(you sense that you won't be able to drain this person's ruach while you are maintaining your owl transformation, so you decide to not ask your question)",
"responses": [
{ "text": "(Ask them about something else)", "topic": "TALK_FRIEND" },
{ "text": "(Go do something else)", "topic": "TALK_DONE" }
]
},
{
"type": "effect_on_condition",
"id": "EOC_LILIN_RUACH_DRAIN_DIALOGUE",
Expand Down
10 changes: 10 additions & 0 deletions data/mods/Xedra_Evolved/spells/lilin_spell_eocs.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@
{
"type": "effect_on_condition",
"id": "EOC_LILIN_RUACH_DRAIN",
"//": "Lilin cannot drain ruach while in owl or strix form.",
"condition": {
"and": [ { "not": { "npc_has_trait": "TURN_INTO_OWL_TRAITS" } }, { "not": { "npc_has_trait": "LILIN_WAR_OWL_FORM_TRAITS" } } ]
},
"effect": [ { "run_eocs": "EOC_LILIN_RUACH_DRAIN_REAL" } ],
"false_effect": [ { "npc_message": "You cannot absorb ruach in this form.", "type": "bad" } ]
},
{
"type": "effect_on_condition",
"id": "EOC_LILIN_RUACH_DRAIN_REAL",
"//": "Humans and humanlike fae give about one day's worth (240) ruach, aliens give a totally random amount, Nether creatures are a huge gamble (they could give you tons of ruach but could also absorb some from you), inhuman fae and vampires give a random amount within a few hours (20-60), animals and cyborgs give an hour's worth (5-15), insects give half of what animals give (2-7), nothing else gives any.",
"//2": "Ferals currently don't sleep, but future-proofing for when or if they might",
"condition": "u_is_character",
Expand Down
6 changes: 3 additions & 3 deletions data/mods/Xedra_Evolved/spells/lilin_spells.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"message": "",
"teachable": false,
"valid_targets": [ "hostile", "ally" ],
"flags": [ "SILENT", "NO_PROJECTILE", "NO_FAIL", "SOMATIC" ],
"flags": [ "SILENT", "NO_PROJECTILE", "NO_FAIL", "SOMATIC", "NON_MAGICAL" ],
"spell_class": "LILIN_TRAITS",
"max_level": 1,
"skill": "deduction",
Expand All @@ -29,7 +29,7 @@
"message": "",
"teachable": false,
"valid_targets": [ "hostile", "ally" ],
"flags": [ "SILENT", "NO_FAIL", "SOMATIC" ],
"flags": [ "SILENT", "NO_FAIL", "SOMATIC", "NON_MAGICAL" ],
"spell_class": "LILIN_TRAITS",
"max_level": 1,
"skill": "deduction",
Expand All @@ -50,7 +50,7 @@
"message": "",
"teachable": false,
"valid_targets": [ "hostile", "ally" ],
"flags": [ "SILENT", "NO_FAIL", "SOMATIC" ],
"flags": [ "SILENT", "NO_FAIL", "SOMATIC", "NON_MAGICAL" ],
"spell_class": "LILIN_TRAITS",
"max_level": 1,
"skill": "deduction",
Expand Down

0 comments on commit 91af05b

Please sign in to comment.