You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

693 lines
11 KiB

  1. module.exports = {
  2. name: 'The Crystal Caves',
  3. level: [14, 16],
  4. addLevel: 0,
  5. resources: {},
  6. mobs: {
  7. default: {
  8. spells: [{
  9. type: 'melee',
  10. element: 'arcane'
  11. }],
  12. regular: {
  13. drops: {
  14. chance: 35,
  15. rolls: 1
  16. }
  17. }
  18. },
  19. 'crystal snail': {
  20. level: 14,
  21. regular: {
  22. drops: {
  23. rolls: 1,
  24. noRandom: true,
  25. alsoRandom: true,
  26. blueprints: [{
  27. chance: 30,
  28. name: 'Digested Crystal',
  29. quality: 0,
  30. quest: true,
  31. sprite: [1, 1]
  32. }]
  33. }
  34. },
  35. spells: [{
  36. type: 'melee'
  37. }, {
  38. type: 'smokeBomb',
  39. radius: 0,
  40. repeat: 5,
  41. duration: 7,
  42. randomPos: true,
  43. range: 2,
  44. selfCast: 0.2,
  45. statMult: 1,
  46. damage: 0.125,
  47. element: 'arcane',
  48. cdMax: 5,
  49. particles: {
  50. scale: {
  51. start: {
  52. min: 10,
  53. max: 25
  54. },
  55. end: {
  56. min: 10,
  57. max: 0
  58. }
  59. },
  60. opacity: {
  61. start: 0.3,
  62. end: 0
  63. },
  64. lifetime: {
  65. min: 1,
  66. max: 2
  67. },
  68. speed: {
  69. start: 3,
  70. end: 0
  71. },
  72. color: {
  73. start: ['fc66f7', 'a24eff'],
  74. end: ['933159', '393268']
  75. },
  76. chance: 0.125,
  77. randomColor: true,
  78. randomScale: true,
  79. blendMode: 'add',
  80. spawnType: 'rect',
  81. spawnRect: {
  82. x: -10,
  83. y: -10,
  84. w: 20,
  85. h: 20
  86. }
  87. }
  88. }]
  89. },
  90. 'crystal whelk': {
  91. level: 16,
  92. regular: {
  93. drops: {
  94. rolls: 1,
  95. noRandom: true,
  96. alsoRandom: true,
  97. blueprints: [{
  98. chance: 35,
  99. name: 'Digested Crystal',
  100. quality: 0,
  101. quest: true,
  102. sprite: [1, 1]
  103. }]
  104. }
  105. },
  106. spells: [{
  107. type: 'melee'
  108. }, {
  109. type: 'smokeBomb',
  110. radius: 0,
  111. repeat: 5,
  112. duration: 7,
  113. randomPos: true,
  114. range: 2,
  115. selfCast: 0.2,
  116. statMult: 1,
  117. damage: 0.25,
  118. element: 'arcane',
  119. cdMax: 5,
  120. particles: {
  121. scale: {
  122. start: {
  123. min: 4,
  124. max: 14
  125. },
  126. end: {
  127. min: 2,
  128. max: 8
  129. }
  130. },
  131. opacity: {
  132. start: 0.2,
  133. end: 0
  134. },
  135. lifetime: {
  136. min: 1,
  137. max: 2
  138. },
  139. speed: {
  140. start: 2,
  141. end: 0
  142. },
  143. color: {
  144. start: ['ff6942', 'ffeb38'],
  145. end: ['953f36', '9a5a3c']
  146. },
  147. chance: 0.125,
  148. randomColor: true,
  149. randomScale: true,
  150. blendMode: 'add',
  151. spawnType: 'rect',
  152. spawnRect: {
  153. x: -10,
  154. y: -10,
  155. w: 20,
  156. h: 20
  157. }
  158. }
  159. }]
  160. },
  161. radulos: {
  162. level: 18,
  163. spawnCd: 1714,
  164. regular: {
  165. hpMult: 75,
  166. dmgMult: 2,
  167. drops: {
  168. chance: 100,
  169. rolls: 5,
  170. noRandom: true,
  171. alsoRandom: true,
  172. magicFind: [2000, 200],
  173. blueprints: [{
  174. chance: 100,
  175. name: 'Digested Crystal',
  176. quality: 0,
  177. quest: true,
  178. sprite: [1, 1]
  179. }]
  180. }
  181. },
  182. rare: {
  183. count: 0
  184. },
  185. mobile: false,
  186. spells: [{
  187. type: 'projectile',
  188. particles: {
  189. scale: {
  190. start: {
  191. min: 6,
  192. max: 18
  193. },
  194. end: {
  195. min: 2,
  196. max: 8
  197. }
  198. },
  199. color: {
  200. start: ['fc66f7', 'a24eff'],
  201. end: ['393268', '933159']
  202. },
  203. chance: 0.65,
  204. randomScale: true,
  205. randomColor: true
  206. }
  207. }, {
  208. type: 'smokeBomb',
  209. radius: 1,
  210. repeat: 4,
  211. duration: 14,
  212. randomPos: true,
  213. range: 6,
  214. selfCast: 0.25,
  215. statMult: 1,
  216. damage: 0.05,
  217. element: 'arcane',
  218. cdMax: 8,
  219. particles: {
  220. scale: {
  221. start: {
  222. min: 6,
  223. max: 18
  224. },
  225. end: {
  226. min: 4,
  227. max: 10
  228. }
  229. },
  230. opacity: {
  231. start: 0.01,
  232. end: 0
  233. },
  234. lifetime: {
  235. min: 1,
  236. max: 3
  237. },
  238. speed: {
  239. start: 2,
  240. end: 0
  241. },
  242. color: {
  243. start: ['ff4252', 'd43346'],
  244. end: ['802343', 'a82841']
  245. },
  246. chance: 0.125,
  247. randomColor: true,
  248. randomScale: true,
  249. blendMode: 'add',
  250. spawnType: 'rect',
  251. spawnRect: {
  252. x: -10,
  253. y: -10,
  254. w: 20,
  255. h: 20
  256. }
  257. }
  258. }, {
  259. type: 'summonConsumableFollower'
  260. }]
  261. },
  262. 'akarei scout': {
  263. level: 20,
  264. faction: 'akarei',
  265. attackable: false,
  266. deathRep: -3
  267. },
  268. biorn: {
  269. level: 20,
  270. attackable: false,
  271. walkDistance: 0,
  272. faction: 'akarei',
  273. deathRep: -3
  274. },
  275. veleif: {
  276. level: 20,
  277. attackable: false,
  278. walkDistance: 0,
  279. faction: 'akarei',
  280. deathRep: -3
  281. },
  282. 'akarei artificer': {
  283. level: 20,
  284. attackable: false,
  285. faction: 'akarei',
  286. deathRep: -6
  287. },
  288. 'thaumaturge yala': {
  289. level: 20,
  290. attackable: false,
  291. walkDistance: 0,
  292. faction: 'akarei',
  293. deathRep: -15,
  294. regular: {
  295. hpMult: 100,
  296. dmgMult: 2
  297. },
  298. rare: {
  299. count: 0
  300. },
  301. properties: {
  302. cpnTrade: {
  303. items: {
  304. min: 2,
  305. max: 5,
  306. minLevel: 14,
  307. maxLevel: 18,
  308. slot: 'neck',
  309. extra: []
  310. },
  311. faction: {
  312. id: 'akarei',
  313. tier: 5
  314. },
  315. markup: {
  316. buy: 0.25,
  317. sell: 20
  318. }
  319. }
  320. }
  321. }
  322. },
  323. objects: {
  324. redwall: {
  325. components: {
  326. cpnBlocker: {
  327. init: function () {
  328. this.obj.instance.physics.setCollision(this.obj.x, this.obj.y, true);
  329. this.obj.instance.objects.notifyCollisionChange(this.obj.x, this.obj.y, true);
  330. }
  331. }
  332. }
  333. },
  334. bigportal: {
  335. components: {
  336. cpnAttackAnimation: {
  337. simplify: function () {
  338. return {
  339. type: 'attackAnimation',
  340. spriteSheet: 'animBigObjects',
  341. row: 1,
  342. col: 0,
  343. frames: 6,
  344. frameDelay: 7,
  345. loop: -1,
  346. noSprite: true,
  347. hideSprite: true
  348. };
  349. }
  350. }
  351. }
  352. },
  353. pinktile: {
  354. components: {
  355. cpnParticles: {
  356. simplify: function () {
  357. return {
  358. type: 'particles',
  359. blueprint: {
  360. color: {
  361. start: ['fc66f7', 'a24eff'],
  362. end: ['933159', '393268']
  363. },
  364. scale: {
  365. start: {
  366. min: 2,
  367. max: 10
  368. },
  369. end: {
  370. min: 0,
  371. max: 2
  372. }
  373. },
  374. speed: {
  375. start: {
  376. min: 4,
  377. max: 16
  378. },
  379. end: {
  380. min: 2,
  381. max: 8
  382. }
  383. },
  384. lifetime: {
  385. min: 1,
  386. max: 4
  387. },
  388. randomScale: true,
  389. randomSpeed: true,
  390. chance: 0.04,
  391. randomColor: true,
  392. spawnType: 'rect',
  393. spawnRect: {
  394. x: -20,
  395. y: -20,
  396. w: 60,
  397. h: 60
  398. }
  399. }
  400. };
  401. }
  402. }
  403. }
  404. },
  405. walltrigger: {
  406. components: {
  407. cpnParticles: {
  408. simplify: function () {
  409. return {
  410. type: 'particles',
  411. blueprint: {
  412. color: {
  413. start: ['fff4252', 'ff6942'],
  414. end: ['802343', 'f953f36']
  415. },
  416. scale: {
  417. start: {
  418. min: 2,
  419. max: 6
  420. },
  421. end: {
  422. min: 0,
  423. max: 2
  424. }
  425. },
  426. speed: {
  427. start: {
  428. min: 0,
  429. max: 4
  430. },
  431. end: {
  432. min: 0,
  433. max: 0
  434. }
  435. },
  436. lifetime: {
  437. min: 1,
  438. max: 2
  439. },
  440. randomScale: true,
  441. randomSpeed: true,
  442. chance: 0.2,
  443. randomColor: true,
  444. spawnType: 'rect',
  445. spawnRect: {
  446. x: -20,
  447. y: -20,
  448. w: 40,
  449. h: 40
  450. }
  451. }
  452. };
  453. }
  454. },
  455. cpnTrigger: {
  456. init: function () {
  457. this.obj.instance.triggerPuzzle = {
  458. activated: []
  459. };
  460. },
  461. collisionEnter: function (o) {
  462. if (!o.player)
  463. return;
  464. let order = this.obj.order;
  465. let triggerPuzzle = this.obj.instance.triggerPuzzle;
  466. let activated = triggerPuzzle.activated;
  467. if (this.obj.forceOpen) {
  468. triggerPuzzle.activated = [];
  469. this.activate();
  470. return;
  471. }
  472. activated.push(order);
  473. let valid = true;
  474. for (let i = 0; i < activated.length; i++) {
  475. if (~~activated[i] !== i) {
  476. valid = false;
  477. break;
  478. }
  479. }
  480. if (!valid) {
  481. triggerPuzzle.activated = [];
  482. process.send({
  483. method: 'events',
  484. data: {
  485. onGetAnnouncement: [{
  486. obj: {
  487. msg: 'nothing happens'
  488. },
  489. to: [o.serverId]
  490. }]
  491. }
  492. });
  493. return;
  494. } else if (activated.length === 4) {
  495. triggerPuzzle.activated = [];
  496. this.activate();
  497. }
  498. process.send({
  499. method: 'events',
  500. data: {
  501. onGetAnnouncement: [{
  502. obj: {
  503. msg: this.obj.message
  504. },
  505. to: [o.serverId]
  506. }]
  507. }
  508. });
  509. },
  510. activate: function () {
  511. let syncer = this.obj.instance.syncer;
  512. let physics = this.obj.instance.physics;
  513. let walls = this.obj.instance.objects.objects.filter(o => (o.objZoneName === 'redWall'));
  514. walls.forEach(function (w) {
  515. w.destroyed = true;
  516. physics.setCollision(w.x, w.y, false);
  517. this.obj.instance.objects.notifyCollisionChange(w.x, w.y, false);
  518. syncer.queue('onGetObject', {
  519. x: w.x,
  520. y: w.y,
  521. components: [{
  522. type: 'attackAnimation',
  523. row: 0,
  524. col: 4
  525. }]
  526. }, -1);
  527. }, this);
  528. }
  529. }
  530. }
  531. },
  532. gas: {
  533. components: {
  534. cpnParticles: {
  535. simplify: function () {
  536. return {
  537. type: 'particles',
  538. blueprint: {
  539. color: {
  540. start: ['c0c3cf', '929398'],
  541. end: ['69696e', '69696e']
  542. },
  543. scale: {
  544. start: {
  545. min: 32,
  546. max: 18
  547. },
  548. end: {
  549. min: 16,
  550. max: 8
  551. }
  552. },
  553. speed: {
  554. start: {
  555. min: 2,
  556. max: 6
  557. },
  558. end: {
  559. min: 0,
  560. max: 4
  561. }
  562. },
  563. lifetime: {
  564. min: 4,
  565. max: 16
  566. },
  567. alpha: {
  568. start: 0.2,
  569. end: 0
  570. },
  571. randomScale: true,
  572. randomSpeed: true,
  573. chance: 0.02,
  574. randomColor: true,
  575. spawnType: 'rect',
  576. blendMode: 'screen',
  577. spawnRect: {
  578. x: -80,
  579. y: -80,
  580. w: 160,
  581. h: 160
  582. }
  583. }
  584. };
  585. }
  586. }
  587. }
  588. },
  589. bubbles: {
  590. components: {
  591. cpnParticles: {
  592. simplify: function () {
  593. return {
  594. type: 'particles',
  595. blueprint: {
  596. color: {
  597. start: ['48edff', '3fa7dd'],
  598. end: ['69696e', '42548d']
  599. },
  600. scale: {
  601. start: {
  602. min: 2,
  603. max: 8
  604. },
  605. end: {
  606. min: 2,
  607. max: 4
  608. }
  609. },
  610. speed: {
  611. start: {
  612. min: 2,
  613. max: 6
  614. },
  615. end: {
  616. min: 0,
  617. max: 4
  618. }
  619. },
  620. lifetime: {
  621. min: 1,
  622. max: 3
  623. },
  624. alpha: {
  625. start: 0.5,
  626. end: 0
  627. },
  628. randomScale: true,
  629. randomSpeed: true,
  630. chance: 0.2,
  631. randomColor: true,
  632. spawnType: 'rect',
  633. blendMode: 'screen',
  634. spawnRect: {
  635. x: -20,
  636. y: -20,
  637. w: 60,
  638. h: 60
  639. }
  640. }
  641. };
  642. }
  643. }
  644. }
  645. },
  646. shopyala: {
  647. properties: {
  648. cpnNotice: {
  649. actions: {
  650. enter: {
  651. cpn: 'dialogue',
  652. method: 'talk',
  653. args: [{
  654. targetName: 'thaumaturge yala'
  655. }]
  656. },
  657. exit: {
  658. cpn: 'dialogue',
  659. method: 'stopTalk'
  660. }
  661. }
  662. }
  663. }
  664. }
  665. }
  666. };