Skip to content

Commit aec9f0b

Browse files
authored
Make smartphone recovery interruptable
1 parent ef211f2 commit aec9f0b

File tree

2 files changed

+46
-4
lines changed

2 files changed

+46
-4
lines changed

data/json/effects_on_condition/computer_eocs.json

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,17 @@
8888
"type": "effect_on_condition",
8989
"id": "EOC_SMARTPHONE_RECOVERY_BASIC",
9090
"effect": [
91-
{ "u_assign_activity": "ACT_GENERIC_EOC", "duration": "15 minutes" },
91+
{
92+
"u_assign_activity": "ACT_PHONE_RECOVERY_BASIC",
93+
"//": "15 min + 5 minute for each smartphone if more than 1",
94+
"duration": { "math": [ "time('15 m') + ( (u_item_count('smart_phone_locked') - 1 ) * time('5 m') )" ] }
95+
}
96+
]
97+
},
98+
{
99+
"type": "effect_on_condition",
100+
"id": "EOC_SMARTPHONE_RECOVERY_BASIC_2",
101+
"effect": [
92102
{
93103
"u_run_inv_eocs": "all",
94104
"search_data": [ { "id": "smart_phone_locked" } ],
@@ -116,12 +126,22 @@
116126
"condition": {
117127
"and": [
118128
{ "u_has_item": "software_hacking" },
119-
{ "u_has_items": { "item": "laptop", "charges": 10 } },
129+
{ "u_has_items": { "item": "laptop", "charges": 20 } },
120130
{ "math": [ "u_skill('computer') >= 4" ] }
121131
]
122132
},
123133
"effect": [
124-
{ "u_assign_activity": "ACT_GENERIC_EOC", "duration": "60 minutes" },
134+
{
135+
"u_assign_activity": "ACT_PHONE_RECOVERY_ADVANCED",
136+
"//": "90 min + 15 minute for each smartphone if more than 1",
137+
"duration": { "math": [ "time('90 m') + ( (u_item_count('smart_phone_locked') - 1 ) * time('15 m') )" ] }
138+
}
139+
]
140+
},
141+
{
142+
"type": "effect_on_condition",
143+
"id": "EOC_SMARTPHONE_RECOVERY_ADVANCED_2",
144+
"effect": [
125145
{
126146
"u_run_inv_eocs": "all",
127147
"search_data": [ { "id": "smart_phone_locked" } ],
@@ -135,7 +155,7 @@
135155
{
136156
"u_run_inv_eocs": "random",
137157
"search_data": [ { "id": "laptop" } ],
138-
"true_eocs": [ { "id": "EOC_CONSUME_POWER", "effect": [ { "math": [ "n_val('power') -= 100" ] } ] } ]
158+
"true_eocs": [ { "id": "EOC_CONSUME_POWER", "effect": [ { "math": [ "n_val('power') -= 20" ] } ] } ]
139159
},
140160
{
141161
"if": { "math": [ "_amount_of_smartphones_recovered == 1" ] },

data/json/player_activities.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1136,6 +1136,28 @@
11361136
"auto_needs": false,
11371137
"interruptable_with_kb": false
11381138
},
1139+
{
1140+
"id": "ACT_PHONE_RECOVERY_BASIC",
1141+
"type": "activity_type",
1142+
"activity_level": "NO_EXERCISE",
1143+
"verb": "recovering",
1144+
"based_on": "time",
1145+
"interruptable": true,
1146+
"can_resume": false,
1147+
"interruptable_with_kb": true,
1148+
"completion_eoc": "EOC_SMARTPHONE_RECOVERY_BASIC_2"
1149+
},
1150+
{
1151+
"id": "ACT_PHONE_RECOVERY_ADVANCED",
1152+
"type": "activity_type",
1153+
"activity_level": "NO_EXERCISE",
1154+
"verb": "recovering",
1155+
"based_on": "time",
1156+
"interruptable": true,
1157+
"can_resume": false,
1158+
"interruptable_with_kb": true,
1159+
"completion_eoc": "EOC_SMARTPHONE_RECOVERY_ADVANCED_2"
1160+
},
11391161
{
11401162
"id": "ACT_SALINE_INFUSE",
11411163
"type": "activity_type",

0 commit comments

Comments
 (0)