Add levelling up mechanics through experience gained via killing enemies
This commit is contained in:
@@ -61,7 +61,8 @@ vi.mock('phaser', () => {
|
||||
vi.mock('../../rendering/DungeonRenderer', () => ({
|
||||
DungeonRenderer: vi.fn().mockImplementation(function() {
|
||||
return {
|
||||
initializeLevel: vi.fn(),
|
||||
initializeFloor: vi.fn(),
|
||||
|
||||
computeFov: vi.fn(),
|
||||
render: vi.fn(),
|
||||
showDamage: vi.fn(),
|
||||
@@ -78,7 +79,8 @@ vi.mock('../../engine/simulation/simulation', () => ({
|
||||
}));
|
||||
|
||||
vi.mock('../../engine/world/generator', () => ({
|
||||
makeTestWorld: vi.fn(),
|
||||
generateWorld: vi.fn(),
|
||||
|
||||
}));
|
||||
|
||||
vi.mock('../../engine/world/world-logic', () => ({
|
||||
@@ -133,7 +135,8 @@ describe('GameScene', () => {
|
||||
};
|
||||
mockWorld.actors.set(1, mockPlayer);
|
||||
|
||||
(generator.makeTestWorld as any).mockReturnValue({
|
||||
(generator.generateWorld as any).mockReturnValue({
|
||||
|
||||
world: mockWorld,
|
||||
playerId: 1,
|
||||
});
|
||||
@@ -170,7 +173,8 @@ describe('GameScene', () => {
|
||||
|
||||
// Verify it was called with some stats
|
||||
const callArgs = mockUI.showDeathScreen.mock.calls[0][0];
|
||||
expect(callArgs).toHaveProperty('level');
|
||||
expect(callArgs).toHaveProperty('floor');
|
||||
|
||||
expect(callArgs).toHaveProperty('gold');
|
||||
expect(callArgs).toHaveProperty('stats');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user