OrodaelTurrim.Structure package

Submodules

OrodaelTurrim.Structure.Enums module

OrodaelTurrim.Structure.Exceptions module

exception OrodaelTurrim.Structure.Exceptions.BadActionBaseParameters[source]

Bases: OrodaelTurrim.Structure.Exceptions.OrodaelTurrimException

ActionBase method has bad parameters

exception OrodaelTurrim.Structure.Exceptions.BadFactDataValue[source]

Bases: OrodaelTurrim.Structure.Exceptions.OrodaelTurrimException

Fact contain bad value type

exception OrodaelTurrim.Structure.Exceptions.IllegalActionException[source]

Bases: OrodaelTurrim.Structure.Exceptions.OrodaelTurrimException

You try to use illegal action on the game engine

exception OrodaelTurrim.Structure.Exceptions.IllegalArgumentException[source]

Bases: OrodaelTurrim.Structure.Exceptions.OrodaelTurrimException

Illegal argument passed to object initialization

exception OrodaelTurrim.Structure.Exceptions.IllegalConfigState[source]

Bases: OrodaelTurrim.Structure.Exceptions.OrodaelTurrimException

Something missing in game config file

exception OrodaelTurrim.Structure.Exceptions.IllegalHistoryOperation[source]

Bases: OrodaelTurrim.Structure.Exceptions.OrodaelTurrimException

Trying to do illegal operation when in Browsing mode

exception OrodaelTurrim.Structure.Exceptions.IllegalLogMessage[source]

Bases: OrodaelTurrim.Structure.Exceptions.OrodaelTurrimException

You are trying to log message which is not correct type

exception OrodaelTurrim.Structure.Exceptions.IllegalRulesFormat[source]

Bases: OrodaelTurrim.Structure.Exceptions.OrodaelTurrimException

Problem with parsing rules file

exception OrodaelTurrim.Structure.Exceptions.OrodaelTurrimException[source]

Bases: Exception

Base framework exception. All framework exception inherit from this exception

OrodaelTurrim.Structure.Map module

OrodaelTurrim.Structure.Position module

OrodaelTurrim.Structure.Resources module

class OrodaelTurrim.Structure.Resources.PlayerResources(resources: int, income: int, income_increase=0)[source]

Bases: object

Structure that hold information about player resources

add_resources(amount: int) → None[source]

Add amount of resources

income
income_increase
increase_income(value: int) → None[source]
remove_resources(amount: int) → None[source]

Remove amount of resources

resources

OrodaelTurrim.Structure.Terrain module

class OrodaelTurrim.Structure.Terrain.Field[source]

Bases: OrodaelTurrim.Structure.Terrain.Terrain

Class representing field on map. This to horizon stretching plane of yellow crop provides neither bonuses nor penalties. Just an opportunity to ruin another harvest.

char() → str[source]

Return character that represent this terrain type for string map definition

get_move_cost(target: TerrainType) → int[source]

Get move cost of the terrain based current terrain type and target terrain type. Move cost have value based on target and source terrain type

Parameters:target – target terrain type
Returns:action cost
get_remaining_sigh(current_sight: int) → int[source]

Get remaining sight after current terrain type

Parameters:current_sight – current sight number
Returns:remaining sight
info_text()[source]

Return text information of the terrain

terrain_type
class OrodaelTurrim.Structure.Terrain.Forest[source]

Bases: OrodaelTurrim.Structure.Terrain.Terrain

Class representing ever green forest. The shadows of the trees provide shelter from enemy arrows and the bushes make excellent place for an ambush. However, entering the forest might prove bit exhausting.

affect_defense(original_value: float)[source]
char() → str[source]

Return character that represent this terrain type for string map definition

get_move_cost(target: OrodaelTurrim.Structure.Terrain.Terrain) → int[source]

Get move cost of the terrain based current terrain type and target terrain type. Move cost have value based on target and source terrain type

Parameters:target – target terrain type
Returns:action cost
get_remaining_sigh(current_sight: int) → int[source]

Get remaining sight after current terrain type

Parameters:current_sight – current sight number
Returns:remaining sight
info_text()[source]

Return text information of the terrain

terrain_type
class OrodaelTurrim.Structure.Terrain.Hill[source]

Bases: OrodaelTurrim.Structure.Terrain.Terrain

Class representing little hill. Someone kept on throwing piles of dirt here and now look, there is a hill.

affect_attack(original_value: float)[source]
affect_defense(original_value: float)[source]
affect_sight(original_value: int) → int[source]
char() → str[source]

Return character that represent this terrain type for string map definition

get_move_cost(target: TerrainType) → int[source]

Get move cost of the terrain based current terrain type and target terrain type. Move cost have value based on target and source terrain type

Parameters:target – target terrain type
Returns:action cost
get_remaining_sigh(current_sight: int) → int[source]

Get remaining sight after current terrain type

Parameters:current_sight – current sight number
Returns:remaining sight
info_text()[source]

Return text information of the terrain

terrain_type
class OrodaelTurrim.Structure.Terrain.Mountain[source]

