VegansDeluxe.core.Entities package

Submodules

VegansDeluxe.core.Entities.Entity module

class VegansDeluxe.core.Entities.Entity.Entity(session_id: str = '', name: str = '', hp: int = 0, max_hp: int = 0, energy: int = 0, max_energy: int = 0)[source]

Bases: object

Entity class. Main actor in the Session - Entities perform Actions.

async attach_state(state: State, event_manager: EventManager)[source]
dead: bool

Shows if entity is dead or alive.

property energies: str

Energy emoji display.

energy: int

Current energy of the entity.

get_item(item_id: str) Item[source]

Returns Item by its ID.

get_state(state: Type) T[source]
property hearts: str

HP emoji display.

property hit_chance: int

Returns hit chance of the entity’s weapon.

hp: int

Current HP of the entity.

id

ID of the entity.

inbound_accuracy_bonus

Temporary variable. Influences accuracy of other entities targeting this entity this turn.

inbound_dmg: DamageHolder

Temporary variable. Holds info about inbound damage during this turn.

is_ally(target) bool[source]

Tells if a target is in the same team as the entity.

items: list[VegansDeluxe.core.Items.Item.Item]

Entity’s list of item instances.

map_items_quantity() dict[str, int][source]

Maps entity’s items to their quantity.

max_energy: int

Max energy value of the entity.

max_hp: int

Max HP value of the entity.

name: str | LocalizedString

Displayed name of the entity.

nearby_entities: list[VegansDeluxe.core.Entities.Entity.Entity]

List of entities that are “nearby” this entity. Influences some Actions.

notifications: list[str | VegansDeluxe.core.Translator.LocalizedString.LocalizedString]

Temporary variable. List of strings that should be privately displayed to the Entity.

outbound_accuracy_bonus

Temporary variable. Influences accuracy of this entity on this turn.

outbound_dmg

Temporary variable. Holds info about outbound damage during this turn.

pre_move()[source]

Clears out temporary variables.

Todo:

Invent attributes like in minecraft or something. Having special variables for this is unwanted.

session_id

ID of the Session, that entity belongs to.

property skills: list[VegansDeluxe.core.Skills.Skill.Skill]

Returns list of entity’s Skills only.

states: list[VegansDeluxe.core.States.State.State]

Entity’s list of state and skill instances.

team

Entity’s team ID. If None - it fights against everyone.

tick_turn()[source]
type = 'entity'
weapon: Weapon

Weapon of the entity.

Module contents