Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arithmetic is dead. And compare_int. And compare_num. Kinda. Long live the math! #70936

Merged
merged 27 commits into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
27f24b8
more math
GuardianDll Jan 10, 2024
3a7c1d7
more math
GuardianDll Jan 10, 2024
3639415
Merge branch 'mathmathmath' of https://github.com/GuardianDll/Catacly…
GuardianDll Jan 10, 2024
0df6d06
a bit more
GuardianDll Jan 11, 2024
af80ac7
compare_int to be gone
GuardianDll Jan 12, 2024
db82205
compare_int to be gone
GuardianDll Jan 12, 2024
19630fc
and more
GuardianDll Jan 14, 2024
04dd66d
compare_num be gone
GuardianDll Jan 14, 2024
3e09029
arithmetic be gone
GuardianDll Jan 14, 2024
45c9d8e
Merge branch 'master' into mathmathmath
GuardianDll Jan 14, 2024
00a69af
lint
GuardianDll Jan 14, 2024
fe37336
fix stuff
GuardianDll Jan 14, 2024
70b3f85
fix stuff
GuardianDll Jan 14, 2024
3404fea
Merge branch 'mathmathmath' of https://github.com/GuardianDll/Catacly…
GuardianDll Jan 14, 2024
f793333
revert u_val('power')
GuardianDll Jan 15, 2024
d556797
jmathify and fix addictions
GuardianDll Jan 15, 2024
5c24df6
Apply suggestions from code review
GuardianDll Jan 15, 2024
11f6cef
migrate u_know_jaryi, mention talked_to_hub and know_jaryi should be …
GuardianDll Jan 15, 2024
4dee051
Merge branch 'master' into mathmathmath
GuardianDll Jan 15, 2024
e6b9737
revert item_rad RAD_DETECT
GuardianDll Jan 15, 2024
9149eea
replace the only place with spell level school; add to another place …
GuardianDll Jan 15, 2024
16da755
"=" -> "=="
GuardianDll Jan 15, 2024
315cb1b
Update data/json/npcs/TALK_TEST.json
GuardianDll Jan 16, 2024
e78e80c
Merge branch 'master' into mathmathmath
GuardianDll Jan 16, 2024
e0d4306
lint
GuardianDll Jan 16, 2024
46d98c3
replace all addiction formulas to use same jmath
GuardianDll Jan 16, 2024
5b3b284
Merge branch 'CleverRaven:master' into mathmathmath
GuardianDll Jan 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix stuff
  • Loading branch information
