This commit is contained in:
libccy 2016-03-04 10:23:43 +08:00
parent 735116974a
commit 46aec6895e
3 changed files with 15 additions and 12 deletions

View File

@ -27,7 +27,7 @@ character.yxs={
yxs_direnjie:['male','wei',3,['shentan','kanpo']], yxs_direnjie:['male','wei',3,['shentan','kanpo']],
yxs_sunwu:['male','wu',3,['bingsheng','taolue']], yxs_sunwu:['male','wu',3,['bingsheng','taolue']],
yxs_chengyaojin:['male','shu',4,['sanbanfu']], yxs_chengyaojin:['male','shu',4,['sanbanfu']],
yxs_yuji:['female','shu',3,['sheshen','changnian']], yxs_yujix:['female','shu',3,['sheshen','changnian']],
yxs_xiangyu:['male','shu',4,['wushuang','ciqiu']], yxs_xiangyu:['male','shu',4,['wushuang','ciqiu']],
yxs_yingzheng:['male','qun',4,['jianxiong','batu']], yxs_yingzheng:['male','qun',4,['jianxiong','batu']],
yxs_yuefei:['male','qun',4,['longdan','wumu']], yxs_yuefei:['male','qun',4,['longdan','wumu']],
@ -2111,7 +2111,7 @@ character.yxs={
yxs_direnjie:'狄人杰', yxs_direnjie:'狄人杰',
yxs_sunwu:'孙武', yxs_sunwu:'孙武',
yxs_chengyaojin:'程咬金', yxs_chengyaojin:'程咬金',
yxs_yuji:'虞姬', yxs_yujix:'虞姬',
yxs_xiangyu:'项羽', yxs_xiangyu:'项羽',
yxs_yingzheng:'嬴政', yxs_yingzheng:'嬴政',
yxs_yuefei:'岳飞', yxs_yuefei:'岳飞',

View File

@ -35,6 +35,7 @@
cardPack:{}, cardPack:{},
onresize:[], onresize:[],
onwash:[], onwash:[],
onover:[],
onDB:function(func){ onDB:function(func){
if(lib.db){ if(lib.db){
func(); func();
@ -11530,6 +11531,10 @@
game.playAudio('effect','tie'); game.playAudio('effect','tie');
} }
} }
var resultbool=result;
if(typeof resultbool!=='boolean'){
resultbool=null;
}
if(result===true) result='战斗胜利'; if(result===true) result='战斗胜利';
if(result===false) result='战斗失败'; if(result===false) result='战斗失败';
if(result==undefined) result='战斗结束'; if(result==undefined) result='战斗结束';
@ -11910,17 +11915,11 @@
ui.swap.close(); ui.swap.close();
delete ui.swap; delete ui.swap;
} }
if(game.onOver) game.onOver(result); for(var i=0;i<lib.onover.length;i++){
lib.onover[i](resultbool);
}
if(game.addRecord){ if(game.addRecord){
if(result=='战斗胜利'){ game.addRecord(resultbool);
game.addRecord(true);
}
else if(result=='战斗失败'){
game.addRecord(false);
}
else{
game.addRecord();
}
} }
}, },
loop:function(){ loop:function(){
@ -22267,6 +22266,10 @@
lib.onwash.push(game.onwash); lib.onwash.push(game.onwash);
delete game.onwash; delete game.onwash;
} }
if(game.onover){
lib.onover.push(game.onover);
delete game.onover;
}
lib.config.current_mode=mode[lib.config.mode].config||[]; lib.config.current_mode=mode[lib.config.mode].config||[];
lib.config.mode_choice=mode[lib.config.mode].config; lib.config.mode_choice=mode[lib.config.mode].config;
lib.config.banned=get.config('banned')||[]; lib.config.banned=get.config('banned')||[];

View File

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB