Merge branch 'libccy:PR-Branch' into PR-Branch

This commit is contained in:
huanyu 2023-10-09 22:49:45 +08:00 committed by GitHub
commit 2df43e2dc2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
22 changed files with 462 additions and 129 deletions

BIN
audio/die/ol_zhangzhang.mp3 Normal file

Binary file not shown.

BIN
audio/skill/olguzheng1.mp3 Normal file

Binary file not shown.

BIN
audio/skill/olguzheng2.mp3 Normal file

Binary file not shown.

BIN
audio/skill/olzhijian1.mp3 Normal file

Binary file not shown.

BIN
audio/skill/olzhijian2.mp3 Normal file

Binary file not shown.

View File

@ -2164,7 +2164,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
str+=('摸'+get.cnNumber(Math.min(8,num2-num1))+'张牌,然后手牌上限-1。');
}
str+=('<br>※当前手牌上限:'+num2);
var num3=player.countMark('clanguixiang_count');
var num3=((_status.event.getParent().phaseIndex||0)+1);
if(num3>0){
str+=(';阶段数:'+num3)
}
@ -2186,7 +2186,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
ai:{
order:function(item,player){
var num=player.getHandcardLimit(),numx=player.countMark('clanguixiang_count');
var num=player.getHandcardLimit(),numx=((_status.event.getParent().phaseIndex||0)+1);
if(num==5&&numx==4&&player.getStat('skill').clanyirong) return 0;
if(player.countCards('h')==num+1&&num!=2&&(num<=4||num>4&&numx>4)) return 10;
return 0.5;
@ -2197,56 +2197,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
clanguixiang:{
audio:2,
init:function(player){
player.addSkill('clanguixiang_count');
},
onremove:function(player){
player.removeSkill('clanguixiang_count');
var event=_status.event.getParent('phase');
if(event) delete event._clanguixiang;
},
trigger:{
player:['phaseZhunbeiBefore','phaseJudgeBefore','phaseDrawBefore','phaseDiscardBefore','phaseJieshuBefore'],
player:'phaseChange',
},
forced:true,
filter:function(event,player){
var evt=event.getParent('phase');
if(!evt||!evt._clanguixiang) return false;
var num1=player.getHandcardLimit()-1,num2=player.countMark('clanguixiang_count');
if(event.phaseList[event.num].startsWith('phaseUse')) return false;
var num1=player.getHandcardLimit()-1,num2=event.num;
return num1==num2;
},
content:function(){
trigger.cancel(null,null,'notrigger');
var next=player.phaseUse();
event.next.remove(next);
trigger.getParent().next.unshift(next);
},
subSkill:{
count:{
trigger:{
player:['phaseZhunbeiBegin','phaseJudgeBegin','phaseDrawBegin','phaseDiscardBegin','phaseJieshuBegin','phaseUseBegin'],
},
forced:true,
popup:false,
lastDo:true,
priority:-Infinity,
content:function(){
player.addMark('clanguixiang_count',1,false);
},
group:'clanguixiang_clear',
},
clear:{
trigger:{player:'phaseBefore'},
forced:true,
charlotte:true,
popup:false,
firstDo:true,
priority:Infinity,
content:function(){
delete player.storage.clanguixiang_count;
trigger._clanguixiang=true;
},
},
trigger.phaseList[trigger.num]='phaseUse|clanguixiang';
game.delayx();
},
},
clanmuyin:{

View File

@ -3304,14 +3304,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
dddduanbing:{
enable:'phaseUse',
filter:function(event,player){
return player.canAddJudge('bingliang')&&player.hasCard((card)=>lib.skill['dddduanbing'].filterCard(card,player),'h');
return player.canAddJudge('bingliang')&&player.hasCard((card)=>lib.skill['dddduanbing'].filterCard(card,player),'he');
},
filterCard:function(card,player){
if(get.color(card)!='black'||get.type2(card)=='trick') return false;
return player.canAddJudge(get.autoViewAs({name:'bingliang'},[card]));
},
check:function(card){
return 6-get.value(card);
return 8.2-get.value(card);
},
discard:false,
lose:false,

View File

@ -178,7 +178,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
ns_chengpu:['male','wu',4,['decadelihuo','decadechunlao']],
ns_sundeng:['male','wu',4,['xinkuangbi']],
ns_duji:['male','wei',3,['xinfu_andong','xinyingshi']],
old_majun:["male","wei",3,["xinfu_jingxie1","xinfu_qiaosi"],[]],
old_majun:["male","wei",3,["xinfu_jingxie1","xinfu_qiaosi"]],
ns_mengyou:['male','qun',4,['nsmanzhi']],
old_jiakui:['male','wei',4,['tongqu','xinwanlan']],
ol_guohuai:['male','wei',3,['rejingce']],
@ -219,7 +220,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
"ns_chentai","ns_huangwudie","ns_sunyi","ns_zhangning","ns_yanghu"],
diy_yijiang3:['ns_ruanji','ns_zanghong','ns_limi','ns_zhonglimu','prp_zhugeliang','key_seira','key_kiyu','key_tomoyo','key_minagi','key_michiru'],
diy_tieba:["ns_zuoci","ns_lvzhi","ns_wangyun","ns_nanhua","ns_nanhua_left","ns_nanhua_right","ns_huamulan","ns_huangzu","ns_jinke","ns_yanliang","ns_wenchou","ns_caocao","ns_caocaosp","ns_zhugeliang","ns_wangyue","ns_yuji","ns_xinxianying","ns_guanlu","ns_simazhao","ns_sunjian","ns_duangui","ns_zhangbao","ns_masu","ns_zhangxiu","ns_lvmeng","ns_shenpei","ns_yujisp","ns_yangyi","ns_liuzhang","ns_xinnanhua","ns_luyusheng"],
diy_fakenews:["diy_wenyang","ns_zhangwei","ns_caimao","ns_chengpu",'ns_sundeng','ns_duji'],
diy_fakenews:["diy_wenyang","ns_zhangwei","ns_caimao","ns_chengpu",'ns_sundeng','ns_duji','ns_mengyou'],
diy_xushi:["diy_feishi","diy_hanlong","diy_liufu","diy_liuyan","diy_liuzan","diy_tianyu","diy_xizhenxihong","diy_yangyi","diy_zaozhirenjun"],
diy_default:["diy_yuji","diy_caiwenji","diy_lukang","diy_zhenji","old_majun"],
diy_noname:['noname'],
@ -373,6 +374,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
ns_zhangxiu:'#p本因坊神策',
ns_yangyi:'#p本因坊神策',
ns_liuzhang:'#r矮子剑薄荷糖',
ns_mengyou:'#g残昼厄夜',
},
card:{
kano_paibingbuzhen:{
@ -17953,6 +17955,96 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
},
},
nsmanzhi:{
audio:'dcmanzhi',
trigger:{player:['phaseZhunbeiBegin','phaseJieshuBegin']},
direct:true,
filter:function(event,player){
var nums=[];
game.countPlayer(current=>{
nums.add(current.hp);
nums.add(current.maxHp);
nums.add(current.countCards('h'));
nums.add(current.countCards('e'));
nums.add(current.countCards('j'));
});
for(var a of nums){
for(var b of nums){
if((0.5*a*a)+(2.5*b)-game.roundNumber==game.countPlayer()) return true;
}
}
return false;
},
content:function(){
'step 0'
var nums=[];
game.countPlayer(current=>{
nums.add(current.hp);
nums.add(current.maxHp);
nums.add(current.countCards('h'));
nums.add(current.countCards('e'));
nums.add(current.countCards('j'));
});
nums.sort((a,b)=>a-b);
var a=null,b=null,goon=false;
for(a of nums){
for(b of nums){
if((0.5*a*a)+(2.5*b)-game.roundNumber==game.countPlayer()){
goon=true;
break;
}
}
if(goon) break;
}
player.chooseButton(2,[
'蛮智请选择让下列等式成立的A与B的值',
'<div class="text center">目标等式</div>',
`0.5 × A² + 2.5 × B - ${game.roundNumber} = ${game.countPlayer()}`,
'<div class="text center">A的可选值</div>',
[nums.map(i=>{
return [
`A|${i}`,
i==a?(`<span class="yellowtext">${i}</span>`):i,
]
}),'tdnodes'],
'<div class="text center">B的可选值</div>',
[nums.map(i=>{
return [
`B|${i}`,
i==b?(`<span class="yellowtext">${i}</span>`):i,
]
}),'tdnodes'],
]).set('filterButton',function(button){
if(!ui.selected.buttons.length) return true;
return button.link[0]!=ui.selected.buttons[0].link[0];
}).set('filterOk',function(){
if(ui.selected.buttons.length!=2) return false;
var a,b;
for(var i of ui.selected.buttons){
if(i.link[0]=='A') a=parseInt(i.link.slice(2));
else b=parseInt(i.link.slice(2));
}
return (0.5*a*a)+(2.5*b)-game.roundNumber==game.countPlayer();
}).set('choice',[a,b]).set('ai',(button)=>{
var choice=_status.event.choice;
if(button.link==`A|${choice[0]}`||button.link==`B|${choice[1]}`) return 1;
return 0;
});
'step 1'
if(result.bool){
var a,b;
for(var i of result.links){
if(i[0]=='A') a=parseInt(i.slice(2));
else b=parseInt(i.slice(2));
}
equals=`0.5×${a}²+2.5×${b}-${game.roundNumber}=${game.countPlayer()}`;
player.logSkill('nsmanzhi');
player.chat(equals);
game.log(player,'的计算结果为',equals);
player.draw(game.countPlayer());
}
},
},
},
dynamicTranslate:{
nsjiquan:function(player){
@ -19030,6 +19122,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){
junk_huangyueying_prefix:'旧界',
old_majun:'骰子马钧',
old_majun_prefix:'骰子',
ns_mengyou:'数学孟优',
ns_mengyou_prefix:'数学',
ns_mengyou_ab:'孟优',
nsmanzhi:'蛮智',
nsmanzhi_info:'准备阶段或结束阶段开始时你可以将场上出现的数字代入等式中的A和B。若此等式成立你摸Y张牌。等式为Y=0.5A²+2.5B-X其中X为游戏轮数Y为存活人数',
ns_chengpu:'铁索程普',
ns_chengpu_prefix:'铁索',
ns_chengpu_ab:'程普',
ns_sundeng:'画饼孙登',
ns_sundeng_prefix:'画饼',
ns_sundeng_ab:'孙登',
ns_duji:'画饼杜畿',
ns_duji_prefix:'画饼',
ns_duji_ab:'杜畿',
diy_tieba:'吧友设计',
diy_xushi:'玩点论杀·虚实篇',
@ -19041,12 +19147,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
diy_yijiang3:'设计比赛2022',
diy_fakenews:'杀海流言',
diy_trashbin:'垃圾桶',
ns_chengpu:'铁索程普',
ns_chengpu_ab:'程普',
ns_sundeng:'画饼孙登',
ns_sundeng_ab:'孙登',
ns_duji:'画饼杜畿',
ns_duji_ab:'杜畿',
},
pinyins:{
加藤うみ:['Kato','Umi'],

View File

@ -6398,6 +6398,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger.directHit.push(trigger.target);
}
},
ai:{
effect:{
player:function(card,player,target){
if(player!==target&&get.itemtype(target)==='player'&&(card.name==='sha'||get.type(card,false)==='trick')&&
target.countCards('he')&&!target.hasSkillTag('noh')) return [1,0,1,-1];
}
}
}
},
},
},
@ -10090,6 +10098,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
sp_jiaxu:['sp_jiaxu','dc_sp_jiaxu','yj_jiaxu'],
qiaorui:['qiaorui','tw_qiaorui'],
mamidi:['mamidi','xin_mamidi'],
mengyou:['mengyou','ns_mengyou'],
},
translate:{
re_panfeng:'潘凤',

View File

@ -201,7 +201,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
},
chiying:{
trigger:{global:'damageBegin'},
trigger:{global:'damageBegin2'},
check:function(event,player){
return get.attitude(player,event.player)>0;
},
@ -209,7 +209,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(event.num<=1) return false;
return true;
},
priority:-11,
content:function(){
trigger.num=1;
if(trigger.source){

View File

@ -4595,7 +4595,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
viewAsFilter:function(player){
return player.hasCard({type:'equip'},'ehs');
},
check:(card)=>5-get.value(card),
check:function(card){
if(_status.event.type=='dying') return 1/(get.value(card)||0.5);
return 5-get.value(card);
},
locked:false,
mod:{
maxHandcard:function(player,num){
@ -12165,7 +12168,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player:"linkBefore",
},
forced:true,
priority:20,
//priority:20,
filter:function(event,player){
return !player.isLinked();
},
@ -13179,7 +13182,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
cancel:{
trigger:{player:'phaseUseEnd'},
priority:50,
firstDo:true,
silent:true,
charlotte:true,
content:function(){

View File

@ -944,6 +944,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
content:function(){
trigger.cancel();
},
ai:{
effect:{
target:function(card,player,target){
if(card.name==='sha'&&!game.hasNature(card)&&target.hasEmptySlot(2)) return 'zeroplayertarget';
if(get.subtype(card)=='equip2'&&target.isEmpty(2)) return [0.6,-0.8];
}
}
}
},
//战役篇蒋钦
@ -1976,7 +1984,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
subSkill:{
skip:{
trigger:{player:'phaseBefore'},
trigger:{player:'phaseBeforeStart'},
forced:true,
priority:Infinity,
popup:false,

View File

@ -960,6 +960,7 @@ window.noname_character_rank={
'mengyou',
're_wenpin',
'yue_zhoufei',
'ns_mengyou',
],
b:[
'diy_feishi',
@ -1969,6 +1970,7 @@ window.noname_character_rank={
'clan_zhonghui',
'zhoubuyi',
'dc_wangjun',
'ns_mengyou',
'key_kano',
'key_haruko',
'key_akiko',

View File

@ -3804,6 +3804,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
audio:2,
preHidden:true,
audioname:['sp_lvmeng','re_sunben','re_sunce'],
mod:{
aiOrder:function(player,card,num){
if(get.color(card)==='red'&&get.name(card)==='sha') return get.order({name: 'sha'})+0.15;
}
},
trigger:{
player:'useCardToPlayered',
target:'useCardToTargeted',
@ -3812,6 +3817,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(!(event.card.name=='juedou'||(event.card.name=='sha'&&get.color(event.card)=='red'))) return false;
return player==event.target||event.getParent().triggeredTargets3.length==1;
},
locked:false,
frequent:true,
content:function(){
player.draw();
@ -4872,9 +4878,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
preHidden:true,
check:function(event,player){
if(player.countCards('h')<=1) return true;
return game.hasPlayer(function(current){
return current!=player&&current.isMinHandcard()&&get.attitude(player,current)>0;
return (player.countCards('h')+2+event.num)<=5||game.hasPlayer(function(target){
return player!==target&&!game.hasPlayer(function(current){
return current!==player&&current!==target&&current.countCards('h')<target.countCards('h');
})&&get.attitude(player,target)>0;
});
},
content:function(){
@ -6276,30 +6283,33 @@ game.import('character',function(lib,game,ui,get,ai,_status){
useShan:true,
effect:{
target:function(card,player,target,current){
if(get.tag(card,'respondShan')){
var hastarget=game.hasPlayer(function(current){
return get.attitude(target,current)<0;
});
var be=target.countCards('e',{color:'black'});
if(target.countCards('h','shan')&&be){
if(!target.hasSkill('guidao')) return 0;
return [0,hastarget?target.countCards('he')/2:0];
if(get.tag(card,'respondShan')&&!player.hasSkillTag('directHit_ai',true,{
target: target,
card: card
},true)){
let club=0,spade=0;
if(game.hasPlayer(function(current){
return get.attitude(target,current)<0&&get.damageEffect(current,target,target,'thunder')>0;
})){
club=2;
spade=4;
}
if(target.countCards('h','shan')&&target.countCards('h')>2){
if(!target.hasSkill('guidao')) return 0;
return [0,hastarget?target.countCards('h')/4:0];
}
if(target.countCards('h')>3||(be&&target.countCards('h')>=2)){
return [0,0];
}
if(target.countCards('h')==0){
return [1.5,0];
}
if(target.countCards('h')==1&&!be){
return [1.2,0];
}
if(!target.hasSkill('guidao')) return [1,0.05];
return [1,Math.min(0.5,(target.countCards('h')+be)/4)];
if(!target.isHealthy()) club+=2;
if(!club&&!spade) return 1;
if(!target.mayHaveShan(player)) return 1-0.1*Math.min(5,target.countCards('hs'));
if(!target.hasSkillTag('rejudge')) return [1,(club+spade)/4];
let pos=player.hasSkillTag('viewHandcard',null,target,true)?'hes':'e',better=club>spade?'club':'spade',max=0;
target.hasCard(function(cardx){
if(get.suit(cardx)===better){
max=2;
return true;
}
if(spade&&get.color(cardx)==='black') max=1;
},pos);
if(max===2) return [1,Math.max(club,spade)];
if(max===1) return [1,Math.min(club,spade)];
if(pos==='e') return [1,Math.min(Math.max(1,target.countCards('hs'))*(club+spade)/4,Math.max(club,spade))];
return [1,(club+spade)/4];
}
}
}
@ -7259,17 +7269,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){
useShan:true,
effect:{
target:function(card,player,target,current){
if(get.tag(card,'respondShan')){
var hastarget=game.hasPlayer(function(current){
return get.attitude(target,current)<0;
});
if(target.countCards('h','shan')&&target.countCards('e',{suit:'spade'})){
return [0,hastarget?target.countCards('he')/2:0];
}
if(target.countCards('h','shan')){
return [1,hastarget?target.countCards('he')/2:0];
}
return [1,target.countCards('h')/4];
if(get.tag(card,'respondShan')&&!player.hasSkillTag('directHit_ai',true,{
target: target,
card: card
},true)&&game.hasPlayer(function(current){
return get.attitude(target,current)<0&&get.damageEffect(current,target,target,'thunder')>0;
})){
if(!target.mayHaveShan(player)) return 1-0.1*Math.min(5,target.countCards('hs'));
if(!target.hasSkillTag('rejudge')) return [1,1];
let pos=player.hasSkillTag('viewHandcard',null,target,true)?'hes':'e';
if(target.hasCard(function(cardx){
return get.suit(cardx)==='spade';
},pos)) return [1,4];
if(pos==='e') return [1,Math.min(4,1+0.75*Math.max(1,target.countCards('hs')))];
return [1,1];
}
}
}

View File

@ -4054,9 +4054,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
'step 0'
player.damage('nosource');
'step 1'
var next=player.phaseUse();
event.next.remove(next);
trigger.next.push(next);
trigger.phaseList.splice(trigger.num,0,'phaseUse|oldianjun');
},
},
olkangrui:{

View File

@ -8836,7 +8836,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
},
zongkui:{
trigger:{player:'phaseBefore',global:'roundStart'},
trigger:{
player:'phaseBeforeEnd',
global:'roundStart',
},
direct:true,
audio:2,
audioname:['tw_beimihu'],
@ -10208,7 +10211,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
zongkui:'纵傀',
zongkui_mark:'纵傀',
zongkui_mark_bg:'傀',
zongkui_info:'回合开始,你可以指定一名未拥有“傀”标记的其他角色,令其获得一枚“傀”标记。轮游戏开始时,你指定一名体力值最少且没有“傀”标记的其他角色,令其获得一枚“傀”标记。',
zongkui_info:'回合开始,你可以指定一名未拥有“傀”标记的其他角色,令其获得一枚“傀”标记。轮游戏开始时,你指定一名体力值最少且没有“傀”标记的其他角色,令其获得一枚“傀”标记。',
guju:'骨疽',
guju_info:'锁定技,拥有“傀”标记的角色受到伤害后,你摸一张牌。',
baijia:'拜假',

View File

@ -4585,11 +4585,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
//周宣
dcwumei:{
audio:2,
trigger:{player:'phaseBegin'},
trigger:{player:'phaseBeginStart'},
filter:function(event,player){
return !player.hasSkill('dcwumei_used');
},
priority:10,//离谱的优先机制
direct:true,
content:function(){
'step 0'
@ -4616,6 +4615,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger._triggered=5;
var evt=player.insertPhase();
delete evt.skill;
game.broadcastAll(function(player){
player.classList.remove('glow_phase');
delete _status.currentPhase;
},player);
}
}
},
@ -10550,6 +10553,22 @@ game.import('character',function(lib,game,ui,get,ai,_status){
content:function(){
player.draw(2+get.sgn(trigger.player.hp-player.hp));
},
ai:{
effect:{
target:function(card,player,target){
if(get.itemtype(player)!=='player'||player===target) return 1;
let num=1,ds=2+get.sgn(player.hp-target.hp);
if(player===_status.currentPhase&&_status.currentPhase.group==='qun'&&target.hasZhuSkill('yuwei',player)) num=2;
if(target.getHistory('gain',function(evt){
return evt.getParent(2).name==='shiyuan'&&evt.cards.length===ds;
}).length>=num) return 1;
let name=get.name(card);
if(get.tag(card,'lose')||name==='huogong'||name==='juedou'||name==='tiesuo') return [1,ds];
if(!target.hasFriend()) return 1;
return [1,0.8*ds];
}
}
}
},
dushi:{
audio:2,

View File

@ -2508,10 +2508,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
ol_guansuo:'dangxian_guansuo',
},
content:function(){
var next=player.phaseUse();
next.xindangxian=true;
event.next.remove(next);
trigger.next.push(next);
trigger.phaseList.splice(trigger.num,0,'phaseUse|xindangxian');
},
group:'xindangxian_rewrite',
subSkill:{
@ -2520,7 +2517,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
forced:true,
popup:false,
filter:function(kagari){
return kagari.xindangxian==true;
return kagari._extraPhaseReason=='xindangxian';
},
content:function(){
'step 0'
@ -7664,9 +7661,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
audio:2,
audioname:['guansuo'],
content:function(){
var next=player.phaseUse();
event.next.remove(next);
trigger.next.push(next);
trigger.phaseList.splice(trigger.num,0,'phaseUse|dangxian');
}
},
longyin:{
@ -10588,6 +10583,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
content:function(){
"step 0"
if(get.mode()!=='identity'||player.identity!=='nei') player.addExpose(0.2);
player.draw(2);
"step 1"
player.chooseCard(2,'he',true,'交给'+get.translation(trigger.player)+'两张牌').set('ai',function(card){
@ -10602,8 +10598,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger.player.storage.xiantu4.push(player);
},
ai:{
threaten:1.1,
expose:0.3
threaten:1.1
}
},
xiantu1:{audio:true},

View File

@ -2592,10 +2592,21 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return player!=event.player&&event.num<event.player.hp;
},
check:function(event,player){
if(get.attitude(player,event.player)>-2) return false;
if(player.hp>2) return true;
if(player.hp==2&&event.player.hp<3) return false;
return player.hp>1;
if(event.player.hasSkillTag('nodamage')) return false;
let tj = player.countCards('hs', function (card) {
return get.name(card) === 'tao' || get.name(card) === 'jiu';
}),
att = get.attitude(_status.event.player, event.player),
eff = get.damageEffect(event.player, player, _status.event.player, event.nature),
fd = event.player.hasSkillTag('filterDamage', null, {
player: player,
card: event.card
}),
hp = player.hp + tj;
if(player.storage.tairan2) hp -= player.storage.tairan2;
if(eff <= 0 || fd || att >= -2 || Math.abs(hp) <= 1) return false;
if(hp > 2 || event.player.isLinked() && event.nature && eff > 0) return true;
return !event.player.countCards('hs') || event.player.hp > 2 * event.num && !event.player.hasSkillTag('maixie');
},
logTarget:'player',
content:function(){
@ -2604,6 +2615,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger.yimie_num=trigger.player.hp-trigger.num;
trigger.num=trigger.player.hp;
},
ai:{
damageBonus:true,
skillTagFilter:function(player,tag,arg){
return arg && arg.target && arg.target.hp > 1 && player.hp > 1 && get.attitude(player, arg.target) < -2;
}
}
},
yimie2:{
trigger:{player:'damageEnd'},

View File

@ -14372,7 +14372,7 @@
next.setContent(info.content);
next.skillHidden=event.skillHidden;
if(info.forceDie) next.forceDie=true;
if(info.forceOut||event.skill=='_turnover') next.includeOut=true;
if(info.forceOut) next.includeOut=true;
"step 4"
if(player._hookTrigger){
for(var i=0;i<player._hookTrigger.length;i++){
@ -14634,6 +14634,201 @@
}
},
phase:function(){
'step 0'
//初始化阶段列表
if(!event.phaseList){
event.phaseList=['phaseZhunbei','phaseJudge','phaseDraw','phaseUse','phaseDiscard','phaseJieshu'];
}
if(typeof event.num!='number'){
event.num=0;
}
//规则集中的“回合开始后①”,更新游戏轮数,触发“一轮游戏开始时”
var isRound=false;
if(!event.skill){
isRound=_status.roundSkipped;
if(_status.isRoundFilter){
isRound=_status.isRoundFilter(event,player);
}
else if(_status.seatNumSettled){
var seatNum=player.getSeatNum();
if(seatNum!=0){
if(typeof _status.lastSeatNum!='number'||seatNum<_status.lastSeatNum) isRound=true;
_status.lastSeatNum=seatNum;
}
}
else if(player==_status.roundStart) isRound=true;
if(isRound){
delete _status.roundSkipped;
game.roundNumber++;
event._roundStart=true;
game.updateRoundNumber();
for(var i=0;i<game.players.length;i++){
if(game.players[i].isOut()&&game.players[i].outCount>0){
game.players[i].outCount--;
if(game.players[i].outCount==0&&!game.players[i].outSkills){
game.players[i].in();
}
}
}
event.trigger('roundStart');
}
}
_status.globalHistory.push({
cardMove:[],
custom:[],
useCard:[],
changeHp:[],
everything:[],
});
var players=game.players.slice(0).concat(game.dead);
for(var i=0;i<players.length;i++){
var current=players[i];
current.actionHistory.push({useCard:[],respond:[],skipped:[],lose:[],gain:[],sourceDamage:[],damage:[],custom:[],useSkill:[]});
current.stat.push({card:{},skill:{}});
if(isRound){
current.getHistory().isRound=true;
current.getStat().isRound=true;
}
};
if(isRound){
game.getGlobalHistory().isRound=true;
}
'step 1'
//规则集中的“回合开始后②1v1武将登场专用
event.trigger('phaseBeforeStart');
'step 2'
//规则集中的“回合开始后③(处理“游戏开始时”的时机)”
event.trigger('phaseBefore');
'step 3'
//规则集中的“回合开始后④(卑弥呼〖纵傀〗的时机)”
event.trigger('phaseBeforeEnd');
'step 4'
//规则集中的“回合开始后⑤”,进行翻面检测
if(player.isTurnedOver()&&!event._noTurnOver){
event.cancel();
player.turnOver();
player.phaseSkipped=true;
}
else{
player.phaseSkipped=false;
player.getHistory().isMe=true;
player.getStat().isMe=true;
}
'step 5'
//规则集中的“回合开始后⑥”,更新“当前回合角色”
while(ui.dialogs.length){
ui.dialogs[0].close();
}
game.phaseNumber++;
player.phaseNumber++;
game.broadcastAll(function(player,num,popup){
if(lib.config.glow_phase){
player.classList.add('glow_phase');
}
player.phaseNumber=num;
if(popup&&lib.config.show_phase_prompt) player.popup('回合开始',null,false);
},player,player.phaseNumber,!player.noPhaseDelay);
_status.currentPhase=player;
_status.discarded=[];
game.syncState();
game.addVideo('phaseChange',player);
if(game.phaseNumber==1){
delete player._start_cards;
if(lib.configOL.observe){
lib.configOL.observeReady=true;
game.send('server','config',lib.configOL);
}
}
game.log();
game.log(player,'的回合开始');
player._noVibrate=true;
if(get.config('identity_mode')!='zhong'&&get.config('identity_mode')!='purple'&&!_status.connectMode){
var num;
switch(get.config('auto_identity')){
case 'one':num=1;break;
case 'two':num=2;break;
case 'three':num=3;break;
case 'always':num=-1;break;
default:num=0;break;
}
if(num&&!_status.identityShown&&game.phaseNumber>game.players.length*num&&game.showIdentity){
if(!_status.video) player.popup('显示身份');
_status.identityShown=true;
game.showIdentity(false);
}
}
player.ai.tempIgnore=[];
if(ui.land&&ui.land.player==player){
game.addVideo('destroyLand');
ui.land.destroy();
}
'step 6'
//规则集中的“回合开始后⑦”,国战武将明置武将牌
event.trigger('phaseBeginStart');
'step 7'
//规则集中的“回合开始后⑨”,进行当先,化身等操作
//没有⑧ 因为⑧用不到
event.trigger('phaseBegin');
//阶段部分
'step 8'
if(player.isIn()&&num<event.phaseList.length){
//规则集中没有的新时机 可以用来插入额外阶段啥的
if(player.isIn()) event.trigger('phaseChange')
}
else event.goto(11);
'step 9'
if(player.isIn()&&num<event.phaseList.length){
var phase=event.phaseList[num].split('|');
event.currentPhase=phase[0];
var next=player[event.currentPhase]();
next.phaseIndex=num;
if(phase.length>1){
next._extraPhaseReason=phase[1];
}
if(event.currentPhase=='phaseDraw'||event.currentPhase=='phaseDiscard'){
if(!player.noPhaseDelay){
if(player==game.me){
game.delay();
}
else{
game.delayx();
}
}
}
}
'step 10'
if(event.currentPhase=='phaseUse'){
game.broadcastAll(function(){
if(ui.tempnowuxie){
ui.tempnowuxie.close();
delete ui.tempnowuxie;
}
});
delete player._noSkill;
}
event.num++;
'step 11'
if(event.num<event.phaseList.length){
event.goto(8);
}
else if(!event._phaseEndTriggered){
event._phaseEndTriggered=true;
event.trigger('phaseEnd');
event.redo();
}
'step 12'
event.trigger('phaseAfter');
'step 13'
//删除当前回合角色 此时处于“不属于任何角色的回合”的阶段
game.broadcastAll(function(player){
player.classList.remove('glow_phase');
delete _status.currentPhase;
},player);
},
/**
* @deprecated
*/
phase_old:function(){
"step 0"
player.phaseZhunbei();
"step 1"
@ -22911,21 +23106,23 @@
var next;
if(evt&&evt.parent&&evt.parent.next){
evt=evt.parent;
next=game.createEvent('phase',null,evt);
next=game.createEvent('phase',false,evt);
}
else if(_status.event.parent&&_status.event.parent.next){
evt=_status.event.parent;
next=game.createEvent('phase',null,evt);
next=game.createEvent('phase',false,evt);
}
else{
evt=null;
next=game.createEvent('phase');
next=game.createEvent('phase',false);
}
if(evt&&insert&&evt.next.contains(next)){
evt.next.remove(next);
evt.next.unshift(next);
}
next.player=this;
next.forceDie=true;
next.includeOut=true;
next.skill=skill||_status.event.name;
next.setContent('phase');
return next;
@ -22947,7 +23144,7 @@
return next;
},
phase:function(skill){
var next=game.createEvent('phase');
var next=game.createEvent('phase',false);
next.player=this;
next.setContent('phase');
if(!_status.roundStart){
@ -22956,6 +23153,8 @@
if(skill){
next.skill=skill;
}
next.forceDie=true;
next.includeOut=true;
return next;
},
phaseZhunbei:function(){
@ -32301,7 +32500,10 @@
trigger.cancel();
},
},
_turnover:{
/**
* @deprecated
*/
/*_turnover:{
trigger:{player:'phaseBefore'},
forced:true,
forceOut:true,
@ -32372,7 +32574,7 @@
game.getGlobalHistory().isRound=true;
}
},
},
},*/
_usecard:{
trigger:{global:'useCardAfter'},
forced:true,
@ -38793,7 +38995,9 @@
}
else if(event._triggered==1){
if(event.type=='card') event.trigger('useCardToBegin');
if(event.name=='phase'&&!event._begun){
event.trigger(event.name+'Begin');
event._triggered++;
/*if(event.name=='phase'&&!event._begun){
var next=game.createEvent('phasing',false,event);
next.player=event.player;
next.skill=event.skill;
@ -38803,7 +39007,7 @@
else{
event.trigger(event.name+'Begin');
event._triggered++;
}
}*/
}
else{
if(player&&player.classList.contains('dead')&&!event.forceDie&&event.name!='phaseLoop'){

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

View File

@ -12950,7 +12950,8 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
},
_mingzhi1:{
trigger:{player:'phaseBeginStart'},
priority:19,
//priority:19,
ruleSkill:true,
forced:true,
popup:false,
filter:function(event,player){