Skip to content

Commit

Permalink
v1.9.124.0.1
Browse files Browse the repository at this point in the history
1.9.124.0.1
  • Loading branch information
Spmario233 authored Aug 4, 2023
2 parents 067cc9a + 6295e29 commit bedbe7b
Show file tree
Hide file tree
Showing 11 changed files with 701 additions and 186 deletions.
6 changes: 5 additions & 1 deletion character/clan.js
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player:'useCard',
},
filter:function(event,player){
var len=lib.skill.dcweidang.getLength(event.card);
if(player.hasHistory('useCard',function(evt){
return evt!=event&&lib.skill.dcweidang.getLength(evt.card)==len;
},event)) return false;
if(!player.getStat().skill.clanguangu) return false;
var history=player.getAllHistory('useSkill',evt=>{
return evt.skill=='clanguangu_backup';
Expand All @@ -468,7 +472,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
break;
}
}
if(num&&lib.skill.dcweidang.getLength(event.card)==num) return true;
if(num&&len==num) return true;
return false;
},
forced:true,
Expand Down
55 changes: 29 additions & 26 deletions character/ddd.js
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.line(target,'fire');
var num=target.countCards('h')-player.countCards('h');
if(num>0) target.chooseToDiscard('h',true,num);
else target.draw(Math.min(5,num));
else target.draw(Math.min(5,-num));
}
},
subSkill:{
Expand Down Expand Up @@ -1262,7 +1262,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(!evt||evt.player!=player) return false;
return player.getHistory('useCard',function(evtx){
return evtx.getParent('phaseUse')==evt;
},event).length==2;
},event).length==3;
},
forced:true,
charlotte:true,
Expand Down Expand Up @@ -1862,7 +1862,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger:{global:'useCardAfter'},
frequent:true,
filter:function(event,player){
return event.card.storage&&event.card.storage._3dfusi_owner==player&&!player.hasCard(function(card){
return event.card.storage&&event.card.storage._dddfusi_owner==player&&!player.hasCard(function(card){
return !card.hasGaintag('dddxujing_tag');
},'h');
},
Expand Down Expand Up @@ -1927,7 +1927,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
var storage=player.getStorage('dddchashi');
if(!storage||!storage.length) return false;
if(event.player!=storage[1]||!event.player.isIn()) return false;
if(!player.getCards('h').contains(storage[0])||!storage[0].hasGaintag('dddchashi')) return false;
if(!player.getCards('he').contains(storage[0])||!storage[0].hasGaintag('dddchashi')) return false;
if(get.suit(event.card)!=get.suit(storage[0])) return false;
var evt=event.getParent('phaseUse');
if(evt.player)
Expand Down Expand Up @@ -2354,7 +2354,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
var history=current.actionHistory;
for(var i=history.length-2;i>=0;i--){
var evts=history[i].useSkill;
for(evt of evts){
for(var evt of evts){
if(evt.skill=='dddfengzheng_global') return true;
}
if(history[i].isRound) break;
Expand All @@ -2367,7 +2367,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
var history=current.actionHistory;
for(var i=history.length-2;i>=0;i--){
var evts=history[i].useSkill;
for(evt of evts){
for(var evt of evts){
if(evt.skill=='dddfengzheng_global') return true;
}
if(history[i].isRound) break;
Expand All @@ -2382,7 +2382,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
var history=current.actionHistory;
for(var i=history.length-2;i>=0;i--){
var evts=history[i].useSkill;
for(evt of evts){
for(var evt of evts){
if(evt.skill=='dddfengzheng_global') return true;
}
if(history[i].isRound) break;
Expand Down Expand Up @@ -3108,35 +3108,38 @@ game.import('character',function(lib,game,ui,get,ai,_status){
subSkill:{
act:{
trigger:{
global:'phaseBefore',
global:['phaseBefore','phaseAfter','phaseYouxueed'],
},
forced:true,
firstDo:true,
charlotte:true,
filter:function(event,player){
var seat=event.player.getSeatNum(),seatP=event.player.getPrevious().getSeatNum();
return !player.hasSkill('dddyouxue_acted')&&seat>=player.countMark('dddyouxue')&&(seatP>seat||seatP<player.countMark('dddyouxue'))||
event.player==player&&event.skill!='dddyouxue_act';
filter:function(event,player,name){
if(event.skill) return false;
var vseat=player.countMark('dddyouxue');
if(name!='phaseBefore'){
if(player.hasSkill('dddyouxue_acted',null,false,false)) return false;
var seat=event.player.getSeatNum();
var next=event.player.next;
if(!game.players.contains(next)) next=game.findNext(next);
var seat2=next.getSeatNum();
if(seat==seat2) return false;
if(seat<seat2) return vseat>seat&&vseat<=seat2;
return seat2>=vseat;
}
else{
return event.player==player;
}
},
content:function(){
'step 0'
var seat=trigger.player.getSeatNum(),seatP=trigger.player.getPrevious().getSeatNum();
if(trigger.player==player&&trigger.skill!='dddyouxue_act'&&(seat<player.countMark('dddyouxue')||seatP>=player.countMark('dddyouxue'))){
if(event.triggername=='phaseBefore'){
trigger.finish();
trigger.untrigger(true);
trigger._triggered=5;
event.finish();
return;
trigger.trigger('phaseYouxueed');
}
trigger.player.getPrevious().getHistory('custom').push({'dddyouxue':true});
player.insertPhase();
player.addTempSkill('dddyouxue_acted','roundStart');
if(!trigger._finished){
trigger.finish();
trigger.untrigger(true);
trigger._triggered=5;
var evt=trigger.player.insertPhase();
delete evt.skill;
else{
player.insertPhase('dddyouxue_act');
player.addTempSkill('dddyouxue_acted','roundStart');
}
}
},
Expand Down
27 changes: 15 additions & 12 deletions character/mobile.js
Original file line number Diff line number Diff line change
Expand Up @@ -4437,20 +4437,23 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
filter:function(button){
var evt=_status.event,player=_status.event.player;
if(!evt.dialog._chooseButton){
var evt2=_status.event.getParent();
return evt2.filterCard(get.autoViewAs({name:evt.dialog._cardName},[button.link]),player,evt2);
}
if(ui.selected.buttons.length){
var str=ui.selected.buttons[0].link;
if(typeof str!='string'||typeof button.link=='string') return false;
var evt2=_status.event.getParent();
return evt2.filterCard(get.autoViewAs({name:str},[button.link]),player,evt2);
if(evt.dialog){
if(!evt.dialog._chooseButton){
var evt2=_status.event.getParent();
return evt2.filterCard(get.autoViewAs({name:evt.dialog._cardName},[button.link]),player,evt2);
}
if(ui.selected.buttons.length){
var str=ui.selected.buttons[0].link;
if(typeof str!='string'||typeof button.link=='string') return false;
var evt2=_status.event.getParent();
return evt2.filterCard(get.autoViewAs({name:str},[button.link]),player,evt2);
}
return typeof button.link=='string';
}
return typeof button.link=='string';
return false;
},
select:function(){
return (_status.event.dialog._chooseButton||1);
return _status.event.dialog?(_status.event.dialog._chooseButton||1):1;
},
backup:function(links,player){
var card,name;
Expand Down Expand Up @@ -12955,7 +12958,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
zhaotongzhaoguang:['dc_zhaotongzhaoguang','zhaotongzhaoguang'],
yangbiao:['yangbiao','dc_yangbiao','jsrg_yangbiao'],
qiaozhou:['yj_qiaozhou','qiaozhou'],
sunhanhua:['dc_qiaozhou','sunhanhua'],
sunhanhua:['dc_sunhanhua','sunhanhua'],
},
translate:{
liuzan:'手杀留赞',
Expand Down
30 changes: 30 additions & 0 deletions character/rank.js
Original file line number Diff line number Diff line change
Expand Up @@ -1657,6 +1657,12 @@ window.noname_character_rank={
'tw_niufudongxie',
'tw_shen_lvmeng',
'zhangjinyun',
'sunwukong',
'libai',
'old_lingju',
'wu_zhugeliang',
'yue_caiwenji',
'clan_zhongyan',
'key_tomoya',
'key_masato',
'key_shiorimiyuki',
Expand Down Expand Up @@ -1882,6 +1888,20 @@ window.noname_character_rank={
'dc_ruiji',
'xia_zhaoe',
'duanqiaoxiao',
'longwang',
'taoshen',
'xiaoyuehankehan',
'zhutiexiong',
'sunyang',
'yeshiwen',
'ganfurenmifuren',
'ruanji',
'zhangxuan',
'zhangchu',
'dc_sunhanhua',
'dc_wangjun',
'zhanghua',
'lushi',
'key_kano',
'key_haruko',
'key_akiko',
Expand Down Expand Up @@ -2357,6 +2377,15 @@ window.noname_character_rank={
'ol_yanwen',
'yanghong',
're_zhuzhi',
'dongguiren',
'xielingyu',
'liupi',
'xianglang',
'furongfuqian',
'zhenghun',
'clan_wangling',
'clan_wangyun',
'quhuang',
],
junk:[
'sunshao',
Expand Down Expand Up @@ -2401,6 +2430,7 @@ window.noname_character_rank={
'junk_duanwei',
'zerong',
'std_panfeng',
're_caochong',
],
}
};
2 changes: 1 addition & 1 deletion character/sp.js
Original file line number Diff line number Diff line change
Expand Up @@ -2205,7 +2205,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger:{source:'damageBegin1'},
charlotte:true,
forced:true,
onremove:true,
onremove:['olkangrui_add','olkangrui_nil'],
filter:function(event,player){
return player.hasMark('olkangrui_add');
},
Expand Down
17 changes: 9 additions & 8 deletions character/sp2.js
Original file line number Diff line number Diff line change
Expand Up @@ -7950,9 +7950,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
var allList=_status.characterlist.slice(0);
game.countPlayer(function(current){
allList.add(current.name);
allList.add(current.name1);
allList.add(current.name2);
if(current.name&&lib.character[current.name]&&current.name.indexOf('gz_shibing')!=0&&current.name.indexOf('gz_jun_')!=0) allList.add(current.name);
if(current.name1&&lib.character[current.name1]&&current.name1.indexOf('gz_shibing')!=0&&current.name1.indexOf('gz_jun_')!=0) allList.add(current.name1);
if(current.name2&&lib.character[current.name2]&&current.name2.indexOf('gz_shibing')!=0&&current.name2.indexOf('gz_jun_')!=0) allList.add(current.name2);
});
var list=[];
var skills=[];
Expand Down Expand Up @@ -8030,9 +8030,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
var allList=_status.characterlist.slice(0);
game.countPlayer(function(current){
allList.add(current.name);
allList.add(current.name1);
allList.add(current.name2);
if(current.name&&lib.character[current.name]&&current.name.indexOf('gz_shibing')!=0&&current.name.indexOf('gz_jun_')!=0) allList.add(current.name);
if(current.name1&&lib.character[current.name1]&&current.name1.indexOf('gz_shibing')!=0&&current.name1.indexOf('gz_jun_')!=0) allList.add(current.name1);
if(current.name2&&lib.character[current.name2]&&current.name2.indexOf('gz_shibing')!=0&&current.name2.indexOf('gz_jun_')!=0) allList.add(current.name2);
});
allList.randomSort();
for(var i=0;i<allList.length;i++){
Expand All @@ -8041,8 +8041,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
var skills2=lib.character[name][3];
for(var j=0;j<skills2.length;j++){
if(player.getStorage('pingjian').contains(skills2[j])) continue;
if(get.is.locked(skills2[j],player)) continue;
var info=lib.translate[skills2[j]+'_info'];
if(skills.contains(skills2[j])||(info&&info.indexOf('当你于出牌阶段')!=-1)){
if(skills.contains(skills2[j])||(info&&info.indexOf('当你于出牌阶段')!=-1&&info.indexOf('当你于出牌阶段外')==-1)){
list.add(name);
if(!map[name]) map[name]=[];
map[name].push(skills2[j]);
Expand Down Expand Up @@ -9669,7 +9670,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player:"enterGame",
},
forced:true,
filter:function(event){
filter:function(event,player){
return game.hasPlayer(current=>current!=player)&&(event.name!='phase'||game.phaseNumber==0);
},
content:function(){
Expand Down
18 changes: 12 additions & 6 deletions character/tw.js
Original file line number Diff line number Diff line change
Expand Up @@ -1571,15 +1571,21 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return dialog;
},
filter:function(button){
var opts=_status.event.dialog._chosenOpt;
if(opts&&opts.length&&opts[0].link=='交出锦囊牌'&&typeof button.link!=typeof opts[0].link){
return false;
if(_status.event.dialog){
var opts=_status.event.dialog._chosenOpt;
if(opts&&opts.length&&opts[0].link=='交出锦囊牌'&&typeof button.link!=typeof opts[0].link){
return false;
}
return true;
}
return true;
return false;
},
select:function(){
var opts=_status.event.dialog._chosenOpt;
return opts&&opts.length&&opts[0].link=='交出锦囊牌'?0:1;
if(_status.event.dialog){
var opts=_status.event.dialog._chosenOpt;
return opts&&opts.length&&opts[0].link=='交出锦囊牌'?0:1;
}
return 0;
},
check:function(button){
if(_status.event.getParent().type!='phase') return 1;
Expand Down
14 changes: 10 additions & 4 deletions character/xianding.js
Original file line number Diff line number Diff line change
Expand Up @@ -1383,7 +1383,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
else event.goto(3);
'step 2'
if(get.position(card)=='h'&&get.owner(card)==player&&player.hasUseTarget(card)){
player.chooseUseTarget(card,true);
if(get.name(card,player)=='sha') player.chooseUseTarget(card,true,false);
else player.chooseUseTarget(card,true);
}
'step 3'
if(player.hasHistory('useCard',evt=>{
Expand Down Expand Up @@ -3455,9 +3456,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
group:'dcfengying_record',
locked:false,
filter:function(event,player){
return player.storage.dcfengying&&player.storage.dcfengying.length&&player.storage.dcfengying.filter(name=>{
return event.filterCard({name:name},player,event);
}).length&&!player.hasSkill('dcfengying_used');
var mark=player.countMark('dclingfang');
if(mark<=0||!player.hasCard(card=>get.number(card)<=mark,'hs')) return false;
var storage=player.getStorage('dcfengying');
if(!storage.length) return false;
var storage2=player.getStorage('dcfengying_used')
return storage.some(name=>{
return !storage2.contains(name)&&event.filterCard({name:name},player,event);
});
},
hiddenCard:function(player,name){
var list=player.getStorage('dcfengying');
Expand Down
Loading

0 comments on commit bedbe7b

Please sign in to comment.