作者enthos (影斯)
看板Ikariam
標題[心得] 0.3.0 town wall 公式
時間Mon Dec 8 00:42:25 2008
木 = 上一級所需的木 * 1.2 + 225
石 = 上一級所需的木 * 1.2 + 273
誤差 1
應用: 城牆 26 級必建,城牆 27 級先建的話,會賺不少石損失一些木。
假設節省成本的 Carpenter 25 級, 0.3.0 的 28 級城牆只比目前多花一萬石,
但節省很多木。
城牆 29 級及以後的等級是 0.3.0 較便宜。
http://ikariam.wikia.com/wiki/Patch_0.3.0/Town_Wall
http://ikariam.wikia.com/wiki/Town_wall
http://ikariam.wikia.com/wiki/Patch_0.3.0/Warehouse
(warehouse: * 1.2 + 96)
/*
ikariam 3.0 wall (warehouse * 1.2 + 96)
wood:
(L-1 wood) * 1.2 + 225
stone:
(L-1 stone) * 1.2 + 273
lv 1: wood 114
lv 2: wood 361, stone 203
gcc -o 30wallfix2.bin 30wallfix2.c -lm; ./30wallfix2.bin
*/
#include <stdio.h>
#include <math.h>
int main(int argc, char **argv)
{
int i;
double wood[100];
double stone[100];
i = 1; wood[i] = 114.0; stone[i] = 0.0;
i = 2; wood[i] = 361.0; stone[i] = 203.0;
i = 24; wood[i] = 80629.0; stone[i] = 85144.0;
for(i=25; i<50; i++) {
wood[i] = wood[i-1] * 1.2 + 225.0;
stone[i] = stone[i-1] * 1.2 + 273.0;
}
for(i=24; i<50; i++)
printf("Level %d wall need wood %d, stone %d\n",
i, (int)wood[i], (int)stone[i]);
}
/*
gcc -o 30wallfix2.bin 30wallfix2.c -lm; ./30wallfix2.bin
Level 24 wall need wood 80629, stone 85144
Level 25 wall need wood 96979, stone 102445
Level 26 wall need wood 116600, stone 123207
Level 27 wall need wood 140145, stone 148122
Level 28 wall need wood 168400, stone 178020
Level 29 wall need wood 202305, stone 213897
Level 30 wall need wood 242991, stone 256949
Level 31 wall need wood 291814, stone 308612
Level 32 wall need wood 350402, stone 370607
Level 33 wall need wood 420707, stone 445002
Level 34 wall need wood 505074, stone 534275
Level 35 wall need wood 606314, stone 641404
Level 36 wall need wood 727801, stone 769957
Level 37 wall need wood 873587, stone 924222
Level 38 wall need wood 1048529, stone 1109340
Level 39 wall need wood 1258460, stone 1331481
Level 40 wall need wood 1510377, stone 1598050
Level 41 wall need wood 1812678, stone 1917933
Level 42 wall need wood 2175438, stone 2301792
Level 43 wall need wood 2610751, stone 2762424
Level 44 wall need wood 3133127, stone 3315182
Level 45 wall need wood 3759977, stone 3978491
Level 46 wall need wood 4512198, stone 4774463
Level 47 wall need wood 5414862, stone 5729628
Level 48 wall need wood 6498060, stone 6875827
Level 49 wall need wood 7797897, stone 8251266
*/
數值是從 wiki 中的資料推導出的。不過誤差 1 的部分
目前找不到正確的推算方式。
如果從 Level 1 開始計算的話,很快就會有 1% 的誤差。
但是如果依照系統資料每一級更正的話,誤差就只有 1。
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.113.22.98
推 twsoriano:3.0城牆bug有部分修正 威力大減 不懂幹麻還要變貴... 12/08 01:04
推 wope:我論這篇被M的實力 12/08 01:16