dmcomm.protocol.dm20¶
Handling of DM20 high-level protocol.
Note: This API is still under development and may change at any time.
- dmcomm.protocol.dm20.MODE_SINGLE = 0¶
Single battle mode.
- dmcomm.protocol.dm20.MODE_SEND = 1¶
Copy send mode.
- dmcomm.protocol.dm20.MODE_TAG = 2¶
Tag battle mode.
- dmcomm.protocol.dm20.MODE_GET = 3¶
Copy get mode.
- dmcomm.protocol.dm20.VERSION_TAICHI = 0¶
- dmcomm.protocol.dm20.VERSION_YAMATO = 1¶
- dmcomm.protocol.dm20.VERSION_CORONA = 2¶
- dmcomm.protocol.dm20.VERSION_LUNA = 3¶
- dmcomm.protocol.dm20.VERSION_MEICOO = 4¶
- dmcomm.protocol.dm20.VERSION_SILVER_BLACK = 6¶
- dmcomm.protocol.dm20.VERSION_SILVER_BLUE = 7¶
- dmcomm.protocol.dm20.VERSION_DUKE = 8¶
- dmcomm.protocol.dm20.VERSION_BEELZE = 9¶
- dmcomm.protocol.dm20.ATTRIBUTE_VACCINE = 0¶
- dmcomm.protocol.dm20.ATTRIBUTE_DATA = 1¶
- dmcomm.protocol.dm20.ATTRIBUTE_VIRUS = 2¶
- dmcomm.protocol.dm20.ATTRIBUTE_FREE = 3¶
- dmcomm.protocol.dm20.ATTACK_SINGLE_WEAK = 0¶
- dmcomm.protocol.dm20.ATTACK_SINGLE_STRONG = 1¶
- dmcomm.protocol.dm20.ATTACK_DOUBLE_WEAK = 2¶
- dmcomm.protocol.dm20.ATTACK_DOUBLE_STRONG = 3¶
- dmcomm.protocol.dm20.ATTACK_CRITICAL = 4¶
- dmcomm.protocol.dm20.OUTCOME_WIN = 1¶
- dmcomm.protocol.dm20.OUTCOME_DRAW = 0¶
- dmcomm.protocol.dm20.OUTCOME_LOSE = -1¶
- dmcomm.protocol.dm20.ROSTER_SIZE = 134¶
- dmcomm.protocol.dm20.default_attribute(index: int) int ¶
Looks up the default attribute for the specified index.
- Parameters
index – The monster index to look up (0 <= index < ROSTER_SIZE).
- Returns
The default attribute for that index, as one of the ATTRIBUTE_ values.
- dmcomm.protocol.dm20.default_sprite_strong(index: int) int ¶
Looks up the default strong attack sprite for the specified index.
- Parameters
index – The monster index to look up (0 <= index < ROSTER_SIZE).
- Returns
The default sprite index for that monster’s strong attack.
- dmcomm.protocol.dm20.default_sprite_weak(index: int) int ¶
Looks up the default weak attack sprite for the specified index.
- Parameters
index – The monster index to look up (0 <= index < ROSTER_SIZE).
- Returns
The default sprite index for that monster’s weak attack.
- dmcomm.protocol.dm20.min_power(index: int) int ¶
Looks up the minimum power for the specified index.
- Parameters
index – The monster index to look up (0 <= index < ROSTER_SIZE).
- Returns
The minimum power for that index.
- dmcomm.protocol.dm20.attack_pattern(pattern_index: int, tag_meter: Optional[int] = None) list[int] ¶
Looks up the attack pattern for the specified values.
- Parameters
pattern_index – The pattern field in the DigiROM (normally 0-14, but 15 will be accepted as 14 here).
tag_meter – None for a single battle. For a tag battle, the tag_meter field in the DigiROM (number_of_arrows-1 on the tag power meter).
- Returns
A list of 4 ints, each as one of the ATTACK_ values.
- class dmcomm.protocol.dm20.Name(values: list[int], japanese: bool = True)¶
Class for DM20 player names.
- Parameters
values – A list of 4 ints, with the character indexes from the DigiROM, in the order that the name is spelled.
japanese – Whether to interpret these values as Japanese by default (False for English by default).
- classmethod from_japanese(name: str) dmcomm.protocol.dm20.Name ¶
Creates a Name object from a Japanese name string.
- Parameters
name – A Japanese name of up to 4 characters.
- classmethod from_english(name: str) dmcomm.protocol.dm20.Name ¶
Creates a Name object from an English name string.
- Parameters
name – An English name of up to 4 characters.
- classmethod from_string(name: str, japanese: bool) dmcomm.protocol.dm20.Name ¶
Creates a Name object from a Japanese or English name string.
- Parameters
name – A Japanese or English name of up to 4 characters.
japanese – Whether the string provided is Japanese (False for English).
- class dmcomm.protocol.dm20.BattleOrCopyView(target)¶
DM20 parser.
- Parameters
target – A ResultView, or ClassicDigiROM (calculations will be ignored).
- class dmcomm.protocol.dm20.BattleOrCopy(mode, turn)¶
Adapts DM20 fields to DigiROM interface (under construction).
Generated from git commit: 2023-05-06 v0.7.0