v1.10.9
v1.10.9版本更新内容: ※本次版本更新**修改了game.check函数**。请更新配套的相关UI扩展。 ※我们继续和一些优秀且具有开源精神的代码编写者保持着积极合作。在这一版本中,我们通过接收GitHub的Pull Request,整合了@mengxinzxz @copcap @hadeszoro @universe-st @cjk7989 @PZ157 @lieren2023 @Ansolve @Rintim @kuangshen04 @XboxSoldier 等11位代码贡献者编写的代码。 ※添加OL新武将「谋袁绍」「郭图」「刘磐」「陆凯」「谋关羽(初版)」;添加十周年新武将「谋司马懿」「曹爽」「星张春华」「司马师」「王凌」「蒋济」「公孙修」「胡遵」「吕范」「李傕郭汜」「臧霸」「陈武董袭」 ※调整「曹婴」「糜芳&傅士仁」「合·司马懿」「手杀胡班」「手杀陈珪」「侠关羽」「史阿」「玉真子」「谯周」的技能 ※添加了“转化牌花色/点数”的模糊匹配,从而修复许攸的〖成略〗和张星彩的〖枪舞〗等技能无法正常和联动的问题;同时将game.check拆分为多个函数,且增加hook接口,允许UI扩展使用hook接口修改界面DOM节点,而不影响游戏逻辑。具体内容请查看 https://github.com/libccy/noname/pull/1008 剪切线下方的说明。 ※添加了get.menuZoom()的函数,用于获取菜单的缩放倍率。 ※修复了player.removeAdditionalSkills函数在多个额外技能重复时无法正常移除其中的对应关系的bug。 ※给useCard流程添加了一个新的useCard0时机,用于谋司马懿隐藏自己使用牌的目标。该时机可能会因为出牌特效类扩展覆盖lib.element.content.useCard而无法正常出现,导致谋司马懿无法正常发动〖平辽〗。请等待这些扩展的更新。 ※修复本体中存在的数个_status.event.next.remove(GameEvent)导致GameEvent被await之后卡死的bug
|
@ -3,7 +3,7 @@ root = true
|
|||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = crlf
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
|
||||
[*.js]
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
> W.I.P
|
||||
|
||||
自由开源是无名杀社区的灵魂,希望所有人都能够遵循这一精神。
|
|
@ -0,0 +1,3 @@
|
|||
> W.I.P
|
||||
|
||||
请参考[此处](https://github.com/libccy/noname/wiki/%E3%80%8A%E6%97%A0%E5%90%8D%E6%9D%80%E3%80%8B%E9%A1%B9%E7%9B%AE-Pull-Request-%E6%8F%90%E4%BA%A4%E8%A7%84%E8%8C%83)了解无名杀的PR规范。
|
11
README.md
|
@ -4,6 +4,17 @@ https://github.com/nonameShijian/noname-server
|
|||
|
||||
---
|
||||
|
||||
贡献代码可阅读相关文档:
|
||||
|
||||
[Git下载安装指南](https://github.com/libccy/noname/wiki/Git%E4%B8%8B%E8%BD%BD%E5%AE%89%E8%A3%85%E6%8C%87%E5%8D%97)
|
||||
|
||||
[Github桌面版客户端使用入门](https://docs.github.com/zh/desktop/overview/getting-started-with-github-desktop)
|
||||
|
||||
[如何提交代码到《无名杀》Github仓库](https://github.com/libccy/noname/wiki/%E5%A6%82%E4%BD%95%E6%8F%90%E4%BA%A4%E4%BB%A3%E7%A0%81%E5%88%B0%E3%80%8A%E6%97%A0%E5%90%8D%E6%9D%80%E3%80%8BGithub%E4%BB%93%E5%BA%93)
|
||||
|
||||
[《无名杀》项目 Pull Request 提交规范](https://github.com/libccy/noname/wiki/%E3%80%8A%E6%97%A0%E5%90%8D%E6%9D%80%E3%80%8B%E9%A1%B9%E7%9B%AE-Pull-Request-%E6%8F%90%E4%BA%A4%E8%A7%84%E8%8C%83)
|
||||
|
||||
|
||||
在线试玩:
|
||||
|
||||
https://spmario233.github.io/noname/index.html (图片素材加载速度较慢,不推荐)
|
||||
|
|
|
@ -308,12 +308,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
if(status*get.attitude(viewer,player._trueMe||player)>0 || target.hasSkillTag('nodamage') || target.hasSkillTag('nofire') || target.hasSkillTag('nothunder') || get.attitude(viewer,player)>0 || (1+target.countCards('hs'))*_status.event.getRand()>1.57) return 0;
|
||||
},
|
||||
basic:{
|
||||
order:(item,player)=>{
|
||||
if(player.hasCard(card=>{
|
||||
return get.tag(card,'damage')&&game.hasNature(card)&&player.hasValueTarget(card);
|
||||
},'hs')) return 7.3;
|
||||
return 4.1;
|
||||
},
|
||||
order:7.3,
|
||||
useful:1.2,
|
||||
value:4
|
||||
},
|
||||
|
|
|
@ -137,7 +137,16 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
},
|
||||
ai:{
|
||||
order:3,
|
||||
wuxie:function(target,card,player,viewer){
|
||||
if(get.mode()=='guozhan'){
|
||||
if(!_status._aozhan){
|
||||
if(!player.isMajor()){
|
||||
if(!viewer.isMajor()) return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
order:4,
|
||||
value:9,
|
||||
useful:6,
|
||||
tag:{
|
||||
|
@ -194,6 +203,15 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
},
|
||||
ai:{
|
||||
wuxie:function(target,card,player,viewer){
|
||||
if(get.mode()=='guozhan'){
|
||||
if(!_status._aozhan){
|
||||
if(!player.isMajor()){
|
||||
if(!viewer.isMajor()) return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
order:6,
|
||||
value:9,
|
||||
useful:6,
|
||||
|
@ -299,7 +317,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
if(player.hasSkill('gzzongyu')) return 9;
|
||||
if(game.hasPlayer(function(current){
|
||||
return current.hasSkill('gzzongyu')&&get.attitude(player,current)<=0;
|
||||
})) return 1;
|
||||
})) return 1;
|
||||
return 7.2;
|
||||
},
|
||||
basic:{
|
||||
|
@ -604,9 +622,6 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
order:7.5,
|
||||
value:4,
|
||||
useful:2,
|
||||
wuxie:function(){
|
||||
return 0;
|
||||
},
|
||||
result:{
|
||||
target:function(player,target){
|
||||
if(get.mode()=='versus'){
|
||||
|
@ -678,7 +693,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
list.push('摸'+(num-i)+'回'+i);
|
||||
}
|
||||
target.chooseControl(list).set('prompt','请分配自己的摸牌数和回复量').ai=function(){
|
||||
return Math.min(_status.event.player.getDamagedHp(),list.length)-1;
|
||||
return 0;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -697,7 +712,16 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
},
|
||||
ai:{
|
||||
order:3,
|
||||
wuxie:function(target,card,player,viewer){
|
||||
if(get.mode()=='guozhan'){
|
||||
if(!_status._aozhan){
|
||||
if(!player.isMajor()){
|
||||
if(!viewer.isMajor()) return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
order:6,
|
||||
value:4,
|
||||
useful:2,
|
||||
result:{
|
||||
|
@ -777,7 +801,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
target.draw();
|
||||
},
|
||||
destroy:function(card,targetPosition,player,event){
|
||||
if(event.name!='lose'||event.name!='cardsDiscard'||targetPosition!='discardPile') return false;
|
||||
if((event.name!='lose'&&event.name!='cardsDiscard')||targetPosition!='discardPile') return false;
|
||||
var evt=event.getParent().relatedEvent;
|
||||
if(evt&&evt.name=='useCard') return false;
|
||||
return true;
|
||||
|
@ -821,7 +845,16 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
target.addTempSkill('diaohulishan');
|
||||
},
|
||||
ai:{
|
||||
order:10,
|
||||
order:function(item, player){
|
||||
if(!player) player=get.player();
|
||||
if(player.hasCard(function(card){
|
||||
return ['gz_haolingtianxia','gz_guguoanbang','gz_kefuzhongyuan','wuzhong','yuanjiao','lianjunshengyan','lulitongxin','yiyi'].includes(get.name(card));
|
||||
},'hs')) return 3.5;
|
||||
if(player.hasCard(function(card){
|
||||
return get.name(card)=='taoyuan';
|
||||
},'hs')) return get.order({name:'taoyuan'},player)-1;
|
||||
return 9.5;
|
||||
},
|
||||
value:4,
|
||||
useful:[2,1],
|
||||
wuxie:function(){
|
||||
|
@ -947,6 +980,15 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
player.draw(3);
|
||||
},
|
||||
ai:{
|
||||
wuxie:function(target,card,player,viewer){
|
||||
if(get.mode()=='guozhan'){
|
||||
if(!_status._aozhan){
|
||||
if(!player.isMajor()){
|
||||
if(!viewer.isMajor()) return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
basic:{
|
||||
useful:4,
|
||||
value:8,
|
||||
|
|
|
@ -155,7 +155,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
next.set('useShan',(()=>{
|
||||
if(target.hasSkillTag('noShan',null,event)) return false;
|
||||
if(target.hasSkillTag('useShan',null,event)) return true;
|
||||
if(event.baseDamage+event.extraDamage<=0 || get.attitude(target,player._trueMe||player)>0) return false;
|
||||
if(event.baseDamage+event.extraDamage<=0 || target.isLinked()&&game.hasNature(event.card)&&get.attitude(target,player._trueMe||player)>0) return false;
|
||||
if(event.shanRequired>1&&target.mayHaveShan(target,'use',null,'count')<event.shanRequired-(event.shanIgnored||0)) return false;
|
||||
if(event.baseDamage+event.extraDamage>=target.hp+
|
||||
((player.hasSkillTag('jueqing',false,target)||target.hasSkill('gangzhi'))?target.hujia:0)) return true;
|
||||
|
@ -1145,6 +1145,15 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
target.draw(2);
|
||||
},
|
||||
ai:{
|
||||
wuxie:function(target,card,player,viewer){
|
||||
if(get.mode()=='guozhan'){
|
||||
if(!_status._aozhan){
|
||||
if(!player.isMajor()){
|
||||
if(!viewer.isMajor()) return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
basic:{
|
||||
order:7.2,
|
||||
useful:4.5,
|
||||
|
@ -1262,33 +1271,39 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
value:5.5
|
||||
},
|
||||
result:{
|
||||
target:-1.5,
|
||||
player:function(player,target,card){
|
||||
if(player.hasSkillTag('directHit_ai',true,{
|
||||
target:target,
|
||||
card:card,
|
||||
},true)){
|
||||
return 0;
|
||||
}
|
||||
if(get.damageEffect(target,player,target)>0&&get.attitude(player,target)>0&&get.attitude(target,player)>0){
|
||||
return 0;
|
||||
}
|
||||
var hs1=target.getCards('h','sha');
|
||||
var hs2=player.getCards('h','sha');
|
||||
if(hs1.length>hs2.length+1){
|
||||
player(player, target, card) {
|
||||
if (player.hasSkillTag('directHit_ai', true, {
|
||||
target: target,
|
||||
card: card
|
||||
}, true)) return 0;
|
||||
if (get.damageEffect(target, player, target) >= 0) return 0;
|
||||
let pd = get.damageEffect(player, target, player), att = get.attitude(player, target);
|
||||
if (att > 0 && get.damageEffect(target, player, player) > pd) return 0;
|
||||
let ts = target.mayHaveSha(player, 'respond', null, 'count'), ps = player.mayHaveSha(player, 'respond', null, 'count');
|
||||
if (ts < 1 && ts << 3 < Math.pow(player.hp, 2)) return 0;
|
||||
if (att > 0) {
|
||||
if (ts < 1) return 0;
|
||||
return -2;
|
||||
}
|
||||
var hsx=target.getCards('h');
|
||||
if(hsx.length>2&&hs2.length==0&&hsx[0].number<6){
|
||||
return -2;
|
||||
}
|
||||
if(hsx.length>3&&hs2.length==0){
|
||||
return -2;
|
||||
}
|
||||
if(hs1.length>hs2.length&&(!hs2.length||hs1[0].number>hs2[0].number)){
|
||||
return -2;
|
||||
}
|
||||
return -0.5;
|
||||
if (ts - ps + Math.exp(0.8 - player.hp) < 1) return -ts;
|
||||
if (pd >= 0) return pd / get.attitude(player, player);
|
||||
return -2 - ts;
|
||||
},
|
||||
target(player, target, card) {
|
||||
if (player.hasSkillTag('directHit_ai', true, {
|
||||
target: target,
|
||||
card: card
|
||||
}, true)) return -2;
|
||||
let td = get.damageEffect(target, player, target);
|
||||
if (td >= 0) return td / get.attitude(target, target);
|
||||
let pd = get.damageEffect(player, target, player), att = get.attitude(player, target);
|
||||
if (att > 0 && get.damageEffect(target, player, player) > pd) return -2;
|
||||
let ts = target.mayHaveSha(player, 'respond', null, 'count'), ps = player.mayHaveSha(player, 'respond', null, 'count');
|
||||
if (ts < 1) return -1.5;
|
||||
if (att > 0) return -2;
|
||||
if (ts - ps < 1) return -2 - ts;
|
||||
if (pd >= 0) return -1;
|
||||
return -ts;
|
||||
}
|
||||
},
|
||||
tag:{
|
||||
|
|
|
@ -100,9 +100,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var key=`${suit}+${get.type2(trigger.card)}`;
|
||||
if(key in storage){
|
||||
if(!player.hasSkill('qice')){
|
||||
player.addTempSkill('qice','roundStart');
|
||||
player.addTempSkills('qice','roundStart');
|
||||
player.popup('奇策');
|
||||
game.log(player,'获得了技能','#g【奇策】');
|
||||
// game.log(player,'获得了技能','#g【奇策】');
|
||||
}
|
||||
event.goto(2);
|
||||
}
|
||||
|
@ -487,8 +487,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var player=_status.event.player;
|
||||
var num=_status.event.num;
|
||||
var num2=player.getDamagedHp();
|
||||
if(num>num2) return 7-get.value(card);
|
||||
if(num==num2) return lib.skill.zhiheng.check(card);
|
||||
if(num<num2) return 8-get.value(card);
|
||||
if(num==num2||num2>=(2+num-num2)) return lib.skill.zhiheng.check(card);
|
||||
return 0;
|
||||
}).set('num',num).logSkill='clanxieshu';
|
||||
'step 1'
|
||||
|
|
|
@ -101,10 +101,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
filter(event,player){
|
||||
var filter=event.filterCard;
|
||||
if(filter({name:'sha',nature:'fire'},player,event)&&player.countCards('hes',{suit:'diamond'})) return true;
|
||||
if(filter({name:'shan'},player,event)&&player.countCards('hes',{suit:'club'})) return true;
|
||||
if(filter({name:'tao'},player,event)&&player.countCards('hes',{suit:'heart'})) return true;
|
||||
if(filter({name:'wuxie'},player,event)&&player.countCards('hes',{suit:'spade'})) return true;
|
||||
if(filter(get.autoViewAs({name:'sha',nature:'fire'},'unsure'),player,event)&&player.countCards('hes',{suit:'diamond'})) return true;
|
||||
if(filter(get.autoViewAs({name:'shan'},'unsure'),player,event)&&player.countCards('hes',{suit:'club'})) return true;
|
||||
if(filter(get.autoViewAs({name:'tao'},'unsure'),player,event)&&player.countCards('hes',{suit:'heart'})) return true;
|
||||
if(filter(get.autoViewAs({name:'wuxie'},'unsure'),player,event)&&player.countCards('hes',{suit:'spade'})) return true;
|
||||
return false;
|
||||
},
|
||||
usable:20,
|
||||
|
@ -603,7 +603,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
]);
|
||||
'step 1'
|
||||
var skill=result.control;
|
||||
player.addTempSkill(skill,'dcbianzhuangAfter');
|
||||
player.addTempSkills(skill,'dcbianzhuangAfter');
|
||||
for(var i in lib.skill.dcbianzhuang.characterMap){
|
||||
if(lib.skill.dcbianzhuang.characterMap[i]==skill){
|
||||
player.flashAvatar('dcbianzhuang',i);
|
||||
|
|
|
@ -2031,7 +2031,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(trigger.targets&&trigger.targets.length){
|
||||
let result=yield player.chooseControl(['额外结算','摸一张牌']).set('prompt','实荐:请选择一项').set('prompt2',`令${get.translation(trigger.card)}额外结算一次,或摸一张牌`).set('ai',()=>{
|
||||
return get.event('choice');
|
||||
}).set('choice',['basic','trick'].includes(get.type(trigger.card))&&trigger.targets.map(i=>get.effect(i,trigger.card,target,player)).reduce((p,c)=>p+c,0)>=5?0:1);
|
||||
}).set('choice',function(){
|
||||
if(trigger.card.name==='tiesuo'||!['basic','trick'].includes(get.type(trigger.card))) return 1;
|
||||
if(trigger.targets.reduce((p,c)=>{
|
||||
return p+get.effect(c,trigger.card,target,_status.event.player);
|
||||
},0)>=get.effect(player,{name:'draw'},player,_status.event.player)) return 0;
|
||||
return 1;
|
||||
}());
|
||||
if(result.index==0){
|
||||
trigger.getParent().effectCount++;
|
||||
game.log(player,'令',trigger.card,'额外结算一次');
|
||||
|
@ -2385,8 +2391,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
else wuxie=true;
|
||||
}
|
||||
}
|
||||
if(shan&&event.filterCard({name:'shan'},player,event)) return true;
|
||||
if(wuxie&&event.filterCard({name:'wuxie'},player,event)) return true;
|
||||
if(shan&&event.filterCard(get.autoViewAs({name:'shan'},'unsure'),player,event)) return true;
|
||||
if(wuxie&&event.filterCard(get.autoViewAs({name:'wuxie'},'unsure'),player,event)) return true;
|
||||
return false;
|
||||
},
|
||||
hiddenCard (player,name){
|
||||
|
@ -2486,7 +2492,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(result.bool){
|
||||
var target=trigger.player,cards=result.cards;
|
||||
player.logSkill('dddqiahua',target);
|
||||
target.addTempSkill('dddxunxun');
|
||||
target.addTempSkills('dddxunxun');
|
||||
player.addShownCards(cards,'visible_dddxianglang');
|
||||
game.log(player,'选择了',cards,'作为“明”');
|
||||
player.showCards(cards,get.translation(player)+'对'+get.translation(target)+'发动了【恰化】');
|
||||
|
@ -4815,17 +4821,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
cardEnabled(card,player){
|
||||
if(!player.storage['dddlianer_ceiling']) return;
|
||||
var num=get.number(card);
|
||||
if(typeof num!='number'||player.storage['dddlianer_ceiling']<=num) return false;
|
||||
if(num!='unsure'&&(typeof num!='number'||player.storage['dddlianer_ceiling']<=num)) return false;
|
||||
},
|
||||
cardRespondable(card,player){
|
||||
if(!player.storage['dddlianer_ceiling']) return;
|
||||
var num=get.number(card);
|
||||
if(typeof num!='number'||player.storage['dddlianer_ceiling']<=num) return false;
|
||||
if(num!='unsure'&&(typeof num!='number'||player.storage['dddlianer_ceiling']<=num)) return false;
|
||||
},
|
||||
cardSavable(card,player){
|
||||
if(!player.storage['dddlianer_ceiling']) return;
|
||||
var num=get.number(card);
|
||||
if(typeof num!='number'||player.storage['dddlianer_ceiling']<=num) return false;
|
||||
if(num!='unsure'&&(typeof num!='number'||player.storage['dddlianer_ceiling']<=num)) return false;
|
||||
},
|
||||
}
|
||||
}
|
||||
|
@ -5459,7 +5465,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
ddd_luoxian:'罗宪',
|
||||
dddshilie:'示烈',
|
||||
visible_dddshilie:'明',
|
||||
dddshilie_info:'每回合限一次。当你需要使用一张【杀】或【闪】时,你可以明置任意点数之和不小于X的手牌,视为你使用之。若本次明置的牌点数等于X,你摸等同于本次明置的牌数的牌(X为你于当前回合角色的体力值之和)。',
|
||||
dddshilie_info:'每回合限一次。当你需要使用一张【杀】或【闪】时,你可以明置任意点数之和不小于X的手牌,视为你使用之。若本次明置的牌点数等于X,你摸等同于本次明置的牌数的牌(X为你与当前回合角色的体力值之和)。',
|
||||
ddd_lie:'李娥',
|
||||
dddyeshen:'冶身',
|
||||
dddyeshen_info:'一名角色的结束阶段,你可以亮出牌堆底三张牌,令其将其中一张黑色牌当做最大目标数为牌名字数的【铁索连环】使用或重铸,其余牌置于牌堆顶,然后此技能亮出牌数-1;若减至零张或其中没有黑色牌,你复原此技能并对自己造成1点火焰伤害。',
|
||||
|
|
|
@ -192,6 +192,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
junk_duanwei:['male','qun',4,['junklangmie']],
|
||||
junk_xuyou:["male","qun",3,["nzry_chenglve","junkshicai","nzry_cunmu"]],
|
||||
junk_zhangjiao:['male','shen',3,['yizhao','junksijun','tianjie'],['qun','die_audio:shen_zhangjiao']],
|
||||
junk_guanyu:['male','shu',4,['olsbfumeng','olsbguidao']],
|
||||
},
|
||||
characterFilter:{
|
||||
key_jojiro(mode){
|
||||
|
@ -226,7 +227,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
diy_default:["diy_yuji","diy_caiwenji","diy_lukang","diy_zhenji","old_majun"],
|
||||
diy_noname:['noname'],
|
||||
diy_key:["key_lucia","key_kyousuke","key_yuri","key_haruko","key_umi","key_rei","key_komari","key_yukine","key_yusa","key_misa","key_masato","key_iwasawa","key_kengo","key_yoshino","key_yui","key_tsumugi","key_saya","key_harukakanata","key_inari","key_shiina","key_sunohara","key_rin","key_sasami","key_akane","key_doruji","key_yuiko","key_riki","key_hisako","key_hinata","key_noda","key_tomoya","key_nagisa","key_ayato","key_ao","key_yuzuru","sp_key_kanade","key_mio","key_midori","key_kyoko","key_shizuru","key_shiorimiyuki","key_miki","key_shiori","key_kaori","sp_key_yuri","key_akiko","key_abyusa","key_godan","key_yuu","key_ryoichi","key_kotori","key_jojiro","key_shiroha","key_shizuku","key_hiroto","key_sakuya","key_youta","key_rumi","key_chihaya","key_yukito","key_asara","key_kotomi","key_mia","key_kano","db_key_liyingxia","key_erika","key_satomi","key_iriya","key_fuuko"],
|
||||
diy_trashbin:['junk_zhangjiao','old_jiakui','ol_guohuai','junk_zhangrang','old_bulianshi','junk_sunquan','ol_maliang','junk_liubei','junk_huangyueying','junk_lidian','junk_duanwei','junk_xuyou'],
|
||||
diy_trashbin:['junk_guanyu','junk_zhangjiao','old_jiakui','ol_guohuai','junk_zhangrang','old_bulianshi','junk_sunquan','ol_maliang','junk_liubei','junk_huangyueying','junk_lidian','junk_duanwei','junk_xuyou'],
|
||||
},
|
||||
},
|
||||
characterIntro:{
|
||||
|
@ -1908,6 +1909,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(!Array.isArray(list)||typeof num!='number'||list.length<=num) return false;
|
||||
var card=get.copy(list[num]);
|
||||
delete card.isCard;
|
||||
card=get.autoViewAs(card,'unsure');
|
||||
if(event.filterCard(card,player,event)) return true;
|
||||
return false;
|
||||
},
|
||||
|
@ -2265,10 +2267,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
for(var i of lib.inpile){
|
||||
var type=lib.skill.nsxingyun.getSixiang(i);
|
||||
if(!type||list.includes(type)) continue;
|
||||
if(event.filterCard({name:i},player,event)) return true;
|
||||
if(event.filterCard(get.autoViewAs({name:i},'unsure'),player,event)) return true;
|
||||
if(i=='sha'){
|
||||
for(var j of lib.inpile_nature){
|
||||
if(event.filterCard({name:i,nature:j},player,event)) return true;
|
||||
if(event.filterCard(get.autoViewAs({name:i,nature:j},'unsure'),player,event)) return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5869,7 +5871,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
filter(event,player){
|
||||
var list=['wei','shu','wu','qun','key','jin'];
|
||||
for(var i in list){
|
||||
if(player.hasMark('kotori_yumo_'+list[i])) return true;
|
||||
if(player.hasMark('kotori_yumo_'+list[i])) return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
@ -5878,7 +5880,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var list=['wei','shu','wu','qun','key','jin'];
|
||||
var list2=[];
|
||||
for(var i of list){
|
||||
if(player.hasMark('kotori_yumo_'+i)) list2.push('kotori_skill_'+i);
|
||||
if(player.hasMark('kotori_yumo_'+i)) list2.push('kotori_skill_'+i);
|
||||
}
|
||||
list2.push('cancel2');
|
||||
player.chooseControl(list2).set('prompt','###是否发动【驭魔】?###弃置对应的标记并获得下列技能中的一个,或点取消,不获得技能').set('choice',function(){
|
||||
|
@ -6089,7 +6091,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var list=['wei','shu','wu','qun','key','jin'];
|
||||
var list2=[];
|
||||
for(var i of list){
|
||||
if(player.hasMark('kotori_yumo_'+i)&&!player.getStorage('kotori_huazhan2').includes('kotori_yumo_'+i)) list2.push('kotori_yumo_'+i);
|
||||
if(player.hasMark('kotori_yumo_'+i)&&!player.getStorage('kotori_huazhan2').includes('kotori_yumo_'+i)) list2.push('kotori_yumo_'+i);
|
||||
}
|
||||
list2.push('cancel2');
|
||||
return list2;
|
||||
|
@ -6099,7 +6101,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var list=['wei','shu','wu','qun','key','jin'];
|
||||
var list2=[];
|
||||
for(var i of list){
|
||||
if(player.hasMark('kotori_yumo_'+i)&&!player.getStorage('kotori_huazhan2').includes('kotori_yumo_'+i)) list2.push('kotori_yumo_'+i);
|
||||
if(player.hasMark('kotori_yumo_'+i)&&!player.getStorage('kotori_huazhan2').includes('kotori_yumo_'+i)) list2.push('kotori_yumo_'+i);
|
||||
}
|
||||
if(list2.includes('kotori_yumo_wei')) return 'kotori_yumo_wei';
|
||||
if(list2.includes('kotori_yumo_wu')) return 'kotori_yumo_wu';
|
||||
|
@ -8201,15 +8203,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
locked:false,
|
||||
mod:{
|
||||
targetInRange(card,player){
|
||||
var list=player.getExpansions('ao_diegui');
|
||||
for(var i=0;i<list.length;i++){
|
||||
if(get.suit(list[i],false)==get.suit(card,false)) return true;
|
||||
const cardSuit = get.suit(card,false);
|
||||
const list = player.getExpansions('ao_diegui');
|
||||
for(let i = 0; i < list.length; i++){
|
||||
if(cardSuit==='unsure'||get.suit(list[i],false)===cardSuit) return true;
|
||||
}
|
||||
},
|
||||
cardUsable(card,player){
|
||||
var list=player.getExpansions('ao_diegui');
|
||||
for(var i=0;i<list.length;i++){
|
||||
if(get.suit(list[i],false)==get.suit(card,false)) return Infinity;
|
||||
const cardSuit = get.suit(card,false);
|
||||
const list = player.getExpansions('ao_diegui');
|
||||
for(let i = 0; i < list.length; i++){
|
||||
if(cardSuit==='unsure'||get.suit(list[i],false)===cardSuit) return Infinity;
|
||||
}
|
||||
},
|
||||
maxHandcard(player,num){
|
||||
|
@ -9507,7 +9511,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(event.type=='wuxie'||!player.countCards('hse',{suit:'diamond'})) return false;
|
||||
for(var i=0;i<lib.inpile.length;i++){
|
||||
var name=lib.inpile[i];
|
||||
if(name!='du'&&name!='shan'&&get.type(name)=='basic'&&event.filterCard({name:name},player,event)) return true;
|
||||
if(name!='du'&&get.type(name)=='basic'&&event.filterCard(get.autoViewAs({name:name},'unsure'),player,event)) return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
@ -9516,7 +9520,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var list=[];
|
||||
for(var i=0;i<lib.inpile.length;i++){
|
||||
var name=lib.inpile[i];
|
||||
if(name=='du'||name=='shan') continue;
|
||||
if(name=='du') continue;
|
||||
if(name=='sha'){
|
||||
list.push(['基本','','sha']);
|
||||
for(var j of lib.inpile_nature) list.push(['基本','',name,j]);
|
||||
|
@ -9528,7 +9532,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
return ui.create.dialog('摆尾',[list,'vcard'],'hidden');
|
||||
},
|
||||
filter(button,player){
|
||||
return _status.event.getParent().filterCard({name:button.link[2]},player,_status.event.getParent());
|
||||
return _status.event.getParent().filterCard(get.autoViewAs({name:button.link[2]},'unsure'),player,_status.event.getParent());
|
||||
},
|
||||
check(button){
|
||||
if(_status.event.getParent().type=='phase'){
|
||||
|
@ -9581,27 +9585,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
return tag=='fireAttack'||player.countCards('he',{suit:'diamond'})>0;
|
||||
},
|
||||
},
|
||||
group:['inari_baiwei_shan','inari_baiwei_draw'],
|
||||
},
|
||||
inari_baiwei_shan:{
|
||||
prompt:'将一张♦牌当做闪使用或打出',
|
||||
enable:['chooseToRespond','chooseToUse'],
|
||||
viewAs:{name:'shan'},
|
||||
selectCard:1,
|
||||
filterCard:{suit:'diamond'},
|
||||
popname:true,
|
||||
check(card){
|
||||
return 1/Math.max(0.1,get.value(card));
|
||||
},
|
||||
position:'hse',
|
||||
ai:{
|
||||
order:10,
|
||||
result:{player:1},
|
||||
respondShan:true,
|
||||
skillTagFilter(player){
|
||||
return player.countCards('hse',{suit:'diamond'})>0;
|
||||
},
|
||||
},
|
||||
group:['inari_baiwei_draw'],
|
||||
},
|
||||
inari_baiwei_draw:{
|
||||
trigger:{player:['useCardAfter','respondAfter']},
|
||||
|
@ -14610,7 +14594,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(event.current.needsToDiscard()){
|
||||
att=1;
|
||||
}
|
||||
player.chooseControlList(['令'+name+'摸一张牌展示','令'+name+'手牌上永久+1','弃置一张牌并令'+name+'获得一张本回进入弃牌堆的牌'],function(){
|
||||
player.chooseControlList(['令'+name+'摸一张牌展示','令'+name+'手牌上永久+1','弃置一张牌并令'+name+'获得一张本回合进入弃牌堆的牌'],function(){
|
||||
return _status.event.att;
|
||||
}).set('att',att);
|
||||
}
|
||||
|
@ -17701,8 +17685,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
async content(event,trigger,player){
|
||||
const skills = player.additionalSkills.junkyuheng;
|
||||
await player.draw(skills.length);
|
||||
await player.removeAdditionalSkills('junkyuheng');
|
||||
await player.draw(skills.length);
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -19046,6 +19030,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
junk_zhangjiao_prefix:'OL神',
|
||||
junksijun:'肆军',
|
||||
junksijun_info:'准备阶段,若“黄”数大于牌堆的牌数,你可以移去所有“黄”,然后从牌堆中随机获得任意张点数之和为36的牌(若牌堆没有点数和为36的组合则获得牌堆顶点数和刚好超过36的牌组)。',
|
||||
junk_guanyu:'旧谋关羽',
|
||||
junk_guanyu_prefix:'旧谋',
|
||||
|
||||
diy_tieba:'吧友设计',
|
||||
diy_xushi:'玩点论杀·虚实篇',
|
||||
|
|
|
@ -1875,7 +1875,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
twgongxin2:{
|
||||
mod:{
|
||||
cardEnabled2(card,player){
|
||||
if(player.getStorage('twgongxin2').includes(get.color(card))) return false;
|
||||
const color = get.color(card);
|
||||
if(color!='unsure' && player.getStorage('twgongxin2').includes(color)) return false;
|
||||
},
|
||||
},
|
||||
charlotte:true,
|
||||
|
@ -2266,10 +2267,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(lib.skill.xunshi.isXunshi(card)) return 'none';
|
||||
},
|
||||
targetInRange(card){
|
||||
if(get.color(card)=='none') return true;
|
||||
const suit = get.color(card);
|
||||
if (suit=='none' || suit=='unsure') return true;
|
||||
},
|
||||
cardUsable(card){
|
||||
if(get.color(card)=='none') return Infinity;
|
||||
const suit = get.color(card);
|
||||
if (suit=='none' || suit=='unsure') return Infinity;
|
||||
},
|
||||
},
|
||||
isXunshi(card){
|
||||
|
@ -2343,10 +2346,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(get.suit(card)=='heart') return false;
|
||||
},
|
||||
targetInRange(card){
|
||||
if(get.suit(card)=='heart') return true;
|
||||
if(card.name === 'sha'){
|
||||
const suit = get.suit(card);
|
||||
if (suit === 'heart' || suit === 'unsure') return true;
|
||||
}
|
||||
},
|
||||
cardUsable(card){
|
||||
if(card.name=='sha'&&get.suit(card)=='heart') return Infinity;
|
||||
if(card.name === 'sha'){
|
||||
const suit = get.suit(card);
|
||||
if (suit === 'heart' || suit === 'unsure') return Infinity;
|
||||
}
|
||||
}
|
||||
},
|
||||
audio:'wushen',
|
||||
|
@ -2511,16 +2520,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(event.responded||event.shouli||event.type=='wuxie') return false;
|
||||
if(game.hasPlayer(function(current){
|
||||
return current.getCards('e',card=>get.is.attackingMount(card)).length>0;
|
||||
})&&event.filterCard({
|
||||
})&&event.filterCard(get.autoViewAs({
|
||||
name:'sha',
|
||||
storage:{shouli:true},
|
||||
},player,event)) return true;
|
||||
},'unsure'),player,event)) return true;
|
||||
if(game.hasPlayer(function(current){
|
||||
return current.getCards('e',card=>get.is.defendingMount(card)).length>0;
|
||||
})&&event.filterCard({
|
||||
})&&event.filterCard(get.autoViewAs({
|
||||
name:'shan',
|
||||
storage:{shouli:true},
|
||||
},player,event)) return true;
|
||||
},'unsure'),player,event)) return true;
|
||||
return false;
|
||||
},
|
||||
delay:false,
|
||||
|
@ -5548,7 +5557,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
player.removeMark('baonu',2);
|
||||
player.addTempSkills('wushuang');
|
||||
player.popup('无双');
|
||||
game.log(player,'获得了技能','#g【无双】');
|
||||
// game.log(player,'获得了技能','#g【无双】');
|
||||
target.addTempSkill('ol_wuqian_targeted');
|
||||
},
|
||||
ai:{
|
||||
|
@ -6164,10 +6173,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(get.suit(card)=='heart') return false;
|
||||
},
|
||||
targetInRange(card){
|
||||
if(get.suit(card)=='heart') return true;
|
||||
if(card.name === 'sha'){
|
||||
const suit = get.suit(card);
|
||||
if (suit === 'heart' || suit === 'unsure') return true;
|
||||
}
|
||||
},
|
||||
cardUsable(card){
|
||||
if(card.name=='sha'&&get.suit(card)=='heart') return Infinity;
|
||||
if(card.name === 'sha'){
|
||||
const suit = get.suit(card);
|
||||
if (suit === 'heart' || suit === 'unsure') return Infinity;
|
||||
}
|
||||
}
|
||||
},
|
||||
audio:2,
|
||||
|
@ -6875,13 +6890,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
//获取卡牌花色
|
||||
var name=get.suit(card,player);
|
||||
//如果这张牌是梅花并且当前时机能够使用/打出闪 那么这张牌可以选择
|
||||
if(name=='club'&&filter({name:'shan',cards:[card]},player,event)) return true;
|
||||
if(name=='club'&&filter(get.autoViewAs({name:'shan'},'unsure'),player,event)) return true;
|
||||
//如果这张牌是方片并且当前时机能够使用/打出火杀 那么这张牌可以选择
|
||||
if(name=='diamond'&&filter({name:'sha',cards:[card],nature:'fire'},player,event)) return true;
|
||||
if(name=='diamond'&&filter(get.autoViewAs({name:'sha',nature:'fire'},'unsure'),player,event)) return true;
|
||||
//如果这张牌是黑桃并且当前时机能够使用/打出无懈 那么这张牌可以选择
|
||||
if(name=='spade'&&filter({name:'wuxie',cards:[card]},player,event)) return true;
|
||||
if(name=='spade'&&filter(get.autoViewAs({name:'wuxie'},'unsure'),player,event)) return true;
|
||||
//如果这张牌是红桃并且当前时机能够使用/打出桃 那么这张牌可以选择
|
||||
if(name=='heart'&&filter({name:'tao',cards:[card]},player,event)) return true;
|
||||
if(name=='heart'&&filter(get.autoViewAs({name:'tao'},'unsure'),player,event)) return true;
|
||||
//上述条件都不满足 那么就不能选择这张牌
|
||||
return false;
|
||||
},
|
||||
|
@ -6890,13 +6905,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
//获取当前时机的卡牌选择限制
|
||||
var filter=event.filterCard;
|
||||
//如果当前时机能够使用/打出火杀并且角色有方片 那么可以发动技能
|
||||
if(filter({name:'sha',nature:'fire'},player,event)&&player.countCards('hes',{suit:'diamond'})) return true;
|
||||
if(filter(get.autoViewAs({name:'sha',nature:'fire'},'unsure'),player,event)&&player.countCards('hes',{suit:'diamond'})) return true;
|
||||
//如果当前时机能够使用/打出闪并且角色有梅花 那么可以发动技能
|
||||
if(filter({name:'shan'},player,event)&&player.countCards('hes',{suit:'club'})) return true;
|
||||
if(filter(get.autoViewAs({name:'shan'},'unsure'),player,event)&&player.countCards('hes',{suit:'club'})) return true;
|
||||
//如果当前时机能够使用/打出桃并且角色有红桃 那么可以发动技能
|
||||
if(filter({name:'tao'},player,event)&&player.countCards('hes',{suit:'heart'})) return true;
|
||||
if(filter(get.autoViewAs({name:'tao'},'unsure'),player,event)&&player.countCards('hes',{suit:'heart'})) return true;
|
||||
//如果当前时机能够使用/打出无懈可击并且角色有黑桃 那么可以发动技能
|
||||
if(filter({name:'wuxie'},player,event)&&player.countCards('hes',{suit:'spade'})) return true;
|
||||
if(filter(get.autoViewAs({name:'wuxie'},'unsure'),player,event)&&player.countCards('hes',{suit:'spade'})) return true;
|
||||
return false;
|
||||
},
|
||||
ai:{
|
||||
|
@ -7029,10 +7044,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
filter(event,player){
|
||||
var filter=event.filterCard;
|
||||
if(filter({name:'sha',nature:'fire'},player,event)&&player.countCards('hs',{suit:'diamond'})) return true;
|
||||
if(filter({name:'shan'},player,event)&&player.countCards('hs',{suit:'club'})) return true;
|
||||
if(filter({name:'tao'},player,event)&&player.countCards('hs',{suit:'heart'})) return true;
|
||||
if(filter({name:'wuxie'},player,event)&&player.countCards('hs',{suit:'spade'})) return true;
|
||||
if(filter(get.autoViewAs({name:'sha',nature:'fire'},'unsure'),player,event)&&player.countCards('hs',{suit:'diamond'})) return true;
|
||||
if(filter(get.autoViewAs({name:'shan'},'unsure'),player,event)&&player.countCards('hs',{suit:'club'})) return true;
|
||||
if(filter(get.autoViewAs({name:'tao'},'unsure'),player,event)&&player.countCards('hs',{suit:'heart'})) return true;
|
||||
if(filter(get.autoViewAs({name:'wuxie'},'unsure'),player,event)&&player.countCards('hs',{suit:'spade'})) return true;
|
||||
return false;
|
||||
},
|
||||
precontent(){
|
||||
|
@ -7516,13 +7531,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
else event.finish();
|
||||
'step 2'
|
||||
player.addTempSkill(result.control,{player:'dieAfter'});
|
||||
player.popup(result.control,'thunder');
|
||||
player.addTempSkills(result.control,{player:'dieAfter'});
|
||||
// player.popup(result.control,'thunder');
|
||||
player.storage.drlt_duorui=[result.control];
|
||||
player.storage.drlt_duorui_player=trigger.player;
|
||||
trigger.player.storage.drlt_duorui=[result.control];
|
||||
trigger.player.addTempSkill('drlt_duorui1',{player:'phaseAfter'});
|
||||
game.log(player,'获得了技能','#g【'+get.translation(result.control)+'】')
|
||||
// game.log(player,'获得了技能','#g【'+get.translation(result.control)+'】')
|
||||
},
|
||||
group:['duorui_clear'],
|
||||
},
|
||||
|
|
|
@ -803,7 +803,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
player.storage.gwjingtian--;
|
||||
player.updateMark('gwjingtian',true);
|
||||
player.logSkill('gwjingtian');
|
||||
if(_status.imchoosing){
|
||||
if (_status.imchoosing) {
|
||||
delete _status.event._buttonChoice;
|
||||
delete _status.event._cardChoice;
|
||||
delete _status.event._targetChoice;
|
||||
game.check();
|
||||
|
|
|
@ -235,7 +235,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
enable:'chooseToUse',
|
||||
filter:function(event,player){
|
||||
for(const name of ['wuxie','huogong']){
|
||||
if(event.filterCard({name},player,event)) return true;
|
||||
if(event.filterCard(get.autoViewAs({name},'unsure'),player,event)) return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
@ -246,7 +246,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
viewAs:function(cards,player){
|
||||
const event=get.event(),filter=event._backup.filterCard;
|
||||
for(const name of ['wuxie','huogong']){
|
||||
if(filter({name},player,event)) return {name};
|
||||
if(filter(get.autoViewAs({name},'unsure'),player,event)) return {name};
|
||||
}
|
||||
return null;
|
||||
},
|
||||
|
@ -508,13 +508,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
onremove:true,
|
||||
mod:{
|
||||
cardEnabled:function(card,player){
|
||||
if(player.getStorage('jsrgfumou_forbid').includes(get.color(card))) return false;
|
||||
const color = get.color(card);
|
||||
if (color != 'unsure' && player.getStorage('jsrgfumou_forbid').includes(color)) return false;
|
||||
},
|
||||
cardRespondable:function(card,player){
|
||||
if(player.getStorage('jsrgfumou_forbid').includes(get.color(card))) return false;
|
||||
const color = get.color(card);
|
||||
if (color != 'unsure' && player.getStorage('jsrgfumou_forbid').includes(color)) return false;
|
||||
},
|
||||
cardSavable:function(card,player){
|
||||
if(player.getStorage('jsrgfumou_forbid').includes(get.color(card))) return false;
|
||||
const color = get.color(card);
|
||||
if (color != 'unsure' && player.getStorage('jsrgfumou_forbid').includes(color)) return false;
|
||||
},
|
||||
},
|
||||
mark:true,
|
||||
|
@ -810,14 +813,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
})) return false;
|
||||
return get.inpileVCardList(info=>{
|
||||
if(info[0]!='basic') return false;
|
||||
return event.filterCard({name:info[2],nature:info[3]},player,event);
|
||||
return event.filterCard(get.autoViewAs({name:info[2],nature:info[3]},'unsure'),player,event);
|
||||
}).length;
|
||||
},
|
||||
chooseButton:{
|
||||
dialog(event,player){
|
||||
const vcards=get.inpileVCardList(info=>{
|
||||
if(info[0]!='basic') return false;
|
||||
return event.filterCard({name:info[2],nature:info[3]},player,event);
|
||||
return event.filterCard(get.autoViewAs({name:info[2],nature:info[3]},'unsure'),player,event);
|
||||
});
|
||||
return ui.create.dialog('镇胆',[vcards,'vcard']);
|
||||
},
|
||||
|
@ -952,7 +955,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(curLen<=2) return false;
|
||||
for(let i=curLen-2;i>=0;i--){
|
||||
const history=player.actionHistory[i];
|
||||
if(history.isMe&&!history.isSkipped) return false;
|
||||
if(history.isMe&&!history.isSkipped&&!history._jsrgtuigu) return false;
|
||||
if(history.isRound) break;
|
||||
}
|
||||
return true;
|
||||
|
@ -960,12 +963,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
forced:true,
|
||||
locked:false,
|
||||
async content(event,trigger,player){
|
||||
const evt=trigger;
|
||||
player.insertPhase();
|
||||
const evt=trigger,evtx=player.insertPhase();
|
||||
player.when('phaseBeforeStart')
|
||||
.filter(evtt=>evtt==evtx)
|
||||
.then(()=>{
|
||||
game.players.slice().concat(game.dead).forEach(current=>{
|
||||
current.getHistory()._jsrgtuigu=true;
|
||||
current.getStat()._jsrgtuigu=true;
|
||||
});
|
||||
});
|
||||
if(evt.player!=player&&!evt._finished){
|
||||
evt.finish();
|
||||
evt._triggered=5;
|
||||
evt.player.insertPhase();
|
||||
const evtxx=evt.player.insertPhase();
|
||||
delete evtxx.skill;
|
||||
}
|
||||
},
|
||||
},
|
||||
|
@ -1236,6 +1247,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
},
|
||||
charlotte:true,
|
||||
onremove:true,
|
||||
mod:{
|
||||
maxHandcard(player,num){
|
||||
return num-player.countMark('jsrgzhaotu_handcard');
|
||||
|
@ -1247,8 +1259,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
order:5,
|
||||
result:{
|
||||
target(player,target){
|
||||
if(player.hasSkill('jsrgjingju')||player.hasZhuSkill('jsrgweizhui')) return get.attitude(player,target);
|
||||
return -1;
|
||||
let dis=0.5-0.75*target.needsToDiscard(2,null,true);
|
||||
if(dis>0) return dis;
|
||||
if(player.hasSkill('jsrgjingju')&&player.hasZhuSkill('jsrgweizhui')&&get.attitude(player,target)>0) return game.countPlayer(current=>{
|
||||
if(current===player||current===target||current.group!=='wei') return false;
|
||||
return player.hasZhuSkill('jsrgweizhui',current)&&get.attitude(player,current)>0;
|
||||
});
|
||||
return dis;
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -1263,20 +1280,24 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
})) return false;
|
||||
return get.inpileVCardList(info=>{
|
||||
if(info[0]!='basic') return false;
|
||||
return event.filterCard({name:info[2],nature:info[3]},player,event);
|
||||
return event.filterCard(get.autoViewAs({name:info[2],nature:info[3]},'unsure'),player,event);
|
||||
}).length;
|
||||
},
|
||||
chooseButton:{
|
||||
dialog:function(event,player){
|
||||
const vcards=get.inpileVCardList(info=>{
|
||||
if(info[0]!='basic') return false;
|
||||
return event.filterCard({name:info[2],nature:info[3]},player,event);
|
||||
return event.filterCard(get.autoViewAs({name:info[2],nature:info[3]},'unsure'),player,event);
|
||||
});
|
||||
return ui.create.dialog('惊惧',[vcards,'vcard'],'hidden');
|
||||
},
|
||||
check:function(button){
|
||||
let player=_status.event.player;
|
||||
if(get.event().getParent().type!='phase') return 1;
|
||||
return get.player().getUseValue({name:button.link[2],nature:button.link[3]});
|
||||
return get.player().getUseValue({name:button.link[2],nature:button.link[3]})+game.countPlayer(current=>{
|
||||
if(current===player||current.group!=='wei') return false;
|
||||
return player.hasZhuSkill('jsrgweizhui',current)&&get.attitude(player,current)>0;
|
||||
});
|
||||
},
|
||||
backup:function(links,player){
|
||||
return {
|
||||
|
@ -1365,7 +1386,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
return player.canUse(get.autoViewAs({name:'guohe'},[card]),get.event('target'));
|
||||
}).set('target',player).set('ai',card=>{
|
||||
if(get.effect(get.event('target'),get.autoViewAs({name:'guohe'},[card]),player)<=0) return 0;
|
||||
return 6-get.value(card);
|
||||
return 7-get.value(card);
|
||||
});
|
||||
if(bool){
|
||||
trigger.player.logSkill('jsrgweizhui',player);
|
||||
|
@ -3811,16 +3832,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
return game.hasPlayer(i=>i!=player);
|
||||
},
|
||||
content:function*(event,map){
|
||||
var player=map.player,trigger=map.trigger;
|
||||
var targets=game.filterPlayer(i=>i!=player);
|
||||
var player=map.player,trigger=map.trigger, targets=game.filterPlayer(i=>i!=player);
|
||||
var shas=player.mayHaveSha(target,'use',null,'count')-player.getCardUsable('sha',true);
|
||||
for(var target of targets){
|
||||
var att=get.attitude(target,player);
|
||||
var result=yield target.chooseCard('he',`负山:是否交给${get.translation(player)}一张牌?`,`若如此做,其此阶段使用【杀】的次数上限+1`).set('att',att).set('ai',card=>{
|
||||
if(!get.event('goon')) return -get.value(card);
|
||||
var isSha=get.name(card,get.event('target'))=='sha';
|
||||
if(get.event('att')<0) return (isSha?0:5)-get.value(card);
|
||||
return (isSha?10:5.5)-get.value(card);
|
||||
}).set('goon',att>0&&player.countCards('sha')>player.getCardUsable('sha',true)||att<0&&!player.hasSkill('jsrgfushan_sha')).set('target',player);
|
||||
return (isSha?10:0)-get.value(card);
|
||||
}).set('goon',att>0&&shas>=0||att<0&&target.hp>player.getCardUsable('sha',true)&&shas<-1/Math.max(1,player.hp)).set('target',player);
|
||||
if(result.bool){
|
||||
target.give(result.cards,player);
|
||||
target.line(player);
|
||||
|
@ -4741,11 +4762,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
for(var name of lib.inpile){
|
||||
if(get.type2(name)!='basic') continue;
|
||||
var card={name:name};
|
||||
if(event.filterCard(card,player,event)) return true;
|
||||
if(event.filterCard(get.autoViewAs(card,'unsure'),player,event)) return true;
|
||||
if(name=='sha'){
|
||||
for(var nature of lib.inpile_nature){
|
||||
card.nature=nature;
|
||||
if(event.filterCard(card,player,event)) return true;
|
||||
if(event.filterCard(get.autoViewAs(card,'unsure'),player,event)) return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4757,19 +4778,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var list=[];
|
||||
for(var name of lib.inpile){
|
||||
if(name=='sha'){
|
||||
if(event.filterCard({name:name},player,event)) list.push(['基本','','sha']);
|
||||
if(event.filterCard(get.autoViewAs({name},'unsure'),player,event)) list.push(['基本','','sha']);
|
||||
for(var nature of lib.inpile_nature){
|
||||
if(event.filterCard({name:name,nature:nature},player,event)) list.push(['基本','','sha',nature]);
|
||||
if(event.filterCard(get.autoViewAs({name,nature},'unsure'),player,event)) list.push(['基本','','sha',nature]);
|
||||
}
|
||||
}
|
||||
else if(get.type(name)=='basic'&&event.filterCard({name:name},player,event)) list.push(['基本','',name]);
|
||||
else if(get.type(name)=='basic'&&event.filterCard(get.autoViewAs({name},'unsure'),player,event)) list.push(['基本','',name]);
|
||||
}
|
||||
var dialog=ui.create.dialog('念恩',[list,'vcard']);
|
||||
dialog.direct=true;
|
||||
return dialog;
|
||||
},
|
||||
filter:function(button,player){
|
||||
return _status.event.getParent().filterCard({name:button.link[2],nature:button.link[3]},player,_status.event.getParent());
|
||||
return _status.event.getParent().filterCard(get.autoViewAs({name:button.link[2],nature:button.link[3]},'unsure'),player,_status.event.getParent());
|
||||
},
|
||||
check:function(button){
|
||||
if(_status.event.getParent().type!='phase') return 1;
|
||||
|
@ -5017,7 +5038,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
for(var name of lib.inpile){
|
||||
if(get.type(name)!='basic') continue;
|
||||
if(player.getStorage('jsrgjixiang_used').includes(name)) continue;
|
||||
var card={name:name};
|
||||
var card={name:name,isCard:true};
|
||||
if(event.filterCard(card,event.player,event)) return true;
|
||||
if(name=='sha'){
|
||||
for(var nature of lib.inpile_nature){
|
||||
|
@ -7454,6 +7475,42 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
jsrgtushe:{
|
||||
audio:'xinfu_tushe',
|
||||
mod: {
|
||||
aiOrder(player, card, num) {
|
||||
if (get.tag(card, 'multitarget')) {
|
||||
if (player.countCards('h', { type: 'basic' })) return num / 10;
|
||||
return num * 10;
|
||||
}
|
||||
if (get.type(card) === 'basic') return num + 10;
|
||||
},
|
||||
aiValue(player, card, num) {
|
||||
if (card.name === 'zhangba') {
|
||||
let fact = (n) => {
|
||||
if (n > 1) return n * fact(n - 1);
|
||||
return 1;
|
||||
}, basic = 0;
|
||||
return fact(Math.min(player.countCards('hs', i => {
|
||||
if (get.tag(i, 'multitarget')) return 2;
|
||||
if (!['shan', 'tao', 'jiu'].includes(card.name)) return 1;
|
||||
basic++;
|
||||
}) / (1 + basic), player.getCardUsable('sha')));
|
||||
}
|
||||
if (['shan', 'tao', 'jiu'].includes(card.name)) {
|
||||
if (player.getEquip('zhangba') && player.countCards('hs') > 1) return 0.01;
|
||||
return num / 2;
|
||||
}
|
||||
if (get.tag(card, 'multitarget')) return num + game.players.length;
|
||||
},
|
||||
aiUseful(player, card, num) {
|
||||
if (get.name(card, player) === 'shan') {
|
||||
if (player.countCards('hs', i => {
|
||||
if (card === i || card.cards && card.cards.includes(i)) return false;
|
||||
return get.name(i, player) === 'shan';
|
||||
})) return -1;
|
||||
return num / Math.pow(Math.max(1, player.hp), 2);
|
||||
}
|
||||
}
|
||||
},
|
||||
trigger:{
|
||||
player:'useCardToPlayered',
|
||||
},
|
||||
|
@ -7465,6 +7522,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
check:function(event,player){
|
||||
return !player.countCards('h',{type:'basic'});
|
||||
},
|
||||
locked: false,
|
||||
content:function (){
|
||||
'step 0'
|
||||
player.showHandcards();
|
||||
|
@ -7480,7 +7538,22 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
presha:true,
|
||||
pretao:true,
|
||||
threaten:1.8,
|
||||
},
|
||||
effect: {
|
||||
player(card, player, target) {
|
||||
if (typeof card === 'object' && card.name !== 'shan' && get.type(card) !== 'equip' && !player.countCards('h', i => {
|
||||
if (card === i || card.cards && card.cards.includes(i)) return false;
|
||||
return get.type(i) === 'basic';
|
||||
})) {
|
||||
let targets = [], evt = _status.event.getParent('useCard');
|
||||
targets.addArray(ui.selected.targets);
|
||||
if (evt && evt.card == card) targets.addArray(evt.targets);
|
||||
if (targets.length) return [1, targets.length];
|
||||
if (get.tag(card, 'multitarget')) return [1, game.players.length - 1];
|
||||
return [1, 1];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
jsrgtongjue:{
|
||||
audio:2,
|
||||
|
@ -8233,7 +8306,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
jsrgyingshi:'鹰眎',
|
||||
jsrgyingshi_info:'当你翻面时,你可以观看牌堆底的三张牌(若死亡角色数大于2则改为五张),然后将其中任意数量的牌以任意顺序置于牌堆顶,其余以任意顺序置于牌堆底。',
|
||||
jsrgtuigu:'蜕骨',
|
||||
jsrgtuigu_info:'①回合开始时,你可以翻面并令你本回合的手牌上限+X,然后摸X张牌并视为使用一张【解甲归田】(X为存活角色数的一半,向下取整),目标角色不能使用以此法得到的牌直到其回合结束。②一轮游戏开始时,若你上一轮未执行过回合,你获得一个额外的回合。③当你失去装备牌里的牌后,你回复1点体力。',
|
||||
jsrgtuigu_info:'①回合开始时,你可以翻面并令你本回合的手牌上限+X,然后摸X张牌并视为使用一张【解甲归田】(X为存活角色数的一半,向下取整),目标角色不能使用以此法得到的牌直到其回合结束。②一轮游戏开始时,若你上一轮未执行过回合(因〖蜕骨②〗执行的回合除外),你获得一个额外的回合。③当你失去装备牌里的牌后,你回复1点体力。',
|
||||
jsrg_guoxun:'合郭循',
|
||||
jsrg_guoxun_prefix:'合',
|
||||
jsrgeqian:'遏前',
|
||||
|
|
|
@ -543,7 +543,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
'令其摸一张牌',
|
||||
][['豹','鹰','熊','兔'].indexOf(zhoufa)]:'令其随机执行一个效果';
|
||||
const {result:{bool,targets}}=await player.chooseTarget(get.prompt('shoufa'),'选择一名距离'+(event.triggername=='damageEnd'?'':'不')+'大于2的角色,'+str,(card,player,target)=>{
|
||||
const name=_status.event.name;
|
||||
const name=_status.event.triggername;
|
||||
if(name=='damageEnd'&&get.distance(player,target)<=2) return false;
|
||||
if(name=='damageSource'&&get.distance(player,target)>2) return false;
|
||||
const zhoufa=player.storage.zhoulin_zhoufa;
|
||||
|
@ -570,7 +570,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
case '兔':
|
||||
return get.effect(target,{name:'draw'},player,player);
|
||||
}
|
||||
}).set('name',event.triggername);
|
||||
}).set('triggername',event.triggername);
|
||||
if(!bool) return;
|
||||
const target=targets[0];
|
||||
player.logSkill('shoufa',target);
|
||||
|
@ -687,7 +687,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
targets=targets.filter(target=>target!=player&&target.countCards('h'));
|
||||
if(targets.length){
|
||||
var result=yield player.chooseTarget('请选择【诡谋】的目标','观看一名可选择的角色的手牌并选择其中至多三张牌,然后你可以将其中至多两张牌交给另一名其他角色,然后弃置剩余的牌',(card,player,target)=>{
|
||||
var result=yield player.chooseTarget('请选择【诡谋】的目标','观看一名可选择的角色的手牌并选择其中一张牌,然后你可以此牌交给另一名其他角色或弃置此牌',(card,player,target)=>{
|
||||
return _status.event.targets.includes(target)&&target.countCards('h');
|
||||
},true).set('ai',target=>{
|
||||
return Math.sqrt(Math.min(3,target.countCards('h')))*get.effect(target,{name:'guohe_copy2'},player,player);
|
||||
|
@ -696,28 +696,21 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var target=result.targets[0];
|
||||
player.logSkill('guimou',target);
|
||||
player.addExpose(0.3);
|
||||
var result2=yield player.choosePlayerCard(target,'h','visible','<div class="text center">选择其中至多三张牌,然后你可以将其中至多两张牌交给另一名其他角色,然后弃置剩余的牌</div>',[1,3],true).set('ai',button=>get.value(button.link));
|
||||
var result2=yield player.choosePlayerCard(target,'h','visible',true).set('ai',button=>{
|
||||
return get.value(button.link);
|
||||
}).set('prompt','诡谋:请选择'+get.translation(target)+'的一张手牌').set('prompt2','<div class="text center">将选择的牌交给另一名其他角色或弃置此牌</div>');
|
||||
if(result2.bool){
|
||||
var cards=result2.links.slice();
|
||||
var result3;
|
||||
var cards=result2.links.slice(),result3;
|
||||
if(!game.hasPlayer(targetx=>targetx!=player&&targetx!=target)) result3={bool:false};
|
||||
else result3=yield player.chooseCardButton('是否将其中至多两张牌交给另一名其他角色',cards,[1,Math.min(2,cards.length)]).set('ai',button=>{
|
||||
var player=_status.event.player;
|
||||
if(!game.hasPlayer(target=>target!=player&&target!=_status.event.target&&get.attitude(player,target)>0)) return 0;
|
||||
return get.value(button.link,_status.event.player);
|
||||
}).set('target',target);
|
||||
else result3=yield player.chooseTarget('是否令另一名其他角色获得'+get.translation(cards)+'?',(card,player,target)=>{
|
||||
return target!=player&&target!=_status.event.target;
|
||||
}).set('ai',target=>get.attitude(_status.event.player,target)).set('target',target);
|
||||
if(result3.bool){
|
||||
var result4=yield player.chooseTarget('请选择获得'+get.translation(result3.links)+'的目标',(card,player,target)=>{
|
||||
return target!=player&&target!=_status.event.target;
|
||||
}).set('ai',target=>get.attitude(_status.event.player,target)).set('target',target);
|
||||
if(result4.bool){
|
||||
var targetx=result4.targets[0];
|
||||
player.line(targetx);
|
||||
targetx.gain(result3.links,target,'give');
|
||||
cards.removeArray(result3.links);
|
||||
}
|
||||
var targetx=result3.targets[0];
|
||||
player.line(targetx);
|
||||
targetx.gain(cards,target,'give');
|
||||
}
|
||||
if(cards.length) target.discard(cards).discarder=player;
|
||||
else target.discard(cards).discarder=player;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -870,7 +863,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
logTarget:'player',
|
||||
content:function*(event,map){
|
||||
var player=map.player,trigger=map.trigger,target=trigger.player;
|
||||
var cards=get.cards(2);
|
||||
var cards=get.cards(3);
|
||||
yield game.cardsDiscard(cards);
|
||||
player.showCards(cards,get.translation(player)+'发动了【州贤】');
|
||||
var result=yield target.chooseToDiscard('he','州贤:弃置一张其中有的类别的牌,或令此牌对'+get.translation(player)+'无效',(card,player)=>{
|
||||
return _status.event.cards.some(cardx=>get.type2(cardx)==get.type2(card));
|
||||
|
@ -890,7 +884,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
bs.remove(card);
|
||||
if(card.cards) bs.removeArray(card.cards);
|
||||
else bs.removeArray(ui.selected.cards);
|
||||
var cardx=Array.from(ui.cardPile.childNodes).slice(0,2);
|
||||
var cardx=Array.from(ui.cardPile.childNodes).slice(0,3);
|
||||
bs=bs.filter(i=>cardx.some(j=>get.type2(j)==get.type2(i)));
|
||||
if(!bs.length) return 'zerotarget';
|
||||
if(bs.length<=2){
|
||||
|
@ -956,15 +950,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
mbyilie3:{
|
||||
audio:'mbyilie',
|
||||
trigger:{player:'phaseEnd'},
|
||||
filter:function(event,player){
|
||||
return player.countMark('mbyilie');
|
||||
},
|
||||
//filter:function(event,player){
|
||||
// return player.countMark('mbyilie');
|
||||
//},
|
||||
forced:true,
|
||||
content:function(){
|
||||
'step 0'
|
||||
player.draw();
|
||||
'step 1'
|
||||
var num=player.countMark('mbyilie');
|
||||
player.draw(num);
|
||||
player.loseHp(num);
|
||||
player.removeMark('mbyilie',num);
|
||||
if(num){
|
||||
player.loseHp(num);
|
||||
player.removeMark('mbyilie',num);
|
||||
}
|
||||
},
|
||||
},
|
||||
//向朗
|
||||
|
@ -1170,7 +1168,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var target=trigger.player;
|
||||
var card=result.cards[0];
|
||||
player.line(target,'green');
|
||||
target.addTempSkill('mbzhixi','phaseUseAfter');
|
||||
target.addTempSkills('mbzhixi','phaseUseAfter');
|
||||
if(card.name!='sha'&&get.type(card)!='trick'&&get.color(card)!='black'){
|
||||
target.addTempSkill('new_meibu_range','phaseUseAfter');
|
||||
target.markAuto('new_meibu_range',player);
|
||||
|
@ -3110,7 +3108,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
cardEnabled:function(card,player){
|
||||
if(!player.storage.scschihe_blocker) return;
|
||||
var suit=get.suit(card);
|
||||
if(suit=='none') return;
|
||||
if(suit=='none'||suit=='unsure') return;
|
||||
var evt=_status.event;
|
||||
if(evt.name!='chooseToUse') evt=evt.getParent('chooseToUse');
|
||||
if(!evt||!evt.respondTo||evt.respondTo[1].name!='sha') return;
|
||||
|
@ -3224,10 +3222,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
filter:function(event,player){
|
||||
var filter=event.filterCard;
|
||||
if(filter({name:'sha',nature:'fire'},player,event)&&player.countCards('hes',{suit:'diamond'})) return true;
|
||||
if(filter({name:'shan'},player,event)&&player.countCards('hes',{suit:'club'})) return true;
|
||||
if(filter({name:'tao'},player,event)&&player.countCards('hes',{suit:'heart'})) return true;
|
||||
if(filter({name:'wuxie'},player,event)&&player.countCards('hes',{suit:'spade'})) return true;
|
||||
if(filter(get.autoViewAs({name:'sha',nature:'fire'},'unsure'),player,event)&&player.countCards('hes',{suit:'diamond'})) return true;
|
||||
if(filter(get.autoViewAs({name:'shan'},'unsure'),player,event)&&player.countCards('hes',{suit:'club'})) return true;
|
||||
if(filter(get.autoViewAs({name:'tao'},'unsure'),player,event)&&player.countCards('hes',{suit:'heart'})) return true;
|
||||
if(filter(get.autoViewAs({name:'wuxie'},'unsure'),player,event)&&player.countCards('hes',{suit:'spade'})) return true;
|
||||
return false;
|
||||
},
|
||||
precontent:function(){
|
||||
|
@ -3401,10 +3399,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
filter:function(event,player){
|
||||
var filter=event.filterCard;
|
||||
if(filter({name:'sha',nature:'fire'},player,event)&&player.countCards('hes',{suit:'diamond'})) return true;
|
||||
if(filter({name:'shan'},player,event)&&player.countCards('hes',{suit:'club'})) return true;
|
||||
if(filter({name:'tao'},player,event)&&player.countCards('hes',{suit:'heart'})) return true;
|
||||
if(filter({name:'wuxie'},player,event)&&player.countCards('hes',{suit:'spade'})) return true;
|
||||
if(filter(get.autoViewAs({name:'sha',nature:'fire'},'unsure'),player,event)&&player.countCards('hes',{suit:'diamond'})) return true;
|
||||
if(filter(get.autoViewAs({name:'shan'},'unsure'),player,event)&&player.countCards('hes',{suit:'club'})) return true;
|
||||
if(filter(get.autoViewAs({name:'tao'},'unsure'),player,event)&&player.countCards('hes',{suit:'heart'})) return true;
|
||||
if(filter(get.autoViewAs({name:'wuxie'},'unsure'),player,event)&&player.countCards('hes',{suit:'spade'})) return true;
|
||||
return false;
|
||||
},
|
||||
precontent:function(){
|
||||
|
@ -4529,13 +4527,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
forceDie:true,
|
||||
filter:function(event,player){
|
||||
if(event.name=='die') return true;
|
||||
if(!lib.skill.yijin.getKane(event.player).length) return false;
|
||||
if(event.player.additionalSkills['yijin_'+player.playerid]){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return lib.skill.yijin.getKane(event.player).length&&event.player.additionalSkills['yijin_'+player.playerid];
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
if(trigger.name=='die'){
|
||||
game.countPlayer(current=>{
|
||||
var skills=current.additionalSkills['yijin_'+player.playerid];
|
||||
|
@ -4546,16 +4541,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
}
|
||||
});
|
||||
event.finish();
|
||||
return;
|
||||
}
|
||||
else {
|
||||
var skills=trigger.player.additionalSkills['yijin_'+player.playerid];
|
||||
trigger.player.removeAdditionalSkill('yijin_'+player.playerid);
|
||||
for(var i of skills){
|
||||
trigger.player.removeMark(i,1);
|
||||
trigger.player.removeSkill(i);
|
||||
}
|
||||
const skills=trigger.player.additionalSkills['yijin_'+player.playerid];
|
||||
for(const mark of skills) trigger.player.removeMark(mark,1);
|
||||
}
|
||||
}
|
||||
'step 1'
|
||||
trigger.player.removeAdditionalSkill('yijin_'+player.playerid);
|
||||
},
|
||||
},
|
||||
wushi:{
|
||||
charlotte:true,
|
||||
|
@ -5630,7 +5625,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var evt=lib.skill.dcjianying.getLastUsed(player);
|
||||
if(!evt||!evt.card) return;
|
||||
var num1=get.number(card),num2=get.number(evt.card);
|
||||
if(typeof num1=='number'&&typeof num2=='number'&&num1%num2==0) return Infinity;
|
||||
if(num1==='unsure'||typeof num1=='number'&&typeof num2=='number'&&num1%num2==0) return Infinity;
|
||||
}
|
||||
},
|
||||
aiOrder:function(player,card,num){
|
||||
|
@ -5638,7 +5633,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var evt=lib.skill.dcjianying.getLastUsed(player);
|
||||
if(!evt||!evt.card) return;
|
||||
var num1=get.number(card),num2=num2=get.number(evt.card);
|
||||
if(typeof num1=='number'&&typeof num2=='number'&&num2%num1==0) return num+5;
|
||||
if(num1==='unsure'||typeof num1=='number'&&typeof num2=='number'&&num2%num1==0) return num+5;
|
||||
}
|
||||
},
|
||||
},
|
||||
|
@ -5738,7 +5733,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var num=0;
|
||||
for(var i of cards) num+=get.number(i,player);
|
||||
num=num%13;
|
||||
if(num==0) num=13;
|
||||
if(num==0) num=13;
|
||||
var card=get.cardPile2(function(card){
|
||||
return get.number(card,false)==num;
|
||||
});
|
||||
|
@ -6639,19 +6634,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
audio:2,
|
||||
enable:['chooseToUse','chooseToRespond'],
|
||||
filter:function(event,player){
|
||||
return player.getExpansions('jibing').length>0&&(event.filterCard({name:'sha'},player,event)||event.filterCard({name:'shan'},player,event));
|
||||
return player.getExpansions('jibing').length>0&&(event.filterCard(get.autoViewAs({name:'sha'},'unsure'),player,event)||event.filterCard(get.autoViewAs({name:'shan'},'unsure'),player,event));
|
||||
},
|
||||
chooseButton:{
|
||||
dialog:function(event,player){
|
||||
var dialog=ui.create.dialog('集兵','hidden');
|
||||
if(event.filterCard({name:'sha'},player,event)&&event.filterCard({name:'shan'},player,event)){
|
||||
if(event.filterCard(get.autoViewAs({name:'sha'},'unsure'),player,event)&&event.filterCard(get.autoViewAs({name:'shan'},'unsure'),player,event)){
|
||||
dialog._chooseButton=2;
|
||||
var list=['sha','shan'];
|
||||
dialog.add([list.map(i=>{
|
||||
return [i,get.translation(i)];
|
||||
}),'tdnodes']);
|
||||
}
|
||||
else dialog._cardName=event.filterCard({name:'sha'},player,event)?'sha':'shan';
|
||||
else dialog._cardName=event.filterCard(get.autoViewAs({name:'sha'},'unsure'),player,event)?'sha':'shan';
|
||||
dialog.add(player.getExpansions('jibing'));
|
||||
return dialog;
|
||||
},
|
||||
|
@ -13284,7 +13279,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},'hs')) return false;
|
||||
for(var name of lib.inpile){
|
||||
if(get.type(name)!='basic') continue;
|
||||
if(event.filterCard({name:name},player,event)) return true;
|
||||
if(event.filterCard(get.autoViewAs({name},'unsure'),player,event)) return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
@ -13293,7 +13288,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var list=[];
|
||||
for(var name of lib.inpile){
|
||||
if(get.type(name)!='basic') continue;
|
||||
if(event.filterCard({name:name},player,event)) list.push(['基本','',name]);
|
||||
if(event.filterCard(get.autoViewAs({name},'unsure'),player,event)) list.push(['基本','',name]);
|
||||
if(name!='sha') continue;
|
||||
for(var j of lib.inpile_nature){
|
||||
if(event.filterCard({name:name,nature:j},player,event)) list.push(['基本','','sha',j]);
|
||||
|
@ -13906,7 +13901,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
return false;
|
||||
}
|
||||
})) return -att;
|
||||
})) return -att;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -13962,7 +13957,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
'step 4'
|
||||
if(result.bool&&result.links.length){
|
||||
var link=result.links[0];
|
||||
if(get.position(link)=='e') event.targets[1].equip(link);
|
||||
if(get.position(link)=='e') event.targets[1].equip(link);
|
||||
else if(link.viewAs) event.targets[1].addJudge({name:link.viewAs},[link]);
|
||||
else event.targets[1].addJudge(link);
|
||||
event.targets[0].$give(link,event.targets[1],false)
|
||||
|
@ -14298,34 +14293,34 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
filter:function(event,player){
|
||||
if(!player.storage.yizan&&player.countCards('hes')<2) return false;
|
||||
if(!player.hasCard(function(card){
|
||||
return get.type(card)=='basic';
|
||||
},'hs')) return false;
|
||||
for(var name of lib.inpile){
|
||||
if(get.type(name)!='basic') continue;
|
||||
if(event.filterCard({name:name},player,event)) return true;
|
||||
if(name=='sha'){
|
||||
for(var nature of lib.inpile_nature){
|
||||
if(event.filterCard({name:'sha',nature:nature},player,event)) return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!player.hasCard(function(card){
|
||||
return get.type(card)=='basic';
|
||||
},'hs')) return false;
|
||||
for(var name of lib.inpile){
|
||||
if(get.type(name)!='basic') continue;
|
||||
if(event.filterCard(get.autoViewAs({name},'unsure'),player,event)) return true;
|
||||
if(name=='sha'){
|
||||
for(var nature of lib.inpile_nature){
|
||||
if(event.filterCard(get.autoViewAs({name,nature},'unsure'),player,event)) return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
},
|
||||
chooseButton:{
|
||||
dialog:function(event,player){
|
||||
var list=[];
|
||||
for(var name of lib.inpile){
|
||||
if(get.type(name)!='basic') continue;
|
||||
if(event.filterCard({name:name},player,event)){
|
||||
list.push(['基本','',name]);
|
||||
}
|
||||
if(name=='sha'){
|
||||
for(var nature of lib.inpile_nature){
|
||||
if(event.filterCard({name:name,nature:nature},player,event)) list.push(['基本','','sha',nature]);
|
||||
}
|
||||
}
|
||||
}
|
||||
for(var name of lib.inpile){
|
||||
if(get.type(name)!='basic') continue;
|
||||
if(event.filterCard(get.autoViewAs({name},'unsure'),player,event)){
|
||||
list.push(['基本','',name]);
|
||||
}
|
||||
if(name=='sha'){
|
||||
for(var nature of lib.inpile_nature){
|
||||
if(event.filterCard(get.autoViewAs({name,nature},'unsure'),player,event)) list.push(['基本','','sha',nature]);
|
||||
}
|
||||
}
|
||||
}
|
||||
return ui.create.dialog('翊赞',[list,'vcard'],'hidden');
|
||||
},
|
||||
check:function(button){
|
||||
|
@ -15669,7 +15664,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
sunru:['dc_sunru','sunru'],
|
||||
liuye:['dc_liuye','liuye'],
|
||||
zhaotongzhaoguang:['dc_zhaotongzhaoguang','zhaotongzhaoguang'],
|
||||
yangbiao:['yangbiao','dc_yangbiao','jsrg_yangbiao'],
|
||||
yangbiao:['yangbiao','dc_yangbiao','jsrg_yangbiao'],
|
||||
qiaozhou:['yj_qiaozhou','qiaozhou'],
|
||||
sunhanhua:['dc_sunhanhua','sunhanhua'],
|
||||
zhoubuyi:['zhoubuyi','yj_zhoubuyi'],
|
||||
|
@ -16034,7 +16029,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
requanfeng_info:'限定技。①其他角色死亡时,你可失去〖弘仪〗,然后获得其武将牌上的所有非主公技,非隐匿技和非Charlotte技,加1点体力上限并回复1点体力。②当你处于濒死状态时,你可以加2点体力上限,然后回复4点体力。',
|
||||
quanfeng:'劝封',
|
||||
quanfeng_info:'锁定技,限定技,一名角色死亡时,你选择获得其的一个技能(主公技,限定技,觉醒技,隐匿技,使命技,带有Charlotte标签的技能除外),然后加1点体力上限并回复1点体力。',
|
||||
simashi:'司马师',
|
||||
simashi:'手杀司马师',
|
||||
simashi_prefix:'手杀',
|
||||
baiyi:'败移',
|
||||
baiyi_info:'限定技,出牌阶段,若你已受伤,你可以交换两名其他角色的座次。',
|
||||
jinglve:'景略',
|
||||
|
@ -16470,7 +16466,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
mutao_info:'出牌阶段限一次。你可以选择一名角色,令其将手牌中所有的【杀】置于武将牌上,然后将这些牌依次随机交给其下家开始的每一名角色。然后其对最后一名以此法获得【杀】的角色A造成X点伤害(X为A手牌中【杀】的数量且至多为2)。',
|
||||
yimou:'毅谋',
|
||||
yimou_info:'当一名角色受到伤害后,若其存活且你至其的距离不大于1,你可以选择一项:1.令其从牌堆中获得一张【杀】;2.令其将一张手牌交给另一名角色,然后摸一张牌。',
|
||||
jiangji:'蒋济',
|
||||
jiangji:'手杀蒋济',
|
||||
jiangji_prefix:'手杀',
|
||||
jilun:'机论',
|
||||
jilun_info:'①当你受到伤害后,若你拥有技能〖急筹〗,则你可以一项:1.摸两张牌。2.获得1枚“机论”标记。②一名角色的结束阶段,若你拥有“机论”,则重复选择执行以下项直到你没有“机论”标记:1.失去1枚“机论”标记,视为使用一张〖急筹①〗记录过且未被〖机论②〗记录过的普通锦囊牌并记录此牌牌名。2.失去所有“机论”标记。',
|
||||
liwei:'李遗',
|
||||
|
@ -16507,15 +16504,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
mb_chengui:'手杀陈珪',
|
||||
mb_chengui_prefix:'手杀',
|
||||
guimou:'诡谋',
|
||||
guimou_info:'锁定技。游戏开始时/回合结束时,你随机/须选择以下一项直到你的下个准备阶段:①记录场上期间角色使用牌数;②记录期间场上角色弃置牌数;③记录期间场上角色获得牌数。准备阶段,你可以选择一名场上对应记录数值最少的其他角色,观看其手牌并选择其中至多三张牌,然后你可以将其中至多两张牌交给另一名其他角色,然后弃置其余牌。',
|
||||
guimou_info:'锁定技。游戏开始时/回合结束时,你随机/须选择以下一项直到你的下个准备阶段:①记录场上期间角色使用牌数;②记录期间场上角色弃置牌数;③记录期间场上角色获得牌数。准备阶段,你可以选择一名场上对应记录数值最少的其他角色,观看其手牌并选择其中一张牌,然后你将此牌交给另一名其他角色或弃置此牌。',
|
||||
zhouxian:'州贤',
|
||||
zhouxian_info:'锁定技。当你成为其他角色使用的伤害类卡牌的目标后,你亮出牌堆顶的两张牌,然后其须选择一项:①弃置一张与亮出牌之一类别相同的牌;②令此牌对你无效。',
|
||||
zhouxian_info:'锁定技。当你成为其他角色使用的伤害类卡牌的目标后,你亮出牌堆顶的三张牌,然后其须选择一项:①弃置一张与亮出牌之一类别相同的牌;②令此牌对你无效。',
|
||||
mb_huban:'手杀胡班',
|
||||
mb_huban_prefix:'手杀',
|
||||
mbyilie:'义烈',
|
||||
mbyilie2:'义烈',
|
||||
mbyilie3:'义烈',
|
||||
mbyilie_info:'锁定技。①游戏开始时,你选择一名其他角色,然后你获得以下效果:其受到伤害时,若你的“烈”标记数小于2,则你获得等同于伤害值的“烈”标记,然后防止此伤害;其对其他角色造成伤害后,你回复1点体力。②结束阶段,若你有“烈”标记,你摸X张牌并失去X点体力,然后移去所有“烈”标记(X为你拥有的“烈”标记数)。',
|
||||
mbyilie_info:'锁定技。①游戏开始时,你选择一名其他角色,然后你获得以下效果:其受到伤害时,若你没有“烈”,则你获得等同于伤害值的“烈”标记,然后防止此伤害;其对其他角色造成伤害后,你回复1点体力。②结束阶段,你摸一张牌并失去X点体力,然后移去所有“烈”(X为你拥有的“烈”标记数)。',
|
||||
muludawang:'木鹿大王',
|
||||
shoufa:'兽法',
|
||||
shoufa_info:'当你受到伤害后/于一回合首次造成伤害后,你可以选择一名与你距离大于/不大于2的角色,令其随机执行以下一项:豹,令其受到1点无来源伤害;鹰,你随机获得其一张牌;熊,你随机弃置其装备区的一张牌;兔,令其摸一张牌。',
|
||||
|
|
|
@ -11,7 +11,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
offline_yijiang:['ol_xinxianying'],
|
||||
offline_luanwu:["ns_lijue","ns_zhangji","ns_fanchou"],
|
||||
offline_yongjian:["ns_chendao","yj_caoang","yj_caocao",'yj_liru','yj_caohong','yj_zhangfei','yongjian_ganning','yj_dongzhuo','yj_xuyou','yj_jiaxu','yj_zhenji'],
|
||||
offline_piracyE:['shen_jiaxu','pe_wangyun','pe_zhonghui','pe_sunchen','pe_mengda','pe_wenqin','ns_caoanmin','chendong','jiangqing','kongrong','jiling','tianfeng','mateng'],
|
||||
offline_piracyE:['shen_jiaxu','pe_wangyun','pe_zhonghui','pe_sunchen','pe_mengda','pe_wenqin','ns_caoanmin','jiangqing','kongrong','jiling','tianfeng','mateng'],
|
||||
offline_piracyS:['ns_jiaxu','longyufei','ps_guanyu','ps1059_guojia','ps2070_guojia','ps2063_zhaoyun','ps2067_zhaoyun','ps1062_zhouyu','ps2080_zhouyu','ps_caozhi','ps_jin_simayi','ps_caopi','ps_simayi','ps2068_simayi','ps_machao','ps_zhugeliang','ps2066_zhugeliang','ps_jiaxu','ps_lvbu','ps_shen_machao','jsp_liubei'],
|
||||
offline_piracyK:['pk_sp_duyu'],
|
||||
offline_vtuber:['vtb_xiaosha','vtb_xiaoshan','vtb_xiaotao','vtb_xiaole','vtb_xiaojiu'],
|
||||
|
@ -34,7 +34,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
tianfeng:['male','qun',3,['sijian','gzsuishi']],
|
||||
jiling:['male','qun',4,['shuangren']],
|
||||
kongrong:['male','qun',3,['zymingshi','lirang']],
|
||||
chendong:['male','wu',4,['duanxie','fenming']],
|
||||
jiangqing:['male','wu',4,['zyshangyi']],
|
||||
pk_sp_duyu:['male','qun',4,['pkwuku','pksanchen']],
|
||||
ps_lvbu:['male','qun',4,['wushuang','pssheji']],
|
||||
|
@ -456,137 +455,137 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
},
|
||||
//小乐
|
||||
vtbleyu:{
|
||||
audio:1,
|
||||
trigger:{
|
||||
global:'phaseBegin',
|
||||
},
|
||||
direct:true,
|
||||
filter:function(event,player){
|
||||
return player.countCards('he')>=3;
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
player.chooseToDiscard(get.prompt2('vtbleyu',trigger.player),3,'he').set('ai',card=>{
|
||||
if(ui.selected.cards.length==2) return 10-get.value(card);
|
||||
if(_status.event.effect>0){
|
||||
return 6-get.value(card);
|
||||
}
|
||||
return 0;
|
||||
}).set('effect',trigger.player.hasJudge('lebu')?0:get.effect(trigger.player,{name:'lebu'},player,player)).set('logSkill',['vtbleyu',trigger.player]);
|
||||
'step 1'
|
||||
if(result.bool){
|
||||
trigger.player.judge(lib.card.lebu.judge).judge2=lib.card.lebu.judge2;
|
||||
} else event.finish();
|
||||
'step 2'
|
||||
if(!result.bool){
|
||||
trigger.player.skip('phaseUse');
|
||||
}
|
||||
},
|
||||
ai:{
|
||||
expose:0.3,
|
||||
vtbleyu:{
|
||||
audio:1,
|
||||
trigger:{
|
||||
global:'phaseBegin',
|
||||
},
|
||||
direct:true,
|
||||
filter:function(event,player){
|
||||
return player.countCards('he')>=3;
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
player.chooseToDiscard(get.prompt2('vtbleyu',trigger.player),3,'he').set('ai',card=>{
|
||||
if(ui.selected.cards.length==2) return 10-get.value(card);
|
||||
if(_status.event.effect>0){
|
||||
return 6-get.value(card);
|
||||
}
|
||||
return 0;
|
||||
}).set('effect',trigger.player.hasJudge('lebu')?0:get.effect(trigger.player,{name:'lebu'},player,player)).set('logSkill',['vtbleyu',trigger.player]);
|
||||
'step 1'
|
||||
if(result.bool){
|
||||
trigger.player.judge(lib.card.lebu.judge).judge2=lib.card.lebu.judge2;
|
||||
} else event.finish();
|
||||
'step 2'
|
||||
if(!result.bool){
|
||||
trigger.player.skip('phaseUse');
|
||||
}
|
||||
},
|
||||
ai:{
|
||||
expose:0.3,
|
||||
threaten:2.9,
|
||||
},
|
||||
},
|
||||
vtbyuanli:{
|
||||
audio:1,
|
||||
trigger:{global:['phaseUseSkipped','phaseUseCancelled']},
|
||||
direct:true,
|
||||
content:function(){
|
||||
'step 0'
|
||||
player.chooseTarget(get.prompt2('vtbyuanli'),lib.filter.notMe).set('ai',target=>get.attitude(_status.event.player,target)+1);
|
||||
'step 1'
|
||||
if(result.bool){
|
||||
player.logSkill('vtbyuanli',result.targets[0]);
|
||||
game.asyncDraw([player,result.targets[0]].sortBySeat(_status.currentPhase));
|
||||
}
|
||||
},
|
||||
ai:{
|
||||
expose:0.1,
|
||||
},
|
||||
},
|
||||
vtbmeiniang:{
|
||||
audio:1,
|
||||
trigger:{global:'phaseUseBegin'},
|
||||
filter:function(event,player){
|
||||
return event.player!=player;
|
||||
},
|
||||
check:function(event,player){
|
||||
return get.attitude(player,event.player)>0&&event.player.getUseValue('jiu')>=0;
|
||||
},
|
||||
logTarget:'player',
|
||||
content:function(){
|
||||
trigger.player.chooseUseTarget('jiu',true,false);
|
||||
}
|
||||
},
|
||||
vtbyaoli:{
|
||||
audio:1,
|
||||
trigger:{global:'useCardAfter'},
|
||||
filter:function(event,player){
|
||||
return event.card.name=='jiu'&&event.player!=player&&event.player.isPhaseUsing();
|
||||
},
|
||||
logTarget:'player',
|
||||
},
|
||||
},
|
||||
vtbyuanli:{
|
||||
audio:1,
|
||||
trigger:{global:['phaseUseSkipped','phaseUseCancelled']},
|
||||
direct:true,
|
||||
content:function(){
|
||||
'step 0'
|
||||
player.chooseTarget(get.prompt2('vtbyuanli'),lib.filter.notMe).set('ai',target=>get.attitude(_status.event.player,target)+1);
|
||||
'step 1'
|
||||
if(result.bool){
|
||||
player.logSkill('vtbyuanli',result.targets[0]);
|
||||
game.asyncDraw([player,result.targets[0]].sortBySeat(_status.currentPhase));
|
||||
}
|
||||
},
|
||||
ai:{
|
||||
expose:0.1,
|
||||
},
|
||||
},
|
||||
vtbmeiniang:{
|
||||
audio:1,
|
||||
trigger:{global:'phaseUseBegin'},
|
||||
filter:function(event,player){
|
||||
return event.player!=player;
|
||||
},
|
||||
check:function(event,player){
|
||||
return get.attitude(player,event.player)>0&&event.player.getUseValue('jiu')>=0;
|
||||
},
|
||||
logTarget:'player',
|
||||
content:function(){
|
||||
trigger.player.chooseUseTarget('jiu',true,false);
|
||||
}
|
||||
},
|
||||
vtbyaoli:{
|
||||
audio:1,
|
||||
trigger:{global:'useCardAfter'},
|
||||
filter:function(event,player){
|
||||
return event.card.name=='jiu'&&event.player!=player&&event.player.isPhaseUsing();
|
||||
},
|
||||
logTarget:'player',
|
||||
check:function(event,player){
|
||||
return get.attitude(player,event.player)>0;
|
||||
},
|
||||
content:function(){
|
||||
trigger.player.addTempSkill('vtbyaoli_effect');
|
||||
trigger.player.addMark('vtbyaoli_effect',1,false);
|
||||
},
|
||||
ai:{
|
||||
expose:0.15,
|
||||
},
|
||||
subSkill:{
|
||||
effect:{
|
||||
audio:'vtbyaoli',
|
||||
charlotte:true,
|
||||
trigger:{player:'useCard2'},
|
||||
forced:true,
|
||||
popup:false,
|
||||
onremove:true,
|
||||
nopop:true,
|
||||
filter:function(event,player){
|
||||
return event.card.name=='sha'&&player.countMark('vtbyaoli_effect')>0;
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
trigger.directHit.addArray(game.filterPlayer());
|
||||
var num=player.countMark('vtbyaoli_effect');
|
||||
if(!game.hasPlayer(current=>{
|
||||
return !trigger.targets.includes(current)&&lib.filter.targetEnabled2(trigger.card,player,current);
|
||||
})) event.finish();
|
||||
else player.chooseTarget('媱丽:是否为'+get.translation(trigger.card)+'额外指定'+(num>1?'至多':'')+get.cnNumber(num)+'个目标?',num==1?1:[1,num],(card,player,target)=>{
|
||||
return !_status.event.sourcex.includes(target)&&player.canUse(_status.event.card,target);
|
||||
}).set('sourcex',trigger.targets).set('ai',target=>{
|
||||
var player=_status.event.player;
|
||||
return get.effect(target,_status.event.card,player,player);
|
||||
}).set('card',trigger.card);
|
||||
'step 1'
|
||||
if(result.bool){
|
||||
if(!event.isMine()&&!event.isOnline()) game.delayx();
|
||||
event.targets=result.targets;
|
||||
}
|
||||
else {
|
||||
event.finish();
|
||||
}
|
||||
'step 2'
|
||||
player.logSkill('vtbyaoli_effect',event.targets);
|
||||
trigger.targets.addArray(event.targets);
|
||||
player.removeSkill('vtbyaoli_effect');
|
||||
},
|
||||
marktext:'媱',
|
||||
intro:{
|
||||
content:'下一张【杀】不可被响应且可以额外指定&个目标',
|
||||
},
|
||||
ai:{
|
||||
directHit_ai:true,
|
||||
skillTagFilter:function(player,tag,arg){
|
||||
return arg.card.name=='sha';
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
content:function(){
|
||||
trigger.player.addTempSkill('vtbyaoli_effect');
|
||||
trigger.player.addMark('vtbyaoli_effect',1,false);
|
||||
},
|
||||
ai:{
|
||||
expose:0.15,
|
||||
},
|
||||
subSkill:{
|
||||
effect:{
|
||||
audio:'vtbyaoli',
|
||||
charlotte:true,
|
||||
trigger:{player:'useCard2'},
|
||||
forced:true,
|
||||
popup:false,
|
||||
onremove:true,
|
||||
nopop:true,
|
||||
filter:function(event,player){
|
||||
return event.card.name=='sha'&&player.countMark('vtbyaoli_effect')>0;
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
trigger.directHit.addArray(game.filterPlayer());
|
||||
var num=player.countMark('vtbyaoli_effect');
|
||||
if(!game.hasPlayer(current=>{
|
||||
return !trigger.targets.includes(current)&&lib.filter.targetEnabled2(trigger.card,player,current);
|
||||
})) event.finish();
|
||||
else player.chooseTarget('媱丽:是否为'+get.translation(trigger.card)+'额外指定'+(num>1?'至多':'')+get.cnNumber(num)+'个目标?',num==1?1:[1,num],(card,player,target)=>{
|
||||
return !_status.event.sourcex.includes(target)&&player.canUse(_status.event.card,target);
|
||||
}).set('sourcex',trigger.targets).set('ai',target=>{
|
||||
var player=_status.event.player;
|
||||
return get.effect(target,_status.event.card,player,player);
|
||||
}).set('card',trigger.card);
|
||||
'step 1'
|
||||
if(result.bool){
|
||||
if(!event.isMine()&&!event.isOnline()) game.delayx();
|
||||
event.targets=result.targets;
|
||||
}
|
||||
else {
|
||||
event.finish();
|
||||
}
|
||||
'step 2'
|
||||
player.logSkill('vtbyaoli_effect',event.targets);
|
||||
trigger.targets.addArray(event.targets);
|
||||
player.removeSkill('vtbyaoli_effect');
|
||||
},
|
||||
marktext:'媱',
|
||||
intro:{
|
||||
content:'下一张【杀】不可被响应且可以额外指定&个目标',
|
||||
},
|
||||
ai:{
|
||||
directHit_ai:true,
|
||||
skillTagFilter:function(player,tag,arg){
|
||||
return arg.card.name=='sha';
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
//官盗S特015神马超
|
||||
psshouli:{
|
||||
audio:'shouli',
|
||||
|
@ -598,16 +597,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(event.responded||event.psshouli||event.type=='wuxie') return false;
|
||||
if(game.hasPlayer(function(current){
|
||||
return current.getEquips(4).length>0;
|
||||
})&&event.filterCard({
|
||||
})&&event.filterCard(get.autoViewAs({
|
||||
name:'sha',
|
||||
storage:{psshouli:true},
|
||||
},player,event)) return true;
|
||||
},'unsure'),player,event)) return true;
|
||||
if(game.hasPlayer(function(current){
|
||||
return current.getEquips(3).length>0;
|
||||
})&&event.filterCard({
|
||||
})&&event.filterCard(get.autoViewAs({
|
||||
name:'shan',
|
||||
storage:{psshouli:true},
|
||||
},player,event)) return true;
|
||||
},'unsure'),player,event)) return true;
|
||||
return false;
|
||||
},
|
||||
delay:false,
|
||||
|
@ -1089,7 +1088,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(!player.countMark('pkwuku')||player.hasSkill('pkmiewu2')) return false;
|
||||
for(var i of lib.inpile){
|
||||
var type=get.type(i);
|
||||
if((type=='basic'||type=='trick')&&event.filterCard({name:i},player,event)) return true;
|
||||
if((type=='basic'||type=='trick')&&event.filterCard(get.autoViewAs({name:i},'unsure'),player,event)) return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
@ -1099,19 +1098,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
for(var i=0;i<lib.inpile.length;i++){
|
||||
var name=lib.inpile[i];
|
||||
if(name=='sha'){
|
||||
if(event.filterCard({name:name},player,event)) list.push(['基本','','sha']);
|
||||
for(var j of lib.inpile_nature){
|
||||
if(event.filterCard({name:name,nature:j},player,event)) list.push(['基本','','sha',j]);
|
||||
if(event.filterCard(get.autoViewAs({name},'unsure'),player,event)) list.push(['基本','','sha']);
|
||||
for(var nature of lib.inpile_nature){
|
||||
if(event.filterCard(get.autoViewAs({name,nature},'unsure'),player,event)) list.push(['基本','','sha',j]);
|
||||
}
|
||||
}
|
||||
else if(get.type(name)=='trick'&&event.filterCard({name:name},player,event)) list.push(['锦囊','',name]);
|
||||
else if(get.type(name)=='basic'&&event.filterCard({name:name},player,event)) list.push(['基本','',name]);
|
||||
else if(get.type(name)=='trick'&&event.filterCard(get.autoViewAs({name},'unsure'),player,event)) list.push(['锦囊','',name]);
|
||||
else if(get.type(name)=='basic'&&event.filterCard(get.autoViewAs({name},'unsure'),player,event)) list.push(['基本','',name]);
|
||||
}
|
||||
return ui.create.dialog('灭吴',[list,'vcard']);
|
||||
},
|
||||
filter:function(button,player){
|
||||
return _status.event.getParent().filterCard({name:button.link[2]},player,_status.event.getParent());
|
||||
},
|
||||
//これ 要らない(そよりん声线)
|
||||
//filter:function(button,player){
|
||||
// return _status.event.getParent().filterCard({name:button.link[2]},player,_status.event.getParent());
|
||||
//},
|
||||
check:function(button){
|
||||
if(_status.event.getParent().type!='phase') return 1;
|
||||
var player=_status.event.player;
|
||||
|
@ -2174,7 +2174,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(!player.countCards('hse')||player.hasSkill('pslongyin_used')) return false;
|
||||
for(var i of lib.inpile){
|
||||
var type=get.type(i);
|
||||
if((type=='basic'||type=='trick')&&event.filterCard({name:i},player,event)) return true;
|
||||
if((type=='basic'||type=='trick')&&event.filterCard(get.autoViewAs({name:i},'unsure'),player,event)) return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
@ -4159,24 +4159,24 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
player.storage.jsprende+=cards.length;
|
||||
if(player.storage.jsprende>=2){
|
||||
var list=[];
|
||||
if(lib.filter.cardUsable({name:'sha'},player,event.getParent('chooseToUse'))&&game.hasPlayer(function(current){
|
||||
if(lib.filter.cardUsable({name:'sha',isCard:true},player,event.getParent('chooseToUse'))&&game.hasPlayer(function(current){
|
||||
return player.canUse('sha',current);
|
||||
})){
|
||||
list.push(['基本','','sha']);
|
||||
}
|
||||
for(var i of lib.inpile_nature){
|
||||
if(lib.filter.cardUsable({name:'sha',nature:i},player,event.getParent('chooseToUse'))&&game.hasPlayer(function(current){
|
||||
return player.canUse({name:'sha',nature:i},current);
|
||||
if(lib.filter.cardUsable({name:'sha',nature:i,isCard:true},player,event.getParent('chooseToUse'))&&game.hasPlayer(function(current){
|
||||
return player.canUse({name:'sha',nature:i,isCard:true},current);
|
||||
})){
|
||||
list.push(['基本','','sha',i]);
|
||||
}
|
||||
}
|
||||
if(lib.filter.cardUsable({name:'tao'},player,event.getParent('chooseToUse'))&&game.hasPlayer(function(current){
|
||||
if(lib.filter.cardUsable({name:'tao',isCard:true},player,event.getParent('chooseToUse'))&&game.hasPlayer(function(current){
|
||||
return player.canUse('tao',current);
|
||||
})){
|
||||
list.push(['基本','','tao']);
|
||||
}
|
||||
if(lib.filter.cardUsable({name:'jiu'},player,event.getParent('chooseToUse'))&&game.hasPlayer(function(current){
|
||||
if(lib.filter.cardUsable({name:'jiu',isCard:true},player,event.getParent('chooseToUse'))&&game.hasPlayer(function(current){
|
||||
return player.canUse('jiu',current);
|
||||
})){
|
||||
list.push(['基本','','jiu']);
|
||||
|
@ -4184,7 +4184,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(list.length){
|
||||
player.chooseButton(['是否视为使用一张基本牌?',[list,'vcard']]).set('ai',function(button){
|
||||
var player=_status.event.player;
|
||||
var card={name:button.link[2],nature:button.link[3]};
|
||||
var card={name:button.link[2],nature:button.link[3],isCard:true};
|
||||
if(card.name=='tao'){
|
||||
if(player.hp==1||(player.hp==2&&!player.hasShan())||player.needsToDiscard()){
|
||||
return 5;
|
||||
|
@ -4221,7 +4221,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
'step 1'
|
||||
if(result&&result.bool&&result.links[0]){
|
||||
var card={name:result.links[0][2],nature:result.links[0][3]};
|
||||
var card={name:result.links[0][2],nature:result.links[0][3],isCard:true};
|
||||
player.chooseUseTarget(card,true);
|
||||
}
|
||||
},
|
||||
|
@ -4965,9 +4965,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
else event.finish();
|
||||
'step 2'
|
||||
var skill=result.control;
|
||||
player.addTempSkill(skill);
|
||||
player.popup(skill,'wood');
|
||||
game.log(player,'获得了技能','#g【'+get.translation(skill)+'】');
|
||||
player.addTempSkills(skill);
|
||||
// player.popup(skill,'wood');
|
||||
// game.log(player,'获得了技能','#g【'+get.translation(skill)+'】');
|
||||
},
|
||||
},
|
||||
sphuangen:{
|
||||
|
@ -6095,10 +6095,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
mod:{
|
||||
cardRespondable:function(card,player){
|
||||
if(card.name=='shan'&&get.suit(card)!='heart') return false;
|
||||
if(card.name=='shan'){
|
||||
const suit=get.suit(card);
|
||||
if(suit!='heart'&&suit!='unsure') return false;
|
||||
}
|
||||
},
|
||||
cardEnabled:function(card,player){
|
||||
if(card.name=='shan'&&get.suit(card)!='heart') return false;
|
||||
if(card.name=='shan'){
|
||||
const suit=get.suit(card);
|
||||
if(suit!='heart'&&suit!='unsure') return false;
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
|
@ -6771,16 +6777,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
vtbtaoyan_info:'回合开始时,你可以令至多两名其他角色摸一张牌并于游戏外获得一张【桃】(共五张且均为♥6)。',
|
||||
vtbyanli:'妍丽',
|
||||
vtbyanli_info:'每轮限一次。一名角色于你的回合外进入濒死状态时,你可以令其回复至1点体力,然后其摸一张牌。',
|
||||
vtb_xiaole:'小乐',
|
||||
vtbleyu:'乐虞',
|
||||
vtbleyu_info:'一名角色的回合开始时,你可以弃置三张牌令其判定。若结果不为♥,其跳过本回合的出牌阶段。',
|
||||
vtbyuanli:'媛丽',
|
||||
vtbyuanli_info:'一名角色跳过出牌阶段后,你可以与一名其他角色各摸一张牌。',
|
||||
vtb_xiaojiu:'小酒',
|
||||
vtbmeiniang:'美酿',
|
||||
vtbmeiniang_info:'其他角色的出牌阶段开始时,你可以令其视为使用一张无次数限制且不计入次数的【酒】。',
|
||||
vtbyaoli:'媱丽',
|
||||
vtbyaoli_info:'其他角色于其出牌阶段内使用【酒】后,你可以令其于本回合内使用的下一张【杀】不能被响应且可以额外指定一个目标。',
|
||||
vtb_xiaole:'小乐',
|
||||
vtbleyu:'乐虞',
|
||||
vtbleyu_info:'一名角色的回合开始时,你可以弃置三张牌令其判定。若结果不为♥,其跳过本回合的出牌阶段。',
|
||||
vtbyuanli:'媛丽',
|
||||
vtbyuanli_info:'一名角色跳过出牌阶段后,你可以与一名其他角色各摸一张牌。',
|
||||
vtb_xiaojiu:'小酒',
|
||||
vtbmeiniang:'美酿',
|
||||
vtbmeiniang_info:'其他角色的出牌阶段开始时,你可以令其视为使用一张无次数限制且不计入次数的【酒】。',
|
||||
vtbyaoli:'媱丽',
|
||||
vtbyaoli_info:'其他角色于其出牌阶段内使用【酒】后,你可以令其于本回合内使用的下一张【杀】不能被响应且可以额外指定一个目标。',
|
||||
old_machao:'J.SP马超',
|
||||
old_machao_prefix:'J.SP',
|
||||
jsp_caoren:'☆SP曹仁',
|
||||
|
@ -6791,8 +6797,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
zhangliang_prefix:'SP',
|
||||
ol_xinxianying:'将辛宪英',
|
||||
ol_xinxianying_prefix:'将',
|
||||
chendong:'战役篇陈武董袭',
|
||||
chendong_prefix:'战役篇',
|
||||
jiangqing:'战役篇蒋钦',
|
||||
jiangqing_prefix:'战役篇',
|
||||
tianfeng:'战役篇田丰',
|
||||
|
|
|
@ -499,7 +499,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
var next=target.insertPhase();
|
||||
next._noTurnOver=true;
|
||||
next.setContent(lib.skill.oldmingjian.phase);
|
||||
next.phaseList=['phaseUse'];
|
||||
//next.setContent(lib.skill.oldmingjian.phase);
|
||||
},
|
||||
phase:function(){
|
||||
'step 0'
|
||||
|
@ -527,10 +528,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(!player.countCards('hs')) return false;
|
||||
for(var i of lib.inpile){
|
||||
var type=get.type(i);
|
||||
if((type=='basic'||type=='trick')&&event.filterCard({name:i},player,event)) return true;
|
||||
if((type=='basic'||type=='trick')&&event.filterCard(get.autoViewAs({name:i},'unsure'),player,event)) return true;
|
||||
if(i=='sha'){
|
||||
for(var j of lib.inpile_nature){
|
||||
if(event.filterCard({name:i,nature:j},player,event)) return true;
|
||||
if(event.filterCard(get.autoViewAs({name:i,nature:j},'unsure'),player,event)) return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -540,20 +541,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
dialog:function(event,player){
|
||||
var list=[];
|
||||
for(var i of lib.inpile){
|
||||
if(event.type!='phase') if(!event.filterCard({name:i},player,event)) continue;
|
||||
if(event.type!='phase') if(!event.filterCard(get.autoViewAs({name:i},'unsure'),player,event)) continue;
|
||||
var type=get.type(i);
|
||||
if(type=='basic'||type=='trick') list.push([type,'',i]);
|
||||
if(i=='sha'){
|
||||
if(event.type!='phase') if(!event.filterCard({name:i,nature:j},player,event)) continue;
|
||||
if(event.type!='phase') if(!event.filterCard(get.autoViewAs({name:i,nature:j},'unsure'),player,event)) continue;
|
||||
for(var j of lib.inpile_nature) list.push(['基本','','sha',j]);
|
||||
}
|
||||
}
|
||||
return ui.create.dialog('蛊惑',[list,'vcard']);
|
||||
},
|
||||
filter:function(button,player){
|
||||
var evt=_status.event.getParent();
|
||||
return evt.filterCard({name:button.link[2],nature:button.link[3]},player,evt);
|
||||
},
|
||||
check:function(button){
|
||||
var player=_status.event.player;
|
||||
var order=Math.max(0,get.order(card)+1);
|
||||
|
|
|
@ -11,19 +11,279 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
ol_sb_guanyu:['male','shu',4,['olsbweilin','olsbduoshou']],
|
||||
ol_sb_taishici:['male','wu',4,['olsbdulie','olsbdouchan']],
|
||||
ol_gaoshun:['male','qun',4,['olxianzhen','decadejinjiu'],['die_audio:re_gaoshun']],
|
||||
ol_sb_yuanshao:['male','qun',4,['olsbhetao','olsbshenli','olsbyufeng','olsbshishou'],['zhu']],
|
||||
},
|
||||
characterSort:{
|
||||
onlyOL:{
|
||||
onlyOL_yijiang1:['ol_jianyong','ol_lingtong','ol_gaoshun'],
|
||||
onlyOL_yijiang2:['ol_caozhang'],
|
||||
onlyOL_sb:['ol_sb_jiangwei','ol_sb_guanyu','ol_sb_taishici'],
|
||||
onlyOL_sb:['ol_sb_jiangwei','ol_sb_guanyu','ol_sb_taishici','ol_sb_yuanshao'],
|
||||
},
|
||||
},
|
||||
characterIntro:{
|
||||
},
|
||||
characterReplace:{
|
||||
},
|
||||
card:{
|
||||
sizhaojian:{
|
||||
derivation:'ol_sb_yuanshao',
|
||||
fullskin:true,
|
||||
type:'equip',
|
||||
subtype:'equip1',
|
||||
get destroy(){
|
||||
return !lib.card.sizhaojian.inShanShanFestival();
|
||||
},
|
||||
inShanShanFestival(){
|
||||
//闪闪节外离开装备区会销毁
|
||||
const date=new Date();
|
||||
return date.getMonth()+1==3&&date.getDate()>=2&&date.getDate()<=15;
|
||||
},
|
||||
distance:{attackFrom:-1},
|
||||
ai:{basic:{equipValue:7}},
|
||||
skills:['olsbyufeng_sizhaojian'],
|
||||
},
|
||||
},
|
||||
skill:{
|
||||
//OL谋袁绍
|
||||
//真·四世三公——袁神,启动
|
||||
olsbhetao:{
|
||||
audio:2,
|
||||
trigger:{global:'useCardToPlayered'},
|
||||
filter(event,player){
|
||||
return event.player!=player&&event.isFirstTarget&&event.targets.length>1&&player.countCards('he',card=>{
|
||||
if(get.position(card)=='h'&&_status.connectMode) return true;
|
||||
return get.color(card)==get.color(event.card)&&lib.filter.cardDiscardable(card,player);
|
||||
});
|
||||
},
|
||||
direct:true,
|
||||
async content(event,trigger,player){
|
||||
const {result:{bool,cards,targets}}=await player.chooseCardTarget({
|
||||
prompt:get.prompt('olsbhetao'),
|
||||
filterCard(card,player){
|
||||
return get.color(card)==get.color(get.event().getTrigger().card)&&lib.filter.cardDiscardable(card,player);
|
||||
},
|
||||
position:'he',
|
||||
filterTarget(card,player,target){
|
||||
return get.event().getTrigger().targets.includes(target);
|
||||
},
|
||||
ai1(card){
|
||||
return 7.5-get.value(card);
|
||||
},
|
||||
ai2(target){
|
||||
const player=get.event('player'),trigger=get.event().getTrigger();
|
||||
const att=get.attitude(player,target),eff=get.effect(target,trigger.card,trigger.player,player);
|
||||
if(trigger.card.name=='tiesuo') return eff>0?0:get.sgn(att)*(2+get.sgn(att));
|
||||
const sum=trigger.targets.reduce((i,j)=>i+get.effect(j,trigger.card,trigger.player,player),0);
|
||||
return get.sgn(att)*(eff*2-sum);
|
||||
},
|
||||
}).set('prompt2','弃置一张'+get.translation(get.color(trigger.card))+'牌,令'+get.translation(trigger.card)+'改为对其中一个目标结算两次');
|
||||
if(bool){
|
||||
const target=targets[0];
|
||||
player.logSkill('olsbhetao',target);
|
||||
player.discard(cards);
|
||||
trigger.getParent().effectCount++;
|
||||
trigger.getParent().excluded.addArray(game.filterPlayer(i=>trigger.targets.includes(i)&&target!=i));
|
||||
}
|
||||
},
|
||||
ai:{threaten:3.5},
|
||||
global:'olsbhetao_ai',
|
||||
subSkill:{
|
||||
ai:{
|
||||
effect:{
|
||||
player(card,player){
|
||||
if(!game.hasPlayer(target=>{
|
||||
return target.hasSkill('olsbhetao')&&(get.attitude(player,target)<0||get.attitude(target,player)<0);
|
||||
})||game.countPlayer(target=>{
|
||||
return player.canUse(card,target);
|
||||
})<2) return;
|
||||
const select=get.copy(get.info(card).selectTarget);
|
||||
let range;
|
||||
if(select==undefined) range=[1,1];
|
||||
else if(typeof select=='number') range=[select,select];
|
||||
else if(get.itemtype(select)=='select') range=select;
|
||||
else if(typeof select=='function') range=select(card,player);
|
||||
game.checkMod(card,player,range,'selectTarget',player);
|
||||
if(range[1]==-1||(range[1]>1&&ui.selected.targets&&ui.selected.targets.length)) return 'zeroplayertarget';
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
olsbshenli:{
|
||||
audio:2,
|
||||
trigger:{player:'useCardToPlayered'},
|
||||
filter(event,player){
|
||||
if(!player.isPhaseUsing()||player.hasSkill('olsbshenli_used')) return false;
|
||||
return event.card.name=='sha'&&game.hasPlayer(target=>{
|
||||
return !event.targets.includes(target)&&player.canUse(event.card,target,false);
|
||||
})&&event.isFirstTarget;
|
||||
},
|
||||
check(event,player){
|
||||
const targets=game.filterPlayer(target=>player.canUse(event.card,target,false));
|
||||
const num1=event.targets.reduce((sum,target)=>sum+get.effect(target,event.card,player,player),0);
|
||||
const num2=targets.reduce((sum,target)=>sum+get.effect(target,event.card,player,player),0);
|
||||
if(num2>=num1) return true;
|
||||
let num=(event.baseDamage||1);
|
||||
if(event.extraDamage) num+=event.extraDamage;
|
||||
let extra_num=0;
|
||||
for(const target of targets){
|
||||
if(target.mayHaveShan(player,'use',target.getCards('h',i=>{
|
||||
return i.hasGaintag('sha_notshan');
|
||||
}))&&!player.hasSkillTag('directHit_ai',true,{
|
||||
target:target,
|
||||
card:event.card,
|
||||
},true)){
|
||||
if(player.hasSkill('jueqing')||target.hasSkill('gangzhi')) extra_num--;
|
||||
else if(target.hasSkillTag('filterDamage',null,{
|
||||
player:event.player,
|
||||
card:event.card,
|
||||
})) extra_num++;
|
||||
}
|
||||
else extra_num+=num;
|
||||
}
|
||||
const sum=targets.length+extra_num;
|
||||
return num2+(sum>player.countCards('h')?Math.min(5,sum):0)+(sum>player.getHp()?num2:0)>=num1;
|
||||
},
|
||||
async content(event,trigger,player){
|
||||
player.addTempSkill('olsbshenli_used','phaseUseAfter');
|
||||
trigger.getParent().targets.addArray(game.filterPlayer(target=>{
|
||||
return !trigger.targets.includes(target)&&player.canUse(trigger.card,target,false);
|
||||
}));
|
||||
player.when('useCardAfter').filter(evt=>evt==trigger.getParent())
|
||||
.then(()=>{
|
||||
const sum=player.getHistory('sourceDamage',evt=>evt.card&&evt.card==trigger.card).reduce((num,evt)=>{
|
||||
return num+evt.num;
|
||||
},0);
|
||||
const bool=(sum>player.countCards('h')),goon=(sum>player.getHp());
|
||||
if(bool) player.draw(Math.min(5,sum));
|
||||
if(goon){
|
||||
const targets=game.filterPlayer(target=>trigger.targets.includes(target))
|
||||
if(targets.length) player.useCard(trigger.card,targets,false);
|
||||
}
|
||||
});
|
||||
},
|
||||
ai:{threaten:3.5},
|
||||
subSkill:{used:{charlotte:true}},
|
||||
},
|
||||
olsbyufeng:{
|
||||
audio:1,
|
||||
trigger:{
|
||||
global:'phaseBefore',
|
||||
player:'enterGame',
|
||||
},
|
||||
filter(event,player){
|
||||
const card=get.cardPile('sizhaojian','field')||game.createCard2('sizhaojian','diamond',6);
|
||||
return (event.name!='phase'||game.phaseNumber==0)&&player.canEquip(card,true);
|
||||
},
|
||||
forced:true,
|
||||
locked:false,
|
||||
async content(event,trigger,player){
|
||||
if(lib.card.sizhaojian.inShanShanFestival()){
|
||||
game.broadcastAll(()=>lib.inpile.add('sizhaojian'));
|
||||
}
|
||||
const card=get.cardPile('sizhaojian','field')||game.createCard2('sizhaojian','diamond',6);
|
||||
if(get.owner(card)) get.owner(card).$give(card,player,false);
|
||||
else{
|
||||
player.$gain2(card,false);
|
||||
game.delayx();
|
||||
}
|
||||
player.equip(card);
|
||||
},
|
||||
subSkill:{
|
||||
sizhaojian:{
|
||||
equipSkill:true,
|
||||
mod:{
|
||||
aiOrder(player,card,num){
|
||||
if(card.name=='sha'&&typeof get.number(card)=='number') return num+get.number(card)/114514;
|
||||
},
|
||||
},
|
||||
trigger:{player:'useCardToPlayered'},
|
||||
filter(event,player){
|
||||
return event.card.name=='sha'&&typeof get.number(event.card)=='number';
|
||||
},
|
||||
forced:true,
|
||||
locked:false,
|
||||
logTarget:'target',
|
||||
async content(event,trigger,player){
|
||||
const target=trigger.target;
|
||||
target.addTempSkill('olsbyufeng_block');
|
||||
target.markAuto('olsbyufeng_block',[trigger.card]);
|
||||
},
|
||||
},
|
||||
block:{
|
||||
mod:{
|
||||
cardEnabled(card,player){
|
||||
if(!player.storage.olsbyufeng_block) return;
|
||||
const storage=player.getStorage('olsbyufeng_block');
|
||||
let evt=_status.event;
|
||||
if(evt.name!='chooseToUse') evt=evt.getParent('chooseToUse');
|
||||
if(!evt||!evt.respondTo||!storage.includes(evt.respondTo[1])) return;
|
||||
const num=get.number(card);
|
||||
if(num!='unsure'&&typeof num=='number'&&num<get.number(evt.respondTo[1])) return false;
|
||||
},
|
||||
},
|
||||
onremove(player){
|
||||
delete player.storage.olsbyufeng_block;
|
||||
},
|
||||
charlotte:true,
|
||||
trigger:{
|
||||
player:['damageBefore','damageCancelled','damageZero'],
|
||||
target:['shaMiss','useCardToExcluded','useCardToEnd'],
|
||||
global:['useCardEnd'],
|
||||
},
|
||||
filter(event,player){
|
||||
if(!event.card||!player.storage.olsbyufeng_block) return false;
|
||||
return player.getStorage('olsbyufeng_block').includes(event.card);
|
||||
},
|
||||
forced:true,
|
||||
popup:false,
|
||||
firstDo:true,
|
||||
content(){
|
||||
player.unmarkAuto('olsbyufeng_block',[trigger.card]);
|
||||
if(!player.getStorage('olsbyufeng_block').length) player.removeSkill('olsbyufeng_block');
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
olsbshishou:{
|
||||
unique:true,
|
||||
audio:2,
|
||||
trigger:{global:['loseAfter','equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter']},
|
||||
filter(event,player){
|
||||
if(player.getEquip(1)) return false;
|
||||
const card=get.cardPile('sizhaojian','field')||game.createCard2('sizhaojian','diamond',6);
|
||||
if(!player.canEquip(card,true)) return false;
|
||||
return game.hasPlayer(target=>{
|
||||
if(target==player||target.group!='qun') return false;
|
||||
const evt=event.getl(target);
|
||||
return evt&&evt.player==target&&evt.es&&evt.es.length>0;
|
||||
});
|
||||
},
|
||||
direct:true,
|
||||
zhuSkill:true,
|
||||
async content(event,trigger,player){
|
||||
const targets=game.filterPlayer(target=>{
|
||||
if(target==player||target.group!='qun') return false;
|
||||
const evt=trigger.getl(target);
|
||||
return evt&&evt.player==target&&evt.es&&evt.es.length>0;
|
||||
}).sortBySeat();
|
||||
const card=get.cardPile('sizhaojian','field')||game.createCard2('sizhaojian','diamond',6);
|
||||
for(const target of targets){
|
||||
const {result:{bool}}=await target.chooseBool(get.prompt('olsbshishou',player),'将'+get.translation(card)+'置入'+get.translation(player)+'的装备区中').set('choice',get.attitude(target,player)>0);
|
||||
if(bool){
|
||||
target.logSkill('olsbshishou',player);
|
||||
if(get.owner(card)) get.owner(card).$give(card,player,false);
|
||||
else{
|
||||
player.$gain2(card,false);
|
||||
game.delayx();
|
||||
}
|
||||
player.equip(card);
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
ai:{combo:'olsbyufeng'},
|
||||
},
|
||||
//界高顺
|
||||
olxianzhen:{
|
||||
audio:'rexianzhen',
|
||||
|
@ -581,6 +841,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
},
|
||||
},
|
||||
kunfenx:{
|
||||
audio:'kunfen',
|
||||
audioname:['ol_sb_jiangwei'],
|
||||
},
|
||||
//界曹彰
|
||||
oljiangchi:{
|
||||
audio:'rejiangchi',
|
||||
|
@ -771,10 +1035,25 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
ol_gaoshun_prefix:'OL界',
|
||||
olxianzhen:'陷阵',
|
||||
olxianzhen_info:'出牌阶段限一次,你可以与一名角色拼点。若你赢,本回合你无视该角色的防具且对其使用牌没有次数和距离限制,且当你使用【杀】或普通锦囊牌指定其他角色为唯一目标时可以令该角色也成为此牌的目标;若你没赢,本回合你不能对其使用【杀】且你的【杀】不计入手牌上限。',
|
||||
ol_sb_yuanshao:'OL谋袁绍',
|
||||
ol_sb_yuanshao_prefix:'OL谋',
|
||||
olsbhetao:'合讨',
|
||||
olsbhetao_info:'其他角色使用牌执行第一个目标后,若此牌指定的目标数大于1,则你可以弃置一张与此牌颜色相同的牌并令此牌改为对其中一名目标角色结算两次。',
|
||||
olsbshenli:'神离',
|
||||
olsbshenli_info:'出牌阶段限一次,当你使用【杀】指定目标后,你可以令所有可成为此牌目标的其他角色均成为此牌目标,此牌结算完毕后,若你因此牌造成的伤害值X:大于你的手牌数,你摸X张牌(至多摸五张);大于你的体力值,你令此牌额外结算一次。',
|
||||
olsbyufeng:'玉锋',
|
||||
olsbyufeng_sizhaojian:'思召剑',
|
||||
olsbyufeng_block:'思召剑',
|
||||
olsbyufeng_info:'游戏开始时,你将【思召剑】置入装备区。',
|
||||
sizhaojian:'思召剑',
|
||||
sizhaojian_info:'当你使用有点数的【杀】指定目标后,你令目标角色只能使用无点数或点数大于等于此【杀】的【闪】响应此牌。',
|
||||
sizhaojian_append:'<span class="text" style="font-family: yuanli">【思召剑】于闪闪节(3月2日-3月15日)外离开装备区后,销毁此牌</span>',
|
||||
olsbshishou:'士首',
|
||||
olsbshishou_info:'主公技,其他群势力角色失去装备区的牌后,若你的装备区中没有武器牌,其可将【思召剑】置入你的装备区。',
|
||||
|
||||
onlyOL_yijiang1:'OL专属·将1',
|
||||
onlyOL_yijiang2:'OL专属·将2',
|
||||
onlyOL_sb:'OL专属·谋武将',
|
||||
onlyOL_sb:'OL专属·上兵伐谋',
|
||||
},
|
||||
};
|
||||
});
|
||||
|
|
|
@ -51,6 +51,7 @@ window.noname_character_rank={
|
|||
],
|
||||
ap:[
|
||||
'xia_guanyu',
|
||||
'ol_sb_yuanshao',
|
||||
'gjqt_aruan',
|
||||
'gjqt_cenying',
|
||||
'gjqt_ouyangshaogong',
|
||||
|
@ -134,6 +135,8 @@ window.noname_character_rank={
|
|||
'jsrg_guozhao',
|
||||
'sb_caopi',
|
||||
'xia_yuzhenzi',
|
||||
'dc_simashi',
|
||||
'dc_sb_simayi',
|
||||
],
|
||||
a:[
|
||||
'star_caoren',
|
||||
|
@ -367,6 +370,8 @@ window.noname_character_rank={
|
|||
'dc_lingcao',
|
||||
'jsrg_zhugeliang',
|
||||
'shen_lusu',
|
||||
'huzun',
|
||||
'star_zhangchunhua',
|
||||
],
|
||||
am:[
|
||||
'bailingyun',
|
||||
|
@ -673,6 +678,9 @@ window.noname_character_rank={
|
|||
'sb_xunyu',
|
||||
'ol_sb_taishici',
|
||||
'tianchou',
|
||||
'ol_sb_guanyu',
|
||||
'gongsunxiu',
|
||||
'dc_caoshuang',
|
||||
],
|
||||
bp:[
|
||||
'xin_huojun',
|
||||
|
@ -916,6 +924,9 @@ window.noname_character_rank={
|
|||
'tw_mayunlu',
|
||||
'tw_hucheer',
|
||||
'sp_lvfan',
|
||||
'lvfan',
|
||||
'cuimao',
|
||||
'liqueguosi',
|
||||
're_chendeng',
|
||||
'wuyan',
|
||||
'wangyue',
|
||||
|
@ -955,6 +966,7 @@ window.noname_character_rank={
|
|||
'dc_liuba',
|
||||
'key_seira',
|
||||
'lukai',
|
||||
'ol_lukai',
|
||||
'niufu',
|
||||
're_liufeng',
|
||||
'huzhao',
|
||||
|
@ -1028,6 +1040,7 @@ window.noname_character_rank={
|
|||
'jsrg_zhenji',
|
||||
'junk_xuyou',
|
||||
'sp_machao',
|
||||
'liupan',
|
||||
'mengyou',
|
||||
're_wenpin',
|
||||
'yue_zhoufei',
|
||||
|
@ -1053,9 +1066,11 @@ window.noname_character_rank={
|
|||
'jsrg_sunlubansunluyu',
|
||||
'jsrg_weiwenzhugezhi',
|
||||
'shen_xuzhu',
|
||||
'dc_jiangji',
|
||||
'dc_wangling',
|
||||
],
|
||||
b:[
|
||||
'ol_sb_guanyu',
|
||||
'junk_guanyu',
|
||||
'liyi',
|
||||
'diy_feishi',
|
||||
'diy_liufu',
|
||||
|
@ -1199,6 +1214,7 @@ window.noname_character_rank={
|
|||
'zumao',
|
||||
'wenpin',
|
||||
'zhangling',
|
||||
'guotu',
|
||||
'caoshuang',
|
||||
'fuwan',
|
||||
'litong',
|
||||
|
@ -1635,6 +1651,7 @@ window.noname_character_rank={
|
|||
'sb_yl_luzhi',
|
||||
],
|
||||
d:[
|
||||
'chendong',
|
||||
'lvmeng',
|
||||
'huaxiong',
|
||||
'gongsunzan',
|
||||
|
@ -1685,6 +1702,7 @@ window.noname_character_rank={
|
|||
'dc_sunce',
|
||||
'xia_yuzhenzi',
|
||||
'xia_guanyu',
|
||||
'ol_sb_yuanshao',
|
||||
'swd_muyun',
|
||||
'swd_zhaoyun',
|
||||
'swd_septem',
|
||||
|
@ -1870,6 +1888,7 @@ window.noname_character_rank={
|
|||
'caoxian',
|
||||
],
|
||||
epic:[
|
||||
'dc_caoshuang',
|
||||
'tianchou',
|
||||
'star_yuanshao',
|
||||
'yue_xiaoqiao',
|
||||
|
@ -2025,6 +2044,7 @@ window.noname_character_rank={
|
|||
'jin_xiahouhui',
|
||||
'jin_simashi',
|
||||
'zhangling',
|
||||
'guotu',
|
||||
'ns_luyusheng',
|
||||
'fanyufeng',
|
||||
're_taoqian',
|
||||
|
@ -2145,6 +2165,7 @@ window.noname_character_rank={
|
|||
'dc_sb_zhouyu',
|
||||
'xia_shitao',
|
||||
'bailingyun',
|
||||
'dc_sb_simayi',
|
||||
],
|
||||
rare:[
|
||||
'zhugemengxue',
|
||||
|
@ -2549,6 +2570,7 @@ window.noname_character_rank={
|
|||
'dc_wangchang',
|
||||
'jin_zhouchu',
|
||||
'lukai',
|
||||
'ol_lukai',
|
||||
'caoxiancaohua',
|
||||
'huzhao',
|
||||
're_liufeng',
|
||||
|
@ -2627,6 +2649,7 @@ window.noname_character_rank={
|
|||
],
|
||||
junk:[
|
||||
'ol_sb_guanyu',
|
||||
'junk_guanyu',
|
||||
'sunshao',
|
||||
'ol_guohuai',
|
||||
'gongsunzan',
|
||||
|
|
|
@ -6758,7 +6758,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
return Infinity;
|
||||
},
|
||||
cardUsable:function(card,player){
|
||||
if(card.name=='sha'&&player.storage.xingongji2.includes(get.suit(card))) return Infinity;
|
||||
if(card.name=='sha'){
|
||||
const suit = get.suit(card);
|
||||
return suit === 'unsure' || player.storage.xingongji2.includes(suit);
|
||||
}
|
||||
},
|
||||
aiOrder:function(player,card,num){
|
||||
if(get.name(card)=='sha'&&!player.storage.xingongji2.includes(get.suit(card))) return num+1;
|
||||
|
@ -8347,7 +8350,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
return get.value(button.link,_status.event.getTrigger().target);
|
||||
});
|
||||
}
|
||||
if(draw) event.draw=true;
|
||||
if(draw) event.draw=true;
|
||||
'step 3'
|
||||
if(event.equip&&result.links&&result.links.length){
|
||||
trigger.target.loseToDiscardpile(result.links);
|
||||
|
@ -8523,7 +8526,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
player.discardPlayerCard(trigger.target,get.prompt('rejianchu',trigger.target)).set('ai',function(button){
|
||||
if(!_status.event.att) return 0;
|
||||
if(get.position(button.link)=='e'){
|
||||
if(get.subtype(button.link)=='equip2') return 2*get.value(button.link);
|
||||
if(get.subtype(button.link)=='equip2') return 2*get.value(button.link);
|
||||
return get.value(button.link);
|
||||
}
|
||||
return 1;
|
||||
|
@ -8739,10 +8742,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
filter:function(event,player){
|
||||
var filter=event.filterCard;
|
||||
if(filter({name:'sha'},player,event)&&player.countCards('hs','shan')) return true;
|
||||
if(filter({name:'shan'},player,event)&&player.countCards('hs','sha')) return true;
|
||||
if(filter({name:'tao'},player,event)&&player.countCards('hs','jiu')) return true;
|
||||
if(filter({name:'jiu'},player,event)&&player.countCards('hs','tao')) return true;
|
||||
if(filter(get.autoViewAs({name:'sha'},'unsure'),player,event)&&player.countCards('hs','shan')) return true;
|
||||
if(filter(get.autoViewAs({name:'shan'},'unsure'),player,event)&&player.countCards('hs','sha')) return true;
|
||||
if(filter(get.autoViewAs({name:'tao'},'unsure'),player,event)&&player.countCards('hs','jiu')) return true;
|
||||
if(filter(get.autoViewAs({name:'jiu'},'unsure'),player,event)&&player.countCards('hs','tao')) return true;
|
||||
return false;
|
||||
},
|
||||
ai:{
|
||||
|
@ -8922,7 +8925,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
trigger:{source:'damageBegin1'},
|
||||
forced:true,
|
||||
audio:'paoxiao',
|
||||
audioname:['re_zhangfei','guanzhang','xiahouba'],
|
||||
audioname:['re_zhangfei','guanzhang','xiahouba','re_guanzhang'],
|
||||
filter:function(event,player){
|
||||
return event.card&&event.card.name=='sha'&&player.countMark('olpaoxiao2')>0;
|
||||
},
|
||||
|
@ -10822,10 +10825,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(!player.countCards('hs')||player.hasSkill('reguhuo_phase')) return false;
|
||||
for(var i of lib.inpile){
|
||||
var type=get.type(i);
|
||||
if((type=='basic'||type=='trick')&&event.filterCard({name:i},player,event)) return true;
|
||||
if((type=='basic'||type=='trick')&&event.filterCard(get.autoViewAs({name:i},'unsure'),player,event)) return true;
|
||||
if(i=='sha'){
|
||||
for(var j of lib.inpile_nature){
|
||||
if(event.filterCard({name:i,nature:j},player,event)) return true;
|
||||
if(event.filterCard(get.autoViewAs({name:i,nature:j},'unsure'),player,event)) return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -10845,7 +10848,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
filter:function(button,player){
|
||||
var evt=_status.event.getParent();
|
||||
return evt.filterCard({name:button.link[2],nature:button.link[3]},player,evt);
|
||||
return evt.filterCard(get.autoViewAs({name:button.link[2],nature:button.link[3]},'unsure'),player,evt);
|
||||
},
|
||||
check:function(button){
|
||||
var player=_status.event.player;
|
||||
|
@ -12062,7 +12065,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
if(get.type(he[i])=='equip'){
|
||||
var subtype=get.subtype(he[i]);
|
||||
if(subtype=='equip3'||subtype=='equip4'){
|
||||
if(subtype=='equip3'||subtype=='equip4'||subtype=='equip6'){
|
||||
num++;
|
||||
}
|
||||
}
|
||||
|
@ -12078,7 +12081,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
if(get.type(he[i])=='equip'){
|
||||
var subtype=get.subtype(he[i]);
|
||||
if(subtype=='equip3'||subtype=='equip4'){
|
||||
if(subtype=='equip3'||subtype=='equip4'||subtype=='equip6'){
|
||||
list.push(he[i]);
|
||||
}
|
||||
}
|
||||
|
@ -13879,7 +13882,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(result.bool){
|
||||
var card=result.cards[0];
|
||||
if(get.position(card)=='d'){
|
||||
if(get.subtype(card)=='equip3'||get.subtype(card)=='equip4'){
|
||||
if(get.subtype(card)=='equip3'||get.subtype(card)=='equip4'||get.subtype(card)=='equip6'){
|
||||
player.gain(card,player,'gain2');
|
||||
}
|
||||
}
|
||||
|
@ -13902,7 +13905,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(result.bool){
|
||||
var card=result.cards[0];
|
||||
if(get.position(card)=='d'){
|
||||
if(get.subtype(card)=='equip3'||get.subtype(card)=='equip4'){
|
||||
if(get.subtype(card)=='equip3'||get.subtype(card)=='equip4'||get.subtype(card)=='equip6'){
|
||||
player.gain(card,player,'gain2');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -828,7 +828,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
return name=='sha'&&player.countCards('hs');
|
||||
},
|
||||
filter:function(event,player){
|
||||
return event.filterCard({name:'sha'},player,event)||lib.inpile_nature.some(nature=>event.filterCard({name:'sha',nature:nature},player,event));
|
||||
return event.filterCard(get.autoViewAs({name:'sha'},'unsure'),player,event)||lib.inpile_nature.some(nature=>event.filterCard(get.autoViewAs({name:'sha',nature},'unsure'),player,event));
|
||||
},
|
||||
chooseButton:{
|
||||
dialog:function(event,player){
|
||||
|
@ -904,7 +904,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(card.name=='sha'&&typeof player.storage.sbwusheng_effect[target.playerid]=='number') return true;
|
||||
},
|
||||
cardUsableTarget:function(card,player,target){
|
||||
if(card.name=='sha'&&typeof player.storage.sbwusheng_effect[target.playerid]=='number') return true;
|
||||
if(card.name!=='sha'||typeof player.storage.sbwusheng_effect[target.playerid]!=='number') return;
|
||||
return player.storage.sbwusheng_effect[target.playerid]<3;
|
||||
},
|
||||
playerEnabled:function(card,player,target){
|
||||
if(card.name!='sha'||typeof player.storage.sbwusheng_effect[target.playerid]!='number') return;
|
||||
|
@ -1140,7 +1141,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
});
|
||||
if(!target){
|
||||
event.finish();
|
||||
return;
|
||||
return;
|
||||
}
|
||||
event.target=target;
|
||||
player.logSkill('sbqicai_gain',target);
|
||||
|
@ -1420,20 +1421,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
marktext:'破',
|
||||
intro:{
|
||||
markcount:function(storage,player){
|
||||
if(player.isUnderControl(true)) return storage[1].length;
|
||||
return '?';
|
||||
markcount:function(storage){
|
||||
return storage[1].length;
|
||||
},
|
||||
mark:function(dialog,content,player){
|
||||
if(player.isUnderControl(true)){
|
||||
const storage=player.getStorage('sbkanpo');
|
||||
const sum=storage[0];
|
||||
const names=storage[1];
|
||||
dialog.addText('剩余可记录'+sum+'次牌名');
|
||||
if(names.length){
|
||||
dialog.addText('已记录牌名:');
|
||||
dialog.addSmall([names,'vcard']);
|
||||
}
|
||||
const storage=player.getStorage('sbkanpo');
|
||||
const sum=storage[0];
|
||||
const names=storage[1];
|
||||
dialog.addText('剩余可记录'+sum+'次牌名');
|
||||
if(player.isUnderControl(true)&&names.length){
|
||||
dialog.addText('当前记录牌名:');
|
||||
dialog.addSmall([names,'vcard']);
|
||||
}
|
||||
},
|
||||
},
|
||||
|
@ -1749,7 +1747,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
target.removeSkill(skills);
|
||||
num+=skills.length;
|
||||
});
|
||||
if(get.mode()=='versus'&&_status.mode=='two') num+=3;
|
||||
if(get.mode()!='identity') num+=2;
|
||||
player.draw(num);
|
||||
},
|
||||
},
|
||||
|
@ -3765,10 +3763,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(!marked&&name!='sha'&&name!='shan') continue;
|
||||
if(get.type(name)!='basic') continue;
|
||||
if(player.hasCard(lib.skill.sblongdan.getFilter(name,player),'hs')){
|
||||
if(event.filterCard({name:name},player,event)) return true;
|
||||
if(event.filterCard(get.autoViewAs({name},'unsure'),player,event)) return true;
|
||||
if(marked&&name=='sha'){
|
||||
for(var nature of lib.inpile_nature){
|
||||
if(event.filterCard({name:name,nature:nature},player,event)) return true;
|
||||
if(event.filterCard(get.autoViewAs({name,nature},'unsure'),player,event)) return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3783,10 +3781,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(!marked&&name!='sha'&&name!='shan') continue;
|
||||
if(get.type(name)!='basic') continue;
|
||||
if(player.hasCard(lib.skill.sblongdan.getFilter(name,player),'hs')){
|
||||
if(event.filterCard({name:name},player,event)) list.push(['基本','',name]);
|
||||
if(event.filterCard(get.autoViewAs({name},'unsure'),player,event)) list.push(['基本','',name]);
|
||||
if(marked&&name=='sha'){
|
||||
for(var nature of lib.inpile_nature){
|
||||
if(event.filterCard({name:name,nature:nature},player,event)) list.push(['基本','',name,nature])
|
||||
if(event.filterCard(get.autoViewAs({name,nature},'unsure'),player,event)) list.push(['基本','',name,nature])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -6675,8 +6673,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
sb_xiaoqiao:'谋小乔',
|
||||
sb_xiaoqiao_prefix:'谋',
|
||||
sbtianxiang:'天香',
|
||||
sbtianxiang_info:'①出牌阶段限三次,你可以交给一名没有“天香”标记的其他角色一张红色牌,然后令其获得此牌花色的“天香”标记。②当你受到伤害时,你可以移去一名角色的“天香”标记,若此“天香”标记为:红桃,你防止此伤害,其受到伤害来源对其造成的1点伤害(若没有伤害来源则改为无来源伤害);方片,其交给你两张牌。③准备阶段,你移去场上所有的“天香”标记,然后摸等量的牌。',
|
||||
sbtianxiang_info_versus_two:'①出牌阶段限三次,你可以交给一名没有“天香”标记的其他角色一张红色牌,然后令其获得此牌花色的“天香”标记。②当你受到伤害时,你可以移去一名角色的“天香”标记,若此“天香”标记为:红桃,你防止此伤害,其受到伤害来源对其造成的1点伤害(若没有伤害来源则改为无来源伤害);方片,其交给你两张牌。③准备阶段,你移去场上所有的“天香”标记,然后摸X张牌(X为移去的“天香”标记数+3)。',
|
||||
sbtianxiang_info_identity:'①出牌阶段限三次,你可以交给一名没有“天香”标记的其他角色一张红色牌,然后令其获得此牌花色的“天香”标记。②当你受到伤害时,你可以移去一名角色的“天香”标记,若此“天香”标记为:红桃,你防止此伤害,其受到伤害来源对其造成的1点伤害(若没有伤害来源则改为无来源伤害);方片,其交给你两张牌。③准备阶段,你移去场上所有的“天香”标记,然后摸等量的牌。',
|
||||
sbtianxiang_info:'①出牌阶段限三次,你可以交给一名没有“天香”标记的其他角色一张红色牌,然后令其获得此牌花色的“天香”标记。②当你受到伤害时,你可以移去一名角色的“天香”标记,若此“天香”标记为:红桃,你防止此伤害,其受到伤害来源对其造成的1点伤害(若没有伤害来源则改为无来源伤害);方片,其交给你两张牌。③准备阶段,你移去场上所有的“天香”标记,然后摸X张牌(X为移去的“天香”标记数+2)。',
|
||||
sb_sp_zhugeliang:'谋卧龙',
|
||||
sb_sp_zhugeliang_prefix:'谋',
|
||||
sb_zhugeliang:'谋诸葛亮',
|
||||
|
|
|
@ -150,7 +150,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
enable:'chooseToUse',
|
||||
filter:function(event,player){
|
||||
if(!player.hasCard(card=>get.suit(card)=='club','sh')) return false;
|
||||
return (event.type=='phase'||event.filterCard({name:'tiesuo'},player,event));
|
||||
return (event.type=='phase'||event.filterCard(get.autoViewAs({name:'tiesuo'},'unsure'),player,event));
|
||||
},
|
||||
position:'hs',
|
||||
filterCard:function(card,player,event){
|
||||
|
@ -816,24 +816,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
audio:2,
|
||||
enable:'phaseUse',
|
||||
filter:function(event,player){
|
||||
return player.storage.drlt_zhenrong&&player.storage.drlt_zhenrong.length>0;
|
||||
return player.getExpansions('drlt_zhenrong').length>0;
|
||||
},
|
||||
filterTarget:function(card,player,target){
|
||||
return target.countDiscardableCards(player,'ej')>0;
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
player.chooseCardButton(player.storage.drlt_zhenrong,1,'请选择需要弃置的“荣”',true).ai=function(button){
|
||||
player.chooseCardButton(player.getExpansions('drlt_zhenrong'),1,'请选择需要弃置的“荣”',true).ai=function(button){
|
||||
return 6-get.value(button.link);
|
||||
};
|
||||
'step 1'
|
||||
if(result.bool){
|
||||
var cards=result.links;
|
||||
for(var i=0;i<cards.length;i++){
|
||||
player.storage.drlt_zhenrong.remove(cards[i]);
|
||||
}
|
||||
player.syncStorage('drlt_zhenrong');
|
||||
player.$throw(cards);
|
||||
player.loseToDiscardpile(cards);
|
||||
player.discardPlayerCard(target,'ej',1,true);
|
||||
}
|
||||
},
|
||||
|
@ -2259,16 +2255,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
"nzry_chenglve1":{
|
||||
mod:{
|
||||
cardUsable:function(card,player){
|
||||
var cards=player.storage.nzry_chenglve1;
|
||||
for(var i=0;i<cards.length;i++){
|
||||
if(cards[i]==get.suit(card)) return Infinity;
|
||||
}
|
||||
const suit = get.suit(card);
|
||||
if (suit == 'unsure' || player.getStorage('nzry_chenglve1').includes(suit)) return Infinity;
|
||||
},
|
||||
targetInRange:function(card,player){
|
||||
var cards=player.storage.nzry_chenglve1;
|
||||
for(var i=0;i<cards.length;i++){
|
||||
if(cards[i]==get.suit(card)) return true;
|
||||
}
|
||||
const suit = get.suit(card);
|
||||
if (suit == 'unsure' || player.getStorage('nzry_chenglve1').includes(suit)) return true;
|
||||
}
|
||||
},
|
||||
onremove:true,
|
||||
|
@ -2762,7 +2754,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
player.discardPlayerCard(trigger.target,get.prompt('jianchu',trigger.target),true).set('ai',function(button){
|
||||
if(!_status.event.att) return 0;
|
||||
if(get.position(button.link)=='e'){
|
||||
if(get.subtype(button.link)=='equip2') return 2*get.value(button.link);
|
||||
if(get.subtype(button.link)=='equip2') return 2*get.value(button.link);
|
||||
return get.value(button.link);
|
||||
}
|
||||
return 1;
|
||||
|
@ -7293,6 +7285,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
}
|
||||
},
|
||||
// 蛊惑(guhuo)技能错误,请勿引用
|
||||
/*
|
||||
guhuo:{
|
||||
enable:'phaseUse',
|
||||
usable:1,
|
||||
|
@ -7361,6 +7355,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
threaten:1.6,
|
||||
}
|
||||
},
|
||||
*/
|
||||
huangtian:{
|
||||
unique:true,
|
||||
audio:'huangtian2',
|
||||
|
@ -7429,10 +7424,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(!player.countCards('hs')) return false;
|
||||
for(var i of lib.inpile){
|
||||
var type=get.type(i);
|
||||
if((type=='basic'||type=='trick')&&event.filterCard({name:i},player,event)) return true;
|
||||
if((type=='basic'||type=='trick')&&event.filterCard(get.autoViewAs({name:i},'unsure'),player,event)) return true;
|
||||
if(i=='sha'){
|
||||
for(var j of lib.inpile_nature){
|
||||
if(event.filterCard({name:i,nature:j},player,event)) return true;
|
||||
if(event.filterCard(get.autoViewAs({name:i,nature:j},'unsure'),player,event)) return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7442,11 +7437,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
dialog:function(event,player){
|
||||
var list=[];
|
||||
for(var i of lib.inpile){
|
||||
if(event.type!='phase') if(!event.filterCard({name:i},player,event)) continue;
|
||||
if(event.type!='phase') if(!event.filterCard(get.autoViewAs({name:i},'unsure'),player,event)) continue;
|
||||
var type=get.type(i);
|
||||
if(type=='basic'||type=='trick') list.push([type,'',i]);
|
||||
if(i=='sha'){
|
||||
if(event.type!='phase') if(!event.filterCard({name:i,nature:j},player,event)) continue;
|
||||
if(event.type!='phase') if(!event.filterCard(get.autoViewAs({name:i,nature:j},'unsure'),player,event)) continue;
|
||||
for(var j of lib.inpile_nature) list.push(['基本','','sha',j]);
|
||||
}
|
||||
}
|
||||
|
@ -7644,7 +7639,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
'step 3'
|
||||
game.delayx();
|
||||
game.broadcastAll(function(onEnd){
|
||||
_status.event.onEnd01=onEnd;
|
||||
_status.event.onEnd01=onEnd;
|
||||
if(_status.guhuoNode) _status.guhuoNode.listenTransition(onEnd,300);
|
||||
},event.onEnd01);
|
||||
'step 4'
|
||||
|
@ -7736,7 +7731,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
pangtong:['pangtong','ol_pangtong','re_pangtong','sb_pangtong'],
|
||||
re_jsp_pangtong:['re_jsp_pangtong','jsrg_pangtong','sp_pangtong'],
|
||||
taishici:['taishici','re_taishici','ol_sb_taishici'],
|
||||
re_yuanshao:['re_yuanshao','ol_yuanshao','xin_yuanshao','sb_yuanshao'],
|
||||
re_yuanshao:['re_yuanshao','ol_yuanshao','xin_yuanshao','ol_sb_yuanshao','sb_yuanshao'],
|
||||
pangde:['re_pangde','ol_pangde','pangde'],
|
||||
yanwen:['yanwen','ol_yanwen','re_yanwen'],
|
||||
caopi:['caopi','re_caopi','ps_caopi','sb_caopi'],
|
||||
|
|
|
@ -4986,7 +4986,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var num=Math.max(1,player.hp),target=trigger.player;
|
||||
player.chooseCard('he',get.prompt('sheyi',target),'交给其至少'+get.cnNumber(num)+'张牌,防止即将受到的伤害('+trigger.num+'点)',[num,player.countCards('he')]).set('goon',function(){
|
||||
if(get.attitude(player,target)<0) return false;
|
||||
if(trigger.num<target.hp&&get.damageEffect(target,trigger.source,player,trigger.nature)>=0) return false;
|
||||
if(trigger.num<target.hp&&get.damageEffect(target,trigger.source,player,trigger.nature)>=0) return false;
|
||||
if(trigger.num<2&&target.hp>trigger.num) return 6/Math.sqrt(num);
|
||||
if(target==get.zhu(player)) return 9;
|
||||
return 8/Math.sqrt(num);
|
||||
|
@ -5780,7 +5780,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(!player.countMark('spwuku')||!player.countCards('hse')||player.hasSkill('spmiewu2')) return false;
|
||||
for(var i of lib.inpile){
|
||||
var type=get.type2(i);
|
||||
if((type=='basic'||type=='trick')&&event.filterCard({name:i},player,event)) return true;
|
||||
if((type=='basic'||type=='trick')&&event.filterCard(get.autoViewAs({name:i},'unsure'),player,event)) return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
@ -5790,19 +5790,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
for(var i=0;i<lib.inpile.length;i++){
|
||||
var name=lib.inpile[i];
|
||||
if(name=='sha'){
|
||||
if(event.filterCard({name:name},player,event)) list.push(['基本','','sha']);
|
||||
for(var j of lib.inpile_nature){
|
||||
if(event.filterCard({name:name,nature:j},player,event)) list.push(['基本','','sha',j]);
|
||||
if(event.filterCard(get.autoViewAs({name},'unsure'),player,event)) list.push(['基本','','sha']);
|
||||
for(var nature of lib.inpile_nature){
|
||||
if(event.filterCard(get.autoViewAs({name,nature},'unsure'),player,event)) list.push(['基本','','sha',j]);
|
||||
}
|
||||
}
|
||||
else if(get.type2(name)=='trick'&&event.filterCard({name:name},player,event)) list.push(['锦囊','',name]);
|
||||
else if(get.type(name)=='basic'&&event.filterCard({name:name},player,event)) list.push(['基本','',name]);
|
||||
else if(get.type2(name)=='trick'&&event.filterCard(get.autoViewAs({name},'unsure'),player,event)) list.push(['锦囊','',name]);
|
||||
else if(get.type(name)=='basic'&&event.filterCard(get.autoViewAs({name},'unsure'),player,event)) list.push(['基本','',name]);
|
||||
}
|
||||
return ui.create.dialog('灭吴',[list,'vcard']);
|
||||
},
|
||||
filter:function(button,player){
|
||||
return _status.event.getParent().filterCard({name:button.link[2]},player,_status.event.getParent());
|
||||
},
|
||||
check:function(button){
|
||||
if(_status.event.getParent().type!='phase') return 1;
|
||||
var player=_status.event.player;
|
||||
|
@ -6527,11 +6524,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
liuzhang:['liuzhang','tw_liuzhang'],
|
||||
chenzhen:['sp_chenzhen','tw_chenzhen'],
|
||||
feiyi:['ol_feiyi','feiyi','tw_feiyi'],
|
||||
wangling:['wangling','tw_wangling'],
|
||||
wangling:['dc_wangling','wangling','tw_wangling'],
|
||||
qiaogong:['qiaogong','tw_qiaogong'],
|
||||
sp_chendong:['sp_chendong','tw_chendong','chendong'],
|
||||
sp_jiangqing:['sp_jiangqing','tw_jiangqing','jiangqing'],
|
||||
kongrong:['dc_kongrong','sp_kongrong','jsrg_kongrong','kongrong'],
|
||||
kongrong:['dc_kongrong','sp_kongrong','jsrg_kongrong','kongrong'],
|
||||
dc_mifuren:['dc_mifuren','sp_mifuren'],
|
||||
},
|
||||
translate:{
|
||||
|
@ -6661,7 +6658,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
spchijie_info:'每回合限一次。当你成为其他角色使用牌的唯一目标时,你可判定。若结果大于6,则你取消此牌的所有目标。',
|
||||
reduoji:'夺冀',
|
||||
reduoji_info:'出牌阶段限一次,你可将一张牌置于其他角色的武将牌上,称为“冀”。当有装备牌因使用而进入一名角色的装备区后,若该角色有“冀”且其为使用者,则你获得此装备牌,其移去一个“冀”并摸一张牌。一名其他角色的回合结束后,若其有“冀”,则你获得其的所有“冀”。',
|
||||
wangling:'王淩',
|
||||
wangling:'手杀王淩',
|
||||
wangling_prefix:'手杀',
|
||||
mouli:'谋立',
|
||||
mouli_info:'出牌阶段限一次,你可以将一张手牌交给一名其他角色,其获得如下效果直到你的下回合开始:其可以将黑色牌当做【杀】,红色牌当做【闪】使用。其第一次触发“使用【杀】/【闪】结算完成后”的时机时,你摸三张牌。',
|
||||
zifu:'自缚',
|
||||
|
@ -6769,7 +6767,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
dbchongjian_info:'吴势力技。你可以将一张装备牌当做一种【杀】(无距离限制且无视防具)或【酒】使用。当你以此法使用【杀】造成伤害后,你获得目标角色装备区内的X张牌(X为伤害值)。',
|
||||
dbchoujue:'仇决',
|
||||
dbchoujue_info:'锁定技。当你杀死其他角色后,你加1点体力上限并摸两张牌,然后本回合发动【却敌】的次数上限+1。',
|
||||
sp_chendong:'陈武董袭',
|
||||
sp_chendong:'手杀陈武董袭',
|
||||
sp_chendong_prefix:'手杀',
|
||||
spyilie:'毅烈',
|
||||
spyilie_info:'出牌阶段开始时,你可选择:①本阶段内使用【杀】的次数上限+1。②本回合内使用【杀】被【闪】抵消时,摸一张牌。③背水:失去1点体力,然后依次执行上述所有选项。',
|
||||
spfenming:'奋命',
|
||||
|
@ -6826,7 +6825,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
spjianyi_info:'锁定技。其他角色的回合结束时,若弃牌堆中有于本回合内因弃置而进入弃牌堆的防具牌,则你获得其中一张。',
|
||||
spshangyi:'尚义',
|
||||
spshangyi_info:'出牌阶段限一次。你可以弃置一张牌并选择一名其他角色。其观看你的手牌,然后你观看其手牌并获得其中的一张。',
|
||||
sp_lvfan:'吕范',
|
||||
sp_lvfan:'手杀吕范',
|
||||
sp_lvfan_prefix:'手杀',
|
||||
spdiaodu:'调度',
|
||||
spdiaodu_info:'准备阶段,你可令一名角色摸一张牌,然后移动其装备区内的一张牌。',
|
||||
spdiancai:'典财',
|
||||
|
|
719
character/sp.js
307
character/sp2.js
|
@ -4,6 +4,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
name:'sp2',
|
||||
connect:true,
|
||||
character:{
|
||||
liqueguosi:['male','qun',4,['xiongsuan']],
|
||||
star_zhangchunhua:['female','wei',3,['starliangyan','starminghui']],
|
||||
star_yuanshao:['male','qun',4,['starxiaoyan','starzongshi','starjiaowang','staraoshi'],['zhu']],
|
||||
star_dongzhuo:['male','qun',5,['starweilin','starzhangrong','starhaoshou'],['zhu']],
|
||||
star_yuanshu:['male','qun',4,['starcanxi','starpizhi','starzhonggu'],['zhu']],
|
||||
|
@ -37,7 +39,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
xinping:['male','qun',3,['fuyuan','zhongjie','yongdi']],
|
||||
zhangning:['female','qun',3,['tianze','difa']],
|
||||
tongyuan:['male','qun',4,['chaofeng','chuanshu']],
|
||||
sp_mifangfushiren:['male','shu',4,['dcmffengshi']],
|
||||
sp_mifangfushiren:['male','shu',4,['fengshi']],
|
||||
re_nanhualaoxian:['male','qun',4,['gongxiu','jinghe']],
|
||||
dufuren:['female','wei',3,['yise','shunshi']],
|
||||
caoanmin:['male','wei',4,['xianwei']],
|
||||
|
@ -96,7 +98,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
characterSort:{
|
||||
sp2:{
|
||||
sp_whlw:["xurong","lijue","zhangji","fanchou","guosi","duanwei","liangxing","zhangheng",'tangji','niufu','dongxie'],
|
||||
sp_whlw:["xurong","lijue","zhangji","fanchou","guosi","duanwei","liangxing","zhangheng",'tangji','niufu','dongxie','liqueguosi'],
|
||||
sp_zlzy:["zhangqiying","lvkai","zhanggong","weiwenzhugezhi","beimihu"],
|
||||
sp_longzhou:["xf_tangzi","xf_huangquan","xf_sufei","sp_liuqi"],
|
||||
sp_zizouqi:["mangyachang","xugong","zhangchangpu"],
|
||||
|
@ -111,12 +113,186 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
sp_xuzhou:['re_taoqian','caosong','zhangmiao','qiuliju'],
|
||||
sp_zhongyuan:['re_hucheer','re_zoushi','caoanmin','re_dongcheng'],
|
||||
sp_xiaohu:['haomeng','yanfuren','yanrou','dc_zhuling'],
|
||||
sp_star:['star_caoren','star_yuanshu','star_dongzhuo','star_yuanshao'],
|
||||
sp_star:['star_caoren','star_yuanshu','star_dongzhuo','star_yuanshao','star_zhangchunhua'],
|
||||
mini_qixian:['mp_liuling'],
|
||||
sp_decade:['caobuxing','re_maliang','dc_jikang'],
|
||||
}
|
||||
},
|
||||
skill:{
|
||||
//李傕郭汜
|
||||
xiongsuan:{
|
||||
audio:2,
|
||||
enable:'phaseUse',
|
||||
filterTarget:true,
|
||||
filterCard:lib.filter.cardDiscardable,
|
||||
position:'h',
|
||||
usable:1,
|
||||
async content(event,trigger,player){
|
||||
const target=event.target;
|
||||
await target.damage();
|
||||
await player.draw(3);
|
||||
if(target!=player) await player.loseHp();
|
||||
},
|
||||
ai:{
|
||||
order:9,
|
||||
result:{
|
||||
target(player,target){
|
||||
if(player.getHp()+player.countCards('hs',card=>player.canSaveCard(card,player))<=1) return 0;
|
||||
const num=get.sgn(get.attitude(player,target));
|
||||
if(num*get.damageEffect(target,player,player)>0) return num*get.damageEffect(target,player,player);
|
||||
if(target==player) return 0.00001;
|
||||
return 0;
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
//张春华
|
||||
starliangyan:{
|
||||
audio:2,
|
||||
enable:'phaseUse',
|
||||
usable:1,
|
||||
filterTarget:lib.filter.notMe,
|
||||
chooseButton:{
|
||||
dialog(event,player){
|
||||
const name=get.translation(event.result.targets[0]);
|
||||
const list=[
|
||||
'你摸一张牌,其弃置一张牌','你弃置一张牌,其摸一张牌',
|
||||
'你摸两张牌,其弃置两张牌','你弃置两张牌,其摸两张牌'
|
||||
].map((item,i)=>[i,item]);
|
||||
const dialog=ui.create.dialog(
|
||||
`梁燕:请选择你与${name}要执行的选项`,
|
||||
[list.slice(0,2),'tdnodes'],
|
||||
[list.slice(2,4),'tdnodes'],
|
||||
'hidden'
|
||||
);
|
||||
return dialog;
|
||||
},
|
||||
filter(button,player){
|
||||
const link=button.link;
|
||||
if(link%2===0) return true;
|
||||
return player.countDiscardableCards(player,'he')>=(link+1)/2;
|
||||
},
|
||||
check(button){
|
||||
const player=get.player(),target=get.event().getParent().result.targets[0];
|
||||
const link=button.link;
|
||||
if(get.attitude(player,target)<=0&&link===2) return 100;
|
||||
const ph=player.countCards('h'),th=target.countCards('h');
|
||||
if(link%2===0){
|
||||
const num=(link/2)+1;
|
||||
if(ph+num===th-num) return 10;
|
||||
}
|
||||
else{
|
||||
const num=(link+1)/2;
|
||||
if(ph-num===th+num) return 10;
|
||||
}
|
||||
return 5;
|
||||
},
|
||||
backup(links){
|
||||
return {
|
||||
audio:'starliangyan',
|
||||
target:get.event().result.targets[0],
|
||||
link:links[0],
|
||||
filterTarget(card,player,target){
|
||||
return target===lib.skill.starliangyan_backup.target;
|
||||
},
|
||||
selectTarget:-1,
|
||||
async content(content,trigger,player){
|
||||
const target=lib.skill.starliangyan_backup.target;
|
||||
const link=lib.skill.starliangyan_backup.link;
|
||||
const num=link<=1?1:2;
|
||||
const fn=['draw','chooseToDiscard'];
|
||||
if(link%2===1) fn.reverse();
|
||||
await player[fn[0]](num,true,'he');
|
||||
await target[fn[1]](num,true,'he');
|
||||
if(player.countCards('h')===target.countCards('h')){
|
||||
const skipper=[player,target][link%2];
|
||||
skipper.skip('phaseDiscard');
|
||||
game.log(skipper,'跳过了下一个','#y弃牌阶段');
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
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;
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
starminghui:{
|
||||
audio:2,
|
||||
trigger:{global:'phaseEnd'},
|
||||
filter(event,player){
|
||||
return player.isMinHandcard()||player.isMaxHandcard();
|
||||
},
|
||||
direct:true,
|
||||
async content(event,trigger,player){
|
||||
let logged=false;
|
||||
if(player.isMinHandcard()){
|
||||
const card=new lib.element.VCard({
|
||||
name:'sha',
|
||||
});
|
||||
const result=await player.chooseUseTarget(`###${get.prompt('starminghui')}###视为使用一张无距离限制的【杀】`,card,false,'nodistance').set('logSkill','starminghui').forResult();
|
||||
if(result.bool) logged=true;
|
||||
}
|
||||
const num=player.countCards('h');
|
||||
if(player.isMaxHandcard()&&num>0){
|
||||
const maxNum=game.findPlayer(current=>{
|
||||
return !game.hasPlayer(current2=>{
|
||||
if(current2===player) return false;
|
||||
return current2.countCards('h')>current.countCards('h');
|
||||
});
|
||||
}).countCards('h');
|
||||
const leastDiscardNum=num-maxNum+1;
|
||||
const prompt=logged?`是否将手牌弃置至不为最多?`:get.prompt('starminghui');
|
||||
const next=player.chooseToDiscard(prompt,`弃置至少${get.cnNumber(leastDiscardNum)}张手牌,然后你令一名角色回复1点体力`)
|
||||
.set('selectCard',[leastDiscardNum,Infinity])
|
||||
.set('goon',game.hasPlayer(current=>get.recoverEffect(current,get.player(),get.player())))
|
||||
.set('ai',card=>{
|
||||
if(!get.event('goon')) return 0;
|
||||
if(get.tag(card,'recover')) return 0;
|
||||
if(ui.selected.cards.length===get.event('selectCard')[0]-1) return 6.5-get.value(card);
|
||||
return 4-get.value(card);
|
||||
});
|
||||
if(!logged) next.set('logSkill','starminghui');
|
||||
const result=await next.forResult();
|
||||
if(!result.bool) return;
|
||||
if(!player.isUnderControl(true)&&!player.isOnline()) await game.asyncDelayx();
|
||||
const [bool,targets]=await player.chooseTarget('令一名角色回复1点体力')
|
||||
.set('ai',target=>get.recoverEffect(target,get.player(),get.player()))
|
||||
.forResult('bool','targets');
|
||||
if(bool){
|
||||
const target=targets[0];
|
||||
player.line(target,'green');
|
||||
await target.recover();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
},
|
||||
//星袁绍
|
||||
starxiaoyan:{
|
||||
audio:2,
|
||||
|
@ -698,16 +874,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
audio:2,
|
||||
enable:'chooseToUse',
|
||||
filter:function(event,player){
|
||||
if(!event.filterCard({name:'sha'},player,event)&&!event.filterCard({name:'wuxie'},player,event)) return false;
|
||||
return player.countCards('hs',card=>{
|
||||
return !player.getStorage('starlifeng_count').includes(get.color(card,player))||_status.connectMode;
|
||||
});
|
||||
if(!event.filterCard(get.autoViewAs({name:'sha'},'unsure'),player,event)&&!event.filterCard(get.autoViewAs({name:'wuxie'},'unsure'),player,event)) return false;
|
||||
return player.hasCard(card=>{
|
||||
return !player.getStorage('starlifeng_count').includes(get.color(card,player));
|
||||
},'hs');
|
||||
},
|
||||
chooseButton:{
|
||||
dialog:function(event,player){
|
||||
var list=[];
|
||||
if(event.filterCard({name:'sha'},player,event)) list.push(['基本','','sha']);
|
||||
if(event.filterCard({name:'wuxie'},player,event)) list.push(['锦囊','','wuxie']);
|
||||
if(event.filterCard(get.autoViewAs({name:'sha'},'unsure'),player,event)) list.push(['基本','','sha']);
|
||||
if(event.filterCard(get.autoViewAs({name:'wuxie'},'unsure'),player,event)) list.push(['锦囊','','wuxie']);
|
||||
return ui.create.dialog('砺锋',[list,'vcard']);
|
||||
},
|
||||
check:function(button){
|
||||
|
@ -1390,10 +1566,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
mod:{
|
||||
targetInRange:function(card,player){
|
||||
if(get.color(card)=='none') return true;
|
||||
const color = get.color(card);
|
||||
if (color === 'none' || color === 'unsure') return true;
|
||||
},
|
||||
cardUsable:function(card){
|
||||
if(get.color(card)=='none') return Infinity;
|
||||
const color = get.color(card);
|
||||
if (color === 'none' || color === 'unsure') return Infinity;
|
||||
},
|
||||
}
|
||||
},
|
||||
|
@ -1483,10 +1661,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(i!=skills.length-1) str+='、';
|
||||
}
|
||||
game.log(target,'的技能','#g'+str,'失效了');
|
||||
game.log(player,'获得了技能','#g'+str);
|
||||
// game.log(player,'获得了技能','#g'+str);
|
||||
player.popup(skills,'thunder');
|
||||
for(var skill of skills){
|
||||
player.addTempSkill(skill,['phaseUseAfter','phaseAfter']);
|
||||
player.addTempSkills(skill,['phaseUseAfter','phaseAfter']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1569,10 +1747,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(i!=skills.length-1) str+='、';
|
||||
}
|
||||
game.log(target,'的技能','#g'+str,'失效了');
|
||||
game.log(player,'获得了技能','#g'+str);
|
||||
// game.log(player,'获得了技能','#g'+str);
|
||||
player.popup(skills,'thunder');
|
||||
for(var skill of skills){
|
||||
player.addTempSkill(skill,['phaseUseAfter','phaseAfter']);
|
||||
player.addTempSkills(skill,['phaseUseAfter','phaseAfter']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3267,15 +3445,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
else{
|
||||
switch(type){
|
||||
case 'basic':
|
||||
if(sha>0&&get.name(card)=='sha'){
|
||||
if(sha>0&&get.name(i)=='sha'){
|
||||
sha--;
|
||||
var add=3;
|
||||
if(!player.hasValueTarget(card)&&player.hasValueTarget(card,false)) add+=player.getUseValue(card,false);
|
||||
if(!player.hasValueTarget(i)&&player.hasValueTarget(i,false)) add+=player.getUseValue(i,false);
|
||||
eff+=add;
|
||||
}
|
||||
break
|
||||
case 'trick':
|
||||
if(player.hasValueTarget(card)) eff+=6;
|
||||
if(player.hasValueTarget(i)) eff+=6;
|
||||
break;
|
||||
case 'equip':
|
||||
if(player.hasValueTarget({name:'guohe_copy2'})) eff+=player.getUseValue({name:'guohe_copy2'});
|
||||
|
@ -3292,15 +3470,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(type==control) continue;
|
||||
switch(type){
|
||||
case 'basic':
|
||||
if(sha>0&&get.name(card)=='sha'){
|
||||
if(sha>0&&get.name(i)=='sha'){
|
||||
sha--;
|
||||
var add=3;
|
||||
if(!player.hasValueTarget(card)&&player.hasValueTarget(card,false)) add+=player.getUseValue(card,false);
|
||||
if(!player.hasValueTarget(i)&&player.hasValueTarget(i,false)) add+=player.getUseValue(i,false);
|
||||
eff+=add;
|
||||
}
|
||||
break
|
||||
case 'trick':
|
||||
if(player.hasValueTarget(card)) eff+=6;
|
||||
if(player.hasValueTarget(i)) eff+=6;
|
||||
break;
|
||||
case 'equip':
|
||||
if(player.hasValueTarget({name:'guohe_copy2'})) eff+=player.getUseValue({name:'guohe_copy2'});
|
||||
|
@ -6224,10 +6402,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
},
|
||||
targetInRange:function(card){
|
||||
if(get.color(card)=='black') return true;
|
||||
const color = get.color(card);
|
||||
if (color === 'black' || color === 'unsure') return true;
|
||||
},
|
||||
cardUsable:function(card){
|
||||
if(get.color(card)=='black') return Infinity;
|
||||
const color = get.color(card);
|
||||
if (color === 'black' || color === 'unsure') return Infinity;
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -10577,6 +10757,72 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
},
|
||||
//糜芳傅士仁
|
||||
fengshi:{
|
||||
audio:'mffengshi',
|
||||
audioname:['sp_mifangfushiren'],
|
||||
trigger:{player:'useCardToPlayered'},
|
||||
filter(event,player){
|
||||
if(!event.isFirstTarget) return false;
|
||||
return event.targets.some(target=>{
|
||||
return player.countCards('h')>target.countCards('h')&&target.countCards('he')>0&&player.hasCard(card=>{
|
||||
return lib.filter.cardDiscardable(card,player,'fengshi');
|
||||
},'he');
|
||||
});
|
||||
},
|
||||
direct:true,
|
||||
async content(event,trigger,player){
|
||||
const {result:{bool,targets}}=await player.chooseTarget(get.prompt('fengshi'),'弃置你与一名目标角色的各一张牌,然后令'+get.translation(event.card)+'对其造成的伤害+1',(card,player,target)=>{
|
||||
const targets=get.event().getTrigger().targets;
|
||||
if(!targets.includes(target)) return false;
|
||||
return player.countCards('h')>target.countCards('h')&&target.countCards('he')>0&&player.hasCard(card=>{
|
||||
return lib.filter.cardDiscardable(card,player,'fengshi');
|
||||
},'he');
|
||||
}).set('ai',target=>{
|
||||
const player=get.event('player');
|
||||
const card=get.event().getTrigger().card;
|
||||
if(!get.info('dcmffengshi').check({card:card,target:target})) return 0;
|
||||
return get.effect(target,{name:'guohe_copy2'},player,player);
|
||||
});
|
||||
if(bool){
|
||||
const target=targets[0];
|
||||
player.logSkill('fengshi',target);
|
||||
await player.chooseToDiscard('he',true);
|
||||
await player.discardPlayerCard(target,'he',true);
|
||||
if(get.tag(trigger.card,'damage')){
|
||||
var id=target.playerid;
|
||||
var map=trigger.getParent().customArgs;
|
||||
if(!map[id]) map[id]={};
|
||||
if(typeof map[id].extraDamage!='number') map[id].extraDamage=0;
|
||||
map[id].extraDamage++;
|
||||
}
|
||||
}
|
||||
},
|
||||
group:'fengshi_target',
|
||||
subSkill:{
|
||||
target:{
|
||||
inherit:'dcmffengshi',
|
||||
trigger:{target:'useCardToTargeted'},
|
||||
filter(event,player){
|
||||
if(event.player==event.target) return false;
|
||||
return event.player.countCards('h')>player.countCards('h')&&event.player.countCards('he')>0&&player.hasCard(card=>{
|
||||
return lib.filter.cardDiscardable(card,player,'fengshi');
|
||||
},'he');
|
||||
},
|
||||
async content(event,trigger,player){
|
||||
const target=trigger.player;
|
||||
await player.chooseToDiscard('he',true);
|
||||
await player.discardPlayerCard(target,'he',true);
|
||||
if(get.tag(trigger.card,'damage')){
|
||||
var id=player.playerid;
|
||||
var map=trigger.getParent().customArgs;
|
||||
if(!map[id]) map[id]={};
|
||||
if(typeof map[id].extraDamage!='number') map[id].extraDamage=0;
|
||||
map[id].extraDamage++;
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
dcmffengshi:{
|
||||
audio:'mffengshi',
|
||||
audioname:['sp_mifangfushiren'],
|
||||
|
@ -10602,7 +10848,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(viewer==player){
|
||||
if(get.attitude(viewer,target)>=0) return false;
|
||||
if(player.countCards('he',(card)=>get.value(card,player)<5)) return true;
|
||||
var card=_status.event.getTrigger().card;
|
||||
var card=get.event().getTrigger().card;
|
||||
if((get.tag(card,'damage')||target.countCards('he',(card)=>get.value(card,target)>6))&&player.countCards('he',(card)=>get.value(card,player)<7)) return true;
|
||||
return false;
|
||||
}
|
||||
|
@ -10793,7 +11039,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
dingyuan:['ol_dingyuan','dingyuan'],
|
||||
quyi:['quyi','re_quyi'],
|
||||
hansui:['hansui','re_hansui','xin_hansui','jsrg_hansui'],
|
||||
jin_simashi:['jin_simashi','simashi'],
|
||||
jin_simashi:['dc_simashi','jin_simashi','simashi'],
|
||||
jin_yanghuiyu:['jin_yanghuiyu','yanghuiyu'],
|
||||
taoqian:['re_taoqian','taoqian'],
|
||||
sp_liubei:['jsrg_liubei','sp_liubei'],
|
||||
|
@ -11201,6 +11447,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
mffengshi_info:'当你使用牌指定唯一目标后,或成为其他角色使用牌的唯一目标后,若此牌使用者的手牌数大于此牌目标的手牌数,则此牌的使用者可令你弃置自己和对方的各一张牌,并令此牌的伤害值+1。',
|
||||
dcmffengshi:'锋势',
|
||||
dcmffengshi_info:'当你使用牌指定唯一目标后,或成为其他角色使用牌的唯一目标后,若此牌使用者的手牌数大于此牌目标的手牌数,则你可弃置自己和对方的各一张牌,并令此牌的伤害值+1。',
|
||||
fengshi:'锋势',
|
||||
fengshi_info:'当你使用牌指定第一个目标后,你可弃置你与其中一名手牌数小于你的目标角色的各一张牌,并令此牌对其造成的伤害+1;当你成为其他角色使用牌的目标后,若你的手牌数小于其,则你可以弃置你与其的各一张牌,并令此牌对你造成的伤害+1。',
|
||||
tongyuan:'童渊',
|
||||
chaofeng:'朝凤',
|
||||
chaofeng_info:'出牌阶段限一次。当你造成伤害时,你可以弃置一张牌,然后摸一张牌。若此伤害的渠道为牌且你弃置的牌:与此牌颜色相同,则你改为摸两张牌;与此牌类型相同,则此伤害+1。',
|
||||
|
@ -11383,6 +11631,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
starjiaowang_info:'锁定技,非首轮游戏开始时,若上一轮没有角色死亡(因〖硝焰〗死亡的角色除外),则你失去1点体力并发动〖硝焰〗。',
|
||||
staraoshi:'傲势',
|
||||
staraoshi_info:'主公技,其他群势力角色的出牌阶段限一次,其可以交给你一张手牌,然后你可以发动一次〖纵势〗。',
|
||||
star_zhangchunhua:'星张春华',
|
||||
star_zhangchunhua_prefix:'星',
|
||||
starliangyan:'梁燕',
|
||||
starliangyan_info:'出牌阶段限一次。你可以选择一名其他角色,你摸/弃置至多两张牌,令其弃置/摸等量的牌。然后若你与其手牌数相同,以此法摸牌的角色跳过其下一个弃牌阶段。',
|
||||
starminghui:'明慧',
|
||||
starminghui_info:'一名角色的回合结束时,若你的手牌数:最少,你可以视为使用一张无距离限制的【杀】;最多,你可以将手牌弃置至你手牌数不为最多,然后令一名角色回复1点体力。',
|
||||
liqueguosi:'李傕郭汜',
|
||||
xiongsuan:'凶算',
|
||||
xiongsuan_info:'出牌阶段限一次,你可以弃置一张手牌并对一名角色造成1点伤害,然后你摸三张牌。若该角色不为你,你失去1点体力。',
|
||||
|
||||
sp_whlw:"文和乱武",
|
||||
sp_zlzy:"逐鹿中原",
|
||||
|
|
|
@ -224,7 +224,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(event.responded) return false;
|
||||
if(player.storage.hujiaing) return false;
|
||||
if(!player.hasZhuSkill('hujia')) return false;
|
||||
if(!event.filterCard({name:'shan'},player,event)) return false;
|
||||
if(!event.filterCard({name:'shan',isCard:true},player,event)) return false;
|
||||
return game.hasPlayer(current=>current!=player&¤t.group=='wei');
|
||||
},
|
||||
check(event,player){
|
||||
|
@ -2339,7 +2339,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
sp_zhangliao:['sp_zhangliao','yj_zhangliao','jsrg_zhangliao'],
|
||||
xiahoudun:['xiahoudun','re_xiahoudun','xin_xiahoudun'],
|
||||
liubei:['liubei','re_liubei','sb_liubei','dc_liubei','junk_liubei'],
|
||||
guanyu:['guanyu','re_guanyu','ol_sb_guanyu','sb_guanyu','ps_guanyu','old_guanyu'],
|
||||
guanyu:['guanyu','re_guanyu','ol_sb_guanyu','sb_guanyu','ps_guanyu','old_guanyu','junk_guanyu'],
|
||||
zhangfei:['zhangfei','re_zhangfei','old_zhangfei','xin_zhangfei','sb_zhangfei','tw_zhangfei','jsrg_zhangfei','yj_zhangfei'],
|
||||
zhaoyun:['zhaoyun','re_zhaoyun','old_zhaoyun','sb_zhaoyun','jsrg_zhaoyun','ps2063_zhaoyun','ps2067_zhaoyun'],
|
||||
sp_zhaoyun:['sp_zhaoyun','jsp_zhaoyun'],
|
||||
|
|
|
@ -9768,7 +9768,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
gxianyin_info:'出牌阶段限一次,你可以选择一种花色,将你的手牌中该花色的牌移至弃牌堆,然后选择另一种花色,从牌堆中获得等量的该花色的牌。',
|
||||
// gxianyin_info_alter:'',
|
||||
cyxianjiang:'仙匠',
|
||||
cyxianjiang_info:'每当你使用一张牌指定惟一目标时,你可以复制对方装备区内的一张你没有的牌,并置入你的装备区,每回合对一名角色最多发动一次。',
|
||||
cyxianjiang_info:'每当你使用一张牌指定唯一目标时,你可以复制对方装备区内的一张你没有的牌,并置入你的装备区,每回合对一名角色最多发动一次。',
|
||||
cyqiaoxie:'巧械',
|
||||
cyqiaoxie_info:'每当你失去一张装备牌(使用除外),你可以随机观看三张机关牌,并使用其中一张。',
|
||||
cyqiaoxie_info_alter:'每当你装备一件装备,若你的手牌数不大于体力值,你可以摸一张牌;每当你失去一件装备牌,你可以随机观看2张机关牌,并使用其中一张。',
|
||||
|
@ -9923,7 +9923,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
pingshen2:'凭神',
|
||||
pingshen_info:'锁定技,受到过你的伤害的角色可在回合内对你发动一次【离魂】(每局限发动一次)。',
|
||||
xingzhui:'星坠',
|
||||
xingzhui_info:'出牌阶段限一次,你可以弃置一张牌,并令一名有牌的其他角色弃置一张类别相同的牌,若则受到1点伤害。',
|
||||
xingzhui_info:'出牌阶段限一次,你可以弃置一张牌,并令一名有牌的其他角色弃置一张类别相同的牌,否则受到1点伤害。',
|
||||
lingxian:'凌仙',
|
||||
lingxian_info:'每当你于回合外使用或打出一张手牌,你可以选择攻击范围外的一名其他角色与你各摸一张牌。',
|
||||
shouyin:'守印',
|
||||
|
@ -9965,7 +9965,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
xiaomoyu:'魔愈',
|
||||
xiaomoyu_info:'锁定技,每当你于一个回合内首次造成伤害,你回复1点体力,若你没有受伤,则改为摸一张牌。',
|
||||
yihua:'移花',
|
||||
yihua_info:'每当你成为其他角色的某张卡牌的惟一目标时,你可以弃置两张手牌,将使用者与目标对调。',
|
||||
yihua_info:'每当你成为其他角色的某张卡牌的唯一目标时,你可以弃置两张手牌,将使用者与目标对调。',
|
||||
youyin:'游吟',
|
||||
youyin_info:'每当有其他角色弃置卡牌时,若其中有非基本牌且你的手牌数不超过5,你可以摸一张牌。',
|
||||
rexue:'热血',
|
||||
|
|
210
character/tw.js
|
@ -575,7 +575,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
target.addTempSkill(control,{player:'phaseAfter'});
|
||||
target.addTempSkill('twhuajing_blocker',{player:'phaseAfter'});
|
||||
target.getHistory('custom').push({twhuajing_skills:[control]});
|
||||
await player.draw();
|
||||
await player.draw(2);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -610,14 +610,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
return cards;
|
||||
},
|
||||
direct:true,
|
||||
//direct:true,
|
||||
frequent:true,
|
||||
async content(event,trigger,player){
|
||||
const cards=lib.skill.twdengjian.getCards(player,trigger.player);
|
||||
const {result:{bool}}=await player.chooseToDiscard(get.prompt('twdengjian'),'he')
|
||||
/*const {result:{bool}}=await player.chooseToDiscard(get.prompt('twdengjian'),'he')
|
||||
.set('prompt2','弃置一张牌并随机获得本回合所有造成伤害的牌对应的实体牌的其中一张与你本轮以此法获得的牌的颜色均不同的【杀】')
|
||||
.set('ai',card=>7-get.value(card))
|
||||
.set('logSkill','twdengjian');
|
||||
if(bool) player.gain(cards.randomGet(),'gain2').gaintag.add('twdengjianx');
|
||||
if(bool) */player.gain(cards.randomGet(),'gain2').gaintag.add('twdengjianx');
|
||||
},
|
||||
group:'twdengjian_buff',
|
||||
subSkill:{
|
||||
|
@ -898,7 +899,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
forced:true,
|
||||
async content(event,trigger,player){
|
||||
const num=player.getHistory('sourceDamage',evt=>evt.card&&evt.card==trigger.card).reduce((sum,evt)=>sum+evt.num,0);
|
||||
//const num=player.getHistory('sourceDamage',evt=>evt.card&&evt.card==trigger.card).reduce((sum,evt)=>sum+evt.num,0);
|
||||
const num=game.countPlayer2(target=>{
|
||||
return target.hasHistory('damage',evt=>{
|
||||
return evt.card&&evt.card==trigger.card;
|
||||
});
|
||||
});
|
||||
const num2=1+player.getAllHistory('custom',evt=>evt.twzhongyi).length;
|
||||
let choice=['摸牌'],choiceList=['摸'+get.cnNumber(num)+'张牌'];
|
||||
if(player.isDamaged()){
|
||||
|
@ -973,9 +979,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
trigger:{global:'phaseEnd'},
|
||||
filter(event,player){
|
||||
const card=new lib.element.VCard({name:'sha'});
|
||||
return player.hasUseTarget(card)&&player.getHistory('useSkill',evt=>{
|
||||
return player.hasUseTarget(card)&&/*player.getHistory('useSkill',evt=>{
|
||||
return evt.skill=='twchue_gain';
|
||||
}).length&&player.getHp()&&player.countMark('twchue')>=player.getHp();
|
||||
}).length&&player.getHp()&&*/player.countMark('twchue')>=player.getHp();
|
||||
},
|
||||
check(event,player){
|
||||
return player.hasValueTarget(new lib.element.VCard({name:'sha'}));
|
||||
|
@ -2031,7 +2037,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
filter(event,player){
|
||||
if(!player.hasZhuSkill('twniju')) return false;
|
||||
if(event.iwhile||(event.target&&event.compareMeanwhile)) return false;
|
||||
return true;
|
||||
const participant=[event.player];
|
||||
if(event.targets) participant.addArray(event.targets);
|
||||
else participant.add(event.target);
|
||||
return participant.includes(player);
|
||||
},
|
||||
direct:true,
|
||||
async content(event,trigger,player){
|
||||
|
@ -4334,7 +4343,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
player.awakenSkill('twmibei');
|
||||
player.logSkill('twmibei_achieve');
|
||||
game.log(player,'成功完成使命');
|
||||
player.addSkils('twmouli');
|
||||
player.addSkills('twmouli');
|
||||
},
|
||||
intro:{content:'已使用牌名:$'},
|
||||
subSkill:{
|
||||
|
@ -4676,27 +4685,75 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
game.addVideo('delay',null,2);
|
||||
'step 1'
|
||||
var list=['basic','trick','equip'].filter(type=>cards.some(card=>get.type2(card)==type));
|
||||
let fs=game.filterPlayer(i=>get.attitude(_status.event.player,i)>0).sort((a,b)=>{
|
||||
if(a===player){//尽量把player往前放
|
||||
if(a.hp<b.hp) return 1;
|
||||
return -1;
|
||||
}
|
||||
if(b===player){
|
||||
if(b.hp<a.hp) return -1;
|
||||
return 1;
|
||||
}
|
||||
return b.hp-a.hp;
|
||||
}),
|
||||
es=game.filterPlayer(i=>get.attitude(_status.event.player,i)<0).sort((a,b)=>a.hp-b.hp),
|
||||
types=list.map(type=>{
|
||||
let num=0;
|
||||
for(let i of event.cards){
|
||||
if(get.type2(i)==type) num++;
|
||||
}
|
||||
return [type,num];
|
||||
}).sort((a,b)=>b[1]-a[1]);
|
||||
event.tempCache={
|
||||
max:-Infinity,
|
||||
tars:[]
|
||||
};
|
||||
for(let idx=0;idx<types.length;idx++){
|
||||
let f,e,temp=0,tars=[],type=types[idx][1];
|
||||
if(es.length*3>=type){//都分给敌人
|
||||
e=-type;
|
||||
while(temp<es.length&&temp<type){
|
||||
e+=10/(2+es[temp].hp);
|
||||
tars.push(es[temp]);
|
||||
temp++;
|
||||
}
|
||||
if(e>event.tempCache.max){
|
||||
event.tempCache.type=types[idx][0];
|
||||
event.tempCache.max=e;
|
||||
event.tempCache.tars=tars.slice(0);
|
||||
delete event.tempCache.more;
|
||||
}
|
||||
}
|
||||
if(fs.length*3>=type){//都分给队友
|
||||
tars=[];
|
||||
f=type-10/(2+fs[0].hp);
|
||||
temp=type-Math.max(3,type);//让血厚的尽可能多拿
|
||||
if(temp){
|
||||
if(fs.length<3){
|
||||
tars.push(fs[1]);
|
||||
if(temp>=3) f-=10/(2+fs[1].hp);
|
||||
}
|
||||
else{
|
||||
if(player!==fs[0]){
|
||||
tars.push(player);
|
||||
temp-=Math.max(2,temp);
|
||||
}
|
||||
if(temp) tars.addArray(fs.filter(i=>fs[0]!==i&&player!==i).sort((a,b)=>{
|
||||
return get.attitude(_status.event.player,b)-get.attitude(_status.event.player,a);
|
||||
}).slice(temp<3?-1:-2));
|
||||
}
|
||||
}
|
||||
if(f>event.tempCache.max){
|
||||
event.tempCache.type=types[idx][0];
|
||||
event.tempCache.max=f;
|
||||
event.tempCache.more=fs[0];
|
||||
event.tempCache.tars=tars.slice(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
player.chooseControl(list).set('ai',function(){
|
||||
var listy=['basic','trick','equip'],listz=[0,0,0];
|
||||
var num=0,numx=0,num2=0,numx2=0;
|
||||
for(var i of _status.event.getParent().cards){
|
||||
for(var j=0;j<2;j++){
|
||||
if(get.type2(i)==listy[j]) listz[j]++;
|
||||
}
|
||||
}
|
||||
for(var k=0;k<2;k++){
|
||||
if(listz[k]>num){
|
||||
num=listz[k];
|
||||
numx=k;
|
||||
}
|
||||
if(listz[k]<num2){
|
||||
num2=listz[k];
|
||||
numx2=k;
|
||||
}
|
||||
}
|
||||
if(!_status.event.player.hasFriend()&&player.hp>2) return listy[numx2];
|
||||
return listy[numx];
|
||||
});
|
||||
return _status.event.type;
|
||||
}).set('type',event.tempCache.type);
|
||||
'step 2'
|
||||
game.broadcastAll('closeDialog',event.videoId);
|
||||
event.cardsx=[];
|
||||
|
@ -4714,7 +4771,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
'step 3'
|
||||
if(event.cardsx.length>1){
|
||||
player.chooseCardButton('兴乱:请选择要分配的牌',true,event.cardsx,[1,Math.min(3,event.cardsx.length)]).set('ai',function(button){
|
||||
if(ui.selected.buttons.length==0) return 1;
|
||||
if(ui.selected.buttons.length==0) return get.buttonValue(button);
|
||||
return 0;
|
||||
});
|
||||
}
|
||||
|
@ -4733,18 +4790,25 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var togive=_status.event.getParent().togive;
|
||||
return (map[target.playerid]||[]).length+togive.length<=3;
|
||||
}).set('ai',function(target){
|
||||
var player=_status.event.player,att=get.attitude(player,target);
|
||||
var map=_status.event.getParent().given_map;
|
||||
var togive=_status.event.getParent().togive;
|
||||
var num=(map[player.playerid]||[]).length,num2=(map[target.playerid]||[]).length;
|
||||
var value=_status.event.value,eff=get.effect(target,{name:'losehp'},player,player);
|
||||
if(num2+togive.length==num&&player!=target) return value*Math.sign(att)+eff+1000;
|
||||
else{
|
||||
if(value<0) return -att+1000;
|
||||
else if(att>0) return 1.5*att/(1+target.countCards('h'))+(player==target?eff/3:0)+1000;
|
||||
else return att/100+1000;
|
||||
let targets=_status.event.targets,att=get.attitude(_status.event.player,target);
|
||||
if(targets.length){
|
||||
if(targets.includes(target)) return Math.max(1,att*_status.event.value);
|
||||
return 0;
|
||||
}
|
||||
}).set('value',cards.reduce((p,c)=>p+get.value(c,player,'raw'),0));
|
||||
return att*_status.event.value;
|
||||
}).set('value',cards.reduce((p,c)=>p+get.value(c,player,'raw'),0)).set('more',event.tempCache.more).set('targets',function(){
|
||||
let arr=[],arr2=[];
|
||||
if(event.tempCache.more&&(event.given_map[event.tempCache.more.playerid]||[]).length+cards.length<=3) return [event.tempCache.more];
|
||||
for(let cur of event.tempCache.tars){
|
||||
let map=(event.given_map[cur.playerid]||[]).length;
|
||||
if(map+cards.length<=3){
|
||||
if(map) arr2.push(cur);
|
||||
else arr.push(cur);
|
||||
}
|
||||
}
|
||||
if(arr.length) return arr;
|
||||
return arr2;
|
||||
}());
|
||||
}
|
||||
'step 5'
|
||||
if(result.bool){
|
||||
|
@ -6194,7 +6258,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
mod:{
|
||||
cardUsable:function(card,player){
|
||||
if(card.name=='sha'&&player.getStorage('twgongji2').includes(get.suit(card))) return Infinity;
|
||||
if(card.name=='sha'){
|
||||
const suit = get.suit(card);
|
||||
return suit === 'unsure' || player.getStorage('twgongji2').includes(suit);
|
||||
}
|
||||
},
|
||||
aiOrder:function(player,card,num){
|
||||
if(get.name(card)=='sha'&&!player.getStorage('twgongji2').includes(get.suit(card))) return num+1;
|
||||
|
@ -6336,7 +6403,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
return !player.hasHistory('useSkill',function(evt){
|
||||
return evt.skill=='twshuangren';
|
||||
})&&!player.hasHistory('sourceDamage',function(evt){
|
||||
return evt.card.name=='sha';
|
||||
return evt.card&&evt.card.name=='sha';
|
||||
});
|
||||
},
|
||||
direct:true,
|
||||
|
@ -9484,8 +9551,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
filter:function(event,player){
|
||||
const names=[];
|
||||
if(event.filterCard({name:'sha'},player,event)) names.push('shan');
|
||||
if(event.filterCard({name:'shan'},player,event)) names.push('sha');
|
||||
if(event.filterCard(get.autoViewAs({name:'sha'},'unsure'),player,event)) names.push('shan');
|
||||
if(event.filterCard(get.autoViewAs({name:'shan'},'unsure'),player,event)) names.push('sha');
|
||||
return names.length>0&&player.hasCard(function(card){
|
||||
return names.includes(get.name(card));
|
||||
},'hs');
|
||||
|
@ -11229,10 +11296,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
for(var i of lib.inpile){
|
||||
if(i=='wuxie') continue;
|
||||
var type=get.type(i);
|
||||
if((type=='basic'||type=='trick')&&event.filterCard({name:i},player,event)) return true;
|
||||
if((type=='basic'||type=='trick')&&event.filterCard({name:i,isCard:true},player,event)) return true;
|
||||
if(i=='sha'){
|
||||
for(var j of lib.inpile_nature){
|
||||
if(event.filterCard({name:i,nature:j},player,event)) return true;
|
||||
if(event.filterCard({name:i,nature:j,isCard:true},player,event)) return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -13374,7 +13441,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
case 'equip2':
|
||||
target.draw();
|
||||
break;
|
||||
case 'equip3': case 'equip4': case 'equip5':
|
||||
case 'equip3': case 'equip4': case 'equip5': case 'equip6':
|
||||
target.recover();
|
||||
break;
|
||||
}
|
||||
|
@ -13400,7 +13467,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var hp=player.hp,hs=player.countCards('h',(card)=>card!=ui.selected.cards[0]);
|
||||
var tp=target.hp,ts=target.countCards('h');
|
||||
if(sub=='equip2') ts++;
|
||||
if(tp<target.maxHp&&(sub=='equip3'||sub=='equip4'||sub=='equip5')) tp++;
|
||||
if(tp<target.maxHp&&(sub=='equip3'||sub=='equip4'||sub=='equip5'||sub=='equip6')) tp++;
|
||||
if(tp<=hp||ts<=hs) eff+=2;
|
||||
}
|
||||
if(sub=='equip1'){
|
||||
|
@ -13418,7 +13485,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var sub=get.subtype(ui.selected.cards[0],false);
|
||||
var eff=get.effect(target,ui.selected.cards[0],player,target);
|
||||
if(sub=='equip2') eff+=(get.effect(target,{name:'draw'},target,target));
|
||||
if(target.isDamaged()&&(sub=='equip3'||sub=='equip4'||sub=='equip5')) eff+=get.recoverEffect(target,player,player);
|
||||
if(target.isDamaged()&&(sub=='equip3'||sub=='equip4'||sub=='equip5'||sub=='equip6')) eff+=get.recoverEffect(target,player,player);
|
||||
return eff;
|
||||
},
|
||||
},
|
||||
|
@ -14029,22 +14096,25 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
let d1=true,e=false;
|
||||
if(event.player.hasSkill('jueqing')||event.player.hasSkill('gangzhi')) d1=false;
|
||||
for(let tar of event.targets){
|
||||
if(!tar.mayHaveShan(player,'use',tar.getCards('h',i=>{
|
||||
return i.hasGaintag('sha_notshan');
|
||||
}))||event.player.hasSkillTag('directHit_ai',true,{
|
||||
target:tar,
|
||||
card:event.card,
|
||||
},true)){
|
||||
if(!tar.hasSkill('gangzhi')) d1=false;
|
||||
if(!tar.hasSkillTag('filterDamage',null,{
|
||||
player:event.player,
|
||||
if(event.card.name=='sha'){
|
||||
if(!tar.mayHaveShan(player,'use',tar.getCards('h',i=>{
|
||||
return i.hasGaintag('sha_notshan');
|
||||
}))||event.player.hasSkillTag('directHit_ai',true,{
|
||||
target:tar,
|
||||
card:event.card,
|
||||
})){
|
||||
let att=get.attitude(_status.event.player,tar);
|
||||
if(att>0) return false;
|
||||
if(att<0) e=true;
|
||||
},true)){
|
||||
if(!tar.hasSkill('gangzhi')) d1=false;
|
||||
if(!tar.hasSkillTag('filterDamage',null,{
|
||||
player:event.player,
|
||||
card:event.card,
|
||||
})){
|
||||
let att=get.attitude(_status.event.player,tar);
|
||||
if(att>0) return false;
|
||||
if(att<0) e=true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else e=true;
|
||||
}
|
||||
if(e) return true;
|
||||
if(d1) return get.damageEffect(event.player,player,_status.event.player)>0;
|
||||
|
@ -15338,7 +15408,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
tw_caocao:['tw_caocao','jsrg_caocao','yj_caocao'],
|
||||
mateng:['tw_mateng','mateng'],
|
||||
xiahouen:['tw_xiahouen','jsrg_xiahouen'],
|
||||
jiangji:['tw_jiangji','jiangji'],
|
||||
jiangji:['dc_jiangji','tw_jiangji','jiangji'],
|
||||
baoxin:['tw_baoxin','baoxin'],
|
||||
yanxiang:['yanxiang','tw_yanxiang'],
|
||||
liwei:['liwei','tw_liwei'],
|
||||
|
@ -15367,7 +15437,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
return '转换技。<span class="bluetext">阴:出牌阶段限一次。你可以弃置一张牌并对攻击范围内的一名角色造成1点伤害。</span>阳:当你或你攻击范围内的一名角色于你的回合外受到伤害时,你可以弃置一张牌令此伤害-1。<span class="bluetext">然后若你以此法弃置的牌颜色与“任”的颜色相同,你摸一张牌。</span>';
|
||||
},
|
||||
twdengjian:function(player){
|
||||
let str='①其他角色的弃牌阶段结束时,你可以弃置一张牌并随机获得本回合所有造成伤害的牌对应的实体牌的其中一张与你本轮以此法获得的牌的颜色均不同的【杀】,称为“剑法”。';
|
||||
let str='①其他角色的弃牌阶段结束时,你可以随机获得本回合所有造成伤害的牌对应的实体牌的其中一张与你本轮以此法获得的牌的颜色均不同的【杀】,称为“剑法”。';
|
||||
if(player.hasSkill('twdengjian_ban')) str='<span style="opacity:0.5">'+str+'</span>';
|
||||
str+='②你使用“剑法”牌不计入次数限制。';
|
||||
return str;
|
||||
|
@ -15819,7 +15889,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
twkujian_info:'出牌阶段限一次。你可以将至多三张手牌交给一名其他角色,称为“谏”,你获得以下效果:当其他角色使用或打出牌后,若其中有“谏”,你与其各摸一张牌;当其他角色不因使用或打出而失去牌后,若其中有“谏”,你与其各弃置一张牌。',
|
||||
twruilian:'睿敛',
|
||||
twruilian2:'睿敛',
|
||||
twruilian_info:'一轮游戏开始时,你可以选择一名角色。其下回合结束时,若其本回弃置过至少两张其的牌,你可以选择其本回合弃置过的一种类别,你与其各从弃牌堆中获得一张此类别的牌。',
|
||||
twruilian_info:'一轮游戏开始时,你可以选择一名角色。其下回合结束时,若其本回合弃置过至少两张牌,你可以选择其本回合弃置过的一种类别,你与其各从弃牌堆中获得一张此类别的牌。',
|
||||
tw_xiahouen:'夏侯恩',
|
||||
twfujian:'负剑',
|
||||
twfujian_info:'锁定技。①游戏开始时或准备阶段,若你的装备区里没有武器牌,你随机将牌堆中的一张武器牌置入装备区。②当你于回合外失去武器牌后,你失去1点体力。',
|
||||
|
@ -16011,9 +16081,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
xia_guanyu:'侠关羽',
|
||||
xia_guanyu_prefix:'侠',
|
||||
twzhongyi:'忠义',
|
||||
twzhongyi_info:'锁定技。①你使用【杀】无距离限制。②当你使用【杀】结算完毕后,你选择一项:⒈摸X张牌;⒉回复X点体力;⒊背水:失去Y点体力,依次执行以上两项(X为此牌造成的伤害值,Y为你本局游戏此前选择此项的次数+1)。',
|
||||
twzhongyi_info:'锁定技。①你使用【杀】无距离限制。②当你使用【杀】结算完毕后,你选择一项:⒈摸X张牌;⒉回复X点体力;⒊背水:失去Y点体力,依次执行以上两项(X为受到此牌造成的伤害的角色数,Y为你本局游戏选择此项的次数)。',
|
||||
twchue:'除恶',
|
||||
twchue_info:'①当你使用【杀】指定唯一目标时,你可以失去1点体力,为此牌额外指定Z个目标。②当你受到伤害或失去体力后,你摸一张牌并获得1个“勇”标记。③回合结束时,若你本回合发动过〖除恶②〗,则你可以失去Z个“勇”标记,视为使用一张伤害+1且可以额外指定Z个目标的【杀】。(Z为你的体力值)',
|
||||
twchue_info:'①当你使用【杀】指定唯一目标时,若场上存在可称为此【杀】目标的非目标角色,则你可以失去1点体力,为此牌额外指定Z个目标。②当你受到伤害或失去体力后,你摸一张牌并获得1个“勇”标记。③回合结束时,若你的“勇”标记数大于等于Z,则你可以失去Z个“勇”标记,视为使用一张伤害+1且可以额外指定Z个目标的【杀】。(Z为你的体力值)',
|
||||
xia_shitao:'石韬',
|
||||
twjieqiu:'劫囚',
|
||||
twjieqiu_info:'出牌阶段限一次,你可以选择一名装备区没有废除栏的其他角色,废除其所有装备栏,然后其摸X张牌(X为其废除装备栏前的装备区牌数),直到其恢复所有装备栏前:其弃牌阶段结束时,其恢复等同于其弃置牌数的装备栏;其回合结束时,若其仍有已废除的装备栏,则你执行一个额外回合(每轮限一次)。',
|
||||
|
@ -16022,7 +16092,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
xia_shie:'史阿',
|
||||
twdengjian:'登剑',
|
||||
twdengjianx:'剑法',
|
||||
twdengjian_info:'①其他角色的弃牌阶段结束时,你可以弃置一张牌并随机获得本回合所有造成伤害的牌对应的实体牌的其中一张与你本轮以此法获得的牌的颜色均不同的【杀】,称为“剑法”。②你使用“剑法”牌不计入次数限制。',
|
||||
twdengjian_info:'①其他角色的弃牌阶段结束时,你可以随机获得本回合所有造成伤害的牌对应的实体牌的其中一张与你本轮以此法获得的牌的颜色均不同的【杀】,称为“剑法”。②你使用“剑法”牌不计入次数限制。',
|
||||
twxinshou:'心授',
|
||||
twxinshou_info:'①当你于出牌阶段使用【杀】时,若此【杀】与你本回合使用的所有其他【杀】的颜色均不相同,则你可以选择执行以下一项本回合未执行过的项:⒈摸一张牌;⒉交给一名其他角色一张牌。②当你使用【杀】时,若〖心授①〗的两项本回合均已被你选择过,则你可以令〖登剑①〗失效并令一名其他角色获得〖登剑〗,你的下个回合开始时,其失去〖登剑〗,若其这期间使用【杀】造成过伤害,则你结束〖登剑①〗的失效状态。',
|
||||
xia_yuzhenzi:'玉真子',
|
||||
|
@ -16041,7 +16111,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
twhuajing_gong:'弓',
|
||||
twhuajing_gong_info:'当你使用【杀】造成伤害后,你随机弃置受伤角色装备区里的一张牌。',
|
||||
twtianshou:'天授',
|
||||
twtianshou_info:'锁定技,回合结束时,若你本回合使用【杀】造成过伤害,且你拥有本回合获得过效果的“武”标记,则你须将其中一个“武”标记交给一名其他角色并令其获得此标记的效果直到其回合结束,然后你摸一张牌。',
|
||||
twtianshou_info:'锁定技,回合结束时,若你本回合使用【杀】造成过伤害,且你拥有本回合获得过效果的“武”标记,则你须将其中一个“武”标记交给一名其他角色并令其获得此标记的效果直到其回合结束,然后你摸两张牌。',
|
||||
|
||||
tw_mobile:'海外服·稀有专属',
|
||||
tw_yunchouzhi:'运筹帷幄·智',
|
||||
|
|
|
@ -4,6 +4,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
name:'xianding',
|
||||
connect:true,
|
||||
character:{
|
||||
dc_sb_simayi:['male','wei',3,['dcsbquanmou','dcsbpingliao']],
|
||||
chendong:['male','wu',4,['dcduanxie','fenming']],
|
||||
lvfan:['male','wu',3,['diaodu','diancai']],
|
||||
cuimao:['male','wei',3,['zhengbi','fengying']],
|
||||
huzun:['male','wei',4,['dczhantao','dcanjing']],
|
||||
zhugemengxue:['female','wei',3,['dcjichun','dchanying']],
|
||||
bailingyun:['female','wei',3,['dclinghui','dcxiace','dcyuxin']],
|
||||
dc_qinghegongzhu:['female','wei',3,['dczhangji','dczengou']],
|
||||
|
@ -95,24 +100,490 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
characterSort:{
|
||||
xianding:{
|
||||
sp2_huben:['wangshuang','wenyang','re_liuzan','dc_huangzu','wulan','leitong','chentai','dc_duyu','dc_wangjun','dc_xiahouba','old_huangfusong'],
|
||||
sp2_huben:['chendong','wangshuang','wenyang','re_liuzan','dc_huangzu','wulan','leitong','chentai','dc_duyu','dc_wangjun','dc_xiahouba','old_huangfusong','huzun'],
|
||||
sp2_shengun:["puyuan","guanlu","gexuan",'wufan','re_zhangbao','dukui','zhaozhi','zhujianping','dc_zhouxuān','zerong'],
|
||||
sp2_bizhe:['dc_luotong','dc_wangchang','chengbing','dc_yangbiao','ruanji'],
|
||||
sp2_bizhe:['dc_luotong','dc_wangchang','chengbing','dc_yangbiao','ruanji','cuimao'],
|
||||
sp2_huangjia:['caomao','liubian','dc_liuyu','quanhuijie','dingshangwan','yuanji','xielingyu','sunyu','ganfurenmifuren','dc_ganfuren','dc_mifuren','dc_shixie'],
|
||||
sp2_zhangtai:['guozhao','fanyufeng','ruanyu','yangwan','re_panshu'],
|
||||
sp2_jinse:['caojinyu','re_sunyi','re_fengfangnv','caohua','laiyinger','zhangfen','zhugeruoxue','caoxian','dc_qinghegongzhu','zhugemengxue'],
|
||||
sp2_yinyu:['zhouyi','luyi','sunlingluan','caoyi'],
|
||||
sp2_wangzhe:['dc_daxiaoqiao','dc_sp_machao'],
|
||||
sp2_doukou:['re_xinxianying','huaman','xuelingyun','dc_ruiji','duanqiaoxiao','tianshangyi','malingli','bailingyun'],
|
||||
sp2_jichu:['zhaoang','dc_liuye','dc_wangyun','yanghong','huanfan','xizheng'],
|
||||
sp2_jichu:['zhaoang','dc_liuye','dc_wangyun','yanghong','huanfan','xizheng','lvfan'],
|
||||
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_mouding:['dc_sb_lusu','dc_sb_zhouyu'],
|
||||
sp2_mouding:['dc_sb_lusu','dc_sb_zhouyu','dc_sb_simayi'],
|
||||
}
|
||||
},
|
||||
skill:{
|
||||
//谋司马懿
|
||||
dcsbquanmou:{
|
||||
audio:2,
|
||||
zhuanhuanji:true,
|
||||
marktext:'☯',
|
||||
enable:'phaseUse',
|
||||
filter(event,player){
|
||||
const selected=player.getStorage('dcsbquanmou_selected');
|
||||
return game.hasPlayer(current=>!selected.includes(current)&&player.inRange(current)&¤t.countCards('he')>0);
|
||||
},
|
||||
filterTarget(card,player,target){
|
||||
if(player===target) return false;
|
||||
const selected=player.getStorage('dcsbquanmou_selected');
|
||||
return !selected.includes(target)&&player.inRange(target)&&target.countCards('he')>0;
|
||||
},
|
||||
prompt(){
|
||||
const player = get.player();
|
||||
if(player.storage.dcsbquanmou) return '转换技。出牌阶段每名角色限一次,你可以令一名攻击范围内的其他角色交给你一张牌。当你于本阶段内下次对其造成伤害后,你可以选择除其外的至多三名其他角色,对这些角色依次造成1点伤害。';
|
||||
return '转换技。出牌阶段每名角色限一次,你可以令一名攻击范围内的其他角色交给你一张牌。当你于本阶段内下次对其造成伤害时,取消之。';
|
||||
},
|
||||
async content(event,trigger,player){
|
||||
const target = event.targets[0];
|
||||
player.changeZhuanhuanji('dcsbquanmou');
|
||||
player.markAuto('dcsbquanmou_selected', [target]);
|
||||
const cards = await target.chooseCard('he', true, `选择交给${get.translation(player)}一张牌`).forResultCards();
|
||||
if (cards && cards.length) {
|
||||
await target.give(cards, player);
|
||||
const key = `dcsbquanmou_${Boolean(!player.storage.dcsbquanmou)}`;
|
||||
player.addTempSkill(key, {global:['phaseUseBefore','phaseChange']});
|
||||
player.markAuto(key, [target]);
|
||||
target.addAdditionalSkill(`${key}_${player.playerid}`, `${key}_mark`);
|
||||
}
|
||||
},
|
||||
ai:{
|
||||
order:9,
|
||||
result:{
|
||||
player:function(player,target){
|
||||
if(player.storage.dcsbquanmou) return 1;
|
||||
return 1+game.countPlayer(i=>player!==i&&target!==i&&!i.hasSkill('false_mark')&&get.attitude(player,i)<0);
|
||||
},
|
||||
target:function(player,target){
|
||||
let res=target.hasSkillTag('noh')?0:-1;
|
||||
if(player.storage.dcsbquanmou) return res+0.6;
|
||||
return res;
|
||||
},
|
||||
},
|
||||
},
|
||||
onremove:true,
|
||||
mark:true,
|
||||
intro:{
|
||||
content:(storage)=>{
|
||||
if(storage) return '转换技。出牌阶段每名角色限一次,你可以令一名攻击范围内的其他角色交给你一张牌。当你于本阶段内下次对其造成伤害后,你可以选择除其外的至多三名其他角色,对这些角色依次造成1点伤害。';
|
||||
return '转换技。出牌阶段每名角色限一次,你可以令一名攻击范围内的其他角色交给你一张牌。当你于本阶段内下次对其造成伤害时,取消之。';
|
||||
}
|
||||
},
|
||||
subSkill:{
|
||||
true:{
|
||||
audio:'dcsbquanmou',
|
||||
charlotte:true,
|
||||
trigger:{source:'damageSource'},
|
||||
forced:true,
|
||||
popup:false,
|
||||
filter(event,player){
|
||||
return player.getStorage('dcsbquanmou_true').includes(event.player);
|
||||
},
|
||||
async content(event, trigger, player){
|
||||
const target = trigger.player;
|
||||
player.getStorage('dcsbquanmou_true').remove(target);
|
||||
target.removeAdditionalSkill(`dcsbquanmou_true_${player.playerid}`);
|
||||
if(game.hasPlayer(current => (current != player && current != target))){
|
||||
const result = await player.chooseTarget([1,3], `权谋:是否对${get.translation(target)}之外的至多三名其他角色各造成1点伤害?`, (card, player, target)=>{
|
||||
return target != player && target != get.event().getTrigger().player;
|
||||
}).set('ai',target => {
|
||||
const player = get.player();
|
||||
return get.damageEffect(target, player, player);
|
||||
}).forResult();
|
||||
if (result.bool) {
|
||||
await player.logSkill('dcsbquanmou', result.targets);
|
||||
for(let i of result.targets){
|
||||
if(i.isIn()) await i.damage();
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
onremove(player,skill){
|
||||
game.filterPlayer(current=>{
|
||||
current.removeAdditionalSkill(`${skill}_${player.playerid}`);
|
||||
});
|
||||
delete player.storage[skill];
|
||||
delete player.storage.dcsbquanmou_selected;
|
||||
},
|
||||
},
|
||||
true_mark:{
|
||||
charlotte:true,
|
||||
mark:true,
|
||||
marktext:'讨',
|
||||
intro:{
|
||||
name:'权谋 - 阳',
|
||||
content:()=>{
|
||||
return `当你下次受到${get.translation(_status.currentPhase)}造成的伤害后,其可以对除你之外的至多三名其他角色各造成1点伤害。`
|
||||
},
|
||||
},
|
||||
ai:{
|
||||
threaten:2.5,
|
||||
effect:{
|
||||
target(card,player,target){
|
||||
if(get.tag(card,'damage')&&player&&player.hasSkill('dcsbquanmou_true')){
|
||||
let tars=game.countPlayer(i=>player!==i&&target!==i&&get.attitude(player,target)<0&&!target.hasSkill('dcsbquanmou_false_mark'));
|
||||
return [1,0,1,6*Math.min(3,tars)/(3+Math.pow(target.countCards('h'),2))];
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
false:{
|
||||
audio:'dcsbquanmou',
|
||||
charlotte:true,
|
||||
trigger:{source:'damageBegin2'},
|
||||
forced:true,
|
||||
filter(event,player){
|
||||
return player.getStorage('dcsbquanmou_false').includes(event.player);
|
||||
},
|
||||
async content(event, trigger, player){
|
||||
const target = trigger.player;
|
||||
player.getStorage('dcsbquanmou_false').remove(target);
|
||||
target.removeAdditionalSkill(`dcsbquanmou_false_${player.playerid}`);
|
||||
trigger.cancel();
|
||||
},
|
||||
onremove(player,skill){
|
||||
game.filterPlayer(current=>{
|
||||
current.removeAdditionalSkill(`${skill}_${player.playerid}`);
|
||||
});
|
||||
delete player.storage[skill];
|
||||
delete player.storage.dcsbquanmou_selected;
|
||||
},
|
||||
},
|
||||
false_mark:{
|
||||
charlotte:true,
|
||||
mark:true,
|
||||
marktext:'抚',
|
||||
intro:{
|
||||
name:'权谋 - 阴',
|
||||
content:()=>{
|
||||
return `当你下次受到${get.translation(_status.currentPhase)}造成的伤害时,防止此伤害。`
|
||||
},
|
||||
},
|
||||
ai:{
|
||||
nodamage:true,
|
||||
nofire:true,
|
||||
nothunder:true,
|
||||
skillTagFilter(player,tag,arg){
|
||||
return (arg&&arg.player&&arg.player.hasSkill('dcsbquanmou_false'));
|
||||
},
|
||||
effect:{
|
||||
target(card,player,target){
|
||||
if(get.tag(card,'damage')&&player&&player.hasSkill('dcsbquanmou_false')) return 'zeroplayertarget';
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
dcsbpingliao:{
|
||||
audio:2,
|
||||
trigger:{player:'useCard0'},
|
||||
forced:true,
|
||||
filter(event,player){
|
||||
return event.card.name=='sha';
|
||||
},
|
||||
logTarget(event,player){
|
||||
return game.filterPlayer(current=>player.inRange(current));
|
||||
},
|
||||
async content(event, trigger, player) {
|
||||
trigger.hideTargets = true;
|
||||
const unrespondedTargets = [];
|
||||
const respondedTargets = [];
|
||||
let nonnonTargetResponded = false;
|
||||
const targets = game.filterPlayer().sortBySeat();
|
||||
const prompt = `###是否打出红色基本牌响应${get.translation(player)}?###${get.translation(player)}使用了一张不公开目标的${get.translation(trigger.card)}。若你选择响应且你不是此牌的隐藏目标,则其摸两张牌;若你选择不响应且你是此牌的隐藏目标,则你本回合内不能使用或打出手牌。`
|
||||
for (let target of targets) {
|
||||
if (target.isIn() && player.inRange(target)) {
|
||||
const result = await target.chooseToRespond(prompt, (card,player)=>{
|
||||
if (get.type(card) !== 'basic') return false;
|
||||
const color = get.color(card);
|
||||
return (color == 'red' || color == 'unsure');
|
||||
}).set('ai',card => {
|
||||
const player = get.player(), event = get.event();
|
||||
const source = event.getParent().player;
|
||||
//是队友且没有其他疑似队友的选手响应 那响应一下
|
||||
if (get.attitude(player,source) > 0){
|
||||
if(!event.respondedTargets.some(current => {
|
||||
return get.attitude(player, current) > 0 || get.attitude(source, current) >= 0;
|
||||
})) return get.order(card);
|
||||
return -1;
|
||||
}
|
||||
//先用随机数凑合一下 等157优化
|
||||
return event.getRand('dcsbpingliao') > 0.5 ? 0 : get.order(card);
|
||||
}).set('respondedTargets', respondedTargets).forResult();
|
||||
if (result.bool) {
|
||||
respondedTargets.push(target);
|
||||
if(!trigger.targets.includes(target)) nonnonTargetResponded = true;
|
||||
await game.asyncDelay();
|
||||
}
|
||||
else if (trigger.targets.includes(target)) unrespondedTargets.push(target);
|
||||
}
|
||||
}
|
||||
unrespondedTargets.forEach(current => {
|
||||
current.addTempSkill('dcsbpingliao_blocker');
|
||||
game.log(current,'本回合内无法使用或打出手牌');
|
||||
});
|
||||
if (nonnonTargetResponded) {
|
||||
player.draw(2);
|
||||
player.addTempSkill('dcsbpingliao_buff', {global:'phaseChange'});
|
||||
player.addMark('dcsbpingliao_buff',1,false);
|
||||
}
|
||||
},
|
||||
ai:{
|
||||
ignoreLogAI:true,
|
||||
skillTagFilter:function(player,tag,args){
|
||||
if(args){
|
||||
return args.card&&get.name(args.card)=='sha';
|
||||
}
|
||||
},
|
||||
},
|
||||
subSkill:{
|
||||
buff:{
|
||||
onremove:true,
|
||||
charlotte:true,
|
||||
mod:{
|
||||
cardUsable(card, player, num){
|
||||
if(card.name=='sha') return num + player.countMark('dcsbpingliao_buff');
|
||||
}
|
||||
},
|
||||
mark:true,
|
||||
intro:{
|
||||
content:'本阶段内使用【杀】的次数上限+#',
|
||||
},
|
||||
},
|
||||
blocker:{
|
||||
charlotte:true,
|
||||
mod:{
|
||||
cardEnabled2(card, player){
|
||||
if(player.getCards('h').includes(card)) return false;
|
||||
}
|
||||
},
|
||||
mark:true,
|
||||
marktext:'封',
|
||||
intro:{
|
||||
content:'本回合内不能使用或打出手牌',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
//陈武董袭
|
||||
dcduanxie:{
|
||||
audio:'duanxie',
|
||||
inherit:'duanxie',
|
||||
selectTarget:1,
|
||||
},
|
||||
//吕范
|
||||
diaodu:{
|
||||
audio:2,
|
||||
trigger:{player:['phaseUseBegin','logSkill']},
|
||||
filter(event,player){
|
||||
if(event.name=='logSkill'&&event.skill!='diancai') return false;
|
||||
return game.hasPlayer(target=>{
|
||||
return get.distance(player,target)<=1&&target.countGainableCards(player,'e');
|
||||
});
|
||||
},
|
||||
direct:true,
|
||||
async content(event,trigger,player){
|
||||
const {result:{bool,targets}}=await player.chooseTarget(get.prompt2('diaodu'),(card,player,target)=>{
|
||||
return get.distance(player,target)<=1&&target.countGainableCards(player,'e');
|
||||
}).set('ai',target=>{
|
||||
const player=get.event('player'),att=get.attitude(player,target);
|
||||
let num=0;
|
||||
if(target.hasSkill('gzxiaoji')) num+=2.5;
|
||||
if(target.isDamaged()&&target.getEquip('baiyin')) num+=2.5;
|
||||
if(target.hasSkill('xuanlve')) num+=2;
|
||||
return get.sgn(att)*num+(target==player?1:0);
|
||||
});
|
||||
if(bool){
|
||||
const aim=targets[0];
|
||||
player.logSkill('diaodu',aim);
|
||||
const {result:{bool,cards}}=await player.gainPlayerCard(aim,'e',true);
|
||||
if(bool&&game.hasPlayer(target=>target!=aim)){
|
||||
const card=cards[0];
|
||||
const {result:{bool,targets}}=await player.chooseTarget('调度:将'+get.translation(card)+'交给另一名角色',(card,player,target)=>{
|
||||
return target!=get.event('aim');
|
||||
},true).set('ai',target=>{
|
||||
const player=get.event('player');
|
||||
return get.attitude(player,target);
|
||||
}).set('aim',aim);
|
||||
if(bool&&get.owner(card)==player){
|
||||
const target=targets[0];
|
||||
player.line(target,'green');
|
||||
if(target!=player) await player.give([card],target);
|
||||
if(get.owner(card)==target){
|
||||
const {result:{bool}}=await target.chooseUseTarget(card);
|
||||
if(bool) await player.draw();
|
||||
else await target.draw();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
diancai:{
|
||||
audio:2,
|
||||
inherit:'mbdiancai',
|
||||
filter(event,player){
|
||||
if(_status.currentPhase===player) return false;
|
||||
let num=player.getHistory('lose',evt=>{
|
||||
return evt.cards2&&evt.cards2.length&&evt.getParent('phaseUse')==event;
|
||||
}).reduce((sum,evt)=>{
|
||||
return sum+evt.cards2.length;
|
||||
},0);
|
||||
return num>=Math.min(5,player.getHp());
|
||||
},
|
||||
},
|
||||
//崔琰毛玠
|
||||
zhengbi:{
|
||||
audio:2,
|
||||
trigger:{player:'phaseUseBegin'},
|
||||
filter(event,player){
|
||||
return game.hasPlayer(target=>target!=player);
|
||||
},
|
||||
direct:true,
|
||||
async content(event,trigger,player){
|
||||
const {result:{bool,targets}}=await player.chooseTarget(get.prompt2('zhengbi'),lib.filter.notMe).set('ai',target=>{
|
||||
const player=get.event('player');
|
||||
return -get.attitude(player,target)*target.countCards('he');
|
||||
});
|
||||
if(bool){
|
||||
const target=targets[0],str=get.translation(target);
|
||||
player.logSkill('zhengbi',target);
|
||||
let choiceList=['此阶段结束时,若'+str+'本阶段获得过牌,则你获得其手牌区和装备区各一张牌'];
|
||||
if(player.countCards('h',{type:'basic'})) choiceList.push('交给'+str+'一张基本牌,然后其交给你一张非基本牌或两张基本牌');
|
||||
const {result:{index}}=await player.chooseControl().set('choiceList',choiceList).set('ai',()=>get.event('controls').length-1);
|
||||
if(index==0){
|
||||
player.line(target);
|
||||
player.when('phaseUseEnd').filter(evt=>evt==trigger).then(()=>{
|
||||
if(target.isIn()&&target.getHistory('gain',evt=>evt.getParent('phaseUse')==trigger).length){
|
||||
player.line(target);
|
||||
let num=(target.countGainableCards(player,'h')>0)+(target.countGainableCards(player,'e')>0);
|
||||
if(num){
|
||||
player.gainPlayerCard(target,num,'he',true).set('filterButton',button=>{
|
||||
return !ui.selected.buttons.some(but=>get.position(button.link)==get.position(but.link));
|
||||
});
|
||||
}
|
||||
}
|
||||
}).vars({target:target});
|
||||
}
|
||||
else{
|
||||
const {result:{bool}}=await player.chooseToGive(target,{type:'basic'},true).set('prompt','征辟:交给'+str+'一张基本牌');
|
||||
if(bool){
|
||||
let choices=[];
|
||||
if(target.countCards('he',{type:['trick','delay','equip']})) choices.push('一张非基本牌');
|
||||
if(target.countCards('h',{type:'basic'})>1) choices.push('两张基本牌');
|
||||
if(choices.length){
|
||||
const {result:{control}}=await target.chooseControl(choices).set('ai',function(event,player){
|
||||
if(choices.length>1){
|
||||
if(player.countCards('he',{type:['trick','delay','equip']},function(card){return get.value(card)<7})) return 0;
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}).set('prompt','征辟:交给'+get.translation(player)+'…</div>');
|
||||
const check=(control=='一张非基本牌');
|
||||
await target.chooseToGive('he',(check?1:2),{type:(check?['trick','delay','equip']:'basic')},player,true).set('prompt','征辟:交给'+get.translation(player)+control);
|
||||
}
|
||||
else if(target.countCards('h')) await target.give(target.getCards('h'),player);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
fengying:{
|
||||
unique:true,
|
||||
limited:true,
|
||||
audio:2,
|
||||
enable:'phaseUse',
|
||||
filter(event,player){
|
||||
return player.countCards('h')&&player.countCards('h')==player.countDiscardableCards(player,'h');
|
||||
},
|
||||
skillAnimation:true,
|
||||
animationColor:'thunder',
|
||||
async content(event,trigger,player){
|
||||
player.awakenSkill('fengying');
|
||||
await player.discard(player.getCards('h'));
|
||||
const evt=player.insertPhase();
|
||||
player.when('phaseBegin').filter(evtx=>evtx==evt).then(()=>{
|
||||
if(player.isMinHp()&&player.maxHp>0&&player.countCards('h')<player.maxHp){
|
||||
player.drawTo(player.maxHp);
|
||||
}
|
||||
})
|
||||
},
|
||||
ai:{
|
||||
order:0.0001,
|
||||
result:{
|
||||
player(player){
|
||||
return player.isMinHp()?1:0;
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
//胡遵
|
||||
dczhantao:{
|
||||
audio:2,
|
||||
trigger:{global:'damageEnd'},
|
||||
filter(event,player){
|
||||
if(!event.player.isIn()||(event.player!==player&&!player.inRange(event.player))) return false;
|
||||
return event.source&&event.source!=player;
|
||||
},
|
||||
check(event,player){
|
||||
if(!event.source.isIn()||!event.card||typeof get.number(event.card)!=='number') return 0;
|
||||
return get.effect(event.source,{name:'sha'},player,player)>=0;
|
||||
},
|
||||
logTarget:'player',
|
||||
async content(event,trigger,player){
|
||||
player.judge(card=>{
|
||||
const evt=get.event().getParent(get.event('eventName')).getTrigger();
|
||||
if(!evt.source.isIn()||!evt.card||typeof get.number(evt.card)!=='number') return 0;
|
||||
if(get.number(card)>get.number(evt.card)) return 1.5;
|
||||
return 0;
|
||||
}).set('judge2',r=>r.bool).set('callback',()=>{
|
||||
const evtx=event.getParent();
|
||||
const evt=event.getParent(evtx.eventName).getTrigger();
|
||||
if(!evt.source.isIn()||!evt.card||typeof get.number(evt.card)!=='number') return;
|
||||
if(event.judgeResult.number>get.number(evt.card)){
|
||||
const sha=new lib.element.VCard({name:'sha'}),target=evt.source;
|
||||
if(player.canUse(sha,target,false,false)){
|
||||
player.useCard(sha,target,false);
|
||||
}
|
||||
}
|
||||
})
|
||||
.set('eventName',event.name)
|
||||
}
|
||||
},
|
||||
dcanjing:{
|
||||
audio:2,
|
||||
trigger:{source:'damageSource'},
|
||||
filter(event,player){
|
||||
return game.hasPlayer(current=>current.isDamaged());
|
||||
},
|
||||
usable:1,
|
||||
direct:true,
|
||||
async content(event,trigger,player){
|
||||
const maxCount=player.getAllHistory('useSkill',evt=>evt.skill==='dcanjing').length+1;
|
||||
const result=await player.chooseTarget(get.prompt2('dcanjing'),(card,player,target)=>target.isDamaged(),[1,maxCount])
|
||||
.set('ai',target=>{
|
||||
return get.attitude(get.player(),target)>0;
|
||||
})
|
||||
.forResult();
|
||||
if(!result.bool) return player.storage.counttrigger.dcanjing--;
|
||||
const targets=result.targets.slice();
|
||||
targets.sortBySeat(_status.currentPhase);
|
||||
player.logSkill('dcanjing',targets);
|
||||
for(const target of targets) await target.draw();
|
||||
const minHp=targets.map(i=>i.getHp()).sort((a,b)=>a-b)[0];
|
||||
await game.asyncDelayx();
|
||||
for(const target of targets){
|
||||
if(!target.isIn()) continue;
|
||||
if(target.getHp()===minHp) await target.recover();
|
||||
}
|
||||
}
|
||||
},
|
||||
//诸葛梦雪
|
||||
dcjichun:{
|
||||
audio:2,
|
||||
|
@ -213,7 +684,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
frequent:true,
|
||||
async content(event,trigger,player){
|
||||
let cards=get.cards(3);
|
||||
const {result:{bool,links}}=await player.chooseButton(['灵慧:是否使用其中的一张牌并随机获得其中一张剩余牌?',cards]).set('ai',button=>{
|
||||
await game.cardsGotoOrdering(cards);
|
||||
const {result:{bool,links}}=await player.chooseButton(['灵慧:是否使用其中的一张牌并随机获得其中一张剩余牌?',cards]).set('filterButton',button=>{
|
||||
return get.player().hasUseTarget(button.link);
|
||||
}).set('ai',button=>{
|
||||
return get.event('player').getUseValue(button.link);
|
||||
});
|
||||
if(bool){
|
||||
|
@ -222,14 +696,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
player.$gain2(card,false);
|
||||
await game.asyncDelayx();
|
||||
await player.chooseUseTarget(true,card,false);
|
||||
if(cards.length) await player.gain(cards.randomGet(),'gain2');
|
||||
}
|
||||
if(cards.length){
|
||||
for(let i=cards.length-1;i--;i>=0){
|
||||
ui.cardPile.insertBefore(cards[i],ui.cardPile.firstChild);
|
||||
cards=cards.filterInD();
|
||||
if(cards.length){
|
||||
const cardx=cards.randomRemove();
|
||||
await player.gain(cardx,'gain2');
|
||||
}
|
||||
}
|
||||
game.updateRoundNumber();
|
||||
if(cards.length){
|
||||
cards.reverse();
|
||||
game.cardsGotoPile(cards.filterInD(),'insert');
|
||||
game.log(player,'将',get.cnNumber(cards.length),'张牌置于了牌堆顶');
|
||||
}
|
||||
},
|
||||
},
|
||||
dcxiace:{
|
||||
|
@ -246,6 +723,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}));
|
||||
return bool1||bool2;
|
||||
},
|
||||
direct:true,
|
||||
async content(event,trigger,player){
|
||||
if(trigger.player==player&&!player.hasHistory('custom',evt=>evt.dcxiace=='player')&&game.hasPlayer(target=>target!=player&&!target.hasSkill('fengyin'))){
|
||||
const {result:{bool,targets}}=await player.chooseTarget((card,player,target)=>{
|
||||
|
@ -296,6 +774,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
return lib.skill.luanfeng.check(event,player);
|
||||
},
|
||||
logTarget:'player',
|
||||
skillAnimation:true,
|
||||
animationColor:'thunder',
|
||||
async content(event,trigger,player){
|
||||
player.awakenSkill('dcyuxin');
|
||||
trigger.player.recover((trigger.player==player?1:player.getHp())-trigger.player.hp);
|
||||
|
@ -471,7 +951,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
return game.getGlobalHistory('cardMove',function(evt){
|
||||
if(evt.name!='lose'||event!=evt.getParent()) return false;
|
||||
for(var i in evt.gaintag_map){
|
||||
if(evt.gaintag_map[i].includes('dclingxi')) return evt.player==player;
|
||||
if(evt.gaintag_map[i].includes('dclingxi')&&evt.player==player) return true;
|
||||
}
|
||||
return false;
|
||||
}).length;
|
||||
|
@ -3365,7 +3845,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var choices=['选项二'];
|
||||
var choiceList=[
|
||||
'令'+get.translation(target)+'回复1点体力',
|
||||
'你于'+get.translation(target)+'各摸一张牌'
|
||||
'你与'+get.translation(target)+'各摸一张牌'
|
||||
];
|
||||
if(target.isDamaged()) choices.unshift('选项一');
|
||||
else choiceList[0]='<span style="opacity:0.5">'+choiceList[0]+'</span>';
|
||||
|
@ -3454,7 +3934,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
})) return false;
|
||||
var storage=player.getStorage('dczhaowen_viewed');
|
||||
for(var i of lib.inpile){
|
||||
if(!storage.includes(i)&&get.type(i)=='trick'&&event.filterCard({name:i},player,event)) return true;
|
||||
if(!storage.includes(i)&&get.type(i)=='trick'&&event.filterCard(get.autoViewAs({name:i},'unsure'),player,event)) return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
@ -3466,7 +3946,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var storage=player.getStorage('dczhaowen_viewed');
|
||||
var list=[];
|
||||
for(var i of lib.inpile){
|
||||
if(!storage.includes(i)&&get.type(i)=='trick'&&event.filterCard({name:i},player,event)){
|
||||
if(!storage.includes(i)&&get.type(i)=='trick'&&event.filterCard(get.autoViewAs({name:i},'unsure'),player,event)){
|
||||
list.push(['锦囊','',i]);
|
||||
}
|
||||
}
|
||||
|
@ -6501,7 +6981,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(!storage.length) return false;
|
||||
var storage2=player.getStorage('dcfengying_used')
|
||||
return storage.some(name=>{
|
||||
return !storage2.includes(name)&&event.filterCard({name:name},player,event);
|
||||
return !storage2.includes(name)&&event.filterCard(get.autoViewAs({name},'unsure'),player,event);
|
||||
});
|
||||
},
|
||||
hiddenCard:function(player,name){
|
||||
|
@ -6521,7 +7001,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
filter:function(button,player){
|
||||
var card={name:button.link[2],storage:{dcfengying:true}};
|
||||
if(player.getStorage('dcfengying_used').includes(card.name)) return false;
|
||||
return _status.event.getParent().filterCard(card,player,_status.event.getParent());
|
||||
return _status.event.getParent().filterCard(get.autoViewAs(card,'unsure'),player,_status.event.getParent());
|
||||
},
|
||||
check:function(button){
|
||||
var player=_status.event.player;
|
||||
|
@ -12241,13 +12721,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
filter:function(button,player){
|
||||
var evt=_status.event.getParent();
|
||||
if(evt&&typeof evt.filterCard=='function') return evt.filterCard({name:button.link[2]},player,evt);
|
||||
return lib.filter.filterCard({name:button.link[2]},player,_status.event.getParent());
|
||||
return lib.filter.filterCard({name:button.link[2],isCard:true},player,_status.event.getParent());
|
||||
},
|
||||
check:function(button){
|
||||
var player=_status.event.player;
|
||||
if(player.countCards('h',button.link[2])) return 0;
|
||||
if(_status.event.getParent().type!='phase'&&!_status.event.getParent().lvli6) return 1;
|
||||
return player.getUseValue({name:button.link[2]});
|
||||
return player.getUseValue({name:button.link[2],isCard:true});
|
||||
},
|
||||
backup:function(links,player){
|
||||
return {
|
||||
|
@ -12686,7 +13166,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(result.bool){
|
||||
var target=result.targets[0];
|
||||
player.line(target,'fire');
|
||||
player.addSkills(['hmxili'],['mansi']);
|
||||
player.changeSkills(['hmxili'],['mansi']);
|
||||
target.addSkills('hmxili');
|
||||
}
|
||||
},
|
||||
|
@ -12955,8 +13435,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
player.draw();
|
||||
'step 1'
|
||||
var next=player.chooseTarget().set('ai',function(target){
|
||||
var player=_status.event.player;
|
||||
return get.damageEffect(target,player,player)
|
||||
let player=_status.event.player;
|
||||
if(target.hasSkillTag('filterDamage',null,{
|
||||
player:player
|
||||
},true)) return get.damageEffect(target,player,player);
|
||||
return 2*get.damageEffect(target,player,player);
|
||||
});
|
||||
if(!['identity','guozhan'].includes(get.mode())){
|
||||
next.set('prompt','选择一名体力值最大的敌方角色,对其造成2点伤害');
|
||||
|
@ -12984,9 +13467,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
ai:{
|
||||
result:{
|
||||
target:function(player,target){
|
||||
if(!['identity','guozhan'].includes(get.mode())) return 1;
|
||||
var target=game.filterPlayer(i=>i!=player).sort((a,b)=>b.hp-a.hp)[0];
|
||||
return target&&get.damageEffect(target,player,player)>0?1:0;
|
||||
let es;
|
||||
if(['identity','guozhan'].includes(get.mode())) es=game.hasPlayer(i=>{
|
||||
return i!=player&&!game.hasPlayer(j=>{
|
||||
return player!==j&&j.hp>i.hp;
|
||||
})&&get.attitude(player,i)<0;
|
||||
});
|
||||
else es=game.hasPlayer(i=>{
|
||||
return i.isEnemyOf(player)&&!game.hasPlayer(j=>{
|
||||
return j.hp>i.hp&&j.isEnemyOf(player);
|
||||
})&&get.attitude(player,i)<0;
|
||||
});
|
||||
if(es) return 2;
|
||||
return -1.5;
|
||||
},
|
||||
},
|
||||
order:12,
|
||||
|
@ -12995,26 +13488,38 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
subSkill:{
|
||||
dying:{
|
||||
trigger:{global:'dying'},
|
||||
forced:true,
|
||||
popup:false,
|
||||
filter:function(event,player){
|
||||
var evt=event.getParent(2);
|
||||
if(!evt||evt.name!='kuiji_content'||evt.player!=player) return false;
|
||||
var list=game.filterPlayer(function(current){
|
||||
return current.isFriendOf(player);
|
||||
}).sort(function(a,b){
|
||||
return a.hp-b.hp;
|
||||
});
|
||||
return (list.length==1||list[0].hp<list[1].hp)&&list[0].isDamaged();
|
||||
let evt=event.getParent(2);
|
||||
return evt&&evt.name=='kuiji';
|
||||
},
|
||||
locked:true,
|
||||
direct:true,
|
||||
content:function(){
|
||||
var list=game.filterPlayer(function(current){
|
||||
return current.isFriendOf(player);
|
||||
}).sort(function(a,b){
|
||||
return a.hp-b.hp;
|
||||
})[0];
|
||||
player.logSkill('kuiji',list);
|
||||
list.recover();
|
||||
'step 0'
|
||||
var list;
|
||||
if(['identity','guozhan'].includes(get.mode())) list=game.filterPlayer(current=>{
|
||||
return current!==trigger.player&&!game.hasPlayer(i=>{
|
||||
return trigger.player!==i&&i.hp<current.hp;
|
||||
});
|
||||
}).filter(i=>i.isDamaged());
|
||||
else list=game.filterPlayer(current=>{
|
||||
return current.isFriendOf(player)&&!game.hasPlayer(i=>{
|
||||
return i.hp<current.hp&&i.isFriendOf(player);
|
||||
});
|
||||
}).filter(i=>i.isDamaged());
|
||||
if(list.length>1) player.chooseTarget('溃击:选择一名角色回复1点体力',(card,player,target)=>{
|
||||
return _status.event.list.includes(target);
|
||||
},true).set('list',list).set('ai',target=>{
|
||||
return get.recoverEffect(target,player,_status.event.player);
|
||||
});
|
||||
else if(list.length) event._result={bool:true,targets:list};
|
||||
else event._result={bool:false};
|
||||
'step 1'
|
||||
if(result.bool){
|
||||
let target=result.targets[0];
|
||||
player.logSkill('kuiji',target);
|
||||
target.recover();
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -13440,7 +13945,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
});
|
||||
if(card) cards2.push(card);
|
||||
}
|
||||
player.addTempSkill(skill);
|
||||
player.addTempSkills(skill);
|
||||
if(cards2.length) player.gain(cards2,'gain2','log');
|
||||
},
|
||||
},
|
||||
|
@ -13744,6 +14249,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
},
|
||||
characterIntro:{
|
||||
cuimao:'请分别查看“崔琰”和“毛玠”的武将介绍。',
|
||||
bailingyun:'柏灵筠,女,是电视剧《大军师司马懿之军师联盟》、《虎啸龙吟》中的主要角色之一,由张钧甯饰演。20岁,是曹丕赏赐司马懿的美人,也是曹丕的眼线,被送入司马府中为妾室。柔弱美貌、心机极深。',
|
||||
caoxian:'曹宪(生卒年不详),女,沛国谯县(今安徽省亳州市)人。东汉末年历史人物,汉献帝刘协嫔妃,魏武帝曹操女儿。建安十八年,嫁给汉献帝刘协,受封为贵人。黄初元年(220年),兄弟曹丕称帝后,汉献帝成为山阳公,不知所终。',
|
||||
zhangjian:'张臶(136年-240年),字子明,钜鹿人。汉末三国时期隐士、音乐家,精通谶纬之学。张臶生活的年代从东汉一直到曹魏齐王时期,受到朝廷多次征召,一直回避,不愿做官。他活了一百零五岁,是三国时期有可靠记载的最长寿的人之一。',
|
||||
|
@ -13797,6 +14303,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
zhugeruoxue:'诸葛氏(“若雪”为网络小说虚构),诸葛亮的二姐,庞山民之妻。',
|
||||
zhugemengxue:'诸葛氏(“梦雪”为网络小说虚构),诸葛亮的大姐。',
|
||||
caoyi:'曹轶,游卡桌游旗下产品《三国杀》原创角色。设定上为曹纯所收养的孙女,从小受到曹纯的教导,在军营中长大,性情坚毅有担当,军事谋略丰富,战斗能力超强。曹轶喜欢美食,特别是甜食,并且擅长制作各种点心。她身边跟随的雪白小老虎是曹纯在她及笄时送的生辰礼物,希望她如小老虎一样,英勇无畏。曹轶与曹婴交好,两人以姐妹相称。曹轶成年后继承祖父衣钵,接手精锐部队“虎豹骑”,成为新的虎豹骑的统领者。',
|
||||
huzun:'胡遵(?~256年),安定临泾(今甘肃省镇原县)人,三国时期曹魏大臣,官至卫将军,封阴密侯。出身安定胡氏。历任征东将军、征东大将军、卫将军等职。早年由张既征辟。后追随司马懿,参与平定匈奴胡薄居姿职叛乱、抵御诸葛亮北伐、平定公孙渊叛乱。嘉平四年(252年),作为曹魏三征之一的征东将军,主持征讨东吴,被诸葛恪击败。正元元年(255年)参与平定淮南三叛的第二叛毌丘俭、文钦之乱,事后升任卫将军。甘露元年(256年)秋七月己卯去世,追赠车骑将军。',
|
||||
},
|
||||
characterTitle:{
|
||||
// wulan:'#b对决限定武将',
|
||||
|
@ -13893,6 +14400,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(storage) str+='</span>';
|
||||
return str;
|
||||
},
|
||||
dcsbquanmou:function(player){
|
||||
if(player.storage.dcsbquanmou) return '转换技。出牌阶段每名角色限一次,你可以令一名攻击范围内的其他角色交给你一张牌。阴:当你于本阶段内下次对其造成伤害时,取消之;<span class="bluetext">阳:当你于本阶段内下次对其造成伤害后,你可以选择除其外的至多三名其他角色,对这些角色依次造成1点伤害。</span>';
|
||||
return '转换技。出牌阶段每名角色限一次,你可以令一名攻击范围内的其他角色交给你一张牌。<span class="bluetext">阴:当你于本阶段内下次对其造成伤害时,取消之;</span>阳:当你于本阶段内下次对其造成伤害后,你可以选择除其外的至多三名其他角色,对这些角色依次造成1点伤害。';
|
||||
}
|
||||
},
|
||||
characterReplace:{
|
||||
wenyang:['wenyang','db_wenyang','diy_wenyang'],
|
||||
|
@ -14440,6 +14951,30 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
dcjichun_info:'出牌阶段限一次,你可以展示一张手牌并选择一项:①将此牌交给一名手牌数小于你的角色,然后摸X张牌。②弃置此牌并弃置一名手牌数大于你的角色区域里至多X张牌。(X为此牌牌名字数)',
|
||||
dchanying:'寒英',
|
||||
dchanying_info:'准备阶段,你可以展示牌堆里的一张非赠物装备牌,然后令一名手牌数等于你的角色使用此牌。',
|
||||
huzun:'胡遵',
|
||||
dczhantao:'斩涛',
|
||||
dczhantao_info:'当你或你攻击范围内的角色受到伤害后,若你不为伤害来源,你可以判定,若造成此伤害的渠道为牌且此牌有点数且判定结果点数大于此牌的点数,你视为对来源使用一张【杀】。',
|
||||
dcanjing:'安境',
|
||||
dcanjing_info:'每回合限一次。当你造成伤害后,你可以令至多X名已受伤的角色各摸一张牌,然后其中体力值最少的角色回复1点体力(X为你本局游戏发动〖安境〗的次数)。',
|
||||
cuimao:'崔琰毛玠',
|
||||
zhengbi:'征辟',
|
||||
zhengbi_info:'出牌阶段开始时,你可以选择一名其他角色并选择一项:①本阶段结束时,若其本阶段得到过牌,则你获得其手牌区和装备区各一张牌;②将一张基本牌交给该角色,然后其交给你一张非基本牌或两张基本牌。',
|
||||
fengying:'奉迎',
|
||||
fengying_info:'限定技,出牌阶段,你可以弃置所有手牌。若如此做,你于本回合结束后进行一个额外回合,此额外回合开始时,若你的体力值为全场最低,则你将手牌数摸至体力上限。',
|
||||
lvfan:'吕范',
|
||||
diaodu:'调度',
|
||||
diaodu_info:'出牌阶段开始时,或当你发动〖典财〗后,你可以获得一名距离不大于1的一名角色A装备区里的一张牌,然后你将此牌交给另一名角色B,然后B选择是否使用此牌,若B使用/不使用,则你/B摸一张牌。',
|
||||
diancai:'典财',
|
||||
diancai_info:'其他角色的出牌阶段结束时,若你于此阶段失去了至少X张牌,则你可以将手牌摸至体力上限(X为你的体力值且X至多为5)。',
|
||||
chendong:'陈武董袭',
|
||||
dcduanxie:'断绁',
|
||||
dcduanxie_info:'出牌阶段限一次,你可以令一名其他角色横置,然后你横置。',
|
||||
dc_sb_simayi:'新杀谋司马懿',
|
||||
dc_sb_simayi_prefix:'新杀谋',
|
||||
dcsbquanmou:'权谋',
|
||||
dcsbquanmou_info:'转换技。出牌阶段每名角色限一次,你可以令一名攻击范围内的其他角色交给你一张牌。阴:当你于本阶段内下次对其造成伤害时,取消之;阳:当你于本阶段内下次对其造成伤害后,你可以选择除其外的至多三名其他角色,对这些角色依次造成1点伤害。',
|
||||
dcsbpingliao:'平辽',
|
||||
dcsbpingliao_info:'锁定技。当你声明使用【杀】时,你令此【杀】的目标对其他角色不可见,且你令攻击范围内的其他角色依次选择是否打出一张红色基本牌。所有角色选择完成后,此牌的目标角色中没有以此法打出牌的角色本回合内无法使用或打出手牌;若有不为此牌目标的角色以此法打出了牌,则你摸两张牌,且你本回合使用【杀】的次数上限+1。',
|
||||
|
||||
sp2_yinyu:'隐山之玉',
|
||||
sp2_huben:'百战虎贲',
|
||||
|
|
|
@ -4194,8 +4194,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
chengxin2_bg:'心',
|
||||
chengxin_info:'每四轮限一次,当一名角色进入濒死状态时,你可以令其将体力值回复至1,然后该角色防止一切伤害直到下一回合结束。',
|
||||
tianwu:'天舞',
|
||||
tianwu_info:'每当你使用卡牌指定一名敌方角色为惟一目标,你可以对其施加一个随机的负面效果。',
|
||||
tianwu_info_alter:'每当你使用卡牌指定一名敌方角色为惟一目标,你可以对其施加一个随机的负面效果,每回合限发动一次。',
|
||||
tianwu_info:'每当你使用卡牌指定一名敌方角色为唯一目标,你可以对其施加一个随机的负面效果。',
|
||||
tianwu_info_alter:'每当你使用卡牌指定一名敌方角色为唯一目标,你可以对其施加一个随机的负面效果,每回合限发动一次。',
|
||||
liguang:'离光',
|
||||
liguang_info:'结束阶段,你可以弃置一张手牌并将场上的一张牌移动到另一个合理的位置。',
|
||||
shiying:'逝影',
|
||||
|
@ -4342,8 +4342,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
longxi2:'龙息',
|
||||
longxi_info:'锁定技,在回合外每当你需要使用或打出一张卡牌时,若牌堆顶的前两张中有可使用或打出的牌,你立即获得之。',
|
||||
zhuyue:'逐月',
|
||||
zhuyue_info:'出牌阶段限一次,你可以弃置一张非基本牌并指定至多两个目标各随机弃置一张牌,若如此做,你本回使用的杀须指定选中角色为目标。',
|
||||
zhuyue_info_alter:'出牌阶段限一次,你可以弃置一张黑色非基本牌并指定至多两个目标各随机弃置一张牌,若如此做,你本回使用的杀须指定选中角色为目标。',
|
||||
zhuyue_info:'出牌阶段限一次,你可以弃置一张非基本牌并指定至多两个目标各随机弃置一张牌,若如此做,你本回合使用的杀须指定选中角色为目标。',
|
||||
zhuyue_info_alter:'出牌阶段限一次,你可以弃置一张黑色非基本牌并指定至多两个目标各随机弃置一张牌,若如此做,你本回合使用的杀须指定选中角色为目标。',
|
||||
guanri:'贯日',
|
||||
guanri_info:'限制技,你可以弃置两张红色手牌并失去1点体力,然后对一名体力值不少于你的其他角色造成2点火焰伤害并弃置其所有装备牌。',
|
||||
tianxian:'天弦',
|
||||
|
|
|
@ -1490,9 +1490,46 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
"xinfu_tushe":{
|
||||
audio:2,
|
||||
mod: {
|
||||
aiOrder(player, card, num) {
|
||||
if (get.tag(card, 'multitarget')) {
|
||||
if (player.countCards('h', { type: 'basic' })) return num / 10;
|
||||
return num * 10;
|
||||
}
|
||||
if (get.type(card) === 'basic') return num + 10;
|
||||
},
|
||||
aiValue(player, card, num) {
|
||||
if (card.name === 'zhangba') {
|
||||
let fact = (n) => {
|
||||
if (n > 1) return n * fact(n - 1);
|
||||
return 1;
|
||||
}, basic = 0;
|
||||
return fact(Math.min(player.countCards('hs', i => {
|
||||
if (get.tag(i, 'multitarget')) return 2;
|
||||
if (!['shan', 'tao', 'jiu'].includes(card.name)) return 1;
|
||||
basic++;
|
||||
}) / (1 + basic), player.getCardUsable('sha')));
|
||||
}
|
||||
if (['shan', 'tao', 'jiu'].includes(card.name)) {
|
||||
if (player.getEquip('zhangba') && player.countCards('hs') > 1) return 0.01;
|
||||
return num / 2;
|
||||
}
|
||||
if (get.tag(card, 'multitarget')) return num + game.players.length;
|
||||
},
|
||||
aiUseful(player, card, num) {
|
||||
if (get.name(card, player) === 'shan') {
|
||||
if (player.countCards('hs', i => {
|
||||
if (card === i || card.cards && card.cards.includes(i)) return false;
|
||||
return get.name(i, player) === 'shan';
|
||||
})) return -1;
|
||||
return num / Math.pow(Math.max(1, player.hp), 2);
|
||||
}
|
||||
}
|
||||
},
|
||||
trigger:{
|
||||
player:"useCardToPlayered",
|
||||
},
|
||||
locked: false,
|
||||
frequent:true,
|
||||
filter:function (event,player){
|
||||
if(get.type(event.card)=='equip') return false;
|
||||
|
@ -1506,7 +1543,22 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
presha:true,
|
||||
pretao:true,
|
||||
threaten:1.8,
|
||||
},
|
||||
effect: {
|
||||
player(card, player, target) {
|
||||
if (typeof card === 'object' && card.name !== 'shan' && get.type(card) !== 'equip' && !player.countCards('h', i => {
|
||||
if (card === i || card.cards && card.cards.includes(i)) return false;
|
||||
return get.type(i) === 'basic';
|
||||
})) {
|
||||
let targets = [], evt = _status.event.getParent('useCard');
|
||||
targets.addArray(ui.selected.targets);
|
||||
if (evt && evt.card == card) targets.addArray(evt.targets);
|
||||
if (targets.length) return [1, targets.length];
|
||||
if (get.tag(card, 'multitarget')) return [1, game.players.length - 1];
|
||||
return [1, 1];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"xinfu_limu":{
|
||||
mod:{
|
||||
|
@ -1518,11 +1570,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
cardUsableTarget:function(card,player,target){
|
||||
if(player.countCards('j')&&player.inRange(target)) return true;
|
||||
},
|
||||
aiValue:function(player,card,num){
|
||||
if(card.name=='zhangba') return 15;
|
||||
if(player.getEquip('zhangba')&&player.countCards('hs')>1&&['shan','tao'].includes(card.name)) return 0;
|
||||
if(card.name=='shan'||card.name=='tao') return num/2;
|
||||
},
|
||||
aiOrder(player, card, num) {
|
||||
if (get.type(card, 'delay') && player.canUse(card, player) && player.canAddJudge(card)) return 15;
|
||||
}
|
||||
},
|
||||
locked:false,
|
||||
audio:2,
|
||||
|
@ -1542,21 +1592,22 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
filterTarget:function (card,player,target){
|
||||
return player==target;
|
||||
},
|
||||
check:function(card){
|
||||
var player=_status.event.player;
|
||||
if(!player.getEquip('zhangba')&&player.countCards('hs','sha')<2){
|
||||
if(player.countCards('h',function(cardx){
|
||||
return cardx!=card&&cardx.name=='shan';
|
||||
})>0) return 0;
|
||||
var damaged=player.maxHp-player.hp-1;
|
||||
var ts=player.countCards('h',function(cardx){
|
||||
return cardx!=card&&cardx.name=='tao';
|
||||
});
|
||||
if(ts>0&&ts>damaged) return 0;
|
||||
check(card) {
|
||||
var player = _status.event.player;
|
||||
if (!player.getEquip('zhangba')) {
|
||||
let damaged = player.maxHp - player.hp - 1;
|
||||
if (player.countCards('h', function (cardx) {
|
||||
if (cardx == card) return false;
|
||||
if (cardx.name == 'tao') {
|
||||
if (damaged < 1) return true;
|
||||
damaged--;
|
||||
}
|
||||
return ['shan', 'jiu'].includes(cardx.name);
|
||||
}) > 0) return 0;
|
||||
}
|
||||
if(card.name=='shan') return 15;
|
||||
if(card.name=='tao') return 10;
|
||||
return 9-get.value(card);
|
||||
if (card.name == 'shan') return 15;
|
||||
if (card.name == 'tao' || card.name == 'jiu') return 10;
|
||||
return 9 - get.value(card);
|
||||
},
|
||||
onuse:function (links,player){
|
||||
var next=game.createEvent('limu_recover',false,_status.event.getParent());
|
||||
|
@ -1564,10 +1615,29 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
next.setContent(function(){player.recover()});
|
||||
},
|
||||
ai:{
|
||||
result:{
|
||||
target:1,
|
||||
result: {
|
||||
target(player, target) {
|
||||
let res = lib.card.lebu.ai.result.target(player, target);
|
||||
if (target.isDamaged()) return res + 2 * Math.abs(get.recoverEffect(target, player, target));
|
||||
return res;
|
||||
},
|
||||
ignoreStatus: true
|
||||
},
|
||||
order:12,
|
||||
order(item, player) {
|
||||
if (player.hp > 1 && player.countCards('j')) return 0;
|
||||
return 12;
|
||||
},
|
||||
effect: {
|
||||
target(card, player, target) {
|
||||
if (target.isPhaseUsing() && typeof card === 'object' && get.type(card, target) === 'delay' && !target.countCards('j')) {
|
||||
let shas = target.getCards('hs', i => {
|
||||
if (card === i || card.cards && card.cards.includes(i)) return false;
|
||||
return get.name(i, target) === 'sha' && target.getUseValue(i) > 0;
|
||||
}) - target.getCardUsable('sha');
|
||||
if (shas > 0) return [1, 1.5 * shas];
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
@ -654,7 +654,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
content:function(){
|
||||
'step 0'
|
||||
player.addTempSkill('shiming_round','roundStart');
|
||||
var cards=get.cards(2);
|
||||
var cards=get.cards(3);
|
||||
player.chooseButton(['识命:是否将其中一张置于牌堆底?',cards.slice(0)]).set('ai',button=>{
|
||||
var att=_status.event.att,damage=_status.event.damage,val=get.value(button.link,_status.event.player);
|
||||
if(att>0&&damage<0||att<=0&&damage>0) return 6-val;
|
||||
|
@ -713,6 +713,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
player.logSkill('jiangxi');
|
||||
event.logged=true;
|
||||
player.removeSkill('shiming_round');
|
||||
player.draw();
|
||||
}
|
||||
'step 2'
|
||||
if(!game.hasPlayer2(current=>current.getHistory('damage').length>0)){
|
||||
|
@ -1504,8 +1505,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
unlimit:{
|
||||
mod:{
|
||||
cardUsable:function(card,player){
|
||||
var list=lib.skill.lkbushi.getBushi(player);
|
||||
if(list[0]==get.suit(card)) return Infinity;
|
||||
const list = lib.skill.lkbushi.getBushi(player), suit = get.suit(card);
|
||||
if (suit === 'unsure' || list[0] === suit) return Infinity;
|
||||
},
|
||||
},
|
||||
trigger:{player:'useCard1'},
|
||||
|
@ -2029,8 +2030,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
'step 2'
|
||||
player.gain(cards,'gain2');
|
||||
if(get.color(cards[0])!=get.color(cards[1])){
|
||||
player.addTempSkill('wusheng');
|
||||
player.addTempSkill('paoxiao');
|
||||
player.addTempSkills(['wusheng','paoxiao']);
|
||||
}
|
||||
},
|
||||
derivation:['wusheng','paoxiao'],
|
||||
|
@ -2673,7 +2673,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
audio:'taoluan',
|
||||
enable:'chooseToUse',
|
||||
filter:function(event,player){
|
||||
return !player.hasSkill('xintaoluan3')&&player.countCards('hes',card=>lib.inpile.some(name=>{
|
||||
return !player.hasSkill('xintaoluan3')&&player.hasCard(card=>lib.inpile.some(name=>{
|
||||
if(player.getStorage('xintaoluan').includes(name)) return false;
|
||||
if(get.type(name)!='basic'&&get.type(name)!='trick') return false;
|
||||
if(event.filterCard({name:name,isCard:true,cards:[card]},player,event)) return true;
|
||||
|
@ -2683,7 +2683,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
}
|
||||
return false;
|
||||
}))>0&&!_status.dying.length;
|
||||
},'hes'))>0&&!_status.dying.length;
|
||||
},
|
||||
chooseButton:{
|
||||
dialog:function(event,player){
|
||||
|
@ -2783,7 +2783,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
event.num=player.countMark('xintaoluan2');
|
||||
player.chooseTarget(true,function(card,player,target){
|
||||
return target!=player;
|
||||
},'滔乱<br><br><div class="text center">令一名其他角色选择一项:1.交给你'+get.cnNumber(event.num)+'张与你以此法使用的牌类别相同的牌;2.你失去'+get.cnNumber(event.num)+'点体力').set('ai',function(target){
|
||||
},'滔乱<br><br><div class="text center">令一名其他角色选择一项:1.交给你'+get.cnNumber(event.num)+'张与你以此法使用的牌类别不同的牌;2.你失去'+get.cnNumber(event.num)+'点体力').set('ai',function(target){
|
||||
var player=_status.event.player;
|
||||
if(get.attitude(player,target)>0){
|
||||
if(get.attitude(target,player)>0){
|
||||
|
@ -5255,7 +5255,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
audio:2,
|
||||
enable:'chooseToUse',
|
||||
filter:function(event,player){
|
||||
return !player.hasSkill('taoluan3')&&player.countCards('hes',card=>lib.inpile.some(name=>{
|
||||
return !player.hasSkill('taoluan3')&&player.hasCard(card=>lib.inpile.some(name=>{
|
||||
if(player.getStorage('taoluan').includes(name)) return false;
|
||||
if(get.type(name)!='basic'&&get.type(name)!='trick') return false;
|
||||
if(event.filterCard({name:name,isCard:true,cards:[card]},player,event)) return true;
|
||||
|
@ -5265,7 +5265,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
}
|
||||
return false;
|
||||
}))>0;
|
||||
},'hes'))>0;
|
||||
},
|
||||
onremove:true,
|
||||
chooseButton:{
|
||||
|
@ -5355,7 +5355,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
'step 0'
|
||||
player.chooseTarget(true,function(card,player,target){
|
||||
return target!=player;
|
||||
},'滔乱<br><br><div class="text center">令一名其他角色选择一项:1.交给你一张与你以此法使用的牌类别相同的牌;2.你失去1点体力').set('ai',function(target){
|
||||
},'滔乱<br><br><div class="text center">令一名其他角色选择一项:1.交给你一张与你以此法使用的牌类别不同的牌;2.你失去1点体力').set('ai',function(target){
|
||||
var player=_status.event.player;
|
||||
if(get.attitude(player,target)>0){
|
||||
if(get.attitude(target,player)>0){
|
||||
|
@ -9539,16 +9539,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
group:'fuhun2'
|
||||
},
|
||||
fuhun2:{
|
||||
audio:'fuhun',
|
||||
audioname:['re_guanzhang'],
|
||||
trigger:{source:'damageSource'},
|
||||
forced:true,
|
||||
filter:function(event,player){
|
||||
if(player.hasSkill('fuhun3')) return false;
|
||||
if(['new_rewusheng','olpaoxiao'].every(skill=>player.hasSkill(skill,null,false,false))) return false;
|
||||
return event.getParent().skill=='fuhun';
|
||||
},
|
||||
content:function(){
|
||||
player.addTempSkill('new_rewusheng');
|
||||
player.addTempSkill('olpaoxiao');
|
||||
player.addTempSkill('fuhun3');
|
||||
player.addTempSkills(['new_rewusheng','olpaoxiao']);
|
||||
// player.addTempSkill('fuhun3');
|
||||
}
|
||||
},
|
||||
fuhun3:{},
|
||||
|
@ -13962,7 +13963,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
chengong:['chengong','re_chengong','sb_chengong'],
|
||||
xunyou:['xunyou','re_xunyou'],
|
||||
xuezong:['xuezong','tw_xuezong'],
|
||||
huanghao:['huanghao','dc_huanghao','old_huanghao'],
|
||||
huanghao:['huanghao','dc_huanghao','old_huanghao'],
|
||||
caorui:['caorui','re_caorui','old_caorui'],
|
||||
sunziliufang:['sunziliufang','dc_sunziliufang'],
|
||||
liyan:['liyan','old_liyan'],
|
||||
|
@ -14328,7 +14329,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
xinxuanhuo_info:'摸牌阶段开始时,你可以改为令一名其他角色摸两张牌,然后该角色需对其攻击范围内你选择的另一名角色使用一张【杀】,否则你获得其两张牌。',
|
||||
fuhun:'父魂',
|
||||
fuhun2:'父魂',
|
||||
fuhun_info:'你可以将两张手牌当做【杀】使用或打出;出牌阶段,若你以此法使用的【杀】造成了伤害,你获得技能〖武圣〗和〖咆哮〗直到回合结束。',
|
||||
fuhun_info:'你可以将两张手牌当做【杀】使用或打出;当你于出牌阶段以此法使用的【杀】造成伤害后,你获得〖武圣〗和〖咆哮〗直到回合结束。',
|
||||
yuce:'御策',
|
||||
yuce_info:'当你受到伤害后,你可以展示一张手牌,并令伤害来源选择一项:弃置一张与此牌类型不同的手牌,或令你回复1点体力。',
|
||||
xiansi:'陷嗣',
|
||||
|
@ -14528,7 +14529,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
oldmiji:'秘计',
|
||||
oldmiji_info:'准备/结束阶段开始时,若你已受伤,你可以判定,若判定结果为黑色,你观看牌堆顶的X张牌(X为你已损失的体力值),然后将这些牌交给一名角色。',
|
||||
old_fuhun:'父魂',
|
||||
old_fuhun_info:'摸牌阶段开始时,你可以放弃摸牌,改为从牌堆顶亮出两张牌并获得之,若亮出的牌颜色不同,你获得技能“武圣”、“咆哮”,直到回合结束。',
|
||||
old_fuhun_info:'摸牌阶段开始时,你可以放弃摸牌,改为从牌堆顶亮出两张牌并获得之,若亮出的牌颜色不同,你获得〖武圣〗和〖咆哮〗直到回合结束。',
|
||||
rejueqing:'绝情',
|
||||
rejueqing_info:'当你对其他角色造成伤害时,你可以令此伤害值+X。若如此做,你失去X点体力并修改〖绝情〗(X为伤害值)。',
|
||||
rejueqing_1st:'绝情',
|
||||
|
@ -14578,9 +14579,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
shuojian_info:'出牌阶段限三次。你可以交给一名其他角色一张牌,其选择一项:1.令你摸X张牌并弃置X-1张牌;2.视为使用X张【过河拆桥】,然后此技能本回合失效(X为此技能本阶段剩余发动次数+1)。',
|
||||
yj_qiaozhou:'谯周',
|
||||
shiming:'识命',
|
||||
shiming_info:'每轮限一次。一名角色的摸牌阶段,你可以观看牌堆顶的两张牌,并可以将其中一张置于牌堆底。然后该角色可以改为对自己造成1点伤害,然后从牌堆底摸三张牌。',
|
||||
shiming_info:'每轮限一次。一名角色的摸牌阶段,你可以观看牌堆顶的三张牌,并可以将其中一张置于牌堆底。然后该角色可以改为对自己造成1点伤害,然后从牌堆底摸三张牌。',
|
||||
jiangxi:'将息',
|
||||
jiangxi_info:'一名角色的回合结束时,若一号位于此回合内进入过濒死状态或未受到过伤害,你可以重置〖识命〗;若所有角色均未受到过伤害,你可以与当前回合角色各摸一张牌。',
|
||||
jiangxi_info:'一名角色的回合结束时,若一号位于此回合内进入过濒死状态或未受到过伤害,你可以重置〖识命〗并摸一张牌;若所有角色均未受到过伤害,你可以与当前回合角色各摸一张牌。',
|
||||
hanlong:'韩龙',
|
||||
duwang:'独往',
|
||||
duwang_info:'锁定技。①游戏开始时,你从牌堆顶将五张不为【杀】的牌置于武将牌上,称为“刺”。②若你有牌名不为【杀】“刺”,你至其他角色或其他角色至你的距离+1。',
|
||||
|
|
|
@ -1673,9 +1673,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
else event.finish();
|
||||
'step 1'
|
||||
player.addTempSkill(result.control,'phaseUseEnd');
|
||||
player.addTempSkills(result.control,'phaseUseEnd');
|
||||
player.popup(result.control);
|
||||
game.log(player,'获得了','#g【'+get.translation(result.control)+'】');
|
||||
// game.log(player,'获得了','#g【'+get.translation(result.control)+'】');
|
||||
},
|
||||
ai:{threaten:0.9},
|
||||
subSkill:{
|
||||
|
@ -3407,13 +3407,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(list.length==result.cards.length){
|
||||
target.draw();
|
||||
player.getStat('skill').sanchen--;
|
||||
if(get.mode()=='guozhan') player.addTempSkill('pozhu');
|
||||
if(get.mode()=='guozhan') player.addTempSkills('pozhu');
|
||||
}
|
||||
}
|
||||
else{
|
||||
target.draw();
|
||||
player.getStat('skill').sanchen--;
|
||||
if(get.mode()=='guozhan') player.addTempSkill('pozhu');
|
||||
if(get.mode()=='guozhan') player.addTempSkills('pozhu');
|
||||
}
|
||||
},
|
||||
ai:{
|
||||
|
@ -3954,7 +3954,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
dezhang_info:'觉醒技。准备阶段,若你没有“绥”,则你减1点体力上限并获得〖卫戍〗。',
|
||||
weishu:'卫戍',
|
||||
weishu_info:'锁定技。①当你于摸牌阶段外不因〖卫戍①〗而摸牌后,你令一名角色摸一张牌。②当你于弃牌阶段外不因〖卫戍②〗而弃置牌后,你弃置一名其他角色的一张牌。',
|
||||
jin_jiachong:'贾充',
|
||||
jin_jiachong:'晋贾充',
|
||||
jin_jiachong_prefix:'晋',
|
||||
xiongshu:'凶竖',
|
||||
xiongshu_info:'其他角色的出牌阶段开始时,你可弃置X张牌(X为你本轮内此前已发动过此技能的次数,为0则不弃)并展示其一张手牌,然后你预测“其本阶段内是否会使用与展示牌牌名相同的牌”。此阶段结束时,若你的预测正确,则你对其造成1点伤害;否则你获得展示牌。',
|
||||
jianhui:'奸回',
|
||||
|
|
|
@ -268,6 +268,7 @@ window.noname_asset_list=[
|
|||
'audio/die/db_wenyang.mp3',
|
||||
'audio/die/dc_bulianshi.mp3',
|
||||
'audio/die/dc_caiyang.mp3',
|
||||
'audio/die/dc_caoshuang.mp3',
|
||||
'audio/die/dc_caozhi.mp3',
|
||||
'audio/die/dc_chenqun.mp3',
|
||||
'audio/die/dc_dengzhi.mp3',
|
||||
|
@ -384,6 +385,7 @@ window.noname_asset_list=[
|
|||
'audio/die/guohuanghou.mp3',
|
||||
'audio/die/guojia.mp3',
|
||||
'audio/die/guosi.mp3',
|
||||
'audio/die/guotu.mp3',
|
||||
'audio/die/guotufengji.mp3',
|
||||
'audio/die/guozhao.mp3',
|
||||
'audio/die/guyong.mp3',
|
||||
|
@ -477,6 +479,7 @@ window.noname_asset_list=[
|
|||
'audio/die/jsp_caoren.mp3',
|
||||
'audio/die/jsp_guanyu.mp3',
|
||||
'audio/die/jsp_huangyueying.mp3',
|
||||
'audio/die/junk_guanyu.mp3',
|
||||
'audio/die/kanze.mp3',
|
||||
'audio/die/kebineng.mp3',
|
||||
'audio/die/key_abyusa.mp3',
|
||||
|
@ -623,6 +626,7 @@ window.noname_asset_list=[
|
|||
'audio/die/ol_sb_guanyu.mp3',
|
||||
'audio/die/ol_sb_jiangwei.mp3',
|
||||
'audio/die/ol_sb_taishici.mp3',
|
||||
'audio/die/ol_sb_yuanshao.mp3',
|
||||
'audio/die/ol_sp_zhugeliang.mp3',
|
||||
'audio/die/ol_sunjian.mp3',
|
||||
'audio/die/ol_wangrong.mp3',
|
||||
|
@ -1859,6 +1863,8 @@ window.noname_asset_list=[
|
|||
'audio/skill/dcenyu2.mp3',
|
||||
'audio/skill/dcfangdu1.mp3',
|
||||
'audio/skill/dcfangdu2.mp3',
|
||||
'audio/skill/dcfanshi1.mp3',
|
||||
'audio/skill/dcfanshi2.mp3',
|
||||
'audio/skill/dcfanyin1.mp3',
|
||||
'audio/skill/dcfanyin2.mp3',
|
||||
'audio/skill/dcfaqi1.mp3',
|
||||
|
@ -1873,6 +1879,8 @@ window.noname_asset_list=[
|
|||
'audio/skill/dcfozong2.mp3',
|
||||
'audio/skill/dcfudao1.mp3',
|
||||
'audio/skill/dcfudao2.mp3',
|
||||
'audio/skill/dcfudou1.mp3',
|
||||
'audio/skill/dcfudou2.mp3',
|
||||
'audio/skill/dcfuli1.mp3',
|
||||
'audio/skill/dcfuli2.mp3',
|
||||
'audio/skill/dcfumou1.mp3',
|
||||
|
@ -1919,6 +1927,8 @@ window.noname_asset_list=[
|
|||
'audio/skill/dcjianying2.mp3',
|
||||
'audio/skill/dcjianzheng1.mp3',
|
||||
'audio/skill/dcjianzheng2.mp3',
|
||||
'audio/skill/dcjianzhuan1.mp3',
|
||||
'audio/skill/dcjianzhuan2.mp3',
|
||||
'audio/skill/dcjiaofeng1.mp3',
|
||||
'audio/skill/dcjiaofeng2.mp3',
|
||||
'audio/skill/dcjiaoxia1.mp3',
|
||||
|
@ -3645,6 +3655,8 @@ window.noname_asset_list=[
|
|||
'audio/skill/olqingyuan2.mp3',
|
||||
'audio/skill/olqisi1.mp3',
|
||||
'audio/skill/olqisi2.mp3',
|
||||
'audio/skill/olqushi1.mp3',
|
||||
'audio/skill/olqushi2.mp3',
|
||||
'audio/skill/olruoyu1.mp3',
|
||||
'audio/skill/olruoyu2.mp3',
|
||||
'audio/skill/olsaogu1.mp3',
|
||||
|
@ -3659,10 +3671,17 @@ window.noname_asset_list=[
|
|||
'audio/skill/olsbfumeng2.mp3',
|
||||
'audio/skill/olsbguidao1.mp3',
|
||||
'audio/skill/olsbguidao2.mp3',
|
||||
'audio/skill/olsbhetao1.mp3',
|
||||
'audio/skill/olsbhetao2.mp3',
|
||||
'audio/skill/olsbranji1.mp3',
|
||||
'audio/skill/olsbranji2.mp3',
|
||||
'audio/skill/olsbshenli1.mp3',
|
||||
'audio/skill/olsbshenli2.mp3',
|
||||
'audio/skill/olsbshishou1.mp3',
|
||||
'audio/skill/olsbshishou2.mp3',
|
||||
'audio/skill/olsbweilin1.mp3',
|
||||
'audio/skill/olsbweilin2.mp3',
|
||||
'audio/skill/olsbyufeng1.mp3',
|
||||
'audio/skill/olsbzhuri1.mp3',
|
||||
'audio/skill/olsbzhuri2.mp3',
|
||||
'audio/skill/olshandao1.mp3',
|
||||
|
@ -3691,6 +3710,8 @@ window.noname_asset_list=[
|
|||
'audio/skill/oltuntian2.mp3',
|
||||
'audio/skill/olweifu1.mp3',
|
||||
'audio/skill/olweifu2.mp3',
|
||||
'audio/skill/olweijie1.mp3',
|
||||
'audio/skill/olweijie2.mp3',
|
||||
'audio/skill/olxianbi1.mp3',
|
||||
'audio/skill/olxianbi2.mp3',
|
||||
'audio/skill/olxiangxv1.mp3',
|
||||
|
@ -6669,6 +6690,7 @@ window.noname_asset_list=[
|
|||
'image/card/shujinsan.png',
|
||||
'image/card/shunshou.png',
|
||||
'image/card/sifeizhenmian.png',
|
||||
'image/card/sizhaojian.png',
|
||||
'image/card/suijiyingbian.png',
|
||||
'image/card/suolianjia.png',
|
||||
'image/card/taigongyinfu.png',
|
||||
|
@ -6726,6 +6748,7 @@ window.noname_asset_list=[
|
|||
'image/card/xuanyuanjian.png',
|
||||
'image/card/xuejibingbao.png',
|
||||
'image/card/xuelunyang.png',
|
||||
'image/card/xumou_jsrg.jpg',
|
||||
'image/card/yajiaoqiang.png',
|
||||
'image/card/yangpijuan.png',
|
||||
'image/card/yanjiadan_club.png',
|
||||
|
@ -6878,6 +6901,7 @@ window.noname_asset_list=[
|
|||
'image/character/dc_bulianshi.jpg',
|
||||
'image/character/dc_caiyang.jpg',
|
||||
'image/character/dc_caocao.jpg',
|
||||
'image/character/dc_caoshuang.jpg',
|
||||
'image/character/dc_caozhi.jpg',
|
||||
'image/character/dc_chenqun.jpg',
|
||||
'image/character/dc_daxiaoqiao.jpg',
|
||||
|
@ -6913,8 +6937,11 @@ window.noname_asset_list=[
|
|||
'image/character/dc_mifuren.jpg',
|
||||
'image/character/dc_ruiji.jpg',
|
||||
'image/character/dc_sb_lusu.jpg',
|
||||
'image/character/dc_sb_simayi.jpg',
|
||||
'image/character/dc_sb_simayi_shadow.jpg',
|
||||
'image/character/dc_sb_zhouyu.jpg',
|
||||
'image/character/dc_shixie.jpg',
|
||||
'image/character/dc_simashi.jpg',
|
||||
'image/character/dc_sp_jiaxu.jpg',
|
||||
'image/character/dc_sp_machao.jpg',
|
||||
'image/character/dc_sunce.jpg',
|
||||
|
@ -6926,6 +6953,7 @@ window.noname_asset_list=[
|
|||
'image/character/dc_tengfanglan.jpg',
|
||||
'image/character/dc_wangchang.jpg',
|
||||
'image/character/dc_wangjun.jpg',
|
||||
'image/character/dc_wangling.jpg',
|
||||
'image/character/dc_wangyun.jpg',
|
||||
'image/character/dc_wuban.jpg',
|
||||
'image/character/dc_xiahouba.jpg',
|
||||
|
@ -7073,6 +7101,7 @@ window.noname_asset_list=[
|
|||
'image/character/guohuanghou.jpg',
|
||||
'image/character/guojia.jpg',
|
||||
'image/character/guosi.jpg',
|
||||
'image/character/guotu.jpg',
|
||||
'image/character/guotufengji.jpg',
|
||||
'image/character/guozhao.jpg',
|
||||
'image/character/guyong.jpg',
|
||||
|
@ -7446,6 +7475,7 @@ window.noname_asset_list=[
|
|||
'image/character/jun_sunquan.jpg',
|
||||
'image/character/jun_zhangjiao.jpg',
|
||||
'image/character/junk_duanwei.jpg',
|
||||
'image/character/junk_guanyu.jpg',
|
||||
'image/character/junk_huangyueying.jpg',
|
||||
'image/character/junk_lidian.jpg',
|
||||
'image/character/junk_liubei.jpg',
|
||||
|
@ -7572,6 +7602,7 @@ window.noname_asset_list=[
|
|||
'image/character/liufeng.jpg',
|
||||
'image/character/liuhong.jpg',
|
||||
'image/character/liuhui.jpg',
|
||||
'image/character/liupan.jpg',
|
||||
'image/character/liupi.jpg',
|
||||
'image/character/liuqi.jpg',
|
||||
'image/character/liushan.jpg',
|
||||
|
@ -7742,6 +7773,7 @@ window.noname_asset_list=[
|
|||
'image/character/ol_liushan.jpg',
|
||||
'image/character/ol_liuyu.jpg',
|
||||
'image/character/ol_liwan.jpg',
|
||||
'image/character/ol_lukai.jpg',
|
||||
'image/character/ol_lusu.jpg',
|
||||
'image/character/ol_luyusheng.jpg',
|
||||
'image/character/ol_maliang.jpg',
|
||||
|
@ -7754,6 +7786,7 @@ window.noname_asset_list=[
|
|||
'image/character/ol_sb_guanyu.jpg',
|
||||
'image/character/ol_sb_jiangwei.jpg',
|
||||
'image/character/ol_sb_taishici.jpg',
|
||||
'image/character/ol_sb_yuanshao.jpg',
|
||||
'image/character/ol_sp_zhugeliang.jpg',
|
||||
'image/character/ol_sunjian.jpg',
|
||||
'image/character/ol_wanglang.jpg',
|
||||
|
@ -8287,6 +8320,7 @@ window.noname_asset_list=[
|
|||
'image/character/star_dongzhuo.jpg',
|
||||
'image/character/star_yuanshao.jpg',
|
||||
'image/character/star_yuanshu.jpg',
|
||||
'image/character/star_zhangchunhua.jpg',
|
||||
'image/character/std_panfeng.jpg',
|
||||
'image/character/sunce.jpg',
|
||||
'image/character/sunchen.jpg',
|
||||
|
|
28
game/game.js
|
@ -92,11 +92,31 @@ new Promise(resolve => {
|
|||
"safari": [14, 5, 0]
|
||||
}
|
||||
const versions = [major, minor, patch]
|
||||
// require是需求的版本号,current是浏览器环境本身的版本号
|
||||
const check = (require, current) => {
|
||||
// 防止不存在的意外,提前截断当前版本号的长度
|
||||
if (current.length > require.length) current.length = require.length
|
||||
|
||||
// current是需求的版本号,versions[index]是浏览器环境本身的版本号
|
||||
// 如果current > versions[index],即当前版本的浏览器版本号达不到要求的版本号,则可判定当前版本无法支持
|
||||
// 如果versions[index]为NaN,必然返回false;由于ua信息不可能存在主版本号NaN的情况,故不必考虑次版本号/修补版本号并不存在的情况
|
||||
if (core in supportMap && supportMap[core].some((current, index) => current > versions[index])) {
|
||||
// 考虑到玄学的NaN情况,记录是否存在NaN
|
||||
let flag = false
|
||||
// 从主版本号遍历到修订版本号,只考虑当前版本号的长度
|
||||
for (let i = 0; i < current.length; ++i) {
|
||||
// 当前环境版本号当前位若是NaN,则记录后直接到下一位
|
||||
if (isNaN(current[i])) {
|
||||
flag = true
|
||||
continue
|
||||
}
|
||||
// 如果此时flag为true且current[i]不为NaN,版本号则不合法,直接否
|
||||
if (flag) return false
|
||||
// 上位版本号未达到要求,直接否决
|
||||
if (require[i] > current[i]) return false
|
||||
// 上位版本号已超过要求,直接可行
|
||||
if (current[i] > require[i]) return true
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
if (core in supportMap && !check(supportMap[core], versions)) {
|
||||
const tip = '检测到您的浏览器内核版本无法支持当前无名杀所需的功能,请立即升级浏览器或手机webview内核!';
|
||||
console.error(tip);
|
||||
let redirect_tip = `您使用的浏览器或无名杀客户端内核版本过低,已经无法正常运行无名杀!\n目前使用的浏览器UA信息为:\n${userAgent}\n点击“确认”以前往GitHub下载最新版无名杀客户端(可能需要科学上网)。\n稍后您的无名杀将自动退出(可能的话)`;
|
||||
|
|
|
@ -1,14 +1,17 @@
|
|||
window.noname_update={
|
||||
version:'1.10.8',
|
||||
update:'1.10.7.1',
|
||||
version:'1.10.9',
|
||||
update:'1.10.8',
|
||||
changeLog:[
|
||||
'整合@mengxinzxz @Rintim @universe-st @nonameShijian @kuangshen04 @copcap @lieren2023 @7754496 的Pull Request',
|
||||
'“获得技能时/失去技能时”的新时机',
|
||||
'整合@mengxinzxz @copcap @hadeszoro @universe-st @cjk7989 @PZ157 @lieren2023 @Ansolve @Rintim @kuangshen04 @XboxSoldier 的Pull Request',
|
||||
'OL谋袁绍、郭图、刘磐、陆凯、谋关羽(初版)',
|
||||
'十周年谋司马懿、曹爽、星张春华、司马师、王凌、蒋济、公孙修、胡遵、吕范、李傕郭汜、臧霸、陈武董袭',
|
||||
'“转化牌花色/点数”的模糊匹配',
|
||||
'其他AI优化与bug修复',
|
||||
],
|
||||
files:[
|
||||
'card/swd.js',
|
||||
'card/yunchou.js',
|
||||
'card/extra.js',
|
||||
'card/guozhan.js',
|
||||
'card/standard.js',
|
||||
|
||||
'character/clan.js',
|
||||
'character/collab.js',
|
||||
|
@ -30,16 +33,18 @@ window.noname_update={
|
|||
'character/sp.js',
|
||||
'character/sp2.js',
|
||||
'character/standard.js',
|
||||
'character/swd.js',
|
||||
'character/tw.js',
|
||||
'character/xianding.js',
|
||||
'character/xianjian.js',
|
||||
'character/xinghuoliaoyuan.js',
|
||||
'character/yijiang.js',
|
||||
'character/yingbian.js',
|
||||
|
||||
'game/entry.js',
|
||||
'game/game.js',
|
||||
|
||||
'mode/boss.js',
|
||||
'mode/brawl.js',
|
||||
'mode/guozhan.js',
|
||||
'mode/identity.js',
|
||||
'mode/versus.js',
|
||||
|
@ -47,36 +52,21 @@ window.noname_update={
|
|||
'noname/game/index.js',
|
||||
|
||||
'noname/get/index.js',
|
||||
|
||||
'noname/init/cordova.js',
|
||||
'noname/init/import.js',
|
||||
'noname/init/index.js',
|
||||
'noname/init/onload.js',
|
||||
'noname/get/is.js',
|
||||
|
||||
'noname/library/index.js',
|
||||
|
||||
'noname/library/element/card.js',
|
||||
'noname/library/element/button.js',
|
||||
'noname/library/element/content.js',
|
||||
'noname/library/element/contents.js',
|
||||
'noname/library/element/gameEvent.js',
|
||||
'noname/library/element/player.js',
|
||||
'noname/library/element/vcard.js',
|
||||
|
||||
'noname/library/init/index.js',
|
||||
|
||||
'noname/ui/index.js',
|
||||
|
||||
'noname/ui/click/index.js',
|
||||
|
||||
'noname/ui/create/index.js',
|
||||
|
||||
'noname/ui/create/menu/index.js',
|
||||
|
||||
'noname/ui/create/menu/pages/cardPackMenu.js',
|
||||
'noname/ui/create/menu/pages/characterPackMenu.js',
|
||||
'noname/ui/create/menu/pages/extensionMenu.js',
|
||||
'noname/ui/create/menu/pages/optionsMenu.js',
|
||||
'noname/ui/create/menu/pages/otherMenu.js',
|
||||
'noname/ui/create/menu/pages/startMenu.js',
|
||||
|
||||
'service-worker.js',
|
||||
]
|
||||
};
|
||||
|
|
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 65 KiB |
After Width: | Height: | Size: 83 KiB |
After Width: | Height: | Size: 63 KiB |
After Width: | Height: | Size: 87 KiB |
After Width: | Height: | Size: 78 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 40 KiB |
After Width: | Height: | Size: 51 KiB |
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 47 KiB |
After Width: | Height: | Size: 41 KiB |
After Width: | Height: | Size: 31 KiB |
After Width: | Height: | Size: 101 KiB |
|
@ -8577,7 +8577,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
if(!player.hasSkill('olxuanfeng')) list.push('olxuanfeng');
|
||||
if(!player.hasSkill('rewansha')) list.push('rewansha');
|
||||
if(list.length==1){
|
||||
player.addTempSkill(list[0]);
|
||||
player.addTempSkills(list[0]);
|
||||
event.finish();
|
||||
}
|
||||
else{
|
||||
|
@ -8602,8 +8602,8 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
}).set('prompt','选择获得一项技能直到回合结束');
|
||||
}
|
||||
'step 1'
|
||||
player.addTempSkill(result.control);
|
||||
player.popup(get.translation(result.control));
|
||||
player.addTempSkills(result.control);
|
||||
// player.popup(get.translation(result.control));
|
||||
},
|
||||
ai:{
|
||||
order:function(){
|
||||
|
|
|
@ -571,7 +571,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
if(list.length==3) break;
|
||||
}
|
||||
if(!list.length){event.finish();return;}
|
||||
if(player.storage._lingli>0) list.push('刷新');
|
||||
if(player.storage._lingli>0) list.push('刷新');
|
||||
event.list=list;
|
||||
var dialog=game.getSkillDialog(event.list,'选择获得一个技能');
|
||||
player.chooseControl(event.list).set('ai',function(){
|
||||
|
|
|
@ -1666,7 +1666,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
var cards=[];
|
||||
//因为是线下武将 所以同一张牌重复进入只算一张
|
||||
game.getGlobalHistory('cardMove',function(evt){
|
||||
if(evt.name=='cardsDiscard'||(evt.name=='lose'&&evt.position==ui.discardPile)) cards.addArray(evt.cards);
|
||||
if(evt.name=='cardsDiscard'||(evt.name=='lose'&&evt.position==ui.discardPile)) cards.addArray(evt.cards);
|
||||
});
|
||||
return cards.length;
|
||||
},
|
||||
|
@ -8692,12 +8692,14 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
if(event.current&&event.current.isAlive()){
|
||||
event.showCharacter=false;
|
||||
var choiceList=['执行该军令,增加1点体力上限,然后回复1点体力','不执行该军令'];
|
||||
if(event.current.isFriendOf(player)) event.current.chooseJunlingControl(player,event.junling,targets).set('prompt','将略').set('choiceList',choiceList).set('ai',function(){return 0});
|
||||
if(event.current.isFriendOf(player)) event.current.chooseJunlingControl(player,event.junling,targets).set('prompt','将略').set('choiceList',choiceList).set('ai',function(){if(event.junling=='junling6'&&(event.current.countCards('h')>3||event.current.countCards('e')>2)) return 1;
|
||||
return event.junling=='junling5'?1:0;});
|
||||
else if((event.filterName(event.current.name1)||event.filterName(event.current.name2))&&event.current.wontYe(player.identity)){
|
||||
event.showCharacter=true;
|
||||
choiceList[0]='明置一张武将牌以'+choiceList[0];
|
||||
choiceList[1]='不明置武将牌且'+choiceList[1];
|
||||
event.current.chooseJunlingControl(player,event.junling,targets).set('prompt','将略').set('choiceList',choiceList).set('ai',function(){return 0});
|
||||
event.current.chooseJunlingControl(player,event.junling,targets).set('prompt','将略').set('choiceList',choiceList).set('ai',function(){if(event.junling=='junling6'&&(event.current.countCards('h')>3||event.current.countCards('e')>2)) return 1;
|
||||
return event.junling=='junling5'?1:0;});
|
||||
}
|
||||
else event.current.chooseJunlingControl(player,event.junling,targets).set('prompt','将略').set('controls',['ok']);
|
||||
}
|
||||
|
@ -8744,7 +8746,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
skillAnimation:'epic',
|
||||
animationColor:'soil',
|
||||
ai:{
|
||||
order:4,
|
||||
order:10,
|
||||
result:{
|
||||
player:function(player){
|
||||
if(player.isUnseen()&&player.wontYe()){
|
||||
|
@ -10555,7 +10557,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
check:function(card){
|
||||
if(card.name=='tao') return 0;
|
||||
return 5-get.value(card);
|
||||
return 7-get.value(card);
|
||||
},
|
||||
selectCard:[1,3],
|
||||
discard:false,
|
||||
|
@ -10571,7 +10573,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
ai:{
|
||||
basic:{
|
||||
order:2
|
||||
order:8
|
||||
},
|
||||
result:{
|
||||
player:function(player,target){
|
||||
|
@ -10585,7 +10587,11 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
if(huoshao&&player.inline(target.getNext())) return -3;
|
||||
if(target.isUnseen()) return 0;
|
||||
if(player.isMajor()) return 0;
|
||||
return 0.5;
|
||||
if(!player.isMajor()&&huoshao&&player.getNext().isMajor()) return -2;
|
||||
if(!player.isMajor()&&huoshao&&player.getNext().isMajor()&&player.getNext().getNext().isMajor()) return -3;
|
||||
if(!player.isMajor()&&huoshao&&!target.isMajor()&&target.getNext().isMajor()&&target.getNext().getNext().isMajor()) return 3;
|
||||
if(!player.isMajor()&&huoshao&&!target.isMajor()&&target.getNext().isMajor()) return 1.5;
|
||||
return 1;
|
||||
},
|
||||
target:function(player,target){
|
||||
if(target.isUnseen()) return 0;
|
||||
|
@ -11030,9 +11036,9 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
'step 2'
|
||||
if(result.control!='cancel2'){
|
||||
var skill='jiahe_'+result.control;
|
||||
player.addTempSkill(skill);
|
||||
player.addTempSkills(skill);
|
||||
if(!event.done) player.logSkill('jiahe_put');
|
||||
game.log(player,'获得了技能','【'+get.translation(skill)+'】');
|
||||
// game.log(player,'获得了技能','【'+get.translation(skill)+'】');
|
||||
if(event.num>=5&&!event.done){
|
||||
event.done=true;
|
||||
event.goto(1);
|
||||
|
|
|
@ -580,7 +580,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
case 'fan':list[i]='反贼';break;
|
||||
case 'zhong':list[i]='忠臣';break;
|
||||
case 'nei':list[i]='内奸';break;
|
||||
case 'commoner':list[i]='平民'; break;
|
||||
case 'commoner':list[i]='平民'; break;
|
||||
case 'zhu':list[i]='主公';break;
|
||||
case 'enemy':list[i]='敌方';break;
|
||||
case 'friend':list[i]='友方';break;
|
||||
|
@ -737,7 +737,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
switch(me.identity){
|
||||
case 'fan':game.over(false);break;
|
||||
case 'zhong':game.over(true);break;
|
||||
case 'commoner':game.over(true); break;
|
||||
case 'commoner':game.over(true); break;
|
||||
default:game.over();break;
|
||||
}
|
||||
}
|
||||
|
@ -745,7 +745,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
switch(me.identity){
|
||||
case 'fan':game.over(true);break;
|
||||
case 'zhong':game.over(false);break;
|
||||
case 'commoner':game.over(true); break;
|
||||
case 'commoner':game.over(true); break;
|
||||
default:game.over();break;
|
||||
}
|
||||
}
|
||||
|
@ -765,7 +765,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
}
|
||||
else if(me.identity=='nei'){
|
||||
if(game.players.length==(1+game.players.filter(i=>i.identity=='commoner').length)&&me.isAlive()){
|
||||
if(game.players.length==(1+game.players.filter(i=>i.identity=='commoner').length)&&me.isAlive()){
|
||||
game.over(true);
|
||||
}
|
||||
else{
|
||||
|
@ -781,8 +781,8 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
game.over(false);
|
||||
}
|
||||
}
|
||||
else if(me.identity=='commoner'){
|
||||
game.over(true);
|
||||
else if(me.identity=='commoner'){
|
||||
game.over(true);
|
||||
}
|
||||
},
|
||||
checkOnlineResult:function(player){
|
||||
|
@ -794,7 +794,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
if(game.zhu.isAlive()){
|
||||
return (player.identity=='zhu'||player.identity=='zhong'||player.identity=='mingzhong'||player.identity=='commoner'&&player.isAlive());
|
||||
}
|
||||
else if(game.players.length==(1+game.players.filter(i=>i.identity=='commoner').length)&&game.players[0].identity=='nei'||game.players[0].identity=='commoner'){
|
||||
else if(game.players.length==(1+game.players.filter(i=>i.identity=='commoner').length)&&game.players[0].identity=='nei'||game.players[0].identity=='commoner'){
|
||||
return player.isAlive();
|
||||
}
|
||||
else{
|
||||
|
@ -1568,9 +1568,9 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
link=['zhu','zhong','nei','fan','mingzhong'].randomGet();
|
||||
}
|
||||
else{
|
||||
var listi=['zhu','zhong','nei','fan'];
|
||||
if(get.config('enable_commoner')&&!event.stratagemMode) listi.push('commoner');
|
||||
link=listi.randomGet();
|
||||
var listi=['zhu','zhong','nei','fan'];
|
||||
if(get.config('enable_commoner')&&!event.stratagemMode) listi.push('commoner');
|
||||
link=listi.randomGet();
|
||||
}
|
||||
for(var i=0;i<this.parentNode.childElementCount;i++){
|
||||
if(this.parentNode.childNodes[i].link==link){
|
||||
|
@ -2712,7 +2712,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
}
|
||||
if(this.identity=='fan'&&source) source.draw(3);
|
||||
else if(this.identity=='commoner'&&source) source.draw(2);
|
||||
else if(this.identity=='commoner'&&source) source.draw(2);
|
||||
else if(this.identity=='mingzhong'&&source){
|
||||
if(source.identity=='zhu'){
|
||||
source.discard(source.getCards('he'));
|
||||
|
@ -2752,7 +2752,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
game.countPlayer(function(current){
|
||||
var identity=current.identity.slice(1);
|
||||
if(identity!='Zhu'){
|
||||
if(current.identity.indexOf('r')==0) red.push(current);
|
||||
if(current.identity.indexOf('r')==0) red.push(current);
|
||||
else blue.push(current);
|
||||
}
|
||||
});
|
||||
|
@ -3506,11 +3506,11 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
game.players[i].ai.shown<1){
|
||||
identity2='nei';break;
|
||||
}
|
||||
else if(game.players[i].identity=='commoner'&&
|
||||
game.players[i].ai.identity_mark=='zhong'&&
|
||||
game.players[i].ai.shown<1){
|
||||
identity2='commoner'; break;
|
||||
}
|
||||
else if(game.players[i].identity=='commoner'&&
|
||||
game.players[i].ai.identity_mark=='zhong'&&
|
||||
game.players[i].ai.shown<1){
|
||||
identity2='commoner'; break;
|
||||
}
|
||||
}
|
||||
}
|
||||
var zhongmode=false;
|
||||
|
@ -3596,13 +3596,13 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
if(zhongmode&&to.ai.sizhong&&to.ai.shown<1) return 6;
|
||||
return Math.min(3,-situation);
|
||||
case 'fan': return -8;
|
||||
case 'commoner':
|
||||
return Math.min(3,Math.max(-3,situation-0.2));
|
||||
case 'commoner':
|
||||
return Math.min(3,Math.max(-3,situation-0.2));
|
||||
}
|
||||
break;
|
||||
case 'nei':
|
||||
if(identity2=='zhu'&&game.players.length==2) return -10;
|
||||
if(from!=to&&identity2!='zhu'&&identity2!='commoner'&&game.players.length==3) return -8;
|
||||
if(from!=to&&identity2!='zhu'&&identity2!='commoner'&&game.players.length==3) return -8;
|
||||
var strategy=get.aiStrategy();
|
||||
if(strategy==4){
|
||||
if(from==to) return 10;
|
||||
|
@ -3623,7 +3623,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
if(fan){
|
||||
if(to.hp>1&&to.hp>fan.hp&&to.countCards('he')>fan.countCards('he')){
|
||||
return -3;
|
||||
return -1.7;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
@ -3706,8 +3706,8 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
if(game.zhu&&game.zhu.hp<=2) return -1;
|
||||
return Math.min(3,situation);
|
||||
case 'fan': return 5;
|
||||
case 'commoner':
|
||||
return 2*get.population('fan')-3;
|
||||
case 'commoner':
|
||||
return 2*get.population('fan')-3;
|
||||
}
|
||||
break;
|
||||
case 'commoner':
|
||||
|
@ -3874,7 +3874,8 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
'step 2'
|
||||
player.recover();
|
||||
player.draw();
|
||||
const skills = player.getStockSkills(true,true).forEach(stockSkill=>{
|
||||
'step 3'
|
||||
const skills = player.getStockSkills(true,true).filter(stockSkill=>{
|
||||
if(player.hasSkill(stockSkill)) return;
|
||||
var info=get.info(stockSkill);
|
||||
if(!info||!info.zhuSkill) return;
|
||||
|
|
|
@ -2632,7 +2632,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
}
|
||||
game.falseZhu.init('re_caocao');
|
||||
game.trueZhu.init('ol_yuanshao');
|
||||
game.trueZhu.init('ol_sb_yuanshao');
|
||||
game.trueZhu.hp++;
|
||||
game.trueZhu.maxHp++;
|
||||
game.falseZhu.hp++;
|
||||
|
@ -2640,13 +2640,32 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
game.trueZhu.update();
|
||||
game.falseZhu.update();
|
||||
ui.arena.classList.add('choose-character');
|
||||
if(get.is.phoneLayout()){
|
||||
ui.guanduInfo=ui.create.div('.touchinfo.left',ui.window);
|
||||
if(evt=='shishengshibai'){
|
||||
ui.guanduInfo=get.is.phoneLayout()?ui.create.div('.touchinfo.left',ui.window):ui.create.div(ui.gameinfo);
|
||||
ui.guanduInfo.innerHTML='十胜十败(0)';
|
||||
}
|
||||
else{
|
||||
ui.guanduInfo=ui.create.div(ui.gameinfo);
|
||||
const showGuanduEvent=function(evt){
|
||||
if(ui['GuanduEvent_'+evt]) return;
|
||||
ui['GuanduEvent_'+evt]=ui.create.system(get.translation(evt),null,true);
|
||||
lib.setPopped(ui['GuanduEvent_'+evt],function(){
|
||||
var uiintro=ui.create.dialog('hidden');
|
||||
uiintro.add(get.translation(evt));
|
||||
uiintro.add('<div class="text center">'+get.translation(evt+'_info')+'</div>');
|
||||
var ul=uiintro.querySelector('ul');
|
||||
if(ul) ul.style.width='180px';
|
||||
uiintro.add(ui.create.div('.placeholder'));
|
||||
return uiintro;
|
||||
},250);
|
||||
};
|
||||
for(const i in lib.playerOL){
|
||||
const target=lib.playerOL[i];
|
||||
if(target==game.me){
|
||||
showGuanduEvent(evt);
|
||||
}
|
||||
else if(target.isOnline2()){
|
||||
target.send(showGuanduEvent,evt);
|
||||
}
|
||||
}
|
||||
ui.guanduInfo.innerHTML='当前事件:'+get.translation(evt);
|
||||
if(lib.config.background_speak) game.playAudio('skill',evt);
|
||||
var dialog=ui.create.dialog('本局特殊事件:'+get.translation(evt));
|
||||
dialog.addText(get.translation(evt+'_info'),false);
|
||||
|
@ -2715,7 +2734,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
lib.init.onfree();
|
||||
ui.arena.classList.add('choose-character');
|
||||
game.falseZhu.init('re_caocao');
|
||||
game.trueZhu.init('ol_yuanshao');
|
||||
game.trueZhu.init('ol_sb_yuanshao');
|
||||
game.trueZhu.hp++;
|
||||
game.trueZhu.maxHp++;
|
||||
game.falseZhu.hp++;
|
||||
|
@ -2725,15 +2744,26 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
var evt_list=[['huoshaowuchao','chunyuqiong'],['liangcaokuifa','sp_xuyou'],['zhanyanliangzhuwenchou','jsp_guanyu'],['shishengshibai','re_guojia'],['xutuhuanjin','yj_jushou'],['liangjunxiangchi','yj_jushou'],['jianshoudaiyuan','tianfeng'],['yiruoshengqiang','re_caocao'],['shichongerjiao','sp_xuyou']].randomGet();
|
||||
var evt=evt_list[0],character=evt_list[1];
|
||||
game.addGlobalSkill(evt);
|
||||
const showGuanduEvent=function(evt){
|
||||
if(ui['GuanduEvent_'+evt]) return;
|
||||
ui['GuanduEvent_'+evt]=ui.create.system(get.translation(evt),null,true);
|
||||
lib.setPopped(ui['GuanduEvent_'+evt],function(){
|
||||
var uiintro=ui.create.dialog('hidden');
|
||||
uiintro.add(get.translation(evt));
|
||||
uiintro.add('<div class="text center">'+get.translation(evt+'_info')+'</div>');
|
||||
var ul=uiintro.querySelector('ul');
|
||||
if(ul) ul.style.width='180px';
|
||||
uiintro.add(ui.create.div('.placeholder'));
|
||||
return uiintro;
|
||||
},250);
|
||||
};
|
||||
showGuanduEvent(evt);
|
||||
game.broadcastAll(function(evt){
|
||||
if(get.is.phoneLayout()){
|
||||
ui.guanduInfo=ui.create.div('.touchinfo.left',ui.window);
|
||||
}
|
||||
else{
|
||||
ui.guanduInfo=ui.create.div(ui.gameinfo);
|
||||
}
|
||||
if(lib.config.background_speak) game.playAudio('skill',evt);
|
||||
ui.guanduInfo.innerHTML='当前事件:'+get.translation(evt);
|
||||
if(evt=='shishengshibai'){
|
||||
ui.guanduInfo=get.is.phoneLayout()?ui.create.div('.touchinfo.left',ui.window):ui.create.div(ui.gameinfo);
|
||||
ui.guanduInfo.innerHTML='十胜十败(0)';
|
||||
}
|
||||
},evt);
|
||||
game.me.chooseControl('ok').set('dialog',['###本局特殊事件:'+get.translation(evt)+'###'+get.translation(evt+'_info'),[[character],'character']]);
|
||||
'step 1'
|
||||
|
@ -4688,7 +4718,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
if(!_status.shishengshibai) _status.shishengshibai=0;
|
||||
_status.shishengshibai++;
|
||||
game.broadcastAll(function(num){
|
||||
if(ui.guanduInfo) ui.guanduInfo.innerHTML='当前事件:十胜十败('+num+')';
|
||||
if(ui.guanduInfo) ui.guanduInfo.innerHTML='十胜十败('+num+')';
|
||||
},_status.shishengshibai);
|
||||
if(_status.shishengshibai%10==0&&trigger.targets&&trigger.targets.length>0&&!['delay','equip'].includes(get.type(trigger.card))){
|
||||
trigger.effectCount++;
|
||||
|
|
|
@ -1881,12 +1881,12 @@ export class Game extends Uninstantable {
|
|||
config: objectConfig
|
||||
}
|
||||
try{
|
||||
if (precontent) {
|
||||
_status.extension = name;
|
||||
|
||||
await (gnc.is.generatorFunc(precontent) ? gnc.of(precontent) : precontent).call(object, config);
|
||||
delete _status.extension;
|
||||
}
|
||||
if (precontent) {
|
||||
_status.extension = name;
|
||||
|
||||
await (gnc.is.generatorFunc(precontent) ? gnc.of(precontent) : precontent).call(object, config);
|
||||
delete _status.extension;
|
||||
}
|
||||
}catch(e1){
|
||||
console.log(`加载《${name}》扩展的precontent时出现错误。`,e1);
|
||||
if(!lib.config.extension_alert) alert(`加载《${name}》扩展的precontent时出现错误。\n该错误本身可能并不影响扩展运行。您可以在“设置→通用→无视扩展报错”中关闭此弹窗。\n${decodeURI(e1.stack)}`);
|
||||
|
@ -5860,479 +5860,264 @@ export class Game extends Uninstantable {
|
|||
/**
|
||||
* @param { GameEventPromise } [event]
|
||||
*/
|
||||
static check(event) {
|
||||
let i, range;
|
||||
if (event == undefined) event = _status.event;
|
||||
static check(event = _status.event) {
|
||||
game.callHook("checkBegin", [event]);
|
||||
|
||||
event._checked = true;
|
||||
let custom = event.custom || {};
|
||||
let ok = true, auto = true;
|
||||
let player = event.player;
|
||||
let auto_confirm = lib.config.auto_confirm;
|
||||
let players = game.players.slice(0);
|
||||
if (event.deadTarget) players.addArray(game.dead);
|
||||
let ok = true, auto = true, auto_confirm = lib.config.auto_confirm;
|
||||
const player = event.player;
|
||||
const uppercaseType = (type) => type[0].toUpperCase() + type.slice(1);
|
||||
|
||||
|
||||
if (!event.filterButton && !event.filterCard && !event.filterTarget && (!event.skill || !event._backup)) {
|
||||
if (event.choosing) {
|
||||
_status.imchoosing = true;
|
||||
}
|
||||
return;
|
||||
if (event.choosing) _status.imchoosing = true;
|
||||
return false;
|
||||
}
|
||||
player.node.equips.classList.remove('popequip');
|
||||
if (event.filterButton) {
|
||||
let dialog = event.dialog;
|
||||
range = get.select(event.selectButton);
|
||||
let selectableButtons = false;
|
||||
if (event.forceAuto && ui.selected.buttons.length == range[1]) auto = true;
|
||||
else if (range[0] != range[1] || range[0] > 1) auto = false;
|
||||
for (i = 0; i < dialog.buttons.length; i++) {
|
||||
if (dialog.buttons[i].classList.contains('unselectable')) continue;
|
||||
if (event.filterButton(dialog.buttons[i], player) && lib.filter.buttonIncluded(dialog.buttons[i])) {
|
||||
if (ui.selected.buttons.length < range[1]) {
|
||||
dialog.buttons[i].classList.add('selectable');
|
||||
}
|
||||
else if (range[1] <= -1) {
|
||||
dialog.buttons[i].classList.add('selected');
|
||||
ui.selected.buttons.add(dialog.buttons[i]);
|
||||
}
|
||||
else {
|
||||
dialog.buttons[i].classList.remove('selectable');
|
||||
}
|
||||
}
|
||||
else {
|
||||
dialog.buttons[i].classList.remove('selectable');
|
||||
if (range[1] <= -1) {
|
||||
dialog.buttons[i].classList.remove('selected');
|
||||
ui.selected.buttons.remove(dialog.buttons[i]);
|
||||
}
|
||||
}
|
||||
if (dialog.buttons[i].classList.contains('selected')) {
|
||||
dialog.buttons[i].classList.add('selectable');
|
||||
}
|
||||
else if (!selectableButtons && dialog.buttons[i].classList.contains('selectable')) {
|
||||
selectableButtons = true;
|
||||
}
|
||||
}
|
||||
if (ui.selected.buttons.length < range[0]) {
|
||||
if (!event.forced || selectableButtons) {
|
||||
ok = false;
|
||||
}
|
||||
if (event.complexSelect || event.getParent().name == 'chooseCharacter' || event.getParent().name == 'chooseButtonOL') {
|
||||
ok = false;
|
||||
}
|
||||
}
|
||||
if (custom.add.button) {
|
||||
custom.add.button();
|
||||
}
|
||||
}
|
||||
if (event.filterCard) {
|
||||
if (ok == false) {
|
||||
game.uncheck('card');
|
||||
}
|
||||
else {
|
||||
let cards = player.getCards(event.position);
|
||||
let firstCheck = false;
|
||||
range = get.select(event.selectCard);
|
||||
if (!event._cardChoice && typeof event.selectCard != 'function' &&
|
||||
!event.complexCard && range[1] > -1 && !lib.config.compatiblemode) {
|
||||
event._cardChoice = [];
|
||||
firstCheck = true;
|
||||
}
|
||||
if (event.isMine() && event.name == 'chooseToUse' && event.parent.name == 'phaseUse' && !event.skill &&
|
||||
!event._targetChoice && !firstCheck && !lib.config.compatiblemode) {
|
||||
event._targetChoice = new Map();
|
||||
for (let i = 0; i < event._cardChoice.length; i++) {
|
||||
if (!lib.card[event._cardChoice[i].name].complexTarget) {
|
||||
let targets = [];
|
||||
for (let j = 0; j < players.length; j++) {
|
||||
if (event.filterTarget(event._cardChoice[i], player, players[j])) {
|
||||
targets.push(players[j]);
|
||||
}
|
||||
}
|
||||
event._targetChoice.set(event._cardChoice[i], targets);
|
||||
}
|
||||
}
|
||||
}
|
||||
let selectableCards = false;
|
||||
if (range[0] != range[1] || range[0] > 1) auto = false;
|
||||
for (i = 0; i < cards.length; i++) {
|
||||
if (lib.config.cardtempname != 'off') {
|
||||
let cardname = get.name(cards[i]);
|
||||
if (cards[i].name != cardname || !get.is.sameNature(get.nature(cards[i]), cards[i].nature, true)) {
|
||||
let node = ui.create.cardTempName(cards[i]);
|
||||
let cardtempnameConfig = lib.config.cardtempname;
|
||||
if (cardtempnameConfig !== 'default') node.classList.remove('vertical');
|
||||
}
|
||||
}
|
||||
let nochess = true;
|
||||
if (!lib.filter.cardAiIncluded(cards[i])) {
|
||||
nochess = false;
|
||||
}
|
||||
else if (event._cardChoice && !firstCheck) {
|
||||
if (!event._cardChoice.includes(cards[i])) {
|
||||
nochess = false;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (player.isOut() || !lib.filter.cardRespondable(cards[i], player) ||
|
||||
cards[i].classList.contains('uncheck') ||
|
||||
!event.filterCard(cards[i], player)) {
|
||||
nochess = false;
|
||||
}
|
||||
}
|
||||
if (nochess) {
|
||||
if (ui.selected.cards.length < range[1]) {
|
||||
cards[i].classList.add('selectable');
|
||||
if (event._cardChoice && firstCheck) {
|
||||
event._cardChoice.push(cards[i]);
|
||||
}
|
||||
}
|
||||
else if (range[1] <= -1) {
|
||||
cards[i].classList.add('selected');
|
||||
cards[i].updateTransform(true);
|
||||
ui.selected.cards.add(cards[i]);
|
||||
}
|
||||
else {
|
||||
cards[i].classList.remove('selectable');
|
||||
}
|
||||
}
|
||||
else {
|
||||
cards[i].classList.remove('selectable');
|
||||
if (range[1] <= -1) {
|
||||
cards[i].classList.remove('selected');
|
||||
cards[i].updateTransform();
|
||||
ui.selected.cards.remove(cards[i]);
|
||||
}
|
||||
}
|
||||
if (cards[i].classList.contains('selected')) {
|
||||
cards[i].classList.add('selectable');
|
||||
}
|
||||
else if (!selectableCards && cards[i].classList.contains('selectable')) {
|
||||
selectableCards = true;
|
||||
}
|
||||
}
|
||||
if (ui.selected.cards.length < range[0]) {
|
||||
if (!event.forced || selectableCards || event.complexSelect) {
|
||||
ok = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (lib.config.popequip && get.is.phoneLayout() &&
|
||||
typeof event.position == 'string' && event.position.includes('e') &&
|
||||
player.node.equips.querySelector('.card.selectable')) {
|
||||
player.node.equips.classList.add('popequip');
|
||||
auto_confirm = false;
|
||||
}
|
||||
}
|
||||
if (custom.add.card) {
|
||||
custom.add.card();
|
||||
}
|
||||
}
|
||||
if (event.filterTarget) {
|
||||
if (ok == false) {
|
||||
game.uncheck('target');
|
||||
}
|
||||
else {
|
||||
let card = get.card();
|
||||
let firstCheck = false;
|
||||
range = get.select(event.selectTarget);
|
||||
let selectableTargets = false;
|
||||
if (range[0] != range[1] || range[0] > 1) auto = false;
|
||||
for (i = 0; i < players.length; i++) {
|
||||
let nochess = true;
|
||||
if (game.chess && !event.chessForceAll && player && get.distance(player, players[i], 'pure') > 7) {
|
||||
nochess = false;
|
||||
}
|
||||
else if (players[i].isOut()) {
|
||||
nochess = false;
|
||||
}
|
||||
else if (event._targetChoice && event._targetChoice.has(card)) {
|
||||
let targetChoice = event._targetChoice.get(card);
|
||||
if (!Array.isArray(targetChoice) || !targetChoice.includes(players[i])) {
|
||||
nochess = false;
|
||||
}
|
||||
}
|
||||
else if (!event.filterTarget(card, player, players[i])) {
|
||||
nochess = false;
|
||||
}
|
||||
if (nochess) {
|
||||
if (ui.selected.targets.length < range[1]) {
|
||||
players[i].classList.add('selectable');
|
||||
if (Array.isArray(event._targetChoice)) {
|
||||
event._targetChoice.push(players[i]);
|
||||
}
|
||||
}
|
||||
else if (range[1] <= -1) {
|
||||
players[i].classList.add('selected');
|
||||
ui.selected.targets.add(players[i]);
|
||||
}
|
||||
else {
|
||||
players[i].classList.remove('selectable');
|
||||
}
|
||||
}
|
||||
else {
|
||||
players[i].classList.remove('selectable');
|
||||
if (range[1] <= -1) {
|
||||
players[i].classList.remove('selected');
|
||||
ui.selected.targets.remove(players[i]);
|
||||
}
|
||||
}
|
||||
if (players[i].classList.contains('selected')) {
|
||||
players[i].classList.add('selectable');
|
||||
}
|
||||
else if (!selectableTargets && players[i].classList.contains('selectable')) {
|
||||
selectableTargets = true;
|
||||
}
|
||||
if (players[i].instance) {
|
||||
if (players[i].classList.contains('selected')) {
|
||||
players[i].instance.classList.add('selected');
|
||||
}
|
||||
else {
|
||||
players[i].instance.classList.remove('selected');
|
||||
}
|
||||
if (players[i].classList.contains('selectable')) {
|
||||
players[i].instance.classList.add('selectable');
|
||||
}
|
||||
else {
|
||||
players[i].instance.classList.remove('selectable');
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ui.selected.targets.length < range[0]) {
|
||||
if (!event.forced || selectableTargets || event.complexSelect) {
|
||||
ok = false;
|
||||
}
|
||||
}
|
||||
if (range[1] <= -1 && ui.selected.targets.length == 0 && event.targetRequired) {
|
||||
ok = false;
|
||||
}
|
||||
}
|
||||
if (custom.add.target) {
|
||||
custom.add.target();
|
||||
}
|
||||
}
|
||||
if (!event.skill && get.noSelected() && !_status.noconfirm) {
|
||||
const skills = [];
|
||||
if (event._skillChoice) {
|
||||
let skills2 = event._skillChoice;
|
||||
for (let i = 0; i < skills2.length; i++) {
|
||||
if (event.isMine() || !event._aiexclude.includes(skills2[i])) {
|
||||
skills.push(skills2[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
let skills2;
|
||||
if (get.mode() == 'guozhan' && player.hasSkillTag('nomingzhi', false, null, true)) {
|
||||
skills2 = player.getSkills(false, true, false);
|
||||
}
|
||||
else {
|
||||
skills2 = player.getSkills('invisible', true, false);
|
||||
}
|
||||
skills2 = game.filterSkills(skills2.concat(lib.skill.global), player, player.getSkills('e').concat(lib.skill.global));
|
||||
event._skillChoice = [];
|
||||
game.expandSkills(skills2);
|
||||
for (let i = 0; i < skills2.length; i++) {
|
||||
const info = get.info(skills2[i]);
|
||||
if (!info) throw new ReferenceError(`Cannot find ${skills2[i]} in lib.skill`);
|
||||
let enable = false;
|
||||
if (typeof info.enable == 'function') enable = info.enable(event);
|
||||
else if (Array.isArray(info.enable)) enable = info.enable.includes(event.name);
|
||||
else if (info.enable == 'phaseUse') enable = (event.type == 'phase');
|
||||
else if (typeof info.enable == 'string') enable = (info.enable == event.name);
|
||||
if (enable) {
|
||||
if (!game.expandSkills(player.getSkills(false).concat(lib.skill.global)).includes(skills2[i]) && (info.noHidden || get.mode() != 'guozhan' || player.hasSkillTag('nomingzhi', false, null, true))) enable = false;
|
||||
if (info.filter && !info.filter(event, player)) enable = false;
|
||||
if (info.viewAs && typeof info.viewAs != 'function' && event.filterCard && !event.filterCard(info.viewAs, player, event)) enable = false;
|
||||
if (info.viewAs && typeof info.viewAs != 'function' && info.viewAsFilter && info.viewAsFilter(player) == false) enable = false;
|
||||
if (info.usable && get.skillCount(skills2[i]) >= info.usable) enable = false;
|
||||
if (info.chooseButton && _status.event.noButton) enable = false;
|
||||
if (info.round && (info.round - (game.roundNumber - player.storage[skills2[i] + '_roundcount']) > 0)) enable = false;
|
||||
for (const item in player.storage) {
|
||||
if (item.startsWith('temp_ban_')) {
|
||||
if(player.storage[item] !== true) continue;
|
||||
const skillName = item.slice(9);
|
||||
if (lib.skill[skillName]) {
|
||||
const skills=game.expandSkills([skillName]);
|
||||
if(skills.includes(skills2[i])) {
|
||||
enable = false; break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (enable) {
|
||||
if (event.isMine() || !event._aiexclude.includes(skills2[i])) {
|
||||
skills.add(skills2[i]);
|
||||
}
|
||||
event._skillChoice.add(skills2[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
const useCache = !lib.config.compatiblemode && !event.skill && !event.multitarget
|
||||
&& ['button', 'card', 'target'].every(type => {
|
||||
if (!event[`filter${uppercaseType(type)}`]) return true;
|
||||
// if (typeof event[`select${uppercaseType(type)}`] === 'function') return false;
|
||||
if (get.select(event[`select${uppercaseType(type)}`])[1] < 0) return false;
|
||||
if (type === "button") type = "select";
|
||||
return !event[`complex${uppercaseType(type)}`];
|
||||
});
|
||||
|
||||
['button', 'card', 'target'].forEach(type => {
|
||||
if (!event[`filter${uppercaseType(type)}`]) return;
|
||||
if (!ok) game.uncheck(type);
|
||||
else ({ ok, auto = auto } = game.Check[type](event, useCache));
|
||||
});
|
||||
|
||||
game.Check.skill(event);
|
||||
|
||||
let globalskills = [];
|
||||
let globallist = lib.skill.global.slice(0);
|
||||
game.expandSkills(globallist);
|
||||
for (let i = 0; i < skills.length; i++) {
|
||||
if (globallist.includes(skills[i])) {
|
||||
globalskills.push(skills.splice(i--, 1)[0]);
|
||||
}
|
||||
}
|
||||
let equipskills = [];
|
||||
let ownedskills = player.getSkills('invisible', false);
|
||||
game.expandSkills(ownedskills);
|
||||
for (let i = 0; i < skills.length; i++) {
|
||||
if (!ownedskills.includes(skills[i])) {
|
||||
equipskills.push(skills.splice(i--, 1)[0]);
|
||||
}
|
||||
}
|
||||
if (equipskills.length) {
|
||||
ui.create.skills3(equipskills);
|
||||
}
|
||||
else if (ui.skills3) {
|
||||
ui.skills3.close();
|
||||
}
|
||||
if (skills.length) {
|
||||
ui.create.skills(skills);
|
||||
}
|
||||
else if (ui.skills) {
|
||||
ui.skills.close();
|
||||
}
|
||||
if (globalskills.length) {
|
||||
ui.create.skills2(globalskills);
|
||||
}
|
||||
else if (ui.skills2) {
|
||||
ui.skills2.close();
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (ui.skills) {
|
||||
ui.skills.close()
|
||||
}
|
||||
if (ui.skills2) {
|
||||
ui.skills2.close()
|
||||
}
|
||||
if (ui.skills3) {
|
||||
ui.skills3.close()
|
||||
}
|
||||
}
|
||||
_status.multitarget = false;
|
||||
let skillinfo = get.info(_status.event.skill);
|
||||
if (_status.event.name == 'chooseToUse') {
|
||||
if (skillinfo && skillinfo.multitarget && !skillinfo.multiline) {
|
||||
_status.multitarget = true;
|
||||
}
|
||||
if ((skillinfo && skillinfo.viewAs && typeof skillinfo.viewAs != 'function') || !_status.event.skill) {
|
||||
let cardinfo = get.info(get.card());
|
||||
const skillinfo = get.info(event.skill)||{};
|
||||
if (_status.event.multitarget) _status.multitarget = true;
|
||||
else if (_status.event.name === 'chooseToUse') {
|
||||
if (skillinfo.multitarget && !skillinfo.multiline) _status.multitarget = true;
|
||||
if (skillinfo.viewAs && typeof skillinfo.viewAs !== 'function') {
|
||||
const cardinfo = get.info(get.card());
|
||||
if (cardinfo && (cardinfo.multitarget || cardinfo.complexSelect) && !cardinfo.multiline) {
|
||||
_status.multitarget = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (_status.event.multitarget) {
|
||||
_status.multitarget = true;
|
||||
|
||||
player.node.equips.classList.remove('popequip');
|
||||
if (event.filterCard && lib.config.popequip && !_status.nopopequip && get.is.phoneLayout() &&
|
||||
typeof event.position === 'string' && event.position.includes('e') &&
|
||||
player.node.equips.querySelector('.card.selectable')) {
|
||||
player.node.equips.classList.add('popequip');
|
||||
auto_confirm = false;
|
||||
}
|
||||
if (event.isMine()) {
|
||||
if (game.chess && game.me && get.config('show_distance')) {
|
||||
for (let i = 0; i < players.length; i++) {
|
||||
if (players[i] == game.me) {
|
||||
players[i].node.action.hide();
|
||||
}
|
||||
else {
|
||||
players[i].node.action.show();
|
||||
let dist = get.distance(game.me, players[i], 'pure');
|
||||
let dist2 = get.distance(game.me, players[i]);
|
||||
players[i].node.action.innerHTML = '距离:' + dist2 + '/' + dist;
|
||||
if (dist > 7) {
|
||||
players[i].node.action.classList.add('thunder');
|
||||
}
|
||||
else {
|
||||
players[i].node.action.classList.remove('thunder');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ok && (!event.filterOk || event.filterOk()) && auto && (auto_confirm || (skillinfo && skillinfo.direct)) && (!_status.mousedragging || !_status.mouseleft) &&
|
||||
!_status.mousedown && !_status.touchnocheck) {
|
||||
if (ui.confirm) {
|
||||
if (!skillinfo || !skillinfo.preservecancel) {
|
||||
ui.confirm.close();
|
||||
}
|
||||
}
|
||||
if (skillinfo && skillinfo.preservecancel && !ui.confirm) {
|
||||
ui.create.confirm('c');
|
||||
}
|
||||
if (event.skillDialog == true) event.skillDialog = false;
|
||||
ui.click.ok();
|
||||
_status.mousedragging = null;
|
||||
}
|
||||
else {
|
||||
ui.arena.classList.add('selecting');
|
||||
if (event.filterTarget && (!event.filterCard || !event.position || (typeof event.position == 'string' && event.position.indexOf('e') == -1))) {
|
||||
ui.arena.classList.add('tempnoe');
|
||||
}
|
||||
game.countChoose();
|
||||
if (!_status.noconfirm && !_status.event.noconfirm) {
|
||||
if (!_status.mousedown || _status.mouseleft) {
|
||||
let str = '';
|
||||
if (ok && (!event.filterOk || event.filterOk())) str += 'o';
|
||||
if (!event.forced && !event.fakeforce && get.noSelected()) str += 'c';
|
||||
ui.create.confirm(str);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ui.confirm && ui.confirm.lastChild.link == 'cancel') {
|
||||
if (_status.event.type == 'phase' && !_status.event.skill) {
|
||||
ui.confirm.lastChild.innerHTML = '结束';
|
||||
}
|
||||
else {
|
||||
ui.confirm.lastChild.innerHTML = '取消';
|
||||
}
|
||||
}
|
||||
|
||||
if (event.isMine() && game.chess && get.config('show_distance') && game.me) {
|
||||
const players = game.players.slice();
|
||||
if (event.deadTarget) players.addArray(game.dead);
|
||||
players.forEach(player => {
|
||||
if (player === game.me) return player.node.action.hide();
|
||||
player.node.action.show();
|
||||
let dist = get.distance(game.me, player, 'pure');
|
||||
let dist2 = get.distance(game.me, player);
|
||||
player.node.action.innerHTML = `距离:${dist2}/${dist}`;
|
||||
if (dist > 7) player.node.action.classList.add('thunder');
|
||||
else player.node.action.classList.remove('thunder');
|
||||
});
|
||||
}
|
||||
|
||||
ok = ok && (!event.filterOk || event.filterOk());
|
||||
let confirm = '';
|
||||
if (ok) confirm += 'o';
|
||||
if (!event.forced && !event.fakeforce && get.noSelected()) confirm += 'c';
|
||||
if (event.isMine()) game.Check.confirm(event, confirm);
|
||||
|
||||
game.callHook("checkEnd", [event, { ok, auto, auto_confirm }]);
|
||||
|
||||
// if (ui.confirm && ui.confirm.lastChild.link == 'cancel') {
|
||||
// if (_status.event.type == 'phase' && !_status.event.skill) {
|
||||
// ui.confirm.lastChild.innerHTML = '结束';
|
||||
// }
|
||||
// else {
|
||||
// ui.confirm.lastChild.innerHTML = '取消';
|
||||
// }
|
||||
// }
|
||||
return ok;
|
||||
}
|
||||
static Check = class extends Uninstantable {
|
||||
static processSelection({ type, items, event, useCache, isSelectable }) {
|
||||
let ok = true, auto;
|
||||
let selectableItems = false;
|
||||
const uppercaseType = (type) => type[0].toUpperCase() + type.slice(1);
|
||||
const uiSelected = ui.selected[`${type}s`];
|
||||
const range = get.select(event[`select${uppercaseType(type)}`]);
|
||||
|
||||
if (event.forceAuto && uiSelected.length === range[1]) auto = true;
|
||||
else if (range[0] !== range[1] || range[0] > 1) auto = false;
|
||||
|
||||
let cache;
|
||||
let firstCheck = false;
|
||||
|
||||
if (useCache) {
|
||||
if (!event[`_${type}Choice`]) event[`_${type}Choice`] = {};
|
||||
let cacheId = 0;
|
||||
for (let Type of ['button', 'card', 'target']) {
|
||||
if (type === Type) break;
|
||||
if (Type === "target") Type = "player";
|
||||
ui.selected[`${Type}s`].forEach(i => cacheId ^= i[`${Type}id`]);
|
||||
}
|
||||
if (!event[`_${type}Choice`][cacheId]) {
|
||||
event[`_${type}Choice`][cacheId] = [];
|
||||
firstCheck = true;
|
||||
}
|
||||
cache = event[`_${type}Choice`][cacheId];
|
||||
}
|
||||
|
||||
items.forEach(item => {
|
||||
let selectable;
|
||||
if (!lib.filter.cardAiIncluded(item)) selectable = false;
|
||||
else if (useCache && !firstCheck) selectable = cache.includes(item);
|
||||
else selectable = isSelectable(item, event);
|
||||
|
||||
if (range[1] <= -1) {
|
||||
if (selectable) {
|
||||
item.classList.add('selected');
|
||||
uiSelected.add(item);
|
||||
} else {
|
||||
item.classList.remove('selected');
|
||||
uiSelected.remove(item);
|
||||
}
|
||||
if (item.updateTransform) item.updateTransform(selectable);
|
||||
} else {
|
||||
if (selectable && uiSelected.length < range[1]) {
|
||||
item.classList.add('selectable');
|
||||
if (firstCheck) cache.push(item);
|
||||
}
|
||||
else item.classList.remove('selectable');
|
||||
}
|
||||
|
||||
if (item.classList.contains('selectable')) selectableItems = true;
|
||||
else if (item.classList.contains('selected')) item.classList.add('selectable');
|
||||
|
||||
game.callHook(`check${uppercaseType(type)}`, [item, event]);
|
||||
});
|
||||
|
||||
if (event[`${type}Required`] && uiSelected.length === 0) ok = false;
|
||||
else if (uiSelected.length < range[0] && (!event.forced || selectableItems || event.complexSelect)) ok = false;
|
||||
|
||||
if (event.custom && event.custom.add[type]) event.custom.add[type]();
|
||||
|
||||
return { ok, auto };
|
||||
}
|
||||
static button(event, useCache) {
|
||||
const player = event.player;
|
||||
const buttons = event.dialog.buttons;
|
||||
const isSelectable = (button, event) => {
|
||||
if (!lib.filter.buttonIncluded(button)) return false;
|
||||
if (button.classList.contains('unselectable')) return false;
|
||||
return event.filterButton(button, player);
|
||||
}
|
||||
return game.Check.processSelection({ type: 'button', items: buttons, event, useCache, isSelectable });
|
||||
}
|
||||
static card(event, useCache) {
|
||||
const player = event.player;
|
||||
const cards = player.getCards(event.position);
|
||||
const isSelectable = (card, event) => {
|
||||
if (card.classList.contains('uncheck')) return false;
|
||||
if (player.isOut()) return false;
|
||||
if (!lib.filter.cardRespondable(card, player)) return false;
|
||||
return event.filterCard(card, player);
|
||||
}
|
||||
return game.Check.processSelection({ type: 'card', items: cards, event, useCache, isSelectable });
|
||||
}
|
||||
static target(event, useCache) {
|
||||
const player = event.player;
|
||||
const card = get.card();
|
||||
const targets = game.players.slice();
|
||||
if (event.deadTarget) targets.addArray(game.dead);
|
||||
const isSelectable = (target, event) => {
|
||||
if (game.chess && !event.chessForceAll && player && get.distance(player, target, 'pure') > 7) return false;
|
||||
if (target.isOut()) return false;
|
||||
return event.filterTarget(card, player, target);
|
||||
}
|
||||
return game.Check.processSelection({ type: 'target', items: targets, event, useCache, isSelectable });
|
||||
}
|
||||
static skill(event) {
|
||||
if (ui.skills) ui.skills.close();
|
||||
if (ui.skills2) ui.skills2.close();
|
||||
if (ui.skills3) ui.skills3.close();
|
||||
if (event.skill || !get.noSelected() || _status.noconfirm) return;
|
||||
|
||||
const player = event.player;
|
||||
if (!event._skillChoice) event._skillChoice = game.expandSkills(player.getSkills('invisible').concat(lib.skill.global)).filter(skill => lib.filter.filterEnable(event, player, skill));
|
||||
|
||||
const skills = event._skillChoice.filter(i => event.isMine() || !event._aiexclude.includes(i));
|
||||
const globallist = game.expandSkills(lib.skill.global.slice());
|
||||
const ownedlist = game.expandSkills(player.getSkills('invisible', false));
|
||||
|
||||
const ownedSkills = [], globalSkills = [], equipSkills = [];
|
||||
skills.forEach(skill => {
|
||||
if (globallist.includes(skill)) globalSkills.push(skill);
|
||||
else if (!ownedlist.includes(skill)) equipSkills.push(skill);
|
||||
else ownedSkills.push(skill);
|
||||
});
|
||||
|
||||
if (ownedSkills.length) ui.create.skills(ownedSkills);
|
||||
if (globalSkills.length) ui.create.skills2(globalSkills);
|
||||
if (equipSkills.length) ui.create.skills3(equipSkills);
|
||||
}
|
||||
static confirm(event, confirm) {
|
||||
ui.arena.classList.add('selecting');
|
||||
if (event.filterTarget && (!event.filterCard || !event.position || (typeof event.position == 'string' && !event.position.includes('e')))) {
|
||||
ui.arena.classList.add('tempnoe');
|
||||
}
|
||||
game.countChoose();
|
||||
if (!_status.noconfirm && !_status.event.noconfirm && (_status.mouseleft || !_status.mousedown)) {
|
||||
ui.create.confirm(confirm);
|
||||
}
|
||||
}
|
||||
}
|
||||
static uncheck(...args) {
|
||||
let i, j;
|
||||
if (game.chess) {
|
||||
let shadows = ui.chessContainer.getElementsByClassName('playergrid temp');
|
||||
while (shadows.length) {
|
||||
shadows[0].remove();
|
||||
}
|
||||
}
|
||||
if ((args.length == 0 || args.includes('card')) && _status.event.player) {
|
||||
let cards = _status.event.player.getCards('hejsx');
|
||||
for (j = 0; j < cards.length; j++) {
|
||||
cards[j].classList.remove('selected');
|
||||
cards[j].classList.remove('selectable');
|
||||
if (cards[j]._tempName) {
|
||||
cards[j]._tempName.delete();
|
||||
delete cards[j]._tempName;
|
||||
}
|
||||
cards[j].updateTransform();
|
||||
}
|
||||
ui.selected.cards.length = 0;
|
||||
_status.event.player.node.equips.classList.remove('popequip');
|
||||
}
|
||||
let players = game.players.slice(0);
|
||||
if (args.length === 0) args = ['button', 'card', 'target'];
|
||||
const event = _status.event;
|
||||
const players = game.players.slice();
|
||||
if (_status.event.deadTarget) players.addArray(game.dead);
|
||||
if ((args.length == 0 || args.includes('target'))) {
|
||||
for (j = 0; j < players.length; j++) {
|
||||
players[j].classList.remove('selected');
|
||||
players[j].classList.remove('selectable');
|
||||
if (players[j].instance) {
|
||||
players[j].instance.classList.remove('selected');
|
||||
players[j].instance.classList.remove('selectable');
|
||||
}
|
||||
}
|
||||
ui.selected.targets.length = 0;
|
||||
|
||||
game.callHook("uncheckBegin", [event, args]);
|
||||
|
||||
if (game.chess) {
|
||||
const shadows = Array.from(ui.chessContainer.querySelectorAll('.playergrid.temp'));
|
||||
shadows.forEach(i => i.remove());
|
||||
}
|
||||
if ((args.length == 0 || args.includes('button')) && _status.event.dialog && _status.event.dialog.buttons) {
|
||||
for (let j = 0; j < _status.event.dialog.buttons.length; j++) {
|
||||
_status.event.dialog.buttons[j].classList.remove('selectable');
|
||||
_status.event.dialog.buttons[j].classList.remove('selected');
|
||||
}
|
||||
if(event.player) event.player.node.equips.classList.remove('popequip');
|
||||
|
||||
if (args.includes('button') && event.dialog && event.dialog.buttons) {
|
||||
event.dialog.buttons.forEach(button => {
|
||||
button.classList.remove('selectable');
|
||||
button.classList.remove('selected');
|
||||
game.callHook("uncheckButton", [button, event]);
|
||||
});
|
||||
ui.selected.buttons.length = 0;
|
||||
}
|
||||
if (args.length == 0) {
|
||||
if (args.includes('card') && event.player) {
|
||||
const cards = event.player.getCards('hejsx');
|
||||
cards.forEach(card => {
|
||||
card.classList.remove('selected');
|
||||
card.classList.remove('selectable');
|
||||
card.updateTransform(false);
|
||||
game.callHook("uncheckCard", [card, event]);
|
||||
});
|
||||
ui.selected.cards.length = 0;
|
||||
}
|
||||
if (args.includes('target')) {
|
||||
players.forEach(target => {
|
||||
target.classList.remove('selected');
|
||||
target.classList.remove('selectable');
|
||||
game.callHook("uncheckTarget", [target, event]);
|
||||
});
|
||||
ui.selected.targets.length = 0;
|
||||
}
|
||||
if (args.length === 3) {
|
||||
ui.arena.classList.remove('selecting');
|
||||
ui.arena.classList.remove('tempnoe');
|
||||
_status.imchoosing = false;
|
||||
|
@ -6340,20 +6125,17 @@ export class Game extends Uninstantable {
|
|||
_status.mousedragging = null;
|
||||
_status.mousedragorigin = null;
|
||||
|
||||
while (ui.touchlines.length) {
|
||||
ui.touchlines.shift().delete();
|
||||
}
|
||||
ui.touchlines.forEach(i => i.delete());
|
||||
ui.touchlines.length = 0;
|
||||
}
|
||||
ui.canvas.width = ui.arena.offsetWidth;
|
||||
ui.canvas.height = ui.arena.offsetHeight;
|
||||
for (let i = 0; i < players.length; i++) {
|
||||
players[i].unprompt();
|
||||
}
|
||||
for (let i = 0; i < _status.dragline.length; i++) {
|
||||
if (_status.dragline[i]) _status.dragline[i].remove();
|
||||
}
|
||||
ui.arena.classList.remove('dragging');
|
||||
players.forEach(i => i.unprompt());
|
||||
_status.dragline.forEach(i => i && i.remove());
|
||||
_status.dragline.length = 0;
|
||||
ui.arena.classList.remove('dragging');
|
||||
|
||||
game.callHook("uncheckEnd", [event, args]);
|
||||
}
|
||||
/**
|
||||
* @param { Player } player1
|
||||
|
|
|
@ -1791,7 +1791,7 @@ export class Get extends Uninstantable {
|
|||
return game.checkMod(card, owner, game.checkMod(card, card.suit, 'suit', owner), 'cardsuit', owner);
|
||||
}
|
||||
}
|
||||
if (lib.suits.includes(card.suit)) return card.suit;
|
||||
if (card.suit === 'unsure' || lib.suits.includes(card.suit)) return card.suit;
|
||||
return 'none';
|
||||
}
|
||||
}
|
||||
|
@ -1810,7 +1810,7 @@ export class Get extends Uninstantable {
|
|||
}
|
||||
return color;
|
||||
}
|
||||
else if (Object.keys(lib.color).includes(card.color)) {
|
||||
else if (card.color === 'unsure' || Object.keys(lib.color).includes(card.color)) {
|
||||
return card.color;
|
||||
}
|
||||
else if (Array.isArray(card.cards) && !lib.suit.includes(card.suit)) {
|
||||
|
@ -1835,7 +1835,8 @@ export class Get extends Uninstantable {
|
|||
var number = null;
|
||||
if ('number' in card) {
|
||||
number = card.number;
|
||||
if (typeof number != 'number') number = null;
|
||||
if (number === 'unsure') return number;
|
||||
else if (typeof number != 'number') number = null;
|
||||
}
|
||||
else {
|
||||
if (card.cards && card.cards.length == 1) number = get.number(card.cards[0], false);
|
||||
|
@ -2226,6 +2227,12 @@ export class Get extends Uninstantable {
|
|||
}
|
||||
return '';
|
||||
}
|
||||
static menuZoom(){
|
||||
if(game.menuZoom === undefined || game.menuZoom === null){
|
||||
return game.documentZoom;
|
||||
}
|
||||
return game.menuZoom;
|
||||
}
|
||||
static strNumber(num) {
|
||||
switch (num) {
|
||||
case 1: return 'A';
|
||||
|
|
|
@ -131,8 +131,8 @@ export class Is extends Uninstantable {
|
|||
* @param { Card | VCard } card
|
||||
*/
|
||||
// @ts-ignore
|
||||
static vituralCard(card) {
|
||||
return card.isCard || (!("cards" in card) || !Array.isArray(card.cards) || card.cards.length == 0);
|
||||
static virtualCard(card) {
|
||||
return (!("cards" in card) || !Array.isArray(card.cards) || card.cards.length === 0);
|
||||
}
|
||||
/**
|
||||
* 是否是转化牌
|
||||
|
@ -147,7 +147,9 @@ export class Is extends Uninstantable {
|
|||
* @param { Card | VCard } card
|
||||
*/
|
||||
// @ts-ignore
|
||||
static ordinaryCard(card) { return card.isCard && ("cards" in card) && Array.isArray(card.cards) && card.cards.length == 1 }
|
||||
static ordinaryCard(card) {
|
||||
return card.isCard && ("cards" in card) && Array.isArray(card.cards) && card.cards.length === 1
|
||||
}
|
||||
/**
|
||||
* 押韵判断
|
||||
* @param { string } str1
|
||||
|
|
|
@ -30,6 +30,7 @@ export class Button extends HTMLDivElement {
|
|||
const intro = button.querySelector('.intro');
|
||||
if (intro) intro.remove();
|
||||
}
|
||||
if (!button.buttonid) button.buttonid = get.id();
|
||||
// @ts-ignore
|
||||
button._args = [item, type, position, noClick, button];
|
||||
return button;
|
||||
|
|
|
@ -85,15 +85,19 @@ export const Content = {
|
|||
},
|
||||
//变更技能
|
||||
async changeSkills (event,trigger,player) {
|
||||
//获取玩家当前已有的技能
|
||||
const ownedSkills = player.getSkills(true, false, false);
|
||||
//去重检查
|
||||
event.addSkill.unique();
|
||||
event.removeSkill.unique();
|
||||
//避免失去还没拥有的技能
|
||||
event.removeSkill = event.removeSkill.filter(skill => ownedSkills.includes(skill));
|
||||
const duplicatedSkills = event.addSkill.filter(skill => event.removeSkill.includes(skill));
|
||||
if (duplicatedSkills.length) {
|
||||
event.addSkill.removeArray(duplicatedSkills);
|
||||
event.removeSkill.removeArray(duplicatedSkills);
|
||||
}
|
||||
if (!event.addSkill.length&&!event.removeSkill.length) return;
|
||||
//if (!event.addSkill.length&&!event.removeSkill.length) return;
|
||||
//手动触发时机
|
||||
await event.trigger('changeSkillsBefore');
|
||||
await event.trigger('changeSkillsBegin');
|
||||
|
@ -2243,6 +2247,7 @@ export const Content = {
|
|||
}
|
||||
"step 2";
|
||||
var info = get.info(event.skill);
|
||||
if (result && result.control) result.bool = !result.control.includes('cancel');
|
||||
if (!result || !result.bool) return;
|
||||
var autodelay = info.autodelay;
|
||||
if (typeof autodelay == 'function') autodelay = autodelay(trigger, player);
|
||||
|
@ -3146,6 +3151,7 @@ export const Content = {
|
|||
next.set('ai', info.chooseButton.check || function () { return 1; });
|
||||
next.set('filterButton', info.chooseButton.filter || function () { return true; });
|
||||
next.set('selectButton', info.chooseButton.select || 1);
|
||||
next.set('complexSelect', info.chooseButton.complexSelect !== false);
|
||||
next.set('filterOk', info.chooseButton.filterOk || (() => true));
|
||||
if (event.id) next._parent_id = event.id;
|
||||
next.type = 'chooseToUse_button';
|
||||
|
@ -4541,6 +4547,7 @@ export const Content = {
|
|||
event.dialog.style.display = '';
|
||||
event.dialog.open();
|
||||
}
|
||||
// if (['chooseCharacter', 'chooseButtonOL'].includes(event.getParent().name)) event.complexSelect = true;
|
||||
var filterButton = event.filterButton || function () { return true; };
|
||||
var selectButton = get.select(event.selectButton);
|
||||
var buttons = event.dialog.buttons;
|
||||
|
@ -6139,73 +6146,7 @@ export const Content = {
|
|||
}
|
||||
if (cardaudio) game.broadcastAll((player, card) => {
|
||||
game.playCardAudio(card, player);
|
||||
/*
|
||||
if(!lib.config.background_audio||get.type(card)=='equip'&&!lib.config.equip_audio) return;
|
||||
const sex=player.sex=='female'?'female':'male';
|
||||
var nature=get.natureList(card)[0];
|
||||
if(card.name=='sha'&&['fire','thunder','ice','stab'].includes(nature)){
|
||||
game.playAudio('card',sex,`${card.name}_${nature}`);
|
||||
return;
|
||||
}
|
||||
const audio=lib.card[card.name].audio;
|
||||
if(typeof audio=='string'){
|
||||
const audioInfo=audio.split(':');
|
||||
if(audio.startsWith('db:')) game.playAudio(`${audioInfo[0]}:${audioInfo[1]}`,audioInfo[2],`${card.name}_${sex}.${audioInfo[3]||'mp3'}`);
|
||||
else if(audio.startsWith('ext:')) game.playAudio(`${audioInfo[0]}:${audioInfo[1]}`,`${card.name}_${sex}.${audioInfo[2]||'mp3'}`);
|
||||
else game.playAudio('card',sex,`${audioInfo[0]}.${audioInfo[1]||'mp3'}`);
|
||||
}
|
||||
else game.playAudio('card',sex,card.name);*/
|
||||
}, player, card);
|
||||
if (event.animate != false && event.line != false) {
|
||||
if (card.name == 'wuxie' && event.getParent()._info_map) {
|
||||
var evtmap = event.getParent()._info_map;
|
||||
if (evtmap._source) evtmap = evtmap._source;
|
||||
var lining = (evtmap.multitarget ? evtmap.targets : evtmap.target) || event.player;
|
||||
if (Array.isArray(lining) && event.getTrigger().name == 'jiedao') {
|
||||
player.line(lining[0], 'green');
|
||||
}
|
||||
else {
|
||||
player.line(lining, 'green');
|
||||
}
|
||||
}
|
||||
else if (card.name == 'youdishenru' && event.getParent().source) {
|
||||
var lining = event.getParent().sourcex || event.getParent().source2 || event.getParent().source;
|
||||
if (lining == player && event.getParent().sourcex2) {
|
||||
lining = event.getParent().sourcex2;
|
||||
}
|
||||
if (Array.isArray(lining) && event.getTrigger().name == 'jiedao') {
|
||||
player.line(lining[0], 'green');
|
||||
}
|
||||
else {
|
||||
player.line(lining, 'green');
|
||||
}
|
||||
}
|
||||
else {
|
||||
var config = {};
|
||||
var nature = get.natureList(card)[0];
|
||||
if (nature || card.classList && card.classList.contains(nature)) config.color = nature;
|
||||
if (event.addedTarget) {
|
||||
player.line2(targets.concat(event.addedTargets), config);
|
||||
}
|
||||
else if (get.info(card, false).multitarget && targets.length > 1 && !get.info(card, false).multiline) {
|
||||
player.line2(targets, config);
|
||||
}
|
||||
else {
|
||||
player.line(targets, config);
|
||||
}
|
||||
}
|
||||
if (event.throw !== false) player.$throw(cards);
|
||||
if (lib.config.sync_speed && cards[0] && cards[0].clone) {
|
||||
var waitingForTransition = get.time();
|
||||
event.waitingForTransition = waitingForTransition;
|
||||
cards[0].clone.listenTransition(function () {
|
||||
if (_status.waitingForTransition == waitingForTransition && _status.paused) {
|
||||
game.resume();
|
||||
}
|
||||
delete event.waitingForTransition;
|
||||
});
|
||||
}
|
||||
}
|
||||
event.id = get.id();
|
||||
if (!Array.isArray(event.excluded)) event.excluded = [];
|
||||
if (!Array.isArray(event.directHit)) event.directHit = [];
|
||||
|
@ -6243,7 +6184,64 @@ export const Content = {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (targets.length) {
|
||||
|
||||
if (event.animate != false) {
|
||||
if (event.throw !== false){
|
||||
player.$throw(cards);
|
||||
if (lib.config.sync_speed && cards[0] && cards[0].clone) {
|
||||
var waitingForTransition = get.time();
|
||||
event.waitingForTransition = waitingForTransition;
|
||||
cards[0].clone.listenTransition(function () {
|
||||
if (_status.waitingForTransition == waitingForTransition && _status.paused) {
|
||||
game.resume();
|
||||
}
|
||||
delete event.waitingForTransition;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
event.trigger('useCard0');
|
||||
"step 1";
|
||||
if (event.animate != false && event.line != false && !event.hideTargets) {
|
||||
if (card.name == 'wuxie' && event.getParent()._info_map) {
|
||||
var evtmap = event.getParent()._info_map;
|
||||
if (evtmap._source) evtmap = evtmap._source;
|
||||
var lining = (evtmap.multitarget ? evtmap.targets : evtmap.target) || event.player;
|
||||
if (Array.isArray(lining) && event.getTrigger().name == 'jiedao') {
|
||||
player.line(lining[0], 'green');
|
||||
}
|
||||
else {
|
||||
player.line(lining, 'green');
|
||||
}
|
||||
}
|
||||
else if (card.name == 'youdishenru' && event.getParent().source) {
|
||||
var lining = event.getParent().sourcex || event.getParent().source2 || event.getParent().source;
|
||||
if (lining == player && event.getParent().sourcex2) {
|
||||
lining = event.getParent().sourcex2;
|
||||
}
|
||||
if (Array.isArray(lining) && event.getTrigger().name == 'jiedao') {
|
||||
player.line(lining[0], 'green');
|
||||
}
|
||||
else {
|
||||
player.line(lining, 'green');
|
||||
}
|
||||
}
|
||||
else {
|
||||
var config = {};
|
||||
var nature = get.natureList(card)[0];
|
||||
if (nature || card.classList && card.classList.contains(nature)) config.color = nature;
|
||||
if (event.addedTarget) {
|
||||
player.line2(targets.concat(event.addedTargets), config);
|
||||
}
|
||||
else if (get.info(card, false).multitarget && targets.length > 1 && !get.info(card, false).multiline) {
|
||||
player.line2(targets, config);
|
||||
}
|
||||
else {
|
||||
player.line(targets, config);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (targets.length && !event.hideTargets) {
|
||||
var str = (targets.length == 1 && targets[0] == player) ? '#b自己' : targets;
|
||||
if (cards.length && !card.isCard) {
|
||||
if (event.addedTarget) {
|
||||
|
@ -6287,11 +6285,11 @@ export const Content = {
|
|||
game.logv(player, [card, cards], targets);
|
||||
}
|
||||
event.trigger('useCard1');
|
||||
"step 1";
|
||||
event.trigger('yingbian');
|
||||
"step 2";
|
||||
event.trigger('useCard2');
|
||||
event.trigger('yingbian');
|
||||
"step 3";
|
||||
event.trigger('useCard2');
|
||||
"step 4";
|
||||
event.trigger('useCard');
|
||||
event._oncancel = function () {
|
||||
game.broadcastAll(function (id) {
|
||||
|
@ -6301,7 +6299,7 @@ export const Content = {
|
|||
}
|
||||
}, event.id);
|
||||
};
|
||||
"step 4";
|
||||
"step 5";
|
||||
event.sortTarget = function (animate, sort) {
|
||||
var info = get.info(card, false);
|
||||
if (num == 0 && targets.length > 1) {
|
||||
|
@ -6328,7 +6326,7 @@ export const Content = {
|
|||
}
|
||||
return null;
|
||||
};
|
||||
"step 5";
|
||||
"step 6";
|
||||
if (event.all_excluded) return;
|
||||
if (!event.triggeredTargets1) event.triggeredTargets1 = [];
|
||||
var target = event.getTriggerTarget(targets, event.triggeredTargets1);
|
||||
|
@ -6352,7 +6350,7 @@ export const Content = {
|
|||
if (event.forceDie) next.forceDie = true;
|
||||
event.redo();
|
||||
}
|
||||
"step 6";
|
||||
"step 7";
|
||||
if (event.all_excluded) return;
|
||||
if (!event.triggeredTargets2) event.triggeredTargets2 = [];
|
||||
var target = event.getTriggerTarget(targets, event.triggeredTargets2);
|
||||
|
@ -6376,7 +6374,7 @@ export const Content = {
|
|||
if (event.forceDie) next.forceDie = true;
|
||||
event.redo();
|
||||
}
|
||||
"step 7";
|
||||
"step 8";
|
||||
var info = get.info(card, false);
|
||||
if (!info.nodelay && event.animate != false) {
|
||||
if (event.delayx !== false) {
|
||||
|
@ -6389,7 +6387,7 @@ export const Content = {
|
|||
}
|
||||
}
|
||||
}
|
||||
"step 8";
|
||||
"step 9";
|
||||
if (event.all_excluded) return;
|
||||
if (!event.triggeredTargets3) event.triggeredTargets3 = [];
|
||||
var target = event.getTriggerTarget(targets, event.triggeredTargets3);
|
||||
|
@ -6413,7 +6411,7 @@ export const Content = {
|
|||
if (event.forceDie) next.forceDie = true;
|
||||
event.redo();
|
||||
}
|
||||
"step 9";
|
||||
"step 10";
|
||||
if (event.all_excluded) return;
|
||||
if (!event.triggeredTargets4) event.triggeredTargets4 = [];
|
||||
var target = event.getTriggerTarget(targets, event.triggeredTargets4);
|
||||
|
@ -6440,7 +6438,7 @@ export const Content = {
|
|||
}
|
||||
event.redo();
|
||||
}
|
||||
"step 10";
|
||||
"step 11";
|
||||
if (event.all_excluded) return;
|
||||
event.effectedCount++;
|
||||
event.num = 0;
|
||||
|
@ -6481,7 +6479,7 @@ export const Content = {
|
|||
next.addedTargets = event.addedTargets;
|
||||
if (event.forceDie) next.forceDie = true;
|
||||
}
|
||||
"step 11";
|
||||
"step 12";
|
||||
if (event.all_excluded) return;
|
||||
var info = get.info(card, false);
|
||||
if (num == 0 && targets.length > 1) {
|
||||
|
@ -6545,13 +6543,13 @@ export const Content = {
|
|||
game.delayx(0.5);
|
||||
}
|
||||
}
|
||||
"step 12";
|
||||
"step 13";
|
||||
if (event.all_excluded) return;
|
||||
if (!get.info(event.card, false).multitarget && num < targets.length - 1 && !event.cancelled) {
|
||||
event.num++;
|
||||
event.goto(11);
|
||||
event.goto(12);
|
||||
}
|
||||
"step 13";
|
||||
"step 14";
|
||||
if (event.all_excluded) return;
|
||||
if (get.info(card, false).contentAfter) {
|
||||
var next = game.createEvent(card.name + 'ContentAfter');
|
||||
|
@ -6565,15 +6563,15 @@ export const Content = {
|
|||
next.type = 'postcard';
|
||||
if (event.forceDie) next.forceDie = true;
|
||||
}
|
||||
"step 14";
|
||||
"step 15";
|
||||
if (event.all_excluded) return;
|
||||
if (event.effectedCount < event.effectCount) {
|
||||
if (document.getElementsByClassName('thrown').length) {
|
||||
if (event.delayx !== false && get.info(event.card, false).finalDelay !== false) game.delayx();
|
||||
}
|
||||
event.goto(10);
|
||||
event.goto(11);
|
||||
}
|
||||
"step 15";
|
||||
"step 16";
|
||||
if (event.postAi) {
|
||||
event.player.logAi(event.targets, event.card);
|
||||
}
|
||||
|
@ -6587,7 +6585,7 @@ export const Content = {
|
|||
else {
|
||||
event.finish();
|
||||
}
|
||||
"step 16";
|
||||
"step 17";
|
||||
event._oncancel();
|
||||
},
|
||||
useSkill: function () {
|
||||
|
|
|
@ -295,5 +295,54 @@ export const Contents = {
|
|||
event.cards = result;
|
||||
}
|
||||
}
|
||||
]
|
||||
],
|
||||
changeSkills: [
|
||||
async (event,trigger,player) => {
|
||||
//获取玩家当前已有的技能
|
||||
const ownedSkills = player.getSkills(true, false, false);
|
||||
//去重检查
|
||||
event.addSkill.unique();
|
||||
event.removeSkill.unique();
|
||||
//避免失去还没拥有的技能
|
||||
event.removeSkill = event.removeSkill.filter(skill => ownedSkills.includes(skill));
|
||||
const duplicatedSkills = event.addSkill.filter(skill => event.removeSkill.includes(skill));
|
||||
if (duplicatedSkills.length) {
|
||||
event.addSkill.removeArray(duplicatedSkills);
|
||||
event.removeSkill.removeArray(duplicatedSkills);
|
||||
}
|
||||
//if (!event.addSkill.length&&!event.removeSkill.length) return;
|
||||
//手动触发时机
|
||||
await event.trigger('changeSkillsBefore');
|
||||
},
|
||||
async (event,trigger,player) => {
|
||||
await event.trigger('changeSkillsBegin');
|
||||
},
|
||||
async (event,trigger,player) => {
|
||||
//处理失去和获得的技能
|
||||
if (event.$handle) {
|
||||
event.$handle(player, event.addSkill, event.removeSkill, event);
|
||||
}
|
||||
else {
|
||||
if(event.addSkill.length){
|
||||
player.addSkill(event.addSkill);
|
||||
game.log(player, '获得了技能', ...event.addSkill.map(i => {
|
||||
return '#g【' + get.translation(i) + '】';
|
||||
}));
|
||||
}
|
||||
if(event.removeSkill.length){
|
||||
player.removeSkill(event.removeSkill);
|
||||
game.log(player, '失去了技能', ...event.removeSkill.map(i => {
|
||||
return '#g【' + get.translation(i) + '】';
|
||||
}));
|
||||
}
|
||||
}
|
||||
},
|
||||
async (event,trigger,player) => {
|
||||
//手动触发时机
|
||||
await event.trigger('changeSkillsEnd');
|
||||
},
|
||||
async (event,trigger,player) => {
|
||||
await event.trigger('changeSkillsAfter');
|
||||
},
|
||||
],
|
||||
};
|
||||
|
|
|
@ -409,7 +409,18 @@ export class GameEvent {
|
|||
catch {
|
||||
throw new Error(`Content ${item} may not exist.\nlib.element.content[${item}] = ${lib.element.content[item]}`);
|
||||
}
|
||||
this.content = lib.element.content[item];
|
||||
|
||||
if (typeof lib.element.content[item] === "undefined")
|
||||
throw new Error(`Cannot find lib.element.content[${item}]`)
|
||||
// Generator的状态重置
|
||||
else if (lib.element.content[item]._gen) {
|
||||
this.content = lib.element.content[item].bind({
|
||||
gen: null,
|
||||
last: undefined
|
||||
})
|
||||
} else {
|
||||
this.content = lib.element.content[item];
|
||||
}
|
||||
break;
|
||||
}
|
||||
return this;
|
||||
|
@ -453,6 +464,7 @@ export class GameEvent {
|
|||
return this;
|
||||
}
|
||||
resume() {
|
||||
delete this._buttonChoice;
|
||||
delete this._cardChoice;
|
||||
delete this._targetChoice;
|
||||
delete this._skillChoice;
|
||||
|
@ -527,6 +539,7 @@ export class GameEvent {
|
|||
complexSelect: this.complexSelect,
|
||||
complexCard: this.complexCard,
|
||||
complexTarget: this.complexTarget,
|
||||
_buttonChoice: this._buttonChoice,
|
||||
_cardChoice: this._cardChoice,
|
||||
_targetChoice: this._targetChoice,
|
||||
_skillChoice: this._skillChoice,
|
||||
|
@ -630,6 +643,7 @@ export class GameEvent {
|
|||
}
|
||||
delete this.fakeforce;
|
||||
}
|
||||
delete this._buttonChoice;
|
||||
delete this._cardChoice;
|
||||
delete this._targetChoice;
|
||||
delete this._skillChoice;
|
||||
|
@ -652,6 +666,7 @@ export class GameEvent {
|
|||
this.complexTarget = this._backup.complexTarget;
|
||||
this.ai1 = this._backup.ai1;
|
||||
this.ai2 = this._backup.ai2;
|
||||
this._buttonChoice = this._backup._buttonChoice;
|
||||
this._cardChoice = this._backup._cardChoice;
|
||||
this._targetChoice = this._backup._targetChoice;
|
||||
this._skillChoice = this._backup._skillChoice;
|
||||
|
|
|
@ -728,7 +728,10 @@ export class Player extends HTMLDivElement {
|
|||
virtualCard.init(['', '', card, info && info.cardnature]);
|
||||
}
|
||||
else if (get.itemtype(card) == 'card') executeDelayCardEffect.card = card;
|
||||
else _status.event.next.remove(executeDelayCardEffect);
|
||||
else {
|
||||
_status.event.next.remove(executeDelayCardEffect);
|
||||
executeDelayCardEffect.resolve();
|
||||
}
|
||||
executeDelayCardEffect.judge = judge;
|
||||
executeDelayCardEffect.judge2 = judge2;
|
||||
executeDelayCardEffect.setContent('executeDelayCardEffect');
|
||||
|
@ -759,7 +762,10 @@ export class Player extends HTMLDivElement {
|
|||
const isArray = Array.isArray(cards);
|
||||
if (cards && !isArray) gift.cards = [cards];
|
||||
else if (isArray && cards.length) gift.cards = cards;
|
||||
else _status.event.next.remove(gift);
|
||||
else {
|
||||
_status.event.next.remove(gift);
|
||||
gift.resolve();
|
||||
}
|
||||
gift.deniedGifts = [];
|
||||
gift.setContent('gift');
|
||||
gift._args = Array.from(arguments);
|
||||
|
@ -825,7 +831,10 @@ export class Player extends HTMLDivElement {
|
|||
const isArray = Array.isArray(cards);
|
||||
if (cards && !isArray) recast.cards = [cards];
|
||||
else if (isArray && cards.length) recast.cards = cards;
|
||||
else _status.event.next.remove(recast);
|
||||
else {
|
||||
_status.event.next.remove(recast);
|
||||
recast.resolve();
|
||||
}
|
||||
if (typeof recastingLose != 'function') {
|
||||
if (recastingLose === null) console.trace(`recast的recastingLose参数不应传入null,可以用void 0或undefined占位`);
|
||||
recastingLose = (player, cards) => player.loseToDiscardpile(cards).log = false;
|
||||
|
@ -1073,6 +1082,7 @@ export class Player extends HTMLDivElement {
|
|||
if (!next.source) next.source = _status.event.player;
|
||||
if (!next.slots.length) {
|
||||
_status.event.next.remove(next);
|
||||
next.resolve();
|
||||
}
|
||||
next.setContent('disableEquip');
|
||||
return next;
|
||||
|
@ -1110,6 +1120,7 @@ export class Player extends HTMLDivElement {
|
|||
if (!next.source) next.source = _status.event.player;
|
||||
if (!next.slots.length) {
|
||||
_status.event.next.remove(next);
|
||||
next.resolve();
|
||||
}
|
||||
next.setContent('enableEquip');
|
||||
return next;
|
||||
|
@ -1147,6 +1158,7 @@ export class Player extends HTMLDivElement {
|
|||
if (!next.source) next.source = _status.event.player;
|
||||
if (!next.slots.length) {
|
||||
_status.event.next.remove(next);
|
||||
next.resolve();
|
||||
}
|
||||
next.setContent('expandEquip');
|
||||
return next;
|
||||
|
@ -2043,8 +2055,11 @@ export class Player extends HTMLDivElement {
|
|||
return true;
|
||||
}
|
||||
$disableJudge() {
|
||||
game.addVideo('$disableJudge', this);
|
||||
this.storage._disableJudge = true;
|
||||
for (let i = 0; i < this.node.judges.childNodes.length; i++) {
|
||||
if (this.node.judges.childNodes[i].classList.contains('feichu')) return;
|
||||
}
|
||||
game.addVideo('$disableJudge', this);
|
||||
var card = game.createCard('disable_judge', '', '');
|
||||
card.fix();
|
||||
card.classList.add('feichu');
|
||||
|
@ -4255,7 +4270,8 @@ export class Player extends HTMLDivElement {
|
|||
var next = game.createEvent('chooseButton');
|
||||
for (var i = 0; i < arguments.length; i++) {
|
||||
if (typeof arguments[i] == 'boolean') {
|
||||
next.forced = arguments[i];
|
||||
if (!next.forced) next.forced = arguments[i];
|
||||
else next.complexSelect = arguments[i];
|
||||
}
|
||||
else if (get.itemtype(arguments[i]) == 'dialog') {
|
||||
next.dialog = arguments[i];
|
||||
|
@ -4281,6 +4297,7 @@ export class Player extends HTMLDivElement {
|
|||
if (next.filterButton == undefined) next.filterButton = lib.filter.filterButton;
|
||||
if (next.selectButton == undefined) next.selectButton = [1, 1];
|
||||
if (next.ai == undefined) next.ai = function () { return 1; };
|
||||
if (next.complexSelect !== false) next.complexSelect = true;
|
||||
next.setContent('chooseButton');
|
||||
next._args = Array.from(arguments);
|
||||
next.forceDie = true;
|
||||
|
@ -4766,7 +4783,10 @@ export class Player extends HTMLDivElement {
|
|||
}
|
||||
if (get.itemtype(cards) == 'card') next.cards = [cards];
|
||||
else if (get.itemtype(cards) == 'cards') next.cards = cards.slice(0);
|
||||
else _status.event.next.remove(next);
|
||||
else {
|
||||
_status.event.next.remove(next);
|
||||
next.resolve();
|
||||
}
|
||||
next.setContent('showCards');
|
||||
next._args = Array.from(arguments);
|
||||
return next;
|
||||
|
@ -5009,7 +5029,10 @@ export class Player extends HTMLDivElement {
|
|||
this.ai.tempIgnore.add(next.targets[i]);
|
||||
}
|
||||
}
|
||||
if (typeof this.logAi == 'function' && !next.noai && !get.info(next.card).noai) {
|
||||
if (typeof this.logAi == 'function' && !next.noai && !get.info(next.card).noai && !this.hasSkillTag(this, true, {
|
||||
card: next.card,
|
||||
targets: next.targets,
|
||||
}, true)) {
|
||||
var postAi = get.info(next.card).postAi;
|
||||
if (postAi && postAi(next.targets)) {
|
||||
next.postAi = true;
|
||||
|
@ -5123,7 +5146,10 @@ export class Player extends HTMLDivElement {
|
|||
}
|
||||
}
|
||||
if (next.num == undefined) next.num = 1;
|
||||
if (next.num <= 0) _status.event.next.remove(next);
|
||||
if (next.num <= 0) {
|
||||
_status.event.next.remove(next);
|
||||
next.resolve();
|
||||
}
|
||||
next.setContent('draw');
|
||||
if (lib.config.mode == 'stone' && _status.mode == 'deck' &&
|
||||
next.drawDeck == undefined && !next.player.isMin() && next.num > 1) {
|
||||
|
@ -5207,7 +5233,10 @@ export class Player extends HTMLDivElement {
|
|||
next.notBySelf = true;
|
||||
}
|
||||
}
|
||||
if (next.cards == undefined) _status.event.next.remove(next);
|
||||
if (next.cards == undefined) {
|
||||
_status.event.next.remove(next);
|
||||
next.resolve();
|
||||
}
|
||||
next.setContent('discard');
|
||||
return next;
|
||||
}
|
||||
|
@ -5241,7 +5270,10 @@ export class Player extends HTMLDivElement {
|
|||
next.blank = true;
|
||||
}
|
||||
}
|
||||
if (next.cards == undefined) _status.event.next.remove(next);
|
||||
if (next.cards == undefined) {
|
||||
_status.event.next.remove(next);
|
||||
next.resolve();
|
||||
}
|
||||
next.setContent('loseToDiscardpile');
|
||||
return next;
|
||||
}
|
||||
|
@ -5621,6 +5653,7 @@ export class Player extends HTMLDivElement {
|
|||
}
|
||||
if (!next.cards || !next.cards.length) {
|
||||
_status.event.next.remove(next);
|
||||
next.resolve();
|
||||
}
|
||||
else {
|
||||
if (next.position == undefined) next.position = ui.discardPile;
|
||||
|
@ -5738,7 +5771,10 @@ export class Player extends HTMLDivElement {
|
|||
if (next.cards == undefined && !nocard) next.cards = event.cards;
|
||||
if (next.source == undefined && !nosource) next.source = event.customSource || event.player;
|
||||
if (next.num == undefined) next.num = (event.baseDamage || 1) + (event.extraDamage || 0);
|
||||
if (next.num <= 0) _status.event.next.remove(next);
|
||||
if (next.num <= 0) {
|
||||
_status.event.next.remove(next);
|
||||
next.resolve();
|
||||
}
|
||||
next.setContent('recover');
|
||||
return next;
|
||||
}
|
||||
|
@ -7305,7 +7341,7 @@ export class Player extends HTMLDivElement {
|
|||
next.forceDie = true;
|
||||
next.addSkill = addSkill.slice(0).unique();
|
||||
next.removeSkill = removeSkill.slice(0).unique();
|
||||
next.setContent('changeSkills');
|
||||
next.setContents('changeSkills');
|
||||
return next;
|
||||
}
|
||||
addSkill(skill, checkConflict, nobroadcast, addToSkills) {
|
||||
|
@ -7434,6 +7470,22 @@ export class Player extends HTMLDivElement {
|
|||
_status.event.clearStepCache();
|
||||
return this;
|
||||
}
|
||||
$removeAdditionalSkills(skill, target){
|
||||
const additionalSkills = this.additionalSkills[skill];
|
||||
if (Array.isArray(additionalSkills)) {
|
||||
if (typeof target === 'string') {
|
||||
if (additionalSkills.includes(target)) {
|
||||
additionalSkills.remove(target);
|
||||
if (!additionalSkills.length) {
|
||||
delete this.additionalSkills[skill];
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
delete this.additionalSkills[skill];
|
||||
}
|
||||
}
|
||||
}
|
||||
getRemovableAdditionalSkills(skill, target){
|
||||
const player = this, removableSkills = [];
|
||||
if (this.additionalSkills[skill]) {
|
||||
|
@ -7462,22 +7514,22 @@ export class Player extends HTMLDivElement {
|
|||
const player = this, skills = this.getRemovableAdditionalSkills(skill, target);
|
||||
if(skills.length){
|
||||
player.removeSkill(skills);
|
||||
if (player.additionalSkills[skill]&&player.additionalSkills[skill].length) delete player.additionalSkills[skill];
|
||||
}
|
||||
player.$removeAdditionalSkills(skill, target);
|
||||
_status.event.clearStepCache();
|
||||
return this;
|
||||
}
|
||||
removeAdditionalSkills(skill, target) {
|
||||
const player = this, skills = this.getRemovableAdditionalSkills(skill, target);
|
||||
if(skills.length){
|
||||
return player.changeSkills([], skills).set('$handle', function(player, addSkills, removeSkills){
|
||||
return player.changeSkills([], skills).set('$handle', function(player, addSkills, removeSkills){
|
||||
if(removeSkills.length>0){
|
||||
game.log(player, '失去了技能', ...removeSkills.map(i => {
|
||||
return '#g【' + get.translation(i) + '】';
|
||||
}));
|
||||
player.removeSkill(skills);
|
||||
if (player.additionalSkills[skill]&&player.additionalSkills[skill].length) delete player.additionalSkills[skill];
|
||||
});
|
||||
}
|
||||
player.removeSkill(removeSkills);
|
||||
}
|
||||
player.$removeAdditionalSkills(skill, target);
|
||||
});
|
||||
}
|
||||
awakenSkill(skill, nounmark) {
|
||||
if (!nounmark) this.unmarkSkill(skill);
|
||||
|
@ -7823,7 +7875,7 @@ export class Player extends HTMLDivElement {
|
|||
this.removeAdditionalSkill(i);
|
||||
}
|
||||
}
|
||||
this[all ? 'removeSkill' : 'removeSkillLog'](list);
|
||||
this[all ? 'removeSkill' : 'removeSkills'](list);
|
||||
this.checkConflict();
|
||||
this.checkMarks();
|
||||
return list;
|
||||
|
|
|
@ -79,6 +79,11 @@ export class VCard {
|
|||
if (!this.nature) this.nature = get.nature(this);
|
||||
}
|
||||
}
|
||||
else if(numberOrCards === 'unsure' && !this.isCard) {
|
||||
if(!this.suit) this.suit = 'unsure';
|
||||
if(!this.color) this.color = 'unsure';
|
||||
if(!this.number) this.number = 'unsure';
|
||||
}
|
||||
const info = get.info(this, false);
|
||||
if (info) {
|
||||
const autoViewAs = info.autoViewAs;
|
||||
|
|
|
@ -146,6 +146,11 @@ export class Library extends Uninstantable {
|
|||
}
|
||||
|
||||
//函数钩子
|
||||
/**
|
||||
* 你可以往这里加入{钩子名:函数数组},并在数组里增加你的自定义函数
|
||||
* 这样当某个地方调用game.callHook(钩子名,[...函数参数])时,就会按顺序将对应数组中的每个函数运行一遍(传参为callHook的第二个参数)。
|
||||
* 你可以将hook机制类比为event.trigger(),但是这里只能放同步代码
|
||||
*/
|
||||
static hooks = {
|
||||
// 本体势力的颜色
|
||||
addGroup: [(id, _short, _name, config) => {
|
||||
|
@ -325,6 +330,60 @@ export class Library extends Uninstantable {
|
|||
game.dynamicStyle.addObject(result2);
|
||||
}
|
||||
}],
|
||||
//game.check
|
||||
checkBegin: [],
|
||||
checkEnd: [
|
||||
function autoConfirm(event, { ok, auto, auto_confirm }) {
|
||||
if (!event.isMine()) return;
|
||||
const skillinfo = get.info(event.skill) || {};
|
||||
if (ok && auto && (auto_confirm || skillinfo.direct) && !_status.touchnocheck
|
||||
&& !_status.mousedown && (!_status.mousedragging || !_status.mouseleft)) {
|
||||
if (ui.confirm) ui.confirm.close();
|
||||
if (event.skillDialog === true) event.skillDialog = false;
|
||||
ui.click.ok();
|
||||
_status.mousedragging = null;
|
||||
if (skillinfo.preservecancel) ui.create.confirm('c');
|
||||
}
|
||||
}
|
||||
],
|
||||
checkButton: [],
|
||||
checkCard: [
|
||||
function updateTempname(card, event) {
|
||||
if (lib.config.cardtempname === 'off') return;
|
||||
if (get.name(card) === card.name && get.is.sameNature(get.nature(card), card.nature, true)) return;
|
||||
const node = ui.create.cardTempName(card);
|
||||
if (lib.config.cardtempname !== 'default') node.classList.remove('vertical');
|
||||
},
|
||||
],
|
||||
checkTarget: [
|
||||
function updateInstance(target, event) {
|
||||
if (!target.instance) return;
|
||||
['selected', 'selectable'].forEach(className => {
|
||||
if (target.classList.contains(className)) {
|
||||
target.instance.classList.add(className);
|
||||
} else {
|
||||
target.instance.classList.remove(className);
|
||||
}
|
||||
});
|
||||
},
|
||||
],
|
||||
uncheckBegin: [],
|
||||
uncheckEnd: [],
|
||||
uncheckButton: [],
|
||||
uncheckCard: [
|
||||
function removeTempname(card, event) {
|
||||
if (!card._tempName) return;
|
||||
card._tempName.delete();
|
||||
delete card._tempName;
|
||||
},
|
||||
],
|
||||
uncheckTarget: [
|
||||
function removeInstance(target, event) {
|
||||
if (!target.instance) return;
|
||||
target.instance.classList.remove('selected');
|
||||
target.instance.classList.remove('selectable');
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -7916,7 +7975,9 @@ export class Library extends Uninstantable {
|
|||
let type;
|
||||
try {
|
||||
type = typeof obj[text];
|
||||
} catch {}
|
||||
} catch {
|
||||
void 0;
|
||||
}
|
||||
if (type == 'function') {
|
||||
className += 'function';
|
||||
}
|
||||
|
@ -8794,6 +8855,7 @@ export class Library extends Uninstantable {
|
|||
game.me.actused = -99;
|
||||
}
|
||||
ui.updatehl();
|
||||
delete _status.event._buttonChoice;
|
||||
delete _status.event._cardChoice;
|
||||
delete _status.event._targetChoice;
|
||||
delete _status.event._skillChoice;
|
||||
|
@ -8811,6 +8873,7 @@ export class Library extends Uninstantable {
|
|||
game.me.actused = -99;
|
||||
}
|
||||
ui.updatehl();
|
||||
delete _status.event._buttonChoice;
|
||||
delete _status.event._cardChoice;
|
||||
delete _status.event._targetChoice;
|
||||
delete _status.event._skillChoice;
|
||||
|
@ -9009,6 +9072,7 @@ export class Library extends Uninstantable {
|
|||
const card = lib.cheat.gn(name);
|
||||
if (!card) return;
|
||||
target.node.handcards1.appendChild(card);
|
||||
delete _status.event._buttonChoice;
|
||||
delete _status.event._cardChoice;
|
||||
delete _status.event._targetChoice;
|
||||
delete _status.event._skillChoice;
|
||||
|
@ -9124,6 +9188,7 @@ export class Library extends Uninstantable {
|
|||
for (let i = 0; i < num; i++) {
|
||||
const card = cards[i];
|
||||
game.me.node.handcards1.appendChild(card);
|
||||
delete _status.event._buttonChoice;
|
||||
delete _status.event._cardChoice;
|
||||
delete _status.event._targetChoice;
|
||||
delete _status.event._skillChoice;
|
||||
|
@ -9140,6 +9205,7 @@ export class Library extends Uninstantable {
|
|||
for (var i = 0; i < args.length; i++) {
|
||||
game.me.addSkill(args[i], true);
|
||||
}
|
||||
delete _status.event._buttonChoice;
|
||||
delete _status.event._cardChoice;
|
||||
delete _status.event._targetChoice;
|
||||
delete _status.event._skillChoice;
|
||||
|
@ -9800,6 +9866,51 @@ export class Library extends Uninstantable {
|
|||
}
|
||||
return true;
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @param {GameEvent} event
|
||||
* @param {Player} player
|
||||
* @param {string} skill
|
||||
* @returns {boolean}
|
||||
*/
|
||||
filterEnable: function (event, player, skill) {
|
||||
const info = get.info(skill);
|
||||
if (!info) {
|
||||
console.error(new ReferenceError('缺少info的技能:', skill));
|
||||
return false;
|
||||
}
|
||||
// if (!game.expandSkills(player.getSkills('invisible').concat(lib.skill.global)).includes(skill)) return false;
|
||||
if (!game.expandSkills(player.getSkills(false).concat(lib.skill.global)).includes(skill)) {//hiddenSkills
|
||||
if (player.hasSkillTag('nomingzhi', false, null, true)) return false;
|
||||
if (get.mode() !== 'guozhan') return false;
|
||||
if (info.noHidden) return false;
|
||||
}
|
||||
const checkEnable = enable => {
|
||||
if (typeof enable === 'function') return enable(event);
|
||||
if (Array.isArray(enable)) return enable.some(i => checkEnable(i));
|
||||
if (enable === 'phaseUse') return event.type === 'phase';
|
||||
if (typeof enable === 'string') return enable === event.name;
|
||||
return false;
|
||||
}
|
||||
if (!checkEnable(info.enable)) return false;
|
||||
if (info.filter && !info.filter(event, player)) return false;
|
||||
if (info.viewAs && typeof info.viewAs !== 'function') {
|
||||
if (info.viewAsFilter && info.viewAsFilter(player) === false) return false;
|
||||
if (event.filterCard && !event.filterCard(get.autoViewAs(info.viewAs, 'unsure'), player, event)) return false;
|
||||
}
|
||||
if (info.usable && get.skillCount(skill) >= info.usable) return false;
|
||||
if (info.chooseButton && _status.event.noButton) return false;
|
||||
if (info.round && (info.round - (game.roundNumber - player.storage[skill + '_roundcount']) > 0)) return false;
|
||||
for (const item in player.storage) {
|
||||
if (!item.startsWith('temp_ban_')) continue;
|
||||
if (player.storage[item] !== true) continue;
|
||||
const skillName = item.slice(9);
|
||||
if (!lib.skill[skillName]) continue;
|
||||
const skills = game.expandSkills([skillName]);
|
||||
if (skills.includes(skill)) return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
characterDisabled: function (i, libCharacter) {
|
||||
if (!lib.character[i] || lib.character[i][4] && lib.character[i][4].includes('forbidai')) return true;
|
||||
if (lib.character[i][4] && lib.character[i][4].includes('unseen')) return true;
|
||||
|
@ -11599,7 +11710,7 @@ export class Library extends Uninstantable {
|
|||
lose: false,
|
||||
delay: false,
|
||||
content: () => {
|
||||
player.recast(cards, null, (player, cards) => {
|
||||
player.recast(cards, void 0, (player, cards) => {
|
||||
var numberOfCardsToDraw = cards.length;
|
||||
cards.forEach(value => {
|
||||
if (lib.config.mode == 'stone' && _status.mode == 'deck' && !player.isMin() && get.type(value).startsWith('stone')) {
|
||||
|
@ -13148,6 +13259,12 @@ export class Library extends Uninstantable {
|
|||
* @returns {string}
|
||||
*/
|
||||
getSpan: () => `${get.prefixSpan('经典')}${get.prefixSpan('神')}`
|
||||
}],
|
||||
['旧谋', {
|
||||
/**
|
||||
* @returns {string}
|
||||
*/
|
||||
getSpan: () => `${get.prefixSpan('旧')}${get.prefixSpan('谋')}`
|
||||
}]
|
||||
]);
|
||||
static groupnature = {
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
import { nonameInitialized, assetURL, userAgent, Uninstantable, GeneratorFunction, AsyncFunction } from "../../util/index.js";
|
||||
import { AI as ai } from '../../ai/index.js';
|
||||
import { Get as get } from '../../get/index.js';
|
||||
import { Game as game } from '../../game/index.js';
|
||||
import { Library as lib } from "../index.js";
|
||||
import { status as _status } from '../../status/index.js';
|
||||
import { UI as ui } from '../../ui/index.js';
|
||||
import { GNC as gnc } from '../../gnc/index.js';
|
||||
import { AI as ai } from '../../ai/index.js'
|
||||
import { Get as get } from '../../get/index.js'
|
||||
import { Game, Game as game } from '../../game/index.js'
|
||||
import { Library as lib } from "../index.js"
|
||||
import { status as _status } from '../../status/index.js'
|
||||
import { UI as ui } from '../../ui/index.js'
|
||||
import { GNC as gnc } from '../../gnc/index.js'
|
||||
|
||||
import { LibInitPromises } from "./promises.js";
|
||||
import { LibInitPromises } from "./promises.js"
|
||||
import { GameEvent } from "../element/gameEvent.js"
|
||||
import { GameEventPromise } from "../element/gameEventPromise.js"
|
||||
|
||||
export class LibInit extends Uninstantable {
|
||||
/**
|
||||
|
@ -693,30 +695,37 @@ export class LibInit extends Uninstantable {
|
|||
}
|
||||
case "function":
|
||||
if (gnc.is.generatorFunc(item)) {
|
||||
let gen, lastEvent;
|
||||
return function* (event, step, source, player, target, targets, card, cards, skill, forced, num, trigger, result, _status, lib, game, ui, get, ai) {
|
||||
// let gen, lastEvent;
|
||||
let content = function* (event, step, source, player, target, targets, card, cards, skill, forced, num, trigger, result, _status, lib, game, ui, get, ai) {
|
||||
event.step = NaN;
|
||||
if (!gen) gen = item(event, {
|
||||
event: event,
|
||||
step: step,
|
||||
source: source,
|
||||
player: player,
|
||||
target: target,
|
||||
targets: targets,
|
||||
card: card,
|
||||
cards: cards,
|
||||
skill: skill,
|
||||
forced: forced,
|
||||
num: num,
|
||||
trigger: trigger,
|
||||
result: result
|
||||
if (!this.gen) this.gen = item(event, {
|
||||
event,
|
||||
step,
|
||||
source,
|
||||
player,
|
||||
target,
|
||||
targets,
|
||||
card,
|
||||
cards,
|
||||
skill,
|
||||
forced,
|
||||
num,
|
||||
trigger,
|
||||
result
|
||||
});
|
||||
var res = gen.next((lastEvent && (typeof lastEvent == 'object') && ("result" in lastEvent)) ? lastEvent.result : lastEvent);
|
||||
|
||||
let res
|
||||
if (!this.last) res = this.gen.next()
|
||||
else if (typeof this.last !== "object") res = this.gen.next(this.last)
|
||||
else if (this.last instanceof GameEvent || this.last instanceof GameEventPromise)
|
||||
res = this.gen.next(this.last.result)
|
||||
else res = this.gen.next(this.last)
|
||||
|
||||
if (res.done){
|
||||
gen = null;
|
||||
this.gen = null;
|
||||
return event.finish();
|
||||
}
|
||||
var currentResult = res.value;
|
||||
let currentResult = res.value;
|
||||
// TODO: use `event.debugger` to replace source
|
||||
if (typeof currentResult == "function") yield currentResult;
|
||||
else {
|
||||
|
@ -724,9 +733,14 @@ export class LibInit extends Uninstantable {
|
|||
event.step = currentResult[1];
|
||||
currentResult = currentResult[0];
|
||||
}
|
||||
lastEvent = currentResult;
|
||||
this.last = currentResult;
|
||||
}
|
||||
}
|
||||
}.bind({
|
||||
gen: null,
|
||||
last: undefined
|
||||
})
|
||||
content._gen = true
|
||||
return content
|
||||
} else if (item._parsed) return item;
|
||||
// falls through
|
||||
default:
|
||||
|
|
|
@ -1414,7 +1414,7 @@ export class Create extends Uninstantable {
|
|||
packlist.push(lib.config.all.characters[i]);
|
||||
}
|
||||
for (var i in lib.characterPack) {
|
||||
if (!lib.config.all.characters.includes(i)) {
|
||||
if (lib.config.characters.includes(i) && !lib.config.all.characters.includes(i)) {
|
||||
packlist.push(i);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ import { ui, game, get, lib, _status } from "../../../../noname.js";
|
|||
|
||||
export function openMenu(node, e, onclose) {
|
||||
popupContainer.innerHTML = '';
|
||||
var left = Math.round(e.clientX / game.documentZoom);
|
||||
var left = Math.round(e.clientX / get.menuZoom());
|
||||
var zoom = get.is.phoneLayout() ? 1.3 : 1;
|
||||
popupContainer.appendChild(node);
|
||||
// var rect=node.getBoundingClientRect();
|
||||
|
@ -23,7 +23,7 @@ export function openMenu(node, e, onclose) {
|
|||
// }
|
||||
// if(e){
|
||||
var height = node.offsetHeight;
|
||||
var idealtop = e.clientY / game.documentZoom;
|
||||
var idealtop = e.clientY / get.menuZoom();
|
||||
if (idealtop < 10) {
|
||||
idealtop = 10;
|
||||
}
|
||||
|
@ -141,7 +141,7 @@ export function createMenu(connectMenu, tabs, config) {
|
|||
var menuTab = ui.create.div('.menu-tab', menu);
|
||||
var menuTabBar = ui.create.div('.menu-tab-bar', menu);
|
||||
menuTabBar.style.left = (config.bar || 0) + 'px';
|
||||
if (Math.round(2 * game.documentZoom) < 2) {
|
||||
if (Math.round(2 * get.menuZoom()) < 2) {
|
||||
menuTabBar.style.height = '3px';
|
||||
}
|
||||
var menuContent = ui.create.div('.menu-content', menu);
|
||||
|
@ -153,7 +153,7 @@ export function createMenu(connectMenu, tabs, config) {
|
|||
active._link.remove();
|
||||
}
|
||||
this.classList.add('active');
|
||||
menuTabBar.style.transform = 'translateX(' + (this.getBoundingClientRect().left - this.parentNode.firstChild.getBoundingClientRect().left) / game.documentZoom + 'px)';
|
||||
menuTabBar.style.transform = 'translateX(' + (this.getBoundingClientRect().left - this.parentNode.firstChild.getBoundingClientRect().left) / get.menuZoom() + 'px)';
|
||||
menuContent.appendChild(this._link);
|
||||
};
|
||||
ui.click.menuTab = function (tab) {
|
||||
|
|