Fixed documentation

This commit is contained in:
Tegiminis 2022-02-12 13:28:45 -08:00
parent b355008295
commit 4dcba2f234

View file

@ -173,9 +173,10 @@ if trait1 > trait2:
`value = (base + mod) * mult`
The static trait has a `base` value and an optional `mod`-ifier and 'mult'-iplier. A typical use
of a static trait would be a Strength stat or Skill value. That is, something
that varies slowly or not at all, and which may be modified in-place.
The static trait has a `base` value and an optional `mod`-ifier and 'mult'-iplier.
The modifier defaults to 0, and the multiplier to 1.0, for no change in value.
A typical use of a static trait would be a Strength stat or Skill value. That is,
somethingthat varies slowly or not at all, and which may be modified in-place.
```python
> obj.traits.add("str", "Strength", trait_type="static", base=10, mod=2)
@ -200,15 +201,16 @@ that varies slowly or not at all, and which may be modified in-place.
min/unset base base+mod max/unset
|--------------|--------|---------X--------X------------|
current value
= current
+ mod
= (current
+ mod)
* mult
A counter describes a value that can move from a base. The `.current` property
is the thing usually modified. It starts at the `.base`. One can also add a
modifier, which is added to both the base and to current. '.value' is then formed
by multiplying by the multiplier. The min/max of the range are optional, a boundary
set to None will remove it. A suggested use for a Counter Trait would be to track skill values.
by multiplying by the multiplier, which defaults to 1.0 for no change. The min/max
of the range are optional, a boundary set to None will remove it. A suggested use
for a Counter Trait would be to track skill values.
```python
> obj.traits.add("hunting", "Hunting Skill", trait_type="counter",
@ -1210,8 +1212,8 @@ class CounterTrait(Trait):
min/unset base base+mod max/unset
|--------------|--------|---------X--------X------------|
current value
= current
+ mod
= (current
+ mod)
* mult
- value = (current + mod) * mult, starts at base + mod