|
|
@ -71,7 +71,8 @@ contract Main is Owned {
|
|
|
|
/// @param from Sender of the bombs
|
|
|
|
/// @param from Sender of the bombs
|
|
|
|
/// @param tokenId Unaboomer token which was targeted
|
|
|
|
/// @param tokenId Unaboomer token which was targeted
|
|
|
|
/// @param hit Whether or not the bomb killed the token or not (was a dud / already killed)
|
|
|
|
/// @param hit Whether or not the bomb killed the token or not (was a dud / already killed)
|
|
|
|
event SentBomb(address indexed from, uint256 indexed tokenId, bool hit);
|
|
|
|
/// @param owned Whether or not the sender was the owner of the BOOMR token
|
|
|
|
|
|
|
|
event SentBomb(address indexed from, uint256 indexed tokenId, bool hit, bool owned);
|
|
|
|
|
|
|
|
|
|
|
|
constructor() Owned(msg.sender) {}
|
|
|
|
constructor() Owned(msg.sender) {}
|
|
|
|
|
|
|
|
|
|
|
@ -201,7 +202,8 @@ contract Main is Owned {
|
|
|
|
uint256 randomBoomer = uint256(keccak256(abi.encodePacked(i, block.timestamp, msg.sender))) % supply;
|
|
|
|
uint256 randomBoomer = uint256(keccak256(abi.encodePacked(i, block.timestamp, msg.sender))) % supply;
|
|
|
|
bool dud = unaboomer.tokenDead(randomBoomer);
|
|
|
|
bool dud = unaboomer.tokenDead(randomBoomer);
|
|
|
|
unaboomer.die(randomBoomer);
|
|
|
|
unaboomer.die(randomBoomer);
|
|
|
|
emit SentBomb(msg.sender, randomBoomer, !dud);
|
|
|
|
bool senderOwned = msg.sender == unaboomer.ownerOf(randomBoomer);
|
|
|
|
|
|
|
|
emit SentBomb(msg.sender, randomBoomer, !dud, senderOwned);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
mailbomb.explode(msg.sender, _amount);
|
|
|
|
mailbomb.explode(msg.sender, _amount);
|
|
|
|
}
|
|
|
|
}
|
|
|
|