diff --git a/character/extra.js b/character/extra.js index 6d9ee8303..efcf88f6c 100755 --- a/character/extra.js +++ b/character/extra.js @@ -2035,9 +2035,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, forced:true, content:function(){ - player.storage.nzry_junlve+=trigger.num; + if(player==trigger.source){ + player.storage.nzry_junlve+=trigger.num; + game.log(player,'获得了',trigger.num,'个“军略”标记'); + } + if(player==trigger.player){ + player.storage.nzry_junlve+=trigger.num; + game.log(player,'获得了',trigger.num,'个“军略”标记'); + } player.syncStorage('nzry_junlve'); - game.log(player,'获得',trigger.num,'个“军略”标记'); }, }, "nzry_cuike":{ diff --git a/character/old.js b/character/old.js index d96febbdc..2478bb2dc 100755 --- a/character/old.js +++ b/character/old.js @@ -3,6 +3,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return { name:'old', character:{ + yuji:['male','qun',3,['old_guhuo'],['forbidai']], zhangjiao:['male','qun',3,['leiji','guidao','huangtian'],['zhu']], masu:['male','shu',3,['xinzhan','huilei']], xushu:['male','shu',3,['wuyan','jujian']], @@ -37,22 +38,246 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, skill:{ + "old_guhuo":{ + group:["old_guhuo_guess","old_guhuo_respond","old_guhuo_wuxie"], + enable:"chooseToUse", + filter:function (event,player){ + if(!player.countCards('h')) return false; + var list=['sha','tao','jiu','taoyuan','wugu','juedou','huogong','jiedao','tiesuo','guohe','shunshou','wuzhong','wanjian','nanman']; + if(get.mode()=='guozhan'){ + list=list.concat(['xietianzi','shuiyanqijunx','lulitongxin','lianjunshengyan','chiling','diaohulishan','yuanjiao','huoshaolianying']); + } + for(var i=0;i0) return '不质疑'; + return Math.random()<0.5?'不质疑':'质疑'; + }); + } + 'step 2' + if(!result.control) result.control='不质疑'; + event.guessers[0].chat(result.control); + game.delay(); + if(result.control=='不质疑'){ + game.log(event.guessers[0],'#g不质疑'); + event.ally.push(event.guessers[0]); + }else{ + game.log(event.guessers[0],'#y质疑'); + event.betray.push(event.guessers[0]); + } + event.guessers.remove(event.guessers[0]); + event.goto(1); + 'step 3' + player.showCards(trigger.cards); + if(event.betray.length){ + if(trigger.card.name==trigger.cards[0].name){ + if(get.suit(trigger.cards[0])!='heart'){ + game.log(player,'使用的','#y'+get.translation(trigger.card.name),'作废了'); + player.discard(trigger.cards); + trigger.cancel(); + } + for(var i=0;i0) return '不质疑'; + return Math.random()<0.5?'不质疑':'质疑'; + }); + } + 'step 3' + if(!result.control) result.control='不质疑'; + event.guessers[0].chat(result.control); + game.delay(); + if(result.control=='不质疑'){ + game.log(event.guessers[0],'#g不质疑'); + event.ally.push(event.guessers[0]); + }else{ + game.log(event.guessers[0],'#y质疑'); + event.betray.push(event.guessers[0]); + } + event.guessers.remove(event.guessers[0]); + event.goto(2); + 'step 4' + var bool=true; + player.showCards(event.card); + if(event.betray.length){ + if(event.name==event.card.name){ + if(get.suit(event.card)!='heart'){ + game.log(player,'使用的','#y'+get.translation(event.name),'作废了'); + player.discard(event.card); + bool=false; + } + for(var i=0;i0; + }, + viewAs:{ + name:"wuxie", + }, + check:function(card){ + if(card.name=='wuxie') return 1000; + return 0; + }, + prompt:"将一张手牌当无懈可击使用", + threaten:1.2, + }, old_zuilun:{ - audio:'xinfu_zuilun', - subSkill:{ - e:{}, - h:{}, - }, - enable:"phaseUse", - usable:2, - filterTarget:function (card,player,target){ + audio:'xinfu_zuilun', + subSkill:{ + e:{}, + h:{}, + }, + enable:"phaseUse", + usable:2, + filterTarget:function (card,player,target){ if(player==target) return false; var pos='he'; if(player.hasSkill('old_zuilun_h')) pos='e'; if(player.hasSkill('old_zuilun_e')) pos='h'; return target.countGainableCards(player,pos)>0; }, - content:function (){ + content:function (){ 'step 0' var pos='he'; if(player.hasSkill('old_zuilun_h')) pos='e'; @@ -65,13 +290,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(pos=='h'||pos=='e') player.addTempSkill('old_zuilun_'+pos,'phaseUseAfter'); } }, - ai:{ - order:7, - result:{ - target:-1, - }, - }, - }, + ai:{ + order:7, + result:{ + target:-1, + }, + }, + }, old_fuyin:{ mod:{ targetEnabled:function(card,player,target){ @@ -80,44 +305,44 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, "old_jijun":{ - marktext:"方", - audio:"xinfu_jijun", - intro:{ - content:"cards", - }, - enable:"phaseUse", - filterCard:true, - selectCard:[1,Infinity], - filter:function (event,player){ + marktext:"方", + audio:"xinfu_jijun", + intro:{ + content:"cards", + }, + enable:"phaseUse", + filterCard:true, + selectCard:[1,Infinity], + filter:function (event,player){ return player.countCards('h')>0; }, - check:function (card){ + check:function (card){ var player=_status.event.player; if(player.storage.old_jijun&&(36-player.storage.old_jijun.length)<=player.countCards('h')) return 1; return 5-get.value(card); }, - discard:false, - lose:false, - content:function (){ + discard:false, + lose:false, + content:function (){ player.lose(cards,ui.special,'toStorage'); player.$give(cards,player); if(!player.storage.old_jijun) player.storage.old_jijun=[]; player.storage.old_jijun.addArray(cards); player.markSkill('old_jijun'); }, - ai:{order:1,result:{player:1}}, - }, - "old_fangtong":{ - trigger:{ - player:"phaseEnd", - }, - audio:"xinfu_fangtong", - forced:true, - skillAnimation:true, - filter:function (event,player){ + ai:{order:1,result:{player:1}}, + }, + "old_fangtong":{ + trigger:{ + player:"phaseEnd", + }, + audio:"xinfu_fangtong", + forced:true, + skillAnimation:true, + filter:function (event,player){ return (player.storage.old_jijun&&player.storage.old_jijun.length>35); }, - content:function (){ + content:function (){ var bool=false; if(player==game.me) bool=true; else switch(get.mode()){ @@ -151,7 +376,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } game.over(bool); }, - }, + }, oldanxu:{ enable:'phaseUse', @@ -578,13 +803,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){ old_machao:'☆SP马超', old_zhugezhan:"旧诸葛瞻", zhangliang:'SP张梁', + yuji:'旧于吉', + "old_guhuo":"蛊惑", + "old_guhuo_info":"你可以说出任何一种基本牌或普通锦囊牌,并正面朝下使用或打出一张手牌。体力值不为0的其他角色依次选择是否质疑。若无角色质疑,则该牌按你所述之牌结算。若有角色质疑则亮出验明:若为真,质疑者各失去1点体力;若为假,质疑者各摸一张牌。无论真假,弃置被质疑的牌。仅当被质疑的牌为红桃花色且为真时,该牌仍然可以进行结算。", + "old_guhuo_guess":"蛊惑", + "old_guhuo_wuxie":"蛊惑", "old_jijun":"集军", - "old_jijun_info":"出牌阶段,你可以将任意张手牌置于你的武将牌上。(均称为“方”)", - "old_fangtong":"方统", - "old_fangtong_info":"锁定技,结束阶段,若你的“方”的数目大于等于36,则你所在的游戏阵营直接取得游戏胜利。", + "old_jijun_info":"出牌阶段,你可以将任意张手牌置于你的武将牌上。(均称为“方”)", + "old_fangtong":"方统", + "old_fangtong_info":"锁定技,结束阶段,若你的“方”的数目大于等于36,则你所在的游戏阵营直接取得游戏胜利。", old_zuilun:"罪论", - old_zuilun_info:"出牌阶段,你可以获得一名其他角色的一张牌(手牌、装备区各一次),然后该角色摸一张牌。", + old_zuilun_info:"出牌阶段,你可以获得一名其他角色的一张牌(手牌、装备区各一次),然后该角色摸一张牌。", old_fuyin:"父荫", old_fuyin_info:"锁定技,若你的装备区内没有防具牌,手牌数大于或等于你的其他角色不能使用【杀】、【决斗】或【火攻】指定你为目标", oldanxu:'安恤', diff --git a/character/shenhua.js b/character/shenhua.js index f642b72bb..a5c96caa5 100755 --- a/character/shenhua.js +++ b/character/shenhua.js @@ -1924,7 +1924,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } 'step 4' if(event.toequip){ - player.equip(event.toequip); + player.useCard(event.toequip,player).nopopup=true; } }, ai:{ @@ -2477,7 +2477,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ enable:'phaseUse', usable:1, filterTarget:function(card,player,target){ - return target.canUse({name:'sha'},player)&&target.countCards('he'); + return lib.filter.targetInRange({name:'sha'},target,player)&&target.countCards('he'); }, content:function(){ "step 0" @@ -6039,9 +6039,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, buqu:{ audio:2, - trigger:{player:'dieBefore'}, + trigger:{player:'chooseToUseBefore'}, forced:true, - filter:function(event,player){return player.maxHp>0&&player.hp<=0}, + filter:function(event,player){return event.type=='dying'&&player.isDying()&&event.dying==player}, content:function(){ "step 0" event.card=get.cards()[0]; @@ -6053,19 +6053,26 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.markSkill('buqu'); "step 1" for(var i=0;i=3) return -get.value(card); - return 6-get.value(card); + var player=_status.event.player; + var count=game.countPlayer(function(current){ + return get.attitude(player,current)>2&¤t.hp-current.countCards('h')>1; + }); + if(ui.selected.cards.length>=count) return -get.value(card); + return 5-get.value(card); }); } else{ @@ -10057,7 +10061,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } "step 3" if(result.bool){ - trigger.target.equip(event.card); + trigger.target.useCard(event.card).nopopup=true; } }, ai:{ @@ -11041,7 +11045,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ "step 1" if(player.isDamaged()){ if(get.mode()=='guozhan'){ - if(player.isMinor()){ + if(player.isMinor(true)){ player.recover(); } } diff --git a/character/xinghuoliaoyuan.js b/character/xinghuoliaoyuan.js index fd2b1c2c4..805391f0e 100755 --- a/character/xinghuoliaoyuan.js +++ b/character/xinghuoliaoyuan.js @@ -212,7 +212,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(event.num>0) event.goto(1); "step 3" for (var i=0;i