mirror of
https://github.com/evennia/evennia.git
synced 2026-03-20 14:56:30 +01:00
Finish Twitch-combat tutorial
This commit is contained in:
parent
7bb2f55434
commit
bfd261ee23
17 changed files with 1273 additions and 49 deletions
|
|
@ -122,12 +122,25 @@ class Ability(Enum):
|
|||
ALLEGIANCE_HOSTILE = "hostile"
|
||||
ALLEGIANCE_NEUTRAL = "neutral"
|
||||
ALLEGIANCE_FRIENDLY = "friendly"
|
||||
|
||||
|
||||
|
||||
ABILITY_REVERSE_MAP = {
|
||||
"str": Ability.STR,
|
||||
"dex": Ability.DEX,
|
||||
"con": Ability.CON,
|
||||
"int": Ability.INT,
|
||||
"wis": Ability.WIS,
|
||||
"cha": Ability.CHA
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
Here the `Ability` class holds basic properties of a character sheet.
|
||||
|
||||
The `ABILITY_REVERSE_MAP` is a convenient map to go the other way - if you in some command were to enter the string 'cha', we could use this mapping to directly convert your input to the correct `Ability`:
|
||||
|
||||
ability = ABILITY_REVERSE_MAP.get(your_input)
|
||||
|
||||
|
||||
## Utility module
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue