Skip to content

Commit

Permalink
Add first skeleton of power-gaining EoCs
Browse files Browse the repository at this point in the history
  • Loading branch information
Standing-Storm committed Sep 9, 2024
1 parent 4251ed8 commit 6c54d96
Show file tree
Hide file tree
Showing 2 changed files with 173 additions and 3 deletions.
175 changes: 173 additions & 2 deletions data/mods/Xedra_Evolved/eocs/playable_changeling_advancement_eocs.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
[
{
"type": "effect_on_condition",
"id": "EOC_PLAYABLE_CHANGELING_PREVENT_TOO_MANY_DREAMS",
"eoc_type": "EVENT",
"required_event": "character_falls_asleep",
"condition": { "math": [ "u_fae_dream_count", ">", "0" ] },
"effect": [ { "math": [ "u_fae_dream_count", "--" ] } ]
},
{
"type": "effect_on_condition",
"id": "EOC_PLAYABLE_CHANGELING_COMMONER_CHOOSE_HERITAGE",
Expand Down Expand Up @@ -76,7 +84,7 @@
"condition": {
"and": [ { "u_has_trait": "UNKNOWING_CHANGELING_NOBLE" }, { "math": [ "u_vitamin('changeling_dreams')", ">=", "1" ] } ]
},
"effect": [ ]
"effect": [ { "run_eocs": "EOC_PLAYABLE_CHANGELING_NOBLE_NEW_POWERS_REAL" } ]
},
{
"type": "effect_on_condition",
Expand Down Expand Up @@ -118,7 +126,7 @@
{ "math": [ "u_vitamin('changeling_dreams')", ">=", "1" ] }
]
},
"effect": [ ]
"effect": [ { "run_eocs": "EOC_PLAYABLE_CHANGELING_SELKIE_NEW_POWERS_REAL" } ]
},
{
"type": "effect_on_condition",
Expand All @@ -133,5 +141,168 @@
]
},
"effect": [ ]
},
{
"type": "effect_on_condition",
"id": "EOC_PLAYABLE_CHANGELING_NOBLE_NEW_POWERS_REAL",
"//": "all of the below is necessary because u_roll_remainder does not respect prerequisites, and it also allows the mixing of spells and traits",
"//2": "It is intended that 0 does nothing but dreams.",
"effect": [
{
"switch": { "math": [ "rand(2)" ] },
"cases": [
{
"case": 0,
"effect": {
"if": { "math": [ "u_fae_dream_count", "==", "0" ] },
"then": [ { "u_message": "XE_CHANGELING_NOBLE", "type": "neutral", "snippet": true } ],
"else": [ { "math": [ "u_fae_dream_count", "--" ] } ]
}
},
{
"case": 1,
"effect": {
"if": {
"and": [
{ "u_has_trait": "PARACLESIAN_STR_DEX_1" },
{ "u_has_trait": "PARACLESIAN_STR_DEX_2" },
{ "u_has_trait": "PARACLESIAN_INT_PER_1" },
{ "u_has_trait": "PARACLESIAN_INT_PER_2" }
]
},
"then": { "run_eocs": "EOC_PLAYABLE_CHANGELING_NOBLE_NEW_POWERS_REAL" },
"else": [
{ "run_eocs": "EOC_PLAYABLE_CHANGELING_GAIN_ATTRIBUTE_TRAITS" },
{ "u_message": "XE_CHANGELING_NOBLE", "type": "neutral", "snippet": true }
]
}
},
{
"case": 2,
"effect": {
"if": { "u_has_trait": "BEAUTIFUL3" },
"then": { "run_eocs": "EOC_PLAYABLE_CHANGELING_NOBLE_NEW_POWERS_REAL" },
"else": [
{ "run_eocs": "EOC_PLAYABLE_CHANGELING_GAIN_BEAUTY_TRAITS" },
{ "u_message": "XE_CHANGELING_NOBLE", "type": "neutral", "snippet": true }
]
}
}
]
}
]
},
{
"type": "effect_on_condition",
"id": "EOC_PLAYABLE_CHANGELING_SELKIE_NEW_POWERS_REAL",
"effect": [
{
"switch": { "math": [ "rand(2)" ] },
"cases": [
{
"case": 0,
"effect": {
"if": { "math": [ "u_fae_dream_count", "==", "0" ] },
"then": [
{ "u_message": "XE_CHANGELING_COMMONER_SELKIE", "type": "neutral", "snippet": true },
{ "math": [ "u_fae_dream_count", "+=", "rand(8) + 2" ] }
]
}
},
{
"case": 1,
"effect": {
"if": {
"and": [
{ "u_has_trait": "PARACLESIAN_STR_DEX_1" },
{ "u_has_trait": "PARACLESIAN_STR_DEX_2" },
{ "u_has_trait": "PARACLESIAN_INT_PER_1" },
{ "u_has_trait": "PARACLESIAN_INT_PER_2" }
]
},
"then": { "run_eocs": "EOC_PLAYABLE_CHANGELING_NOBLE_NEW_POWERS_REAL" },
"else": [
{ "run_eocs": "EOC_PLAYABLE_CHANGELING_GAIN_ATTRIBUTE_TRAITS" },
{ "u_message": "XE_CHANGELING_COMMONER_SELKIE", "type": "neutral", "snippet": true }
]
}
},
{
"case": 2,
"effect": {
"if": { "u_has_trait": "BEAUTIFUL3" },
"then": { "run_eocs": "EOC_PLAYABLE_CHANGELING_SELKIE_NEW_POWERS_REAL" },
"else": [
{ "run_eocs": "EOC_PLAYABLE_CHANGELING_GAIN_BEAUTY_TRAITS" },
{ "u_message": "XE_CHANGELING_COMMONER_SELKIE", "type": "neutral", "snippet": true }
]
}
}
]
}
]
},
{
"type": "effect_on_condition",
"id": "EOC_PLAYABLE_CHANGELING_GAIN_BEAUTY_TRAITS",
"effect": [
{
"if": { "u_has_trait": "BEAUTIFUL2" },
"then": [ { "u_add_trait": "BEAUTIFUL3" }, { "u_lose_trait": "BEAUTIFUL2" } ],
"else": {
"if": { "u_has_trait": "BEAUTIFUL" },
"then": [ { "u_add_trait": "BEAUTIFUL2" }, { "u_lose_trait": "BEAUTIFUL" } ],
"else": {
"if": { "u_has_trait": "PRETTY" },
"then": [ { "u_add_trait": "BEAUTIFUL" }, { "u_lose_trait": "PRETTY" } ],
"else": {
"if": { "not": { "u_has_any_trait": [ "PRETTY", "BEAUTIFUL", "BEAUTIFUL2", "BEAUTIFUL3" ] } },
"then": [ { "u_add_trait": "PRETTY" } ]
}
}
}
}
]
},
{
"type": "effect_on_condition",
"id": "EOC_PLAYABLE_CHANGELING_GAIN_ATTRIBUTE_TRAITS",
"effect": [
{
"switch": { "math": [ "rand(1)" ] },
"cases": [
{
"case": 0,
"effect": {
"if": { "u_has_trait": "PARACLESIAN_STR_DEX_2" },
"then": { "run_eocs": "EOC_PLAYABLE_CHANGELING_GAIN_ATTRIBUTE_TRAITS" },
"else": {
"if": { "u_has_trait": "PARACLESIAN_STR_DEX_1" },
"then": [ { "u_add_trait": "PARACLESIAN_STR_DEX_2" }, { "u_lose_trait": "PARACLESIAN_STR_DEX_1" } ],
"else": {
"if": { "not": { "u_has_any_trait": [ "PARACLESIAN_STR_DEX_1", "PARACLESIAN_STR_DEX_2" ] } },
"then": [ { "u_add_trait": "PARACLESIAN_STR_DEX_1" } ]
}
}
}
},
{
"case": 1,
"effect": {
"if": { "u_has_trait": "PARACLESIAN_INT_PER_2" },
"then": { "run_eocs": "EOC_PLAYABLE_CHANGELING_GAIN_ATTRIBUTE_TRAITS" },
"else": {
"if": { "u_has_trait": "PARACLESIAN_INT_PER_1" },
"then": [ { "u_add_trait": "PARACLESIAN_INT_PER_2" }, { "u_lose_trait": "PARACLESIAN_INT_PER_1" } ],
"else": {
"if": { "not": { "u_has_any_trait": [ "PARACLESIAN_INT_PER_1", "PARACLESIAN_INT_PER_2" ] } },
"then": [ { "u_add_trait": "PARACLESIAN_INT_PER_1" } ]
}
}
}
}
]
}
]
}
]
1 change: 0 additions & 1 deletion data/mods/Xedra_Evolved/mutations/playable_changeling.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@
"valid": false,
"starting_trait": false,
"purifiable": false,
"profession": true,
"points": 0,
"allowed_category": [ "FAIR_FOLK_NOBLE" ],
"types": [ "HERITAGE" ],
Expand Down

0 comments on commit 6c54d96

Please sign in to comment.