Skip to content

Commit 2f925af

Browse files
committed
Minor doc cleanup
1 parent df6904f commit 2f925af

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

doc/JSON/EFFECT_ON_CONDITION.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2235,7 +2235,7 @@ In three hours, you will be given five AR-15
22352235
{
22362236
"type": "effect_on_condition",
22372237
"id": "EOC_until_nested",
2238-
"effect": [ { "u_spawn_item": "knife_combat" }, { "math": [ "my_variable", "++" ] } ]
2238+
"effect": [ { "u_spawn_item": "knife_combat" }, { "math": [ "my_variable++" ] } ]
22392239
}
22402240
```
22412241

@@ -2400,7 +2400,7 @@ Resets all of your vitamins.
24002400
"foreach": "ids",
24012401
"var": { "context_val": "id" },
24022402
"target": "vitamin",
2403-
"effect": [ { "math": [ "u_vitamin(_id)", "=", "0" ] } ]
2403+
"effect": [ { "math": [ "u_vitamin(_id) = 0" ] } ]
24042404
}
24052405
```
24062406

@@ -3377,7 +3377,7 @@ For example:
33773377
```
33783378
could be moved to:
33793379
```json
3380-
[ "u_number_artisans_gunsmith_ammo_amount", "=", "800" ]
3380+
[ "u_number_artisans_gunsmith_ammo_amount = 800" ]
33813381
```
33823382

33833383
Setting and checking monster vars via `math`. The first spell targets a monster and forces it to run the effect on condition to apply a custom var, which the second spell checks to deal additional effects:

doc/JSON/JSON_INFO.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -893,7 +893,7 @@ Each turn, the player's addictions are processed using either the given `effect_
893893
"effect": [
894894
{ "u_add_morale": "morale_craving_marloss", "bonus": -5, "max_bonus": -30 },
895895
{ "u_message": "You daydream about luscious pink berries as big as your fist.", "type": "info" },
896-
{ "if": { "math": [ "u_val('focus') > 40" ] }, "then": { "math": [ "u_val('focus')", "--" ] } }
896+
{ "if": { "math": [ "u_val('focus') > 40" ] }, "then": { "math": [ "u_val('focus')--" ] } }
897897
]
898898
},
899899
```

doc/JSON/NPCs.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1350,7 +1350,7 @@ _some functions support array arguments or kwargs, denoted with square brackets
13501350
| encumbrance(`s`/`v`) ||| u, n | Return the characters total encumbrance of a body part.<br/>Argument is bodypart ID. <br/> For items, returns typical encumbrance of the item. <br/><br/>Example:<br/>`"condition": { "math": [ "u_encumbrance('torso') > 0"] }`|
13511351
| health(`d`/`v`) ||| u, n | Return character current health .<br/><br/>Example:<br/>`{ "math": [ "u_health() -= 1" ] }`|
13521352
| energy(`s`/`v`) ||| u, n | Return a numeric value (in millijoules) for an energy string (see [Units](JSON_INFO.md#units)).<br/><br/>Example:<br/>`{ "math": [ "u_val('power') -= energy('25 kJ')" ] }`|
1353-
| faction_like(`s`/`v`)<br/>faction_respect(`s`/`v`)<br/>faction_trust(`s`/`v`)<br/>faction_food_supply(`s`/`v`)<br/>faction_wealth(`s`/`v`)<br/>faction_power(`s`/`v`)<br/>faction_size(`s`/`v`) ||| N/A<br/>(global) | Return the like/respect/trust/fac_food_supply/wealth/power/size value a faction has for the avatar.<br/>Argument is faction ID.<br/>`faction_food_supply` has an optional second argument(kwarg) for getting/setting vitamins.<br/><br/>Example:<br/>`"condition": { "math": [ "faction_like('hells_raiders') < -60" ] }`<br/><br/>`{ "math": [ "calcium_amount", "=", "faction_food_supply('your_followers', 'vitamin':'calcium')" ] },`<br/>`{ "u_message": "Calcium stored is <global_val:calcium_amount>", "type": "good" },`|
1353+
| faction_like(`s`/`v`)<br/>faction_respect(`s`/`v`)<br/>faction_trust(`s`/`v`)<br/>faction_food_supply(`s`/`v`)<br/>faction_wealth(`s`/`v`)<br/>faction_power(`s`/`v`)<br/>faction_size(`s`/`v`) ||| N/A<br/>(global) | Return the like/respect/trust/fac_food_supply/wealth/power/size value a faction has for the avatar.<br/>Argument is faction ID.<br/>`faction_food_supply` has an optional second argument(kwarg) for getting/setting vitamins.<br/><br/>Example:<br/>`"condition": { "math": [ "faction_like('hells_raiders') < -60" ] }`<br/><br/>`{ "math": [ "calcium_amount = faction_food_supply('your_followers', 'vitamin':'calcium')" ] },`<br/>`{ "u_message": "Calcium stored is <global_val:calcium_amount>", "type": "good" },`|
13541354
| field_strength(`s`/`v`) ||| u, n, global | Return the strength of a field on the tile.<br/>Argument is field ID.<br/><br/>Optional kwargs:<br/> `location`: `v` - center search on this location<br/><br/>The `location` kwarg is mandatory in the global scope.<br/><br/>Examples:<br/>`"condition": { "math": [ "u_field_strength('fd_blood') > 5" ] }`<br/><br/>`"condition": { "math": [ "field_strength('fd_blood_insect', 'location': u_search_loc) > 5" ] }`|
13551355
| has_flag(`s`/`v`) ||| u, n | Check whether the actor has a flag. Meant to be used as condition for ternaries. Argument is trait ID.<br/><br/> Example:<br/>`"condition": { "math": [ "u_blorg = u_has_flag('MUTATION_TRESHOLD') ? 100 : 15" ] }`|
13561356
| has_trait(`s`/`v`) ||| u, n | Check whether the actor has a trait. Meant to be used as condition for ternaries. Argument is trait ID.<br/><br/> Example:<br/>`"condition": { "math": [ "u_blorg = u_has_trait('FEEBLE') ? 100 : 15" ] }`|
@@ -1365,7 +1365,7 @@ _some functions support array arguments or kwargs, denoted with square brackets
13651365
| item_count(`s`/`v`) ||| u, n | Return the number of a given item in the character's inventory.<br/>Argument is item ID.<br/><br/>Example:<br/>`"condition": { "math": [ "u_item_count('backpack') >= 1"] }`|
13661366
| item_rad(`s`/`v`) ||| u, n | Return irradiation of worn items with the specified flag.<br/>Argument is flag ID.<br/><br/>Optional kwargs:<br/>`aggregate`: `s`/`v` - Specify the aggregation function to run, in case there's more than one item. Valid values are `min`/`max`/`sum`/`average`/`first`/`last`. Defaults to `min` if not specified. <br/><br/>Example:<br/>`"condition": { "math": [ "u_item_rad('RAD_DETECT') >= 1"] }`|
13671367
| melee_damage(`s`/`v`) ||| u, n | Return the item's melee damage. Argument is damage type. For special value `ALL`, return sum for all damage types. <br/><br/>Actor must be an item.<br/><br/>Example:<br/>`{ "math": [ "mymelee = n_melee_damage('ALL')" ] }`<br/>See `EOC_test_weapon_damage` for a complete example|
1368-
| monsters_nearby(`s`/`v`...) ||| u, n, global | Return the number of nearby monsters. Takes any number of `s`tring or `v`ariable positional parameters as monster IDs. <br/><br/>Optional kwargs:<br/>`radius`: `d`/`v` - limit to radius (rl_dist)<br/>`location`: `v` - center search on this location<br/>`attitude`: `s`/`v` - attitude filter. Must be one of `hostile`, `friendly`, `both`. Assumes `hostile` if not specified<br/><br/>The `location` kwarg is mandatory in the global scope.<br/><br/>Examples:<br/>`"condition": { "math": [ "u_monsters_nearby('radius': u_search_radius * 3) > 5" ] }`<br/><br/>`"condition": { "math": [ "monsters_nearby('mon_void_maw', 'mon_void_limb', mon_fotm_var, 'radius': u_search_radius * 3, 'location': u_search_loc)", ">", "5" ] }`|
1368+
| monsters_nearby(`s`/`v`...) ||| u, n, global | Return the number of nearby monsters. Takes any number of `s`tring or `v`ariable positional parameters as monster IDs. <br/><br/>Optional kwargs:<br/>`radius`: `d`/`v` - limit to radius (rl_dist)<br/>`location`: `v` - center search on this location<br/>`attitude`: `s`/`v` - attitude filter. Must be one of `hostile`, `friendly`, `both`. Assumes `hostile` if not specified<br/><br/>The `location` kwarg is mandatory in the global scope.<br/><br/>Examples:<br/>`"condition": { "math": [ "u_monsters_nearby('radius': u_search_radius * 3) > 5" ] }`<br/><br/>`"condition": { "math": [ "monsters_nearby('mon_void_maw', 'mon_void_limb', 'mon_fotm_var', 'radius': u_search_radius * 3, 'location': u_search_loc)", ">", "5" ] }`|
13691369
| mod_load_order(`s`/`v`) ||| N/A<br/>(global) | Returns the load order of specified mod. Argument is mod id. Returns -1 is the mod is not loaded. |
13701370
| mon_species_nearby(`s`/`v`...) ||| u, n, global | Same as `monsters_nearby()`, but arguments are monster species |
13711371
| mon_groups_nearby(`s`/`v`...) ||| u, n, global | Same as `monsters_nearby()`, but arguments are monster groups |

doc/JSON/OVERMAP.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ an exhaustive example...
379379
"eoc": {
380380
"id": "EOC_REFUGEE_CENTER_GENERATE",
381381
"condition": { "math": [ "refugee_centers < 1" ] },
382-
"effect": [ { "math": [ "refugee_centers", "++" ] } ]
382+
"effect": [ { "math": [ "refugee_centers++" ] } ]
383383
},
384384
"entry_eoc": "EOC_ENTERED_SECRET_FIELD",
385385
"exity_eoc": "EOC_LEFT_SECRET_FIELD"

0 commit comments

Comments
 (0)