1
This commit is contained in:
parent
2c0c2e4f9c
commit
fc6130fdb2
@ -0,0 +1,10 @@
|
||||
[
|
||||
{
|
||||
"address": "",
|
||||
"type": "hero",
|
||||
"item_id": 30900,
|
||||
"level": 1,
|
||||
"quality": 1,
|
||||
"token_id": 6240619010000001
|
||||
}
|
||||
]
|
@ -22,14 +22,42 @@ function mint() {
|
||||
outItem['type'] = 'hero';
|
||||
outItem['item_id'] = common.heroList[utils.randRange(0, common.heroList.length)];
|
||||
outItem['level'] = 1;
|
||||
outItem['quality'] = utils.randRange(1, 3);
|
||||
outItem['quality'] = 1;
|
||||
outItem['token_id'] = tokenId;
|
||||
outJson.push(outItem);
|
||||
++seqId;
|
||||
}
|
||||
const totalNum = 2168;
|
||||
const highHeroNum = 200;
|
||||
{
|
||||
let num = 0;
|
||||
while (true) {
|
||||
const rndIdx = utils.randRange(startTokenId, startTokenId + totalNum - 1) - startTokenId;
|
||||
if (outJson[rndIdx]['quality'] != 2) {
|
||||
outJson[rndIdx]['quality'] = 2;
|
||||
++num;
|
||||
}
|
||||
if (num >= highHeroNum) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
let highNum = 0;
|
||||
outJson.forEach((val) => {
|
||||
if (val.quality > 1) {
|
||||
highNum++;
|
||||
}
|
||||
if (val.quality <0 ||
|
||||
val.quality > 2) {
|
||||
console.log('error');
|
||||
}
|
||||
});
|
||||
console.log('highNum', highNum);
|
||||
}
|
||||
const airDropDate = '24060301';
|
||||
fs.writeFileSync(
|
||||
`../bin_dev/web3tools/config/airdrops/${airDropDate}.airdrop.json`,
|
||||
`../bin_dev/web3tools/config/second_airdrops/${airDropDate}.airdrop.json`,
|
||||
utils.prettyJsonEncode(outJson));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user