@Override
    public void deserialize(Buffer buf) {
        lifePoints = buf.readInt();
        if (lifePoints < 0)
            throw new RuntimeException("Forbidden value on lifePoints = " + lifePoints + ", it doesn't respect the following condition : lifePoints < 0");
        maxLifePoints = buf.readInt();
        if (maxLifePoints < 0)
            throw new RuntimeException("Forbidden value on maxLifePoints = " + maxLifePoints + ", it doesn't respect the following condition : maxLifePoints < 0");
        baseMaxLifePoints = buf.readInt();
        if (baseMaxLifePoints < 0)
            throw new RuntimeException("Forbidden value on baseMaxLifePoints = " + baseMaxLifePoints + ", it doesn't respect the following condition : baseMaxLifePoints < 0");
        permanentDamagePercent = buf.readInt();
        if (permanentDamagePercent < 0)
            throw new RuntimeException("Forbidden value on permanentDamagePercent = " + permanentDamagePercent + ", it doesn't respect the following condition : permanentDamagePercent < 0");
        shieldPoints = buf.readInt();
        if (shieldPoints < 0)
            throw new RuntimeException("Forbidden value on shieldPoints = " + shieldPoints + ", it doesn't respect the following condition : shieldPoints < 0");
        actionPoints = buf.readShort();
        maxActionPoints = buf.readShort();
        movementPoints = buf.readShort();
        maxMovementPoints = buf.readShort();
        summoner = buf.readInt();
        summoned = buf.readBoolean();
        neutralElementResistPercent = buf.readShort();
        earthElementResistPercent = buf.readShort();
        waterElementResistPercent = buf.readShort();
        airElementResistPercent = buf.readShort();
        fireElementResistPercent = buf.readShort();
        neutralElementReduction = buf.readShort();
        earthElementReduction = buf.readShort();
        waterElementReduction = buf.readShort();
        airElementReduction = buf.readShort();
        fireElementReduction = buf.readShort();
        criticalDamageFixedResist = buf.readShort();
        pushDamageFixedResist = buf.readShort();
        dodgePALostProbability = buf.readShort();
        if (dodgePALostProbability < 0)
            throw new RuntimeException("Forbidden value on dodgePALostProbability = " + dodgePALostProbability + ", it doesn't respect the following condition : dodgePALostProbability < 0");
        dodgePMLostProbability = buf.readShort();
        if (dodgePMLostProbability < 0)
            throw new RuntimeException("Forbidden value on dodgePMLostProbability = " + dodgePMLostProbability + ", it doesn't respect the following condition : dodgePMLostProbability < 0");
        tackleBlock = buf.readShort();
        tackleEvade = buf.readShort();
        invisibilityState = buf.readByte();
    }