Hide penguin references until feature is discovered

- Penguin inventory line only shows when penguins > 0
- Penguin cage and emoji on ship deck hidden until discovered
- Antarctic Island description made mysterious (no penguin mention)
- Penguin cage visibility updates when inventory changes
- Creates surprise discovery moment when visiting Antarctic Island
- Maintains dark humor reveal during gameplay

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Thomas Richter
2025-12-15 04:13:22 +01:00
parent 2b8be8c9f2
commit bc95f94d1b
2 changed files with 40 additions and 16 deletions

View File

@@ -34,9 +34,9 @@ export default class MapScene extends Phaser.Scene {
'Rich waters where whales gather. Dangerous but profitable!',
() => this.goToHunting());
// Antarctic Island (for penguins)
// Antarctic Island
this.createLocation(600, 450, 'ANTARCTIC\nISLAND', 0xE0E0E0,
'Cold, desolate islands inhabited by penguins...',
'Cold, desolate islands. Who knows what resources might be found...',
() => this.goToAntarctic());
// Port
@@ -126,12 +126,18 @@ export default class MapScene extends Phaser.Scene {
}
updateInventoryDisplay() {
this.inventoryText.setText([
const lines = [
'Inventory:',
`Fuel: ${this.inventory.fuel}/100`,
`Oil: ${this.inventory.whaleOil}/50`,
`Penguins: ${this.inventory.penguins}/20`
]);
`Oil: ${this.inventory.whaleOil}/50`
];
// Only show penguins if discovered (have at least one)
if (this.inventory.penguins > 0) {
lines.push(`Penguins: ${this.inventory.penguins}/20`);
}
this.inventoryText.setText(lines);
}
createMessageBox() {

View File

@@ -76,16 +76,21 @@ export default class ShipDeckScene extends Phaser.Scene {
this.showMessage(`Whale oil: ${this.inventory.whaleOil} barrels. Your precious cargo!`);
});
// Penguin cage (dark humor ahead)
const penguinCage = this.add.rectangle(650, 350, 80, 80, 0x333333);
penguinCage.setInteractive({ useHandCursor: true });
penguinCage.setStrokeStyle(3, 0x000000);
// Penguin cage (hidden until discovered)
this.penguinCage = this.add.rectangle(650, 350, 80, 80, 0x333333);
this.penguinCage.setInteractive({ useHandCursor: true });
this.penguinCage.setStrokeStyle(3, 0x000000);
this.add.text(650, 350, '🐧', {
this.penguinEmoji = this.add.text(650, 350, '🐧', {
fontSize: '32px'
}).setOrigin(0.5);
penguinCage.on('pointerdown', () => {
// Hide penguin elements if not yet discovered
const discovered = this.inventory.penguins > 0;
this.penguinCage.setVisible(discovered);
this.penguinEmoji.setVisible(discovered);
this.penguinCage.on('pointerdown', () => {
if (this.inventory.penguins > 0) {
this.showMessage(`${this.inventory.penguins} penguins. They're... emergency fuel. Dark times call for dark measures.`);
} else {
@@ -130,12 +135,25 @@ export default class ShipDeckScene extends Phaser.Scene {
}
updateInventoryDisplay() {
this.inventoryText.setText([
const lines = [
'Inventory:',
`Fuel: ${this.inventory.fuel}/100`,
`Oil: ${this.inventory.whaleOil}/50`,
`Penguins: ${this.inventory.penguins}/20`
]);
`Oil: ${this.inventory.whaleOil}/50`
];
// Only show penguins if discovered (have at least one)
const discovered = this.inventory.penguins > 0;
if (discovered) {
lines.push(`Penguins: ${this.inventory.penguins}/20`);
}
this.inventoryText.setText(lines);
// Update penguin cage visibility
if (this.penguinCage) {
this.penguinCage.setVisible(discovered);
this.penguinEmoji.setVisible(discovered);
}
}
createMessageBox() {