Lamakan Desert Smog
Lamakan Desert, south of Lama Temple: four scenes that share one cue table, built around a heat gauge and the secrets Reveal uncovers.
The party crosses it from the east. The first scene
(SceneIdLamakanDesertEast) is entered from the World Map in its south-east
corner and leads north. The second, the widest (SceneIdLamakanDesertSmog), is
scattered with rings of rocks, cacti and skeletons, and hides Smog, a Jupiter
Djinni; it leads out west. The third (SceneIdLamakanDesertManticore) has
rivers of sand that carry the party south, with sandfalls at their heads.
Behind two of them lie passages into a cave (SceneIdLamakanDesertCave): the
east and south ones into a small cavern, and the north-west one, which the
Manticore guards, into a corridor that leads out west to the World Map. The
cave has no heat gauge.
Walking on the sand fills a thermometer down the screen's left edge
(scHeatGaugeDraw), faster on the run. As it passes a quarter, a half and
three quarters, Garet, Ivan or Mia complains of the heat
(scLamakanDesertComplainAboutHeat); when it is full, the party loses a
quarter of its HP and it starts again. The steps are counted in
MainRoutineStateWork.hazardSteps against HEAT_LIMIT.
Most rings of rocks hide something only Reveal shows: an oasis, an Ant Lion's
pit, a chest or a Psynergy Stone, and in the second scene Smog. On entry each
hidden patch of the map is saved aside and covered with plain sand under a
shimmering heat haze (scRevealHideSecrets); Reveal brings them back and
stills the haze (scRevealShowSecrets) until it wears off. The oases and the
pits are there only while Reveal shines, as the monks of Lama Temple warn:
Reveal will help you find oases to cool you against the heat. Stepping into
an oasis, Isaac hops in and bathes until the heat has drained
(scLamakanDesertBatheInOasis); stepping by a pit, he is pulled into it and an
Ant Lion attacks (scLamakanDesertFallIntoPit).
In the third scene Reveal also parts the sandfalls over the passages, and
shows the Manticore standing in the north-west one. Until it is beaten
(FLAG_LAMAKAN_MANTICORE_BEATEN), coming near makes it roar and lunge at Isaac
(scLamakanDesertMeetManticore), and talking to it starts its battle.
Leaving the corridor for the World Map while Hsu is still trapped at the
Alpine Crossing (FLAG_HSU_RESCUED clear) frees him without the party: it sets
FLAG_HSU_RESCUED and FLAG_HSU_RESCUED_WITHOUT_PARTY, and in Xian Feizhi then
thanks Master Hama alone (lacquer_rooms_b.c).


Events
scLamakanDesertBatheInOasis
Stepping into an oasis in Lamakan Desert, which only Reveal shows in its ring of rocks, Isaac hops into the middle of the pool and bathes with a heart over his head while the heat gauge drains, for at least a second, then hops out.

scHeatGaugeCountStep
Walking on Lamakan Desert's sand fills the heat gauge and kicks up little puffs of dust at Isaac's feet, bigger and more often on the run.
Every tick he moves adds a step of heat, running or not; on the rivers of sand it adds heat without the dust.
scLamakanDesertFallIntoPit
Stepping beside an Ant Lion's pit in Lamakan Desert, which only Reveal shows in its ring of rocks, Isaac turns his back to it and is dragged backwards into it in a spray of sand, and an Ant Lion attacks.

scLamakanDesertSlipDownSand
On a river of sand in Lamakan Desert's third scene, the sand carries Isaac south, about a metatile every ten ticks, in a spray of sand, until something stops him.
Where the river drops over a ledge, he gives a start and leaps down.
In lamakan_desert.c, line 1045
scLamakanDesertLeaveForTheWorldMap
Walking out of the west end of the cave corridor behind the Manticore (metatile) leaves Lamakan Desert for the World Map.

Walking out of the west end of the cave corridor behind the Manticore (metatile (8, 19)) leaves Lamakan Desert for the World Map. If Hsu is still trapped at the Alpine Crossing, he is freed without the party from then on.
scLamakanDesertMeetManticore
Coming near the north-west passage of Lamakan Desert's third scene, once Reveal has parted its sandfall and shown the Manticore standing in it, Isaac stops short, startled, and backs away as the Manticore roars, lunges at him and settles back.

It happens each time until the Manticore is beaten.
In lamakan_desert.c, line 1133
scRevealHideSecrets
Reveal wears off, and the desert's secrets sink under the sand again.

scRevealShowSecrets
Casting Reveal uncovers what the desert's sand hides.

scLamakanDesertFightManticore
Talking to the Manticore before the north-west passage of Lamakan Desert's third scene makes it rear up and starts the battle.

Afterwards the party
stands where it fought, below the opened passage, and the Manticore is gone
for good (LAMAKAN_DESERT_MANTICORE_AFTER_FIGHT_MANTICORE).
scLamakanDesertComplainAboutHeat
As Lamakan Desert's heat gauge passes a quarter, a half and three quarters, Garet, Ivan or Mia, picked at random, complains of the heat.

scLamakanDesertTalkToSmog
Talking to Smog, the Jupiter Djinni Reveal uncovers in a ring of rocks east of the middle of Lamakan Desert's second scene, makes it join the party.

Its code is in lamakan_desert.c.