equal
deleted
inserted
replaced
22 local crates = {} |
22 local crates = {} |
23 local switcherGear |
23 local switcherGear |
24 local tookDamage = false |
24 local tookDamage = false |
25 local switchTextDelay = -1 |
25 local switchTextDelay = -1 |
26 local missionPanelConfirmed = false |
26 local missionPanelConfirmed = false |
|
27 local missionPanelConfirmedTimer = 0 |
27 local turnStarted = false |
28 local turnStarted = false |
28 |
29 |
29 local map = { |
30 local map = { |
30 "\1\74\7\29\135\1\74\8\11\0\1\83\7\135\135", |
31 "\1\74\7\29\135\1\74\8\11\0\1\83\7\135\135", |
31 "\1\250\7\135\0\1\204\7\137\135\1\238\7\135\0", |
32 "\1\250\7\135\0\1\204\7\137\135\1\238\7\135\0", |
416 switchTextDelay = 1 |
417 switchTextDelay = 1 |
417 end |
418 end |
418 end |
419 end |
419 |
420 |
420 local function firstMission() |
421 local function firstMission() |
421 -- This part is CRITICALLY important for all future missions. |
422 -- Here we teach player must know how to show the current mission texts again. |
422 -- Because the player must know how to show the current mission texts again. |
|
423 -- We force the player to hit Attack before the actual training begins. |
423 -- We force the player to hit Attack before the actual training begins. |
|
424 -- Later, the mission panel key is perma-shown as caption. |
424 local ctrl = "" |
425 local ctrl = "" |
425 if INTERFACE == "desktop" then |
426 if INTERFACE == "desktop" then |
426 ctrl = loc("IMPORTANT: To see the mission panel again, hold the mission panel key.").."| |".. |
427 ctrl = loc("IMPORTANT: To see the mission panel again, hold the mission panel key.").."| |".. |
427 loc("Note: This basic training assumes default controls.").."|".. |
428 loc("Note: This basic training assumes default controls.").."|".. |
428 loc("Mission panel: [M]").."|".. |
429 loc("Mission panel: [M]").."|".. |
455 end |
456 end |
456 if turnStarted and GameTime % 10000 == 0 and not missionPanelConfirmed then |
457 if turnStarted and GameTime % 10000 == 0 and not missionPanelConfirmed then |
457 -- Forces the first mission panel to be displayed without time limit |
458 -- Forces the first mission panel to be displayed without time limit |
458 firstMission() |
459 firstMission() |
459 end |
460 end |
|
461 if missionPanelConfirmed then |
|
462 missionPanelConfirmedTimer = missionPanelConfirmedTimer + 20 |
|
463 --[[ After confirming the initial mission panel, |
|
464 show the mission panel key as permanent caption |
|
465 so the player can't overlook or forget it. ]] |
|
466 if missionPanelConfirmedTimer > 7000 then |
|
467 if INTERFACE == "desktop" then |
|
468 AddCaption(loc("Press [M] to see the mission texts"), capcolDefault, capgrpMessage2) |
|
469 elseif INTERFACE == "touch" then |
|
470 AddCaption(loc("Tap [Pause] to see the mission texts"), capcolDefault, capgrpMessage2) |
|
471 end |
|
472 end |
|
473 end |
460 end |
474 end |
461 |
475 |
462 function onGearResurrect(gear, vGear) |
476 function onGearResurrect(gear, vGear) |
463 AddCaption(loc("Your hedgehog has been revived!")) |
477 AddCaption(loc("Your hedgehog has been revived!")) |
464 if gear == hog_cappy then |
478 if gear == hog_cappy then |