Commit b381b632 authored by hisuinohoshi's avatar hisuinohoshi

Update ach

变化:
- 在账户界面新增“查看累计游戏记录”选项,暂时只收录了原本的部分道具合成成就。未来将逐步更新对玩家击杀、合成、探索等方面的简单记录,并收录于该页面内;
- 为套装、累计每日任务成就添加了对应图标;
- 添加了通过元素合成达成幻境解离结局的隐藏成就;
parent ce108f05
<?php
define('CURSCRIPT', 'achclear');
require './include/common.inc.php';
if(!$udata) { gexit($_ERROR['no_login'],__file__,__line__); }
if($udata['password'] != $cpass) { gexit($_ERROR['wrong_pw'], __file__, __line__); }
elseif(($udata['groupid'] <= 1)&&($cuser!==$gamefounder)) { gexit($_ERROR['no_admin'], __file__, __line__); }
$action = !empty($_POST['action']) ? $_POST['action'] : $_GET['action'];
if(empty($action))
{
echo '点击开始批量转换用户成就数据<br>
(操作前,请手动备份用户表数据,以避免数据丢失)<br>
<a href="achclear.php?action=start" style="text-decoration: none">
<span><font color="green">[开始]</font></span>
</a><br><br>';
}
if (isset($action) && $action=='start')
{
# 将旧成就数据格式转为新格式
header('Location: achclear.php');
}
?>
\ No newline at end of file
......@@ -30,27 +30,39 @@ $ach_type = Array
),
'mixitem' => Array(
'name' => '合成成就',
'desc' => '<font color="olive">这里是与合成各种物品相关的成就。<br>
如果看合成表觉得麻烦,只以这些物品为目标似乎也不错。<br></font>',
'ach' => Array(48,47,35,36,37,38,39,40,41,42,43,44,45,46,0,14,15,49,51,52,50),
'desc' => '<font color="olive">这里是与合成某些特殊物品相关的成就。<br>
物是人的延展,这些物品背后或许有些值得一听的故事。<br></font>',
'ach' => Array(0,14,15,49,51,52,50),
),
'explore' => Array(
'name' => '探索成就',
'desc' => '<font color="olive">这里是与你在游戏中会遇到的惊奇发现相关的成就。<br>
今天又会遇到些什么呢?<br></font>',
'ach' => Array(33,31),
'ach' => Array(33,31,32),
),
'lifetime' => Array(
'name' => '生涯成就',
'desc' => '<font color="olive">这里是记录了你在这个游戏中的积累相关的成就。<br>
呜呼——玩家们出发了……<br></font>',
'ach' => Array(29,30,53,54,55,600,255),
'ach' => Array(29,30,53,54,55,208,600,255),
),
'challenge' => Array(
'name' => '挑战成就',
'desc' => '<font color="olive">这里是与特定游戏中挑战相关的成就。<br>
虽然颇为浮云,但毕竟山就在那里。<br></font>',
'ach' => Array(1,200,201,28,202,203,208,204,205,206,207,32,255),
'ach' => Array(1,200,201,28,202,203,204,205,206,207,255),
),
);
# 日记大类列表:
$diary_type = Array
(
'mixdiary' => Array
(
'name' => '合成日记',
'desc' => '<font color="olive">这里记载着你在游戏中合成过的道具的记录。<br>
这些内容不会被统计在总成就完成度内。<br></font>',
'ach' => Array(35,36,37,38,39,40,41,42,43,44,45,46,47,48),
),
);
......@@ -67,6 +79,9 @@ $hidden_ach_type = Array
504 => 'explore',
//KEY系隐藏成就:一击秒杀【守卫者 静流】
505 => 'explore',
//元素大师隐藏成就:通过元素合成获得G.A.M.E.O.V.E.R
103 => 'explore',
);
# 成就登记列表:
......@@ -501,6 +516,17 @@ $ach_list = Array
'使用 <span class="sienna">未名存在 Dark Force</span> 掉落的道具达成结局:锁定解除',
),
),
# 元素大师达成幻境解离结局
103 => Array(
'lvl' => 1,
'name' => Array('我的口袋呢?'),
'title' => Array('元素大师'),
'c1' => Array(0),
'c2' => Array(0),
'desc' => Array(
'以<span class="sienna">追本溯源</span>的方式达成结局:幻境解离',
),
),
# 猎人成就:
# 击杀玩家:
......
......@@ -1541,6 +1541,36 @@ function check_item_achievement_rev($nn,$i,$ie,$is,$ik,$isk)
include_once GAME_ROOT.'./include/game/titles.func.php';
$atotal = Array();
//解离相关
if($i == '『G.A.M.E.O.V.E.R』')
{
$aid = $done = 0;
// 103.使用元素大师合成出的GAMEOVER达成幻境解离结局
if(strpos($isk,'z') !== false) $aid = 103;
if(!empty($aid))
{
$alvl = check_achievement_rev($aid,$nn);
$achlist = get_achlist($aid);
// 增加一次完成次数
$avars = fetch_achievement_rev($aid,$nn)+1;
update_achievement_rev($aid,$nn,$avars);
// 检查是否满足条件进入下一阶段(如果累计的次数足够一次性完成多个阶段,会依次完成)
while(!$alvl && $avars)
{
$done = 1;
// alvl代表的是当前阶段 所以先获取当前阶段的奖励 之后提升alvl
if(!empty($achlist['title'][$alvl])) get_title($achlist['title'][$alvl],$nn);
$c1 += $achlist['c1'][$alvl]; $c2 += $achlist['c2'][$alvl];
// 阶段步进
$alvl ++;
}
// 阶段有所变化时,增加阶段次数
if($done) done_achievement_rev($aid,$alvl,$nn);
}
}
//解禁相关
if ($i == "游戏解除钥匙")
{
......
......@@ -76,9 +76,10 @@ function get_npcinit()
}
# achievement_1.php
function get_achtype()
function get_achtype($mode=0)
{
include config("achievement",1);
if($mode) return $diary_type;
return $ach_type;
}
function get_hidden_achtype()
......
......@@ -15,11 +15,30 @@
<tr><td>
<!--{if ($curuser) }--><button type="button" onclick="window.location.href='user.php'">编辑我的账户资料</button><!--{/if}-->
</td></tr>
<tr><td>
<input type="hidden" id="achmode" name="achmode" value="ach">
<button type="button" onclick="
if($('achmode').value=='ach'){
$('achmode').value='diary';
$('normal_ach').style.display='none';
$('diary_ach').style.display='';
$('achtitle').innerHTML='查看成就完成情况';
}else{
$('achmode').value='ach';
$('normal_ach').style.display='';
$('diary_ach').style.display='none';
$('achtitle').innerHTML='查看累计游戏记录';
}
return false;">
<span id="achtitle">查看累计游戏记录</span>
</button>
</td></tr>
</table>
</td>
</tr>
</table>
<!-- 成就显示界面(新) -->
<div id="normal_ach">
<table>
<!--{loop $atype $tid $tarr}-->
<tr>
......@@ -66,6 +85,47 @@
</tr>
<!--{/loop}-->
</table>
</div>
<div id="diary_ach" style="display: none;">
<table>
<!--{loop $dtype $tid $tarr}-->
<tr>
<td>
<div class="subtitle" align="left">
{$tarr['name']}
</div>
<div style="margin-left: 6px;" align="left">
{$tarr['desc']}
</div>
</td>
</tr>
<tr>
<td>
<table>
<!--{loop $tarr['ach'] $key $aid}-->
<!--{if !$key%3}--><tr><!--{/if}-->
<!--{eval $adata = init_achtabledata($aid);}-->
<!--{if is_array($adata)}-->
<td>
<div class="ach_box" align="left" valign="top">
<!--{eval include template($adata[0]);}-->
</div>
</td>
<!--{else}-->
<td width="300" align="left" valign="top">
<div class="ach_box" align="left" valign="top">
<!--{eval include template('achievement_temp');}-->
</div>
</td>
<!--{/if}-->
<!--{if ($key == count($tarr['ach'])-1 || (!(($key+1)%3) && $key!=0))}--></tr><!--{/if}-->
<!--{/loop}-->
</table>
</td>
</tr>
<!--{/loop}-->
</table>
</div>
</center>
{template footer}
......@@ -102,6 +102,7 @@ if(!empty($udata['achievement']) && empty($udata['achrev']))
//解析成就的完成情况
$alist = get_achlist();
$atype = get_achtype();
$dtype = get_achtype(1);
$h_atype = get_hidden_achtype();
//判断是否存在每日任务
$atype['daily']['ach'] = empty($dailyarr[0]) ? Array() : $dailyarr;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment