Git游戏

您现在的位置是:首页 > 攻略大全 > 黑科技

黑科技

继续解锁js修改

2023-08-18 黑科技4203
欢迎加入黑科技QQ群:934074044 交流,请勿在其它群炫耀修改成果,谢谢合作!
本文内容涉及修改、作弊,不喜勿入!

PS:每次转生和超转生以后js文件会重置所以要重新修改


修改.js文件,以chrome举例,按F12打开控制台,在选项卡【源代码】下,top/网站地址/static/main.xxxxxxx.js,修改完成按ctrl+S保存文件


--1、市场购买销售资源时加其他资源------------

47028行附近,key: "buy"和key: "sell"内部

this.MainStore.ResourcesStore.addResource(e, t);后添加

this.MainStore.ResourcesStore.addResource("research", 5000000); //研究

this.MainStore.ResourcesStore.addResource("gold", 5000000); //黄金

this.MainStore.ResourcesStore.addResource("food", 5000000); //食物

this.MainStore.ResourcesStore.addResource("wood", 5000000); //木头

this.MainStore.ResourcesStore.addResource("stone", 5000000); //石头

this.MainStore.ResourcesStore.addResource("copper", 5000000); //铜

this.MainStore.ResourcesStore.addResource("iron", 5000000); //铁

this.MainStore.ResourcesStore.addResource("tools", 5000000); //工具

this.MainStore.ResourcesStore.addResource("cow", 5000000); //牛                              

this.MainStore.ResourcesStore.addResource("horse", 5000000); //马

this.MainStore.ResourcesStore.addResource("steel", 5000000); //钢

this.MainStore.ResourcesStore.addResource("faith", 5000000); //信念

this.MainStore.ResourcesStore.addResource("mana", 5000000); //法力

this.MainStore.ResourcesStore.addResource("building_material", 5000000); //原料

this.MainStore.ResourcesStore.addResource("crystal", 5000000); //水晶

this.MainStore.ResourcesStore.addResource("supplies", 5000000); //补给 

this.MainStore.ResourcesStore.addResource("saltpetre", 5000000); //硝石

this.MainStore.ResourcesStore.addResource("natronite", 5000000); //钠红石

this.MainStore.ResourcesStore.addResource("mana", 5000000); 

//后两项看不见但是转生时有效

this.MainStore.ResourcesStore.addResource("luck", 50); //幸运,不晓得有无副作用,加一点意思下

this.MainStore.ResourcesStore.addResource("fame", 10000); //声誉


--1结束------------

--2、由评论区获得------------

--点按右边【食物】【木材】【石头】时增加其他材料,于第一次时代进化时失效(按钮消失)------------

于main*****.js搜索

e.props.MainStore.ResourcesStore.addResourceManual(e.props.id, e.props.manual)

末尾加个;

然后添加下面这堆,按资源类型增加行,和数量,注意头和上面不太一样

e.props.MainStore.ResourcesStore.addResource("research", 5000000);

e.props.MainStore.ResourcesStore.addResource("gold", 5000000);

e.props.MainStore.ResourcesStore.addResource("food", 5000000);

e.props.MainStore.ResourcesStore.addResource("wood", 5000000);

e.props.MainStore.ResourcesStore.addResource("stone", 5000000);

e.props.MainStore.ResourcesStore.addResource("copper", 5000000);

e.props.MainStore.ResourcesStore.addResource("iron", 5000000);

e.props.MainStore.ResourcesStore.addResource("tools", 5000000);

e.props.MainStore.ResourcesStore.addResource("cow", 5000000); 

e.props.MainStore.ResourcesStore.addResource("horse", 5000000);

e.props.MainStore.ResourcesStore.addResource("steel", 5000000);

e.props.MainStore.ResourcesStore.addResource("faith", 5000000);

e.props.MainStore.ResourcesStore.addResource("building_material", 5000000);

e.props.MainStore.ResourcesStore.addResource("crystal", 5000000);

e.props.MainStore.ResourcesStore.addResource("supplies", 5000000);

e.props.MainStore.ResourcesStore.addResource("saltpetre", 5000000);

e.props.MainStore.ResourcesStore.addResource("natronite", 5000000);

e.props.MainStore.ResourcesStore.addResource("mana", 5000000); 

e.props.MainStore.ResourcesStore.addResource("luck", 50);  

e.props.MainStore.ResourcesStore.addResource("fame", 10000); 

--2结束------------

已知资源(仅提供名称,不保证有效):

gold: "黄金",wood: "木材",food: "食物",stone: "石头",  copper: "铜",cow: "奶牛",

crystal: "水晶",faith: "信念",fame: "声誉",horse: "马",iron: "铁",     legacy: "传承",

luck: "运气",mana: "法力",natronite: "钠红石",population: "人口",    relic: "遗物",

research: "研究点",tools: "工具",building_material: "原料",steel: "钢",supplies: "补给",

saltpetre: "硝石",tome_wisdom: "智慧卷轴",gem: "宝石",

titan_gift: "泰坦之礼物"


--3、群友指点------------

--修改超转生加成,转生即无,不用ctrl+S---------

控制台输入

Object.values(document.querySelector("#main-tabs"))[1].children._owner.stateNode.props.MainStore.StatsStore.ngResetBonus=1100;

--3结束------------


--4、由以上路径引申的其他修改------

--修改建筑属性-----

---修改兵营(barracks)增加军队上限值,以下代码作用是兵营+军队上限3改10---

由于数组大小由当前解锁数量决定,所以改之前确认下是哪个,用前确认以下的值

Object.values(document.querySelector("#main-tabs"))[1].children._owner.stateNode.props.MainStore.BuildingsStore.buildings

我这里确认是第12项(首项是0)所以

Object.values(document.querySelector("#main-tabs"))[1].children._owner.stateNode.props.MainStore.BuildingsStore.buildings[11].gen[0].value=10;


也可用军事学院military_academy,顺便加点兵种加成

改居民数量可用普通房屋common_house,宅邸mansion


--修改建筑资源要求=>修改building[xx].req

一个快速修改资源倍率的法子:

let s=Object.values(document.querySelector("#main-tabs"))[1].children._owner.stateNode.props.MainStore.BuildingsStore.buildings; for(i=0;i<s.length;i++){s[i].req.forEach(function(e){e.multi=1});}

对新增加的建筑无效(再打一次)

--4结束------------




20230815 有新的再加

文章评论

共有0条评论来说两句吧...