# ============================================================
# Dialogic 2 Test Timeline — Feature Showcase
# ============================================================
# Characters available:
#   Miko     — portraits: neutral, smile, joy, anger, shock
#   Advisor  — portraits: pl5, blink, doubt, surprise
#   Merchant — portraits: happy, blink, surprise, confusion
# ============================================================

# ---- SETUP: Variables --------------------------------------
set {Museum.coins} = 0
set {Museum.player_has_key} = false
set {Museum.met_merchant} = false

# ---- LABEL: opening ----------------------------------------
label opening

# Join both main characters at the start
join Miko center
join Advisor right

Miko (joy): Welcome to the Dialogic 2 Test Timeline!
Advisor (pl5): This timeline showcases all major Dialogic features.

# ---- TEXT: BBCode & text effects --------------------------
Miko (joy): Hi there! I'm Miko, and this is a [b]bold[/b] text test.
Miko (joy): [speed=0.02]I can speak slowly too...
Miko (joy): And now I'm back to normal speed.

Advisor (pl5): Remember, [color=red]colored text[/color] works as well.
Advisor (pl5): [pause=1.0] ...and so do timed pauses.

# ---- CONDITION: Variable-based branching ------------------
if {Museum.coins} == 0:
	Miko (doubt): I don't have any coins yet. Let's find some!
	Advisor (doubt): We should look around carefully.
else:
	Miko (joy): Nice, I already have some coins!
	Advisor (pl5): Good. That will come in handy.

# ---- VARIABLE: Set a variable -----------------------------
set {Museum.coins} = 10

Miko (joy): [shake]Look![/shake] I just found 10 coins.

# ---- LABEL: merchant_encounter ----------------------------
label merchant_encounter

join Merchant left

Miko (neutral): A merchant appeared. Let's see what he has.
Advisor (doubt): Be cautious, Miko. Don't reveal everything you carry.

Merchant (happy): Welcome, traveler! Would you like to see my wares?

# ---- CHOICE: Branching dialog -----------------------------
- Yes, show me what you've got!
	set {Museum.met_merchant} = true
	Miko (joy): Absolutely, show me your best items!
	Merchant (happy): Excellent choice! I have potions, scrolls, and enchanted blades.
	Merchant (blink): That will be {10/15/20} gold coins, please!
	set {Museum.coins} = -10
	Miko (shock): Here you go! That was expensive...
	Advisor (blink): Did you really have to spend all our coins?

- Not right now, maybe later.
	Miko (neutral): I'll come back when I have more gold.
	Merchant (happy): Suit yourself. The door is always open.
	Advisor (pl5): A wise decision.

- Use the ancient key to barter. | [if {Museum.player_has_key}]
	Miko (smile): I have this ancient key. Will you trade for it?
	Merchant (surprise): [shake]A key from the old kingdom?![/shake] Take anything you want!
	set {Museum.player_has_key} = false
	Miko (joy): That was a great deal!
	Advisor (surprise): You traded the key?! That was reckless...

# ---- SIGNAL: Emit a custom signal -------------------------
[signal arg=item_bought]

Merchant (happy): Pleasure doing business with you!
Miko (smile): Thanks, merchant!
Advisor (pl5): Let's keep moving. We have ground to cover.

# ---- WAIT: Timed pause (seconds) --------------------------
[wait time="1.0"]

Miko (neutral): Let's keep exploring.

# ---- JUMP & LABEL: Navigation -----------------------------
jump secret_room

# ---- LABEL: farewell (unreachable via normal flow) --------
label farewell
Miko (smile): Goodbye for now!
Advisor (pl5): Until next time.
[end_timeline]

# ---- LABEL: secret_room -----------------------------------
label secret_room

leave Merchant
Miko (surprise): Hey, the merchant disappeared... and there's a hidden door here!
Advisor (doubt): Careful, Miko. We don't know what's inside.
Miko (neutral): You're right, but we have to check it out.
Advisor (pl5): Very well. I'll follow your lead.

# ---- CONDITION with ELSE ----------------------------------
if {Museum.player_has_key}:
	Miko (joy): Good thing we still have the ancient key. Let's open it!
	Advisor (surprise): The key glows faintly as you approach.
	Miko (smile): Here goes nothing...
	[signal arg=door_opened]
else:
	Miko (anger): Darn, we used the key at the shop. How do we open this?
	Advisor (pl5): Maybe we can find another way around.
	Miko (doubt): I guess we'll have to search for another entrance.
	Advisor (doubt): Patience. Every lock has its key.

# ---- JUMP to farewell label -------------------------------
Miko (smile): Well, that's the end of the test timeline!
Advisor (pl5): A successful demonstration, I'd say.
jump farewell
# End