Add event handling improvements; implement timeout for event choices and new event definitions

This commit is contained in:
2025-08-24 00:01:09 +02:00
parent cdd944b9b5
commit 6d8139fd44
11 changed files with 274 additions and 5 deletions

View File

@@ -0,0 +1,37 @@
{
"id": "event_plague_descends",
"title": "A Plague Descends",
"description": "A virulent disease is sweeping through the population, sickening your followers and halting progress. Drastic measures may be required.",
"meanTimeToHappen": 300,
"trigger": {
"minFollowers": 500,
"maxCorruption": 80
},
"options": [
{
"text": "We must sacrifice the sick.",
"tooltip": "Immediately lose 20% of your Followers, but the plague is stopped.",
"effects": [
{
"type": "ModifyStat",
"targetStat": "Followers",
"op": "Multiply",
"value": 0.8
}
]
},
{
"text": "We will pray for their recovery.",
"tooltip": "Lose all passive Follower generation for 120 seconds as the plague runs its course.",
"effects": [
{
"type": "ApplyBuff",
"buffId": "plague_debuff",
"targetStat": "FollowersPerSecond",
"multiplier": 0,
"duration": 120
}
]
}
]
}

View File

@@ -0,0 +1,34 @@
{
"id": "event_prophets_rise",
"title": "A Prophet's Rise",
"description": "A charismatic leader has emerged among your followers, inspiring them to new heights of devotion and ingenuity. How shall you guide their efforts?",
"meanTimeToHappen": 200,
"trigger": {
"minFollowers": 800,
"maxCorruption": 60
},
"options": [
{
"text": "Focus their zeal on industry.",
"tooltip": "Gain a large, one-time boost to Production.",
"effects": [
{
"type": "AddResource",
"targetResource": "Production",
"value": 750
}
]
},
{
"text": "Inspire a population boom.",
"tooltip": "Gain a large, one-time boost to Followers.",
"effects": [
{
"type": "AddResource",
"targetResource": "Followers",
"value": 250
}
]
}
]
}

View File

@@ -0,0 +1,38 @@
{
"id": "event_divine_inspiration",
"title": "Divine Inspiration",
"description": "You feel a surge of pure cosmic energy. You can channel this power to inspire your followers in their efforts to either build or cleanse.",
"meanTimeToHappen": 250,
"trigger": {
"minFollowers": 1500,
"maxCorruption": 75
},
"options": [
{
"text": "Inspire frantic construction.",
"tooltip": "Greatly increases all passive Production for 2 minutes.",
"effects": [
{
"type": "ApplyBuff",
"buffId": "inspiration_production_buff",
"targetStat": "ProductionPerSecond",
"multiplier": 3,
"duration": 120
}
]
},
{
"text": "Inspire planetary healing.",
"tooltip": "Greatly reduces all passive Corruption for 2 minutes.",
"effects": [
{
"type": "ApplyBuff",
"buffId": "inspiration_cleansing_buff",
"targetStat": "CorruptionPerSecond",
"multiplier": -2,
"duration": 120
}
]
}
]
}

24
Mods/Events/doomsday.json Normal file
View File

@@ -0,0 +1,24 @@
{
"id": "event_dooms_day",
"title": "DOOMS DAY!",
"description": "A catastrophic event is unfolding, threatening to annihilate everything in its path",
"meanTimeToHappen": 2000,
"trigger": {
"minFollowers": 500,
"maxCorruption": 99
},
"options": [
{
"text": "NOT TODAY...",
"tooltip": "Increase Corruption by 200. (Instant game over)",
"effects": [
{
"type": "ModifyStat",
"targetStat": "Corruption",
"op": "Add",
"value": 200
}
]
}
]
}

View File

@@ -0,0 +1,35 @@
{
"id": "event_ecological_collapse",
"title": "Ecological Collapse",
"description": "The planet's ecosystem has reached a breaking point. Widespread famine and resource scarcity are imminent. We must choose what to prioritize for survival.",
"meanTimeToHappen": 400,
"trigger": {
"minFollowers": 3000,
"maxCorruption": 85
},
"options": [
{
"text": "Ration food for the workers.",
"tooltip": "Maintain your production, but lose a significant number of followers to famine.",
"effects": [
{
"type": "AddResource",
"targetResource": "Followers",
"value": -1000
}
]
},
{
"text": "Divert all efforts to food production.",
"tooltip": "Save your population, but suffer a permanent blow to your industrial efficiency.",
"effects": [
{
"type": "ModifyStat",
"targetStat": "ProductionPerFollower",
"op": "Multiply",
"value": 0.75
}
]
}
]
}

View File

@@ -0,0 +1,24 @@
{
"id": "event_industrial_breakthrough",
"title": "Industrial Breakthrough",
"description": "One of your followers has made a revolutionary discovery in manufacturing techniques! This will permanently increase the efficiency of all future industry.",
"meanTimeToHappen": 240,
"trigger": {
"minFollowers": 1000,
"maxCorruption": 70
},
"options": [
{
"text": "A brilliant mind!",
"tooltip": "Permanently increases base Production Per Second by 2.",
"effects": [
{
"type": "ModifyStat",
"targetStat": "ProductionPerSecond",
"op": "Add",
"value": 2
}
]
}
]
}

View File

@@ -0,0 +1,35 @@
{
"id": "event_unstable_rift",
"title": "Unstable Rift",
"description": "The planet groans under the weight of your power. A rift of pure corruption has torn open, spewing filth into the environment.",
"meanTimeToHappen": 180,
"trigger": {
"minFollowers": 2000,
"maxCorruption": 90
},
"options": [
{
"text": "Seal it with our power.",
"tooltip": "Lose a large amount of Production to seal the rift.",
"effects": [
{
"type": "AddResource",
"targetResource": "Production",
"value": -1000
}
]
},
{
"text": "This is a necessary evil.",
"tooltip": "The rift remains, permanently increasing passive Corruption gain.",
"effects": [
{
"type": "ModifyStat",
"targetStat": "CorruptionPerSecond",
"op": "Add",
"value": 0.5
}
]
}
]
}