# ------------------------- #
# Sub Condition
# ペットのコンディション
# ------------------------- #
sub condition {
print "</td>\n";
print "</tr>\n";
# 一定期間餌をあげないと死んでしまう。
if (time >= $lastfeed + $daysec * $deadline) {
$noaction = 1;
$deadover = &checkday($lastfeed);
print "<tr>\n";
print "<td>\n";
&tabletop;
&petnow($dead_img,"$petnameは死にました。<br>死後$deadover日経っています。");
print "<tr>";
print "<td align=\"right\">\n";
&input('hidden','mode','nopet','','');
&input('hidden','name',$FORM{'name'},'','');
&input('hidden','pass',$FORM{'pass'},'','');
print "新しいペットを飼う\n";
&input('submit','','OK','','');
&tablebottom;
print "</td>\n";
print "</tr>\n";
return;
}
# 遊べる時間になるまでは固定画面(他の改造より上に)
if ($enter == 1) {
$disp_img ='kotei.gif'; # 固定画面の画像ファイル名
$disp_msg ="まだ遊べません。"; # 固定画面のメッセージ
&petnow($disp_img,$disp_msg);
return;
}
# 外出中の処理
if ($out == 1 && (time - $outdate) < $dayhour[$comeback]) {
&petnow($gone_img,$out_msg);
$noaction = 1;
return;
} else {$out = 0;}
|