Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 

682 rader
11 KiB

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