Пример #1
0
function JudgeList()
{
    // 自動読み込み(forでループさせてるから無駄な処理)
    if (JUDGE_LIST_AUTO_LOAD) {
        for ($i = 1000; $i < 2500; $i++) {
            if (LoadJudgeData($i) !== false) {
                $list[] = $i;
            }
        }
        return $list;
        // 手動(追加した判断は自分で書き足せ)
    } else {
        return array(1000, 1001, 1099, 1100, 1101, 1105, 1106, 1110, 1111, 1121, 1125, 1126, 1199, 1200, 1201, 1205, 1206, 1210, 1211, 1221, 1225, 1226, 1399, 1400, 1401, 1405, 1406, 1410, 1449, 1450, 1451, 1455, 1456, 1499, 1500, 1501, 1505, 1506, 1510, 1511, 1549, 1550, 1551, 1555, 1556, 1560, 1561, 1599, 1600, 1610, 1611, 1612, 1613, 1614, 1615, 1616, 1617, 1618, 1699, 1700, 1701, 1710, 1711, 1712, 1715, 1716, 1717, 1749, 1750, 1751, 1752, 1755, 1756, 1757, 1799, 1800, 1801, 1805, 1819, 1820, 1821, 1825, 1839, 1840, 1841, 1845, 1849, 1850, 1851, 1855, 1899, 1900, 1901, 1902, 1919, 1920, 1939, 1940);
    }
}
Пример #2
0
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>JudgeLists</title>
</head>
<body>
<?
include("../data/data.judge_setup.php");
for($i=1000; $i<9999; $i++) {
	$j	= LoadJudgeData($i);
	if($j) {
		print("case {$i}:// {$j[exp]}<br />");
		$list[]	= $i;
	}
}
print("array(<br />\n");
foreach($list as $var) {
	$A++;
	print("$var, ");
	if($A%5==0)
		print("<br />\n");
}
print("<br />\n);");
?>
</body>
</html>
Пример #3
0
    function CharStatShow()
    {
        $char =& $this->char[$_GET["char"]];
        if (!$char) {
            print "Not exists";
            return false;
        }
        // 戦闘用変数の設定。
        $char->SetBattleVariable();
        // 職データ
        $JobData = LoadJobData($char->job);
        // 転職可能な職
        if ($JobData["change"]) {
            include_once DATA_CLASSCHANGE;
            foreach ($JobData["change"] as $job) {
                if (CanClassChange($char, $job)) {
                    $CanChange[] = $job;
                }
                //転職できる候補。
            }
        }
        ////// ステータス表示 //////////////////////////////
        ?>
<form action="?char=<?php 
        print $_GET["char"];
        ?>
" method="post" style="padding:5px 0 0 15px">
<?php 
        // その他キャラ
        print '<div style="padding-top:5px">';
        foreach ($this->char as $key => $val) {
            //if($key == $_GET["char"]) continue;//表示中キャラスキップ
            echo "<a href=\"?char={$key}\">{$val->name}</a>  ";
        }
        print "</div>";
        ?>
<h4>人物状态 <a href="?manual#charstat" target="_blank" class="a0">?</a></h4>
<?php 
        $char->ShowCharDetail();
        // 改名
        if ($this->item["7500"]) {
            print '<input type="submit" class="btn" name="rename" value="ChangeName">' . "\n";
        }
        // ステータスリセット系
        if ($this->item["7510"] || $this->item["7511"] || $this->item["7512"] || $this->item["7513"] || $this->item["7520"]) {
            print '<input type="submit" class="btn" name="showreset" value="重置">' . "\n";
        }
        ?>
<input type="submit" class="btn" name="byebye" value="剔除">
</form>
<?php 
        // ステータス上昇 ////////////////////////////
        if (0 < $char->statuspoint) {
            print <<<HTML
\t<form action="?char={$_GET['char']}" method="post" style="padding:0 15px">
\t<h4>Status <a href="?manual#statup" target="_blank" class="a0">?</a></h4>
HTML;
            $Stat = array("Str", "Int", "Dex", "Spd", "Luk");
            print "Point : {$char->statuspoint}<br />\n";
            foreach ($Stat as $val) {
                print "{$val}:\n";
                print "<select name=\"up{$val}\" class=\"vcent\">\n";
                for ($i = 0; $i < $char->statuspoint + 1; $i++) {
                    print "<option value=\"{$i}\">+{$i}</option>\n";
                }
                print "</select>";
            }
            print "<br />";
            print '<input type="submit" class="btn" name="stup" value="升值">';
            print "\n";
            print "</form>\n";
        }
        ?>
	<form action="?char=<?php 
        print $_GET["char"];
        ?>
" method="post" style="padding:0 15px">
	<h4>行动模式 <a href="?manual#jdg" target="_blank" class="a0">?</a></h4>
<?php 
        // Action Pattern 行動判定 /////////////////////////
        $list = JudgeList();
        // 行動判定条件一覧
        print "<table cellspacing=\"5\"><tbody>\n";
        for ($i = 0; $i < $char->MaxPatterns(); $i++) {
            print "<tr><td>";
            //----- No
            print $i + 1 . "</td><td>";
            //----- JudgeSelect(判定の種類)
            print "<select name=\"judge" . $i . "\">\n";
            foreach ($list as $val) {
                //判断のoption
                $exp = LoadJudgeData($val);
                print "<option value=\"{$val}\"" . ($char->judge[$i] == $val ? " selected" : NULL) . ($exp["css"] ? ' class="select0"' : NULL) . ">" . ($exp["css"] ? ' ' : '   ') . "{$exp[exp]}</option>\n";
            }
            print "</select>\n";
            print "</td><td>\n";
            //----- 数値(量)
            print "<input type=\"text\" name=\"quantity" . $i . "\" maxlength=\"4\" value=\"" . $char->quantity[$i] . "\" style=\"width:56px\" class=\"text\">";
            print "</td><td>\n";
            //----- //SkillSelect(技の種類)
            print "<select name=\"skill" . $i . "\">\n";
            foreach ($char->skill as $val) {
                //技のoption
                $skill = LoadSkillData($val);
                print "<option value=\"{$val}\"" . ($char->action[$i] == $val ? " selected" : NULL) . ">";
                print $skill["name"] . (isset($skill["sp"]) ? " - (SP:{$skill[sp]})" : NULL);
                print "</option>\n";
            }
            print "</select>\n";
            print "</td><td>\n";
            print '<input type="radio" name="PatternNumber" value="' . $i . '">';
            print "</td></tr>\n";
        }
        print "</tbody></table>\n";
        ?>
<input type="submit" class="btn" value="确定模式" name="ChangePattern">
<input type="submit" class="btn" value="设置 & 测试" name="TestBattle">
 <a href="?simulate">Simulate</a><br />
<input type="submit" class="btn" value="切换模式" name="PatternMemo">
<input type="submit" class="btn" value="添加" name="AddNewPattern">
<input type="submit" class="btn" value="删除" name="DeletePattern">
</form>
<form action="?char=<?php 
        print $_GET["char"];
        ?>
" method="post" style="padding:0 15px">
<h4>位置 & 保护<a href="?manual#posi" target="_blank" class="a0">?</a></h4>
<table><tbody>
<tr><td>位置(Position) :</td><td><input type="radio" class="vcent" name="position" value="front"
<?php 
        $char->position == "front" ? print " checked" : NULL;
        ?>
>前卫(Front)</td></tr>
<tr><td></td><td><input type="radio" class="vcent" name="position" value="back"
<?php 
        $char->position == "back" ? print " checked" : NULL;
        ?>
>后卫(Backs)</td></tr>
<tr><td>护卫(Guarding) :</td><td>
<select name="guard">
<?php 
        // 前衛の時の後衛守り //////////////////////////////
        $option = array("always" => "必定保护", "never" => "不保护", "life25" => "体力25%以上时保护", "life50" => "体力50%以上时保护", "life75" => "体力75%以上时保护", "prob25" => "25%的概率保护", "prpb50" => "50%的概率保护", "prob75" => "75%的概率保护");
        foreach ($option as $key => $val) {
            print "<option value=\"{$key}\"" . ($char->guard == $key ? " selected" : NULL) . ">{$val}</option>";
        }
        ?>
	</select>
	</td></tr>
	</tbody></table>
	<input type="submit" class="btn" value="设置">
	</form>
<?php 
        // 装備中の物表示 ////////////////////////////////
        $weapon = LoadItemData($char->weapon);
        $shield = LoadItemData($char->shield);
        $armor = LoadItemData($char->armor);
        $item = LoadItemData($char->item);
        $handle = 0;
        $handle = $weapon["handle"] + $shield["handle"] + $armor["handle"] + $item["handle"];
        ?>
	<div style="margin:0 15px">
	<h4>装备<a href="?manual#equip" target="_blank" class="a0">?</a></h4>
	<div class="bold u">Current Equip's</div>
	<table>
	<tr><td class="dmg" style="text-align:right">Atk :</td><td class="dmg"><?php 
        print $char->atk[0];
        ?>
</td></tr>
	<tr><td class="spdmg" style="text-align:right">Matk :</td><td class="spdmg"><?php 
        print $char->atk[1];
        ?>
</td></tr>
	<tr><td class="recover" style="text-align:right">Def :</td><td class="recover"><?php 
        print $char->def[0] . " + " . $char->def[1];
        ?>
</td></tr>
	<tr><td class="support" style="text-align:right">Mdef :</td><td class="support"><?php 
        print $char->def[2] . " + " . $char->def[3];
        ?>
</td></tr>
	<tr><td class="charge" style="text-align:right">handle :</td><td class="charge"><?php 
        print $handle;
        ?>
 / <?php 
        print $char->GetHandle();
        ?>
</td></tr>
	</table>
	<form action="?char=<?php 
        print $_GET["char"];
        ?>
" method="post">
	<table>
	<tr><td class="align-right">
	武器:</td><td><input type="radio" class="vcent" name="spot" value="weapon">
<?php 
        ShowItemDetail(LoadItemData($char->weapon));
        ?>
	</td></tr><tr><td class="align-right">
	盾:</td><td><input type="radio" class="vcent" name="spot" value="shield">
<?php 
        ShowItemDetail(LoadItemData($char->shield));
        ?>
	</td></tr><tr><td class="align-right">
	甲:</td><td><input type="radio" class="vcent" name="spot" value="armor">
<?php 
        ShowItemDetail(LoadItemData($char->armor));
        ?>
	</td></tr><tr><td class="align-right">
	道具:</td><td><input type="radio" class="vcent" name="spot" value="item">
<?php 
        ShowItemDetail(LoadItemData($char->item));
        ?>
	</td></tr></tbody>
	</table>
	<input type="submit" class="btn" name="remove" value="卸下">
	<input type="submit" class="btn" name="remove_all" value="全卸">
	</form>
	</div>
<?php 
        // 装備可能な物表示 ////////////////////////////////
        if ($JobData["equip"]) {
            $EquipAllow = array_flip($JobData["equip"]);
        } else {
            $EquipAllow = array();
        }
        //装備可能な物リスト(反転)
        $Equips = array("Weapon" => "2999", "Shield" => "4999", "Armor" => "5999", "Item" => "9999");
        print "<div style=\"padding:15px 15px 0 15px\">\n";
        print "\t<div class=\"bold u\">拥有的 & 容许装备的</div>\n";
        if ($this->item) {
            include CLASS_JS_ITEMLIST;
            $EquipList = new JS_ItemList();
            $EquipList->SetID("equip");
            $EquipList->SetName("type_equip");
            // JSを使用しない。
            if ($this->no_JS_itemlist) {
                $EquipList->NoJS();
            }
            reset($this->item);
            //これが無いと装備変更時に表示されない
            foreach ($this->item as $key => $val) {
                $item = LoadItemData($key);
                // 装備できないので次
                if (!isset($EquipAllow[$item["type"]])) {
                    continue;
                }
                $head = '<input type="radio" name="item_no" value="' . $key . '" class="vcent">';
                $head .= ShowItemDetail($item, $val, true) . "<br />";
                $EquipList->AddItem($item, $head);
            }
            print $EquipList->GetJavaScript("list0");
            print $EquipList->ShowSelect();
            print '<form action="?char=' . $_GET["char"] . '" method="post">' . "\n";
            print '<div id="list0">' . $EquipList->ShowDefault() . '</div>' . "\n";
            print '<input type="submit" class="btn" name="equip_item" value="装备">' . "\n";
            print "</form>\n";
        } else {
            print "暂无道具.<br />\n";
        }
        print "</div>\n";
        /*
        print("\t<table><tbody><tr><td colspan=\"2\">\n");
        print("\t<span class=\"bold u\">Stock & Allowed to Equip</span></td></tr>\n");
        if($this->item):
        	reset($this->item);//これが無いと装備変更時に表示されない
        	foreach($Equips as $key => $val) {
        		print("\t<tr><td class=\"align-right\" valign=\"top\">\n");
        		print("\t{$key} :</td><td>\n");
        		while( substr(key($this->item),0,4) <= $val && substr(current($this->item),0,4) !== false ) {
        			$item	= LoadItemData(key($this->item));
        			if(!isset( $EquipAllow[ $item["type"] ] )) {
        				next($this->item);
        				continue;
        			}
        			print("\t");
        			print('<input type="radio" class="vcent" name="item_no" value="'.key($this->item).'">');
        			print("\n\t");
        			print(current($this->item)."x");
        			ShowItemDetail($item);
        			print("<br>\n");
        			next($this->item);
        		}
        		print("\t</td></tr>\n");
        	}
        else:
        	print("<tr><td>No items.</td></tr>");
        endif;
        print("\t</tbody></table>\n");
        */
        ?>
	<form action="?char=<?php 
        print $_GET["char"];
        ?>
" method="post" style="padding:0 15px">
	<h4>技能<a href="?manual#skill" target="_blank" class="a0">?</a></h4>
<?php 
        // スキル表示 //////////////////////////////////////
        //include(DATA_SKILL);//ActionPatternに移動
        include_once DATA_SKILL_TREE;
        if ($char->skill) {
            print '<div class="u bold">已掌握的</div>';
            print "<table><tbody>";
            foreach ($char->skill as $val) {
                print "<tr><td>";
                $skill = LoadSkillData($val);
                ShowSkillDetail($skill);
                print "</td></tr>";
            }
            print "</tbody></table>";
            print '<div class="u bold">新技能</div>';
            print "技能点 : {$char->skillpoint}";
            print "<table><tbody>";
            $tree = LoadSkillTree($char);
            foreach (array_diff($tree, $char->skill) as $val) {
                print "<tr><td>";
                $skill = LoadSkillData($val);
                ShowSkillDetail($skill, 1);
                print "</td></tr>";
            }
            print "</tbody></table>";
            //dump($char->skill);
            //dump($tree);
            print '<input type="submit" class="btn" name="learnskill" value="习得">' . "\n";
            print '<input type="hidden" name="learnskill" value="1">' . "\n";
        }
        // 転職 ////////////////////////////////////////////
        if ($CanChange) {
            ?>

	</form>
	<form action="?char=<?php 
            print $_GET["char"];
            ?>
" method="post" style="padding:0 15px">
	<h4>转职</h4>
	<table><tbody><tr>
<?php 
            foreach ($CanChange as $job) {
                print "<td valign=\"bottom\" style=\"padding:5px 30px;text-align:center\">";
                $JOB = LoadJobData($job);
                print '<img src="' . IMG_CHAR . $JOB["img_" . ($char->gender ? "female" : "male")] . '">' . "<br />\n";
                //画像
                print '<input type="radio" value="' . $job . '" name="job">' . "<br />\n";
                print $JOB["name_" . ($char->gender ? "female" : "male")];
                print "</td>";
            }
            ?>

	</tr></tbody></table>
	<input type="submit" class="btn" name="classchange" value="转职">
	<input type="hidden" name="classchange" value="1">
<?php 
        }
        ?>

	</form>
<?php 
        //その他キャラ
        print '<div  style="padding:15px">';
        foreach ($this->char as $key => $val) {
            //if($key == $_GET["char"]) continue;//表示中キャラスキップ
            echo "<a href=\"?char={$key}\">{$val->name}</a>  ";
        }
        print '</div>';
    }
