一直在玩一个小游戏叫像素地牢00-Evan/shattered-pixel-dungeon,Roguelike的,是个开源游戏,奈何太坐牢,通关很少。
因为是个开源游戏,所以有众多修改版,但去网上找也找不到我想要的轻度修改版本。干脆去fork了源码,自己改。Android开发是一窍不通,跟ChatGPT聊完知道应该改哪部分文件,把升级卷轴和力量药剂的生成数量加了一些
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
| public static boolean souNeeded() { int souLeftThisSet; souLeftThisSet = 3 - (LimitedDrops.UPGRADE_SCROLLS.count - (depth / 5) * 3); if (souLeftThisSet <= 0) return false;
int floorThisSet = (depth % 5); return Random.Int(5 - floorThisSet) < souLeftThisSet; }
public static boolean posNeeded() { int posLeftThisSet = 8 - (LimitedDropsSTREN.GTH_POTIONS.count - (depth / 5) * 4); if (posLeftThisSet <= 0) return false;
int floorThisSet = (depth % 5);
int targetPOSLeft = 4 - floorThisSet / 2; if (floorThisSet % 2 == 1 && Random.Int(2) == 0) targetPOSLeft--;
return targetPOSLeft < posLeftThisSet; }
|
怕增加的掉落数量占据物品池,又把整个物品池加了一点。
1 2 3 4 5 6 7
| protected void createItems() { int nItems = 3 + Random.chances(new float[]{6, 3, 1});
if (feeling == Feeling.LARGE){ nItems += 2; }
|
改好了在GitHub上用Actions打包,拿来自己玩。
文件暂存诺诺网盘