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.
 
 
 

687 lines
11 KiB

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