Functions for working with characters.
local Chara = ELONA.require("core.Chara")
| is_alive (chara) | Checks if a character is alive. |
| is_player (chara) | Checks if a character is the player. |
| is_ally (chara) | Checks if a character is a member of the player's party. |
| count () | Returns the number of other characters in the current map. |
| get () | Returns the character at the given index. |
| player () | Returns a reference to the player. |
| create (position) | Attempts to create a randomly generated character at a given position. |
| create (position, id) | Attempts to create a character at a given position. |
| kill_count (id) | Obtains the number of times the character type has been killed. |
| find (id[, location]) | Attempts to find a character with the given prototype ID. |
| can_recruit_allies () | Returns true if the player can recruit more allies, taking Charisma into account. |
| remove_from_party (ally) | Removes a character from the player's party, if they are an ally. |
| all () | Returns iterable object containing all characters. |
| non_allies () | Returns iterable object containing characters except for you and your allies. |
Checks if a character is alive.
Parameters:
Checks if a character is the player.
Parameters:
Checks if a character is a member of the player's party.
Parameters:
Returns the number of other characters in the current map.
Returns the character at the given index.
Returns:
Returns a reference to the player.
They might not be alive.
Returns:Attempts to create a randomly generated character at a given position.
Returns the character if creation succeeded, nil otherwise.
Parameters:Attempts to create a character at a given position.
Returns the character if creation succeeded, nil otherwise.
Parameters:Obtains the number of times the character type has been killed.
Parameters:
Attempts to find a character with the given prototype ID.
Parameters:
Returns true if the player can recruit more allies, taking Charisma into account.
Returns:
Removes a character from the player's party, if they are an ally.
Parameters: