Armor

Contracts

Addresses

NameMainnetTestnet

DFK Chain

0xE60480B4083cA9F4d07034Eb30Bc7894114adAC1

0x630706B99c053C727094C952ca685637dFE89c0a

Klaytn

0x8740c7509dC22Fc1a2e1Da7d0067A563E4A66f63

0xF7dD05C65537Bb289Ecd737868b4dc978569cc1F

Interface

interface IArmorCoreDiamond {

    // Events
    event Approval(address indexed owner, address indexed operator, uint256 indexed tokenId);
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
    event ArmorCreated(address indexed owner, uint256 indexed armorId, tuple(uint256 id, tuple(uint8 armorType, uint16 displayId, uint8 rarity, uint64 craftedBy, uint8 dye1, uint8 dye2, uint16 rawPhysDefense, uint16 physDefScalar, uint16 pDefScalarMax, uint16 rawMagicDefense, uint16 magicDefScalar, uint16 mDefScalarMax, uint16 evasion, uint16 spare1, uint16 spare2) displayDefenseInfo, tuple(uint64 equippedTo, uint64 equippableAt, uint16 maxDurability, uint16 durability, uint8 maxRepairs, uint8 remainingRepairs, uint8 equipRequirement, uint8 enchantmentType1, uint8 enchantmentType2, uint8 enchantmentType3, uint16 enchantmentScalar1, uint16 enchantmentScalar2, uint16 enchantmentScalar3) stateEnchantments, tuple(uint8 bonus1, uint8 bonus2, uint8 bonus3, uint8 bonus4, uint8 bonus5, uint16 bonusScalar1, uint16 bonusScalar2, uint16 bonusScalar3, uint16 bonusScalar4, uint16 bonusScalar5, uint16 uniqueSettings, uint8 restorationCount, uint16 misc1, uint32 misc2, uint32 misc3, uint32 misc4) bonusInfoExtras) armor);
    event ArmorUpdated(address indexed owner, uint256 indexed armorId, tuple(uint256 id, tuple(uint8 armorType, uint16 displayId, uint8 rarity, uint64 craftedBy, uint8 dye1, uint8 dye2, uint16 rawPhysDefense, uint16 physDefScalar, uint16 pDefScalarMax, uint16 rawMagicDefense, uint16 magicDefScalar, uint16 mDefScalarMax, uint16 evasion, uint16 spare1, uint16 spare2) displayDefenseInfo, tuple(uint64 equippedTo, uint64 equippableAt, uint16 maxDurability, uint16 durability, uint8 maxRepairs, uint8 remainingRepairs, uint8 equipRequirement, uint8 enchantmentType1, uint8 enchantmentType2, uint8 enchantmentType3, uint16 enchantmentScalar1, uint16 enchantmentScalar2, uint16 enchantmentScalar3) stateEnchantments, tuple(uint8 bonus1, uint8 bonus2, uint8 bonus3, uint8 bonus4, uint8 bonus5, uint16 bonusScalar1, uint16 bonusScalar2, uint16 bonusScalar3, uint16 bonusScalar4, uint16 bonusScalar5, uint16 uniqueSettings, uint8 restorationCount, uint16 misc1, uint32 misc2, uint32 misc3, uint32 misc4) bonusInfoExtras) armor);
    event BonusInfoExtrasUpdated(address indexed owner, uint256 armorId, tuple(uint8 bonus1, uint8 bonus2, uint8 bonus3, uint8 bonus4, uint8 bonus5, uint16 bonusScalar1, uint16 bonusScalar2, uint16 bonusScalar3, uint16 bonusScalar4, uint16 bonusScalar5, uint16 uniqueSettings, uint8 restorationCount, uint16 misc1, uint32 misc2, uint32 misc3, uint32 misc4) bonusInfoExtras);
    event DisplayDefenseInfoUpdated(address indexed owner, uint256 armorId, tuple(uint8 armorType, uint16 displayId, uint8 rarity, uint64 craftedBy, uint8 dye1, uint8 dye2, uint16 rawPhysDefense, uint16 physDefScalar, uint16 pDefScalarMax, uint16 rawMagicDefense, uint16 magicDefScalar, uint16 mDefScalarMax, uint16 evasion, uint16 spare1, uint16 spare2) displayDefenseInfo);
    event Paused(address account);
    event StateEnchantmentsUpdated(address indexed owner, uint256 armorId, tuple(uint64 equippedTo, uint64 equippableAt, uint16 maxDurability, uint16 durability, uint8 maxRepairs, uint8 remainingRepairs, uint8 equipRequirement, uint8 enchantmentType1, uint8 enchantmentType2, uint8 enchantmentType3, uint16 enchantmentScalar1, uint16 enchantmentScalar2, uint16 enchantmentScalar3) stateEnchantments);
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
    event Unpaused(address account);

    // Functions
    function approve(address operator, uint256 tokenId) payable;
    function balanceOf(address account) view returns (uint256);
    function getApproved(uint256 tokenId) view returns (address);
    function getArmor(uint256 _id) view returns (tuple(uint256 id, tuple(uint8 armorType, uint16 displayId, uint8 rarity, uint64 craftedBy, uint8 dye1, uint8 dye2, uint16 rawPhysDefense, uint16 physDefScalar, uint16 pDefScalarMax, uint16 rawMagicDefense, uint16 magicDefScalar, uint16 mDefScalarMax, uint16 evasion, uint16 spare1, uint16 spare2) displayDefenseInfo, tuple(uint64 equippedTo, uint64 equippableAt, uint16 maxDurability, uint16 durability, uint8 maxRepairs, uint8 remainingRepairs, uint8 equipRequirement, uint8 enchantmentType1, uint8 enchantmentType2, uint8 enchantmentType3, uint16 enchantmentScalar1, uint16 enchantmentScalar2, uint16 enchantmentScalar3) stateEnchantments, tuple(uint8 bonus1, uint8 bonus2, uint8 bonus3, uint8 bonus4, uint8 bonus5, uint16 bonusScalar1, uint16 bonusScalar2, uint16 bonusScalar3, uint16 bonusScalar4, uint16 bonusScalar5, uint16 uniqueSettings, uint8 restorationCount, uint16 misc1, uint32 misc2, uint32 misc3, uint32 misc4) bonusInfoExtras));
    function getArmors(uint256[] _ids) view returns (tuple(uint256 id, tuple(uint8 armorType, uint16 displayId, uint8 rarity, uint64 craftedBy, uint8 dye1, uint8 dye2, uint16 rawPhysDefense, uint16 physDefScalar, uint16 pDefScalarMax, uint16 rawMagicDefense, uint16 magicDefScalar, uint16 mDefScalarMax, uint16 evasion, uint16 spare1, uint16 spare2) displayDefenseInfo, tuple(uint64 equippedTo, uint64 equippableAt, uint16 maxDurability, uint16 durability, uint8 maxRepairs, uint8 remainingRepairs, uint8 equipRequirement, uint8 enchantmentType1, uint8 enchantmentType2, uint8 enchantmentType3, uint16 enchantmentScalar1, uint16 enchantmentScalar2, uint16 enchantmentScalar3) stateEnchantments, tuple(uint8 bonus1, uint8 bonus2, uint8 bonus3, uint8 bonus4, uint8 bonus5, uint16 bonusScalar1, uint16 bonusScalar2, uint16 bonusScalar3, uint16 bonusScalar4, uint16 bonusScalar5, uint16 uniqueSettings, uint8 restorationCount, uint16 misc1, uint32 misc2, uint32 misc3, uint32 misc4) bonusInfoExtras)[]);
    function getEquipmentBytes(uint256 _id) view returns (tuple(uint256 id, uint16 equipmentCore, bytes generic1, bytes enchantments, bytes generic3));
    function getStateEnchantments(uint256 _id) view returns (tuple(uint64 equippedTo, uint64 equippableAt, uint16 maxDurability, uint16 durability, uint8 maxRepairs, uint8 remainingRepairs, uint8 equipRequirement, uint8 enchantmentType1, uint8 enchantmentType2, uint8 enchantmentType3, uint16 enchantmentScalar1, uint16 enchantmentScalar2, uint16 enchantmentScalar3));
    function getUserArmors(address _address) view returns (tuple(uint256 id, tuple(uint8 armorType, uint16 displayId, uint8 rarity, uint64 craftedBy, uint8 dye1, uint8 dye2, uint16 rawPhysDefense, uint16 physDefScalar, uint16 pDefScalarMax, uint16 rawMagicDefense, uint16 magicDefScalar, uint16 mDefScalarMax, uint16 evasion, uint16 spare1, uint16 spare2) displayDefenseInfo, tuple(uint64 equippedTo, uint64 equippableAt, uint16 maxDurability, uint16 durability, uint8 maxRepairs, uint8 remainingRepairs, uint8 equipRequirement, uint8 enchantmentType1, uint8 enchantmentType2, uint8 enchantmentType3, uint16 enchantmentScalar1, uint16 enchantmentScalar2, uint16 enchantmentScalar3) stateEnchantments, tuple(uint8 bonus1, uint8 bonus2, uint8 bonus3, uint8 bonus4, uint8 bonus5, uint16 bonusScalar1, uint16 bonusScalar2, uint16 bonusScalar3, uint16 bonusScalar4, uint16 bonusScalar5, uint16 uniqueSettings, uint8 restorationCount, uint16 misc1, uint32 misc2, uint32 misc3, uint32 misc4) bonusInfoExtras)[]);
    function isApprovedForAll(address account, address operator) view returns (bool);
    function name() view returns (string);
    function ownerOf(uint256 tokenId) view returns (address);
    function pause();
    function paused() view returns (bool);
    function safeTransferFrom(address from, address to, uint256 tokenId) payable;
    function safeTransferFrom(address from, address to, uint256 tokenId, bytes data) payable;
    function symbol() view returns (string);
    function tokenByIndex(uint256 index) view returns (uint256);
    function tokenOfOwnerByIndex(address owner, uint256 index) view returns (uint256);
    function tokenURI(uint256 tokenId) view returns (string);
    function totalSupply() view returns (uint256);
    function transferFrom(address from, address to, uint256 tokenId) payable;
    function unpause();
    function validateEquipping(tuple(uint256 id, tuple(uint256 summonedTime, uint256 nextSummonTime, uint256 summonerId, uint256 assistantId, uint32 summons, uint32 maxSummons) summoningInfo, tuple(uint256 statGenes, uint256 visualGenes, uint8 rarity, bool shiny, uint16 generation, uint32 firstName, uint32 lastName, uint8 shinyStyle, uint8 class, uint8 subClass) info, tuple(uint256 staminaFullAt, uint256 hpFullAt, uint256 mpFullAt, uint16 level, uint64 xp, address currentQuest, uint8 sp, uint8 status) state, tuple(uint16 strength, uint16 intelligence, uint16 wisdom, uint16 luck, uint16 agility, uint16 vitality, uint16 endurance, uint16 dexterity, uint16 hp, uint16 mp, uint16 stamina) stats, tuple(uint16 strength, uint16 intelligence, uint16 wisdom, uint16 luck, uint16 agility, uint16 vitality, uint16 endurance, uint16 dexterity, uint16 hpSm, uint16 hpRg, uint16 hpLg, uint16 mpSm, uint16 mpRg, uint16 mpLg) primaryStatGrowth, tuple(uint16 strength, uint16 intelligence, uint16 wisdom, uint16 luck, uint16 agility, uint16 vitality, uint16 endurance, uint16 dexterity, uint16 hpSm, uint16 hpRg, uint16 hpLg, uint16 mpSm, uint16 mpRg, uint16 mpLg) secondaryStatGrowth, tuple(uint16 mining, uint16 gardening, uint16 foraging, uint16 fishing, uint16 craft1, uint16 craft2) professions, tuple(uint256 equippedSlots, uint256 petId, uint256 weapon1Id, uint256 weapon2Id, uint256 offhand1Id, uint256 offhand2Id, uint256 armorId, uint256 accessoryId) equipment) _hero, uint256 _equipmentId, uint8) view returns (bool);
    
}

