woob.capabilities.rpg
¶
- class CapRPG[source]¶
Bases:
CapCollection
Capability for rpg games to list characters, objects, etc.
- iter_resources(objs, split_path)[source]¶
Iter reources.
return
iter_characters()
for ‘character’
- get_character(character_id)[source]¶
Get a character with its ID.
- Parameters:
character_id (
str
) – ID of the character- Return type:
- class:
Character
- Raises:
- class:
CharcterNotFound
- iter_skills(skill_type=None)[source]¶
Iter all available skills.
- Parameters:
skill_type (
int
) – Type of skill (default:None
)- Return type:
iter[:class: Skill]
- get_skill(skill_id)[source]¶
Get a skill from with ID.
- Parameters:
skill_id (
str
) – ID of the skill- Return type:
- class:
Skill
- Raises:
- class:
SkillNotFound
- get_character_class(class_id)[source]¶
Get details of a class according to id
- Parameters:
class_id (
str
) – ID of the skill- Return type:
- class:
CharacterClass
- Raises:
- class:
CharacterClassNotFound
- class Character(id='', url=NotLoaded, backend=None)[source]¶
Bases:
BaseRPGObject
Creature or person :var url: (
str
) url :var name: (str
) Name :var description: (str
) Description :var origin: (str
) From which game/platform the object comes from :var picture: (str
) URL of a picture :var base_stats: (dict
) Base statistics (default: {}) :var character_classes: (list
) List of CharacterClasses id (default: []) :var skills: (list
) List of Skills id (default: []) :var next_forms: (list
) List of the next forms of the character (default: []) :var locations: (list
) List of locations of the character (default: [])
- class Skill(id='', url=NotLoaded, backend=None)[source]¶
Bases:
BaseRPGObject
Skill of a character :var url: (
str
) url :var name: (str
) Name :var description: (str
) Description :var origin: (str
) From which game/platform the object comes from :var picture: (str
) URL of a picture :var type: (int
) Type of skill (default: 0) :var target: (int
) Target of the skill (default: 0) :var statistics: (dict
) Dict of statistics (default: {}) :var character_classes: (list
) List of CharacterClass ids that can use this move (default: []) :var category: (int
) Category of skill
- class CharacterClass(id='', url=NotLoaded, backend=None)[source]¶
Bases:
BaseRPGObject
CharacterClass of a character :var url: (
str
) url :var name: (str
) Name :var description: (str
) Description :var origin: (str
) From which game/platform the object comes from :var picture: (str
) URL of a picture
- class CollectableItem(id='', url=NotLoaded, backend=None)[source]¶
Bases:
BaseRPGObject
Object that you can find in the game :var url: (
str
) url :var name: (str
) Name :var description: (str
) Description :var origin: (str
) From which game/platform the object comes from :var picture: (str
) URL of a picture :var to_use: (bool
) The object can be used at anytime :var to_carry: (bool
) The object must be carried to be used (like in battle) :var category: (str
) Category of the item :var locations: (list
) List of locations of the item (default: [])