谋曹丕调整
This commit is contained in:
parent
8d45799b58
commit
66be69927a
148
character/sb.js
148
character/sb.js
|
@ -742,11 +742,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
sbxingshang:{
|
||||
audio:2,
|
||||
trigger:{global:['die','damageEnd']},
|
||||
filter(event,player){
|
||||
if(player.countMark('sbxingshang')>=get.info('sbxngshang').getLimit) return false;
|
||||
return event.name=='die'||!player.getHistory('custom',evt=>evt.sbxingshang).length;
|
||||
},
|
||||
usable:1,
|
||||
forced:true,
|
||||
locked:false,
|
||||
async content(event,trigger,player){
|
||||
player.addMark('sbxingshang',1);
|
||||
if(trigger.name=='damage') player.getHistory('custom').push({sbxingshang:true});
|
||||
},
|
||||
marktext:'颂',
|
||||
intro:{
|
||||
|
@ -754,14 +759,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
content:'mark',
|
||||
},
|
||||
ai:{threaten:2.5},
|
||||
getLimit:9,
|
||||
getNum(num){
|
||||
if(typeof num!='number'||Array.from({length:8}).map((_,i)=>i+1).includes(num)) return 0;
|
||||
return [1,2,3,4,2,2,3,3][num-1];
|
||||
if(typeof num!='number'||Array.from({length:9}).map((_,i)=>i+1).includes(num)) return 0;
|
||||
return [1,2,3,4,1,2,2,3,3][num-1];
|
||||
},
|
||||
getEffect(player,num){
|
||||
if(!player||typeof num!='number') return 0;
|
||||
switch(num){
|
||||
//行殇四个选项
|
||||
//行殇选项
|
||||
case 1://-1,重置武将牌
|
||||
if(game.hasPlayer(target=>{
|
||||
return get.attitude(player,target)>0&&target.isTurnedOver();
|
||||
|
@ -773,13 +779,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(!game.hasPlayer(target=>{
|
||||
return get.attitude(player,target)>0&&target.maxHp<10;
|
||||
})) return 0;
|
||||
return 2+(game.hasPlayer(target=>{
|
||||
return 5+(game.hasPlayer(target=>{
|
||||
return get.attitude(player,target)>0&&target.hasDisabledSlot();
|
||||
})?1:0);
|
||||
case 4://-4,劝封/化萍
|
||||
return 0;
|
||||
//放逐四个选项
|
||||
case 5://-2,白板到结束
|
||||
//放逐选项
|
||||
case 5://-1,封印基本牌外的手牌
|
||||
if(game.hasPlayer(target=>{
|
||||
return get.attitude(player,target)<0;
|
||||
})) return 1;
|
||||
return 0;
|
||||
case 6://-2,白板到结束
|
||||
if(game.hasPlayer(target=>{
|
||||
if(target.hasSkill('sbfangzhu_ban')||target.hasSkill('fengyin')||target.hasSkill('baiban')) return false;
|
||||
return get.attitude(player,target)<0&&['name','name1','name2'].reduce((sum,name)=>{
|
||||
|
@ -790,14 +801,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},0)>5;
|
||||
})) return 6;
|
||||
return 0;
|
||||
case 6://-2,强命到结束
|
||||
case 7://-2,强命到结束
|
||||
return 0;
|
||||
case 7://-3,翻面
|
||||
case 8://-3,翻面
|
||||
if(game.hasPlayer(target=>{
|
||||
return get.attitude(player,target)<0&&!target.isTurnedOver();
|
||||
})) return 8;
|
||||
return 0;
|
||||
case 8://-3,定向鸡肋
|
||||
case 9://-3,封印装备牌外的手牌
|
||||
if(game.hasPlayer(target=>{
|
||||
return get.attitude(player,target)<0;
|
||||
})) return 2.5;
|
||||
return 0;
|
||||
default://其他
|
||||
return 0;
|
||||
|
@ -817,19 +831,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
usable:1,
|
||||
chooseButton:{
|
||||
dialog(){
|
||||
var dialog=ui.create.dialog(
|
||||
'行殇:请选择你要执行的一项',
|
||||
[[
|
||||
[1,' ⒈复原一名角色的武将牌 '],
|
||||
[2,' ⒉令一名角色摸'+Math.min(5,Math.max(1,game.dead.length))+'张牌 '],
|
||||
],'tdnodes'],
|
||||
[[
|
||||
[3,' ⒊令一名体力上限小于10的角色加1点体力上限并回复1点体力,然后随机恢复一个被废除的装备栏 '],
|
||||
],'tdnodes'],
|
||||
[[
|
||||
[4,' ⒋获得一名已阵亡角色的所有技能,然后失去武将牌上的所有技能 '],
|
||||
],'tdnodes']
|
||||
);
|
||||
var dialog=ui.create.dialog('行殇:请选择你要执行的一项','hidden');
|
||||
dialog.add([[
|
||||
[1,'移去1个“颂”标记,复原一名角色的武将牌'],
|
||||
[2,'移去2个“颂”标记,令一名角色摸'+get,cnNumber(Math.min(5,Math.max(1,game.dead.length)))+'张牌'],
|
||||
[2,'移去3个“颂”标记,令一名体力上限小于10的角色加1点体力上限并回复1点体力,然后随机恢复一个被废除的装备栏'],
|
||||
[3,'移去4个“颂”标记,获得一名已阵亡角色的所有技能,然后失去〖行殇〗〖放逐〗〖颂威〗'],
|
||||
],'textbutton']);
|
||||
return dialog;
|
||||
},
|
||||
filter(button,player){
|
||||
|
@ -912,7 +920,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
player.line(target2);
|
||||
game.log(player,'选择了',target2);
|
||||
const skills=target2.getStockSkills(true,true);
|
||||
const skills2=player.getStockSkills(true,true);
|
||||
const skills2=['sbxingshang','sbfangzhu','sbsongwei'];
|
||||
player.changeSkills(skills,skills2);
|
||||
}
|
||||
}
|
||||
|
@ -956,7 +964,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
order(_,player){
|
||||
const info=get.info('sbxingshang');
|
||||
const goon=(player.hasSkill('sbfangzhu')&&!player.getStat('skill').sbfangzhu);
|
||||
let list=Array.from({length:goon?8:4}).map((_,i)=>i+1);
|
||||
let list=Array.from({length:goon?9:4}).map((_,i)=>i+1);
|
||||
list=list.filter(num=>player.countMark('sbxingshang')>=info.getNum(num));
|
||||
list.sort((a,b)=>info.getEffect(player,b)-info.getEffect(player,a));
|
||||
return (Array.from({length:4}).map((_,i)=>i+1).includes(list[0])&&info.getEffect(player,list[0])>0)?1:0;
|
||||
|
@ -971,28 +979,32 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
audio:2,
|
||||
enable:'phaseUse',
|
||||
filter(event,player){
|
||||
return player.countMark('sbxingshang')>1;
|
||||
return player.hasMark('sbxingshang');
|
||||
},
|
||||
usable:1,
|
||||
chooseButton:{
|
||||
dialog(){
|
||||
var dialog=ui.create.dialog('放逐:请选择你要执行的一项','hidden');
|
||||
dialog.add([[
|
||||
[1,'移去2个“颂”标记,令一名其他角色的非Charlotte技能失效直到其回合结束'],
|
||||
[1,'移去1个“颂”标记,令一名其他角色于手牌中只能使用装备牌直到其回合结束'],
|
||||
[2,'移去2个“颂”标记,令一名其他角色的非Charlotte技能失效直到其回合结束'],
|
||||
[2,'移去2个“颂”标记,令一名其他角色不能响应除其外的角色使用的牌直到其回合结束'],
|
||||
[3,'移去3个“颂”标记,令一名其他角色将武将牌翻面'],
|
||||
[4,'移去3个“颂”标记,令一名其他角色只能使用你选择的一种类型的牌直到其回合结束']
|
||||
[4,'移去3个“颂”标记,令一名其他角色于手牌中只能使用装备牌直到其回合结束']
|
||||
],'textbutton']);
|
||||
return dialog;
|
||||
},
|
||||
filter(button,player){
|
||||
if(button.link>2&&player.countMark('sbxingshang')<3) return false;
|
||||
if(button.link==4) return game.hasPlayer(target=>target!=player&&!target.hasSkill('sbfangzhu_ban'));
|
||||
return true;
|
||||
if(player.countMark('sbxingshang')<get.info('sbxingshang').getNum(button.link+4)) return false;
|
||||
return game.hasPlayer(target=>{
|
||||
if(target==player) return false;
|
||||
const num=button.link,storage=target.getStorage('sbfangzhu_ban');
|
||||
return !((num==1&&storage.includes('basic'))||(num==5&&storage.includes('equip')));
|
||||
});
|
||||
},
|
||||
check(button){
|
||||
const player=get.event('player'),info=get.info('sbxingshang');
|
||||
let list=Array.from({length:4}).map((_,i)=>i+1);
|
||||
let list=Array.from({length:5}).map((_,i)=>i+1);
|
||||
list=list.filter(num=>player.countMark('sbxingshang')>=info.getNum(num+4));
|
||||
const num=list.sort((a,b)=>info.getEffect(player,b+4)-info.getEffect(player,a+4))[0]-4;
|
||||
return (button.link==num)?10:0;
|
||||
|
@ -1005,32 +1017,32 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
selectCard:-1,
|
||||
filterTarget(card,player,target){
|
||||
if(target==player) return false;
|
||||
if(lib.skill.sbfangzhu_backup.num==4) return !target.hasSkill('sbfangzhu_ban');
|
||||
return true;
|
||||
const num=lib.skill.sbfangzhu_backup.num,storage=target.getStorage('sbfangzhu_ban');
|
||||
return !((num==1&&storage.includes('basic'))||(num==5&&storage.includes('equip')));
|
||||
},
|
||||
async content(event,trigger,player){
|
||||
const target=event.target;
|
||||
const num=lib.skill.sbfangzhu_backup.num;
|
||||
player.removeMark('sbxingshang',num>2?3:2);
|
||||
player.removeMark('sbxingshang',get.info('sbxingshang').getNum(num+4));
|
||||
switch(num){
|
||||
case 1:
|
||||
target.addTempSkill('sbfangzhu_ban',{player:'phaseEnd'});
|
||||
target.markAuto('sbfangzhu_ban',['basic']);
|
||||
break;
|
||||
case 2:
|
||||
target.removeSkill('baiban');
|
||||
target.addTempSkill('baiban',{player:'phaseEnd'});
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
target.addTempSkill('sbfangzhu_kill',{player:'phaseEnd'});
|
||||
break;
|
||||
case 3:
|
||||
case 4:
|
||||
target.turnOver();
|
||||
break;
|
||||
case 4:
|
||||
const {result:{control}}=await player.chooseControl('basic','trick','equip').set('ai',()=>'equip').set('prompt','放逐:请选择'+get.translation(target)+'仅能使用的类别的牌');
|
||||
if(control){
|
||||
player.line(target);
|
||||
player.popup(get.translation(control)+'牌');
|
||||
case 5:
|
||||
target.addTempSkill('sbfangzhu_ban',{player:'phaseEnd'});
|
||||
target.markAuto('sbfangzhu_ban',[control]);
|
||||
}
|
||||
target.markAuto('sbfangzhu_ban',['equip']);
|
||||
break;
|
||||
}
|
||||
},
|
||||
ai:{
|
||||
|
@ -1038,18 +1050,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
target(player,target){
|
||||
switch(lib.skill.sbfangzhu_backup.num){
|
||||
case 1:
|
||||
let num=0;
|
||||
if(target.name&&lib.character[target.name]) num+=get.rank(target.name,true);
|
||||
if(target.name2&&lib.character[target.name2]) num+=get.rank(target.name2,true);
|
||||
return num;
|
||||
return -target.countCards('h',card=>get.type(card)!='basic')-1;
|
||||
case 2:
|
||||
return 0;
|
||||
return -target.getSkills(null,null,false).reduce((sum,skill)=>{
|
||||
return sum+Math.max(get.skillRank(skill,'out'),get.skillRank(skill,'in'));
|
||||
},0);
|
||||
case 3:
|
||||
return 0;
|
||||
case 4:
|
||||
if(get.attitude(player,target)>0&&target.isTurnedOver()) return 10*target.countCards('hs')+1;
|
||||
if(get.attitude(player,target)<0&&!target.isTurnedOver()) return -5*target.countCards('hs')+1;
|
||||
return 0;
|
||||
case 4:
|
||||
return 0;
|
||||
case 5:
|
||||
return -target.countCards('h',card=>get.type(card)!='equip')-3;
|
||||
}
|
||||
},
|
||||
},
|
||||
|
@ -1060,13 +1073,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
const str='###放逐###';
|
||||
switch(links[0]){
|
||||
case 1:
|
||||
return str+'移去2个“颂”标记,令一名其他角色的非Charlotte技能失效直到其回合结束';
|
||||
return str+'移去1个“颂”标记,令一名其他角色于手牌中只能使用基本牌直到其回合结束';
|
||||
case 2:
|
||||
return str+'移去2个“颂”标记,令一名其他角色不能响应除其外的角色使用的牌直到其回合结束';
|
||||
return str+'移去2个“颂”标记,令一名其他角色的非Charlotte技能失效直到其回合结束';
|
||||
case 3:
|
||||
return str+'移去3个“颂”标记,令一名其他角色将武将牌翻面';
|
||||
return str+'移去2个“颂”标记,令一名其他角色不能响应除其外的角色使用的牌直到其回合结束';
|
||||
case 4:
|
||||
return str+'移去3个“颂”标记,令一名其他角色只能使用你选择的一种类型的牌直到其回合结束';
|
||||
return str+'移去3个“颂”标记,令一名其他角色将武将牌翻面';
|
||||
case 5:
|
||||
return str+'移去3个“颂”标记,令一名其他角色于手牌中只能使用装备牌直到其回合结束';
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -1074,10 +1089,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
order(_,player){
|
||||
const info=get.info('sbxingshang');
|
||||
const goon=(player.hasSkill('sbxingshang')&&!player.getStat('skill').sbxingshang_use);
|
||||
let list=Array.from({length:goon?8:4}).map((_,i)=>i+(goon?1:5));
|
||||
let list=Array.from({length:goon?9:5}).map((_,i)=>i+(goon?1:5));
|
||||
list=list.filter(num=>player.countMark('sbxingshang')>=info.getNum(num));
|
||||
list.sort((a,b)=>info.getEffect(player,b)-info.getEffect(player,a));
|
||||
return (Array.from({length:4}).map((_,i)=>i+5).includes(list[0])&&info.getEffect(player,list[0])>0)?1:0;
|
||||
return (Array.from({length:5}).map((_,i)=>i+5).includes(list[0])&&info.getEffect(player,list[0])>0)?1:0;
|
||||
},
|
||||
result:{player:1},
|
||||
},
|
||||
|
@ -1105,14 +1120,21 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
marktext:'禁',
|
||||
intro:{
|
||||
markcount:()=>0,
|
||||
content:'只能使用$牌',
|
||||
content(storage){
|
||||
if(storage.length>1) return '不能使用手牌';
|
||||
return '于手牌中只能使用'+get.translation(storage[0])+'牌';
|
||||
},
|
||||
},
|
||||
mod:{
|
||||
cardEnabled(card,player){
|
||||
if(!player.getStorage('sbfangzhu_ban').includes(get.type2(card))) return false;
|
||||
const storage=player.getStorage('sbfangzhu_ban');
|
||||
if(get.itemtype(card)=='card'&&get.position(card)!='h') return;
|
||||
if(storage.length>1||!storage.includes(get.type2(card))) return false;
|
||||
},
|
||||
cardSavable(card,player){
|
||||
if(!player.getStorage('sbfangzhu_ban').includes(get.type2(card))) return false;
|
||||
const storage=player.getStorage('sbfangzhu_ban');
|
||||
if(get.itemtype(card)=='card'&&get.position(card)!='h') return;
|
||||
if(storage.length>1||!storage.includes(get.type2(card))) return false;
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -1125,19 +1147,21 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
trigger:{player:'phaseUseBegin'},
|
||||
filter(event,player){
|
||||
if(player.countMark('sbxingshang')>=get.info('sbxngshang').getLimit) return false;
|
||||
return game.hasPlayer(target=>target.group=='wei'&&target!=player);
|
||||
},
|
||||
zhuSkill:true,
|
||||
forced:true,
|
||||
locked:false,
|
||||
async content(event,trigger,player){
|
||||
player.addMark('sbxingshang',game.countPlayer(target=>target.group=='wei'&&target!=player));
|
||||
player.addMark('sbxingshang',Math.min(get.info('sbxngshang').getLimit-player.countMark('sbxingshang'),game.countPlayer(target=>target.group=='wei'&&target!=player)));
|
||||
},
|
||||
subSkill:{
|
||||
delete:{
|
||||
audio:'sbsongwei',
|
||||
enable:'phaseUse',
|
||||
filter(event,player){
|
||||
if(!player.hasSkill('sbsongwei')) return false;
|
||||
return game.hasPlayer(target=>lib.skill.sbsongwei.subSkill.delete.filterTarget(null,player,target));
|
||||
},
|
||||
filterTarget(card,player,target){
|
||||
|
@ -7063,9 +7087,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
sb_caopi:'谋曹丕',
|
||||
sb_caopi_prefix:'谋',
|
||||
sbxingshang:'行殇',
|
||||
sbxingshang_info:'①每回合限一次,当一名角色死亡时或受到伤害时,你获得1个“颂”标记。②出牌阶段限一次,你可以:1.移去1个“颂”标记,令一名角色复原武将牌;2.移去2个“颂”标记,令一名角色摸X张牌(X为场上阵亡角色数,且X至少为1,至多为5);3.移去3个“颂”标记,令一名体力上限小于10的角色加1点体力上限,回复1点体力,随机恢复一个已废除的装备栏;4.移去4个“颂”标记,获得一名阵亡角色武将牌上的所有技能,然后你失去武将牌上的所有技能。',
|
||||
sbxingshang_info:'①当一名角色受到伤害后(每回合限一次)或死亡时,你获得1个“颂”标记(你至多拥有9个“颂”标记)。②出牌阶段限一次,你可以:1.移去1个“颂”标记,令一名角色复原武将牌;2.移去2个“颂”标记,令一名角色摸X张牌(X为场上阵亡角色数,且X至少为1,至多为5);3.移去3个“颂”标记,令一名体力上限小于10的角色加1点体力上限,回复1点体力,随机恢复一个已废除的装备栏;4.移去4个“颂”标记,获得一名阵亡角色武将牌上的所有技能,然后你失去武将牌上的所有技能。',
|
||||
sbfangzhu:'放逐',
|
||||
sbfangzhu_info:'出牌阶段限一次,你可以:1.移去2个“颂”标记,令一名其他角色的非Charlotte技能失效直到其回合结束;2.移去2个“颂”标记,令一名其他角色不能响应除其以外的角色使用的牌直到其回合结束;3.移去3个“颂”标记,令一名其他角色将武将牌翻面;4.移去3个“颂”标记,令一名其他角色只能使用你选择的一种类型的牌直到其回合结束。',
|
||||
sbfangzhu_info:'出牌阶段限一次,你可以:1.移去1个“颂”标记,令一名其他角色于手牌中只能使用基本牌直到其回合结束;2.移去2个“颂”标记,令一名其他角色的非Charlotte技能失效直到其回合结束;3.移去2个“颂”标记,令一名其他角色不能响应除其以外的角色使用的牌直到其回合结束;4.移去3个“颂”标记,令一名其他角色将武将牌翻面;5.移去3个“颂”标记,令一名其他角色于手牌中只能使用装备牌直到其回合结束。',
|
||||
sbsongwei:'颂威',
|
||||
sbsongwei_info:'主公技。①出牌阶段开始时,你获得Y个“颂”标记(Y为场上其他魏势力角色数)。②每局游戏限一次,出牌阶段,你可以令一名其他魏势力角色失去所有武将牌的技能。',
|
||||
sb_xunyu:'谋荀彧',
|
||||
|
|
Loading…
Reference in New Issue