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

@@ -45,11 +45,19 @@ export default class TransitionScene extends Phaser.Scene {
wordWrap: { width: 660 }
}).setOrigin(0.5);
// Fuel cost display
this.add.text(400, 500, `Fuel consumed: ${this.fuelCost} units`, {
fontSize: '16px',
fill: '#ffff00'
}).setOrigin(0.5);
// Fuel cost display (only if there's a cost)
if (this.fuelCost > 0) {
this.add.text(400, 500, `Fuel consumed: ${this.fuelCost} units`, {
fontSize: '16px',
fill: '#ffff00'
}).setOrigin(0.5);
} else {
this.add.text(400, 500, 'The wind carries your sails...', {
fontSize: '16px',
fill: '#cccccc',
fontStyle: 'italic'
}).setOrigin(0.5);
}
// Continue button
const continueBtn = this.add.rectangle(400, 540, 200, 50, 0x2d5f8e);
@@ -72,8 +80,10 @@ export default class TransitionScene extends Phaser.Scene {
});
continueBtn.on('pointerdown', () => {
// Deduct fuel
this.inventory.fuel -= this.fuelCost;
// Deduct fuel (if any cost)
if (this.fuelCost > 0) {
this.inventory.fuel -= this.fuelCost;
}
// Proceed to next scene
this.scene.start(this.nextScene, { inventory: this.inventory });