<?php

namespace App\Services\PwHexParser\Types;

use App\Services\PwHexParser\Contracts\Translate;

class Acessory extends Translate
{
    protected string $typeKey = 'Acessory';

    public function getStructure(): array
    {
        return [
            'level' => 'int32',
            'class' => 'int32',
            'strength' => 'int32',
            'vitality' => 'int32',
            'dexterity' => 'int32',
            'magic' => 'int32',
            'min_durability' => 'durability',
            'max_durability' => 'durability',
            'item_type' => 'int32',
            'item_flag' => 'short',
            'name_length' => 'name_length',
            'name' => 'name',
            'physical_attack' => 'int64',
            'magic_attack' => 'int64',
            'physical_defense' => 'int64',
            'dodge' => 'int64',
            'metal_resistance' => 'int64',
            'wood_resistance' => 'int64',
            'water_resistance' => 'int64',
            'fire_resistance' => 'int64',
            'earth_resistance' => 'int64',
            'sockets_count' => 'sockets_count',
            'sockets' => 'sockets',
            'addons_count' => 'addons_count',
            'addons' => 'addons',
        ];
    }

    public function getMinimumLength(): int
    {
        return 135;
    }
}