Merge pull request #1080 from mengxinzxz/PR-Branch

刘辟;素材补充;bugfix
This commit is contained in:
Spmario233 2024-03-15 12:21:57 +08:00 committed by GitHub
commit 98adbbb563
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
11 changed files with 147 additions and 43 deletions

BIN
audio/die/clan_wuqiao.mp3 Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
audio/skill/clanqiajue1.mp3 Normal file

Binary file not shown.

BIN
audio/skill/clanqiajue2.mp3 Normal file

Binary file not shown.

View File

@ -12801,7 +12801,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
dcjianshu_info:'出牌阶段限一次。你可以将一张黑色手牌交给一名其他角色并选择另一名其他角色你令前者与后者拼点。赢的角色随机弃置一张牌没赢的角色失去1点体力。若有角色因此死亡你令你〖间书〗于此阶段发动的次数上限+1。',
dcyongdi:'拥嫡',
dcyongdi_info:'限定技。出牌阶段你可以选择一名男性角色若其体力上限最少其加1点体力上限体力值最少其回复1点体力手牌数最少其摸X张牌X为其体力上限且至多为5。',
liupi:'刘辟',
liupi:'新杀刘辟',
liupi_prefix:'新杀',
dcjuying:'踞营',
dcjuying_info:'出牌阶段结束时若你于此阶段内使用【杀】的次数未达到上限你可以选择任意项1.下回合使用【杀】的次数上限+12.本回合手牌上限+23.摸三张牌。若你选择的项数超过了你的体力值,你弃置一张牌。',
dc_huanghao:'新杀黄皓',

View File

