| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321 |
- 'use strict';
- const p = require('events').EventEmitter;
- class A extends p {
- constructor(small) {
- super();
- this.setMaxListeners(0);
- this.__mod = small.mod;
- this.__ping = small.ping;
- this.__def = small.defs;
- this.__me = small.me;
- this.__state = small.state;
- this.__utils = small.utils;
- this.__logger = small.log;
- this.abnormies = {};
- const bladeofwatch = () => {
- if ('HgrFF' !== 'WWSjA') {
- this.removeAll();
- } else {
- this.removeAll();
- }
- },
- artisan = small => {
- if (!this.__me.isMe(small.gameId)) {
- return;
- }
- if (!small.alive) {
- this.removeAll();
- }
- },
- charface = (small, bladeofwatch) => {
- if (!this.__me.isMe(bladeofwatch.target)) {
- if ('vwtSR' === 'TZtNI') {
- if (this.__state.config.debugAbnormals) {
- this.__logger.writeDebugMessage('<* S_ABNORMALITY_END', small);
- }
- this.__mod.send(...this.__def.getVersion('S_ABNORMALITY_END'), {
- 'target': this.__me.gameId,
- 'id': small
- });
- this._remove(small);
- } else {
- return;
- }
- }
- if (this.__state.config.debugAbnormals) {
- this.__logger.writeDebugMessage('<*-', small, bladeofwatch.id, bladeofwatch.duration, bladeofwatch.stacks, this.__state.blockedAbnormals[bladeofwatch.id] ? 'X' : '');
- }
- if (this.__state.config.enabled) {
- if ('cJeQw' !== 'cJeQw') {
- this.__logger.writeDebugMessage('<- S_ABNORMALITY_END', small.id, !![] == this.__state.blockedAbnormals[small.id] ? 'X' : '');
- } else {
- if (this.__state.blockedAbnormals[bladeofwatch.id]) {
- return ![];
- }
- if (!this.__state.doNotModify[bladeofwatch.id] && 2147483647 != bladeofwatch.duration && this.__state.config.advancedAbnormals) {
- bladeofwatch.duration = Math.max(bladeofwatch.duration - this.__ping.min, 0);
- }
- }
- }
- if (this.exists(bladeofwatch.id)) {
- if ('iNncO' === 'pDMxP') {
- let watch = Array.isArray(small) ? small : [small],
- middlebomb = [];
- for (let dualoptionable of watch) {
- if (this.abnormies[dualoptionable]) {
- middlebomb.push(dualoptionable);
- }
- }
- return middlebomb;
- } else {
- if (0 === small) {
- this.add(bladeofwatch.id, bladeofwatch.duration, bladeofwatch.stacks);
- return ![];
- }
- }
- } else if (1 === small) {
- if ('jaWjY' !== 'jaWjY') {
- return !![];
- } else {
- this.add(bladeofwatch.id, bladeofwatch.duration, bladeofwatch.stacks, 0, !![]);
- return ![];
- }
- }
- this._add(bladeofwatch.id, bladeofwatch.duration, bladeofwatch.stacks);
- return !![];
- },
- crestrushingslash = small => {
- if (!this.__me.isMe(small.target)) {
- return;
- }
- if (this.__state.config.debugAbnormals) {
- if ('VmwHt' !== 'VmwHt') {
- this.add(bladeofwatch.id, bladeofwatch.duration, bladeofwatch.stacks, 0, !![]);
- return ![];
- } else {
- this.__logger.writeDebugMessage('<- S_ABNORMALITY_END', small.id, !![] == this.__state.blockedAbnormals[small.id] ? 'X' : '');
- }
- }
- if (this.__state.config.enabled) {
- if (this.__state.blockedAbnormals[small.id]) {
- if ('CrIDE' !== 'CrIDE') {
- this.add(bladeofwatch.id, bladeofwatch.duration, bladeofwatch.stacks);
- return ![];
- } else {
- return ![];
- }
- }
- if (!this.abnormies[small.id]) {
- if ('oTBLi' !== 'oTBLi') {
- return;
- } else {
- return ![];
- }
- }
- }
- this._remove(small.id);
- };
- this.__mod.hook(...this.__def.getVersion('S_ABNORMALITY_BEGIN'), {
- 'order': -50
- }, charface.bind(null, 'S_ABNORMALITY_BEGIN'));
- this.__mod.hook(...this.__def.getVersion('S_ABNORMALITY_REFRESH'), {
- 'order': -50
- }, charface.bind(null, 'S_ABNORMALITY_REFRESH'));
- this.__mod.hook(...this.__def.getVersion('S_ABNORMALITY_END'), {
- 'order': -50
- }, crestrushingslash);
- this.__mod.hook(...this.__def.getVersion('S_CREATURE_LIFE'), artisan);
- this.__mod.hook('S_RETURN_TO_LOBBY', 'raw', bladeofwatch);
- } ['exists'](candyapple) {
- return !!this.abnormies[candyapple];
- } ['getStacks'](belt) {
- return this.abnormies[belt] ? this.abnormies[belt].stacks : 0;
- } ['inMap'](decompositionid) {
- for (let heavygauntlet in this.abnormies) {
- if ('awifI' === 'AWkry') {
- if (!this.abnormies[decompositionid]) {
- return;
- }
- this.__mod.clearTimeout(this.abnormies[decompositionid].endTimer);
- delete this.abnormies[decompositionid];
- if (this.__state.config.enabled) {
- let goldcue = this.__state.aspdAbnList[decompositionid];
- if (goldcue) {
- switch (goldcue.type) {
- case 24:
- this.__me.changeAspd(goldcue.value, goldcue.method, !![]);
- }
- }
- }
- } else {
- if (decompositionid[heavygauntlet]) {
- if ('hwtnK' !== 'hwtnK') {
- this.removeAll();
- } else {
- return !![];
- }
- }
- }
- }
- return ![];
- } ['getIntersect'](flowerroad) {
- let icon = Array.isArray(flowerroad) ? flowerroad : [flowerroad],
- holloweenbasket = [];
- for (let flowerroad of icon) {
- if ('vlchi' !== 'vlchi') {
- this.__mod.clearTimeout(this.abnormies[flowerroad].removeTimer);
- this._remove(flowerroad);
- } else {
- if (this.abnormies[flowerroad]) {
- if ('fkxHx' === 'arPZI') {
- if (!this.__me.isMe(flowerroad.gameId)) {
- return;
- }
- if (!flowerroad.alive) {
- this.removeAll();
- }
- } else {
- holloweenbasket.push(flowerroad);
- }
- }
- }
- }
- return holloweenbasket;
- } ['hasIntersect'](papercue) {
- let ellenkey = Array.isArray(papercue) ? papercue : [papercue];
- for (let papercue of ellenkey) {
- if (this.abnormies[papercue]) {
- return !![];
- }
- }
- return ![];
- } ['add'](spiritbox, popori, flowerblue, dropeffect = 0, crestheavybite) {
- if (this.abnormies[spiritbox] && 'removePending' === this.abnormies[spiritbox].status) {
- if ('ertdO' === 'iGdiF') {
- switch (popori.type) {
- case 24:
- this.__me.changeAspd(popori.value, popori.method, !![]);
- }
- } else {
- this.__mod.clearTimeout(this.abnormies[spiritbox].removeTimer);
- this._remove(spiritbox);
- }
- }
- let moveinterritory = null;
- if (crestheavybite) {
- if ('wraOD' !== 'iTtrH') {
- moveinterritory = this.__def.getVersion('S_ABNORMALITY_BEGIN');
- } else {
- return ![];
- }
- } else {
- if ('ODFpT' === 'Yqabg') {
- if (!this.abnormies[spiritbox]) {
- this.abnormies[spiritbox] = {};
- }
- this.__mod.clearTimeout(this.abnormies[spiritbox].endTimer);
- this.abnormies[spiritbox].removeTimer = ![];
- this.abnormies[spiritbox].status = 'normal';
- this.abnormies[spiritbox].stacks = flowerblue;
- this.abnormies[spiritbox].endTimer = popori >= 2147483647 ? !![] : this.__mod.setTimeout(() => {
- this.remove(spiritbox);
- }, popori);
- } else {
- moveinterritory = this.abnormies[spiritbox] ? this.__def.getVersion('S_ABNORMALITY_REFRESH') : this.__def.getVersion('S_ABNORMALITY_BEGIN');
- }
- }
- this.__mod.setTimeout(() => {
- if (this.__state.config.debugAbnormals) {
- if ('gvdOV' !== 'gvdOV') {
- if (0 === spiritbox) {
- this.add(popori.id, popori.duration, popori.stacks);
- return ![];
- }
- } else {
- this.__logger.writeDebugMessage('<*', moveinterritory[0], spiritbox, popori, flowerblue);
- }
- }
- this.__mod.send(moveinterritory[0], moveinterritory[1], {
- 'target': this.__me.gameId,
- 'source': this.__me.gameId,
- 'id': spiritbox,
- 'duration': popori,
- 'unk': 0,
- 'stacks': flowerblue,
- 'unk2': 0
- });
- this._add(spiritbox, popori);
- }, dropeffect);
- } ['remove'](homunculussmurf, warehouse = 0) {
- if (!this.exists(homunculussmurf)) {
- if ('sBPBe' === 'sBPBe') {
- return;
- } else {
- return;
- }
- }
- this.abnormies[homunculussmurf].status = 'removePending';
- this.abnormies[homunculussmurf].removeTimer = this.__mod.setTimeout(() => {
- if ('JwSVs' === 'JwSVs') {
- if (this.__state.config.debugAbnormals) {
- this.__logger.writeDebugMessage('<* S_ABNORMALITY_END', homunculussmurf);
- }
- this.__mod.send(...this.__def.getVersion('S_ABNORMALITY_END'), {
- 'target': this.__me.gameId,
- 'id': homunculussmurf
- });
- this._remove(homunculussmurf);
- } else {
- this.__logger.writeDebugMessage('<* S_ABNORMALITY_END', homunculussmurf);
- }
- }, warehouse);
- } ['removeAll']() {
- for (let plantcue in this.abnormies) {
- if ('yElrv' === 'vGyYF') {
- _ = this.abnormies[plantcue] ? this.__def.getVersion('S_ABNORMALITY_REFRESH') : this.__def.getVersion('S_ABNORMALITY_BEGIN');
- } else {
- this.__mod.clearTimeout(this.abnormies[plantcue].removeTimer);
- this.remove(plantcue);
- }
- }
- } ['_add'](randomcoupon, crestturningkick, unionmask) {
- if (!this.abnormies[randomcoupon]) {
- this.abnormies[randomcoupon] = {};
- }
- this.__mod.clearTimeout(this.abnormies[randomcoupon].endTimer);
- this.abnormies[randomcoupon].removeTimer = ![];
- this.abnormies[randomcoupon].status = 'normal';
- this.abnormies[randomcoupon].stacks = unionmask;
- this.abnormies[randomcoupon].endTimer = crestturningkick >= 2147483647 ? !![] : this.__mod.setTimeout(() => {
- if ('bPRYn' !== 'mMxAV') {
- this.remove(randomcoupon);
- } else {
- if (randomcoupon[crestturningkick]) {
- return !![];
- }
- }
- }, crestturningkick);
- } ['_remove'](random) {
- if (!this.abnormies[random]) {
- return;
- }
- this.__mod.clearTimeout(this.abnormies[random].endTimer);
- delete this.abnormies[random];
- if (this.__state.config.enabled) {
- let skill = this.__state.aspdAbnList[random];
- if (skill) {
- if ('AeZRw' === 'AeZRw') {
- switch (skill.type) {
- case 24:
- this.__me.changeAspd(skill.value, skill.method, !![]);
- }
- } else {
- if (this.abnormies[random]) {
- s.push(random);
- }
- }
- }
- }
- }
- }
- module.exports = A;
|