final hit

This commit is contained in:
Spmario233 2023-06-05 20:28:32 +08:00
parent 240a99d82f
commit 50dc78de67
10 changed files with 116 additions and 113 deletions

View File

@ -75,7 +75,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
db_key_liyingxia:['female','shu',3,['liyingxia_sanli','liyingxia_zhenjun','liyingxia_wumai'],['doublegroup:shu:key']],
key_erika:['female','key','3/3/2',['erika_shisong','erika_yousheng']],
key_satomi:['female','key',3,['satomi_luodao','satomi_daohai']],
key_iriya:['female','key',3,['iriya_yinji','iriya_haozhi']],
key_iriya:['female','key',3,['iriya_yinji','iriya_haozhi'],['unseen']],
key_kud:['female','key',3,['kud_qiaoshou','kud_buhui']],
key_misuzu:['female','key',3,['misuzu_hengzhou','misuzu_nongyin','misuzu_zhongxing']],
@ -8799,8 +8799,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
enable:'phaseUse',
discard:false,
line:true,
direct:true,
clearTime:true,
log:false,
delay:false,
lose:false,
prepare:function(cards,player,targets){

View File

@ -43,6 +43,7 @@ window.noname_character_rank={
'noname',
'sb_machao',
'dc_zhouxuān',
'key_iriya',
],
ap:[
'gjqt_aruan',
@ -296,6 +297,7 @@ window.noname_character_rank={
'zhanghua',
'zerong',
'wangguan',
'duanqiaoxiao',
'key_misuzu',
'key_sunohara',
'key_umi',
@ -908,6 +910,8 @@ window.noname_character_rank={
'xia_zhaoe',
'zhangkai',
'sunhong',
'zhangjinyun',
'dc_mengda',
],
b:[
'diy_feishi',
@ -1619,6 +1623,7 @@ window.noname_character_rank={
'tw_jiangji',
'tw_niufudongxie',
'tw_shen_lvmeng',
'zhangjinyun',
'key_tomoya',
'key_masato',
'key_shiorimiyuki',
@ -1843,6 +1848,7 @@ window.noname_character_rank={
'mengjie',
'dc_ruiji',
'xia_zhaoe',
'duanqiaoxiao',
'key_kano',
'key_haruko',
'key_akiko',
@ -1876,6 +1882,7 @@ window.noname_character_rank={
'key_yukito',
'key_kotomi',
'db_key_liyingxia',
'key_iriya',
],
rare:[
'pal_shenqishuang',

View File

@ -3912,8 +3912,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
lose:false,
delay:false,
line:true,
direct:true,
clearTime:true,
prepare:function(cards,player,targets){
targets[0].logSkill('xinhuangtian');
},
@ -4554,7 +4552,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
threaten:0.8,
effect:{
target:function(card,player,target){
if(get.tag(card,'damage')){
if(get.tag(card,'damage')&&!target.storage.xinzili){
if(player.hasSkillTag('jueqing',false,target)) return [1,-2];
if(!target.hasFriend()) return;
if(target.hp>=4) return [0.5,get.tag(card,'damage')*2];
@ -5338,7 +5336,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
filter:function(event,player){
if(event.card.name!='sha'||event.card.nature!='fire') return false;
return game.hasPlayer(function(current){
return !event.targets.contains(current)&&player.canUse(event.card,current);
return !event.targets.contains(current)&&lib.filter.targetEnabled(event.card,player,current)&&lib.filter.targetInRange(event.card,player,current);
});
},
direct:true,
@ -13536,7 +13534,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
trigger:{source:'damageEnd'},
locked:true,
direct:true,
forced:true,
filter:function(event,player){
if(event.name=='chooseToUse') return player.hasCard(card=>get.suit(card)=='spade','hs');
return event.card&&event.card.name=='sha'&&event.getParent(2).jiu==true&&!player.hasSkill('oljiuchi_air');

View File

@ -3886,8 +3886,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
filterTarget:function(card,player,target){
return target.hasZhuSkill('zhiba',player)&&player.canCompare(target);
},
direct:true,
clearTime:true,
log:false,
prepare:function(cards,player,targets){
targets[0].logSkill('zhiba');
},
@ -7356,8 +7355,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
lose:false,
delay:false,
line:true,
direct:true,
clearTime:true,
prepare:function(cards,player,targets){
targets[0].logSkill('huangtian');
},

View File

@ -13,6 +13,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
sp_huben:["caohong","xiahouba","zhugeke","zumao","wenpin","litong","mazhong","heqi","quyi","luzhi","zangba","yuejin","dingfeng","wuyan","ol_zhuling","tianyu","huojun",'zhaoyǎn','dengzhong','ol_furong','macheng','ol_zhangyì','ol_zhujun','maxiumatie'],
sp_liesi:['mizhu','weizi','ol_liuba'],
sp_default:["sp_diaochan","sp_zhaoyun","sp_sunshangxiang","sp_caoren","sp_jiangwei","sp_machao","sp_caiwenji","jsp_guanyu","jsp_huangyueying","sp_pangde","sp_jiaxu","yuanshu",'sp_zhangliao','sp_ol_zhanghe','sp_menghuo'],
sp_waitforsort:['sunhong','luoxian','ol_huban','wangguan'],
sp_qifu:["caoying",'panshu',"caochun","yuantanyuanshang",'caoshuang','wolongfengchu','guansuo','baosanniang','fengfangnv','jin_zhouchu'],
sp_wanglang:['wanglang'],
sp_tongque:["sp_fuwan","sp_fuhuanghou","sp_jiben"],
@ -22887,6 +22888,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
sp_guozhan:"国战",
sp_guozhan2:"国战移植",
sp_others:"其他",
sp_waitforsort:'等待分包',
sp_single:'新1v1',
},
};

View File

@ -437,47 +437,49 @@ game.import('character',function(lib,game,ui,get,ai,_status){
onremove:function(player){
player.removeSkill('dcjijiao_machi');
},
filter:function(event,player){
var cardsx=Array.from(ui.discardPile.childNodes);
var history=_status.globalHistory;
for(var i=0;i<history.length;i++){
var history2=history[i]['cardMove'];
for(var evt of history2){
var cards2=[];
if(evt.type=='discard') cards2=evt.getl(player).cards2;
else{
var evtx=evt.getParent();
if(evtx.name!='orderingDiscard') continue;
var evtx2=evtx.relatedEvent||evtx.getParent();
if(evtx2&&evtx2.name=='useCard'){
if(!evt.getd) continue;
cards2=evt.getd(player);
}
}
if(cards2.some(i=>get.type(i)=='trick'&&cardsx.contains(i))) return true;
}
onChooseToUse:function(event){
if(event.dcjijiao==undefined&&!game.online){
var bool=lib.skill.dcjijiao.getCards(event.player,true);
event.set('dcjijiao',bool);
}
return false;
},
filter:function(event,player){
return event.dcjijiao;
},
filterTarget:true,
getCards:function(player,bool){
var cards=Array.from(ui.discardPile.childNodes);
var gains=cards.slice(0);
var history=game.getAllGlobalHistory('cardMove',function(evt){
if(evt.name=='lose') return evt.position==ui.discardPile;
return evt.name=='cardsDiscard';
});
for(var i=history.length-1;i>=0;i--){
var evt=history[i];
var cards2=evt.cards.filter(function(card){
return cards.contains(card);
});
if(cards2.length){
if(!lib.skill.dcjijiao.isUse(evt,player)){
gains.removeArray(cards2);
}
cards.removeArray(cards2);
}
if(!cards.length) break;
}
if(bool) return gains.some(card=>get.type2(card,false)=='trick');
return gains.filter(card=>get.type2(card,false)=='trick');
},
isUse:function(event,player){
if(event.name!='cardsDiscard') return (event.type=='discard'&&event.player==player);
var evtx=event.getParent();
if(evtx.name!='orderingDiscard') return false;
var evt2=(evtx.relatedEvent||evtx.getParent());
return (evt2.name=='useCard'&&evt2.player==player);
},
content:function(){
player.awakenSkill('dcjijiao');
var cardsx=Array.from(ui.discardPile.childNodes);
var cards=[];
game.getAllGlobalHistory('cardMove',evt=>{
var cards2=[];
if(evt.type=='discard') cards2=evt.getl(player).cards2;
else{
var evtx=evt.getParent();
if(evtx.name!='orderingDiscard') return;
var evtx2=evtx.relatedEvent||evtx.getParent();
if(evtx2&&evtx2.name=='useCard'){
if(!evt.getd) return;
cards2=evt.getd(player);
}
}
cards.addArray(cards2.filter(i=>get.type(i)=='trick'&&cardsx.contains(i)));
});
var cards=lib.skill.dcjijiao.getCards(player);
if(cards.length){
target.gain(cards,'gain2').gaintag.add('dcjijiao');
target.addSkill('dcjijiao_nowuxie');
@ -513,9 +515,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
popup:false,
trigger:{global:'phaseAfter'},
content:function(){
player.restoreSkill('dcjijiao');
game.log(player,'重置了','#g【继椒】');
player.removeSkill('dcjijiao_machi');
if(player.awakenedSkills.contains('dcjijiao')){
player.restoreSkill('dcjijiao');
game.log(player,'重置了','#g【继椒】');
//player.removeSkill('dcjijiao_machi');
}
player.removeSkill('dcjijiao_risutoa');
}
},
@ -539,7 +543,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger.nowuxie=true;
},
onremove:function(player){
player.removeGaintag('kousheng');
player.removeGaintag('dcjijiao');
},
}
}
@ -586,8 +590,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
var color=event.judgeResult.color;
var player=event.getParent(2).player;
var cards=event.getParent(2).cardsx;
for(var card of cards){
if(get.color(card)==color){
for(var cardx of cards){
if(get.color(cardx)==color){
if(get.position(card,true)=='o') player.gain(card,'gain2');
return;
}
@ -5689,11 +5693,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
intro:{
content:'limited'
},
direct:true,
content:function(){
'step 0'
player.awakenSkill('dcyongdi');
player.logSkill('dcyongdi',target);
//player.logSkill('dcyongdi',target);
if(!game.hasPlayer(current=>current.maxHp<target.maxHp)){
target.gainMaxHp();
}
@ -13362,7 +13365,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
var getNum=function(current){
var history=current.actionHistory;
var num=0;
for(var i=history.length-1;i>=0;i--){
for(var i=history.length-2;i>=0;i--){
for(var j=0;j<history[i].useCard.length;j++){
if(get.type2(history[i].useCard[j].card,false)=='trick') num++;
}
@ -29629,7 +29632,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
dcwujie:'无节',
dcwujie_info:'锁定技。①你使用无色牌无任何次数限制且无距离限制。②当其他角色执行杀死你的奖惩而摸牌或弃牌时,取消之。',
sp_whlw:"文和乱武",
sp_zlzy:"逐鹿中原",
sp_longzhou:"同舟共济",

View File

@ -763,8 +763,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return {
audio:'twkaizeng',
type:result.control,
direct:true,
clearTime:true,
log:false,
delay:false,
filterTarget:function(card,player,target){
return target.hasSkill('twkaizeng');
@ -1780,17 +1779,24 @@ game.import('character',function(lib,game,ui,get,ai,_status){
enable:'phaseUse',
usable:1,
forceaudio:true,
filter:function(event,player){
var num=1;
game.countPlayer2(current=>{
onChooseToUse:function(event){
if(!game.online){
var num=1;
game.countPlayer2(current=>{
var history=current.actionHistory;
for(var i=history.length-1;i>=0;i--){
for(var evt of history[i].useSkill){
if(evt.skill=='twluannian_global') num++;
for(var i=history.length-1;i>=0;i--){
for(var evt of history[i].useSkill){
if(evt.skill=='twluannian_global') num++;
}
if(history[i].isRound) break;
}
}
});
return player.group=='qun'&&player.countCards('he')>=num&&game.hasPlayer(function(current){
});
event.set('twluannian_num',num);
}
},
filter:function(event,player){
if(!event.twluannian_num) return false;
return player.group=='qun'&&player.countCards('he')>=event.twluannian_num&&game.hasPlayer(function(current){
var target=current.storage.twxiongzheng_target;
return target&&target.isIn()&&current!=player&&current.hasZhuSkill('twluannian',player)
})
@ -1799,31 +1805,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
position:'he',
prompt:function(){
var player=_status.event.player;
var num=1;
game.countPlayer2(current=>{
var history=current.actionHistory;
for(var i=history.length-1;i>=0;i--){
for(var evt of history[i].useSkill){
if(evt.skill=='twluannian_global') num++;
}
}
});
var num=_status.event.twluannian_num
var list=game.filterPlayer(function(current){
return current.hasZhuSkill('twluannian',player);
}).map(i=>i.storage.twxiongzheng_target).sortBySeat();
return '弃置'+get.cnNumber(num)+'张牌,对'+get.translation(list)+(list.length>1?'中的一人':'')+'造成1点伤害';
},
selectCard:function(){
var num=1;
game.countPlayer2(current=>{
var history=current.actionHistory;
for(var i=history.length-1;i>=0;i--){
for(var evt of history[i].useSkill){
if(evt.skill=='twluannian_global') num++;
}
}
});
return num;
return _status.event.twluannian_num;
},
complexSelect:true,
complexCard:true,
@ -10264,12 +10253,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
usable:1,
mahouSkill:true,
filter:function(event,player){
return !player.hasSkill('twzhouzu_mahou')
return !player.hasSkill('twzhouzu_mahou');
},
filterTarget:function(card,player,target){
return player!=target;
},
direct:true,
line:false,
delay:false,
content:function(){

View File

@ -4357,7 +4357,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return current.hasSkill('wengua');
});
},
direct:true,
log:false,
delay:false,
filterCard:true,
discard:false,
@ -13073,7 +13073,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return false;
},
forceaudio:true,
direct:true,
prompt:'弃置一名有【逆】的角色的两张【逆】,然后视为对包含其在内的角色使用【杀】。',
delay:false,
log:false,

View File

@ -819,29 +819,41 @@ game.import('character',function(lib,game,ui,get,ai,_status){
audio:'qimei',
charlotte:true,
forced:true,
popup:false,
trigger:{global:['equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','loseAfter','gainAfter','addToExpansionAfter']},
logTarget:function(event,player){
return player.storage.qimei_draw;
},
usable:1,
filter:function(event,player){
var target=player.storage.qimei_draw;
if(!target||!target.isIn()) return false;
if(event.name!='gain'||(event.player!=player&&event.player!=target)){
var evt1=event.getl(player);
if(!evt1||!evt1.hs||!evt1.hs.length){
var evt2=event.getl(target);
if(!evt2||!evt2.hs||!evt2.hs.length) return false;
}
}
return player.countCards('h')==target.countCards('h');
if(player.countCards('h')!=target.countCards('h')) return false;
var hasChange=function(event,player){
var gain=0,lose=0;
if(event.getg) gain=event.getg(player).length;
if(event.getl) lose=event.getl(player).hs.length;
return gain!=lose;
};
return hasChange(event,player)||hasChange(event,target);
},
content:function(){
'step 0'
if(trigger.delay===false) game.delayx();
var evt1=trigger.getl(player);
if((trigger.name=='gain'&&player==trigger.player)||(evt1&&evt1.hs&&evt1.hs.length)) player.storage.qimei_draw.draw();
var evt2=trigger.getl(player.storage.qimei_draw);
if((trigger.name=='gain'&&player==player.storage.qimei_draw)||evt2&&evt2.hs&&evt2.hs.length) player.draw();
'step 1'
var target=player.storage.qimei_draw;
player.logSkill('qimei_draw',target);
var drawer=[];
var hasChange=function(event,player){
var gain=0,lose=0;
if(event.getg) gain=event.getg(player).length;
if(event.getl) lose=event.getl(player).hs.length;
return gain!=lose;
};
if(hasChange(trigger,player)) drawer.push(target);
if(hasChange(trigger,target)) drawer.push(player);
if(drawer.length==1) drawer[0].draw();
else{
game.asyncDraw(drawer.sortBySeat());
game.delayex();
}
},
group:'qimei_hp',
onremove:true,
@ -2633,8 +2645,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
lose:false,
delay:false,
line:true,
direct:true,
clearTime:true,
log:false,
prepare:function(cards,player,targets){
targets[0].logSkill('ruilve');
},

View File

@ -12682,7 +12682,7 @@
if(game.modeSwapPlayer&&!_status.auto&&player.isUnderControl()&&!lib.filter.wuxieSwap(event)){
game.modeSwapPlayer(player);
}
var skills=player.getSkills(true);
var skills=player.getSkills('invisible').concat(lib.skill.global);
game.expandSkills(skills);
for(var i=0;i<skills.length;i++){
var info=lib.skill[skills[i]];
@ -12937,7 +12937,7 @@
delete event.dialog;
return;
}
var skills=player.getSkills(true);
var skills=player.getSkills('invisible').concat(lib.skill.global);
game.expandSkills(skills);
for(var i=0;i<skills.length;i++){
var info=lib.skill[skills[i]];
@ -26906,7 +26906,7 @@
}
if(lib.config.compatiblemode){
(function(){
var skills=player.getSkills(true).concat(lib.skill.global);
var skills=player.getSkills('invisible').concat(lib.skill.global);
game.expandSkills(skills);
for(var i=0;i<skills.length;i++){
var info=get.info(skills[i]);
@ -35265,7 +35265,7 @@
}
}
var equipskills=[];
var ownedskills=player.getSkills(true,false);
var ownedskills=player.getSkills('invisible',false);
game.expandSkills(ownedskills);
for(var i=0;i<skills.length;i++){
if(!ownedskills.contains(skills[i])){