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:
@@ -34,9 +34,9 @@ export default class MapScene extends Phaser.Scene {
|
|||||||
'Rich waters where whales gather. Dangerous but profitable!',
|
'Rich waters where whales gather. Dangerous but profitable!',
|
||||||
() => this.goToHunting());
|
() => this.goToHunting());
|
||||||
|
|
||||||
// Antarctic Island (for penguins)
|
// Antarctic Island
|
||||||
this.createLocation(600, 450, 'ANTARCTIC\nISLAND', 0xE0E0E0,
|
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());
|
() => this.goToAntarctic());
|
||||||
|
|
||||||
// Port
|
// Port
|
||||||
@@ -126,12 +126,18 @@ export default class MapScene extends Phaser.Scene {
|
|||||||
}
|
}
|
||||||
|
|
||||||
updateInventoryDisplay() {
|
updateInventoryDisplay() {
|
||||||
this.inventoryText.setText([
|
const lines = [
|
||||||
'Inventory:',
|
'Inventory:',
|
||||||
`Fuel: ${this.inventory.fuel}/100`,
|
`Fuel: ${this.inventory.fuel}/100`,
|
||||||
`Oil: ${this.inventory.whaleOil}/50`,
|
`Oil: ${this.inventory.whaleOil}/50`
|
||||||
`Penguins: ${this.inventory.penguins}/20`
|
];
|
||||||
]);
|
|
||||||
|
// 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() {
|
createMessageBox() {
|
||||||
|
|||||||
@@ -76,16 +76,21 @@ export default class ShipDeckScene extends Phaser.Scene {
|
|||||||
this.showMessage(`Whale oil: ${this.inventory.whaleOil} barrels. Your precious cargo!`);
|
this.showMessage(`Whale oil: ${this.inventory.whaleOil} barrels. Your precious cargo!`);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Penguin cage (dark humor ahead)
|
// Penguin cage (hidden until discovered)
|
||||||
const penguinCage = this.add.rectangle(650, 350, 80, 80, 0x333333);
|
this.penguinCage = this.add.rectangle(650, 350, 80, 80, 0x333333);
|
||||||
penguinCage.setInteractive({ useHandCursor: true });
|
this.penguinCage.setInteractive({ useHandCursor: true });
|
||||||
penguinCage.setStrokeStyle(3, 0x000000);
|
this.penguinCage.setStrokeStyle(3, 0x000000);
|
||||||
|
|
||||||
this.add.text(650, 350, '🐧', {
|
this.penguinEmoji = this.add.text(650, 350, '🐧', {
|
||||||
fontSize: '32px'
|
fontSize: '32px'
|
||||||
}).setOrigin(0.5);
|
}).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) {
|
if (this.inventory.penguins > 0) {
|
||||||
this.showMessage(`${this.inventory.penguins} penguins. They're... emergency fuel. Dark times call for dark measures.`);
|
this.showMessage(`${this.inventory.penguins} penguins. They're... emergency fuel. Dark times call for dark measures.`);
|
||||||
} else {
|
} else {
|
||||||
@@ -130,12 +135,25 @@ export default class ShipDeckScene extends Phaser.Scene {
|
|||||||
}
|
}
|
||||||
|
|
||||||
updateInventoryDisplay() {
|
updateInventoryDisplay() {
|
||||||
this.inventoryText.setText([
|
const lines = [
|
||||||
'Inventory:',
|
'Inventory:',
|
||||||
`Fuel: ${this.inventory.fuel}/100`,
|
`Fuel: ${this.inventory.fuel}/100`,
|
||||||
`Oil: ${this.inventory.whaleOil}/50`,
|
`Oil: ${this.inventory.whaleOil}/50`
|
||||||
`Penguins: ${this.inventory.penguins}/20`
|
];
|
||||||
]);
|
|
||||||
|
// 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() {
|
createMessageBox() {
|
||||||
|
|||||||
Reference in New Issue
Block a user