From 79a2cd37782cfa1642133a72e657f9ae30f6ae09 Mon Sep 17 00:00:00 2001 From: StillHammer Date: Sun, 21 Sep 2025 14:15:22 +0800 Subject: [PATCH] Add NCE modules integration and enhanced wizard effects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add 3 NCE content modules (NCE1-Lesson63-64, NCE2-Lesson3, NCE2-Lesson30) - Integrate NCE modules in content-scanner, game-loader, navigation - Add sentences extracted from stories for better game compatibility - Add meteor spells to NCE1 (15+ word sentences for wizard game) - Enhanced wizard spell effects with particles and casting animations - Update games-config.json with NCE module configurations Note: Architecture needs refactoring - too many interdependencies Current state has issues that need systematic cleanup 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- config/games-config.json | 27 + js/content/NCE1-Lesson63-64.js | 850 +++++++++++ js/content/NCE2-Lesson3.js | 1134 +++++++++++++++ js/content/NCE2-Lesson30.js | 785 +++++++++++ js/content/SBS-level-1.js | 8 +- js/content/WTA1B1-documented.js | 1252 ++++++++++++++++ js/core/content-game-compatibility.js | 626 -------- js/core/content-scanner.js | 122 +- js/core/game-loader.js | 8 +- js/core/navigation.js | 34 +- js/games/wizard-spell-caster.js | 1881 +++++++++++++++++++++++++ 11 files changed, 6064 insertions(+), 663 deletions(-) create mode 100644 js/content/NCE1-Lesson63-64.js create mode 100644 js/content/NCE2-Lesson3.js create mode 100644 js/content/NCE2-Lesson30.js create mode 100644 js/content/WTA1B1-documented.js delete mode 100644 js/core/content-game-compatibility.js create mode 100644 js/games/wizard-spell-caster.js diff --git a/config/games-config.json b/config/games-config.json index 6c17367..0220c09 100644 --- a/config/games-config.json +++ b/config/games-config.json @@ -214,6 +214,33 @@ "difficulty": "intermediate", "vocabulary_count": 10, "topics": ["adventure", "story", "reading", "sentence_chunking", "word_translation"] + }, + "nce1-lesson63-64": { + "enabled": true, + "name": "NCE1-Lesson63-64", + "icon": "👨‍⚕️", + "description": "Medical dialogue and prohibition commands with modal verbs", + "difficulty": "intermediate", + "vocabulary_count": 120, + "topics": ["medical", "modal_verbs", "imperatives", "safety_rules"] + }, + "nce2-lesson3": { + "enabled": true, + "name": "NCE2-Lesson3", + "icon": "✉️", + "description": "Please Send Me a Card - Past tense and travel vocabulary", + "difficulty": "intermediate", + "vocabulary_count": 150, + "topics": ["past_tense", "travel", "postcards", "holidays", "grammar"] + }, + "nce2-lesson30": { + "enabled": true, + "name": "NCE2-Lesson30", + "icon": "⚽", + "description": "Football or Polo? - Articles and quantifiers", + "difficulty": "intermediate", + "vocabulary_count": 180, + "topics": ["articles", "quantifiers", "sports", "past_continuous", "grammar"] } }, "settings": { diff --git a/js/content/NCE1-Lesson63-64.js b/js/content/NCE1-Lesson63-64.js new file mode 100644 index 0000000..7425258 --- /dev/null +++ b/js/content/NCE1-Lesson63-64.js @@ -0,0 +1,850 @@ +// === ENGLISH MEDICAL AND SAFETY LESSONS === +// Lessons 63-64: Doctor visit and prohibition commands with Chinese translation + +window.ContentModules = window.ContentModules || {}; + +window.ContentModules.NCE1Lesson6364 = { + id: "nce1-lesson63-64", + name: "NCE1-Lesson63-64", + description: "English medical dialogue and prohibition commands with modal verbs", + difficulty: "intermediate", + language: "en-US", + userLanguage: "zh-CN", + totalWords: 120, + + // === GRAMMAR LESSONS SYSTEM === + grammar: { + "modal-must-mustnot": { + title: "Modal Verbs: Must and Mustn't - 情态动词must和mustn't", + explanation: "English uses 'must' for strong obligation and 'mustn't' for prohibition.", + rules: [ + "must + verb - for strong necessity: You must stay in bed", + "mustn't + verb - for prohibition: You mustn't get up yet", + "Must + subject + verb? - for questions: Must he stay in bed?", + "No contraction for positive must, but mustn't = must not" + ], + examples: [ + { + english: "You must stay in bed.", + chinese: "你必须卧床休息。", + explanation: "Use 'must' for strong obligation or medical advice", + pronunciation: "ju mʌst steɪ ɪn bed" + }, + { + english: "You mustn't get up yet.", + chinese: "你还不能起床。", + explanation: "Use 'mustn't' for prohibition or things not allowed", + pronunciation: "ju mʌsnt get ʌp jet" + }, + { + english: "Must he stay in bed?", + chinese: "他必须卧床吗?", + explanation: "Use 'Must' at the start for yes/no questions", + pronunciation: "mʌst hi steɪ ɪn bed" + }, + { + english: "He mustn't eat rich food.", + chinese: "他不能吃油腻食物。", + explanation: "Use 'mustn't' for medical restrictions", + pronunciation: "hi mʌsnt it rɪtʃ fud" + }, + { + english: "You must keep the room warm.", + chinese: "你必须保持房间温暖。", + explanation: "Use 'must' for important instructions", + pronunciation: "ju mʌst kip ðə rum wɔrm" + }, + { + english: "The boy mustn't go to school yet.", + chinese: "这个男孩还不能去上学。", + explanation: "Use 'mustn't' for temporary restrictions", + pronunciation: "ðə bɔɪ mʌsnt gəʊ tu skul jet" + } + ], + exercises: [ + { + type: "fill_blank", + sentence: "You _____ stay in bed for two days.", + options: ["must", "mustn't", "can", "can't"], + correct: "must", + explanation: "Use 'must' for medical necessity" + }, + { + type: "fill_blank", + sentence: "He _____ eat rich food when he's sick.", + options: ["must", "mustn't", "should", "can"], + correct: "mustn't", + explanation: "Use 'mustn't' for medical restrictions" + } + ] + }, + + "imperatives-commands": { + title: "Imperative Commands - 祈使句", + explanation: "English uses imperatives to give commands, instructions, or make requests.", + rules: [ + "Positive commands: Verb + object: Come upstairs", + "Negative commands: Don't + verb: Don't take medicine", + "No subject pronoun needed in commands", + "Use for instructions, warnings, and advice" + ], + examples: [ + { + english: "Come upstairs.", + chinese: "上楼来。", + explanation: "Positive command - just use the base verb", + pronunciation: "kʌm ʌpstɛrz" + }, + { + english: "Don't take any aspirins.", + chinese: "不要吃任何阿司匹林。", + explanation: "Negative command - Don't + base verb", + pronunciation: "dəʊnt teɪk eni æspɪrɪnz" + }, + { + english: "Don't play with matches.", + chinese: "不要玩火柴。", + explanation: "Safety warning using negative command", + pronunciation: "dəʊnt pleɪ wɪð mætʃɪz" + }, + { + english: "Don't make a noise.", + chinese: "不要制造噪音。", + explanation: "Polite request using negative command", + pronunciation: "dəʊnt meɪk ə nɔɪz" + }, + { + english: "Don't drive so quickly.", + chinese: "不要开得这么快。", + explanation: "Safety advice using negative command", + pronunciation: "dəʊnt draɪv səʊ kwɪkli" + }, + { + english: "Don't break that vase.", + chinese: "不要打破那个花瓶。", + explanation: "Warning using negative command", + pronunciation: "dəʊnt breɪk ðæt vɑːz" + } + ], + exercises: [ + { + type: "transformation", + instruction: "Make this a negative command:", + original: "Take this medicine.", + correct: "Don't take this medicine.", + explanation: "Add 'Don't' before the verb" + } + ] + }, + + "present-simple-questions": { + title: "Present Simple Questions - 一般现在时疑问句", + explanation: "English forms questions differently for 'be' verbs and other verbs.", + rules: [ + "With 'be': Be + subject: How's Jimmy? Where's Mr. Williams?", + "With other verbs: Do/Does + subject + verb: Does he have a temperature?", + "Question words come first: How, What, Where, When" + ], + examples: [ + { + english: "How's Jimmy today?", + chinese: "吉米今天怎么样?", + explanation: "Question with 'be' verb - How + is contracted", + pronunciation: "haʊz dʒɪmi tədeɪ" + }, + { + english: "Where's Mr. Williams?", + chinese: "威廉姆斯先生在哪里?", + explanation: "Question with 'be' verb - Where + is contracted", + pronunciation: "wɛrz mɪstər wɪljəmz" + }, + { + english: "Does he have a temperature?", + chinese: "他发烧吗?", + explanation: "Question with regular verb - Does + subject + verb", + pronunciation: "dʌz hi hæv ə tempərətʃər" + }, + { + english: "Can I see him please?", + chinese: "我可以看看他吗?", + explanation: "Question with modal verb - Modal + subject + verb", + pronunciation: "kæn aɪ si hɪm pliz" + } + ], + exercises: [ + { + type: "question_formation", + statement: "He has a cold.", + correct: "Does he have a cold?", + explanation: "Use 'Does' + subject + base verb for questions" + } + ] + } + }, + + vocabulary: { + "doctor": { + "user_language": "医生", + "type": "noun", + "pronunciation": "dɔktər" + }, + "better": { + "user_language": "更好的", + "type": "adjective", + "pronunciation": "betər" + }, + "certainly": { + "user_language": "当然", + "type": "adverb", + "pronunciation": "sɜrtənli" + }, + "upstairs": { + "user_language": "楼上", + "type": "adverb", + "pronunciation": "ʌpstɛrz" + }, + "bed": { + "user_language": "床", + "type": "noun", + "pronunciation": "bed" + }, + "yet": { + "user_language": "还,仍", + "type": "adverb", + "pronunciation": "jet" + }, + "stay": { + "user_language": "停留", + "type": "verb", + "pronunciation": "steɪ" + }, + "school": { + "user_language": "学校", + "type": "noun", + "pronunciation": "skul" + }, + "rich": { + "user_language": "油腻的", + "type": "adjective", + "pronunciation": "rɪtʃ" + }, + "food": { + "user_language": "食物", + "type": "noun", + "pronunciation": "fud" + }, + "temperature": { + "user_language": "体温,发烧", + "type": "noun", + "pronunciation": "tempərətʃər" + }, + "remain": { + "user_language": "保持,继续", + "type": "verb", + "pronunciation": "rɪmeɪn" + }, + "warm": { + "user_language": "温暖的", + "type": "adjective", + "pronunciation": "wɔrm" + }, + "cold": { + "user_language": "感冒", + "type": "noun", + "pronunciation": "kəʊld" + }, + "aspirins": { + "user_language": "阿司匹林", + "type": "noun", + "pronunciation": "æspɪrɪnz" + }, + "medicine": { + "user_language": "药", + "type": "noun", + "pronunciation": "medɪsən" + }, + "play": { + "user_language": "玩", + "type": "verb", + "pronunciation": "pleɪ" + }, + "matches": { + "user_language": "火柴", + "type": "noun", + "pronunciation": "mætʃɪz" + }, + "talk": { + "user_language": "谈话", + "type": "verb", + "pronunciation": "tɔk" + }, + "library": { + "user_language": "图书馆", + "type": "noun", + "pronunciation": "laɪbrəri" + }, + "noise": { + "user_language": "噪音", + "type": "noun", + "pronunciation": "nɔɪz" + }, + "drive": { + "user_language": "开车", + "type": "verb", + "pronunciation": "draɪv" + }, + "quickly": { + "user_language": "快地", + "type": "adverb", + "pronunciation": "kwɪkli" + }, + "lean": { + "user_language": "探身", + "type": "verb", + "pronunciation": "lin" + }, + "window": { + "user_language": "窗户", + "type": "noun", + "pronunciation": "wɪndəʊ" + }, + "break": { + "user_language": "打破", + "type": "verb", + "pronunciation": "breɪk" + }, + "vase": { + "user_language": "花瓶", + "type": "noun", + "pronunciation": "vɑz" + } + }, + + // === SENTENCES FOR GAMES (extracted from stories) === + sentences: [ + { + english: "How's Jimmy today?", + chinese: "吉米今天怎么样?", + prononciation: "haʊz dʒɪmi tədeɪ" + }, + { + english: "Better. Thank you, doctor.", + chinese: "好一些了。谢谢你,医生。", + prononciation: "betər θæŋk ju dɔktər" + }, + { + english: "Can I see him please?", + chinese: "我可以看看他吗?", + prononciation: "kæn aɪ si hɪm pliz" + }, + { + english: "You must stay in bed.", + chinese: "你必须卧床休息。", + prononciation: "ju mʌst steɪ ɪn bed" + }, + { + english: "You mustn't get up yet.", + chinese: "你还不能起床。", + prononciation: "ju mʌsnt get ʌp jet" + }, + { + english: "Don't take any aspirins.", + chinese: "不要吃任何阿司匹林。", + prononciation: "dəʊnt teɪk eni æspɪrɪnz" + }, + { + english: "Don't play with matches.", + chinese: "不要玩火柴。", + prononciation: "dəʊnt pleɪ wɪð mætʃɪz" + }, + { + english: "The doctor says Jimmy must rest.", + chinese: "医生说吉米必须休息。", + prononciation: "ðə dɔktər sez dʒɪmi mʌst rest" + }, + { + english: "He mustn't go outside yet.", + chinese: "他还不能出门。", + prononciation: "hi mʌsnt gəʊ aʊtsaɪd jet" + }, + { + english: "Mrs. Williams must keep him warm.", + chinese: "威廉姆斯太太必须让他保暖。", + prononciation: "mɪsɪz wɪljəmz mʌst kip hɪm wɔrm" + } + ], + + story: { + title: "At the Doctor's Visit - 看医生", + totalSentences: 23, + chapters: [ + { + title: "Chapter 1: Jimmy is Sick - 第一章:吉米生病了", + sentences: [ + { + id: 1, + original: "How's Jimmy today?", + translation: "吉米今天怎么样?", + words: [ + {word: "How's", translation: "怎么样", type: "question", pronunciation: "haʊz"}, + {word: "Jimmy", translation: "吉米", type: "noun", pronunciation: "dʒɪmi"}, + {word: "today", translation: "今天", type: "adverb", pronunciation: "tədeɪ"} + ] + }, + { + id: 2, + original: "Better. Thank you, doctor.", + translation: "好一些了。谢谢你,医生。", + words: [ + {word: "Better", translation: "好一些", type: "adjective", pronunciation: "betər"}, + {word: "Thank", translation: "谢谢", type: "verb", pronunciation: "θæŋk"}, + {word: "you", translation: "你", type: "pronoun", pronunciation: "ju"}, + {word: "doctor", translation: "医生", type: "noun", pronunciation: "dɔktər"} + ] + }, + { + id: 3, + original: "Can I see him please?", + translation: "我可以看看他吗?", + words: [ + {word: "Can", translation: "可以", type: "modal", pronunciation: "kæn"}, + {word: "I", translation: "我", type: "pronoun", pronunciation: "aɪ"}, + {word: "see", translation: "看", type: "verb", pronunciation: "si"}, + {word: "him", translation: "他", type: "pronoun", pronunciation: "hɪm"}, + {word: "please", translation: "请", type: "adverb", pronunciation: "pliz"} + ] + }, + { + id: 4, + original: "Certainly, doctor. Come upstairs.", + translation: "当然可以,医生。上楼来。", + words: [ + {word: "Certainly", translation: "当然", type: "adverb", pronunciation: "sɜrtənli"}, + {word: "doctor", translation: "医生", type: "noun", pronunciation: "dɔktər"}, + {word: "Come", translation: "来", type: "verb", pronunciation: "kʌm"}, + {word: "upstairs", translation: "楼上", type: "adverb", pronunciation: "ʌpstɛrz"} + ] + }, + { + id: 5, + original: "You look very well, Jimmy.", + translation: "你看起来很好,吉米。", + words: [ + {word: "You", translation: "你", type: "pronoun", pronunciation: "ju"}, + {word: "look", translation: "看起来", type: "verb", pronunciation: "lʊk"}, + {word: "very", translation: "很", type: "adverb", pronunciation: "vɛri"}, + {word: "well", translation: "好", type: "adverb", pronunciation: "wɛl"}, + {word: "Jimmy", translation: "吉米", type: "noun", pronunciation: "dʒɪmi"} + ] + }, + { + id: 6, + original: "You are better now.", + translation: "你现在好多了。", + words: [ + {word: "You", translation: "你", type: "pronoun", pronunciation: "ju"}, + {word: "are", translation: "是", type: "verb", pronunciation: "ɑr"}, + {word: "better", translation: "更好", type: "adjective", pronunciation: "betər"}, + {word: "now", translation: "现在", type: "adverb", pronunciation: "naʊ"} + ] + }, + { + id: 7, + original: "You mustn't get up yet.", + translation: "你还不能起床。", + words: [ + {word: "You", translation: "你", type: "pronoun", pronunciation: "ju"}, + {word: "mustn't", translation: "不能", type: "modal", pronunciation: "mʌsnt"}, + {word: "get", translation: "起", type: "verb", pronunciation: "get"}, + {word: "up", translation: "床", type: "adverb", pronunciation: "ʌp"}, + {word: "yet", translation: "还", type: "adverb", pronunciation: "jet"} + ] + }, + { + id: 8, + original: "You must stay in bed.", + translation: "你必须卧床休息。", + words: [ + {word: "You", translation: "你", type: "pronoun", pronunciation: "ju"}, + {word: "must", translation: "必须", type: "modal", pronunciation: "mʌst"}, + {word: "stay", translation: "停留", type: "verb", pronunciation: "steɪ"}, + {word: "in", translation: "在", type: "preposition", pronunciation: "ɪn"}, + {word: "bed", translation: "床", type: "noun", pronunciation: "bed"} + ] + }, + { + id: 9, + original: "He mustn't go to school yet.", + translation: "他还不能去上学。", + words: [ + {word: "He", translation: "他", type: "pronoun", pronunciation: "hi"}, + {word: "mustn't", translation: "不能", type: "modal", pronunciation: "mʌsnt"}, + {word: "go", translation: "去", type: "verb", pronunciation: "gəʊ"}, + {word: "to", translation: "到", type: "preposition", pronunciation: "tu"}, + {word: "school", translation: "学校", type: "noun", pronunciation: "skul"}, + {word: "yet", translation: "还", type: "adverb", pronunciation: "jet"} + ] + }, + { + id: 10, + original: "He mustn't eat rich food.", + translation: "他不能吃油腻食物。", + words: [ + {word: "He", translation: "他", type: "pronoun", pronunciation: "hi"}, + {word: "mustn't", translation: "不能", type: "modal", pronunciation: "mʌsnt"}, + {word: "eat", translation: "吃", type: "verb", pronunciation: "it"}, + {word: "rich", translation: "油腻的", type: "adjective", pronunciation: "rɪtʃ"}, + {word: "food", translation: "食物", type: "noun", pronunciation: "fud"} + ] + } + ] + }, + { + title: "Chapter 2: Safety Rules - 第二章:安全规则", + sentences: [ + { + id: 11, + original: "Don't take any aspirins.", + translation: "不要吃任何阿司匹林。", + words: [ + {word: "Don't", translation: "不要", type: "auxiliary", pronunciation: "dəʊnt"}, + {word: "take", translation: "吃", type: "verb", pronunciation: "teɪk"}, + {word: "any", translation: "任何", type: "determiner", pronunciation: "eni"}, + {word: "aspirins", translation: "阿司匹林", type: "noun", pronunciation: "æspɪrɪnz"} + ] + }, + { + id: 12, + original: "Don't take this medicine.", + translation: "不要吃这个药。", + words: [ + {word: "Don't", translation: "不要", type: "auxiliary", pronunciation: "dəʊnt"}, + {word: "take", translation: "吃", type: "verb", pronunciation: "teɪk"}, + {word: "this", translation: "这个", type: "determiner", pronunciation: "ðɪs"}, + {word: "medicine", translation: "药", type: "noun", pronunciation: "medɪsən"} + ] + }, + { + id: 13, + original: "Don't play with matches.", + translation: "不要玩火柴。", + words: [ + {word: "Don't", translation: "不要", type: "auxiliary", pronunciation: "dəʊnt"}, + {word: "play", translation: "玩", type: "verb", pronunciation: "pleɪ"}, + {word: "with", translation: "和", type: "preposition", pronunciation: "wɪð"}, + {word: "matches", translation: "火柴", type: "noun", pronunciation: "mætʃɪz"} + ] + }, + { + id: 14, + original: "Don't talk in the library.", + translation: "不要在图书馆说话。", + words: [ + {word: "Don't", translation: "不要", type: "auxiliary", pronunciation: "dəʊnt"}, + {word: "talk", translation: "说话", type: "verb", pronunciation: "tɔk"}, + {word: "in", translation: "在", type: "preposition", pronunciation: "ɪn"}, + {word: "the", translation: "这个", type: "article", pronunciation: "ðə"}, + {word: "library", translation: "图书馆", type: "noun", pronunciation: "laɪbrəri"} + ] + }, + { + id: 15, + original: "Don't make a noise.", + translation: "不要制造噪音。", + words: [ + {word: "Don't", translation: "不要", type: "auxiliary", pronunciation: "dəʊnt"}, + {word: "make", translation: "制造", type: "verb", pronunciation: "meɪk"}, + {word: "a", translation: "一个", type: "article", pronunciation: "ə"}, + {word: "noise", translation: "噪音", type: "noun", pronunciation: "nɔɪz"} + ] + }, + { + id: 16, + original: "Don't drive so quickly.", + translation: "不要开得这么快。", + words: [ + {word: "Don't", translation: "不要", type: "auxiliary", pronunciation: "dəʊnt"}, + {word: "drive", translation: "开车", type: "verb", pronunciation: "draɪv"}, + {word: "so", translation: "如此", type: "adverb", pronunciation: "səʊ"}, + {word: "quickly", translation: "快地", type: "adverb", pronunciation: "kwɪkli"} + ] + }, + { + id: 17, + original: "Don't lean out of the window.", + translation: "不要从窗户探出身子。", + words: [ + {word: "Don't", translation: "不要", type: "auxiliary", pronunciation: "dəʊnt"}, + {word: "lean", translation: "探身", type: "verb", pronunciation: "lin"}, + {word: "out", translation: "出", type: "adverb", pronunciation: "aʊt"}, + {word: "of", translation: "从", type: "preposition", pronunciation: "ʌv"}, + {word: "the", translation: "这个", type: "article", pronunciation: "ðə"}, + {word: "window", translation: "窗户", type: "noun", pronunciation: "wɪndəʊ"} + ] + }, + { + id: 18, + original: "Don't break that vase.", + translation: "不要打破那个花瓶。", + words: [ + {word: "Don't", translation: "不要", type: "auxiliary", pronunciation: "dəʊnt"}, + {word: "break", translation: "打破", type: "verb", pronunciation: "breɪk"}, + {word: "that", translation: "那个", type: "determiner", pronunciation: "ðæt"}, + {word: "vase", translation: "花瓶", type: "noun", pronunciation: "vɑz"} + ] + }, + { + id: 19, + original: "Does he have a temperature?", + translation: "他发烧吗?", + words: [ + {word: "Does", translation: "吗", type: "auxiliary", pronunciation: "dʌz"}, + {word: "he", translation: "他", type: "pronoun", pronunciation: "hi"}, + {word: "have", translation: "有", type: "verb", pronunciation: "hæv"}, + {word: "a", translation: "一个", type: "article", pronunciation: "ə"}, + {word: "temperature", translation: "体温", type: "noun", pronunciation: "tempərətʃər"} + ] + }, + { + id: 20, + original: "He has a bad cold too.", + translation: "他也得了重感冒。", + words: [ + {word: "He", translation: "他", type: "pronoun", pronunciation: "hi"}, + {word: "has", translation: "有", type: "verb", pronunciation: "hæz"}, + {word: "a", translation: "一个", type: "article", pronunciation: "ə"}, + {word: "bad", translation: "严重的", type: "adjective", pronunciation: "bæd"}, + {word: "cold", translation: "感冒", type: "noun", pronunciation: "kəʊld"}, + {word: "too", translation: "也", type: "adverb", pronunciation: "tu"} + ] + }, + { + id: 21, + original: "The doctor told Mrs. Williams to keep Jimmy warm and give him plenty of rest.", + translation: "医生告诉威廉姆斯太太要让吉米保暖并让他多休息。", + words: [ + {word: "The", translation: "这个", type: "article", pronunciation: "ðə"}, + {word: "doctor", translation: "医生", type: "noun", pronunciation: "dɔktər"}, + {word: "told", translation: "告诉", type: "verb", pronunciation: "toʊld"}, + {word: "Mrs.", translation: "太太", type: "title", pronunciation: "mɪsɪz"}, + {word: "Williams", translation: "威廉姆斯", type: "noun", pronunciation: "wɪljəmz"}, + {word: "to", translation: "要", type: "preposition", pronunciation: "tuː"}, + {word: "keep", translation: "保持", type: "verb", pronunciation: "kiːp"}, + {word: "Jimmy", translation: "吉米", type: "noun", pronunciation: "dʒɪmi"}, + {word: "warm", translation: "温暖", type: "adjective", pronunciation: "wɔːrm"}, + {word: "and", translation: "并且", type: "conjunction", pronunciation: "ænd"}, + {word: "give", translation: "给", type: "verb", pronunciation: "gɪv"}, + {word: "him", translation: "他", type: "pronoun", pronunciation: "hɪm"}, + {word: "plenty", translation: "大量", type: "noun", pronunciation: "plenti"}, + {word: "of", translation: "的", type: "preposition", pronunciation: "ʌv"}, + {word: "rest", translation: "休息", type: "noun", pronunciation: "rest"} + ] + }, + { + id: 22, + original: "Jimmy must stay in bed until the doctor says he can go back to school.", + translation: "吉米必须卧床直到医生说他可以回学校。", + words: [ + {word: "Jimmy", translation: "吉米", type: "noun", pronunciation: "dʒɪmi"}, + {word: "must", translation: "必须", type: "modal", pronunciation: "mʌst"}, + {word: "stay", translation: "停留", type: "verb", pronunciation: "steɪ"}, + {word: "in", translation: "在", type: "preposition", pronunciation: "ɪn"}, + {word: "bed", translation: "床", type: "noun", pronunciation: "bed"}, + {word: "until", translation: "直到", type: "conjunction", pronunciation: "ənˈtɪl"}, + {word: "the", translation: "这个", type: "article", pronunciation: "ðə"}, + {word: "doctor", translation: "医生", type: "noun", pronunciation: "dɔktər"}, + {word: "says", translation: "说", type: "verb", pronunciation: "sez"}, + {word: "he", translation: "他", type: "pronoun", pronunciation: "hi"}, + {word: "can", translation: "可以", type: "modal", pronunciation: "kæn"}, + {word: "go", translation: "去", type: "verb", pronunciation: "goʊ"}, + {word: "back", translation: "回", type: "adverb", pronunciation: "bæk"}, + {word: "to", translation: "到", type: "preposition", pronunciation: "tuː"}, + {word: "school", translation: "学校", type: "noun", pronunciation: "skuːl"} + ] + }, + { + id: 23, + original: "Mrs. Williams promised to follow all the doctor's instructions very carefully until Jimmy feels completely better.", + translation: "威廉姆斯太太承诺会非常仔细地遵循医生的所有指示直到吉米完全康复。", + words: [ + {word: "Mrs.", translation: "太太", type: "title", pronunciation: "mɪsɪz"}, + {word: "Williams", translation: "威廉姆斯", type: "noun", pronunciation: "wɪljəmz"}, + {word: "promised", translation: "承诺", type: "verb", pronunciation: "prɑːmɪst"}, + {word: "to", translation: "要", type: "preposition", pronunciation: "tuː"}, + {word: "follow", translation: "遵循", type: "verb", pronunciation: "fɑːloʊ"}, + {word: "all", translation: "所有", type: "determiner", pronunciation: "ɔːl"}, + {word: "the", translation: "这些", type: "article", pronunciation: "ðə"}, + {word: "doctor's", translation: "医生的", type: "noun", pronunciation: "dɔktərz"}, + {word: "instructions", translation: "指示", type: "noun", pronunciation: "ɪnˈstrʌkʃənz"}, + {word: "very", translation: "非常", type: "adverb", pronunciation: "veri"}, + {word: "carefully", translation: "仔细地", type: "adverb", pronunciation: "kɛrfəli"}, + {word: "until", translation: "直到", type: "conjunction", pronunciation: "ənˈtɪl"}, + {word: "Jimmy", translation: "吉米", type: "noun", pronunciation: "dʒɪmi"}, + {word: "feels", translation: "感觉", type: "verb", pronunciation: "fiːlz"}, + {word: "completely", translation: "完全", type: "adverb", pronunciation: "kəmˈpliːtli"}, + {word: "better", translation: "更好", type: "adjective", pronunciation: "betər"} + ] + } + ] + } + ] + }, + + // === GRAMMAR-BASED FILL IN THE BLANKS === + fillInBlanks: [ + { + sentence: "You _____ stay in bed for two days.", + options: ["must", "mustn't", "can", "don't"], + correctAnswer: "must", + explanation: "Use 'must' for strong medical advice", + grammarFocus: "modal-must-mustnot" + }, + { + sentence: "He _____ eat rich food when sick.", + options: ["must", "mustn't", "should", "can"], + correctAnswer: "mustn't", + explanation: "Use 'mustn't' for medical restrictions", + grammarFocus: "modal-must-mustnot" + }, + { + sentence: "_____ take this medicine!", + options: ["Don't", "Not", "No", "Doesn't"], + correctAnswer: "Don't", + explanation: "Use 'Don't' for negative commands", + grammarFocus: "imperatives-commands" + }, + { + sentence: "_____ he have a temperature?", + options: ["Do", "Does", "Is", "Has"], + correctAnswer: "Does", + explanation: "Use 'Does' for questions with third person singular", + grammarFocus: "present-simple-questions" + }, + { + sentence: "_____ play with matches!", + options: ["Not", "Don't", "No", "Mustn't"], + correctAnswer: "Don't", + explanation: "Use 'Don't' for safety warnings", + grammarFocus: "imperatives-commands" + }, + { + sentence: "_____ Mr. Williams this evening?", + options: ["Where", "Where's", "Where are", "Where is"], + correctAnswer: "Where's", + explanation: "Use 'Where's' (Where is) for location questions", + grammarFocus: "present-simple-questions" + } + ], + + // === GRAMMAR CORRECTION EXERCISES === + corrections: [ + { + incorrect: "You don't must get up yet.", + correct: "You mustn't get up yet.", + explanation: "Use 'mustn't' not 'don't must' for prohibition", + grammarFocus: "modal-must-mustnot" + }, + { + incorrect: "Not take this medicine!", + correct: "Don't take this medicine!", + explanation: "Use 'Don't' + verb for negative commands", + grammarFocus: "imperatives-commands" + }, + { + incorrect: "He must not to eat rich food.", + correct: "He mustn't eat rich food.", + explanation: "Don't use 'to' after modal verbs", + grammarFocus: "modal-must-mustnot" + }, + { + incorrect: "Do he have a temperature?", + correct: "Does he have a temperature?", + explanation: "Use 'Does' with third person singular subjects", + grammarFocus: "present-simple-questions" + }, + { + incorrect: "You must to stay in bed.", + correct: "You must stay in bed.", + explanation: "Don't use 'to' after 'must'", + grammarFocus: "modal-must-mustnot" + } + ], + + // === ADDITIONAL READING STORIES === + additionalStories: [ + { + title: "Doctor's Advice - 医生的建议", + totalSentences: 12, + chapters: [ + { + title: "Chapter 1: Following Medical Instructions - 遵循医嘱", + sentences: [ + { + id: 1, + original: "The doctor says Jimmy must rest.", + translation: "医生说吉米必须休息。", + words: [ + {word: "The", translation: "这个", type: "article", pronunciation: "ðə"}, + {word: "doctor", translation: "医生", type: "noun", pronunciation: "dɔktər"}, + {word: "says", translation: "说", type: "verb", pronunciation: "sez"}, + {word: "Jimmy", translation: "吉米", type: "noun", pronunciation: "dʒɪmi"}, + {word: "must", translation: "必须", type: "modal", pronunciation: "mʌst"}, + {word: "rest", translation: "休息", type: "verb", pronunciation: "rest"} + ] + }, + { + id: 2, + original: "He mustn't go outside yet.", + translation: "他还不能出门。", + words: [ + {word: "He", translation: "他", type: "pronoun", pronunciation: "hi"}, + {word: "mustn't", translation: "不能", type: "modal", pronunciation: "mʌsnt"}, + {word: "go", translation: "去", type: "verb", pronunciation: "gəʊ"}, + {word: "outside", translation: "外面", type: "adverb", pronunciation: "aʊtsaɪd"}, + {word: "yet", translation: "还", type: "adverb", pronunciation: "jet"} + ] + }, + { + id: 3, + original: "Mrs. Williams must keep him warm.", + translation: "威廉姆斯太太必须让他保暖。", + words: [ + {word: "Mrs.", translation: "太太", type: "title", pronunciation: "mɪsɪz"}, + {word: "Williams", translation: "威廉姆斯", type: "noun", pronunciation: "wɪljəmz"}, + {word: "must", translation: "必须", type: "modal", pronunciation: "mʌst"}, + {word: "keep", translation: "保持", type: "verb", pronunciation: "kip"}, + {word: "him", translation: "他", type: "pronoun", pronunciation: "hɪm"}, + {word: "warm", translation: "温暖", type: "adjective", pronunciation: "wɔrm"} + ] + }, + { + id: 4, + original: "Don't give him cold drinks.", + translation: "不要给他冷饮。", + words: [ + {word: "Don't", translation: "不要", type: "auxiliary", pronunciation: "dəʊnt"}, + {word: "give", translation: "给", type: "verb", pronunciation: "gɪv"}, + {word: "him", translation: "他", type: "pronoun", pronunciation: "hɪm"}, + {word: "cold", translation: "冷的", type: "adjective", pronunciation: "kəʊld"}, + {word: "drinks", translation: "饮料", type: "noun", pronunciation: "drɪŋks"} + ] + } + ] + } + ] + } + ] +}; + +// ============================================================================ +// CONTENT STRUCTURE SUMMARY - FOR AI REFERENCE +// ============================================================================ +// This module contains: +// - Medical dialogue vocabulary and situations +// - Modal verbs (must/mustn't) for obligations and prohibitions +// - Imperative commands for instructions and warnings +// - Present simple questions for medical inquiries +// - Safety-focused vocabulary and scenarios +// - Chinese translations for all content +// - Comprehensive grammar explanations and examples +// ============================================================================ \ No newline at end of file diff --git a/js/content/NCE2-Lesson3.js b/js/content/NCE2-Lesson3.js new file mode 100644 index 0000000..87c91fb --- /dev/null +++ b/js/content/NCE2-Lesson3.js @@ -0,0 +1,1134 @@ +// === ENGLISH PAST TENSE AND TRAVEL STORY === +// Complete English story with Chinese translation and pronunciation + +window.ContentModules = window.ContentModules || {}; + +window.ContentModules.NCE2Lesson3 = { + id: "nce2-lesson3", + name: "NCE2-Lesson3 - Please Send Me a Card", + description: "English learning story focusing on past tense verbs and travel vocabulary", + difficulty: "intermediate", + language: "en-US", + userLanguage: "zh-CN", + totalWords: 180, + + // === GRAMMAR LESSONS SYSTEM === + grammar: { + "past-tense-verbs": { + title: "Past Tense Verbs - 过去时动词", + explanation: "English uses past tense verbs to talk about things that happened before now.", + rules: [ + "Regular verbs add -ed: visit → visited, pass → passed", + "Irregular verbs change form: go → went, think → thought", + "Past tense is the same for all persons: I went, he went, they went", + "Use past tense for completed actions in the past" + ], + examples: [ + { + english: "I went to Italy last summer.", + chinese: "去年夏天我去了意大利。", + explanation: "Use past tense for completed actions with time expressions", + pronunciation: "aɪ went tuː ˈɪtəli læst ˈsʌmər" + }, + { + english: "I visited museums and sat in gardens.", + chinese: "我参观了博物馆,坐在花园里。", + explanation: "Multiple past actions can be connected with 'and'", + pronunciation: "aɪ ˈvɪzɪtɪd mjuːˈziːəmz ænd sæt ɪn ˈɡɑːrdənz" + }, + { + english: "A waiter taught me Italian words.", + chinese: "一个服务员教了我意大利语单词。", + explanation: "Irregular past tense: teach → taught", + pronunciation: "ə ˈweɪtər tɔːt miː ɪˈtæljən wɜːrdz" + }, + { + english: "I did not understand a word.", + chinese: "我一个词都不懂。", + explanation: "Negative past tense uses 'did not' + base verb", + pronunciation: "aɪ dɪd nɑːt ˌʌndərˈstænd ə wɜːrd" + }, + { + english: "He lent me a book.", + chinese: "他借给我一本书。", + explanation: "Irregular past tense: lend → lent", + pronunciation: "hiː lent miː ə bʊk" + }, + { + english: "I bought thirty-seven cards.", + chinese: "我买了三十七张卡片。", + explanation: "Irregular past tense: buy → bought", + pronunciation: "aɪ bɔːt ˈθɜːrti ˈsevən kɑːrdz" + }, + { + english: "I spent the whole day in my room.", + chinese: "我在房间里待了一整天。", + explanation: "Irregular past tense: spend → spent", + pronunciation: "aɪ spent ðə hoʊl deɪ ɪn maɪ ruːm" + }, + { + english: "I thought about postcards every day.", + chinese: "我每天都想着明信片。", + explanation: "Irregular past tense: think → thought", + pronunciation: "aɪ θɔːt əˈbaʊt ˈpoʊstkɑːrdz ˈevri deɪ" + } + ], + exercises: [ + { + type: "fill_blank", + sentence: "Last summer, I _____ to Italy.", + options: ["go", "went", "gone", "going"], + correct: "went", + explanation: "Use 'went' (past tense of 'go') for completed past actions" + }, + { + type: "translation", + english: "I did not write a single card.", + chinese: "我一张卡片都没写。", + focus: "Negative past tense structure" + } + ] + }, + + "direct-indirect-objects": { + title: "Direct and Indirect Objects - 直接宾语和间接宾语", + explanation: "English can express the same meaning using two different sentence patterns with give/send/lend verbs.", + rules: [ + "Pattern 1: Subject + Verb + Indirect Object + Direct Object", + "Pattern 2: Subject + Verb + Direct Object + to/for + Indirect Object", + "Use 'to' with: give, send, lend, pass, hand, show", + "Use 'for' with: buy, make, find, get" + ], + examples: [ + { + english: "He lent me a book.", + chinese: "他借给我一本书。", + explanation: "Pattern 1: Verb + me (indirect) + book (direct)", + pronunciation: "hiː lent miː ə bʊk" + }, + { + english: "He lent a book to me.", + chinese: "他借了一本书给我。", + explanation: "Pattern 2: Verb + book (direct) + to me (indirect)", + pronunciation: "hiː lent ə bʊk tuː miː" + }, + { + english: "He sent me a card.", + chinese: "他寄给我一张卡片。", + explanation: "Pattern 1 with 'send'", + pronunciation: "hiː sent miː ə kɑːrd" + }, + { + english: "He sent a card to me.", + chinese: "他寄了一张卡片给我。", + explanation: "Pattern 2 with 'send' + 'to'", + pronunciation: "hiː sent ə kɑːrd tuː miː" + }, + { + english: "She bought me a gift.", + chinese: "她给我买了一份礼物。", + explanation: "Pattern 1 with 'buy'", + pronunciation: "ʃiː bɔːt miː ə ɡɪft" + }, + { + english: "She bought a gift for me.", + chinese: "她为我买了一份礼物。", + explanation: "Pattern 2 with 'buy' + 'for'", + pronunciation: "ʃiː bɔːt ə ɡɪft fɔːr miː" + }, + { + english: "The waiter brought me the menu.", + chinese: "服务员给我拿来了菜单。", + explanation: "Pattern 1: brought + me + menu", + pronunciation: "ðə ˈweɪtər brɔːt miː ðə ˈmenjuː" + }, + { + english: "Pass the salt to me, please.", + chinese: "请把盐传给我。", + explanation: "Pattern 2: pass + salt + to me", + pronunciation: "pæs ðə sɔːlt tuː miː pliːz" + } + ], + exercises: [ + { + type: "transformation", + sentence: "He gave me the book.", + answer: "He gave the book to me.", + explanation: "Transform Pattern 1 to Pattern 2 using 'to'" + } + ] + }, + + "question-formation": { + title: "Question Formation in Past Tense - 过去时疑问句", + explanation: "English forms past tense questions using 'did' + subject + base verb.", + rules: [ + "Did + subject + base verb + object?", + "Question words: What did...? Where did...? Why did...?", + "Answer with 'Yes, I did' or 'No, I didn't'", + "Don't use past tense verb after 'did'" + ], + examples: [ + { + english: "Did you see the accident?", + chinese: "你看到事故了吗?", + explanation: "Yes/No question with 'did'", + pronunciation: "dɪd juː siː ði ˈæksədənt" + }, + { + english: "What happened?", + chinese: "发生了什么?", + explanation: "Question word + past tense verb (no 'did' needed)", + pronunciation: "wʌt ˈhæpənd" + }, + { + english: "Where did he go last summer?", + chinese: "去年夏天他去哪里了?", + explanation: "Question word + did + subject + base verb", + pronunciation: "wer dɪd hiː ɡoʊ læst ˈsʌmər" + }, + { + english: "Why did you do that?", + chinese: "你为什么那样做?", + explanation: "'Why' questions ask for reasons", + pronunciation: "waɪ dɪd juː duː ðæt" + }, + { + english: "How many cards did he buy?", + chinese: "他买了多少张卡片?", + explanation: "Questions about quantity", + pronunciation: "haʊ ˈmeni kɑːrdz dɪd hiː baɪ" + }, + { + english: "Who taught you Italian?", + chinese: "谁教你意大利语?", + explanation: "When 'who' is the subject, no 'did' needed", + pronunciation: "huː tɔːt juː ɪˈtæljən" + } + ], + exercises: [ + { + type: "fill_blank", + sentence: "_____ you write any postcards?", + options: ["Did", "Do", "Are", "Were"], + correct: "Did", + explanation: "Use 'Did' for past tense yes/no questions" + } + ] + } + }, + + vocabulary: { + "postcard": { + "user_language": "明信片", + "type": "noun", + "pronunciation": "ˈpoʊstkɑːrd" + }, + "send": { + "user_language": "寄,送", + "type": "verb", + "pronunciation": "send" + }, + "spoil": { + "user_language": "损坏,破坏", + "type": "verb", + "pronunciation": "spɔɪl" + }, + "holiday": { + "user_language": "假期", + "type": "noun", + "pronunciation": "ˈhɑːlədeɪ" + }, + "museum": { + "user_language": "博物馆", + "type": "noun", + "pronunciation": "mjuːˈziːəm" + }, + "public": { + "user_language": "公共的", + "type": "adjective", + "pronunciation": "ˈpʌblɪk" + }, + "garden": { + "user_language": "花园", + "type": "noun", + "pronunciation": "ˈɡɑːrdən" + }, + "friendly": { + "user_language": "友好的", + "type": "adjective", + "pronunciation": "ˈfrendli" + }, + "waiter": { + "user_language": "服务员", + "type": "noun", + "pronunciation": "ˈweɪtər" + }, + "teach": { + "user_language": "教", + "type": "verb", + "pronunciation": "tiːtʃ" + }, + "lend": { + "user_language": "借给", + "type": "verb", + "pronunciation": "lend" + }, + "understand": { + "user_language": "理解", + "type": "verb", + "pronunciation": "ˌʌndərˈstænd" + }, + "think": { + "user_language": "想,思考", + "type": "verb", + "pronunciation": "θɪŋk" + }, + "pass": { + "user_language": "过去,通过", + "type": "verb", + "pronunciation": "pæs" + }, + "quickly": { + "user_language": "快速地", + "type": "adverb", + "pronunciation": "ˈkwɪkli" + }, + "decision": { + "user_language": "决定", + "type": "noun", + "pronunciation": "dɪˈsɪʒən" + }, + "early": { + "user_language": "早", + "type": "adverb", + "pronunciation": "ˈɜːrli" + }, + "buy": { + "user_language": "买", + "type": "verb", + "pronunciation": "baɪ" + }, + "spend": { + "user_language": "花费,度过", + "type": "verb", + "pronunciation": "spend" + }, + "whole": { + "user_language": "整个的", + "type": "adjective", + "pronunciation": "hoʊl" + }, + "single": { + "user_language": "单一的,唯一的", + "type": "adjective", + "pronunciation": "ˈsɪŋɡəl" + }, + "write": { + "user_language": "写", + "type": "verb", + "pronunciation": "raɪt" + }, + "visit": { + "user_language": "参观", + "type": "verb", + "pronunciation": "ˈvɪzɪt" + }, + "sit": { + "user_language": "坐", + "type": "verb", + "pronunciation": "sɪt" + }, + "read": { + "user_language": "读", + "type": "verb", + "pronunciation": "riːd" + }, + "word": { + "user_language": "单词", + "type": "noun", + "pronunciation": "wɜːrd" + }, + "line": { + "user_language": "行,线", + "type": "noun", + "pronunciation": "laɪn" + }, + "friend": { + "user_language": "朋友", + "type": "noun", + "pronunciation": "frend" + }, + "room": { + "user_language": "房间", + "type": "noun", + "pronunciation": "ruːm" + }, + "card": { + "user_language": "卡片", + "type": "noun", + "pronunciation": "kɑːrd" + } + }, + + // === SENTENCES FOR GAMES (extracted from stories) === + sentences: [ + { + english: "Postcards always spoil my holidays.", + chinese: "明信片总是破坏我的假期。", + prononciation: "ˈpoʊstkɑːrdz ˈɔːlweɪz spɔɪl maɪ ˈhɑːlədeɪz" + }, + { + english: "Last summer, I went to Italy.", + chinese: "去年夏天,我去了意大利。", + prononciation: "læst ˈsʌmər aɪ wɛnt tuː ˈɪtəli" + }, + { + english: "I visited museums and sat in public gardens.", + chinese: "我参观了博物馆,坐在公园里。", + prononciation: "aɪ ˈvɪzɪtɪd mjuˈziəmz ænd sæt ɪn ˈpʌblɪk ˈgɑːrdənz" + }, + { + english: "I thought about postcards every day.", + chinese: "我每天都想着明信片。", + prononciation: "aɪ θɔːt əˈbaʊt ˈpoʊstkɑːrdz ˈɛvri deɪ" + }, + { + english: "I did not send cards to my friends.", + chinese: "我没有给朋友寄明信片。", + prononciation: "aɪ dɪd nɑːt sɛnd kɑːrdz tuː maɪ frɛndz" + }, + { + english: "On the last day I made a big decision.", + chinese: "在最后一天我做了一个重大决定。", + prononciation: "ɑːn ðə læst deɪ aɪ meɪd ə bɪg dɪˈsɪʒən" + }, + { + english: "I got up early and bought thirty-seven cards.", + chinese: "我早早起床买了三十七张明信片。", + prononciation: "aɪ gɑːt ʌp ˈɜːrli ænd bɔːt ˈθɜːrti ˈsɛvən kɑːrdz" + }, + { + english: "I spent the whole day in my room.", + chinese: "我在房间里待了一整天。", + prononciation: "aɪ spɛnt ðə hoʊl deɪ ɪn maɪ ruːm" + }, + { + english: "I wrote one card to myself.", + chinese: "我给自己写了一张明信片。", + prononciation: "aɪ roʊt wʌn kɑːrd tuː maɪˈsɛlf" + }, + { + english: "My holidays passed quickly but I did not send any cards.", + chinese: "我的假期过得很快,但我没有寄任何明信片。", + prononciation: "maɪ ˈhɑːlədeɪz pæst ˈkwɪkli bʌt aɪ dɪd nɑːt sɛnd ˈɛni kɑːrdz" + } + ], + + story: { + title: "Please Send Me a Card - 请给我寄一张明信片", + totalSentences: 16, + chapters: [ + { + title: "Chapter 1: Holiday Plans and Problems - 假期计划和问题", + sentences: [ + { + id: 1, + original: "Postcards always spoil my holidays.", + translation: "明信片总是破坏我的假期。", + words: [ + {word: "Postcards", translation: "明信片", type: "noun", pronunciation: "ˈpoʊstkɑːrdz"}, + {word: "always", translation: "总是", type: "adverb", pronunciation: "ˈɔːlweɪz"}, + {word: "spoil", translation: "破坏", type: "verb", pronunciation: "spɔɪl"}, + {word: "my", translation: "我的", type: "pronoun", pronunciation: "maɪ"}, + {word: "holidays", translation: "假期", type: "noun", pronunciation: "ˈhɑːlədeɪz"} + ] + }, + { + id: 2, + original: "Last summer, I went to Italy.", + translation: "去年夏天,我去了意大利。", + words: [ + {word: "Last", translation: "去年", type: "adjective", pronunciation: "læst"}, + {word: "summer", translation: "夏天", type: "noun", pronunciation: "ˈsʌmər"}, + {word: "I", translation: "我", type: "pronoun", pronunciation: "aɪ"}, + {word: "went", translation: "去了", type: "verb", pronunciation: "went"}, + {word: "to", translation: "到", type: "preposition", pronunciation: "tuː"}, + {word: "Italy", translation: "意大利", type: "noun", pronunciation: "ˈɪtəli"} + ] + }, + { + id: 3, + original: "I visited museums and sat in public gardens.", + translation: "我参观了博物馆,坐在公共花园里。", + words: [ + {word: "I", translation: "我", type: "pronoun", pronunciation: "aɪ"}, + {word: "visited", translation: "参观了", type: "verb", pronunciation: "ˈvɪzɪtɪd"}, + {word: "museums", translation: "博物馆", type: "noun", pronunciation: "mjuːˈziːəmz"}, + {word: "and", translation: "和", type: "conjunction", pronunciation: "ænd"}, + {word: "sat", translation: "坐", type: "verb", pronunciation: "sæt"}, + {word: "in", translation: "在", type: "preposition", pronunciation: "ɪn"}, + {word: "public", translation: "公共的", type: "adjective", pronunciation: "ˈpʌblɪk"}, + {word: "gardens", translation: "花园", type: "noun", pronunciation: "ˈɡɑːrdənz"} + ] + }, + { + id: 4, + original: "A friendly waiter taught me a few words of Italian.", + translation: "一个友好的服务员教了我几个意大利语单词。", + words: [ + {word: "A", translation: "一个", type: "article", pronunciation: "ə"}, + {word: "friendly", translation: "友好的", type: "adjective", pronunciation: "ˈfrendli"}, + {word: "waiter", translation: "服务员", type: "noun", pronunciation: "ˈweɪtər"}, + {word: "taught", translation: "教了", type: "verb", pronunciation: "tɔːt"}, + {word: "me", translation: "我", type: "pronoun", pronunciation: "miː"}, + {word: "a few", translation: "几个", type: "determiner", pronunciation: "ə fjuː"}, + {word: "words", translation: "单词", type: "noun", pronunciation: "wɜːrdz"}, + {word: "of", translation: "的", type: "preposition", pronunciation: "ʌv"}, + {word: "Italian", translation: "意大利语", type: "noun", pronunciation: "ɪˈtæljən"} + ] + }, + { + id: 5, + original: "Then he lent me a book.", + translation: "然后他借给我一本书。", + words: [ + {word: "Then", translation: "然后", type: "adverb", pronunciation: "ðen"}, + {word: "he", translation: "他", type: "pronoun", pronunciation: "hiː"}, + {word: "lent", translation: "借给", type: "verb", pronunciation: "lent"}, + {word: "me", translation: "我", type: "pronoun", pronunciation: "miː"}, + {word: "a", translation: "一本", type: "article", pronunciation: "ə"}, + {word: "book", translation: "书", type: "noun", pronunciation: "bʊk"} + ] + }, + { + id: 6, + original: "I read a few lines, but I did not understand a word.", + translation: "我读了几行,但一个词都不懂。", + words: [ + {word: "I", translation: "我", type: "pronoun", pronunciation: "aɪ"}, + {word: "read", translation: "读了", type: "verb", pronunciation: "red"}, + {word: "a few", translation: "几", type: "determiner", pronunciation: "ə fjuː"}, + {word: "lines", translation: "行", type: "noun", pronunciation: "laɪnz"}, + {word: "but", translation: "但是", type: "conjunction", pronunciation: "bʌt"}, + {word: "I", translation: "我", type: "pronoun", pronunciation: "aɪ"}, + {word: "did not", translation: "没有", type: "auxiliary", pronunciation: "dɪd nɑːt"}, + {word: "understand", translation: "理解", type: "verb", pronunciation: "ˌʌndərˈstænd"}, + {word: "a", translation: "一个", type: "article", pronunciation: "ə"}, + {word: "word", translation: "词", type: "noun", pronunciation: "wɜːrd"} + ] + }, + { + id: 7, + original: "Every day I thought about postcards.", + translation: "每天我都想着明信片。", + words: [ + {word: "Every", translation: "每", type: "adjective", pronunciation: "ˈevri"}, + {word: "day", translation: "天", type: "noun", pronunciation: "deɪ"}, + {word: "I", translation: "我", type: "pronoun", pronunciation: "aɪ"}, + {word: "thought", translation: "想", type: "verb", pronunciation: "θɔːt"}, + {word: "about", translation: "关于", type: "preposition", pronunciation: "əˈbaʊt"}, + {word: "postcards", translation: "明信片", type: "noun", pronunciation: "ˈpoʊstkɑːrdz"} + ] + }, + { + id: 8, + original: "My holidays passed quickly, but I did not send cards to my friends.", + translation: "我的假期过得很快,但我没有给朋友们寄卡片。", + words: [ + {word: "My", translation: "我的", type: "pronoun", pronunciation: "maɪ"}, + {word: "holidays", translation: "假期", type: "noun", pronunciation: "ˈhɑːlədeɪz"}, + {word: "passed", translation: "过去了", type: "verb", pronunciation: "pæst"}, + {word: "quickly", translation: "快速地", type: "adverb", pronunciation: "ˈkwɪkli"}, + {word: "but", translation: "但是", type: "conjunction", pronunciation: "bʌt"}, + {word: "I", translation: "我", type: "pronoun", pronunciation: "aɪ"}, + {word: "did not", translation: "没有", type: "auxiliary", pronunciation: "dɪd nɑːt"}, + {word: "send", translation: "寄", type: "verb", pronunciation: "send"}, + {word: "cards", translation: "卡片", type: "noun", pronunciation: "kɑːrdz"}, + {word: "to", translation: "给", type: "preposition", pronunciation: "tuː"}, + {word: "my", translation: "我的", type: "pronoun", pronunciation: "maɪ"}, + {word: "friends", translation: "朋友们", type: "noun", pronunciation: "frends"} + ] + } + ] + }, + { + title: "Chapter 2: The Big Decision - 重大决定", + sentences: [ + { + id: 9, + original: "On the last day I made a big decision.", + translation: "在最后一天,我做了一个重大决定。", + words: [ + {word: "On", translation: "在", type: "preposition", pronunciation: "ɑːn"}, + {word: "the", translation: "这", type: "article", pronunciation: "ðə"}, + {word: "last", translation: "最后的", type: "adjective", pronunciation: "læst"}, + {word: "day", translation: "天", type: "noun", pronunciation: "deɪ"}, + {word: "I", translation: "我", type: "pronoun", pronunciation: "aɪ"}, + {word: "made", translation: "做了", type: "verb", pronunciation: "meɪd"}, + {word: "a", translation: "一个", type: "article", pronunciation: "ə"}, + {word: "big", translation: "重大的", type: "adjective", pronunciation: "bɪɡ"}, + {word: "decision", translation: "决定", type: "noun", pronunciation: "dɪˈsɪʒən"} + ] + }, + { + id: 10, + original: "I got up early and bought thirty-seven cards.", + translation: "我早早起床,买了三十七张卡片。", + words: [ + {word: "I", translation: "我", type: "pronoun", pronunciation: "aɪ"}, + {word: "got up", translation: "起床", type: "phrasal verb", pronunciation: "ɡɑːt ʌp"}, + {word: "early", translation: "早", type: "adverb", pronunciation: "ˈɜːrli"}, + {word: "and", translation: "和", type: "conjunction", pronunciation: "ænd"}, + {word: "bought", translation: "买了", type: "verb", pronunciation: "bɔːt"}, + {word: "thirty-seven", translation: "三十七", type: "number", pronunciation: "ˈθɜːrti ˈsevən"}, + {word: "cards", translation: "卡片", type: "noun", pronunciation: "kɑːrdz"} + ] + }, + { + id: 11, + original: "I spent the whole day in my room, but I did not write a single card!", + translation: "我在房间里待了一整天,但连一张卡片都没写!", + words: [ + {word: "I", translation: "我", type: "pronoun", pronunciation: "aɪ"}, + {word: "spent", translation: "度过", type: "verb", pronunciation: "spent"}, + {word: "the", translation: "这", type: "article", pronunciation: "ðə"}, + {word: "whole", translation: "整个", type: "adjective", pronunciation: "hoʊl"}, + {word: "day", translation: "天", type: "noun", pronunciation: "deɪ"}, + {word: "in", translation: "在", type: "preposition", pronunciation: "ɪn"}, + {word: "my", translation: "我的", type: "pronoun", pronunciation: "maɪ"}, + {word: "room", translation: "房间", type: "noun", pronunciation: "ruːm"}, + {word: "but", translation: "但是", type: "conjunction", pronunciation: "bʌt"}, + {word: "I", translation: "我", type: "pronoun", pronunciation: "aɪ"}, + {word: "did not", translation: "没有", type: "auxiliary", pronunciation: "dɪd nɑːt"}, + {word: "write", translation: "写", type: "verb", pronunciation: "raɪt"}, + {word: "a", translation: "一张", type: "article", pronunciation: "ə"}, + {word: "single", translation: "单一的", type: "adjective", pronunciation: "ˈsɪŋɡəl"}, + {word: "card", translation: "卡片", type: "noun", pronunciation: "kɑːrd"} + ] + } + ] + } + ] + }, + + // === GRAMMAR-BASED FILL IN THE BLANKS === + fillInBlanks: [ + { + sentence: "Last summer, I _____ to Italy.", + options: ["go", "went", "gone", "going"], + correctAnswer: "went", + explanation: "Use 'went' (past tense of 'go') for completed past actions", + grammarFocus: "past-tense-verbs" + }, + { + sentence: "A waiter _____ me some Italian words.", + options: ["teach", "taught", "teaching", "teaches"], + correctAnswer: "taught", + explanation: "Use 'taught' (past tense of 'teach') for past actions", + grammarFocus: "past-tense-verbs" + }, + { + sentence: "I _____ not understand a word.", + options: ["do", "did", "does", "done"], + correctAnswer: "did", + explanation: "Use 'did' for negative past tense sentences", + grammarFocus: "past-tense-verbs" + }, + { + sentence: "He _____ me a book.", + options: ["lent", "lend", "lending", "lends"], + correctAnswer: "lent", + explanation: "Use 'lent' (past tense of 'lend') for completed past actions", + grammarFocus: "past-tense-verbs" + }, + { + sentence: "I _____ thirty-seven cards.", + options: ["buy", "bought", "buying", "buys"], + correctAnswer: "bought", + explanation: "Use 'bought' (past tense of 'buy') for past actions", + grammarFocus: "past-tense-verbs" + }, + { + sentence: "He lent a book _____ me.", + options: ["for", "to", "at", "in"], + correctAnswer: "to", + explanation: "Use 'to' with verbs like lend, send, give in Pattern 2", + grammarFocus: "direct-indirect-objects" + }, + { + sentence: "She bought a gift _____ me.", + options: ["for", "to", "at", "in"], + correctAnswer: "for", + explanation: "Use 'for' with verbs like buy, make, find in Pattern 2", + grammarFocus: "direct-indirect-objects" + }, + { + sentence: "_____ you visit any museums?", + options: ["Do", "Did", "Are", "Were"], + correctAnswer: "Did", + explanation: "Use 'Did' for past tense yes/no questions", + grammarFocus: "question-formation" + }, + { + sentence: "_____ happened yesterday?", + options: ["What", "Where", "When", "Why"], + correctAnswer: "What", + explanation: "Use 'What' to ask about events or things that happened", + grammarFocus: "question-formation" + }, + { + sentence: "_____ did you go last summer?", + options: ["What", "Where", "When", "Why"], + correctAnswer: "Where", + explanation: "Use 'Where' to ask about places", + grammarFocus: "question-formation" + } + ], + + // === GRAMMAR CORRECTION EXERCISES === + corrections: [ + { + incorrect: "I goed to Italy last summer.", + correct: "I went to Italy last summer.", + explanation: "Use 'went' (irregular past tense) not 'goed'", + grammarFocus: "past-tense-verbs" + }, + { + incorrect: "He teached me Italian words.", + correct: "He taught me Italian words.", + explanation: "Use 'taught' (irregular past tense) not 'teached'", + grammarFocus: "past-tense-verbs" + }, + { + incorrect: "I don't understand a word.", + correct: "I didn't understand a word.", + explanation: "Use past tense 'didn't' for past events, not present 'don't'", + grammarFocus: "past-tense-verbs" + }, + { + incorrect: "I buyed thirty-seven cards.", + correct: "I bought thirty-seven cards.", + explanation: "Use 'bought' (irregular past tense) not 'buyed'", + grammarFocus: "past-tense-verbs" + }, + { + incorrect: "He lent a book for me.", + correct: "He lent a book to me.", + explanation: "Use 'to' with 'lend', not 'for'", + grammarFocus: "direct-indirect-objects" + }, + { + incorrect: "She bought a gift to me.", + correct: "She bought a gift for me.", + explanation: "Use 'for' with 'buy', not 'to'", + grammarFocus: "direct-indirect-objects" + }, + { + incorrect: "Where you went last summer?", + correct: "Where did you go last summer?", + explanation: "Use 'did' + base verb for past tense questions", + grammarFocus: "question-formation" + }, + { + incorrect: "What you did yesterday?", + correct: "What did you do yesterday?", + explanation: "Use 'did' + base verb for past tense questions", + grammarFocus: "question-formation" + } + ], + + // === ADDITIONAL READING STORIES === + additionalStories: [ + { + title: "The Accident Story - 事故故事", + totalSentences: 12, + chapters: [ + { + title: "Chapter 1: What Happened? - 发生了什么?", + sentences: [ + { + id: 1, + original: "Did you see the accident, sir?", + translation: "先生,你看到那个事故了吗?", + words: [ + {word: "Did", translation: "...吗", type: "auxiliary", pronunciation: "dɪd"}, + {word: "you", translation: "你", type: "pronoun", pronunciation: "juː"}, + {word: "see", translation: "看到", type: "verb", pronunciation: "siː"}, + {word: "the", translation: "那个", type: "article", pronunciation: "ðə"}, + {word: "accident", translation: "事故", type: "noun", pronunciation: "ˈæksədənt"}, + {word: "sir", translation: "先生", type: "noun", pronunciation: "sɜːr"} + ] + }, + { + id: 2, + original: "Yes, I did. The driver of that car hit that post over there.", + translation: "是的,我看到了。那辆车的司机撞到了那边的柱子。", + words: [ + {word: "Yes", translation: "是的", type: "interjection", pronunciation: "jes"}, + {word: "I", translation: "我", type: "pronoun", pronunciation: "aɪ"}, + {word: "did", translation: "看到了", type: "auxiliary", pronunciation: "dɪd"}, + {word: "The", translation: "那", type: "article", pronunciation: "ðə"}, + {word: "driver", translation: "司机", type: "noun", pronunciation: "ˈdraɪvər"}, + {word: "of", translation: "的", type: "preposition", pronunciation: "ʌv"}, + {word: "that", translation: "那辆", type: "determiner", pronunciation: "ðæt"}, + {word: "car", translation: "车", type: "noun", pronunciation: "kɑːr"}, + {word: "hit", translation: "撞到", type: "verb", pronunciation: "hɪt"}, + {word: "that", translation: "那个", type: "determiner", pronunciation: "ðæt"}, + {word: "post", translation: "柱子", type: "noun", pronunciation: "poʊst"}, + {word: "over there", translation: "那边", type: "phrase", pronunciation: "ˈoʊvər ðer"} + ] + }, + { + id: 3, + original: "What happened?", + translation: "发生了什么?", + words: [ + {word: "What", translation: "什么", type: "pronoun", pronunciation: "wʌt"}, + {word: "happened", translation: "发生了", type: "verb", pronunciation: "ˈhæpənd"} + ] + }, + { + id: 4, + original: "A dog ran across the road and the driver tried to avoid it.", + translation: "一只狗跑过马路,司机试图避开它。", + words: [ + {word: "A", translation: "一只", type: "article", pronunciation: "ə"}, + {word: "dog", translation: "狗", type: "noun", pronunciation: "dɔːɡ"}, + {word: "ran", translation: "跑", type: "verb", pronunciation: "ræn"}, + {word: "across", translation: "穿过", type: "preposition", pronunciation: "əˈkrɔːs"}, + {word: "the", translation: "这", type: "article", pronunciation: "ðə"}, + {word: "road", translation: "马路", type: "noun", pronunciation: "roʊd"}, + {word: "and", translation: "和", type: "conjunction", pronunciation: "ænd"}, + {word: "the", translation: "这", type: "article", pronunciation: "ðə"}, + {word: "driver", translation: "司机", type: "noun", pronunciation: "ˈdraɪvər"}, + {word: "tried", translation: "试图", type: "verb", pronunciation: "traɪd"}, + {word: "to", translation: "去", type: "preposition", pronunciation: "tuː"}, + {word: "avoid", translation: "避开", type: "verb", pronunciation: "əˈvɔɪd"}, + {word: "it", translation: "它", type: "pronoun", pronunciation: "ɪt"} + ] + }, + { + id: 5, + original: "The car suddenly came towards me.", + translation: "汽车突然向我冲来。", + words: [ + {word: "The", translation: "这", type: "article", pronunciation: "ðə"}, + {word: "car", translation: "汽车", type: "noun", pronunciation: "kɑːr"}, + {word: "suddenly", translation: "突然", type: "adverb", pronunciation: "ˈsʌdənli"}, + {word: "came", translation: "来了", type: "verb", pronunciation: "keɪm"}, + {word: "towards", translation: "向", type: "preposition", pronunciation: "tɔːrdz"}, + {word: "me", translation: "我", type: "pronoun", pronunciation: "miː"} + ] + }, + { + id: 6, + original: "It climbed on to the pavement and crashed into that post.", + translation: "它爬上了人行道,撞到了那个柱子。", + words: [ + {word: "It", translation: "它", type: "pronoun", pronunciation: "ɪt"}, + {word: "climbed", translation: "爬上", type: "verb", pronunciation: "klaɪmd"}, + {word: "on to", translation: "到...上", type: "preposition", pronunciation: "ɑːn tuː"}, + {word: "the", translation: "这", type: "article", pronunciation: "ðə"}, + {word: "pavement", translation: "人行道", type: "noun", pronunciation: "ˈpeɪvmənt"}, + {word: "and", translation: "和", type: "conjunction", pronunciation: "ænd"}, + {word: "crashed", translation: "撞", type: "verb", pronunciation: "kræʃt"}, + {word: "into", translation: "进", type: "preposition", pronunciation: "ˈɪntuː"}, + {word: "that", translation: "那个", type: "determiner", pronunciation: "ðæt"}, + {word: "post", translation: "柱子", type: "noun", pronunciation: "poʊst"} + ] + }, + { + id: 7, + original: "What did you do?", + translation: "你做了什么?", + words: [ + {word: "What", translation: "什么", type: "pronoun", pronunciation: "wʌt"}, + {word: "did", translation: "做", type: "auxiliary", pronunciation: "dɪd"}, + {word: "you", translation: "你", type: "pronoun", pronunciation: "juː"}, + {word: "do", translation: "了", type: "verb", pronunciation: "duː"} + ] + }, + { + id: 8, + original: "I ran across the street after the dog.", + translation: "我跟着狗跑过了街道。", + words: [ + {word: "I", translation: "我", type: "pronoun", pronunciation: "aɪ"}, + {word: "ran", translation: "跑", type: "verb", pronunciation: "ræn"}, + {word: "across", translation: "穿过", type: "preposition", pronunciation: "əˈkrɔːs"}, + {word: "the", translation: "这", type: "article", pronunciation: "ðə"}, + {word: "street", translation: "街道", type: "noun", pronunciation: "striːt"}, + {word: "after", translation: "跟着", type: "preposition", pronunciation: "ˈæftər"}, + {word: "the", translation: "这", type: "article", pronunciation: "ðə"}, + {word: "dog", translation: "狗", type: "noun", pronunciation: "dɔːɡ"} + ] + }, + { + id: 9, + original: "Why did you do that? Were you afraid of the car?", + translation: "你为什么那样做?你害怕汽车吗?", + words: [ + {word: "Why", translation: "为什么", type: "adverb", pronunciation: "waɪ"}, + {word: "did", translation: "做", type: "auxiliary", pronunciation: "dɪd"}, + {word: "you", translation: "你", type: "pronoun", pronunciation: "juː"}, + {word: "do", translation: "了", type: "verb", pronunciation: "duː"}, + {word: "that", translation: "那样", type: "pronoun", pronunciation: "ðæt"}, + {word: "Were", translation: "是", type: "verb", pronunciation: "wər"}, + {word: "you", translation: "你", type: "pronoun", pronunciation: "juː"}, + {word: "afraid", translation: "害怕", type: "adjective", pronunciation: "əˈfreɪd"}, + {word: "of", translation: "的", type: "preposition", pronunciation: "ʌv"}, + {word: "the", translation: "这", type: "article", pronunciation: "ðə"}, + {word: "car", translation: "汽车", type: "noun", pronunciation: "kɑːr"} + ] + }, + { + id: 10, + original: "I wasn't afraid of the car. I was afraid of the driver.", + translation: "我不害怕汽车。我害怕司机。", + words: [ + {word: "I", translation: "我", type: "pronoun", pronunciation: "aɪ"}, + {word: "wasn't", translation: "不", type: "auxiliary", pronunciation: "ˈwʌzənt"}, + {word: "afraid", translation: "害怕", type: "adjective", pronunciation: "əˈfreɪd"}, + {word: "of", translation: "的", type: "preposition", pronunciation: "ʌv"}, + {word: "the", translation: "这", type: "article", pronunciation: "ðə"}, + {word: "car", translation: "汽车", type: "noun", pronunciation: "kɑːr"}, + {word: "I", translation: "我", type: "pronoun", pronunciation: "aɪ"}, + {word: "was", translation: "是", type: "verb", pronunciation: "wʌz"}, + {word: "afraid", translation: "害怕", type: "adjective", pronunciation: "əˈfreɪd"}, + {word: "of", translation: "的", type: "preposition", pronunciation: "ʌv"}, + {word: "the", translation: "这", type: "article", pronunciation: "ðə"}, + {word: "driver", translation: "司机", type: "noun", pronunciation: "ˈdraɪvər"} + ] + }, + { + id: 11, + original: "The driver got out of the car and began shouting at me.", + translation: "司机从车里出来,开始对我大喊。", + words: [ + {word: "The", translation: "这", type: "article", pronunciation: "ðə"}, + {word: "driver", translation: "司机", type: "noun", pronunciation: "ˈdraɪvər"}, + {word: "got out", translation: "出来", type: "phrasal verb", pronunciation: "ɡɑːt aʊt"}, + {word: "of", translation: "从", type: "preposition", pronunciation: "ʌv"}, + {word: "the", translation: "这", type: "article", pronunciation: "ðə"}, + {word: "car", translation: "车", type: "noun", pronunciation: "kɑːr"}, + {word: "and", translation: "和", type: "conjunction", pronunciation: "ænd"}, + {word: "began", translation: "开始", type: "verb", pronunciation: "bɪˈɡæn"}, + {word: "shouting", translation: "大喊", type: "verb", pronunciation: "ˈʃaʊtɪŋ"}, + {word: "at", translation: "对", type: "preposition", pronunciation: "æt"}, + {word: "me", translation: "我", type: "pronoun", pronunciation: "miː"} + ] + }, + { + id: 12, + original: "You see, it was my dog.", + translation: "你看,那是我的狗。", + words: [ + {word: "You", translation: "你", type: "pronoun", pronunciation: "juː"}, + {word: "see", translation: "看", type: "verb", pronunciation: "siː"}, + {word: "it", translation: "它", type: "pronoun", pronunciation: "ɪt"}, + {word: "was", translation: "是", type: "verb", pronunciation: "wʌz"}, + {word: "my", translation: "我的", type: "pronoun", pronunciation: "maɪ"}, + {word: "dog", translation: "狗", type: "noun", pronunciation: "dɔːɡ"} + ] + } + ] + } + ] + }, + { + title: "Roy's CD Collection - 罗伊的CD收藏", + totalSentences: 10, + chapters: [ + { + title: "Chapter 1: My Friend Roy - 我的朋友罗伊", + sentences: [ + { + id: 1, + original: "My friend, Roy, died last year.", + translation: "我的朋友罗伊去年去世了。", + words: [ + {word: "My", translation: "我的", type: "pronoun", pronunciation: "maɪ"}, + {word: "friend", translation: "朋友", type: "noun", pronunciation: "frend"}, + {word: "Roy", translation: "罗伊", type: "noun", pronunciation: "rɔɪ"}, + {word: "died", translation: "去世了", type: "verb", pronunciation: "daɪd"}, + {word: "last", translation: "去年", type: "adjective", pronunciation: "læst"}, + {word: "year", translation: "年", type: "noun", pronunciation: "jɪr"} + ] + }, + { + id: 2, + original: "He left me his CD player and his collection of CDs.", + translation: "他留给我他的CD播放器和CD收藏。", + words: [ + {word: "He", translation: "他", type: "pronoun", pronunciation: "hiː"}, + {word: "left", translation: "留给", type: "verb", pronunciation: "left"}, + {word: "me", translation: "我", type: "pronoun", pronunciation: "miː"}, + {word: "his", translation: "他的", type: "pronoun", pronunciation: "hɪz"}, + {word: "CD player", translation: "CD播放器", type: "noun", pronunciation: "ˌsiː ˈdiː ˈpleɪər"}, + {word: "and", translation: "和", type: "conjunction", pronunciation: "ænd"}, + {word: "his", translation: "他的", type: "pronoun", pronunciation: "hɪz"}, + {word: "collection", translation: "收藏", type: "noun", pronunciation: "kəˈlekʃən"}, + {word: "of", translation: "的", type: "preposition", pronunciation: "ʌv"}, + {word: "CDs", translation: "CD", type: "noun", pronunciation: "ˌsiː ˈdiːz"} + ] + }, + { + id: 3, + original: "Roy spent a lot of money on CDs.", + translation: "罗伊在CD上花了很多钱。", + words: [ + {word: "Roy", translation: "罗伊", type: "noun", pronunciation: "rɔɪ"}, + {word: "spent", translation: "花了", type: "verb", pronunciation: "spent"}, + {word: "a lot of", translation: "很多", type: "phrase", pronunciation: "ə lɑːt ʌv"}, + {word: "money", translation: "钱", type: "noun", pronunciation: "ˈmʌni"}, + {word: "on", translation: "在...上", type: "preposition", pronunciation: "ɑːn"}, + {word: "CDs", translation: "CD", type: "noun", pronunciation: "ˌsiː ˈdiːz"} + ] + }, + { + id: 4, + original: "He bought one or two new CDs every week.", + translation: "他每周买一两张新CD。", + words: [ + {word: "He", translation: "他", type: "pronoun", pronunciation: "hiː"}, + {word: "bought", translation: "买", type: "verb", pronunciation: "bɔːt"}, + {word: "one or two", translation: "一两张", type: "phrase", pronunciation: "wʌn ɔːr tuː"}, + {word: "new", translation: "新的", type: "adjective", pronunciation: "nuː"}, + {word: "CDs", translation: "CD", type: "noun", pronunciation: "ˌsiː ˈdiːz"}, + {word: "every", translation: "每", type: "adjective", pronunciation: "ˈevri"}, + {word: "week", translation: "周", type: "noun", pronunciation: "wiːk"} + ] + }, + { + id: 5, + original: "He never went to the cinema or to the theatre.", + translation: "他从不去电影院或剧院。", + words: [ + {word: "He", translation: "他", type: "pronoun", pronunciation: "hiː"}, + {word: "never", translation: "从不", type: "adverb", pronunciation: "ˈnevər"}, + {word: "went", translation: "去", type: "verb", pronunciation: "went"}, + {word: "to", translation: "到", type: "preposition", pronunciation: "tuː"}, + {word: "the", translation: "这", type: "article", pronunciation: "ðə"}, + {word: "cinema", translation: "电影院", type: "noun", pronunciation: "ˈsɪnəmə"}, + {word: "or", translation: "或", type: "conjunction", pronunciation: "ɔːr"}, + {word: "to", translation: "到", type: "preposition", pronunciation: "tuː"}, + {word: "the", translation: "这", type: "article", pronunciation: "ðə"}, + {word: "theatre", translation: "剧院", type: "noun", pronunciation: "ˈθiːətər"} + ] + }, + { + id: 6, + original: "He stayed at home every evening and listened to music.", + translation: "他每天晚上都待在家里听音乐。", + words: [ + {word: "He", translation: "他", type: "pronoun", pronunciation: "hiː"}, + {word: "stayed", translation: "待", type: "verb", pronunciation: "steɪd"}, + {word: "at", translation: "在", type: "preposition", pronunciation: "æt"}, + {word: "home", translation: "家", type: "noun", pronunciation: "hoʊm"}, + {word: "every", translation: "每", type: "adjective", pronunciation: "ˈevri"}, + {word: "evening", translation: "晚上", type: "noun", pronunciation: "ˈiːvnɪŋ"}, + {word: "and", translation: "和", type: "conjunction", pronunciation: "ænd"}, + {word: "listened", translation: "听", type: "verb", pronunciation: "ˈlɪsənd"}, + {word: "to", translation: "...的", type: "preposition", pronunciation: "tuː"}, + {word: "music", translation: "音乐", type: "noun", pronunciation: "ˈmjuːzɪk"} + ] + }, + { + id: 7, + original: "He often lent CDs to his friends.", + translation: "他经常把CD借给朋友。", + words: [ + {word: "He", translation: "他", type: "pronoun", pronunciation: "hiː"}, + {word: "often", translation: "经常", type: "adverb", pronunciation: "ˈɔːfən"}, + {word: "lent", translation: "借给", type: "verb", pronunciation: "lent"}, + {word: "CDs", translation: "CD", type: "noun", pronunciation: "ˌsiː ˈdiːz"}, + {word: "to", translation: "给", type: "preposition", pronunciation: "tuː"}, + {word: "his", translation: "他的", type: "pronoun", pronunciation: "hɪz"}, + {word: "friends", translation: "朋友", type: "noun", pronunciation: "frends"} + ] + }, + { + id: 8, + original: "Sometimes they kept them.", + translation: "有时他们会留下这些CD。", + words: [ + {word: "Sometimes", translation: "有时", type: "adverb", pronunciation: "ˈsʌmtaɪmz"}, + {word: "they", translation: "他们", type: "pronoun", pronunciation: "ðeɪ"}, + {word: "kept", translation: "留下", type: "verb", pronunciation: "kept"}, + {word: "them", translation: "它们", type: "pronoun", pronunciation: "ðem"} + ] + }, + { + id: 9, + original: "He lost many CDs in this way.", + translation: "他就这样丢失了很多CD。", + words: [ + {word: "He", translation: "他", type: "pronoun", pronunciation: "hiː"}, + {word: "lost", translation: "丢失了", type: "verb", pronunciation: "lɔːst"}, + {word: "many", translation: "很多", type: "adjective", pronunciation: "ˈmeni"}, + {word: "CDs", translation: "CD", type: "noun", pronunciation: "ˌsiː ˈdiːz"}, + {word: "in", translation: "以", type: "preposition", pronunciation: "ɪn"}, + {word: "this", translation: "这种", type: "determiner", pronunciation: "ðɪs"}, + {word: "way", translation: "方式", type: "noun", pronunciation: "weɪ"} + ] + } + ] + } + ] + } + ] +}; + +// ============================================================================ +// CONTENT STRUCTURE SUMMARY - FOR AI REFERENCE +// ============================================================================ +// +// REQUIRED SECTIONS (for basic compatibility): +// - vocabulary: Object with word keys, 25+ entries focusing on past tense verbs and travel +// - Basic metadata: id, name, description, difficulty (intermediate level) +// +// RECOMMENDED SECTIONS (for optimal experience): +// - grammar: 3 topics covering past tense, direct/indirect objects, and questions +// - story: Main postcard narrative with 11 sentences across 2 chapters +// - fillInBlanks: 10 exercises focusing on past tense and object patterns +// +// OPTIONAL SECTIONS (for enhanced features): +// - corrections: Past tense error fixing exercises +// - additionalStories: Accident story and Roy's CD collection +// +// ============================================================================ +// GAME COMPATIBILITY REFERENCE +// ============================================================================ +// +// VOCABULARY-BASED GAMES: +// - Focus on past tense irregular verbs: went, taught, lent, bought, thought, spent +// - Travel and holiday vocabulary: postcard, museum, garden, waiter, decision +// - Question formation and time expressions +// +// STORY-BASED GAMES: +// - Main story: Postcard holiday narrative with relatable vacation theme +// - Supporting stories: Accident dialogue and friend's hobby story +// +// GRAMMAR-FOCUSED GAMES: +// - Past tense verb formation (regular and irregular) +// - Direct vs indirect object patterns with give/lend/send verbs +// - Question formation with did/what/where/why +// +// ============================================================================ +// LANGUAGE LEARNING FOCUS +// ============================================================================ +// +// TARGET SKILLS: +// - Past tense narrative storytelling +// - Travel and holiday vocabulary +// - Polite conversation and questions +// - Time expressions and sequence words +// +// DIFFICULTY LEVEL: Intermediate +// - Complex sentence structures with multiple clauses +// - Irregular past tense verbs requiring memorization +// - Direct/indirect object transformations +// - Question formation with auxiliary verbs +// +// ============================================================================ \ No newline at end of file diff --git a/js/content/NCE2-Lesson30.js b/js/content/NCE2-Lesson30.js new file mode 100644 index 0000000..643c38f --- /dev/null +++ b/js/content/NCE2-Lesson30.js @@ -0,0 +1,785 @@ +// === LESSON 30: FOOTBALL OR POLO? === +// English learning story with Chinese translation - Intermediate Level + +window.ContentModules = window.ContentModules || {}; + +window.ContentModules.NCE2Lesson30 = { + id: "nce2-lesson30", + name: "NCE2-Lesson30", + description: "Football or polo? - A story about the Wayle river with grammar focus on articles and quantifiers", + difficulty: "intermediate", + language: "en-US", + userLanguage: "zh-CN", + totalWords: 200, + + // === GRAMMAR LESSONS SYSTEM === + grammar: { + "articles-usage": { + title: "Articles Usage - 冠词使用", + explanation: "English uses 'a', 'an', and 'the' in specific ways, especially with names and places.", + rules: [ + "the - use with rivers, seas, oceans, mountain ranges: the Thames, the Pacific", + "no article - use with most personal names and countries: John, England", + "the - use with certain countries: the United States, the United Kingdom", + "the - use with superlatives and unique things: the best, the sun" + ], + examples: [ + { + english: "The Wayle is a small river.", + chinese: "威尔河是一条小河。", + explanation: "Use 'the' with river names", + pronunciation: "ðə weɪl ɪz ə smɔːl ˈrɪvər" + }, + { + english: "Paris is on the Seine.", + chinese: "巴黎在塞纳河上。", + explanation: "Use 'the' with famous rivers", + pronunciation: "ˈpærɪs ɪz ɒn ðə seɪn" + }, + { + english: "London is on the Thames.", + chinese: "伦敦在泰晤士河上。", + explanation: "River names always take 'the'", + pronunciation: "ˈlʌndən ɪz ɒn ðə temz" + }, + { + english: "He lives in England.", + chinese: "他住在英国。", + explanation: "Most country names don't use 'the'", + pronunciation: "hiː lɪvz ɪn ˈɪŋɡlənd" + }, + { + english: "I went to the United States.", + chinese: "我去了美国。", + explanation: "Some countries use 'the'", + pronunciation: "aɪ went tuː ðə juˈnaɪtɪd steɪts" + } + ], + exercises: [ + { + type: "fill_blank", + sentence: "_____ Thames flows through London.", + options: ["The", "A", "An", "No article"], + correct: "The", + explanation: "River names always use 'the'" + }, + { + type: "fill_blank", + sentence: "John lives in _____ England.", + options: ["the", "a", "an", "no article"], + correct: "no article", + explanation: "Most country names don't use articles" + } + ] + }, + + "some-any-usage": { + title: "Some and Any Usage - Some和Any的使用", + explanation: "English uses 'some' and 'any' differently depending on sentence type and meaning.", + rules: [ + "some - use in positive statements: There are some people", + "any - use in questions: Are there any people?", + "any - use in negative statements: There aren't any people", + "some - use in offers and requests: Would you like some tea?" + ], + examples: [ + { + english: "Some children were playing games.", + chinese: "一些孩子在玩游戏。", + explanation: "Use 'some' in positive statements", + pronunciation: "sʌm ˈtʃɪldrən wər ˈpleɪɪŋ ɡeɪmz" + }, + { + english: "There were some people rowing.", + chinese: "有一些人在划船。", + explanation: "Use 'some' to describe what exists", + pronunciation: "ðər wər sʌm ˈpiːpəl ˈroʊɪŋ" + }, + { + english: "There weren't any children in sight.", + chinese: "看不见任何孩子。", + explanation: "Use 'any' in negative statements", + pronunciation: "ðər wərnt ˈeni ˈtʃɪldrən ɪn saɪt" + }, + { + english: "Are there any boats on the river?", + chinese: "河上有船吗?", + explanation: "Use 'any' in questions", + pronunciation: "ər ðər ˈeni boʊts ɒn ðə ˈrɪvər" + }, + { + english: "Would you like some water?", + chinese: "你想要一些水吗?", + explanation: "Use 'some' in offers", + pronunciation: "wʊd juː laɪk sʌm ˈwɔːtər" + } + ], + exercises: [ + { + type: "fill_blank", + sentence: "There are _____ people on the bank.", + options: ["some", "any", "a", "the"], + correct: "some", + explanation: "Use 'some' in positive statements" + }, + { + type: "fill_blank", + sentence: "There weren't _____ children in sight.", + options: ["some", "any", "a", "the"], + correct: "any", + explanation: "Use 'any' in negative statements" + } + ] + }, + + "past-continuous": { + title: "Past Continuous Tense - 过去进行时", + explanation: "Use past continuous for actions that were in progress at a specific time in the past.", + rules: [ + "Form: was/were + verb-ing", + "Use for ongoing past actions: I was sitting by the river", + "Use for background actions in stories: Children were playing while I sat", + "Use with time expressions: at 3pm yesterday, last Sunday" + ], + examples: [ + { + english: "Some children were playing games.", + chinese: "一些孩子在玩游戏。", + explanation: "Action in progress in the past", + pronunciation: "sʌm ˈtʃɪldrən wər ˈpleɪɪŋ ɡeɪmz" + }, + { + english: "People were rowing on the river.", + chinese: "人们在河上划船。", + explanation: "Ongoing action in the past", + pronunciation: "ˈpiːpəl wər ˈroʊɪŋ ɒn ðə ˈrɪvər" + }, + { + english: "I was sitting by the river.", + chinese: "我坐在河边。", + explanation: "Past continuous shows duration", + pronunciation: "aɪ wəz ˈsɪtɪŋ baɪ ðə ˈrɪvər" + } + ], + exercises: [ + { + type: "fill_blank", + sentence: "The children _____ playing when it happened.", + options: ["were", "was", "are", "is"], + correct: "were", + explanation: "Use 'were' with plural subjects in past continuous" + } + ] + } + }, + + vocabulary: { + "polo": { + "user_language": "水球", + "type": "noun", + "pronunciation": "ˈpoʊloʊ" + }, + "river": { + "user_language": "河流", + "type": "noun", + "pronunciation": "ˈrɪvər" + }, + "cut": { + "user_language": "穿过", + "type": "verb", + "pronunciation": "kʌt" + }, + "park": { + "user_language": "公园", + "type": "noun", + "pronunciation": "pɑːrk" + }, + "afternoon": { + "user_language": "下午", + "type": "noun", + "pronunciation": "ˌæftərˈnuːn" + }, + "bank": { + "user_language": "河岸", + "type": "noun", + "pronunciation": "bæŋk" + }, + "usual": { + "user_language": "平常的", + "type": "adjective", + "pronunciation": "ˈjuːʒuəl" + }, + "children": { + "user_language": "孩子们", + "type": "noun", + "pronunciation": "ˈtʃɪldrən" + }, + "games": { + "user_language": "游戏", + "type": "noun", + "pronunciation": "ɡeɪmz" + }, + "people": { + "user_language": "人们", + "type": "noun", + "pronunciation": "ˈpiːpəl" + }, + "row": { + "user_language": "划船", + "type": "verb", + "pronunciation": "roʊ" + }, + "suddenly": { + "user_language": "突然", + "type": "adverb", + "pronunciation": "ˈsʌdənli" + }, + "kick": { + "user_language": "踢", + "type": "verb", + "pronunciation": "kɪk" + }, + "ball": { + "user_language": "球", + "type": "noun", + "pronunciation": "bɔːl" + }, + "hard": { + "user_language": "用力地", + "type": "adverb", + "pronunciation": "hɑːrd" + }, + "towards": { + "user_language": "朝向", + "type": "preposition", + "pronunciation": "təˈwɔːrdz" + }, + "passing": { + "user_language": "经过的", + "type": "adjective", + "pronunciation": "ˈpæsɪŋ" + }, + "boat": { + "user_language": "船", + "type": "noun", + "pronunciation": "boʊt" + }, + "called": { + "user_language": "叫喊", + "type": "verb", + "pronunciation": "kɔːld" + }, + "hear": { + "user_language": "听见", + "type": "verb", + "pronunciation": "hɪr" + }, + "struck": { + "user_language": "击打", + "type": "verb", + "pronunciation": "strʌk" + }, + "nearly": { + "user_language": "几乎", + "type": "adverb", + "pronunciation": "ˈnɪrli" + }, + "fell": { + "user_language": "落下", + "type": "verb", + "pronunciation": "fel" + }, + "water": { + "user_language": "水", + "type": "noun", + "pronunciation": "ˈwɔːtər" + }, + "turned": { + "user_language": "转身", + "type": "verb", + "pronunciation": "tɜːrnd" + }, + "sight": { + "user_language": "视线", + "type": "noun", + "pronunciation": "saɪt" + }, + "run away": { + "user_language": "跑开", + "type": "verb", + "pronunciation": "rʌn əˈweɪ" + }, + "laughed": { + "user_language": "笑", + "type": "verb", + "pronunciation": "læft" + }, + "realized": { + "user_language": "意识到", + "type": "verb", + "pronunciation": "ˈriəlaɪzd" + }, + "happened": { + "user_language": "发生", + "type": "verb", + "pronunciation": "ˈhæpənd" + }, + "threw": { + "user_language": "扔", + "type": "verb", + "pronunciation": "θruː" + }, + "back": { + "user_language": "回来", + "type": "adverb", + "pronunciation": "bæk" + } + }, + + // === SENTENCES FOR GAMES (extracted from stories) === + sentences: [ + { + english: "The Wayle is a small river.", + chinese: "威尔河是一条小河。", + prononciation: "ðə weɪl ɪz ə smɔːl ˈrɪvər" + }, + { + english: "It cuts across the park near my home.", + chinese: "它横穿我家附近的公园。", + prononciation: "ɪt kʌts əˈkrɔːs ðə pɑːrk nɪr maɪ hoʊm" + }, + { + english: "I like sitting by the Wayle on fine afternoons.", + chinese: "我喜欢在晴朗的下午坐在威尔河边。", + prononciation: "aɪ laɪk ˈsɪtɪŋ baɪ ðə weɪl ɑːn faɪn ˌæftərˈnuːnz" + }, + { + english: "Some children were playing games on the bank.", + chinese: "一些孩子在河岸上玩游戏。", + prononciation: "sʌm ˈtʃɪldrən wər ˈpleɪɪŋ geɪmz ɑːn ðə bæŋk" + }, + { + english: "There were some people rowing on the river.", + chinese: "河上有一些人在划船。", + prononciation: "ðɛr wər sʌm ˈpiːpəl ˈroʊɪŋ ɑːn ðə ˈrɪvər" + }, + { + english: "The ball struck him so hard.", + chinese: "球重重地打在他身上。", + prononciation: "ðə bɔːl strʌk hɪm soʊ hɑːrd" + }, + { + english: "This is a pleasant surprise!", + chinese: "这真是个意外的惊喜!", + prononciation: "ðɪs ɪz ə ˈplɛzənt sərˈpraɪz" + }, + { + english: "I turned to look at the children.", + chinese: "我转身看向孩子们。", + prononciation: "aɪ tɜːrnd tuː lʊk æt ðə ˈtʃɪldrən" + }, + { + english: "They were playing football, not polo!", + chinese: "他们在踢足球,不是水球!", + prononciation: "ðeɪ wər ˈpleɪɪŋ ˈfʊtbɔːl nɑːt ˈpoʊloʊ" + } + ], + + story: { + title: "Football or polo? - 足球还是水球?", + totalSentences: 12, + chapters: [ + { + title: "Chapter 1: A Day by the River - 河边的一天", + sentences: [ + { + id: 1, + original: "The Wayle is a small river that cuts across the park near my home.", + translation: "威尔河是横穿我家附近公园的一条小河。", + words: [ + {word: "The", translation: "这条", type: "article", pronunciation: "ðə"}, + {word: "Wayle", translation: "威尔河", type: "noun", pronunciation: "weɪl"}, + {word: "is", translation: "是", type: "verb", pronunciation: "ɪz"}, + {word: "a", translation: "一条", type: "article", pronunciation: "ə"}, + {word: "small", translation: "小的", type: "adjective", pronunciation: "smɔːl"}, + {word: "river", translation: "河流", type: "noun", pronunciation: "ˈrɪvər"}, + {word: "that", translation: "那", type: "pronoun", pronunciation: "ðæt"}, + {word: "cuts", translation: "穿过", type: "verb", pronunciation: "kʌts"}, + {word: "across", translation: "横穿", type: "preposition", pronunciation: "əˈkrɔːs"}, + {word: "the", translation: "这个", type: "article", pronunciation: "ðə"}, + {word: "park", translation: "公园", type: "noun", pronunciation: "pɑːrk"}, + {word: "near", translation: "靠近", type: "preposition", pronunciation: "nɪr"}, + {word: "my", translation: "我的", type: "pronoun", pronunciation: "maɪ"}, + {word: "home", translation: "家", type: "noun", pronunciation: "hoʊm"} + ] + }, + { + id: 2, + original: "I like sitting by the Wayle on fine afternoons.", + translation: "我喜欢在天气晴朗的下午坐在威尔河边。", + words: [ + {word: "I", translation: "我", type: "pronoun", pronunciation: "aɪ"}, + {word: "like", translation: "喜欢", type: "verb", pronunciation: "laɪk"}, + {word: "sitting", translation: "坐", type: "verb", pronunciation: "ˈsɪtɪŋ"}, + {word: "by", translation: "在...旁边", type: "preposition", pronunciation: "baɪ"}, + {word: "the", translation: "这条", type: "article", pronunciation: "ðə"}, + {word: "Wayle", translation: "威尔河", type: "noun", pronunciation: "weɪl"}, + {word: "on", translation: "在", type: "preposition", pronunciation: "ɒn"}, + {word: "fine", translation: "晴朗的", type: "adjective", pronunciation: "faɪn"}, + {word: "afternoons", translation: "下午", type: "noun", pronunciation: "ˌæftərˈnuːnz"} + ] + }, + { + id: 3, + original: "It was warm last Sunday, so I went and sat on the river bank as usual.", + translation: "上星期日天气很暖和,于是我像往常一样又去河边坐坐。", + words: [ + {word: "It", translation: "天气", type: "pronoun", pronunciation: "ɪt"}, + {word: "was", translation: "是", type: "verb", pronunciation: "wəz"}, + {word: "warm", translation: "暖和的", type: "adjective", pronunciation: "wɔːrm"}, + {word: "last", translation: "上", type: "adjective", pronunciation: "læst"}, + {word: "Sunday", translation: "星期日", type: "noun", pronunciation: "ˈsʌndeɪ"}, + {word: "so", translation: "所以", type: "conjunction", pronunciation: "soʊ"}, + {word: "I", translation: "我", type: "pronoun", pronunciation: "aɪ"}, + {word: "went", translation: "去了", type: "verb", pronunciation: "went"}, + {word: "and", translation: "和", type: "conjunction", pronunciation: "ænd"}, + {word: "sat", translation: "坐", type: "verb", pronunciation: "sæt"}, + {word: "on", translation: "在", type: "preposition", pronunciation: "ɒn"}, + {word: "the", translation: "这个", type: "article", pronunciation: "ðə"}, + {word: "river", translation: "河", type: "noun", pronunciation: "ˈrɪvər"}, + {word: "bank", translation: "岸边", type: "noun", pronunciation: "bæŋk"}, + {word: "as", translation: "像", type: "adverb", pronunciation: "æz"}, + {word: "usual", translation: "往常一样", type: "adjective", pronunciation: "ˈjuːʒuəl"} + ] + }, + { + id: 4, + original: "Some children were playing games on the bank and there were some people rowing on the river.", + translation: "河岸上有些孩子在玩耍,河面上有些人在划船。", + words: [ + {word: "Some", translation: "一些", type: "determiner", pronunciation: "sʌm"}, + {word: "children", translation: "孩子们", type: "noun", pronunciation: "ˈtʃɪldrən"}, + {word: "were", translation: "正在", type: "verb", pronunciation: "wər"}, + {word: "playing", translation: "玩", type: "verb", pronunciation: "ˈpleɪɪŋ"}, + {word: "games", translation: "游戏", type: "noun", pronunciation: "ɡeɪmz"}, + {word: "on", translation: "在", type: "preposition", pronunciation: "ɒn"}, + {word: "the", translation: "这个", type: "article", pronunciation: "ðə"}, + {word: "bank", translation: "岸边", type: "noun", pronunciation: "bæŋk"}, + {word: "and", translation: "和", type: "conjunction", pronunciation: "ænd"}, + {word: "there", translation: "那里", type: "adverb", pronunciation: "ðer"}, + {word: "were", translation: "有", type: "verb", pronunciation: "wər"}, + {word: "some", translation: "一些", type: "determiner", pronunciation: "sʌm"}, + {word: "people", translation: "人们", type: "noun", pronunciation: "ˈpiːpəl"}, + {word: "rowing", translation: "划船", type: "verb", pronunciation: "ˈroʊɪŋ"}, + {word: "on", translation: "在", type: "preposition", pronunciation: "ɒn"}, + {word: "the", translation: "这条", type: "article", pronunciation: "ðə"}, + {word: "river", translation: "河", type: "noun", pronunciation: "ˈrɪvər"} + ] + } + ] + }, + { + title: "Chapter 2: The Ball Incident - 球的事件", + sentences: [ + { + id: 5, + original: "Suddenly, one of the children kicked a ball very hard and it went towards a passing boat.", + translation: "突然,一个孩子狠狠地踢了一脚球,球便向一条经过的小船飞去。", + words: [ + {word: "Suddenly", translation: "突然", type: "adverb", pronunciation: "ˈsʌdənli"}, + {word: "one", translation: "一个", type: "number", pronunciation: "wʌn"}, + {word: "of", translation: "的", type: "preposition", pronunciation: "ʌv"}, + {word: "the", translation: "这些", type: "article", pronunciation: "ðə"}, + {word: "children", translation: "孩子们", type: "noun", pronunciation: "ˈtʃɪldrən"}, + {word: "kicked", translation: "踢了", type: "verb", pronunciation: "kɪkt"}, + {word: "a", translation: "一个", type: "article", pronunciation: "ə"}, + {word: "ball", translation: "球", type: "noun", pronunciation: "bɔːl"}, + {word: "very", translation: "非常", type: "adverb", pronunciation: "ˈveri"}, + {word: "hard", translation: "用力地", type: "adverb", pronunciation: "hɑːrd"}, + {word: "and", translation: "并且", type: "conjunction", pronunciation: "ænd"}, + {word: "it", translation: "它", type: "pronoun", pronunciation: "ɪt"}, + {word: "went", translation: "飞去", type: "verb", pronunciation: "went"}, + {word: "towards", translation: "朝向", type: "preposition", pronunciation: "təˈwɔːrdz"}, + {word: "a", translation: "一条", type: "article", pronunciation: "ə"}, + {word: "passing", translation: "经过的", type: "adjective", pronunciation: "ˈpæsɪŋ"}, + {word: "boat", translation: "船", type: "noun", pronunciation: "boʊt"} + ] + }, + { + id: 6, + original: "Some people on the bank called out to the man in the boat, but he did not hear them.", + translation: "岸上的一些人对船上的人高喊,但他没有听见。", + words: [ + {word: "Some", translation: "一些", type: "determiner", pronunciation: "sʌm"}, + {word: "people", translation: "人们", type: "noun", pronunciation: "ˈpiːpəl"}, + {word: "on", translation: "在", type: "preposition", pronunciation: "ɒn"}, + {word: "the", translation: "这个", type: "article", pronunciation: "ðə"}, + {word: "bank", translation: "岸上", type: "noun", pronunciation: "bæŋk"}, + {word: "called", translation: "叫喊", type: "verb", pronunciation: "kɔːld"}, + {word: "out", translation: "出来", type: "adverb", pronunciation: "aʊt"}, + {word: "to", translation: "对", type: "preposition", pronunciation: "tuː"}, + {word: "the", translation: "这个", type: "article", pronunciation: "ðə"}, + {word: "man", translation: "人", type: "noun", pronunciation: "mæn"}, + {word: "in", translation: "在", type: "preposition", pronunciation: "ɪn"}, + {word: "the", translation: "这条", type: "article", pronunciation: "ðə"}, + {word: "boat", translation: "船上", type: "noun", pronunciation: "boʊt"}, + {word: "but", translation: "但是", type: "conjunction", pronunciation: "bʌt"}, + {word: "he", translation: "他", type: "pronoun", pronunciation: "hiː"}, + {word: "did", translation: "助动词", type: "auxiliary", pronunciation: "dɪd"}, + {word: "not", translation: "不", type: "adverb", pronunciation: "nɑːt"}, + {word: "hear", translation: "听见", type: "verb", pronunciation: "hɪr"}, + {word: "them", translation: "他们", type: "pronoun", pronunciation: "ðem"} + ] + }, + { + id: 7, + original: "The ball struck him so hard that he nearly fell into the water.", + translation: "球重重地打在他身上,使他差点儿落入水中。", + words: [ + {word: "The", translation: "这个", type: "article", pronunciation: "ðə"}, + {word: "ball", translation: "球", type: "noun", pronunciation: "bɔːl"}, + {word: "struck", translation: "击打", type: "verb", pronunciation: "strʌk"}, + {word: "him", translation: "他", type: "pronoun", pronunciation: "hɪm"}, + {word: "so", translation: "如此", type: "adverb", pronunciation: "soʊ"}, + {word: "hard", translation: "用力", type: "adverb", pronunciation: "hɑːrd"}, + {word: "that", translation: "以至于", type: "conjunction", pronunciation: "ðæt"}, + {word: "he", translation: "他", type: "pronoun", pronunciation: "hiː"}, + {word: "nearly", translation: "几乎", type: "adverb", pronunciation: "ˈnɪrli"}, + {word: "fell", translation: "落下", type: "verb", pronunciation: "fel"}, + {word: "into", translation: "进入", type: "preposition", pronunciation: "ˈɪntuː"}, + {word: "the", translation: "这", type: "article", pronunciation: "ðə"}, + {word: "water", translation: "水中", type: "noun", pronunciation: "ˈwɔːtər"} + ] + }, + { + id: 8, + original: "I turned to look at the children, but there weren't any in sight: they had all run away!", + translation: "我转过头去看那些孩子,但一个也不见,全都跑了!", + words: [ + {word: "I", translation: "我", type: "pronoun", pronunciation: "aɪ"}, + {word: "turned", translation: "转身", type: "verb", pronunciation: "tɜːrnd"}, + {word: "to", translation: "去", type: "preposition", pronunciation: "tuː"}, + {word: "look", translation: "看", type: "verb", pronunciation: "lʊk"}, + {word: "at", translation: "看", type: "preposition", pronunciation: "æt"}, + {word: "the", translation: "这些", type: "article", pronunciation: "ðə"}, + {word: "children", translation: "孩子们", type: "noun", pronunciation: "ˈtʃɪldrən"}, + {word: "but", translation: "但是", type: "conjunction", pronunciation: "bʌt"}, + {word: "there", translation: "那里", type: "adverb", pronunciation: "ðer"}, + {word: "weren't", translation: "没有", type: "verb", pronunciation: "wərnt"}, + {word: "any", translation: "任何", type: "determiner", pronunciation: "ˈeni"}, + {word: "in", translation: "在", type: "preposition", pronunciation: "ɪn"}, + {word: "sight", translation: "视线中", type: "noun", pronunciation: "saɪt"}, + {word: "they", translation: "他们", type: "pronoun", pronunciation: "ðeɪ"}, + {word: "had", translation: "已经", type: "auxiliary", pronunciation: "hæd"}, + {word: "all", translation: "全部", type: "adverb", pronunciation: "ɔːl"}, + {word: "run", translation: "跑", type: "verb", pronunciation: "rʌn"}, + {word: "away", translation: "走了", type: "adverb", pronunciation: "əˈweɪ"} + ] + } + ] + }, + { + title: "Chapter 3: The Happy Ending - 愉快的结局", + sentences: [ + { + id: 9, + original: "The man laughed when he realized what had happened.", + translation: "当那个人明白了发生的事情时,笑了。", + words: [ + {word: "The", translation: "这个", type: "article", pronunciation: "ðə"}, + {word: "man", translation: "人", type: "noun", pronunciation: "mæn"}, + {word: "laughed", translation: "笑了", type: "verb", pronunciation: "læft"}, + {word: "when", translation: "当", type: "conjunction", pronunciation: "wen"}, + {word: "he", translation: "他", type: "pronoun", pronunciation: "hiː"}, + {word: "realized", translation: "意识到", type: "verb", pronunciation: "ˈriəlaɪzd"}, + {word: "what", translation: "什么", type: "pronoun", pronunciation: "wʌt"}, + {word: "had", translation: "已经", type: "auxiliary", pronunciation: "hæd"}, + {word: "happened", translation: "发生了", type: "verb", pronunciation: "ˈhæpənd"} + ] + }, + { + id: 10, + original: "He called out to the children and threw the ball back to the bank.", + translation: "他大声叫那些孩子,把球扔回到岸上。", + words: [ + {word: "He", translation: "他", type: "pronoun", pronunciation: "hiː"}, + {word: "called", translation: "叫", type: "verb", pronunciation: "kɔːld"}, + {word: "out", translation: "出来", type: "adverb", pronunciation: "aʊt"}, + {word: "to", translation: "对", type: "preposition", pronunciation: "tuː"}, + {word: "the", translation: "这些", type: "article", pronunciation: "ðə"}, + {word: "children", translation: "孩子们", type: "noun", pronunciation: "ˈtʃɪldrən"}, + {word: "and", translation: "并且", type: "conjunction", pronunciation: "ænd"}, + {word: "threw", translation: "扔", type: "verb", pronunciation: "θruː"}, + {word: "the", translation: "这个", type: "article", pronunciation: "ðə"}, + {word: "ball", translation: "球", type: "noun", pronunciation: "bɔːl"}, + {word: "back", translation: "回", type: "adverb", pronunciation: "bæk"}, + {word: "to", translation: "到", type: "preposition", pronunciation: "tuː"}, + {word: "the", translation: "这个", type: "article", pronunciation: "ðə"}, + {word: "bank", translation: "岸上", type: "noun", pronunciation: "bæŋk"} + ] + } + ] + } + ] + }, + + // === GRAMMAR-BASED FILL IN THE BLANKS === + fillInBlanks: [ + { + sentence: "_____ Wayle is a small river.", + options: ["The", "A", "An", "No article"], + correctAnswer: "The", + explanation: "River names always use 'the'", + grammarFocus: "articles-usage" + }, + { + sentence: "There were _____ people rowing on the river.", + options: ["some", "any", "a", "the"], + correctAnswer: "some", + explanation: "Use 'some' in positive statements", + grammarFocus: "some-any-usage" + }, + { + sentence: "There weren't _____ children in sight.", + options: ["some", "any", "a", "the"], + correctAnswer: "any", + explanation: "Use 'any' in negative statements", + grammarFocus: "some-any-usage" + }, + { + sentence: "The children _____ playing games on the bank.", + options: ["were", "was", "are", "is"], + correctAnswer: "were", + explanation: "Use 'were' with plural subjects in past continuous", + grammarFocus: "past-continuous" + }, + { + sentence: "He lives in _____ England.", + options: ["the", "a", "an", "no article"], + correctAnswer: "no article", + explanation: "Most country names don't use articles", + grammarFocus: "articles-usage" + }, + { + sentence: "Are there _____ boats on the river?", + options: ["some", "any", "a", "the"], + correctAnswer: "any", + explanation: "Use 'any' in questions", + grammarFocus: "some-any-usage" + } + ], + + // === GRAMMAR CORRECTION EXERCISES === + corrections: [ + { + incorrect: "Wayle is small river.", + correct: "The Wayle is a small river.", + explanation: "River names need 'the' and countable nouns need 'a'", + grammarFocus: "articles-usage" + }, + { + incorrect: "There were any children playing.", + correct: "There were some children playing.", + explanation: "Use 'some' in positive statements, not 'any'", + grammarFocus: "some-any-usage" + }, + { + incorrect: "There wasn't some people in sight.", + correct: "There weren't any people in sight.", + explanation: "Use 'any' in negative statements, not 'some'", + grammarFocus: "some-any-usage" + }, + { + incorrect: "He goes to United States.", + correct: "He goes to the United States.", + explanation: "Some countries like 'the United States' require 'the'", + grammarFocus: "articles-usage" + } + ], + + // === COMPREHENSION QUESTIONS === + comprehension: [ + { + question: "Where does the writer like to sit?", + options: [ + "In the park", + "By the Wayle river", + "On the boat", + "In his garden" + ], + correct: "By the Wayle river", + explanation: "The writer says 'I like sitting by the Wayle on fine afternoons'" + }, + { + question: "What were the children doing?", + options: [ + "Swimming in the river", + "Playing games on the bank", + "Rowing on the river", + "Sitting by the water" + ], + correct: "Playing games on the bank", + explanation: "The text states 'Some children were playing games on the bank'" + }, + { + question: "Why didn't the man in the boat hear the people calling?", + options: [ + "He was deaf", + "The text doesn't say why", + "He was sleeping", + "The water was too loud" + ], + correct: "The text doesn't say why", + explanation: "The text only says 'he did not hear them' but doesn't give a reason" + }, + { + question: "What happened after the ball hit the man?", + options: [ + "He fell into the water", + "He got angry with the children", + "The children ran away", + "He threw the ball at the children" + ], + correct: "The children ran away", + explanation: "The text says 'there weren't any in sight: they had all run away!'" + }, + { + question: "How did the story end?", + options: [ + "The man was angry", + "The man called police", + "The man laughed and threw the ball back", + "The children came back" + ], + correct: "The man laughed and threw the ball back", + explanation: "The text ends with 'The man laughed... threw the ball back to the bank'" + } + ] +}; + +// ============================================================================ +// CONTENT STRUCTURE SUMMARY - FOR AI REFERENCE +// ============================================================================ +// +// This module represents INTERMEDIATE level English learning content for Chinese speakers: +// - Focus on past tense narrative and descriptive language +// - Grammar emphasis on articles (the/a/an) and quantifiers (some/any) +// - Rich vocabulary around outdoor activities and everyday situations +// - Complex sentence structures with subordinate clauses +// - Cultural context of British/Western recreational activities +// +// LEARNING OBJECTIVES: +// - Master use of definite/indefinite articles with different noun types +// - Understand some/any usage in different sentence types +// - Practice past continuous vs simple past tense +// - Build vocabulary around outdoor activities and emotions +// - Develop reading comprehension of narrative texts +// +// DIFFICULTY INDICATORS: +// - Longer sentences with multiple clauses +// - Past perfect and continuous tenses +// - Abstract concepts (realization, consequences) +// - Cultural references (British countryside, recreational activities) +// - Advanced vocabulary (struck, realized, rowing, etc.) +// +// ============================================================================ \ No newline at end of file diff --git a/js/content/SBS-level-1.js b/js/content/SBS-level-1.js index c37b4d3..3793ab0 100644 --- a/js/content/SBS-level-1.js +++ b/js/content/SBS-level-1.js @@ -247,8 +247,8 @@ window.ContentModules.SBSLevel1 = { sentences: [ { id: 1, - original: "Learn the alphabet: Aa Bb Cc Dd Ee Ff Gg Hh Ii Jj Kk Ll Mm Nn Oo Pp Qq Rr Ss Tt Uu Vv Ww Xx Yy Zz", - translation: "学习字母表:Aa Bb Cc Dd Ee Ff Gg Hh Ii Jj Kk Ll Mm Nn Oo Pp Qq Rr Ss Tt Uu Vv Ww Xx Yy Zz", + original: "Learn the alphabet Aa Bb Cc Dd Ee Ff Gg Hh Ii Jj Kk Ll Mm Nn Oo Pp Qq Rr Ss Tt Uu Vv Ww Xx Yy Zz", + translation: "学习字母表 Aa Bb Cc Dd Ee Ff Gg Hh Ii Jj Kk Ll Mm Nn Oo Pp Qq Rr Ss Tt Uu Vv Ww Xx Yy Zz", words: [ {word: "Learn", translation: "学习", type: "verb", pronunciation: "/lɜrn/"}, {word: "alphabet", translation: "字母表", type: "noun", pronunciation: "/ˈælfəbet/"} @@ -256,8 +256,8 @@ window.ContentModules.SBSLevel1 = { }, { id: 2, - original: "Practice numbers: 0 1 2 3 4 5 6 7 8 9 10", - translation: "练习数字:0 1 2 3 4 5 6 7 8 9 10", + original: "Practice numbers 0 1 2 3 4 5 6 7 8 9 10", + translation: "练习数字 0 1 2 3 4 5 6 7 8 9 10", words: [ {word: "Practice", translation: "练习", type: "verb", pronunciation: "/ˈpræktɪs/"}, {word: "numbers", translation: "数字", type: "noun", pronunciation: "/ˈnʌmbərz/"} diff --git a/js/content/WTA1B1-documented.js b/js/content/WTA1B1-documented.js new file mode 100644 index 0000000..4e55e98 --- /dev/null +++ b/js/content/WTA1B1-documented.js @@ -0,0 +1,1252 @@ +// === ENGLISH LETTERS AND PETS STORY === +// Complete English story with Chinese translation and pronunciation + +window.ContentModules = window.ContentModules || {}; + +window.ContentModules.WTA1B1 = { + id: "wta1b1", + name: "WTA1B-1", + description: "English learning story with letters U, V, T and pet vocabulary", + difficulty: "beginner", + language: "en-US", + userLanguage: "zh-CN", + totalWords: 150, + + // === GRAMMAR LESSONS SYSTEM === + grammar: { + "demonstrative-pronouns": { + title: "Demonstrative Pronouns - 指示代词", + explanation: "English uses specific words to point to things that are near or far, singular or plural.", + rules: [ // Array of simple rule statements + "this - for one thing that is close", // Rule 1: Singular + proximity + "that - for one thing that is far", // Rule 2: Singular + distance + "these - for multiple things that are close", // Rule 3: Plural + proximity + "those - for multiple things that are far" // Rule 4: Plural + distance + ], + examples: [ + { + english: "What is this?", // Source sentence - used in Story Reader, Quiz Game + chinese: "这是什么?", // Translation - displayed in UI, used by Memory Match + explanation: "Use 'this' for one thing close to you", // Teaching note - shown in Grammar Discovery + pronunciation: "wʌt ɪz ðɪs" // IPA format - processed by TTS engine + }, + { + english: "What are those?", // Plural demonstrative question + chinese: "那些是什么?", // Chinese equivalent - cultural context preserved + explanation: "Use 'those' for multiple things far from you", // Grammar rule reinforcement + pronunciation: "wʌt ɑːr ðoʊz" // Phonetic guide for pronunciation games + }, + { + english: "These are rabbits.", // Statement with plural demonstrative + chinese: "这些是兔子。", // Direct translation - maintains sentence structure + explanation: "Use 'these' for multiple things close to you", // Pattern explanation + pronunciation: "ðiːz ɑːr ræbɪts" // Sounds for audio-based learning + }, + { + english: "That is my pet bird.", + chinese: "那是我的宠物鸟。", + explanation: "Use 'that' for one thing far from you", + pronunciation: "ðæt ɪz maɪ pet bɜːrd" + }, + { + english: "This cat is very cute.", + chinese: "这只猫很可爱。", + explanation: "Use 'this' when pointing to something nearby", + pronunciation: "ðɪs kæt ɪz veri kjuːt" + }, + { + english: "Are these your turtles?", + chinese: "这些是你的乌龟吗?", + explanation: "Use 'these' in questions about nearby plural things", + pronunciation: "ɑːr ðiːz jʊr tɜːrtəlz" + }, + { + english: "Those dogs are playing.", + chinese: "那些狗在玩耍。", + explanation: "Use 'those' for distant plural animals or things", + pronunciation: "ðoʊz dɔːgz ɑːr pleɪɪŋ" + }, + { + english: "This is my favorite hamster.", + chinese: "这是我最喜欢的仓鼠。", + explanation: "Use 'this' to introduce something specific and close", + pronunciation: "ðɪs ɪz maɪ feɪvərɪt hæmstər" + } + ], + exercises: [ + { + type: "fill_blank", + sentence: "_____ is a dog.", + options: ["This", "These", "That", "Those"], + correct: "This", + explanation: "Use 'This' for one thing close to you" + }, + { + type: "translation", + english: "Those are turtles.", + chinese: "那些是海龟。", + focus: "Demonstrative pronoun for plural distant objects" + } + ] + }, + + "be-verb-usage": { + title: "Be Verb Usage - Be动词使用", + explanation: "English 'be' verbs change based on whether you're talking about one thing or many things.", + rules: [ + "is - used with singular nouns: It is a cat", + "are - used with plural nouns: They are dogs", + "Pattern: This/That + is, These/Those + are" + ], + examples: [ + { + english: "It is a bird.", + chinese: "它是一只鸟。", + explanation: "Use 'is' with singular nouns", + pronunciation: "ɪt ɪz ə bɜːrd" + }, + { + english: "They are birds.", + chinese: "它们是鸟。", + explanation: "Use 'are' with plural nouns", + pronunciation: "ðeɪ ɑːr bɜːrdz" + }, + { + english: "Where is the cat?", + chinese: "猫在哪里?", + explanation: "Use 'is' when asking about one thing", + pronunciation: "wer ɪz ðə kæt" + }, + { + english: "The dog is happy.", + chinese: "狗很高兴。", + explanation: "Use 'is' with singular subjects and adjectives", + pronunciation: "ðə dɔːg ɪz hæpi" + }, + { + english: "My pets are cute.", + chinese: "我的宠物很可爱。", + explanation: "Use 'are' with plural nouns like 'pets'", + pronunciation: "maɪ pets ɑːr kjuːt" + }, + { + english: "Where are the rabbits?", + chinese: "兔子在哪里?", + explanation: "Use 'are' when asking about multiple things", + pronunciation: "wer ɑːr ðə ræbɪts" + }, + { + english: "This is my turtle.", + chinese: "这是我的乌龟。", + explanation: "Use 'is' with demonstrative 'this'", + pronunciation: "ðɪs ɪz maɪ tɜːrtəl" + }, + { + english: "These are my friends.", + chinese: "这些是我的朋友。", + explanation: "Use 'are' with demonstrative 'these'", + pronunciation: "ðiːz ɑːr maɪ frends" + } + ], + exercises: [ + { + type: "fill_blank", + sentence: "They ____ turtles.", + options: ["is", "are", "am", "be"], + correct: "are", + explanation: "Use 'are' with plural subjects like 'they'" + } + ] + }, + + "prepositions-of-place": { + title: "Prepositions of Place - 地点介词", + explanation: "English uses specific words to show where things are located.", + rules: [ + "on - things touching the top of something: on the chair", + "in - things inside something: in the box", + "under - things below something: under the table" + ], + examples: [ + { + english: "The cat is on the chair.", + chinese: "猫在椅子上。", + explanation: "Use 'on' when something is touching the top", + pronunciation: "ðə kæt ɪz ɑːn ðə tʃer" + }, + { + english: "The turtle is in the water.", + chinese: "海龟在水里。", + explanation: "Use 'in' when something is inside or surrounded", + pronunciation: "ðə tɜːrtəl ɪz ɪn ðə wɔːtər" + }, + { + english: "The dog is under the table.", + chinese: "狗在桌子下面。", + explanation: "Use 'under' when something is below another thing", + pronunciation: "ðə dɔːg ɪz ʌndər ðə teɪbəl" + }, + { + english: "The bird is on the tree.", + chinese: "鸟在树上。", + explanation: "Use 'on' for things resting on surfaces", + pronunciation: "ðə bɜːrd ɪz ɑːn ðə triː" + }, + { + english: "The rabbit is in the garden.", + chinese: "兔子在花园里。", + explanation: "Use 'in' for enclosed or surrounded spaces", + pronunciation: "ðə ræbɪt ɪz ɪn ðə gɑːrdən" + }, + { + english: "The hamster is under the bed.", + chinese: "仓鼠在床下面。", + explanation: "Use 'under' for things below furniture", + pronunciation: "ðə hæmstər ɪz ʌndər ðə bed" + }, + { + english: "My pet is on the sofa.", + chinese: "我的宠物在沙发上。", + explanation: "Use 'on' when pets sit on furniture", + pronunciation: "maɪ pet ɪz ɑːn ðə soʊfə" + } + ], + exercises: [ + { + type: "fill_blank", + sentence: "The rabbit is ____ the box.", + options: ["on", "in", "under", "at"], + correct: "in", + explanation: "Use 'in' when something is inside a container" + } + ] + }, + + "modal-can": { + title: "Modal Verb 'Can' - 情态动词can", + explanation: "English uses 'can' to talk about abilities - things someone is able to do.", + rules: [ + "can + verb (base form) - expresses ability: can sing, can swim", + "can't = cannot - negative form: can't fly", + "Can + subject + verb? - question form: Can birds fly?" + ], + examples: [ + { + english: "She can sing.", + chinese: "她会唱歌。", + explanation: "Use 'can' + base verb to show ability", + pronunciation: "ʃi kæn sɪŋ" + }, + { + english: "I can't find Ding Ding!", + chinese: "我找不到丁丁!", + explanation: "Use 'can't' for negative ability", + pronunciation: "aɪ kænt faɪnd dɪŋ dɪŋ" + }, + { + english: "What can Ding Ding do?", + chinese: "丁丁能做什么?", + explanation: "Use 'can' in questions about ability", + pronunciation: "wʌt kæn dɪŋ dɪŋ du" + }, + { + english: "Dogs can run very fast.", + chinese: "狗跑得很快。", + explanation: "Use 'can' to describe general abilities", + pronunciation: "dɔːgz kæn rʌn veri fæst" + }, + { + english: "Fish can't walk on land.", + chinese: "鱼不能在陆地上走路。", + explanation: "Use 'can't' for impossible abilities", + pronunciation: "fɪʃ kænt wɔːk ɑːn lænd" + }, + { + english: "Can cats climb trees?", + chinese: "猫能爬树吗?", + explanation: "Use 'Can' at the start of yes/no questions", + pronunciation: "kæn kæts klaɪm triːz" + }, + { + english: "Birds can fly in the sky.", + chinese: "鸟能在天空中飞行。", + explanation: "Use 'can' for natural abilities", + pronunciation: "bɜːrdz kæn flaɪ ɪn ðə skaɪ" + }, + { + english: "I can take care of pets.", + chinese: "我能照顾宠物。", + explanation: "Use 'can' for learned skills", + pronunciation: "aɪ kæn teɪk ker ʌv pets" + }, + { + english: "Turtles can't run quickly.", + chinese: "乌龟不能跑得很快。", + explanation: "Use 'can't' for limited abilities", + pronunciation: "tɜːrtəlz kænt rʌn kwɪkli" + } + ], + exercises: [ + { + type: "fill_blank", + sentence: "Turtles ____ swim.", + options: ["can", "can't", "is", "are"], + correct: "can", + explanation: "Use 'can' to show natural ability" + } + ] + } + }, + + // === LETTERS DISCOVERY SYSTEM === + letters: { + "U": [ + { + word: "unhappy", // Target vocabulary - used in Whack-a-Mole, Word Storm + translation: "不开心的", // Chinese meaning - displayed in all translation games + type: "adjective", // Grammar category - used for word type filtering + pronunciation: "ʌnhæpi", // Phonetic guide - enables TTS pronunciation + example: "The cat looks unhappy." // Usage context - shown in vocabulary explanations + }, + { + word: "umbrella", // Concrete noun - good for visual memory games + translation: "雨伞", // Common Chinese object - familiar to learners + type: "noun", // Object category - used in noun-focused exercises + pronunciation: "ʌmbrɛlə", // Complex pronunciation - practice for advanced learners + example: "I need an umbrella when it rains." // Real-world usage - context building + }, + { + word: "up", // Simple directional word - beginner friendly + translation: "向上", // Basic direction concept - easy to visualize + type: "adverb", // Movement modifier - teaches spatial concepts + pronunciation: "ʌp", // Short sound - easy pronunciation practice + example: "The bird flies up high." // Action context - demonstrates usage in motion + }, + { + word: "under", // Spatial preposition - key for location games + translation: "在...下面", // Relational concept - important for grammar + type: "preposition", // Connecting word type - links objects and locations + pronunciation: "ʌndər", // Clear consonant sounds - good for phonics practice + example: "The cat hides under the table." // Spatial relationship - concrete scenario + } + ], + "V": [ + { + word: "violet", + translation: "紫色的", + type: "adjective", + pronunciation: "vaɪələt", + example: "She has a violet dress." + }, + { + word: "van", + translation: "面包车", + type: "noun", + pronunciation: "væn", + example: "The vet drives a white van." + }, + { + word: "vet", + translation: "兽医", + type: "noun", + pronunciation: "vɛt", + example: "The vet takes care of pets." + }, + { + word: "vest", + translation: "背心", + type: "noun", + pronunciation: "vɛst", + example: "He wears a warm vest." + } + ], + "T": [ + { + word: "tall", + translation: "高的", + type: "adjective", + pronunciation: "tɔl", + example: "The teacher is very tall." + }, + { + word: "turtle", + translation: "海龟", + type: "noun", + pronunciation: "tɜrtəl", + example: "The turtle moves slowly." + }, + { + word: "tent", + translation: "帐篷", + type: "noun", + pronunciation: "tɛnt", + example: "We sleep in a tent when camping." + }, + { + word: "tiger", + translation: "老虎", + type: "noun", + pronunciation: "taɪgər", + example: "The tiger is a big cat." + } + ] + }, + + vocabulary: { + "unhappy": { // Key = English word - used as primary identifier in all games + "user_language": "不开心的", // Chinese translation - core data for learning + "type": "adjective", // Grammar type - enables filtering by word categories + "pronunciation": "ʌnhæpi" // IPA notation - supports audio generation and pronunciation scoring + }, + "umbrella": { + "user_language": "雨伞", // Object name - visual association possible + "type": "noun", // Concrete noun - good for memory matching + "pronunciation": "ʌmbrɛlə" // Multi-syllable word - pronunciation challenge + }, + "up": { + "user_language": "向上", + "type": "adverb", + "pronunciation": "ʌp" + }, + "under": { + "user_language": "在...下面", + "type": "preposition", + "pronunciation": "ʌndər" + }, + "uncle": { + "user_language": "叔叔", + "type": "noun", + "pronunciation": "ʌŋkəl" + }, + "violet": { + "user_language": "紫色的", + "type": "adjective", + "pronunciation": "vaɪələt" + }, + "van": { + "user_language": "面包车", + "type": "noun", + "pronunciation": "væn" + }, + "vet": { + "user_language": "兽医", + "type": "noun", + "pronunciation": "vɛt" + }, + "vest": { + "user_language": "背心", + "type": "noun", + "pronunciation": "vɛst" + }, + "violin": { + "user_language": "小提琴", + "type": "noun", + "pronunciation": "vaɪəlɪn" + }, + "tall": { + "user_language": "高的", + "type": "adjective", + "pronunciation": "tɔl" + }, + "turtle": { + "user_language": "海龟", + "type": "noun", + "pronunciation": "tɜrtəl" + }, + "tent": { + "user_language": "帐篷", + "type": "noun", + "pronunciation": "tɛnt" + }, + "tiger": { + "user_language": "老虎", + "type": "noun", + "pronunciation": "taɪgər" + }, + "teacher": { + "user_language": "老师", + "type": "noun", + "pronunciation": "titʃər" + }, + "dog": { + "user_language": "狗", // Simple animal - universally understood + "type": "noun", // Animal category - used in themed exercises + "pronunciation": "dɔg" // Simple pronunciation - beginner-friendly + }, + "cat": { + "user_language": "猫", // Common pet - relatable to children + "type": "noun", // Animal noun - pairs well with dog in exercises + "pronunciation": "kæt" // Short vowel sound - phonics practice + }, + "bird": { + "user_language": "鸟", + "type": "noun", + "pronunciation": "bɜrd" + }, + "rabbit": { + "user_language": "兔子", + "type": "noun", + "pronunciation": "ræbɪt" + }, + "hamster": { + "user_language": "仓鼠", + "type": "noun", + "pronunciation": "hæmstər" + }, + "sofa": { + "user_language": "沙发", + "type": "noun", + "pronunciation": "soʊfə" + }, + "table": { + "user_language": "桌子", + "type": "noun", + "pronunciation": "teɪbəl" + }, + "chair": { + "user_language": "椅子", + "type": "noun", + "pronunciation": "tʃɛr" + }, + "box": { + "user_language": "盒子", + "type": "noun", + "pronunciation": "bɑks" + }, + "cupboard": { + "user_language": "橱柜", + "type": "noun", + "pronunciation": "kʌbərd" + }, + "shelf": { + "user_language": "架子", + "type": "noun", + "pronunciation": "ʃɛlf" + } + }, + + story: { + title: "The Pet Adventure - 宠物历险记", + totalSentences: 25, + chapters: [ + { + title: "Chapter 1: Choosing a Pet - 第一章:选择宠物", + sentences: [ + { + id: 1, + original: "What is this?", + translation: "这是什么?", + words: [ // Word-by-word breakdown - enables detailed language analysis + {word: "What", translation: "什么", type: "pronoun", pronunciation: "wʌt"}, // Question word - starts interrogative pattern + {word: "is", translation: "是", type: "verb", pronunciation: "ɪz"}, // Be verb - fundamental English grammar + {word: "this", translation: "这个", type: "pronoun", pronunciation: "ðɪs"} // Demonstrative - teaches proximity concept + ] + }, + { + id: 2, + original: "It is a dog.", + translation: "这是一只狗。", + words: [ // Breakdown shows article usage and noun introduction + {word: "It", translation: "它", type: "pronoun", pronunciation: "ɪt"}, // Subject pronoun - sentence structure foundation + {word: "is", translation: "是", type: "verb", pronunciation: "ɪz"}, // Linking verb - connects subject to object + {word: "a", translation: "一只", type: "article", pronunciation: "ə"}, // Indefinite article - introduces countable nouns + {word: "dog", translation: "狗", type: "noun", pronunciation: "dɔg"} // Concrete noun - vocabulary building target + ] + }, + { + id: 3, + original: "What is that?", + translation: "那是什么?", + words: [ + {word: "What", translation: "什么", type: "pronoun", pronunciation: "wʌt"}, + {word: "is", translation: "是", type: "verb", pronunciation: "ɪz"}, + {word: "that", translation: "那个", type: "pronoun", pronunciation: "ðæt"} + ] + }, + { + id: 4, + original: "It is a hamster.", + translation: "它是一只仓鼠。", + words: [ + {word: "It", translation: "它", type: "pronoun", pronunciation: "ɪt"}, + {word: "is", translation: "是", type: "verb", pronunciation: "ɪz"}, + {word: "a", translation: "一只", type: "article", pronunciation: "ə"}, + {word: "hamster", translation: "仓鼠", type: "noun", pronunciation: "hæmstər"} + ] + }, + { + id: 5, + original: "What are these?", + translation: "这些是什么?", + words: [ + {word: "What", translation: "什么", type: "pronoun", pronunciation: "wʌt"}, + {word: "are", translation: "是", type: "verb", pronunciation: "ɑr"}, + {word: "these", translation: "这些", type: "pronoun", pronunciation: "ðiz"} + ] + }, + { + id: 6, + original: "They are rabbits.", + translation: "它们是兔子。", + words: [ + {word: "They", translation: "它们", type: "pronoun", pronunciation: "ðeɪ"}, + {word: "are", translation: "是", type: "verb", pronunciation: "ɑr"}, + {word: "rabbits", translation: "兔子", type: "noun", pronunciation: "ræbɪts"} + ] + }, + { + id: 7, + original: "What are those?", + translation: "那些是什么?", + words: [ + {word: "What", translation: "什么", type: "pronoun", pronunciation: "wʌt"}, + {word: "are", translation: "是", type: "verb", pronunciation: "ɑr"}, + {word: "those", translation: "那些", type: "pronoun", pronunciation: "ðoʊz"} + ] + }, + { + id: 8, + original: "They are turtles.", + translation: "它们是海龟。", + words: [ + {word: "They", translation: "它们", type: "pronoun", pronunciation: "ðeɪ"}, + {word: "are", translation: "是", type: "verb", pronunciation: "ɑr"}, + {word: "turtles", translation: "海龟", type: "noun", pronunciation: "tɜrtəlz"} + ] + } + ] + }, + { + title: "Chapter 2: Dora's Pet Ding Ding - 第二章:多拉的宠物丁丁", + sentences: [ + { + id: 9, + original: "It is a new pet for you, Dora.", + translation: "多拉,这是给你的新宠物。", + words: [ + {word: "It", translation: "它", type: "pronoun", pronunciation: "ɪt"}, + {word: "is", translation: "是", type: "verb", pronunciation: "ɪz"}, + {word: "a", translation: "一个", type: "article", pronunciation: "ə"}, + {word: "new", translation: "新的", type: "adjective", pronunciation: "nu"}, + {word: "pet", translation: "宠物", type: "noun", pronunciation: "pɛt"}, + {word: "for", translation: "给", type: "preposition", pronunciation: "fɔr"}, + {word: "you", translation: "你", type: "pronoun", pronunciation: "ju"}, + {word: "Dora", translation: "多拉", type: "noun", pronunciation: "dɔrə"} + ] + }, + { + id: 10, + original: "Oh! It is a bird. Thank you very much.", + translation: "哦!是一只鸟。非常感谢。", + words: [ + {word: "Oh", translation: "哦", type: "interjection", pronunciation: "oʊ"}, + {word: "It", translation: "它", type: "pronoun", pronunciation: "ɪt"}, + {word: "is", translation: "是", type: "verb", pronunciation: "ɪz"}, + {word: "a", translation: "一只", type: "article", pronunciation: "ə"}, + {word: "bird", translation: "鸟", type: "noun", pronunciation: "bɜrd"}, + {word: "Thank", translation: "感谢", type: "verb", pronunciation: "θæŋk"}, + {word: "you", translation: "你", type: "pronoun", pronunciation: "ju"}, + {word: "very", translation: "非常", type: "adverb", pronunciation: "vɛri"}, + {word: "much", translation: "多", type: "adverb", pronunciation: "mʌtʃ"} + ] + }, + { + id: 11, + original: "This is my pet Ding Ding. She is a yellow bird. She can sing.", + translation: "这是我的宠物丁丁。她是一只黄色的鸟。她会唱歌。", + words: [ + {word: "This", translation: "这", type: "pronoun", pronunciation: "ðɪs"}, + {word: "is", translation: "是", type: "verb", pronunciation: "ɪz"}, + {word: "my", translation: "我的", type: "pronoun", pronunciation: "maɪ"}, + {word: "pet", translation: "宠物", type: "noun", pronunciation: "pɛt"}, + {word: "She", translation: "她", type: "pronoun", pronunciation: "ʃi"}, + {word: "yellow", translation: "黄色的", type: "adjective", pronunciation: "jɛloʊ"}, + {word: "can", translation: "能", type: "modal", pronunciation: "kæn"}, + {word: "sing", translation: "唱歌", type: "verb", pronunciation: "sɪŋ"} + ] + }, + { + id: 12, + original: "I can't find Ding Ding!", + translation: "我找不到丁丁了!", + words: [ + {word: "I", translation: "我", type: "pronoun", pronunciation: "aɪ"}, + {word: "can't", translation: "不能", type: "modal", pronunciation: "kænt"}, + {word: "find", translation: "找到", type: "verb", pronunciation: "faɪnd"} + ] + }, + { + id: 13, + original: "What are those? They are birds. One is yellow. One is blue.", + translation: "那些是什么?它们是鸟。一只是黄色的。一只是蓝色的。", + words: [ + {word: "What", translation: "什么", type: "pronoun", pronunciation: "wʌt"}, + {word: "are", translation: "是", type: "verb", pronunciation: "ɑr"}, + {word: "those", translation: "那些", type: "pronoun", pronunciation: "ðoʊz"}, + {word: "They", translation: "它们", type: "pronoun", pronunciation: "ðeɪ"}, + {word: "birds", translation: "鸟", type: "noun", pronunciation: "bɜrdz"}, + {word: "One", translation: "一只", type: "number", pronunciation: "wʌn"}, + {word: "yellow", translation: "黄色的", type: "adjective", pronunciation: "jɛloʊ"}, + {word: "blue", translation: "蓝色的", type: "adjective", pronunciation: "blu"} + ] + }, + { + id: 14, + original: "Now I have two pets!", + translation: "现在我有两只宠物了!", + words: [ + {word: "Now", translation: "现在", type: "adverb", pronunciation: "naʊ"}, + {word: "I", translation: "我", type: "pronoun", pronunciation: "aɪ"}, + {word: "have", translation: "有", type: "verb", pronunciation: "hæv"}, + {word: "two", translation: "两", type: "number", pronunciation: "tu"}, + {word: "pets", translation: "宠物", type: "noun", pronunciation: "pɛts"} + ] + } + ] + }, + { + title: "Chapter 3: Where Are the Pets? - 第三章:宠物在哪里?", + sentences: [ + { + id: 15, + original: "Where is the cat?", + translation: "猫在哪里?", + words: [ + {word: "Where", translation: "哪里", type: "adverb", pronunciation: "wɛr"}, + {word: "is", translation: "是", type: "verb", pronunciation: "ɪz"}, + {word: "the", translation: "这只", type: "article", pronunciation: "ðə"}, + {word: "cat", translation: "猫", type: "noun", pronunciation: "kæt"} + ] + }, + { + id: 16, + original: "It is on the chair.", + translation: "它在椅子上。", + words: [ + {word: "It", translation: "它", type: "pronoun", pronunciation: "ɪt"}, + {word: "is", translation: "是", type: "verb", pronunciation: "ɪz"}, + {word: "on", translation: "在...上", type: "preposition", pronunciation: "ɑn"}, + {word: "the", translation: "这个", type: "article", pronunciation: "ðə"}, + {word: "chair", translation: "椅子", type: "noun", pronunciation: "tʃɛr"} + ] + }, + { + id: 17, + original: "Where are the turtles?", + translation: "海龟在哪里?", + words: [ + {word: "Where", translation: "哪里", type: "adverb", pronunciation: "wɛr"}, + {word: "are", translation: "是", type: "verb", pronunciation: "ɑr"}, + {word: "the", translation: "这些", type: "article", pronunciation: "ðə"}, + {word: "turtles", translation: "海龟", type: "noun", pronunciation: "tɜrtəlz"} + ] + } + ] + } + ] + }, + + // === GRAMMAR-BASED FILL IN THE BLANKS === + fillInBlanks: [ + { + sentence: "_____ is a dog.", // Template with blank - player fills gap + options: ["This", "These", "That", "Those"], // Answer choices - shuffled in UI + correctAnswer: "This", // Right answer - validates player selection + explanation: "Use 'This' for one thing close to you", // Success message - reinforces rule + grammarFocus: "demonstrative-pronouns" // Links to grammar section - enables targeted practice + }, + { + sentence: "_____ are turtles.", // Plural context - tests different demonstrative + options: ["This", "These", "That", "Those"], // Same choices - different correct answer + correctAnswer: "These", // Plural demonstrative - teaches number agreement + explanation: "Use 'These' for multiple things close to you", // Explanation shows plural rule + grammarFocus: "demonstrative-pronouns" // Same focus - reinforces pattern + }, + { + sentence: "They _____ birds.", // Subject-verb agreement - core grammar concept + options: ["is", "are", "am", "be"], // Be verb options - tests understanding of forms + correctAnswer: "are", // Plural verb - matches plural subject + explanation: "Use 'are' with plural subjects", // Rule explanation - teaches subject-verb matching + grammarFocus: "be-verb-usage" // Different grammar topic - expands coverage + }, + { + sentence: "The cat is _____ the chair.", + options: ["on", "in", "under", "at"], + correctAnswer: "on", + explanation: "Use 'on' when something is on top of something else", + grammarFocus: "prepositions-of-place" + }, + { + sentence: "She _____ sing.", + options: ["can", "can't", "is", "are"], + correctAnswer: "can", + explanation: "Use 'can' to show ability", + grammarFocus: "modal-can" + }, + { + sentence: "I _____ find my pet.", + options: ["can", "can't", "is", "are"], + correctAnswer: "can't", + explanation: "Use 'can't' for negative ability", + grammarFocus: "modal-can" + } + ], + + // === GRAMMAR CORRECTION EXERCISES === + corrections: [ + { + incorrect: "This are dogs.", // Common learner error - number disagreement + correct: "These are dogs.", // Corrected version - proper plural form + explanation: "Use 'These' for multiple things, not 'This'", // Error explanation - teaches rule + grammarFocus: "demonstrative-pronouns" // Links to relevant grammar - targeted remediation + }, + { + incorrect: "They is cats.", // Subject-verb mismatch - typical mistake + correct: "They are cats.", // Fixed agreement - demonstrates correct pattern + explanation: "Use 'are' with plural subjects like 'they'", // Teaching point - reinforces rule + grammarFocus: "be-verb-usage" // Grammar connection - enables deeper practice + }, + { + incorrect: "The bird is in the chair.", // Preposition confusion - spatial relationship error + correct: "The bird is on the chair.", // Spatial correction - proper surface relationship + explanation: "Use 'on' when something is on top of furniture", // Spatial concept - visual logic + grammarFocus: "prepositions-of-place" // Category focus - systematic spatial learning + }, + { + incorrect: "She can sings.", + correct: "She can sing.", + explanation: "After 'can', use the base form of the verb", + grammarFocus: "modal-can" + } + ], + + // === ADDITIONAL READING STORIES === + additionalStories: [ + { + title: "My Uncle's Pets - 我叔叔的宠物", + totalSentences: 13, + chapters: [ + { + title: "Chapter 1: The Vet Uncle - 兽医叔叔", + sentences: [ + { + id: 1, + original: "My uncle is tall.", + translation: "我的叔叔很高。", + words: [ + {word: "My", translation: "我的", type: "pronoun", pronunciation: "maɪ"}, + {word: "uncle", translation: "叔叔", type: "noun", pronunciation: "ʌŋkəl"}, + {word: "is", translation: "是", type: "verb", pronunciation: "ɪz"}, + {word: "tall", translation: "高的", type: "adjective", pronunciation: "tɔl"} + ] + }, + { + id: 2, + original: "He is a vet.", + translation: "他是一名兽医。", + words: [ + {word: "He", translation: "他", type: "pronoun", pronunciation: "hi"}, + {word: "is", translation: "是", type: "verb", pronunciation: "ɪz"}, + {word: "a", translation: "一名", type: "article", pronunciation: "ə"}, + {word: "vet", translation: "兽医", type: "noun", pronunciation: "vɛt"} + ] + }, + { + id: 3, + original: "He can take care of pets.", + translation: "他会照顾宠物。", + words: [ + {word: "He", translation: "他", type: "pronoun", pronunciation: "hi"}, + {word: "can", translation: "会", type: "modal", pronunciation: "kæn"}, + {word: "take care", translation: "照顾", type: "verb", pronunciation: "teɪk ker"}, + {word: "of", translation: "的", type: "preposition", pronunciation: "ʌv"}, + {word: "pets", translation: "宠物", type: "noun", pronunciation: "pets"} + ] + }, + { + id: 4, + original: "This is his house.", + translation: "这是他的房子。", + words: [ + {word: "This", translation: "这", type: "pronoun", pronunciation: "ðɪs"}, + {word: "is", translation: "是", type: "verb", pronunciation: "ɪz"}, + {word: "his", translation: "他的", type: "pronoun", pronunciation: "hɪz"}, + {word: "house", translation: "房子", type: "noun", pronunciation: "haʊs"} + ] + }, + { + id: 5, + original: "What are these?", + translation: "这些是什么?", + words: [ + {word: "What", translation: "什么", type: "pronoun", pronunciation: "wʌt"}, + {word: "are", translation: "是", type: "verb", pronunciation: "ɑr"}, + {word: "these", translation: "这些", type: "pronoun", pronunciation: "ðiːz"} + ] + }, + { + id: 6, + original: "These are his pets.", + translation: "这些是他的宠物。", + words: [ + {word: "These", translation: "这些", type: "pronoun", pronunciation: "ðiːz"}, + {word: "are", translation: "是", type: "verb", pronunciation: "ɑr"}, + {word: "his", translation: "他的", type: "pronoun", pronunciation: "hɪz"}, + {word: "pets", translation: "宠物", type: "noun", pronunciation: "pets"} + ] + }, + { + id: 7, + original: "That is a dog under the table.", + translation: "那是桌子下面的一只狗。", + words: [ + {word: "That", translation: "那", type: "pronoun", pronunciation: "ðæt"}, + {word: "is", translation: "是", type: "verb", pronunciation: "ɪz"}, + {word: "a", translation: "一只", type: "article", pronunciation: "ə"}, + {word: "dog", translation: "狗", type: "noun", pronunciation: "dɔg"}, + {word: "under", translation: "在...下面", type: "preposition", pronunciation: "ʌndər"}, + {word: "the", translation: "这", type: "article", pronunciation: "ðə"}, + {word: "table", translation: "桌子", type: "noun", pronunciation: "teɪbəl"} + ] + }, + { + id: 8, + original: "This cat is on the chair.", + translation: "这只猫在椅子上。", + words: [ + {word: "This", translation: "这", type: "pronoun", pronunciation: "ðɪs"}, + {word: "cat", translation: "猫", type: "noun", pronunciation: "kæt"}, + {word: "is", translation: "是", type: "verb", pronunciation: "ɪz"}, + {word: "on", translation: "在...上面", type: "preposition", pronunciation: "ɑn"}, + {word: "the", translation: "这", type: "article", pronunciation: "ðə"}, + {word: "chair", translation: "椅子", type: "noun", pronunciation: "tʃɛr"} + ] + }, + { + id: 9, + original: "Those rabbits are in the box.", + translation: "那些兔子在盒子里。", + words: [ + {word: "Those", translation: "那些", type: "pronoun", pronunciation: "ðoʊz"}, + {word: "rabbits", translation: "兔子", type: "noun", pronunciation: "ræbɪts"}, + {word: "are", translation: "是", type: "verb", pronunciation: "ɑr"}, + {word: "in", translation: "在...里面", type: "preposition", pronunciation: "ɪn"}, + {word: "the", translation: "这", type: "article", pronunciation: "ðə"}, + {word: "box", translation: "盒子", type: "noun", pronunciation: "bɑks"} + ] + }, + { + id: 10, + original: "The turtle is in the cupboard.", + translation: "乌龟在橱柜里。", + words: [ + {word: "The", translation: "这", type: "article", pronunciation: "ðə"}, + {word: "turtle", translation: "乌龟", type: "noun", pronunciation: "tɜrtəl"}, + {word: "is", translation: "是", type: "verb", pronunciation: "ɪz"}, + {word: "in", translation: "在...里面", type: "preposition", pronunciation: "ɪn"}, + {word: "the", translation: "这", type: "article", pronunciation: "ðə"}, + {word: "cupboard", translation: "橱柜", type: "noun", pronunciation: "kʌbərd"} + ] + }, + { + id: 11, + original: "Where is the bird?", + translation: "鸟在哪里?", + words: [ + {word: "Where", translation: "哪里", type: "adverb", pronunciation: "wer"}, + {word: "is", translation: "是", type: "verb", pronunciation: "ɪz"}, + {word: "the", translation: "这", type: "article", pronunciation: "ðə"}, + {word: "bird", translation: "鸟", type: "noun", pronunciation: "bɜrd"} + ] + }, + { + id: 12, + original: "The bird is up on the shelf.", + translation: "鸟在架子上面。", + words: [ + {word: "The", translation: "这", type: "article", pronunciation: "ðə"}, + {word: "bird", translation: "鸟", type: "noun", pronunciation: "bɜrd"}, + {word: "is", translation: "是", type: "verb", pronunciation: "ɪz"}, + {word: "up", translation: "向上", type: "adverb", pronunciation: "ʌp"}, + {word: "on", translation: "在...上面", type: "preposition", pronunciation: "ɑn"}, + {word: "the", translation: "这", type: "article", pronunciation: "ðə"}, + {word: "shelf", translation: "架子", type: "noun", pronunciation: "ʃɛlf"} + ] + }, + { + id: 13, + original: "My uncle can help unhappy pets.", + translation: "我叔叔能帮助不开心的宠物。", + words: [ + {word: "My", translation: "我的", type: "pronoun", pronunciation: "maɪ"}, + {word: "uncle", translation: "叔叔", type: "noun", pronunciation: "ʌŋkəl"}, + {word: "can", translation: "能", type: "modal", pronunciation: "kæn"}, + {word: "help", translation: "帮助", type: "verb", pronunciation: "hɛlp"}, + {word: "unhappy", translation: "不开心的", type: "adjective", pronunciation: "ʌnhæpi"}, + {word: "pets", translation: "宠物", type: "noun", pronunciation: "pets"} + ] + } + ] + } + ] + }, + { + title: "The Violet Van Adventure - 紫色面包车冒险记", + totalSentences: 15, + chapters: [ + { + title: "Chapter 1: The Magic Van - 神奇的面包车", + sentences: [ + { + id: 1, + original: "This is a violet van.", + translation: "这是一辆紫色的面包车。", + words: [ + {word: "This", translation: "这", type: "pronoun", pronunciation: "ðɪs"}, + {word: "is", translation: "是", type: "verb", pronunciation: "ɪz"}, + {word: "a", translation: "一辆", type: "article", pronunciation: "ə"}, + {word: "violet", translation: "紫色的", type: "adjective", pronunciation: "vaɪələt"}, + {word: "van", translation: "面包车", type: "noun", pronunciation: "væn"} + ] + }, + { + id: 2, + original: "My teacher can drive this van.", + translation: "我的老师会开这辆面包车。", + words: [ + {word: "My", translation: "我的", type: "pronoun", pronunciation: "maɪ"}, + {word: "teacher", translation: "老师", type: "noun", pronunciation: "titʃər"}, + {word: "can", translation: "会", type: "modal", pronunciation: "kæn"}, + {word: "drive", translation: "开", type: "verb", pronunciation: "draɪv"}, + {word: "this", translation: "这辆", type: "pronoun", pronunciation: "ðɪs"}, + {word: "van", translation: "面包车", type: "noun", pronunciation: "væn"} + ] + }, + { + id: 3, + original: "What are those in the van?", + translation: "面包车里的那些是什么?", + words: [ + {word: "What", translation: "什么", type: "pronoun", pronunciation: "wʌt"}, + {word: "are", translation: "是", type: "verb", pronunciation: "ɑr"}, + {word: "those", translation: "那些", type: "pronoun", pronunciation: "ðoʊz"}, + {word: "in", translation: "在...里面", type: "preposition", pronunciation: "ɪn"}, + {word: "the", translation: "这", type: "article", pronunciation: "ðə"}, + {word: "van", translation: "面包车", type: "noun", pronunciation: "væn"} + ] + }, + { + id: 4, + original: "Those are pets!", + translation: "那些是宠物!", + words: [ + {word: "Those", translation: "那些", type: "pronoun", pronunciation: "ðoʊz"}, + {word: "are", translation: "是", type: "verb", pronunciation: "ɑr"}, + {word: "pets", translation: "宠物", type: "noun", pronunciation: "pets"} + ] + }, + { + id: 5, + original: "There is a hamster in a tent.", + translation: "有一只仓鼠在帐篷里。", + words: [ + {word: "There", translation: "有", type: "adverb", pronunciation: "ðer"}, + {word: "is", translation: "是", type: "verb", pronunciation: "ɪz"}, + {word: "a", translation: "一只", type: "article", pronunciation: "ə"}, + {word: "hamster", translation: "仓鼠", type: "noun", pronunciation: "hæmstər"}, + {word: "in", translation: "在...里面", type: "preposition", pronunciation: "ɪn"}, + {word: "a", translation: "一个", type: "article", pronunciation: "ə"}, + {word: "tent", translation: "帐篷", type: "noun", pronunciation: "tɛnt"} + ] + }, + { + id: 6, + original: "That tiger is tall.", + translation: "那只老虎很高。", + words: [ + {word: "That", translation: "那只", type: "pronoun", pronunciation: "ðæt"}, + {word: "tiger", translation: "老虎", type: "noun", pronunciation: "taɪgər"}, + {word: "is", translation: "是", type: "verb", pronunciation: "ɪz"}, + {word: "tall", translation: "高的", type: "adjective", pronunciation: "tɔl"} + ] + }, + { + id: 7, + original: "These turtles are under the umbrella.", + translation: "这些乌龟在雨伞下面。", + words: [ + {word: "These", translation: "这些", type: "pronoun", pronunciation: "ðiːz"}, + {word: "turtles", translation: "乌龟", type: "noun", pronunciation: "tɜrtəlz"}, + {word: "are", translation: "是", type: "verb", pronunciation: "ɑr"}, + {word: "under", translation: "在...下面", type: "preposition", pronunciation: "ʌndər"}, + {word: "the", translation: "这", type: "article", pronunciation: "ðə"}, + {word: "umbrella", translation: "雨伞", type: "noun", pronunciation: "ʌmbrɛlə"} + ] + }, + { + id: 8, + original: "The bird is on the violin.", + translation: "鸟在小提琴上。", + words: [ + {word: "The", translation: "这", type: "article", pronunciation: "ðə"}, + {word: "bird", translation: "鸟", type: "noun", pronunciation: "bɜrd"}, + {word: "is", translation: "是", type: "verb", pronunciation: "ɪz"}, + {word: "on", translation: "在...上面", type: "preposition", pronunciation: "ɑn"}, + {word: "the", translation: "这", type: "article", pronunciation: "ðə"}, + {word: "violin", translation: "小提琴", type: "noun", pronunciation: "vaɪəlɪn"} + ] + }, + { + id: 9, + original: "Where are the rabbits?", + translation: "兔子在哪里?", + words: [ + {word: "Where", translation: "哪里", type: "adverb", pronunciation: "wer"}, + {word: "are", translation: "是", type: "verb", pronunciation: "ɑr"}, + {word: "the", translation: "这", type: "article", pronunciation: "ðə"}, + {word: "rabbits", translation: "兔子", type: "noun", pronunciation: "ræbɪts"} + ] + }, + { + id: 10, + original: "They are in the violet vest.", + translation: "它们在紫色背心里。", + words: [ + {word: "They", translation: "它们", type: "pronoun", pronunciation: "ðeɪ"}, + {word: "are", translation: "是", type: "verb", pronunciation: "ɑr"}, + {word: "in", translation: "在...里面", type: "preposition", pronunciation: "ɪn"}, + {word: "the", translation: "这", type: "article", pronunciation: "ðə"}, + {word: "violet", translation: "紫色的", type: "adjective", pronunciation: "vaɪələt"}, + {word: "vest", translation: "背心", type: "noun", pronunciation: "vɛst"} + ] + }, + { + id: 11, + original: "My teacher is unhappy.", + translation: "我的老师不开心。", + words: [ + {word: "My", translation: "我的", type: "pronoun", pronunciation: "maɪ"}, + {word: "teacher", translation: "老师", type: "noun", pronunciation: "titʃər"}, + {word: "is", translation: "是", type: "verb", pronunciation: "ɪz"}, + {word: "unhappy", translation: "不开心的", type: "adjective", pronunciation: "ʌnhæpi"} + ] + }, + { + id: 12, + original: "She can't find her cat.", + translation: "她找不到她的猫。", + words: [ + {word: "She", translation: "她", type: "pronoun", pronunciation: "ʃi"}, + {word: "can't", translation: "不能", type: "modal", pronunciation: "kænt"}, + {word: "find", translation: "找到", type: "verb", pronunciation: "faɪnd"}, + {word: "her", translation: "她的", type: "pronoun", pronunciation: "hər"}, + {word: "cat", translation: "猫", type: "noun", pronunciation: "kæt"} + ] + }, + { + id: 13, + original: "Where is my cat?", + translation: "我的猫在哪里?", + words: [ + {word: "Where", translation: "哪里", type: "adverb", pronunciation: "wer"}, + {word: "is", translation: "是", type: "verb", pronunciation: "ɪz"}, + {word: "my", translation: "我的", type: "pronoun", pronunciation: "maɪ"}, + {word: "cat", translation: "猫", type: "noun", pronunciation: "kæt"} + ] + }, + { + id: 14, + original: "The cat is up on the van!", + translation: "猫在面包车上面!", + words: [ + {word: "The", translation: "这", type: "article", pronunciation: "ðə"}, + {word: "cat", translation: "猫", type: "noun", pronunciation: "kæt"}, + {word: "is", translation: "是", type: "verb", pronunciation: "ɪz"}, + {word: "up", translation: "向上", type: "adverb", pronunciation: "ʌp"}, + {word: "on", translation: "在...上面", type: "preposition", pronunciation: "ɑn"}, + {word: "the", translation: "这", type: "article", pronunciation: "ðə"}, + {word: "van", translation: "面包车", type: "noun", pronunciation: "væn"} + ] + }, + { + id: 15, + original: "Now my teacher is happy.", + translation: "现在我的老师开心了。", + words: [ + {word: "Now", translation: "现在", type: "adverb", pronunciation: "naʊ"}, + {word: "my", translation: "我的", type: "pronoun", pronunciation: "maɪ"}, + {word: "teacher", translation: "老师", type: "noun", pronunciation: "titʃər"}, + {word: "is", translation: "是", type: "verb", pronunciation: "ɪz"}, + {word: "happy", translation: "开心的", type: "adjective", pronunciation: "hæpi"} + ] + } + ] + } + ] + } + ] +}; + +// ============================================================================ +// CONTENT STRUCTURE SUMMARY - FOR AI REFERENCE +// ============================================================================ +// +// REQUIRED SECTIONS (for basic compatibility): +// - vocabulary: Object with word keys, minimum 10 entries +// - Basic metadata: id, name, description, difficulty +// +// RECOMMENDED SECTIONS (for optimal experience): +// - grammar: 2-4 topics with rules and examples +// - story: Main narrative with 15-30 sentences +// - fillInBlanks: 10+ exercises linked to grammar +// - letters: 3+ letters with 3-5 words each +// +// OPTIONAL SECTIONS (for enhanced features): +// - corrections: Error fixing exercises +// - additionalStories: Extended reading material +// - audio: Audio files for pronunciation +// - comprehension: Reading questions +// - matching: Pairing exercises +// +// ============================================================================ +// GAME COMPATIBILITY REFERENCE +// ============================================================================ +// +// VOCABULARY-BASED GAMES: +// - Whack-a-Mole: Uses vocabulary object directly +// - Memory Match: Pairs words with translations +// - Quiz Game: Multiple choice from vocabulary +// - Word Storm: Falling words game +// - Word Discovery: Letter-by-letter word building +// +// STORY-BASED GAMES: +// - Story Reader: Sequential sentence reading +// - Adventure Reader: RPG-style story navigation +// - Story Builder: User creates stories from vocabulary +// +// GRAMMAR-FOCUSED GAMES: +// - Grammar Discovery: Teaches rules and patterns +// - Fill-the-Blank: Uses fillInBlanks array +// - Chinese Study: Cultural and grammar content +// +// SPECIALIZED GAMES: +// - Letter Discovery: Uses letters object +// - River Run: Vocabulary with time pressure +// +// ============================================================================ +// DATA VOLUME GUIDELINES +// ============================================================================ +// +// MINIMUM (basic functionality): +// - 10 vocabulary words +// - 1 story chapter (5-8 sentences) +// - 1 grammar topic +// +// OPTIMAL (full experience): +// - 50-100 vocabulary words +// - 3-5 story chapters (20-30 sentences) +// - 3-4 grammar topics with examples +// - 15-20 fill-in-blank exercises +// - 3-5 letters with words +// +// ============================================================================ \ No newline at end of file diff --git a/js/core/content-game-compatibility.js b/js/core/content-game-compatibility.js deleted file mode 100644 index 0c6efee..0000000 --- a/js/core/content-game-compatibility.js +++ /dev/null @@ -1,626 +0,0 @@ -// === VÉRIFICATEUR DE COMPATIBILITÉ CONTENU-JEU === - -class ContentGameCompatibility { - constructor() { - this.compatibilityCache = new Map(); - this.minimumScores = { - 'whack-a-mole': 40, - 'whack-a-mole-hard': 45, - 'memory-match': 50, - 'quiz-game': 30, - 'fill-the-blank': 30, - 'adventure-reader': 50, - 'chinese-study': 35, - 'story-builder': 35, - 'story-reader': 40, - 'word-storm': 15, - 'letter-discovery': 60 - }; - } - - /** - * Vérifie si un contenu est compatible avec un jeu - * @param {Object} content - Le contenu à vérifier - * @param {string} gameType - Le type de jeu - * @returns {Object} - { compatible: boolean, score: number, reason: string, requirements: string[] } - */ - checkCompatibility(content, gameType) { - // Utiliser le cache si disponible - const cacheKey = `${content.id || content.name}_${gameType}`; - if (this.compatibilityCache.has(cacheKey)) { - return this.compatibilityCache.get(cacheKey); - } - - let result; - - // Si le contenu a déjà une analyse de compatibilité (depuis ContentScanner) - if (content.gameCompatibility && content.gameCompatibility[gameType]) { - result = this.enrichCompatibilityInfo(content.gameCompatibility[gameType], gameType); - } else { - // Analyser manuellement - result = this.analyzeCompatibility(content, gameType); - } - - // Mettre en cache - this.compatibilityCache.set(cacheKey, result); - return result; - } - - /** - * Enrichit les informations de compatibilité existantes - */ - enrichCompatibilityInfo(existingCompat, gameType) { - const minScore = this.minimumScores[gameType] || 30; - return { - compatible: existingCompat.score >= minScore, - score: existingCompat.score, - reason: existingCompat.reason || this.getDefaultReason(gameType), - requirements: this.getGameRequirements(gameType), - details: this.getDetailedAnalysis(existingCompat, gameType) - }; - } - - /** - * Analyse manuelle de compatibilité si pas déjà calculée - */ - analyzeCompatibility(content, gameType) { - const capabilities = this.analyzeContentCapabilities(content); - const compatResult = this.calculateGameCompatibilityForType(capabilities, gameType); - - return { - compatible: compatResult.compatible, - score: compatResult.score, - reason: compatResult.reason, - requirements: this.getGameRequirements(gameType), - details: this.getDetailedAnalysis(compatResult, gameType), - capabilities: capabilities - }; - } - - /** - * Analyse les capacités d'un contenu - */ - analyzeContentCapabilities(content) { - return { - hasVocabulary: this.hasContent(content, 'vocabulary'), - hasSentences: this.hasContent(content, 'sentences'), - hasGrammar: this.hasContent(content, 'grammar'), - hasAudio: this.hasContent(content, 'audio'), - hasDialogues: this.hasContent(content, 'dialogues'), - hasExercises: this.hasExercises(content), - hasFillInBlanks: this.hasContent(content, 'fillInBlanks'), - hasCorrections: this.hasContent(content, 'corrections'), - hasComprehension: this.hasContent(content, 'comprehension'), - hasMatching: this.hasContent(content, 'matching'), - hasLetters: this.hasContent(content, 'letters'), - - // Compteurs - vocabularyCount: this.countItems(content, 'vocabulary'), - sentenceCount: this.countItems(content, 'sentences'), - dialogueCount: this.countItems(content, 'dialogues'), - grammarCount: this.countItems(content, 'grammar'), - letterCount: this.countItems(content, 'letters'), - letterWordsCount: this.calculateAverageWordsPerLetter(content) - }; - } - - /** - * Calcule la compatibilité pour un type de jeu spécifique - */ - calculateGameCompatibilityForType(capabilities, gameType) { - switch (gameType) { - case 'whack-a-mole': - case 'whack-a-mole-hard': - return this.calculateWhackAMoleCompat(capabilities, gameType === 'whack-a-mole-hard'); - - case 'memory-match': - return this.calculateMemoryMatchCompat(capabilities); - - case 'quiz-game': - return this.calculateQuizGameCompat(capabilities); - - case 'fill-the-blank': - return this.calculateFillBlankCompat(capabilities); - - case 'story-reader': - return this.calculateTextReaderCompat(capabilities); - - case 'adventure-reader': - return this.calculateAdventureCompat(capabilities); - - case 'chinese-study': - return this.calculateChineseStudyCompat(capabilities); - - case 'story-builder': - return this.calculateStoryBuilderCompat(capabilities); - - case 'word-storm': - return this.calculateWordStormCompat(capabilities); - - case 'letter-discovery': - return this.calculateLetterDiscoveryCompat(capabilities); - - default: - return { compatible: true, score: 50, reason: 'Jeu non spécifiquement analysé' }; - } - } - - // === CALCULS DE COMPATIBILITÉ SPÉCIFIQUES PAR JEU === - - calculateWhackAMoleCompat(capabilities, isHard = false) { - let score = 0; - const reasons = []; - - if (capabilities.hasVocabulary && capabilities.vocabularyCount >= 5) { - score += 40; - reasons.push(`${capabilities.vocabularyCount} mots de vocabulaire`); - } else if (capabilities.vocabularyCount > 0) { - score += 20; - reasons.push(`${capabilities.vocabularyCount} mots (minimum recommandé: 5)`); - } - - if (capabilities.hasSentences && capabilities.sentenceCount >= 3) { - score += 30; - reasons.push(`${capabilities.sentenceCount} phrases`); - } else if (capabilities.sentenceCount > 0) { - score += 15; - reasons.push(`${capabilities.sentenceCount} phrases (minimum recommandé: 3)`); - } - - if (capabilities.hasAudio) { - score += 20; - reasons.push('Fichiers audio disponibles'); - } - - const minScore = isHard ? 45 : 40; - const compatible = score >= minScore; - - return { - compatible, - score, - reason: compatible ? - `Compatible: ${reasons.join(', ')}` : - `Incompatible (score: ${score}/${minScore}): Nécessite plus de vocabulaire ou phrases` - }; - } - - calculateMemoryMatchCompat(capabilities) { - let score = 0; - const reasons = []; - - if (capabilities.hasVocabulary && capabilities.vocabularyCount >= 4) { - score += 50; - reasons.push(`${capabilities.vocabularyCount} paires de vocabulaire`); - } else { - return { compatible: false, score: 0, reason: 'Nécessite au moins 4 mots de vocabulaire' }; - } - - if (capabilities.hasAudio) { - score += 30; - reasons.push('Audio pour pronunciation'); - } - - return { - compatible: score >= 50, - score, - reason: `Compatible: ${reasons.join(', ')}` - }; - } - - calculateQuizGameCompat(capabilities) { - let score = 0; - const reasons = []; - - // Quiz est très flexible - if (capabilities.hasVocabulary) { - score += 30; - reasons.push('Questions de vocabulaire'); - } - if (capabilities.hasGrammar) { - score += 25; - reasons.push('Questions de grammaire'); - } - if (capabilities.hasSentences) { - score += 20; - reasons.push('Questions sur les phrases'); - } - if (capabilities.hasExercises) { - score += 45; - reasons.push('Exercices intégrés'); - } - - // Quiz fonctionne avec presque tout - if (score === 0 && (capabilities.vocabularyCount > 0 || capabilities.sentenceCount > 0)) { - score = 30; - reasons.push('Contenu de base disponible'); - } - - return { - compatible: score >= 30, - score, - reason: `Compatible: ${reasons.join(', ')}` - }; - } - - calculateFillBlankCompat(capabilities) { - let score = 0; - const reasons = []; - - if (capabilities.hasFillInBlanks) { - score += 70; - reasons.push('Exercices à trous intégrés'); - } else if (capabilities.hasSentences && capabilities.sentenceCount >= 3) { - score += 30; - reasons.push('Phrases pouvant être adaptées en exercices à trous'); - } else { - return { compatible: false, score: 0, reason: 'Nécessite des phrases ou exercices à trous' }; - } - - return { - compatible: score >= 30, - score, - reason: `Compatible: ${reasons.join(', ')}` - }; - } - - calculateTextReaderCompat(capabilities) { - let score = 0; - const reasons = []; - - if (capabilities.hasSentences && capabilities.sentenceCount >= 3) { - score += 40; - reasons.push(`${capabilities.sentenceCount} phrases à lire`); - } - if (capabilities.hasDialogues && capabilities.dialogueCount > 0) { - score += 50; - reasons.push(`${capabilities.dialogueCount} dialogues`); - } - if (capabilities.hasAudio) { - score += 10; - reasons.push('Audio disponible'); - } - - return { - compatible: score >= 40, - score, - reason: score >= 40 ? `Compatible: ${reasons.join(', ')}` : 'Nécessite des phrases ou dialogues à lire' - }; - } - - calculateAdventureCompat(capabilities) { - let score = 0; - const reasons = []; - - if (capabilities.hasDialogues && capabilities.dialogueCount > 0) { - score += 60; - reasons.push('Dialogues pour narration'); - } - if (capabilities.hasSentences && capabilities.sentenceCount >= 5) { - score += 30; - reasons.push('Contenu narratif suffisant'); - } - if (capabilities.hasVocabulary && capabilities.vocabularyCount >= 10) { - score += 10; - reasons.push('Vocabulaire riche'); - } - - return { - compatible: score >= 50, - score, - reason: score >= 50 ? `Compatible: ${reasons.join(', ')}` : 'Nécessite plus de dialogues et contenu narratif' - }; - } - - calculateChineseStudyCompat(capabilities) { - let score = 0; - const reasons = []; - - if (capabilities.hasVocabulary) { - score += 35; - reasons.push('Vocabulaire chinois'); - } - if (capabilities.hasSentences) { - score += 25; - reasons.push('Phrases chinoises'); - } - if (capabilities.hasAudio) { - score += 40; - reasons.push('Prononciation audio'); - } - - return { - compatible: score >= 35, - score, - reason: score >= 35 ? `Compatible: ${reasons.join(', ')}` : 'Optimisé pour contenu chinois' - }; - } - - calculateStoryBuilderCompat(capabilities) { - let score = 0; - const reasons = []; - - if (capabilities.hasDialogues) { - score += 40; - reasons.push('Dialogues pour construction'); - } - if (capabilities.hasSentences && capabilities.sentenceCount >= 5) { - score += 35; - reasons.push('Phrases pour séquences'); - } - if (capabilities.hasVocabulary && capabilities.vocabularyCount >= 8) { - score += 25; - reasons.push('Vocabulaire varié'); - } - - return { - compatible: score >= 35, - score, - reason: score >= 35 ? `Compatible: ${reasons.join(', ')}` : 'Nécessite contenu pour construction narrative' - }; - } - - calculateWordStormCompat(capabilities) { - let score = 0; - const reasons = []; - - // Word Storm nécessite principalement du vocabulaire - if (capabilities.hasVocabulary && capabilities.vocabularyCount >= 5) { - score += 60; - reasons.push(`${capabilities.vocabularyCount} mots de vocabulaire`); - } else if (capabilities.vocabularyCount > 0) { - score += 30; - reasons.push(`${capabilities.vocabularyCount} mots (peu mais suffisant)`); - } - - // Bonus pour plus de vocabulaire - if (capabilities.vocabularyCount >= 20) { - score += 15; - reasons.push('Vocabulaire riche'); - } - - // Bonus si les mots ont des prononciations - if (capabilities.hasPronunciation) { - score += 10; - reasons.push('Prononciations disponibles'); - } - - // Word Storm peut fonctionner même avec peu de contenu - if (score === 0 && (capabilities.hasSentences || capabilities.hasDialogues)) { - score = 25; - reasons.push('Peut extraire vocabulaire des phrases/dialogues'); - } - - return { - compatible: score >= 15, - score, - reason: score >= 15 ? `Compatible: ${reasons.join(', ')}` : 'Nécessite au moins quelques mots de vocabulaire' - }; - } - - calculateLetterDiscoveryCompat(capabilities) { - let score = 0; - const reasons = []; - - // Letter Discovery requires predefined letters structure - if (capabilities.hasLetters) { - score += 80; - const letterCount = capabilities.letterCount || 'unknown'; - reasons.push(`Structure de lettres prédéfinie (${letterCount} lettres)`); - } else { - return { - compatible: false, - score: 0, - reason: 'Nécessite une structure de lettres prédéfinie (content.letters)' - }; - } - - // Bonus for well-structured letter content - if (capabilities.letterWordsCount && capabilities.letterWordsCount >= 3) { - score += 20; - reasons.push(`${capabilities.letterWordsCount} mots par lettre en moyenne`); - } - - return { - compatible: score >= 60, - score, - reason: score >= 60 ? `Compatible: ${reasons.join(', ')}` : 'Structure de lettres insuffisante' - }; - } - - // === UTILITAIRES === - - hasContent(content, type) { - // Vérification standard - const data = content[type] || content.rawContent?.[type] || content.adaptedContent?.[type]; - if (data) { - if (Array.isArray(data)) return data.length > 0; - if (typeof data === 'object') return Object.keys(data).length > 0; - return !!data; - } - - // Support pour formats spéciaux - if (type === 'sentences' && content.story?.chapters) { - // Format story avec chapitres (comme Dragon's Pearl) - return content.story.chapters.some(chapter => - chapter.sentences && chapter.sentences.length > 0 - ); - } - - if (type === 'dialogues' && content.story?.chapters) { - // Vérifier s'il y a du contenu narratif riche dans les stories - return content.story.chapters.length > 1; // Multiple chapitres = contenu narratif - } - - return false; - } - - hasExercises(content) { - return this.hasContent(content, 'exercises') || - this.hasContent(content, 'fillInBlanks') || - this.hasContent(content, 'corrections') || - this.hasContent(content, 'comprehension') || - this.hasContent(content, 'matching'); - } - - countItems(content, type) { - // Vérification standard - const data = content[type] || content.rawContent?.[type] || content.adaptedContent?.[type]; - if (data) { - if (Array.isArray(data)) return data.length; - if (typeof data === 'object') return Object.keys(data).length; - } - - // Support pour formats spéciaux - if (type === 'sentences' && content.story?.chapters) { - // Compter toutes les phrases dans tous les chapitres - return content.story.chapters.reduce((total, chapter) => - total + (chapter.sentences ? chapter.sentences.length : 0), 0 - ); - } - - if (type === 'dialogues' && content.story?.chapters) { - // Considérer chaque chapitre comme un "dialogue" narratif - return content.story.chapters.length; - } - - if (type === 'vocabulary') { - // Vérifier d'abord le format standard - const vocab = content.vocabulary || content.rawContent?.vocabulary || content.adaptedContent?.vocabulary; - if (vocab) { - if (Array.isArray(vocab)) return vocab.length; - if (typeof vocab === 'object') return Object.keys(vocab).length; - } - } - - return 0; - } - - calculateAverageWordsPerLetter(content) { - const letters = content.letters || content.rawContent?.letters || content.adaptedContent?.letters; - if (!letters || typeof letters !== 'object') return 0; - - let totalWords = 0; - let letterCount = 0; - - Object.values(letters).forEach(letterWords => { - if (Array.isArray(letterWords)) { - totalWords += letterWords.length; - letterCount++; - } - }); - - return letterCount > 0 ? Math.round(totalWords / letterCount) : 0; - } - - getGameRequirements(gameType) { - const requirements = { - 'whack-a-mole': ['5+ mots de vocabulaire OU 3+ phrases', 'Contenu simple et répétitif'], - 'whack-a-mole-hard': ['5+ mots de vocabulaire ET 3+ phrases', 'Contenu varié'], - 'memory-match': ['4+ paires de vocabulaire', 'Idéalement avec images/audio'], - 'quiz-game': ['Vocabulaire OU phrases OU exercices', 'Très flexible'], - 'fill-the-blank': ['Phrases avec exercices à trous OU phrases simples', 'Contenu éducatif'], - 'adventure-reader': ['Dialogues + contenu narratif riche', 'Histoire cohérente'], - 'chinese-study': ['Vocabulaire et phrases chinoises', 'Audio recommandé'], - 'story-builder': ['Dialogues OU 5+ phrases', 'Vocabulaire varié'], - 'story-reader': ['Textes à lire, dialogues recommandés', 'Contenu narratif'], - 'word-storm': ['3+ mots de vocabulaire', 'Prononciations recommandées'], - 'letter-discovery': ['Structure de lettres prédéfinie (content.letters)', 'Lettres avec mots associés'] - }; - - return requirements[gameType] || ['Contenu de base']; - } - - getDefaultReason(gameType) { - const reasons = { - 'whack-a-mole': 'Jeu de rapidité nécessitant vocabulaire ou phrases', - 'memory-match': 'Jeu de mémoire optimisé pour paires vocabulaire-traduction', - 'quiz-game': 'Jeu polyvalent compatible avec la plupart des contenus', - 'fill-the-blank': 'Exercices à trous nécessitant phrases structurées', - 'adventure-reader': 'Aventure narrative nécessitant contenu riche', - 'chinese-study': 'Optimisé pour apprentissage du chinois', - 'story-builder': 'Construction narrative nécessitant éléments variés', - 'story-reader': 'Lecture d\'histoires nécessitant contenu narratif', - 'letter-discovery': 'Apprentissage par lettres nécessitant structure prédéfinie' - }; - - return reasons[gameType] || 'Compatibilité non évaluée spécifiquement'; - } - - getDetailedAnalysis(compatResult, gameType) { - return { - minimumScore: this.minimumScores[gameType] || 30, - actualScore: compatResult.score, - recommendation: compatResult.score >= (this.minimumScores[gameType] || 30) ? - 'Fortement recommandé' : - compatResult.score >= (this.minimumScores[gameType] || 30) * 0.7 ? - 'Compatible avec limitations' : - 'Non recommandé' - }; - } - - /** - * Filtre une liste de contenus pour un jeu spécifique - * @param {Array} contentList - Liste des contenus - * @param {string} gameType - Type de jeu - * @returns {Array} - Contenus compatibles triés par score - */ - filterCompatibleContent(contentList, gameType) { - return contentList - .map(content => ({ - ...content, - compatibility: this.checkCompatibility(content, gameType) - })) - .filter(content => content.compatibility.compatible) - .sort((a, b) => b.compatibility.score - a.compatibility.score); - } - - /** - * Obtient des suggestions d'amélioration pour rendre un contenu compatible - * @param {Object} content - Le contenu à analyser - * @param {string} gameType - Le type de jeu - * @returns {Array} - Liste de suggestions - */ - getImprovementSuggestions(content, gameType) { - const compatibility = this.checkCompatibility(content, gameType); - if (compatibility.compatible) return []; - - const suggestions = []; - const capabilities = compatibility.capabilities || this.analyzeContentCapabilities(content); - - switch (gameType) { - case 'whack-a-mole': - case 'whack-a-mole-hard': - if (capabilities.vocabularyCount < 5) { - suggestions.push(`Ajouter ${5 - capabilities.vocabularyCount} mots de vocabulaire supplémentaires`); - } - if (capabilities.sentenceCount < 3) { - suggestions.push(`Ajouter ${3 - capabilities.sentenceCount} phrases supplémentaires`); - } - break; - - case 'memory-match': - if (capabilities.vocabularyCount < 4) { - suggestions.push(`Ajouter ${4 - capabilities.vocabularyCount} paires de vocabulaire supplémentaires`); - } - break; - - // Autres cas... - } - - if (suggestions.length === 0) { - suggestions.push('Enrichir le contenu général du module'); - } - - return suggestions; - } - - /** - * Vide le cache de compatibilité - */ - clearCache() { - this.compatibilityCache.clear(); - } -} - -// Export global -window.ContentGameCompatibility = ContentGameCompatibility; \ No newline at end of file diff --git a/js/core/content-scanner.js b/js/core/content-scanner.js index da7f2de..5111df1 100644 --- a/js/core/content-scanner.js +++ b/js/core/content-scanner.js @@ -26,13 +26,17 @@ class ContentScanner { for (const filename of contentFiles) { try { + logSh(`🔍 Scanning content file: ${filename}`, 'DEBUG'); const contentInfo = await this.scanContentFile(filename); if (contentInfo) { + logSh(`✅ Successfully scanned: ${contentInfo.id} (${contentInfo.name})`, 'INFO'); this.discoveredContent.set(contentInfo.id, contentInfo); results.found.push(contentInfo); + } else { + logSh(`⚠️ scanContentFile returned null for ${filename}`, 'WARN'); } } catch (error) { - logSh(`⚠️ Erreur scan ${filename}:`, error.message, 'WARN'); + logSh(`⚠️ Erreur scan ${filename}: ${error.message}`, 'WARN'); results.errors.push({ filename, error: error.message }); } } @@ -110,7 +114,10 @@ class ContentScanner { 'story-prototype-optimized.js', // Optimized story with centralized vocabulary 'test-compatibility.js', // Test content for compatibility system 'test-minimal.js', // Minimal test content - 'test-rich.js' // Rich test content + 'test-rich.js', // Rich test content + 'NCE1-Lesson63-64.js', // New Concept English Book 1 - Lessons 63-64 + 'NCE2-Lesson3.js', // New Concept English Book 2 - Lesson 3 + 'NCE2-Lesson30.js' // New Concept English Book 2 - Lesson 30 ]; logSh('📂 Préchargement des fichiers connus...', 'INFO'); @@ -259,14 +266,26 @@ class ContentScanner { const loadedFiles = []; if (window.ContentModules) { + logSh(`📂 Modules already loaded in window.ContentModules:`, 'DEBUG'); for (const moduleName in window.ContentModules) { // Convertir le nom du module en nom de fichier probable const filename = this.moduleNameToFilename(moduleName); loadedFiles.push(filename); logSh(`✓ Module découvert: ${moduleName} → ${filename}`, 'INFO'); + + // Debug : vérifier si le module a un id + const module = window.ContentModules[moduleName]; + if (module.id) { + logSh(` Module ID: ${module.id}`, 'DEBUG'); + } else { + logSh(` ⚠️ Module ${moduleName} has no ID!`, 'WARN'); + } } + } else { + logSh(`⚠️ window.ContentModules is undefined!`, 'WARN'); } + logSh(`📂 Total loaded files from modules: ${loadedFiles.length}`, 'INFO'); return loadedFiles; } @@ -295,7 +314,11 @@ class ContentScanner { // AJOUT: Test compatibility modules 'TestMinimalContent': 'test-compatibility.js', 'TestRichContent': 'test-compatibility.js', - 'TestSentenceOnly': 'test-compatibility.js' + 'TestSentenceOnly': 'test-compatibility.js', + // AJOUT: NCE modules + 'NCE1Lesson6364': 'NCE1-Lesson63-64.js', + 'NCE2Lesson3': 'NCE2-Lesson3.js', + 'NCE2Lesson30': 'NCE2-Lesson30.js' }; if (mapping[moduleName]) { @@ -339,7 +362,11 @@ class ContentScanner { 'example-with-images.js', // Local JS with image support for Word Discovery // AJOUT: Fichiers générés par le système de conversion 'sbs-level-7-8-GENERATED-from-js.json', - 'english-exemple-commented-GENERATED.json' + 'english-exemple-commented-GENERATED.json', + // AJOUT: Fichiers NCE (New Concept English) + 'NCE1-Lesson63-64.js', // New Concept English Book 1 - Lessons 63-64 + 'NCE2-Lesson3.js', // New Concept English Book 2 - Lesson 3 + 'NCE2-Lesson30.js' // New Concept English Book 2 - Lesson 30 ]; const existingFiles = []; @@ -405,18 +432,24 @@ class ContentScanner { const moduleName = this.getModuleName(contentId); try { - // Détecter le type de fichier et charger en conséquence - if (filename.endsWith('.json')) { - // Fichier JSON - essayer de le charger via proxy ou local - await this.loadJsonContent(filename); - } else { - // Fichier JS - charger le script classique - await this.loadScript(`js/content/${filename}`); - } - - // Vérifier si le module existe + // Vérifier d'abord si le module est déjà chargé if (!window.ContentModules || !window.ContentModules[moduleName]) { - throw new Error(`Module ${moduleName} non trouvé après chargement`); + // Le module n'est pas encore chargé, on doit le charger + // Détecter le type de fichier et charger en conséquence + if (filename.endsWith('.json')) { + // Fichier JSON - essayer de le charger via proxy ou local + await this.loadJsonContent(filename); + } else { + // Fichier JS - charger le script classique + await this.loadScript(`js/content/${filename}`); + } + + // Vérifier si le module existe après chargement + if (!window.ContentModules || !window.ContentModules[moduleName]) { + throw new Error(`Module ${moduleName} non trouvé après chargement`); + } + } else { + logSh(`✓ Module ${moduleName} déjà chargé, pas besoin de recharger`, 'INFO'); } const module = window.ContentModules[moduleName]; @@ -434,7 +467,19 @@ class ContentScanner { extractContentInfo(module, contentId, filename) { // Analyser les capacités du contenu ultra-modulaire - const capabilities = this.analyzeContentCapabilities(module); + let capabilities; + try { + capabilities = this.analyzeContentCapabilities(module); + } catch (error) { + logSh(`⚠️ Erreur dans analyzeContentCapabilities pour ${contentId}: ${error.message}`, 'WARN'); + // Fallback avec capacités basiques + capabilities = { + hasVocabulary: !!module.vocabulary, + hasSentences: !!module.sentences, + hasGrammar: !!module.grammar, + hasBasicContent: true + }; + } return { id: module.id || contentId, @@ -453,8 +498,8 @@ class ContentScanner { // Content capabilities analysis capabilities: capabilities, - compatibility: this.calculateGameCompatibility(capabilities), - icon: this.getContentIcon(module, contentId), + compatibility: this.safeCalculateGameCompatibility(capabilities), + icon: this.safeGetContentIcon(module, contentId), difficulty: module.difficulty || 'medium', enabled: true, @@ -478,10 +523,37 @@ class ContentScanner { }, // Configuration pour les jeux - gameCompatibility: this.analyzeGameCompatibility(module) + gameCompatibility: this.safeAnalyzeGameCompatibility(module) }; } + safeCalculateGameCompatibility(capabilities) { + try { + return this.calculateGameCompatibility(capabilities); + } catch (error) { + logSh(`⚠️ Erreur dans calculateGameCompatibility: ${error.message}`, 'WARN'); + return {}; // Retourner un objet vide en cas d'erreur + } + } + + safeGetContentIcon(module, contentId) { + try { + return this.getContentIcon(module, contentId); + } catch (error) { + logSh(`⚠️ Erreur dans getContentIcon: ${error.message}`, 'WARN'); + return '📚'; // Icône par défaut + } + } + + safeAnalyzeGameCompatibility(module) { + try { + return this.analyzeGameCompatibility(module); + } catch (error) { + logSh(`⚠️ Erreur dans analyzeGameCompatibility: ${error.message}`, 'WARN'); + return {}; // Retourner un objet vide en cas d'erreur + } + } + extractContentId(filename) { return filename.replace('.js', '').toLowerCase(); } @@ -496,7 +568,11 @@ class ContentScanner { 'story-prototype-optimized': 'StoryPrototypeOptimized', 'test-compatibility': 'TestMinimalContent', 'test-minimal': 'TestMinimal', - 'test-rich': 'TestRich' + 'test-rich': 'TestRich', + // Ajout des modules NCE + 'nce1-lesson63-64': 'NCE1Lesson6364', + 'nce2-lesson3': 'NCE2Lesson3', + 'nce2-lesson30': 'NCE2Lesson30' }; return mapping[contentId] || this.toPascalCase(contentId); } @@ -742,7 +818,11 @@ class ContentScanner { 'chinese-long-story': 'ChineseLongStory', 'french-beginner-story': 'FrenchBeginnerStory', 'wta1b1': 'WTA1B1', - 'story-prototype-optimized': 'StoryPrototypeOptimized' + 'story-prototype-optimized': 'StoryPrototypeOptimized', + // Ajout des modules NCE + 'nce1-lesson63-64': 'NCE1Lesson6364', + 'nce2-lesson3': 'NCE2Lesson3', + 'nce2-lesson30': 'NCE2Lesson30' }; return specialMappings[filename] || this.toPascalCase(filename); diff --git a/js/core/game-loader.js b/js/core/game-loader.js index f400af5..967b768 100644 --- a/js/core/game-loader.js +++ b/js/core/game-loader.js @@ -325,7 +325,8 @@ const GameLoader = { 'word-storm': 'WordStorm', 'word-discovery': 'WordDiscovery', 'letter-discovery': 'LetterDiscovery', - 'river-run': 'RiverRun' + 'river-run': 'RiverRun', + 'wizard-spell-caster': 'WizardSpellCaster' }; return names[gameType] || gameType; }, @@ -345,7 +346,10 @@ const GameLoader = { 'test-rich-content': 'TestRichContent', 'test-sentence-only': 'TestSentenceOnly', 'test-minimal': 'TestMinimal', - 'test-rich': 'TestRich' + 'test-rich': 'TestRich', + 'nce1-lesson63-64': 'NCE1Lesson6364', + 'nce2-lesson3': 'NCE2Lesson3', + 'nce2-lesson30': 'NCE2Lesson30' }; return mapping[contentType] || this.toPascalCase(contentType); }, diff --git a/js/core/navigation.js b/js/core/navigation.js index 4542774..c16f8cf 100644 --- a/js/core/navigation.js +++ b/js/core/navigation.js @@ -6,12 +6,10 @@ const AppNavigation = { gamesConfig: null, contentScanner: new ContentScanner(), scannedContent: null, - compatibilityChecker: null, init() { this.loadGamesConfig(); this.initContentScanner(); - this.initCompatibilityChecker(); this.setupEventListeners(); this.handleInitialRoute(); }, @@ -32,14 +30,6 @@ const AppNavigation = { } }, - initCompatibilityChecker() { - if (window.ContentGameCompatibility) { - this.compatibilityChecker = new ContentGameCompatibility(); - logSh('🎯 Content-Game compatibility checker initialized', 'INFO'); - } else { - logSh('⚠️ ContentGameCompatibility not found, compatibility checks disabled', 'WARN'); - } - }, getDefaultConfig() { return { @@ -98,6 +88,12 @@ const AppNavigation = { icon: '🔍', description: 'Learn new words with images and interactive practice!' }, + 'wizard-spell-caster': { + enabled: true, + name: 'Wizard Spell Caster', + icon: '🧙‍♂️', + description: 'Cast spells by forming correct sentences! (Advanced - 11+ years)' + }, 'letter-discovery': { enabled: true, name: 'Letter Discovery', @@ -171,6 +167,24 @@ const AppNavigation = { name: 'The Magical Library (Optimized)', icon: '⚡', description: 'Story with smart vocabulary matching and game compatibility' + }, + 'nce1-lesson63-64': { + enabled: true, + name: 'NCE1-Lesson63-64', + icon: '👨‍⚕️', + description: 'Medical dialogue and prohibition commands with modal verbs' + }, + 'nce2-lesson3': { + enabled: true, + name: 'NCE2-Lesson3', + icon: '✉️', + description: 'Please Send Me a Card - Past tense and travel vocabulary' + }, + 'nce2-lesson30': { + enabled: true, + name: 'NCE2-Lesson30', + icon: '⚽', + description: 'Football or Polo? - Articles and quantifiers' } } }; diff --git a/js/games/wizard-spell-caster.js b/js/games/wizard-spell-caster.js new file mode 100644 index 0000000..b6ec306 --- /dev/null +++ b/js/games/wizard-spell-caster.js @@ -0,0 +1,1881 @@ +// === WIZARD SPELL CASTER GAME === +// Advanced game for 11+ years old - Form sentences to cast magical spells + +class WizardSpellCaster { + constructor({ container, content, onScoreUpdate, onGameEnd }) { + this.container = container; + this.content = content; + this.onScoreUpdate = onScoreUpdate; + this.onGameEnd = onGameEnd; + + this.score = 0; + this.enemyHP = 100; + this.playerHP = 100; + this.currentSpells = []; + this.selectedWords = []; + + // Timer invisible pour bonus de vitesse + this.spellStartTime = null; + this.averageSpellTime = 0; + this.spellCount = 0; + + // Enemy attack system + this.enemyAttackTimer = null; + this.nextEnemyAttack = this.getRandomAttackTime(); + + this.injectCSS(); + this.extractSpells(); + this.init(); + } + + injectCSS() { + if (document.getElementById('wizard-spell-caster-styles')) return; + + const styleSheet = document.createElement('style'); + styleSheet.id = 'wizard-spell-caster-styles'; + styleSheet.textContent = ` + .wizard-game-wrapper { + background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%); + min-height: 100vh; + color: white; + font-family: 'Fantasy', serif; + position: relative; + overflow: hidden; + } + + .wizard-hud { + display: flex; + justify-content: space-between; + padding: 15px; + background: rgba(0,0,0,0.3); + border-bottom: 2px solid #ffd700; + } + + .wizard-stats { + display: flex; + gap: 20px; + align-items: center; + } + + .health-bar { + width: 150px; + height: 20px; + background: rgba(255,255,255,0.2); + border-radius: 10px; + overflow: hidden; + border: 2px solid #ffd700; + } + + .health-fill { + height: 100%; + background: linear-gradient(90deg, #ff4757, #ff6b7a); + transition: width 0.3s ease; + } + + .battle-area { + display: flex; + height: 60vh; + padding: 20px; + } + + .wizard-side { + flex: 1; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + } + + .enemy-side { + flex: 1; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + } + + .wizard-character { + width: 120px; + height: 120px; + background: linear-gradient(45deg, #6c5ce7, #a29bfe); + border-radius: 50%; + display: flex; + align-items: center; + justify-content: center; + font-size: 48px; + margin-bottom: 20px; + animation: float 3s ease-in-out infinite; + box-shadow: 0 0 30px rgba(108, 92, 231, 0.6); + } + + .enemy-character { + width: 150px; + height: 150px; + background: linear-gradient(45deg, #ff4757, #ff6b7a); + border-radius: 20px; + display: flex; + align-items: center; + justify-content: center; + font-size: 64px; + margin-bottom: 20px; + animation: enemyPulse 2s ease-in-out infinite; + box-shadow: 0 0 40px rgba(255, 71, 87, 0.6); + } + + @keyframes float { + 0%, 100% { transform: translateY(0px); } + 50% { transform: translateY(-10px); } + } + + @keyframes enemyPulse { + 0%, 100% { transform: scale(1); } + 50% { transform: scale(1.05); } + } + + .spell-casting-area { + background: rgba(0,0,0,0.4); + border: 2px solid #ffd700; + border-radius: 15px; + padding: 20px; + margin: 20px; + } + + .spell-selection { + display: grid; + grid-template-columns: repeat(3, 1fr); + gap: 15px; + margin-bottom: 20px; + } + + .spell-card { + background: linear-gradient(135deg, #2c2c54, #40407a); + border: 2px solid #ffd700; + border-radius: 10px; + padding: 15px; + cursor: pointer; + transition: all 0.3s ease; + text-align: center; + } + + .spell-card:hover { + transform: translateY(-5px); + box-shadow: 0 10px 25px rgba(255, 215, 0, 0.3); + border-color: #fff; + } + + .spell-card.selected { + background: linear-gradient(135deg, #ffd700, #ffed4e); + color: #000; + transform: scale(1.05); + } + + .spell-type { + font-size: 12px; + color: #ffd700; + font-weight: bold; + margin-bottom: 5px; + } + + .spell-damage { + font-size: 14px; + color: #ff6b7a; + font-weight: bold; + } + + .sentence-builder { + background: rgba(255,255,255,0.1); + border-radius: 10px; + padding: 15px; + margin-bottom: 20px; + min-height: 80px; + border: 2px dashed #ffd700; + } + + .word-bank { + display: flex; + flex-wrap: wrap; + gap: 10px; + margin-bottom: 20px; + } + + .word-tile { + background: linear-gradient(135deg, #5f27cd, #8854d0); + color: white; + padding: 8px 15px; + border-radius: 20px; + cursor: grab; + user-select: none; + transition: all 0.3s ease; + border: 2px solid transparent; + } + + .word-tile:hover { + transform: scale(1.1); + box-shadow: 0 5px 15px rgba(95, 39, 205, 0.4); + } + + .word-tile.selected { + background: linear-gradient(135deg, #ffd700, #ffed4e); + color: #000; + border-color: #fff; + } + + .word-tile:active { + cursor: grabbing; + } + + .cast-button { + background: linear-gradient(135deg, #ff6b7a, #ff4757); + border: none; + color: white; + padding: 15px 30px; + border-radius: 25px; + font-size: 18px; + font-weight: bold; + cursor: pointer; + transition: all 0.3s ease; + box-shadow: 0 5px 15px rgba(255, 71, 87, 0.3); + width: 100%; + } + + .cast-button:hover { + transform: translateY(-3px); + box-shadow: 0 8px 25px rgba(255, 71, 87, 0.5); + } + + .cast-button:disabled { + background: #666; + cursor: not-allowed; + transform: none; + box-shadow: none; + } + + .damage-number { + position: absolute; + font-size: 36px; + font-weight: bold; + color: #ff4757; + text-shadow: 2px 2px 4px rgba(0,0,0,0.8); + pointer-events: none; + animation: damageFloat 1.5s ease-out forwards; + } + + @keyframes damageFloat { + 0% { + opacity: 1; + transform: translateY(0) scale(1); + } + 100% { + opacity: 0; + transform: translateY(-100px) scale(1.5); + } + } + + .spell-effect { + position: absolute; + width: 100px; + height: 100px; + border-radius: 50%; + pointer-events: none; + animation: spellBlast 0.8s ease-out forwards; + } + + .fire-effect { + background: radial-gradient(circle, #ff6b7a, #ff4757, transparent); + } + + .lightning-effect { + background: radial-gradient(circle, #ffd700, #ffed4e, transparent); + } + + .meteor-effect { + background: radial-gradient(circle, #a29bfe, #6c5ce7, transparent); + } + + @keyframes spellBlast { + 0% { + transform: scale(0); + opacity: 1; + } + 50% { + transform: scale(1.5); + opacity: 0.8; + } + 100% { + transform: scale(3); + opacity: 0; + } + } + + .mini-enemy { + position: absolute; + width: 60px; + height: 60px; + background: linear-gradient(45deg, #ff9ff3, #f368e0); + border-radius: 50%; + font-size: 30px; + display: flex; + align-items: center; + justify-content: center; + animation: miniEnemyFloat 3s ease-in-out infinite; + z-index: 100; + } + + @keyframes miniEnemyFloat { + 0%, 100% { transform: translateY(0px) rotate(0deg); } + 50% { transform: translateY(-15px) rotate(180deg); } + } + + .magic-quirk { + position: fixed; + width: 200px; + height: 200px; + border-radius: 50%; + background: conic-gradient(from 0deg, #ff0080, #0080ff, #ff0080); + animation: magicQuirk 2s ease-in-out; + z-index: 1000; + pointer-events: none; + } + + @keyframes magicQuirk { + 0% { + transform: translate(-50%, -50%) scale(0) rotate(0deg); + opacity: 1; + } + 50% { + transform: translate(-50%, -50%) scale(1.5) rotate(180deg); + opacity: 0.8; + } + 100% { + transform: translate(-50%, -50%) scale(0) rotate(360deg); + opacity: 0; + } + } + + .flying-bird { + position: fixed; + font-size: 48px; /* Plus gros ! */ + z-index: 500; + pointer-events: none; + width: 60px; /* Plus gros ! */ + height: 60px; /* Plus gros ! */ + display: flex; + align-items: center; + justify-content: center; + } + + .bird-path-1 { + animation: flyPath1 8s linear infinite; /* Plus rapide ! */ + } + + .bird-path-2 { + animation: flyPath2 6s linear infinite; /* Plus rapide ! */ + } + + .bird-path-3 { + animation: flyPath3 10s linear infinite; /* Plus rapide ! */ + } + + .bird-path-4 { + animation: flyPath4 12s linear infinite; /* Nouveau chemin ! */ + } + + .bird-path-5 { + animation: flyPath5 9s linear infinite; /* Encore un autre ! */ + } + + @keyframes flyPath1 { + 0% { + left: -100px; + top: 20vh; + transform: rotate(0deg) scale(1); + } + 15% { + left: 30vw; + top: 5vh; + transform: rotate(180deg) scale(1.5); /* Rotation plus douce */ + } + 30% { + left: 70vw; + top: 40vh; + transform: rotate(-90deg) scale(0.5); + } + 45% { + left: 100vw; + top: 15vh; + transform: rotate(270deg) scale(2); + } + 60% { + left: 60vw; + top: 85vh; + transform: rotate(-180deg) scale(0.8); + } + 80% { + left: 10vw; + top: 60vh; + transform: rotate(360deg) scale(1.2); + } + 100% { + left: -100px; + top: 20vh; + transform: rotate(450deg) scale(1); + } + } + + @keyframes flyPath2 { + 0% { + left: 50vw; + top: -80px; + transform: rotate(0deg) scale(0.5); + } + 20% { + left: 80vw; + top: 20vh; + transform: rotate(-225deg) scale(2.5); + } + 40% { + left: 20vw; + top: 50vh; + transform: rotate(315deg) scale(0.3); + } + 60% { + left: 90vw; + top: 80vh; + transform: rotate(-450deg) scale(3); + } + 80% { + left: 30vw; + top: 30vh; + transform: rotate(540deg) scale(0.7); + } + 100% { + left: 50vw; + top: -80px; + transform: rotate(-630deg) scale(0.5); + } + } + + @keyframes flyPath3 { + 0% { + left: 120vw; + top: 10vh; + transform: rotate(0deg) scale(1); + } + 12% { + left: 75vw; + top: 70vh; + transform: rotate(-360deg) scale(4); + } + 25% { + left: 25vw; + top: 20vh; + transform: rotate(540deg) scale(0.2); + } + 37% { + left: 85vw; + top: 90vh; + transform: rotate(-720deg) scale(3.5); + } + 50% { + left: 10vw; + top: 5vh; + transform: rotate(900deg) scale(0.4); + } + 62% { + left: 90vw; + top: 55vh; + transform: rotate(-1080deg) scale(2.8); + } + 75% { + left: 40vw; + top: 95vh; + transform: rotate(1260deg) scale(0.6); + } + 87% { + left: 70vw; + top: 25vh; + transform: rotate(-1440deg) scale(3.2); + } + 100% { + left: 120vw; + top: 10vh; + transform: rotate(1800deg) scale(1); + } + } + + @keyframes flyPath4 { + 0% { + left: 25vw; + top: 100vh; + transform: rotate(0deg) scale(1.2); + } + 20% { + left: 75vw; + top: 80vh; + transform: rotate(180deg) scale(0.7); + } + 40% { + left: 90vw; + top: 40vh; + transform: rotate(-270deg) scale(2.2); + } + 60% { + left: 40vw; + top: 20vh; + transform: rotate(360deg) scale(0.4); + } + 80% { + left: 10vw; + top: 70vh; + transform: rotate(-450deg) scale(1.8); + } + 100% { + left: 25vw; + top: 100vh; + transform: rotate(540deg) scale(1.2); + } + } + + @keyframes flyPath5 { + 0% { + left: 100vw; + top: 50vh; + transform: rotate(45deg) scale(0.8); + } + 25% { + left: 60vw; + top: 10vh; + transform: rotate(-135deg) scale(2.5); + } + 50% { + left: 20vw; + top: 80vh; + transform: rotate(225deg) scale(0.3); + } + 75% { + left: 80vw; + top: 90vh; + transform: rotate(-315deg) scale(3); + } + 100% { + left: 100vw; + top: 50vh; + transform: rotate(405deg) scale(0.8); + } + } + + .screen-shake { + animation: screenShake 0.5s ease-in-out; + } + + @keyframes screenShake { + 0%, 100% { transform: translateX(0); } + 10% { transform: translateX(-10px); } + 20% { transform: translateX(10px); } + 30% { transform: translateX(-10px); } + 40% { transform: translateX(10px); } + 50% { transform: translateX(-10px); } + 60% { transform: translateX(10px); } + 70% { transform: translateX(-10px); } + 80% { transform: translateX(10px); } + 90% { transform: translateX(-10px); } + } + + .enemy-attack-warning { + position: absolute; + top: -30px; + left: 50%; + transform: translateX(-50%); + background: #ff4757; + color: white; + padding: 5px 15px; + border-radius: 15px; + font-size: 14px; + font-weight: bold; + animation: warningPulse 1s ease-in-out infinite; + z-index: 100; + } + + @keyframes warningPulse { + 0%, 100% { opacity: 1; transform: translateX(-50%) scale(1); } + 50% { opacity: 0.6; transform: translateX(-50%) scale(1.1); } + } + + .enemy-attack-effect { + position: absolute; + width: 150px; + height: 150px; + border-radius: 50%; + background: radial-gradient(circle, #ff4757, transparent); + animation: enemyAttackBlast 1s ease-out; + pointer-events: none; + z-index: 200; + } + + @keyframes enemyAttackBlast { + 0% { + transform: scale(0); + opacity: 1; + } + 50% { + transform: scale(1.5); + opacity: 0.8; + } + 100% { + transform: scale(3); + opacity: 0; + } + } + + .enemy-charging { + animation: enemyCharging 2s ease-in-out; + } + + @keyframes enemyCharging { + 0%, 100% { + background: linear-gradient(45deg, #ff4757, #ff6b7a); + transform: scale(1); + } + 50% { + background: linear-gradient(45deg, #ff0000, #ff3333); + transform: scale(1.1); + box-shadow: 0 0 60px rgba(255, 0, 0, 0.8); + } + } + + .victory-screen, .defeat-screen { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: rgba(0,0,0,0.8); + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + z-index: 1000; + } + + .result-title { + font-size: 48px; + margin-bottom: 20px; + text-shadow: 2px 2px 4px rgba(0,0,0,0.8); + } + + .victory-screen .result-title { + color: #2ed573; + } + + .defeat-screen .result-title { + color: #ff4757; + } + + .fail-message { + position: fixed; + top: 30%; + left: 50%; + transform: translateX(-50%); + background: rgba(255, 71, 87, 0.9); + color: white; + padding: 20px 30px; + border-radius: 15px; + font-size: 24px; + font-weight: bold; + z-index: 1000; + animation: failMessagePop 2s ease-out; + text-align: center; + border: 3px solid #ffd700; + } + + @keyframes failMessagePop { + 0% { + transform: translateX(-50%) scale(0); + opacity: 0; + } + 20% { + transform: translateX(-50%) scale(1.2); + opacity: 1; + } + 80% { + transform: translateX(-50%) scale(1); + opacity: 1; + } + 100% { + transform: translateX(-50%) scale(0.8); + opacity: 0; + } + } + + /* === ENHANCED SPELL EFFECTS === */ + + /* Particle animations */ + @keyframes fireParticle { + 0% { + transform: scale(1) translate(0, 0); + opacity: 1; + } + 50% { + transform: scale(1.5) translate(var(--random-x, 20px), var(--random-y, -30px)); + opacity: 0.8; + } + 100% { + transform: scale(0.5) translate(var(--random-x, 40px), var(--random-y, -60px)); + opacity: 0; + } + } + + @keyframes lightningParticle { + 0% { + transform: scale(1) translate(0, 0); + opacity: 1; + filter: brightness(2); + } + 25% { + transform: scale(2) translate(var(--random-x, 10px), var(--random-y, -20px)); + opacity: 1; + filter: brightness(3); + } + 100% { + transform: scale(0) translate(var(--random-x, 30px), var(--random-y, -50px)); + opacity: 0; + filter: brightness(1); + } + } + + @keyframes meteorParticle { + 0% { + transform: scale(0.5) translate(0, -100px); + opacity: 0.5; + } + 30% { + transform: scale(1.2) translate(var(--random-x, 0px), 0); + opacity: 1; + } + 100% { + transform: scale(0.3) translate(var(--random-x, 20px), var(--random-y, 50px)); + opacity: 0; + } + } + + /* Screen effects */ + @keyframes meteorTrail { + 0% { + opacity: 0; + transform: translateX(100px) scaleY(0); + } + 50% { + opacity: 1; + transform: translateX(0) scaleY(1); + } + 100% { + opacity: 0; + transform: translateX(-100px) scaleY(0.5); + } + } + + @keyframes lightningFlash { + 0% { + opacity: 0; + } + 50% { + opacity: 0.8; + } + 100% { + opacity: 0; + } + } + + @keyframes fireRipple { + 0% { + transform: scale(0.5); + opacity: 1; + border-width: 3px; + } + 50% { + transform: scale(1.2); + opacity: 0.6; + border-width: 2px; + } + 100% { + transform: scale(2); + opacity: 0; + border-width: 1px; + } + } + + /* Enhanced spell effect improvements */ + .fire-effect { + background: radial-gradient(circle, #ff6b7a, #ff4757, #ff3742, transparent); + filter: drop-shadow(0 0 20px #ff4757); + animation: spellBlast 0.8s ease-out forwards, fireGlow 0.8s ease-out; + } + + .lightning-effect { + background: radial-gradient(circle, #ffd700, #ffed4e, #fff200, transparent); + filter: drop-shadow(0 0 25px #ffd700); + animation: spellBlast 0.8s ease-out forwards, lightningPulse 0.8s ease-out; + } + + .meteor-effect { + background: radial-gradient(circle, #a29bfe, #6c5ce7, #5f3dc4, transparent); + filter: drop-shadow(0 0 30px #6c5ce7); + animation: spellBlast 0.8s ease-out forwards, meteorImpact 0.8s ease-out; + } + + @keyframes fireGlow { + 0%, 100% { filter: drop-shadow(0 0 20px #ff4757) hue-rotate(0deg); } + 50% { filter: drop-shadow(0 0 40px #ff4757) hue-rotate(30deg); } + } + + @keyframes lightningPulse { + 0%, 100% { filter: drop-shadow(0 0 25px #ffd700) brightness(1); } + 50% { filter: drop-shadow(0 0 50px #ffd700) brightness(2); } + } + + @keyframes meteorImpact { + 0% { filter: drop-shadow(0 0 30px #6c5ce7) contrast(1); } + 30% { filter: drop-shadow(0 0 60px #6c5ce7) contrast(1.5); } + 100% { filter: drop-shadow(0 0 30px #6c5ce7) contrast(1); } + } + + /* Spell casting enhancement */ + .spell-card.selected { + animation: spellCharging 0.5s ease-in-out infinite alternate; + } + + @keyframes spellCharging { + 0% { + box-shadow: 0 0 20px rgba(255, 215, 0, 0.5); + transform: scale(1); + } + 100% { + box-shadow: 0 0 40px rgba(255, 215, 0, 0.8); + transform: scale(1.02); + } + } + + /* Casting effect animations */ + @keyframes magicCircleForm { + 0% { + transform: scale(0.5) rotate(0deg); + opacity: 0; + } + 50% { + transform: scale(1.1) rotate(180deg); + opacity: 1; + } + 100% { + transform: scale(1) rotate(360deg); + opacity: 0; + } + } + + @keyframes castingSparkle { + 0% { + transform: scale(1) rotate(0deg); + opacity: 1; + } + 50% { + transform: scale(1.5) rotate(180deg); + opacity: 0.8; + } + 100% { + transform: scale(0.5) rotate(360deg); + opacity: 0; + } + } + `; + document.head.appendChild(styleSheet); + } + + extractSpells() { + // Extract sentences from content and categorize by length + this.spells = { + short: [], // 3-4 words + medium: [], // 5-6 words + long: [] // 7+ words + }; + + // Process story sentences + if (this.content.story && this.content.story.chapters) { + this.content.story.chapters.forEach(chapter => { + chapter.sentences.forEach(sentence => { + const wordCount = sentence.words.length; + const spellData = { + english: sentence.original, + translation: sentence.translation, + words: sentence.words, + damage: this.calculateDamage(wordCount), + castTime: this.calculateCastTime(wordCount) + }; + + if (wordCount <= 4) { + this.spells.short.push(spellData); + } else if (wordCount <= 6) { + this.spells.medium.push(spellData); + } else { + this.spells.long.push(spellData); + } + }); + }); + } + + console.log('Spells extracted:', this.spells); + } + + calculateDamage(wordCount) { + // Augmenter significativement les points pour les phrases longues + if (wordCount <= 3) return Math.floor(Math.random() * 10) + 15; // 15-25 (phrases courtes) + if (wordCount <= 5) return Math.floor(Math.random() * 15) + 30; // 30-45 (phrases moyennes) + if (wordCount <= 7) return Math.floor(Math.random() * 20) + 50; // 50-70 (phrases longues) + return Math.floor(Math.random() * 30) + 70; // 70-100 (phrases très longues) + } + + calculateCastTime(wordCount) { + if (wordCount <= 4) return 1000; // 1 second + if (wordCount <= 6) return 2000; // 2 seconds + return 3000; // 3 seconds + } + + init() { + this.container.innerHTML = ` +
+
+
+
+
Wizard HP
+
+
+
+
+
+
Score: 0
+
+
+
+
+
Enemy HP
+
+
+
+
+
+
+ +
+
+
🧙‍♂️
+
Wizard Master
+
+
+
👹
+
Grammar Demon
+
+
+ +
+
+ +
+ +
+
Form your spell incantation:
+
+
+ +
+ +
+ + +
+
+ `; + + this.setupEventListeners(); + this.generateNewSpells(); + this.startEnemyAttackSystem(); + } + + setupEventListeners() { + document.getElementById('cast-button').addEventListener('click', () => this.castSpell()); + } + + generateNewSpells() { + this.currentSpells = []; + + // Get one spell of each type + if (this.spells.short.length > 0) { + this.currentSpells.push({ + ...this.spells.short[Math.floor(Math.random() * this.spells.short.length)], + type: 'short', + name: 'Fireball', + icon: '🔥' + }); + } + + if (this.spells.medium.length > 0) { + this.currentSpells.push({ + ...this.spells.medium[Math.floor(Math.random() * this.spells.medium.length)], + type: 'medium', + name: 'Lightning', + icon: '⚡' + }); + } + + if (this.spells.long.length > 0) { + this.currentSpells.push({ + ...this.spells.long[Math.floor(Math.random() * this.spells.long.length)], + type: 'long', + name: 'Meteor', + icon: '☄️' + }); + } + + this.renderSpellCards(); + this.selectedSpell = null; + this.selectedWords = []; + this.updateWordBank(); + this.updateSentenceBuilder(); + } + + renderSpellCards() { + const container = document.getElementById('spell-selection'); + container.innerHTML = this.currentSpells.map((spell, index) => ` +
+
${spell.icon} ${spell.name}
+
${spell.translation}
+
${spell.damage} damage
+
+ `).join(''); + + // Add click listeners + container.querySelectorAll('.spell-card').forEach(card => { + card.addEventListener('click', (e) => { + const spellIndex = parseInt(e.currentTarget.dataset.spellIndex); + this.selectSpell(spellIndex); + }); + }); + } + + selectSpell(index) { + // Remove previous selection + document.querySelectorAll('.spell-card').forEach(card => card.classList.remove('selected')); + + // Select new spell + this.selectedSpell = this.currentSpells[index]; + document.querySelector(`[data-spell-index="${index}"]`).classList.add('selected'); + + // Démarrer le timer invisible pour le bonus de vitesse + this.spellStartTime = Date.now(); + + // Reset word selection + this.selectedWords = []; + this.updateWordBank(); + this.updateSentenceBuilder(); + } + + updateWordBank() { + const container = document.getElementById('word-bank'); + + if (!this.selectedSpell) { + container.innerHTML = '
Select a spell first
'; + return; + } + + // Extract the complete sentence including ALL punctuation + const originalSentence = this.selectedSpell.english; + const words = [...this.selectedSpell.words]; + + // Extract ALL punctuation from the original sentence + const punctuationRegex = /[.!?,;:]/g; + const punctuationMarks = originalSentence.match(punctuationRegex) || []; + + // Add all punctuation marks as separate word tiles with unique IDs + punctuationMarks.forEach((punctuation, index) => { + words.push({ + word: punctuation, + translation: punctuation, + type: 'punctuation', + pronunciation: '', + uniqueId: `punct_${index}_${Date.now()}_${Math.random()}` + }); + }); + + // Shuffle the words including punctuation + const shuffledWords = [...words].sort(() => Math.random() - 0.5); + + container.innerHTML = shuffledWords.map((wordData, index) => { + const uniqueId = wordData.uniqueId || `word_${index}_${wordData.word}`; + return ` +
+ ${wordData.word} +
+ `; + }).join(''); + + // Add click listeners + container.querySelectorAll('.word-tile').forEach(tile => { + tile.addEventListener('click', (e) => { + const word = e.currentTarget.dataset.word; + const uniqueId = e.currentTarget.dataset.uniqueId; + this.toggleWord(word, e.currentTarget, uniqueId); + }); + }); + } + + toggleWord(word, element, uniqueId) { + // Find the word by unique ID instead of just the word text + const wordIndex = this.selectedWords.findIndex(selectedWord => + selectedWord.uniqueId === uniqueId + ); + + if (wordIndex > -1) { + // Remove word + this.selectedWords.splice(wordIndex, 1); + element.classList.remove('selected'); + } else { + // Add word with unique ID + this.selectedWords.push({ + word: word, + uniqueId: uniqueId + }); + element.classList.add('selected'); + } + + this.updateSentenceBuilder(); + this.updateCastButton(); + } + + updateSentenceBuilder() { + const container = document.getElementById('current-sentence'); + const sentence = this.buildSentenceFromWords(this.selectedWords); + container.textContent = sentence; + } + + buildSentenceFromWords(words) { + // Join words and handle punctuation correctly (no space before punctuation) + let sentence = ''; + for (let i = 0; i < words.length; i++) { + const wordText = typeof words[i] === 'string' ? words[i] : words[i].word; + const isPunctuation = ['.', '!', '?', ',', ';', ':'].includes(wordText); + + if (i === 0) { + sentence = wordText; + } else if (isPunctuation) { + sentence += wordText; // No space before punctuation + } else { + sentence += ' ' + wordText; // Space before regular words + } + } + return sentence; + } + + updateCastButton() { + const button = document.getElementById('cast-button'); + + // Always enable the button - let players try and fail! + button.disabled = false; + + // Always show the same text - don't reveal if the spell is correct + if (this.selectedSpell) { + button.textContent = `🔥 CAST ${this.selectedSpell.name.toUpperCase()} 🔥`; + } else { + button.textContent = '🔥 CAST SPELL 🔥'; + } + } + + castSpell() { + if (!this.selectedSpell) { + this.showFailEffect('noSpell'); + return; + } + + // Check if spell is correctly formed (including punctuation) + const expectedSentence = this.selectedSpell.english; + const playerSentence = this.buildSentenceFromWords(this.selectedWords); + + console.log('🔍 Spell check:'); + console.log('Expected:', expectedSentence); + console.log('Player:', playerSentence); + console.log('Selected words:', this.selectedWords); + + const isCorrect = playerSentence === expectedSentence; + + if (isCorrect) { + // Successful cast! + this.showCastingEffect(this.selectedSpell.type); + + // Delay the main spell effect for dramatic timing + setTimeout(() => { + this.showSpellEffect(this.selectedSpell.type); + }, 500); + + // Deal damage + this.enemyHP = Math.max(0, this.enemyHP - this.selectedSpell.damage); + this.updateEnemyHealth(); + this.showDamageNumber(this.selectedSpell.damage); + + // Update score - bonus multiplicateur pour phrases longues + const wordCount = this.selectedWords.length; + let scoreMultiplier = 10; + if (wordCount >= 7) scoreMultiplier = 20; // x2 pour phrases très longues + else if (wordCount >= 5) scoreMultiplier = 15; // x1.5 pour phrases longues + + // Calculer le bonus de vitesse (invisible) + let speedBonus = 0; + if (this.spellStartTime) { + const spellTime = (Date.now() - this.spellStartTime) / 1000; // en secondes + this.spellCount++; + this.averageSpellTime = ((this.averageSpellTime * (this.spellCount - 1)) + spellTime) / this.spellCount; + + // Bonus de vitesse : plus c'est rapide, plus de points + if (spellTime < 10) speedBonus = Math.floor((10 - spellTime) * 50); // Jusqu'à 500 bonus + if (spellTime < 5) speedBonus += 300; // Bonus extra pour super rapide + if (spellTime < 3) speedBonus += 500; // Bonus énorme pour très rapide + } + + this.score += (this.selectedSpell.damage * scoreMultiplier) + speedBonus; + this.onScoreUpdate(this.score); + document.getElementById('current-score').textContent = this.score; + + // Check win condition + if (this.enemyHP <= 0) { + this.handleVictory(); + return; + } + + // Generate new spells for next round + setTimeout(() => { + this.generateNewSpells(); + // Reset timer pour nouveau round + this.spellStartTime = Date.now(); + }, 1000); + } else { + // Spell failed! Random funny effect + this.showFailEffect(); + } + } + + showSpellEffect(type) { + const enemyChar = document.querySelector('.enemy-character'); + const rect = enemyChar.getBoundingClientRect(); + + // Main spell effect + const effect = document.createElement('div'); + effect.className = `spell-effect ${type}-effect`; + effect.style.position = 'fixed'; + effect.style.left = rect.left + rect.width/2 - 50 + 'px'; + effect.style.top = rect.top + rect.height/2 - 50 + 'px'; + document.body.appendChild(effect); + + // Add spell-specific enhanced effects + this.createSpellParticles(type, rect); + this.triggerSpellAnimation(type, enemyChar); + + setTimeout(() => { + effect.remove(); + }, 800); + } + + createSpellParticles(type, enemyRect) { + const particleCount = type === 'meteor' ? 15 : type === 'lightning' ? 12 : 8; + + for (let i = 0; i < particleCount; i++) { + const particle = document.createElement('div'); + particle.className = `spell-particle ${type}-particle`; + + // Random position around enemy + const offsetX = (Math.random() - 0.5) * 200; + const offsetY = (Math.random() - 0.5) * 200; + + particle.style.position = 'fixed'; + particle.style.left = enemyRect.left + enemyRect.width/2 + offsetX + 'px'; + particle.style.top = enemyRect.top + enemyRect.height/2 + offsetY + 'px'; + particle.style.width = '6px'; + particle.style.height = '6px'; + particle.style.borderRadius = '50%'; + particle.style.pointerEvents = 'none'; + particle.style.zIndex = '1000'; + + // Spell-specific particle colors and animations + if (type === 'fire') { + particle.style.background = 'radial-gradient(circle, #ff6b7a, #ff4757)'; + particle.style.animation = 'fireParticle 1.2s ease-out forwards'; + particle.style.boxShadow = '0 0 10px #ff4757'; + } else if (type === 'lightning') { + particle.style.background = 'radial-gradient(circle, #ffd700, #ffed4e)'; + particle.style.animation = 'lightningParticle 0.8s ease-out forwards'; + particle.style.boxShadow = '0 0 15px #ffd700'; + } else if (type === 'meteor') { + particle.style.background = 'radial-gradient(circle, #a29bfe, #6c5ce7)'; + particle.style.animation = 'meteorParticle 1.5s ease-out forwards'; + particle.style.boxShadow = '0 0 20px #6c5ce7'; + } + + document.body.appendChild(particle); + + setTimeout(() => { + particle.remove(); + }, 1500); + } + } + + triggerSpellAnimation(type, enemyChar) { + // Screen effects based on spell type + if (type === 'meteor') { + // Meteor causes screen shake + document.body.classList.add('screen-shake'); + setTimeout(() => document.body.classList.remove('screen-shake'), 500); + + // Create meteor trail effect + this.createMeteorTrail(); + } else if (type === 'lightning') { + // Lightning flash effect + this.createLightningFlash(); + } else if (type === 'fire') { + // Fire ripple effect + this.createFireRipple(enemyChar); + } + + // Enemy hit reaction + enemyChar.style.transform = 'scale(1.1)'; + enemyChar.style.filter = type === 'fire' ? 'hue-rotate(30deg)' : + type === 'lightning' ? 'brightness(1.5)' : + 'contrast(1.3)'; + + setTimeout(() => { + enemyChar.style.transform = ''; + enemyChar.style.filter = ''; + }, 300); + } + + createMeteorTrail() { + const trail = document.createElement('div'); + trail.className = 'meteor-trail'; + trail.style.position = 'fixed'; + trail.style.top = '0'; + trail.style.right = '0'; + trail.style.width = '4px'; + trail.style.height = '100vh'; + trail.style.background = 'linear-gradient(180deg, #a29bfe, transparent)'; + trail.style.animation = 'meteorTrail 0.6s ease-out forwards'; + trail.style.pointerEvents = 'none'; + trail.style.zIndex = '999'; + + document.body.appendChild(trail); + setTimeout(() => trail.remove(), 600); + } + + createLightningFlash() { + const flash = document.createElement('div'); + flash.style.position = 'fixed'; + flash.style.top = '0'; + flash.style.left = '0'; + flash.style.width = '100vw'; + flash.style.height = '100vh'; + flash.style.background = 'rgba(255, 215, 0, 0.3)'; + flash.style.animation = 'lightningFlash 0.2s ease-out'; + flash.style.pointerEvents = 'none'; + flash.style.zIndex = '998'; + + document.body.appendChild(flash); + setTimeout(() => flash.remove(), 200); + } + + createFireRipple(enemyChar) { + const ripple = document.createElement('div'); + const rect = enemyChar.getBoundingClientRect(); + + ripple.style.position = 'fixed'; + ripple.style.left = rect.left + rect.width/2 - 100 + 'px'; + ripple.style.top = rect.top + rect.height/2 - 100 + 'px'; + ripple.style.width = '200px'; + ripple.style.height = '200px'; + ripple.style.border = '3px solid #ff4757'; + ripple.style.borderRadius = '50%'; + ripple.style.animation = 'fireRipple 0.8s ease-out forwards'; + ripple.style.pointerEvents = 'none'; + ripple.style.zIndex = '997'; + + document.body.appendChild(ripple); + setTimeout(() => ripple.remove(), 800); + } + + showCastingEffect(spellType) { + const wizardChar = document.querySelector('.wizard-character'); + const rect = wizardChar.getBoundingClientRect(); + + // Create magical circle around wizard + this.createMagicCircle(rect, spellType); + + // Add casting sparkles + this.createCastingSparkles(rect, spellType); + + // Wizard glow effect + wizardChar.style.filter = 'drop-shadow(0 0 20px #ffd700)'; + wizardChar.style.transform = 'scale(1.05)'; + + setTimeout(() => { + wizardChar.style.filter = ''; + wizardChar.style.transform = ''; + }, 600); + } + + createMagicCircle(wizardRect, spellType) { + const circle = document.createElement('div'); + circle.style.position = 'fixed'; + circle.style.left = wizardRect.left + wizardRect.width/2 - 75 + 'px'; + circle.style.top = wizardRect.top + wizardRect.height/2 - 75 + 'px'; + circle.style.width = '150px'; + circle.style.height = '150px'; + circle.style.borderRadius = '50%'; + circle.style.pointerEvents = 'none'; + circle.style.zIndex = '500'; + + // Spell-specific circle colors + if (spellType === 'fire') { + circle.style.border = '3px solid #ff4757'; + circle.style.boxShadow = '0 0 30px #ff4757, inset 0 0 30px rgba(255, 71, 87, 0.3)'; + } else if (spellType === 'lightning') { + circle.style.border = '3px solid #ffd700'; + circle.style.boxShadow = '0 0 30px #ffd700, inset 0 0 30px rgba(255, 215, 0, 0.3)'; + } else if (spellType === 'meteor') { + circle.style.border = '3px solid #6c5ce7'; + circle.style.boxShadow = '0 0 30px #6c5ce7, inset 0 0 30px rgba(108, 92, 231, 0.3)'; + } + + circle.style.animation = 'magicCircleForm 0.6s ease-out forwards'; + + document.body.appendChild(circle); + setTimeout(() => circle.remove(), 600); + } + + createCastingSparkles(wizardRect, spellType) { + const sparkleCount = 8; + + for (let i = 0; i < sparkleCount; i++) { + const sparkle = document.createElement('div'); + sparkle.style.position = 'fixed'; + sparkle.style.width = '4px'; + sparkle.style.height = '4px'; + sparkle.style.borderRadius = '50%'; + sparkle.style.pointerEvents = 'none'; + sparkle.style.zIndex = '501'; + + // Position around wizard + const angle = (i / sparkleCount) * 2 * Math.PI; + const radius = 60; + const x = wizardRect.left + wizardRect.width/2 + Math.cos(angle) * radius; + const y = wizardRect.top + wizardRect.height/2 + Math.sin(angle) * radius; + + sparkle.style.left = x + 'px'; + sparkle.style.top = y + 'px'; + + // Spell-specific sparkle colors + if (spellType === 'fire') { + sparkle.style.background = '#ff4757'; + sparkle.style.boxShadow = '0 0 8px #ff4757'; + } else if (spellType === 'lightning') { + sparkle.style.background = '#ffd700'; + sparkle.style.boxShadow = '0 0 8px #ffd700'; + } else if (spellType === 'meteor') { + sparkle.style.background = '#6c5ce7'; + sparkle.style.boxShadow = '0 0 8px #6c5ce7'; + } + + sparkle.style.animation = 'castingSparkle 0.6s ease-out forwards'; + + document.body.appendChild(sparkle); + setTimeout(() => sparkle.remove(), 600); + } + } + + showDamageNumber(damage) { + const damageEl = document.createElement('div'); + damageEl.className = 'damage-number'; + damageEl.textContent = `-${damage}`; + + const enemyChar = document.querySelector('.enemy-character'); + const rect = enemyChar.getBoundingClientRect(); + + damageEl.style.position = 'fixed'; + damageEl.style.left = rect.left + rect.width/2 + 'px'; + damageEl.style.top = rect.top + 'px'; + + document.body.appendChild(damageEl); + + setTimeout(() => { + damageEl.remove(); + }, 1500); + } + + showFailEffect(type = 'random') { + const effects = ['spawnMinion', 'loseHP', 'magicQuirk', 'flyingBirds']; + const selectedEffect = type === 'random' ? + effects[Math.floor(Math.random() * effects.length)] : + type; + + // Show fail message first + this.showFailMessage(); + + // Then trigger specific effect + switch(selectedEffect) { + case 'spawnMinion': + this.spawnMiniEnemy(); + break; + case 'loseHP': + this.wizardTakesDamage(); + break; + case 'magicQuirk': + this.triggerMagicQuirk(); + break; + case 'flyingBirds': + this.summonFlyingBirds(); + break; + case 'noSpell': + this.showFailMessage('Select a spell first! 🪄'); + break; + } + } + + showFailMessage(customMessage = null) { + const messages = [ + "Spell backfired! 💥", + "Magic went wrong! 🌀", + "Oops! Wrong incantation! 😅", + "The magic gods are not pleased! ⚡", + "Your spell turned into chaos! 🎭", + "Magic malfunction detected! 🔧" + ]; + + const message = customMessage || messages[Math.floor(Math.random() * messages.length)]; + + const failEl = document.createElement('div'); + failEl.className = 'fail-message'; + failEl.textContent = message; + + document.body.appendChild(failEl); + + setTimeout(() => { + failEl.remove(); + }, 2000); + } + + spawnMiniEnemy() { + console.log('🧌 Spawning mini enemy!'); + + const miniEnemy = document.createElement('div'); + miniEnemy.className = 'mini-enemy'; + miniEnemy.textContent = '👺'; + + // Random position around the main enemy + const mainEnemy = document.querySelector('.enemy-character'); + const rect = mainEnemy.getBoundingClientRect(); + + miniEnemy.style.position = 'fixed'; + miniEnemy.style.left = (rect.left + Math.random() * 200 - 100) + 'px'; + miniEnemy.style.top = (rect.top + Math.random() * 200 - 100) + 'px'; + + document.body.appendChild(miniEnemy); + + // Mini enemy disappears after 5 seconds + setTimeout(() => { + miniEnemy.remove(); + }, 5000); + + // Make main enemy slightly stronger + this.enemyHP = Math.min(100, this.enemyHP + 5); + this.updateEnemyHealth(); + } + + wizardTakesDamage() { + console.log('🔥 Wizard takes damage!'); + + this.playerHP = Math.max(0, this.playerHP - 10); + document.getElementById('player-health').style.width = this.playerHP + '%'; + + // Screen shake effect + document.body.classList.add('screen-shake'); + setTimeout(() => { + document.body.classList.remove('screen-shake'); + }, 500); + + // Show damage on wizard + const damageEl = document.createElement('div'); + damageEl.className = 'damage-number'; + damageEl.textContent = '-10'; + damageEl.style.color = '#ff4757'; + + const wizardChar = document.querySelector('.wizard-character'); + const rect = wizardChar.getBoundingClientRect(); + + damageEl.style.position = 'fixed'; + damageEl.style.left = rect.left + rect.width/2 + 'px'; + damageEl.style.top = rect.top + 'px'; + + document.body.appendChild(damageEl); + + setTimeout(() => { + damageEl.remove(); + }, 1500); + + // Check if wizard dies + if (this.playerHP <= 0) { + setTimeout(() => { + this.handleDefeat(); + }, 1000); + } + } + + triggerMagicQuirk() { + console.log('🌀 Magic quirk activated!'); + + // Create multiple quirks at random positions + const numQuirks = 2 + Math.floor(Math.random() * 2); // 2-3 quirks + + for (let i = 0; i < numQuirks; i++) { + setTimeout(() => { + const quirk = document.createElement('div'); + quirk.className = 'magic-quirk'; + + // Random position within viewport + const x = 20 + Math.random() * 60; // 20% to 80% of viewport width + const y = 20 + Math.random() * 60; // 20% to 80% of viewport height + + quirk.style.left = x + '%'; + quirk.style.top = y + '%'; + quirk.style.transform = 'translate(-50%, -50%)'; + + document.body.appendChild(quirk); + + setTimeout(() => { + quirk.remove(); + }, 2000); + }, i * 300); // Stagger the quirks + } + + // Scramble the word bank for extra chaos + setTimeout(() => { + this.updateWordBank(); + }, 1000); + } + + summonFlyingBirds() { + console.log('🐦 Summoning flying birds!'); + + const birds = ['🐦', '🕊️', '🦅', '🦜', '🐧', '🦆', '🦢', '🐓', '🦃', '🦚', '🐤', '🐣', '🐥']; + const paths = ['bird-path-1', 'bird-path-2', 'bird-path-3', 'bird-path-4', 'bird-path-5']; + const numBirds = 5 + Math.floor(Math.random() * 3); // 5-7 birds maintenant ! + + for (let i = 0; i < numBirds; i++) { + setTimeout(() => { + const bird = document.createElement('div'); + const pathClass = paths[i % paths.length]; + bird.className = `flying-bird ${pathClass}`; + bird.textContent = birds[Math.floor(Math.random() * birds.length)]; + + document.body.appendChild(bird); + + console.log(`🐦 Bird ${i+1} spawned with class: ${bird.className}`); + + setTimeout(() => { + bird.remove(); + }, 30000); + + }, i * 500); // Stagger bird appearances + } + } + + updateEnemyHealth() { + const healthBar = document.getElementById('enemy-health'); + const percentage = (this.enemyHP / 100) * 100; + healthBar.style.width = percentage + '%'; + } + + + getRandomAttackTime() { + // Enemy attacks every 8-15 seconds randomly + return 8000 + Math.random() * 7000; + } + + startEnemyAttackSystem() { + this.scheduleNextEnemyAttack(); + } + + scheduleNextEnemyAttack() { + this.enemyAttackTimer = setTimeout(() => { + this.executeEnemyAttack(); + this.scheduleNextEnemyAttack(); // Schedule next attack + }, this.nextEnemyAttack); + } + + executeEnemyAttack() { + console.log('👹 Enemy is attacking!'); + + const enemyChar = document.querySelector('.enemy-character'); + + // Show attack warning + this.showEnemyAttackWarning(); + + // Enemy charging animation + enemyChar.classList.add('enemy-charging'); + + // Attack after 2 seconds warning + setTimeout(() => { + enemyChar.classList.remove('enemy-charging'); + this.dealEnemyDamage(); + this.showEnemyAttackEffect(); + }, 2000); + + // Set next attack time + this.nextEnemyAttack = this.getRandomAttackTime(); + } + + showEnemyAttackWarning() { + const enemyChar = document.querySelector('.enemy-character'); + + // Remove existing warning + const existingWarning = enemyChar.querySelector('.enemy-attack-warning'); + if (existingWarning) { + existingWarning.remove(); + } + + const warning = document.createElement('div'); + warning.className = 'enemy-attack-warning'; + warning.textContent = '⚠️ INCOMING ATTACK!'; + + enemyChar.style.position = 'relative'; + enemyChar.appendChild(warning); + + // Remove warning after attack + setTimeout(() => { + warning.remove(); + }, 2000); + } + + dealEnemyDamage() { + const damage = 12 + Math.floor(Math.random() * 8); // 12-20 damage + + this.playerHP = Math.max(0, this.playerHP - damage); + document.getElementById('player-health').style.width = this.playerHP + '%'; + + // Screen shake + document.body.classList.add('screen-shake'); + setTimeout(() => { + document.body.classList.remove('screen-shake'); + }, 500); + + // Show damage number on wizard + const damageEl = document.createElement('div'); + damageEl.className = 'damage-number'; + damageEl.textContent = `-${damage}`; + damageEl.style.color = '#ff4757'; + + const wizardChar = document.querySelector('.wizard-character'); + const rect = wizardChar.getBoundingClientRect(); + + damageEl.style.position = 'fixed'; + damageEl.style.left = rect.left + rect.width/2 + 'px'; + damageEl.style.top = rect.top + 'px'; + + document.body.appendChild(damageEl); + + setTimeout(() => { + damageEl.remove(); + }, 1500); + + console.log(`💔 Player took ${damage} damage! HP: ${this.playerHP}`); + + // Check if player dies + if (this.playerHP <= 0) { + setTimeout(() => { + this.handleDefeat(); + }, 1000); + } + } + + showEnemyAttackEffect() { + const effect = document.createElement('div'); + effect.className = 'enemy-attack-effect'; + + const wizardChar = document.querySelector('.wizard-character'); + const rect = wizardChar.getBoundingClientRect(); + + effect.style.position = 'fixed'; + effect.style.left = rect.left + rect.width/2 - 75 + 'px'; + effect.style.top = rect.top + rect.height/2 - 75 + 'px'; + + document.body.appendChild(effect); + + setTimeout(() => { + effect.remove(); + }, 1000); + } + + handleVictory() { + clearTimeout(this.enemyAttackTimer); + + const bonusScore = 1000; // Fixed victory bonus + this.score += bonusScore; + + this.container.innerHTML += ` +
+
🎉 VICTORY! 🎉
+
You defeated the Grammar Demon!
+
Final Score: ${this.score}
+
Time Bonus: +${bonusScore}
+ +
+ `; + + this.onGameEnd(this.score); + } + + handleDefeat() { + clearTimeout(this.enemyAttackTimer); + + this.container.innerHTML += ` +
+
💀 DEFEATED 💀
+
The Grammar Demon proved too strong!
+
Final Score: ${this.score}
+ +
+ `; + + this.onGameEnd(this.score); + } + + start() { + // Game starts immediately when initialized + } + + destroy() { + if (this.enemyAttackTimer) { + clearTimeout(this.enemyAttackTimer); + } + + const styleSheet = document.getElementById('wizard-spell-caster-styles'); + if (styleSheet) { + styleSheet.remove(); + } + } + + restart() { + this.destroy(); + this.score = 0; + this.enemyHP = 100; + this.playerHP = 100; + this.spellStartTime = Date.now(); + this.averageSpellTime = 0; + this.spellCount = 0; + this.nextEnemyAttack = this.getRandomAttackTime(); + this.init(); + } +} + +// Register the game module +window.GameModules = window.GameModules || {}; +window.GameModules.WizardSpellCaster = WizardSpellCaster; \ No newline at end of file