This commit is contained in:
copcap 2024-04-14 19:08:38 +08:00
parent 3f7bd95de3
commit 2183af6fc2
No known key found for this signature in database
GPG Key ID: 30E7AB6699451AEE
4 changed files with 36 additions and 9 deletions

View File

@ -188,7 +188,7 @@ game.import('character',function(){
player(player){
if(get.event().dying) return get.attitude(player, get.event().dying);
if(get.event().type!='phase') return 1;
const names=get.event(`clanshengmo_${player.playerid}_enabled_names`);
const names=lib.inpile.filter(name=>get.type(name)=='basic'&&!player.getStorage('clanshengmo').includes(name));
if(Array.isArray(names)){
return names.some(name=>{
return player.getUseValue({name})>0;

View File

@ -123,7 +123,13 @@ game.import('character', function () {
firstDo: true,
}).then(() => delete player.storage.jingyu_used);
}
player.markAuto('jingyu_used', trigger.sourceSkill || trigger.skill);
let skill = trigger.sourceSkill || trigger.skill, info = get.info(skill);
while (true) {
if (info && !info.sourceSkill) break;
skill = info.sourceSkill;
info = get.info(skill);
}
player.markAuto('jingyu_used', skill);
await player.draw();
},
ai:{
@ -148,7 +154,8 @@ game.import('character', function () {
`${name}随机弃置${get.cnNumber(round)}张手牌`
]).set('prompt', '滤心:请选择一项').forResult();
let cards2 = [];
if (result.index === 0) {
const makeDraw = result.index === 0;
if (makeDraw) {
cards2 = await target.draw(round).forResult();
}
else {
@ -164,11 +171,33 @@ game.import('character', function () {
if (cards2.some(card => {
return get.name(card, target) === cardName;
})) {
target.addSkill('lvxin_lose');
target.addMark('lvxin_lose', 1, false);
const skillName = `lvxin_${makeDraw ? 'recover' : 'lose'}`;
target.addSkill(skillName);
target.addMark(skillName, 1, false);
}
},
subSkill:{
recover:{
trigger:{
player:['useSkill','logSkillBegin','useCard','respond'],
},
filter(event,player){
if(['global','equip'].includes(event.type)) return false;
const skill=event.sourceSkill||event.skill;
const info=get.info(skill);
return info&&!info.charlotte;
},
forced:true,
onremove:true,
charlotte:true,
async content(event,trigger,player){
player.loseHp(player.countMark('lvxin_recover'));
player.removeSkill('lvxin_recover');
},
intro:{
content:'下次发动技能时回复#点体力',
},
},
lose:{
trigger:{
player:['useSkill','logSkillBegin','useCard','respond'],

View File

@ -429,7 +429,6 @@ game.import('character', function () {
animate:'giveAuto',
gaintag:['sbquhu'],
}).setContent(lib.skill.sbquhu.addToExpansionMultiple);
debugger
await game.asyncDelay(1.5);
const isMin=minLength>myCards.length;
const sortedList=lose_list.filter(list=>list[0]!=player).sort((a,b)=>{

View File

@ -110,7 +110,7 @@ game.import('character', function () {
sp2_zhangtai:['guozhao','fanyufeng','ruanyu','yangwan','re_panshu'],
sp2_jinse:['caojinyu','re_sunyi','re_fengfangnv','caohua','laiyinger','zhangfen','zhugeruoxue','caoxian','dc_qinghegongzhu','zhugemengxue'],
sp2_yinyu:['zhouyi','luyi','sunlingluan','caoyi'],
sp2_wangzhe:['dc_daxiaoqiao','dc_sp_machao'],
sp2_wangzhe:['dc_daxiaoqiao','dc_sp_machao','sp_zhenji'],
sp2_doukou:['re_xinxianying','huaman','xuelingyun','dc_ruiji','duanqiaoxiao','tianshangyi','malingli','bailingyun'],
sp2_jichu:['zhaoang','dc_liuye','dc_wangyun','yanghong','huanfan','xizheng','lvfan'],
sp2_yuxiu:['dongguiren','dc_tengfanglan','zhangjinyun','zhoubuyi','dc_xujing'],
@ -330,7 +330,7 @@ game.import('character', function () {
cards = await target.chooseToGive(player, true).forResultCards();
}
const card = cards[0];
if (player.getCards('h').contains(card)) {
if (player.getCards('h').includes(card)) {
if (!player.storage.dcwuyou_transfer) player.storage.dcwuyou_transfer = {};
player.storage.dcwuyou_transfer[card.cardid] = viewAs;
player.addGaintag(cards, 'dcwuyou_transfer');
@ -516,7 +516,6 @@ game.import('character', function () {
});
},
forced:true,
usable:1,
logTarget(event,player,triggername,targets){
return targets;
},