File tree Expand file tree Collapse file tree 1 file changed +7
-17
lines changed
Expand file tree Collapse file tree 1 file changed +7
-17
lines changed Original file line number Diff line number Diff line change @@ -543,24 +543,14 @@ export class GlobalState {
543543 let inputName = Object . keys ( recipe [ "原料" ] ) [ 0 ] ;
544544 let inputCount = Object . values ( recipe [ "原料" ] ) [ 0 ] ;
545545 let outputCount = Object . values ( recipe [ "产物" ] ) [ 0 ] ;
546- // 如果想减少原料,执行下面的代码,但是这样会导致增产剂计算有问题
547- // if (inputCount > outputCount) {
548- // recipe["原料"][inputName] -= outputCount;
549- // } else if (inputCount === outputCount) {
550- // delete recipe["原料"][inputName];
551- // } else {
552- // delete recipe["原料"][inputName];
553- // if (recipe["产物"][inputName] === undefined) {
554- // recipe["产物"][inputName] = outputCount - inputCount;
555- // } else {
556- // recipe["产物"][inputName] += outputCount - inputCount;
557- // }
558- // }
559- // 如果想增加产物,执行下面的代码
560- if ( recipe [ "产物" ] [ inputName ] === undefined ) {
561- recipe [ "产物" ] [ inputName ] = outputCount ;
546+ //蓝buff有两个特性:
547+ //1.新增加的物品会直接填充到第一个格子里面,并且增产点数按照4点进行补充
548+ //2.如果第一个格子已满,则不再回填物品
549+ //3.由于游戏本身特性,低增产点数的物品会先被消耗,所以即使无增产剂,第一个格子也会逐渐变为平均4点增产
550+ if ( inputCount > outputCount ) {
551+ recipe [ "原料" ] [ inputName ] -= outputCount ;
562552 } else {
563- recipe [ "产物 " ] [ inputName ] += outputCount ;
553+ delete recipe [ "原料 " ] [ inputName ] ;
564554 }
565555 }
566556 }
You can’t perform that action at this time.
0 commit comments