Welcome to PyVic2WarAnalyzer’s documentation!¶
I created this module because I was bored and because I wanted to make a discord bot with it.
Classes and methods¶
Pyvic2waranalyzer.main¶
Pyvic2waranalyzer.utils¶
- class pyvic2waranalyzer.utils.types.Battle(name: Optional[str] = None, location: Optional[int] = None, result: Optional[bool] = None, defender: Optional[str] = None, attacker: Optional[str] = None, attackerLosses: int = 0, defenderLosses: int = 0, attackerLeader: Optional[str] = None, defenderLeader: Optional[str] = None)[source]¶
Represents a battle in a
War
- name¶
Indicates the battle name, aka the province name
- Type
str
- location¶
Indicates a province id
- Type
int
- result¶
Indicates if the attacker won the battle or else
- Type
bool
- defender¶
- Type
str
- attacker¶
- Type
str
- attackerLosses¶
- Type
int
- defenderLosses¶
- Type
int
- attackerLeader¶
- Type
str
- defenderLeader¶
- Type
str
- class pyvic2waranalyzer.utils.types.OriginalWargoal(state: Optional[int] = None, casus_belli: Optional[str] = None, actor: Optional[str] = None, receiver: Optional[str] = None, country: Optional[str] = None)[source]¶
Represents an original wargoal in a
War
- state¶
A province id from ‘take state’ CB.
- Type
int
- casus_belli¶
The name of the casus belli.
- Type
str
- country¶
The name of the country which the actor wants to liberate.
- Type
str
- actor¶
The country which made this wargoal.
- Type
str
- receiver¶
The country which received this wargoal.
- Type
str
- class pyvic2waranalyzer.utils.types.Unit(soldier: Optional[str] = None, number: int = 0)[source]¶
Represents a unit in a
Battle
- soldier¶
Type of the unit.
- Type
str
- number¶
Number of soldiers in the unit.
- Type
int
- class pyvic2waranalyzer.utils.types.War(name: Optional[str] = None, action: Optional[str] = None)[source]¶
Represents a war between 2 nations or more
- attackers¶
All attackers.
- Type
list
- defenders¶
All defenders.
- Type
list
- wargoals¶
A list of wargoals.
- Type
List[
Wargoal
orOriginalWargoal
]
- action¶
- Type
str
- class pyvic2waranalyzer.utils.types.Wargoal(state: Optional[int] = None, casus_belli: Optional[str] = None, actor: Optional[str] = None, receiver: Optional[str] = None, date: Optional[str] = None, is_fulfilled: Optional[bool] = None, score: Optional[float] = None, change: Optional[float] = None, country: Optional[str] = None)[source]¶
Represents a wargoal in a
War
- state¶
A province id from ‘take state’ CB.
- Type
int
- casus_belli¶
The name of the casus belli.
- Type
str
- actor¶
The country which made this wargoal.
- Type
str
- country¶
The name of the country which the actor wants to liberate.
- Type
str
- receiver¶
The country which received this wargoal.
- Type
str
- date¶
Wargoal date.
- Type
str
- is_fulfilled¶
May not be present, only if it’s an active war.
- Type
bool
- score¶
May not be present, only if it’s an active war.
- Type
float
- change¶
May not be present, only if it’s an active war.
- Type
float