Bases: OrodaelTurrim.Structure.Terrain.Terrain

Class representing pointy rock giants. Everyone who tried climbing those knows, it is not a piece of cake. On the other hand, they provide great place to stay safe, since nobody wants to climb them either.

affect_attack(original_value: float)[source]
affect_defense(original_value: float)[source]
affect_sight(original_value: int)[source]
char() → str[source]

Return character that represent this terrain type for string map definition

compute_damage(hit_points: float)[source]

Computes, how much damage will this terrain inflict on start of each turn

Parameters:hit_points – Previous value of hit points of game object
Returns:Amount of damage to be inflicted to game object
get_move_cost(target: TerrainType) → int[source]

Get move cost of the terrain based current terrain type and target terrain type. Move cost have value based on target and source terrain type

Parameters:target – target terrain type
Returns:action cost
get_remaining_sigh(current_sight: int) → int[source]

Get remaining sight after current terrain type

Parameters:current_sight – current sight number
Returns:remaining sight
info_text()[source]

Return text information of the terrain

terrain_type
class OrodaelTurrim.Structure.Terrain.River[source]

Bases: OrodaelTurrim.Structure.Terrain.Terrain

Class representing mass of water. Does not matter if it´s river, lake or pond, nobody wants to get wet. Especially not Larry (he cannot swim).

affect_actions(original_value: float)[source]
affect_attack(original_value: float)[source]
affect_defense(original_value: float)[source]
char() → str[source]

Return character that represent this terrain type for string map definition

get_move_cost(target: TerrainType) → int[source]

Get move cost of the terrain based current terrain type and target terrain type. Move cost have value based on target and source terrain type

Parameters:target – target terrain type
Returns:action cost
get_remaining_sigh(current_sight: int) → int[source]

Get remaining sight after current terrain type

Parameters:current_sight – current sight number
Returns:remaining sight
info_text()[source]

Return text information of the terrain

terrain_type
class OrodaelTurrim.Structure.Terrain.Terrain[source]

Bases: abc.ABC

Abstract class for terrain types.

affect_actions(original_value: float) → float[source]
affect_attack(original_value: float) → float[source]
affect_attribute(attribute: AttributeType, original_value: Union[int, float]) → Union[float, int][source]

Provides affected value of specified attribute by this terrain

Parameters:
  • attribute – Type of attribute, which should be affected
  • original_value – Original value of affected attribute
Returns:

Affected value of specified attribute by this terrain

affect_defense(original_value: float) → float[source]
affect_max_hit_points(original_value: int) → int[source]
affect_range(original_value: int) → int[source]
affect_sight(original_value: int) → int[source]
char() → str[source]

Return character that represent this terrain type for string map definition

compute_damage(hit_points: float) → float[source]

Computes, how much damage will this terrain inflict on start of each turn

Parameters:hit_points – Previous value of hit points of game object
Returns:Amount of damage to be inflicted to game object
get_move_cost(target: TerrainType) → int[source]

Get move cost of the terrain based current terrain type and target terrain type. Move cost have value based on target and source terrain type

Parameters:target – target terrain type
Returns:action cost
get_remaining_sigh(current_sight: int) → int[source]

Get remaining sight after current terrain type

Parameters:current_sight – current sight number
Returns:remaining sight
info_text() → str[source]

Return text information of the terrain

terrain_type
class OrodaelTurrim.Structure.Terrain.Village[source]

Bases: OrodaelTurrim.Structure.Terrain.Terrain

Class representing little village in the countryside. Few huts, church and pub - everything a simple adventurer would need and even more!

affect_actions(original_value: float)[source]
affect_attack(original_value: float)[source]
affect_defense(original_value: float)[source]
char() → str[source]

Return character that represent this terrain type for string map definition

get_move_cost(target: OrodaelTurrim.Structure.Terrain.Terrain) → int[source]

Get move cost of the terrain based current terrain type and target terrain type. Move cost have value based on target and source terrain type

Parameters:target – target terrain type
Returns:action cost
get_remaining_sigh(current_sight: int) → int[source]

Get remaining sight after current terrain type

Parameters:current_sight – current sight number
Returns:remaining sight
info_text()[source]

Return text information of the terrain

terrain_type

OrodaelTurrim.Structure.TypeStrucutre module

class OrodaelTurrim.Structure.TypeStrucutre.DoubleLinkedList[source]

Bases: object

Structure for store double linked list

empty() → bool[source]

Determinate if linked list is empty

head

Get reference to head Node

next()[source]

Move pointer to the next Node

pointer

Get pointed Node reference

previous()[source]

Move pointer to the previous Node

push_back(value: Any) → None[source]

Push value to the end of the linked list

push_front(value: Any) → None[source]

Push value to the start of the linked list

tail

Get reference to tail Node

value

Return value of the pointer Node. Raise exception if pointer is not set

class OrodaelTurrim.Structure.TypeStrucutre.Node(data: Any = None)[source]

Bases: object

next
previous
value

OrodaelTurrim.Structure.Utils module

Module contents