GuardianDll committed Jan 14, 2024
commit 70b3f85ce0b467a11b78646c54eb664a0846d27d
2 changes: 1 addition & 1 deletion data/json/items/tool/science.json
Original file line number Diff line number Diff line change
Expand Up @@ -1397,7 +1397,7 @@
"condition": { "npc_has_var": "function", "type": "mbt", "context": "f", "value": "focus" },
"effect": [
{ "u_message": "You feel incredibly focused!" },
{ "math": [ "u_val('focus')", "+=", "min( u_val('focus') + 30, 130" ] }
{ "math": [ "u_val('focus')", "+=", "min( u_val('focus') + 30, 130)" ] }
]
},
{
Expand Down
8 changes: 4 additions & 4 deletions data/json/npcs/TALK_TEST.json
Original file line number Diff line number Diff line change
Expand Up @@ -917,21 +917,21 @@
"id": "TALK_TEST_COMPARE_INT_OP",
"dynamic_line": "This is a test conversation that shouldn't appear in the game.",
"responses": [
{ "text": "Two = five.", "topic": "TALK_DONE", "condition": { "math": [ "2", "=", "5" ] } },
{ "text": "Two = five.", "topic": "TALK_DONE", "condition": { "math": [ "2", "==", "5" ] } },
{ "text": "Two == five.", "topic": "TALK_DONE", "condition": { "math": [ "2", "==", "5" ] } },
{ "text": "Two != five.", "topic": "TALK_DONE", "condition": { "math": [ "2", "!=", "5" ] } },
{ "text": "Two <= five.", "topic": "TALK_DONE", "condition": { "math": [ "2", "<=", "5" ] } },
{ "text": "Two >= five.", "topic": "TALK_DONE", "condition": { "math": [ "2", ">=", "5" ] } },
{ "text": "Two < five.", "topic": "TALK_DONE", "condition": { "math": [ "2", "<", "5" ] } },
{ "text": "Two > five.", "topic": "TALK_DONE", "condition": { "math": [ "2", ">", "5" ] } },
{ "text": "Five = five.", "topic": "TALK_DONE", "condition": { "math": [ "5", "=", "5" ] } },
{ "text": "Five = five.", "topic": "TALK_DONE", "condition": { "math": [ "5", "==", "5" ] } },
{ "text": "Five == five.", "topic": "TALK_DONE", "condition": { "math": [ "5", "==", "5" ] } },
{ "text": "Five != five.", "topic": "TALK_DONE", "condition": { "math": [ "5", "!=", "5" ] } },
{ "text": "Five <= five.", "topic": "TALK_DONE", "condition": { "math": [ "5", "<=", "5" ] } },
{ "text": "Five >= five.", "topic": "TALK_DONE", "condition": { "math": [ "5", ">=", "5" ] } },
{ "text": "Five < five.", "topic": "TALK_DONE", "condition": { "math": [ "5", "<", "5" ] } },
{ "text": "Five > five.", "topic": "TALK_DONE", "condition": { "math": [ "5", ">", "5" ] } },
{ "text": "Five = two.", "topic": "TALK_DONE", "condition": { "math": [ "5", "=", "2" ] } },
{ "text": "Five = two.", "topic": "TALK_DONE", "condition": { "math": [ "5", "==", "2" ] } },
{ "text": "Five == two.", "topic": "TALK_DONE", "condition": { "math": [ "5", "==", "2" ] } },
{ "text": "Five != two.", "topic": "TALK_DONE", "condition": { "math": [ "5", "!=", "2" ] } },
{ "text": "Five <= two.", "topic": "TALK_DONE", "condition": { "math": [ "5", "<=", "2" ] } },
Expand Down Expand Up @@ -1175,7 +1175,7 @@
"text": "Test Proficiency learning is 50% out of 100%.",
"//": "previously it used the number format '{ u_val: proficiency, proficiency_id: prof_test, format: 10 }', but it is deprecated",
"topic": "TALK_DONE",
"condition": { "math": [ "u_proficiency('prof_test', 'format': 'percent')", "=", "50" ] }
"condition": { "math": [ "u_proficiency('prof_test', 'format': 'percent')", "==", "50" ] }
},
{
"text": "Test Proficiency learning done is 12 hours total.",
Expand Down
2 changes: 1 addition & 1 deletion data/json/npcs/exodii/exodii_merchant_talk.json
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@
"//~": "For a card an' a wink, eh? --> That was a good exchange",
"speaker_effect": {
"condition": { "and": [ { "math": [ "u_val('sold')", ">=", "20" ] }, { "not": { "u_has_faction_trust": 21 } } ] },
"effect": [ { "math": [ "u_val('sold')", ">=", "20" ] }, { "u_add_faction_trust": 1 } ]
"effect": [ { "math": [ "u_val('sold')", "-=", "20" ] }, { "u_add_faction_trust": 1 } ]
},
"responses": [
{ "text": "Why are your lockers full of medieval gear?", "topic": "TALK_EXODII_MERCHANT_Stock_Medieval" },
Expand Down
2 changes: 1 addition & 1 deletion data/json/npcs/scrap_trader/scrap_trader.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
{
"group": "no_sell",
"rigid": true,
"condition": { "math": [ "n_val('NEVER')", "==", "1" ] },
"condition": { "math": [ "n_NEVER", "==", "1" ] },
"refusal": "<npcname> will never sell this"
}
],
Expand Down
8 changes: 4 additions & 4 deletions data/mods/TEST_DATA/widgets.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
"condition": {
"and": [
{ "u_has_effect": "bleed", "intensity": 1 },
{ "math": [ "u_effect_intensity'bleed', 'bodypart': _widget", "<", "11" ] }
{ "math": [ "u_effect_intensity('bleed', 'bodypart': '_widget')", "<", "11" ] }
]
}
},
Expand All @@ -132,7 +132,7 @@
"condition": {
"and": [
{ "u_has_effect": "bleed", "intensity": 11 },
{ "math": [ "u_effect_intensity'bleed', 'bodypart': _widget", "<", "21" ] }
{ "math": [ "u_effect_intensity('bleed', 'bodypart': '_widget')", "<", "21" ] }
]
}
},
Expand Down Expand Up @@ -1358,7 +1358,7 @@
"condition": {
"and": [
{ "u_has_effect": "bleed", "intensity": 1 },
{ "math": [ "u_effect_intensity'bleed', 'bodypart': _widget", "<", "11" ] }
{ "math": [ "u_effect_intensity('bleed', 'bodypart': '_widget')", "<", "11" ] }
]
}
},
Expand All @@ -1370,7 +1370,7 @@
"condition": {
"and": [
{ "u_has_effect": "bleed", "intensity": 11 },
{ "math": [ "u_effect_intensity'bleed', 'bodypart': _widget", "<", "21" ] }
{ "math": [ "u_effect_intensity('bleed', 'bodypart': '_widget')", "<", "21" ] }
]
}
},
Expand Down