ABI

Types

Armor

The primary Armor struct contains the item's unique ID on the contract, and three sub-structs that hold the item data.

struct Armor {
    uint256 id;
    DisplayDefenseInfo displayDefenseInfo;
    StateEnchantments stateEnchantments;
    BonusInfoExtras bonusInfoExtras;
}

DisplayDefenseInfo

struct DisplayInfoMagicAttack {
    ArmorType armorType;
    uint16 displayId;
    uint8 rarity;
    uint64 craftedBy;
    uint8 dye1;
    uint8 dye2;
    uint16 rawPhysDefense;
    uint16 physDefScalar;
    uint16 pDefScalarMax;
    uint16 rawMagicDefense;
    uint16 magicDefScalar;
    uint16 mDefScalarMax;
    uint16 evasion;
    uint16 spare1;
    uint16 spare2;
}
NameTypeDescription

armorType

The numeric ID defining the armor type (e.g. 1 = Light Armor, etc.)

displayId

uint16

Defines the item's base appearance

rarity

uint16

The item's rarity (0-12). See Rarity.

craftedBy

uint64

The Hero ID of the crafting Hero, or a unique ID for dropped items. See CraftedBy.

dye1

uint8

A unique mapping indicating the primary color variation for some items (0 = no dye). See Dye1.

