Characters cont.#

Here are properties and methods for Character objects that will help you as you code. The code blocks provided are examples. As long as these are called on a Character object, these will work.

Properties#

ObjectType#

Return the ObjectType of the Character. The ObjectType enum is used to better identify what an object is. Refer to Enums for the full lists of enums provided.

object_type: ObjectType = active_character.object_type

Name#

Returns the name of the Character object.

character_name: str = active_character.name

ClassType#

Returns the ClassType enum of the character. Will either be ClassType.LEADER or ClassType.GENERIC.

class_type: ClassType = active_character.class_type

Current Health#

Returns an int showing how much health the character currently has.

current_health: int = active_character.current_health

Max Health#

Returns an int showing the max health a character can have.

max_health: int = active_character.max_health

Stats#

The following will return a Character’s Attack, Defense, and Speed Stat object respectively.

attack_stat: AttackStat = active_character.attack
defense_stat: DefenseStat = active_character.defense
speed_stat: SpeedStat = active_character.speed

Refer to Stats for more info.

Special Points#

Returns an int representing the amount of Special Points a Character has. Remember that this amount cannot exceed 5.

sp: int = active_character.special_points

Moveset#

Returns a Moveset object that contains all a Character’s Moves (i.e., Normal Move, Special 1, and Special 2).

moveset: Moveset = active_character.moveset

Position#

Returns a Vector object that represent a Character’s coordinates. Every Vector object is stored in the (x, y) format. Refer to The Gameboard for the methods the Vector class has.

position: Vector = active_character.position

CountryType#

Return a CountryType enum representing which country the Character is affiliated with.

country: CountryType = active_character.country_type

Is Dead#

Returns a boolean value. The value will be True if the Character’s current_health is 0.

is_dead: bool = active_character.is_dead

Methods#

Get NM#

A method that will return a Character’s Normal Move from their Moveset.

nm: Move = active_character.get_nm()

Get S1#

A method that will return a Character’s Special 1 from their Moveset.

s1: Move = active_character.get_s1()

Get S2#

A method that will return a Character’s Special 2 from their Moveset.

s2: Move = active_character.get_s2()