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:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user