Re: [分享] 放置-放置動物園2(Incremental Zoo ll)
看板Little-Games (小遊戲)作者meblessme (老窮病懶臭廢肥宅)時間11年前 (2014/10/14 07:58)推噓8(8推 0噓 56→)留言64則, 7人參與討論串2/2 (看更多)
※ 引述《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--;
}
if (dead === 1) {
document.getElementById(idOwn).style.color = "#a44";
IZ.Zoo.total--;
IZ.Zoo.animals[i].dead++;
}
}
IZ.updatePopulation(i);
IZ.updateBirthRate(i);
IZ.updateDeathRate(i);
IZ.updateTooltip(i);
if (IZ.Zoo.animals[i].own === IZ.Zoo.animals[i].maxPop) {
var fine = Math.random() * 100000;
if (Math.floor(fine) === 12345) {
IZ.getFined();
}
}
}
// offers
if (IZ.Zoo.offerNext === 0) {
var random = Math.round(Math.random() * 111);
IZ.Zoo.offerNext = IZ.Zoo.time + 111 + random;
}
if (IZ.Zoo.time >= IZ.Zoo.offerNext && IZ.Zoo.offerActive === 0) {
if (IZ.Zoo.animals[0].own === 0 || IZ.Zoo.animals[1].own === 0) {
IZ.Zoo.offerNext = 0;
} else {
//create offer
for (i=IZ.Zoo.animals.length-1; i>0; i--) {
if (IZ.Zoo.animals[i].own > 0) {
var getSpecies = i;
var giveSpecies = i-1;
break;
}
}
var getNumber = Math.ceil(Math.random() * 10);
if (IZ.Zoo.animals[giveSpecies].own >= 10) {
var giveNumber = Math.ceil(Math.random() * 10);
} else {
var giveNumber = Math.ceil(Math.random() *
IZ.Zoo.animals[giveSpecies].own);
}
IZ.Zoo.offerGiveSpecies = giveSpecies;
IZ.Zoo.offerGiveNumber = giveNumber;
IZ.Zoo.offerGetSpecies = getSpecies;
IZ.Zoo.offerGetNumber = getNumber;
document.getElementById("offer").innerHTML = '<h2>用' + getNumber
+ ' ' + IZ.animals[getSpecies].plural + '<br>交换<br>' + giveNumber + ' ' +
IZ.animals[giveSpecies].plural + '</h2>';
document.getElementById("offerContainer").style.display =
"inline";
IZ.Zoo.offerActive = 1;
}
}
document.getElementById("animalsTitle").innerHTML = "<h2>动物 (" +
IZ.Zoo.total + ")</h2>";
document.getElementById("badgesTitle").innerHTML = "<h2>成就 (" +
IZ.Zoo.badges.length + ") <span style='font-size:10px'>(点击更新
)</span></h2>";
for (var i=0; i<IZ.Zoo.animals.length; i++) {
if (IZ.Zoo.animals[i].own > IZ.Zoo.animals[i].maxOwn) {
IZ.Zoo.animals[i].maxOwn = IZ.Zoo.animals[i].own;
}
}
if (IZ.Zoo.total > IZ.Zoo.maxTotal) {
IZ.Zoo.maxTotal = IZ.Zoo.total;
}
}, 100);
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 61.64.180.10
※ 文章網址: http://www.ptt.cc/bbs/Little-Games/M.1413244685.A.C41.html
※ 編輯: meblessme (61.64.180.10), 10/14/2014 08:12:30
→
10/14 14:06, , 1F
10/14 14:06, 1F
→
10/14 14:13, , 2F
10/14 14:13, 2F
→
10/14 15:58, , 3F
10/14 15:58, 3F
→
10/14 15:58, , 4F
10/14 15:58, 4F
→
10/14 15:59, , 5F
10/14 15:59, 5F
推
10/14 16:17, , 6F
10/14 16:17, 6F
→
10/14 16:38, , 7F
10/14 16:38, 7F
→
10/14 16:38, , 8F
10/14 16:38, 8F
→
10/14 17:25, , 9F
10/14 17:25, 9F
→
10/14 17:27, , 10F
10/14 17:27, 10F
→
10/14 17:41, , 11F
10/14 17:41, 11F
→
10/14 17:42, , 12F
10/14 17:42, 12F
→
10/14 17:42, , 13F
10/14 17:42, 13F
→
10/14 17:42, , 14F
10/14 17:42, 14F
→
10/14 17:43, , 15F
10/14 17:43, 15F
→
10/14 17:45, , 16F
10/14 17:45, 16F
推
10/14 17:45, , 17F
10/14 17:45, 17F
→
10/14 17:45, , 18F
10/14 17:45, 18F
→
10/14 17:45, , 19F
10/14 17:45, 19F
→
10/14 17:47, , 20F
10/14 17:47, 20F
→
10/14 17:47, , 21F
10/14 17:47, 21F
→
10/14 17:48, , 22F
10/14 17:48, 22F
推
10/14 17:48, , 23F
10/14 17:48, 23F
→
10/14 17:49, , 24F
10/14 17:49, 24F
→
10/14 17:49, , 25F
10/14 17:49, 25F
→
10/14 17:50, , 26F
10/14 17:50, 26F
→
10/14 17:50, , 27F
10/14 17:50, 27F
→
10/14 17:50, , 28F
10/14 17:50, 28F
→
10/14 17:50, , 29F
10/14 17:50, 29F
→
10/14 17:51, , 30F
10/14 17:51, 30F
→
10/14 17:51, , 31F
10/14 17:51, 31F
→
10/14 17:51, , 32F
10/14 17:51, 32F
→
10/14 17:52, , 33F
10/14 17:52, 33F
→
10/14 17:52, , 34F
10/14 17:52, 34F
→
10/14 17:53, , 35F
10/14 17:53, 35F
→
10/14 17:54, , 36F
10/14 17:54, 36F
→
10/14 17:54, , 37F
10/14 17:54, 37F
→
10/14 17:54, , 38F
10/14 17:54, 38F
→
10/14 17:55, , 39F
10/14 17:55, 39F
→
10/14 17:55, , 40F
10/14 17:55, 40F
→
10/14 17:56, , 41F
10/14 17:56, 41F
推
10/14 17:58, , 42F
10/14 17:58, 42F
→
10/14 18:00, , 43F
10/14 18:00, 43F
推
10/14 18:00, , 44F
10/14 18:00, 44F
→
10/14 18:01, , 45F
10/14 18:01, 45F
→
10/14 18:02, , 46F
10/14 18:02, 46F
→
10/14 18:02, , 47F
10/14 18:02, 47F
→
10/14 18:03, , 48F
10/14 18:03, 48F
→
10/14 18:10, , 49F
10/14 18:10, 49F
推
10/14 18:14, , 50F
10/14 18:14, 50F
→
10/14 18:17, , 51F
10/14 18:17, 51F
→
10/14 18:21, , 52F
10/14 18:21, 52F
→
10/14 18:23, , 53F
10/14 18:23, 53F
→
10/14 18:23, , 54F
10/14 18:23, 54F
推
10/14 19:57, , 55F
10/14 19:57, 55F
→
10/14 19:58, , 56F
10/14 19:58, 56F
→
10/14 19:58, , 57F
10/14 19:58, 57F
→
10/14 19:59, , 58F
10/14 19:59, 58F
→
10/14 20:00, , 59F
10/14 20:00, 59F
→
10/14 20:00, , 60F
10/14 20:00, 60F
→
10/14 20:33, , 61F
10/14 20:33, 61F
→
10/14 20:33, , 62F
10/14 20:33, 62F
推
10/15 01:35, , 63F
10/15 01:35, 63F
→
10/15 01:35, , 64F
10/15 01:35, 64F
討論串 (同標題文章)
完整討論串 (本文為第 2 之 2 篇):
Little-Games 近期熱門文章
PTT遊戲區 即時熱門文章
55
64
225
279