diff --git a/character/clan.js b/character/clan.js index e2a99cc9b..0a660d7a2 100644 --- a/character/clan.js +++ b/character/clan.js @@ -662,6 +662,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, clanmingjie:{ init:function(player){ + var skill='clanmingjie_'+player.playerid; + if(!lib.skill[skill]){ + lib.skill[skill]={ + charlotte:true, + mark:true, + marktext:'戒', + intro:{content:'已被$指定为【铭戒】目标'}, + }; + lib.translate[skill]='铭戒'; + lib.translate[skill+'_bg']='戒'; + } player.addSkill('clanmingjie_record'); }, onremove:function(player){ @@ -671,23 +682,21 @@ game.import('character',function(lib,game,ui,get,ai,_status){ enable:'phaseUse', limited:true, filterTarget:function(card,player,target){ - return !player.getStorage('clanmingjie_effect').contains(target); + return !target.hasSkill('clanmingjie_'+player.playerid); }, skillAnimation:true, animationColor:'thunder', content:function(){ - 'step 0' player.awakenSkill('clanmingjie'); player.addSkill('clanmingjie_effect'); - player.markAuto('clanmingjie_effect',[target]); - target.addSkill('clanmingjie_mark'); - target.markAuto('clanmingjie_mark',[player]); + var skill='clanmingjie_'+player.playerid; + target.addTempSkill(skill,{player:'phaseAfter'}); + target.storage[skill]=player; }, ai:{ order:10, result:{ target:function(player,target){ - if(player.getStorage('clanmingjie_effect').contains(target)) return 0; if(player.hasSkill('clanzhongliu')||player.hp==1){ if(!player.hasCard(card=>{ var info=get.info(card); @@ -710,7 +719,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } return get.sgnAttitude(player,target); }, - } + }, }, subSkill:{ effect:{ @@ -722,8 +731,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var info=get.info(card); if(info.allowMultiple==false) return false; if(event.targets&&!info.multitarget){ - return player.getStorage('clanmingjie_effect').some(current=>{ - return current.isIn()&&!event.targets.contains(current)&&lib.filter.targetEnabled2(card,player,current)&&lib.filter.targetInRange(card,player,current); + return game.filterPlayer().some(current=>{ + if(!current.hasSkill('clanmingjie_'+player.playerid)) return false; + return !event.targets.contains(current)&&lib.filter.targetEnabled2(card,player,current)&&lib.filter.targetInRange(card,player,current); }); } return false; @@ -733,7 +743,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 'step 0' player.chooseTarget(get.prompt('clanmingjie_effect'),'令任意【铭戒】目标角色成为'+get.translation(trigger.card)+'的目标',function(card,player,target){ var trigger=_status.event.getTrigger(); - if(trigger.targets.contains(target)||!target.isIn()||!player.getStorage('clanmingjie_effect').contains(target)) return false; + if(trigger.targets.contains(target)||!target.isIn()||!target.hasSkill('clanmingjie_'+player.playerid)) return false; return lib.filter.targetEnabled2(trigger.card,player,target)&&lib.filter.targetInRange(trigger.card,player,target); },[1,Infinity]).set('ai',function(target){ var player=_status.event.player; @@ -749,14 +759,31 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, group:'clanmingjie_targeted', - intro:{content:'使用牌时可以额外指定$为目标'}, }, targeted:{ charlotte:true, trigger:{global:'phaseEnd'}, filter:function(event,player){ - if(!player.getStorage('clanmingjie_effect').contains(event.player)) return false; - return event.player!=player||!player.getHistory('useSkill',evt=>evt.skill=='clanmingjie'&&evt.targets[0]==player).length; + var cards=player.getStorage('clanmingjie_record').slice(); + cards=cards.filterInD('d'); + if(!cards.length) return false; + var history=player.getHistory('useSkill',evt=>evt.skill=='clanmingjie'); + if(history.length){ + var targets=history.reduce((list,evt)=>list.addArray(evt.targets),[]); + if(event.player!=player&&targets.includes(event.player)) return true; + } + if(player.actionHistory.length>=2){ + for(var i=player.actionHistory.length-2;i>=0;i--){ + if(!player.actionHistory[i].isMe) continue; + var history2=player.actionHistory[i].useSkill.filter(evt=>evt.skill=='clanmingjie'); + if(history2.length){ + var targets2=history2.reduce((list,evt)=>list.addArray(evt.targets),[]); + if(targets2.includes(event.player)) return true; + } + break; + } + } + return false; }, forced:true, popup:false, @@ -764,10 +791,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ 'step 0' var cards=player.getStorage('clanmingjie_record').slice(); cards=cards.filterInD('d'); - if(cards.length){ - event.cards=cards; - } - else event.goto(4); + event.cards=cards; 'step 1' player.chooseButton(['铭戒:是否使用这些牌?',cards]).set('filterButton',button=>{ return _status.event.player.hasUseTarget(button.link); @@ -782,24 +806,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){ game.delayx(); player.chooseUseTarget(card,true); } - else event.goto(4); + else event.finish(); 'step 3' if(event.cards.filter(card=>{ return get.position(card,true)=='d'&&player.hasUseTarget(card); }).length) event.goto(1); - 'step 4' - player.unmarkAuto('clanmingjie_effect',[trigger.player]); - trigger.player.unmarkAuto('clanmingjie_mark',[player]); - 'step 5' - if(!player.getStorage('clanmingjie_effect').length) player.removeSkill('clanmingjie_effect'); - if(!trigger.player.getStorage('clanmingjie_mark').length) player.removeSkill('clanmingjie_mark'); }, }, - mark:{ - charlotte:true, - marktext:'戒', - intro:{content:'已被$指定为【铭戒】目标'}, - }, record:{ charlotte:true, trigger:{ @@ -2634,7 +2647,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ clanjiexuan:'解悬', clanjiexuan_info:'限定技,转换技。阴:你可以将一张红色牌当【顺手牵羊】使用;阳:你可以将一张黑色牌当【过河拆桥】使用。', clanmingjie:'铭戒', - clanmingjie_info:'限定技。出牌阶段,你可以选择一名角色,然后直到其下回合结束时,当你使用牌时你可以指定其为额外目标。然后其下回合结束时,你可以使用本回合使用过的黑桃牌和被抵消过的牌。', + clanmingjie_info:'限定技。出牌阶段,你可以选择一名角色,然后你获得此下效果:①你使用牌时你可以指定其为额外目标直到其下个回合结束。②其下个回合结束时(若该角色为你则改为你的下下个回合结束时),你可以使用本回合使用过的黑桃牌和被抵消过的牌。', clan_wanghun:'族王浑', clanfuxun:'抚循', clanfuxun_info:'出牌阶段限一次。你可以获得或交给一名其他角色一张手牌,然后若其手牌数与你相等且于此阶段仅以此法获得或失去过牌,你可以将一张牌当任意基本牌使用。', diff --git a/character/refresh.js b/character/refresh.js index aeba5f1ef..cea5266d4 100755 --- a/character/refresh.js +++ b/character/refresh.js @@ -20,6 +20,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, connect:true, character:{ + ol_jianyong:['male','shu',3,['olqiaoshui','jyzongshi'],['unseen']], ol_lingtong:['male','wu',4,['olxuanfeng'],['die_audio:re_lingtong','unseen']], re_xushu:['male','shu',4,['zhuhai','qianxin']], re_lidian:['male','wei',3,['xunxun','xinwangxi']], @@ -170,6 +171,32 @@ game.import('character',function(lib,game,ui,get,ai,_status){ re_guohuai:['xiahouyuan','zhanghe'], }, skill:{ + //界简雍 + olqiaoshui:{ + audio:2, + inherit:'reqiaoshui', + filter:function(event,player){ + return player.countCards('h')>0&&!player.hasSkill('olqiaoshui_used'); + }, + content:function(){ + 'step 0' + player.chooseToCompare(target); + 'step 1' + if(result.bool) player.addTempSkill('qiaoshui3',{player:'phaseUseAfter'}); + else{ + player.addTempSkill('qiaoshui2'); + player.addTempSkill('olqiaoshui_used'); + } + }, + subSkill:{ + used:{ + charlotte:true, + mark:true, + marktext:'说', + intro:{content:'被迫闭嘴'}, + }, + }, + }, //界凌统 olxuanfeng:{ audio:'xuanfeng', @@ -13885,7 +13912,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player:["changeHp"], }, audio:2, - audioname:{gongsunzan:'yicong'}, + audioname2:{gongsunzan:'yicong'}, forced:true, filter:function(event,player){ return get.sgn(player.hp-2.5)!=get.sgn(player.hp-2.5-event.num); @@ -15615,6 +15642,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ re_lidian_prefix:'界', re_xushu:'界徐庶', re_xushu_prefix:'界', + ol_jianyong:'OL界简雍', + ol_jianyong_prefix:'OL界', + olqiaoshui:'巧说', + olqiaoshui_info:'出牌阶段,你可与一名其他角色拼点。若你赢,你使用的下一张基本牌或普通锦囊牌可以额外指定任意一名其他角色为目标或减少指定一个目标;若你没赢,此技能于本回合失效且本回合你不能使用锦囊牌。', refresh_standard:'界限突破·标', refresh_feng:'界限突破·风', diff --git a/character/sp.js b/character/sp.js index 0dbf0d90d..f9224f2e3 100755 --- a/character/sp.js +++ b/character/sp.js @@ -703,6 +703,38 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, skill:{ + //OL飞扬 + olfeiyang:{ + trigger:{player:'phaseZhunbeiBegin'}, + filter:function(event,player){ + return player.countCards('he',card=>{ + if(_status.connectMode&&get.position(card)=='h') return true; + return lib.filter.cardDiscardable(card,player); + })>=3&&player.countCards('j'); + }, + direct:true, + //limited:true, + //skillAnimation:true, + //animationColor:'orange', + content:function(){ + 'step 0' + player.chooseToDiscard(get.prompt2('olfeiyang'),'he',3).set('ai',function(card){ + var player=_status.event.player; + if(player.hasCard(function(card){ + return get.effect(player,{ + name:card.viewAs||card.name, + cards:[card], + },player,player)<0; + },'j')) return 6-get.value(card); + return 0; + }).set('logSkill','olfeiyang'); + 'step 1' + if(result.bool){ + //player.awakenSkill('olfeiyang'); + player.discardPlayerCard(player,'j',true); + } + }, + }, //李婉 ollianju:{ audio:2, @@ -8092,7 +8124,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, enable:'chooseToUse', hiddenCard:function(player,name){ - if(get.type(name)=='basic'&&lib.inpile.contains(name)&&!player.getStorage('yilie_count').contains(name)){ + if(get.type(name)=='basic'&&lib.inpile.contains(name)&&!player.getStorage('yilie_count').includes(name)){ var hs=player.getCards('hs'); if(hs.length<2) return false; var bool=false,map={}; @@ -8123,7 +8155,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } if(!bool) return false; for(var name of lib.inpile){ - if(get.type(name)!='basic'||list.contains(name)) continue; + if(get.type(name)!='basic'||list.includes(name)) continue; var card={name:name}; if(event.filterCard(card,player,event)) return true; if(name=='sha'){ @@ -8138,10 +8170,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ chooseButton:{ dialog:function(event,player){ var list=[]; - var storage=player.storage.yilie_count; + var storage=player.getStorage('yilie_count'); for(var i of lib.inpile){ - if(get.type(i)!='basic') continue; - if(storage&&storage.contains(i)) continue; + if(get.type(i)!='basic'||storage.includes(i)) continue; var card={name:i,isCard:true}; if(event.filterCard(card,player,event)) list.push(['基本','',i]); if(i=='sha'){ @@ -8154,25 +8185,26 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return ui.create.dialog('义烈',[list,'vcard'],'hidden') }, check:function(button){ - let player=_status.event.player,hs=player.getCards('h',card=>{ - return get.name(card)!==button.link[2]&&(!button.link[3]||get.hasNature(card,button.link[3])); - }),bool=false,map={}; - for(let i of hs){ - let color=get.color(i); - if(!map[color]) map[color]=true; - else{ - bool=true; - break; + var player=_status.event.player; + var evt=_status.event.getParent(); + var name=button.link[2],card={name:name,nature:button.link[3]}; + if(name=='shan') return 2; + if(evt.type=='dying'){ + if(get.attitude(player,evt.dying)<2) return 0; + if(name=='jiu') return 2.1; + return 1.9; + } + if(evt.type=='phase'){ + if(button.link[2]=='jiu'){ + if(player.getUseValue({name:'jiu'})<=0) return 0; + var cards=player.getCards('hs',cardx=>get.value(cardx)<8); + cards.sort((a,b)=>get.value(a)-get.value(b)); + if(cards.some(cardx=>get.name(cardx)=='sha'&&!cards.slice(0,2).includes(cardx))) return player.getUseValue({name:'jiu'}); + return 0; } + return player.getUseValue(card)/4; } - if(!bool) return 0; - if(button.link[2]=='shan') return 3; - if(button.link[2]=='jiu'){ - if(player.getUseValue({name:'jiu'})<=0) return 0; - if(player.countCards('h','sha')) return player.getUseValue({name:'jiu'}); - return 0; - } - return player.getUseValue({name:button.link[2],nature:button.link[3]})/4; + return 1; }, backup:function(links,player){ return { @@ -8187,10 +8219,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, position:'hs', complexCard:true, - check:(card)=>{ - if(get.name(card)===lib.skill.yilie_backup.viewAs.name&&(!lib.skill.yilie_backup.viewAs.nature||game.hasNature(card,lib.skill.yilie_backup.viewAs.nature))) return -1; - return 8-get.value(card); - }, + check:(card)=>8-get.value(card), popname:true, viewAs:{ name:links[0][2], @@ -8211,12 +8240,33 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, ai:{ order:function(item,player){ - return 2.6; + if(player&&_status.event.type=='phase'){ + var add=false,max=0; + var names=lib.inpile.filter(name=>get.type(name)=='basic'&&!player.getStorage('yilie_count').includes(name)); + if(names.includes('sha')) add=true; + names=names.map(namex=>{return {name:namex}}); + if(add) lib.inpile_nature.forEach(nature=>names.push({name:'sha',nature:nature})); + names.forEach(card=>{ + if(player.getUseValue(card)>0){ + var temp=get.order(card); + if(card.name=='jiu'){ + var cards=player.getCards('hs',cardx=>get.value(cardx)<8); + cards.sort((a,b)=>get.value(a)-get.value(b)); + if(!cards.some(cardx=>get.name(cardx)=='sha'&&!cards.slice(0,2).includes(cardx))) temp=0; + } + if(temp>max) max=temp; + } + }); + if(max>0) max-=0.001; + return max; + } + return 0.5; }, respondShan:true, respondSha:true, fireAttack:true, - skillTagFilter:function(player,tag){ + skillTagFilter:function(player,tag,arg){ + if(arg=='respond') return false; var hs=player.getCards('hs'); if(hs.length<2) return false; var bool=false,map={}; @@ -26628,6 +26678,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ oldhuxiao_info:'锁定技,当你使用的【杀】被【闪】抵消后,你令此【杀】不计入使用次数。', oldwuji:'武继', oldwuji_info:'觉醒技,结束阶段,若你本回合造成了3点或更多伤害,你加1点体力上限并回复1点体力,并失去技能〖虎啸〗。', + olfeiyang:'飞扬', + //olfeiyang_info:'限定技。准备阶段,你可以弃置两张牌,然后弃置判定区的一张牌。', + olfeiyang_info:'准备阶段,你可以弃置三张牌,然后弃置判定区的一张牌。', sp_tianji:'天极·皇室宗亲', diff --git a/character/yijiang.js b/character/yijiang.js index 9d7841886..e890f60a6 100755 --- a/character/yijiang.js +++ b/character/yijiang.js @@ -5114,7 +5114,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, jyzongshi:{ audio:2, - audioname:['re_jianyong'], + audioname:['re_jianyong','ol_jianyong'], trigger:{player:['chooseToCompareAfter','compareMultipleAfter'],target:['chooseToCompareAfter','compareMultipleAfter']}, filter:function(event,player){ if(event.preserve) return false; @@ -10272,6 +10272,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audioname2:{ re_jianyong:'reqiaoshui', xin_jianyong:'xinqiaoshui', + ol_jianyong:'olqiaoshui', }, trigger:{player:'useCard2'}, filter:function(event,player){ @@ -13910,7 +13911,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ masu:['xin_masu','re_masu','masu'], xusheng:['xusheng','xin_xusheng','re_xusheng','old_xusheng'], wuguotai:['wuguotai','xin_wuguotai','re_wuguotai'], - lingtong:['lingtong','xin_lingtong','re_lingtong','old_lingtong'], + lingtong:['lingtong','xin_lingtong','ol_lingtong','re_lingtong','old_lingtong'], gaoshun:['gaoshun','xin_gaoshun','re_gaoshun','old_gaoshun'], zhonghui:['zhonghui','xin_zhonghui','re_zhonghui','old_zhonghui','pe_zhonghui'], wangyi:['wangyi','re_wangyi','old_wangyi'], @@ -13925,7 +13926,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ manchong:['manchong','re_manchong'], caochong:['caochong','re_caochong','old_caochong'], guohuai:['guohuai','re_guohuai','xin_guohuai','tw_guohuai','ol_guohuai'], - jianyong:['jianyong','re_jianyong','xin_jianyong'], + jianyong:['jianyong','ol_jianyong','re_jianyong','xin_jianyong'], panzhangmazhong:['panzhangmazhong','re_panzhangmazhong','xin_panzhangmazhong'], yufan:['yufan','xin_yufan','re_yufan'], zhuran:['zhuran','re_zhuran','xin_zhuran','old_zhuran'], diff --git a/game/game.js b/game/game.js index 745e944ed..1a58faa54 100644 --- a/game/game.js +++ b/game/game.js @@ -6269,6 +6269,12 @@ new Promise(resolve=>{ frequent:true, intro:'最后行动的角色起始手牌数+1' }, + connect_olfeiyang_four:{ + name:'四号位获得【飞扬】', + init:true, + frequent:true, + intro:'最后行动的角色获得技能【飞扬】(准备阶段,你可以弃置三张牌,然后弃置判定区的一张牌)', + }, connect_choice_num:{ name:'侯选武将数', init:'20', @@ -6372,12 +6378,14 @@ new Promise(resolve=>{ } if(config.versus_mode=='two'){ map.replace_handcard_two.show(); + map.olfeiyang_four.show(); map.replace_character_two.show(); map.two_assign.show(); map.two_phaseswap.show(); } else{ map.replace_handcard_two.hide(); + map.olfeiyang_four.hide(); map.replace_character_two.hide(); map.two_assign.hide(); map.two_phaseswap.hide(); @@ -6552,6 +6560,12 @@ new Promise(resolve=>{ frequent:true, intro:'最后行动的角色起始手牌+1' }, + olfeiyang_four:{ + name:'四号位获得【飞扬】', + init:true, + frequent:true, + intro:'最后行动的角色获得技能【飞扬】(准备阶段,你可以弃置三张牌,然后弃置判定区的一张牌)', + }, replace_character_two:{ name:'替补模式', init:false, diff --git a/image/character/ol_jianyong.jpg b/image/character/ol_jianyong.jpg new file mode 100644 index 000000000..be3faecd9 Binary files /dev/null and b/image/character/ol_jianyong.jpg differ diff --git a/mode/versus.js b/mode/versus.js index 3359053da..9ad131a22 100644 --- a/mode/versus.js +++ b/mode/versus.js @@ -583,8 +583,9 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ uiintro.add('