Decouple travel and cooking fuel mechanics

- Travel is now free (no fuel cost for sailing between locations)
- Fuel is only consumed for cooking whale oil (2 fuel per whale)
- Updated TransitionScene to show "The wind carries your sails..." when no fuel cost
- Removed fuel checks from MapScene travel methods
- Added fuel validation in HuntingScene - can't process whales without fuel
- This sets up the penguin burning mechanic for when cooking fuel runs low

🤖 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 03:34:44 +01:00
parent ee45c9015c
commit 09a1b7a537
3 changed files with 45 additions and 26 deletions

View File

@@ -366,6 +366,24 @@ export default class HuntingScene extends Phaser.Scene {
whale.setData('alive', false);
harpoon.setData('active', false);
// Check if enough fuel to process the whale
if (this.inventory.fuel < 2) {
// Not enough fuel to cook the oil!
this.tweens.add({
targets: whale,
alpha: 0,
y: whale.y + 50,
duration: 1000,
onComplete: () => {
whale.destroy();
}
});
harpoon.destroy();
this.showMessage('Whale hit but no fuel to process it! Need 2 fuel to cook whale oil.');
return;
}
// Whale death animation
this.tweens.add({
targets: whale,
@@ -381,13 +399,16 @@ export default class HuntingScene extends Phaser.Scene {
// Remove harpoon
harpoon.destroy();
// Consume fuel for processing
this.inventory.fuel -= 2;
// Reward
this.inventory.whaleOil += 1;
this.whalesHunted++;
this.updateStats();
// Show success message
this.showMessage(`Whale hunted! +1 Whale Oil (Total: ${this.inventory.whaleOil})`);
this.showMessage(`Whale hunted! +1 Whale Oil, -2 Fuel (Oil: ${this.inventory.whaleOil}, Fuel: ${this.inventory.fuel})`);
// Success flash
const flash = this.add.rectangle(400, 300, 800, 600, 0xffffff, 0.3);