Beispiel #1
0
    def __init__(self, stream: InputStream = None):
        if stream is None:
            self.exp_reward = 0
            self.gil_reward = 0
            self.max_hp = 0
            self.morale = 0
            self.unused_ai = 0
            self.evasion = 0
            self.pdef = 0
            self.hit_count = 0
            self.acc = 0
            self.atk = 0
            self.agi = 0
            self.intel = 0
            self.crit_rate = 0
            self.status_atk_elem = 0
            self.status_atk_ailment = 0
            self.family = 0
            self.mdef = 0
            self.unused = 0
            self.elem_weakness = 0
            self.elem_resists = 0
            self.drop_type = 0
            self.drop_id = 0
            self.drop_chance = 0
            self.padding = []

        else:
            self.exp_reward = stream.get_u16()
            self.gil_reward = stream.get_u16()
            self.max_hp = stream.get_u16()
            self.morale = stream.get_u8()
            self.unused_ai = stream.get_u8()
            self.evasion = stream.get_u8()
            self.pdef = stream.get_u8()
            self.hit_count = stream.get_u8()
            self.acc = stream.get_u8()
            self.atk = stream.get_u8()
            self.agi = stream.get_u8()
            self.intel = stream.get_u8()
            self.crit_rate = stream.get_u8()
            self.status_atk_elem = stream.get_u16()
            self.status_atk_ailment = stream.get_u8()
            self.family = stream.get_u8()
            self.mdef = stream.get_u8()
            self.unused = stream.get_u8()
            self.elem_weakness = stream.get_u16()
            self.elem_resists = stream.get_u16()
            self.drop_type = stream.get_u8()
            self.drop_id = stream.get_u8()
            self.drop_chance = stream.get_u8()
            self.padding = []
            for index in range(3):
                self.padding.append(stream.get_u8())
Beispiel #2
0
    def __init__(self, stream: InputStream = None):
        if stream is None:
            self.identifier = 0
            self.event = 0
            self.x_pos = 0
            self.y_pos = 0

        else:
            self.identifier = stream.get_u16()
            self.event = stream.get_u16()
            self.x_pos = stream.get_u16()
            self.y_pos = stream.get_u16()
Beispiel #3
0
    def __init__(self, stream: InputStream = None):
        if stream is None:
            self.identifier = 0
            self.low_x = 0
            self.low_y = 0
            self.high_x = 0
            self.high_y = 0

        else:
            self.identifier = stream.get_u16()
            self.low_x = stream.get_u16()
            self.low_y = stream.get_u16()
            self.high_x = stream.get_u16()
            self.high_y = stream.get_u16()
Beispiel #4
0
    def __init__(self, stream: InputStream = None):
        if stream is None:
            self.base_hp = 0
            self.base_mp = 0
            self.starting_spell_level = 0
            self.base_strength = 0
            self.base_agility = 0
            self.base_intellect = 0
            self.base_stamina = 0
            self.base_luck = 0
            self.base_accuracy = 0
            self.base_evade = 0
            self.base_mdef = 0
            self.weapon_id = 0
            self.armor_id = 0
            self.unused = 0

        else:
            self.base_hp = stream.get_u16()
            self.base_mp = stream.get_u16()
            self.starting_spell_level = stream.get_u8()
            self.base_strength = stream.get_u8()
            self.base_agility = stream.get_u8()
            self.base_intellect = stream.get_u8()
            self.base_stamina = stream.get_u8()
            self.base_luck = stream.get_u8()
            self.base_accuracy = stream.get_u8()
            self.base_evade = stream.get_u8()
            self.base_mdef = stream.get_u8()
            self.weapon_id = stream.get_u8()
            self.armor_id = stream.get_u8()
            self.unused = stream.get_u8()
Beispiel #5
0
    def __init__(self, stream: InputStream = None):
        if stream is None:
            self.config = 0
            self.unrunnable = 0
            self.surprise_chance = 0
            self.groups = []

        else:
            self.config = stream.get_u8()
            self.unrunnable = stream.get_u8()
            self.surprise_chance = stream.get_u16()
            self.groups = []
            for index in range(4):
                self.groups.append(EncounterGroup(stream))
Beispiel #6
0
    def __init__(self, stream: InputStream = None):
        if stream is None:
            self.identifier = 0
            self.event = 0
            self.x_pos = 0
            self.y_pos = 0
            self.sprite_id = 0
            self.move_speed = 0
            self.facing = 0
            self.in_room = 0

        else:
            self.identifier = stream.get_u16()
            self.event = stream.get_u16()
            self.x_pos = stream.get_u16()
            self.y_pos = stream.get_u16()
            self.sprite_id = stream.get_u16()
            self.move_speed = stream.get_u16()
            self.facing = stream.get_u16()
            self.in_room = stream.get_u16()