Merge branch 'PR-Branch' of https://github.com/PZ157/noname into PR-Branch

This commit is contained in:
157 2024-04-14 23:27:28 +08:00
commit a199fc777d
7 changed files with 88 additions and 18 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:{
@ -136,6 +142,17 @@ game.import('character', function () {
usable:1,
filterCard:true,
filterTarget:lib.filter.notMe,
check(card){
const round=game.roundNumber,player=get.player();
let valueFix = 0;
if(['sha','shan'].includes(get.name(card,false))) valueFix += 3;
if(round<=2&&player.hasCard(card=>{
return ['sha','shan'].includes(get.name(card))&&get.value(card)<=3;
})||game.hasPlayer(current=>{
return current!==player&&get.attitude(player,current)>0;
})) return 6-get.value(card)+valueFix;
return 4.5-get.value(card)+valueFix;
},
delay:false,
discard:false,
lose:false,
@ -146,9 +163,12 @@ game.import('character', function () {
const result = await player.chooseControl(['摸牌', '弃牌']).set('choiceList', [
`${name}${get.cnNumber(round)}张牌`,
`${name}随机弃置${get.cnNumber(round)}张手牌`
]).set('prompt', '滤心:请选择一项').forResult();
]).set('prompt', '滤心:请选择一项').set('ai', () => {
return get.event('choice');
}).set('choice', get.attitude(player, target) > 0 ? '摸牌' : '弃牌').forResult();
let cards2 = [];
if (result.index === 0) {
const makeDraw = result.index === 0;
if (makeDraw) {
cards2 = await target.draw(round).forResult();
}
else {
@ -164,11 +184,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'],
@ -190,6 +232,21 @@ game.import('character', function () {
content:'下次发动技能时失去#点体力',
},
}
},
ai:{
order:5,
result:{
target(player,target){
const round=game.roundNumber;
if(round<=2&&target.countCards('h')>round*2&&player.getCards('h').some(card=>{
return ['sha','shan'].includes(get.name(card))&&get.value(card)<=3;
})) return 1;
if(get.attitude(player,target)>0){
return round+Math.sqrt(1+target.getDamagedHp());
}
return -(round+Math.sqrt(Math.max(0,2-target.getHp())));
},
}
}
},
huandao:{

View File

@ -16805,7 +16805,7 @@ game.import('character', function () {
zhiyi:'执义',
zhiyi_info:'锁定技当你于一回合内使用或打出第一张基本牌时你选择一项1.摸一张牌。2.于此牌A若此牌是因响应牌B而使用或打出的则改为牌B的使用或打出流程结算完成后视为使用一张与此牌名称和属性相同的卡牌。',
rezhiyi:'执义',
rezhiyi_info:'锁定技一名角色的结束阶段开始时若你本回合内使用或打出过基本牌则你选择一项1.摸一张牌。2.视为使用一张本回合内使用或打出过的基本牌。',
rezhiyi_info:'锁定技一名角色的结束阶段开始时若你本回合内使用或打出过基本牌则你选择一项1.摸一张牌。2.视为使用一张本回合内使用或打出过的基本牌。',
zhongzuo:'忠佐',
zhongzuo_info:'一名角色的结束阶段开始时,若你于此回合内造成或受到过伤害,则你可以令一名角色摸两张牌。若该角色已受伤,则你摸一张牌。',
wanlan:'挽澜',
@ -17419,7 +17419,7 @@ game.import('character', function () {
xin_zhangyi:'手杀界张嶷',
xin_zhangyi_prefix:'手杀界',
xinwurong:'怃戎',
xinwurong_info:'出牌阶段限一次,你可以与一名其他角色进行谋弈:<br><li>若你选择“镇压”且其选择“反抗”你对其造成1点伤害然后你摸一张牌。<br><li>若你选择“安抚”且其选择“归顺”,其须交给你两张牌(若其牌数不足两张,则改为令其跳过其下个摸牌阶段)。<br><li>若你选择“镇压”且其选择“归顺”,你获得其一张牌,然后你交给其两张牌。<br><li>若你选择“安抚”且其选择“反抗”你受到1点伤害然后你摸两张牌。',
xinwurong_info:'出牌阶段限一次,你可以与一名其他角色进行谋弈:<br><li>若你选择“镇压”且其选择“反抗”你对其造成1点伤害然后你摸一张牌。<br><li>若你选择“安抚”且其选择“归顺”,其须交给你两张牌(若其牌数不足两张,则改为令其跳过其下个摸牌阶段)。<br><li>若你选择“镇压”且其选择“归顺”,你获得其一张牌,然后你交给其两张牌。<br><li>若你选择“安抚”且其选择“反抗”你受到1点伤害然后你摸两张牌。',
xin_guozhao:'手杀郭照',
xin_guozhao_prefix:'手杀',
yichong:'易宠',

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

@ -2820,15 +2820,30 @@ game.import('character', function () {
});
return history.length&&history[history.length-1].card.name=='sha';
},
prompt2:(event)=>'令'+get.translation(event.player)+'本回合的手牌上限+1',
prompt2(event,player){
const target = event.player;
const history = target.getHistory('useCard', evt => {
return evt.getParent('phaseUse') === event;
});
const evt = history.lastItem, cards = evt.cards.filterInD('d');
let str = '令' + get.translation(target) + '本回合的手牌上限+1';
if (cards.length) str += `,然后你获得${get.translation(cards)}`;
str += '。';
return str;
},
check:function(event,player){
return get.attitude(player,event.player)>0;
},
content:function(){
var target=trigger.player;
async content(event,trigger,player){
const target = trigger.player;
target.addMark('dcchongyi_keep',1,false);
target.addTempSkill('dcchongyi_keep');
game.delayx();
const history = target.getHistory('useCard', evt => {
return evt.getParent('phaseUse') === trigger;
});
const evt = history.lastItem, cards = evt.cards.filterInD('d');
if (cards.length) await player.gain(cards, 'gain2');
else await game.asyncDelayx();
},
},
sha:{
@ -11584,7 +11599,7 @@ game.import('character', function () {
xiongrao_info:'限定技。准备阶段开始时你可以选择所有其他角色。这些角色本回合内所有不为锁定技、限定技、觉醒技的普通技能失效。然后你将体力上限增加至7点并摸X张牌X为你以此法增加的体力上限数。',
dc_huban:'胡班',
dcchongyi:'崇义',
dcchongyi_info:'①一名角色使用【杀】时,若此牌是其于当前出牌阶段内使用的第一张牌,则你可以令其摸两张牌,且其本回合使用【杀】的次数上限+1。②一名角色的出牌阶段结束时若其于此阶段内使用的最后一张牌为【杀】则你可以令其本回合的手牌上限+1。',
dcchongyi_info:'①一名角色使用【杀】时,若此牌是其于当前出牌阶段内使用的第一张牌,则你可以令其摸两张牌,且其本回合使用【杀】的次数上限+1。②一名角色的出牌阶段结束时若其于此阶段内使用的最后一张牌为【杀】则你可以令其本回合的手牌上限+1,然后你获得此【杀】。',
wangwei:'王威',
dcruizhan:'锐战',
dcruizhan_info:'其他角色的准备阶段开始时,若其的手牌数不小于其体力值,则你可以和其拼点。若你赢或拼点牌中有【杀】,则你视为对其使用一张【杀】。然后若此【杀】造成了伤害且以上两个条件均被满足,则你获得其一张牌。',

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;
},

View File

@ -14552,7 +14552,7 @@ game.import('character', function () {
olsanyao_info:'出牌阶段每项各限一次,你可以弃置一张牌并指定一名体力值或手牌数最多(或之一)的角色并对其造成1点伤害。',
rezhiman_info:'当你对一名其他角色造成伤害时,你可以防止此伤害,然后获得其区域内的一张牌。',
resanyao_info:'出牌阶段限一次,你可以弃置任意张牌并指定等量除你外体力值最多(或之一)的其他角色。你对这些角色依次造成1点伤害。',
paiyi_info:'出牌阶段限一次你可以移去一张“权”并选择一名角色令其摸两张牌然后若其手牌数大于你你对其造成1伤害。',
paiyi_info:'出牌阶段限一次你可以移去一张“权”并选择一名角色令其摸两张牌然后若其手牌数大于你你对其造成1伤害。',
zili_info:'觉醒技准备阶段开始时若“权”的数量不小于3你减1点体力上限然后选择一项1、回复1点体力2、摸两张牌。然后你获得技能“排异”。',
quanji_info:'当你受到1点伤害后你可以摸一张牌然后将一张手牌置于武将牌上称为“权”你的手牌上限+XX为“权”的数量。',
xianzhou_info:'限定技。出牌阶段你可以将装备区内的所有牌交给一名其他角色然后该角色选择一项令你回复X点体力或对其攻击范围内的X名角色各造成1点伤害(X为你以此法交给该角色的牌的数量)。',