diff --git a/card/extra.js b/card/extra.js index 43904a2fe..60e4f1587 100644 --- a/card/extra.js +++ b/card/extra.js @@ -10,7 +10,8 @@ game.import('card',function(lib,game,ui,get,ai,_status){ type:"basic", toself:true, enable:function(event,player){ - return !player.hasSkill('jiu'); + //return !player.hasSkill('jiu'); + return true; }, lianheng:true, logv:false, @@ -34,6 +35,8 @@ game.import('card',function(lib,game,ui,get,ai,_status){ if(cards&&cards.length){ card=cards[0]; } + if(!player.storage.jiu) player.storage.jiu=0; + player.storage.jiu++; game.broadcastAll(function(target,card,gain2){ target.addSkill('jiu'); if(!target.node.jiu&&lib.config.jiu_effect){ @@ -43,8 +46,8 @@ game.import('card',function(lib,game,ui,get,ai,_status){ if(gain2&&card.clone&&(card.clone.parentNode==target.parentNode||card.clone.parentNode==ui.arena)){ card.clone.moveDelete(target); } - },target,card,target==targets[0]); - if(target==targets[0]){ + },target,card,target==targets[0]&&cards.length==1); + if(target==targets[0]&&cards.length==1){ if(card.clone&&(card.clone.parentNode==target.parentNode||card.clone.parentNode==ui.arena)){ game.addVideo('gain2',target,get.cardsInfo([card])); } @@ -347,7 +350,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ equipValue:3 }, }, - skills:['tengjia1','tengjia2'] + skills:['tengjia1','tengjia2','tengjia3'] }, baiyin:{ fullskin:true, @@ -379,16 +382,22 @@ game.import('card',function(lib,game,ui,get,ai,_status){ skill:{ huogong2:{}, jiu:{ - trigger:{source:'damageBegin'}, + trigger:{player:'useCard'}, filter:function(event){ - return event.card&&event.card.name=='sha'&&event.notLink(); + return event.card&&event.card.name=='sha'; }, forced:true, content:function(){ - trigger.num++; + if(!trigger.baseDamage) trigger.baseDamage=1; + trigger.baseDamage+=player.storage.jiu; + game.broadcastAll(function(player){ + player.removeSkill('jiu'); + },player); }, temp:true, vanish:true, + silent:true, + popup:false, onremove:function(player){ if(player.node.jiu){ player.node.jiu.delete(); @@ -396,6 +405,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ delete player.node.jiu; delete player.node.jiu2; } + delete player.storage.jiu; }, ai:{ damageBonus:true @@ -441,7 +451,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ } }, tengjia1:{ - trigger:{target:'useCardToBefore'}, + trigger:{target:['useCardToBefore']}, forced:true, priority:6, audio:true, @@ -453,7 +463,6 @@ game.import('card',function(lib,game,ui,get,ai,_status){ })) return false; if(event.card.name=='nanman') return true; if(event.card.name=='wanjian') return true; - if(event.card.name=='sha'&&!event.card.nature) return true; }, content:function(){ trigger.cancel(); @@ -498,6 +507,22 @@ game.import('card',function(lib,game,ui,get,ai,_status){ } } }, + tengjia3:{ + audio:'tengjia1', + trigger:{target:'shaBegin'}, + filter:function(event,player){ + if(event.player.hasSkillTag('unequip',false,{ + name:event.card?event.card.name:null, + target:player, + card:event.card + })) return false; + if(event.card.name=='sha'&&!event.card.nature) return true; + return false; + }, + content:function(){ + trigger.cancel(); + }, + }, baiyin_skill:{ trigger:{player:'damageBegin'}, forced:true, @@ -572,6 +597,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ tengjia_info:'锁定技,【南蛮入侵】、【万箭齐发】和普通【杀】对你无效。你每次受到火焰伤害时,该伤害+1。', tengjia1:'藤甲', tengjia2:'藤甲', + tengjia3:'藤甲', baiyin:'白银狮子', baiyin_info:'锁定技,你每次受到伤害时,最多承受1点伤害(防止多余的伤害);当你失去装备区里的【白银狮子】时,你回复1点体力。', baiyin_skill:'白银狮子', diff --git a/card/standard.js b/card/standard.js index a9d78d0f2..21f18f526 100644 --- a/card/standard.js +++ b/card/standard.js @@ -75,6 +75,14 @@ game.import('card',function(lib,game,ui,get,ai,_status){ if(typeof event.shanRequired!='number'||!event.shanRequired||event.shanRequired<0){ event.shanRequired=1; } + var evt=event.getParent('useCard') + if(evt&&(typeof evt.baseDamage=='number'&&evt.baseDamage>0)){ + event.baseDamage=evt.baseDamage; + } + else event.baseDamage=1; + if(typeof event.extraDamage!='number'){ + event.extraDamage=0; + } "step 1" if(event.directHit){ event._result={bool:false}; @@ -120,7 +128,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ } "step 3" if(result.bool==false&&!event.unhurt){ - target.damage(get.nature(event.card)); + target.damage(get.nature(event.card),event.baseDamage+event.extraDamage); event.result={bool:true} event.trigger('shaDamage'); } @@ -652,7 +660,8 @@ game.import('card',function(lib,game,ui,get,ai,_status){ cardcolor:'red', reverseOrder:true, filterTarget:function(card,player,target){ - return target.hp0; + return event.card&&event.card.name=='sha'&&event.notLink()&&event.player.getCards('he').length>0; }, + check:function(event,player){ + var target=event.player; + var eff=get.damageEffect(target,player,player); + if(get.attitude(player,target)>0){ + if(eff>=0) return false; + return true; + } + if(eff<=0) return true; + if(target.hp==1) return false; + if(player.hasSkill('jiu')||player.hasSkill('tianxianjiu')|| + player.hasSkill('luoyi2')||player.hasSkill('reluoyi2')) return false; + if(target.countCards('he')<2) return -1; + var num=0; + var cards=target.getCards('he'); + for(var i=0;i6) num++; + } + if(num>=2) return true; + return false; + }, + logTarget:"player", content:function(){ "step 0" - player.discardPlayerCard(get.prompt('hanbing'),'he',trigger.target,Math.min(2,trigger.target.countCards('he')),function(button){ - var trigger=_status.event.getTrigger(); - var player=_status.event.player; - var eff=get.damageEffect(trigger.target,player,player); - if(get.attitude(player,trigger.target)>0){ - if(eff>=0) return false; - return 10-get.buttonValue(button); - } - if(eff<=0) return get.buttonValue(button); - if(trigger.target.hp==1) return false; - if(player.hasSkill('jiu')||player.hasSkill('tianxianjiu')|| - player.hasSkill('luoyi2')||player.hasSkill('reluoyi2')) return -1; - if(_status.event.dialog.buttons.length<2) return -1; - var num=0; - for(var i=0;i<_status.event.dialog.buttons.length;i++){ - if(get.buttonValue(_status.event.dialog.buttons[i])>1.5) num++; - } - if(num>=2) return get.buttonValue(button)-1.5; - }).set('logSkill','hanbing_skill'); + trigger.cancel(); "step 1" - if(result.bool){ - trigger.untrigger(); - trigger.unhurt=true; + if(trigger.player.countDiscardableCards(player,'he')){ + player.line(trigger.player); + player.discardPlayerCard('he',trigger.player,true); + } + "step 2" + if(trigger.player.countDiscardableCards(player,'he')){ + player.line(trigger.player); + player.discardPlayerCard('he',trigger.player,true); } } }, renwang_skill:{ - trigger:{target:'shaBefore'}, + trigger:{target:'shaBegin'}, forced:true, priority:6, audio:true, @@ -1430,7 +1454,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){ }, cixiong_skill:{ trigger:{player:'shaBegin'}, - priority:5, + priority:7, audio:true, logTarget:'target', filter:function(event,player){ @@ -1599,26 +1623,26 @@ game.import('card',function(lib,game,ui,get,ai,_status){ } }, qilin_skill:{ - trigger:{player:'shaHit'}, + trigger:{source:'damageBegin'}, filter:function(event,player){ - return event.target.getCards('e',{subtype:['equip3','equip4']}).length>0 + return event.card&&event.card.name=='sha'&&event.notLink()&&event.player.getCards('e',{subtype:['equip3','equip4']}).length>0 }, direct:true, audio:true, content:function(){ "step 0" - var att=(get.attitude(player,trigger.target)<=0); + var att=(get.attitude(player,trigger.player)<=0); var next=player.chooseButton(); next.set('att',att); - next.set('createDialog',['选择要弃置的马',trigger.target.getCards('e',{subtype:['equip3','equip4']})]); + next.set('createDialog',['是否发动【麒麟弓】,弃置'+get.translation(trigger.player)+'的一张坐骑牌?',trigger.player.getCards('e',{subtype:['equip3','equip4']})]); next.set('ai',function(button){ if(_status.event.att) return get.buttonValue(button); return 0; }); "step 1" if(result.bool){ - player.logSkill('qilin_skill'); - trigger.target.discard(result.links[0]); + player.logSkill('qilin_skill',trigger.player); + trigger.player.discard(result.links[0]); } } }, @@ -2033,8 +2057,8 @@ game.import('card',function(lib,game,ui,get,ai,_status){ renwang_bg:'盾', hanbing_skill:'寒冰剑', renwang_skill:'仁王盾', - hanbing_info:'每当你使用杀命中目标后,你可以防止伤害,改为弃置目标两张牌', - hanbing_skill_info:'每当你使用杀命中目标后,你可以防止伤害,改为弃置目标两张牌', + hanbing_info:'当你使用杀造成伤害时,你可以防止此伤害,改为依次弃置目标两张牌', + hanbing_skill_info:'当你使用杀造成伤害时,你可以防止此伤害,改为依次弃置目标两张牌', renwang_info:'黑色的杀对你无效', renwang_skill_info:'黑色的杀对你无效', sha_info:'出牌阶段,对攻击范围内的一名角色使用,令其打出一张【闪】或受到一点伤害。', diff --git a/character/extra.js b/character/extra.js index 19ad6e43e..e7971ffce 100755 --- a/character/extra.js +++ b/character/extra.js @@ -3,13 +3,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return { name:'extra', character:{ - shen_guanyu:['male','shen',5,['wuhun','wushen'],['shu']], + shen_guanyu:['male','shen',5,['new_wuhun','wushen'],['shu']], shen_zhaoyun:['male','shen',2,['xinjuejing','xinlonghun'],['shu']], shen_zhugeliang:['male','shen',3,['qixing','kuangfeng','dawu'],['shu']], shen_lvmeng:['male','shen',3,['shelie','gongxin'],['wu']], shen_zhouyu:['male','shen',4,['yeyan','qinyin'],['wu']], shen_simayi:['male','shen',4,['renjie','sbaiyin','lianpo'],['wei']], - shen_caocao:['male','shen',3,['guixin','feiying'],['wei']], + shen_caocao:['male','shen',3,['new_guixin','feiying'],['wei']], shen_lvbu:['male','shen',5,['baonu','wumou','ol_wuqian','ol_shenfen'],['qun']], "shen_liubei":["male","shen",6,["nzry_longnu","nzry_jieying"],["shu"]], @@ -27,6 +27,183 @@ game.import('character',function(lib,game,ui,get,ai,_status){ shen_ganning:"体力上限:6", }, skill:{ + "new_wuhun":{ + audio:"wuhun", + group:["new_wuhun_mark","new_wuhun_die"], + trigger:{ + player:"damageEnd", + }, + forced:true, + filter:function (event,player){ + return event.source!=undefined; + }, + content:function (){ + var source=trigger.source + if(!source.storage.new_wuhun_mark){ + source.storage.new_wuhun_mark=0; + } + source.storage.new_wuhun_mark+=trigger.num; + source.markSkill('new_wuhun_mark'); + }, + contentx:function (){ + "step 0" + source.line(player,{color:[255, 255, 0]}); + source.logSkill('new_wuhun_die',player); + game.delay(2); + "step 1" + player.judge(function(card){ + if(['tao','taoyuan'].contains(card.name)) return 10; + return -10; + }); + "step 2" + if(!result.bool){ + lib.element.player.die.apply(player,[]); + } + }, + subSkill:{ + die:{ + audio:"wuhun", + skillAnimation:true, + trigger:{ + player:"dieBegin", + }, + forced:true, + popup:false, + filter:function (event,player){ + return game.hasPlayer(function(current){ + return current!=player&¤t.storage.new_wuhun_mark!=undefined; + }); + }, + content:function (){ + "step 0" + var num=0; + for(var i=0;inum){ + num=current.storage.new_wuhun_mark; + } + } + player.chooseTarget(true,'请选择【武魂】的目标',function(card,player,target){ + return target!=player&&target.storage.new_wuhun_mark==num; + }).ai=function(target){ + return -get.attitude(_status.event.player,target); + }; + "step 1" + if(result.bool&&result.targets&&result.targets.length){ + var next=game.createEvent('new_wuhun',null,trigger.parent); + next.player=result.targets[0]; + next.source=player; + next.setContent(lib.skill.new_wuhun.contentx); + } + }, + sub:true, + }, + mark:{ + marktext:"魇", + intro:{ + name:"梦魇", + content:"mark", + }, + sub:true, + }, + }, + }, + "new_guixin":{ + audio:"ext:无名扩展:2", + trigger:{ + player:"damageEnd", + }, + check:function (event,player){ + if(player.isTurnedOver()||event.num>1) return true; + var num=game.countPlayer(function(current){ + if(current.countCards('he')&¤t!=player&&get.attitude(player,current)<=0){ + return true; + } + if(current.countCards('j')&¤t!=player&&get.attitude(player,current)>0){ + return true; + } + }); + return num>=2; + }, + content:function (){ + "step 0" + var targets=game.filterPlayer(); + targets.remove(player); + targets.sort(lib.sort.seat); + event.targets=targets; + event.count=trigger.num; + "step 1" + event.num=0; + player.line(targets,'green'); + player.chooseControl('手牌区','装备区','判定区').set('ai',function(){ + return Math.floor(Math.random()*3); + }).set('prompt','请选择优先获得的区域'); + "step 2" + event.range={ + 手牌区:['h','e','j'], + 装备区:['e','h','j'], + 判定区:['j','e','h'], + }[result.control||'手牌区']; + "step 3" + if(num0){ + return true; + } + }); + if(num>2) return [0,1]; + if(num==2) return [0.5,1]; + } + }, + }, + }, + }, ol_shenfen:{ audio:2, enable:'phaseUse', @@ -1973,7 +2150,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return player!=event.player&&event.player.isAlive()&&_status.currentPhase==player; }, check:function(event,player){ - var trigger=event.getTrigger(); var list=[]; var skills=trigger.player.skills.slice(0); for(var i=0;itarget.countCards('h')) return get.attitude(player,target); - if(player.countCards('h')0) num1=num-player.countCards('h'); if(num-player.countCards('h')<0) num1=num-player.countCards('h'); @@ -354,8 +356,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(pl.isAlive()){ var num=pl.countCards('h'); var num1=0; - if(player.countCards('h')-num>0) num1=player.countCards('h')-num; - if(player.countCards('h')-num<0) num1=player.countCards('h')-num; + var num2=Math.min(5,player.countCards('h')); + if(num2-num>0) num1=num2-num; + if(num2-num<0) num1=num2-num; if(num1<0) pl.chooseToDiscard('h',-num1,true); if(num1>0) pl.draw(num1); } @@ -2012,6 +2015,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return event.target.countCards('he')>0; }, direct:true, + priority:8, content:function(){ 'step 0' player.discardPlayerCard(trigger.target,get.prompt('jianchu',trigger.target)).set('ai',function(button){ @@ -2478,23 +2482,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, content:function(){ if(trigger.target.countCards('h')<=player.countCards('h')) trigger.directHit=true; - if(trigger.target.hp>=player.hp) player.addTempSkill('xinliegong2','shaAfter'); + if(trigger.target.hp>=player.hp){ + if(typeof trigger.extraDamage!='number'){ + trigger.extraDamage=0; + } + trigger.extraDamage++; + }; }, ai:{ threaten:0.5 } }, - xinliegong2:{ - trigger:{source:'damageBegin'}, - filter:function(event){ - return event.card&&event.card.name=='sha'&&event.notLink(); - }, - forced:true, - audio:false, - content:function(){ - trigger.num++; - } - }, tiaoxin:{ audio:4, enable:'phaseUse', @@ -6375,7 +6373,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ "drlt_huairou":"怀柔", "drlt_huairou_info":"出牌阶段,你可以重铸装备牌", "drlt_zhenggu":"镇骨", - "drlt_zhenggu_info":"结束阶段,你可以选择一名其他角色,你的回合结束后和该角色的下个回合结束时,其将手牌摸至或弃至与你手牌数相同", + "drlt_zhenggu_info":"结束阶段,你可以选择一名其他角色,你的回合结束后和该角色的下个回合结束时,其将手牌摸至或弃至X张。(X为你的手牌数且至多为5)", "drlt_zhenrong":"徵荣", "drlt_zhenrong_info":"当你对其他角色造成伤害后,若其手牌比你多,你可以将其一张牌置于你的武将牌上,称为“荣”", "drlt_hongju":"鸿举", diff --git a/character/sp.js b/character/sp.js index 01249af11..66fc4e791 100755 --- a/character/sp.js +++ b/character/sp.js @@ -376,7 +376,394 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } } } - } + }, + "wolong_card":{ + type:"takaramono", + fullskin:true, + derivation:"pangdegong", + }, + "fengchu_card":{ + type:"takaramono", + fullskin:true, + derivation:"pangdegong", + }, + "xuanjian_card":{ + fullskin:true, + type:"takaramono", + derivation:"pangdegong", + }, + "shuijing_card":{ + fullskin:true, + type:"takaramono", + derivation:"pangdegong", + }, + "rewrite_bagua":{ + derivation:"majun", + cardimage:"bagua", + fullskin:true, + type:"equip", + subtype:"equip2", + ai:{ + basic:{ + equipValue:7.5, + order:function (card,player){ + if(player&&player.hasSkillTag('reverseEquip')){ + return 8.5-get.equipValue(card,player)/20; + } + else{ + return 8+get.equipValue(card,player)/20; + } + }, + useful:2, + value:function (card,player){ + var value=0; + var info=get.info(card); + var current=player.getEquip(info.subtype); + if(current&&card!=current){ + value=get.value(current,player); + } + var equipValue=info.ai.equipValue; + if(equipValue==undefined){ + equipValue=info.ai.basic.equipValue; + } + if(typeof equipValue=='function') return equipValue(card,player)-value; + if(typeof equipValue!='number') equipValue=0; + return equipValue-value; + }, + }, + result:{ + target:function (player,target){ + return get.equipResult(player,target,name); + }, + }, + }, + skills:["rw_bagua_skill"], + enable:true, + selectTarget:-1, + filterTarget:function (card,player,target){ + return target==player; + }, + modTarget:true, + allowMultiple:false, + content:function (){ + target.equip(card); + }, + toself:true, + }, + "rewrite_baiyin":{ + derivation:"majun", + fullskin:true, + cardimage:"baiyin", + type:"equip", + subtype:"equip2", + onLose:function (){ + player.recover(); + player.draw(2); + }, + skills:["rw_baiyin_skill"], + tag:{ + recover:1, + }, + ai:{ + order:9.5, + equipValue:function (card,player){ + if(player.hp==player.maxHp) return 5; + if(player.countCards('h','baiyin')) return 6; + return 0; + }, + basic:{ + equipValue:5, + order:function (card,player){ + if(player&&player.hasSkillTag('reverseEquip')){ + return 8.5-get.equipValue(card,player)/20; + } + else{ + return 8+get.equipValue(card,player)/20; + } + }, + useful:2, + value:function (card,player){ + var value=0; + var info=get.info(card); + var current=player.getEquip(info.subtype); + if(current&&card!=current){ + value=get.value(current,player); + } + var equipValue=info.ai.equipValue; + if(equipValue==undefined){ + equipValue=info.ai.basic.equipValue; + } + if(typeof equipValue=='function') return equipValue(card,player)-value; + if(typeof equipValue!='number') equipValue=0; + return equipValue-value; + }, + }, + result:{ + target:function (player,target){ + return get.equipResult(player,target,name); + }, + }, + }, + enable:true, + selectTarget:-1, + filterTarget:function (card,player,target){ + return target==player; + }, + modTarget:true, + allowMultiple:false, + content:function (){ + target.equip(card); + }, + toself:true, + }, + "rewrite_lanyinjia":{ + derivation:"majun", + cardimage:"lanyinjia", + fullskin:true, + type:"equip", + subtype:"equip2", + skills:["rw_lanyinjia","lanyinjia2"], + ai:{ + equipValue:6, + basic:{ + order:function (card,player){ + if(player&&player.hasSkillTag('reverseEquip')){ + return 8.5-get.equipValue(card,player)/20; + } + else{ + return 8+get.equipValue(card,player)/20; + } + }, + useful:2, + equipValue:1, + value:function (card,player){ + var value=0; + var info=get.info(card); + var current=player.getEquip(info.subtype); + if(current&&card!=current){ + value=get.value(current,player); + } + var equipValue=info.ai.equipValue; + if(equipValue==undefined){ + equipValue=info.ai.basic.equipValue; + } + if(typeof equipValue=='function') return equipValue(card,player)-value; + if(typeof equipValue!='number') equipValue=0; + return equipValue-value; + }, + }, + result:{ + target:function (player,target){ + return get.equipResult(player,target,name); + }, + }, + }, + enable:true, + selectTarget:-1, + filterTarget:function (card,player,target){ + return target==player; + }, + modTarget:true, + allowMultiple:false, + content:function (){ + target.equip(card); + }, + toself:true, + }, + "rewrite_renwang":{ + derivation:"majun", + cardimage:"renwang", + fullskin:true, + type:"equip", + subtype:"equip2", + skills:["rw_renwang_skill"], + ai:{ + basic:{ + equipValue:7.5, + order:function (card,player){ + if(player&&player.hasSkillTag('reverseEquip')){ + return 8.5-get.equipValue(card,player)/20; + } + else{ + return 8+get.equipValue(card,player)/20; + } + }, + useful:2, + value:function (card,player){ + var value=0; + var info=get.info(card); + var current=player.getEquip(info.subtype); + if(current&&card!=current){ + value=get.value(current,player); + } + var equipValue=info.ai.equipValue; + if(equipValue==undefined){ + equipValue=info.ai.basic.equipValue; + } + if(typeof equipValue=='function') return equipValue(card,player)-value; + if(typeof equipValue!='number') equipValue=0; + return equipValue-value; + }, + }, + result:{ + target:function (player,target){ + return get.equipResult(player,target,name); + }, + }, + }, + enable:true, + selectTarget:-1, + filterTarget:function (card,player,target){ + return target==player; + }, + modTarget:true, + allowMultiple:false, + content:function (){ + target.equip(card); + }, + toself:true, + }, + "rewrite_tengjia":{ + derivation:"majun", + cardimage:"tengjia", + fullskin:true, + type:"equip", + subtype:"equip2", + cardnature:"fire", + ai:{ + equipValue:function (card,player){ + if(player.hasSkillTag('maixie')&&player.hp>1) return 0; + if(player.hasSkillTag('noDirectDamage')) return 10; + if(get.damageEffect(player,player,player,'fire')>=0) return 10; + var num=3-game.countPlayer(function(current){ + return get.attitude(current,player)<0; + }); + if(player.hp==1) num+=4; + if(player.hp==2) num+=1; + if(player.hp==3) num--; + if(player.hp>3) num-=4; + return num; + }, + basic:{ + equipValue:3, + order:function (card,player){ + if(player&&player.hasSkillTag('reverseEquip')){ + return 8.5-get.equipValue(card,player)/20; + } + else{ + return 8+get.equipValue(card,player)/20; + } + }, + useful:2, + value:function (card,player){ + var value=0; + var info=get.info(card); + var current=player.getEquip(info.subtype); + if(current&&card!=current){ + value=get.value(current,player); + } + var equipValue=info.ai.equipValue; + if(equipValue==undefined){ + equipValue=info.ai.basic.equipValue; + } + if(typeof equipValue=='function') return equipValue(card,player)-value; + if(typeof equipValue!='number') equipValue=0; + return equipValue-value; + }, + }, + result:{ + target:function (player,target){ + return get.equipResult(player,target,name); + }, + }, + }, + skills:["rw_tengjia1","rw_tengjia2","rw_tengjia3","rw_tengjia4"], + enable:true, + selectTarget:-1, + filterTarget:function (card,player,target){ + return target==player; + }, + modTarget:true, + allowMultiple:false, + content:function (){ + target.equip(card); + }, + toself:true, + }, + "rewrite_zhuge":{ + derivation:"majun", + cardimage:"zhuge", + distance:{ + attackFrom:-2, + }, + fullskin:true, + type:"equip", + subtype:"equip1", + ai:{ + equipValue:function (card,player){ + if(!game.hasPlayer(function(current){ + return player.canUse('sha',current)&&get.effect(current,{name:'sha'},player,player)<0; + })){ + return 1; + } + if(player.hasSha()&&_status.currentPhase==player){ + if(player.getEquip('zhuge')||player.getCardUsable('sha')==0){ + return 10; + } + } + var num=player.countCards('h','sha'); + if(num>1) return 6+num; + return 3+num; + }, + basic:{ + equipValue:5, + order:function (card,player){ + if(player&&player.hasSkillTag('reverseEquip')){ + return 8.5-get.equipValue(card,player)/20; + } + else{ + return 8+get.equipValue(card,player)/20; + } + }, + useful:2, + value:function (card,player){ + var value=0; + var info=get.info(card); + var current=player.getEquip(info.subtype); + if(current&&card!=current){ + value=get.value(current,player); + } + var equipValue=info.ai.equipValue; + if(equipValue==undefined){ + equipValue=info.ai.basic.equipValue; + } + if(typeof equipValue=='function') return equipValue(card,player)-value; + if(typeof equipValue!='number') equipValue=0; + return equipValue-value; + }, + }, + tag:{ + valueswap:1, + }, + result:{ + target:function (player,target){ + return get.equipResult(player,target,name); + }, + }, + }, + skills:["zhuge_skill"], + enable:true, + selectTarget:-1, + filterTarget:function (card,player,target){ + return target==player; + }, + modTarget:true, + allowMultiple:false, + content:function (){ + target.equip(card); + }, + toself:true, + }, }, skill:{ //OL马超 @@ -7445,7 +7832,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, trigger:{player:'useCard'}, frequent:true, - usable:3, + //usable:3, filter:function(event,player){ if(!event.cards||event.cards.length!=1) return false; if(_status.currentPhase!=player) return false; @@ -11674,7 +12061,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ yingjian_info:'准备阶段,你可以视为使用一张无视距离的杀', xunzhi_info:'准备阶段开始时,若你的上家和下家与你的体力值均不相等,你可以失去1点体力。若如此做,你的手牌上限+2', yawang_info:'锁定技,摸牌阶段开始时,你改为摸x张牌,然后你于出牌阶段内至多使用x张牌(x为与你体力值相等的角色数)', - fenyin_info:'你的回合内,当你使用牌时,若此牌与你于此回合内使用的上一张牌颜色不同,则你可以摸一张牌,每回合最多发动3次', + fenyin_info:'你的回合内,当你使用牌时,若此牌与你于此回合内使用的上一张牌颜色不同,则你可以摸一张牌。', fuji_info:'当一名角色造成雷电伤害时,你可以令其进行一次判定,若结果为黑色,此伤害+1;若结果为红色,该角色获得此牌。', fulu_info:'你可以将【杀】当雷【杀】使用。', jilei_info:'每当你受到有来源的伤害时,你可以选择一种牌的类别,令伤害来源不能使用、打出或弃置其此类别的手牌,直到回合结束', diff --git a/character/xinghuoliaoyuan.js b/character/xinghuoliaoyuan.js index 8990c911f..6465125dd 100755 --- a/character/xinghuoliaoyuan.js +++ b/character/xinghuoliaoyuan.js @@ -3928,37 +3928,22 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, "kannan_eff":{ - subSkill:{ - remove:{ - sub:true, - trigger:{ - player:"useCardAfter", - }, - priority:2, - filter:function (event){ - return (event.card&&(event.card.name=='sha')); - }, - forced:true, - popup:false, - audio:false, - content:function (){ - player.removeSkill('kannan_eff'); - }, - }, - }, mark:true, intro:{ content:"下一张杀的伤害基数+#", }, trigger:{ - source:"damageBegin", + player:"useCard", }, filter:function (event){ - return event.card&&event.card.name=='sha'&&event.notLink(); + return event.card&&event.card.name=='sha'; }, forced:true, content:function (){ - trigger.num+=player.storage.kannan_eff; + "step 0" + if(!trigger.baseDamage) trigger.baseDamage=1; + trigger.baseDamage+=player.storage.kannan_eff; + "step 1" player.removeSkill('kannan_eff'); }, init:function (player){ @@ -3970,7 +3955,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ai:{ damageBonus:true, }, - group:"kannan_eff_remove", }, "xinfu_tushe":{ audio:2, @@ -5470,7 +5454,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ "rw_renwang_skill":{ inherit:"renwang_skill", trigger:{ - target:"shaBefore", + target:"shaBegin", }, forced:true, priority:6, @@ -5515,7 +5499,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ })) return false; if(event.card.name=='nanman') return true; if(event.card.name=='wanjian') return true; - if(event.card.name=='sha'&&!event.card.nature) return true; }, content:function (){ trigger.cancel(); @@ -5586,6 +5569,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, }, + "rw_tengjia4":{ + inherit:"tengjia3", + }, }, translate:{ xinghuoliaoyuan:'星火燎原', @@ -5855,11 +5841,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ "rw_renwang_skill":"仁王金刚盾", "rw_renwang_skill_info":"有花色且不为方片的杀对你无效。", "rw_tengjia1":"桐油百炼甲", - "rw_tengjia1_info":"定技,【南蛮入侵】、【万箭齐发】和普通【杀】对你无效。你每次受到火焰伤害时,该伤害+1。你不会被横置。", + "rw_tengjia1_info":"锁定技,【南蛮入侵】、【万箭齐发】和普通【杀】对你无效。你每次受到火焰伤害时,该伤害+1。你不会被横置。", "rw_tengjia2":"桐油百炼甲", - "rw_tengjia2_info":"定技,【南蛮入侵】、【万箭齐发】和普通【杀】对你无效。你每次受到火焰伤害时,该伤害+1。你不会被横置。", + "rw_tengjia2_info":"锁定技,【南蛮入侵】、【万箭齐发】和普通【杀】对你无效。你每次受到火焰伤害时,该伤害+1。你不会被横置。", "rw_tengjia3":"桐油百炼甲", - "rw_tengjia3_info":"定技,【南蛮入侵】、【万箭齐发】和普通【杀】对你无效。你每次受到火焰伤害时,该伤害+1。你不会被横置。", + "rw_tengjia3_info":"锁定技,【南蛮入侵】、【万箭齐发】和普通【杀】对你无效。你每次受到火焰伤害时,该伤害+1。你不会被横置。", + "rw_tengjia4":"桐油百炼甲", "rewrite_bagua":"先天八卦阵", "rewrite_bagua_info":"每当你需要使用或打出一张【闪】时,你可以进行一次判定,若判定结果不为黑桃,视为你使用或打出了一张【闪】。", "rewrite_baiyin":"玉照狮子盔", @@ -5874,10 +5861,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ "rewrite_tengjia_info":"锁定技,【南蛮入侵】、【万箭齐发】和普通【杀】对你无效。你每次受到火焰伤害时,该伤害+1。你不会被横置。", "rewrite_zhuge":"元戎精械弩", "rewrite_zhuge_info":"你于出牌阶段内使用【杀】无次数限制。", - "rewrite_huxinjing":"大号护心镜", - "rewrite_huxinjing_info":"当你受到伤害时,若伤害值大于或等于你的体力值,则你可以将【大号护心镜】置入弃牌堆,然后防止此伤害。当你将【大号护心镜】连横时,你多摸一张牌。", - "rewrite_taipingyaoshu":"太平全术", - "rewrite_taipingyaoshu_info":"锁定技,防止你受到的所有属性伤害;全场每有一名与你势力相同的角色存活,所有此势力角色的手牌上限便+1;当你失去装备区里的【太平全术】时,你摸两张牌。", takaramono:"宝物", "wolong_card":"卧龙", "wolong_card_info":"对1名角色造成1点火焰伤害。若场上有存活的诸葛亮(火),则改为对至多2名角色各造成1点火焰伤害。", @@ -5888,385 +5871,5 @@ game.import('character',function(lib,game,ui,get,ai,_status){ "shuijing_card":"水镜", "shuijing_card_info":"将1名角色装备区内的防具移动到另1角色对应区域。若场上有存活的司马徽,则改为将1名角色装备区内的1件装备移动到另1角色对应区域。", }, - //部分武将用到的衍生卡牌 - card:{ - "wolong_card":{ - type:"takaramono", - fullskin:true, - }, - "fengchu_card":{ - type:"takaramono", - fullskin:true, - }, - "xuanjian_card":{ - fullskin:true, - type:"takaramono", - }, - "shuijing_card":{ - fullskin:true, - type:"takaramono", - }, - "rewrite_bagua":{ - cardimage:"bagua", - fullskin:true, - type:"equip", - subtype:"equip2", - ai:{ - basic:{ - equipValue:7.5, - order:function (card,player){ - if(player&&player.hasSkillTag('reverseEquip')){ - return 8.5-get.equipValue(card,player)/20; - } - else{ - return 8+get.equipValue(card,player)/20; - } - }, - useful:2, - value:function (card,player){ - var value=0; - var info=get.info(card); - var current=player.getEquip(info.subtype); - if(current&&card!=current){ - value=get.value(current,player); - } - var equipValue=info.ai.equipValue; - if(equipValue==undefined){ - equipValue=info.ai.basic.equipValue; - } - if(typeof equipValue=='function') return equipValue(card,player)-value; - if(typeof equipValue!='number') equipValue=0; - return equipValue-value; - }, - }, - result:{ - target:function (player,target){ - return get.equipResult(player,target,name); - }, - }, - }, - skills:["rw_bagua_skill"], - enable:true, - selectTarget:-1, - filterTarget:function (card,player,target){ - return target==player; - }, - modTarget:true, - allowMultiple:false, - content:function (){ - target.equip(card); - }, - toself:true, - }, - "rewrite_baiyin":{ - fullskin:true, - cardimage:"baiyin", - type:"equip", - subtype:"equip2", - onLose:function (){ - player.recover(); - player.draw(2); - }, - skills:["rw_baiyin_skill"], - tag:{ - recover:1, - }, - ai:{ - order:9.5, - equipValue:function (card,player){ - if(player.hp==player.maxHp) return 5; - if(player.countCards('h','baiyin')) return 6; - return 0; - }, - basic:{ - equipValue:5, - order:function (card,player){ - if(player&&player.hasSkillTag('reverseEquip')){ - return 8.5-get.equipValue(card,player)/20; - } - else{ - return 8+get.equipValue(card,player)/20; - } - }, - useful:2, - value:function (card,player){ - var value=0; - var info=get.info(card); - var current=player.getEquip(info.subtype); - if(current&&card!=current){ - value=get.value(current,player); - } - var equipValue=info.ai.equipValue; - if(equipValue==undefined){ - equipValue=info.ai.basic.equipValue; - } - if(typeof equipValue=='function') return equipValue(card,player)-value; - if(typeof equipValue!='number') equipValue=0; - return equipValue-value; - }, - }, - result:{ - target:function (player,target){ - return get.equipResult(player,target,name); - }, - }, - }, - enable:true, - selectTarget:-1, - filterTarget:function (card,player,target){ - return target==player; - }, - modTarget:true, - allowMultiple:false, - content:function (){ - target.equip(card); - }, - toself:true, - }, - "rewrite_lanyinjia":{ - cardimage:"lanyinjia", - fullskin:true, - type:"equip", - subtype:"equip2", - skills:["rw_lanyinjia","lanyinjia2"], - ai:{ - equipValue:6, - basic:{ - order:function (card,player){ - if(player&&player.hasSkillTag('reverseEquip')){ - return 8.5-get.equipValue(card,player)/20; - } - else{ - return 8+get.equipValue(card,player)/20; - } - }, - useful:2, - equipValue:1, - value:function (card,player){ - var value=0; - var info=get.info(card); - var current=player.getEquip(info.subtype); - if(current&&card!=current){ - value=get.value(current,player); - } - var equipValue=info.ai.equipValue; - if(equipValue==undefined){ - equipValue=info.ai.basic.equipValue; - } - if(typeof equipValue=='function') return equipValue(card,player)-value; - if(typeof equipValue!='number') equipValue=0; - return equipValue-value; - }, - }, - result:{ - target:function (player,target){ - return get.equipResult(player,target,name); - }, - }, - }, - enable:true, - selectTarget:-1, - filterTarget:function (card,player,target){ - return target==player; - }, - modTarget:true, - allowMultiple:false, - content:function (){ - target.equip(card); - }, - toself:true, - }, - "rewrite_renwang":{ - cardimage:"renwang", - fullskin:true, - type:"equip", - subtype:"equip2", - skills:["rw_renwang_skill"], - ai:{ - basic:{ - equipValue:7.5, - order:function (card,player){ - if(player&&player.hasSkillTag('reverseEquip')){ - return 8.5-get.equipValue(card,player)/20; - } - else{ - return 8+get.equipValue(card,player)/20; - } - }, - useful:2, - value:function (card,player){ - var value=0; - var info=get.info(card); - var current=player.getEquip(info.subtype); - if(current&&card!=current){ - value=get.value(current,player); - } - var equipValue=info.ai.equipValue; - if(equipValue==undefined){ - equipValue=info.ai.basic.equipValue; - } - if(typeof equipValue=='function') return equipValue(card,player)-value; - if(typeof equipValue!='number') equipValue=0; - return equipValue-value; - }, - }, - result:{ - target:function (player,target){ - return get.equipResult(player,target,name); - }, - }, - }, - enable:true, - selectTarget:-1, - filterTarget:function (card,player,target){ - return target==player; - }, - modTarget:true, - allowMultiple:false, - content:function (){ - target.equip(card); - }, - toself:true, - }, - "rewrite_tengjia":{ - cardimage:"tengjia", - fullskin:true, - type:"equip", - subtype:"equip2", - cardnature:"fire", - ai:{ - equipValue:function (card,player){ - if(player.hasSkillTag('maixie')&&player.hp>1) return 0; - if(player.hasSkillTag('noDirectDamage')) return 10; - if(get.damageEffect(player,player,player,'fire')>=0) return 10; - var num=3-game.countPlayer(function(current){ - return get.attitude(current,player)<0; - }); - if(player.hp==1) num+=4; - if(player.hp==2) num+=1; - if(player.hp==3) num--; - if(player.hp>3) num-=4; - return num; - }, - basic:{ - equipValue:3, - order:function (card,player){ - if(player&&player.hasSkillTag('reverseEquip')){ - return 8.5-get.equipValue(card,player)/20; - } - else{ - return 8+get.equipValue(card,player)/20; - } - }, - useful:2, - value:function (card,player){ - var value=0; - var info=get.info(card); - var current=player.getEquip(info.subtype); - if(current&&card!=current){ - value=get.value(current,player); - } - var equipValue=info.ai.equipValue; - if(equipValue==undefined){ - equipValue=info.ai.basic.equipValue; - } - if(typeof equipValue=='function') return equipValue(card,player)-value; - if(typeof equipValue!='number') equipValue=0; - return equipValue-value; - }, - }, - result:{ - target:function (player,target){ - return get.equipResult(player,target,name); - }, - }, - }, - skills:["rw_tengjia1","rw_tengjia2","rw_tengjia3"], - enable:true, - selectTarget:-1, - filterTarget:function (card,player,target){ - return target==player; - }, - modTarget:true, - allowMultiple:false, - content:function (){ - target.equip(card); - }, - toself:true, - }, - "rewrite_zhuge":{ - cardimage:"zhuge", - distance:{ - attackFrom:-2, - }, - fullskin:true, - type:"equip", - subtype:"equip1", - ai:{ - equipValue:function (card,player){ - if(!game.hasPlayer(function(current){ - return player.canUse('sha',current)&&get.effect(current,{name:'sha'},player,player)<0; - })){ - return 1; - } - if(player.hasSha()&&_status.currentPhase==player){ - if(player.getEquip('zhuge')||player.getCardUsable('sha')==0){ - return 10; - } - } - var num=player.countCards('h','sha'); - if(num>1) return 6+num; - return 3+num; - }, - basic:{ - equipValue:5, - order:function (card,player){ - if(player&&player.hasSkillTag('reverseEquip')){ - return 8.5-get.equipValue(card,player)/20; - } - else{ - return 8+get.equipValue(card,player)/20; - } - }, - useful:2, - value:function (card,player){ - var value=0; - var info=get.info(card); - var current=player.getEquip(info.subtype); - if(current&&card!=current){ - value=get.value(current,player); - } - var equipValue=info.ai.equipValue; - if(equipValue==undefined){ - equipValue=info.ai.basic.equipValue; - } - if(typeof equipValue=='function') return equipValue(card,player)-value; - if(typeof equipValue!='number') equipValue=0; - return equipValue-value; - }, - }, - tag:{ - valueswap:1, - }, - result:{ - target:function (player,target){ - return get.equipResult(player,target,name); - }, - }, - }, - skills:["zhuge_skill"], - enable:true, - selectTarget:-1, - filterTarget:function (card,player,target){ - return target==player; - }, - modTarget:true, - allowMultiple:false, - content:function (){ - target.equip(card); - }, - toself:true, - }, - }, }; }); diff --git a/character/yijiang.js b/character/yijiang.js index 5c6c819ef..e4bae7d2f 100755 --- a/character/yijiang.js +++ b/character/yijiang.js @@ -60,7 +60,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ gongsunyuan:['male','qun',4,['huaiyi']], guotufengji:['male','qun',3,['jigong','shifei']], - xin_yujin:['male','wei',4,['jieyue']], xin_liru:['male','qun',3,['xinjuece','xinmieji','xinfencheng']], guohuanghou:['female','wei',3,['jiaozhao','danxin']], @@ -84,6 +83,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ xuezong:['male','wu',3,['funan','jiexun']], old_huaxiong:['male','qun',6,['shiyong']], + "re_yujin":["male","wei",4,["zhenjun"],[]], }, characterIntro:{ caozhi:'字子建,沛国谯人,三国曹魏著名文学家,建安文学代表人物。魏武帝曹操之子,魏文帝曹丕之弟,生前曾为陈王,去世后谥号“思”,因此又称陈思王。南朝宋文学家谢灵运更有“天下才有一石,曹子建独占八斗”的评价。王士祯尝论汉魏以来二千年间诗家堪称“仙才”者,曹植、李白、苏轼三人耳。', @@ -178,6 +178,56 @@ game.import('character',function(lib,game,ui,get,ai,_status){ liuchen:['liushan'], }, skill:{ + zhenjun:{ + audio:"jieyue", + trigger:{ + player:"phaseBegin", + }, + filter:function (event,player){ + return game.hasPlayer(function(current){ + return current.countCards('h')>current.hp; + }); + }, + direct:true, + content:function (){ + 'step 0' + player.chooseTarget(get.prompt2('zhenjun'),function(card,player,target){ + return target.countCards('h')>target.hp; + }).ai=function(target){ + return -get.attitude(_status.event.player,target)*(target.countCards('e')+1); + }; + 'step 1' + if(result.bool){ + var target=result.targets[0]; + event.target=target; + var num=target.countCards('h')-target.hp; + player.line(target,'thunder'); + player.logSkill('zhenjun',target); + player.discardPlayerCard(num,target,true); + } + 'step 2' + if(result.cards&&result.cards.length){ + event.num=0; + for(var i=0;i0){ + var prompt='弃置'+get.cnNumber(event.num)+'张牌,或令'+get.translation(event.target)+'摸等量的牌'; + player.chooseToDiscard(event.num,prompt,'he').ai=function(){ + return 5-get.value(card); + } + } + else event.finish(); + } + else event.finish(); + 'step 3' + if(!result.bool){ + event.target.draw(event.num); + } + }, + }, fenli:{ group:['fenli_draw','fenli_use','fenli_discard'], subSkill:{ @@ -562,7 +612,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return get.effect(player,event.card,event.player,player)<0; }, filter:function(event,player){ - return player.canCompare(event.target); + return player.canCompare(event.player); }, logTarget:'player', content:function(){ @@ -1486,7 +1536,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } "step 3" if(event.target.getCards('h').contains(event.card)){ - event.target.chooseControlList('问卦','将'+get.translation(event.card)+'置于牌堆顶','将'+get.translation(event.card)+'置于牌堆底',true,function(){ + event.target.chooseControlList('问卦','将'+get.translation(event.card)+'置于牌堆顶','将'+get.translation(event.card)+'置于牌堆底',event.target==player,function(){ + if(get.attitude(event.target,player)<0) return 2; return 1; }); } @@ -1494,14 +1545,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){ event.finish(); } "step 4" - event.target.lose(event.card,ui.special); event.index=result.index; + if(event.index==0||event.index==1){ + event.target.lose(event.card,ui.special); game.broadcastAll(function(player){ var cardx=ui.create.card(); cardx.classList.add('infohidden'); cardx.classList.add('infoflip'); player.$throw(cardx,1000,'nobroadcast'); },event.target); + } + else event.finish(); "step 5" game.delay(); "step 6" @@ -1510,34 +1564,24 @@ game.import('character',function(lib,game,ui,get,ai,_status){ game.log(event.target,'将获得的牌置于牌堆底'); ui.cardPile.appendChild(event.card); if(ui.cardPile.childElementCount==1||player==event.target){ - event.togain=[ui.cardPile.firstChild]; - ui.cardPile.firstChild.remove(); + player.draw(); } else{ - event.togain=get.cards(2); + player.draw(); + target.draw(); } } - else{ + else if(event.index==0){ game.log(player,'将获得的牌置于牌堆顶'); ui.cardPile.insertBefore(event.card,ui.cardPile.firstChild); if(ui.cardPile.childElementCount==1||player==event.target){ - event.togain=[ui.cardPile.lastChild]; - ui.cardPile.lastChild.remove(); + player.draw('bottom'); } else{ - event.togain=[ui.cardPile.lastChild,ui.cardPile.lastChild.previousSibling]; - ui.cardPile.lastChild.remove(); - ui.cardPile.lastChild.remove(); + player.draw('bottom'); + target.draw('bottom'); } } - if(event.togain.length){ - player.gain(event.togain.shift()); - player.$draw(); - } - if(event.togain.length){ - event.target.gain(event.togain.shift()); - event.target.$draw(); - } }, ai:{ order:2, @@ -7781,12 +7825,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ shangshi:{ audio:2, trigger:{player:['loseEnd','changeHp']}, - forced:true, + frequent:true, filter:function(event,player){ - return (player.countCards('h')