dye2

uint8

A unique mapping indicating the secondary color variation for some items (0 = no dye). See Dye2.

rawPhysDefense

uint16

The base P.DEF of the armor

physDefScalar

uint16

The scalar value for rawPhysDefense (two-decimal precision multiplier, e.g. 5 = 0.05x)

pDefScalarMax

uint16

The maximum value that can be obtained from the Hero's END * physDefScalar

rawMagicDefense

uint16

The base M.DEF of the armor

magicDefScalar

uint16

The scalar value for rawMagicDefense (two-decimal precision multiplier, e.g. 5 = 0.05x)

mDefScalarMax

uint16

The maximum value that can be obtained from the Hero's WIS * magicDefScalar

evasion

uint16

The base evasion percent granted by the armor. Two-decimal precision with range of -327.67% to 327.67%. Conversion logic is: (1 - 2 * floor(evasion / 32768)) * (evasion % 32768).

spare1

uint16

Currently unused

spare2

uint16

Currently unused

StateEnchantments

struct StateEnchantments {
    uint64 equippedTo;
    uint64 equippableAt;
    uint16 maxDurability;
    uint16 durability;
    uint8 maxRepairs;
    uint8 remainingRepairs;
    uint8 equipRequirement;
    uint8 enchantmentType1;
    uint8 enchantmentType2;
    uint8 enchantmentType3;
    uint16 enchantmentScalar1;
    uint16 enchantmentScalar2;
    uint16 enchantmentScalar3;
}
NameTypeDescription

equippedTo

uint64

The Hero ID of the Hero that the item is equipped to

equippableAt

uint64

The Unix timestamp when the item is next equippable

maxDurability

uint16

The maximum durability of the item

durability

uint16

The current durability of the item

maxRepairs

uint8

The maximum number of repairs for the item

remainingRepairs

uint8

The remaining number of repairs for the item

equipRequirement

uint8

The Level requirement to equip the item

enchantmentType1

uint8

A mapping of the enchantment type:

  • 0 = no enchantment slot available

  • 1 = empty enchantment slot

enchantmentType2

uint8

A mapping of the enchantment type:

  • 0 = no enchantment slot available

  • 1 = empty enchantment slot

enchantmentType3

uint8

A mapping of the enchantment type:

  • 0 = no enchantment slot available

  • 1 = empty enchantment slot

enchantmentScalar1

uint16

The scalar value of the corresponding enchantment

enchantmentScalar2

uint16

The scalar value of the corresponding enchantment

enchantmentScalar3

uint16

The scalar value of the corresponding enchantment

BonusInfoExtras

