Repository: CryptoBlades/cryptoblades
File: contracts/cryptoblades.sol (Solidity)

Code before:
                weapons.getRandomStat(4, 200, seed, 101),
                0, // stat2
                0, // stat3
                RandomUtil.combineSeeds(seed,102)
            );
        }
    }

    function mintWeapon() public onlyNonContract doesNotHaveMoreThanMaxCharacters oncePerBlock(msg.sender) requestPayFromPlayer(mintWeaponFee) {
        _payContract(msg.sender, mintWeaponFee);

        uint256 seed = randoms.getRandomSeed(msg.sender);
        weapons.mint(msg.sender, seed);
    }

    function burnWeapon(uint256 burnID) public
            doesNotHaveMoreThanMaxCharacters
            isWeaponOwner(burnID) requestPayFromPlayer(burnWeaponFee) {
        _payContract(msg.sender, burnWeaponFee);
        weapons.burn(burnID);
    }

    function burnWeapons(uint256[] memory burnIDs) public
            doesNotHaveMoreThanMaxCharacters
            isWeaponsOwner(burnIDs) requestPayFromPlayer(ABDKMath64x64.fromUInt(burnWeaponFee.mulu(burnIDs.length))) {
        _payContract(msg.sender, ABDKMath64x64.fromUInt(burnWeaponFee.mulu(burnIDs.length)));
        for(uint i = 0; i < burnIDs.length; i++) {
            weapons.burn(burnIDs[i]);
        }
    }

    function reforgeWeapon(uint256 reforgeID, uint256 burnID) public
            doesNotHaveMoreThanMaxCharacters
            isWeaponOwner(reforgeID) isWeaponOwner(burnID) requestPayFromPlayer(reforgeWeaponFee) {
        _payContract(msg.sender, reforgeWeaponFee);
        weapons.reforge(reforgeID, burnID);
    }

    function reforgeWeaponWithDust(uint256 reforgeID, uint8 amountLB, uint8 amount4B, uint8 amount5B) public
            doesNotHaveMoreThanMaxCharacters
            isWeaponOwner(reforgeID) requestPayFromPlayer(reforgeWeaponWithDustFee) {
        _payContract(msg.sender, reforgeWeaponWithDustFee);
        weapons.reforgeWithDust(reforgeID, amountLB, amount4B, amount5B);
    }

    function migrateRandoms(IRandoms _newRandoms) external {
        require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender), "Not admin");
        randoms = _newRandoms;
    }

    modifier onlyNonContract() {

Review comment (suggestion):
I don't think `ABDKMath64x64.fromUInt(burnWeaponFee.mulu(burnIDs.length))` will have the desired effect (for example, `3.5 * 3 = 10.5`, which would get rounded off to `10`). Instead I recommend `burnWeaponFee.mul(ABDKMath64x64.fromUInt(burnIDs.length))`.

```suggestion
            isWeaponsOwner(burnIDs) requestPayFromPlayer(burnWeaponFee.mul(ABDKMath64x64.fromUInt(burnIDs.length))) {
        _payContract(msg.sender, burnWeaponFee.mul(ABDKMath64x64.fromUInt(burnIDs.length)));
```

Code after:
                weapons.getRandomStat(4, 200, seed, 101),
                0, // stat2
                0, // stat3
                RandomUtil.combineSeeds(seed,102)
            );
        }
    }

    function mintWeapon() public onlyNonContract doesNotHaveMoreThanMaxCharacters oncePerBlock(msg.sender) requestPayFromPlayer(mintWeaponFee) {
        _payContract(msg.sender, mintWeaponFee);

        uint256 seed = randoms.getRandomSeed(msg.sender);
        weapons.mint(msg.sender, seed);
    }

    function burnWeapon(uint256 burnID) public
            doesNotHaveMoreThanMaxCharacters
            isWeaponOwner(burnID) requestPayFromPlayer(burnWeaponFee) {
        _payContract(msg.sender, burnWeaponFee);
        weapons.burn(burnID);
    }

    function burnWeapons(uint256[] memory burnIDs) public
            doesNotHaveMoreThanMaxCharacters
            isWeaponsOwner(burnIDs) requestPayFromPlayer(burnWeaponFee.mul(ABDKMath64x64.fromUInt(burnIDs.length))) {
        _payContract(msg.sender, burnWeaponFee.mul(ABDKMath64x64.fromUInt(burnIDs.length)));
        for(uint i = 0; i < burnIDs.length; i++) {
            weapons.burn(burnIDs[i]);
        }
    }

    function reforgeWeapon(uint256 reforgeID, uint256 burnID) public
            doesNotHaveMoreThanMaxCharacters
            isWeaponOwner(reforgeID) isWeaponOwner(burnID) requestPayFromPlayer(reforgeWeaponFee) {
        _payContract(msg.sender, reforgeWeaponFee);
        weapons.reforge(reforgeID, burnID);
    }

    function reforgeWeaponWithDust(uint256 reforgeID, uint8 amountLB, uint8 amount4B, uint8 amount5B) public
            doesNotHaveMoreThanMaxCharacters
            isWeaponOwner(reforgeID) requestPayFromPlayer(reforgeWeaponWithDustFee) {
        _payContract(msg.sender, reforgeWeaponWithDustFee);
        weapons.reforgeWithDust(reforgeID, amountLB, amount4B, amount5B);
    }

    function migrateRandoms(IRandoms _newRandoms) external {
        require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender), "Not admin");
        randoms = _newRandoms;
    }

    modifier onlyNonContract() {