Book
Inherits: Item < RefCounted
Item that teaches a random Skill when used.
Checks entity_base_class and entity_order against the player’s before learning. If successful, duplicates a random skill from skills and appends it to PlayerSkills. The book is then removed from the party inventory.
Properties
Entity.BaseClass |
|
Entity.Orders |
|
Array[Skill] |
Methods
|
learn_rand_skill(player: |
Array[ |
|
|
|
void |
use_book(player: |
Property Descriptions
Entity.BaseClass entity_base_class 🔗
Required Entity.BaseClass to use this book.
Entity.Orders entity_order 🔗
Required Entity.Orders to use this book. Matches any order if Entity.Orders.
Pool of skills this book can teach.
Method Descriptions
bool learn_rand_skill(player: Player) 🔗
Selects a random skill from skills, duplicates it, and appends to the player’s PlayerSkills. Returns false if the player doesn’t meet the class/order requirements.
Array[Control] get_item_info_blocks() 🔗
Overrides Item.get_item_info_blocks().
Adds class/order labels, skill icon buttons, and a learn button.
SmallBtn get_skill_learn_btn() 🔗
Creates the learn button using item_info_use_btn.
void use_book(player: Player) 🔗
Uses the book on player. Calls learn_rand_skill() and removes the book from the party inventory on success.