@ -992,6 +992,7 @@ window.noname_character_rank={
'yuanji',
'dc_chenqun',
'liupi',
'ol_liupi',
'mazhong',
're_mazhong',
'tw_baoxin',
@ -2602,6 +2603,7 @@ window.noname_character_rank={
'xin_caoxiu',
'dc_chenqun',
'liupi',
'ol_liupi',
'tw_baoxin',
'tw_bingyuan',
'tw_chenzhen',

View File

@ -18,7 +18,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
sp_zhongdan:["cuiyan","huangfusong"],
sp_guozhan2:["sp_dongzhuo","liqueguosi","zhangren"],
sp_others:["hanba","caiyang"],
sp_waitforsort:['ol_luyusheng','ol_pengyang','ol_tw_zhangji','ol_liwan','ol_liuyan','caoyu','liupan','ol_lukai'],
sp_waitforsort:['ol_luyusheng','ol_pengyang','ol_tw_zhangji','ol_liwan','ol_liuyan','caoyu','liupan','ol_lukai','ol_liupi'],
},
},
characterFilter:{
@ -30,6 +30,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
},
character:{
ol_liupi:['male','qun',4,['olyicheng']],
ol_lukai:['male','wu',3,['olxuanzhu','oljiane']],
liupan:['male','qun',4,['olpijing']],
guotu:['male','qun',3,['olqushi','olweijie']],
@ -45,7 +46,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
lvboshe:['male','qun',4,['olfushi','oldongdao']],
ol_luyusheng:['female','wu',3,['olcangxin','olrunwei']],
caoxi:['male','wei',3,['olgangshu','oljianxuan']],
ol_pengyang:['male','shu',3,['olqifan','oltuishi','nzry_cunmu']],
ol_pengyang:['male','shu',3,['olxiaofan','oltuishi','nzry_cunmu']],
ol_qianzhao:['male','wei',4,['olweifu','olkuansai']],
niujin:['male','wei',4,['olcuorui','liewei']],
hejin:['male','qun',4,['mouzhu','olyanhuo']],
@ -711,6 +712,85 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
},
skill:{
//刘辟
olyicheng:{
audio:2,
enable:'phaseUse',
usable:1,
async content(event,trigger,player){
let cards=get.cards(3);
await game.cardsGotoOrdering(cards);
await player.showCards(cards,get.translation(player)+'发动了【易城】');
if(player.countCards('h')){
const sum=cards.reduce((num,card)=>num+get.number(card),0);
const {result:{bool,moved}}=await player.chooseToMove('易城:请选择你要交换的牌').set('list',[
['牌堆顶',cards,list=>{
const sum2=list.reduce((num,card)=>num+get.number(card,false),0);
return '牌堆顶(现'+sum2+{'0':'=','-1':'<','1':'>'}[get.sgn(sum2-sum).toString()]+'原'+sum+'';
}],
['手牌',player.getCards('h')],
]).set('filterOk',moved=>moved[1].some(i=>!get.owner(i))).set('processAI',list=>{
const player=get.event('player'),limit=Math.min(3,player.countCards('h'));
let cards=list[0][1].slice(),hs=player.getCards('h');
if(cards.reduce((num,card)=>num+get.value(card),0)>player.getCards('h').reduce((num,card)=>num+get.value(card),0)){
cards.sort((a,b)=>get.number(a)-get.number(b));
hs.sort((a,b)=>get.number(b)-get.number(a));
let cards2=cards.slice(0,limit),hs2=hs.slice(0,limit);
if(hs2.reduce((num,card)=>num+get.number(card),0)>cards2.reduce((num,card)=>num+get.number(card),0)){
cards.removeArray(cards2);hs.removeArray(hs2);
return [cards.concat(hs2),hs.concat(cards2)];
}
return [cards,hs];
}
else{
cards.sort((a,b)=>get.value(b)-get.value(a));
hs.sort((a,b)=>get.value(a)-get.value(b));
let cards2=cards.slice(0,limit),hs2=hs.slice(0,limit),list=[cards,hs];
for(let i=0;i<limit;i++){
if(get.value(cards2[i])>get.value(hs2[i])){
const change=[cards2[i],hs2[i]];
cards[i]=change[1];hs[i]=change[0];
}
else break;
}
return list;
}
});
if(bool){
const puts=player.getCards('h',i=>moved[0].includes(i));
const gains=cards.filter(i=>moved[1].includes(i));
if(puts.length&&gains.length){
player.$throw(puts,1000);
await player.lose(puts,ui.special);
await player.gain(gains,'gain2');
cards=moved[0].slice();
await player.showCards(cards,get.translation(player)+'【易城】第一次交换后');
if(cards.reduce((num,card)=>num+get.number(card),0)>sum&&player.countCards('h')){
const {result:{bool}}=await player.chooseBool('易城:是否使用全部手牌交换'+get.translation(cards)+'').set('choice',(()=>{
return cards.reduce((num,card)=>num+get.value(card),0)>player.getCards('h').reduce((num,card)=>num+get.value(card),0);
})());
if(bool){
const hs=player.getCards('h');
player.$throw(hs,1000);
await player.lose(hs,ui.special);
await player.gain(cards,'gain2');
cards=hs.slice();
await player.showCards(cards,get.translation(player)+'【易城】第二次交换后');
}
}
}
}
if(cards.length){
await game.cardsDiscard(cards);
//game.log(cards,'被置入了弃牌堆');
}
}
},
ai:{
order:9,
result:{player:1},
},
},
//陆凯
olxuanzhu:{
mark:true,
@ -2457,8 +2537,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
check:function(card){
var player=_status.event.player;
if(player.hasSkill('hezhong')){
if(player.countCards('h')-ui.selected.cards.length>1) return 1/(get.value(card)||0.5);
if(player.hasSkill('hezhong')&&(!(player.hasSkill('hezhong_0')&&player.hasSkill('hezhong_1')))){
if(player.countCards('h')-ui.selected.cards.length>2) return 1/(get.value(card)||0.5);
return 0;
}
if(ui.selected.cards.length<player.countCards('h')/2) return 5-get.value(card);
@ -2478,7 +2558,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
'step 1'
player.chooseToDiscard('h','宴如:弃置至少一半手牌',[Math.floor(player.countCards('h')/2),Infinity],true).set('ai',card=>{
var player=_status.event.player;
if(player.hasSkill('hezhong')&&player.countCards('h')-ui.selected.cards.length>1) return 1/(get.value(card)||0.5);
if(player.hasSkill('hezhong')&&(!(player.hasSkill('hezhong_0')&&player.hasSkill('hezhong_1')))&&player.countCards('h')-ui.selected.cards.length>2) return 1/(get.value(card)||0.5);
if(!player.hasSkill('hezhong')&&ui.selected.cards.length<Math.floor(player.countCards('h')/2)) return 1/(get.value(card)||0.5);
return 0;
});
@ -3244,15 +3324,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
},
//OL彭羕
olqifan:{
olxiaofan:{
audio:2,
enable:'chooseToUse',
hiddenCard:function(player,name){
if(name!='wuxie'&&lib.inpile.includes(name)) return true;
},
getNum:()=>game.getGlobalHistory('useCard').reduce((list,evt)=>list.add(get.type2(evt.card)),[]).length,
getNum:(player)=>player.getHistory('useCard').reduce((list,evt)=>list.add(get.type2(evt.card)),[]).length,
filter:function(event,player){
if(event.responded||event.type=='wuxie'||event.olqifan) return false;
if(event.responded||event.type=='wuxie'||event.olxiaofan) return false;
for(var i of lib.inpile){
if(i!='wuxie'&&event.filterCard(get.autoViewAs({name:i},'unsure'),player,event)) return true;
}
@ -3262,8 +3342,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
content:function(){
'step 0'
var evt=event.getParent(2);
evt.set('olqifan',true);
var cards=get.bottomCards(lib.skill.olqifan.getNum()+1,true);
evt.set('olxiaofan',true);
var cards=get.bottomCards(lib.skill.olxiaofan.getNum(player)+1,true);
var aozhan=player.hasSkill('aozhan');
player.chooseButton(['嚣翻:选择要使用的牌',cards]).set('filterButton',function(button){
return _status.event.cards.includes(button.link);
@ -3300,11 +3380,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},evt.player,evt)?'sha':'shan';
}
game.broadcastAll(function(result,name){
lib.skill.olqifan_backup.viewAs={name:name,cards:[result],isCard:true};
lib.skill.olxiaofan_backup.viewAs={name:name,cards:[result],isCard:true};
},card,name);
evt.set('_backupevent','olqifan_backup');
evt.set('_backupevent','olxiaofan_backup');
evt.set('openskilldialog',('请选择'+get.translation(card)+'的目标'))
evt.backup('olqifan_backup');
evt.backup('olxiaofan_backup');
}
evt.goto(0);
},
@ -3326,8 +3406,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
},
},
olqifan_backup:{
sourceSkill:'olqifan',
olxiaofan_backup:{
sourceSkill:'olxiaofan',
precontent:function(){
delete event.result.skill;
var name=event.result.card.name,cards=event.result.card.cards.slice(0);
@ -3338,9 +3418,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
event.result.card=card;
var id=get.id();
player.when('chooseToUseAfter').filter((evt)=>evt==event.getParent()).then(()=>{
var num=lib.skill.olqifan.getNum(),pos=('jeh').slice(0,num);
var num=lib.skill.olxiaofan.getNum(player),pos=('jeh').slice(0,num);
if(num>0&&player.countCards(pos)>0){
event.maxNum=Math.min(3,lib.skill.olqifan.getNum());
event.maxNum=Math.min(3,num);
event.num=0;
}
else event.finish();
@ -3410,7 +3490,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger:{player:'useCard1'},
filter:function(event,player){
if(!event.targets||!event.targets.length) return false;
return event.targets.some(target=>player.countCards('h')+event.cards.length>target.countCards('h'));
let num=0;
if(event.cards&&event.cards.length){
const history=player.getHistory('lose',evt=>{
if(evt.getParent()!=event) return false;
return event.cards.some(card=>evt.hs.includes(card));
});
if(history.length) num+=event.cards.filter(card=>history[0].hs.includes(card)).length;
}
return event.targets.some(target=>player.countCards('h')+num>target.countCards('h')+(target==player?num:0));
},
forced:true,
popup:false,
@ -18674,8 +18762,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
filter:function(event,player){
var num;
var mode=get.mode();
if(mode=='identity'){
if(_status.mode=='purple') num=player.getEnemies().length;
if(mode=='identity'||mode=='doudizhu'){
if(mode=='identity'&&_status.mode=='purple') num=player.getEnemies().length;
else num=get.population('fan');
}
else if(mode=='versus'){
@ -26433,6 +26521,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
zhangren:['jsrg_zhangren','zhangren'],
wenqin:['ol_wenqin','pe_wenqin'],
lukai:['ol_lukai','lukai'],
liupi:['ol_liupi','liupi'],
},
translate:{
"xinfu_lingren":"凌人",
@ -26798,6 +26887,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
hongde_info:'当你一次获得或失去至少两张牌后,你可以令一名其他角色摸一张牌。',
dingpan:'定叛',
dingpan_info_identity:'出牌阶段限X次你可以令一名装备区里有牌的角色摸一张牌然后其选择一项1.令你弃置其装备区里的一张牌2.获得其装备区里的所有牌若如此做你对其造成1点伤害。X为场上存活的反贼数',
dingpan_info_doudizhu:'出牌阶段限X次你可以令一名装备区里有牌的角色摸一张牌然后其选择一项1.令你弃置其装备区里的一张牌2.获得其装备区里的所有牌若如此做你对其造成1点伤害。X为场上存活的农民数',
dingpan_info_versus_two:'出牌阶段限X次你可以令一名装备区里有牌的角色摸一张牌然后其选择一项1.令你弃置其装备区里的一张牌2.获得其装备区里的所有牌若如此做你对其造成1点伤害。X为场上存活的最大阵营角色数',
dingpan_info_versus:'出牌阶段限X次你可以令一名装备区里有牌的角色摸一张牌然后其选择一项1.令你弃置其装备区里的一张牌2.获得其装备区里的所有牌若如此做你对其造成1点伤害。X为场上存活的敌方角色数',
dingpan_info:'出牌阶段限一次你可以令一名装备区里有牌的角色摸一张牌然后其选择一项1.令你弃置其装备区里的一张牌2.获得其装备区里的所有牌若如此做你对其造成1点伤害。',
@ -27584,8 +27674,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
oljianxuan:'谏旋',
oljianxuan_info:'当你受到伤害后,你可以令一名角色摸一张牌,然后若其手牌数等于你〖刚述①〗中的任意一项对应的数值,其重复此流程。',
ol_pengyang:'彭羕',
olqifan:'嚣翻',
olqifan_info:'当你需要使用不为【无懈可击】的牌时你可以观看牌堆底的X+1张牌并使用其中的一张。此牌结算结束时你依次弃置以下前X个区域中的所有牌⒈判定区、⒉装备区、⒊手牌区X为本回合使用过的牌中包含的类型数)。',
olxiaofan:'嚣翻',
olxiaofan_info:'当你需要使用不为【无懈可击】的牌时你可以观看牌堆底的X+1张牌并使用其中的一张。此牌结算结束时你依次弃置以下前X个区域中的所有牌⒈判定区、⒉装备区、⒊手牌区X为本回合使用过的牌中包含的类型数)。',
oltuishi:'侻失',
oltuishi_info:'锁定技。①你不能使用【无懈可击】。②当你使用点数为字母的牌时,你令此牌无效并摸一张牌,且你对手牌数小于你的角色使用的下一张牌无距离和次数限制。',
ol_tw_zhangji:'张既',
@ -27663,6 +27753,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
olxuanzhu_info:'转换技,每回合限一次,你可以将一张牌称为“玄”置于武将牌上,然后视为使用:阴,任意基本牌;阳,任意普通锦囊牌(须指定目标且仅指定一个目标)。若此次置于武将牌上的“玄”:不为装备牌,你弃置一张牌;为装备牌,你将所有“玄”置入弃牌堆,然后摸等量的牌。',
oljiane:'謇谔',
oljiane_info:'锁定技。①当你对其他角色使用的牌生效后,其本回合无法抵消牌。②当你抵消牌后,你本回合无法成为牌的目标。',
ol_liupi:'刘辟',
olyicheng:'易城',
olyicheng_info:'出牌阶段限一次,你可以亮出牌堆顶的三张牌,然后你可以以任意手牌交换这些牌,若这三张牌的点数和因此增加,则你可以选择用所有手牌交换这三张牌。',
sp_tianji:'天极·皇室宗亲',
sp_sibi:'四弼·辅国文曲',

View File

@ -663,14 +663,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(!player.hasSkill('twxinshou_1')) return goon&&game.hasPlayer(target=>target!=player);
return !player.hasSkill('twdengjian_ban')&&game.hasPlayer(target=>{
if(target==player) return false;
return !target.hasSkill('twdengjian',null,false,false);
})&&player.hasSkill('twdengjian',null,false,false);
return !target.hasSkill('twdengjian',null,null,false);
})&&player.hasSkill('twdengjian',null,null,false);
},
direct:true,
async content(event,trigger,player){
if(player.hasSkill('twxinshou_0')&&player.hasSkill('twxinshou_1')){
const {result:{bool,targets}}=await player.chooseTarget((card,player,target)=>{
return target!=player&&!target.hasSkill('twdengjian',null,false,false);
return target!=player&&!target.hasSkill('twdengjian',null,null,false);
}).set('ai',target=>{
const player=get.event('player');
if(get.attitude(player,target)>0){
@ -689,13 +689,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
const target=targets[0];
player.logSkill('twxinshou',target);
player.addSkill('twdengjian_ban');
target.addAdditionalSkill('twxinshou_'+player.playerid,'twdengjian');
target.addAdditionalSkills('twxinshou_'+player.playerid,'twdengjian');
player.popup('登剑');
target.popup('登剑');
game.log(player,'将','#g【登剑】','传授给了',target);
game.log(player,'的','#g【登剑】','被失效了');
player.when('phaseBegin').then(()=>{
target.removeAdditionalSkill('twxinshou_'+player.playerid);
target.removeAdditionalSkills('twxinshou_'+player.playerid);
}).then(()=>{
const history=game.getAllGlobalHistory('everything');
for(let i=history.length-1;i>=0;i--){
const evt=history[i];
@ -708,6 +709,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(evt==evtx) break;
}
player.popup('杯具');
player.chat('剑法废掉了...');
}).vars({target:target,evtx:event});
}
}
@ -733,7 +735,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.logSkill('twxinshou');
if(control=='摸牌'){
player.addTempSkill('twxinshou_0');
player.draw();
await player.draw();
}
if(control=='给牌'){
player.addTempSkill('twxinshou_1');
@ -750,7 +752,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(bool){
const target=targets[0];
player.line(target);
player.chooseToGive(target,'he',true);
await player.chooseToGive(target,'he',true);
}
}
}
@ -780,7 +782,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
}
target.disableEquip(disables);
if(num) target.draw(num);
if(num) await target.draw(num);
target.addSkill('twjieqiu_buff');
target.markAuto('twjieqiu_buff',[player]);
target.when('enableEquipEnd')
@ -823,7 +825,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
[transList,'tdnodes'],
],num,true).set('map',map)
.set('ai',button=>['equip5','equip4','equip1','equip3','equip2'].indexOf(get.event('map')[button.link])+2);
if(bool) player.enableEquip(links.slice().map(i=>map[i]));
if(bool) await player.enableEquip(links.slice().map(i=>map[i]));
},
group:['twjieqiu_end'],
},
@ -877,7 +879,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
[transList,'tdnodes'],
],true).set('map',map)
.set('ai',button=>1/(['equip5','equip4','equip1','equip3','equip2'].indexOf(get.event('map')[button.link])+2));
if(bool) target.enableEquip(links.slice().map(i=>map[i]));
if(bool) await target.enableEquip(links.slice().map(i=>map[i]));
},
ai:{
order:9,

View File

@ -5569,37 +5569,43 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
qinqing:{
audio:2,
mode:['identity','versus'],
mode:['identity','versus','doudizhu'],
available:function(mode){
if(mode=='versus'&&_status.mode!='four') return false;
if(mode=='identity'&&_status.mode=='purple') return false;
},
getZhu:(player)=>{
if(get.mode=='doudizhu') return game.findPlayer(i=>i.identity=='zhu');
return get.zhu(player);
},
trigger:{player:'phaseJieshuBegin'},
direct:true,
filter:function(event,player){
var zhu=get.zhu(player);
if(!zhu||!zhu.isZhu) return false;
var zhu=get.info('qinqing').getZhu(player);
if(!zhu||(get.mode!='doudizhu'&&!zhu.isZhu)) return false;
return game.hasPlayer(function(current){
return current!=zhu&&current.inRange(zhu);
});
},
content:function(){
'step 0'
event.zhu=get.info('qinqing').getZhu(player);
player.chooseTarget(get.prompt2('qinqing'),[1,Infinity],function(card,player,target){
var zhu=get.zhu(player);
var zhu=get.event('zhu');
if(target==zhu) return false;
return target.inRange(zhu);
}).set('ai',function(target){
var he=target.countCards('he')
var he=target.countCards('he');
var zhu=get.event('zhu');
if(get.attitude(_status.event.player,target)>0){
if(he==0) return 1;
if(target.countCards('h')>get.zhu(player).countCards('h')) return 1;
if(target.countCards('h')>zhu.countCards('h')) return 1;
}
else{
if(he>0) return 1;
}
return 0;
});
}).set('zhu',event.zhu);
'step 1'
if(result.bool){
event.targets=result.targets.slice(0).sortBySeat();
@ -5620,9 +5626,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
'step 3'
var num=0;
var zhu=get.zhu(player);
if(zhu){
var nh=zhu.countCards('h');
if(event.zhu){
var nh=event.zhu.countCards('h');
for(var i=0;i<event.list.length;i++){
if(event.list[i].countCards('h')>nh){
num++;
@ -14151,6 +14156,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
jiyu_info:'出牌阶段限一次你可以令一名角色弃置一张手牌。若如此做你不能使用与之相同花色的牌直到回合结束。若其以此法弃置的牌为黑桃你翻面并令其失去1点体力。若你有未被〖讥谀〗限制的手牌则你可以继续发动此技能但不能选择本回合已经选择过的目标。',
qinqing:'寝情',
qinqing_info:'结束阶段你可以选择任意名攻击范围内含有主公的角色然后弃置这些角色各一张牌并令其摸一张牌无牌则不弃若如此做你摸X张牌X为其中手牌比主公多的角色数。',
qinqing_info_doudizhu:'结束阶段你可以选择任意名攻击范围内含有地主的角色然后弃置这些角色各一张牌并令其摸一张牌无牌则不弃若如此做你摸X张牌X为其中手牌比地主多的角色数。',
huisheng:'贿生',
huisheng_info:'当你受到其他角色对你造成的伤害时你可以令其观看你任意数量的牌并令其选择一项1.获得这些牌中的一张防止此伤害然后你不能再对其发动〖贿生〗2.弃置等量的牌。',
jishe:'极奢',

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB