https://pvzm.net/ to play [Read-only GitHub mirror] pvzm.net
modded vs pvz plants-vs-zombies plantsvszombies javascript online zombie noads jspvz pvzm game plants plant
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

blablabalbleobelobelo

ROBlNET13 3c86408f 5f73175f

+31 -160
+18 -160
game/js/CZombie.js
··· 5480 5480 CName: "Jack-in-the-Box Zombie", 5481 5481 SunNum: 100, 5482 5482 HP: 270, 5483 - BreakPoint: 167, 5484 5483 Lvl: 3, 5485 5484 Status: 1, 5486 5485 BookHandPosition: "30% 70%", ··· 5690 5689 CName: "Jack-in-the-Box Zombie", 5691 5690 SunNum: 100, 5692 5691 HP: 270, 5693 - BreakPoint: 167, 5694 5692 Lvl: 3, 5695 5693 Status: 1, 5696 5694 BookHandPosition: "30% 70%", ··· 5706 5704 LostHeadGif: 9, 5707 5705 LostHeadAttackGif: 10, 5708 5706 AttackGif: 2, 5709 - OSpeed: 3.6, 5710 - Speed: 3.6, 5707 + OSpeed: 3.2, 5708 + Speed: 3.2, 5711 5709 Produce: 5712 5710 '这种僵尸带着个会爆炸的潘多拉盒子。</p><p>韧性:<font color="#CC241D">中</font><br>速度:<font color="#CC241D">快</font><br>特点:<font color="#CC241D">打开玩偶匣会爆炸</font><br>弱点:<font color="#CC241D">磁力菇</font><br>这种僵尸令人不寒而栗,不是因为他的冰冷身躯而是因为他的疯狂。', 5713 5711 AudioArr: ["jackinthebox", "explosion"], ··· 10880 10878 CName: "小丑僵尸", 10881 10879 SunNum: 100, 10882 10880 HP: 500, 10883 - BreakPoint: 167, 10884 10881 Lvl: 3, 10885 10882 Status: 1, 10886 10883 BookHandPosition: "30% 70%", ··· 11853 11850 ]; 11854 11851 })(), 11855 11852 Produce: 11856 - '韧性:<font color="#CC241D">低</font></p>这种僵尸喜爱脑髓,贪婪而不知足。脑髓,脑髓,脑髓,夜以继日地追求着。老而臭的脑髓?腐烂的脑髓?都没关系。僵尸需要它们。', 11857 - BirthCallBack(f) { 11858 - var e = f.delayT; 11859 - var d = f.id; 11860 - var c = (f.Ele = $(d)); 11861 - f.EleShadow = c.firstChild; 11862 - f.EleBody = c.childNodes[1]; 11863 - e 11864 - ? oSym.addTask( 11865 - e, 11866 - (h, g) => { 11867 - var i = $Z[h]; 11868 - i && ((i.FreeSetbodyTime = 0), SetBlock(g)); 11869 - }, 11870 - [d, c] 11871 - ) 11872 - : SetBlock(c); 11873 - f.StartAttackCheck(f); // Start the continuous attack check 11874 - }, 11875 - StartAttackCheck(f) { 11876 - oSym.addTask( 11877 - 1, // Check every frame (or a very small interval) 11878 - function (currentZombie) { 11879 - if ($Z[currentZombie.id]) { 11880 - currentZombie.CheckAndAttack(); 11881 - } 11882 - oSym.addTask(1, arguments.callee, [currentZombie]); 11883 - }, 11884 - [f] 11885 - ); 11886 - }, 11887 - CheckAndAttack() { 11888 - var a = this; 11889 - var plantTarget = null; 11890 - 11891 - console.log("oPeaZombie ID:", a.id, "Checking $P for plants (keys starting with 'P_')."); 11892 - 11893 - for (var plantId in oP) { 11894 - if (Object.hasOwn(oP, plantId) && plantId.startsWith("P_")) { 11895 - var plant = oP[plantId]; 11896 - console.log(" Found Plant ID:", plantId, "Object:", plant); 11897 - // Now try to access the properties we need 11898 - if (plant && plant.R !== undefined && plant.Altitude !== undefined && plant.AttackedLX !== undefined) { 11899 - console.log( 11900 - " Plant Properties:", 11901 - "Name:", 11902 - plant.CName, 11903 - "Row:", 11904 - plant.R, 11905 - "Altitude:", 11906 - plant.Altitude, 11907 - "LX:", 11908 - plant.AttackedLX, 11909 - "Zombie Row:", 11910 - a.R, 11911 - "Zombie Right:", 11912 - a.X + a.width 11913 - ); 11914 - if (plant.R === a.R && plant.Altitude === 1 && plant.AttackedLX < a.X + a.width) { 11915 - plantTarget = plant; 11916 - console.log(" Target Plant Found:", plant.CName, "LX:", plant.AttackedLX, "Zombie Right:", a.X + a.width, "Zombie Row:", a.R); 11917 - break; 11918 - } 11919 - } else { 11920 - console.log(" Plant Missing Required Properties (R, Altitude, LX)."); 11921 - } 11922 - } 11923 - } 11924 - 11925 - if (plantTarget) { 11926 - console.log("Calling Attack with target:", plantTarget.CName); 11927 - a.Attack(plantTarget); 11928 - } 11929 - }, 11930 - Attack(targetPlant) { 11931 - var a = this; 11932 - var b = "ZB" + Math.random(); // Zombie Bullet ID 11933 - 11934 - a.PlayAttack(3); // Play the attack animation 11935 - oSym.addTask( 11936 - 15, 11937 - (d) => { 11938 - var c = $(d); 11939 - c && SetVisible(c); 11940 - }, 11941 - [b] 11942 - ); 11943 - oSym.addTask( 11944 - 1, 11945 - function (f, j, h, c, n, i, m, k, o, g, targetPlant) { 11946 - // Pass targetPlant 11947 - var l; 11948 - var e = GetC(n); // Likely gets the column 11949 - 11950 - if (targetPlant && targetPlant.Altitude === 1 && targetPlant.id === g) { 11951 - // Check if the target is still valid 11952 - targetPlant.getHurt(h, c); // Call a hypothetical getHurt method on the plant 11953 - SetStyle(j, { 11954 - left: o + targetPlant.width - 20 + "px", // Adjust bullet impact position 11955 - }).src = "images/Plants/PeaBulletHit.gif"; // Use a pea hit effect for now 11956 - oSym.addTask(10, ClearChild, [j]); 11957 - } else { 11958 - n += l = c ? -5 : 5; 11959 - if (n > -20 && n < oS.W) { 11960 - // Move towards the right 11961 - j.style.left = (o += l) + "px"; 11962 - oSym.addTask(1, arguments.callee, [ 11963 - f, 11964 - j, 11965 - h, 11966 - c, 11967 - n, 11968 - i, 11969 - m, 11970 - k, 11971 - o, 11972 - g, 11973 - targetPlant, // Pass targetPlant in the recursive call 11974 - ]); 11975 - } else { 11976 - ClearChild(j); 11977 - } 11978 - } 11979 - }, 11980 - [ 11981 - b, 11982 - NewImg( 11983 - b, 11984 - "images/Plants/PB00.gif", 11985 - "left:" + (a.X + a.width - 20) + "px;top:" + (a.pixelTop + 35) + "px;visibility:hidden;z-index:" + (a.zIndex + 2), 11986 - EDPZ 11987 - ), // Create a bullet image 11988 - 20, // Damage 11989 - 0, // Direction (towards right: 0 makes l = 5) 11990 - a.X + a.width - 20, // Initial X position (right side of zombie) 11991 - a.R, // Row 11992 - 0, 11993 - 0, 11994 - a.X + a.width - 20, 11995 - oGd.$Torch, 11996 - targetPlant.id, // Pass the target plant's ID 11997 - ] 11998 - ); 11999 - }, 11853 + 'peashootr', 12000 11854 }); 12001 11855 var oGargantuar = InheritO(OrnIZombies, { 12002 11856 EName: "oGargantuar", ··· 12004 11858 OrnHP: 2000, 12005 11859 HP: 1000, 12006 11860 Lvl: 2, 12007 - width: 1, 12008 - height: 299, 11861 + width: 390, 11862 + height: 275, 11863 + beAttackedPointL: 150, 11864 + beAttackedPointR: 300, 12009 11865 SunNum: 300, 12010 11866 StandGif: 11, 12011 11867 AlmanacGif: 11, 12012 - Attack: 50, 11868 + Attack: 1800, 12013 11869 HeadPosition: [ 12014 11870 { 12015 11871 x: 82, ··· 12026 11882 ], 12027 11883 BookHandPosition: "35% 70%", 12028 11884 PicArr: (function () { 12029 - var b = "images/Zombies/Gargantuar/"; 12030 - var a = "images/Zombies/Zombie/"; 11885 + var a = "images/Zombies/Gargantuar/"; 12031 11886 return [ 12032 11887 "images/Card/Zombies/Gargantuar.png", 12033 - b + "0.png", 12034 - b + "Walk.webp", 12035 - b + "Attack.webp", 11888 + a + "0.png", 11889 + a + "Walk.webp", 11890 + a + "Attack.webp", 12036 11891 a + "ZombieLostHead.gif", 12037 11892 a + "ZombieLostHeadAttack.gif", 12038 11893 a + "ZombieHead.gif" + $Random, ··· 12040 11895 "images/Zombies/BoomDie.gif" + $Random, 12041 11896 a + "WalkNoImp.webp", 12042 11897 a + "Attack.webp", 12043 - b + "Idle.webp", 11898 + a + "Idle.webp", 12044 11899 ]; 12045 11900 })(), 12046 11901 AudioArr: ["plastichit"], 12047 - PlayNormalballAudio() { 12048 - PlaySound2("plastichit"); 11902 + GetDX() { 11903 + return -200; 11904 + }, 11905 + getShadow(a) { 11906 + return "left:200px;top:250px"; 12049 11907 }, 12050 11908 Produce: 12051 11909 '他的路障头盔,使他两倍坚韧于普通僵尸。<p>韧性:<font color="#CC241D">中</font></p>和其他僵尸一样,路障头僵尸盲目地向前。但某些事物却使他停下脚步,捡起一个交通路障,并固实在自己的脑袋上。是的,他很喜欢参加聚会。',
+13
game/js/Cfunction.js
··· 4474 4474 var easeInOutBounce = function (x) { 4475 4475 return x < 0.5 ? (1 - easeOutBounce(1 - 2 * x)) / 2 : (1 + easeOutBounce(2 * x - 1)) / 2; 4476 4476 }; 4477 + 4478 + function createZombie(zombieClass, row, column) { 4479 + let zombie = new zombieClass(), 4480 + zombieHTML = zombie.CustomBirth(row, column, 0, "auto"); 4481 + asyncInnerHTML( 4482 + zombieHTML, 4483 + (fragment, zombieObj) => { 4484 + EDPZ.appendChild(fragment); 4485 + zombieObj.Birth(); 4486 + }, 4487 + zombie, 4488 + ); 4489 + }