diff --git a/card/gujian.js b/card/gujian.js index bee417a72..42838fdb3 100644 --- a/card/gujian.js +++ b/card/gujian.js @@ -43,20 +43,51 @@ card.gujian={ type:'food', enable:true, filterTarget:function(card,player,target){ - return target==player; + return !target.hasSkill('gudonggeng'); }, - selectTarget:-1, - modTarget:true, + range:{global:1}, + content:function(){ + target.$gain2(cards); + target.storage.gudonggeng=card; + target.storage.gudonggeng_markcount=3; + target.addSkill('gudonggeng'); + }, + ai:{ + order:2, + value:4, + result:{ + target:function(player,target){ + if(player==target&&!player.hasShan()) return 2; + return 1/Math.max(1,target.hp); + } + } + } }, liyutang:{ fullskin:true, type:'food', enable:true, filterTarget:function(card,player,target){ - return target==player; + return !target.hasSkill('liyutang'); }, - selectTarget:-1, - modTarget:true, + range:{global:1}, + content:function(){ + target.$gain2(cards); + target.storage.liyutang=card; + target.storage.liyutang_markcount=2; + target.addSkill('liyutang'); + }, + ai:{ + order:2, + value:4, + result:{ + target:function(player,target){ + if(player==target&&target.isLeastHp()) return 2; + if(target.isLeastHp()) return 1.5; + return 1/Math.max(1,target.hp); + } + } + } }, mizhilianou:{ fullskin:true, @@ -100,15 +131,62 @@ card.gujian={ } } }, + mapodoufu:{ + fullskin:true, + type:'food', + enable:true, + filterTarget:function(card,player,target){ + return !target.hasSkill('mapodoufu'); + }, + range:{global:1}, + content:function(){ + target.$gain2(cards); + target.storage.mapodoufu=card; + target.storage.mapodoufu_markcount=3; + target.addSkill('mapodoufu'); + }, + ai:{ + order:2, + value:5, + result:{ + target:function(player,target){ + return player==target?2:1; + } + } + } + }, qingtuan:{ fullskin:true, type:'food', enable:true, filterTarget:function(card,player,target){ - return target==player; + return !target.hasSkill('qingtuan'); }, - selectTarget:-1, - modTarget:true, + range:{global:1}, + content:function(){ + target.$gain2(cards); + target.storage.qingtuan=card; + target.storage.qingtuan_markcount=2; + target.addSkill('qingtuan'); + }, + ai:{ + order:4, + value:4, + result:{ + target:function(player,target){ + if(target==player){ + if(target.hasSha()) return 2; + } + else{ + var nh=target.num('h'); + if(nh>=3) return 1; + if(target.hasSha()) return 1; + if(num&&Math.random()<0.5) return 1; + } + return player.needsToDiscard?0.2:0; + } + } + } }, yougeng:{ fullskin:true, @@ -129,7 +207,8 @@ card.gujian={ value:4, result:{ target:function(player,target){ - if(target.isHealthy()) return 0; + if(target.isHealthy()) return player.needsToDiscard?0.1:0; + if(target.isLeastHp()) return 1.5; return 1/Math.max(1,target.hp); } } @@ -180,25 +259,20 @@ card.gujian={ value:4, result:{ target:function(player,target){ - if(target.hasSha()){ - if(target==player) return 2; - return 1; + if(target==player){ + if(target.hasSha()) return 2; } - return 0.2; + else{ + var nh=target.num('h'); + if(nh>=3) return 1; + if(target.hasSha()) return 1; + if(num&&Math.random()<0.5) return 1; + } + return player.needsToDiscard?0.2:0; } } } }, - mapodoufu:{ - fullskin:true, - type:'food', - enable:true, - filterTarget:function(card,player,target){ - return target==player; - }, - selectTarget:-1, - modTarget:true, - }, heilonglinpian:{ fullskin:true, type:'trick', @@ -741,6 +815,110 @@ card.gujian={ }, }, skill:{ + gudonggeng:{ + mark:'card', + trigger:{player:'phaseBegin'}, + direct:true, + nopop:true, + intro:{ + content:function(storage,player){ + return '你受到杀造成的伤害时有50%的机率令伤害-1(剩余'+player.storage.gudonggeng_markcount+'回合)' + } + }, + content:function(){ + player.storage.gudonggeng_markcount--; + if(player.storage.gudonggeng_markcount==0){ + delete player.storage.gudonggeng; + delete player.storage.gudonggeng_markcount; + player.removeSkill('gudonggeng'); + } + else{ + player.updateMarks(); + } + }, + group:'gudonggeng_damage', + subSkill:{ + damage:{ + trigger:{player:'damageBegin'}, + filter:function(event,player){ + return event.card&&event.card.name=='sha'&&event.num>0&&Math.random()<0.5; + }, + forced:true, + content:function(){ + trigger.num--; + } + } + }, + ai:{ + effect:{ + target:function(card,player,target){ + if(card.name=='sha'&&ai.get.attitude(player,target)<0) return 0.5; + } + } + } + }, + qingtuan:{ + mark:'card', + trigger:{player:'phaseAfter'}, + direct:true, + nopop:true, + intro:{ + content:function(storage,player){ + return '你在回合内使用首张杀时摸一张牌(剩余'+player.storage.qingtuan_markcount+'回合)' + } + }, + content:function(){ + player.storage.qingtuan_markcount--; + if(player.storage.qingtuan_markcount==0){ + delete player.storage.qingtuan; + delete player.storage.qingtuan_markcount; + player.removeSkill('qingtuan'); + } + else{ + player.updateMarks(); + } + }, + group:'qingtuan_draw', + subSkill:{ + draw:{ + trigger:{player:'useCard'}, + filter:function(event,player){ + return event.card.name=='sha'&&_status.currentPhase==player; + }, + usable:1, + forced:true, + content:function(){ + player.draw(); + } + } + } + }, + liyutang:{ + mark:'card', + trigger:{player:'phaseEnd'}, + direct:true, + nopop:true, + intro:{ + content:function(storage,player){ + return '结束阶段,若你的体力值为全场最少或之一,你获得一点护甲(剩余'+player.storage.liyutang_markcount+'回合)' + } + }, + content:function(){ + if(player.isLeastHp()){ + player.logSkill('liyutang'); + player.changeHujia(); + } + player.storage.liyutang_markcount--; + if(player.storage.liyutang_markcount==0){ + delete player.storage.liyutang; + delete player.storage.liyutang_markcount; + player.removeSkill('liyutang'); + } + else{ + player.updateMarks(); + } + }, + }, yougeng:{ mark:'card', trigger:{player:'phaseBegin'}, @@ -774,7 +952,7 @@ card.gujian={ nopop:true, intro:{ content:function(storage,player){ - return '不能成为延时锦囊牌的目标(剩余'+player.storage.molicha_markcount+'回合)' + return '你不能成为延时锦囊牌的目标(剩余'+player.storage.molicha_markcount+'回合)' } }, mod:{ @@ -812,7 +990,7 @@ card.gujian={ nopop:true, intro:{ content:function(storage,player){ - return '在出牌阶段可以额外使用一张杀(剩余'+player.storage.yuanbaorou_markcount+'回合)' + return '你在出牌阶段可以额外使用一张杀(剩余'+player.storage.yuanbaorou_markcount+'回合)' } }, mod:{ @@ -839,7 +1017,7 @@ card.gujian={ nopop:true, intro:{ content:function(storage,player){ - return '结束阶段有50%机率摸一张牌(剩余'+player.storage.tanhuadong_markcount+'回合)' + return '结束阶段有,你50%机率摸一张牌(剩余'+player.storage.tanhuadong_markcount+'回合)' } }, content:function(){ @@ -858,6 +1036,40 @@ card.gujian={ } } }, + mapodoufu:{ + mark:'card', + trigger:{player:'phaseEnd'}, + direct:true, + nopop:true, + intro:{ + content:function(storage,player){ + return '结束阶段,你有75%的机率弃置一名随机敌人的一张随机牌(剩余'+player.storage.mapodoufu_markcount+'回合)' + } + }, + content:function(){ + if(Math.random()<0.75){ + var list=player.getEnemies(); + for(var i=0;i