diff --git a/audio/die/chengji.mp3 b/audio/die/chengji.mp3 new file mode 100644 index 000000000..2f85bf38b Binary files /dev/null and b/audio/die/chengji.mp3 differ diff --git a/audio/die/lizhaojiaobo.mp3 b/audio/die/lizhaojiaobo.mp3 new file mode 100644 index 000000000..123f2963b Binary files /dev/null and b/audio/die/lizhaojiaobo.mp3 differ diff --git a/audio/die/mb_caomao.mp3 b/audio/die/mb_caomao.mp3 new file mode 100644 index 000000000..bc917aea3 Binary files /dev/null and b/audio/die/mb_caomao.mp3 differ diff --git a/audio/die/mb_sp_guanqiujian.mp3 b/audio/die/mb_sp_guanqiujian.mp3 new file mode 100644 index 000000000..c37327afb Binary files /dev/null and b/audio/die/mb_sp_guanqiujian.mp3 differ diff --git a/audio/skill/mbcuizhen1.mp3 b/audio/skill/mbcuizhen1.mp3 new file mode 100644 index 000000000..7698c7298 Binary files /dev/null and b/audio/skill/mbcuizhen1.mp3 differ diff --git a/audio/skill/mbcuizhen2.mp3 b/audio/skill/mbcuizhen2.mp3 new file mode 100644 index 000000000..60e22c201 Binary files /dev/null and b/audio/skill/mbcuizhen2.mp3 differ diff --git a/audio/skill/mbjuejin1.mp3 b/audio/skill/mbjuejin1.mp3 new file mode 100644 index 000000000..89a6155bc Binary files /dev/null and b/audio/skill/mbjuejin1.mp3 differ diff --git a/audio/skill/mbjuejin2.mp3 b/audio/skill/mbjuejin2.mp3 new file mode 100644 index 000000000..a48370ee8 Binary files /dev/null and b/audio/skill/mbjuejin2.mp3 differ diff --git a/audio/skill/mbkuangli1.mp3 b/audio/skill/mbkuangli1.mp3 new file mode 100644 index 000000000..7ca0cc1ca Binary files /dev/null and b/audio/skill/mbkuangli1.mp3 differ diff --git a/audio/skill/mbkuangli2.mp3 b/audio/skill/mbkuangli2.mp3 new file mode 100644 index 000000000..aa519a215 Binary files /dev/null and b/audio/skill/mbkuangli2.mp3 differ diff --git a/audio/skill/mbkuili1.mp3 b/audio/skill/mbkuili1.mp3 new file mode 100644 index 000000000..5ddb33cff Binary files /dev/null and b/audio/skill/mbkuili1.mp3 differ diff --git a/audio/skill/mbkuili2.mp3 b/audio/skill/mbkuili2.mp3 new file mode 100644 index 000000000..94eb9c725 Binary files /dev/null and b/audio/skill/mbkuili2.mp3 differ diff --git a/audio/skill/mbqianlong1.mp3 b/audio/skill/mbqianlong1.mp3 new file mode 100644 index 000000000..e848f335c Binary files /dev/null and b/audio/skill/mbqianlong1.mp3 differ diff --git a/audio/skill/mbqianlong2.mp3 b/audio/skill/mbqianlong2.mp3 new file mode 100644 index 000000000..bb51536db Binary files /dev/null and b/audio/skill/mbqianlong2.mp3 differ diff --git a/audio/skill/mbqianlong3.mp3 b/audio/skill/mbqianlong3.mp3 new file mode 100644 index 000000000..14b845c89 Binary files /dev/null and b/audio/skill/mbqianlong3.mp3 differ diff --git a/audio/skill/mbqianlong4.mp3 b/audio/skill/mbqianlong4.mp3 new file mode 100644 index 000000000..c103071c3 Binary files /dev/null and b/audio/skill/mbqianlong4.mp3 differ diff --git a/audio/skill/mbqianlong5.mp3 b/audio/skill/mbqianlong5.mp3 new file mode 100644 index 000000000..663f323e8 Binary files /dev/null and b/audio/skill/mbqianlong5.mp3 differ diff --git a/audio/skill/mbqianlong6.mp3 b/audio/skill/mbqianlong6.mp3 new file mode 100644 index 000000000..7d50bb760 Binary files /dev/null and b/audio/skill/mbqianlong6.mp3 differ diff --git a/audio/skill/mbshishou1.mp3 b/audio/skill/mbshishou1.mp3 new file mode 100644 index 000000000..c78a1aaf9 Binary files /dev/null and b/audio/skill/mbshishou1.mp3 differ diff --git a/audio/skill/mbshishou2.mp3 b/audio/skill/mbshishou2.mp3 new file mode 100644 index 000000000..fe60f784f Binary files /dev/null and b/audio/skill/mbshishou2.mp3 differ diff --git a/audio/skill/mbweitong1.mp3 b/audio/skill/mbweitong1.mp3 new file mode 100644 index 000000000..2de7ec6bd Binary files /dev/null and b/audio/skill/mbweitong1.mp3 differ diff --git a/audio/skill/mbxiongsi1.mp3 b/audio/skill/mbxiongsi1.mp3 new file mode 100644 index 000000000..0f9a6d65f Binary files /dev/null and b/audio/skill/mbxiongsi1.mp3 differ diff --git a/audio/skill/mbxiongsi2.mp3 b/audio/skill/mbxiongsi2.mp3 new file mode 100644 index 000000000..ec2a86dcb Binary files /dev/null and b/audio/skill/mbxiongsi2.mp3 differ diff --git a/audio/skill/mbzuoyou1.mp3 b/audio/skill/mbzuoyou1.mp3 new file mode 100644 index 000000000..8b40ce73f Binary files /dev/null and b/audio/skill/mbzuoyou1.mp3 differ diff --git a/audio/skill/mbzuoyou2.mp3 b/audio/skill/mbzuoyou2.mp3 new file mode 100644 index 000000000..2cbb78fb1 Binary files /dev/null and b/audio/skill/mbzuoyou2.mp3 differ diff --git a/audio/skill/rejiushi_mb_caomao1.mp3 b/audio/skill/rejiushi_mb_caomao1.mp3 new file mode 100644 index 000000000..fe05d0725 Binary files /dev/null and b/audio/skill/rejiushi_mb_caomao1.mp3 differ diff --git a/audio/skill/rejiushi_mb_caomao2.mp3 b/audio/skill/rejiushi_mb_caomao2.mp3 new file mode 100644 index 000000000..21db5b72a Binary files /dev/null and b/audio/skill/rejiushi_mb_caomao2.mp3 differ diff --git a/audio/skill/sbfangzhu_mb_caomao1.mp3 b/audio/skill/sbfangzhu_mb_caomao1.mp3 new file mode 100644 index 000000000..232a31d95 Binary files /dev/null and b/audio/skill/sbfangzhu_mb_caomao1.mp3 differ diff --git a/audio/skill/sbfangzhu_mb_caomao2.mp3 b/audio/skill/sbfangzhu_mb_caomao2.mp3 new file mode 100644 index 000000000..879631b55 Binary files /dev/null and b/audio/skill/sbfangzhu_mb_caomao2.mp3 differ diff --git a/audio/skill/sbqingzheng_mb_caomao1.mp3 b/audio/skill/sbqingzheng_mb_caomao1.mp3 new file mode 100644 index 000000000..69d8ca64c Binary files /dev/null and b/audio/skill/sbqingzheng_mb_caomao1.mp3 differ diff --git a/audio/skill/sbqingzheng_mb_caomao2.mp3 b/audio/skill/sbqingzheng_mb_caomao2.mp3 new file mode 100644 index 000000000..100657944 Binary files /dev/null and b/audio/skill/sbqingzheng_mb_caomao2.mp3 differ diff --git a/card/standard.js b/card/standard.js index cfd269871..04cf72faf 100644 --- a/card/standard.js +++ b/card/standard.js @@ -760,16 +760,43 @@ game.import('card',function(lib,game,ui,get,ai,_status){ } "step 2" ui.clear(); - var num; - if(event.targets){ - num=event.targets.length; + var cards; + if(card.storage&&Array.isArray(card.storage.fixedShownCards)){ + cards=card.storage.fixedShownCards.slice(); + var lose_list=[],cards2=[]; + cards.forEach(card=>{ + var owner=get.owner(card); + if(owner){ + var arr=lose_list.find(i=>i[0]==owner); + if(arr) arr[1].push(card); + else lose_list.push([owner,[card]]); + } + else cards2.add(card); + }); + if(lose_list.length){ + lose_list.forEach(list=>{ + list[0].$throw(list[1]); + game.log(list[0],'将',list[1],'置于了处理区'); + }) + game.loseAsync({ + lose_list:lose_list, + }).setContent('chooseToCompareLose'); + } + if(cards2.length) game.cardsGotoOrdering(cards2); + game.delayex(); } else{ - num=game.countPlayer(); + var num; + if(event.targets){ + num=event.targets.length; + } + else{ + num=game.countPlayer(); + } + if(card.storage&&typeof card.storage.extraCardsNum=='number') num+=card.storage.extraCardsNum; + cards=get.cards(num); + game.cardsGotoOrdering(cards).relatedEvent=event.getParent(); } - if(card.storage&&typeof card.storage.extraCardsNum=='number') num+=card.storage.extraCardsNum; - var cards=get.cards(num); - game.cardsGotoOrdering(cards).relatedEvent=event.getParent(); var dialog=ui.create.dialog('五谷丰登',cards,true); _status.dieClose.push(dialog); dialog.videoId=lib.status.videoId++; diff --git a/character/extra.js b/character/extra.js index ce79eada4..5aef112a9 100755 --- a/character/extra.js +++ b/character/extra.js @@ -13,7 +13,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ extra_yin:['shen_liubei','shen_luxun'], extra_lei:['shen_ganning','shen_zhangliao'], extra_key:['key_kagari','key_shiki','db_key_hina'], - extra_decade:['shen_jiangwei','shen_machao','shen_zhangfei','shen_zhangjiao','shen_dengai','shen_xuzhu'], + extra_decade:['shen_jiangwei','shen_machao','shen_zhangfei','shen_zhangjiao','shen_dengai','shen_xuzhu','dc_shen_huatuo'], extra_ol:['ol_zhangliao','shen_caopi','shen_zhenji','shen_sunquan'], extra_mobilezhi:['shen_guojia','shen_xunyu'], extra_mobilexin:['shen_taishici','shen_sunce'], @@ -23,6 +23,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, character:{ + dc_shen_huatuo:['male','shen',3,['jingyu','lvxin','huandao'],['qun']], shen_xuzhu:['male','shen',5,['zhengqing','zhuangpo'],['wei']], shen_lusu:['male','shen',3,['dingzhou','tamo','zhimeng'],['wu']], shen_huatuo:['male','shen',3,['wuling','youyi'],['qun']], @@ -79,6 +80,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ shen_jiaxu:['le_shen_jiaxu','shen_jiaxu'], shen_caocao:['shen_caocao','old_caocao'], shen_zhangjiao:['shen_zhangjiao','junk_zhangjiao'], + shen_huatuo:['dc_shen_huatuo','shen_huatuo'], }, characterFilter:{ shen_diaochan(mode){ @@ -95,6 +97,217 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, /** @type { importCharacterConfig['skill'] } */ skill:{ + //十周年神华佗 + jingyu:{ + audio:2, + trigger:{ + global:['useSkill','logSkillBegin','useCard','respond'], + }, + filter(event,player){ + if(['global','equip'].includes(event.type)) return false; + let skill=event.sourceSkill||event.skill; + if(!skill||skill==='jingyu') return false; + let info=get.info(skill); + while(true){ + if(!info||info.charlotte) return false; + if(info&&!info.sourceSkill) break; + skill=info.sourceSkill; + info=get.info(skill); + } + return !player.getStorage('jingyu_used').includes(skill); + }, + forced:true, + async content(event,trigger,player){ + if (!player.storage.jingyu_used){ + player.when({global:'roundStart'}).assign({ + firstDo: true, + }).then(() => delete player.storage.jingyu_used); + } + player.markAuto('jingyu_used', trigger.sourceSkill || trigger.skill); + await player.draw(); + }, + ai:{ + threaten:6, + }, + }, + lvxin:{ + audio:2, + enable:'phaseUse', + usable:1, + filterCard:true, + filterTarget:lib.filter.notMe, + delay:false, + discard:false, + lose:false, + async content(event,trigger,player){ + const { target, cards } = event, round = Math.min(5, game.roundNumber); + const name = get.translation(target); + await player.give(cards, target); + const result = await player.chooseControl(['摸牌', '弃牌']).set('choiceList', [ + `令${name}摸${get.cnNumber(round)}张牌`, + `令${name}随机弃置${get.cnNumber(round)}张手牌` + ]).set('prompt', '滤心:请选择一项').forResult(); + let cards2 = []; + if (result.index === 0) { + cards2 = await target.draw(round).forResult(); + } + else { + const cards = target.getCards('h', card => { + return lib.filter.cardDiscardable(card, target, 'lvxin'); + }); + if (cards.length > 0){ + const evt = await target.discard(cards.randomGets(round)).set('discarder', target); + cards2 = evt.done.cards2; + } + } + const cardName = get.name(cards[0], player); + if (cards2.some(card => { + return get.name(card, target) === cardName; + })) { + target.addSkill('lvxin_lose'); + target.addMark('lvxin_lose', 1, false); + } + }, + subSkill:{ + lose:{ + trigger:{ + player:['useSkill','logSkillBegin','useCard','respond'], + }, + filter(event,player){ + if(['global','equip'].includes(event.type)) return false; + const skill=event.sourceSkill||event.skill; + const info=get.info(skill); + return info&&!info.charlotte; + }, + forced:true, + onremove:true, + charlotte:true, + async content(event,trigger,player){ + player.loseHp(player.countMark('lvxin_lose')); + player.removeSkill('lvxin_lose'); + }, + intro:{ + content:'下次发动技能时失去#点体力', + }, + } + } + }, + huandao:{ + audio:2, + enable:'phaseUse', + usable:1, + limited:true, + filterTarget:lib.filter.notMe, + skillAnimation:true, + animationColor:'metal', + async content(event,trigger,player){ + player.awakenSkill('huandao'); + const { target } = event; + await target.turnOver(false); + await target.link(false); + let names = [target.name1||target.name]; + if (target.name2) names.add(target.name2); + names = names.map(name => get.rawName(name)); + if (!_status.characterlist) lib.skill.pingjian.initList(); + _status.characterlist.randomSort(); + let ownedSkills = target.getSkills(null, false, false), ownedSkillsName = ownedSkills.map(skill => get.translation(skill)); + let skillToGain = null; + outer: for (const name of _status.characterlist){ + const info = lib.character[name]; + if (!names.includes(get.rawName(name))) continue; + const skills = info[3].slice().randomSort(); + while (skills.length) { + const skill = skills.shift(), skillName = get.translation(skill); + if (!ownedSkillsName.includes(skillName)) { + skillToGain = skill; + break outer; + } + } + } + if (!skillToGain) return; + player.popup(skillToGain); + player.line(target, 'green'); + let prompt2 = '若你选择是,则你于获得此技能后须失去一个其他技能。

'; + if(lib.skill[skillToGain].nobracket){ + prompt2 += `
${get.translation(skillToGain)}
${get.skillInfoTranslation(skillToGain)}


`; + } + else{ + const translation=lib.translate[skillToGain+'_ab'] || get.translation(skillToGain).slice(0, 2); + prompt2 += `
【${translation}】
${get.skillInfoTranslation(skillToGain)}


`; + } + const bool = await target.chooseBool(`寰道:是否获得技能〖${get.translation(skillToGain)}〗?`, prompt2) + .set('choice', (() => { + const rank = get.skillRank(skillToGain, 'inout') + 1; + return ownedSkills.some(skill => { + const info = get.info(skill); + if (info) { + if (target.awakenedSkills.includes(skill) && (info.limited || info.juexingji || info.dutySkill)) return true; + if (info.ai && (info.ai.neg || info.ai.halfneg)) return true; + } + return get.skillRank(skill, 'inout') < rank; + }); + })()) + .forResultBool(); + if (!bool) { + target.chat('拒绝'); + game.log(target, '拒绝获得技能', `#g【${get.translation(skillToGain)}】`) + await game.asyncDelay(); + return; + } + await target.addSkills(skillToGain); + ownedSkills = target.getSkills(null, false, false).filter(skill => { + if (skill === skillToGain) return false; + const info = get.info(skill); + if(!info || info.charlotte || !get.skillInfoTranslation(skill, player).length) return false; + return true; + }); + if (!ownedSkills) return; + const control = await target.chooseControl(ownedSkills).set('choiceList', ownedSkills.map(skill => { + return `
【${get.translation(lib.translate[skill + '_ab'] || get.translation(skill).slice(0, 2))}】
${get.skillInfoTranslation(skill, target)}
`; + })).set('displayIndex', false).set('prompt', '寰道:选择失去一个技能').set('ai', () => { + return get.event('choice'); + }).set('choice', (() => { + const uselessSkills = ownedSkills.filter(skill => { + const info = get.info(skill); + if (!info) return false; + if (target.awakenedSkills.includes(skill) && (info.limited || info.juexingji || info.dutySkill)) return true; + if (info.ai && (info.ai.neg || info.ai.halfneg)) return true; + return false; + }); + if (uselessSkills.length) return uselessSkills.randomGet(); + return ownedSkills.sort((a, b) => { + return get.skillRank(a, 'inout') - get.skillRank(b, 'inout'); + })[0]; + })()).forResultControl(); + await target.removeSkills(control); + }, + ai:{ + order:5, + result:{ + target(player,target){ + if(game.roundNumber*game.countPlayer()<=1.5*game.countPlayer2()/Math.sqrt(player.getDamagedHp()+1)) return 0; + const ownedSkills=target.getSkills(null,false,false).filter(skill=>{ + const info=get.info(skill); + if(!info||info.charlotte||!get.skillInfoTranslation(skill,player).length) return false; + return true; + }); + const uselessSkills=ownedSkills.filter(skill=>{ + const info=get.info(skill); + if(!info) return false; + if(target.awakenedSkills.includes(skill)&&(info.limited||info.juexingji||info.dutySkill)) return true; + if(info.ai&&(info.ai.neg||info.ai.halfneg)) return true; + return false; + }); + if(uselessSkills.length) return 3; + let names=[target.name1||target.name]; + if(target.name2) names.add(target.name2); + names=names.map(name=>get.rawName(name)); + if(_status.characterlist.some(name=>names.includes(get.rawName(name)))) return 1; + return 0; + }, + }, + }, + }, //神许褚 zhengqing:{ audio:2, @@ -8539,8 +8752,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ jxlianpo_info:'锁定技。①若场上最大阵营为:反贼,其他角色的手牌上限-1,所有角色使用【杀】的次数上限和攻击范围+1;主忠,其他角色不能对其以外的角色使用【桃】。其他角色死亡后,若有多个最大阵营,来源摸两张牌并回复1点体力。②一轮游戏开始时,你展示一张未加入游戏或已死亡角色的身份牌,本轮视为该身份对应阵营的角色数+1。', jxzhaoluan:'兆乱', jxzhaoluan_info:'限定技。一名角色死亡前,若其此次进入过濒死状态,你可以取消之,令其加3点体力上限并失去所有非锁定技,回复体力至3点,摸四张牌。然后你获得如下效果:出牌阶段,你可以令一名成为过你〖兆乱〗目标的角色减1点体力上限,然后对一名此阶段未以此法选择过的角色造成1点伤害。', - shen_huatuo:'神华佗', - shen_huatuo_prefix:'神', + shen_huatuo:'手杀神华佗', + shen_huatuo_prefix:'手杀神', wuling:'五灵', wuling_info:'①出牌阶段限两次。你可以选择一名没有“五禽戏”的角色,按照你选择的顺序向其传授“五禽戏”,且其获得如下效果:其获得你选择的第一种“五禽戏”的效果,并在其每个准备阶段移除当前“五禽戏”的效果并切换为下一种。②当你死亡时,你令场上的角色失去你传授的“五禽戏”。', wuling_wuqinxi:'五禽戏', @@ -8566,6 +8779,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ zhengqing_info:'锁定技。一轮游戏开始时,你移去所有角色的“擎”标记,令上一轮于一回合内造成伤害值最多的角色各获得X枚“擎”,且你与这些角色各摸一张牌(X为这些角色该回合内造成的伤害值)。若该角色为你且本次获得的“擎”数为本局游戏最多的一次,你改为摸X张牌(至多摸五张)。', zhuangpo:'壮魄', zhuangpo_info:'你可以将牌名为【杀】或牌面信息中包含“【杀】”的牌当【决斗】使用,然后你获得如下效果:1.当此【决斗】指定目标后,若你有“擎”,你可以移去任意枚“擎”,令目标角色弃置等量的牌;2.当你造成渠道为此牌的伤害时,若此牌的所有目标角色中存在有“擎”的角色,此伤害+1。', + dc_shen_huatuo:'神华佗', + dc_shen_huatuo_prefix:'神', + jingyu:'静域', + jingyu_info:'锁定技。每个技能每轮限一次,当一名角色发动不为〖静域〗的技能时,你摸一张牌。', + lvxin:'滤心', + lvxin_info:'出牌阶段限一次。你可以交给一名其他角色一张手牌并选择一项:⒈令其摸X张牌;⒉令其随机弃置X张手牌(X为游戏轮数,至多为5)。然后若其以此法得到/弃置了与你交给其的牌牌名相同的牌,其于其下次发动技能时回复/失去1点体力。', + huandao:'寰道', + huandao_info:'限定技。出牌阶段,你可以选择一名其他角色。你令其复原武将牌,系统随机生成一个与其同名的武将的武将牌上的一个与其拥有的技能均不同名的技能。其可以选择获得此技能,然后选择失去一个其他技能。', extra_feng:'神话再临·风', extra_huo:'神话再临·火', diff --git a/character/mobile.js b/character/mobile.js index e9735ab2a..88d5660aa 100644 --- a/character/mobile.js +++ b/character/mobile.js @@ -686,7 +686,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, //曹髦 史?! mbqianlong:{ - audio:2, + audio:6, trigger:{ player:['mbqianlong_beginAfter','mbqianlong_addAfter','mbweitongAfter'], }, @@ -756,7 +756,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, mbweitong:{ - audio:2, + audio:1, trigger:{ global:'phaseBefore', player:'enterGame', diff --git a/character/rank.js b/character/rank.js index 390ef215b..d0ec80e6c 100644 --- a/character/rank.js +++ b/character/rank.js @@ -138,6 +138,9 @@ window.noname_character_rank={ 'dc_simashi', 'dc_sb_simayi', 'caofang', + 'dc_shen_huatuo', + 'sp_zhenji', + 'wu_guanyu', ], a:[ 'star_caoren', @@ -1905,6 +1908,7 @@ window.noname_character_rank={ 'dc_guansuo', 'dc_xujing', 'caoxian', + 'wu_guanyu', ], epic:[ 'dc_caoshuang', @@ -2187,6 +2191,8 @@ window.noname_character_rank={ 'dc_sb_simayi', 'caofang', 'mb_caomao', + 'dc_shen_huatuo', + 'sp_zhenji', ], rare:[ 're_wangyi', diff --git a/character/sb.js b/character/sb.js index 2f684f6ea..4694db8ba 100644 --- a/character/sb.js +++ b/character/sb.js @@ -429,6 +429,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ animate:'giveAuto', gaintag:['sbquhu'], }).setContent(lib.skill.sbquhu.addToExpansionMultiple); + debugger await game.asyncDelay(1.5); const isMin=minLength>myCards.length; const sortedList=lose_list.filter(list=>list[0]!=player).sort((a,b)=>{ @@ -544,7 +545,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ return; } "step 2"; + var loopedCount=0,mapLength=Object.keys(event.gaining_map).length; for(var j in event.gaining_map){ + loopedCount++; var map={}; var player=(_status.connectMode?lib.playerOL:game.playerMap)[j],cards=event.gaining_map[j]; var hs=player.getCards('x'); @@ -567,20 +570,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.$draw(cards.length); if(event.log) game.log(player,'将',get.cnNumber(cards.length),'张牌置于了武将牌上'); game.pause(); - setTimeout((player,cards)=>{ + setTimeout((player,cards,resume)=>{ player.$addToExpansion(cards,null,event.gaintag); for(var i of event.gaintag) player.markSkill(i); - game.resume(); - },get.delayx(500,500),player,cards); + if(resume) game.resume(); + },get.delayx(500,500),player,cards,loopedCount===mapLength); } else if(event.animate=='gain'){ player.$gain(cards,false); game.pause(); - setTimeout((player,cards)=>{ + setTimeout((player,cards,resume)=>{ player.$addToExpansion(cards,null,event.gaintag); for(var i of event.gaintag) player.markSkill(i); - game.resume(); - },get.delayx(700,700),player,cards); + if(resume) game.resume(); + },get.delayx(700,700),player,cards,loopedCount===mapLength); } else if(event.animate=='gain2'||event.animate=='draw2'){ var gain2t=300; @@ -588,11 +591,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ gain2t=500; } game.pause(); - setTimeout((player,cards)=>{ + setTimeout((player,cards,resume)=>{ player.$addToExpansion(cards,null,event.gaintag); for(var i of event.gaintag) player.markSkill(i); - game.resume(); - },get.delayx(gain2t,gain2t),player,cards); + if(resume) game.resume(); + },get.delayx(gain2t,gain2t),player,cards,loopedCount===mapLength); } else if(event.animate=='give'||event.animate=='giveAuto'){ var evtmap=event.losing_map; @@ -632,20 +635,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } } game.pause(); - setTimeout((player,cards)=>{ + setTimeout((player,cards,resume)=>{ player.$addToExpansion(cards,null,event.gaintag); for(var i of event.gaintag) player.markSkill(i); - game.resume(); - },get.delayx(500,500),player,cards); + if(resume) game.resume(); + },get.delayx(500,500),player,cards,loopedCount===mapLength); } else if(typeof event.animate=='function'){ var time=event.animate(event); game.pause(); - setTimeout((player,cards)=>{ + setTimeout((player,cards,resume)=>{ player.$addToExpansion(cards,null,event.gaintag); for(var i of event.gaintag) player.markSkill(i); - game.resume(); - },get.delayx(time,time),player,cards); + if(resume) game.resume(); + },get.delayx(time,time),player,cards,loopedCount===mapLength); } else{ player.$addToExpansion(cards,null,event.gaintag); diff --git a/character/xianding.js b/character/xianding.js index c4ae1b399..35a2a5afb 100644 --- a/character/xianding.js +++ b/character/xianding.js @@ -4,6 +4,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ name:'xianding', connect:true, character:{ + sp_zhenji:['female','qun',3,['dcjijie','dchuiji']], + wu_guanyu:['male','shu',5,['dcjuewu','dcwuyou','dcyixian']], caofang:['male','wei',4,['dczhimin','dcjujian'],['zhu']], dc_sb_simayi:['male','wei',3,['dcsbquanmou','dcsbpingliao']], chendong:['male','wu',4,['dcduanxie','fenming']], @@ -114,7 +116,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ sp2_yuxiu:['dongguiren','dc_tengfanglan','zhangjinyun','zhoubuyi','dc_xujing'], sp2_qifu:['dc_guansuo','xin_baosanniang','dc_zhaoxiang'], sp2_gaoshan:['wanglang','liuhui','zhangjian'], - sp2_wumiao:['wu_zhugeliang','wu_luxun'], + sp2_wumiao:['wu_zhugeliang','wu_luxun','wu_guanyu'], sp2_mouding:['dc_sb_lusu','dc_sb_zhouyu','dc_sb_simayi'], } }, @@ -123,6 +125,514 @@ game.import('character',function(lib,game,ui,get,ai,_status){ ], }, skill:{ + //武关羽 + dcjuewu:{ + audio:2, + enable:'chooseToUse', + filter(event,player){ + if(!player.hasCard(card=>{ + return _status.connectMode||get.number(card)===2; + },'hes')) return false; + for(const name of ['shuiyanqijunx'].concat(lib.inpile)){ + if(player.getStorage('dcjuewu_used').includes(name)) continue; + const card=get.autoViewAs({name},'unsure'); + if(!get.tag(card,'damage')) continue; + if(event.filterCard(card,player,event)) return true; + if(name==='sha'){ + for(const nature of lib.inpile_nature){ + card.nature=nature; + if(event.filterCard(card,player,event)) return true; + } + } + } + return false; + }, + hiddenCard(player,name){ + if(!lib.inpile.includes(name)) return false; + if(player.getStorage('dcjuewu_used').includes(name)) return false; + if(!player.hasCard(card=>{ + return _status.connectMode||get.number(card)===2; + },'hes')) return false; + return get.tag({name},'damage'); + }, + group:'dcjuewu_inTwo', + chooseButton:{ + dialog(event,player){ + let list=get.inpileVCardList(info=>{ + return get.tag({name:info[2]},'damage'); + }); + if(!list.some(info=>info[2]==='shuiyanqijunx')) list.add(['锦囊','','shuiyanqijunx']); + list=list.filter(info=>{ + const name=info[2],nature=info[3]; + if(player.getStorage('dcjuewu_used').includes(name)) return false; + const card=get.autoViewAs({name,nature},'unsure'); + return event.filterCard(card,player,event); + }); + return ui.create.dialog('绝武',[list,'vcard']); + }, + check(button){ + if(get.event().getParent().type!='phase') return 1; + const player=get.player(); + return player.getUseValue({ + name:button.link[2], + nature:button.link[3], + }); + }, + backup(links,player){ + return { + audio:'dcjuewu', + filterCard(card,player){ + return get.number(card)===2; + }, + position:'hes', + check(card){ + return 8-get.value(card); + }, + popname:true, + viewAs:{ + name:links[0][2], + nature:links[0][3] + }, + precontent(){ + if (!player.storage.dcjuewu_used){ + player.when({global:'phaseAfter'}).then(() => { + delete player.storage.dcjuewu_used; + }); + } + player.markAuto('dcjuewu_used', event.result.card.name); + }, + } + }, + prompt(links,player){ + return '将一张点数为2的牌当'+(get.translation(links[0][3])||'')+get.translation(links[0][2])+'使用'; + } + }, + subSkill:{ + backup:{}, + inTwo:{ + audio:'dcjuewu', + trigger:{ + player:'gainAfter', + global:'loseAsyncAfter', + }, + filter(event,player){ + const cards=event.getg(player); + if(!cards.length) return false; + return game.hasPlayer(current=>{ + if(current===player) return false; + const evt=event.getl(current); + return evt&&evt.hs.length+evt.es.length+evt.js.length>0; + }); + }, + forced:true, + locked:false, + async content(event,trigger,player){ + player.addGaintag(trigger.getg(player),'dcjuewu_two'); + player.addSkill('dcjuewu_two'); + }, + }, + two:{ + charlotte:true, + mod:{ + cardnumber(card){ + if(card.hasGaintag('dcjuewu_two')) return 2; + }, + }, + }, + }, + ai:{ + fireAttack:true, + respondSha:true, + skillTagFilter(player){ + if(!player.hasCard(card=>{ + return _status.connectMode||get.number(card)===2; + },'hes')) return false; + }, + order:1, + result:{ + player(player){ + if(get.event('dying')) return get.attitude(player,get.event('dying')); + return 1; + }, + }, + }, + }, + dcwuyou:{ + audio:2, + global:'dcwuyou_g', + subSkill:{ + g:{ + audio:'dcwuyou', + enable:'phaseUse', + usable:1, + filter(event,player){ + if(!player.countCards('h')) return false; + return game.hasPlayer(current=>{ + return current.hasSkill('dcwuyou'); + }); + }, + filterCard:true, + filterTarget(card,player,target){ + return target.hasSkill('dcwuyou'); + }, + selectTarget(){ + const count=game.countPlayer(current=>{ + return current.hasSkill('dcwuyou'); + }); + return count>1?1:-1; + }, + check(card){ + const player=get.player(); + const hasFriend=game.hasPlayer(current=>{ + return current.hasSkill('dcwuyou')&&get.attitude(player,current)>0; + }); + return (hasFriend?7:1)-get.value(card); + }, + prompt(){ + const player=get.player(),list=game.filterPlayer(current=>{ + return current.hasSkill('dcwuyou'); + }),list2=list.filter(current=>current!==player); + const moreThanOne=list.length>1,includesMe=list.includes(player); + let str='选择一张手牌,'; + if(includesMe) str+=`点击“确定”,${moreThanOne?'或':''}`; + if(moreThanOne||!includesMe) str+=`将此牌交给${get.translation(list2)}${list2.length>1?'中的一人':''},`; + str+='然后执行后续效果。'; + return str; + }, + discard:false, + lose:false, + delay:false, + async content(event,trigger,player){ + const { target } = event; + const isMe = target === player; + let { cards } = event; + if (!isMe) await player.give(cards, target); + const names = lib.inpile.filter(name => { + return get.type2(name) !== 'equip'; + }).randomGets(5); + if (names.includes('sha')) names.splice(names.indexOf('sha') + 1, 0, ...lib.inpile_nature.map(nature => ['sha', nature])); + const vcard = names.map(namex => { + let name = namex, nature; + if (Array.isArray(namex)) [name, nature] = namex; + const info = [get.type(name), '', name, nature]; + return info; + }); + const links = await target.chooseButton(['武佑:选择一个牌名', [vcard, 'vcard']], true) + .set('user', player) + .set('ai', button => { + const player = get.player(), user = get.event('user'); + return user.getUseValue({name: button.link[2], nature: button.link[3]}) * get.attitude(player, user); + }) + .forResultLinks(); + if (!links || !links.length) return; + const viewAs = {name: links[0][2], nature: links[0][3]}; + if (!isMe) { + cards = await target.chooseToGive(player, true).forResultCards(); + } + const card = cards[0]; + if (!target.storage.dcwuyou_transfer) target.storage.dcwuyou_transfer = {}; + target.storage.dcwuyou_transfer[card.cardid] = viewAs; + target.addGaintag(cards, 'dcwuyou_transfer'); + target.addSkill('dcwuyou_transfer'); + }, + ai:{ + order:10, + result:{ + player(player,target){ + if(get.attitude(player,target)>0) return 2; + return 1; + }, + target:0.5, + }, + }, + }, + transfer:{ + trigger:{player:'useCard1'}, + forced:true, + popup:false, + charlotte:true, + filter(event,player){ + if(event.addCount===false) return false; + return player.hasHistory('lose',evt=>{ + if(evt.getParent()!=event) return false; + for(const i in evt.gaintag_map){ + if(evt.gaintag_map[i].includes('dcwuyou_transfer')) return true; + } + return false; + }); + }, + async content(event,trigger,player){ + trigger.addCount = false; + const stat = player.getStat().card, name = trigger.card.name; + if (typeof stat[name] === 'number') stat[name]--; + }, + mod:{ + cardname(card,player){ + const map=player.storage.dcwuyou_transfer; + if(map&&map[card.cardid]&&get.itemtype(card)=='card'&&card.hasGaintag('dcwuyou_transfer')) return map[card.cardid].name; + }, + cardnature(card,player){ + const map=player.storage.dcwuyou_transfer; + if(map&&map[card.cardid]&&get.itemtype(card)=='card'&&card.hasGaintag('dcwuyou_transfer')) return map[card.cardid].nature||false; + }, + cardUsable(card){ + if(!card.cards) return; + if(card.cards.some(card=>card.hasGaintag('dcwuyou_transfer'))) return Infinity; + }, + }, + }, + } + }, + dcyixian:{ + audio:2, + enable:'phaseUse', + limited:true, + skillAnimation:true, + animationColor:'metal', + chooseButton:{ + dialog(event,player){ + const dialog=ui.create.dialog('义贤:你可以选择一项','hidden'); + dialog.add([[ + ['field','获得场上的所有装备牌'], + ['discardPile','获得弃牌堆中的所有装备牌'] + ],'textbutton']); + return dialog; + }, + check(button){ + const player=get.player(); + if(button.link=='field') return game.filterPlayer().map(current=>{ + const cards=current.getCards('e'),att=get.sgnAttitude(player,current); + return cards.map(card=>{ + return Math.max(player.hasSkill('dcjuewu')?5:0,get.value(card,player))-get.value(card,current)*att; + }).reduce((p,c)=>p+c,0); + }).reduce((p,c)=>p+c,0); + if(button.link=='discardPile') return Array.from(ui.discardPile.childNodes).filter(card=>{ + return get.type(card)==='equip'; + }).map(card=>{ + return Math.max(player.hasSkill('dcjuewu')?5:0,get.value(card,player)); + }).reduce((p,c)=>p+c,0); + return 0.1; + }, + backup(links){ + return { + filterCard:()=>false, + selectCard:-1, + pos:links[0], + filterTarget:()=>false, + selectTarget:-1, + popup:false, + direct:true, + async content(event,trigger,player){ + await player.logSkill('dcyixian'); + player.awakenSkill('dcyixian'); + const position = lib.skill.dcyixian_backup.pos; + let cards = []; + if (position === 'field') { + cards.addArray(game.filterPlayer().map(current => current.getCards('e')).flat()); + } + else { + cards.addArray(Array.from(ui.discardPile.childNodes).filter(card => { + return get.type(card) === 'equip'; + })); + } + if (!cards.length) return; + await player.gain(cards, position === 'field'? 'give' : 'gain2'); + const pairs = game.filterPlayer().map(current => { + let lostNum = 0; + current.checkHistory('lose', evt => { + if (evt.getParent(2) === event) lostNum += evt.cards2.length; + }); + return [current, lostNum]; + }); + for (const pair of pairs) { + const [target, num] = pair; + if (!num) continue; + const bool = await player.chooseBool(`是否令${get.translation(target)}摸${get.cnNumber(num)}张牌并回复1点体力?`) + .set('choice', get.effect(target, {name: 'draw'}, player, player) + get.recoverEffect(target, player, player) / 5 > 0) + .forResultBool(); + if (bool) { + player.line(target, 'green'); + await target.draw(num); + await target.recover(); + } + if (!event.isMine() && !event.isOnline()) await game.asyncDelayx(); + } + }, + } + }, + prompt(links){ + return `点击“确定”,从${links[0]==='field'?'场上':'弃牌堆中'}获得所有装备牌`; + }, + }, + subSkill:{ + backup:{}, + }, + ai:{ + order:10, + threaten:2.9, + result:{ + player(player){ + const enemies=game.filterPlayer(current=>{ + return get.rawAttitude(player,current)<0&&get.attitude(player,current)>=0; + }),knownEnemies=game.filterPlayer(current=>{ + return get.attitude(player,current)<0; + }); + if(!knownEnemies.length&&player.countCards('e')>1||player.getHp()>3&&enemies.length>0&&knownEnemies.length<2&&knownEnemies.lengthget.attitude(player,enemy)<=-9)) return 0; + const val1=game.filterPlayer().map(current=>{ + const cards=current.getCards('e'),att=get.sgnAttitude(player,current); + return cards.map(card=>{ + return Math.max(player.hasSkill('dcjuewu')?5:0,get.value(card,player))-get.value(card,current)*att; + }).reduce((p,c)=>p+c,0); + }).reduce((p,c)=>p+c,0); + const val2=Array.from(ui.discardPile.childNodes).filter(card=>{ + return get.type(card)==='equip'; + }).map(card=>{ + return Math.max(player.hasSkill('dcjuewu')?5:0,get.value(card,player)); + }).reduce((p,c)=>p+c,0); + return Math.max(val1,val2)>20?4:0; + }, + }, + }, + }, + //SP甄宓 + dcjijie:{ + audio:2, + trigger:{ + global:['gainAfter','loseAsyncAfter','recoverAfter'], + }, + getIndex(event,player){ + if (event.name!=='loseAsync') return [[event.player]]; + return [game.filterPlayer(current=>{ + return current!==player&&_status.currentPhase!==current&&event.getg(current).length>0; + }).sortBySeat()]; + }, + filter(event,player,triggername,targets){ + if(event.name==='recover') return targets[0]!==player&&_status.currentPhase!==targets[0]&&player.isDamaged(); + return targets.some(current=>{ + return current!==player&&_status.currentPhase!==current&&event.getg(current).length>0; + }); + }, + forced:true, + usable:1, + logTarget(event,player,triggername,targets){ + return targets; + }, + async content(event,trigger,player){ + if (trigger.name === 'recover') { + await player.recover(trigger.num); + } + else{ + const count = game.countPlayer(current => { + if(current === player || _status.currentPhase === current) return 0; + return trigger.getg(current).length; + }); + await player.draw(count); + } + }, + }, + dchuiji:{ + audio:2, + enable:'phaseUse', + usable:1, + filterTarget:true, + chooseButton:{ + dialog(event,player){ + const name=get.translation(event.result.targets[0]); + const dialog=ui.create.dialog( + `惠济:请选择要令${name}执行的选项`, + [[['draw','令其摸两张牌'],['equip','令其随机使用牌堆中的一张装备牌']],'textbutton'], + 'hidden' + ); + return dialog; + }, + filter(button,player){ + const target=get.event().getParent().result.targets[0]; + const link=button.link; + if(button.link==='equip'&&target.isMin()) return false; + return true; + }, + check(button){ + const player=get.player(),target=get.event().getParent().result.targets[0]; + const link=button.link; + const att=get.attitude(player,target)/5; + const hs=target.countCards('h'); + if(link==='draw'){ + return (2-(hs+2>game.countPlayer())*hs)*att; + } + return (1.1-(hs>game.countPlayer())*hs)*att; + }, + backup(links){ + return { + audio:'dchuiji', + target:get.event().result.targets[0], + link:links[0], + filterTarget(card,player,target){ + return target===lib.skill.dchuiji_backup.target; + }, + selectTarget:-1, + async content(event,trigger,player){ + const link = lib.skill.dchuiji_backup.link; + const { target } = event; + if (link === 'draw') await target.draw(2); + else { + const card = get.cardPile2(card => { + if (get.type(card) !== 'equip') return false; + return target.canUse(card, target) && !get.cardtag(card, 'gifts'); + }); + if (card) await target.chooseUseTarget(card, true).set('nopopup', true); + else { + game.log('但是牌堆里没有', target, '的装备!'); + await game.asyncDelayx(); + } + } + if (target.countCards('h') <= game.countPlayer()) return; + player.when({global: 'wuguRemained'}).filter(evt => { + return evt.getParent(3) === event; + }).vars({originalOwner: target}).then(() => { + const remained = trigger.remained.filterInD('d'); + if (!remained.length) return event.finish(); + player.line(originalOwner); + originalOwner.gain(remained, 'gain2'); + }); + await target.chooseUseTarget({ + name: 'wugu', + storage: { + fixedShownCards: target.getCards('h'), + }, + }, true); + } + }; + }, + prompt(links){ + return '点击“确定”以执行效果'; + }, + }, + subSkill:{ + backup:{}, + }, + ai:{ + order(item,player){ + if(!game.hasPlayer(current=>current!==player&&get.attitude(player,current)>0)&&game.hasPlayer(current=>get.attitude(player,current)<=0)) return 10; + if(game.hasPlayer(current=>{ + const del=player.countCards('h')-current.countCards('h'),toFind=[2,4].find(num=>Math.abs(del)===num); + if(toFind===4&&del<0&&get.attitude(player,current)<=0){ + return true; + } + return false; + })) return 10; + return 1; + }, + result:{ + target(player,target){ + const del=player.countCards('h')-target.countCards('h'),toFind=[2,4].find(num=>Math.abs(del)===num); + if(toFind){ + return -del*(get.attitude(player,target)*Math.min(3,target.countCards('h')))*toFind/10; + } + return -1; + }, + }, + }, + }, //曹芳 dczhimin:{ audio:2, @@ -14646,6 +15156,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ qinghegongzhu:['qinghegongzhu','dc_qinghegongzhu'], caofang:['caofang','jsrg_caofang'], caomao:['caomao','mb_caomao'], + sp_zhenji:['sp_zhenji','jsrg_zhenji'], }, translate:{ puyuan:'蒲元', @@ -15210,6 +15721,21 @@ game.import('character',function(lib,game,ui,get,ai,_status){ dczhimin_info:'锁定技。①一轮游戏开始时,你选择至多X名其他角色(X为你的体力值),获得这些角色各自手牌中的随机一张点数最小的牌。②当你于你的回合外得到牌后,你将这些牌标记为“民”。③当你失去“民”后,你将手牌补至体力上限。', dcjujian:'拒谏', dcjujian_info:'主公技。出牌阶段限一次,你可以令一名其他魏势力角色摸一张牌,然后你令其于本轮内使用的普通锦囊牌对你无效。', + wu_guanyu:'武关羽', + wu_guanyu_prefix:'武', + dcjuewu:'绝武', + dcjuewu_two:'2点', + dcjuewu_info:'①每回合每种牌名限一次。你可以将一张点数为2的牌当任意伤害类牌使用(包括【水淹七军】)。②当你得到其他角色区域内的牌后,你令这些牌的点数均视为2直到你失去这些牌。', + dcwuyou:'武佑', + dcwuyou_info:'①出牌阶段限一次。你可以选择一张手牌,从系统随机生成的五个非装备牌牌名中选择一个,令此牌的牌名与属性视为与你选择的相同。②其他角色的出牌阶段限一次。其可以交给你一张手牌,你从系统随机生成的五个非装备牌牌名中选择一个,然后交给其一张手牌,令此牌的牌名与属性视为与你选择的相同(一名角色使用〖武佑〗转化的牌无距离且无任何次数限制)。', + dcyixian:'义贤', + dcyixian_info:'限定技。出牌阶段,你可以选择一项:⒈获得场上的所有装备牌;⒉获得弃牌堆中的所有装备牌。然后你依次选择是否令被你以此法获得牌的角色摸X张牌并回复1点体力(X为其以此法失去的牌数)。', + sp_zhenji:'SP甄宓', + sp_zhenji_prefix:'SP', + dcjijie:'己诫', + dcjijie_info:'锁定技。每回合限一次,当其他角色于其回合外得到牌后/回复体力后,你摸等量的牌/回复等量的体力。', + dchuiji:'惠济', + dchuiji_info:'出牌阶段限一次。你可以令一名角色摸两张牌或从牌堆中随机使用一张不为赠物的装备牌,然后若其手牌数不小于存活角色数,其视为使用一张【五谷丰登】。系统不于此牌使用准备工作结束时执行亮出牌堆顶的牌的动作,改为你令其将所有手牌置于处理区,然后令所有目标角色依次获得其中一张牌。当这些牌因执行【五谷丰登】的执行动作而置于弃牌堆后,你令其获得这些牌。', sp2_yinyu:'隐山之玉', sp2_huben:'百战虎贲', diff --git a/image/character/clan_wangmingshan.jpg b/image/character/clan_wangmingshan.jpg index 84a7cb600..6c505c90f 100644 Binary files a/image/character/clan_wangmingshan.jpg and b/image/character/clan_wangmingshan.jpg differ diff --git a/image/character/dc_jiangji.jpg b/image/character/dc_jiangji.jpg new file mode 100644 index 000000000..0e5dd6ee9 Binary files /dev/null and b/image/character/dc_jiangji.jpg differ diff --git a/image/character/xia_shie.jpg b/image/character/xia_shie.jpg new file mode 100644 index 000000000..0a5faa078 Binary files /dev/null and b/image/character/xia_shie.jpg differ diff --git a/image/character/xia_shitao.jpg b/image/character/xia_shitao.jpg new file mode 100644 index 000000000..93dfe7ec0 Binary files /dev/null and b/image/character/xia_shitao.jpg differ diff --git a/noname/library/index.js b/noname/library/index.js index 0222efe53..7a69c7830 100644 --- a/noname/library/index.js +++ b/noname/library/index.js @@ -13119,6 +13119,12 @@ export class Library { * @returns {string} */ getSpan: () => `${get.prefixSpan('旧')}${get.prefixSpan('谋')}` + }], + ['手杀神', { + /** + * @returns {string} + */ + getSpan: () => `${get.prefixSpan('手杀')}${get.prefixSpan('神')}` }] ]); groupnature = {