手杀神鲁肃

This commit is contained in:
copcap 2024-01-26 21:04:50 +08:00
parent 1d153e08f6
commit 99178836d4
No known key found for this signature in database
GPG Key ID: 30E7AB6699451AEE
3 changed files with 215 additions and 26 deletions

View File

@ -17,12 +17,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
extra_ol:['ol_zhangliao','shen_caopi','shen_zhenji','shen_sunquan'],
extra_mobilezhi:['shen_guojia','shen_xunyu'],
extra_mobilexin:['shen_taishici','shen_sunce'],
extra_mobileren:['shen_huatuo'],
extra_mobileren:['shen_huatuo','shen_lusu'],
extra_tw:['tw_shen_guanyu','tw_shen_lvmeng'],
extra_offline:['shen_diaochan','boss_zhaoyun','shen_dianwei','le_shen_jiaxu'],
},
},
character:{
shen_lusu:['male','shen',3,['dingzhou','tamo','zhimeng'],['wu']],
shen_huatuo:['male','shen',3,['wuling','youyi'],['qun']],
le_shen_jiaxu:['male','shen',4,['jxlianpo','jxzhaoluan'],['qun']],
shen_dianwei:['male','shen',4,['juanjia','qiexie','cuijue'],['wei']],
@ -90,6 +91,185 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
},
skill:{
//神鲁肃
dingzhou:{
audio:2,
enable:'phaseUse',
usable:1,
filter(event,player){
const num=player.countCards('he');
return game.hasPlayer(current=>{
const total=current.countCards('ej');
return total>0&&num>=total;
});
},
filterCard:true,
selectCard:[1,Infinity],
check(card){
return 7-get.value(card);
},
filterTarget(card,player,target){
return ui.selected.cards.length==target.countCards('ej')&&player!=target;
},
filterOk(){
return ui.selected.cards.length==ui.selected.targets[0].countCards('ej');
},
position:'he',
lose:false,
discard:false,
delay:false,
async content(event,trigger,player){
const target=event.targets[0];
await player.give(event.cards,target);
const cards=target.getGainableCards(player,'ej');
if(cards.length) player.gain(cards,'give',target);
},
ai:{
order:9,
result:{
target(player,target){
let eff=0;
if(ui.selected.cards.length) eff-=ui.selected.cards.map(card=>get.value(card)).reduce((p,c)=>p+c,0);
const es=target.getCards('e'),js=target.getCards('j');
es.forEach(card=>{
eff-=get.value(card,target);
});
js.forEach(card=>{
eff-=get.effect(target,{
name:card.viewAs||card.name,
cards:[card],
},target,target);
});
return eff;
}
},
},
},
tamo:{
audio:2,
trigger:{
global:'phaseBefore',
player:'enterGame',
},
filter(event,player){
return (event.name!='phase'||game.phaseNumber==0)&&game.hasPlayer(current=>{
return !current.isZhu2()&&current!=player;
});
},
direct:true,
async content(event,trigger,player){
const toSortPlayers=game.filterPlayer(current=>!current.isZhu2());
toSortPlayers.sortBySeat(game.findPlayer2(current=>current.getSeatNum()==1));
const next=player.chooseToMove('榻谟:是否分配所有角色的座次?');
next.set('list',[
['(以下排列的顺序即为发动技能后角色的座次顺序)',
[toSortPlayers.map(i=>`${i.getSeatNum()}|${i.name}`),(item,type,position,noclick,node)=>{
const info=item.split('|'),_item=item;
const seat=parseInt(info[0]);
item=info[1];
node=ui.create.buttonPresets.character(item,type,position,noclick);
node.link=_item;
node.seatNumber=seat;
node._customintro=(uiintro)=>{
uiintro.add(`${get.translation(node._link)}(原${get.cnNumber(node.seatNumber,true)}号位)`);
};
return node;
}]
]
]);
next.set('processAI',list=>{
const listx=list[0][1][0];
const me=listx.find(info=>parseInt(info.split('|')[0])==get.player().getSeatNum());
listx.remove(me);
listx.randomSort();
listx.unshift(me);
return [listx];
});
const {result}=await next;
if(!result.bool) return;
player.logSkill('tamo');
const resultList=result.moved[0].map(info=>{
return parseInt(info.split('|')[0]);
});
const toSwapList=[];
const cmp=(a,b)=>{
return resultList.indexOf(a)-resultList.indexOf(b);
}
for(let i in toSortPlayers){
for(let j in toSortPlayers){
if(cmp(toSortPlayers[i].getSeatNum(),toSortPlayers[j].getSeatNum())<0){
toSwapList.push([toSortPlayers[i],toSortPlayers[j]]);
[toSortPlayers[i],toSortPlayers[j]]=[toSortPlayers[j],toSortPlayers[i]];
}
}
}
game.broadcastAll((toSwapList)=>{
for(const list of toSwapList){
game.swapSeat(list[0],list[1],false);
}
},toSwapList);
await game.asyncDelay();
}
},
//什么均贫卡
zhimeng:{
audio:2,
trigger:{player:'phaseAfter'},
filter(event,player){
return game.hasPlayer(current=>{
return current.countCards('h')+player.countCards('h')>0&&player!=current;
})
},
direct:true,
async content(event,trigger,player){
const {result:{bool,targets}}=await player.chooseTarget(get.prompt('zhimeng'),'与一名其他角色平分手牌',(card,player,target)=>{
return target.countCards('h')+player.countCards('h')>0&&player!=target;
}).set('ai',target=>{
const player=get.player();
const pvalue=-player.getCards('h').map(card=>get.value(card,player)).reduce((p,c)=>p+c,0);
const tvalue=target.getCards('h').map(card=>get.value(card,player)).reduce((p,c)=>p+c,0);
return (pvalue+tvalue)/2;
});
if(!bool) return;
const target=targets[0];
player.logSkill('zhimeng',target);
const lose_list=[];
let cards=[];
[player,target].forEach(current=>{
const hs=current.getCards('h');
if(hs.length){
cards.addArray(hs);
current.$throw(hs.length,500);
game.log(current,'将',get.cnNumber(hs.length),'张牌置入了处理区');
lose_list.push([current,hs]);
}
});
await game.loseAsync({
lose_list:lose_list,
}).setContent('chooseToCompareLose');
await game.asyncDelay();
cards=cards.filterInD();
const pcards=cards.randomGets(Math.ceil(cards.length/2));
const tcards=cards.removeArray(pcards);
const list=[];
if(pcards.length){
list.push([player,pcards]);
game.log(player,'获得了',get.cnNumber(pcards.length),'张牌');
}
if(tcards.length){
list.push([target,tcards]);
game.log(target,'获得了',get.cnNumber(tcards.length),'张牌');
}
game.loseAsync({
gain_list:list,
player:player,
animate:'gain2',
}).setContent('gaincardMultiple');
},
ai:{
threaten:4,
},
},
//神华佗
wuling:{
audio:2,
@ -8066,6 +8246,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
'<br><li>鹤:当你获得此效果时,你摸三张牌。',
youyi:'游医',
youyi_info:'①弃牌阶段结束时你可以将所有于此阶段弃置的牌置入仁区。②出牌阶段限一次。你可以将仁区的所有牌置入弃牌堆令所有角色各回复1点体力。',
shen_lusu:'神鲁肃',
shen_lusu_prefix:'神',
dingzhou:'定州',
dingzhou_info:'出牌阶段限一次。你可以交给一名角色X张牌然后你获得其装备区和判定区里的所有牌X为其装备区与判定区里的牌数之和。',
tamo:'榻谟',
tamo_info:'游戏开始时,你可以重新分配除主公外所有角色的座次。',
zhimeng:'智盟',
zhimeng_info:'回合结束后,你可以与一名其他角色将各自所有手牌置于处理区,然后你随机获得这些牌中的一半(向上取整),其获得剩余的牌。',
extra_feng:'神话再临·风',
extra_huo:'神话再临·火',

View File

@ -358,6 +358,7 @@ window.noname_character_rank={
'dc_sb_zhouyu',
'dc_lingcao',
'jsrg_zhugeliang',
'shen_lusu',
],
am:[
'muludawang',

View File

@ -26,7 +26,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
pal_yuntianhe:['male','wu',4,['longxi','zhuyue','guanri']],
pal_hanlingsha:['female','shu',3,['tannang','tuoqiao']],
pal_liumengli:['female','wei',3,['tianxian','runxin','zhimeng']],
pal_liumengli:['female','wei',3,['tianxian','runxin','xjzhimeng']],
pal_murongziying:['male','wei',4,['xuanning','poyun','qianfang']],
pal_xuanxiao:['male','wei',4,['xuanyan','ningbin','xfenxin']],
@ -3858,17 +3858,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){
threaten:1.5
}
},
zhimeng:{
xjzhimeng:{
trigger:{player:'phaseEnd'},
direct:true,
locked:true,
unique:true,
gainable:true,
// alter:true,
group:'zhimeng3',
group:'xjzhimeng3',
content:function(){
"step 0"
player.chooseTarget(get.prompt('zhimeng'),function(card,player,target){
player.chooseTarget(get.prompt('xjzhimeng'),function(card,player,target){
return player!=target;
}).ai=function(target){
var num=get.attitude(player,target);
@ -3888,35 +3888,35 @@ game.import('character',function(lib,game,ui,get,ai,_status){
"step 1"
if(result.bool){
var target=result.targets[0];
if(get.is.altered('zhimeng')){
if(get.is.altered('xjzhimeng')){
target.draw();
}
else{
var card=get.cards()[0];
target.$draw(card);
target.storage.zhimeng2=card;
game.addVideo('storage',target,['zhimeng2',get.cardInfo(card),'card']);
target.addSkill('zhimeng2');
target.storage.xjzhimeng2=card;
game.addVideo('storage',target,['xjzhimeng2',get.cardInfo(card),'card']);
target.addSkill('xjzhimeng2');
}
player.logSkill('zhimeng',target);
player.logSkill('xjzhimeng',target);
}
},
ai:{
expose:0.2
}
},
zhimeng2:{
xjzhimeng2:{
intro:{
content:'card',
onunmark:function(storage,player){
delete player.storage.zhimeng2;
delete player.storage.xjzhimeng2;
}
},
mark:'card',
trigger:{target:'useCardToBegin'},
frequent:true,
filter:function(event,player){
return player.storage.zhimeng2&&get.type(event.card,'trick')==get.type(player.storage.zhimeng2,'trick');
return player.storage.xjzhimeng2&&get.type(event.card,'trick')==get.type(player.storage.xjzhimeng2,'trick');
},
content:function(){
player.draw();
@ -3924,14 +3924,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
ai:{
effect:{
target:function(card,player,target){
if(target.storage.zhimeng2&&get.type(card,'trick')==get.type(target.storage.zhimeng2,'trick')){
if(target.storage.xjzhimeng2&&get.type(card,'trick')==get.type(target.storage.xjzhimeng2,'trick')){
return [1,0.5];
}
}
}
}
},
zhimeng3:{
xjzhimeng3:{
trigger:{player:['phaseBegin','dieBegin']},
silent:true,
content:function(){
@ -3941,16 +3941,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){
"step 1"
if(event.num<event.players.length){
var player=event.players[event.num];
if(player.storage.zhimeng2){
if(player.storage.xjzhimeng2){
if(trigger.name=='die'&&player==trigger.player){
player.storage.zhimeng2.discard();
player.storage.xjzhimeng2.discard();
}
else{
game.log(player,'发动织梦,获得了',player.storage.zhimeng2);
player.gain(player.storage.zhimeng2,'gain2');
player.popup('zhimeng');
game.log(player,'发动织梦,获得了',player.storage.xjzhimeng2);
player.gain(player.storage.xjzhimeng2,'gain2');
player.popup('xjzhimeng');
}
player.removeSkill('zhimeng2');
player.removeSkill('xjzhimeng2');
}
event.num++;
event.redo();
@ -4348,11 +4348,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
guanri_info:'限制技你可以弃置两张红色手牌并失去1点体力然后对一名体力值不少于你的其他角色造成2点火焰伤害并弃置其所有装备牌。',
tianxian:'天弦',
tianxian_info:'锁定技,你的杀无视距离且可指定任意多个目标,目标须进行一次判定,若结果为黑色则取消之。',
zhimeng:'织梦',
zhimeng2:'织梦',
zhimeng3:'织梦',
zhimeng_info:'结束阶段,你可以选择一名其他角色将牌堆顶的一张牌置于该角色的武将牌上,直到你的下个准备阶段将其收入手牌。当一名角色武将牌上有织梦牌时,每当其成为与此牌类型相同的卡牌的目标,可以摸一张牌。',
zhimeng_info_alter:'结束阶段,你可以令一名其他角色摸一张牌。',
xjzhimeng:'织梦',
xjzhimeng2:'织梦',
xjzhimeng3:'织梦',
xjzhimeng_info:'结束阶段,你可以选择一名其他角色将牌堆顶的一张牌置于该角色的武将牌上,直到你的下个准备阶段将其收入手牌。当一名角色武将牌上有织梦牌时,每当其成为与此牌类型相同的卡牌的目标,可以摸一张牌。',
xjzhimeng_info_alter:'结束阶段,你可以令一名其他角色摸一张牌。',
runxin:'润心',
runxin_info:'每当你使用或打出一张红桃牌你可以令一名角色回复1点体力。',
tannang:'探囊',