Merge branch 'libccy:PR-Branch' into PR-Branch

This commit is contained in:
157 2024-01-15 10:15:02 +08:00 committed by GitHub
commit 8ba04a305d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 14 additions and 18 deletions

View File

@ -411,7 +411,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
equipSkill:true,
forced:true,
trigger:{target:'gift'},
filter:(event,player)=>event.target!=player,
filter:(event,player)=>event.player!=player,
logTarget:'player',
content:()=>{
trigger.deniedGift.add(trigger.card);

View File

@ -658,7 +658,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger:{global:'phaseEnd'},
forced:true,
filter:function(event,player){
return player.getHistory('useCard').length>player.getHp();
return player.getHistory('useCard').length>player.getHp()||player.getHistory('gain').reduce((sum,evt)=>sum+evt.cards.length,0)>player.getHp();
},
content:function*(event,map){
const player=map.player;
@ -1094,7 +1094,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger:{player:['gainAfter','loseAsyncAfter']},
forced:true,
filter:(event,player)=>{
// if(player==_status.currentPhase) return false;
if(event.getParent('phaseDraw',true)) return false;
const evt=player.getHistory('gain')[0];
if(!evt) return false;
@ -1109,8 +1108,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
content:function(){
var hs=player.getCards('h'),cards=trigger.getg(player);
var card=cards.filter(card=>hs.includes(card)).randomGet();
player.addGaintag(card,'dclingkong_tag');
cards=cards.filter(card=>hs.includes(card));
player.addGaintag(cards,'dclingkong_tag');
game.delayx();
},
},
@ -2254,7 +2253,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
logTarget:'player',
content:function(){
var num=trigger.player.countMark('dcshengdu');
player.draw(num);
player.draw(num*trigger.cards.length);
trigger.player.removeMark('dcshengdu',num);
},
}
@ -11468,7 +11467,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
dcguangshi_info:'锁定技。准备阶段若所有其他角色均有“信众”你摸两张牌并失去1点体力。',
dongwan:'董绾',
dcshengdu:'生妒',
dcshengdu_info:'回合开始时你可以选择一名其他角色令其获得1枚“生妒”标记。有“生妒”标记的角色于摸牌阶段得到牌后你摸X张牌然后其移去所有“生妒”标记X为其拥有的“生妒”标记数)。',
dcshengdu_info:'回合开始时你可以选择一名其他角色令其获得1枚“生妒”标记。有“生妒”标记的角色于摸牌阶段得到牌后你摸X张牌然后其移去所有“生妒”标记X为摸牌数乘以其拥有的“生妒”标记数)。',
dcjieling:'介绫',
dcjieling_info:'出牌阶段每种花色限一次你可以将两张花色不同的手牌当无距离限制且无任何次数限制的【杀】使用。然后若此【杀】造成了伤害所有目标角色失去1点体力未造成伤害所有目标角色依次获得1枚“生妒”标记。',
yuanyin:'袁胤',
@ -11514,7 +11513,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
yue_zhoufei_prefix:'乐',
dclingkong:'灵箜',
dclingkong_tag:'箜篌',
dclingkong_info:'锁定技。①游戏开始时,你将所有手牌标记为“箜篌”。②你的“箜篌”牌不计入手牌上限。③当你于一回合内首次于摸牌阶段外得到牌后,系统随机将其中的一张牌标记为“箜篌”。',
dclingkong_info:'锁定技。①游戏开始时,你将所有手牌标记为“箜篌”。②你的“箜篌”牌不计入手牌上限。③当你于一回合内首次于摸牌阶段外得到牌后,你将这些牌标记为“箜篌”。',
dcxianshu:'贤淑',
dcxianshu_info:'出牌阶段你可以将一张“箜篌”正面向上交给一名其他角色然后你摸X张牌X为你与其的体力值之差且至多为5。若此牌为红色且该角色的体力值不大于你则其回复1点体力若此牌为黑色且该角色的体力值不小于你则其失去1点体力。',
dc_zhangmancheng:'张曼成',
@ -11531,7 +11530,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
dccaisi:'才思',
dccaisi_info:'当你于回合内/回合外使用基本牌结算结束后,若你本回合以此法得到的牌数小于你的体力上限,你可以从牌堆/弃牌堆随机获得一张非基本牌,然后本回合下次发动此技能获得的牌数+1。',
dczhuoli:'擢吏',
dczhuoli_info:'锁定技。一名角色的回合结束时,若你本回合使用的牌数大于体力值你加1点体力上限不能超过存活角色数回复1点体力。',
dczhuoli_info:'锁定技。一名角色的回合结束时,若你本回合使用或获得的牌数大于体力值你加1点体力上限不能超过存活角色数回复1点体力。',
yue_caiyong:'乐蔡邕',
yue_caiyong_prefix:'乐',
dcjiaowei:'焦尾',

View File

@ -709,7 +709,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
audio:'sbkanpo',
trigger:{global:'useCard'},
filter:function(event,player){
return event.player!=player&&player.getStorage('sbkanpo').includes(event.card.name);
return event.player!=player&&player.storage.sbkanpo[1].includes(event.card.name);
},
prompt2:function(event,player){
return '移除'+get.translation(event.card.name)+'的记录,令'+get.translation(event.card)+'无效';

View File

@ -451,6 +451,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger:{player:'phaseEnd',global:'die'},
filter:function(event,player){
if(event.name=='phase') return player.hasMark('starpizhi');
if(!player.getStorage('starcanxi_wangsheng').includes(event.player.group)&&!player.getStorage('starcanxi_xiangsi').includes(event.player.group)) return false;
var groups=player.getSkills().filter(skill=>skill.indexOf('starcanxi_')==0);
groups=groups.map(group=>group.slice(10));
return groups.includes(event.player.group);
@ -11181,7 +11182,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
starcanxi_cancel:'向死',
starcanxi_info:'锁定技。游戏开始时,你获得场上所有角色的势力对应的“玺角”标记,然后选择一个“玺角”对应势力并选择以下一项;一轮开始时,你选择一个“玺角”对应势力并选择以下一项:①妄生:本轮被选择势力角色每回合首次造成的伤害+1且计算与其他角色间的距离-1②向死本轮其他被选择势力角色每回合首次回复体力后失去1点体力且每回合对你使用的第一张牌无效。',
starpizhi:'圮秩',
starpizhi_info:'锁定技。①一名角色死亡后,若你拥有该角色对应的“玺角”标记你失去之并摸X张牌。②结束阶段你摸X张牌。X为你本局游戏失去的“玺角”标记数',
starpizhi_info:'锁定技。①一名角色死亡后,若你拥有该角色对应的“玺角”标记且你本轮发动〖向死〗的势力与其相同你失去之并摸X张牌。②结束阶段你摸X张牌。X为你本局游戏失去的“玺角”标记数',
starzhonggu:'冢骨',
starzhonggu_info:'主公技,锁定技。摸牌阶段,若游戏轮数大于等于场上的群势力角色数,则你额外摸两张牌,否则你少摸一张牌。',
star_dongzhuo:'星董卓',

View File

@ -364,12 +364,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
event.target=target;
var list=['cancel2'];
var choiceList=[
'弃置一张手牌,令此【杀】可以额外指定一个目标',
'令此【杀】可以额外指定一个目标',
'弃置其一张手牌,若此【杀】造成伤害,则你摸一张牌且本阶段可以额外使用一张【杀】',
];
if(target.countCards('h')) list.unshift('其弃置');
else choiceList[1]='<span style="opacity:0.5">'+choiceList[1]+'</span>';
if(game.hasPlayer(targetx=>!trigger.targets.includes(targetx)&&player.canUse(trigger.card,targetx))) list.unshift('你弃置');
if(game.hasPlayer(targetx=>!trigger.targets.includes(targetx)&&player.canUse(trigger.card,targetx))) list.unshift('多指');
else choiceList[0]='<span style="opacity:0.5">'+choiceList[0]+'</span>';
player.chooseControl(list).set('choiceList',choiceList).set('ai',()=>{
var controls=_status.event.controls;
@ -377,7 +377,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
var player=trigger.player;
var target=trigger.target;
if(controls.includes('其弃置')&&_status.event.goon) return '其弃置';
if(controls.includes('你弃置')){
if(controls.includes('多指')){
if(game.hasPlayer(targetx=>!trigger.targets.includes(targetx)&&player.canUse(trigger.card,targetx)&&get.effect(targetx,trigger.card,player,player)>0)) return '你弃置';
}
return 'cancel2';

View File

@ -13,10 +13,6 @@ export class VCard {
* @param { string } [nature]
*/
constructor(suitOrCard, numberOrCards, name, nature) {
if (suitOrCard instanceof VCard) {
const other = suitOrCard;
[suitOrCard, numberOrCards, name, nature] = other._args;
}
if (Array.isArray(suitOrCard)) {
/**