Пример #4
0
            $judgeString .= $_POST["judge" . $i] . ", ";
            $quantityString .= $_POST["quantity" . $i] . ", ";
            $skillString .= $_POST["skill" . $i] . ", ";
        }
    }
    $judgeString .= "),\n";
    $quantityString .= "),\n";
    $skillString .= "),\n";
    print '<textarea style="width:800px;height:100px">';
    print $judgeString . $quantityString . $skillString;
    print "</textarea>\n";
}
// 判定の種類
include "../data/data.judge_setup.php";
for ($i = 1000; $i < 10000; $i++) {
    $judge = LoadJudgeData($i);
    if (!$judge) {
        continue;
    }
    $judgeList["{$i}"]["exp"] = $judge["exp"];
    if ($judge["css"]) {
        $judgeList["{$i}"]["css"] = true;
    }
}
// 全スキル
include "../data/data.skill.php";
for ($i = 1000; $i < 10000; $i++) {
    $skill = LoadSkillData($i);
    if (!$skill) {
        continue;
    }
Пример #5
0
function JudgeSelect($selected = false)
{
    static $judge = array();
    if (!$judge) {
        for ($j = 1000; $j < 4000; $j++) {
            if ($load = LoadJudgeData($j)) {
                $judge[$j] = $load["exp"];
            }
            //"<option value=\"{$j}\">{$judge[exp2]}</option>";
        }
    }
    foreach ($judge as $key => $val) {
        if ($key == $selected) {
            print "<option value=\"{$key}\" selected>{$val}</option>\n";
            continue;
        }
        print "<option value=\"{$key}\">{$val}</option>\n";
    }
}
Пример #6
0
 //position
 print "<td>{$m[guard]}</td>";
 //guard
 // 行動手順
 print "</tr>\n";
 print "<tr><td colspan=\"13\" style=\"text-align:left\">";
 print "<table><tbody>";
 /*
 $Pattern	= explode("|",$m["Pattern"]);
 $m["judge"]	= explode("<>",$Pattern[0]);
 $m["quantity"]	= explode("<>",$Pattern[1]);
 $m["action"]	= explode("<>",$Pattern[2]);
 */
 foreach ($m["judge"] as $key => $val) {
     print "<tr><td>";
     $judge = LoadJudgeData($val);
     print $judge["exp"];
     print "</td><td>";
     print $m["quantity"]["{$key}"];
     print "</td><td>";
     $skill = LoadSkillData($m["action"]["{$key}"]);
     //print($skill[name]);
     ShowSkillDetail($skill);
     print "</td></tr>";
 }
 // 落とすアイテム
 if ($m[itemtable]) {
     print '<tr><td colspan="3">';
     print "<table><tbody>";
     $dif = 0;
     foreach ($m[itemtable] as $itemno => $prob) {