diff --git a/card/compensate.js b/card/compensate.js index 4484a6f6c..9e5b7f881 100755 --- a/card/compensate.js +++ b/card/compensate.js @@ -4,26 +4,13 @@ card.compensate={ ['club',8,'guohe'], ['spade',13,'guohe'], - ["heart",4,"huogong","fire"], - ["diamond",5,"huogong","fire"], - ["diamond",10,"huogong","fire"], - ["diamond",13,"huogong","fire"], - - ["heart",1,"juedou"], - ["diamond",1,"juedou"], - ["club",1,"juedou"], - - ["heart",12,"wuzhong"], - ["diamond",3,"wuzhong"], + ['diamond',8,'shunshou'], + ['heart',5,'shunshou'], ["club",10,"wuxie"], ["spade",10,"wuxie"], ["spade",11,"wuxie"], - // ['heart',5,'jiu'], - // ['spade',9,'jiu'], - // ['spade',2,'jiu'], - ['heart',8,'tao'], ['heart',10,'tao'], diff --git a/card/extra.js b/card/extra.js index 5e1b04af8..600f34f0a 100755 --- a/card/extra.js +++ b/card/extra.js @@ -449,6 +449,7 @@ card.extra={ huogong:'火攻', tiesuo:'铁锁连环', huogong_bg:'攻', + huogong_info:'目标角色展示一张手牌,然后若你能弃掉一张与所展示牌相同花色的手牌,则火攻对该角色造成1点火焰伤害。', tiesuo_bg:'锁', _chongzhu:'重铸', _lianhuan:'连环', @@ -514,7 +515,7 @@ card.extra={ ["spade",2,"tengjia",'fire'], ["club",2,"tengjia",'fire'], ["spade",1,"guding"], - ["diamond",2,"zhuque",'fire'], + ["diamond",1,"zhuque",'fire'], ["heart",2,"huogong","fire"], ["heart",3,"huogong","fire"], diff --git a/card/guozhan.js b/card/guozhan.js index 65a6b47ee..7904ea5bb 100755 --- a/card/guozhan.js +++ b/card/guozhan.js @@ -249,5 +249,8 @@ card.guozhan={ ['diamond',6,'wuliu'], ['diamond',12,'sanjian'], ['heart',3,'jingfanma'], + ["spade",4,'shunshou'], + ["spade",12,'guohe'], + ["spade",11,'wuxie'], ], } diff --git a/card/hearth.js b/card/hearth.js index 61b931e0c..033b01d5b 100644 --- a/card/hearth.js +++ b/card/hearth.js @@ -1,7 +1,407 @@ 'use strict'; card.hearth={ card:{ + jihuocard:{ + type:'basic', + enable:true, + filterTarget:function(card,player,target){ + return player==target; + }, + selectTarget:-1, + content:function(){ + target.skip('phaseDiscard'); + if(target.num('h')<=target.hp){ + target.draw(); + } + }, + ai:{ + order:1, + result:{ + target:1 + } + } + }, + zhaomingdan:{ + type:'trick', + chongzhu:true, + enable:function(card,player){ + for(var i=0;i0; + }, + content:function(){ + target.discard(target.get('j')); + }, + ai:{ + order:9.5, + value:1, + result:{ + target:function(player,target){ + var js=target.get('j'); + var num=0; + for(var i=0;i=0){ + num--; + } + else{ + num++; + } + } + return num; + } + } + } + }, + yexinglanghun:{ + enable:true, + type:'trick', + filterTarget:function(card,player,target){ + return !target.isMin(); + }, + content:function(){ + 'step 0' + var cards=[]; + for(var i=0;i<2;i++){ + var card=get.cardPile(function(card){ + return get.type(card)=='equip'; + }); + if(card){ + ui.special.appendChild(card); + cards.push(card); + } + } + switch(cards.length){ + case 1:{ + target.$gain(cards[0]); + game.delay(); + break; + } + case 2:{ + target.$gain(cards[0]); + setTimeout(function(){ + target.$gain(cards[1]); + },250); + game.delay(); + break; + } + } + event.cards=cards; + 'step 1' + if(event.cards.length){ + target.equip(event.cards.shift()); + game.delay(0.5); + if(event.cards.length){ + event.redo(); + } + } + 'step 2' + game.delay(0.5); + 'step 3' + var hs=player.get('h'); + if(hs.length){ + player.discard(hs.randomGet()); + } + }, + ai:{ + order:9, + value:6, + useful:2, + result:{ + target:function(player,target){ + return Math.max(0,2-target.num('e')); + }, + player:-0.5 + } + } + }, + shandianjian:{ + type:'trick', + enable:true, + filterTarget:function(card,player,target){ + if(player!=game.me&&player.num('h')<2) return false; + return target.num('h')>0; + }, + content:function(){ + "step 0" + if(target.get('h').length==0){ + event.finish(); + return; + } + 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]; + game.log(get.translation(target.name)+'展示了'+get.translation(event.card2)); + player.chooseToDiscard(function(card){ + return get.suit(card)==get.suit(_status.event.parent.card2); + },function(card){ + if(ai.get.damageEffect(target,player,player,'thunder')>0){ + return 6-ai.get.value(card,_status.event.player); + } + return -1; + }).prompt=false; + game.delay(2); + "step 2" + if(result.bool){ + target.damage('thunder'); + } + else{ + target.addTempSkill('shandianjian2','phaseBegin'); + } + event.dialog.close(); + }, + ai:{ + basic:{ + order:4, + value:[3,1], + useful:1, + }, + result:{ + player:function(player){ + var nh=player.num('h'); + if(nh<=player.hp&&_status.event.name=='chooseToUse'){ + if(_status.event.filterCard&& + _status.event.filterCard({name:'shandianjian'})){ + return -10; + } + if(_status.event.skill){ + var viewAs=get.info(_status.event.skill).viewAs; + if(viewAs=='shandianjian') return -10; + if(viewAs&&viewAs.name=='shandianjian') return -10; + } + } + return 0; + }, + target:function(player,target){ + if(target.skills.contains('shandianjian2')||target.num('h')==0) return 0; + if(target==player){ + if(_status.event.filterCard&& + _status.event.filterCard({name:'shandianjian'})){ + return -1.5; + } + if(_status.event.skill){ + var viewAs=get.info(_status.event.skill).viewAs; + if(viewAs=='shandianjian') return -1.5; + if(viewAs&&viewAs.name=='shandianjian') return -1.5; + } + return 0; + } + return -1.5; + } + }, + tag:{ + damage:1, + thunderDamage:1, + natureDamage:1, + } + } + }, + shihuawuqi:{ + type:'basic', + enable:true, + usable:1, + filterTarget:function(card,player,target){ + return player==target; + }, + selectTarget:-1, + content:function(){ + player.addTempSkill('shihuawuqi','phaseAfter'); + if(!player.num('h','sha')){ + var card=get.cardPile('sha'); + if(card){ + player.gain(card,'gain2'); + } + } + }, + ai:{ + value:4, + useful:2, + order:8, + result:{ + target:function(player,target){ + return target.num('h','sha')?0:1; + } + } + } + }, + siwangchanrao:{ + enable:true, + type:'trick', + filterTarget:function(card,player,target){ + return player!=target&&target.num('h')>0; + }, + selectTarget:1, + content:function(){ + 'step 0' + var hs=target.get('h'); + if(hs.length){ + target.discard(hs.randomGet()); + } + 'step 1' + if(!target.num('h')){ + player.draw(); + } + }, + ai:{ + order:9, + value:4, + useful:1, + result:{ + target:-1, + player:function(player,target){ + if(target.num('h')==1) return 1; + } + } + } + }, + dunpaigedang:{ + enable:true, + type:'trick', + filterTarget:function(card,player,target){ + return player==target; + }, + selectTarget:-1, + content:function(){ + target.changeHujia(); + target.draw(); + }, + ai:{ + order:8.5, + value:7, + useful:3, + result:{ + target:1 + } + } + }, + chuansongmen:{ + type:'basic', + enable:true, + discard:false, + selectTarget:-1, + filterTarget:function(card,player,target){ + return target==player; + }, + usable:3, + content:function(){ + 'step 0' + ui.special.appendChild(cards[0]); + player.storage.chuansongmen=cards[0]; + var gained=get.cards()[0]; + target.gain(gained,'gain2'); + if(lib.filter.filterCard(gained,player,event.parent.parent)){ + var next=player.chooseToUse(); + next.filterCard=function(card){ + return card==gained; + }; + next.prompt='是否使用'+get.translation(gained)+'?'; + } + else{ + ui.discardPile.appendChild(cards[0]); + event.finish(); + } + 'step 1' + if(result.bool){ + player.gain(cards,'gain2'); + } + else{ + ui.discardPile.appendChild(cards[0]); + } + }, + ai:{ + order:9.5, + value:7, + useful:2, + result:{ + target:1 + } + } + }, + tanshezhiren:{ + type:'trick', + enable:function(){ + for(var i=0;i0; + }, + selectTarget:-1, + multitarget:true, + multiline:true, + content:function(){ + 'step 0' + for(var i=0;i1){ + event.current=current; + event.redo(); + } + }, + ai:{ + order:8, + result:{ + target:-1 + } + } + }, + xingjiegoutong:{ + type:'basic', + enable:true, + selectTarget:-1, + filterTarget:function(card,player,target){return player==target}, + content:function(){ + target.gainMaxHp(); + target.loseHp(); + }, + ai:{ + basic:{ + useful:[1,1], + value:[1,1], + }, + order:1, + result:{ + target:function(player,target){ + if(target.hp==target.maxHp){ + if(target.num('h','tao')) return 1; + if(target.num('h','caoyao')) return 1; + if(target.num('h','zhiliaobo')) return 1; + if(target.num('h')