Re: [分享] 放置-放置動物園2(Incremental Zoo ll)

作者: meblessme (地球太可怕我要回火星)   2014-10-14 07:57:59
※ 引述《meblessme (老窮病懶臭廢肥宅)》之銘言:
動物全部的順序是
貓鼬-孔雀-變色龍-海狸-火烈鳥-水獺-企鵝-蛇-海龜-貘-鱷魚-猴子-海豹-袋鼠-食蟻獸-
鷹-霍加皮-鴕鳥-羚羊-斑馬-禿鷲-狼-捷豹-熊-河馬-老虎-長頸鹿-鯊魚-犀牛-猩猩-獅子-
大象-熊貓-海豚-殺人鯨
以下是控制碼 複製後 貼到控制台(Chrome是f12)
的console(可以直接按ctrl+v貼上)
可以十倍加速遊戲
IZ.loop = setInterval( function() {
// charge interest on debt every ten seconds. Also, save
IZ.Zoo.interestCounter++;
if (IZ.Zoo.interestCounter === 10) {
IZ.Zoo.interestCounter = 0;
var interest = Math.pow((IZ.Zoo.debt), IZ.Zoo.interestRate);
IZ.Zoo.debt = interest;
IZ.updateMoney();
localStorage['IZIIGameSave'] = btoa(JSON.stringify(IZ.Zoo));
}
// let visitors in
IZ.Zoo.visitorsCounter++;
if (IZ.Zoo.visitorsCounter >= IZ.Zoo.visitorsTime && IZ.Zoo.visitorsTotal
> 0) {
var species = 0;
for (i=0; i<IZ.Zoo.animals.length; i++) {
if (IZ.Zoo.animals[i].own > 0) {
species++;
}
}
IZ.Zoo.visitorsCounter = 0;
IZ.Zoo.money += (IZ.Zoo.visitorsTotal * species);
IZ.updateMoney();
if (IZ.Zoo.visitorsLog === 0) {
log = "<strong>* 你的动物园迎来第1位访客!</strong>";
IZ.addToLog(log);
IZ.Zoo.visitorsLog = 1;
}
}
var id;
var slot;
var next;
// display new animals over time
IZ.Zoo.time++;
for (var i=IZ.Zoo.speciesShown; i<IZ.Zoo.animals.length; i++) {
if (IZ.Zoo.time >= IZ.animals[i].wait) {
id = IZ.Zoo.animals[i].id;
slot = "animal" + id;
IZ.Zoo.speciesShown = i + 1;
document.getElementById(slot).style.display = "inherit";
slot = "br" + id;
document.getElementById(slot).style.display = "inline-block";
slot = "dr" + id;
document.getElementById(slot).style.display = "inline-block";
slot = "bs" + id;
document.getElementById(slot).style.display = "inline-block";
slot = "en" + id;
document.getElementById(slot).style.display = "inline-block";
var log = "* <strong>你发现了" + IZ.animals[i].plural +
"!</strong> " + IZ.animals[i].quote;
IZ.addToLog(log);
}
}
for (var i=0; i<IZ.Zoo.animals.length; i++) {
if (IZ.Zoo.time >= IZ.animals[i].wait) {
next = IZ.animals[i+1].wait - IZ.Zoo.time;
if (IZ.Zoo.speciesShown < 35) {
var time = IZ.Zoo.timeSecs;
time = time.toString().replace(/B(?=(d{3})+(?!d))/g, ",");
var price = IZ.numToString(IZ.Zoo.timePrice);
document.getElementById("buyTime").innerHTML = '<div
id="buyTime" onclick="IZ.buyTime()"><h3>减少等待时间' + time + '秒,需要$' +
price + '</h3></div>'
next = next.toString().replace(/B(?=(d{3})+(?!d))/g, ",");
document.getElementById("next").innerHTML = '<h2>新物种在' +
next + '秒后出现</h2>';
} else {
document.getElementById("next").innerHTML = '<h2>你已经发现了
所有的物种!</h2>';
document.getElementById("buyTime").innerHTML = '';
}
}
}
// births and deaths
for (var i=0; i<IZ.Zoo.animals.length; i++) {
if (IZ.Zoo.animals[i].own >= IZ.Zoo.animals[i].maxPop) {
IZ.Zoo.animals[i].own = IZ.Zoo.animals[i].maxPop;
var id = "own" + i;
IZ.updatePopulation(i);
document.getElementById(id).style.color = "#f00";
}
var idOwn = "own" + i;
var newborn = 0;
var dead = 0;
document.getElementById(idOwn).style.color = "#000";
if (IZ.Zoo.animals[i].own > 1 && IZ.Zoo.animals[i].own <
IZ.Zoo.animals[i].maxPop) {
rnd = Math.random() * (IZ.Zoo.animals[i].own +
(IZ.Zoo.animals[i].birthRate));
if (rnd <= IZ.Zoo.animals[i].own) {
newborn = 1;
IZ.Zoo.animals[i].own++;
}
if (newborn === 1) {
if (IZ.Zoo.animals[i].own >= IZ.Zoo.animals[i].maxPop) {
IZ.Zoo.animals[i].own = IZ.Zoo.animals[i].maxPop;
document.getElementById(idOwn).style.color = "#f00";
} else {
document.getElementById(idOwn).style.color = "#484";
}
IZ.Zoo.total++;
IZ.Zoo.animals[i].born++;
}
rnd = Math.random() * (IZ.Zoo.animals[i].own * 2 +
(IZ.Zoo.animals[i].deathRate));
if (rnd <= IZ.Zoo.animals[i].own) {
dead = 1;
IZ.Zoo.animals[i].own
作者: austin751229 (Austin)   2014-10-14 17:25:00
負債? 不是一開始那幾十塊 還是這遊戲要不斷借錢靠賣動物的錢 到買企鵝都還能撐住

Links booklink

Contact Us: admin [ a t ] ucptt.com