diff --git a/card/extra.js b/card/extra.js index 41c7bb94d..420fad5ef 100644 --- a/card/extra.js +++ b/card/extra.js @@ -74,7 +74,11 @@ card.extra={ event.finish(); return; } - target.chooseCard(true); + var rand=Math.random()<0.5; + target.chooseCard(true).ai=function(card){ + if(rand) return Math.random(); + return ai.get.value(card); + }; "step 1" event.dialog=ui.create.dialog(get.translation(target.name)+'展示的手牌',result.cards); event.card2=result.cards[0]; diff --git a/card/yibao.js b/card/yibao.js index 0d8019838..d8e745356 100644 --- a/card/yibao.js +++ b/card/yibao.js @@ -256,7 +256,11 @@ card.yibao={ player.chooseCard(true); "step 1" event.card1=result.cards[0]; - target.chooseCard(true); + var rand=Math.random()<0.5; + target.chooseCard(true).ai=function(card){ + if(rand) return Math.random(); + return ai.get.value(card); + }; "step 2" event.card2=result.cards[0]; player.$compare(event.card1,target,event.card2); diff --git a/game/game.js b/game/game.js index aee882ffb..e598f3690 100644 --- a/game/game.js +++ b/game/game.js @@ -11528,7 +11528,7 @@ window.play={}; if(j=='character'&&!lib.config.characters.contains(i)) continue; for(k in character[i][j]){ if(j=='character'){ - if(lib.config.only_fullskin&&lib.config.layout=='newlayout'){ + if(lib.config.only_fullskin&&lib.config.layout=='newlayout'&&lib.config.mode!='chess'){ if(!character[i][j][k][4]) continue; if(!character[i][j][k][4].contains('fullskin')&&!character[i][j][k][4].contains('minskin')){ continue; diff --git a/image/character/default/chess_beimingjukun.jpg b/image/character/default/chess_beimingjukun.jpg new file mode 100644 index 000000000..99612eff5 Binary files /dev/null and b/image/character/default/chess_beimingjukun.jpg differ diff --git a/image/character/default/chess_caocao.jpg b/image/character/default/chess_caocao.jpg new file mode 100644 index 000000000..abbe26894 Binary files /dev/null and b/image/character/default/chess_caocao.jpg differ diff --git a/image/character/default/chess_dianwei.jpg b/image/character/default/chess_dianwei.jpg new file mode 100644 index 000000000..9e70de0f4 Binary files /dev/null and b/image/character/default/chess_dianwei.jpg differ diff --git a/image/character/default/chess_diaochan.jpg b/image/character/default/chess_diaochan.jpg new file mode 100644 index 000000000..65ddbf6eb Binary files /dev/null and b/image/character/default/chess_diaochan.jpg differ diff --git a/image/character/default/chess_dongzhuo.jpg b/image/character/default/chess_dongzhuo.jpg new file mode 100644 index 000000000..3dabc3c44 Binary files /dev/null and b/image/character/default/chess_dongzhuo.jpg differ diff --git a/image/character/default/chess_ganning.jpg b/image/character/default/chess_ganning.jpg new file mode 100644 index 000000000..8ecc2823e Binary files /dev/null and b/image/character/default/chess_ganning.jpg differ diff --git a/image/character/default/chess_guanyu.jpg b/image/character/default/chess_guanyu.jpg new file mode 100644 index 000000000..e4bf53575 Binary files /dev/null and b/image/character/default/chess_guanyu.jpg differ diff --git a/image/character/default/chess_huanggai.jpg b/image/character/default/chess_huanggai.jpg new file mode 100644 index 000000000..27584261f Binary files /dev/null and b/image/character/default/chess_huanggai.jpg differ diff --git a/image/character/default/chess_huangzhong.jpg b/image/character/default/chess_huangzhong.jpg new file mode 100644 index 000000000..1dcdf4c9d Binary files /dev/null and b/image/character/default/chess_huangzhong.jpg differ diff --git a/image/character/default/chess_huatuo.jpg b/image/character/default/chess_huatuo.jpg new file mode 100644 index 000000000..561d14d05 Binary files /dev/null and b/image/character/default/chess_huatuo.jpg differ diff --git a/image/character/default/chess_jiaxu.jpg b/image/character/default/chess_jiaxu.jpg new file mode 100644 index 000000000..e3db2e90c Binary files /dev/null and b/image/character/default/chess_jiaxu.jpg differ diff --git a/image/character/default/chess_jinchidiao.jpg b/image/character/default/chess_jinchidiao.jpg new file mode 100644 index 000000000..b68ca80d7 Binary files /dev/null and b/image/character/default/chess_jinchidiao.jpg differ diff --git a/image/character/default/chess_liubei.jpg b/image/character/default/chess_liubei.jpg new file mode 100644 index 000000000..989300a1d Binary files /dev/null and b/image/character/default/chess_liubei.jpg differ diff --git a/image/character/default/chess_lusu.jpg b/image/character/default/chess_lusu.jpg new file mode 100644 index 000000000..0947cc1df Binary files /dev/null and b/image/character/default/chess_lusu.jpg differ diff --git a/image/character/default/chess_luxun.jpg b/image/character/default/chess_luxun.jpg new file mode 100644 index 000000000..9f2e55d6f Binary files /dev/null and b/image/character/default/chess_luxun.jpg differ diff --git a/image/character/default/chess_lvbu.jpg b/image/character/default/chess_lvbu.jpg new file mode 100644 index 000000000..728c0fca3 Binary files /dev/null and b/image/character/default/chess_lvbu.jpg differ diff --git a/image/character/default/chess_lvmeng.jpg b/image/character/default/chess_lvmeng.jpg new file mode 100644 index 000000000..6e44edfbc Binary files /dev/null and b/image/character/default/chess_lvmeng.jpg differ diff --git a/image/character/default/chess_machao.jpg b/image/character/default/chess_machao.jpg new file mode 100644 index 000000000..0f97d9307 Binary files /dev/null and b/image/character/default/chess_machao.jpg differ diff --git a/image/character/default/chess_maliang.jpg b/image/character/default/chess_maliang.jpg new file mode 100644 index 000000000..18502deb7 Binary files /dev/null and b/image/character/default/chess_maliang.jpg differ diff --git a/image/character/default/chess_menghuo.jpg b/image/character/default/chess_menghuo.jpg new file mode 100644 index 000000000..88cf7288a Binary files /dev/null and b/image/character/default/chess_menghuo.jpg differ diff --git a/image/character/default/chess_simayi.jpg b/image/character/default/chess_simayi.jpg new file mode 100644 index 000000000..b9500c05d Binary files /dev/null and b/image/character/default/chess_simayi.jpg differ diff --git a/image/character/default/chess_sunquan.jpg b/image/character/default/chess_sunquan.jpg new file mode 100644 index 000000000..a9ba6259a Binary files /dev/null and b/image/character/default/chess_sunquan.jpg differ diff --git a/image/character/default/chess_sunshangxiang.jpg b/image/character/default/chess_sunshangxiang.jpg new file mode 100644 index 000000000..1c3045ed3 Binary files /dev/null and b/image/character/default/chess_sunshangxiang.jpg differ diff --git a/image/character/default/chess_taishici.jpg b/image/character/default/chess_taishici.jpg new file mode 100644 index 000000000..383e695ea Binary files /dev/null and b/image/character/default/chess_taishici.jpg differ diff --git a/image/character/default/chess_wuzhaojinlong.jpg b/image/character/default/chess_wuzhaojinlong.jpg new file mode 100644 index 000000000..369add03d Binary files /dev/null and b/image/character/default/chess_wuzhaojinlong.jpg differ diff --git a/image/character/default/chess_xiahoudun.jpg b/image/character/default/chess_xiahoudun.jpg new file mode 100644 index 000000000..86bea2c1d Binary files /dev/null and b/image/character/default/chess_xiahoudun.jpg differ diff --git a/image/character/default/chess_xunyu.jpg b/image/character/default/chess_xunyu.jpg new file mode 100644 index 000000000..7b955ba8d Binary files /dev/null and b/image/character/default/chess_xunyu.jpg differ diff --git a/image/character/default/chess_xuzhu.jpg b/image/character/default/chess_xuzhu.jpg new file mode 100644 index 000000000..3831312c5 Binary files /dev/null and b/image/character/default/chess_xuzhu.jpg differ diff --git a/image/character/default/chess_zhangfei.jpg b/image/character/default/chess_zhangfei.jpg new file mode 100644 index 000000000..374539c32 Binary files /dev/null and b/image/character/default/chess_zhangfei.jpg differ diff --git a/image/character/default/chess_zhangjiao.jpg b/image/character/default/chess_zhangjiao.jpg new file mode 100644 index 000000000..76360ba75 Binary files /dev/null and b/image/character/default/chess_zhangjiao.jpg differ diff --git a/image/character/default/chess_zhangliao.jpg b/image/character/default/chess_zhangliao.jpg new file mode 100644 index 000000000..adc1ef950 Binary files /dev/null and b/image/character/default/chess_zhangliao.jpg differ diff --git a/image/character/default/chess_zhaoyun.jpg b/image/character/default/chess_zhaoyun.jpg new file mode 100644 index 000000000..41398d627 Binary files /dev/null and b/image/character/default/chess_zhaoyun.jpg differ diff --git a/image/character/default/chess_zhouyu.jpg b/image/character/default/chess_zhouyu.jpg new file mode 100644 index 000000000..5a0611c0a Binary files /dev/null and b/image/character/default/chess_zhouyu.jpg differ diff --git a/image/character/default/chess_zhugeliang.jpg b/image/character/default/chess_zhugeliang.jpg new file mode 100644 index 000000000..c585dc1c4 Binary files /dev/null and b/image/character/default/chess_zhugeliang.jpg differ diff --git a/mode/chess.js b/mode/chess.js index 31d0d943c..4da8ef88a 100644 --- a/mode/chess.js +++ b/mode/chess.js @@ -581,6 +581,12 @@ mode.chess={ } } } + if(get.config('chess_character')){ + for(var i in lib.chess_character){ + lib.character[i]=lib.chess_character[i]; + } + } + delete lib.chess_character; lib.init.css('layout/mode','chess'); ui.chesssheet=document.createElement('style'); document.head.appendChild(ui.chesssheet); @@ -1038,7 +1044,47 @@ mode.chess={ trueColor:"zhu", falseColor:"wei", _chessmove:'移动', - chessscroll_speed_config:'边缘滚动速度' + chessscroll_speed_config:'边缘滚动速度', + chess_character_config:'战棋武将', + + chess_caocao:'曹操', + chess_xunyu:'荀彧', + chess_simayi:'司马懿', + chess_xiahoudun:'夏侯惇', + chess_dianwei:'典韦', + chess_xuzhu:'许褚', + chess_zhangliao:'张辽', + chess_jiaxu:'贾诩', + + chess_liubei:'刘备', + chess_guanyu:'关羽', + chess_zhangfei:'张飞', + chess_zhaoyun:'赵云', + chess_machao:'马超', + chess_huangzhong:'黄忠', + chess_maliang:'马良', + chess_zhugeliang:'诸葛亮', + + chess_sunquan:'孙权', + chess_zhouyu:'周瑜', + chess_lvmeng:'吕蒙', + chess_huanggai:'黄盖', + chess_lusu:'鲁肃', + chess_luxun:'陆逊', + chess_ganning:'甘宁', + chess_taishici:'太史慈', + + chess_lvbu:'吕布', + chess_sunshangxiang:'孙尚香', + chess_diaochan:'貂蝉', + chess_huatuo:'华佗', + chess_zhangjiao:'张辽', + chess_menghuo:'孟获', + + chess_dongzhuo:'董卓', + chess_jinchidiao:'金翅雕', + chess_beimingjukun:'北溟巨鲲', + chess_wuzhaojinlong:'五爪金龙', }, ui:{ create:{ @@ -1078,6 +1124,46 @@ mode.chess={ } } }, + chess_character:{ + // chess_caocao:['male','wei',3,['']], + // chess_xunyu:['male','wei',3,['']], + // chess_simayi:['male','wei',3,['']], + // chess_xiahoudun:['male','wei',3,['']], + // chess_dianwei:['male','wei',3,['']], + // chess_xuzhu:['male','wei',3,['']], + // chess_zhangliao:['male','wei',3,['']], + // chess_jiaxu:['male','wei',3,['']], + // + // chess_liubei:['male','shu',3,['']], + // chess_guanyu:['male','shu',3,['']], + // chess_zhangfei:['male','shu',3,['']], + // chess_zhaoyun:['male','shu',3,['']], + // chess_machao:['male','shu',3,['']], + // chess_huangzhong:['male','shu',3,['']], + // chess_maliang:['male','shu',3,['']], + // chess_zhugeliang:['male','shu',3,['']], + // + // chess_sunquan:['male','wu',3,['']], + // chess_zhouyu:['male','wu',3,['']], + // chess_lvmeng:['male','wu',3,['']], + // chess_huanggai:['male','wu',3,['']], + // chess_lusu:['male','wu',3,['']], + // chess_luxun:['male','wu',3,['']], + // chess_ganning:['male','wu',3,['']], + // chess_taishici:['male','wu',3,['']], + // + // chess_lvbu:['male','qun',3,['']], + // chess_sunshangxiang:['male','qun',3,['']], + // chess_diaochan:['male','qun',3,['']], + // chess_huatuo:['male','qun',3,['']], + // chess_zhangjiao:['male','qun',3,['']], + // chess_menghuo:['male','qun',3,['']], + // + // chess_dongzhuo:['male','qun',3,['']], + // chess_jinchidiao:['male','qun',3,['']], + // chess_beimingjukun:['male','qun',3,['']], + // chess_wuzhaojinlong:['male','qun',3,['']], + }, posmap:{}, help:{ '战棋模式':'