diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 78c7f63bd..cac02e6bd 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -3,3 +3,4 @@ 单人控制改进 新武将 修bug +统率模式(战棋子模式) diff --git a/card/hearth.js b/card/hearth.js index bf6392497..dcebe7ece 100644 --- a/card/hearth.js +++ b/card/hearth.js @@ -397,8 +397,14 @@ card.hearth={ } if(!targets.length) event.finish(); 'step 1' - var current=targets.randomGet(event.current); - event.current.line(current); + var current; + if(targets.length>1){ + current=targets.randomGet(event.current); + event.current.line(current); + } + else{ + current=targets[0]; + } var hs=current.get('h'); if(hs.length){ current.discard(hs.randomGet()); diff --git a/character/diy.js b/character/diy.js index db86173fc..dfea65a96 100755 --- a/character/diy.js +++ b/character/diy.js @@ -163,7 +163,7 @@ character.diy={ var cards=player.get('he',{color:'black'}); for(var i=0;i0; }, content:function(){ for(var i=0;itarget.hp){ diff --git a/character/swd.js b/character/swd.js index 20ad61aed..3154e21f5 100755 --- a/character/swd.js +++ b/character/swd.js @@ -8,7 +8,7 @@ character.swd={ swd_kama:['female','qun',3,['yueren','shangshi'],['fullskin']], swd_miles:['male','qun',4,['aojian','miles_xueyi','mohua2']], swd_nicole:['female','wu',3,['minjing','lingwu','huanjian'],['fullskin']], - swd_wangsiyue:['female','wei',3,['duishi','guisi','biyue']], + swd_wangsiyue:['female','wei',3,['duishi','biyue'],['fullskin']], swd_weida:['female','qun',3,['yueren','zhenlie']], swd_xuanyuanjianxian:['male','qun',4,['pozhou','huajian'],['fullskin']], @@ -92,6 +92,31 @@ character.swd={ swd_luchengxuan:['swd_xiarou'], }, skill:{ + kongmo:{ + trigger:{player:'useCardAfter'}, + forced:true, + filter:function(event,player){ + if(event.parent.name=='kongmo') return false; + if(!event.targets||!event.card) return false; + var type=get.type(event.card); + if(type!='basic'&&type!='trick') return false; + var card=game.createCard(event.card.name,event.card.suit,event.card.number); + for(var i=0;i0 + return player.num('h')>0&&!player.skills.contains('duishi3'); }, filterTarget:function(card,player,target){ - return player!=target&&target.num('he'); + return player!=target&&target.num('h')&&!target.skills.contains('duishi2'); }, filterCard:true, check:function(card){return 8-ai.get.value(card)}, content:function(){ "step 0" var suit=get.suit(cards[0]); - target.chooseToDiscard({suit:suit},'he','弃置一张'+get.translation(suit)+ + target.chooseToDiscard({suit:suit},'h','弃置一张'+get.translation(suit)+ '牌,或令'+get.translation(player)+'获得你的一张牌').ai=function(card){ if(ai.get.attitude(target,player)>0){ return -1; @@ -2297,10 +2324,14 @@ character.swd={ "step 1" if(!result.bool){ + player.addTempSkill('duishi3','phaseAfter'); if(target.num('he')){ player.gainPlayerCard(target,'he',true,ai.get.buttonValue); } } + else{ + target.addTempSkill('duishi2','phaseAfter'); + } }, ai:{ order:9, @@ -2312,6 +2343,8 @@ character.swd={ expose:0.2 } }, + duishi2:{}, + duishi3:{}, guisi:{ trigger:{target:'shaBefore'}, popup:false, @@ -6612,10 +6645,35 @@ character.swd={ }, yueren2:{}, busi:{ + trigger:{player:'dying'}, + priority:7, + unique:true, + forced:true, + filter:function(event,player){ + return player.hp<=0; + }, + content:function(){ + 'step 0' + player.judge(function(card){ + return get.suit(card)=='spade'?-1:1; + }); + 'step 1' + if(result.bool){ + player.recover(1-player.hp); + if(!player.isTurnedOver()){ + player.turnOver(); + } + } + }, + ai:{ + threaten:0.8 + } + }, + busi_old:{ unique:true, global:'busi2', }, - busi2:{ + busi_old2:{ trigger:{player:'phaseAfter'}, forced:true, popup:false, @@ -6665,7 +6723,10 @@ character.swd={ }, content:function(){ "step 0" - var go=ai.get.attitude(player,trigger.player)>0&&ai.get.attitude(player,trigger.source)<0; + var go=ai.get.attitude(player,trigger.player)>0&& + ai.get.attitude(player,trigger.source)<0&& + ai.get.damageEffect(trigger.player,trigger.source,player)< + ai.get.damageEffect(trigger.source,trigger.player,player); player.chooseToDiscard('是否将伤害来源('+get.translation(trigger.source)+ ')和目标('+get.translation(trigger.player)+')对调?','he').ai=function(card){ if(go){ @@ -6704,7 +6765,7 @@ character.swd={ } } if(source&&source.num('he')){ - if(ai.get.attitude(player,source)<0&&ai.get.attitude(player,target)<0){ + if(ai.get.attitude(source,player)<0&&ai.get.attitude(source,target)>0){ return [0,0,0,-1]; } } @@ -7582,13 +7643,15 @@ character.swd={ swd_lanmoshen:'蓝魔神', swd_wushi:'巫师', + kongmo:'恐魔', + kongmo_info:'锁定技,你使用基本牌或非延时锦囊牌后将额外结算一次卡牌效果', miaobi:'妙笔', miaobi_info:'出牌阶段限一次,你可以将一张红桃牌当作五谷丰登使用', zhexian:'谪仙', jufu:'巨斧', jufu_info:'锁定技,当你有武器牌时,杀造成的伤害+1', huajing:'化精', - huajing_info:'每当你使用锦囊牌造成伤害,可以回复一点体力', + huajing_info:'每当你使用锦囊牌造成伤害,可以回复一点体力并摸一张牌', pingxu:'冯虚', pingxu_info:'锁定技,当你没有武器牌时,与其他角色的距离-1;当你没有防具牌时,其他角色与你的距离+1', yudun:'愚钝', @@ -7696,7 +7759,7 @@ character.swd={ guisi:'归思', guisi_info:'每当你成为杀的目标,你可以交给对方一张手牌并取消之', duishi:'对诗', - duishi_info:'出牌阶段限一次,你可以弃置一张手牌,并指定一名角色弃置一张与之花色相同的牌,否则你获得其一张牌', + duishi_info:'出牌阶段,你可以弃置一张手牌,并指定一名有手牌的角色弃置一张与之花色相同的手牌,否则你获得其一张牌。若其弃置了手牌,你可对一名其他目标再发动一次', anlianying:'连营', anlianying_info:'每当你失去最后一张手牌,可摸两张牌', lianwu:'连舞', @@ -7935,7 +7998,7 @@ character.swd={ mailun_info:'回合开始阶段,你可以选择一个脉轮效果直到下一回合开始', yunshen_info:'每当你打出一张闪,你可以令其他角色与你的距离+1;回合开始阶段,你将累计的防御距离清零,然后摸等量的牌', guiyan_info:'出牌阶段,你可以观看一名角色的手牌,并获得其中一张梅花牌,每阶段限一次。当你首次进入濒死状态时,你须回复一点体力并失去技能鬼眼', - busi_info:'锁定技,你死亡后每次轮过你时你自动复活', + busi_info:'锁定技,当你进入濒死状态时,你进行一次判定,若结果不为黑桃,你将体力回复至1并将武将牌翻至背面', xuying_info:'锁定技,每当你即将受到伤害,你防止此伤害,若你此时有手牌,你流失一点体力', yinguo_info:'除你之外的任意一名角色即将受到受到伤害时,若有伤害来源,你可以弃置一张牌将伤害来源和目标对调', yueren_info:'每当你使用一张杀,可以进行一次判定,若结果为黑色,你弃置目标一张牌,若结果为红色,你将此杀收回,每回合限发动一次', diff --git a/character/xswd.js b/character/xswd.js index ce22b58d6..a00d69205 100755 --- a/character/xswd.js +++ b/character/xswd.js @@ -1,6 +1,6 @@ character.xswd={ character:{ - swd_wushi:['male','wei',3,['zhoufu','yingbin','xuying']], + // swd_wushi:['male','wei',3,['zhoufu','yingbin','xuying']], // swd_lanmoshen:['female','wei',3,['bingjian','lieren'],['fullskin']], swd_huanglei:['male','qun',3,['jilve','gongshen'],['fullskin']], swd_libai:['female','qun',3,['miaobi','zhexian']], @@ -10,7 +10,7 @@ character.xswd={ swd_linming:['male','qun',3,['shelie','bifa']], swd_philis:['male','qun',4,['yicong','wangxi']], swd_pepin:['male','qun',4,['rejianxiong','quhu']], - // swd_kangnalishi:['male','qun',1,['busi','xuying','yinguo']], + swd_kangnalishi:['male','qun',1,['busi','xuying','yinguo'],['fullskin']], swd_xuanyuanjiantong:['male','qun',3,['chengjian','huanling'],['fullskin']], // swd_huiyan:['male','qun',3,['wendao','xiaozhan','xunzhi']], diff --git a/character/yijiang.js b/character/yijiang.js index 268979634..638351957 100755 --- a/character/yijiang.js +++ b/character/yijiang.js @@ -1358,7 +1358,7 @@ character.yijiang={ if(result.bool){ trigger.untrigger(); trigger.finish(); - player.logSkill('xuanhuo',result.targets); + player.logSkill('xinxuanhuo',result.targets); event.target=result.targets[0]; event.target.draw(2); player.chooseTarget('选择出杀的目标',true,function(card,player,target){ @@ -2265,7 +2265,7 @@ character.yijiang={ usable:1, content:function(){ "step 0" - var cards=get.cards(3+player.maxHp-player.hp); + var cards=get.cards(3); event.cards=cards; player.chooseCardButton(cards,'选择获得的红桃牌',[1,Infinity]).filterButton=function(button){ return get.suit(button.link)=='heart'; @@ -3346,7 +3346,7 @@ character.yijiang={ shiyong_info:'锁定技,每当你受到一次红色【杀】或【酒】【杀】造成的伤害后,你减1点体力上限。', danshou_info:'每当你造成一次伤害后,你可以摸一张牌。若如此做,终止一切结算,当前回合结束。', yizhong_info:'锁定技,当你没有防具时,黑色的杀对你无效', - xinzhan_info:'出牌阶段限一次,你可以观看牌堆顶的3+X张牌,然后展示其中任意数量♥的牌并获得之,其余以任意顺序置于牌堆顶。X为你已损失的体力值', + xinzhan_info:'出牌阶段限一次,你可以观看牌堆顶的3张牌,然后展示其中任意数量♥的牌并获得之', huilei_info:'锁定技,杀死你的角色立即弃置所有的牌。', enyuan_info:'锁定技,其他角色每令你回复一点体力,该角色摸一张牌;其他角色每对你造成一次伤害,须给你一张♥手牌,否则该角色失去1点体力。', xuanhuo_info:'你每次获得一名其他角色两张或更多的牌时,可以令其摸一张牌;每当你受到1点伤害后,你可以令伤害来源选择一项:交给你一张手牌,或失去1点体力。', diff --git a/game/config.js b/game/config.js index 27e9a5845..ffe93672e 100755 --- a/game/config.js +++ b/game/config.js @@ -304,15 +304,19 @@ window.config={ ['xiaoji','zhiheng'], ['relianying','zhiheng'], ['lianying','rende'], + ['lianying','yinguo'], ['lianying','sajin'], ['lianying','qingjian'], - ['shanbshi','rende'], - ['shanbshi','qingjian'], + ['shangshi','rende'], + ['shangshi','yinguo'], + ['shangshi','qingjian'], ['rende','relianying'], + ['yinguo','relianying'], ['sajin','relianying'], ['shenxing','relianying'], ['qingjian','relianying'], ['rende','yuling'], + ['yinguo','yuling'], ['qingjian','yuling'], ['qingnang','yiji'], ['qingnang','reyiji'], diff --git a/game/game.js b/game/game.js index d7a8f1d91..943355bd2 100755 --- a/game/game.js +++ b/game/game.js @@ -224,6 +224,7 @@ var script=document.createElement('script'); script.src = path+'/'+file+".js"; document.head.appendChild(script); + return script; } }, parse:function(func){ @@ -1908,7 +1909,7 @@ game.playAudio('effect','die_'+(player.sex==='female'?'female':'male')); } } - if(player==game.me&&!_status.over){ + if(player==game.me&&!_status.over&&!game.controlOver){ ui.control.show(); if(get.config('swap')&&lib.config.mode_choice.contains('swap')){ ui.swap=ui.create.control('换人',ui.click.dieswap); @@ -1920,7 +1921,7 @@ ui.restart=ui.create.control('restart',game.reload); } } - if(player==game.me){ + if(player==game.me&&!game.modeSwapPlayer){ if(ui.auto) ui.auto.hide(); if(ui.wuxie) ui.wuxie.hide(); } @@ -4286,6 +4287,53 @@ game.animate.flame(left+this.offsetWidth/2, top+this.offsetHeight-30,700,'thunder'); }, + $rare:function(){ + var left=this.offsetLeft-ui.arena.offsetLeft; + var top=this.offsetTop-ui.arena.offsetTop; + if(this.classList.contains('minskin')){ + top+=15; + } + game.animate.flame(left+this.offsetWidth/2, + top+this.offsetHeight-30,700,'rare'); + }, + $epic:function(){ + var left=this.offsetLeft-ui.arena.offsetLeft; + var top=this.offsetTop-ui.arena.offsetTop; + if(this.classList.contains('minskin')){ + top+=15; + } + game.animate.flame(left+this.offsetWidth/2, + top+this.offsetHeight-30,700,'epic'); + }, + $legend:function(){ + var left=this.offsetLeft-ui.arena.offsetLeft; + var top=this.offsetTop-ui.arena.offsetTop; + if(this.classList.contains('minskin')){ + top+=15; + } + game.animate.flame(left+this.offsetWidth/2, + top+this.offsetHeight-30,700,'legend'); + }, + $coin:function(){ + var left=this.offsetLeft-ui.arena.offsetLeft; + var top=this.offsetTop-ui.arena.offsetTop; + if(this.classList.contains('minskin')){ + top+=15; + } + top-=25; + game.animate.flame(left+this.offsetWidth/2, + top+this.offsetHeight-30,700,'coin'); + }, + $dust:function(){ + var left=this.offsetLeft-ui.arena.offsetLeft; + var top=this.offsetTop-ui.arena.offsetTop; + if(this.classList.contains('minskin')){ + top+=15; + } + top-=25; + game.animate.flame(left+this.offsetWidth/2, + top+this.offsetHeight-30,700,'dust'); + }, $recover:function(){ var left,top; if(lib.config.mode=='chess'){ @@ -5407,15 +5455,31 @@ if(type=='thunder'||type=='recover'){ particle_count=30; } + else if(type=='coin'||type=='dust'){ + particle_count=50; + } + else if(type=='legend'){ + particle_count=120; + } + else if(type=='epic'){ + particle_count=80; + } + else if(type=='rare'){ + particle_count=50; + } for(var i = 0; i < particle_count; i++) { particles.push(new particle()); } function particle() { this.speed = {x: -1+Math.random()*2, y: -5+Math.random()*5}; - if(type=='thunder'){ + if(type=='thunder'||type=='coin'||type=='dust'){ this.speed.y=-3+Math.random()*5; this.speed.x=-2+Math.random()*4; } + if(type=='legend'||type=='rare'||type=='epic'){ + this.speed.x*=3; + this.speed.y*=1.5; + } this.location = {x: x, y: y}; this.radius = .5+Math.random()*1; @@ -5439,6 +5503,92 @@ this.b = 0; break; } + case 'coin':{ + this.r = 255; + this.g = Math.round(Math.random()*25+230); + this.b = Math.round(Math.random()*100+50); + this.location.x+=Math.round(Math.random()*60)-30; + this.location.y+=Math.round(Math.random()*40)-20; + if(this.location.xx){ + this.speed.x=Math.abs(this.speed.x); + } + this.life*=1.3; + this.death*=1.3; + break; + } + case 'dust':{ + this.r = Math.round(Math.random()*55)+105; + this.g = Math.round(Math.random()*55)+150; + this.b = 255; + this.location.x+=Math.round(Math.random()*60)-30; + this.location.y+=Math.round(Math.random()*40)-20; + if(this.location.xx){ + this.speed.x=Math.abs(this.speed.x); + } + this.life*=1.3; + this.death*=1.3; + break; + } + case 'legend':{ + this.r = 255; + this.g = Math.round(Math.random()*100+155); + this.b = Math.round(Math.random()*100+50); + this.location.x+=Math.round(Math.random()*60)-30; + this.location.y+=Math.round(Math.random()*40)-20; + if(this.location.xx){ + this.speed.x=Math.abs(this.speed.x); + } + this.speed.x/=2; + this.speed.y/=2; + this.life*=2; + this.death*=2; + break; + } + case 'epic':{ + this.r = Math.round(Math.random()*55)+200; + this.g = Math.round(Math.random()*100)+55; + this.b = 255; + this.location.x+=Math.round(Math.random()*60)-30; + this.location.y+=Math.round(Math.random()*40)-20; + if(this.location.xx){ + this.speed.x=Math.abs(this.speed.x); + } + this.speed.x/=2; + this.speed.y/=2; + this.life*=2; + this.death*=2; + break; + } + case 'rare':{ + this.r = Math.round(Math.random()*55)+105; + this.g = Math.round(Math.random()*55)+150; + this.b = 255; + this.location.x+=Math.round(Math.random()*60)-30; + this.location.y+=Math.round(Math.random()*40)-20; + if(this.location.xx){ + this.speed.x=Math.abs(this.speed.x); + } + this.speed.x/=2; + this.speed.y/=2; + this.life*=2; + this.death*=2; + break; + } case 'recover':{ this.g = 255; this.r = Math.round(Math.random()*200+55); @@ -5476,7 +5626,8 @@ surface.beginPath(); var middle=0.5; var radius=p.radius; - if(type=='recover'){ + if(type=='recover'||type=='legend'||type=='rare'|| + type=='epic'||type=='coin'||type=='dust'){ middle=0.7; radius/=3; } @@ -5493,6 +5644,12 @@ if(type=='recover'){ p.radius+=0.5; } + else if(type=='coin'||type=='dust'){ + p.radius+=0.7; + } + else if(type=='legend'||type=='rare'||type=='epic'){ + p.radius+=0.5; + } else { p.radius++; } @@ -5633,6 +5790,9 @@ if(result===false) result='战斗失败'; if(result==undefined) result='战斗结束'; dialog=ui.create.dialog(result); + if(game.addOverDialog){ + game.addOverDialog(dialog,result); + } if(true){ if(game.players.length){ table=document.createElement('table'); @@ -5824,6 +5984,12 @@ } dialog.add(ui.create.div('.placeholder')); dialog.add(ui.create.div('.placeholder')); + if(ui.auto) ui.auto.hide(); + if(ui.wuxie) ui.wuxie.hide(); + + if(game.controlOver){ + game.controlOver();return; + } if(!ui.restart){ ui.restart=ui.create.control('restart',game.reload); } @@ -5831,8 +5997,6 @@ setTimeout(game.reload,500); } - if(ui.auto) ui.auto.hide(); - if(ui.wuxie) ui.wuxie.hide(); if(ui.revive){ ui.revive.close(); delete ui.revive; @@ -7214,6 +7378,7 @@ }, control:function(){ var i,controls; + var nozoom=false; if(get.objtype(arguments[0])=='array') controls=arguments[0]; else controls=arguments; var control=ui.create.div('.control'); @@ -7225,17 +7390,28 @@ if(typeof controls[i]=='function'){ control.custom=controls[i]; } + else if(controls[i]=='nozoom'){ + nozoom=true; + } else{ control.add(controls[i]); } } ui.controls.unshift(control); + if(nozoom){ + control.classList.add('nozoom'); + } if(control.childNodes.length){ + if(nozoom){ + control.style.transition='opacity 0.5s'; + } var width=0; for(i=0;i
'+info.promptfunc(event,event.player)+'
'); + } else if(lib.translate[skill+'_info']){ event.skillDialog=ui.create.dialog(str,'
'+lib.translate[skill+'_info']+'
'); } @@ -10082,6 +10264,7 @@ } }, rightplayer:function(e){ + if(this._nopup) return false; if(_status.clickedplayer){ return false; } @@ -11646,11 +11829,12 @@ this.classList.remove('removing'); return this; }; - HTMLDivElement.prototype.setBackground=function(name,type,ext){ + HTMLDivElement.prototype.setBackground=function(name,type,ext,subfolder){ var src; ext=ext||'.jpg'; + subfolder=subfolder||'default' if(type){ - src='image/'+type+'/default/'+name+ext; + src='image/'+type+'/'+subfolder+'/'+name+ext; } else{ src='image/'+name+ext; diff --git a/image/card/leader_easy.jpg b/image/card/leader_easy.jpg new file mode 100644 index 000000000..04aeb6cb3 Binary files /dev/null and b/image/card/leader_easy.jpg differ diff --git a/image/card/leader_hard.jpg b/image/card/leader_hard.jpg new file mode 100644 index 000000000..3722a7936 Binary files /dev/null and b/image/card/leader_hard.jpg differ diff --git a/image/card/leader_medium.jpg b/image/card/leader_medium.jpg new file mode 100644 index 000000000..62f523492 Binary files /dev/null and b/image/card/leader_medium.jpg differ diff --git a/image/character/default/hs_edwin.jpg b/image/character/default/hs_edwin.jpg new file mode 100644 index 000000000..e9f6aade2 Binary files /dev/null and b/image/character/default/hs_edwin.jpg differ diff --git a/image/character/default/leader_caocao.jpg b/image/character/default/leader_caocao.jpg new file mode 100644 index 000000000..6c47f50f8 Binary files /dev/null and b/image/character/default/leader_caocao.jpg differ diff --git a/image/character/default/leader_liubei.jpg b/image/character/default/leader_liubei.jpg new file mode 100644 index 000000000..62740216a Binary files /dev/null and b/image/character/default/leader_liubei.jpg differ diff --git a/image/character/default/leader_sunquan.jpg b/image/character/default/leader_sunquan.jpg new file mode 100644 index 000000000..2bf714829 Binary files /dev/null and b/image/character/default/leader_sunquan.jpg differ diff --git a/image/character/default/swd_kangnalishi.jpg b/image/character/default/swd_kangnalishi.jpg old mode 100755 new mode 100644 index e7db335d3..9e36d6af3 Binary files a/image/character/default/swd_kangnalishi.jpg and b/image/character/default/swd_kangnalishi.jpg differ diff --git a/image/character/fullskin/hs_edwin.jpg b/image/character/fullskin/hs_edwin.jpg new file mode 100644 index 000000000..0aef7d3e1 Binary files /dev/null and b/image/character/fullskin/hs_edwin.jpg differ diff --git a/image/character/fullskin/swd_huzhongxian.jpg b/image/character/fullskin/swd_huzhongxian.jpg old mode 100755 new mode 100644 index 803a6c580..afa1cdb6e Binary files a/image/character/fullskin/swd_huzhongxian.jpg and b/image/character/fullskin/swd_huzhongxian.jpg differ diff --git a/image/character/fullskin/swd_kangnalishi.jpg b/image/character/fullskin/swd_kangnalishi.jpg new file mode 100644 index 000000000..b55ecece7 Binary files /dev/null and b/image/character/fullskin/swd_kangnalishi.jpg differ diff --git a/image/character/fullskin/swd_wangsiyue.jpg b/image/character/fullskin/swd_wangsiyue.jpg new file mode 100644 index 000000000..e0a4610ce Binary files /dev/null and b/image/character/fullskin/swd_wangsiyue.jpg differ diff --git a/layout/default/layout.css b/layout/default/layout.css index bedf939a8..39f770763 100755 --- a/layout/default/layout.css +++ b/layout/default/layout.css @@ -95,6 +95,9 @@ body>.background{z-index:-2} .card.cardflip{ -webkit-animation:cardflip 0.3s ease-out; } +.player.playerflip{ + -webkit-animation:playerflip 0.3s ease-out; +} .button.card.button>.intro{top:69px;} .buttons.smallzoom{ zoom:0.65 @@ -124,6 +127,9 @@ body>.background{z-index:-2} .dialog{width: calc(90% - 420px);height: calc(100% / 3 - 160px / 3 + 120px);} .dialog.fullheight{height:calc(100% - 80px) !important;top:40px !important} .dialog.fullwidth{left:calc(5% + 60px) !important;width:calc(90% - 120px) !important} +.dialog.halfleft,.dialog.halfright{width:43% !important;opacity: 1 !important} +.dialog.halfleft{left:5% !important} +.dialog.halfright{left:52% !important} .dialog{top:calc(100% / 3 - 100px / 3);left: calc(5% + 210px);} #window>.dialog.popped{ @@ -202,7 +208,8 @@ margin-bottom: 5px; /*--------确认--------*/ #control{text-align: center;z-index: 2;top: calc(200% / 3);left: calc(5% + 240px);width: calc(90% - 480px);} .control{padding-top: 2px;padding-bottom: 2px;padding-left: 4px;padding-right: 4px;margin-left: 4px;margin-right: 4px;} -.control{font-size: 18px;white-space: nowrap;position: relative;overflow: hidden;width: 0;opacity:0} +.control{font-size: 18px;white-space: nowrap;position: relative;overflow: hidden;opacity:0} +.control:not(.nozoom){width:0} .control>div{position: relative;padding: 3px;} /*--------角色--------*/ .player>.avatar>.action{ @@ -457,6 +464,7 @@ margin-bottom: 5px; #arena.selecting #me .card:not(.selectable)>.addinfo, #arena.selecting .dialog:not(.noselect) .button:not(.selectable):not(.noclick), .dead,.likedead{opacity: 0.6;} +.unselectable:not(.selected):not(.removing){opacity: 0.6 !important} .mark>.background{opacity: 1 !important;} #arena.selecting #me .card:not(.selectable){ opacity:0.8 @@ -471,7 +479,8 @@ margin-bottom: 5px; .purple{color: rgba(177, 62, 177,0.4);} .player,.button.character{color: white;text-shadow: black 0 0 2px;} .turnedover>div{opacity: 0.3;} -.intro{opacity: 0;display:none !important} +.intro:not(.showintro){opacity: 0;display:none !important} +.intro.showintro{white-space: nowrap} div:hover>.intro{opacity: 1;} /*.hp>div{background: white;box-shadow:0px 1px 1px rgba(0,0,0,0.5);border:1px solid #fff;border-radius: 8px;}*/ /*.hp>.lost{background: rgba(128,128,128,0.3);}*/ @@ -580,18 +589,30 @@ div[data-nature='fire']{ text-shadow: black 0 0 1px,rgba(232, 53, 53,1) 0 0 2px,rgba(232, 53, 53,1) 0 0 5px,rgba(232, 53, 53,1) 0 0 10px, rgba(232, 53, 53,1) 0 0 10px,rgba(232, 53, 53,1) 0 0 20px,rgba(232, 53, 53,1) 0 0 20px } +div[data-nature='firem']{ + text-shadow: black 0 0 1px,rgba(232, 53, 53,1) 0 0 2px,rgba(232, 53, 53,1) 0 0 5px,rgba(232, 53, 53,1) 0 0 5px, + rgba(232, 53, 53,1) 0 0 5px,black 0 0 1px; +} .player .identity[data-color="zhong"], .player .identity[data-color="qun"], div[data-nature='metal']{ text-shadow: black 0 0 1px,rgba(255, 203, 0,1) 0 0 2px,rgba(255, 203, 0,1) 0 0 5px,rgba(255, 203, 0,1) 0 0 10px, rgba(255, 203, 0,1) 0 0 10px } +div[data-nature='metalm']{ + text-shadow: black 0 0 1px,rgba(255, 203, 0,1) 0 0 2px,rgba(255, 203, 0,1) 0 0 5px,rgba(255, 203, 0,1) 0 0 5px, + rgba(255, 203, 0,1) 0 0 5px,black 0 0 1px; +} .player .identity[data-color="nei"], .player .identity[data-color="ye"], div[data-nature='thunder']{ text-shadow: rgba(100, 74, 139,1) 0 0 2px,rgba(100, 74, 139,1) 0 0 5px,rgba(100, 74, 139,1) 0 0 10px, rgba(100, 74, 139,1) 0 0 10px,rgba(100, 74, 139,1) 0 0 20px,rgba(100, 74, 139,1) 0 0 20px,black 0 0 1px; } +div[data-nature='thunderm']{ + text-shadow: rgba(100, 74, 139,1) 0 0 2px,rgba(100, 74, 139,1) 0 0 5px,rgba(100, 74, 139,1) 0 0 5px, + rgba(100, 74, 139,1) 0 0 5px,black 0 0 1px; +} .player .identity[data-color="fan"], .player .identity[data-color="wu"], div[data-nature='wood']{ @@ -604,15 +625,27 @@ div[data-nature='water']{ text-shadow: rgba(78, 117, 140,1) 0 0 2px,rgba(78, 117, 140,1) 0 0 5px,rgba(78, 117, 140,1) 0 0 10px, rgba(78, 117, 140,1) 0 0 10px,rgba(78, 117, 140,1) 0 0 20px,rgba(78, 117, 140,1) 0 0 20px,black 0 0 1px; } +div[data-nature='waterm']{ + text-shadow: rgba(78, 117, 140,1) 0 0 2px,rgba(78, 117, 140,1) 0 0 5px,rgba(78, 117, 140,1) 0 0 5px, + rgba(78, 117, 140,1) 0 0 5px,black 0 0 1px; +} .player .identity[data-color="shu"], div[data-nature='soil']{ text-shadow: rgba(128, 59, 2,1) 0 0 2px,rgba(128, 59, 2,1) 0 0 5px,rgba(128, 59, 2,1) 0 0 10px, rgba(128, 59, 2,1) 0 0 10px,rgba(128, 59, 2,1) 0 0 20px,rgba(128, 59, 2,1) 0 0 20px,black 0 0 1px; } +div[data-nature='soilm']{ + text-shadow: rgba(128, 59, 2,1) 0 0 2px,rgba(128, 59, 2,1) 0 0 5px,rgba(128, 59, 2,1) 0 0 5px, + rgba(128, 59, 2,1) 0 0 5px,black 0 0 1px; +} .player .identity[data-color="unknownx"]{ text-shadow: rgba(0,0,0,0.5) 0 0 2px,rgba(0,0,0,0.5) 0 0 5px,rgba(0,0,0,0.5) 0 0 10px, rgba(0,0,0,0.5) 0 0 10px,rgba(0,0,0,0.5) 0 0 20px,rgba(0,0,0,0.5) 0 0 20px,black 0 0 1px; } +div[data-color="unknownm"]{ + text-shadow: rgba(0,0,0,0.5) 0 0 2px,rgba(0,0,0,0.2) 0 0 5px,rgba(0,0,0,0.2) 0 0 5px, + rgba(0,0,0,0.2) 0 0 5px,black 0 0 1px; +} .card.fullskin>.background{display:none !important} .card:not(.fullskin)>.image{display:none !important} @@ -782,6 +815,10 @@ div[data-nature='soil']{ from {-webkit-transform:perspective(600px) rotateY(-90deg) translateX(52px)} to{-webkit-transform:perspective(600px) rotateY(0deg) translateX(0)} } +@-webkit-keyframes playerflip{ + from {-webkit-transform:perspective(1200px) rotateY(-90deg) translateX(150px)} + to{-webkit-transform:perspective(1200px) rotateY(0deg) translateX(0)} +} @-webkit-keyframes game_start{from {opacity: 0;}} @-webkit-keyframes equip_hover{0% {opacity: 0;}50% {opacity: 0;}} @-webkit-keyframes buttonclick{0% {-webkit-transform: scale(1);}50% {-webkit-transform: scale(0.9);}} diff --git a/layout/mode/chess.css b/layout/mode/chess.css index 1fccdc72b..85b7e6fe1 100755 --- a/layout/mode/chess.css +++ b/layout/mode/chess.css @@ -134,3 +134,10 @@ .button.forbidden{ opacity:0.6 } +#arena.leaderhide>*:not(canvas){ + opacity:0 !important; + transition: all 0.5s !important; +} +#arena.leadercontrol>#control{ + transition: all 0.5s !important; +} diff --git a/mode/chess.js b/mode/chess.js index ce1889c54..66be929c4 100755 --- a/mode/chess.js +++ b/mode/chess.js @@ -521,6 +521,59 @@ mode.chess={ game:{ minskin:true, singleHandcard:true, + addOverDialog:function(dialog,result){ + dialog.classList.add('center'); + if(result=='战斗胜利'){ + _status.victory=true; + if(!_status.enterArena){ + var div=ui.create.div(); + div.innerHTML='获得'+game.reward+'金'; + dialog.add(div); + if(_status.challenge&&_status.challengeMoney<=game.data.dust){ + var div2=ui.create.div(); + div2.style.display='block'; + div2.innerHTML='招降所需招募令:'+_status.challengeMoney+'/'+game.data.dust; + dialog.add(div2); + } + game.changeMoney(game.reward); + game.saveData(); + } + } + else if(_status.zhaoxiang){ + var div=ui.create.div(); + div.innerHTML='招降'+get.translation(_status.zhaoxiang)+'成功'; + dialog.add(div); + } + }, + controlOver:function(){ + if(_status.enterArena){ + if(_status.victory){ + game.data.arena.win++; + for(var i=0;i=money){ + ui.create.control('招降'+get.translation(_status.challenge),function(){ + game.data.character.add(_status.challenge); + game.data.challenge=game.getLeaderList(); + game.changeDust(-money); + game.reload(); + }); + } + } + } + ui.create.control('返回',game.reload); + }, phaseLoopOrdered:function(player){ var next=game.createEvent('phaseLoop'); next.player=player; @@ -547,7 +600,7 @@ mode.chess={ } } var num2=game.players.length-num1; - if(num2>num1){ + if(num2>num1&&get.config('chess_mode')!='leader'){ if(next.side==game.me.side){ next=game.me; } @@ -579,7 +632,6 @@ mode.chess={ } "step 2" var players=[]; - var next=null; if(player.side==game.me.side){ player=game.me; } @@ -589,9 +641,6 @@ mode.chess={ players.push(game.players[i]); } } - else if(!next){ - next=game.players[i]; - } } if(players.length>1){ var nevt=player.chooseTarget('选择下一个行动的角色',function(card,player,target){ @@ -608,7 +657,6 @@ mode.chess={ } else{ event.decided=players[0]; - event.player=next; } "step 3" if(event.decided){ @@ -620,16 +668,16 @@ mode.chess={ var current=result.targets[0]; current.phase(); event.justacted=current; - for(var i=0;i'+ + ''+game.data.money+''; + ui.money.style.top='auto'; + ui.money.style.left='auto'; + ui.money.style.right='20px'; + ui.money.style.bottom='15px'; + ui.money.childNodes[0].style.color='rgb(111, 198, 255)'; + ui.money.childNodes[1].style.fontFamily='huangcao'; + ui.money.childNodes[1].style.marginRight='10px'; + ui.money.childNodes[2].style.color='#FFE600'; + ui.money.childNodes[3].style.fontFamily='huangcao'; + ui.money.style.letterSpacing='4px'; game.pause(); 'step 1' - console.log(1); + game.rank=window.characterRank; + game.rank.all=game.rank.s. + concat(game.rank.ap). + concat(game.rank.a). + concat(game.rank.am). + concat(game.rank.bp). + concat(game.rank.b). + concat(game.rank.bm). + concat(game.rank.c). + concat(game.rank.d); + game.rank.common=[]; + for(var i=0;ib?1:-1; + } + return aa>bb?1:-1; + }); + if(game.data.character.length==0||!game.data.challenge){ + game.data.character=game.rank.common.randomGets(3); + game.data.challenge=game.getLeaderList(); + game.saveData(); + } + var fixButton=function(button){ + var rarity=game.getRarity(button.link); + if(rarity!='common'){ + var intro=button.node.intro; + intro.classList.add('showintro'); + intro.style.fontFamily='huangcao'; + intro.style.fontSize='20px'; + intro.style.top='67px'; + intro.style.left='1px'; + switch(rarity){ + case 'rare':intro.dataset.nature='waterm';break; + case 'epic':intro.dataset.nature='thunderm';break; + case 'legend':intro.dataset.nature='metalm';break; + } + intro.innerHTML=get.translation(rarity); + } + } + game.leaderLord=['leader_caocao','leader_liubei','leader_sunquan']; + var dialog1=ui.create.dialog('选择君主'); + event.dialog1=dialog1; + dialog1.classList.add('fixed'); + dialog1.classList.add('fullheight'); + dialog1.classList.add('halfleft'); + dialog1.add([game.leaderLord,'character']); + var i; + for(i=0;ib?1:-1; + }); + captnode.innerHTML=''; + for(i=0;i3){ + event.removeCharacter.style.opacity=1; + } + if(game.data.money<150&&!game.data._arena){ + event.enterArena.style.opacity=0.5; + } + else{ + event.enterArena.style.opacity=1; + } + if(game.data.money<100){ + event.addCharacter.style.opacity=0.5; + } + else{ + event.addCharacter.style.opacity=1; + } + initcapt(); + },200); + },200); + },500); + }; + var zhaomu=function(){ + if(_status.qianfan||_status.kaibao) return; + if(game.data.money<100) return; + _status.chessclicked=true; + _status.zhaomu=true; + event.removeCharacter.style.opacity=0.5; + event.fight.style.opacity=0.5; + clearSelected(); + for(var i=0;i=100){ + event.addCharacter.style.opacity=1; + } + if(game.data.money>=150){ + event.enterArena.style.opacity=1; + } + node.delete(); + dialog1.buttons.remove(node); + } + initcapt(); + }); + }; + event.removeCharacter=ui.create.control('遣返','nozoom',qianfan); + if(game.data.character.length<=3){ + event.removeCharacter.style.opacity=0.5; + } + event.fight=ui.create.control('开始战斗','nozoom',function(){ + if(_status.kaibao||_status.zhaomu||_status.qianfan) return; + _status.enemylist=[]; + _status.mylist=[]; + if(selected.lord.length){ + _status.mylist.push(selected.lord[0].link); + _status.lord=selected.lord[0].link; + } + if(selected.character.length){ + for(var i=0;i5)|| + (_status.qianfan&&selected.character.length>=maxq)){ + dialog1.buttons[i].classList.add('unselectable'); + } + else{ + dialog1.buttons[i].classList.remove('unselectable'); + } + } + } + break; + } + case 'difficulty':case 'number':{ + for(var i=0;i=100){ + event.addCharacter.style.opacity=1; + } + else{ + event.addCharacter.style.opacity=0.5; + } + if(game.data.money>=150||game.data._arena){ + event.enterArena.style.opacity=1; + } + else{ + event.enterArena.style.opacity=0.5; + } + event.fight.style.opacity=1; + } + else if(_status.zhaomu){ + _status.zhaomu=false; + event.addCharacter.replace('招募',zhaomu); + if(game.data.character.length>3){ + event.removeCharacter.style.opacity=1; + } + else{ + event.removeCharacter.style.opacity=0.5; + } + event.fight.style.opacity=1; + } + clearSelected(); + }; + game.pause(); + 'step 2' + if(!game.data.arena){ + event.dialog1.close(); + event.dialog2.close(); + event.fight.close(); + event.enterArena.close(); + event.addCharacter.close(); + event.removeCharacter.close(); + } + ui.arena.classList.add('leaderhide'); + ui.money.hide(); + game.delay(); + 'step 3' + ui.arena.classList.remove('leaderhide'); + if(!_status.enterArena){ + ui.wuxie.show(); + ui.auto.show(); + ui.control.style.display='none'; + ui.control.style.top=''; + ui.control.style.transition=''; + event.finish(); + } + else{ + game.minskin=false; + event.arenanodes=[]; + event.arenachoice=[]; + event.arenachoicenodes=[]; + event.arrangeNodes=function(){ + var num=event.arenachoicenodes.length; + var width=num*75+(num-1)*8; + for(var i=0;i=3){ + for(var i=0;i胜'; + victory.style.top='auto'; + victory.style.left='auto'; + victory.style.right='20px'; + victory.style.bottom='15px'; + victory.style.fontSize='30px' + victory.style.fontFamily='huangcao'; + victory.firstChild.style.marginRight='5px'; + ui.window.appendChild(victory); + ui.refresh(victory); + victory.show(); + + event.checkPrize=function(){ + // event.kaibao=true; + event.prize=[]; + event.turnCard2=function(){ + if(this.turned) return; + _status.chessclicked=true; + this.turned=true; + var node=this; + setTimeout(function(){ + node.turned2=true; + },1000); + if(node.name=='chess_coin'||node.name=='chess_dust'){ + node.style.transition='all 0s'; + node.style.webkitTransform='none'; + node.style.overflow='visible'; + node.style.background='none'; + node.style.boxShadow='none'; + var div=ui.create.div(node); + div.style.transition='all 0s'; + if(node.name=='chess_coin'){ + div.innerHTML=''+node.num+''; + div.firstChild.style.color='rgb(255, 230, 0)'; + node.$coin(); + } + else{ + div.innerHTML=''+node.num+''; + div.firstChild.style.color='rgb(111, 198, 255)'; + div.firstChild.style.marginRight='3px'; + node.$dust(); + } + div.style.fontFamily='huangcao'; + div.style.fontSize='50px'; + div.style.top='40px'; + div.style.letterSpacing='8px'; + div.style.whiteSpace='nowrap'; + // div.dataset.nature='metal'; + + return; + } + node.style.transition='all ease-in 0.3s'; + node.style.webkitTransform='perspective(1200px) rotateY(270deg) translateX(150px)'; + node.addEventListener('webkitTransitionEnd',function(){ + node.init(node.name); + node.node.avatar.style.display=''; + if(node.rarity){ + node.node.intro.innerHTML=get.translation(node.rarity); + node.node.intro.classList.add('showintro'); + } + node.classList.add('playerflip'); + node.style.webkitTransform='none'; + node.style.transition=''; + setTimeout(function(){ + switch(game.getRarity(node.name)){ + case 'rare':node.$rare();break; + case 'epic':node.$epic();break; + case 'legend':node.$legend();break; + } + },150); + }); + }; + setTimeout(function(){ + nodes[0].delete(); + },400+Math.random()*300); + setTimeout(function(){ + nodes[1].delete(); + },400+Math.random()*300); + setTimeout(function(){ + nodes[2].delete(); + },400+Math.random()*300); + setTimeout(function(){ + nodes[3].delete(); + },400+Math.random()*300); + setTimeout(function(){ + nodes[4].delete(); + },400+Math.random()*300); + setTimeout(function(){ + nodes[5].delete(); + },400+Math.random()*300); + setTimeout(function(){ + nodes[6].delete(); + },400+Math.random()*300); + setTimeout(function(){ + nodes[7].delete(); + },400+Math.random()*300); + setTimeout(function(){ + nodes[8].delete(); + },400+Math.random()*300); + setTimeout(function(){ + var prize=new Array(6); + var map=[1,2,3,4,5]; + var ccount=3; + var win=game.data.arena.win; + var prizeValue; + switch(win){ + case 0:prizeValue=100;break; + case 1:prizeValue=120;break; + case 2:prizeValue=150;break; + case 3:prizeValue=190;break; + case 4:prizeValue=240;break; + case 5:prizeValue=300;break; + case 6:prizeValue=370;break; + case 7:prizeValue=450;break; + case 8:prizeValue=540;break; + case 9:prizeValue=640;break; + case 10:prizeValue=750;break; + case 11:prizeValue=870;break; + case 12:prizeValue=1000;break; + } + if(Math.random()<0.4){ + if(win>=3&&Math.random()<0.5){ + ccount=4; + prizeValue-=33; + } + else{ + ccount=2; + prizeValue+=33; + } + } + prizeValue-=100; + while(ccount--){ + prize[map.randomRemove()]=game.getLeaderCharacter(); + } + if(map.length){ + prizeValue/=map.length; + } + while(map.length){ + var val=Math.round((Math.random()*0.4+0.8)*prizeValue); + if(Math.random()<0.7){ + prize[map.shift()]=['chess_coin',Math.max(Math.ceil(Math.random()*5),val)]; + } + else{ + val=Math.round(val/3); + prize[map.shift()]=['chess_dust',Math.max(Math.ceil(Math.random()*3),val)]; + } + } + for(var i=1;i

' + for(var i=0;i'+ + (skill.chance(targets[i],player)*100).toFixed(2)+'%
'; + } + str+='

' + } + return str; + }, + chance:function(target,player){ + var chance; + var renyi=player.skills.contains('leader_renyi'); + switch(target.hp){ + case 1:chance=0.7;break; + case 2:chance=0.4;break; + default:chance=0.2;break; + } + switch(target.num('he')){ + case 0:break; + case 1:chance/=1.2;break; + case 2:chance/=1.4;break; + case 3:chance/=1.7;break; + default:chance/=2;break; + } + switch(game.getRarity(target.name)){ + case 'common':{ + if(renyi) chance*=2; + break; + } + case 'rare':{ + chance/=2; + if(renyi) chance*=2; + break; + } + case 'epic':{ + chance/=5; + if(renyi) chance*=1.5; + break; + } + case 'legend':{ + chance/=15; + if(renyi) chance*=1.2; + break; + } + } + return Math.min(1,chance); + }, + filter:function(){ + return game.data.dust>=10; + }, + filterTarget:function(card,player,target){ + return game.isChessNeighbour(player,target)&&!game.data.character.contains(target.name); + }, + content:function(){ + var chance=lib.skill.leader_zhaoxiang.chance(target,player); + game.changeDust(-10); + if(Math.random()0; + }, + content:function(){ + switch(_status.difficulty){ + case 'leader_easy':game.reward+=2*trigger.num;break; + case 'leader_medium':game.reward+=4*trigger.num;break; + case 'leader_hard':game.reward+=6*trigger.num;break; + } + } + }, + leader_renyi:{ + unique:true, + }, + leader_mouduan:{ + unique:true, + global:'leader_mouduan2' + }, + leader_mouduan2:{ + mod:{ + chessMove:function(player,current){ + if(player.side&&player.name!=_status.lord) return current+1; + } + } + }, + tongshuai:{ + unique:true, + forbid:['guozhan'], + init:function(player){ + player.storage.tongshuai={ + list:[], + owned:{}, + player:player, + get:function(num){ + if(typeof num!='number') num=1; + var player=this.player; + while(num--){ + var name=player.storage.tongshuai.unowned.shift(); + if(!name) return; + var skills=lib.character[name][3].slice(0); + for(var i=0;i
【'+get.translation(skill)+ + '】
'+lib.translate[skill+'_info']+'
'); + } + } + }, + mark:true + }, + tongshuai1:{ + trigger:{global:'gameStart'}, + forced:true, + popup:false, + priority:10, + content:function(){ + for(var i=0;i1){ + player.storage.tongshuai.get(2); + } + else if(player.storage.tongshuai.unowned.length==1){ + player.storage.tongshuai.get(); + } + else{ + player.removeSkill('tongshuai'); + } + } + }, + tongshuai2:{ + audio:2, + trigger:{player:['phaseBegin','phaseEnd'],global:'gameStart'}, + filter:function(event,player,name){ + if(!player.skills.contains('tongshuai')) return false; + if(name=='phaseBegin'&&game.phaseNumber==1) return false; + return true; + }, + priority:-9, + forced:true, + popup:false, + content:function(){ + var slist=player.storage.tongshuai.owned; + var list=[]; + for(var i in slist){ + list.push(i); + } + if(event.isMine()){ + event.dialog=ui.create.dialog('选择获得一项技能',[list,'character']); + if(trigger.name=='game'){ + event.control=ui.create.control(); + } + else{ + event.control=ui.create.control(['cancel']); + } + event.clickControl=function(link){ + if(link!='cancel'){ + var currentname=event.dialog.querySelector('.selected.button').link; + var mark=player.marks.tongshuai; + if(trigger.name=='game'){ + mark.hide(); + mark.style.webkitTransform='scale(0.8)'; + mark.style.transition='all 0.3s'; + setTimeout(function(){ + mark.style.transition='all 0s'; + ui.refresh(mark); + mark.setBackground(currentname,'character'); + if(mark.firstChild){ + mark.firstChild.remove(); + } + setTimeout(function(){ + mark.style.transition=''; + mark.show(); + mark.style.webkitTransform=''; + },50); + },500); + } + else{ + mark.setBackground(currentname,'character'); + } + + player.additionalSkills.tongshuai=link; + player.logSkill('tongshuai2'); + game.log(get.translation(player)+'获得技能'+get.translation(link)); + player.popup(link); + + for(var i=0;i0; + }, + content:function(){ + player.storage.tongshuai.get(); + } + }, cangming:{ enable:'phaseUse', usable:1, @@ -1803,6 +3597,19 @@ mode.chess={ save4:'四', save5:'五', + leader_2:' ', + leader_2_bg:'二', + leader_3:' ', + leader_3_bg:'三', + leader_5:' ', + leader_5_bg:'五', + leader_8:' ', + leader_8_bg:'八', + + leader_easy:'简单', + leader_medium:'普通', + leader_hard:'困难', + chess_caocao:'曹操', chess_xunyu:'荀彧', chess_simayi:'司马懿', @@ -1843,6 +3650,26 @@ mode.chess={ chess_beimingjukun:'北溟巨鲲', chess_wuzhaojinlong:'五爪金龙', + leader_caocao:'曹操', + leader_liubei:'刘备', + leader_sunquan:'孙权', + leader_xiaoxiong:'枭雄', + leader_xiaoxiong_info:'你造成伤害后会得到一定数量的金钱奖励', + leader_renyi:'仁义', + leader_renyi_info:'你招降敌将的成功率大幅增加', + leader_mouduan:'谋断', + leader_mouduan_info:'其他友方角色回合内的行动范围+1', + + tongshuai:'统率', + tongshuai_info:'回合开始和结束阶段,你可以选择一名未上场的已方武将的一个技能作为你的技能', + leader_zhaoxiang:'招降', + leader_zhaoxiang_info:'出牌阶段限一次,你可以尝试对相邻敌方武将进行招降,若成功,你获得该武将并立即结束本局游戏,若失败,你受到一点伤害。每发动一次消耗10招募令', + + common:'普通', + rare:'稀有', + epic:'史诗', + legend:'传说', + pianyi:'翩仪', pianyi_info:'回合结束阶段,若你没有于本回合内造成伤害,你获得一次移动机会', lingdong:'移动射击', @@ -1924,7 +3751,50 @@ mode.chess={ } } }, + card:{ + leader_2:{ + opacity:1, + color:'white', + textShadow:'black 0 0 2px' + }, + leader_3:{ + opacity:1, + color:'white', + textShadow:'black 0 0 2px' + }, + leader_5:{ + opacity:1, + color:'white', + textShadow:'black 0 0 2px' + }, + leader_8:{ + opacity:1, + color:'white', + textShadow:'black 0 0 2px' + }, + leader_easy:{ + color:'white', + opacity:1, + textShadow:'black 0 0 2px', + image:'card/leader_easy' + }, + leader_medium:{ + color:'white', + opacity:1, + textShadow:'black 0 0 2px', + image:'card/leader_medium' + }, + leader_hard:{ + color:'white', + opacity:1, + textShadow:'black 0 0 2px', + image:'card/leader_hard' + } + }, chess_character:{ + leader_caocao:['male','wei',4,['leader_xiaoxiong']], + leader_liubei:['male','shu',4,['leader_renyi']], + leader_sunquan:['male','wu',4,['leader_mouduan']], // chess_caocao:['male','wei',3,['']], // chess_xunyu:['male','wei',3,['']], // chess_simayi:['male','wei',3,['']], @@ -1955,7 +3825,7 @@ mode.chess={ // chess_lvbu:['male','qun',3,['']], chess_sunshangxiang:['female','wu',3,['lingdong','lianshe','gongji']], chess_diaochan:['female','qun',3,['xingzhui','pianyi']], - chess_huatuo:['male','qun',3,['zhenjiu','mazui']], + // chess_huatuo:['male','qun',3,['zhenjiu','mazui']], // chess_zhangjiao:['male','qun',3,['']], // chess_menghuo:['male','qun',3,['']], // @@ -1967,107 +3837,113 @@ mode.chess={ }, posmap:{}, help:{ - '战棋模式':'
  • n人对战n人的模式,由单人控制,开始游戏后随机分配位置与出牌顺序
  • '+ + '战棋模式':'对阵:
    • n人对战n人的模式,由单人控制,开始游戏后随机分配位置与出牌顺序
    • '+ '每人在出牌阶段有一次移动的机会,若一名角色在移动之前使用过指定其他角色为目标的牌,该回合可移动的最大距离为2,否则最大距离为1
    • '+ '任何卡牌或技能无法指定位置相隔8个格以上的角色为目标
    • '+ '杀死对方阵营的角色可摸一张牌,杀死本方阵营无惩罚
    • '+ - '开启指定行动顺序后,双方将交替行动,在一方行动完毕进行下一轮行动时,若其人数比另一方少,另一方可指定至多X名角色名摸一张牌,X为人数之差' + '开启指定行动顺序后,双方将交替行动,在一方行动完毕进行下一轮行动时,若其人数比另一方少,另一方可指定至多X名角色名摸一张牌,X为人数之差
    '+ + '统率:
    • 收集武将进行战斗,根据战斗难度及我方出场武将的强度,战斗胜利后将获得数量不等的金钱。没有君主出场时,获得的金钱较多
    • '+ + '金钱可以用来招募随机武将,招到已有武将,或遣返不需要的武将时可得到招募令
    • '+ + '战斗中有君主出场时可招降敌将,成功率取决于敌将的稀有度、剩余体力值以及手牌数。成功后战斗立即结束且没有金钱奖励。每发动一次招降,无论成功还是失败,都会扣除10招募令
    • '+ + '挑战武将会与该武将以及与其强度相近的武将进行战斗,敌方人数与我方出场人数相同,但不少于3。胜利后可通过招募令招募该武将
    • '+ + '竞技场中,你随机选择9名武将,每次派出1〜3名武将参战。战斗中阵亡的武将不能再次上场。当取得12场胜利或所有武将全部阵亡后结束,并根据胜场数获得随机奖励' }, config:[ - function(game,lib,get,ui){ - var current=get.config('chess_mode'); - if(typeof current!=='string'){ - game.saveConfig('chess_mode','combat',true); - current='combat'; - } - return ui.create.switcher('chess_mode',['combat','leader'],current,function(){ - ui.click.sidebar.local.apply(this,arguments); - window.location.reload(); - }); - }, - function(game,lib,get,ui){ - if(get.config('chess_mode')!='leader') return; - var current=get.config('chess_leader_save'); - if(typeof current!=='string'){ - current='save1'; - game.saveConfig('chess_leader_save',current,true); - } - return ui.create.switcher('chess_leader_save',['save1','save2','save3','save4','save5'],current,function(){ - ui.click.sidebar.local.apply(this,arguments); - window.location.reload(); - }); - }, - function(game,lib,get,ui){ - if(get.config('chess_mode')!='leader') return; - var switcher=ui.create.line('清除进度',function(){ - var node=this; - if(node._clearing){ - game.save(get.config('chess_leader_save'),null); - window.location.reload(); - return; + function(game,lib,get,ui){ + var current=get.config('chess_mode'); + if(typeof current!=='string'){ + game.saveConfig('chess_mode','combat',true); + current='combat'; } - node._clearing=true; - node.innerHTML='单击以确认 (3)'; - setTimeout(function(){ - node.innerHTML='单击以确认 (2)'; + return ui.create.switcher('chess_mode',['combat','leader'],current,function(){ + ui.click.sidebar.local.apply(this,arguments); + window.location.reload(); + }); + }, + function(game,lib,get,ui){ + if(get.config('chess_mode')!='leader') return; + var current=get.config('chess_leader_save'); + if(typeof current!=='string'){ + current='save1'; + game.saveConfig('chess_leader_save',current,true); + } + return ui.create.switcher('chess_leader_save',['save1','save2','save3','save4','save5'],current,function(){ + ui.click.sidebar.local.apply(this,arguments); + window.location.reload(); + }); + }, + function(game,lib,get,ui){ + if(get.config('chess_mode')!='leader') return; + var switcher=ui.create.line('清除进度',function(){ + var node=this; + if(node._clearing){ + game.save(get.config('chess_leader_save'),null); + window.location.reload(); + return; + } + node._clearing=true; + node.innerHTML='单击以确认 (3)'; setTimeout(function(){ - node.innerHTML='单击以确认 (1)'; + node.innerHTML='单击以确认 (2)'; setTimeout(function(){ - node.innerHTML='清除进度'; - delete node._clearing; + node.innerHTML='单击以确认 (1)'; + setTimeout(function(){ + node.innerHTML='清除进度'; + delete node._clearing; + },1000); },1000); },1000); - },1000); - }); - return switcher; - }, - function(){ - if(get.config('chess_mode')!='leader'){ - return 'battle_number'; + }); + return switcher; + }, + function(game,lib,get,ui){ + if(get.config('chess_mode')!='leader'){ + return 'battle_number'; + } + }, + function(game,lib,get,ui){ + if(get.config('chess_mode')!='leader'){ + return 'ban_weak'; + } + }, + function(game,lib,get,ui){ + if(get.config('chess_mode')!='leader'){ + return 'free_choose'; + } + }, + function(game,lib,get,ui){ + if(get.config('chess_mode')!='leader'){ + return 'change_choice'; + } + }, + function(game,lib,get,ui){ + if(get.config('chess_mode')=='leader'){ + return; + } + var current=get.config('chess_ordered'); + if(typeof current!=='boolean'){ + game.saveConfig('chess_ordered',true,true); + current=true; + } + return ui.create.switcher('chess_ordered',current,ui.click.sidebar.local2); + }, + function(game,lib,get,ui){ + if(get.config('chess_mode')=='leader'){ + return; + } + var current=get.config('chess_character'); + if(typeof current!=='boolean'){ + game.saveConfig('chess_character',true,true); + current=true; + } + return ui.create.switcher('chess_character',current,ui.click.sidebar.local2); + },function(game,lib,get,ui){ + var current=get.config('chessscroll_speed'); + if(typeof current!=='number'){ + game.saveConfig('chessscroll_speed',20,true); + current=20; + } + return ui.create.switcher('chessscroll_speed',[0,10,20,30],current,ui.click.sidebar.local); } - }, - function(){ - if(get.config('chess_mode')!='leader'){ - return 'ban_weak'; - } - }, - function(){ - if(get.config('chess_mode')!='leader'){ - return 'free_choose'; - } - }, - function(){ - if(get.config('chess_mode')!='leader'){ - return 'change_choice'; - } - }, - function(game,lib,get,ui){ - if(get.config('chess_mode')=='leader'){ - return; - } - var current=get.config('chess_ordered'); - if(typeof current!=='boolean'){ - game.saveConfig('chess_ordered',true,true); - current=true; - } - return ui.create.switcher('chess_ordered',current,ui.click.sidebar.local2); - }, - function(game,lib,get,ui){ - if(get.config('chess_mode')=='leader'){ - return; - } - var current=get.config('chess_character'); - if(typeof current!=='boolean'){ - game.saveConfig('chess_character',true,true); - current=true; - } - return ui.create.switcher('chess_character',current,ui.click.sidebar.local2); - },function(game,lib,get,ui){ - var current=get.config('chessscroll_speed'); - if(typeof current!=='number'){ - game.saveConfig('chessscroll_speed',20,true); - current=20; - } - return ui.create.switcher('chessscroll_speed',[0,10,20,30],current,ui.click.sidebar.local); - }], + ], }