struct BonusInfoExtras {
    uint8 bonus1;
    uint8 bonus2;
    uint8 bonus3;
    uint8 bonus4;
    uint8 bonus5;
    uint16 bonusScalar1;
    uint16 bonusScalar2;
    uint16 bonusScalar3;
    uint16 bonusScalar4;
    uint16 bonusScalar5;
    uint16 uniqueSettings;
    uint8 restorationCount;
    uint16 misc1;
    uint32 misc2;
    uint32 misc3;
    uint32 misc4;
}
NameTypeDescription

bonus1

uint8

A mapping of an item bonus ID (0 = no bonus)

bonus2

uint8

A mapping of an item bonus ID (0 = no bonus)

bonus3

uint8

A mapping of an item bonus ID (0 = no bonus)

bonus4

uint8

A mapping of an item bonus ID (0 = no bonus)

bonus5

uint8

A mapping of an item bonus ID (0 = no bonus)

bonus1Scalar

uint16

The scalar value of the corresponding bonus

bonus2Scalar

uint16

The scalar value of the corresponding bonus

bonus3Scalar

uint16

The scalar value of the corresponding bonus

bonus4Scalar

uint16

The scalar value of the corresponding bonus

bonus5Scalar

uint16

The scalar value of the corresponding bonus

uniqueSettings

uint16

Currently unused

restorationCount

uint8

The number of times the item's remainingRepairs have been restored

misc1

uint16

Currently unused

misc2

uint32

Currently unused

misc3

uint32

Currently unused

misc4

uint32

Currently unused

ArmorType

enum ArmorType {
    None,
    Light,
    Medium,
    Heavy
}
Armor TypeValueUsable By

Light

1

  • All Classes

Medium

2

  • Archer

  • Bard

  • Berserker

  • DarkKnight

  • Dragoon

  • DreadKnight

  • Knight

  • Legionnaire

  • Paladin

  • Pirate

  • Shapeshifter

  • SpellBow

  • Warrior

Heavy

3

  • DarkKnight

  • Dragoon

  • DreadKnight

  • Knight

  • Legionnaire

  • Paladin

  • Warrior

All Visages are considered Light Armor, and can by used by any class, regardless of what type of Armor that Hero may be wearing.

Mappings

Armor Details

The armor details correspond to a two-layer mapping by armorType and displayId. Most base data can be found on-chain or through the API. Mappings for additional string data are as follows:

{
  "1": {
    "1": {
      "name": "Feather Duster",
      "description": "A lightweight armor fashioned from the feathers of a ravenous and cunning rocboc."
    },
    "50000": {
      "name": "Bloater Suit",
      "description": "A fashionable fish fit that shows just the right amount of skin. Perfect camo against the realm's least threatening creature."
    },
    "50001": {
      "name": "Karate Gi",
      "description": "This elegant gi provides the comfort and flexibility to kick ass, take names, and get home in time for dinner. Popular amongst masters of Togwan Do."
    },
    "50002": {
      "name": "Super Blub Defender: Red Suit",
      "description": "A suit made by the Super Blub Defender (SBD) Fan Club. This one represents the Red Defender, who is known for his bravery, virtue, and mastery of Togwan-do."
    },
    "50003": {
      "name": "Super Blub Defender: Pink Suit",
      "description": "A suit made by the Super Blub Defender (SBD) Fan Club. This one represents the Pink Defender, who is known for her biting wit, nibbling charm, and chomping mastication."
    },
    "50009": {
      "name": "Chef Suit",
      "description": "A chef should always be prepared for furious fighting or fierce fileting. This is the perfect outfit for adventures both in and out of the kitchen."
    },
    "50010": {
      "name": "Dark Summoner Suit",
      "description": "When they're not sacrificing Heroes in a nonstop stream of dark rituals that push Gaia further and further towards an inescapable corruption, the Dark Summoner is looking fit and fancy-free in this sleek jumper wrap."
    },
    "50011": {
      "name": "Champion Gi",
      "description": "This champion gi provides the comfort and flexibility to kick ass, take names, and get home in time for dinner. Popular amongst masters of Togwan Do."
    },
    "50012": {
      "name": "Fishing Vest",
      "description": "Brought to you by Tom Threads™, this dapper fishing vest is both fashionable and functional. It strikes fear in the hearts of bloaters everywhere."
    },
    "50013": {
      "name": "Padded Archivist Tunic",
      "description": "Stay comfortable and organized with this stylish archivist tunic, meticulously crafted with padded lining for extended wear. Complete the ensemble with a pair of vibrant green gloves that will make any archival task seem trivial."
    },
    "50014": {
      "name": "Doug Hype Fur Coat",
      "description": "Bring the hype with every step you take in these immaculate duds."
    }
  },
  "2": {
    "1": {
      "name": "Wishbone Breastplate",
      "description": "A fine armor fashioned from the feathers of a ravenous rocboc and cured leather."
    }
  },
  "3": {
    "1": {
      "name": "Boc-Knight Mail",
      "description": "Fashioned from the feathers and beak of a massive rocboc, this heavy armor allows its wearer to take a beating and keep on flapping."
    }
  }
}

Armor Bonuses

Armor Bonus descriptions correspond to the following mappings. The X in each mapping represents the corresponding bonusScalar value.

{
    1: "Increase Block chance by +X%",
    2: "Increase Spell Block chance by +X%",
    3: "Increase Block damage reduction by X%",
    4: "Increase Spell Block damage reduction by X%",
    5: "Increase Physical Accuracy by +X%",
    6: "Increase Magical Accuracy by +X%",
    7: "Increase Speed by X%",
    8: "Increase Evasion by X%",
    9: "Increase Status Effect Resistance by +X%",
    10: "Increase Banish Resistance by +X%",
    11: "Increase Bleed Resistance by +X%",
    12: "Increase Blind Resistance by +X%",
    13: "Increase Burn Resistance by +X%",
    14: "Increase Chill Resistance by +X%",
    15: "Increase Confuse Resistance by +X%",
    16: "Increase Daze Resistance by +X%",
    17: "Increase Disarm Resistance by +X%",
    18: "Increase Fear Resistance by +X%",
    19: "Increase Intimidate Resistance by +X%",
    20: "Increase Poison Resistance by +X%",
    21: "Increase Pull Resistance by +X%",
    22: "Increase Push Resistance by +X%",
    23: "Increase Silence Resistance by +X%",
    24: "Increase Sleep Resistance by +X%",
    25: "Increase Slow Resistance by +X%",
    26: "Increase Stun Resistance by +X%",
    27: "Increase Taunt Resistance by +X%",
    28: "Increase Critical Hit Multiplier by +X",
    29: "Increase Physical Defense by +X%",
    30: "Increase Magical Defense by +X%",
    31: "Decrease Physical Accuracy by -X%",
    32: "Decrease Magical Accuracy by -X%",
    33: "Increase Physical Damage by +X%",
    34: "Increase Magical Damage by +X%",
    35: "Gain +X% Riposte",
    36: "Double the bonuses above this bonus when equipped with X accessory.",
    37: "Double the bonuses above this bonus when equipped with X off-hand.",
    38: "Double the bonuses above this bonus when equipped with X 1H Sword.",
    39: "Gain X% chance to Retaliate 1 upon receiving physical damage.",
    40: "Gain X Initiative after each successful Block",
    41: "Increase Recovery chance by +X%",
    42: "Double the bonuses above this bonus when equipped with X 2H Sword.",
    43: "Double the bonuses above this bonus when equipped with X 1H Axe.",
    44: "Double the bonuses above this bonus when equipped with X 2H Axe.",
    45: "Double the bonuses above this bonus when equipped with X 1H Mace.",
    46: "Double the bonuses above this bonus when equipped with X 2H Mace.",
    47: "Double the bonuses above this bonus when equipped with X 1H Spear.",
    48: "Double the bonuses above this bonus when equipped with X 2H Spear.",
    49: "Double the bonuses above this bonus when equipped with X Wand.",
    50: "Double the bonuses above this bonus when equipped with X Staff.",
    51: "Double the bonuses above this bonus when equipped with X Gloves.",
    52: "Double the bonuses above this bonus when equipped with X Bow.",
    53: "Double the bonuses above this bonus when equipped with X Dagger.",
    54: "Decrease Speed by X%"
}

Last updated