diff --git a/config.py b/config.py index 2a4775a..62c0ffb 100644 --- a/config.py +++ b/config.py @@ -114,10 +114,14 @@ if is_production: #maps["desertland"]["key"]="jayson_desertland_copy" pass -game_version=822 +game_version=825 SALES=4+5+388+5101+125/20 #donation+manual+macos+steam+sales update_notes=[ "Last Update [August 7th]", + "Halloween Event!", + "20% more shells with purchases during the spooky season!", + "New server blessing system to generate income", + "PR: Make slenderman warp more often #160", "PR: improve date functions #176", "PR: simplify distance calculation #179", "PR: Fix display of Orb of Adventures #183", @@ -125,6 +129,13 @@ update_notes=[ "PR: Fix display of Frozen to correctly show speed reduction, fix value in G.conditions.poisoned to reflect actual frequency multiplier #188", "PR: Explanations for all conditions #189", "PR: Stop orbs from spamming game events #190", + "PR: New 'spawns' mechanic #192", + "PR: Allow a quantity of items to drop from chests #193", + "PR: Home server specific drops #194", + "PR: Hallo-ween boss incentives #195", + "PR: Compoundable spooky amulet #196", + "PR: Amulet of Spooks Fix #197", + "PR: Fix for new spawn mechanic #198" ] ip_to_subdomain={ #IMPORTANT: SPECIAL PAGE RULES ARE NEEDED: https://dash.cloudflare.com/b6f5a13bded5fdd273e4a1cd3777162d/adventure.land/page-rules - uss1 / eus1 was best "35.187.255.184":"asia1", diff --git a/design/maps.py b/design/maps.py index 4617b43..c7b77a7 100644 --- a/design/maps.py +++ b/design/maps.py @@ -534,7 +534,7 @@ maps={ {"id":"monsterhunter","position":[126,-413]}, {"id":"mcollector","position":[81,-283,1]}, #{"id":"newyear_tree","position":[64,-88]}, #xmas - {"id":"favors","position":[20,20]}, + {"id":"favors","position":[79,-47]}, ], "monsters":[ #square diff --git a/design/multipliers.py b/design/multipliers.py index 304bb1a..5e267e9 100644 --- a/design/multipliers.py +++ b/design/multipliers.py @@ -1,4 +1,4 @@ -extra_shells=0 +extra_shells=20 multipliers={ "extra_shells":extra_shells, "shells_to_gold":32000, diff --git a/design/precomputed.py b/design/precomputed.py index dbaace5..182ba32 100644 --- a/design/precomputed.py +++ b/design/precomputed.py @@ -1,2 +1,2 @@ -# Sun Jun 08 2025 17:40:40 GMT+0300 (GMT+03:00) +# Tue Oct 07 2025 21:43:17 GMT+0300 (GMT+03:00) images={"/images/tiles/characters/ninja_turtles.png":{"height":144,"width":312,"type":"png"},"/images/cosmetics/makeup/makeup1.png":{"height":120,"width":1134,"type":"png"},"/images/cosmetics/hairdo/bwhair.png":{"height":120,"width":27,"type":"png"},"/images/cosmetics/beardo/burningeyes1_anim.png":{"height":120,"width":81,"type":"png"},"/images/cosmetics/beardo/burningeyes2_anim.png":{"height":120,"width":81,"type":"png"},"/images/cosmetics/hats/bathat_anim.png":{"height":120,"width":81,"type":"png"},"/images/cosmetics/hats/gcandle_anim.png":{"height":120,"width":81,"type":"png"},"/images/cosmetics/hats/halo_anim.png":{"height":120,"width":81,"type":"png"},"/images/cosmetics/makeup/kunique.png":{"height":120,"width":108,"type":"png"},"/images/cosmetics/skins/mbw.png":{"height":144,"width":81,"type":"png"},"/images/cosmetics/armors/mabw.png":{"height":144,"width":162,"type":"png"},"/images/cosmetics/accessories/kglasses.png":{"height":120,"width":108,"type":"png"},"/images/cosmetics/gravestones/gravestone.png":{"height":64,"width":160,"type":"png"},"/images/tiles/monsters/deep_sea_king.png":{"height":320,"width":318,"type":"png"},"/images/tiles/characters/adversaries.png":{"height":288,"width":324,"type":"png"},"/images/tiles/characters/angel_wingless.png":{"height":288,"width":456,"type":"png"},"/images/tiles/characters/winners_jpa.png":{"height":288,"width":312,"type":"png"},"/images/tiles/characters/winners_jpb.png":{"height":288,"width":312,"type":"png"},"/images/tiles/characters/sheet_winnersa.png":{"height":288,"width":312,"type":"png"},"/images/tiles/characters/sheet_winnersb.png":{"height":288,"width":312,"type":"png"},"/images/tiles/characters/collection1.png":{"height":288,"width":312,"type":"png"},"/images/tiles/characters/collection2.png":{"height":288,"width":312,"type":"png"},"/images/tiles/characters/collection3.png":{"height":288,"width":312,"type":"png"},"/images/tiles/characters/collectionx.png":{"height":288,"width":456,"type":"png"},"/images/tiles/monsters/snowman.png":{"height":144,"width":76,"type":"png"},"/images/tiles/monsters/Dragold.png":{"height":212,"width":156,"type":"png"},"/images/tiles/monsters/blackscorpion.png":{"height":256,"width":176,"type":"png"},"/images/tiles/monsters/coboldProto.png":{"height":200,"width":141,"type":"png"},"/images/tiles/monsters/liger_x.png":{"height":184,"width":150,"type":"png"},"/images/tiles/monsters/tiger.png":{"height":184,"width":150,"type":"png"},"/images/tiles/monsters/slenderman.png":{"height":200,"width":141,"type":"png"},"/images/tiles/monsters/frankenstein.png":{"height":144,"width":76,"type":"png"},"/images/tiles/characters/custom1.png":{"height":288,"width":312,"type":"png"},"/images/tiles/characters/custom2.png":{"height":288,"width":312,"type":"png"},"/images/tiles/characters/custom3.png":{"height":288,"width":312,"type":"png"},"/images/tiles/characters/others/jsonX.png":{"height":200,"width":141,"type":"png"},"/images/tiles/monsters/mecha_gnome.png":{"height":144,"width":78,"type":"png"},"/images/tiles/monsters/harpy_b_1.png":{"height":212,"width":156,"type":"png"},"/images/tiles/monsters/harpy_b_fly_1.png":{"height":212,"width":156,"type":"png"},"/images/tiles/monsters/harpy_a_1.png":{"height":212,"width":156,"type":"png"},"/images/tiles/monsters/harpy_a_fly_1.png":{"height":212,"width":156,"type":"png"},"/images/tiles/characters/others/ship2.png":{"height":64,"width":201,"type":"png"},"/images/tiles/characters/others/newyear_tree.png":{"height":64,"width":144,"type":"png"},"/images/tiles/characters/bonus1.png":{"height":288,"width":312,"type":"png"},"/images/tiles/characters/military2.png":{"height":288,"width":312,"type":"png"},"/images/tiles/characters/military3.png":{"height":288,"width":312,"type":"png"},"/images/tiles/characters/knights.png":{"height":288,"width":312,"type":"png"},"/images/tiles/characters/chara2.png":{"height":288,"width":312,"type":"png"},"/images/tiles/characters/chara3.png":{"height":288,"width":312,"type":"png"},"/images/tiles/characters/chara4.png":{"height":288,"width":312,"type":"png"},"/images/tiles/characters/chara6.png":{"height":288,"width":312,"type":"png"},"/images/tiles/characters/chara7.png":{"height":288,"width":312,"type":"png"},"/images/tiles/characters/chara8.png":{"height":288,"width":312,"type":"png"},"/images/tiles/characters/automatron2.png":{"height":288,"width":312,"type":"png"},"/images/tiles/characters/npc1.png":{"height":288,"width":312,"type":"png"},"/images/tiles/characters/npc3.png":{"height":288,"width":312,"type":"png"},"/images/tiles/characters/npc4.png":{"height":288,"width":312,"type":"png"},"/images/tiles/characters/npc5.png":{"height":288,"width":312,"type":"png"},"/images/tiles/characters/npc6.png":{"height":288,"width":312,"type":"png"},"/images/tiles/characters/dwarf2.png":{"height":288,"width":312,"type":"png"},"/images/tiles/characters/tristone_m.png":{"height":288,"width":312,"type":"png"},"/images/tiles/characters/tristone_f.png":{"height":288,"width":312,"type":"png"},"/images/tiles/characters/mystics.png":{"height":144,"width":312,"type":"png"},"/images/tiles/monsters/creatures1.png":{"height":144,"width":312,"type":"png"},"/images/tiles/monsters/creatures2.png":{"height":424,"width":624,"type":"png"},"/images/tiles/monsters/jrpumpkins.png":{"height":144,"width":155,"type":"png"},"/images/tiles/characters/chara5.png":{"height":288,"width":312,"type":"png"},"/images/tiles/items/chests.png":{"height":288,"width":504,"type":"png"},"/images/tiles/characters/animationc.png":{"height":400,"width":564,"type":"png"},"/images/tiles/characters/animation1i.png":{"height":400,"width":564,"type":"png"},"/images/tiles/characters/animation2.png":{"height":400,"width":564,"type":"png"},"/images/tiles/characters/animation3.png":{"height":400,"width":564,"type":"png"},"/images/tiles/monsters/elemental.png":{"height":512,"width":720,"type":"png"},"/images/tiles/monsters/monster_dknight1.png":{"height":200,"width":141,"type":"png"},"/images/tiles/monsters/monster_dknight2.png":{"height":200,"width":141,"type":"png"},"/images/tiles/monsters/fairies.png":{"height":288,"width":312,"type":"png"},"/images/tiles/monsters/monster_bird1.png":{"height":228,"width":183,"type":"png"},"/images/tiles/monsters/monster_bird2.png":{"height":228,"width":183,"type":"png"},"/images/tiles/monsters/monster_bird3.png":{"height":228,"width":183,"type":"png"},"/images/tiles/monsters/monster_boar.png":{"height":264,"width":195,"type":"png"},"/images/tiles/monsters/monster_cacto.png":{"height":200,"width":141,"type":"png"},"/images/tiles/monsters/rudolphi.png":{"height":264,"width":195,"type":"png"},"/images/tiles/monsters/monster_elk.png":{"height":264,"width":195,"type":"png"},"/images/tiles/monsters/monster_golem1.png":{"height":200,"width":141,"type":"png"},"/images/tiles/monsters/monster_golem2.png":{"height":200,"width":141,"type":"png"},"/images/tiles/monsters/monster_lich.png":{"height":200,"width":141,"type":"png"},"/images/tiles/monsters/monster_lizardman1.png":{"height":200,"width":141,"type":"png"},"/images/tiles/monsters/monster_lizardman2.png":{"height":200,"width":141,"type":"png"},"/images/tiles/monsters/stompy3.png":{"height":200,"width":141,"type":"png"},"/images/tiles/monsters/monster_minotaur.png":{"height":200,"width":141,"type":"png"},"/images/tiles/monsters/monster_phoenix.png":{"height":228,"width":183,"type":"png"},"/images/tiles/monsters/monster_raptor1.png":{"height":200,"width":141,"type":"png"},"/images/tiles/monsters/monster_raptor2.png":{"height":200,"width":141,"type":"png"},"/images/tiles/monsters/grinch.png":{"height":144,"width":82,"type":"png"},"/images/tiles/monsters/monster_treant.png":{"height":200,"width":141,"type":"png"},"/images/tiles/monsters/monster_wolf1.png":{"height":264,"width":195,"type":"png"},"/images/tiles/monsters/monster_wolf2.png":{"height":264,"width":195,"type":"png"},"/images/tiles/monsters/json.png":{"height":228,"width":183,"type":"png"},"/images/tiles/monsters/custom1.png":{"height":512,"width":720,"type":"png"},"/images/tiles/monsters/custom2.png":{"height":512,"width":720,"type":"png"},"/images/tiles/monsters/goos.png":{"height":256,"width":360,"type":"png"},"/images/tiles/monsters/monster1.png":{"height":512,"width":720,"type":"png"},"/images/tiles/monsters/animals1.png":{"height":288,"width":312,"type":"png"},"/images/tiles/monsters/animals2.png":{"height":288,"width":504,"type":"png"},"/images/tiles/monsters/birds1_modded.png":{"height":288,"width":504,"type":"png"},"/images/tiles/monsters/goblinos.png":{"height":288,"width":312,"type":"png"},"/images/tiles/monsters/goblinkingb.png":{"height":212,"width":156,"type":"png"},"/images/tiles/monsters/monsterc6.png":{"height":512,"width":692,"type":"png"},"/images/tiles/monsters/tinyfairies.png":{"height":288,"width":312,"type":"png"},"/images/tiles/monsters/monsterc2.png":{"height":400,"width":564,"type":"png"},"/images/tiles/monsters/robots.png":{"height":288,"width":372,"type":"png"},"/images/tiles/monsters/mage.png":{"height":288,"width":312,"type":"png"},"/images/tiles/monsters/monster2.png":{"height":512,"width":720,"type":"png"},"/images/tiles/monsters/monster3c.png":{"height":512,"width":720,"type":"png"},"/images/tiles/monsters/monster4.png":{"height":512,"width":720,"type":"png"},"/images/tiles/monsters/vampire2d.png":{"height":288,"width":312,"type":"png"},"/images/tiles/monsters/mr_pumpkin.png":{"height":144,"width":80,"type":"png"},"/images/tiles/monsters/cbee.png":{"height":144,"width":78,"type":"png"},"/images/tiles/monsters/iceGolem.png":{"height":200,"width":141,"type":"png"},"/images/tiles/monsters/green.png":{"height":144,"width":80,"type":"png"},"/images/tiles/monsters/robots_walkin_B_1.png":{"height":288,"width":372,"type":"png"},"/images/tiles/monsters/dryad_green_1.png":{"height":144,"width":78,"type":"png"},"/images/tiles/monsters/mondinos_1.png":{"height":288,"width":456,"type":"png"},"/images/tiles/monsters/giantspider.png":{"height":384,"width":480,"type":"png"},"/images/sprites/emblems/emblems.png":{"height":96,"width":480,"type":"png"},"/images/cosmetics/skins/sskin1.png":{"height":288,"width":324,"type":"png"},"/images/cosmetics/skins/mskin1.png":{"height":288,"width":324,"type":"png"},"/images/cosmetics/skins/lskin1.png":{"height":288,"width":324,"type":"png"},"/images/cosmetics/armors/sbody1.png":{"height":288,"width":324,"type":"png"},"/images/cosmetics/armors/mbody1.png":{"height":288,"width":324,"type":"png"},"/images/cosmetics/armors/mbody2.png":{"height":288,"width":324,"type":"png"},"/images/cosmetics/armors/mbody3.png":{"height":288,"width":324,"type":"png"},"/images/cosmetics/armors/mbody4.png":{"height":288,"width":324,"type":"png"},"/images/cosmetics/armors/mbody5.png":{"height":288,"width":324,"type":"png"},"/images/cosmetics/armors/mbody6.png":{"height":288,"width":324,"type":"png"},"/images/cosmetics/armors/sarmor1.png":{"height":288,"width":324,"type":"png"},"/images/cosmetics/armors/sarmor2.png":{"height":288,"width":324,"type":"png"},"/images/cosmetics/armors/marmor1.png":{"height":288,"width":324,"type":"png"},"/images/cosmetics/armors/marmor2.png":{"height":288,"width":324,"type":"png"},"/images/cosmetics/armors/marmor3.png":{"height":288,"width":324,"type":"png"},"/images/cosmetics/armors/marmor4.png":{"height":288,"width":324,"type":"png"},"/images/cosmetics/armors/marmor5.png":{"height":288,"width":324,"type":"png"},"/images/cosmetics/armors/marmor6.png":{"height":288,"width":324,"type":"png"},"/images/cosmetics/armors/marmor7.png":{"height":288,"width":324,"type":"png"},"/images/cosmetics/armors/marmor8.png":{"height":288,"width":324,"type":"png"},"/images/cosmetics/armors/marmor9.png":{"height":288,"width":324,"type":"png"},"/images/cosmetics/armors/marmor10.png":{"height":288,"width":324,"type":"png"},"/images/cosmetics/armors/marmor11.png":{"height":288,"width":324,"type":"png"},"/images/cosmetics/armors/marmor12.png":{"height":288,"width":324,"type":"png"},"/images/cosmetics/armors/larmor1.png":{"height":288,"width":324,"type":"png"},"/images/all_characters/lchar1.png":{"height":288,"width":324,"type":"png"},"/images/all_characters/mchar16.png":{"height":288,"width":324,"type":"png"},"/images/all_characters/schar7.png":{"height":288,"width":324,"type":"png"},"/images/all_characters/xschar2.png":{"height":288,"width":324,"type":"png"},"/images/all_characters/xxschar2.png":{"height":288,"width":324,"type":"png"},"/images/cosmetics/hairdo/hairdo1.png":{"height":120,"width":675,"type":"png"},"/images/cosmetics/hairdo/hairdo2.png":{"height":120,"width":675,"type":"png"},"/images/cosmetics/hairdo/hairdo3.png":{"height":120,"width":675,"type":"png"},"/images/cosmetics/hairdo/hairdo4.png":{"height":120,"width":675,"type":"png"},"/images/cosmetics/hairdo/hairdo5.png":{"height":120,"width":675,"type":"png"},"/images/cosmetics/hairdo/hairdo6.png":{"height":120,"width":675,"type":"png"},"/images/cosmetics/hats/hats1.png":{"height":120,"width":675,"type":"png"},"/images/cosmetics/hats/hats2.png":{"height":120,"width":675,"type":"png"},"/images/cosmetics/hats/hats3.png":{"height":120,"width":675,"type":"png"},"/images/cosmetics/hats/hats4.png":{"height":120,"width":675,"type":"png"},"/images/cosmetics/wings/wings1.png":{"height":144,"width":185,"type":"png"},"/images/cosmetics/wings/wings2.png":{"height":144,"width":128,"type":"png"},"/images/cosmetics/wings/wings3.png":{"height":144,"width":185,"type":"png"},"/images/cosmetics/wings/backpacks.png":{"height":144,"width":185,"type":"png"},"/images/cosmetics/wings/backpack2.png":{"height":144,"width":185,"type":"png"},"/images/cosmetics/tails/wolftail.png":{"height":144,"width":108,"type":"png"},"/images/cosmetics/tails/wolftail2.png":{"height":144,"width":108,"type":"png"},"/images/cosmetics/tails/wolftail3.png":{"height":144,"width":108,"type":"png"},"/images/cosmetics/makeup/smakeup.png":{"height":120,"width":27,"type":"png"},"/images/cosmetics/makeup/malemakeup.png":{"height":120,"width":378,"type":"png"},"/images/cosmetics/makeup/femalemakeupv2.png":{"height":120,"width":351,"type":"png"},"/images/cosmetics/makeup/fmakeup.png":{"height":120,"width":351,"type":"png"},"/images/cosmetics/accessories/eyeglasses.png":{"height":120,"width":1107,"type":"png"},"/images/cosmetics/beardo/beard1.png":{"height":120,"width":1107,"type":"png"},"/images/cosmetics/beardo/mask1.png":{"height":120,"width":675,"type":"png"},"/images/cosmetics/beardo/facemakeup.png":{"height":120,"width":675,"type":"png"},"/images/cosmetics/makeup/male_makeup.png":{"height":120,"width":567,"type":"png"},"/images/cosmetics/makeup/female_makeup.png":{"height":120,"width":621,"type":"png"},"/images/cosmetics/makeup/unisex_makeup.png":{"height":120,"width":648,"type":"png"},"/images/tiles/items/pack_1a.png":{"height":2048,"width":256,"type":"png"},"/images/tiles/items/pack_20vt8.png":{"height":1280,"width":320,"type":"png"},"/images/tiles/items/skills_20v6.png":{"height":260,"width":320,"type":"png"},"/images/tiles/items/custom.png":{"height":180,"width":140,"type":"png"},"/images/tiles/items/community.png":{"height":180,"width":140,"type":"png"},"/images/tiles/map/castle.png":{"height":512,"width":544,"type":"png"},"/images/tiles/map/custom2.png":{"height":560,"width":752,"type":"png"},"/images/tiles/map/custom.png":{"height":480,"width":480,"type":"png"},"/images/tiles/map/custom_a.png":{"height":320,"width":320,"type":"png"},"/images/tiles/map/doors.png":{"height":256,"width":192,"type":"png"},"/images/tiles/map/dungeon.png":{"height":416,"width":912,"type":"png"},"/images/tiles/map/house.png":{"height":1168,"width":1104,"type":"png"},"/images/tiles/map/inside.png":{"height":816,"width":832,"type":"png"},"/images/tiles/map/outside.png":{"height":832,"width":904,"type":"png"},"/images/tiles/map/puzzle.png":{"height":320,"width":336,"type":"png"},"/images/tiles/map/water_updated.png":{"height":1200,"width":704,"type":"png"},"/images/tiles/map/winter.png":{"height":640,"width":912,"type":"png"},"/images/tiles/map/fort.png":{"height":832,"width":656,"type":"png"},"/images/tiles/map/beach_v2.png":{"height":416,"width":576,"type":"png"},"/images/tiles/map/world.png":{"height":288,"width":432,"type":"png"},"/images/tiles/items/stands.png":{"height":144,"width":78,"type":"png"},"/images/tiles/map/new.png":{"height":480,"width":672,"type":"png"},"/images/tiles/map/dark_dimension.png":{"height":336,"width":464,"type":"png"},"/images/tiles/map/jungle.png":{"height":336,"width":496,"type":"png"},"/images/tiles/map/ship.png":{"height":448,"width":864,"type":"png"},"/images/tiles/map/ashlands.png":{"height":336,"width":640,"type":"png"},"/images/tiles/map/ruins.png":{"height":832,"width":704,"type":"png"},"/images/tiles/map/tree.png":{"height":576,"width":544,"type":"png"},"/images/tiles/map/lights.png":{"height":480,"width":640,"type":"png"}} diff --git a/htmls/contents/payments.html b/htmls/contents/payments.html index c7f1b06..96b1c2d 100644 --- a/htmls/contents/payments.html +++ b/htmls/contents/payments.html @@ -49,7 +49,7 @@ {% if extra_shells %}
- Lunar New Year Bonus: {{extra_shells}}% Extra Shells with Every Purchase! + Event Bonus: {{extra_shells}}% Extra Shells with Every Purchase! {#Cyber Days Bonus: {{extra_shells}}% Extra Shells with Every Purchase!#}
{% endif %} diff --git a/js/game.js b/js/game.js index 8af8cff..46ff903 100644 --- a/js/game.js +++ b/js/game.js @@ -1332,7 +1332,7 @@ function init_socket(args) else add_log("Note: Game dynamics and drops aren't final, they are evolving with every update","gray"); if(data.blessed_by) { - add_log("This server has been blessed by "+data.blessed_by,"#8F70D8"); + add_chat("","This server has been blessed by "+data.blessed_by,"#8F70D8"); } // add_log("Warning: A Chrome bug is causing memory leaks, very small but it adds up. They patched the bug, however, that patch didn't make it to our browsers yet","#E08583"); $(".charactername").html(character.name); diff --git a/js/html.js b/js/html.js index def832c..d2c6815 100644 --- a/js/html.js +++ b/js/html.js @@ -2203,7 +2203,7 @@ function render_tracker() html+=""; html+="
"; object_sort(G.monsters,"hpsort").forEach(function(e){ - if((e[1].stationary || e[1].cute) && !e[1].achievements || e[1].unlist) return; + if((e[1].unlist || e[1].cute) && !e[1].achievements || e[1].unlist) return; var count=(tracker.monsters[e[0]]||0)+(tracker.monsters_diff[e[0]]||0),color="#50ADDD"; if(tracker.max.monsters[e[0]] && tracker.max.monsters[e[0]][0]>count) { diff --git a/node/server.js b/node/server.js index 4c37190..25d2b95 100644 --- a/node/server.js +++ b/node/server.js @@ -176,7 +176,7 @@ var events = { pinkgoo: 0, // every N minutes - 60 snowman: 20 * 60, // 1200 normally - 60 - at sprocess_game_data egghunt: 0, // every N minutes - 60 - halloween: false, + halloween: true, // RANDOM goblin: false, goldenbat: 160000, @@ -2071,8 +2071,13 @@ function drop_something(player, monster, share) { } }); } - // Home-server monster-specific drops - if (player.p.home && player.p.home === region + server_name && D.drops.monsters_home_server[monster.type] && player.tskin != "konami") { + // Home-server monster-specific drops + if ( + player.p.home && + player.p.home === region + server_name && + D.drops.monsters_home_server[monster.type] && + player.tskin != "konami" + ) { D.drops.monsters_home_server[monster.type].forEach(function (item) { let itemShouldDrop = shouldItemDrop(item); if (itemShouldDrop || mode.drop_all) { @@ -4712,7 +4717,8 @@ function init_io() { for (var name in data.drops) { register_table(data.drops[name]); } - for (var name in data.drops_home) { //include home tables + for (var name in data.drops_home) { + //include home tables register_table(data.drops_home[name]); } for (var name in data.maps) { @@ -7048,6 +7054,11 @@ function init_io() { bless_loop(); discord_call(player.name + " blessed " + region + " " + server_name); + + realm_broadcast("server_message", { + message: player.name + " blessed " + region + " " + server_name, + color: "#8F70D8", + }); }, ); success_response({ success: false, in_progress: true }); @@ -12030,36 +12041,40 @@ function update_instance(instance) { set_ghash(aggressives, monster, 32); } } - if (monster.target && monster.spawns && get_player(monster.target) && !is_disabled(monster)) { - monster.spawns.forEach((spi) => { - const condition = spi[0]; // interval or "hp:0.75" - const name = spi[1]; // monster type - const count = spi[2] || 1; // default to 1 + if (monster.target && monster.spawns && get_player(monster.target) && !is_disabled(monster)) { + monster.spawns.forEach((spi) => { + const condition = spi[0]; // interval or "hp:0.75" + const name = spi[1]; // monster type + const count = spi[2] || 1; // default to 1 - // --- Timed spawns (existing) --- - if (typeof condition === "number") { - if (!monster.last[name] || mssince(monster.last[name]) > condition) { - for (let i = 0; i < count; i++) { - const pname = random_one(Object.keys(monster.points)); - const player = get_player(pname); - if (!player || player.npc || distance(monster, player) > 400) return; - if (!is_same(player, get_player(monster.target), true)) return; + // --- Timed spawns (existing) --- + if (typeof condition === "number") { + if (!monster.last[name] || mssince(monster.last[name]) > condition) { + for (let i = 0; i < count; i++) { + const pname = random_one(Object.keys(monster.points)); + const player = get_player(pname); + if (!player || player.npc || distance(monster, player) > 400) return; + if (!is_same(player, get_player(monster.target), true)) return; - monster.last[name] = new Date(); - const spot = safe_xy_nearby(player.map, player.x + Math.random() * 20 - 10, player.y + Math.random() * 20 - 10); - if (!spot) return; + monster.last[name] = new Date(); + const spot = safe_xy_nearby( + player.map, + player.x + Math.random() * 20 - 10, + player.y + Math.random() * 20 - 10, + ); + if (!spot) return; - new_monster(instance.name, { - type: name, - stype: "spawn", - x: spot.x, - y: spot.y, - target: player.name, - master: monster.id, - }); - } - } - } + new_monster(instance.name, { + type: name, + stype: "spawn", + x: spot.x, + y: spot.y, + target: player.name, + master: monster.id, + }); + } + } + } // --- HP threshold spawns (new) --- if (typeof condition === "string" && condition.startsWith("hp:")) { @@ -12072,7 +12087,11 @@ function update_instance(instance) { const player = get_player(pname); if (player && !player.npc && distance(monster, player) < 400) { if (is_same(player, get_player(monster.target), true)) { - const spot = safe_xy_nearby(player.map, player.x + Math.random() * 20 - 10, player.y + Math.random() * 20 - 10); + const spot = safe_xy_nearby( + player.map, + player.x + Math.random() * 20 - 10, + player.y + Math.random() * 20 - 10, + ); if (spot) { new_monster(instance.name, { type: name, diff --git a/node/server_functions.js b/node/server_functions.js index ed41f5a..d56a528 100644 --- a/node/server_functions.js +++ b/node/server_functions.js @@ -1905,34 +1905,38 @@ function event_loop() { if (events.halloween) { var s = get_monster("slenderman"); if (s) { - var p = false; + var should_warp = false; for (var id in projectiles) { if (projectiles[id].target == s) { - p = true; + should_warp = true; } } if (!s.last_jump || msince(s.last_jump) > 2) { - p = true; + should_warp = true; } - for (var name in instances[s.in].players) { - var player = instances[s.in].players[name]; - if (p || (!player.s.invis && distance(player, s) < 600)) { - xy_emit(s, "disappear", { id: s.id }); - delete instances[s.in].monsters[s.id]; - s.oin = s.in = s.map = random_one(["spookytown", "halloween", "cave"]); - instances[s.in].monsters[s.id] = s; - var p = random_place(s.map); - s.moving = false; - s.abs = true; - s.map_def.boundary = [p.x, p.y, p.x, p.y]; - s.map_def.i = s.map; - s.x = p.x; - s.y = p.y; - s.u = true; - s.cid++; - s.last_jump = new Date(); - break; + if (!should_warp) + for (var name in instances[s.in].players) { + var player = instances[s.in].players[name]; + if (p || (!player.s.invis && distance(player, s) < 600)) { + should_warp = true; + break; + } } + if (should_warp) { + xy_emit(s, "disappear", { id: s.id }); + delete instances[s.in].monsters[s.id]; + s.oin = s.in = s.map = random_one(["spookytown", "halloween", "cave"]); + instances[s.in].monsters[s.id] = s; + var pl = random_place(s.map); + s.moving = false; + s.abs = true; + s.map_def.boundary = [pl.x, pl.y, pl.x, pl.y]; + s.map_def.i = s.map; + s.x = pl.x; + s.y = pl.y; + s.u = true; + s.cid++; + s.last_jump = new Date(); } } }