def to_dict(self, minimal: bool = False) -> dict: minimal_dict = BaseMixin.to_dict(self, minimal) if minimal: return minimal_dict materials = [] for i in range(1, 7): material_code = getattr(self, f"material_{i}_code") if material_code: materials.append({ "item": getattr(self, f"material_{i}").to_dict(), "quantity": getattr(self, f"material_{i}_quantity"), }) return { **minimal_dict, "result_item": self.result_item.to_dict(), "result_item_quantity": self.result_item_quantity, "materials": materials, **DroppedByMixin.to_dict(self), **SoldByMixin.to_dict(self), **RandomBoxMixin.to_dict(self), }
def to_dict(self, minimal: bool = False) -> dict: minimal_dict = BaseMixin.to_dict(self, minimal) if minimal: return minimal_dict return { **minimal_dict, "description": self.description, **RandomBoxMixin.to_dict(self), }
def to_dict(self, minimal: bool = False) -> dict: minimal_dict = BaseMixin.to_dict(self, minimal) if minimal: return minimal_dict return { **minimal_dict, "skill": self.skill_data.to_dict(), **DroppedByMixin.to_dict(self), **RandomBoxMixin.to_dict(self), }
def to_dict(self, minimal: bool = False) -> dict: minimal_dict = ExtraEquipmentMixin.to_dict(self, minimal) if minimal: return minimal_dict return { **minimal_dict, **DroppedByMixin.to_dict(self), **ProducedByMixin.to_dict(self), **RandomBoxMixin.to_dict(self), }
def to_dict(self, minimal: bool = False) -> dict: minimal_dict = BaseMixin.to_dict(self, minimal) if minimal: return minimal_dict return { **minimal_dict, "efficiency": self.efficiency, **DroppedByMixin.to_dict(self), **RandomBoxMixin.to_dict(self), }
def to_dict(self, minimal: bool = False) -> dict: minimal_dict = BaseMixin.to_dict(self, minimal) if minimal: return minimal_dict return { **minimal_dict, **NeededForMixin.to_dict(self), **ProducedByMixin.to_dict(self), **DroppedByMixin.to_dict(self), **SoldByMixin.to_dict(self), **RandomBoxMixin.to_dict(self), }
def to_dict(self, minimal: bool = False) -> dict: minimal_dict = BaseMixin.to_dict(self, minimal) if minimal: return minimal_dict return { **minimal_dict, "inital_courage": self.inital_courage, "inital_patience": self.inital_patience, "inital_wisdom": self.inital_wisdom, "is_unlimited": self.is_unlimited, **DroppedByMixin.to_dict(self), **RandomBoxMixin.to_dict(self), }
def to_dict(self, minimal: bool = False) -> dict: minimal_dict = WeaponEquipmentMixin.to_dict(self, minimal) if minimal: return minimal_dict return { **minimal_dict, **UpgradeRuleMixin.to_dict(self), **ItemSetMixin.to_dict(self), **DroppedByMixin.to_dict(self), **ProducedByMixin.to_dict(self), **NeededForMixin.to_dict(self), **RandomBoxMixin.to_dict(self), **SoldByMixin.to_dict(self), }
def to_dict(self, minimal: bool = False) -> dict: minimal_dict = ShipBaseMixin.to_dict(self) if minimal: return minimal_dict return { **minimal_dict, "protection": self.protection, "balance": self.balance, **DroppedByMixin.to_dict(self), **ProducedByMixin.to_dict(self), **NeededForMixin.to_dict(self), **RandomBoxMixin.to_dict(self), **SoldByMixin.to_dict(self), }
def to_dict(self, minimal: bool = False) -> dict: minimal_dict = ShipBaseMixin.to_dict(self) if minimal: return minimal_dict return { **minimal_dict, "turning_power": self.turning_power, "deceleration": self.deceleration, "balance": self.balance, **DroppedByMixin.to_dict(self), **ProducedByMixin.to_dict(self), **NeededForMixin.to_dict(self), **RandomBoxMixin.to_dict(self), **SoldByMixin.to_dict(self), }
def to_dict(self, minimal: bool = False) -> dict: minimal_dict = ShipBaseMixin.to_dict(self) if minimal: return minimal_dict return { **minimal_dict, "favorable_wind": self.favorable_wind, "adverse_wind": self.adverse_wind, "turning_power": self.turning_power, "balance": self.balance, **DroppedByMixin.to_dict(self), **ProducedByMixin.to_dict(self), **NeededForMixin.to_dict(self), **RandomBoxMixin.to_dict(self), **SoldByMixin.to_dict(self), }
def to_dict(self, minimal: bool = False) -> dict: minimal_dict = { **BaseMixin.to_dict(self, minimal), **BonusMixin.to_dict(self), "equip_type": self.equip_type.to_dict(), "is_core_essence": self.is_core_essence, "required_weapon_level": self.required_weapon_level, } if minimal: return minimal_dict return { **minimal_dict, **DroppedByMixin.to_dict(self), **ProducedByMixin.to_dict(self), **NeededForMixin.to_dict(self), **RandomBoxMixin.to_dict(self), }
def to_dict(self, minimal: bool = False) -> dict: minimal_dict = { **ExtraEquipmentMixin.to_dict(self, minimal), "accessory_type": self.accessory_type.to_dict(), } if minimal: return minimal_dict return { **minimal_dict, **ItemSetMixin.to_dict(self), **DroppedByMixin.to_dict(self), **ProducedByMixin.to_dict(self), **NeededForMixin.to_dict(self), **RandomBoxMixin.to_dict(self), **SoldByMixin.to_dict(self), }
def to_dict(self, minimal: bool = False) -> dict: minimal_dict = ShipBaseMixin.to_dict(self) if minimal: return minimal_dict return { **minimal_dict, "physical_defense": self.physical_defense, "protection": self.protection, "dp": self.dp, "guns_front": self.guns_front, "guns_side": self.guns_side, "crew_size": self.crew_size, **DroppedByMixin.to_dict(self), **ProducedByMixin.to_dict(self), **NeededForMixin.to_dict(self), **RandomBoxMixin.to_dict(self), **SoldByMixin.to_dict(self), }
def to_dict(self, minimal: bool = False) -> dict: minimal_dict = ShipBaseMixin.to_dict(self) if minimal: return minimal_dict return { **minimal_dict, "damage": self.damage, "range": self.range, "critical": self.critical, "reloadspeed": self.reloadspeed, "hitrange": self.hitrange, "balance": self.balance, **DroppedByMixin.to_dict(self), **ProducedByMixin.to_dict(self), **NeededForMixin.to_dict(self), **RandomBoxMixin.to_dict(self), **SoldByMixin.to_dict(self), }
def to_dict(self, minimal: bool = False) -> dict: minimal_dict = BaseMixin.to_dict(self, minimal) if minimal: return minimal_dict return { **minimal_dict, "level_land": self.level_land, "level_sea": self.level_sea, "cooldown": self.cooldown, "cast_time": self.cast_time, "efficiency": self.efficiency, "description": self.description, **NeededForMixin.to_dict(self), **ProducedByMixin.to_dict(self), **DroppedByMixin.to_dict(self), **SoldByMixin.to_dict(self), **RandomBoxMixin.to_dict(self), }
def to_dict(self, minimal: bool = False) -> dict: minimal_dict = { **BaseMixin.to_dict(self, minimal), "level_land": self.level_land, "level_sea": self.level_sea, } if minimal: return minimal_dict items = [] for i in range(0, 62): item_code = getattr(self, f"item_{i}_code") if item_code: if item_code == "money": item = { "code": "money", "name": "Gelt", "icon": "def004.png", "rare_grade": 0, "table": None, } else: item = getattr(self, f"item_{i}").to_dict() items.append({ "item": item, "quantity": getattr(self, f"item_{i}_quantity"), }) return { **minimal_dict, "items": items, **NeededForMixin.to_dict(self), **ProducedByMixin.to_dict(self), **DroppedByMixin.to_dict(self), **SoldByMixin.to_dict(self), **RandomBoxMixin.to_dict(self), }