new file: css/main.css
new file: hako-main.cgi new file: hako-map.cgi new file: hako-mente.cgi new file: hako-readme.txt new file: hako-top.cgi new file: hako-turn.cgi new file: images/black.gif new file: images/f02.gif new file: images/hakoniwa.gif new file: images/land0.gif new file: images/land1.gif new file: images/land10.gif new file: images/land11.gif new file: images/land12.gif new file: images/land13.gif new file: images/land14.gif new file: images/land15.gif new file: images/land16.gif new file: images/land2.gif new file: images/land3.gif new file: images/land4.gif new file: images/land5.gif new file: images/land6.gif new file: images/land7.gif new file: images/land8.gif new file: images/land9.gif new file: images/monster0.gif new file: images/monster1.gif new file: images/monster2.gif new file: images/monster3.gif new file: images/monster4.gif new file: images/monster5.gif new file: images/monster6.gif new file: images/monster7.gif new file: images/monster8.gif new file: images/monument0.gif new file: images/monument1.gif new file: images/monument2.gif new file: images/prize0.gif new file: images/prize1.gif new file: images/prize10.gif new file: images/prize11.gif new file: images/prize2.gif new file: images/prize3.gif new file: images/prize4.gif new file: images/prize5.gif new file: images/prize6.gif new file: images/prize7.gif new file: images/prize8.gif new file: images/prize9.gif new file: images/space.gif new file: images/space0.gif new file: images/space1.gif new file: images/space10.gif new file: images/space11.gif new file: images/space2.gif new file: images/space3.gif new file: images/space4.gif new file: images/space5.gif new file: images/space6.gif new file: images/space7.gif new file: images/space8.gif new file: images/space9.gif new file: images/spacep.gif new file: images/xbar.gif new file: jcode.pl new file: manual/advanced.html new file: manual/beginner.html new file: manual/intermediate.html new file: manual/man-discovered.png new file: manual/man-goto.png new file: manual/man-listed.png new file: manual/man-name.png new file: manual/man-new.png new file: manual/man-owner.png new file: manual/man-ownerm.png new file: manual/man-register.png new file: manual/man-tourist.png
74
css/main.css
Normal file
|
@ -0,0 +1,74 @@
|
|||
form {
|
||||
margin: 8px 0;
|
||||
}
|
||||
|
||||
.tableContainer {
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
input,
|
||||
select {
|
||||
/* font-family: "MS UI Gothic", "MS PGothic", IPAMonaPGothic, Monapo, Mona, submona, sans-serif; */
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
/* textarea {
|
||||
font-family: "MS Gothic", IPAMonaGothic, monospace;
|
||||
} */
|
||||
|
||||
#message,
|
||||
#lbbsmessage {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
#planDevPlan,
|
||||
#planTarget {
|
||||
max-width: 11em;
|
||||
}
|
||||
|
||||
/* @media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
color-scheme: dark;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: inherit;
|
||||
}
|
||||
|
||||
font[color="#8888ff"] {
|
||||
color: #6666cc;
|
||||
}
|
||||
|
||||
font[color="#4444ff"] {
|
||||
color: #9999ff;
|
||||
}
|
||||
|
||||
th[bgcolor="#ccffcc"],
|
||||
td[bgcolor="#ccffcc"] {
|
||||
background-color: #111111;
|
||||
}
|
||||
|
||||
td[bgcolor="#ccffff"] {
|
||||
background-color: #333333;
|
||||
}
|
||||
|
||||
font[color="#0000ff"] {
|
||||
color: #9999ff;
|
||||
}
|
||||
|
||||
font[color="#c00000"] {
|
||||
color: #ee9999;
|
||||
}
|
||||
|
||||
font[color="#a06040"] {
|
||||
color: #cc9966;
|
||||
}
|
||||
|
||||
font[color="#800000"] {
|
||||
color: #ff3333;
|
||||
}
|
||||
|
||||
font[color="#ff0000"] {
|
||||
color: #ff6666;
|
||||
}
|
||||
} */
|
1613
hako-main.cgi
Normal file
978
hako-map.cgi
Normal file
|
@ -0,0 +1,978 @@
|
|||
#----------------------------------------------------------------------
|
||||
# 箱庭諸島 ver2.30
|
||||
# 地図モードモジュール(ver1.00)
|
||||
# 使用条件、使用方法等は、hako-readme.txtファイルを参照
|
||||
#
|
||||
# 箱庭諸島のページ: http://www.bekkoame.ne.jp/~tokuoka/hakoniwa.html
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# 観光モード
|
||||
#----------------------------------------------------------------------
|
||||
# メイン
|
||||
sub printIslandMain {
|
||||
# 開放
|
||||
unlock();
|
||||
|
||||
# idから島番号を取得
|
||||
$HcurrentNumber = $HidToNumber{$HcurrentID};
|
||||
|
||||
# なぜかその島がない場合
|
||||
if($HcurrentNumber eq '') {
|
||||
tempProblem();
|
||||
return;
|
||||
}
|
||||
|
||||
# 名前の取得
|
||||
$HcurrentName = $Hislands[$HcurrentNumber]->{'name'};
|
||||
|
||||
# 観光画面
|
||||
tempPrintIslandHead(); # ようこそ!!
|
||||
islandInfo(); # 島の情報
|
||||
islandMap(0); # 島の地図、観光モード
|
||||
|
||||
# ○○島ローカル掲示板
|
||||
if($HuseLbbs) {
|
||||
tempLbbsHead(); # ローカル掲示板
|
||||
tempLbbsInput(); # 書き込みフォーム
|
||||
tempLbbsContents(); # 掲示板内容
|
||||
}
|
||||
|
||||
# 近況
|
||||
tempRecent(0);
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# 開発モード
|
||||
#----------------------------------------------------------------------
|
||||
# メイン
|
||||
sub ownerMain {
|
||||
# 開放
|
||||
unlock();
|
||||
|
||||
# モードを明示
|
||||
$HmainMode = 'owner';
|
||||
|
||||
# idから島を取得
|
||||
$HcurrentNumber = $HidToNumber{$HcurrentID};
|
||||
my($island) = $Hislands[$HcurrentNumber];
|
||||
$HcurrentName = $island->{'name'};
|
||||
|
||||
# パスワード
|
||||
if(!checkPassword($island->{'password'},$HinputPassword)) {
|
||||
# password間違い
|
||||
tempWrongPassword();
|
||||
return;
|
||||
}
|
||||
|
||||
# 開発画面
|
||||
tempOwner(); # 「開発計画」
|
||||
|
||||
# ○○島ローカル掲示板
|
||||
if($HuseLbbs) {
|
||||
tempLbbsHead(); # ローカル掲示板
|
||||
tempLbbsInputOW(); # 書き込みフォーム
|
||||
tempLbbsContents(); # 掲示板内容
|
||||
}
|
||||
|
||||
# 近況
|
||||
tempRecent(1);
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# コマンドモード
|
||||
#----------------------------------------------------------------------
|
||||
# メイン
|
||||
sub commandMain {
|
||||
# idから島を取得
|
||||
$HcurrentNumber = $HidToNumber{$HcurrentID};
|
||||
my($island) = $Hislands[$HcurrentNumber];
|
||||
$HcurrentName = $island->{'name'};
|
||||
|
||||
# パスワード
|
||||
if(!checkPassword($island->{'password'},$HinputPassword)) {
|
||||
# password間違い
|
||||
unlock();
|
||||
tempWrongPassword();
|
||||
return;
|
||||
}
|
||||
|
||||
# モードで分岐
|
||||
my($command) = $island->{'command'};
|
||||
|
||||
if($HcommandMode eq 'delete') {
|
||||
slideFront($command, $HcommandPlanNumber);
|
||||
tempCommandDelete();
|
||||
} elsif(($HcommandKind == $HcomAutoPrepare) ||
|
||||
($HcommandKind == $HcomAutoPrepare2)) {
|
||||
# フル整地、フル地ならし
|
||||
# 座標配列を作る
|
||||
makeRandomPointArray();
|
||||
my($land) = $island->{'land'};
|
||||
|
||||
# コマンドの種類決定
|
||||
my($kind) = $HcomPrepare;
|
||||
if($HcommandKind == $HcomAutoPrepare2) {
|
||||
$kind = $HcomPrepare2;
|
||||
}
|
||||
|
||||
my($i) = 0;
|
||||
my($j) = 0;
|
||||
while(($j < $HpointNumber) && ($i < $HcommandMax)) {
|
||||
my($x) = $Hrpx[$j];
|
||||
my($y) = $Hrpy[$j];
|
||||
if($land->[$x][$y] == $HlandWaste) {
|
||||
slideBack($command, $HcommandPlanNumber);
|
||||
$command->[$HcommandPlanNumber] = {
|
||||
'kind' => $kind,
|
||||
'target' => 0,
|
||||
'x' => $x,
|
||||
'y' => $y,
|
||||
'arg' => 0
|
||||
};
|
||||
$i++;
|
||||
}
|
||||
$j++;
|
||||
}
|
||||
tempCommandAdd();
|
||||
} elsif($HcommandKind == $HcomAutoDelete) {
|
||||
# 全消し
|
||||
my($i);
|
||||
for($i = 0; $i < $HcommandMax; $i++) {
|
||||
slideFront($command, $HcommandPlanNumber);
|
||||
}
|
||||
tempCommandDelete();
|
||||
} else {
|
||||
if($HcommandMode eq 'insert') {
|
||||
slideBack($command, $HcommandPlanNumber);
|
||||
}
|
||||
tempCommandAdd();
|
||||
# コマンドを登録
|
||||
$command->[$HcommandPlanNumber] = {
|
||||
'kind' => $HcommandKind,
|
||||
'target' => $HcommandTarget,
|
||||
'x' => $HcommandX,
|
||||
'y' => $HcommandY,
|
||||
'arg' => $HcommandArg
|
||||
};
|
||||
}
|
||||
|
||||
# データの書き出し
|
||||
writeIslandsFile($HcurrentID);
|
||||
|
||||
# owner modeへ
|
||||
ownerMain();
|
||||
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# コメント入力モード
|
||||
#----------------------------------------------------------------------
|
||||
# メイン
|
||||
sub commentMain {
|
||||
# idから島を取得
|
||||
$HcurrentNumber = $HidToNumber{$HcurrentID};
|
||||
my($island) = $Hislands[$HcurrentNumber];
|
||||
$HcurrentName = $island->{'name'};
|
||||
|
||||
# パスワード
|
||||
if(!checkPassword($island->{'password'},$HinputPassword)) {
|
||||
# password間違い
|
||||
unlock();
|
||||
tempWrongPassword();
|
||||
return;
|
||||
}
|
||||
|
||||
# メッセージを更新
|
||||
$island->{'comment'} = htmlEscape($Hmessage);
|
||||
|
||||
# データの書き出し
|
||||
writeIslandsFile($HcurrentID);
|
||||
|
||||
# コメント更新メッセージ
|
||||
tempComment();
|
||||
|
||||
# owner modeへ
|
||||
ownerMain();
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# ローカル掲示板モード
|
||||
#----------------------------------------------------------------------
|
||||
# メイン
|
||||
|
||||
sub localBbsMain {
|
||||
# idから島番号を取得
|
||||
$HcurrentNumber = $HidToNumber{$HcurrentID};
|
||||
my($island) = $Hislands[$HcurrentNumber];
|
||||
|
||||
# なぜかその島がない場合
|
||||
if($HcurrentNumber eq '') {
|
||||
unlock();
|
||||
tempProblem();
|
||||
return;
|
||||
}
|
||||
|
||||
# 削除モードじゃなくて名前かメッセージがない場合
|
||||
if($HlbbsMode != 2) {
|
||||
if(($HlbbsName eq '') || ($HlbbsName eq '')) {
|
||||
unlock();
|
||||
tempLbbsNoMessage();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
# 観光者モードじゃない時はパスワードチェック
|
||||
if($HlbbsMode != 0) {
|
||||
if(!checkPassword($island->{'password'},$HinputPassword)) {
|
||||
# password間違い
|
||||
unlock();
|
||||
tempWrongPassword();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
my($lbbs);
|
||||
$lbbs = $island->{'lbbs'};
|
||||
|
||||
# モードで分岐
|
||||
if($HlbbsMode == 2) {
|
||||
# 削除モード
|
||||
# メッセージを前にずらす
|
||||
slideBackLbbsMessage($lbbs, $HcommandPlanNumber);
|
||||
tempLbbsDelete();
|
||||
} else {
|
||||
# 記帳モード
|
||||
# メッセージを後ろにずらす
|
||||
slideLbbsMessage($lbbs);
|
||||
|
||||
# メッセージ書き込み
|
||||
my($message);
|
||||
if($HlbbsMode == 0) {
|
||||
$message = '0';
|
||||
} else {
|
||||
$message = '1';
|
||||
}
|
||||
$HlbbsName = "$HislandTurn: " . htmlEscape($HlbbsName);
|
||||
$HlbbsMessage = htmlEscape($HlbbsMessage);
|
||||
$lbbs->[0] = "$message>$HlbbsName>$HlbbsMessage";
|
||||
|
||||
tempLbbsAdd();
|
||||
}
|
||||
|
||||
# データ書き出し
|
||||
writeIslandsFile($HcurrentID);
|
||||
|
||||
# もとのモードへ
|
||||
if($HlbbsMode == 0) {
|
||||
printIslandMain();
|
||||
} else {
|
||||
ownerMain();
|
||||
}
|
||||
}
|
||||
|
||||
# ローカル掲示板のメッセージを一つ後ろにずらす
|
||||
sub slideLbbsMessage {
|
||||
my($lbbs) = @_;
|
||||
my($i);
|
||||
# pop(@$lbbs);
|
||||
# push(@$lbbs, $lbbs->[0]);
|
||||
pop(@$lbbs);
|
||||
unshift(@$lbbs, $lbbs->[0]);
|
||||
}
|
||||
|
||||
# ローカル掲示板のメッセージを一つ前にずらす
|
||||
sub slideBackLbbsMessage {
|
||||
my($lbbs, $number) = @_;
|
||||
my($i);
|
||||
splice(@$lbbs, $number, 1);
|
||||
$lbbs->[$HlbbsMax - 1] = '0>>';
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# 島の地図
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
# 情報の表示
|
||||
sub islandInfo {
|
||||
my($island) = $Hislands[$HcurrentNumber];
|
||||
# 情報表示
|
||||
my($rank) = $HcurrentNumber + 1;
|
||||
my($farm) = $island->{'farm'};
|
||||
my($factory) = $island->{'factory'};
|
||||
my($mountain) = $island->{'mountain'};
|
||||
$farm = ($farm == 0) ? "None owned" : "${farm}0$HunitPop";
|
||||
$factory = ($factory == 0) ? "None owned" : "${factory}0$HunitPop";
|
||||
$mountain = ($mountain == 0) ? "None owned" : "${mountain}0$HunitPop";
|
||||
|
||||
my($mStr1) = '';
|
||||
my($mStr2) = '';
|
||||
if(($HhideMoneyMode == 1) || ($HmainMode eq 'owner')) {
|
||||
# 無条件またはownerモード
|
||||
$mStr1 = "<TH $HbgTitleCell nowrap=nowrap><NOBR>${HtagTH_}Funds${H_tagTH}</NOBR></TH>";
|
||||
$mStr2 = "<TD $HbgInfoCell align=right nowrap=nowrap><NOBR>$island->{'money'}$HunitMoney</NOBR></TD>";
|
||||
} elsif($HhideMoneyMode == 2) {
|
||||
my($mTmp) = aboutMoney($island->{'money'});
|
||||
|
||||
# 1000億単位モード
|
||||
$mStr1 = "<TH $HbgTitleCell nowrap=nowrap><NOBR>${HtagTH_}Funds${H_tagTH}</NOBR></TH>";
|
||||
$mStr2 = "<TD $HbgInfoCell align=right nowrap=nowrap><NOBR>$mTmp</NOBR></TD>";
|
||||
}
|
||||
out(<<END);
|
||||
<CENTER>
|
||||
<div class="tableContainer"><TABLE BORDER>
|
||||
<TR>
|
||||
<TH $HbgTitleCell nowrap=nowrap><NOBR>${HtagTH_}Rank${H_tagTH}</NOBR></TH>
|
||||
<TH $HbgTitleCell nowrap=nowrap><NOBR>${HtagTH_}Population${H_tagTH}</NOBR></TH>
|
||||
$mStr1
|
||||
<TH $HbgTitleCell nowrap=nowrap><NOBR>${HtagTH_}Food${H_tagTH}</NOBR></TH>
|
||||
<TH $HbgTitleCell nowrap=nowrap><NOBR>${HtagTH_}Area${H_tagTH}</NOBR></TH>
|
||||
<TH $HbgTitleCell nowrap=nowrap><NOBR>${HtagTH_}Farms${H_tagTH}</NOBR></TH>
|
||||
<TH $HbgTitleCell nowrap=nowrap><NOBR>${HtagTH_}Factories${H_tagTH}</NOBR></TH>
|
||||
<TH $HbgTitleCell nowrap=nowrap><NOBR>${HtagTH_}Mines${H_tagTH}</NOBR></TH>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD $HbgNumberCell align=middle nowrap=nowrap><NOBR>${HtagNumber_}$rank${H_tagNumber}</NOBR></TD>
|
||||
<TD $HbgInfoCell align=right nowrap=nowrap><NOBR>$island->{'pop'}$HunitPop</NOBR></TD>
|
||||
$mStr2
|
||||
<TD $HbgInfoCell align=right nowrap=nowrap><NOBR>$island->{'food'}$HunitFood</NOBR></TD>
|
||||
<TD $HbgInfoCell align=right nowrap=nowrap><NOBR>$island->{'area'}$HunitArea</NOBR></TD>
|
||||
<TD $HbgInfoCell align=right nowrap=nowrap><NOBR>${farm}</NOBR></TD>
|
||||
<TD $HbgInfoCell align=right nowrap=nowrap><NOBR>${factory}</NOBR></TD>
|
||||
<TD $HbgInfoCell align=right nowrap=nowrap><NOBR>${mountain}</NOBR></TD>
|
||||
</TR>
|
||||
</TABLE></div></CENTER>
|
||||
END
|
||||
}
|
||||
|
||||
# 地図の表示
|
||||
# 引数が1なら、ミサイル基地等をそのまま表示
|
||||
sub islandMap {
|
||||
my($mode) = @_;
|
||||
my($island);
|
||||
$island = $Hislands[$HcurrentNumber];
|
||||
|
||||
out(<<END);
|
||||
<CENTER><div class="tableContainer"><TABLE BORDER><TR><TD>
|
||||
END
|
||||
# 地形、地形値を取得
|
||||
my($land) = $island->{'land'};
|
||||
my($landValue) = $island->{'landValue'};
|
||||
my($l, $lv);
|
||||
|
||||
# コマンド取得
|
||||
my($command) = $island->{'command'};
|
||||
my($com, @comStr, $i);
|
||||
if($HmainMode eq 'owner') {
|
||||
for($i = 0; $i < $HcommandMax; $i++) {
|
||||
my($j) = $i + 1;
|
||||
$com = $command->[$i];
|
||||
if($com->{'kind'} < 20) {
|
||||
$comStr[$com->{'x'}][$com->{'y'}] .=
|
||||
" [${j}]$HcomName[$com->{'kind'}]";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# 座標(上)を出力
|
||||
out("<IMG SRC=\"xbar.gif\" width=400 height=16><BR>");
|
||||
|
||||
# 各地形および改行を出力
|
||||
my($x, $y);
|
||||
for($y = 0; $y < $HislandSize; $y++) {
|
||||
# 偶数行目なら番号を出力
|
||||
if(($y % 2) == 0) {
|
||||
out("<IMG SRC=\"space${y}.gif\" width=16 height=32>");
|
||||
}
|
||||
|
||||
# 各地形を出力
|
||||
for($x = 0; $x < $HislandSize; $x++) {
|
||||
$l = $land->[$x][$y];
|
||||
$lv = $landValue->[$x][$y];
|
||||
landString($l, $lv, $x, $y, $mode, $comStr[$x][$y]);
|
||||
}
|
||||
|
||||
# 奇数行目なら番号を出力
|
||||
if(($y % 2) == 1) {
|
||||
out("<IMG SRC=\"space${y}.gif\" width=16 height=32>");
|
||||
}
|
||||
|
||||
# 改行を出力
|
||||
out("<BR>");
|
||||
}
|
||||
out("</TD></TR></TABLE></div></CENTER>\n");
|
||||
}
|
||||
|
||||
sub landString {
|
||||
my($l, $lv, $x, $y, $mode, $comStr) = @_;
|
||||
my($point) = "($x,$y)";
|
||||
my($image, $alt);
|
||||
|
||||
if($l == $HlandSea) {
|
||||
|
||||
if($lv == 1) {
|
||||
# 浅瀬
|
||||
$image = 'land14.gif';
|
||||
$alt = 'Sea (shallow)';
|
||||
} else {
|
||||
# 海
|
||||
$image = 'land0.gif';
|
||||
$alt = 'Sea';
|
||||
}
|
||||
} elsif($l == $HlandWaste) {
|
||||
# 荒地
|
||||
if($lv == 1) {
|
||||
$image = 'land13.gif'; # 着弾点
|
||||
$alt = 'Wasteland';
|
||||
} else {
|
||||
$image = 'land1.gif';
|
||||
$alt = 'Wasteland';
|
||||
}
|
||||
} elsif($l == $HlandPlains) {
|
||||
# 平地
|
||||
$image = 'land2.gif';
|
||||
$alt = 'Plains';
|
||||
} elsif($l == $HlandForest) {
|
||||
# 森
|
||||
if($mode == 1) {
|
||||
$image = 'land6.gif';
|
||||
$alt = "Forest (${lv}$HunitTree)";
|
||||
} else {
|
||||
# 観光者の場合は木の本数隠す
|
||||
$image = 'land6.gif';
|
||||
$alt = 'Forest';
|
||||
}
|
||||
} elsif($l == $HlandTown) {
|
||||
# 町
|
||||
my($p, $n);
|
||||
if($lv < 30) {
|
||||
$p = 3;
|
||||
$n = 'Village';
|
||||
} elsif($lv < 100) {
|
||||
$p = 4;
|
||||
$n = 'Town';
|
||||
} else {
|
||||
$p = 5;
|
||||
$n = 'City';
|
||||
}
|
||||
|
||||
$image = "land${p}.gif";
|
||||
$alt = "$n (${lv}$HunitPop)";
|
||||
} elsif($l == $HlandFarm) {
|
||||
# 農場
|
||||
$image = 'land7.gif';
|
||||
$alt = "Farm (${lv}0${HunitPop} scale)";
|
||||
} elsif($l == $HlandFactory) {
|
||||
# 工場
|
||||
$image = 'land8.gif';
|
||||
$alt = "Factory (${lv}0${HunitPop} scale)";
|
||||
} elsif($l == $HlandBase) {
|
||||
if($mode == 0) {
|
||||
# 観光者の場合は森のふり
|
||||
$image = 'land6.gif';
|
||||
$alt = 'Forest';
|
||||
} else {
|
||||
# ミサイル基地
|
||||
my($level) = expToLevel($l, $lv);
|
||||
$image = 'land9.gif';
|
||||
$alt = "Missile base (level ${level}/exp $lv)";
|
||||
}
|
||||
} elsif($l == $HlandSbase) {
|
||||
# 海底基地
|
||||
if($mode == 0) {
|
||||
# 観光者の場合は海のふり
|
||||
$image = 'land0.gif';
|
||||
$alt = 'Sea';
|
||||
} else {
|
||||
my($level) = expToLevel($l, $lv);
|
||||
$image = 'land12.gif';
|
||||
$alt = "Undersea base (level ${level}/exp $lv)";
|
||||
}
|
||||
} elsif($l == $HlandDefence) {
|
||||
# 防衛施設
|
||||
$image = 'land10.gif';
|
||||
$alt = 'Defense facility';
|
||||
} elsif($l == $HlandHaribote) {
|
||||
# ハリボテ
|
||||
$image = 'land10.gif';
|
||||
if($mode == 0) {
|
||||
# 観光者の場合は防衛施設のふり
|
||||
$alt = 'Defense facility';
|
||||
} else {
|
||||
$alt = 'Facade';
|
||||
}
|
||||
} elsif($l == $HlandOil) {
|
||||
# 海底油田
|
||||
$image = 'land16.gif';
|
||||
$alt = 'Offshore oil field';
|
||||
} elsif($l == $HlandMountain) {
|
||||
# 山
|
||||
my($str);
|
||||
$str = '';
|
||||
if($lv > 0) {
|
||||
$image = 'land15.gif';
|
||||
$alt = "Mountain (${lv}0${HunitPop} mine scale)";
|
||||
} else {
|
||||
$image = 'land11.gif';
|
||||
$alt = 'Mountain';
|
||||
}
|
||||
} elsif($l == $HlandMonument) {
|
||||
# 記念碑
|
||||
$image = $HmonumentImage[$lv];
|
||||
$alt = $HmonumentName[$lv];
|
||||
} elsif($l == $HlandMonster) {
|
||||
# 怪獣
|
||||
my($kind, $name, $hp) = monsterSpec($lv);
|
||||
my($special) = $HmonsterSpecial[$kind];
|
||||
$image = $HmonsterImage[$kind];
|
||||
|
||||
# 硬化中?
|
||||
if((($special == 3) && (($HislandTurn % 2) == 1)) ||
|
||||
(($special == 4) && (($HislandTurn % 2) == 0))) {
|
||||
# 硬化中
|
||||
$image = $HmonsterImage2[$kind];
|
||||
}
|
||||
$alt = "Monster $name (strength ${hp})";
|
||||
}
|
||||
|
||||
|
||||
# 開発画面の場合は、座標設定
|
||||
if($mode == 1) {
|
||||
out("<A HREF=\"JavaScript:void(0);\" onclick=\"ps($x,$y)\">");
|
||||
}
|
||||
|
||||
out("<IMG SRC=\"$image\" ALT=\"$point $alt $comStr\" title=\"$point $alt $comStr\" width=32 height=32 BORDER=0>");
|
||||
|
||||
# 座標設定閉じ
|
||||
if($mode == 1) {
|
||||
out("</A>");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# テンプレートその他
|
||||
#----------------------------------------------------------------------
|
||||
# 個別ログ表示
|
||||
sub logPrintLocal {
|
||||
my($mode) = @_;
|
||||
my($i);
|
||||
for($i = 0; $i < $HlogMax; $i++) {
|
||||
logFilePrint($i, $HcurrentID, $mode);
|
||||
}
|
||||
}
|
||||
|
||||
# ○○島へようこそ!!
|
||||
sub tempPrintIslandHead {
|
||||
out(<<END);
|
||||
<CENTER>
|
||||
${HtagBig_}Welcome to ${HtagName_}[${HcurrentName} Island]${H_tagName}!!${H_tagBig}<BR>
|
||||
$HtempBack<BR>
|
||||
</CENTER>
|
||||
END
|
||||
}
|
||||
|
||||
# ○○島開発計画
|
||||
sub tempOwner {
|
||||
out(<<END);
|
||||
<CENTER>
|
||||
${HtagBig_}${HtagName_}${HcurrentName} Island${H_tagName} development planning${H_tagBig}<BR>
|
||||
$HtempBack<BR>
|
||||
</CENTER>
|
||||
<SCRIPT Language="JavaScript">
|
||||
<!--
|
||||
function ps(x, y) {
|
||||
document.forms[0].elements[4].options[x].selected = true;
|
||||
document.forms[0].elements[5].options[y].selected = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
function ns(x) {
|
||||
document.forms[0].elements[2].options[x].selected = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
//-->
|
||||
</SCRIPT>
|
||||
END
|
||||
|
||||
islandInfo();
|
||||
|
||||
out(<<END);
|
||||
<CENTER>
|
||||
<div class="tableContainer"><TABLE BORDER>
|
||||
<TR>
|
||||
<TD $HbgInputCell >
|
||||
<CENTER>
|
||||
<FORM action="$HthisFile" method=POST>
|
||||
<INPUT TYPE=submit VALUE="Send plans" NAME=CommandButton$Hislands[$HcurrentNumber]->{'id'}>
|
||||
<HR>
|
||||
<B>Password</B></BR>
|
||||
<INPUT TYPE=password NAME=PASSWORD VALUE="$HdefaultPassword">
|
||||
<HR>
|
||||
<B>Plan no.</B> <SELECT NAME=NUMBER>
|
||||
END
|
||||
# 計画番号
|
||||
my($j, $i);
|
||||
for($i = 0; $i < $HcommandMax; $i++) {
|
||||
$j = $i + 1;
|
||||
out("<OPTION VALUE=$i>$j\n");
|
||||
}
|
||||
|
||||
out(<<END);
|
||||
</SELECT><BR>
|
||||
<HR>
|
||||
<B>Development plan</B><BR>
|
||||
<SELECT NAME=COMMAND id="planDevPlan">
|
||||
END
|
||||
|
||||
#コマンド
|
||||
my($kind, $cost, $s);
|
||||
for($i = 0; $i < $HcommandTotal; $i++) {
|
||||
$kind = $HcomList[$i];
|
||||
$cost = $HcomCost[$kind];
|
||||
if($cost == 0) {
|
||||
$cost = 'free'
|
||||
} elsif($cost < 0) {
|
||||
$cost = - $cost;
|
||||
$cost .= $HunitFood;
|
||||
} else {
|
||||
$cost .= $HunitMoney;
|
||||
}
|
||||
if($kind == $HdefaultKind) {
|
||||
$s = 'SELECTED';
|
||||
} else {
|
||||
$s = '';
|
||||
}
|
||||
out("<OPTION VALUE=$kind $s>$HcomName[$kind] ($cost)\n");
|
||||
}
|
||||
|
||||
out(<<END);
|
||||
</SELECT>
|
||||
<HR>
|
||||
<B>Coordinates<BR>(</B><SELECT NAME=POINTX>
|
||||
|
||||
END
|
||||
for($i = 0; $i < $HislandSize; $i++) {
|
||||
if($i == $HdefaultX) {
|
||||
out("<OPTION VALUE=$i SELECTED>$i\n");
|
||||
} else {
|
||||
out("<OPTION VALUE=$i>$i\n");
|
||||
}
|
||||
}
|
||||
|
||||
out(<<END);
|
||||
</SELECT>, <SELECT NAME=POINTY>
|
||||
END
|
||||
|
||||
for($i = 0; $i < $HislandSize; $i++) {
|
||||
if($i == $HdefaultY) {
|
||||
out("<OPTION VALUE=$i SELECTED>$i\n");
|
||||
} else {
|
||||
out("<OPTION VALUE=$i>$i\n");
|
||||
}
|
||||
}
|
||||
out(<<END);
|
||||
</SELECT><B>)</B>
|
||||
<HR>
|
||||
<B>Amount</B><SELECT NAME=AMOUNT>
|
||||
END
|
||||
|
||||
# 数量
|
||||
for($i = 0; $i < 100; $i++) {
|
||||
out("<OPTION VALUE=$i>$i\n");
|
||||
}
|
||||
|
||||
out(<<END);
|
||||
</SELECT>
|
||||
<HR>
|
||||
<B>Target island</B><BR>
|
||||
<SELECT NAME=TARGETID id="planTarget" style="width:150px">
|
||||
$HtargetList<BR>
|
||||
</SELECT>
|
||||
<HR>
|
||||
<B>Action</B><BR>
|
||||
<INPUT TYPE=radio NAME=COMMANDMODE id="commandInsert" VALUE=insert CHECKED><label for="commandInsert">Insert</label>
|
||||
<INPUT TYPE=radio NAME=COMMANDMODE id="commandOverwrite" VALUE=write><label for="commandOverwrite">Overwrite</label><BR>
|
||||
<INPUT TYPE=radio NAME=COMMANDMODE id="commandDelete" VALUE=delete><label for="commandDelete">Delete</label>
|
||||
<HR>
|
||||
<INPUT TYPE=submit VALUE="Send plans" NAME=CommandButton$Hislands[$HcurrentNumber]->{'id'}>
|
||||
|
||||
</CENTER>
|
||||
</FORM>
|
||||
</TD>
|
||||
<TD $HbgMapCell>
|
||||
END
|
||||
islandMap(1); # 島の地図、所有者モード
|
||||
out(<<END);
|
||||
</TD>
|
||||
<TD $HbgCommandCell>
|
||||
END
|
||||
for($i = 0; $i < $HcommandMax; $i++) {
|
||||
tempCommand($i, $Hislands[$HcurrentNumber]->{'command'}->[$i]);
|
||||
}
|
||||
|
||||
out(<<END);
|
||||
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE></div>
|
||||
</CENTER>
|
||||
<HR>
|
||||
<CENTER>
|
||||
${HtagBig_}Update comment${H_tagBig}<BR>
|
||||
<FORM action="$HthisFile" method="POST">
|
||||
<label for="message">Comment</label><INPUT TYPE=text id="message" NAME=MESSAGE SIZE=80><BR>
|
||||
<label for="password">Password</label><INPUT TYPE=password id="password" NAME=PASSWORD VALUE="$HdefaultPassword">
|
||||
<INPUT TYPE=submit VALUE="Update comment" NAME=MessageButton$Hislands[$HcurrentNumber]->{'id'}>
|
||||
</FORM>
|
||||
</CENTER>
|
||||
END
|
||||
|
||||
}
|
||||
|
||||
# 入力済みコマンド表示
|
||||
sub tempCommand {
|
||||
my($number, $command) = @_;
|
||||
my($kind, $target, $x, $y, $arg) =
|
||||
(
|
||||
$command->{'kind'},
|
||||
$command->{'target'},
|
||||
$command->{'x'},
|
||||
$command->{'y'},
|
||||
$command->{'arg'}
|
||||
);
|
||||
my($name) = "$HtagComName_${HcomName[$kind]} $H_tagComName";
|
||||
my($point) = "$HtagName_($x,$y)$H_tagName";
|
||||
$target = $HidToName{$target};
|
||||
if($target eq '') {
|
||||
$target = "uninhabited";
|
||||
}
|
||||
$target = "$HtagName_${target} Island $H_tagName";
|
||||
my($value) = $arg * $HcomCost[$kind];
|
||||
if($value == 0) {
|
||||
$value = $HcomCost[$kind];
|
||||
}
|
||||
if($value < 0) {
|
||||
$value = -$value;
|
||||
$value = "$value$HunitFood";
|
||||
} else {
|
||||
$value = "$value$HunitMoney";
|
||||
}
|
||||
$value = "$HtagName_$value$H_tagName";
|
||||
|
||||
my($j) = sprintf("%02d: ", $number + 1);
|
||||
|
||||
out("<A STYlE=\"text-decoration:none\" HREF=\"JavaScript:void(0);\" onClick=\"ns($number)\"><NOBR>$HtagNumber_$j$H_tagNumber<span style=\"color:$HnormalColor\">");
|
||||
|
||||
if(($kind == $HcomDoNothing) ||
|
||||
($kind == $HcomGiveup)) {
|
||||
out("$name");
|
||||
} elsif(($kind == $HcomMissileNM) ||
|
||||
($kind == $HcomMissilePP) ||
|
||||
($kind == $HcomMissileST) ||
|
||||
($kind == $HcomMissileLD)) {
|
||||
# ミサイル系
|
||||
my($n) = ($arg == 0 ? 'unlimited' : "${arg} shots");
|
||||
out("$name ($HtagName_$n$H_tagName) to $target$point");
|
||||
} elsif($kind == $HcomSendMonster) {
|
||||
# 怪獣派遣
|
||||
out("$name to $target");
|
||||
} elsif($kind == $HcomSell) {
|
||||
# 食料輸出
|
||||
out("$name$value");
|
||||
} elsif($kind == $HcomPropaganda) {
|
||||
# 誘致活動
|
||||
out("$name");
|
||||
} elsif(($kind == $HcomMoney) ||
|
||||
($kind == $HcomFood)) {
|
||||
# 援助
|
||||
out("$name$value to $target");
|
||||
} elsif($kind == $HcomDestroy) {
|
||||
# 掘削
|
||||
if($arg != 0) {
|
||||
out("$name (budget ${value}) at $point");
|
||||
} else {
|
||||
out("$name at $point");
|
||||
}
|
||||
} elsif(($kind == $HcomFarm) ||
|
||||
($kind == $HcomFactory) ||
|
||||
($kind == $HcomMountain)) {
|
||||
# 回数付き
|
||||
if($arg == 0) {
|
||||
out("$name at $point");
|
||||
} else {
|
||||
out("$name (x$arg) at $point");
|
||||
}
|
||||
} else {
|
||||
# 座標付き
|
||||
out("$name at $point");
|
||||
}
|
||||
|
||||
out("</span></NOBR></A><BR>");
|
||||
}
|
||||
|
||||
# ローカル掲示板
|
||||
sub tempLbbsHead {
|
||||
out(<<END);
|
||||
<HR>
|
||||
<CENTER>
|
||||
${HtagBig_}${HtagName_}${HcurrentName} Island${H_tagName} tourist guestbook${H_tagBig}<BR>
|
||||
</CENTER>
|
||||
END
|
||||
}
|
||||
|
||||
# ローカル掲示板入力フォーム
|
||||
sub tempLbbsInput {
|
||||
out(<<END);
|
||||
<CENTER>
|
||||
<FORM action="$HthisFile" method="POST">
|
||||
<div class="tableContainer"><TABLE BORDER>
|
||||
<TR>
|
||||
<TH>Name</TH>
|
||||
<TH>Comment</TH>
|
||||
<TH>Action</TH>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><INPUT TYPE="text" SIZE=32 MAXLENGTH=32 NAME="LBBSNAME" id="lbbsname" VALUE="$HdefaultName"></TD>
|
||||
<TD><INPUT TYPE="text" SIZE=80 NAME="LBBSMESSAGE" id="lbbsmessage"></TD>
|
||||
<TD><INPUT TYPE="submit" VALUE="Submit" NAME="LbbsButtonSS$HcurrentID"></TD>
|
||||
</TR>
|
||||
</TABLE></div>
|
||||
</FORM>
|
||||
</CENTER>
|
||||
END
|
||||
}
|
||||
|
||||
# ローカル掲示板入力フォーム owner mode用
|
||||
sub tempLbbsInputOW {
|
||||
out(<<END);
|
||||
<CENTER>
|
||||
<FORM action="$HthisFile" method="POST">
|
||||
<div class="tableContainer"><TABLE BORDER>
|
||||
<TR>
|
||||
<TH>Name</TH>
|
||||
<TH COLSPAN=2>Comment</TH>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><INPUT TYPE="text" SIZE=32 MAXLENGTH=32 NAME="LBBSNAME" VALUE="$HdefaultName"></TD>
|
||||
<TD COLSPAN=2><INPUT TYPE="text" SIZE=80 NAME="LBBSMESSAGE"></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TH>Password</TH>
|
||||
<TH COLSPAN=2>Action</TH>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD><INPUT TYPE=password SIZE=32 MAXLENGTH=32 NAME=PASSWORD VALUE="$HdefaultPassword"></TD>
|
||||
<TD align=right>
|
||||
<INPUT TYPE="submit" VALUE="Submit" NAME="LbbsButtonOW$HcurrentID">
|
||||
</TD>
|
||||
<TD align=right>
|
||||
No.
|
||||
<SELECT NAME=NUMBER>
|
||||
END
|
||||
# 発言番号
|
||||
my($j, $i);
|
||||
for($i = 0; $i < $HlbbsMax; $i++) {
|
||||
$j = $i + 1;
|
||||
out("<OPTION VALUE=$i>$j\n");
|
||||
}
|
||||
out(<<END);
|
||||
</SELECT>
|
||||
<INPUT TYPE="submit" VALUE="Delete" NAME="LbbsButtonDL$HcurrentID">
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE></div>
|
||||
</FORM>
|
||||
</CENTER>
|
||||
END
|
||||
}
|
||||
|
||||
# ローカル掲示板内容
|
||||
sub tempLbbsContents {
|
||||
my($lbbs, $line);
|
||||
$lbbs = $Hislands[$HcurrentNumber]->{'lbbs'};
|
||||
out(<<END);
|
||||
<CENTER>
|
||||
<div class="tableContainer"><TABLE BORDER>
|
||||
<TR>
|
||||
<TH>No.</TH>
|
||||
<TH>Recorded comments</TH>
|
||||
</TR>
|
||||
END
|
||||
|
||||
my($i);
|
||||
for($i = 0; $i < $HlbbsMax; $i++) {
|
||||
$line = $lbbs->[$i];
|
||||
if($line =~ /([0-9]*)\>(.*)\>(.*)$/) {
|
||||
my($j) = $i + 1;
|
||||
out("<TR><TD align=center>$HtagNumber_$j$H_tagNumber</TD>");
|
||||
if($1 == 0) {
|
||||
# 観光者
|
||||
out("<TD>$HtagLbbsSS_$2 > $3$H_tagLbbsSS</TD></TR>");
|
||||
} else {
|
||||
# 島主
|
||||
out("<TD>$HtagLbbsOW_$2 > $3$H_tagLbbsOW</TD></TR>");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
out(<<END);
|
||||
</TD></TR></TABLE></div></CENTER>
|
||||
END
|
||||
}
|
||||
|
||||
# ローカル掲示板で名前かメッセージがない場合
|
||||
sub tempLbbsNoMessage {
|
||||
out(<<END);
|
||||
${HtagBig_}The name or comment field was left blank${H_tagBig} $HtempBack
|
||||
END
|
||||
}
|
||||
|
||||
# 書きこみ削除
|
||||
sub tempLbbsDelete {
|
||||
out(<<END);
|
||||
${HtagBig_}Entry deleted${H_tagBig}<HR>
|
||||
END
|
||||
}
|
||||
|
||||
# コマンド登録
|
||||
sub tempLbbsAdd {
|
||||
out(<<END);
|
||||
${HtagBig_}Entry logged${H_tagBig}<HR>
|
||||
END
|
||||
}
|
||||
|
||||
# コマンド削除
|
||||
sub tempCommandDelete {
|
||||
out(<<END);
|
||||
${HtagBig_}Command deleted${H_tagBig}<HR>
|
||||
END
|
||||
}
|
||||
|
||||
# コマンド登録
|
||||
sub tempCommandAdd {
|
||||
out(<<END);
|
||||
${HtagBig_}Command registered${H_tagBig}<HR>
|
||||
END
|
||||
}
|
||||
|
||||
# コメント変更成功
|
||||
sub tempComment {
|
||||
out(<<END);
|
||||
${HtagBig_}Comment updated${H_tagBig}<HR>
|
||||
END
|
||||
}
|
||||
|
||||
# 近況
|
||||
sub tempRecent {
|
||||
my($mode) = @_;
|
||||
out(<<END);
|
||||
<HR>
|
||||
${HtagBig_}${HtagName_}${HcurrentName} Island's ${H_tagName}recent activity${H_tagBig}<BR>
|
||||
END
|
||||
logPrintLocal($mode);
|
||||
}
|
||||
|
||||
1;
|
341
hako-mente.cgi
Normal file
|
@ -0,0 +1,341 @@
|
|||
#!/usr/bin/perl
|
||||
# ↑はサーバーに合わせて変更して下さい。
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# 箱庭諸島 ver2.30
|
||||
# メンテナンスツール(ver1.01)
|
||||
# 使用条件、使用方法等は、hako-readme.txtファイルを参照
|
||||
#
|
||||
# 箱庭諸島のページ: http://www.bekkoame.ne.jp/~tokuoka/hakoniwa.html
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
|
||||
# ――――――――――――――――――――――――――――――
|
||||
# 各種設定値
|
||||
# ――――――――――――――――――――――――――――――
|
||||
|
||||
# マスターパスワード
|
||||
my($masterpassword) = '';
|
||||
|
||||
# 1ターンが何秒か
|
||||
my($unitTime) = 21600; # 6時間
|
||||
|
||||
# ディレクトリのパーミッション
|
||||
my($dirMode) = 0755;
|
||||
|
||||
# このファイル
|
||||
my($thisFile) = 'http://path/hako-mente.cgi';
|
||||
|
||||
# データディレクトリの名前
|
||||
# hakojima.cgi中のものと合わせてください。
|
||||
my($dirName) = 'data';
|
||||
|
||||
|
||||
# use Time::Localが使えない環境では、'use Time::Local'の行を消して下さい。
|
||||
# ただし、更新時間の変更が'秒指定で変更'しかできなくなります。
|
||||
use Time::Local;
|
||||
|
||||
# ――――――――――――――――――――――――――――――
|
||||
# 設定項目は以上
|
||||
# ――――――――――――――――――――――――――――――
|
||||
|
||||
# 各種変数
|
||||
my($mainMode);
|
||||
my($inputPass);
|
||||
my($deleteID);
|
||||
my($currentID);
|
||||
my($ctYear);
|
||||
my($ctMon);
|
||||
my($ctDate);
|
||||
my($ctHour);
|
||||
my($ctMin);
|
||||
my($ctSec);
|
||||
|
||||
print <<END;
|
||||
Content-type: text/html
|
||||
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="/css/global.css">
|
||||
<link rel="stylesheet" href="/hakoniwa2/css/main.css">
|
||||
<link rel="shortcut icon" href="/favicon.ico">
|
||||
<TITLE>Hakoniwa Islands 2 Maintenance Tool</TITLE>
|
||||
</HEAD>
|
||||
<BODY>
|
||||
END
|
||||
|
||||
cgiInput();
|
||||
|
||||
if($mainMode eq 'delete') {
|
||||
if(passCheck()) {
|
||||
deleteMode();
|
||||
}
|
||||
} elsif($mainMode eq 'current') {
|
||||
if(passCheck()) {
|
||||
currentMode();
|
||||
}
|
||||
} elsif($mainMode eq 'time') {
|
||||
if(passCheck()) {
|
||||
timeMode();
|
||||
}
|
||||
} elsif($mainMode eq 'stime') {
|
||||
if(passCheck()) {
|
||||
stimeMode();
|
||||
}
|
||||
} elsif($mainMode eq 'new') {
|
||||
if(passCheck()) {
|
||||
newMode();
|
||||
}
|
||||
}
|
||||
mainMode();
|
||||
|
||||
print <<END;
|
||||
</FORM>
|
||||
</BODY>
|
||||
</HTML>
|
||||
END
|
||||
|
||||
sub myrmtree {
|
||||
my($dn) = @_;
|
||||
opendir(DIN, "$dn/");
|
||||
my($fileName);
|
||||
while($fileName = readdir(DIN)) {
|
||||
unlink("$dn/$fileName");
|
||||
}
|
||||
closedir(DIN);
|
||||
rmdir($dn);
|
||||
}
|
||||
|
||||
sub currentMode {
|
||||
myrmtree "${dirName}";
|
||||
mkdir("${dirName}", $dirMode);
|
||||
opendir(DIN, "${dirName}.bak$currentID/");
|
||||
my($fileName);
|
||||
while($fileName = readdir(DIN)) {
|
||||
fileCopy("${dirName}.bak$currentID/$fileName", "${dirName}/$fileName");
|
||||
}
|
||||
closedir(DIN);
|
||||
}
|
||||
|
||||
sub deleteMode {
|
||||
if($deleteID eq '') {
|
||||
myrmtree "${dirName}";
|
||||
} else {
|
||||
myrmtree "${dirName}.bak$deleteID";
|
||||
}
|
||||
unlink "hakojimalockflock";
|
||||
}
|
||||
|
||||
sub newMode {
|
||||
mkdir($dirName, $dirMode);
|
||||
|
||||
# 現在の時間を取得
|
||||
my($now) = time;
|
||||
$now = $now - ($now % ($unitTime));
|
||||
|
||||
open(OUT, ">$dirName/hakojima.dat"); # ファイルを開く
|
||||
print OUT "1\n"; # ターン数1
|
||||
print OUT "$now\n"; # 開始時間
|
||||
print OUT "0\n"; # 島の数
|
||||
print OUT "1\n"; # 次に割り当てるID
|
||||
|
||||
# ファイルを閉じる
|
||||
close(OUT);
|
||||
}
|
||||
|
||||
sub timeMode {
|
||||
$ctMon--;
|
||||
$ctYear -= 1900;
|
||||
$ctSec = timelocal($ctSec, $ctMin, $ctHour, $ctDate, $ctMon, $ctYear);
|
||||
stimeMode();
|
||||
}
|
||||
|
||||
sub stimeMode {
|
||||
my($t) = $ctSec;
|
||||
open(IN, "${dirName}/hakojima.dat");
|
||||
my(@lines);
|
||||
@lines = <IN>;
|
||||
close(IN);
|
||||
|
||||
$lines[1] = "$t\n";
|
||||
|
||||
open(OUT, ">${dirName}/hakojima.dat");
|
||||
print OUT @lines;
|
||||
close(OUT);
|
||||
}
|
||||
|
||||
sub mainMode {
|
||||
opendir(DIN, "./");
|
||||
|
||||
print <<END;
|
||||
<FORM action="$thisFile" method="POST">
|
||||
<H1>Hakoniwa Islands 2 Maintenance Tool</H1>
|
||||
<B>Password:</B><INPUT TYPE=password SIZE=32 MAXLENGTH=32 NAME=PASSWORD></TD>
|
||||
END
|
||||
|
||||
# 現役データ
|
||||
if(-d "${dirName}") {
|
||||
dataPrint("");
|
||||
} else {
|
||||
print <<END;
|
||||
<HR>
|
||||
<INPUT TYPE="submit" VALUE="Create new data" NAME="NEW">
|
||||
END
|
||||
}
|
||||
|
||||
# バックアップデータ
|
||||
my($dn);
|
||||
while($dn = readdir(DIN)) {
|
||||
if($dn =~ /^${dirName}.bak(.*)/) {
|
||||
dataPrint($1);
|
||||
}
|
||||
}
|
||||
closedir(DIN);
|
||||
}
|
||||
|
||||
# 表示モード
|
||||
sub dataPrint {
|
||||
my($suf) = @_;
|
||||
|
||||
print "<HR>";
|
||||
if($suf eq "") {
|
||||
open(IN, "${dirName}/hakojima.dat");
|
||||
print "<H1>Currently active data</H1>";
|
||||
} else {
|
||||
open(IN, "${dirName}.bak$suf/hakojima.dat");
|
||||
print "<H1>Backup $suf</H1>";
|
||||
}
|
||||
|
||||
my($lastTurn);
|
||||
$lastTurn = <IN>;
|
||||
my($lastTime);
|
||||
$lastTime = <IN>;
|
||||
|
||||
my($timeString) = timeToString($lastTime);
|
||||
|
||||
print <<END;
|
||||
<B>Turn $lastTurn</B><BR>
|
||||
<B>Time of last update</B>: $timeString<BR>
|
||||
<B>Time of last update (in seconds)</B>: $lastTime seconds since 1970/01/01<BR>
|
||||
<INPUT TYPE="submit" VALUE="Delete this data" NAME="DELETE$suf">
|
||||
END
|
||||
|
||||
if($suf eq "") {
|
||||
my($sec, $min, $hour, $date, $mon, $year, $day, $yday, $dummy) =
|
||||
localtime($lastTime);
|
||||
$mon++;
|
||||
$year += 1900;
|
||||
|
||||
$sec = sprintf("%02d", $sec);
|
||||
$min = sprintf("%02d", $min);
|
||||
$hour = sprintf("%02d", $hour);
|
||||
$date = sprintf("%02d", $date);
|
||||
$mon = sprintf("%02d", $mon);
|
||||
|
||||
print <<END;
|
||||
<H2>Change last update time</H2>
|
||||
<INPUT TYPE="text" SIZE=4 NAME="YEAR" VALUE="$year">/<INPUT TYPE="text" SIZE=2 NAME="MON" VALUE="$mon">/<INPUT TYPE="text" SIZE=2 NAME="DATE" VALUE="$date">
|
||||
<INPUT TYPE="text" SIZE=2 NAME="HOUR" VALUE="$hour">:<INPUT TYPE="text" SIZE=2 NAME="MIN" VALUE="$min">:<INPUT TYPE="text" SIZE=2 NAME="NSEC" VALUE="$sec">
|
||||
<INPUT TYPE="submit" VALUE="Change" NAME="NTIME"><BR>
|
||||
<INPUT TYPE="text" SIZE=32 NAME="SSEC" VALUE="$lastTime"> seconds since 1970/01/01
|
||||
<INPUT TYPE="submit" VALUE="Change by specifying seconds" NAME="STIME">
|
||||
|
||||
END
|
||||
} else {
|
||||
print <<END;
|
||||
<INPUT TYPE="submit" VALUE="Activate this data" NAME="CURRENT$suf">
|
||||
END
|
||||
}
|
||||
}
|
||||
|
||||
sub timeToString {
|
||||
my($sec, $min, $hour, $date, $mon, $year, $day, $yday, $dummy) =
|
||||
localtime($_[0]);
|
||||
$mon++;
|
||||
$year += 1900;
|
||||
|
||||
$sec = sprintf("%02d", $sec);
|
||||
$min = sprintf("%02d", $min);
|
||||
$hour = sprintf("%02d", $hour);
|
||||
$date = sprintf("%02d", $date);
|
||||
$mon = sprintf("%02d", $mon);
|
||||
|
||||
return "${year}/${mon}/${date} ${hour}:${min}:${sec}";
|
||||
}
|
||||
|
||||
# CGIの読みこみ
|
||||
sub cgiInput {
|
||||
my($line);
|
||||
|
||||
# 入力を受け取る
|
||||
$line = <>;
|
||||
$line =~ tr/+/ /;
|
||||
$line =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
|
||||
|
||||
if($line =~ /DELETE([0-9]*)/) {
|
||||
$mainMode = 'delete';
|
||||
$deleteID = $1;
|
||||
} elsif($line =~ /CURRENT([0-9]*)/) {
|
||||
$mainMode = 'current';
|
||||
$currentID = $1;
|
||||
} elsif($line =~ /NEW/) {
|
||||
$mainMode = 'new';
|
||||
} elsif($line =~ /NTIME/) {
|
||||
$mainMode = 'time';
|
||||
if($line =~ /YEAR=([0-9]*)/) {
|
||||
$ctYear = $1;
|
||||
}
|
||||
if($line =~ /MON=([0-9]*)/) {
|
||||
$ctMon = $1;
|
||||
}
|
||||
if($line =~ /DATE=([0-9]*)/) {
|
||||
$ctDate = $1;
|
||||
}
|
||||
if($line =~ /HOUR=([0-9]*)/) {
|
||||
$ctHour = $1;
|
||||
}
|
||||
if($line =~ /MIN=([0-9]*)/) {
|
||||
$ctMin = $1;
|
||||
}
|
||||
if($line =~ /NSEC=([0-9]*)/) {
|
||||
$ctSec = $1;
|
||||
}
|
||||
} elsif($line =~ /STIME/) {
|
||||
$mainMode = 'stime';
|
||||
if($line =~ /SSEC=([0-9]*)/) {
|
||||
$ctSec = $1;
|
||||
}
|
||||
}
|
||||
|
||||
if($line =~ /PASSWORD=([^\&]*)\&/) {
|
||||
$inputPass = $1;
|
||||
}
|
||||
}
|
||||
|
||||
# ファイルのコピー
|
||||
sub fileCopy {
|
||||
my($src, $dist) = @_;
|
||||
open(IN, $src);
|
||||
open(OUT, ">$dist");
|
||||
while(<IN>) {
|
||||
print OUT;
|
||||
}
|
||||
close(IN);
|
||||
close(OUT);
|
||||
}
|
||||
|
||||
# パスチェック
|
||||
sub passCheck {
|
||||
if($inputPass eq $masterpassword) {
|
||||
return 1;
|
||||
} else {
|
||||
print <<END;
|
||||
<span style="font-size:3em">Password is incorrect.</span>
|
||||
END
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
1;
|
106
hako-readme.txt
Normal file
|
@ -0,0 +1,106 @@
|
|||
―――――――――――――――――――――――――――――――――――
|
||||
箱庭諸島 ver2.3
|
||||
|
||||
字: 徳岡宏樹(tokuoka@taurus.bekkoame.ne.jp)
|
||||
絵: 小川克人
|
||||
題字: 稲葉修吾
|
||||
テストプレイ他協力: 井上友博、小澤武史、さかもと、ほえほえ、ありづか
|
||||
箱庭諸島のページ: http://www.bekkoame.ne.jp/~tokuoka/hakoniwa.html
|
||||
―――――――――――――――――――――――――――――――――――
|
||||
|
||||
―――――――――――――――――――――――――――――――――――
|
||||
使用条件
|
||||
―――――――――――――――――――――――――――――――――――
|
||||
箱庭諸島2のスクリプトについては、自己責任で使用する限り、基本的には
|
||||
自由に利用してもらってかまいません。ただし、変更を加えた場合は、変更
|
||||
したものを配布するには、後述の「配布条件」に従って下さい。
|
||||
|
||||
また、ゲーム画面の最上部にある、箱庭諸島スクリプト配布元へのリンク
|
||||
を外すのは禁止します。デザイン上の変更は構いませんが、必ず最上部に
|
||||
'http://www.bekkoame.ne.jp/~tokuoka/hakoniwa.html' へのリンクが
|
||||
存在し、そこでスクリプトが入手できる事がわかるようにして下さい。
|
||||
|
||||
付属しているgifファイルは、小川克人氏が著作権をもっています。このゲー
|
||||
ム用以外の用途に許可なく使用するのは禁止しますし、再配布も禁止します。
|
||||
|
||||
バグを発見した場合等は上記のページまでお知らせ下さい。
|
||||
|
||||
―――――――――――――――――――――――――――――――――――
|
||||
配布条件
|
||||
―――――――――――――――――――――――――――――――――――
|
||||
箱庭諸島2のスクリプトを改変し、それを他人に譲渡、配布する場合には、
|
||||
以下の制約を課します。
|
||||
|
||||
・無料配布であること。
|
||||
・ゲーム画面のトップに表示される、スクリプトの配布元へのリンクを
|
||||
消すのを禁止すること。また、それ以外の改造は許可すること。
|
||||
・本条件と同等に、改造したものの配布を許可すること。
|
||||
・配布するページにおいて、オリジナルスクリプトの配布元として当サイトへ
|
||||
のリンクを置くこと。
|
||||
|
||||
―――――――――――――――――――――――――――――――――――
|
||||
設置方法の説明
|
||||
―――――――――――――――――――――――――――――――――――
|
||||
――必要なファイル――
|
||||
必要なファイルは以下の6つ、及び画像ファイルです。
|
||||
|
||||
箱庭諸島のページからダウンロードするもの(5つ)
|
||||
hako-main.cgi
|
||||
hako-top.cgi
|
||||
hako-map.cgi
|
||||
hako-turn.cgi
|
||||
hako-mente.cgi
|
||||
|
||||
日本語変換モジュール(1つ)
|
||||
jcode.pl (ver2以降)
|
||||
|
||||
なお、ダウンロードした段階では、拡張子が'.txt'になっていると思いますが、
|
||||
それぞれ'.cgi'に変更して下さい。
|
||||
|
||||
jcode.plに関しては、ベッコアメなど、サーバーにあらかじめ用意されている
|
||||
場合もあります。
|
||||
|
||||
|
||||
――設置の手順――
|
||||
'hako-main.cgi'中の、「各種設定値」のところにある設定値を、適切な値に
|
||||
設定します。
|
||||
|
||||
hako-mente.cgi中の、「各種設定値」のところにある設定値を、上記で決めた
|
||||
hako-main.cgi中の値に合うように設定します。
|
||||
|
||||
CGIが実行可能なディレクトリを作り、パーミッションを755に設定します。
|
||||
なお、755ではうまく行かないサーバーもあります。その場合は777にして下さい。
|
||||
|
||||
そのディレクトリに、前述の5つ(jcode.plを合わせると6つ)のファイルを置きます。
|
||||
なお、漢字コードは全てEUCにしておく必要があります。
|
||||
|
||||
'hako-main.cgi'及び'hako-mente.cgi'のパーミッションを755に設定します。
|
||||
これも、755でなく、777や、701にすべきケースもあるようです。
|
||||
|
||||
CGI実行用でない、通常にアクセス出来る場所に、付属するgifファイルをすべて
|
||||
置きます。
|
||||
|
||||
'hako-mente.cgi'を実行し、「新しいデータを作る」を実行します。
|
||||
|
||||
'hako-main.cgi'を実行するとゲームが始まるはずです。
|
||||
|
||||
――ファイルの構成――
|
||||
|
||||
cgi実行可能なディレクトリ(755)/
|
||||
|
|
||||
|-- hako-main.cgi (755)
|
||||
|-- hako-mente.cgi (755)
|
||||
|-- hako-top.cgi (644)
|
||||
|-- hako-turn.cgi (644)
|
||||
|-- hako-map.cgi (644)
|
||||
|-- jcode.pl (644) ※必要な場合のみ
|
||||
|-- data (生成される)
|
||||
|-- data.bak0~3 (生成される)
|
||||
|
||||
上記では、'data'とありますが、ディレクトリの名前は設定可能です。
|
||||
セキュリティのために、なるべく変更するようにして下さい。
|
||||
hako-main.cgi中で設定できます。
|
||||
|
||||
―――――――――――――――――――――――――――――――――――
|
||||
|
||||
以上です。
|
266
hako-top.cgi
Normal file
|
@ -0,0 +1,266 @@
|
|||
#----------------------------------------------------------------------
|
||||
# 箱庭諸島 ver2.30
|
||||
# トップモジュール(ver1.00)
|
||||
# 使用条件、使用方法等は、hako-readme.txtファイルを参照
|
||||
#
|
||||
# 箱庭諸島のページ: http://www.bekkoame.ne.jp/~tokuoka/hakoniwa.html
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# トップページモード
|
||||
#----------------------------------------------------------------------
|
||||
# メイン
|
||||
sub topPageMain {
|
||||
# 開放
|
||||
unlock();
|
||||
|
||||
# テンプレート出力
|
||||
tempTopPage();
|
||||
}
|
||||
|
||||
# トップページ
|
||||
sub tempTopPage {
|
||||
my $timestamp = $HislandLastTime + $HunitTime;
|
||||
my ($sec, $min, $hour, $day, $mon, $year) = localtime($timestamp);
|
||||
$year += 1900;
|
||||
$mon += 1;
|
||||
my $nextTurnDate = sprintf("%04d/%02d/%02d %02d:%02d", $year, $mon, $day, $hour, $min);
|
||||
my $turnLength = $HunitTime / 60 / 60;
|
||||
|
||||
# Calculate time until next turn
|
||||
my $currentTime = time();
|
||||
my $timeUntilNextTurn = $timestamp - $currentTime;
|
||||
my $hoursUntilNextTurn = int($timeUntilNextTurn / 3600);
|
||||
my $minutesUntilNextTurn = int(($timeUntilNextTurn % 3600) / 60);
|
||||
|
||||
# タイトル
|
||||
out(<<END);
|
||||
${HtagTitle_}$Htitle${H_tagTitle}
|
||||
END
|
||||
# デバッグモードなら「ターンを進める」ボタン
|
||||
if($Hdebug == 1) {
|
||||
out(<<END);
|
||||
<FORM action="$HthisFile" method="POST">
|
||||
<INPUT TYPE="submit" VALUE="Advance to next turn" NAME="TurnButton">
|
||||
</FORM>
|
||||
END
|
||||
}
|
||||
|
||||
my($mStr1) = '';
|
||||
if($HhideMoneyMode != 0) {
|
||||
$mStr1 = "<TH $HbgTitleCell align=center nowrap=nowrap><NOBR>${HtagTH_}Funds${H_tagTH}</NOBR></TH>";
|
||||
}
|
||||
|
||||
# フォーム
|
||||
out(<<END);
|
||||
${HtagHeader_}Turn $HislandTurn${H_tagHeader}
|
||||
<div><small>Next turn: $nextTurnDate (UTC) ($hoursUntilNextTurn hours $minutesUntilNextTurn mins)</small></div>
|
||||
<div><small>Turns are automated to occur once every $turnLength hours.</small></div>
|
||||
|
||||
<HR>
|
||||
${HtagHeader_}Go to your island${H_tagHeader}
|
||||
<FORM action="$HthisFile" method="POST">
|
||||
What is the name of your island?<BR>
|
||||
<SELECT NAME="ISLANDID">
|
||||
$HislandList
|
||||
</SELECT><BR>
|
||||
|
||||
Password please!!<BR>
|
||||
<INPUT TYPE="password" NAME="PASSWORD" VALUE="$HdefaultPassword" SIZE=32 MAXLENGTH=32><BR>
|
||||
<INPUT TYPE="submit" VALUE="To development" NAME="OwnerButton"><BR>
|
||||
</FORM>
|
||||
|
||||
<HR>
|
||||
|
||||
${HtagHeader_}Island status${H_tagHeader}
|
||||
<P>
|
||||
Click on the name of an island to take a <B>tour</B>.
|
||||
</P>
|
||||
<div class="tableContainer"><TABLE BORDER>
|
||||
<TR>
|
||||
<TH $HbgTitleCell align=center nowrap=nowrap><NOBR>${HtagTH_}Rank${H_tagTH}</NOBR></TH>
|
||||
<TH $HbgTitleCell align=center nowrap=nowrap><NOBR>${HtagTH_}Island${H_tagTH}</NOBR></TH>
|
||||
<TH $HbgTitleCell align=center nowrap=nowrap><NOBR>${HtagTH_}Population${H_tagTH}</NOBR></TH>
|
||||
<TH $HbgTitleCell align=center nowrap=nowrap><NOBR>${HtagTH_}Area${H_tagTH}</NOBR></TH>
|
||||
$mStr1
|
||||
<TH $HbgTitleCell align=center nowrap=nowrap><NOBR>${HtagTH_}Food${H_tagTH}</NOBR></TH>
|
||||
<TH $HbgTitleCell align=center nowrap=nowrap><NOBR>${HtagTH_}Farms${H_tagTH}</NOBR></TH>
|
||||
<TH $HbgTitleCell align=center nowrap=nowrap><NOBR>${HtagTH_}Factories${H_tagTH}</NOBR></TH>
|
||||
<TH $HbgTitleCell align=center nowrap=nowrap><NOBR>${HtagTH_}Mines${H_tagTH}</NOBR></TH>
|
||||
</TR>
|
||||
END
|
||||
|
||||
my($island, $j, $farm, $factory, $mountain, $name, $id, $prize, $ii);
|
||||
for($ii = 0; $ii < $HislandNumber; $ii++) {
|
||||
$j = $ii + 1;
|
||||
$island = $Hislands[$ii];
|
||||
|
||||
$id = $island->{'id'};
|
||||
$farm = $island->{'farm'};
|
||||
$factory = $island->{'factory'};
|
||||
$mountain = $island->{'mountain'};
|
||||
$farm = ($farm == 0) ? "None owned" : "${farm}0$HunitPop";
|
||||
$factory = ($factory == 0) ? "None owned" : "${factory}0$HunitPop";
|
||||
$mountain = ($mountain == 0) ? "None owned" : "${mountain}0$HunitPop";
|
||||
if($island->{'absent'} == 0) {
|
||||
$name = "${HtagName_}$island->{'name'} Island${H_tagName}";
|
||||
} else {
|
||||
$name = "${HtagName2_}$island->{'name'} Island ($island->{'absent'})${H_tagName2}";
|
||||
}
|
||||
|
||||
$prize = $island->{'prize'};
|
||||
my($flags, $monsters, $turns);
|
||||
$prize =~ /([0-9]*),([0-9]*),(.*)/;
|
||||
$flags = $1;
|
||||
$monsters= $2;
|
||||
$turns = $3;
|
||||
$prize = '';
|
||||
|
||||
# ターン杯の表示
|
||||
while($turns =~ s/([0-9]*),//) {
|
||||
$prize .= "<IMG SRC=\"prize0.gif\" ALT=\"$1${Hprize[0]}\" title=\"$1${Hprize[0]}\" WIDTH=16 HEIGHT=16> ";
|
||||
}
|
||||
|
||||
# 名前に賞の文字を追加
|
||||
my($f) = 1;
|
||||
my($i);
|
||||
for($i = 1; $i < 10; $i++) {
|
||||
if($flags & $f) {
|
||||
$prize .= "<IMG SRC=\"prize${i}.gif\" ALT=\"${Hprize[$i]}\" title=\"${Hprize[$i]}\" WIDTH=16 HEIGHT=16> ";
|
||||
}
|
||||
$f *= 2;
|
||||
}
|
||||
|
||||
# 倒した怪獣リスト
|
||||
$f = 1;
|
||||
my($max) = -1;
|
||||
my($mNameList) = '';
|
||||
for($i = 0; $i < $HmonsterNumber; $i++) {
|
||||
if($monsters & $f) {
|
||||
$mNameList .= "[$HmonsterName[$i]] ";
|
||||
$max = $i;
|
||||
}
|
||||
$f *= 2;
|
||||
}
|
||||
if($max != -1) {
|
||||
$prize .= "<IMG SRC=\"${HmonsterImage[$max]}\" ALT=\"$mNameList\" title=\"$mNameList\" WIDTH=16 HEIGHT=16> ";
|
||||
}
|
||||
|
||||
|
||||
my($mStr1) = '';
|
||||
if($HhideMoneyMode == 1) {
|
||||
$mStr1 = "<TD $HbgInfoCell align=right>$island->{'money'}$HunitMoney</TD>";
|
||||
} elsif($HhideMoneyMode == 2) {
|
||||
my($mTmp) = aboutMoney($island->{'money'});
|
||||
$mStr1 = "<TD $HbgInfoCell align=right>$mTmp</TD>";
|
||||
}
|
||||
|
||||
out(<<END);
|
||||
<TR>
|
||||
<TD $HbgNumberCell ROWSPAN=2 align=center>${HtagNumber_}$j${H_tagNumber}</TD>
|
||||
<TD $HbgNameCell ROWSPAN=2 align=left>
|
||||
<A STYlE=\"text-decoration:none\" HREF="${HthisFile}?Sight=${id}">$name</A><BR>
|
||||
$prize</TD>
|
||||
<TD $HbgInfoCell align=right>$island->{'pop'}$HunitPop</TD>
|
||||
<TD $HbgInfoCell align=right>$island->{'area'}$HunitArea</TD>
|
||||
$mStr1
|
||||
<TD $HbgInfoCell align=right>$island->{'food'}$HunitFood</TD>
|
||||
<TD $HbgInfoCell align=right>$farm</TD>
|
||||
<TD $HbgInfoCell align=right>$factory</TD>
|
||||
<TD $HbgInfoCell align=right>$mountain</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD $HbgCommentCell COLSPAN=7 align=left>${HtagTH_}Comment: ${H_tagTH}$island->{'comment'}</TD>
|
||||
</TR>
|
||||
END
|
||||
}
|
||||
|
||||
out(<<END);
|
||||
</TABLE></div>
|
||||
|
||||
<HR>
|
||||
${HtagHeader_}Discover a new island${H_tagHeader}
|
||||
END
|
||||
|
||||
if($HislandNumber < $HmaxIsland) {
|
||||
out(<<END);
|
||||
<FORM action="$HthisFile" method="POST">
|
||||
What name do you plan to give your island?<BR>
|
||||
<INPUT TYPE="text" NAME="ISLANDNAME" SIZE=32 MAXLENGTH=32> Island<BR>
|
||||
And the password?<BR>
|
||||
<INPUT TYPE="password" NAME="PASSWORD" SIZE=32 MAXLENGTH=32><BR>
|
||||
Just to be sure, enter the password again<BR>
|
||||
<INPUT TYPE="password" NAME="PASSWORD2" SIZE=32 MAXLENGTH=32><BR>
|
||||
|
||||
<INPUT TYPE="submit" VALUE="Discover" NAME="NewIslandButton">
|
||||
</FORM>
|
||||
END
|
||||
} else {
|
||||
out(<<END);
|
||||
The maximum number of islands has been reached... a new island cannot be registered at this time.
|
||||
END
|
||||
}
|
||||
|
||||
out(<<END);
|
||||
<HR>
|
||||
${HtagHeader_}Change island name and password${H_tagHeader}
|
||||
<P>
|
||||
(Note) A name change costs $HcostChangeName${HunitMoney}.
|
||||
</P>
|
||||
<FORM action="$HthisFile" method="POST">
|
||||
Which island?<BR>
|
||||
<SELECT NAME="ISLANDID">
|
||||
$HislandList
|
||||
</SELECT>
|
||||
<BR>
|
||||
What would you like to change the name to? (only needed if you are changing the name)<BR>
|
||||
<INPUT TYPE="text" NAME="ISLANDNAME" SIZE=32 MAXLENGTH=32> Island<BR>
|
||||
And the password? (required)<BR>
|
||||
<INPUT TYPE="password" NAME="OLDPASS" SIZE=32 MAXLENGTH=32><BR>
|
||||
What is the new password? (only needed if you are changing the password)<BR>
|
||||
<INPUT TYPE="password" NAME="PASSWORD" SIZE=32 MAXLENGTH=32><BR>
|
||||
Just to be sure, enter the password again (only needed if you are changing the password)<BR>
|
||||
<INPUT TYPE="password" NAME="PASSWORD2" SIZE=32 MAXLENGTH=32><BR>
|
||||
|
||||
<INPUT TYPE="submit" VALUE="Change" NAME="ChangeInfoButton">
|
||||
</FORM>
|
||||
|
||||
<HR>
|
||||
|
||||
${HtagHeader_}Recent events${H_tagHeader}
|
||||
END
|
||||
logPrintTop();
|
||||
out(<<END);
|
||||
${HtagHeader_}Discovery history${H_tagHeader}
|
||||
END
|
||||
historyPrint();
|
||||
}
|
||||
|
||||
# トップページ用ログ表示
|
||||
sub logPrintTop {
|
||||
my($i);
|
||||
for($i = 0; $i < $HtopLogTurn; $i++) {
|
||||
logFilePrint($i, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
# 記録ファイル表示
|
||||
sub historyPrint {
|
||||
open(HIN, "${HdirName}/hakojima.his");
|
||||
my(@line, $l);
|
||||
while($l = <HIN>) {
|
||||
chomp($l);
|
||||
push(@line, $l);
|
||||
}
|
||||
@line = reverse(@line);
|
||||
|
||||
foreach $l (@line) {
|
||||
$l =~ /^([0-9]*),(.*)$/;
|
||||
## out("<NOBR>${HtagNumber_}Turn ${1}${H_tagNumber}: ${2}</NOBR><BR>\n");
|
||||
out("${HtagNumber_}Turn ${1}${H_tagNumber}: ${2}<BR>\n"); ## mod
|
||||
}
|
||||
close(HIN);
|
||||
}
|
||||
|
||||
1;
|
2957
hako-turn.cgi
Normal file
BIN
images/black.gif
Normal file
After Width: | Height: | Size: 842 B |
BIN
images/f02.gif
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
images/hakoniwa.gif
Normal file
After Width: | Height: | Size: 175 KiB |
BIN
images/land0.gif
Normal file
After Width: | Height: | Size: 957 B |
BIN
images/land1.gif
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
images/land10.gif
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
images/land11.gif
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
images/land12.gif
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
images/land13.gif
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
images/land14.gif
Normal file
After Width: | Height: | Size: 169 B |
BIN
images/land15.gif
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
images/land16.gif
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
images/land2.gif
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
images/land3.gif
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
images/land4.gif
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
images/land5.gif
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
images/land6.gif
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
images/land7.gif
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
images/land8.gif
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
images/land9.gif
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
images/monster0.gif
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
images/monster1.gif
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
images/monster2.gif
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
images/monster3.gif
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
images/monster4.gif
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
images/monster5.gif
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
images/monster6.gif
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
images/monster7.gif
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
images/monster8.gif
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
images/monument0.gif
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
images/monument1.gif
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
images/monument2.gif
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
images/prize0.gif
Normal file
After Width: | Height: | Size: 895 B |
BIN
images/prize1.gif
Normal file
After Width: | Height: | Size: 927 B |
BIN
images/prize10.gif
Normal file
After Width: | Height: | Size: 888 B |
BIN
images/prize11.gif
Normal file
After Width: | Height: | Size: 888 B |
BIN
images/prize2.gif
Normal file
After Width: | Height: | Size: 924 B |
BIN
images/prize3.gif
Normal file
After Width: | Height: | Size: 914 B |
BIN
images/prize4.gif
Normal file
After Width: | Height: | Size: 220 B |
BIN
images/prize5.gif
Normal file
After Width: | Height: | Size: 218 B |
BIN
images/prize6.gif
Normal file
After Width: | Height: | Size: 220 B |
BIN
images/prize7.gif
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
images/prize8.gif
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
images/prize9.gif
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
images/space.gif
Normal file
After Width: | Height: | Size: 901 B |
BIN
images/space0.gif
Normal file
After Width: | Height: | Size: 195 B |
BIN
images/space1.gif
Normal file
After Width: | Height: | Size: 178 B |
BIN
images/space10.gif
Normal file
After Width: | Height: | Size: 197 B |
BIN
images/space11.gif
Normal file
After Width: | Height: | Size: 198 B |
BIN
images/space2.gif
Normal file
After Width: | Height: | Size: 185 B |
BIN
images/space3.gif
Normal file
After Width: | Height: | Size: 182 B |
BIN
images/space4.gif
Normal file
After Width: | Height: | Size: 185 B |
BIN
images/space5.gif
Normal file
After Width: | Height: | Size: 182 B |
BIN
images/space6.gif
Normal file
After Width: | Height: | Size: 185 B |
BIN
images/space7.gif
Normal file
After Width: | Height: | Size: 180 B |
BIN
images/space8.gif
Normal file
After Width: | Height: | Size: 184 B |
BIN
images/space9.gif
Normal file
After Width: | Height: | Size: 184 B |
BIN
images/spacep.gif
Normal file
After Width: | Height: | Size: 208 B |
BIN
images/xbar.gif
Normal file
After Width: | Height: | Size: 1.1 KiB |
788
jcode.pl
Normal file
|
@ -0,0 +1,788 @@
|
|||
package jcode;
|
||||
;######################################################################
|
||||
;#
|
||||
;# jcode.pl: Perl library for Japanese character code conversion
|
||||
;#
|
||||
;# Copyright (c) 1995-2000 Kazumasa Utashiro <utashiro@iij.ad.jp>
|
||||
;# Internet Initiative Japan Inc.
|
||||
;# 3-13 Kanda Nishiki-cho, Chiyoda-ku, Tokyo 101-0054, Japan
|
||||
;#
|
||||
;# Copyright (c) 1992,1993,1994 Kazumasa Utashiro
|
||||
;# Software Research Associates, Inc.
|
||||
;#
|
||||
;# Use and redistribution for ANY PURPOSE are granted as long as all
|
||||
;# copyright notices are retained. Redistribution with modification
|
||||
;# is allowed provided that you make your modified version obviously
|
||||
;# distinguishable from the original one. THIS SOFTWARE IS PROVIDED
|
||||
;# BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES ARE
|
||||
;# DISCLAIMED.
|
||||
;#
|
||||
;# Original version was developed under the name of srekcah@sra.co.jp
|
||||
;# February 1992 and it was called kconv.pl at the beginning. This
|
||||
;# address was a pen name for group of individuals and it is no longer
|
||||
;# valid.
|
||||
;#
|
||||
;# The latest version is available here:
|
||||
;#
|
||||
;# ftp://ftp.iij.ad.jp/pub/IIJ/dist/utashiro/perl/
|
||||
;#
|
||||
;; $rcsid = q$Id: jcode.pl,v 2.13 2000/09/29 16:10:05 utashiro Exp $;
|
||||
;#
|
||||
;######################################################################
|
||||
;#
|
||||
;# PERL4 INTERFACE:
|
||||
;#
|
||||
;# &jcode'getcode(*line)
|
||||
;# Return 'jis', 'sjis', 'euc' or undef according to
|
||||
;# Japanese character code in $line. Return 'binary' if
|
||||
;# the data has non-character code.
|
||||
;#
|
||||
;# When evaluated in array context, it returns a list
|
||||
;# contains two items. First value is the number of
|
||||
;# characters which matched to the expected code, and
|
||||
;# second value is the code name. It is useful if and
|
||||
;# only if the number is not 0 and the code is undef;
|
||||
;# that case means it couldn't tell 'euc' or 'sjis'
|
||||
;# because the evaluation score was exactly same. This
|
||||
;# interface is too tricky, though.
|
||||
;#
|
||||
;# Code detection between euc and sjis is very difficult
|
||||
;# or sometimes impossible or even lead to wrong result
|
||||
;# when it includes JIS X0201 KANA characters. So JIS
|
||||
;# X0201 KANA is ignored for automatic code detection.
|
||||
;#
|
||||
;# &jcode'convert(*line, $ocode [, $icode [, $option]])
|
||||
;# Convert the contents of $line to the specified
|
||||
;# Japanese code given in the second argument $ocode.
|
||||
;# $ocode can be any of "jis", "sjis" or "euc", or use
|
||||
;# "noconv" when you don't want the code conversion.
|
||||
;# Input code is recognized automatically from the line
|
||||
;# itself when $icode is not supplied (JIS X0201 KANA is
|
||||
;# ignored in code detection. See the above descripton
|
||||
;# of &getcode). $icode also can be specified, but
|
||||
;# xxx2yyy routine is more efficient when both codes are
|
||||
;# known.
|
||||
;#
|
||||
;# It returns the code of input string in scalar context,
|
||||
;# and a list of pointer of convert subroutine and the
|
||||
;# input code in array context.
|
||||
;#
|
||||
;# Japanese character code JIS X0201, X0208, X0212 and
|
||||
;# ASCII code are supported. X0212 characters can not be
|
||||
;# represented in SJIS and they will be replased by
|
||||
;# "geta" character when converted to SJIS.
|
||||
;#
|
||||
;# See next paragraph for $option parameter.
|
||||
;#
|
||||
;# &jcode'xxx2yyy(*line [, $option])
|
||||
;# Convert the Japanese code from xxx to yyy. String xxx
|
||||
;# and yyy are any convination from "jis", "euc" or
|
||||
;# "sjis". They return *approximate* number of converted
|
||||
;# bytes. So return value 0 means the line was not
|
||||
;# converted at all.
|
||||
;#
|
||||
;# Optional parameter $option is used to specify optional
|
||||
;# conversion method. String "z" is for JIS X0201 KANA
|
||||
;# to X0208 KANA, and "h" is for reverse.
|
||||
;#
|
||||
;# $jcode'convf{'xxx', 'yyy'}
|
||||
;# The value of this associative array is pointer to the
|
||||
;# subroutine jcode'xxx2yyy().
|
||||
;#
|
||||
;# &jcode'to($ocode, $line [, $icode [, $option]])
|
||||
;# &jcode'jis($line [, $icode [, $option]])
|
||||
;# &jcode'euc($line [, $icode [, $option]])
|
||||
;# &jcode'sjis($line [, $icode [, $option]])
|
||||
;# These functions are prepared for easy use of
|
||||
;# call/return-by-value interface. You can use these
|
||||
;# funcitons in s///e operation or any other place for
|
||||
;# convenience.
|
||||
;#
|
||||
;# &jcode'jis_inout($in, $out)
|
||||
;# Set or inquire JIS start and end sequences. Default
|
||||
;# is "ESC-$-B" and "ESC-(-B". If you supplied only one
|
||||
;# character, "ESC-$" or "ESC-(" is prepended for each
|
||||
;# character respectively. Acutually "ESC-(-B" is not a
|
||||
;# sequence to end JIS code but a sequence to start ASCII
|
||||
;# code set. So `in' and `out' are somewhat misleading.
|
||||
;#
|
||||
;# &jcode'get_inout($string)
|
||||
;# Get JIS start and end sequences from $string.
|
||||
;#
|
||||
;# &jcode'cache()
|
||||
;# &jcode'nocache()
|
||||
;# &jcode'flush()
|
||||
;# Usually, converted character is cached in memory to
|
||||
;# avoid same calculations have to be done many times.
|
||||
;# To disable this caching, call &jcode'nocache(). It
|
||||
;# can be revived by &jcode'cache() and cache is flushed
|
||||
;# by calling &jcode'flush(). &cache() and &nocache()
|
||||
;# functions return previous caching state.
|
||||
;#
|
||||
;# ---------------------------------------------------------------
|
||||
;#
|
||||
;# &jcode'h2z_xxx(*line)
|
||||
;# JIS X0201 KANA (so-called Hankaku-KANA) to X0208 KANA
|
||||
;# (Zenkaku-KANA) code conversion routine. String xxx is
|
||||
;# any of "jis", "sjis" and "euc". From the difficulty
|
||||
;# of recognizing code set from 1-byte KATAKANA string,
|
||||
;# automatic code recognition is not supported.
|
||||
;#
|
||||
;# &jcode'z2h_xxx(*line)
|
||||
;# X0208 to X0201 KANA code conversion routine. String
|
||||
;# xxx is any of "jis", "sjis" and "euc".
|
||||
;#
|
||||
;# $jcode'z2hf{'xxx'}
|
||||
;# $jcode'h2zf{'xxx'}
|
||||
;# These are pointer to the corresponding function just
|
||||
;# as $jcode'convf.
|
||||
;#
|
||||
;# ---------------------------------------------------------------
|
||||
;#
|
||||
;# &jcode'tr(*line, $from, $to [, $option])
|
||||
;# &jcode'tr emulates tr operator for 2 byte code. Only 'd'
|
||||
;# is interpreted as an option.
|
||||
;#
|
||||
;# Range operator like `A-Z' for 2 byte code is partially
|
||||
;# supported. Code must be JIS or EUC, and first byte
|
||||
;# have to be same on first and last character.
|
||||
;#
|
||||
;# CAUTION: Handling range operator is a kind of trick
|
||||
;# and it is not perfect. So if you need to transfer `-'
|
||||
;# character, please be sure to put it at the beginning
|
||||
;# or the end of $from and $to strings.
|
||||
;#
|
||||
;# &jcode'trans($line, $from, $to [, $option)
|
||||
;# Same as &jcode'tr but accept string and return string
|
||||
;# after translation.
|
||||
;#
|
||||
;# ---------------------------------------------------------------
|
||||
;#
|
||||
;# &jcode'init()
|
||||
;# Initialize the variables used in this package. You
|
||||
;# don't have to call this when using jocde.pl by `do' or
|
||||
;# `require' interface. Call it first if you embedded
|
||||
;# the jcode.pl at the end of your script.
|
||||
;#
|
||||
;######################################################################
|
||||
;#
|
||||
;# PERL5 INTERFACE:
|
||||
;#
|
||||
;# Current jcode.pl is written in Perl 4 but it is possible to use
|
||||
;# from Perl 5 using `references'. Fully perl5 capable version is
|
||||
;# future issue.
|
||||
;#
|
||||
;# Since lexical variable is not a subject of typeglob, *string style
|
||||
;# call doesn't work if the variable is declared as `my'. Same thing
|
||||
;# happens to special variable $_ if the perl is compiled to use
|
||||
;# thread capability. So using reference is generally recommented to
|
||||
;# avoid the mysterious error.
|
||||
;#
|
||||
;# jcode::getcode(\$line)
|
||||
;# jcode::convert(\$line, $ocode [, $icode [, $option]])
|
||||
;# jcode::xxx2yyy(\$line [, $option])
|
||||
;# &{$jcode::convf{'xxx', 'yyy'}}(\$line)
|
||||
;# jcode::to($ocode, $line [, $icode [, $option]])
|
||||
;# jcode::jis($line [, $icode [, $option]])
|
||||
;# jcode::euc($line [, $icode [, $option]])
|
||||
;# jcode::sjis($line [, $icode [, $option]])
|
||||
;# jcode::jis_inout($in, $out)
|
||||
;# jcode::get_inout($string)
|
||||
;# jcode::cache()
|
||||
;# jcode::nocache()
|
||||
;# jcode::flush()
|
||||
;# jcode::h2z_xxx(\$line)
|
||||
;# jcode::z2h_xxx(\$line)
|
||||
;# &{$jcode::z2hf{'xxx'}}(\$line)
|
||||
;# &{$jcode::h2zf{'xxx'}}(\$line)
|
||||
;# jcode::tr(\$line, $from, $to [, $option])
|
||||
;# jcode::trans($line, $from, $to [, $option)
|
||||
;# jcode::init()
|
||||
;#
|
||||
;######################################################################
|
||||
;#
|
||||
;# SAMPLES
|
||||
;#
|
||||
;# Convert any Kanji code to JIS and print each line with code name.
|
||||
;#
|
||||
;# while (defined($s = <>)) {
|
||||
;# $code = &jcode'convert(*s, 'jis');
|
||||
;# print $code, "\t", $s;
|
||||
;# }
|
||||
;#
|
||||
;# Convert all lines to JIS according to the first recognized line.
|
||||
;#
|
||||
;# while (defined($s = <>)) {
|
||||
;# print, next unless $s =~ /[\033\200-\377]/;
|
||||
;# (*f, $icode) = &jcode'convert(*s, 'jis');
|
||||
;# print;
|
||||
;# defined(&f) || next;
|
||||
;# while (<>) { &f(*s); print; }
|
||||
;# last;
|
||||
;# }
|
||||
;#
|
||||
;# The safest way of JIS conversion.
|
||||
;#
|
||||
;# while (defined($s = <>)) {
|
||||
;# ($matched, $icode) = &jcode'getcode(*s);
|
||||
;# if (@buf == 0 && $matched == 0) {
|
||||
;# print $s;
|
||||
;# next;
|
||||
;# }
|
||||
;# push(@buf, $s);
|
||||
;# next unless $icode;
|
||||
;# while (defined($s = shift(@buf))) {
|
||||
;# &jcode'convert(*s, 'jis', $icode);
|
||||
;# print $s;
|
||||
;# }
|
||||
;# while (defined($s = <>)) {
|
||||
;# &jcode'convert(*s, 'jis', $icode);
|
||||
;# print $s;
|
||||
;# }
|
||||
;# last;
|
||||
;# }
|
||||
;# print @buf if @buf;
|
||||
;#
|
||||
;######################################################################
|
||||
|
||||
;#
|
||||
;# Call initialize function if it is not called yet. This may sound
|
||||
;# strange but it makes easy to embed the jcode.pl at the end of
|
||||
;# script. Call &jcode'init at the beginning of the script in that
|
||||
;# case.
|
||||
;#
|
||||
##&init unless defined $version;
|
||||
&init unless $version; ##2021/04/29 fix
|
||||
|
||||
;#
|
||||
;# Initialize variables.
|
||||
;#
|
||||
sub init {
|
||||
$version = $rcsid =~ /,v ([\d.]+)/ ? $1 : 'unknown';
|
||||
|
||||
$re_bin = '[\000-\006\177\377]';
|
||||
|
||||
$re_jis0208_1978 = '\e\$\@';
|
||||
$re_jis0208_1983 = '\e\$B';
|
||||
$re_jis0208_1990 = '\e&\@\e\$B';
|
||||
$re_jis0208 = "$re_jis0208_1978|$re_jis0208_1983|$re_jis0208_1990";
|
||||
$re_jis0212 = '\e\$\(D';
|
||||
$re_jp = "$re_jis0208|$re_jis0212";
|
||||
$re_asc = '\e\([BJ]';
|
||||
$re_kana = '\e\(I';
|
||||
|
||||
$esc_0208 = "\e\$B";
|
||||
$esc_0212 = "\e\$(D";
|
||||
$esc_asc = "\e(B";
|
||||
$esc_kana = "\e(I";
|
||||
|
||||
$re_sjis_c = '[\201-\237\340-\374][\100-\176\200-\374]';
|
||||
$re_sjis_kana = '[\241-\337]';
|
||||
|
||||
$re_euc_c = '[\241-\376][\241-\376]';
|
||||
$re_euc_kana = '\216[\241-\337]';
|
||||
$re_euc_0212 = '\217[\241-\376][\241-\376]';
|
||||
|
||||
# Use `geta' for undefined character code
|
||||
$undef_sjis = "\x81\xac";
|
||||
|
||||
$cache = 1;
|
||||
|
||||
# X0201 -> X0208 KANA conversion table. Looks weird? Not that
|
||||
# much. This is simply JIS text without escape sequences.
|
||||
($h2z_high = $h2z = <<'__TABLE_END__') =~ tr/\041-\176/\241-\376/;
|
||||
! !# $ !" % !& " !V # !W
|
||||
^ !+ _ !, 0 !<
|
||||
' %! ( %# ) %% * %' + %)
|
||||
, %c - %e . %g / %C
|
||||
1 %" 2 %$ 3 %& 4 %( 5 %*
|
||||
6 %+ 7 %- 8 %/ 9 %1 : %3
|
||||
6^ %, 7^ %. 8^ %0 9^ %2 :^ %4
|
||||
; %5 < %7 = %9 > %; ? %=
|
||||
;^ %6 <^ %8 =^ %: >^ %< ?^ %>
|
||||
@ %? A %A B %D C %F D %H
|
||||
@^ %@ A^ %B B^ %E C^ %G D^ %I
|
||||
E %J F %K G %L H %M I %N
|
||||
J %O K %R L %U M %X N %[
|
||||
J^ %P K^ %S L^ %V M^ %Y N^ %\
|
||||
J_ %Q K_ %T L_ %W M_ %Z N_ %]
|
||||
O %^ P %_ Q %` R %a S %b
|
||||
T %d U %f V %h
|
||||
W %i X %j Y %k Z %l [ %m
|
||||
\ %o ] %s & %r 3^ %t
|
||||
__TABLE_END__
|
||||
%h2z = split(/\s+/, $h2z . $h2z_high);
|
||||
%z2h = reverse %h2z;
|
||||
|
||||
$convf{'jis' , 'jis' } = *jis2jis;
|
||||
$convf{'jis' , 'sjis'} = *jis2sjis;
|
||||
$convf{'jis' , 'euc' } = *jis2euc;
|
||||
$convf{'euc' , 'jis' } = *euc2jis;
|
||||
$convf{'euc' , 'sjis'} = *euc2sjis;
|
||||
$convf{'euc' , 'euc' } = *euc2euc;
|
||||
$convf{'sjis' , 'jis' } = *sjis2jis;
|
||||
$convf{'sjis' , 'sjis'} = *sjis2sjis;
|
||||
$convf{'sjis' , 'euc' } = *sjis2euc;
|
||||
$h2zf{'jis' } = *h2z_jis;
|
||||
$z2hf{'jis' } = *z2h_jis;
|
||||
$h2zf{'euc' } = *h2z_euc;
|
||||
$z2hf{'euc' } = *z2h_euc;
|
||||
$h2zf{'sjis'} = *h2z_sjis;
|
||||
$z2hf{'sjis'} = *z2h_sjis;
|
||||
}
|
||||
|
||||
;#
|
||||
;# Set escape sequences which should be put before and after Japanese
|
||||
;# (JIS X0208) string.
|
||||
;#
|
||||
sub jis_inout {
|
||||
$esc_0208 = shift || $esc_0208;
|
||||
$esc_0208 = "\e\$$esc_0208" if length($esc_0208) == 1;
|
||||
$esc_asc = shift || $esc_asc;
|
||||
$esc_asc = "\e\($esc_asc" if length($esc_asc) == 1;
|
||||
($esc_0208, $esc_asc);
|
||||
}
|
||||
|
||||
;#
|
||||
;# Get JIS in and out sequences from the string.
|
||||
;#
|
||||
sub get_inout {
|
||||
local($esc_0208, $esc_asc);
|
||||
$_[$[] =~ /($re_jis0208)/o && ($esc_0208 = $1);
|
||||
$_[$[] =~ /($re_asc)/o && ($esc_asc = $1);
|
||||
($esc_0208, $esc_asc);
|
||||
}
|
||||
|
||||
;#
|
||||
;# Recognize character code.
|
||||
;#
|
||||
sub getcode {
|
||||
local(*s) = @_;
|
||||
local($matched, $code);
|
||||
|
||||
if ($s !~ /[\e\200-\377]/) { # not Japanese
|
||||
$matched = 0;
|
||||
$code = undef;
|
||||
} # 'jis'
|
||||
elsif ($s =~ /$re_jp|$re_asc|$re_kana/o) {
|
||||
$matched = 1;
|
||||
$code = 'jis';
|
||||
}
|
||||
elsif ($s =~ /$re_bin/o) { # 'binary'
|
||||
$matched = 0;
|
||||
$code = 'binary';
|
||||
}
|
||||
else { # should be 'euc' or 'sjis'
|
||||
local($sjis, $euc) = (0, 0);
|
||||
|
||||
while ($s =~ /(($re_sjis_c)+)/go) {
|
||||
$sjis += length($1);
|
||||
}
|
||||
while ($s =~ /(($re_euc_c|$re_euc_kana|$re_euc_0212)+)/go) {
|
||||
$euc += length($1);
|
||||
}
|
||||
$matched = &max($sjis, $euc);
|
||||
$code = ('euc', undef, 'sjis')[($sjis<=>$euc) + $[ + 1];
|
||||
}
|
||||
wantarray ? ($matched, $code) : $code;
|
||||
}
|
||||
sub max { $_[ $[ + ($_[ $[ ] < $_[ $[ + 1 ]) ]; }
|
||||
|
||||
;#
|
||||
;# Convert any code to specified code.
|
||||
;#
|
||||
sub convert {
|
||||
local(*s, $ocode, $icode, $opt) = @_;
|
||||
return (undef, undef) unless $icode = $icode || &getcode(*s);
|
||||
return (undef, $icode) if $icode eq 'binary';
|
||||
$ocode = 'jis' unless $ocode;
|
||||
$ocode = $icode if $ocode eq 'noconv';
|
||||
local(*f) = $convf{$icode, $ocode};
|
||||
&f(*s, $opt);
|
||||
wantarray ? (*f, $icode) : $icode;
|
||||
}
|
||||
|
||||
;#
|
||||
;# Easy return-by-value interfaces.
|
||||
;#
|
||||
sub jis { &to('jis', @_); }
|
||||
sub euc { &to('euc', @_); }
|
||||
sub sjis { &to('sjis', @_); }
|
||||
sub to {
|
||||
local($ocode, $s, $icode, $opt) = @_;
|
||||
&convert(*s, $ocode, $icode, $opt);
|
||||
$s;
|
||||
}
|
||||
sub what {
|
||||
local($s) = @_;
|
||||
&getcode(*s);
|
||||
}
|
||||
sub trans {
|
||||
local($s) = shift;
|
||||
&tr(*s, @_);
|
||||
$s;
|
||||
}
|
||||
|
||||
;#
|
||||
;# SJIS to JIS
|
||||
;#
|
||||
sub sjis2jis {
|
||||
local(*s, $opt, $n) = @_;
|
||||
&sjis2sjis(*s, $opt) if $opt;
|
||||
$s =~ s/(($re_sjis_c|$re_sjis_kana)+)/&_sjis2jis($1) . $esc_asc/geo;
|
||||
$n;
|
||||
}
|
||||
sub _sjis2jis {
|
||||
local($s) = shift;
|
||||
$s =~ s/(($re_sjis_c)+|($re_sjis_kana)+)/&__sjis2jis($1)/geo;
|
||||
$s;
|
||||
}
|
||||
sub __sjis2jis {
|
||||
local($s) = shift;
|
||||
if ($s =~ /^$re_sjis_kana/o) {
|
||||
$n += $s =~ tr/\241-\337/\041-\137/;
|
||||
$esc_kana . $s;
|
||||
} else {
|
||||
$n += $s =~ s/($re_sjis_c)/$s2e{$1}||&s2e($1)/geo;
|
||||
$s =~ tr/\241-\376/\041-\176/;
|
||||
$esc_0208 . $s;
|
||||
}
|
||||
}
|
||||
|
||||
;#
|
||||
;# EUC to JIS
|
||||
;#
|
||||
sub euc2jis {
|
||||
local(*s, $opt, $n) = @_;
|
||||
&euc2euc(*s, $opt) if $opt;
|
||||
$s =~ s/(($re_euc_c|$re_euc_kana|$re_euc_0212)+)/
|
||||
&_euc2jis($1) . $esc_asc
|
||||
/geo;
|
||||
$n;
|
||||
}
|
||||
sub _euc2jis {
|
||||
local($s) = shift;
|
||||
$s =~ s/(($re_euc_c)+|($re_euc_kana)+|($re_euc_0212)+)/&__euc2jis($1)/geo;
|
||||
$s;
|
||||
}
|
||||
sub __euc2jis {
|
||||
local($s) = shift;
|
||||
local($esc);
|
||||
|
||||
if ($s =~ tr/\216//d) {
|
||||
$esc = $esc_kana;
|
||||
} elsif ($s =~ tr/\217//d) {
|
||||
$esc = $esc_0212;
|
||||
} else {
|
||||
$esc = $esc_0208;
|
||||
}
|
||||
|
||||
$n += $s =~ tr/\241-\376/\041-\176/;
|
||||
$esc . $s;
|
||||
}
|
||||
|
||||
;#
|
||||
;# JIS to EUC
|
||||
;#
|
||||
sub jis2euc {
|
||||
local(*s, $opt, $n) = @_;
|
||||
$s =~ s/($re_jp|$re_asc|$re_kana)([^\e]*)/&_jis2euc($1,$2)/geo;
|
||||
&euc2euc(*s, $opt) if $opt;
|
||||
$n;
|
||||
}
|
||||
sub _jis2euc {
|
||||
local($esc, $s) = @_;
|
||||
if ($esc !~ /^$re_asc/o) {
|
||||
$n += $s =~ tr/\041-\176/\241-\376/;
|
||||
if ($esc =~ /^$re_kana/o) {
|
||||
$s =~ s/([\241-\337])/\216$1/g;
|
||||
}
|
||||
elsif ($esc =~ /^$re_jis0212/o) {
|
||||
$s =~ s/([\241-\376][\241-\376])/\217$1/g;
|
||||
}
|
||||
}
|
||||
$s;
|
||||
}
|
||||
|
||||
;#
|
||||
;# JIS to SJIS
|
||||
;#
|
||||
sub jis2sjis {
|
||||
local(*s, $opt, $n) = @_;
|
||||
&jis2jis(*s, $opt) if $opt;
|
||||
$s =~ s/($re_jp|$re_asc|$re_kana)([^\e]*)/&_jis2sjis($1,$2)/geo;
|
||||
$n;
|
||||
}
|
||||
sub _jis2sjis {
|
||||
local($esc, $s) = @_;
|
||||
if ($esc =~ /^$re_jis0212/o) {
|
||||
$s =~ s/../$undef_sjis/g;
|
||||
$n = length;
|
||||
}
|
||||
elsif ($esc !~ /^$re_asc/o) {
|
||||
$n += $s =~ tr/\041-\176/\241-\376/;
|
||||
if ($esc =~ /^$re_jp/o) {
|
||||
$s =~ s/($re_euc_c)/$e2s{$1}||&e2s($1)/geo;
|
||||
}
|
||||
}
|
||||
$s;
|
||||
}
|
||||
|
||||
;#
|
||||
;# SJIS to EUC
|
||||
;#
|
||||
sub sjis2euc {
|
||||
local(*s, $opt,$n) = @_;
|
||||
$n = $s =~ s/($re_sjis_c|$re_sjis_kana)/$s2e{$1}||&s2e($1)/geo;
|
||||
&euc2euc(*s, $opt) if $opt;
|
||||
$n;
|
||||
}
|
||||
sub s2e {
|
||||
local($c1, $c2, $code);
|
||||
($c1, $c2) = unpack('CC', $code = shift);
|
||||
|
||||
if (0xa1 <= $c1 && $c1 <= 0xdf) {
|
||||
$c2 = $c1;
|
||||
$c1 = 0x8e;
|
||||
} elsif (0x9f <= $c2) {
|
||||
$c1 = $c1 * 2 - ($c1 >= 0xe0 ? 0xe0 : 0x60);
|
||||
$c2 += 2;
|
||||
} else {
|
||||
$c1 = $c1 * 2 - ($c1 >= 0xe0 ? 0xe1 : 0x61);
|
||||
$c2 += 0x60 + ($c2 < 0x7f);
|
||||
}
|
||||
if ($cache) {
|
||||
$s2e{$code} = pack('CC', $c1, $c2);
|
||||
} else {
|
||||
pack('CC', $c1, $c2);
|
||||
}
|
||||
}
|
||||
|
||||
;#
|
||||
;# EUC to SJIS
|
||||
;#
|
||||
sub euc2sjis {
|
||||
local(*s, $opt,$n) = @_;
|
||||
&euc2euc(*s, $opt) if $opt;
|
||||
$n = $s =~ s/($re_euc_c|$re_euc_kana|$re_euc_0212)/$e2s{$1}||&e2s($1)/geo;
|
||||
}
|
||||
sub e2s {
|
||||
local($c1, $c2, $code);
|
||||
($c1, $c2) = unpack('CC', $code = shift);
|
||||
|
||||
if ($c1 == 0x8e) { # SS2
|
||||
return substr($code, 1, 1);
|
||||
} elsif ($c1 == 0x8f) { # SS3
|
||||
return $undef_sjis;
|
||||
} elsif ($c1 % 2) {
|
||||
$c1 = ($c1>>1) + ($c1 < 0xdf ? 0x31 : 0x71);
|
||||
$c2 -= 0x60 + ($c2 < 0xe0);
|
||||
} else {
|
||||
$c1 = ($c1>>1) + ($c1 < 0xdf ? 0x30 : 0x70);
|
||||
$c2 -= 2;
|
||||
}
|
||||
if ($cache) {
|
||||
$e2s{$code} = pack('CC', $c1, $c2);
|
||||
} else {
|
||||
pack('CC', $c1, $c2);
|
||||
}
|
||||
}
|
||||
|
||||
;#
|
||||
;# JIS to JIS, SJIS to SJIS, EUC to EUC
|
||||
;#
|
||||
sub jis2jis {
|
||||
local(*s, $opt) = @_;
|
||||
$s =~ s/$re_jis0208/$esc_0208/go;
|
||||
$s =~ s/$re_asc/$esc_asc/go;
|
||||
&h2z_jis(*s) if $opt =~ /z/;
|
||||
&z2h_jis(*s) if $opt =~ /h/;
|
||||
}
|
||||
sub sjis2sjis {
|
||||
local(*s, $opt) = @_;
|
||||
&h2z_sjis(*s) if $opt =~ /z/;
|
||||
&z2h_sjis(*s) if $opt =~ /h/;
|
||||
}
|
||||
sub euc2euc {
|
||||
local(*s, $opt) = @_;
|
||||
&h2z_euc(*s) if $opt =~ /z/;
|
||||
&z2h_euc(*s) if $opt =~ /h/;
|
||||
}
|
||||
|
||||
;#
|
||||
;# Cache control functions
|
||||
;#
|
||||
sub cache {
|
||||
($cache, $cache = 1)[$[];
|
||||
}
|
||||
sub nocache {
|
||||
($cache, $cache = 0)[$[];
|
||||
}
|
||||
sub flushcache {
|
||||
undef %e2s;
|
||||
undef %s2e;
|
||||
}
|
||||
|
||||
;#
|
||||
;# X0201 -> X0208 KANA conversion routine
|
||||
;#
|
||||
sub h2z_jis {
|
||||
local(*s, $n) = @_;
|
||||
if ($s =~ s/$re_kana([^\e]*)/$esc_0208 . &_h2z_jis($1)/geo) {
|
||||
1 while $s =~ s/(($re_jis0208)[^\e]*)($re_jis0208)/$1/o;
|
||||
}
|
||||
$n;
|
||||
}
|
||||
sub _h2z_jis {
|
||||
local($s) = @_;
|
||||
$n += $s =~ s/(([\041-\137])([\136\137])?)/
|
||||
$h2z{$1} || $h2z{$2} . $h2z{$3}
|
||||
/ge;
|
||||
$s;
|
||||
}
|
||||
|
||||
sub h2z_euc {
|
||||
local(*s) = @_;
|
||||
$s =~ s/\216([\241-\337])(\216([\336\337]))?/
|
||||
$h2z{"$1$3"} || $h2z{$1} . $h2z{$3}
|
||||
/ge;
|
||||
}
|
||||
|
||||
sub h2z_sjis {
|
||||
local(*s, $n) = @_;
|
||||
$s =~ s/(($re_sjis_c)+)|(([\241-\337])([\336\337])?)/
|
||||
$1 || ($n++, $h2z{$3} ? $e2s{$h2z{$3}} || &e2s($h2z{$3})
|
||||
: &e2s($h2z{$4}) . ($5 && &e2s($h2z{$5})))
|
||||
/geo;
|
||||
$n;
|
||||
}
|
||||
|
||||
;#
|
||||
;# X0208 -> X0201 KANA conversion routine
|
||||
;#
|
||||
sub z2h_jis {
|
||||
local(*s, $n) = @_;
|
||||
$s =~ s/($re_jis0208)([^\e]+)/&_z2h_jis($2)/geo;
|
||||
$n;
|
||||
}
|
||||
sub _z2h_jis {
|
||||
local($s) = @_;
|
||||
$s =~ s/((\%[!-~]|![\#\"&VW+,<])+|([^!%][!-~]|![^\#\"&VW+,<])+)/
|
||||
&__z2h_jis($1)
|
||||
/ge;
|
||||
$s;
|
||||
}
|
||||
sub __z2h_jis {
|
||||
local($s) = @_;
|
||||
return $esc_0208 . $s unless $s =~ /^%/ || $s =~ /^![\#\"&VW+,<]/;
|
||||
$n += length($s) / 2;
|
||||
$s =~ s/(..)/$z2h{$1}/g;
|
||||
$esc_kana . $s;
|
||||
}
|
||||
|
||||
sub z2h_euc {
|
||||
local(*s, $n) = @_;
|
||||
##&init_z2h_euc unless defined %z2h_euc;
|
||||
&init_z2h_euc unless %z2h_euc; ##2021/04/29 fix
|
||||
$s =~ s/($re_euc_c|$re_euc_kana)/
|
||||
$z2h_euc{$1} ? ($n++, $z2h_euc{$1}) : $1
|
||||
/geo;
|
||||
$n;
|
||||
}
|
||||
|
||||
sub z2h_sjis {
|
||||
local(*s, $n) = @_;
|
||||
##&init_z2h_sjis unless defined %z2h_sjis;
|
||||
&init_z2h_sjis unless %z2h_sjis; ####2021/04/29 fix
|
||||
$s =~ s/($re_sjis_c)/$z2h_sjis{$1} ? ($n++, $z2h_sjis{$1}) : $1/geo;
|
||||
$n;
|
||||
}
|
||||
|
||||
;#
|
||||
;# Initializing JIS X0208 to X0201 KANA table for EUC and SJIS. This
|
||||
;# can be done in &init but it's not worth doing. Similarly,
|
||||
;# precalculated table is not worth to occupy the file space and
|
||||
;# reduce the readability. The author personnaly discourages to use
|
||||
;# X0201 Kana character in the any situation.
|
||||
;#
|
||||
sub init_z2h_euc {
|
||||
local($k, $s);
|
||||
while (($k, $s) = each %z2h) {
|
||||
$s =~ s/([\241-\337])/\216$1/g && ($z2h_euc{$k} = $s);
|
||||
}
|
||||
}
|
||||
sub init_z2h_sjis {
|
||||
local($s, $v);
|
||||
while (($s, $v) = each %z2h) {
|
||||
$s =~ /[\200-\377]/ && ($z2h_sjis{&e2s($s)} = $v);
|
||||
}
|
||||
}
|
||||
|
||||
;#
|
||||
;# TR function for 2-byte code
|
||||
;#
|
||||
sub tr {
|
||||
# $prev_from, $prev_to, %table are persistent variables
|
||||
local(*s, $from, $to, $opt) = @_;
|
||||
local(@from, @to);
|
||||
local($jis, $n) = (0, 0);
|
||||
|
||||
$jis++, &jis2euc(*s) if $s =~ /$re_jp|$re_asc|$re_kana/o;
|
||||
$jis++ if $to =~ /$re_jp|$re_asc|$re_kana/o;
|
||||
|
||||
if (!defined($prev_from) || $from ne $prev_from || $to ne $prev_to) {
|
||||
($prev_from, $prev_to) = ($from, $to);
|
||||
undef %table;
|
||||
&_maketable;
|
||||
}
|
||||
|
||||
$s =~ s/([\200-\377][\000-\377]|[\000-\377])/
|
||||
defined($table{$1}) && ++$n ? $table{$1} : $1
|
||||
/ge;
|
||||
|
||||
&euc2jis(*s) if $jis;
|
||||
|
||||
$n;
|
||||
}
|
||||
|
||||
sub _maketable {
|
||||
local($ascii) = '(\\\\[\\-\\\\]|[\0-\133\135-\177])';
|
||||
|
||||
&jis2euc(*to) if $to =~ /$re_jp|$re_asc|$re_kana/o;
|
||||
&jis2euc(*from) if $from =~ /$re_jp|$re_asc|$re_kana/o;
|
||||
|
||||
grep(s/(([\200-\377])[\200-\377]-\2[\200-\377])/&_expnd2($1)/ge,
|
||||
$from, $to);
|
||||
grep(s/($ascii-$ascii)/&_expnd1($1)/geo,
|
||||
$from, $to);
|
||||
|
||||
@to = $to =~ /[\200-\377][\000-\377]|[\000-\377]/g;
|
||||
@from = $from =~ /[\200-\377][\000-\377]|[\000-\377]/g;
|
||||
push(@to, ($opt =~ /d/ ? '' : $to[$#to]) x (@from - @to)) if @to < @from;
|
||||
@table{@from} = @to;
|
||||
}
|
||||
|
||||
sub _expnd1 {
|
||||
local($s) = @_;
|
||||
$s =~ s/\\(.)/$1/g;
|
||||
local($c1, $c2) = unpack('CxC', $s);
|
||||
if ($c1 <= $c2) {
|
||||
for ($s = ''; $c1 <= $c2; $c1++) {
|
||||
$s .= pack('C', $c1);
|
||||
}
|
||||
}
|
||||
$s;
|
||||
}
|
||||
|
||||
sub _expnd2 {
|
||||
local($s) = @_;
|
||||
local($c1, $c2, $c3, $c4) = unpack('CCxCC', $s);
|
||||
if ($c1 == $c3 && $c2 <= $c4) {
|
||||
for ($s = ''; $c2 <= $c4; $c2++) {
|
||||
$s .= pack('CC', $c1, $c2);
|
||||
}
|
||||
}
|
||||
$s;
|
||||
}
|
||||
|
||||
1;
|
230
manual/advanced.html
Normal file
|
@ -0,0 +1,230 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="description" content="Learn how to play Hakoniwa Islands 2.">
|
||||
<title>Manual (Advanced) - Hakoniwa Islands 2</title>
|
||||
<link rel="shortcut icon" href="/favicon.ico">
|
||||
<link rel="stylesheet" href="/css/global.css">
|
||||
<link rel="stylesheet" href="/hakoniwa2/css/main.css">
|
||||
<script src="/scripts/oldborders.js"></script>
|
||||
<style>
|
||||
body {
|
||||
background-color: #ffffff;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
a:link {
|
||||
color: #00c000;
|
||||
}
|
||||
|
||||
a:active {
|
||||
color: #008000;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 0;
|
||||
font-size: 3em;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
h2 {
|
||||
margin: 0.67em 0;
|
||||
font-size: 2em;
|
||||
}
|
||||
|
||||
h3 {
|
||||
margin: 1em 0;
|
||||
font-size: 1.5em;
|
||||
}
|
||||
|
||||
h4 {
|
||||
margin: 1em 0;
|
||||
font-size: 1.166667em;
|
||||
}
|
||||
|
||||
table {
|
||||
border: 1px outset;
|
||||
}
|
||||
|
||||
th,
|
||||
td {
|
||||
border: 1px inset;
|
||||
}
|
||||
|
||||
th {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
img {
|
||||
vertical-align: text-bottom;
|
||||
}
|
||||
|
||||
.imageContainer {
|
||||
margin: 1em 0;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.imageContainer img {
|
||||
border: 2px ridge #cccccc;
|
||||
height: auto;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
#mapTable img {
|
||||
display: block;
|
||||
}
|
||||
|
||||
#levelTable,
|
||||
#awardTable td:nth-of-type(2),
|
||||
#monsterTable {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.diagramTile {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
#footer {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
@media screen and (max-device-width: 480px) {
|
||||
h1 {
|
||||
font-size: 2em;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 1.5em;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 1.25em;
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: 1em;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div><a href="/home.php">Home</a> / <a href="../">Return</a></div>
|
||||
|
||||
<hr>
|
||||
|
||||
<h1>Hakoniwa Islands 2 Manual (Advanced)</h1>
|
||||
|
||||
<hr>
|
||||
|
||||
<p>This page describes the more <strong>intricate game mechanics</strong>, including <strong>disaster rates</strong>. This isn't necessary for regular development, but please read this page if you want to make a more intricate development plan.</p>
|
||||
<p>For the basics, see the <a href="./beginner.html">beginner's manual</a> and the <a href="./intermediate.html">intermediate manual</a>.</p>
|
||||
|
||||
<hr>
|
||||
|
||||
<h2>Turn processing</h2>
|
||||
<p>Turn processing takes place every 6 hours in the following order:</p>
|
||||
<table id="turnProcessingTable">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Income</th>
|
||||
<td>Each island receives an income according to its population and number of factories and farms.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Food consumption</th>
|
||||
<td>Food is consumed in proportion to the population.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Development plan execution</th>
|
||||
<td>One development plan per island is executed. The order of the islands is random.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Individual tile processing</th>
|
||||
<td>Processing for each individual tile is carried out. More details on this later.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Island-wide disasters</th>
|
||||
<td>Island-wide disasters (monsters, earthquakes, tsunamis, land subsidence, typhoons, meteorites, giant meteorites, eruptions, food shortages, and buried treasure) are determined.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>End-of-turn processing</th>
|
||||
<td>If food exceeds 999,900 tons, the excess is automatically converted into funds.<br>
|
||||
If funds exceed 9999M$, the excess is discarded.<br>
|
||||
Awards will be determined based on population.<br>
|
||||
If the population reaches 0, the island will be unregistered and deleted.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p><strong>Income</strong> occurs first, then <strong>consumption</strong> and <strong>development</strong>, so it's possible for you to make plans that rely on future income.</p>
|
||||
<p>The order in which islands are <strong>developed</strong> is randomly determined each turn. If a plan can't be executed for some reason, such as a lack of funds, the next plan will be carried out instead.</p>
|
||||
|
||||
<h3>Individual tile processing</h3>
|
||||
<p>The order in which tiles are processed during individual tile processing is random each turn. For each tile, the following processing is performed:</p>
|
||||
|
||||
<h4>Villages, towns, and cities</h4>
|
||||
<p>Population increases (or decreases during food shortages).</p>
|
||||
<table id="residentProcessingTable">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Scale</th>
|
||||
<th>Normal</th>
|
||||
<th>During island promotion</th>
|
||||
<th>During food shortages</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Villages, towns</td>
|
||||
<td>Increases by 100 to 1,000 people</td>
|
||||
<td>Increases by 100 to 3,000 people</td>
|
||||
<td>Decreases by 100 to 3,000 people</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Cities</td>
|
||||
<td>No increase</td>
|
||||
<td>Increases by 100 to 300 people</td>
|
||||
<td>Decreases by 100 to 3,000 people</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>For <strong>towns</strong> and <strong>cities</strong> without forests around them, there's also a <strong>fire determination</strong> (1% chance of burning down).</p>
|
||||
|
||||
<h4>Factories and facades</h4>
|
||||
<p>There's a <strong>fire determination</strong> (1% chance of burning down).</p>
|
||||
|
||||
<h4>Plains</h4>
|
||||
<p>If there's a <strong>farm</strong>, <strong>village</strong>, <strong>town</strong>, or <strong>city</strong> in the surrounding area, there's a <strong>village</strong> generation determination. There's a 20% chance of this happening.</p>
|
||||
|
||||
<h4>Forests</h4>
|
||||
<p>The number of trees will increase by 100 (up to a maximum of 20,000).</p>
|
||||
|
||||
<h4>Defense facilities</h4>
|
||||
<p>If self-destruction is set in the development plan, it will self-destruct.</p>
|
||||
|
||||
<h4>Offshore oil field</h4>
|
||||
<p>After generating 1000M$ in funds, there's a depletion determination. There's a 4% chance of depletion each turn.</p>
|
||||
|
||||
<h4>Monster movement</h4>
|
||||
<p>The monster will move. The tile it moves away from will become a wasteland. Of course, if the monster has already moved, it won't move again (the exception being monsters that move 2 or more tiles).</p>
|
||||
<p>If the destination tile is a defense facility, the self-destruct mechanism will be activated.</p>
|
||||
|
||||
<hr>
|
||||
|
||||
<h2>Disaster occurrance rates</h2>
|
||||
|
||||
<h3>Fire</h3>
|
||||
<p><strong>1%</strong> chance per turn for each <strong>factory</strong>, <strong>city</strong>, <strong>town</strong>, or <strong>facade</strong> that's not adjacent to a <strong>forest</strong> or <strong>monument</strong>.</p>
|
||||
|
||||
<hr>
|
||||
|
||||
<strong style="color:#ff0000">Work in progress</strong>
|
||||
|
||||
<hr>
|
||||
|
||||
<div id="footer">
|
||||
<p><a href="/hakoniwa2/">Top page</a></p>
|
||||
<p>Original author: Hiroki Tokuoka (<span lang="ja">徳岡宏樹</span>)</p>
|
||||
<p>Translated by <a href="https://www.heyuri.net/">Heyuri</a></p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
472
manual/beginner.html
Normal file
|
@ -0,0 +1,472 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="description" content="Learn how to play Hakoniwa Islands 2.">
|
||||
<title>Manual (Beginner) - Hakoniwa Islands 2</title>
|
||||
<link rel="shortcut icon" href="/favicon.ico">
|
||||
<link rel="stylesheet" href="/css/global.css">
|
||||
<link rel="stylesheet" href="/hakoniwa2/css/main.css">
|
||||
<script src="/scripts/oldborders.js"></script>
|
||||
<style>
|
||||
body {
|
||||
background-color: #ffffff;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
a:link {
|
||||
color: #00c000;
|
||||
}
|
||||
|
||||
a:active {
|
||||
color: #008000;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 0;
|
||||
font-size: 3em;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
h2 {
|
||||
margin: 0.67em 0;
|
||||
font-size: 2em;
|
||||
}
|
||||
|
||||
h3 {
|
||||
margin: 1em 0;
|
||||
font-size: 1.5em;
|
||||
}
|
||||
|
||||
h4 {
|
||||
margin: 1em 0;
|
||||
font-size: 1.166667em;
|
||||
}
|
||||
|
||||
table {
|
||||
border: 1px outset;
|
||||
}
|
||||
|
||||
th,
|
||||
td {
|
||||
border: 1px inset;
|
||||
}
|
||||
|
||||
th {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.imageContainer {
|
||||
margin: 1em 0;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.imageContainer img {
|
||||
border: 2px ridge #cccccc;
|
||||
height: auto;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
#mapTable img {
|
||||
display: block;
|
||||
}
|
||||
|
||||
#footer {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
@media screen and (max-device-width: 480px) {
|
||||
h1 {
|
||||
font-size: 2em;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 1.5em;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 1.25em;
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: 1em;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div><a href="/home.php">Home</a> / <a href="../">Return</a></div>
|
||||
|
||||
<hr>
|
||||
|
||||
<h1>Hakoniwa Islands 2 Manual (Beginner)</h1>
|
||||
|
||||
<hr>
|
||||
|
||||
<h2>First of all</h2>
|
||||
<p>Firstly, <strong>an important note</strong>. You need to set a <strong>password</strong> in order to play, but we're not responsible for the security of your password. Therefore, please use a <strong>safe password that wouldn't be damaging to you if it was ever revealed</strong> (e.g. date of birth, nickname, etc.).</p>
|
||||
<p>After reading this page, you should be able to start playing <strong>Hakoniwa Islands 2</strong>. Once you have a general grasp of how to play the game, please continue on to the <a href="./intermediate.html">intermediate manual</a> after this page. If you want to learn even more in-depth information, please refer to the <a href="./advanced.html">advanced manual</a>.</p>
|
||||
|
||||
<hr>
|
||||
|
||||
<h2>What kind of game is this?</h2>
|
||||
<p><strong>Hakoniwa Islands 2</strong> is a so-called <strong>miniature garden game</strong> in which each player cultivates their own island. Besides simply developing things, players can also cooperate with each other, or even go to war against each other.</p>
|
||||
<p>Development plans (such as building a farm or leveling wasteland) can be entered up to 20 turns in advance. Generally speaking, <strong>one plan is enacted per turn</strong>. <strong>A single turn occurs every 6 hours</strong> (in other words, there are <strong>4 turns per day</strong>), so if you enter 20 plans in advance, <strong>you will not need to access the game for the next 5 days</strong>.</p>
|
||||
<p>Of course, various unforeseen circumstances may occur, so it's to your own advantage to check the site more frequently. Please note that if you leave an island without entering any plans for 30 days (120 turns), the island will be considered abandoned.</p>
|
||||
<p>You can visit islands developed by other players via tourism. This can be done even if you don't have your own island, so why not take a look around to get a feel for things? You can visit an island by clicking on its name in the list of islands on the front page of the game.</p>
|
||||
<div class="imageContainer">
|
||||
<div><img src="man-name.png" alt="Island list" width="455" height="207"></div>
|
||||
<div>(Click on an island name)</div>
|
||||
<div>↓</div>
|
||||
<div>(Tourist screen)</div>
|
||||
<div><img src="man-tourist.png" alt="Tourist screen" width="400" height="229"></div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<h2>Game objective</h2>
|
||||
<p>In this game, there's no "win condition" per se. However, the game displays <strong>island population size rankings</strong>, so there's always the goal of reaching the top of the rankings.</p>
|
||||
<p>Of course, you're free to take it easy and develop your island without worrying about the rankings. However, even if I say "take it easy", it won't be <em>that</em> easy since there are many hardships awaiting you, including disasters...</p>
|
||||
|
||||
<hr>
|
||||
|
||||
<h2>Let's register</h2>
|
||||
<p>To create your own island, go to the <strong>"Discover a new island"</strong> section on the game's front page, enter a name and password, then click the <strong>"Discover"</strong> button.</p>
|
||||
<div class="imageContainer">
|
||||
<img src="man-register.png" alt="Entering details" width="351" height="250">
|
||||
</div>
|
||||
<p>Your island will be discovered.</p>
|
||||
<div class="imageContainer">
|
||||
<img src="man-discovered.png" alt="Island discovered" width="400" height="341">
|
||||
</div>
|
||||
<p>Then, press the <strong>"Return to top"</strong> link to return to the front page. Your island is now registered.
|
||||
</p>
|
||||
<div class="imageContainer">
|
||||
<img src="man-new.png" alt="Island registered" width="305" height="111">
|
||||
</div>
|
||||
|
||||
<p>By the way, you'll see that there's a number like (117) next to the name of your island. This number represents <strong>how long the island has been abandoned for</strong>. It had been abandoned for a long time prior to you discovering it.</p>
|
||||
<p>Your island will be <strong>automatically abandoned if left without development plans for more than 120 turns</strong>, so to prevent this you should provide a development plan right away.</p>
|
||||
<p>To <strong>enter a development plan</strong> for your island, don't simply click on your island's name. If you do, you'll be considered just a <strong>tourist</strong>.</p>
|
||||
<p>To go to your island as the owner, select your island from the <strong>"Go to your island"</strong> section at the top of the game's front page, enter your password, and press the <strong>"To development"</strong> button.</p>
|
||||
<div class="imageContainer">
|
||||
<div><img src="man-goto.png" alt="To development" width="255" height="171"></div>
|
||||
<div>(Press the "To development" button)</div>
|
||||
<div>↓</div>
|
||||
<div>(Go to development screen)</div>
|
||||
<div><img src="man-owner.png" alt="Development screen" width="356" height="242"></div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
|
||||
<h2>Development planning</h2>
|
||||
<p>The layout of the development planning screen looks like this:</p>
|
||||
<div class="imageContainer">
|
||||
<img src="man-ownerm.png" alt="Development screen" width="360" height="310">
|
||||
</div>
|
||||
<p>As you can see, the middle section is a map. The information about what a tile represents and its respective coordinates is displayed when you <strong>hover your mouse pointer over the tile</strong>.</p>
|
||||
|
||||
<h3>Island information</h3>
|
||||
<p>Here you will see <strong>numerical data</strong> for your entire island. In particular, you should pay close attention to your <strong>funds</strong> and <strong>food</strong>. Without <strong>funds</strong>, you can't do anything; when you run out of <strong>food</strong>, your population will rapidly decrease.</p>
|
||||
|
||||
<h3>Scheduled plans</h3>
|
||||
<p>On the right, <strong>scheduled plans</strong> are shown from 1 through 20. As each turn occurs, plans are executed in order starting from 1, and the following plans will move up the list.</p>
|
||||
|
||||
<h3>Plan entry form</h3>
|
||||
<p>Located on the left side, this is the form use to submit your plans. Below are explanations for each element.</p>
|
||||
|
||||
<h4>Plan no.</h4>
|
||||
<p>Let's you specify the position on the scheduled plans list where your plan will appear (you can also specify a plan number by <strong>clicking on a number in the scheduled plans column</strong>).</p>
|
||||
|
||||
<h4>Development plan</h4>
|
||||
<p>Let's you specify the type of plan to be added. There are many different types, such as <strong>farm development</strong> and <strong>ground leveling</strong>. The meanings of all of these will be explained later.</p>
|
||||
|
||||
<h4>Coordinates</h4>
|
||||
<p>Let's you specify the coordinates for the tile the plan is to be executed on (you can also specify the coordinates by <strong>clicking on a tile on the map</strong>). When carrying out <strong>farm development</strong> for example, you'll need to ask yourself <strong>"where am I going to grow it?"</strong> (some plans don't require you to specify coordinates, such as <strong>financial aid</strong>).</p>
|
||||
|
||||
<h4>Quantity</h4>
|
||||
<p>Depending on the plan type, you may have to <strong>specify an amount</strong>. In those cases, this section allows you to specify the quantity. For example, for <strong>financial aid</strong>, you are required to decide on <strong>how much aid you'll give</strong>.</p>
|
||||
|
||||
<h4>Target island</h4>
|
||||
<p>Most plans are for <strong>your own island</strong>, but some plans are applied to other islands. For example <strong>financial aid</strong>. In those cases, you'll need to specify the <strong>name of the intended target island</strong>.</p>
|
||||
|
||||
<h4>Action</h4>
|
||||
<p>The default action is insert, which inserts the plan at the specified position on the scheduled plans list. However, if you wish to "overwrite" or "delete" the selected scheduled plan number, you may specify so here.</p>
|
||||
|
||||
<h4>Send plans</h4>
|
||||
<p>Press this button to send the specified plan.</p>
|
||||
|
||||
<p>The above may seem a little complicated, but in essence, all you have to do is <strong>specify a plan and press the send plan button</strong>.</p>
|
||||
<p>After briefly explaining the <strong>elements of the map</strong>, <strong>plan types</strong>, and <strong>disasters</strong> that can strike an island, I'll explain what you should do in the early stages of the game.</p>
|
||||
|
||||
<hr>
|
||||
|
||||
<h2>Map</h2>
|
||||
<p>An island map consists of 12x12 tiles (one square of terrain is called a <strong>tile</strong>). These are the various types of terrain that are available. Additionally, the <strong>coordinates and terrain type</strong> can be shown on the game screen by hovering your mouse over a tile and waiting a moment.</p>
|
||||
<p>The following is a list of some of the terrain types:</p>
|
||||
|
||||
<table id="mapTable">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Sea</th>
|
||||
<td><img src="../images/land0.gif" alt="Sea" width="32" height="32"></td>
|
||||
<td>There's normal <strong>sea</strong> and <strong>shallow sea</strong>. This terrain is useless in this state, but you can <strong>landfill</strong> it to turn it into land.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Wasteland</th>
|
||||
<td><img src="../images/land1.gif" alt="Wasteland" width="32" height="32"></td>
|
||||
<td>This terrain is also useless, but it can be turned into <strong>plains</strong> by using <strong>ground leveling</strong>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Plains</th>
|
||||
<td><img src="../images/land2.gif" alt="Plains" width="32" height="32"></td>
|
||||
<td>On the <strong>plains</strong>, you can build <strong>farms</strong> and <strong>factories</strong>. Additionally, <strong>villages</strong> may form on the <strong>plains</strong> if there are <strong>farms</strong>, <strong>villages</strong>, <strong>towns</strong>, <strong>cities</strong>, etc. in the vicinity.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Village</th>
|
||||
<td><img src="../images/land3.gif" alt="Village" width="32" height="32"></td>
|
||||
<td>Houses <strong>100 to 2,900 people</strong>. The population of <strong>villages</strong> will increase naturally over time. When it reaches <strong>3,000 people</strong>, it will be promoted to a <strong>town</strong>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Town</th>
|
||||
<td><img src="../images/land4.gif" alt="Town" width="32" height="32"></td>
|
||||
<td>Houses <strong>3,000 to 9,900 people</strong>. The population of <strong>towns</strong> will also increase naturally over time. When it reaches <strong>10,000 people</strong>, it will be promoted to a <strong>city</strong>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>City</th>
|
||||
<td><img src="../images/land5.gif" alt="City" width="32" height="32"></td>
|
||||
<td>Houses <strong>10,000 to 20,000 people</strong>. The population of <strong>cities</strong> will not increase naturally over time... but there are ways to increase it.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Forest</th>
|
||||
<td><img src="../images/land6.gif" alt="Forest" width="32" height="32"></td>
|
||||
<td><strong>Forests</strong> protect <strong>farms</strong> from the winds, provide peace to surrounding <strong>cities</strong>, and prevent <strong>fires</strong>.<br> In an emergency, <strong>trees</strong> can be cut down and sold via <strong>deforestation</strong>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Farm</th>
|
||||
<td><img src="../images/land7.gif" alt="Farm" width="32" height="32"></td>
|
||||
<td>These are dome-shaped, all-weather <strong>farms</strong>. They start with a potential capacity of <strong>10,000 people</strong>. When people work on a <strong>farm</strong>, they produce <strong>food</strong>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Factory</th>
|
||||
<td><img src="../images/land8.gif" alt="Factory" width="32" height="32"></td>
|
||||
<td><strong>Factories</strong> start with a potential capacity of <strong>30,000 people</strong>. When people work in a <strong>factory</strong>, they generate <strong>funds</strong>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Mountain</th>
|
||||
<td><img src="../images/land11.gif" alt="Mountain" width="32" height="32"></td>
|
||||
<td>On <strong>mountains</strong>, you can develop <strong>mines</strong> (they start with a potential capacity of <strong>5,000 people</strong>). When people work in a <strong>mine</strong>, they generate <strong>funds</strong>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Missile base</th>
|
||||
<td><img src="../images/land9.gif" alt="Missile base" width="32" height="32"></td>
|
||||
<td>If you have a <strong>missile base</strong>, you can <strong>launch missiles</strong> up to the number of bases you own. Additionally, since the location of <strong>missile bases</strong> is classified, they are disguised to look like <strong>forests</strong> to tourists.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Defense facility</th>
|
||||
<td><img src="../images/land10.gif" alt="Defense facility" width="32" height="32"></td>
|
||||
<td>If you have a <strong>defense facility</strong>, missiles flying within 2 tiles of the facility are neutralized by an invisible force field emitted by the facility. However, a <strong>defense facility</strong> cannot protect itself or be protected by other defense facilities.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p>This is not a complete list, but there's no need to know every single terrain for the time being, and more will be shown in the <a href="./intermediate.html">intermediate manual</a>.</p>
|
||||
|
||||
<hr>
|
||||
|
||||
<h2>Types of development plan</h2>
|
||||
<p>After entering with <strong>"Go to my island"</strong>, you can submit <strong>development plans</strong> using the plan entry form located to the left of the map. Plans you've already submitted are displayed to the right of the map.</p>
|
||||
<p>Plans are submitted by selecting a <strong>plan no.</strong>, <strong>development plan</strong> type, <strong>coordinates</strong>, <strong>quantity</strong>, <strong>target island</strong>, etc., and then clicking the <strong>send plans</strong> button.</p>
|
||||
<p>The scheduled plans will be executed in order of <strong>plan number</strong>, from 1 to 20.</p>
|
||||
<p>The process is complicated by <strong>coordinates</strong>, <strong>quantity</strong>, etc., but not all of these <strong>elements</strong> are required. The table below shows which <strong>elements</strong> are related to which <strong>development plan</strong>.</p>
|
||||
<p>Additionally, some browsers allow you to <strong>click on a desired location</strong> on your island map and have its coordinates appear in the coordinates selection boxes. Likewise, if you <strong>click on a plan shown to the right of the map</strong>, the corresponding number will be set in the plan number selection box.</p>
|
||||
<p>Development plans include the following:</p>
|
||||
|
||||
<table id="planTable">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Development plan</th>
|
||||
<th>Elements to specify</th>
|
||||
<th>Explanation</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Cash flow</th>
|
||||
<th>None</th>
|
||||
<td>No specific development will be undertaken, but you will generate <strong>10M$</strong>. The <strong>island is considered abandoned</strong> while this plan is underway.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Ground leveling (5M$)</th>
|
||||
<th>Coordinates</th>
|
||||
<td><strong>Ground leveling</strong> allows you to turn <strong>wastelands</strong> into <strong>plains</strong>. In addition to <strong>wastelands</strong>, it can also be used to dispose of structures on land that are no longer needed, such as <strong>farms</strong>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Landfill (150M$)</th>
|
||||
<th>Coordinates</th>
|
||||
<td>You can landfill <strong>sea</strong> to turn it into <strong>shallow sea</strong>. You can also landfill <strong>shallow sea</strong> to create <strong>land</strong>. However, this can only be done if there's <strong>land</strong> in the vicinity.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Deforestation (free)</th>
|
||||
<th>Coordinates</th>
|
||||
<td>Trees in a <strong>forest</strong> are cut down and sold. Every 100 trees sells for 5M$.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Afforestation (50M$)</th>
|
||||
<th>Coordinates</th>
|
||||
<td>Creates a <strong>forest</strong> on the <strong>plains</strong>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Farm development (20M$)</th>
|
||||
<th>Coordinates</th>
|
||||
<td>Builds a <strong>farm</strong> on the <strong>plains</strong>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Factory construction (100M$)</th>
|
||||
<th>Coordinates</th>
|
||||
<td>Builds a <strong>factory</strong> on the <strong>plains</strong>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Mine development (300M$)</th>
|
||||
<th>Coordinates</th>
|
||||
<td>Builds a <strong>mine</strong> on a <strong>mountain</strong>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Defense facility construction (1,000M$)</th>
|
||||
<th>Coordinates</th>
|
||||
<td>Builds a <strong>defense facility</strong> on the <strong>plains</strong>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Food export (10,000 tons)</th>
|
||||
<th>Coordinates, quantity</th>
|
||||
<td>Sells food. <strong>10M$ per 10,000 tons</strong>. If you specify a quantity, you will sell the <strong>quantity x 10,000 tons</strong>. You can spend the funds you recieve in the same turn, since this action does not advance the turn.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Financial aid (100M$)<br> Food aid (10,000 tons)</th>
|
||||
<th>Coordinates, quantity, target</th>
|
||||
<td>Assists other islands with <strong>funds/food</strong>. This command alone does not advance the turn. If you specify a quantity, the aid provided will be the <strong>quantity x 100M$/10,000 tons</strong>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Missile launch (20M$)<br> Pinpoint missile launch (50M$)<br> Stealth missile launch (50M$)<br> Land-destroying missile launch (100M$)</th>
|
||||
<th>Coordinates, quantity, target</th>
|
||||
<td>
|
||||
<p>Launches a missile at the <strong>target</strong> (requires a <strong>missile base</strong> or <strong>undersea base</strong>). There's a high margin of error, and missiles will fall somewhere <strong>within 2 tiles</strong> of the intended coordinates. If you specify a <strong>quantity</strong>, you will fire that number of missiles (the cost will be calculated appropriately). If you specify a <strong>quantity of 0</strong>, you will fire as many missiles as you are able to.</p>
|
||||
<p>There are four types of missile, and their characteristics are as follows:</p>
|
||||
<ul>
|
||||
<li><strong>Missile</strong>: regular missile</li>
|
||||
<li><strong>Pinpoint missile</strong>: the margin of error is reduced to 1 tile</li>
|
||||
<li><strong>Stealth missile</strong>: the identity of the island who launched the missile is kept hidden</li>
|
||||
<li><strong>Land-destroying missile</strong>: the land at the point of impact is submerged</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Abandon island (free)</th>
|
||||
<th>None</th>
|
||||
<td>Abandons the island. If you wish to resign, you should use this.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p>This is not all the plan types. However, since there's no need to know the rest for the time being, they'll be found in the <a href="./intermediate.html">intermediate manual</a>.</p>
|
||||
|
||||
<hr>
|
||||
|
||||
<h2>Income and food consumption</h2>
|
||||
|
||||
<p><strong>This is a little complicated, but it's important.</strong></p>
|
||||
<p>Residents will automatically work so long as they have places to do so (<strong>farms</strong>, <strong>factories</strong>, and <strong>mines</strong>). As they work, they generate <strong>food</strong> and <strong>funds</strong>.</p>
|
||||
<p>If <strong>100 people work on a farm</strong>, they'll generate <strong>100 tons of food per turn</strong>. If <strong>1,000 people work in a factory or a mine</strong>, they'll generate <strong>1M$ per turn</strong>.</p>
|
||||
<p>If there are extra places to work, priority will be given to <strong>farms</strong> (because <strong>funds</strong> can be obtained by selling <strong>food</strong>, whereas <strong>food</strong> cannot be bought).</p>
|
||||
<p>Also, for every <strong>500 people</strong>, <strong>100 tons</strong> of food are consumed per turn. Therefore, at least <strong>20% of the population</strong> must be working on farms, or the food supply will gradually decrease.</p>
|
||||
<p>If your food stock is over <strong>999,900 tons</strong> at the end of the turn, the excess amount will be <strong>automatically converted into funds</strong>. If your funds exceeds <strong>9,999M$</strong> at the end of the turn, the excess amount <strong>will be discarded</strong>.</p>
|
||||
|
||||
<hr>
|
||||
|
||||
<h2>Disasters</h2>
|
||||
<p>Even if you get along well with other islands, <strong>natural disasters</strong> and <strong>accidents</strong> can occur. Below are the types of <strong>disasters</strong> that can occur:</p>
|
||||
<table id="disasterTable">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Fire</th>
|
||||
<td><strong>Towns</strong>, <strong>cities</strong> and <strong>factories</strong> can be destroyed by fires. However, if those areas are adjacent to a <strong>forest</strong>, it seems that <strong>fires</strong> don't occur.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Typhoon</th>
|
||||
<td><strong>Farms</strong> are at risk of being blown away. If a <strong>farm</strong> is blown away, all that will be left is an empty <strong>plain</strong>. <strong>Farms</strong> that are adjacent to many <strong>forests</strong> seem to be less prone blowing away.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Tsunami</th>
|
||||
<td>Buildings and other structures adjacent to <strong>seas</strong> will be destroyed. The more <strong>seas</strong> adjacent to a given tile, the greater the risk of it being destroyed. Even sturdy <strong>missile bases</strong> and <strong>defense facilities</strong> that can withstand <strong>earthquakes</strong> can be destroyed by a tsunami.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Eruption</th>
|
||||
<td>When a volcano suddenly <strong>erupts</strong>, a <strong>mountain</strong> is formed at the location of the eruption. The surrounding area will also rise.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Meteorite</th>
|
||||
<td>If a <strong>meteorite</strong> falls and hits land, the area will be submerged. If one falls, it may be followed by several more.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Huge meteorite</th>
|
||||
<td>A <strong>huge meteorite</strong> falls and destroys the area within 2 tiles of the location it fell.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Earthquake</th>
|
||||
<td><strong>Factories</strong> and <strong>cities</strong> throughout the island will be destroyed. This is somewhat more likely to occur on turns where <strong>quick ground leveling</strong> is used.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Land subsidence</th>
|
||||
<td>If the size of an island is over <strong>9,000 square miles</strong> (90 land tiles), <strong>land subsidence</strong> may occur due to the weight of the island. If this happens, every land tile adjacent to sea will be submerged.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Monster</th>
|
||||
<td>A <strong>monster</strong> suddenly appears in a <strong>village</strong>/<strong>town</strong>/<strong>city</strong>. The <strong>monster</strong> will go on a rampage until they're defeated. However, <strong>monsters</strong> are only interested in islands with populations of <strong>100,000 or more</strong>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Food shortage</th>
|
||||
<td>Although not exactly a natural disaster, a food shortage causes the island's residents to rush to the <strong>farms</strong>, <strong>factories</strong>, <strong>missile bases</strong>, and <strong>defense facilities</strong>. The rushed locations will be destroyed.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Buried treasure</th>
|
||||
<td>This is a lucky occurrence rather than a disaster, but sometimes <strong>buried treasure</strong> will suddenly be unearthed while performing <strong>ground leveling</strong> (this won't happen while using quick ground leveling).</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<hr>
|
||||
|
||||
<h2>What should I do first?</h2>
|
||||
<p>After being given the vague instruction of "go develop" and little else, you may be wondering what to do. You're not required to follow this, but here's <strong>an example of how to proceed in the early stages of the game</strong>.</p>
|
||||
|
||||
<h3>First, farms</h3>
|
||||
<p>The first thing we need to do is <strong>farm development</strong> in order to procure food. Since there's a chance that <strong>villages</strong> will be built around the <strong>farm</strong>, it might be a good idea to build it on <strong>plains</strong> in an area where nobody currently lives.</p>
|
||||
<p>The initial island population is only 1,000, but it will soon increase, so it's recommended to have at least 3 <strong>farms</strong>.</p>
|
||||
|
||||
<h3>Let's increase the population</h3>
|
||||
<p>If you have <strong>plains</strong> next to an area where people are living, a village may create itself. The population of the village will increase rapidly. If you don't have enough plains, use <strong>ground leveling</strong> on <strong>wastelands</strong> etc. to make more usable land.</p>
|
||||
<p>However, no matter how much your population grows, if you don't provide a place for people to work, all they'll be able to do is eat food. Since there are only 10,000 people per <strong>farm</strong>, we should build a <strong>factory</strong>. The ideal situation is to have all the island's residents working at all times.</p>
|
||||
<p>Of course, <strong>factories</strong> are expensive, so you may not have enough <strong>funds</strong>. In that case, you can export <strong>food</strong>, <strong>deforest</strong> your <strong>forests</strong>, use <strong>cash flow</strong>, or borrow from other islands.</p>
|
||||
|
||||
<h3>Don't forget about military</h3>
|
||||
<p>When your population reaches 100,000, <strong>monsters</strong> may appear. Additionally, even if you don't get attacked by <strong>monsters</strong>, you may be attacked by other islands. In such cases, the single <strong>missile base</strong> you've had since the start isn't enough to rely on, so even though it may be tough in terms of <strong>funds</strong>, it's better to have at least <strong>3 missile bases</strong>.</p>
|
||||
|
||||
<h3>Now the rest is up to you...</h3>
|
||||
<p>Once your population is growing steadily and you have enough places for people to work, you'll have more funds available. From here, you'll be able to expand your island via <strong>landfilling</strong>, among other things. Develop your island however you see fit; whether you want to focus on your island's landscape, increasing it's population, winning awards, or becoming a military nation.</p>
|
||||
|
||||
<hr>
|
||||
|
||||
<h2>Miscellaneous</h2>
|
||||
<p>If you have any other questions about the rules, please ask them on the bulletin board. Depending on the importance of the question, we may add it somewhere in the beginner, intermediate, or advanced manual.</p>
|
||||
|
||||
<p>For more detailed explanations, please see the <a href="./intermediate.html">intermediate manual</a> and <a href="./advanced.html">advanced manual</a>.</p>
|
||||
|
||||
<hr>
|
||||
|
||||
<div id="footer">
|
||||
<p><a href="/hakoniwa2/">Top page</a></p>
|
||||
<p>Original author: Hiroki Tokuoka (<span lang="ja">徳岡宏樹</span>)</p>
|
||||
<p>Translated by <a href="https://www.heyuri.net/">Heyuri</a></p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
472
manual/intermediate.html
Normal file
|
@ -0,0 +1,472 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="description" content="Learn how to play Hakoniwa Islands 2.">
|
||||
<title>Manual (Intermediate) - Hakoniwa Islands 2</title>
|
||||
<link rel="shortcut icon" href="/favicon.ico">
|
||||
<link rel="stylesheet" href="/css/global.css">
|
||||
<link rel="stylesheet" href="/hakoniwa2/css/main.css">
|
||||
<script src="/scripts/oldborders.js"></script>
|
||||
<style>
|
||||
body {
|
||||
background-color: #ffffff;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
a:link {
|
||||
color: #00c000;
|
||||
}
|
||||
|
||||
a:active {
|
||||
color: #008000;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 0;
|
||||
font-size: 3em;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
h2 {
|
||||
margin: 0.67em 0;
|
||||
font-size: 2em;
|
||||
}
|
||||
|
||||
h3 {
|
||||
margin: 1em 0;
|
||||
font-size: 1.5em;
|
||||
}
|
||||
|
||||
h4 {
|
||||
margin: 1em 0;
|
||||
font-size: 1.166667em;
|
||||
}
|
||||
|
||||
table {
|
||||
border: 1px outset;
|
||||
}
|
||||
|
||||
th,
|
||||
td {
|
||||
border: 1px inset;
|
||||
}
|
||||
|
||||
th {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
img {
|
||||
vertical-align: text-bottom;
|
||||
}
|
||||
|
||||
.imageContainer {
|
||||
margin: 1em 0;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.imageContainer img {
|
||||
border: 2px ridge #cccccc;
|
||||
height: auto;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
#mapTable img {
|
||||
display: block;
|
||||
}
|
||||
|
||||
#levelTable,
|
||||
#awardTable td:nth-of-type(2),
|
||||
#monsterTable {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.diagramTile {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
#footer {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
@media screen and (max-device-width: 480px) {
|
||||
h1 {
|
||||
font-size: 2em;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 1.5em;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 1.25em;
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: 1em;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div><a href="/home.php">Home</a> / <a href="../">Return</a></div>
|
||||
|
||||
<hr>
|
||||
|
||||
<h1>Hakoniwa Islands 2 Manual (Intermediate)</h1>
|
||||
|
||||
<hr>
|
||||
|
||||
<p>This page explains aspects of the game that were left out of the <a href="./beginner.html">beginner's manual</a>. Once your island has grown to a certain extent, you'll start needing the information here. For more detailed information, please refer to the <a href="./advanced.html">advanced manual</a>.</p>
|
||||
|
||||
<hr>
|
||||
|
||||
<h2>Terrain details</h2>
|
||||
<h3>Terrains that weren't covered in the beginner's manual</h3>
|
||||
<table id="mapTable">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Undersea base</th>
|
||||
<td><img class="diagramTile" src="../images/land12.gif" alt="Undersea base" width="32" height="32"></td>
|
||||
<td>Similar to the <strong>missile base</strong>, but this one is built in the sea. It just looks like sea to tourists. It can't be built in <strong>shallow sea</strong>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Offshore oil field</th>
|
||||
<td><img class="diagramTile" src="../images/land16.gif" alt="Offshore oil field" width="32" height="32"></td>
|
||||
<td>It can be found by <strong>excavating</strong> the <strong>sea</strong>. An <strong>offshore oil field</strong> can bring in as much as 1000M$ per turn. However, it'll eventually run dry.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Monument</th>
|
||||
<td><img class="diagramTile" src="../images/monument0.gif" alt="Monument" width="32" height="32"></td>
|
||||
<td>It <strong>costs a huge amount of funds</strong> to build, and generally speaking it's not particularly useful. Perhaps you can use them to <strong>raise national prestige</strong>. They have some minor benefits, such as being immune to <strong>monsters</strong> and being able to prevent fires like <strong>forests</strong>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Facade</th>
|
||||
<td><img class="diagramTile" src="../images/land10.gif" alt="Facade" width="32" height="32"></td>
|
||||
<td>It's a <strong>facade</strong> that has the appearance of a <strong>defense facility</strong>. It's very cheap. As long as you have this on your island, you can be sure that others will be too scared to attack you. Beyond that, it doesn't actually do anything.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h3>About villages, towns, and cities</h3>
|
||||
<p><strong>Plains</strong> have a <strong>20% chance on every turn</strong> of generating a <strong>village</strong> with a <strong>population of 100 people</strong> if there's at least one <strong>village</strong>, <strong>town</strong>, <strong>city</strong>, or <strong>farm</strong> in the surrounding area.</p>
|
||||
<p>The population of <strong>villages and towns</strong> will increase by <strong>100 to 1,000 people on each turn</strong>. Their population will increase by <strong>100 to 3,000 people</strong> on turns where <strong>island promotion</strong> is performed. They'll develop into <strong>towns and cities</strong> when they reach populations of <strong>3,000 and 10,000 people</strong> respectively.</p>
|
||||
<p>The population of a <strong>city</strong> will not increase by itself. However, the population will increase by <strong>100 to 300 people</strong> on turns where <strong>island promotion</strong> is performed. Additionally, when <strong>refugees</strong> are accepted, they'll be hosted in <strong>cities</strong>. The maximum population of a city is <strong>20,000 people</strong>. Regarding <strong>refugees</strong>, they'll be explained in the <strong>"About missiles"</strong> section.</p>
|
||||
|
||||
<h3>Forests</h3>
|
||||
<p>Forests have between <strong>100 and 2,000 trees</strong>. The number of trees increases by <strong>100 trees per turn</strong>. When you use <strong>afforestation</strong>, the <strong>forest</strong> will initially have only <strong>100 trees</strong>. If you use <strong>deforestation</strong>, you can sell the trees, but you can't <strong>deforest</strong> only a portion of the trees; you must sell the entire <strong>forest</strong> tile. Every <strong>100 trees is worth 5M$</strong>.</p>
|
||||
|
||||
<h3>Farms, factories, and mountains (mines)</h3>
|
||||
<p><strong>Farms</strong> and <strong>factories</strong> allow people to work. People can also work on <strong>mountains</strong> if you develop them into <strong>mines</strong>.</p>
|
||||
<p>When <strong>farm development</strong> is first used to build a <strong>farm</strong>, it has a maximum capacity of <strong>10,000 people</strong>, but if you repeatedly use <strong>farm development</strong> on the same location, the maximum capacity of the farm will increase by <strong>2,000 people</strong> each time. The maximum capacity is <strong>50,000 people</strong>.</p>
|
||||
<p>The same is true for <strong>factories</strong>, but their maximum capacity is increased by <strong>10,000 people</strong> per <strong>factory construction</strong>. Their maximum capacity is <strong>100,000 people</strong>.</p>
|
||||
<p><strong>Mountains</strong> can be increased up to a maximum capacity of <strong>200,000 people</strong>, which increases by <strong>5,000 people</strong> per <strong>mine development</strong>.</p>
|
||||
<p>For convenience, you can specify a quantity when planning <strong>farm development</strong> etc. on a single location, which will make it perform the plan several turns in a row. The plan will be repeated for the specified number of turns.</p>
|
||||
|
||||
<h3>Defense facilities</h3>
|
||||
<p>If you perform <strong>defense facility construction</strong> on a location where a <strong>defense facility</strong> already exists, you can cause the <strong>defense facility</strong> to self-destruct. If there is a monster <strong>within a 2-tile radius</strong>, the monster can be destroyed with a single blow (with considerable damage to the island, of course). Note, however, that the <strong>monster</strong> may move outside the radius before the self-destruction occurs. Additionally, even if you don't intend it to self-destruct, the <strong>monster</strong> will automatically cause a self-destruction if it reaches a defense facility.</p>
|
||||
|
||||
<hr>
|
||||
|
||||
<h2>Development plans</h2>
|
||||
<h3>Development plans that weren't covered in the beginner's manual</h3>
|
||||
<table id="planTable">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Development plan</th>
|
||||
<th>Elements to specify</th>
|
||||
<th>Explanation</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Quick ground leveling (100M$)</th>
|
||||
<th>Coordinates</th>
|
||||
<td>Similar to <strong>ground leveling</strong>, <strong>quick ground leveling</strong> is used to turn <strong>wastelands</strong> into <strong>plains</strong>. The difference is that <strong>quick ground leveling</strong> <strong>does not advance the turn</strong>, in addition to being more expensive.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Excavation (200M$)</th>
|
||||
<th>Coordinates (quantity)</th>
|
||||
<td>Excavates land and turns it into <strong>shallow sea</strong>. If you excavate <strong>shallow sea</strong>, it becomes normal <strong>sea</strong>.<br> Also, if carried out on <strong>sea</strong>, <strong>offshore oil fields</strong> may be discovered. In this case, please specify a <strong>quantity</strong> to determine the budget to be used. Each quantity adds an additional 200M$, which increases the oil field discovery rate by 1%.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Undersea base construction (8000M$)</th>
|
||||
<th>Coordinates</th>
|
||||
<td>Builds an <strong>undersea base</strong> in the <strong>sea</strong>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Monument construction (9999M$)</th>
|
||||
<th>Coordinates (target)</th>
|
||||
<td>Builds a <strong>monument</strong> on the <strong>plains</strong>.<br> Additionally, if you build one on a location where one already exists, it will fly to the island you set as the <strong>target</strong>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Facade installation (1M$)</th>
|
||||
<th>Coordinates</th>
|
||||
<td>Builds a <strong>facade</strong> on the <strong>plains</strong>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Dispatch monster (3000M$)</th>
|
||||
<th>Target</th>
|
||||
<td>Sends a <strong>man-made monster</strong> to the <strong>target</strong> island.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Island promotion (1000M$)</th>
|
||||
<th>None</th>
|
||||
<td>Your population is more likely to increase on turns where <strong>island promotion</strong> is used.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h3>Construction planning</h3>
|
||||
<p>Plans that involve "building something on the <strong>plains</strong>" such as <strong>afforestation</strong>, <strong>farm development</strong>, <strong>factory construction</strong>, <strong>missile base construction</strong>, <strong>defense facility construction</strong>, etc. can actually be implemented directly on <strong>villages</strong>, <strong>towns</strong>, and <strong>cities</strong>, in addition to the <strong>plains</strong> (this is a convenience feature that prevents <strong>villages</strong> from spawning on their own and disrupting your schedule).</p>
|
||||
|
||||
<h4>Landfill</h4>
|
||||
<p><strong>Landfill</strong> can only be used on <strong>sea that's adjacent to land</strong>.</p>
|
||||
<p>If <strong>landfill</strong> is used on normal <strong>sea</strong>, it'll become <strong>shallow sea</strong>.</p>
|
||||
<p>If <strong>landfill</strong> is used on <strong>shallow sea</strong>, it'll become <strong>wasteland</strong>. Additionally, if any adjacent <strong>sea (including shallow sea)</strong> is within 3 tiles, those tiles will become <strong>shallow sea</strong>.</p>
|
||||
|
||||
<h4>Excavation</h4>
|
||||
<p><strong>Excavation</strong> can turn <strong>mountains</strong> into <strong>wastelands</strong>, <strong>general land</strong> into <strong>shallow seas</strong>, and <strong>shallow seas</strong> into normal <strong>sea</strong>.</p>
|
||||
<p>Furthermore, <strong>excavation</strong> can be used to find <strong>oil fields</strong> when used on <strong>sea</strong>. In this case, specifying a <strong>quantity</strong> becomes relevant. The cost is proportional to the <strong>quantity</strong>, but the probability of finding an <strong>oil field</strong> is also proportional to the <strong>quantity</strong> (<strong>quantity x 1%</strong>).</p>
|
||||
<p>Once an <strong>oil field</strong> is found, you'll earn <strong>1000M$ per turn</strong> from that <strong>oil field</strong>. However, there's also a <strong>4% chance that it'll run dry each turn</strong>. Of course, if the oil field gets destroyed by a missile or a disaster before it's depleted, it'll be gone anyway.</p>
|
||||
|
||||
<hr>
|
||||
|
||||
<h2>Missiles</h2>
|
||||
<h3>Power</h3>
|
||||
<p>As a general rule, a missile will turn the location it lands on into <strong>wasteland</strong> with a single hit (or <strong>shallow sea</strong> in the case of <strong>land-destroying missiles</strong>). However, there are the following exceptions:</p>
|
||||
|
||||
<h4>Hitting sea, mountains, and undersea bases</h4>
|
||||
<p><strong>Sea (including shallow sea)</strong>, <strong>mountains</strong>, and <strong>undersea bases</strong> usually take no damage from regular missiles. In the case of <strong>land-destroying missiles</strong> however, <strong>shallow sea</strong> is turned into normal <strong>sea</strong>, <strong>undersea bases</strong> are turned into <strong>sea</strong>, and <strong>mountains</strong> are turned into <strong>wasteland</strong>.</p>
|
||||
|
||||
<h4>Hitting monsters</h4>
|
||||
<p><strong>Monsters</strong> have <strong>strength</strong>, and their <strong>strength is reduced by 1</strong> each time a missile hits them. They'll be defeated when their <strong>strength is reduced to 0</strong>.</p>
|
||||
<p>In the case of <strong>land-destroying missiles</strong> however, the entire <strong>land</strong> area where the <strong>monster</strong> is located will be submerged, so the monster will be defeated in a single hit.</p>
|
||||
|
||||
<h4>Hitting an offshore oil field</h4>
|
||||
<p>It will become <strong>sea</strong> instead of <strong>wasteland</strong>.</p>
|
||||
|
||||
<h3>Refugees</h3>
|
||||
<p>If a missile hits a <strong>village</strong>, <strong>town</strong>, or <strong>city</strong> of another country, that country's population will of course be reduced. Then, <strong style="font-size:1.5em;">for some inexplicable reason</strong>, <strong>roughly half of the refugees</strong> will show up in the <strong>country that launched the missile</strong>. <strong>Refugees</strong> are accepted into <strong>plains</strong>, <strong>villages</strong>, <strong>towns</strong>, and <strong>cities</strong> (their population will increase accordingly). Acceptance may take the form of a village of <strong>roughly 1,000 people on the plains</strong>, or an increase in the population of an existing <strong>village</strong>, <strong>town</strong>, or <strong>city</strong> by up to <strong>5,000 people</strong>.</p>
|
||||
|
||||
<p>Note that if you launch <strong>land-destroying missiles</strong> or <strong>stealth missiles</strong>, then <strong style="font-size:1.5em;">for some inexplicable reason</strong>, no refugees will appear.</p>
|
||||
|
||||
<h3>Level and experience</h3>
|
||||
<p><strong>Missile bases</strong> and <strong>undersea bases</strong> have <strong>levels</strong>. In the <strong>beginner's manual</strong>, it was implied that "the number of missiles fired is one missile per base", but in reality, multiple missiles can be fired from a single missile base as its level increases. Specifically, they can simultaneously fire <strong>as many missiles as they have levels</strong>. They'll start off at <strong>level 1</strong>.</p>
|
||||
<p>When a launched missile hits a <strong>village</strong>, <strong>town</strong>, or <strong>city</strong>, you'll receive <strong>experience</strong> according to its population (1 point for 2,000 people). If the missile hits a village with less than 2000 people, it won't count. <strong>Experience</strong> is also gained if a <strong>monster</strong> is killed by a missile (but <strong>not by a land-destroying missile</strong>).</p>
|
||||
<p>Level increases are as follows:</p>
|
||||
<table id="levelTable">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Level</th>
|
||||
<th>Missile base exp</th>
|
||||
<th>Undersea base exp</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td>0</td>
|
||||
<td>0</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2</td>
|
||||
<td>20</td>
|
||||
<td>50</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>3</td>
|
||||
<td>60</td>
|
||||
<td>200</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>4</td>
|
||||
<td>120</td>
|
||||
<td>-</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>5</td>
|
||||
<td>200</td>
|
||||
<td>-</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<h3>Point of impact</h3>
|
||||
<p>Even when multiple missiles are launched, they'll all be fired towards the <strong>same target location</strong>. Despite them all having the same target location, the actual point of impact may be different for each missile, as <strong>there's a margin of error regarding where exactly each missile will fall</strong>. Of course, sometimes they'll all land in the same place and end up being a wasted shot.</p>
|
||||
<p>A <strong>missile with an error margine of 1 tile</strong> will land <strong>anywhere within a range of 7 tiles</strong>: the target location and its 6 adjacent tiles. A <strong>missile with an error margin of 2 tiles</strong> will land <strong>anywhere within a range of 19 tiles</strong>: the previous range plus an additional 12 tiles around that.</p>
|
||||
<p>To illustrate, a <strong>missile with an error margin of 1 tile</strong> aiming at the city in the middle of the diagram below will land anywhere on the <strong>city</strong> or <strong>plains</strong>.</p>
|
||||
<p>A <strong>missile with an error margin of 2 tiles</strong> will land anywhere on the <strong>city</strong>, <strong>plains</strong>, or <strong>wastelands</strong>.</p>
|
||||
|
||||
<div style="margin:1em 0">
|
||||
<img class="diagramTile" src="../images/land0.gif" alt="Sea" width="32" height="32"><img class="diagramTile" src="../images/land1.gif" alt="Wasteland" width="32" height="32"><img class="diagramTile" src="../images/land1.gif" alt="Wasteland" width="32" height="32"><img class="diagramTile" src="../images/land1.gif" alt="Wasteland" width="32" height="32"><img class="diagramTile" src="../images/land0.gif" alt="Sea" width="32" height="32"><br>
|
||||
<img class="diagramTile" src="../images/space.gif" alt="Sea" width="16" height="32"><img class="diagramTile" src="../images/land1.gif" alt="Wasteland" width="32" height="32"><img class="diagramTile" src="../images/land2.gif" alt="Plains" width="32" height="32"><img class="diagramTile" src="../images/land2.gif" alt="Plains" width="32" height="32"><img class="diagramTile" src="../images/land1.gif" alt="Wasteland" width="32" height="32"><img class="diagramTile" src="../images/space.gif" alt="Sea" width="16" height="32"><br>
|
||||
<img class="diagramTile" src="../images/land1.gif" alt="Wasteland" width="32" height="32"><img class="diagramTile" src="../images/land2.gif" alt="Plains" width="32" height="32"><img class="diagramTile" src="../images/land5.gif" alt="City" width="32" height="32"><img class="diagramTile" src="../images/land2.gif" alt="Plains" width="32" height="32"><img class="diagramTile" src="../images/land1.gif" alt="Wasteland" width="32" height="32"><br>
|
||||
<img class="diagramTile" src="../images/space.gif" alt="Sea" width="16" height="32"><img class="diagramTile" src="../images/land1.gif" alt="Wasteland" width="32" height="32"><img class="diagramTile" src="../images/land2.gif" alt="Plains" width="32" height="32"><img class="diagramTile" src="../images/land2.gif" alt="Plains" width="32" height="32"><img class="diagramTile" src="../images/land1.gif" alt="Wasteland" width="32" height="32"><img class="diagramTile" src="../images/space.gif" alt="Sea" width="16" height="32"><br>
|
||||
<img class="diagramTile" src="../images/land0.gif" alt="Sea" width="32" height="32"><img class="diagramTile" src="../images/land1.gif" alt="Wasteland" width="32" height="32"><img class="diagramTile" src="../images/land1.gif" alt="Wasteland" width="32" height="32"><img class="diagramTile" src="../images/land1.gif" alt="Wasteland" width="32" height="32"><img class="diagramTile" src="../images/land0.gif" alt="Sea" width="32" height="32"><br>
|
||||
</div>
|
||||
|
||||
<p>There's an <strong>equal chance of it landing on any tile</strong> within those ranges. <strong>It's not any more likely to land at the center of a target</strong>. Additionally, if you aim towards the edges of the map, it may land outside of the map.</p>
|
||||
|
||||
<hr>
|
||||
|
||||
<h2>Awards</h2>
|
||||
<p>By achieving goals, you'll receive awards. When you win an award, an icon will appear beside the name of your island. The following awards are available:</p>
|
||||
<table id="awardTable">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Award name</th>
|
||||
<th>Icon</th>
|
||||
<th>Condition</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Turn cup</td>
|
||||
<td><img src="../images/prize0.gif" alt="Turn cup" width="16" height="16"></td>
|
||||
<td>Awarded to <strong>the island with the highest population on every hundredth turn</strong>. The 100-turn cup, the 200-turn cup, and so on.</td>
|
||||
</tr>
|
||||
<td>Prosperity award</td>
|
||||
<td><img src="../images/prize1.gif" alt="Prosperity award" width="16" height="16"></td>
|
||||
<td>Obtained by reaching a <strong>population of 300,000 people</strong>.</td>
|
||||
</tr>
|
||||
</tr>
|
||||
<td>Super prosperity award</td>
|
||||
<td><img src="../images/prize2.gif" alt="Super prosperity award" width="16" height="16"></td>
|
||||
<td>Same as above but <strong>500,000 people</strong>.</td>
|
||||
</tr>
|
||||
</tr>
|
||||
<td>Ultimate prosperity award</td>
|
||||
<td><img src="../images/prize3.gif" alt="Ultimate prosperity award" width="16" height="16"></td>
|
||||
<td>Same as above but <strong>1,000,000 people</strong>.</td>
|
||||
</tr>
|
||||
</tr>
|
||||
<td>Peace award</td>
|
||||
<td><img src="../images/prize4.gif" alt="Peace award" width="16" height="16"></td>
|
||||
<td>Obtained by <strong>accepting 20,000 refugees in one go</strong>.</td>
|
||||
</tr>
|
||||
</tr>
|
||||
<td>Super peace award</td>
|
||||
<td><img src="../images/prize5.gif" alt="Super peace award" width="16" height="16"></td>
|
||||
<td>Same as above but <strong>50,000 people</strong>.</td>
|
||||
</tr>
|
||||
</tr>
|
||||
<td>Ultimate peace award</td>
|
||||
<td><img src="../images/prize6.gif" alt="Ultimate peace award" width="16" height="16"></td>
|
||||
<td>Same as above but <strong>80,000 people</strong>.</td>
|
||||
</tr>
|
||||
</tr>
|
||||
<td>Disaster award</td>
|
||||
<td><img src="../images/prize7.gif" alt="Disaster award" width="16" height="16"></td>
|
||||
<td>Obtained when your <strong>population decreases by 50,000 people</strong> compared to the previous turn.</td>
|
||||
</tr>
|
||||
</tr>
|
||||
<td>Super disaster award</td>
|
||||
<td><img src="../images/prize8.gif" alt="Super disaster award" width="16" height="16"></td>
|
||||
<td>Same as above but <strong>100,000 people</strong>.</td>
|
||||
</tr>
|
||||
</tr>
|
||||
<td>Ultimate disaster award</td>
|
||||
<td><img src="../images/prize9.gif" alt="Ultimate disaster award" width="16" height="16"></td>
|
||||
<td>Same as above but <strong>200,000 people</strong>.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>Higher awards must be obtained in order. In other words, you must have already won the <strong>peace award</strong> before you can win the <strong>super peace award</strong>.</p>
|
||||
|
||||
<hr>
|
||||
|
||||
<h2>During a food shortage</h2>
|
||||
<p>If there's even the slightest shortage of food, there'll be a <strong>food shortage</strong>. When this happens, the population of <strong>villages</strong>, <strong>towns</strong>, and <strong>cities</strong> will naturally decline by <strong>100 to 3,000 people per turn</strong>, whereas normally there'd be a natural increase in population.</p>
|
||||
<p>Additionally, <strong>farms</strong>, <strong>factories</strong>, <strong>missile bases</strong>, and <strong>defense facilities</strong> will be destroyed.</p>
|
||||
|
||||
<hr>
|
||||
|
||||
<h2>Types of monster</h2>
|
||||
<p>There are the following types of <strong>monster</strong>:</p>
|
||||
<table id="monsterTable">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Appearance</th>
|
||||
<th>Strength</th>
|
||||
<th>Experience/Remains value</th>
|
||||
<th>Min. population for occurrance</th>
|
||||
<th>Remarks</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Inora</td>
|
||||
<td><img class="diagramTile" src="../images/monster0.gif" alt="Inora" width="32" height="32"></td>
|
||||
<td>1-2</td>
|
||||
<td>5/400</td>
|
||||
<td>100,000 ppl.</td>
|
||||
<td>-</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Sanjira</td>
|
||||
<td><img class="diagramTile" src="../images/monster5.gif" alt="Sanjira" width="32" height="32"></td>
|
||||
<td>1-2</td>
|
||||
<td>7/500</td>
|
||||
<td>100,000 ppl.</td>
|
||||
<td>Hardens (becomes immune to missile attacks) on odd-numbered turns</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Red Inora</td>
|
||||
<td><img class="diagramTile" src="../images/monster1.gif" alt="Red Inora" width="32" height="32"></td>
|
||||
<td>3-4</td>
|
||||
<td>12/1000</td>
|
||||
<td>250,000 ppl.</td>
|
||||
<td>-</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Dark Inora</td>
|
||||
<td><img class="diagramTile" src="../images/monster2.gif" alt="Dark Inora" width="32" height="32"></td>
|
||||
<td>2-3</td>
|
||||
<td>15/800</td>
|
||||
<td>250,000 ppl.</td>
|
||||
<td>May move 2 tiles per turn</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Inora Ghost</td>
|
||||
<td><img class="diagramTile" src="../images/monster8.gif" alt="Inora Ghost" width="32" height="32"></td>
|
||||
<td>1</td>
|
||||
<td>10/300</td>
|
||||
<td>250,000 ppl.</td>
|
||||
<td>It's unknown how many tiles it can move per turn</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Kujira</td>
|
||||
<td><img class="diagramTile" src="../images/monster6.gif" alt="Kujira" width="32" height="32"></td>
|
||||
<td>4-5</td>
|
||||
<td>20/1500</td>
|
||||
<td>400,000 ppl.</td>
|
||||
<td>Hardens (becomes immune to missile attacks) on even-numbered turns</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>King Inora</td>
|
||||
<td><img class="diagramTile" src="../images/monster3.gif" alt="King Inora" width="32" height="32"></td>
|
||||
<td>5-6</td>
|
||||
<td>30/2000</td>
|
||||
<td>400,000 ppl.</td>
|
||||
<td>-</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Mecha Inora</td>
|
||||
<td><img class="diagramTile" src="../images/monster7.gif" alt="Mecha Inora" width="32" height="32"></td>
|
||||
<td>2</td>
|
||||
<td>5/0</td>
|
||||
<td>-</td>
|
||||
<td>Man-made monster</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<hr>
|
||||
|
||||
<p>For more detailed explanations, please see the <a href="./advanced.html">advanced manual</a>.</p>
|
||||
|
||||
<hr>
|
||||
|
||||
<div id="footer">
|
||||
<p><a href="/hakoniwa2/">Top page</a></p>
|
||||
<p>Original author: Hiroki Tokuoka (<span lang="ja">徳岡宏樹</span>)</p>
|
||||
<p>Translated by <a href="https://www.heyuri.net/">Heyuri</a></p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
BIN
manual/man-discovered.png
Normal file
After Width: | Height: | Size: 44 KiB |
BIN
manual/man-goto.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
manual/man-listed.png
Normal file
After Width: | Height: | Size: 964 B |
BIN
manual/man-name.png
Normal file
After Width: | Height: | Size: 4.4 KiB |
BIN
manual/man-new.png
Normal file
After Width: | Height: | Size: 964 B |
BIN
manual/man-owner.png
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
manual/man-ownerm.png
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
manual/man-register.png
Normal file
After Width: | Height: | Size: 4.2 KiB |
BIN
manual/man-tourist.png
Normal file
After Width: | Height: | Size: 16 KiB |