浏览代码

Melting pulls in prey from paws/socks/shoes. Fixed solidifying not removing prey from the goo container.

tags/v0.7.0
Fen Dweller 7 年前
父节点
当前提交
f0d991ef74
共有 2 个文件被更改,包括 31 次插入9 次删除
  1. +25
    -8
      game.js
  2. +6
    -1
      recursive-desc.js

+ 25
- 8
game.js 查看文件

@@ -893,8 +893,8 @@ let macro =
} }
}, },


"shoeTrapped": [],
"sockTrapped": [],
"shoeTrapped": new Container(),
"sockTrapped": new Container(),


"shoe": { "shoe": {
"name": "shoe", "name": "shoe",
@@ -2750,7 +2750,7 @@ function wear_shoes() {
footwearUpdate(); footwearUpdate();


macro.paws.container = macro.shoeTrapped; macro.paws.container = macro.shoeTrapped;
macro.shoeTrapped = [];
macro.shoeTrapped = new Container();


update([line,summary,newline]); update([line,summary,newline]);
} }
@@ -2779,7 +2779,7 @@ function wear_socks() {
macro.footSockWorn = true; macro.footSockWorn = true;


macro.paws.container = macro.sockTrapped; macro.paws.container = macro.sockTrapped;
macro.sockTrapped = [];
macro.sockTrapped = new Container();


footwearUpdate(); footwearUpdate();


@@ -2990,7 +2990,22 @@ function melt()


gooButtons(macro.gooMolten); gooButtons(macro.gooMolten);


let line = describe("melt", new Container(), macro, verbose);
let prey = new Container();

prey = prey.merge(macro.paws.container);
macro.paws.container = new Container();

if (macro.footSockWorn) {
prey = prey.merge(macro.sock.container);
macro.sock.container = new Container();
} else if (macro.footShoeWorn) {
prey = prey.merge(macro.shoe.container);
macro.shoe.container = new Container();
}

let line = describe("melt", prey, macro, verbose);

macro.goo.feed(prey);


update([line, newline]); update([line, newline]);
} }
@@ -3002,9 +3017,11 @@ function solidify()
gooButtons(macro.gooMolten); gooButtons(macro.gooMolten);


let prey = new Container(); let prey = new Container();
macro.goo.contents.forEach(function(x) {
prey = prey.merge(x);
});

for (let i=0; i < macro.goo.contents.length; i++) {
prey = prey.merge(macro.goo.contents[i]);
macro.goo.contents[i] = new Container();
}


let line = describe("solidify", prey, macro, verbose); let line = describe("solidify", prey, macro, verbose);




+ 6
- 1
recursive-desc.js 查看文件

@@ -768,7 +768,12 @@ function defaultScat(container, macro, verbose) {
} }


function defaultMelt(container, macro, verbose) { function defaultMelt(container, macro, verbose) {
return "Your body turns gooey.";
if (container.count == 0) {
return "Your body turns gooey.";
} else {
return "Your body turns gooey, sucking " + container.describe(false) + " into your molten self.";
}

} }


function defaultSolidify(container, macro, verbose) { function defaultSolidify(container, macro, verbose) {


正在加载...
取消
保存