Adding bosses to the game #6

Merged
mico merged 21 commits from feature/boss-mechanic into main 2024-10-31 13:56:05 +00:00
2 changed files with 7 additions and 3 deletions
Showing only changes of commit 9f6d94c8f7 - Show all commits

View File

@ -28,7 +28,7 @@ contract RaidGeld is ERC20, Ownable, Constants {
// Events // Events
event PlayerRegistered(address indexed player, uint256 initialGeld); event PlayerRegistered(address indexed player, uint256 initialGeld);
event PleyerStrikesAgain(address indexed player, uint256 totalRewards, uint256 initialGeld); event PlayerStrikesAgain(address indexed player, uint256 totalRewards, uint256 initialGeld);
event RaidPerformed(address indexed player, uint256 totalMinted, uint256 geldBalance); event RaidPerformed(address indexed player, uint256 totalMinted, uint256 geldBalance);
event UnitAdded( event UnitAdded(
address indexed player, address indexed player,
@ -80,8 +80,7 @@ contract RaidGeld is ERC20, Ownable, Constants {
players[player].n_runs += 1; players[player].n_runs += 1;
if (existing_player) { if (existing_player) {
// TODO: Emit new run emit PlayerStrikesAgain(player, players[player].total_rewards, INITIAL_GELD);
emit PleyerStrikesAgain(player, players[player].total_rewards, INITIAL_GELD);
} else { } else {
// Emit event // Emit event
emit PlayerRegistered(msg.sender, INITIAL_GELD); emit PlayerRegistered(msg.sender, INITIAL_GELD);

View File

@ -148,4 +148,9 @@ contract raid_geldTest is Test {
} }
console.log("Total", total); console.log("Total", total);
} }
function test_5_last_boss_is_unique(uint256 _randomSeed) public {
uint8[7] memory bosses = RaidGeldUtils.generate_boss_variants(_randomSeed);
vm.assertEq(bosses[6], 6);
}
} }