diff --git a/README.md b/README.md index 7d6f625..3aafb37 100644 --- a/README.md +++ b/README.md @@ -192,7 +192,7 @@ MOKSHA/ | **प्रारब्ध** | `prarabdha` | प्रति पुनर्जन्म केवल +1 (संचित कर्म कितना भी हो); MAX_PRARABDHA=15 cap; भोग से घटता है (×1.15 samaya penalty); 10 नाम से 2× गति | | **समर्पित** | `samarpita` | जब >= CHETANA_JAGRITI_THRESHOLD (50), चेतना-जागृति ट्रिगर | | **चेतना-जागृति** | `chetanaaJaagrita` (boolean) | **मोक्ष की प्रामाणिक शर्त** — `samarpita >= 50` ट्रिगर; जागृति पर `isKarmaImmune = true` (गीता 4.37) | -| **नाम** | `activeNaam` | 1 नाम=पुण्य भस्म, 5=पाप भस्म| +| **नाम** | `sanchitaNaama` | 1 नाम=पुण्य भस्म, 5=पाप भस्म| | **कृपा** | `kripa` | बंधन हो → kripa-- व कर्म समर्पित में; बंधन न हो → kripa++ | | **शंख** | `shankha` | Y/gamepad — chakravaata-शमन हेतु | | **ज्योति** | `jyoti` | B/gamepad — पाप-अंधकार में दृष्टि हेतु | @@ -214,7 +214,7 @@ if (shuvhaKarma === 0 && ashuvhaKarma === 0 && !pendingGoodKarma ### 1.3 पुनर्जन्म — पवित्र बनाम अपवित्र ```js let isApavitra = (shuvhaKarma > 0 || ashuvhaKarma > 0 || prarabdha > 0); -let earnsKripaOnRebirth = (activeNaam >= 20 || samarpita >= 30 || chetanaaJaagrita); +let earnsKripaOnRebirth = (sanchitaNaama >= 20 || samarpita >= 30 || chetanaaJaagrita); ``` सिर्फ कर्म-बंधन शेष रहने पर "अपवित्र" — समर्पित/नाम की कमी "अपवित्र" नहीं। @@ -245,7 +245,7 @@ grantKripa(x, y, reason = null) { ### 2.1 कर्म/मोक्ष-संबंधी स्टेट `KarmaEngine` class की properties (सभी `engine.*` से access करें): ``` -engine.shuvhaKarma, engine.ashuvhaKarma, engine.activeNaam — वर्तमान सक्रिय मात्रा +engine.shuvhaKarma, engine.ashuvhaKarma, engine.sanchitaNaama — वर्तमान सक्रिय मात्रा engine.prarabdha, engine.samarpita, engine.punaraJanmaCount — संचित/आजीवन काउंटर engine.kripa, engine.shankha, engine.jyoti — दुर्लभ resource काउंटर engine.chetanaaJaagrita (boolean) — मोक्ष-गेट @@ -329,7 +329,7 @@ engine.outerOrbits = [ { count:shuvhaKarma, emoji:"🌿", color:"#32ff32", speed:0.8 }, // 0 पुण्य { count:ashuvhaKarma, emoji:"🥀", color:"#ff3232", speed:-0.9 }, // 1 पाप { count:prarabdha, emoji:"📜", color:"#a78bfa", speed:0.6 }, // 2 प्रारब्ध - { count:activeNaam, emoji:"ॐ", color:"#ffffff", speed:1.0, glowTimer:0 }, // 3 नाम + { count:sanchitaNaama, emoji:"ॐ", color:"#ffffff", speed:1.0, glowTimer:0 }, // 3 नाम { count:kripa, emoji:"✋", color:"#ffe9a8", speed:0.7 }, // 4 कृपा { count:shankha, emoji:"🐚", color:"#7dd3fc", speed:0.5 }, // 5 शंख { count:jyoti, emoji:"🪔", color:"#ffe932", speed:-0.6 }, // 6 ज्योति @@ -533,7 +533,7 @@ const tutorial = new TutorialManager( tutorial.start(engine.player.x); // gameLoop में (हर frame — update block के अंदर): -tutorial.checkCompletion({ player, activeNaam, isNaamaJaapa, +tutorial.checkCompletion({ player, sanchitaNaama, isNaamaJaapa, playerInTunnel, praarabdha, antimaCharanaStarted }); touch.syncWithTutorial(tutorial.hasActiveCard()); @@ -601,7 +601,7 @@ AM.updateAmbientVolumes(); | Step | id | शास्त्रीय श्लोक | Completion Trigger | |---|---|---|---| | 0 | `move` | उद्धरेदात्मनात्मानं नात्मानमवसादयेत्। | ≥40px horizontal movement | -| 1 | `maya` | मायाजालमिदं विश्वं मोहयत्यखिलं जगत्। | `activeNaam >= 1` (naama collect) | +| 1 | `maya` | मायाजालमिदं विश्वं मोहयत्यखिलं जगत्। | `sanchitaNaama >= 1` (naama collect) | | 2 | `jaapa` | नाम जपत मंगल दिसि दसहूँ। | `isNaamaJaapa === true` (latch) | | 3 | `tunnel` | भक्त्या मामभिजानाति यावान्यश्चास्मि तत्त्वतः। | `playerInTunnel === true` (antimaCharana के बाद) | | 4 | `praarabdha` | भोगेन क्षीयते पापं, तपसा क्षीयते मलः। | dismiss = complete (प्रारब्ध मिलने के बाद card दिखे) | diff --git a/src/engine.js b/src/engine.js index ef3da59..9506877 100644 --- a/src/engine.js +++ b/src/engine.js @@ -120,7 +120,7 @@ export class KarmaEngine { // ── Vedic Karma State ──────────────────────────────── this.shuvhaKarma = 0; // पुण्य (सक्रिय) this.ashuvhaKarma = 0; // पाप (सक्रिय) - this.activeNaam = 0; // ॐ नाम (उपयोग-योग्य) + this.sanchitaNaama = 0; // ॐ नाम (उपयोग-योग्य) this.praarabdha = 0; // प्रारब्ध (संचित — सिर्फ़ 10-नाम से भस्म) this.praarabdhaTimer = 0; // भोग-countdown (frames); पुनर्जन्म पर persist, R-reset पर शून्य this._currentGateeModifier = 1.0; // इस जन्म का live ashuvha×shuvha modifier (rebirth पर snapshot) persist, R-reset पर शून्य @@ -141,7 +141,7 @@ export class KarmaEngine { this.jaapaNaama = "राधा"; // नाम-जाप पर floating text this.isNaamaJaapa = false; // क्या अभी नाम-जाप-वलय सक्रिय है? this.naamaGhera = 0; // नाम-जाप-वलय की वर्तमान त्रिज्या - this.naamaJaapaPower = 0; // SPACE दबाने पर उपलब्ध activeNaam + this.naamaJaapaPower = 0; // SPACE दबाने पर उपलब्ध sanchitaNaama // ── Time / Swaansa ──────────────────────────────────── this.samaya = SAMAYA_PRAARAMBHIKA; @@ -413,9 +413,9 @@ export class KarmaEngine { this._prevPraarabdhaForSound = this.praarabdha; // ── 5. कृपा-माइलस्टोन edge-detection ──────────────── - if (this.activeNaam > this._prevActiveNaamForKripa) - this._naamaSinceLastKripa += (this.activeNaam - this._prevActiveNaamForKripa); - this._prevActiveNaamForKripa = this.activeNaam; + if (this.sanchitaNaama > this._prevActiveNaamForKripa) + this._naamaSinceLastKripa += (this.sanchitaNaama - this._prevActiveNaamForKripa); + this._prevActiveNaamForKripa = this.sanchitaNaama; while (this._naamaSinceLastKripa >= KRIPA_NAAM_MILESTONE) { this._naamaSinceLastKripa -= KRIPA_NAAM_MILESTONE; @@ -472,9 +472,9 @@ export class KarmaEngine { if (this.samaya < 100 && this.samaya > 0 && !this.swaansaSamapta && !this._prevSamaya100Guided) { this._prevSamaya100Guided = true; - if (this.activeNaam > 0 && this.playerInTunnel) { + if (this.sanchitaNaama > 0 && this.playerInTunnel) { this._alertKey('samaya100Tunnel', '🌿', 'achievement'); - } else if (this.activeNaam > 0) { + } else if (this.sanchitaNaama > 0) { this._alertKey('samaya100Path', '🌿', 'guidance');; } else { this._alertKey('samaya100NoNaam', '⚠️', 'warning'); @@ -647,7 +647,7 @@ export class KarmaEngine { if (m.isPulling) this._mayaConsumedWhilePulling = true; if (m.type === 'naama') { - this.activeNaam++; + this.sanchitaNaama++; this._addFloatingText("ॐ", "#ffffff", { x:mCx, y:mCy }); this._createGainedGlow(mCx, mCy, "#ffffff"); this.naamaGlowTimer = 40; this._triggerGlow("#ffffff"); @@ -676,7 +676,7 @@ export class KarmaEngine { // वलय पूर्ण — नाम-शक्ति जाँचें // ⚠️ शास्त्र-संगत (Issue #11): प्रारब्ध नाम-जाप से नष्ट नहीं होता। - // activeNaam >= 10 होने पर praarabdhaTimer 2× गति से घटता है (§22.5)। + // sanchitaNaama >= 10 होने पर praarabdhaTimer 2× गति से घटता है (§22.5)। if (this.naamaGhera > NAAMA_JAAP_MAX_RADIUS) { this.isNaamaJaapa = false; this.naamaGhera = 0; this._alertKey('naamaJapa', '🌿', 'achievement'); @@ -883,7 +883,7 @@ export class KarmaEngine { // ── praarabdha unit घटाने का logic ── const prevPraarabdha = this.praarabdha; - const bhogDt = dt * (this.activeNaam >= 10 ? 2 : 1); + const bhogDt = dt * (this.sanchitaNaama >= 10 ? 2 : 1); this.praarabdhaTimer = Math.max(0, this.praarabdhaTimer - bhogDt); const newPraarabdha = this.praarabdhaTimer > 0 ? Math.ceil(this.praarabdhaTimer / PRARABDHA_BHOG_FRAMES) : 0; @@ -1072,7 +1072,7 @@ export class KarmaEngine { reset() { // ── Karma reset ── this.praarabdha = 0; this.praarabdhaTimer = 0; this.shuvhaKarma = 0; this.ashuvhaKarma = 0; - this.praarabdhaPenaltiMul = 1.0; this._praarabdhaSpeedMul = 1.0; this._praarabdhaSpeedStack = []; this.activeNaam = 0; this.samarpita = 0; this.punaraJanmaCount = 0; this.isKarmaImmune = false; this.kripa = 0; this.shankha = 0; this.jyoti = 0; + this.praarabdhaPenaltiMul = 1.0; this._praarabdhaSpeedMul = 1.0; this._praarabdhaSpeedStack = []; this.sanchitaNaama = 0; this.samarpita = 0; this.punaraJanmaCount = 0; this.isKarmaImmune = false; this.kripa = 0; this.shankha = 0; this.jyoti = 0; // ── Alert queue reset ── this.alertQueue = []; this._nextAlertId = 0; if(this.outerOrbits[2]) this.outerOrbits[2].glowTimer = 0; @@ -1157,7 +1157,7 @@ export class KarmaEngine { // Karma shuvhaKarma: this.shuvhaKarma, ashuvhaKarma: this.ashuvhaKarma, - activeNaam: this.activeNaam, + sanchitaNaama: this.sanchitaNaama, praarabdha: this.praarabdha, praarabdhaTimer: this.praarabdhaTimer, samarpita: this.samarpita, diff --git a/src/karma.js b/src/karma.js index 7824e77..984add5 100644 --- a/src/karma.js +++ b/src/karma.js @@ -43,7 +43,7 @@ export const KarmaMixin = { this.outerOrbits[0].count = this.shuvhaKarma; this.outerOrbits[1].count = this.ashuvhaKarma; this.outerOrbits[2].count = this.praarabdha; - this.outerOrbits[3].count = this.activeNaam; + this.outerOrbits[3].count = this.sanchitaNaama; this.outerOrbits[4].count = this.kripa; this.outerOrbits[5].count = this.shankha; this.outerOrbits[6].count = this.jyoti; @@ -79,7 +79,7 @@ export const KarmaMixin = { // ── पुनर्जन्म (अपवित्र/पवित्र) ── const isApavitra = (this.shuvhaKarma > 0 || this.ashuvhaKarma > 0); const earnsKripaOnRebirth = ( - this.activeNaam >= 20 || this.samarpita >= 30 || this.chetanaaJaagrita + this.sanchitaNaama >= 20 || this.samarpita >= 30 || this.chetanaaJaagrita ); // ── Bug 5 fix: pendingGoodKarma clear करने से पहले capture करें ── // पहले false किया → hasSanchitaKarma में already false → praarabdha +1 miss @@ -162,7 +162,7 @@ export const KarmaMixin = { "#ffe9a8" ); this._addFloatingText("✋", "#ffe9a8", { alpha:1.3, vy:-1.6, isBigName:true }); - if (this.activeNaam >= 20) this._addFloatingText("ॐ", "#ffffff", { alpha:1.5, vy:-2.2, isBigName:true }); + if (this.sanchitaNaama >= 20) this._addFloatingText("ॐ", "#ffffff", { alpha:1.5, vy:-2.2, isBigName:true }); if (this.samarpita >= 30) this._addFloatingText("🙏", "#fb923c", { alpha:1.5, vy:-2.2, isBigName:true }); this._alertKey('kripaAtirikta', '✋', 'guidance'); this._triggerGlow("#ffe9a8"); @@ -270,7 +270,7 @@ export const KarmaMixin = { */ _handlePlayerMayaCollision(m, cx) { if (m.type === "naama") { - this.activeNaam++; + this.sanchitaNaama++; this._addFloatingText("ॐ", "#ffffff"); this.naamaGlowTimer = 40; this._triggerGlow("#ffffff"); @@ -279,8 +279,8 @@ export const KarmaMixin = { if (this.playerInTunnel) { // शास्त्र-संगत क्रम: पुण्य → पाप → प्रारब्ध - if (this.shuvhaKarma > 0 && this.activeNaam >= 1) { - this.activeNaam--; this.shuvhaKarma--; this.samarpita++; + if (this.shuvhaKarma > 0 && this.sanchitaNaama >= 1) { + this.sanchitaNaama--; this.shuvhaKarma--; this.samarpita++; this._addFloatingText("🌿🌸", "#32ff32"); this._triggerGlow("#32ff32"); this._cb.playSound?.('samarpita'); @@ -289,8 +289,8 @@ export const KarmaMixin = { ? this._alertKey('bandhanaPunyaMukta', '🌿', 'achievement') : this._alertKey('bandhanaPunyaShesha', '🌿', 'guidance', { n: this.shuvhaKarma }); - } else if (this.ashuvhaKarma > 0 && this.activeNaam >= 5) { - this.activeNaam -= 5; this.ashuvhaKarma--; this.samarpita++; + } else if (this.ashuvhaKarma > 0 && this.sanchitaNaama >= 5) { + this.sanchitaNaama -= 5; this.ashuvhaKarma--; this.samarpita++; this._addFloatingText("🥀🔥", "#ff3232"); this._triggerGlow("#ff3232"); this._cb.playSound?.('samarpita'); @@ -319,8 +319,8 @@ export const KarmaMixin = { this._alertKey('vikshepa', '🌪️', 'warning'); return; // m.active = false नहीं — chakravaata यथावत } else if (m.type === "shuvha") { - if (this.activeNaam >= 1) { - this.activeNaam--; this.samarpita++; + if (this.sanchitaNaama >= 1) { + this.sanchitaNaama--; this.samarpita++; this._createExplosion(m.x + m.width / 2, m.y + m.height / 2, "#ffffff"); this._addFloatingText("🙏", "#fb923c", { x: m.x + m.width / 2, y: m.y }); this._cb.playSound?.('samarpita'); @@ -332,8 +332,8 @@ export const KarmaMixin = { this._pendingGoodKarmaCount++; this._cb.playSound?.('shuvha'); } else if (m.type === "ashuvha") { - if (this.activeNaam >= 5) { - this.activeNaam -= 5; this.samarpita++; + if (this.sanchitaNaama >= 5) { + this.sanchitaNaama -= 5; this.samarpita++; this._createExplosion(m.x + m.width / 2, m.y + m.height / 2, "#ffffff"); this._addFloatingText("🙏", "#fb923c", { x: m.x + m.width / 2, y: m.y }); this._cb.playSound?.('samarpita'); @@ -428,9 +428,9 @@ export const KarmaMixin = { */ actionNaamaJaapa() { if (this.gameOver || this.isPaused) return; - if (this.activeNaam >= 1 && !this.isNaamaJaapa) { - this.naamaJaapaPower = this.activeNaam; - this.activeNaam--; + if (this.sanchitaNaama >= 1 && !this.isNaamaJaapa) { + this.naamaJaapaPower = this.sanchitaNaama; + this.sanchitaNaama--; this.isNaamaJaapa = true; this.naamaGhera = this.smoothSize / 2; this._cb.playSound?.('jaapa'); @@ -444,7 +444,7 @@ export const KarmaMixin = { isBigName: true, }); } - } else if (this.activeNaam === 0 && !this.isNaamaJaapa) { + } else if (this.sanchitaNaama === 0 && !this.isNaamaJaapa) { this._alertKey('errNaamaAbsent', '❌', 'warning'); this._cb.playSound?.('ashuvha'); } @@ -493,7 +493,7 @@ export const KarmaMixin = { this._alertKey('errSamarpanaPhase', '❌', 'warning'); this._cb.playSound?.('ashuvha'); return; } - if (this.activeNaam === 0) { + if (this.sanchitaNaama === 0) { this._alertKey('errSamarpanaNoNaam', '❌', 'warning'); this._cb.playSound?.('ashuvha'); return; } @@ -501,9 +501,9 @@ export const KarmaMixin = { this._alertKey('errSamarpanaTunnel', '❌', 'warning'); this._cb.playSound?.('ashuvha'); return; } - let gained = (this.activeNaam * 3) + (this.shankha + this.jyoti); + let gained = (this.sanchitaNaama * 3) + (this.shankha + this.jyoti); this.samarpita += gained; - this.activeNaam = 0; + this.sanchitaNaama = 0; this.shankha = 0; this.jyoti = 0; this.poornaSamarpana = true; diff --git a/src/main.js b/src/main.js index 91cb4cb..22e80db 100644 --- a/src/main.js +++ b/src/main.js @@ -618,7 +618,7 @@ function gameLoop(ts) { // tutorial completion हर frame check करें tutorial.checkCompletion({ player: engine.player, - activeNaam: engine.activeNaam, + sanchitaNaama: engine.sanchitaNaama, isNaamaJaapa: engine.isNaamaJaapa, playerInTunnel: engine.playerInTunnel, praarabdha: engine.praarabdha, diff --git a/src/render.js b/src/render.js index 888f5be..9c71870 100644 --- a/src/render.js +++ b/src/render.js @@ -422,7 +422,7 @@ export const Renderer = { WIDTH, HEIGHT, TUNNEL_X, TUNNEL_WIDTH, SAMAYA_PRAARAMBHIKA, frameNow, shakeTimer, samaya, swaansaSamapta, stars, tunnelSparkles, particlePool, glowEffectPool, player, smoothSize, glowRings, - shuvhaKarma, ashuvhaKarma, praarabdha, activeNaam, kripa, shankha, jyoti, + shuvhaKarma, ashuvhaKarma, praarabdha, sanchitaNaama, kripa, shankha, jyoti, samarpita, punaraJanmaCount, chetanaaJaagrita, poornaSamarpana, chainSlots, finalHorsePositions, pulledHorseIndex, pulledHorseX, pulledHorseY, isPaused, gameOver, mayaPool, pendingGoodKarma, punyaTimer, @@ -1116,7 +1116,7 @@ export const Renderer = { if (shuvhaKarma > 0) innerOrbit.push("🌿"); if (ashuvhaKarma > 0) innerOrbit.push("🥀"); if (praarabdha > 0) innerOrbit.push("📜"); - if (activeNaam > 0) innerOrbit.push("ॐ"); + if (sanchitaNaama > 0) innerOrbit.push("ॐ"); if (kripa > 0) innerOrbit.push("✋"); if (shankha > 0) innerOrbit.push("🐚"); if (jyoti > 0) innerOrbit.push("🪔"); diff --git a/src/shaashtra.js b/src/shaashtra.js index c424d36..87d1c78 100644 --- a/src/shaashtra.js +++ b/src/shaashtra.js @@ -72,6 +72,7 @@ const PAGE_1 = { { type: 'term', label: '🌬️ श्वास', text: 'यह आयु-शेष का प्रतीक है — इस जीवन-चक्र में बचे शेष श्वासों की गिनती।' }, { type: 'term', label: '⚖️ ब्रह्मांडीय क्षितिज — निर्णय का क्षण', text: 'जब समय शून्य पर पहुँचता है, यही निर्णय का क्षण है। यदि उस क्षण आत्मा सर्वथा निष्कर्म हो, चेतना जागृत हो (समर्पित ≥50), और पूर्ण नाम-समर्पण (⬆️ / W) किया गया हो — तभी मोक्ष प्राप्त होता है। अन्यथा पुनर्जन्म होता है।' }, { type: 'term', label: '👁️ चेतना-जागृति — कर्म-रक्षा', text: 'जब चेतना जागृत होती है, तो माया का कर्म-प्रभाव शून्य हो जाता है। जागृत आत्मा पर कर्म-बंधन नहीं लगता।' }, + { type: 'term', label: '♻️ पुनर्जन्म — पवित्र बनाम अपवित्र', text: 'जब समय शून्य पर कर्म-भार शेष हो — पुनर्जन्म होता है। पवित्र पुनर्जन्म (R key) तभी संभव है जब शुभकर्म, अशुभकर्म और प्रारब्ध — तीनों शून्य हों। यदि कोई भी शेष हो तो आत्मा "अपवित्र" रूप में पुनः आती है।' }, { type: 'shloka', id: 'gita437' }, ], }, @@ -83,6 +84,7 @@ const PAGE_1 = { { type: 'term', label: '🌬️ Swaansa (breath)', text: 'The symbol of remaining lifespan — the count of breaths left in this cycle of life.' }, { type: 'term', label: '⚖️ Cosmic horizon — the moment of decision', text: 'When Samaya reaches zero, that is the moment of decision. If at that instant the soul is wholly free of karma, Chetana is awakened (Samarpita ≥ 50), and full Naama-Samarpana (⬆️ / W) has been offered — only then is Moksha attained. Otherwise, Punarjanma follows.' }, { type: 'term', label: '👁️ Chetana-Jaagriti — karmic immunity', text: 'When Chetana awakens, the karmic effect of Maya falls to zero. Karma no longer binds an awakened soul.' }, + { type: 'term', label: '♻️ Punarjanma — Pure vs Impure', text: 'When Samaya reaches zero with karma remaining, rebirth follows. A Pure Rebirth (R key) is only possible when Punya, Paapa, and Praarabdha are all zero. If any remains, the soul returns in an "impure" form.' }, { type: 'shloka', id: 'gita437' }, ], }, @@ -94,6 +96,7 @@ const PAGE_2 = { blocks: [ // ── नियंत्रण ── { type: 'term', label: '☸️ ⬅️ ➡️ | DPAD_LEFT/RIGHT | A/D (रथ संचालन)', text: 'रथ का संचालन करें।' }, + { type: 'note', text: '📱 Mobile: स्क्रीन पर virtual buttons (ॐ 🌿 🙏 💀 ♻️ 🐚 🪔) | 🔄 Gyroscope: device बाईं/दाईं झुकाएँ — iOS 13+ पर permission dialog।', color: '#a78bfa' }, { type: 'term', label: '📿 नाम जाप : RT/R1 | SPACE', text: '1 नाम व्यय कर एक फैलती हुई आभा उत्पन्न करें।' }, { type: 'term', label: '🪷 वैराग्य : ⬇️ / X | S', text: 'पुण्य का प्रलोभन ठुकराएँ — आसक्ति त्यागें।' }, { type: 'term', label: '🌊 प्रलय : LB/L1 | Q', text: 'महाप्रलय का आह्वान — स्वेच्छा से रथ-त्याग।' }, @@ -105,6 +108,13 @@ const PAGE_2 = { { type: 'term', label: '🪔 ज्योति (दृष्टि-प्रकाश) : B | GAMEPAD B', text: 'पाप-अंधकार में दृष्टि पुनः प्राप्त करें।' }, { type: 'note', text: 'पाप ≥ 3 होने पर दृष्टि अवरुद्ध।', color: '#ffe932' }, + // ── चक्रवात ── + { type: 'heading', text: '🌀 चक्रवात — माया का भय-रूप 🌀' }, + { type: 'term', label: '🌀 चक्रवात', text: 'संसार का भ्रम-तूफ़ान — 160px range में player को स्वयं की ओर खींचता है। अन्य शुभ/अशुभ माया को भी खींचता है।' }, + { type: 'term', label: 'ॐ नाम-मार्ग', text: 'नाम-जाप वलय चक्रवात को भस्म करती है — नाम सर्वशक्तिमान है।' }, + { type: 'term', label: '🐚 यंत्र-मार्ग', text: 'शंख-वलय (Y) भी चक्रवात नष्ट करती है — जब नाम संचित न हो।' }, + { type: 'note', text: '⚠️ सीधे टकराने पर +1 अशुभ कर्म — नाम या शंख ही एकमात्र रक्षा।', color: '#ff3232' }, + // ── अंतिम चरण ── { type: 'heading', text: '🏔️ अंतिम चरण 🏔️' }, { type: 'term', label: '🙏 समर्पित (50)', text: 'चेतना जागृत होती है — मोक्ष-पथ की ओर।' }, @@ -128,6 +138,7 @@ const PAGE_2 = { blocks: [ // ── Controls ── { type: 'term', label: '☸️ ⬅️ ➡️ | DPAD_LEFT/RIGHT | A/D (steer)', text: 'Steer the chariot.' }, + { type: 'note', text: '📱 Mobile: on-screen virtual buttons (ॐ 🌿 🙏 🌊 ♻️ 🐚 🪔) | 🔄 Gyroscope: tilt device left/right — iOS 13+ shows a permission dialog.', color: '#a78bfa' }, { type: 'term', label: '📿 Naama-Japa : RT/R1 | SPACE', text: 'Spend 1 Naama to raise an expanding aura.' }, { type: 'term', label: '🪷 Vairagya : ⬇️ / X | S', text: 'Refuse the lure of Punya — let go of attachment.' }, { type: 'term', label: '🌊 Pralaya : LB/L1 | Q', text: 'Invoke dissolution — abandon the chariot willingly.' }, @@ -139,11 +150,18 @@ const PAGE_2 = { { type: 'term', label: '🪔 Jyoti (light of sight) : B | GAMEPAD B', text: 'Regain vision in the darkness of Paapa.' }, { type: 'note', text: 'Vision is obscured once Paapa ≥ 3.', color: '#ffe932' }, + // ── Chakravaata ── + { type: 'heading', text: '🌀 Chakravaata — The face of fear in Maya 🌀' }, + { type: 'term', label: '🌀 Chakravaata', text: 'The storm of Samsara — pulls the player toward itself within a 160px range. Also drags nearby Shuvha and Ashuvha Maya into its vortex.' }, + { type: 'term', label: 'ॐ Naama-Maarga', text: 'The Naama-Japa ring burns the Chakravaata — Naama is all-powerful.' }, + { type: 'term', label: '🐚 Yantra-Maarga', text: 'The Shankha ring (Y) also destroys the Chakravaata — for when no Naama is available.' }, + { type: 'note', text: '⚠️ A direct collision adds +1 Ashuvha Karma — only Naama or Shankha can protect you.', color: '#ff3232' }, + // ── Final phase ── { type: 'heading', text: '🏔️ The Final Phase 🏔️' }, { type: 'term', label: '🙏 Samarpita (50)', text: 'Chetana awakens — the path toward Moksha opens.' }, { type: 'term', label: '🌌 The Bhakti path', text: '1 Naama → burns Punya | 5 Naama → burns Paapa | 10 Naama → burns Praarabdha.' }, - { type: 'term', label: 'ॐ 🙌 Poorna-Samarpana : ⬆️ | RB/R1 | W', text: 'Surrender completely while inside the Bhakti path.' }, + { type: 'term', label: '🙌 Poorna-Samarpana : ⬆️ | RB/R1 | W', text: 'Surrender completely while inside the Bhakti path.' }, { type: 'note', text: '⚠️ Only during the final phase (Samaya < 100s).', color: '#ff3232' }, // ── Fruits of karma ── @@ -194,8 +212,6 @@ const PAGE_3 = { }, }; // ── सम्पूर्ण ग्रंथ ─────────────────────────────────────────── -// ⚠️ PAGE_2, PAGE_3 अगले पैच में जुड़ेंगे। -// ⚠️ PAGE_3 अगले पैच में जुड़ेगा। export const SHAASHTRA_PAGES = [PAGE_1, PAGE_2, PAGE_3]; /** @@ -247,9 +263,9 @@ export function renderShaashtraPage(pageIndex, lang) { if (!sh) break; html += `

` + `` -+ // बहु-पंक्ति श्लोक — '\n' को
बनाएँ (escape के बाद, सुरक्षित) -+ escapeHtml(sh.text).replace(/\n/g, '
') -+ `
`; + // बहु-पंक्ति श्लोक — '\n' को
बनाएँ (escape के बाद, सुरक्षित) + + escapeHtml(sh.text).replace(/\n/g, '
') + + ``; const meaning = sh.meaning?.[lang]; if (meaning) { html += `
` diff --git a/src/state.js b/src/state.js index f81a160..57562d7 100644 --- a/src/state.js +++ b/src/state.js @@ -113,7 +113,7 @@ export const StateMixin = { /** सभी HUD stats एक साथ update करें */ _updateUIStats() { if (!this._UI) return; - this._updateStatWithPulse(this._UI.naama, 'naama', this.activeNaam, 'ॐ'); + this._updateStatWithPulse(this._UI.naama, 'naama', this.sanchitaNaama, 'ॐ'); // 🌿 shuvhaKarma — pendingGoodKarma active होने पर live timer दिखे if (this._UI?.punya) { diff --git a/src/tutorial.js b/src/tutorial.js index db66aeb..81eac41 100644 --- a/src/tutorial.js +++ b/src/tutorial.js @@ -195,7 +195,7 @@ export class TutorialManager { /** * हर frame gameLoop में call करो (card visible न हो तो action check)। * @param {Object} state — engine.getRenderState() snapshot - * ज़रूरी fields: player.x, activeNaam, isNaamaJaapa, playerInTunnel + * ज़रूरी fields: player.x, sanchitaNaama, isNaamaJaapa, playerInTunnel */ checkCompletion(state) { if (this._done || this._cardVisible) return; @@ -230,8 +230,8 @@ export class TutorialManager { } case 'maya': { - // naama collect हुआ → activeNaam ≥ 1 - if (state.activeNaam >= 1) { + // naama collect हुआ → sanchitaNaama ≥ 1 + if (state.sanchitaNaama >= 1) { this._onStepComplete(); } break;