tonygustafsson / lostseas-php

This is a totally free pirate-influenced, web based game (no signup needed). You will travel from town to town, and encounter many ships on the Caribbean Sea. Accumulate riches, ships and new crew members. Try to level up and be promoted!
7 stars 0 forks source link

Add missions #2

Open tonygustafsson opened 4 years ago

tonygustafsson commented 4 years ago

Multiple missions should be allowed at once, and each mission can have multiple progress steps. It will be stored as JSON in game table as column ‘missions’.

Missionlib

GUI

Have a mission label in the Inventory underneath the Title and Level. Even if there are no missions active.

When clicked upon, a special mission page will show current missions. Old missions are cleared from the database, and only viewable in the log book. I think it would be too much info for the JSON object to keep them all. Should be clear what step is the next.

JSON example

missions: [
    {
        progress: [
            {
                description: 'Please go to the my uncle in San Juan, he his an accountant at the bank there.',
                town: 'sanjuan',
                place: 'bank',
                done: false
            },
            {
                description: 'I know that guy. unfortionally the item has moved to Montenique. I think he is at the tavern.',
                town: 'sanjuan',
                place: 'bank',
                done: false
            },
            {
                description: 'Here you go, you are welcome. Go back to X and tell him hi from me.',
                done: false,
                town: 'sanjuan',
                place: 'bank',
                lastTask: true,
                rewardAmount: 1000,
                rewardItem: 'doubloons'
            },
        ]
    }
]