From 692d9f8db3e5a9055553f119a335352223fd19c0 Mon Sep 17 00:00:00 2001
From: mengxinzxz <2223529500@qq.com>
Date: Thu, 4 Apr 2024 02:33:43 +0800
Subject: [PATCH 01/35] =?UTF-8?q?=E5=9B=BD=E6=88=98=E5=AE=98=E7=9B=972023?=
=?UTF-8?q?=C2=B72=EF=BC=88=E5=85=88=E4=BB=85=E8=A1=A5=E5=85=85=E6=8A=80?=
=?UTF-8?q?=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
新增
4.纵横捭阖,5.手杀专属,6.日版
---
mode/guozhan.js | 492 +++++++++++++++++++++++++++++++++++++++++++-----
1 file changed, 440 insertions(+), 52 deletions(-)
diff --git a/mode/guozhan.js b/mode/guozhan.js
index 13a282250..7976dffb2 100644
--- a/mode/guozhan.js
+++ b/mode/guozhan.js
@@ -1125,7 +1125,10 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
audio:'fakeyigui',
trigger:{player:'showCharacterAfter'},
filter(event,player){
- return event.toShow.includes('gz_zuoci')&&!player.storage.fakeyigui_init;
+ if(!event.toShow.some(i=>get.character(i,3).includes('fakeyigui'))) return false;
+ return game.getAllGlobalHistory('everything',evt=>{
+ return evt.name=='showCharacter'&&evt.toShow.some(i=>get.character(i,3).includes('fakeyigui'));
+ },event).indexOf(event)==0;
},
forced:true,
locked:false,
@@ -1694,6 +1697,381 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
await target.mayChangeVice();
},
},
+ fakexibing:{
+ audio:'xibing',
+ inherit:'xibing',
+ content(){
+ 'step 0'
+ var num=trigger.player.hp-trigger.player.countCards('h');
+ if(num>0) trigger.player.draw(num);
+ 'step 1'
+ trigger.player.addTempSkill('xibing2');
+ player._xibing=true;
+ if(get.mode()!='guozhan'||player.isUnseen(2)||trigger.player.isUnseen(2)) event.finish();
+ 'step 2'
+ var target=trigger.player;
+ var players1=[player.name1,player.name2];
+ var players2=[target.name1,target.name2];
+ player.chooseButton(2,[
+ '是否暗置自己和'+get.translation(target)+'的各一张武将牌?',
+ '
你的武将牌
',
+ [players1,'character'],
+ ''+get.translation(target)+'的武将牌
',
+ [players2,'character'],
+ ]).set('players',players1).set('complexSelect',true).set('filterButton',function(button){
+ return !get.is.jun(button.link)&&(ui.selected.buttons.length==0)==(_status.event.players.includes(button.link));
+ });
+ 'step 3'
+ if(result.bool){
+ var target=trigger.player;
+ player.hideCharacter(player.name1==result.links[0]?0:1);
+ target.hideCharacter(target.name1==result.links[1]?0:1);
+ player.addTempSkill('xibing3');
+ target.addTempSkill('xibing3');
+ }
+ },
+ },
+ fakechengshang:{
+ audio:'chengshang',
+ trigger:{player:'useCardAfter'},
+ filter(event,player){
+ if(!lib.suit.includes(get.suit(event.card,false))||typeof get.number(event.card)!='number') return false;
+ if(player.getHistory('sourceDamage',evt=>{
+ return evt.card==event.card;
+ }).length) return false;
+ const phsu=event.getParent('phaseUse');
+ if(!phsu||phsu.player!=player) return false;
+ return event.targets.some(i=>i.isEnemyOf(player));
+ },
+ preHidden:true,
+ async content(event,trigger,player){
+ await player.draw();
+ player.tempBanSkill('fakechengshang','phaseUseAfter',false);
+ player.addTempSkill('fakechengshang_effect');
+ player.markAuto('fakechengshang_effect',[[get.suit(trigger.card),get.number(trigger.card),trigger.card.name]]);
+ },
+ subSkill:{
+ effect:{
+ charlotte:true,
+ onremove:true,
+ hiddenCard(player,name){
+ const type=get.type(name);
+ if(type!='basic'&&type!='trick') return false;
+ const storage=player.getStorage('fakechengshang_effect');
+ return lib.card.list.some(list=>{
+ return name==list[2]&&storage.some(card=>{
+ return card[0]==list[0]&&card[1]==list[1]&&card[2]!=list[2];
+ });
+ });
+ },
+ audio:'chengshang',
+ enable:'phaseUse',
+ chooseButton:{
+ dialog(event,player){
+ const storage=player.getStorage('fakechengshang_effect');
+ const list=lib.card.list.filter(list=>{
+ const type=get.type(card[2]);
+ if(type!='basic'&&type!='trick') return false;
+ return storage.some(card=>card[0]==list[0]&&card[1]==list[1]&&card[2]!=list[2]);
+ }).map(card=>[get.translation(type),'',card[2],card[3]]);
+ return ui.create.dialog('承赏',[list,'vcard']);
+ },
+ filter(button,player){
+ return get.event().getParent().filterCard({name:button.link[2],nature:button.link[3]},player,event);
+ },
+ check(button){
+ const player=get.event('player');
+ const card={name:button.link[2],nature:button.link[3]};
+ if(player.countCards('hes',cardx=>cardx.name==card.name)) return 0;
+ return player.getUseValue(card);
+ },
+ backup(links,player){
+ return {
+ audio:'chengshang',
+ filterCard:true,
+ position:'hs',
+ popname:true,
+ precontent(){
+ player.logSkill('fakechengshang_effect');
+ delete event.result.skill;
+ const cardx=event.result.card;
+ const removes=player.getStorage('fakechengshang_effect').filter(card=>{
+ return lib.card.list.some(list=>{
+ return cardx.name==list[2]&&card[0]==list[0]&&card[1]==list[1]&&card[2]!=list[2];
+ });
+ });
+ player.unmarkAuto('fakechengshang_effect',removes);
+ },
+ viewAs:{
+ name:links[0][2],
+ nature:links[0][3],
+ },
+ }
+ },
+ prompt(links,player){
+ return '将一张手牌当作'+(get.translation(links[0][3])||'')+get.translation(links[0][2])+'使用';
+ },
+ },
+ },
+ },
+ },
+ fakezhente:{
+ audio:'zhente',
+ inherit:'zhente',
+ filter(event,player){
+ var color=get.color(event.card),type=get.type(event.card);
+ if(player==event.player||event.player.isDead()||color=='none') return false;
+ return type=='trick'||(type=='basic'&&color=='black');
+ },
+ },
+ fakezhiwei:{
+ audio:'zhiwei',
+ inherit:'zhiwei',
+ content(){
+ 'step 0'
+ player.chooseTarget('请选择【至微】的目标',true,lib.filter.notMe).set('ai',target=>{
+ var att=get.attitude(_status.event.player,target);
+ if(att>0) return 1+att;
+ return Math.random();
+ }).set('prompt2',lib.translate.fakezhiwei_info);
+ 'step 1'
+ if(result.bool){
+ var target=result.targets[0];
+ player.logSkill('fakezhiwei',target);
+ player.storage.fakezhiwei_effect=target;
+ player.addSkill('fakezhiwei_effect');
+ }
+ },
+ subSkill:{
+ effect:{
+ charlotte:true,
+ onremove:true,
+ audio:'zhiwei',
+ trigger:{player:'hideCharacterBefore'},
+ filter(event,player){
+ return get.character(event.toHide,3).includes('fakezhiwei');
+ },
+ forced:true,
+ content(){
+ trigger.cancel();
+ },
+ mark:'character',
+ intro:{content:'已选择$'},
+ group:['fakezhiwei_draw','fakezhiwei_discard','fakezhiwei_gain','fakezhiwei_clear'],
+ },
+ draw:{
+ audio:'zhiwei',
+ trigger:{global:'damageSource'},
+ forced:true,
+ filter(event,player){
+ return event.source==player.storage.fakezhiwei_effect;
+ },
+ logTarget:'source',
+ content(){
+ player.draw();
+ },
+ },
+ discard:{
+ audio:'zhiwei',
+ trigger:{global:'damageEnd'},
+ forced:true,
+ filter(event,player){
+ return event.player==player.storage.fakezhiwei_effect&&player.hasCard(card=>{
+ return _status.connectMode||lib.filter.cardDiscardable(card,player);
+ },'h');
+ },
+ logTarget:'player',
+ content(){
+ player.chooseToDiscard('h',true);
+ },
+ },
+ gain:{
+ audio:'zhiwei',
+ trigger:{
+ player:'loseAfter',
+ global:'loseAsyncAfter',
+ },
+ forced:true,
+ filter(event,player){
+ if(event.type!='discard'||event.getlx===false||event.getParent('phaseDiscard').player!=player||!player.storage.fakezhiwei_effect||!player.storage.fakezhiwei_effect.isIn()) return false;
+ var evt=event.getl(player);
+ return evt&&evt.cards2.filterInD('d').length>0;
+ },
+ logTarget(event,player){
+ return player.storage.fakezhiwei_effect;
+ },
+ content(){
+ if(trigger.delay===false) game.delay();
+ player.storage.fakezhiwei_effect.gain(trigger.getl(player).cards2.filterInD('d'),'gain2');
+ },
+ },
+ clear:{
+ audio:'zhiwei',
+ trigger:{
+ global:'die',
+ player:['hideCharacterEnd','removeCharacterEnd'],
+ },
+ forced:true,
+ filter(event,player){
+ if(event.name=='die') return event.player==player.storage.fakezhiwei_effect;
+ if(event.name=='removeCharacter') return get.character(event.toRemove,3).includes('fakezhiwei');
+ return get.character(event.toHide,3).includes('fakezhiwei');
+ },
+ content(){
+ 'step 0'
+ player.removeSkill('fakezhiwei_effect');
+ if(trigger.name!='die') event.finish();
+ 'step 1'
+ if(get.character(player.name1,3).includes('fakezhiwei')) player.hideCharacter(0);
+ if(get.character(player.name2,3).includes('fakezhiwei')) player.hideCharacter(1);
+ },
+ },
+ },
+ },
+ fakekuangcai:{
+ inherit:'gzrekuangcai',
+ content(){
+ const goon=Boolean(player.getHistory('useCard').length);
+ get.info('rekuangcai').change(player,goon?-1:1);
+ player.when({global:'phaseAfter'}).then(()=>{
+ get.info('rekuangcai').change(player,goon?1:-1);
+ }).vars({goon:goon});
+ },
+ },
+ faketunchu:{
+ audio:'tunchu',
+ trigger:{player:'phaseDrawBegin2'},
+ filter(event,player){
+ return !event.numFixed;
+ },
+ check(event,player){
+ return player.countCards('h')<=2;
+ },
+ locked:false,
+ preHidden:true,
+ content(){
+ trigger.num+=2;
+ player.when(['phaseDrawEnd','phaseDrawSkipped','phaseDrawCancelled'])
+ .filter(evt=>evt==trigger)
+ .then(()=>{
+ var nh=player.countCards('h');
+ if(nh){
+ player.chooseCard('h',[1,Math.min(nh,2)],'将至多两张手牌置于你的武将牌上',true).set('ai',card=>{
+ return 7.5-get.value(card);
+ });
+ }
+ else{
+ player.addTempSkill('faketunchu_effect');
+ event.finish();
+ }
+ })
+ .then(()=>{
+ if(result.bool) player.addToExpansion(result.cards,player,'giveAuto').gaintag.add('faketunchu');
+ })
+ .then(()=>{
+ player.addTempSkill('faketunchu_effect');
+ });
+ },
+ intro:{
+ content:'expansion',
+ markcount:'expansion',
+ },
+ marktext:'粮',
+ onremove(player,skill){
+ var cards=player.getExpansions(skill);
+ if(cards.length) player.loseToDiscardpile(cards);
+ },
+ subSkill:{
+ effect:{
+ charlotte:true,
+ mod:{
+ cardEnabled(card,player){
+ if(card.name=='sha') return false;
+ },
+ },
+ mark:true,
+ intro:{content:'本回合不能使用【杀】'},
+ },
+ },
+ },
+ fakeshuliang:{
+ audio:'shuliang',
+ trigger:{global:'phaseJieshuBegin'},
+ direct:true,
+ filter(event,player){
+ if(!event.player.isFriendOf(player)) return false;
+ return event.player.isIn()&&get.distance(player,event.player)<=player.getExpansions('faketunchu').length;
+ },
+ async cost(event,trigger,player){
+ const {result:{bool,links}}=await player.chooseButton([get.prompt2('fakeshuliang',trigger.player),player.getExpansions('faketunchu')]).set('ai',button=>{
+ if(get.attitude(get.event('player'),get.event().getTrigger().player)<=0) return 0;
+ return 1+Math.random();
+ });
+ event.result={bool:bool,cards:links,targets:[trigger.player]};
+ },
+ content(){
+ player.loseToDiscardpile(event.cards);
+ trigger.player.draw(2);
+ },
+ ai:{combo:'faketunchu'},
+ },
+ fakedujin:{
+ audio:'dujin',
+ inherit:'dujin',
+ filter(event,player){
+ return player.countCards('e')&&!event.numFixed;
+ },
+ content(){
+ trigger.num+=Math.ceil(player.countCards('e')/2);
+ },
+ group:'fakedujin_first',
+ subSkill:{
+ first:{
+ audio:'dujin',
+ trigger:{player:'showCharacterEnd'},
+ filter(event,player){
+ if(game.getAllGlobalHistory('everything',evt=>{
+ return evt.name=='showCharacter'&&evt.toShow.some(i=>get.character(i,3).includes('fakedujin'));
+ },event).indexOf(event)!=0) return false;
+ return game.getAllGlobalHistory('everything',evt=>{
+ return evt.name=='showCharacter'&&evt.player.isFriendOf(player);
+ })[0].player==player;
+ },
+ forced:true,
+ locked:false,
+ content(){
+ player.addMark('xianqu_mark',1);
+ },
+ },
+ },
+ },
+ fakeguishu:{
+ inherit:'hmkguishu',
+ usable:1,
+ },
+ fakeyuanyu:{
+ inherit:'hmkyuanyu',
+ filter(event,player){
+ if(event.num<=0||!event.source) return false;
+ return !event.source.inRange(player);
+ },
+ content(){
+ trigger.num--;
+ },
+ ai:{
+ effect:{
+ target(card,player,target){
+ if(player.hasSkillTag('jueqing',false,target)) return;
+ if(player.inRange(target)) return;
+ const num=get.tag(card,'damage');
+ if(num){
+ if(num>1) return 0.5;
+ return 'zeroplayertarget';
+ }
+ },
+ },
+ },
+ },
//国战典藏2023补充
//吕范
gzdiaodu:{
@@ -16104,6 +16482,24 @@ return event.junling=='junling5'?1:0;});
fakezisui_info:'锁定技。①一名角色被你移除副将后,你将被移除的武将牌称为“异”置于武将牌上。②摸牌阶段,你多摸X张牌。③结束阶段,若X大于你的体力上限,你死亡。(X为你武将牌上的“异”数)',
fakejujian:'举荐',
fakejujian_info:'副将技。①此武将牌计算体力上限时减少半个阴阳鱼。②结束阶段,你可以弃置一张非基本牌并选择一名友方角色,令其选择摸两张牌或回复1点体力,然后其可以变更副将。',
+ fakexibing:'息兵',
+ fakexibing_info:'当一名其他角色在其出牌阶段内使用第一张黑色【杀】或黑色普通锦囊牌指定唯一角色为目标后,你可令该角色将手牌摸至体力值且本回合不能再使用手牌。若你与其均明置了所有武将牌,则你可以暗置你与其各一张武将牌且本回合不能再明置此武将牌。',
+ fakezhente:'贞特',
+ fakezhente_info:'每回合限一次,当你成为其他角色使用普通锦囊牌或黑色基本牌的目标后,你可令使用者选择一项:1.本回合不能再使用与此牌颜色相同的牌;2.令此牌对你无效。',
+ fakezhiwei:'至微',
+ fakezhiwei_info:'你明置此武将牌时,选择一名其他角色。该角色造成伤害后,你摸一张牌,该角色受到伤害后,你随机弃置一张手牌。你弃牌阶段弃置的牌均被该角色获得。该角色死亡时,若你的两个武将牌均明置,你暗置此武将牌。若该角色未死亡,则此武将牌被暗置前,取消之。',
+ fakekuangcai:'狂才',
+ fakekuangcai_info:'锁定技,你于回合内使用牌无距离和次数限制;弃牌阶段开始时,若你本回合内:未使用过牌,则你本回合手牌上限+1;使用过牌但未造成过伤害,则你本回合手牌上限-1。',
+ faketunchu:'屯储',
+ faketunchu_info:'摸牌阶段,你可以额外摸两张牌,然后你将一至两张牌称为“粮”置于武将牌上。若如此做,你本回合不能使用【杀】。',
+ fakeshuliang:'输粮',
+ fakeshuliang_info:'友方角色的结束阶段,若你与其的距离不大于你武将牌上的“粮”数,则你可以移去一张“粮”,然后令其摸两张牌。',
+ fakedujin:'独进',
+ fakedujin_info:'①摸牌阶段,你可以额外摸X张牌(X为你装备区的牌数的一半,向上取整)。②当你首次明置此武将牌时,若你为你们势力第一个明置武将牌的角色,则你获得1个“先驱”标记。',
+ fakeguishu:'鬼术',
+ fakeguishu_info:'出牌阶段限一次,你可以将一张黑桃手牌当作【知己知彼】或【远交近攻】使用。若你本局游戏内已经发动过了〖鬼术〗,则你必须选择与上次不同的选项。',
+ fakeyuanyu:'远域',
+ fakeyuanyu_info:'锁定技,当你受到伤害时,若你不在伤害来源的攻击范围内,则防止此伤害。',
guozhan_default:"国战标准",
guozhan_zhen:"君临天下·阵",
@@ -16530,10 +16926,45 @@ return event.junling=='junling5'?1:0;});
element:{
content:{
hideCharacter:function(){
- 'step 0'
- event.trigger('hideCharacterEnd');
- 'step 1'
- event.trigger('hideCharacterAfter');
+ game.addVideo('hideCharacter',player,num);
+ var skills;
+ switch(num){
+ case 0:
+ if(log!==false) game.log(player,'暗置了主将'+get.translation(player.name1));
+ skills=lib.character[player.name1][3];
+ player.name=player.name2;
+ player.sex=lib.character[player.name2][0];
+ player.classList.add('unseen');
+ break;
+ case 1:
+ if(log!==false) game.log(player,'暗置了副将'+get.translation(player.name2));
+ skills=lib.character[player.name2][3];
+ player.classList.add('unseen2');
+ break;
+ }
+ game.broadcast(function(player,name,sex,num,skills){
+ player.name=name;
+ player.sex=sex;
+ switch(num){
+ case 0:player.classList.add('unseen');break;
+ case 1:player.classList.add('unseen2');break;
+ }
+ for(var i=0;i
Date: Thu, 4 Apr 2024 13:45:48 +0800
Subject: [PATCH 02/35] =?UTF-8?q?=E5=AE=98=E7=9B=97=E7=BE=A4=E6=9D=9C?=
=?UTF-8?q?=E9=A2=84=E3=80=81=E7=8E=8B=E5=87=8C=E3=80=81=E7=8E=8B=E5=9F=BA?=
=?UTF-8?q?=E3=80=81=E4=B8=A5=E9=A2=9C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
mode/guozhan.js | 346 ++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 346 insertions(+)
diff --git a/mode/guozhan.js b/mode/guozhan.js
index 7976dffb2..3fee32e43 100644
--- a/mode/guozhan.js
+++ b/mode/guozhan.js
@@ -2045,6 +2045,75 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
},
},
},
+ fakezhufu:{
+ audio:'spwuku',
+ enable:'phaseUse',
+ filter(event,player){
+ return player.hasCard(card=>{
+ return get.info('fakezhufu').filterCard(card,player);
+ },'he');
+ },
+ filterCard(card,player){
+ return lib.filter.cardDiscardable(card,player)&&!player.getStorage('fakezhufu_effect').includes(get.suit(card));
+ },
+ position:'he',
+ check(card){
+ const player=get.event('player');
+ if(player.hasUseTarget(card,true,true)) return 0;
+ return 5+3*Math.random()-get.value(card);
+ },
+ async content(event,trigger,player){
+ const suit=get.suit(event.cards[0],player);
+ player.addTempSkill('fakezhufu_effect','phaseUseAfter');
+ player.markAuto('fakezhufu_effect',[[suit,false]]);
+ },
+ ai:{
+ order:7,
+ result:{player:1},
+ },
+ subSkill:{
+ effect:{
+ charlotte:true,
+ onremove:true,
+ intro:{
+ content(storage){
+ const suitStorage=storage.slice().sort((a,b)=>lib.suit.indexOf(a[0])-lib.suit.indexOf(b[0]));
+ const suits=suitStorage.reduce((str,list)=>str+get.translation(list[0]),'');
+ const usedSuits=suitStorage.filter(list=>list[1]).reduce((str,list)=>str+get.translation(list[0]),'');
+ let str='';
+ str+='已弃置过的花色:';
+ str+=suits;
+ if(used.length){
+ str+='
已触发过的花色:';
+ str+=usedSuits;
+ }
+ return str;
+ },
+ },
+ audio:'spwuku',
+ trigger:{player:'yingbian'},
+ filter(event,player){
+ return player.getStorage('fakezhufu_effect').some(list=>!list[1]);
+ },
+ forced:true,
+ content(){
+ if(!Array.isArray(trigger.temporaryYingbian)) trigger.temporaryYingbian=[];
+ trigger.forceYingbian=true
+ trigger.temporaryYingbian.addArray(player.getStorage('fakezhufu_effect').filter(list=>{
+ return !list[1];
+ }).map(list=>{
+ return get.info('fakezhufu').YingBianMap[list[0]];
+ }));
+ },
+ },
+ },
+ YingBianMap:{
+ 'heart':'yingbian_zhuzhan',
+ 'diamond':'yingbian_fujia',
+ 'spade':'yingbian_canqu',
+ 'club':'yingbian_kongchao',
+ },
+ },
fakeguishu:{
inherit:'hmkguishu',
usable:1,
@@ -2072,6 +2141,263 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
},
},
},
+ fakemibei:{
+ audio:'mibei',
+ trigger:{player:'phaseZhunbeiBegin'},
+ filter(event,player){
+ return !player.isMaxHandcard();
+ },
+ forced:true,
+ locked:false,
+ async cost(event,trigger,player){
+ const filterTarget=(card,player,target)=>{
+ return target!=player&&target.isMaxHandcard();
+ },targetx=game.filterPlayer(current=>filterTarget(null,player,current));
+ if(targetx.length==1) event.result={bool:true,targets:targetx};
+ else event.result=await player.chooseTarget(filterTarget,true)
+ .set('prompt2',lib.translate.fakemibei_info)
+ .set('prompt','请选择【秘备】的目标').set('ai',target=>{
+ const player=get.event('player');
+ return get.attitude(player,target);
+ }).forResult();
+ },
+ async content(event,trigger,player){
+ const target=event.targets[0];
+ const {result:{junling,targets}}=await target.chooseJunlingFor(player);
+ const {result:{index}}=await player.chooseJunlingControl(target,junling,targets).set('prompt','秘备:是否执行军令?');
+ if(index==0) await player.carryOutJunling(target,junling,targets);
+ },
+ group:'fakemibei_junling',
+ subSkill:{
+ junling:{
+ audio:'mibei',
+ trigger:{player:['carryOutJunlingEnd','chooseJunlingControlEnd']},
+ filter(event,player){
+ if(event.name=='carryOutJunling'){
+ return event.source.countCards('h')>player.countCards('h');
+ }
+ return event.index==1&&player.countCards('h');
+ },
+ forced:true,
+ locked:false,
+ async content(event,trigger,player){
+ if(trigger.name=='carryOutJunling'){
+ const num=Math.min(5,trigger.source.countCards('h')-player.countCards('h'));
+ await player.draw(num);
+ }
+ else{
+ const {result:{bool,cards}}=await player.chooseCard('秘备:展示一至三张手牌,本回合你可以将其中一张牌当作另一张基本牌或普通锦囊牌使用一次',[1,3],true).set('ai',card=>{
+ const player=get.event('player'),goon=_status.currentPhase==player;
+ if(goon) return player.getUseValue(card)/get.value(card);
+ return get.value(card);
+ });
+ if(bool){
+ await player.showCards(cards,get.translation(player)+'发动了【秘备】');
+ player.addGaintag(cards,'fakemibei_effect');
+ player.addTempSkill('fakemibei_effect');
+ }
+ }
+ },
+ },
+ effect:{
+ charlotte:true,
+ onremove(player){
+ player.removeGaintag('fakemibei_effect');
+ },
+ hiddenCard(player,name){
+ const cards=player.getCards('h',card=>card.hasGaintag('fakemibei_effect'));
+ if(cards.length<2) return false;
+ const type=get.type(name);
+ if(type!='basic'&&type!='trick') return false;
+ return cards.slice().map(i=>i.name).includes(name);
+ },
+ audio:'mibei',
+ enable:'phaseUse',
+ chooseButton:{
+ dialog(event,player){
+ const list=player.getCards('h',card=>{
+ const type=get.type(card);
+ if(type!='basic'&&type!='trick') return false;
+ return card.hasGaintag('fakemibei_effect');
+ }).sort((a,b)=>{
+ return lib.inpile.indexOf(a.name)+get.natureList(a,false).reduce((sum,nature)=>{
+ return sum+lib.inpile_nature.indexOf(nature);
+ },0)-lib.inpile.indexOf(b.name)-get.natureList(b,false).reduce((sum,nature)=>{
+ return sum+lib.inpile_nature.indexOf(nature);
+ },0);
+ }).slice().map(card=>[get.translation(type),'',card[2],card[3]]);
+ return ui.create.dialog('秘备',[list,'vcard']);
+ },
+ filter(button,player){
+ return get.event().getParent().filterCard({name:button.link[2],nature:button.link[3]},player,event);
+ },
+ check(button){
+ const player=get.event('player');
+ const card={name:button.link[2],nature:button.link[3]};
+ if(player.countCards('hes',cardx=>cardx.name==card.name)) return 0;
+ return player.getUseValue(card);
+ },
+ backup(links,player){
+ return {
+ audio:'chengshang',
+ filterCard(card,player){
+ const cardx=get.info('fakemibei_effect_backup').viewAs;
+ if(cardx.name==card.name&&cardx.nature==card.nature) return false;
+ return card.hasGaintag('fakemibei_effect');
+ },
+ position:'h',
+ popname:true,
+ precontent(){
+ player.logSkill('fakemibei_effect');
+ delete event.result.skill;
+ player.tempBanSkill('fakemibei_effect',null,false);
+ },
+ viewAs:{
+ name:links[0][2],
+ nature:links[0][3],
+ },
+ }
+ },
+ prompt(links,player){
+ return '将一张“秘备”牌当作'+(get.translation(links[0][3])||'')+get.translation(links[0][2])+'使用';
+ },
+ },
+ },
+ },
+ },
+ fakeqizhi:{
+ audio:'qizhi',
+ inherit:'qizhi',
+ trigger:{player:'useCard'},
+ filter(event,player){
+ if(!event.targets||!event.targets.length) return false;
+ if(_status.currentPhase!=player) return false;
+ if(get.type(event.card)=='equip') return false;
+ return game.hasPlayer(target=>!event.targets.includes(target)&&target.countCards('he')>0);
+ },
+ direct:false,
+ async cost(event,trigger,player){
+ event.result=await player.chooseTarget(get.prompt2('fakeqizhi'),(card,player,target)=>{
+ return !get.event().getTrigger().targets.includes(target)&&target.countCards('he')>0;
+ }).set('ai',target=>{
+ const player=get.event('player');
+ if(target==player) return 2;
+ if(get.attitude(player,target)<=0) return 1;
+ return 0.5;
+ }).forResult();
+ },
+ async content(event,trigger,player){
+ const target=event.targets[0];
+ const {result:{bool,cards}}=await player.discardPlayerCard(target,'he',true);
+ if(get.is.yingbianConditional(trigger.card)&&bool){
+ if(cards.some(i=>get.suit(i,target)==get.suit(trigger.card))){
+ player.when('yingbian')
+ .filter(evt=>evt.card==trigger.card)
+ .then(()=>trigger.forceYingbian=true);
+ }
+ }
+ },
+ },
+ fakejinqu:{
+ audio:2,
+ trigger:{player:'phaseJieshuBegin'},
+ check(event,player){
+ return player.getHistory('useSkill',evt=>{
+ return evt.skill=='fakeqizhi';
+ }).length>=player.countCards('h');
+ },
+ prompt2(event,player){
+ const num=player.getHistory('useSkill',evt=>evt.skill=='fakeqizhi').length;
+ return '摸两张牌,然后将手牌弃置至'+get.cnNumber(num)+'张';
+ },
+ content(){
+ 'step 0'
+ player.draw(2);
+ 'step 1'
+ var dh=player.countCards('h')-player.getHistory('useSkill',evt=>{
+ return evt.skill=='fakeqizhi';
+ }).length;
+ if(dh>0) player.chooseToDiscard(dh,true);
+ },
+ ai:{combo:'fakeqizhi'},
+ },
+ fakejuzhan:{
+ zhuanhuanji:true,
+ locked:false,
+ marktext:'☯',
+ intro:{
+ content(storage){
+ if(storage) return '当你使用【杀】指定目标后,你可以获得其X张牌,然后若你的武将牌均明置,则其可以暗置此武将牌,且你本回合不能明置此武将牌(X为你已损失的体力值且至少为1)';
+ return '当你成为【杀】的目标后,你可以与其各摸X张牌,然后其武将牌均明置,则你可以暗置其一张武将牌,且其本回合不能明置此武将牌(X为其已损失的体力值且至少为1)';
+ },
+ },
+ audio:'nzry_juzhan_1',
+ trigger:{
+ player:'useCardToPlayered',
+ target:'useCardToTargeted',
+ },
+ filter(event,player){
+ const storage=player.storage.fakejuzhan;
+ if((event.player==player)!=Boolean(storage)) return false;
+ if(storage&&!event.target.countCards('he')) return false;
+ return true;
+ },
+ logTarget(event,player){
+ const storage=player.storage.fakejuzhan;
+ return event[Boolean(storage)?'target':'player'];
+ },
+ async content(event,trigger,player){
+ const storage=player.storage.fakejuzhan;
+ player.changeZhuanhuanji('fakejuzhan');
+ const target=trigger[Boolean(storage)?'target':'player'];
+ const num=Math.max(target.getDamagedHp(),1);
+ if(!storage){
+ await player.draw(num,'nodelay');
+ await target.draw(num);
+ if(!target.isUnseen(2)){
+ const {result:{bool,links}}=await player.chooseButton([
+ '拒战:是否暗置'+get.translation(target)+'的一张武将牌?',
+ ''+get.translation(target)+'的武将牌
',
+ [[target.name1,target.name2],'character'],
+ ]).set('filterButton',button=>!get.is.jun(button.link));
+ if(bool){
+ await target.hideCharacter(target.name1==links[0]?0:1);
+ target.addTempSkill('donggui2');
+ }
+ }
+ }
+ else{
+ await player.gainPlayerCard(target,num,'he',true);
+ const names=[player.name1,player.name2].filter(i=>{
+ return get.character(i,3).includes('fakejuzhan');
+ });
+ if(!player.isUnseen(2)&&names.length){
+ const {result:{bool,links}}=await target.chooseBool('拒战:是否暗置'+get.translation(player)+'的'+(names.includes(player.name1)?'主将':'')+(names.length>1?'和':'')+(names.includes(player.name2)?'副将':'')+'?');
+ if(bool){
+ if(names.includes(player.name1)) await player.hideCharacter(0);
+ if(names.includes(player.name2)) await player.hideCharacter(1);
+ player.addTempSkill('donggui2');
+ }
+ }
+ }
+ },
+ group:'fakejuzhan_mark',
+ subSkill:{
+ mark:{
+ charlotte:true,
+ trigger:{player:['hideCharacterEnd','showCharacterEnd']},
+ filter(event,player){
+ return get.character(event[event.name=='hideCharacter'?'toHide':'toShow'],3).includes('fakejuzhan');
+ },
+ forced:true,
+ popup:false,
+ firstDo:true,
+ content(){
+ player[(trigger.name=='hideCharacter'?'un':'')+'markSkill']('fakejuzhan');
+ },
+ },
+ },
+ },
//国战典藏2023补充
//吕范
gzdiaodu:{
@@ -15819,6 +16145,16 @@ return event.junling=='junling5'?1:0;});
gzshiyong:function(player){
return player.awakenedSkills.includes('gzyaowu')?lib.translate.gzshiyongx_info:lib.translate.gzshiyong_info;
},
+ fakejuzhan(player){
+ let str='转换技。',storage=player.storage.fakejuzhan;
+ if(!storage) str+='';
+ str+='阴:当你成为【杀】的目标后,你可以与使用者各摸X张牌,然后若使用者的武将牌均明置,则你可以暗置其一张武将牌,且其本回合不能明置此武将牌。';
+ if(!storage) str+='';
+ if(storage) str+='';
+ str+='阳,当你使用【杀】指定目标后,你可以获得目标角色的X张牌,然后若你的武将牌均明置,则其可以暗置此武将牌,且你本回合不能明置此武将牌。';
+ if(storage) str+='';
+ return str+'(X为使用者已损失的体力值且X至少为1)';
+ },
},
translate:{
ye:'野',
@@ -16496,10 +16832,20 @@ return event.junling=='junling5'?1:0;});
fakeshuliang_info:'友方角色的结束阶段,若你与其的距离不大于你武将牌上的“粮”数,则你可以移去一张“粮”,然后令其摸两张牌。',
fakedujin:'独进',
fakedujin_info:'①摸牌阶段,你可以额外摸X张牌(X为你装备区的牌数的一半,向上取整)。②当你首次明置此武将牌时,若你为你们势力第一个明置武将牌的角色,则你获得1个“先驱”标记。',
+ fakezhufu:'注傅',
+ fakezhufu_info:'出牌阶段,你可以弃置一张本阶段未以此法弃置过的花色的牌,然后根据此牌的花色为你使用的下一张牌添加对应的应变效果(无视条件触发):红桃——助战;方片——富甲;黑桃——残躯;草花——空巢。',
fakeguishu:'鬼术',
fakeguishu_info:'出牌阶段限一次,你可以将一张黑桃手牌当作【知己知彼】或【远交近攻】使用。若你本局游戏内已经发动过了〖鬼术〗,则你必须选择与上次不同的选项。',
fakeyuanyu:'远域',
fakeyuanyu_info:'锁定技,当你受到伤害时,若你不在伤害来源的攻击范围内,则防止此伤害。',
+ fakemibei:'秘备',
+ fakemibei_info:'①准备阶段,若你的手牌数不为全场最多,则你须选择一名手牌数为全场最多的角色,令其对你发起军令。②当你执行军令后,你将手牌数摸至与发起者相同(至多摸五张)。③当你拒绝执行军令后,你展示一至三张牌,然后你本回合可以将其中一张牌当作另一张基本牌或非延时锦囊牌使用一次。',
+ fakeqizhi:'奇制',
+ fakeqizhi_info:'当你于回合内使用非装备牌A时,你可以弃置不是此牌目标的一名角色的一张牌B,然后其摸一张牌。若A具有应变效果,且A和B的花色相同,则你无视条件触发A的应变效果。',
+ fakejinqu:'进趋',
+ fakejinqu_info:'结束阶段,你可以摸两张牌,然后你将手牌弃置至X张(X为你本回合发动过〖奇制〗的次数)。',
+ fakejuzhan:'拒战',
+ fakejuzhan_info:'转换技。阴:当你成为【杀】的目标后,你可以与使用者各摸X张牌,然后若使用者的武将牌均明置,则你可以暗置其一张武将牌,且其本回合不能明置此武将牌。阳,当你使用【杀】指定目标后,你可以获得目标角色的X张牌,然后若你的武将牌均明置,则其可以暗置此武将牌,且你本回合不能明置此武将牌。(X为使用者已损失的体力值且X至少为1)',
guozhan_default:"国战标准",
guozhan_zhen:"君临天下·阵",
From 726a6253d64e4e97673f56cb1ba23bc82f8b3811 Mon Sep 17 00:00:00 2001
From: mengxinzxz <2223529500@qq.com>
Date: Thu, 4 Apr 2024 16:10:24 +0800
Subject: [PATCH 03/35] =?UTF-8?q?=E5=9B=BD=E6=88=98=E9=AB=98=E9=A1=BA?=
=?UTF-8?q?=E3=80=81=E5=9B=BD=E6=88=98=E6=9C=B1=E7=84=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
mode/guozhan.js | 247 +++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 246 insertions(+), 1 deletion(-)
diff --git a/mode/guozhan.js b/mode/guozhan.js
index 3fee32e43..d94818655 100644
--- a/mode/guozhan.js
+++ b/mode/guozhan.js
@@ -1513,7 +1513,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
return ui.create.dialog('###怀异###'+get.translation('fakehuaiyi_info'));
},
chooseControl(event,player){
- var list=[],map={'h':'手牌区','e':'装备区','j':'判定区'};
+ let list=[],map={'h':'手牌区','e':'装备区','j':'判定区'};
list.addArray(['h','e','j'].filter(pos=>{
return player.getCards(pos).every(card=>lib.filter.cardDiscardable(card,player));
}).map(i=>map[i]));
@@ -2149,6 +2149,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
},
forced:true,
locked:false,
+ preHidden:true,
async cost(event,trigger,player){
const filterTarget=(card,player,target)=>{
return target!=player&&target.isMaxHandcard();
@@ -2398,6 +2399,244 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
},
},
},
+ fakedanshou:{
+ audio:'mobiledanshou',
+ trigger:{global:'phaseZhunbeiBegin'},
+ filter(event,player){
+ return ['h','e','j'].some(pos=>player.getCards(pos).every(card=>lib.filter.cardDiscardable(card,player)));
+ },
+ async cost(event,trigger,player){
+ let list=[],map={'h':'手牌区','e':'装备区','j':'判定区'};
+ list.addArray(['h','e','j'].filter(pos=>{
+ return player.getCards(pos).every(card=>lib.filter.cardDiscardable(card,player));
+ }).map(i=>map[i]));
+ list.push('cancel2');
+ const {result:{control}}=await player.chooseControl(list).set('prompt',get.prompt2('fakedanshou',trigger.player)).set('ai',()=>{
+ const player=get.event().player,controls=get.event().controls.slice();
+ if(controls.includes('判定区')) return '判定区';
+ if(controls.includes('装备区')&&player.countCards('e')<3) return '装备区';
+ if(controls.includes('手牌区')&&player.countCards('e')<5) return '手牌区';
+ return 'cancel2';
+ });
+ event.result={bool:(control!='cancel2'),cost_data:control};
+ },
+ round:1,
+ logTarget:'player',
+ async content(event,trigger,player){
+ player.popup(event.cost_data);
+ await player.discard(player.getCards({'手牌区':'h','装备区':'e','判定区':'j'}[event.cost_data]));
+ player.addTempSkill('fakedanshou_effect');
+ player.addMark('fakedanshou_effect',1,false);
+ },
+ subSkill:{
+ effect:{
+ charlotte:true,
+ onremove(player){
+ delete player.storage.fakedanshou_effect;
+ delete player._fakedanshou_effect;
+ },
+ audio:'mobiledanshou',
+ trigger:{global:['phaseJudgeBegin','phaseDrawBegin','phaseUseBegin','phaseDiscardBegin']},
+ async cost(event,trigger,player){
+ const {result:{control}}=await player.chooseControl('摸牌','增加摸牌数').set('prompt','胆守:请选择一项').set('ai',()=>{
+ const player=get.event().player,trigger=get.event().getTrigger();
+ if(trigger.name=='phaseJudge') return '增加摸牌数';
+ if(trigger.name=='phaseDiscard') return '摸牌';
+ if(trigger.name=='phaseDraw'){
+ if(get.damageEffect(trigger.player,player,player)>0){
+ player._fakedanshou_effect=true;
+ return '增加摸牌数';
+ }
+ }
+ return player._fakedanshou_effect?'增加摸牌数':'摸牌';
+ });
+ event.result={bool:true,cost_data:control};
+ },
+ logTarget:'player',
+ async content(event,trigger,player){
+ if(event.cost_data=='增加摸牌数'){
+ player.addMark('fakedanshou_effect',1,false);
+ }
+ else{
+ const num=player.countMark('fakedanshou_effect');
+ await player.draw(num);
+ if(num>=4){
+ const {result:{bool}}=await player.chooseBool('胆守:是否对'+get.translation(trigger.player)+'造成1点伤害?').set('choice',get.damageEffect(trigger.player,player,player)>0);
+ if(bool){
+ player.line(trigger.player);
+ await trigger.player.damage();
+ }
+ }
+ }
+ },
+ },
+ },
+ },
+ fakexunxi:{
+ trigger:{global:'showCharacterEnd'},
+ filter(event,player){
+ const card=new lib.element.VCard({name:'sha'});
+ return event.player!=player&&event.player!=_status.currentPhase&&player.canUse(card,event.player,false);
+ },
+ check(event,player){
+ const card=new lib.element.VCard({name:'sha'});
+ return get.effect(event.player,card,player,player)>0;
+ },
+ logTarget:'player',
+ async content(event,trigger,player){
+ const card=new lib.element.VCard({name:'sha'});
+ await player.useCard(card,trigger.player,false);
+ },
+ },
+ fakehuanjia:{
+ trigger:{
+ player:'useCardToPlayered',
+ target:'useCardToTargeted',
+ },
+ filter(event,player){
+ if(event.card.name!='sha') return false;
+ if(event.target==player){
+ if(player.getStorage('fakehuanjia_used').includes(2)) return false;
+ return event.player.getEquips(2).length;
+ }
+ if(event.targets.length!=1) return false;
+ if(player.getStorage('fakehuanjia_used').includes(1)) return false;
+ return event.target.getEquips(1).length;
+ },
+ logTarget(event,player){
+ return event.target==player?event.player:event.target;
+ },
+ forced:true,
+ async content(event,trigger,player){
+ player.addTempSkill('fakehuanjia_used');
+ if(trigger.target==player){
+ player.markAuto('fakehuanjia_used',[2]);
+ if(!player.getEquips(2).length&&player.hasEmptySlot(2)){
+ player.addSkill('fakehuanjia_equip2');
+ player.markAuto('fakehuanjia_equip2',[trigger.player]);
+ player.when({global:'phaseAfter',player:['equipEnd','disableEquipEnd','die']})
+ .filter((evt,player)=>{
+ if(evt.name=='phase'||evt.name=='die') return true;
+ if(evt.name=='discardEquip') return !player.hasEmptySlot(2);
+ return get.type(evt.card)=='equip2';
+ })
+ .then(()=>player.removeSkill('fakehuanjia_equip2'));
+ const cards=trigger.player.getEquips(2);
+ if(cards.length){
+ const skills=cards.reduce((list,card)=>{
+ if(get.info(card)&&get.info(card).skills) list.addArray(get.info(card).skills);
+ return list;
+ },[]);
+ if(skills.length) player.addAdditionalSkill('fakehuanjia_equip2',skills);
+ }
+ }
+ }
+ else{
+ player.markAuto('fakehuanjia_used',[1]);
+ if(!player.getEquips(1).length&&player.hasEmptySlot(1)){
+ player.addSkill('fakehuanjia_equip1');
+ player.markAuto('fakehuanjia_equip1',[trigger.target]);
+ player.when({global:'phaseAfter',player:['equipEnd','disableEquipEnd','die']})
+ .filter((evt,player)=>{
+ if(evt.name=='phase'||evt.name=='die') return true;
+ if(evt.name=='discardEquip') return !player.hasEmptySlot(1);
+ return get.type(evt.card)=='equip1';
+ })
+ .then(()=>player.removeSkill('fakehuanjia_equip1'));
+ const cards=trigger.target.getEquips(1);
+ if(cards.length){
+ const skills=cards.reduce((list,card)=>{
+ if(get.info(card)&&get.info(card).skills) list.addArray(get.info(card).skills);
+ return list;
+ },[]);
+ if(skills.length) player.addAdditionalSkill('fakehuanjia_equip1',skills);
+ }
+ }
+ }
+ },
+ subSkill:{
+ used:{
+ charlotte:true,
+ onremove:true,
+ },
+ equip1:{
+ charlotte:true,
+ onremove:true,
+ mark:true,
+ marktext:'攻',
+ mod:{
+ attackRange(player,num){
+ const targets=player.getStorage('fakehuanjia_equip1').filter(i=>i.isIn());
+ return num+targets.reduce((sum,target)=>{
+ return sum+target.getEquipRange();
+ },0);
+ },
+ },
+ intro:{content:'视为装备$的武器'},
+ trigger:{global:['loseAfter','equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter','die']},
+ filter(event,player){
+ return game.hasPlayer(target=>{
+ if(!player.getStorage('fakehuanjia_equip1').includes(target)) return false;
+ if(event.name=='die'&&event.player==target) return true;
+ if(event.name=='equip'&&event.player==target) return get.subtype(event.card)=='equip1';
+ const evt=event.getl(target);
+ return evt&&evt.player==target&&evt.es&&evt.es.some(i=>get.subtype(i)=='equip1');
+ });
+ },
+ forced:true,
+ popup:false,
+ content(){
+ const targets=player.getStorage('fakehuanjia_equip1').filter(i=>i.isIn());
+ const skills=targets.reduce((list,target)=>{
+ const cards=target.getEquips(1);
+ if(cards.length){
+ const skills=cards.reduce((listx,card)=>{
+ if(get.info(card)&&get.info(card).skills) listx.addArray(get.info(card).skills);
+ return listx;
+ },[]);
+ if(skills.length) list.addArray(skills);
+ }
+ return list;
+ },[]);
+ player.addAdditionalSkill('fakehuanjia_equip1',skills);
+ },
+ },
+ equip2:{
+ charlotte:true,
+ onremove:true,
+ mark:true,
+ marktext:'防',
+ intro:{content:'视为装备$的防具'},
+ trigger:{global:['loseAfter','equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','addToExpansionAfter','die']},
+ filter(event,player){
+ return game.hasPlayer(target=>{
+ if(!player.getStorage('fakehuanjia_equip2').includes(target)) return false;
+ if(event.name=='die'&&event.player==target) return true;
+ if(event.name=='equip'&&event.player==target) return get.subtype(event.card)=='equip2';
+ const evt=event.getl(target);
+ return evt&&evt.player==target&&evt.es&&evt.es.some(i=>get.subtype(i)=='equip2');
+ });
+ },
+ forced:true,
+ popup:false,
+ content(){
+ const targets=player.getStorage('fakehuanjia_equip2').filter(i=>i.isIn());
+ const skills=targets.reduce((list,target)=>{
+ const cards=target.getEquips(2);
+ if(cards.length){
+ const skills=cards.reduce((listx,card)=>{
+ if(get.info(card)&&get.info(card).skills) listx.addArray(get.info(card).skills);
+ return listx;
+ },[]);
+ if(skills.length) list.addArray(skills);
+ }
+ return list;
+ },[]);
+ player.addAdditionalSkill('fakehuanjia_equip2',skills);
+ },
+ },
+ },
+ },
//国战典藏2023补充
//吕范
gzdiaodu:{
@@ -16846,6 +17085,12 @@ return event.junling=='junling5'?1:0;});
fakejinqu_info:'结束阶段,你可以摸两张牌,然后你将手牌弃置至X张(X为你本回合发动过〖奇制〗的次数)。',
fakejuzhan:'拒战',
fakejuzhan_info:'转换技。阴:当你成为【杀】的目标后,你可以与使用者各摸X张牌,然后若使用者的武将牌均明置,则你可以暗置其一张武将牌,且其本回合不能明置此武将牌。阳,当你使用【杀】指定目标后,你可以获得目标角色的X张牌,然后若你的武将牌均明置,则其可以暗置此武将牌,且你本回合不能明置此武将牌。(X为使用者已损失的体力值且X至少为1)',
+ fakedanshou:'胆守',
+ fakedanshou_info:'每轮限一次,一名角色的准备阶段,你可以弃置一个区域的所有牌。若如此做,本回合其每个阶段开始时(准备阶段和结束阶段除外),你摸一张牌或令本回合以此法摸牌数+1,然后若你选择了摸牌且你本次至少摸了四张牌,则你可以对其造成1点伤害。',
+ fakexunxi:'迅析',
+ fakexunxi_info:'其他角色于回合外明置武将牌时,你可以视为对其使用一张【杀】(无距离限制)。',
+ fakehuanjia:'擐甲',
+ fakehuanjia_info:'锁定技,每回合每项各限一次。①当你成为【杀】的目标后,本回合你视为装备此牌使用者的防具,直到你的装备区中有防具。②当你使用【杀】指定唯一目标后,本回合你视为装备目标角色的武器,直到你的装备区中有武器。',
guozhan_default:"国战标准",
guozhan_zhen:"君临天下·阵",
From 31cac2e9b3d19d656f4d7162d02e98eee9714974 Mon Sep 17 00:00:00 2001
From: mengxinzxz <2223529500@qq.com>
Date: Thu, 4 Apr 2024 21:30:23 +0800
Subject: [PATCH 04/35] =?UTF-8?q?=E5=9B=BD=E6=88=98=E8=B4=BE=E5=85=85?=
=?UTF-8?q?=E3=80=81=E7=BE=8A=E7=A5=9C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
mode/guozhan.js | 238 ++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 238 insertions(+)
diff --git a/mode/guozhan.js b/mode/guozhan.js
index d94818655..3d73d8658 100644
--- a/mode/guozhan.js
+++ b/mode/guozhan.js
@@ -2637,6 +2637,226 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
},
},
},
+ fakexiongshu:{
+ audio:'xiongshu',
+ trigger:{global:'useCardToPlayered'},
+ filter(event,player){
+ if(!event.isFirstTarget) return false;
+ if(event.player==player&&game.countPlayer()<2) return false;
+ if(event.player!=player&&!player.countDiscardableCards(player,'he')) return false;
+ return event.card.name=='sha'||(get.type(event.card)=='trick'&&get.tag(event.card,'damage'));
+ },
+ check(event,player){
+ if(event.player==player){
+ if(event.targets.some(i=>i.hasSkill('gzduanchang'))) return true;
+ return !event.targets.some(i=>i.getHp()==1&&!i.hasSkill('gzbuqu')&&i.isEnemyOf(player));
+ }
+ if(event.targets.some(i=>i.hasSkill('gzduanchang'))) return false;
+ return event.targets.some(i=>i.getHp()==1&&!i.hasSkill('gzbuqu')&&i.isEnemyOf(player));
+ },
+ usable:1,
+ async content(event,trigger,player){
+ if(trigger.player==player){
+ await player.draw();
+ const {result:{bool,targets}}=await player.chooseTarget('令一名其他角色成为'+get.translation(trigger.card)+'的伤害来源',true,lib.filter.notMe).set('ai',target=>{
+ const player=get.event('player'),targets=get.event().getTrigger().targets;
+ const goon=(player.hasSkill('fakejianhui')&&targets.some(i=>i!=target&&i.isFriendOf(target)));
+ return targets.reduce((sum,i)=>sum+get.damageEffect(i,target,player),0)*(goon?3:1);
+ });
+ if(bool){
+ const target=targets[0];
+ player.line(target);
+ game.log(target,'成为了',trigger.card,'的伤害来源');
+ trigger.getParent().customArgs.default.customSource=target;
+ }
+ }
+ else{
+ await player.chooseToDiscard('he',true);
+ game.log(player,'成为了',trigger.card,'的伤害来源');
+ trigger.getParent().customArgs.default.customSource=player;
+ }
+ },
+ },
+ fakejianhui:{
+ audio:'jianhui',
+ trigger:{global:'damageSource'},
+ filter(event,player){
+ if(!event.source||!event.player||!event.source.isIn()||!event.player.isIn()) return false;
+ return event.source.isFriendOf(event.player)&&[event.source,event.player].some(target=>target.countCards('he'));
+ },
+ async cost(event,player){
+ event.result=await player.chooseTarget(get.prompt('fakejianhui'),(card,player,target)=>{
+ const trigger=get.event().getTrigger();
+ if(!(trigger.source==target&&trigger.player==target)) return false;
+ if(!ui.selected.targets.length) return true;
+ return target.countCards('he');
+ },2).set('targetprompt',['摸牌','拆牌']).set('ai',target=>{
+ const player=get.event('player'),trigger=get.event().getTrigger();
+ const source=trigger.source,playerx=trigger.player;
+ const min=-Math.min(get.effect(source,{name:'draw'},player,player),get.effect(playerx,{name:'draw'},player,player));
+ const max=Math.max(get.effect(source,{name:'guohe_copy'},player,player),get.effect(playerx,{name:'guohe_copy'},player,player));
+ if(min>max) return 0;
+ if(!ui.selected.targets.length) return -1/Math.min(get.effect(target,{name:'draw'},player,player),-0.001);
+ return get.effect(target,{name:'guohe_copy'},player,player);
+ }).set('complexSelect',true).set('complexTarget',true).forResult();
+ },
+ popup:false,
+ async content(event,trigger,player){
+ player.logSkill('fakejianhui',event.targets,false);
+ player.line2(event.targets);
+ await event.targets[0].draw();
+ await player.discardPlayerCard(event.targets[1],'he',true);
+ },
+ },
+ fakechongxin:{
+ audio:'chongxin',
+ enable:'phaseUse',
+ filter(event,player){
+ const card=new lib.element.VCard({name:'yiyi'});
+ return lib.filter.targetEnabled2(card,player,player)&&game.hasPlayer(target=>{
+ return lib.filter.targetEnabled2(card,player,target)&&target.isEnemyOf(player);
+ });
+ },
+ filterTarget(cardx,player,target){
+ const card=new lib.element.VCard({name:'yiyi'});
+ return lib.filter.targetEnabled2(card,player,target)&&target.isEnemyOf(player);
+ },
+ usable:1,
+ async content(event,trigger,player){
+ const card=new lib.element.VCard({name:'yiyi'});
+ await player.useCard(card,[player].concat(event.targets),false);
+ },
+ ai:{
+ order(item,player){
+ return get.order({name:'yiyi'},player)+0.1;
+ },
+ result:{
+ target(player,target){
+ const card=new lib.element.VCard({name:'yiyi'});
+ const num=get.sgn(get.attitude(player,target));
+ return num*(get.effect(player,card,player,player)-get.effect(target,card,player,player));
+ },
+ },
+ },
+ },
+ fakeweirong:{
+ zhuanhuanji:true,
+ locked:false,
+ marktext:'☯',
+ intro:{
+ content(storage){
+ if(storage) return '出牌阶段,你可以摸X张牌,然后当你于本轮不因此法失去牌后,你弃置一张牌。(X为你上一轮以此法摸和弃置的牌数之和,且X至少为1,至多为你的体力上限)';
+ return '出牌阶段,你可以弃置X张牌,然后当你于本轮不因此法得到牌后,你摸一张牌。(X为你上一轮以此法摸和弃置的牌数之和,且X至少为1,至多为你的体力上限)';
+ },
+ },
+ audio:'weishu',
+ enable:'phaseUse',
+ filter(event,player){
+ if(!get.info('fakeweirong').getNum(player)) return false;
+ const storage=player.storage.fakeweirong;
+ return storage||player.countCards('he',card=>lib.filter.cardDiscardable)>=get.info('fakeweirong').getNum(player);
+ },
+ filterCard(card,player){
+ return !Boolean(player.storage.fakeweirong)&&lib.filter.cardDiscardable(card,player);
+ },
+ selectCard(){
+ const player=get.event('player');
+ return player.storage.fakeweirong?-1:get.info('fakeweirong').getNum(player);
+ },
+ check(card){
+ return 7.5-get.value(card);
+ },
+ prompt(){
+ const player=get.event('player');
+ const num=get.info('fakeweirong').getNum(player);
+ if(player.storage.fakeweirong) return '摸张'+get.cnNumber(num)+'牌,然后当你于本轮不因此法失去牌后,你弃置一张牌';
+ return '弃置张'+get.cnNumber(num)+'牌,然后当你于本轮不因此法得到牌后,你摸一张牌';
+ },
+ round:1,
+ async content(event,trigger,player){
+ const storage=player.storage.fakeweirong;
+ player.changeZhuanhuanji('fakeweirong');
+ if(storage) await player.draw(get.info('fakeweirong').getNum(player));
+ player.addTempSkill('fakeweirong_'+(storage?'lose':'gain'),'roundStart');
+ },
+ ai:{
+ order(item,player){
+ const storage=player.storage.fakeweirong;
+ return storage?0.01:9;
+ },
+ result:{player:1},
+ },
+ group:'fakeweirong_mark',
+ subSkill:{
+ mark:{
+ charlotte:true,
+ trigger:{player:['hideCharacterEnd','showCharacterEnd']},
+ filter(event,player){
+ return get.character(event[event.name=='hideCharacter'?'toHide':'toShow'],3).includes('fakeweirong');
+ },
+ forced:true,
+ popup:false,
+ firstDo:true,
+ content(){
+ player[(trigger.name=='hideCharacter'?'un':'')+'markSkill']('fakeweirong');
+ },
+ },
+ gain:{
+ charlotte:true,
+ mark:true,
+ marktext:'↑',
+ intro:{content:'不因此法得到牌后,你摸一张牌'},
+ audio:'weishu',
+ trigger:{player:'gainAfter',global:'loseAsyncAfter'},
+ filter(event,player){
+ if(!event.getg||!event.getg(player).length) return false;
+ return event.getParent(2).name!='fakeweirong_gain';
+ },
+ forced:true,
+ content(){
+ player.draw();
+ },
+ },
+ lose:{
+ charlotte:true,
+ mark:true,
+ marktext:'↓',
+ intro:{content:'不因此法失去牌后,你弃置一张牌'},
+ trigger:{player:'loseAfter',global:'loseAsyncAfter'},
+ filter(event,player){
+ if(!player.countCards('he')) return false;
+ const evt=event.getl(player);
+ if(!evt||!evt.cards2||!evt.cards2.length) return false;
+ return event.getParent(3).name!='weishu_discard';
+ },
+ forced:true,
+ content(){
+ player.chooseToDiscard('he',true);
+ },
+ },
+ },
+ getNum(player){
+ let num=0,count=false;
+ const history=player.actionHistory;
+ for(let i=history.length-1;i>=0;i--){
+ if(history[i].isRound){
+ if(!count){
+ count=true;
+ continue;
+ }
+ else break;
+ }
+ if(!count) continue;
+ const allHistory=history[i].gain.filter(evt=>{
+ return evt.getParent(2).name=='fakeweirong'||evt.getParent(2).name=='fakeweirong_gain';
+ }).slice().concat(history[i].lose.filter(evt=>{
+ return evt.getParent(2).skill=='fakeweirong'||evt.getParent(3).name=='fakeweirong_lose';
+ }));
+ for(const evt of allHistory) num+=evt.cards.length;
+ }
+ return Math.max(1,Math.min(player.maxHp,num));
+ },
+ },
//国战典藏2023补充
//吕范
gzdiaodu:{
@@ -16394,6 +16614,16 @@ return event.junling=='junling5'?1:0;});
if(storage) str+='';
return str+'(X为使用者已损失的体力值且X至少为1)';
},
+ fakeweirong(player){
+ let str='转换技,每轮限一次,出牌阶段。',storage=player.storage.fakeweirong;
+ if(!storage) str+='';
+ str+='阴:你可以弃置X张牌,然后当你于本轮不因此法得到牌后,你摸一张牌。';
+ if(!storage) str+='';
+ if(storage) str+='';
+ str+='阳:你可以摸X张牌,然后当你于本轮不因此法失去牌后,你弃置一张牌。';
+ if(storage) str+='';
+ return str+'(X为你上一轮以此法摸和弃置的牌数之和,且X至少为1,至多为你的体力上限)';
+ },
},
translate:{
ye:'野',
@@ -17091,6 +17321,14 @@ return event.junling=='junling5'?1:0;});
fakexunxi_info:'其他角色于回合外明置武将牌时,你可以视为对其使用一张【杀】(无距离限制)。',
fakehuanjia:'擐甲',
fakehuanjia_info:'锁定技,每回合每项各限一次。①当你成为【杀】的目标后,本回合你视为装备此牌使用者的防具,直到你的装备区中有防具。②当你使用【杀】指定唯一目标后,本回合你视为装备目标角色的武器,直到你的装备区中有武器。',
+ fakexiongshu:'凶竖',
+ fakexiongshu_info:'每回合限一次,一名角色使用【杀】或伤害类锦囊牌指定第一个目标后,若你为/不为此牌使用者,则你可以摸一张牌并令一名其他角色成为此牌的伤害来源/弃置一张牌并成为此牌的伤害来源。',
+ fakejianhui:'奸回',
+ fakejianhui_info:'当一名角色受到其势力相同的另一名角色造成的伤害后,你可以令其中一名角色摸一张牌,然后弃置其中另一名角色的一张牌。',
+ fakechongxin:'崇信',
+ fakechongxin_info:'出牌阶段限一次,你可以选择一名与你势力不同的角色,视为你使用一张指定你与其为目标的【知己知彼】。',
+ fakeweirong:'卫戎',
+ fakeweirong_info:'转换技,每轮限一次,出牌阶段。阴:你可以弃置X张牌,然后当你于本轮不因此法得到牌后,你摸一张牌。阳:你可以摸X张牌,然后当你于本轮不因此法失去牌后,你弃置一张牌。(X为你上一轮以此法摸和弃置的牌数之和,且X至少为1,至多为你的体力上限)',
guozhan_default:"国战标准",
guozhan_zhen:"君临天下·阵",
From 583d25341a4defa5aeacde1bf4677ccfdfc8534e Mon Sep 17 00:00:00 2001
From: mengxinzxz <2223529500@qq.com>
Date: Thu, 4 Apr 2024 21:48:50 +0800
Subject: [PATCH 05/35] =?UTF-8?q?=E6=94=BE=E5=85=A52023=E5=AE=98=E6=AD=A3/?=
=?UTF-8?q?=E5=AE=98=E7=9B=97=E6=8A=80=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
把目前已有技能安插到各个武将中(无则添加新武将,徐庶未更改技能,群杜预等牌堆更换完毕后再替换技能
---
mode/guozhan.js | 92 +++++++++++++++++++++++++++++--------------------
1 file changed, 54 insertions(+), 38 deletions(-)
diff --git a/mode/guozhan.js b/mode/guozhan.js
index 3d73d8658..f6152041b 100644
--- a/mode/guozhan.js
+++ b/mode/guozhan.js
@@ -308,6 +308,8 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
'gz_re_yuanshao','gz_yuanshu','gz_hetaihou',
'gz_jin_simashi','gz_sp_duyu','gz_shibao',
'gz_gongsunyuan','gz_panjun','gz_re_nanhualaoxian',
+ 'gz_wangji','gz_xin_zhuran','gz_jin_jiachong',
+ 'gz_jin_yanghu',
],
'6':[
'gz_zhenji','gz_guojia','gz_yujin',
@@ -318,6 +320,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
'gz_liuba','gz_zhouyi','gz_re_xunchen',
'gz_fuwan','gz_zhugejin','gz_yangxiu',
'gz_yangyan','gz_tw_tianyu','gz_yangwan',
+ 'gz_wangling',
],
'5':[
'gz_zhangliao','gz_caocao','gz_xuhuang',
@@ -327,12 +330,12 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
'gz_zhanghuyuechen','gz_re_xushu','gz_mifangfushiren',
'gz_huangzu','gz_weiguan','gz_miheng',
'gz_wenqin','gz_zumao','gz_xuangongzhu',
- 'gz_tw_xiahoushang'
+ 'gz_tw_xiahoushang',
],
'4':[
'gz_dianwei','gz_dengai','gz_xunyu',
'gz_madai','gz_liubei','gz_mifuren',
- 'gz_wuguotai','gz_luxun','gz_taishici',
+ 'gz_wuguotai','gz_luxun','gz_re_taishici',
'gz_zhangjiao','gz_pangde','gz_liuqi',
'gz_jin_zhangchunhua','gz_zongyu','gz_shixie',
'gz_jin_yanghuiyu','gz_tangzi','gz_yanbaihu',
@@ -346,7 +349,8 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
'gz_zhangzhang','gz_lvmeng','gz_huanggai',
'gz_jiling','gz_lvbu','gz_dongzhuo',
'gz_jin_xiahouhui','gz_simazhou','gz_zhanglu',
- 'gz_chendao','gz_yangzhi','gz_old_huaxiong'
+ 'gz_chendao','gz_yangzhi','gz_old_huaxiong',
+ 'gz_gaoshun',
],
'2':[
'gz_cuimao','gz_xiahouyuan','gz_caohong',
@@ -360,12 +364,12 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
'gz_menghuo','gz_ganfuren','gz_guanyu',
'gz_lukang','gz_jiangqing','gz_chendong',
'gz_zoushi','gz_panfeng','gz_tianfeng',
- 'gz_sufei',
+ 'gz_sufei','gz_yanyan',
],
},
characterSort:{
mode_guozhan:{
- guozhan_default:["gz_caocao","gz_simayi","gz_xiahoudun","gz_zhangliao","gz_xuzhu","gz_guojia","gz_zhenji","gz_xiahouyuan","gz_zhanghe","gz_xuhuang","gz_caoren","gz_dianwei","gz_xunyu","gz_caopi","gz_yuejin","gz_liubei","gz_guanyu","gz_zhangfei","gz_zhugeliang","gz_zhaoyun","gz_machao","gz_huangyueying","gz_huangzhong","gz_weiyan","gz_pangtong","gz_sp_zhugeliang","gz_liushan","gz_menghuo","gz_zhurong","gz_ganfuren","gz_sunquan","gz_ganning","gz_lvmeng","gz_huanggai","gz_zhouyu","gz_daqiao","gz_luxun","gz_sunshangxiang","gz_sunjian","gz_xiaoqiao","gz_taishici","gz_zhoutai","gz_re_lusu","gz_zhangzhang","gz_dingfeng","gz_huatuo","gz_lvbu","gz_diaochan","gz_re_yuanshao","gz_yanwen","gz_jiaxu","gz_pangde","gz_zhangjiao","gz_caiwenji","gz_mateng","gz_kongrong","gz_jiling","gz_tianfeng","gz_panfeng","gz_zoushi",],
+ guozhan_default:["gz_caocao","gz_simayi","gz_xiahoudun","gz_zhangliao","gz_xuzhu","gz_guojia","gz_zhenji","gz_xiahouyuan","gz_zhanghe","gz_xuhuang","gz_caoren","gz_dianwei","gz_xunyu","gz_caopi","gz_yuejin","gz_liubei","gz_guanyu","gz_zhangfei","gz_zhugeliang","gz_zhaoyun","gz_machao","gz_huangyueying","gz_huangzhong","gz_weiyan","gz_pangtong","gz_sp_zhugeliang","gz_liushan","gz_menghuo","gz_zhurong","gz_ganfuren","gz_sunquan","gz_ganning","gz_lvmeng","gz_huanggai","gz_zhouyu","gz_daqiao","gz_luxun","gz_sunshangxiang","gz_sunjian","gz_xiaoqiao","gz_re_taishici","gz_zhoutai","gz_re_lusu","gz_zhangzhang","gz_dingfeng","gz_huatuo","gz_lvbu","gz_diaochan","gz_re_yuanshao","gz_yanwen","gz_jiaxu","gz_pangde","gz_zhangjiao","gz_caiwenji","gz_mateng","gz_kongrong","gz_jiling","gz_tianfeng","gz_panfeng","gz_zoushi",],
guozhan_zhen:["gz_dengai","gz_caohong","gz_jiangfei","gz_jiangwei","gz_xusheng","gz_jiangqing","gz_hetaihou","gz_yuji"],
guozhan_shi:["gz_re_lidian","gz_zangba","gz_madai","gz_mifuren","gz_sunce","gz_chendong","gz_sp_dongzhuo","gz_zhangren"],
guozhan_bian:["gz_liqueguosi","gz_zuoci","gz_bianfuren","gz_xunyou","gz_lingtong","gz_lvfan","gz_masu","gz_shamoke",],
@@ -375,8 +379,8 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
guozhan_double:['gz_tangzi','gz_liuqi','gz_mengda','gz_mifangfushiren','gz_zhanglu','gz_shixie','gz_xuyou','gz_xiahouba','gz_panjun','gz_xf_sufei','gz_wenqin','gz_pengyang'],
guozhan_yexinjia:['gz_zhonghui','gz_simazhao','gz_gongsunyuan','gz_sunchen'],
guozhan_jin:['gz_jin_simayi','gz_jin_simazhao','gz_jin_simashi','gz_jin_zhangchunhua','gz_jin_wangyuanji','gz_jin_xiahouhui','gz_duyu','gz_zhanghuyuechen','gz_jin_yanghuiyu','gz_simazhou','gz_shibao','gz_weiguan','gz_zhongyan','gz_yangyan','gz_zuofen','gz_xinchang','gz_xuangongzhu','gz_yangzhi'],
- guozhan_zongheng:['gz_huaxin','gz_luyusheng','gz_zongyu','gz_miheng','gz_fengxi','gz_dengzhi','gz_re_xunchen','gz_dc_yanghu'],
- guozhan_decade:['gz_jianggan',"gz_zhouyi","gz_lvlingqi","gz_yangwan"],
+ guozhan_zongheng:['gz_jianggan','gz_huaxin','gz_luyusheng','gz_zongyu','gz_miheng','gz_fengxi','gz_dengzhi','gz_re_xunchen','gz_dc_yanghu'],
+ guozhan_decade:["gz_zhouyi","gz_lvlingqi","gz_yangwan",'gz_wangling','gz_wangji','gz_yanyan','gz_xin_zhuran','gz_gaoshun','gz_jin_jiachong','gz_jin_yanghu'],
guozhan_mobile:["gz_lingcao","gz_lifeng","gz_sp_duyu"],
guozhan_qunxiong:['gz_xf_huangquan','gz_guohuai','gz_guanqiujian','gz_zhujun','gz_chengong','gz_re_xugong'],
guozhan_tw:['gz_yangxiu','gz_tw_tianyu','gz_tw_xiahoushang','gz_liaohua','gz_chendao','gz_zhugejin','gz_zumao','gz_fuwan','gz_tw_liufuren','gz_old_huaxiong'],
@@ -400,10 +404,10 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
gz_shibing1key:['male','key',0,[],['unseen']],
gz_shibing2key:['female','key',0,[],['unseen']],
- gz_zhonghui:['male','ye',4,['gzquanji','gzpaiyi'],['gzskin']],
+ gz_zhonghui:['male','ye',4,['fakequanji','fakepaiyi'],['gzskin']],
gz_simazhao:['male','ye',3,['gzzhaoxin','gzsuzhi'],['gzskin']],
- gz_gongsunyuan:['male','ye',4,['gzhuaiyi','gzzisui'],['gzskin']],
- gz_sunchen:['male','ye',4,['gzshilu','gzxiongnve']],
+ gz_gongsunyuan:['male','ye',4,['fakehuaiyi','fakezisui'],['gzskin']],
+ gz_sunchen:['male','ye',4,['fakeshilu','fakexiongnve']],
gz_tangzi:['male','wu',4,['gzxingzhao'],['doublegroup:wei:wu','gzskin']],
gz_mengda:['male','wei',4,['qiuan','liangfan'],['doublegroup:wei:shu']],
gz_liuqi:['male','qun',3,['gzwenji','gztunjiang'],['doublegroup:shu:qun','gzskin']],
@@ -425,21 +429,21 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
gz_pengyang:['male','shu',3,['gztongling','gzjinyu'],['doublegroup:shu:qun','gzskin']],
gz_zhuling:['male','wei',4,['gzjuejue','gzfangyuan'],['gzskin']],
- gz_caocao:['male','wei',4,['jianxiong']],
+ gz_caocao:['male','wei',4,['rejianxiong']],
gz_simayi:['male','wei',3,['fankui','guicai']],
gz_xiahoudun:['male','wei',4,['reganglie']],
gz_zhangliao:['male','wei',4,['new_retuxi']],
gz_xuzhu:['male','wei',4,['gzluoyi']],
gz_guojia:['male','wei',3,['tiandu','gzyiji'],['gzskin']],
gz_zhenji:['female','wei',3,['luoshen','qingguo'],['gzskin']],
- gz_xiahouyuan:['male','wei',5,['gzshensu'],['gzskin']],
+ gz_xiahouyuan:['male','wei',4,['gzshensu'],['gzskin']],
gz_zhanghe:['male','wei',4,['qiaobian']],
gz_xuhuang:['male','wei',4,['new_duanliang']],
gz_caoren:['male','wei',4,['gzjushou']],
- gz_dianwei:['male','wei',4,['gzqiangxi'],['gzskin']],
+ gz_dianwei:['male','wei',5,['reqiangxi'],['gzskin']],
gz_xunyu:['male','wei',3,['quhu','gzjieming']],
gz_caopi:['male','wei',3,['xingshang','gzfangzhu'],['gzskin']],
- gz_yuejin:['male','wei',4,['gzxiaoguo'],['gzskin']],
+ gz_yuejin:['male','wei',4,['fakexiaoguo'],['gzskin']],
gz_liubei:['male','shu',4,['rerende']],
gz_guanyu:['male','shu',5,['new_rewusheng'],['gzskin']],
@@ -464,21 +468,21 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
gz_huanggai:['male','wu',4,['new_kurou']],
gz_zhouyu:['male','wu',3,['reyingzi','refanjian'],['gzskin']],
gz_daqiao:['female','wu',3,['guose','liuli']],
- gz_luxun:['male','wu',3,['gzqianxun','duoshi'],['gzskin']],
+ gz_luxun:['male','wu',3,['gzqianxun','fakeduoshi'],['gzskin']],
gz_sunshangxiang:['female','wu',3,['jieyin','gzxiaoji'],['gzskin']],
gz_sunjian:['male','wu',5,['yinghun'],['gzskin']],
gz_xiaoqiao:['female','wu',3,['gztianxiang','gzhongyan'],['gzskin']],
- gz_taishici:['male','wu',4,['tianyi']],
+ gz_re_taishici:['male','wu',4,['tianyi','fakehanzhan']],
gz_zhoutai:['male','wu',4,['buqu','new_fenji']],
gz_re_lusu:['male','wu',3,['haoshi','dimeng']],
gz_zhangzhang:['male','wu',3,['zhijian','guzheng']],
- gz_dingfeng:['male','wu',4,['reduanbing','refenxun'],['gzskin']],
+ gz_dingfeng:['male','wu',4,['fakeduanbing','fenxun'],['gzskin']],
gz_huatuo:['male','qun',3,['new_chuli','jijiu']],
gz_lvbu:['male','qun',5,['gzwushuang'],['gzskin']],
gz_diaochan:['female','qun',3,['lijian','biyue'],['gzskin']],
gz_re_yuanshao:['male','qun',4,['new_luanji'],['gzskin']],
- gz_yanwen:['male','qun',4,['shuangxiong']],
+ gz_yanwen:['male','qun',4,['fakeshuangxiong']],
gz_jiaxu:['male','qun',3,['wansha','luanwu','gzweimu'],['gzskin']],
gz_pangde:['male','qun',4,['mashu','jianchu']],
gz_zhangjiao:['male','qun',3,['leiji','guidao']],
@@ -492,9 +496,9 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
gz_dengai:['male','wei',4,['tuntian','ziliang','gzjixi'],['gzskin','die_audio']],
gz_caohong:['male','wei',4,['gzhuyuan','heyi'],['gzskin']],
- gz_jiangfei:['male','shu',3,['reshengxi','gzshoucheng']],
+ gz_jiangfei:['male','shu',3,['shengxi','gzshoucheng']],
gz_jiangwei:['male','shu',4,['tiaoxin','yizhi','tianfu'],['gzskin']],
- gz_xusheng:['male','wu',4,['gzyicheng'],['gzskin']],
+ gz_xusheng:['male','wu',4,['fakeyicheng'],['gzskin']],
gz_jiangqing:['male','wu',4,['gzshangyi','niaoxiang']],
gz_hetaihou:['female','qun',3,['zhendu','qiluan'],['gzskin']],
@@ -503,8 +507,8 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
gz_madai:['male','shu',4,['mashu2','qianxi'],['gzskin']],
gz_mifuren:['female','shu',3,['gzguixiu','gzcunsi']],
gz_sunce:['male','wu',4,['jiang','yingyang','baka_hunshang'],['gzskin']],
- gz_chendong:['male','wu',4,['duanxie','fenming']],
- gz_sp_dongzhuo:['male','qun',4,['hengzheng','baoling']],
+ gz_chendong:['male','wu',4,['duanxie','fakefenming']],
+ gz_sp_dongzhuo:['male','qun',4,['hengzheng','fakebaoling']],
gz_zhangren:['male','qun',4,['chuanxin','fengshi']],
gz_jun_liubei:['male','shu',4,['zhangwu','jizhao','shouyue','wuhujiangdaqi']],
@@ -512,23 +516,23 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
gz_jun_sunquan:['male','wu',4,['jiahe','lianzi','jubao','yuanjiangfenghuotu']],
gz_liqueguosi:['male','qun',4,['gzxiongsuan']],
- gz_zuoci:['male','qun',3,['yigui','jihun'],['gzskin']],
+ gz_zuoci:['male','qun',3,['fakeyigui','fakejihun'],['gzskin']],
gz_bianfuren:['female','wei',3,['wanwei','gzyuejian']],
gz_xunyou:['male','wei',3,['gzqice','zhiyu'],['gzskin']],
gz_lingtong:['male','wu',4,['xuanlve','yongjin'],['gzskin']],
- gz_lvfan:['male','wu',3,['xindiaodu','gzdiancai']],
+ gz_lvfan:['male','wu',3,['gzdiaodu','gzdiancai']],
gz_masu:['male','shu',3,['gzsanyao','gzzhiman'],['gzskin']],
gz_shamoke:['male','shu',4,['gzjili'],['gzskin']],
- gz_lingcao:['male','wu',4,['dujin']],
- gz_lifeng:['male','shu',3,['tunchu','shuliang']],
- gz_beimihu:["female","qun",3,["hmkguishu","hmkyuanyu"]],
+ gz_lingcao:['male','wu',4,['fakedujin']],
+ gz_lifeng:['male','shu',3,['faketunchu','fakeshuliang']],
+ gz_beimihu:["female","qun",3,["fakeguishu","fakeyuanyu"]],
gz_jianggan:["male","wei",3,["weicheng","daoshu"]],
gz_sp_duyu:['male','qun',4,['spwuku','spmiewu']],
- gz_huaxin:['male','wei',3,['wanggui','xibing']],
- gz_luyusheng:['female','wu',3,['zhente','zhiwei']],
- gz_zongyu:['male','shu',3,['zyqiao','chengshang']],
- gz_miheng:['male','qun',3,['gzrekuangcai','gzshejian'],['gzskin']],
+ gz_huaxin:['male','wei',3,['wanggui','fakexibing']],
+ gz_luyusheng:['female','wu',3,['fakezhente','fakezhiwei']],
+ gz_zongyu:['male','shu',3,['zyqiao','fakechengshang']],
+ gz_miheng:['male','qun',3,['fakekuangcai','gzshejian'],['gzskin']],
gz_fengxi:['male','wu',3,['gzyusui','gzboyan'],['gzskin']],
gz_dengzhi:['male','shu',3,['gzjianliang','gzweimeng'],['gzskin']],
gz_re_nanhualaoxian:['male','qun',3,['gzgongxiu','gztaidan','gzrejinghe']],
@@ -542,7 +546,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
gz_wangping:['male','shu',4,['jianglue'],['gzskin']],
gz_fazheng:['male','shu',3,['gzxuanhuo','gzenyuan'],['gzskin']],
gz_wuguotai:['female','wu',3,['gzbuyi','ganlu'],['gzskin']],
- gz_lukang:['male','wu',3,['keshou','zhuwei'],['gzskin']],
+ gz_lukang:['male','wu',3,['fakejueyan','keshou'],['gzskin']],
gz_yuanshu:['male','qun',4,['gzweidi','gzyongsi'],['gzskin']],
gz_zhangxiu:['male','qun',4,['gzfudi','gzcongjian'],['gzskin']],
gz_jun_caocao:['male','wei',4,['jianan','huibian','gzzongyu','wuziliangjiangdao'],[]],
@@ -587,6 +591,14 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
gz_yangwan:['female','shu',3,['gzyouyan','gzzhuihuan'],['gzskin']],
gz_key_ushio:['female','key',3,['ushio_huanxin','ushio_xilv'],['doublegroup:key:wei:shu:wu:qun:jin']],
+
+ gz_wangling:['male','wei',4,['fakemibei']],
+ gz_wangji:['male','wei',3,['fakeqizhi','fakejinqu']],
+ gz_yanyan:['male','shu',4,['fakejuzhan']],
+ gz_xin_zhuran:['male','wu',3,['fakedanshou']],
+ gz_gaoshun:['male','qun',4,['fakexunxi','fakehuanjia']],
+ gz_jin_jiachong:['male','jin',3,['fakexiongshu','fakejianhui']],
+ gz_jin_yanghu:['male','jin',4,['fakechongxin','fakeweirong']],
}
},
skill:{
@@ -10433,12 +10445,12 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
event.finish();
return;
}
- var skills=['new_retuxi','qiaobian','gzxiaoguo','gzjieyue','new_duanliang'];
+ var skills=['new_retuxi','qiaobian','fakexiaoguo','gzjieyue','new_duanliang'];
game.countPlayer(function(current){
if(current==player) return;
if(current.hasSkill('new_retuxi')) skills.remove('new_retuxi');
if(current.hasSkill('qiaobian')) skills.remove('qiaobian');
- if(current.hasSkill('gzxiaoguo')) skills.remove('gzxiaoguo');
+ if(current.hasSkill('fakexiaoguo')) skills.remove('fakexiaoguo');
if(current.hasSkill('gzjieyue')) skills.remove('gzjieyue');
if(current.hasSkill('new_duanliang')) skills.remove('new_duanliang');
});
@@ -13262,7 +13274,7 @@ return event.junling=='junling5'?1:0;});
if(event.num>=1&&!player.hasSkill('jiahe_reyingzi')) list.push('reyingzi');
if(event.num>=2&&!player.hasSkill('jiahe_haoshi')) list.push('haoshi');
if(event.num>=3&&!player.hasSkill('jiahe_shelie')) list.push('shelie');
- if(event.num>=4&&!player.hasSkill('jiahe_duoshi')) list.push('duoshi');
+ if(event.num>=4&&!player.hasSkill('jiahe_duoshi')) list.push('fakeduoshi');
if(!list.length){
event.finish();
return;
@@ -13295,14 +13307,14 @@ return event.junling=='junling5'?1:0;});
if(controls.includes('reyingzi')){
return 'reyingzi';
}
- if(controls.includes('duoshi')){
- return 'duoshi';
+ if(controls.includes('fakeduoshi')){
+ return 'fakeduoshi';
}
return controls.randomGet();
});
'step 2'
if(result.control!='cancel2'){
- var skill='jiahe_'+result.control;
+ var skill=(result.control!='fakeduoshi'?'jiahe_':'')+result.control;
player.addTempSkills(skill);
if(!event.done) player.logSkill('jiahe_put');
// game.log(player,'获得了技能','【'+get.translation(skill)+'】');
@@ -17329,6 +17341,10 @@ return event.junling=='junling5'?1:0;});
fakechongxin_info:'出牌阶段限一次,你可以选择一名与你势力不同的角色,视为你使用一张指定你与其为目标的【知己知彼】。',
fakeweirong:'卫戎',
fakeweirong_info:'转换技,每轮限一次,出牌阶段。阴:你可以弃置X张牌,然后当你于本轮不因此法得到牌后,你摸一张牌。阳:你可以摸X张牌,然后当你于本轮不因此法失去牌后,你弃置一张牌。(X为你上一轮以此法摸和弃置的牌数之和,且X至少为1,至多为你的体力上限)',
+ gz_re_taishici:'太史慈',
+ gz_xin_zhuran:'朱然',
+ gz_jin_jiachong:'贾充',
+ gz_jin_yanghu:'羊祜',
guozhan_default:"国战标准",
guozhan_zhen:"君临天下·阵",
From 986d3f0aa8d7eaef78e671099f7920c6d3112240 Mon Sep 17 00:00:00 2001
From: mengxinzxz <2223529500@qq.com>
Date: Thu, 4 Apr 2024 21:54:02 +0800
Subject: [PATCH 06/35] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E8=A1=A5=E5=85=85?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
mode/guozhan.js | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/mode/guozhan.js b/mode/guozhan.js
index f6152041b..8b7c08427 100644
--- a/mode/guozhan.js
+++ b/mode/guozhan.js
@@ -1755,6 +1755,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
if(!phsu||phsu.player!=player) return false;
return event.targets.some(i=>i.isEnemyOf(player));
},
+ usable:1,
preHidden:true,
async content(event,trigger,player){
await player.draw();
@@ -17301,6 +17302,8 @@ return event.junling=='junling5'?1:0;});
fakejujian_info:'副将技。①此武将牌计算体力上限时减少半个阴阳鱼。②结束阶段,你可以弃置一张非基本牌并选择一名友方角色,令其选择摸两张牌或回复1点体力,然后其可以变更副将。',
fakexibing:'息兵',
fakexibing_info:'当一名其他角色在其出牌阶段内使用第一张黑色【杀】或黑色普通锦囊牌指定唯一角色为目标后,你可令该角色将手牌摸至体力值且本回合不能再使用手牌。若你与其均明置了所有武将牌,则你可以暗置你与其各一张武将牌且本回合不能再明置此武将牌。',
+ fakechengshang:'承赏',
+ fakechengshang_info:'出牌阶段限一次,当你使用存在花色和点数且指定了其他势力角色为目标的牌结算完毕后,若你未因此牌造成过伤害,则你可以摸一张牌,然后本阶段你可以将一张手牌当作初始游戏牌堆中与此牌花色和点数相同的另一张基本牌或普通锦囊牌使用一次。',
fakezhente:'贞特',
fakezhente_info:'每回合限一次,当你成为其他角色使用普通锦囊牌或黑色基本牌的目标后,你可令使用者选择一项:1.本回合不能再使用与此牌颜色相同的牌;2.令此牌对你无效。',
fakezhiwei:'至微',
@@ -17345,6 +17348,7 @@ return event.junling=='junling5'?1:0;});
gz_xin_zhuran:'朱然',
gz_jin_jiachong:'贾充',
gz_jin_yanghu:'羊祜',
+ gz_wangling:'王淩',
guozhan_default:"国战标准",
guozhan_zhen:"君临天下·阵",
From a23f09c109c66bed2ff6a9e58c25b1afe697a67a Mon Sep 17 00:00:00 2001
From: mengxinzxz <2223529500@qq.com>
Date: Thu, 4 Apr 2024 21:59:03 +0800
Subject: [PATCH 07/35] =?UTF-8?q?=E5=85=AC=E5=AD=99=E6=B8=8A=E6=94=B9?=
=?UTF-8?q?=E5=AE=98=E6=AD=A3=E6=8A=80=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
mode/guozhan.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mode/guozhan.js b/mode/guozhan.js
index 8b7c08427..19b5e3bc1 100644
--- a/mode/guozhan.js
+++ b/mode/guozhan.js
@@ -406,7 +406,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
gz_zhonghui:['male','ye',4,['fakequanji','fakepaiyi'],['gzskin']],
gz_simazhao:['male','ye',3,['gzzhaoxin','gzsuzhi'],['gzskin']],
- gz_gongsunyuan:['male','ye',4,['fakehuaiyi','fakezisui'],['gzskin']],
+ gz_gongsunyuan:['male','ye',4,['gzrehuaiyi','gzrezisui'],['gzskin']],
gz_sunchen:['male','ye',4,['fakeshilu','fakexiongnve']],
gz_tangzi:['male','wu',4,['gzxingzhao'],['doublegroup:wei:wu','gzskin']],
gz_mengda:['male','wei',4,['qiuan','liangfan'],['doublegroup:wei:shu']],
From 3307575a2ea85c6de51884fa1a82f14ad0c763a6 Mon Sep 17 00:00:00 2001
From: mengxinzxz <2223529500@qq.com>
Date: Thu, 4 Apr 2024 22:16:03 +0800
Subject: [PATCH 08/35] =?UTF-8?q?=E6=8F=8F=E8=BF=B0fix?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
character/sb.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/character/sb.js b/character/sb.js
index ba07cf518..df75407d9 100644
--- a/character/sb.js
+++ b/character/sb.js
@@ -985,7 +985,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
dialog(){
var dialog=ui.create.dialog('放逐:请选择你要执行的一项','hidden');
dialog.add([[
- [1,'移去1个“颂”标记,令一名其他角色于手牌中只能使用装备牌直到其回合结束'],
+ [1,'移去1个“颂”标记,令一名其他角色于手牌中只能使用基本牌直到其回合结束'],
[2,'移去2个“颂”标记,令一名其他角色的非Charlotte技能失效直到其回合结束'],
[3,'移去2个“颂”标记,令一名其他角色不能响应除其外的角色使用的牌直到其回合结束'],
[4,'移去3个“颂”标记,令一名其他角色将武将牌翻面'],
From 7701de42bc3f3352f5e8af00f2525aaca5101009 Mon Sep 17 00:00:00 2001
From: mengxinzxz <2223529500@qq.com>
Date: Thu, 4 Apr 2024 22:31:55 +0800
Subject: [PATCH 09/35] =?UTF-8?q?=E5=9B=BD=E6=88=98onreinit=E7=A5=9E?=
=?UTF-8?q?=E5=8A=BF=E5=8A=9Bbugfix+gzwanyi=E5=B0=8F=E6=A8=A1=E5=BC=8F?=
=?UTF-8?q?=E7=BF=BB=E8=AF=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
mode/guozhan.js | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/mode/guozhan.js b/mode/guozhan.js
index 19b5e3bc1..734a612e0 100644
--- a/mode/guozhan.js
+++ b/mode/guozhan.js
@@ -44,8 +44,11 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
for(var i in lib.character){
if(lib.character[i][1]=='shen'){
if(lib.character[i][4]){
- var group=lib.character[i][4].find(group=>lib.group.includes(group)||group=='key');
- if(group) lib.character[i][1]=group;
+ var group=lib.character[i][4].find(group=>lib.group.includes(group)||group=='key'||group.startsWith('gzgroup:'));
+ if(group){
+ if(group.startsWith('gzgroup:')) lib.character[i][1]=group.slice(8);
+ else lib.character[i][1]=group;
+ }
else lib.character[i][1]='qun';
}
else lib.character[i][1]='qun';
@@ -85,7 +88,6 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
case 'yingbian':
lib.card.list=lib.guozhanPile_yingbian.slice(0);
delete lib.translate.shuiyanqijunx_info_guozhan;
- lib.translate.gzwanyi_info='出牌阶段每项各限一次。你可以将一张带有“应变”标签的牌当做【逐近弃远】/【洞烛先机】/【水淹七军】/【出其不意】使用。';
break;
case 'normal':lib.card.list=lib.guozhanPile.slice(0);break;
}
@@ -115,7 +117,6 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
case 'yingbian':
lib.card.list=lib.guozhanPile_yingbian.slice(0);
delete lib.translate.shuiyanqijunx_info_guozhan;
- lib.translate.gzwanyi_info='出牌阶段每项各限一次。你可以将一张带有“应变”标签的牌当做【逐近弃远】/【洞烛先机】/【水淹七军】/【出其不意】使用。'
break;
default:lib.card.list=lib.guozhanPile.slice(0);break;
}
@@ -17168,6 +17169,7 @@ return event.junling=='junling5'?1:0;});
gzcaiyuan_info:'锁定技。结束阶段开始时,若你的手牌数大于本回合开始时的手牌数,则你摸两张牌或回复1点体力。',
gzwanyi:'婉嫕',
gzwanyi_info:'出牌阶段每项各限一次。你可以将一张带有“合纵”标签的牌当做【联军盛宴】/【火烧连营】/【挟天子以令诸侯】/【戮力同心】使用。',
+ gzwanyi_info_yingbian:'出牌阶段每项各限一次。你可以将一张带有“应变”标签的牌当做【逐近弃远】/【洞烛先机】/【水淹七军】/【出其不意】使用。',
gzmaihuo:'埋祸',
gzmaihuo_info:'限定技。当有己方角色成为【杀】的目标时,你可以取消此【杀】的所有目标。然后此【杀】的使用者下回合开始时,其视为对你使用一张【杀】。若此【杀】对你造成伤害,则你防止此伤害,摸两张牌并移除此武将牌(若此武将牌为副将则改为变更副将)。',
gzzhenxi:'震袭',
From af7ceec775caaafc47724c1620711d935bf98ee7 Mon Sep 17 00:00:00 2001
From: mengxinzxz <2223529500@qq.com>
Date: Thu, 4 Apr 2024 23:40:01 +0800
Subject: [PATCH 10/35] =?UTF-8?q?=E9=99=86=E6=8A=97=E4=BD=93=E5=8A=9Bfix+?=
=?UTF-8?q?=E5=9B=BD=E6=88=98=E5=BA=94=E5=8F=98=E7=89=8C=E5=A0=86=E4=BF=AE?=
=?UTF-8?q?=E6=94=B9=E4=B8=BA23=E5=B9=B4=E5=BA=94=E5=8F=98=E5=8A=BF?=
=?UTF-8?q?=E5=A4=87=E7=B3=85=E5=90=88=E7=89=88?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
mode/guozhan.js | 165 +++++++++++++++++++++++++++++++++---------------
1 file changed, 113 insertions(+), 52 deletions(-)
diff --git a/mode/guozhan.js b/mode/guozhan.js
index 734a612e0..98cc13e7a 100644
--- a/mode/guozhan.js
+++ b/mode/guozhan.js
@@ -547,7 +547,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
gz_wangping:['male','shu',4,['jianglue'],['gzskin']],
gz_fazheng:['male','shu',3,['gzxuanhuo','gzenyuan'],['gzskin']],
gz_wuguotai:['female','wu',3,['gzbuyi','ganlu'],['gzskin']],
- gz_lukang:['male','wu',3,['fakejueyan','keshou'],['gzskin']],
+ gz_lukang:['male','wu',4,['fakejueyan','keshou'],['gzskin']],
gz_yuanshu:['male','qun',4,['gzweidi','gzyongsi'],['gzskin']],
gz_zhangxiu:['male','qun',4,['gzfudi','gzcongjian'],['gzskin']],
gz_jun_caocao:['male','wei',4,['jianan','huibian','gzzongyu','wuziliangjiangdao'],[]],
@@ -17371,117 +17371,178 @@ return event.junling=='junling5'?1:0;});
},
junList:['liubei','zhangjiao','sunquan','caocao'],
guozhanPile_yingbian:[
- ['spade',1,'juedou'],
+ //黑桃普通
['spade',1,'shandian'],
- ['spade',2,'cixiong'],
+ ['spade',1,'xietianzi'],
+ ['spade',1,'juedou'],
['spade',2,'bagua'],
+ ['spade',2,'heiguangkai'],
+ ['spade',2,'cixiong'],
['spade',2,'taigongyinfu'],
- ['spade',3,'shuiyanqijunx',null,['yingbian_zhuzhan']],
['spade',3,'zhujinqiyuan',null,['yingbian_zhuzhan']],
+ ['spade',3,'huoshaolianying'],
+ ['spade',3,'shuiyanqijunx',null,['yingbian_zhuzhan']],
['spade',4,'guohe'],
+ ['spade',4,'sha'],
['spade',4,'shuiyanqijunx',null,['yingbian_zhuzhan']],
- ['spade',5,'sha'],
['spade',5,'jueying'],
+ ['spade',5,'qinglong'],
+ ['spade',5,'sha'],
['spade',6,'qinggang'],
+ ['spade',6,'jiu'],
['spade',6,'sha','ice'],
['spade',7,'sha'],
+ ['spade',7,'sha'],
['spade',7,'sha','ice'],
['spade',8,'sha','ice'],
['spade',8,'sha','ice'],
- ['spade',9,'sha'],
+ ['spade',8,'sha'],
['spade',9,'jiu'],
- ['spade',10,'sha',null,['yingbian_canqu']],
+ ['spade',9,'sha','thunder'],
+ ['spade',9,'sha'],
['spade',10,'bingliang'],
- ['spade',11,'sha',null,['yingbian_canqu']],
+ ['spade',10,'sha','thunder'],
+ ['spade',10,'sha',null,['yingbian_canqu']],
['spade',11,'wuxie',null,['yingbian_kongchao']],
+ ['spade',11,'sha',null,['yingbian_canqu']],
+ ['spade',11,'sha','thunder'],
['spade',12,'zhangba'],
+ ['spade',12,'lulitongxin'],
['spade',12,'tiesuo'],
- ['spade',13,'nanman',null,['yingbian_fujia']],
['spade',13,'wutiesuolian'],
-
- ['heart',1,'taoyuan'],
+ ['spade',13,'wuxie'],
+ ['spade',13,'nanman',null,['yingbian_fujia']],
+ //草花普通
+ ['club',1,'juedou'],
+ ['club',1,'yuxi'],
+ ['club',1,'huxinjing'],
+ ['club',2,'sha'],
+ ['club',2,'tianjitu'],
+ ['club',2,'renwang'],
+ ['club',2,'tengjia'],
+ ['club',3,'sha'],
+ ['club',3,'chiling'],
+ ['club',3,'zhibi'],
+ ['club',4,'sha',null,['yingbian_kongchao']],
+ ['club',4,'sha','thunder'],
+ ['club',4,'zhibi'],
+ ['club',5,'sha',null,['yingbian_kongchao']],
+ ['club',5,'sha','thunder'],
+ ['club',5,'tongque'],
+ ['club',6,'sha','thunder'],
+ ['club',6,'sha',null,['yingbian_kongchao']],
+ ['club',6,'lebu'],
+ ['club',7,'sha','thunder'],
+ ['club',7,'sha'],
+ ['club',7,'nanman',null,['yingbian_fujia']],
+ ['club',8,'sha','thunder'],
+ ['club',8,'sha',null,['yingbian_canqu']],
+ ['club',8,'sha'],
+ ['club',9,'sha'],
+ ['club',9,'jiu'],
+ ['club',9,'jiu'],
+ ['club',10,'bingliang'],
+ ['club',10,'lulitongxin'],
+ ['club',10,'sha'],
+ ['club',11,'sha'],
+ ['club',11,'huoshaolianying'],
+ ['club',11,'sha'],
+ ['club',12,'zhujinqiyuan',null,['yingbian_zhuzhan']],
+ ['club',12,'jiedao',null,['yingbian_fujia']],
+ ['club',12,'tiesuo'],
+ ['club',13,'tiesuo'],
+ ['club',13,'wuxie',null,['guo']],
+ ['club',13,'wuxie',null,['guo']],
+ //红桃普通
['heart',1,'wanjian'],
+ ['heart',1,'taoyuan'],
+ ['heart',1,'lianjunshengyan'],
['heart',2,'shan'],
['heart',2,'chuqibuyi',null,['yingbian_zhuzhan']],
- ['heart',3,'wugu'],
+ ['heart',2,'diaohulishan'],
['heart',3,'chuqibuyi',null,['yingbian_zhuzhan']],
+ ['heart',3,'wugu'],
+ ['heart',3,'jingfanma'],
['heart',4,'tao'],
['heart',4,'sha','fire',['yingbian_canqu']],
+ ['heart',4,'shan'],
['heart',5,'qilin'],
['heart',5,'chitu'],
- ['heart',6,'tao'],
+ ['heart',5,'shan',null,['yingbian_kongchao']],
['heart',6,'lebu'],
+ ['heart',6,'tao'],
+ ['heart',6,'shan',null,['yingbian_kongchao']],
['heart',7,'tao'],
['heart',7,'dongzhuxianji'],
+ ['heart',7,'shan'],
['heart',8,'tao'],
['heart',8,'dongzhuxianji'],
+ ['heart',8,'tao'],
['heart',9,'tao'],
['heart',9,'yuanjiao'],
- ['heart',10,'tao'],
+ ['heart',9,'tao'],
+ ['heart',10,'sha'],
+ ['heart',10,'shan'],
['heart',10,'sha'],
- ['heart',11,'shan'],
['heart',11,'yiyi'],
+ ['heart',11,'tao'],
+ ['heart',11,'sha',null,['yingbian_zhuzhan']],
['heart',12,'tao'],
['heart',12,'sha'],
- ['heart',12,'guohe'],
- ['heart',13,'shan'],
+ ['heart',12,'huoshaolianying'],
['heart',13,'zhuahuang'],
-
- ['diamond',1,'zhuge'],
+ ['heart',13,'shan'],
+ ['heart',13,'huogong',null,['yingbian_zhuzhan']],
+ //方片普通
['diamond',1,'wuxinghelingshan'],
+ ['diamond',1,'zhuge'],
+ ['diamond',1,'xietianzi'],
['diamond',2,'shan'],
['diamond',2,'tao'],
- ['diamond',3,'shan'],
+ ['diamond',2,'tao'],
['diamond',3,'shunshou'],
+ ['diamond',3,'shan'],
+ ['diamond',3,'tao'],
['diamond',4,'yiyi'],
['diamond',4,'sha','fire',['yingbian_canqu']],
+ ['diamond',4,'sha','fire',['yingbian_zhuzhan']],
['diamond',5,'guanshi'],
['diamond',5,'sha','fire'],
- ['diamond',6,'shan'],
+ ['diamond',5,'muniu'],
['diamond',6,'wuliu'],
+ ['diamond',6,'shan'],
+ ['diamond',6,'shan'],
['diamond',7,'shan',null,['yingbian_kongchao']],
['diamond',7,'shan',null,['yingbian_kongchao']],
+ ['diamond',7,'shan'],
['diamond',8,'shan',null,['yingbian_kongchao']],
['diamond',8,'shan',null,['yingbian_kongchao']],
- ['diamond',9,'shan'],
+ ['diamond',8,'sha','fire'],
['diamond',9,'jiu'],
+ ['diamond',9,'shan'],
+ ['diamond',9,'sha','fire'],
['diamond',10,'shan'],
['diamond',10,'sha'],
- ['diamond',11,'shan'],
+ ['diamond',10,'diaohulishan'],
['diamond',11,'sha'],
+ ['diamond',11,'shan'],
+ ['diamond',11,'wuxie',null,['guo']],
['diamond',12,'sha'],
['diamond',12,'sanjian'],
['diamond',12,'wuxie',null,['guo']],
- ['diamond',13,'shan'],
+ ['diamond',12,'fangtian'],
['diamond',13,'zixin'],
-
- ['club',1,'juedou'],
- ['club',1,'huxinjing'],
- ['club',2,'sha'],
- ['club',2,'tengjia'],
- ['club',2,'renwang'],
- ['club',3,'guohe'],
- ['club',3,'zhibi'],
- ['club',4,'sha',null,['yingbian_kongchao']],
- ['club',4,'zhibi'],
- ['club',5,'sha',null,['yingbian_kongchao']],
- ['club',5,'tongque'],
- ['club',6,'lebu'],
- ['club',6,'sha','thunder'],
- ['club',7,'nanman'],
- ['club',7,'sha','thunder'],
- ['club',8,'sha'],
- ['club',8,'sha','thunder'],
- ['club',9,'sha'],
- ['club',9,'jiu'],
- ['club',10,'sha'],
- ['club',10,'bingliang'],
- ['club',11,'sha'],
- ['club',11,'sha'],
- ['club',12,'zhujinqiyuan',null,['yingbian_zhuzhan']],
- ['club',12,'tiesuo'],
- ['club',13,'wuxie',null,['guo']],
- ['club',13,'tiesuo'],
+ ['diamond',13,'shan'],
+ ['diamond',13,'shan'],
+ //特殊
+ ['heart',3,'taipingyaoshu'],
+ ['diamond',4,'dinglanyemingzhu'],
+ ['heart',5,'liulongcanjia'],
+ ['spade',6,'feilongduofeng'],
+ ['club',12,'gz_wenheluanwu'],
+ ['heart',1,'gz_guguoanbang'],
+ ['spade',12,'gz_haolingtianxia'],
+ ['diamond',1,'gz_kefuzhongyuan'],
],
guozhanPile_old:[
['spade',1,'juedou'],
From e8eb4ea93460a7be4d620ee73786b06e8a17b374 Mon Sep 17 00:00:00 2001
From: mengxinzxz <2223529500@qq.com>
Date: Thu, 4 Apr 2024 23:48:04 +0800
Subject: [PATCH 11/35] =?UTF-8?q?=E6=9A=97=E7=BD=AE=E6=AD=A6=E5=B0=86bugfi?=
=?UTF-8?q?x+fakexiaoguo=20bugfix?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
mode/guozhan.js | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/mode/guozhan.js b/mode/guozhan.js
index 98cc13e7a..465149e78 100644
--- a/mode/guozhan.js
+++ b/mode/guozhan.js
@@ -623,12 +623,12 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
if(effect<=0&&!cards.length) return 0;
if(ui.selected.cards.length>cards.length-(effect<=0?1:0)) return 0;
return 1/(get.value(card)||0.5);
- }).set('logSkill',['fakexiaoguo',trigger.player]).setHiddenSkill('fakexiaoguo');
+ }).set('logSkill',['fakexiaoguo',trigger.player]).setHiddenSkill('fakexiaoguo').forResult();
},
preHidden:true,
async content(event,trigger,player){
const num=trigger.player.countCards('e'),num2=event.cards.length;
- const {result:{bool,cards}}=await player.chooseToDiscard(trigger.player,'e',num2,true);
+ await player.chooseToDiscard(trigger.player,'e',num2,true);
if(num2>num) trigger.player.damage();
},
},
@@ -17839,7 +17839,7 @@ return event.junling=='junling5'?1:0;});
content:{
hideCharacter:function(){
game.addVideo('hideCharacter',player,num);
- var skills;
+ var skills,log=event.log;
switch(num){
case 0:
if(log!==false) game.log(player,'暗置了主将'+get.translation(player.name1));
@@ -18347,6 +18347,8 @@ return event.junling=='junling5'?1:0;});
var next=game.createEvent('hideCharacter');
next.player=this;
next.toHide=name;
+ next.num=num;
+ next.log=log;
next.setContent('hideCharacter');
return next;
},
From 6089e922aa77ec57af05ff1cd34c6240409c6ff1 Mon Sep 17 00:00:00 2001
From: mengxinzxz <2223529500@qq.com>
Date: Fri, 5 Apr 2024 00:01:49 +0800
Subject: [PATCH 12/35] minor fix
---
mode/guozhan.js | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/mode/guozhan.js b/mode/guozhan.js
index 465149e78..9322ee925 100644
--- a/mode/guozhan.js
+++ b/mode/guozhan.js
@@ -144,8 +144,11 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
for(var i in lib.character){
if(lib.character[i][1]=='shen'){
if(lib.character[i][4]){
- var group=lib.character[i][4].find(group=>lib.group.includes(group)||group=='key');
- if(group) lib.character[i][1]=group;
+ var group=lib.character[i][4].find(group=>lib.group.includes(group)||group=='key'||group.startsWith('gzgroup:'));
+ if(group){
+ if(group.startsWith('gzgroup:')) lib.character[i][1]=group.slice(8);
+ else lib.character[i][1]=group;
+ }
else lib.character[i][1]='qun';
}
else lib.character[i][1]='qun';
@@ -600,7 +603,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
gz_gaoshun:['male','qun',4,['fakexunxi','fakehuanjia']],
gz_jin_jiachong:['male','jin',3,['fakexiongshu','fakejianhui']],
gz_jin_yanghu:['male','jin',4,['fakechongxin','fakeweirong']],
- }
+ },
},
skill:{
//官盗2023
From b66a32b915f430b3a4add413b20acdcca5abb5bd Mon Sep 17 00:00:00 2001
From: mengxinzxz <2223529500@qq.com>
Date: Fri, 5 Apr 2024 00:11:52 +0800
Subject: [PATCH 13/35] =?UTF-8?q?=E5=9B=BD=E6=88=98=E6=A8=A1=E5=BC=8F?=
=?UTF-8?q?=E6=B7=BB=E5=8A=A0lib.yingbian=5Fguozhan=EF=BC=8C=E7=94=A8?=
=?UTF-8?q?=E4=BB=A5=E7=BB=99=E5=BA=94=E5=8F=98=E6=A8=A1=E5=BC=8F=E5=8D=95?=
=?UTF-8?q?=E7=8B=AC=E6=B7=BB=E5=8A=A0/=E8=A6=86=E7=9B=96=E6=AD=A6?=
=?UTF-8?q?=E5=B0=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
mode/guozhan.js | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/mode/guozhan.js b/mode/guozhan.js
index 9322ee925..d13d0f6f0 100644
--- a/mode/guozhan.js
+++ b/mode/guozhan.js
@@ -88,6 +88,13 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
case 'yingbian':
lib.card.list=lib.guozhanPile_yingbian.slice(0);
delete lib.translate.shuiyanqijunx_info_guozhan;
+ const pack=lib.yingbian_guozhan;
+ for(const i in pack){
+ if(!pack[i][4]) pack[i][4]=[];
+ lib.character[i]=pack[i];
+ lib.characterPack.mode_guozhan[i]=pack[i];
+ if(!lib.translate[i]) lib.translate[i]=lib.translate[i.slice(3)];
+ }
break;
case 'normal':lib.card.list=lib.guozhanPile.slice(0);break;
}
@@ -124,14 +131,19 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
game.broadcastAll((mode,separatism)=>{
_status.mode=mode;
if(separatism) _status.separatism=true;
+ var pack=lib.characterPack.mode_guozhan;
if(mode=='yingbian'){
delete lib.translate.shuiyanqijunx_info_guozhan;
+ const pack2=lib.yingbian_guozhan;
+ for(const i in pack2){
+ if(!pack2[i][4]) pack2[i][4]=[];
+ pack[i]=pack2[i];
+ }
}
for(var i=0;i
Date: Fri, 5 Apr 2024 01:35:00 +0800
Subject: [PATCH 14/35] =?UTF-8?q?=E5=9B=BD=E6=88=98=E6=99=8B=E5=8F=B8?=
=?UTF-8?q?=E9=A9=AC=E6=87=BF=E3=80=81=E6=9D=9C=E9=A2=84=E3=80=81=E6=9D=A8?=
=?UTF-8?q?=E8=89=B3=E3=80=81=E5=8F=B8=E9=A9=AC=E5=B8=88?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
mode/guozhan.js | 208 ++++++++++++++++++++++++++++++++++++++++--------
1 file changed, 174 insertions(+), 34 deletions(-)
diff --git a/mode/guozhan.js b/mode/guozhan.js
index d13d0f6f0..8fcf2e71b 100644
--- a/mode/guozhan.js
+++ b/mode/guozhan.js
@@ -385,6 +385,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
},
yingbian_guozhan:{
gz_sp_duyu:['male','qun',4,['fakezhufu']],
+ gz_yangyan:['female','jin',3,['fakexuanbei','xianwan']],
},
characterSort:{
mode_guozhan:{
@@ -571,7 +572,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
gz_jun_caocao:['male','wei',4,['jianan','huibian','gzzongyu','wuziliangjiangdao'],[]],
gz_jin_zhangchunhua:['female','jin',3,['gzhuishi','gzqingleng']],
- gz_jin_simayi:['male','jin',3,['gzquanbian','smyyingshi','gzxiongzhi']],
+ gz_jin_simayi:['male','jin',3,['fakequanbian','smyyingshi','fakezhouting']],
gz_jin_wangyuanji:['female','jin',3,['yanxi']],
gz_jin_simazhao:['male','jin',3,['zhaoran','gzchoufa']],
gz_jin_xiahouhui:['female','jin',3,['jyishi','shiduo']],
@@ -2889,6 +2890,146 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
return Math.max(1,Math.min(player.maxHp,num));
},
},
+ fakequanbian:{
+ audio:'quanbian',
+ trigger:{player:['useCard','respond']},
+ filter(event,player){
+ if(!Array.from(ui.cardPile.childNodes).length) return false;
+ return player.countCards('h')&&_status.currentPhase==player;
+ },
+ async cost(event,trigger,player){
+ const cards=Array.from(ui.cardPile.childNodes);
+ const {result:{bool,moved}}=await player.chooseToMove(get.prompt2('fakequanbian'))
+ .set('list',[
+ ['牌堆顶',cards.slice(0,Math.min(player.maxHp,cards.length)),'fakequanbian_tag'],
+ ['手牌',player.getCards('h')],
+ ]).set('filterOk',moved=>moved[1].filter(i=>!get.owner(i)).length==1)
+ .set('filterMove',(from,to)=>typeof to!='number').set('processAI',list=>{
+ const player=get.event('player'),goon=player.hasSkill('fakezhouting');
+ let cards1=list[0][1].slice(),cards2=list[1][1].slice();
+ let card1=cards1.slice().sort((a,b)=>get[goon?'useful':'value'](goon?a:b)-get[goon?'useful':'value'](goon?b:a))[0];
+ let card2=cards2.slice().sort((a,b)=>get[goon?'useful':'value'](goon?b:a)-get[goon?'useful':'value'](goon?a:b))[0];
+ if(get[goon?'useful':'value'](card1)*(goon?-1:1)get.owner(i))[0],
+ moved[1].filter(i=>!get.owner(i))[0],
+ ],
+ };
+ }
+ else event.result={bool:false};
+ },
+ async content(event,trigger,player){
+ await player.lose(event.cost_data[0],ui.cardPile).set('insert_index',()=>{
+ return ui.cardPile.childNodes[Array.from(ui.cardPile.childNodes).indexOf(get.event('card2'))];
+ }).set('card2',event.cost_data[1]);
+ await player.gain(event.cost_data[1],'gain2');
+ },
+ },
+ fakezhouting:{
+ unique:true,
+ limited:true,
+ audio:'xiongzhi',
+ enable:'phaseUse',
+ skillAnimation:true,
+ animationColor:'thunder',
+ async content(event,trigger,player){
+ player.awakenSkill('fakezhouting');
+ let gains=[];
+ const cards=Array.from(ui.cardPile.childNodes).slice(0,Math.min(player.maxHp,Array.from(ui.cardPile.childNodes).length));
+ await game.cardsGotoOrdering(cards);
+ for(const card of cards){
+ if(player.hasUseTarget(card,false,false)){
+ await player.chooseUseTarget(card,true,false,'nodistance');
+ }
+ else gains.push(card);
+ }
+ if(gains.length) await player.gain(gains,'gain2');
+ if(game.getGlobalHistory('everything',evt=>{
+ return evt.name=='die'&&evt.getParent(6).name=='fakezhouting'&&evt.getParent(6).player==player;
+ }).length) player.restoreSkill('fakezhouting');
+ },
+ ai:{
+ order:1,
+ result:{
+ player(player){
+ return player.hasUnknown()?0:1;
+ },
+ },
+ },
+ },
+ fakexuanbei:{
+ audio:'xuanbei',
+ trigger:{player:'showCharacterEnd'},
+ filter(event,player){
+ return game.getAllGlobalHistory('everything',evt=>{
+ return evt.name=='showCharacter'&&evt.toShow.some(i=>get.character(i,3).includes('fakexuanbei'));
+ },event).indexOf(event)==0;
+ },
+ forced:true,
+ locked:false,
+ async content(event,trigger,player){
+ await player.draw(2);
+ player.addTempSkill('fakexuanbei_effect');
+ },
+ group:['fakexuanbei_change','fakexuanbei_give'],
+ subSkill:{
+ effect:{
+ charlotte:true,
+ mark:true,
+ intro:{content:'使用应变牌时直接获得强化,使用合纵牌时摸一张牌。'},
+ },
+ give:{
+ audio:'xuanbei',
+ trigger:{player:'useCardAfter'},
+ filter(event,player){
+ return (event.card.yingbian||get.is.yingbian(event.card))&&event.cards.filterInD().length;
+ },
+ usable:1,
+ async cost(event,trigger,player){
+ const cards=trigger.cards.filterInD();
+ const {result:{bool,targets}}=await player.chooseTarget(get.prompt('fakexuanbei'),'令一名其他角色获得'+get.translation(event.cards),lib.filter.notMe).set('ai',target=>{
+ const att=get.attitude(get.event('player'),target);
+ if(att<0) return 0;
+ if(target.hasJudge('lebu')) att/=2;
+ if(target.hasSkillTag('nogain')) att/=10;
+ return att/(1+get.distance(player,target,'absolute'));
+ });
+ event.result={bool:bool,targets:targets,cards:cards};
+ },
+ async content(event,trigger,player){
+ await event.targets[0].gain(event.cards,'gain2').set('giver',player);
+ },
+ },
+ change:{
+ audio:'xuanbei',
+ trigger:{player:'die'},
+ direct:true,
+ forceDie:true,
+ skillAnimation:true,
+ animationColor:'thunder',
+ async cost(event,trigger,player){
+ const {result:{bool,targets}}=await player.chooseTarget(get.prompt('fakexuanbei'),'令一名其他角色变更副将',lib.filter.notMe).set('ai',target=>{
+ const player=get.event('player');
+ const rank=get.guozhanRank(target.name2,target)<=3;
+ const att=get.attitude(player,target);
+ if(att>0) return (4-rank)*att;
+ return -(rank-6)*att;
+ }).set('forceDie',true);
+ event.result={bool:bool,targets:targets};
+ },
+ async content(event,trigger,player){
+ await event.targets[0].changeVice();
+ },
+ },
+ },
+ },
//国战典藏2023补充
//吕范
gzdiaodu:{
@@ -4935,7 +5076,6 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
gzyimie:{
audio:'yimie',
inherit:'yimie',
- round:1,
init:function(player){
if(player.checkMainSkill('gzyimie')){
player.removeMaxHp(2);
@@ -5004,19 +5144,29 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
gzsanchen:{
audio:'sanchen',
enable:'phaseUse',
- usable:1,
- filter:function(event,player){
+ filter(event,player){
var stat=player.getStat('sanchen');
return game.hasPlayer(function(current){
return (!stat||!stat.includes(current));
});
},
- filterTarget:function(card,player,target){
+ filterTarget(card,player,target){
var stat=player.getStat('sanchen');
return (!stat||!stat.includes(target));
},
- content:function(){
+ usable:1,
+ content(){
'step 0'
+ if(!player._fakesanchen){
+ player._fakesanchen=true;
+ player.when({global:'phaseAfter'})
+ .then(()=>{
+ delete player._fakesanchen;
+ if(player.hasMark('gzsanchen')){
+ player.removeMark('gzsanchen',player.countMark('gzsanchen'),false);
+ }
+ });
+ }
var stat=player.getStat();
if(!stat.sanchen) stat.sanchen=[];
stat.sanchen.push(target);
@@ -5037,20 +5187,20 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
if(list.length==result.cards.length){
target.draw();
player.getStat('skill').gzsanchen--;
- player.addMark('gzsanchen',1);
+ player.addMark('gzsanchen',1,false);
}
}
else{
target.draw();
- player.getStat('skill').sanchen--;
- player.addMark('gzsanchen',1);
+ player.getStat('skill').gzsanchen--;
+ player.addMark('gzsanchen',1,false);
}
},
ai:{
order:9,
threaten:1.7,
result:{
- target:function(player,target){
+ target(player,target){
if(target.hasSkillTag('nogain')) return 0.1;
return Math.sqrt(target.countCards('he'));
},
@@ -5066,35 +5216,20 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
audio:'pozhu',
enable:'phaseUse',
mainSkill:true,
- init:function(player){
- if(player.checkMainSkill('gzpozhu')){
- player.removeMaxHp();
- }
+ init(player){
+ if(player.checkMainSkill('gzpozhu')) player.removeMaxHp();
},
- viewAsFilter:function(player){
+ viewAsFilter(player){
return !player.hasSkill('pozhu3',null,null,false)&&player.countMark('gzsanchen')>0&&player.countCards('hs')>0;
},
viewAs:{name:'chuqibuyi'},
filterCard:true,
position:'hs',
- check:function(card){
+ check(card){
return 7-get.value(card);
},
- onuse:function(result,player){
- player.removeMark('gzsanchen',1);
- },
- group:'gzpozhu2',
- },
- gzpozhu2:{
- trigger:{player:'useCardAfter'},
- silent:true,
- filter:function(event,player){
- return event.skill=='gzpozhu'&&!player.getHistory('sourceDamage',function(evt){
- return evt.card==event.card;
- }).length;
- },
- content:function(){
- player.addTempSkill('pozhu3');
+ onuse(result,player){
+ player.removeMark('gzsanchen',1,false);
},
},
//钟琰
@@ -17170,11 +17305,11 @@ return event.junling=='junling5'?1:0;});
gzbolan:'博览',
gzbolan_info:'每名角色的出牌阶段限一次。其可以随机展示武将牌堆顶的一张武将牌,然后根据此武将牌包含的势力选择获得一个技能直到回合结束:魏:〖奇策〗;蜀:〖挑衅〗;吴:〖制衡〗;群:〖除疠〗;晋:〖三陈〗。若该角色不为你,则其失去1点体力。',
gzsanchen:'三陈',
- gzsanchen_info:'出牌阶段,你可选择一名本回合内未选择过的角色。其摸三张牌,然后弃置三张牌。若其未以此法弃置牌或以此法弃置的牌的类别均不相同,则你获得一枚“陈”且其摸一张牌;否则你本阶段内不能再发动〖三陈〗。',
+ gzsanchen_info:'出牌阶段,你可选择一名本回合内未选择过的角色。其摸三张牌,然后弃置三张牌。若其未以此法弃置牌或以此法弃置的牌的类别均不相同,则你于本回合获得一枚“陈”且其摸一张牌;否则你本阶段内不能再发动〖三陈〗。',
gzpozhu:'破竹',
- gzpozhu_info:'主将技。此武将牌减少半个阴阳鱼。出牌阶段,你可以移去一枚“陈”并将一张手牌当做【出其不意】使用。若你未因此牌造成过伤害,则你不能再发动〖破竹〗直到回合结束。',
+ gzpozhu_info:'主将技。此武将牌减少半个阴阳鱼。出牌阶段,你可以移去一枚“陈”并将一张手牌当做【出其不意】使用。',
gzyimie:'夷灭',
- gzyimie_info:'主将技,此武将牌减少一整个阴阳鱼。每轮限一次,当你对其他角色造成伤害时,若伤害值X小于Y,则你可失去1点体力,将伤害值改为Y。此伤害结算结束后,其回复(Y-X)点体力。(Y为其体力值)',
+ gzyimie_info:'主将技,此武将牌减少一整个阴阳鱼。每回合限一次,当你对其他角色造成伤害时,若伤害值X小于Y,则你可失去1点体力,将伤害值改为Y。此伤害结算结束后,其回复(Y-X)点体力。(Y为其体力值)',
gztairan:'泰然',
gztairan_info:'出牌阶段开始时,你可以失去任意点体力并弃置任意张牌(弃牌数不能大于你已损失的体力值)。若如此做,本回合结束时,你回复等量的体力并摸等量的牌。',
gzxuanbei:'选备',
@@ -17369,6 +17504,11 @@ return event.junling=='junling5'?1:0;});
gz_jin_jiachong:'贾充',
gz_jin_yanghu:'羊祜',
gz_wangling:'王淩',
+ fakequanbian:'权变',
+ fakequanbian_tag:'牌堆顶',
+ fakequanbian_info:'当你于回合内使用或打出牌时,你可以将一张手牌与牌堆顶X张牌的其中一张进行交换(X为你的体力上限)。',
+ fakezhouting:'骤霆',
+ fakezhouting_info:'限定技,出牌阶段,你可以依次使用牌堆顶X张牌中所有可以使用的牌,然后获得其中不能使用的牌,然后若有角色因此死亡,则你重置〖骤霆〗(X为你的体力上限)。',
guozhan_default:"国战标准",
guozhan_zhen:"君临天下·阵",
From bfe1e870550803c95a112765325add6a9ef984b6 Mon Sep 17 00:00:00 2001
From: mengxinzxz <2223529500@qq.com>
Date: Fri, 5 Apr 2024 02:15:33 +0800
Subject: [PATCH 15/35] =?UTF-8?q?=E5=9B=BD=E6=88=98=E6=99=8B=E5=BC=A0?=
=?UTF-8?q?=E6=98=A5=E5=8D=8E=E3=80=81=E5=BC=A0=E8=99=8E=E4=B9=90=E7=B6=9D?=
=?UTF-8?q?=E3=80=81=E5=AE=A3=E5=85=AC=E4=B8=BB?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
mode/guozhan.js | 251 +++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 246 insertions(+), 5 deletions(-)
diff --git a/mode/guozhan.js b/mode/guozhan.js
index 8fcf2e71b..1a98ac61c 100644
--- a/mode/guozhan.js
+++ b/mode/guozhan.js
@@ -571,14 +571,14 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
gz_zhangxiu:['male','qun',4,['gzfudi','gzcongjian'],['gzskin']],
gz_jun_caocao:['male','wei',4,['jianan','huibian','gzzongyu','wuziliangjiangdao'],[]],
- gz_jin_zhangchunhua:['female','jin',3,['gzhuishi','gzqingleng']],
+ gz_jin_zhangchunhua:['female','jin',3,['gzhuishi','fakeqingleng']],
gz_jin_simayi:['male','jin',3,['fakequanbian','smyyingshi','fakezhouting']],
gz_jin_wangyuanji:['female','jin',3,['yanxi']],
gz_jin_simazhao:['male','jin',3,['zhaoran','gzchoufa']],
gz_jin_xiahouhui:['female','jin',3,['jyishi','shiduo']],
gz_jin_simashi:['male','jin',5,['gzyimie','gztairan']],
gz_duyu:['male','jin',4,['gzsanchen','gzpozhu']],
- gz_zhanghuyuechen:['male','jin',4,['xijue']],
+ gz_zhanghuyuechen:['male','jin',4,['fakexijue']],
gz_jin_yanghuiyu:['female','jin',3,['ciwei','gzcaiyuan']],
gz_simazhou:['male','jin',4,['recaiwang','naxiang']],
gz_shibao:['male','jin',4,['gzzhuosheng']],
@@ -586,7 +586,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
gz_zhongyan:['female','jin',3,['gzbolan','yifa']],
gz_yangyan:['female','jin',3,['gzxuanbei','xianwan']],
gz_zuofen:['female','jin',3,['gzzhaosong','gzlisi']],
- gz_xuangongzhu:['female','jin',3,['qimei','ybzhuiji']],
+ gz_xuangongzhu:['female','jin',3,['fakeqimei','ybzhuiji']],
gz_xinchang:['male','jin',3,['canmou','congjian']],
gz_yangzhi:['female','jin',3,['gzwanyi','gzmaihuo']],
@@ -648,7 +648,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
async content(event,trigger,player){
const num=trigger.player.countCards('e'),num2=event.cards.length;
await player.chooseToDiscard(trigger.player,'e',num2,true);
- if(num2>num) trigger.player.damage();
+ if(num2>num) await trigger.player.damage();
},
},
fakeduanbing:{
@@ -3030,6 +3030,239 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
},
},
},
+ fakeqingleng:{
+ audio:'qingleng',
+ trigger:{global:'phaseEnd'},
+ filter(event,player){
+ var target=event.player;
+ return target!=player&&target.isIn()&&!target.isUnseen(2)&&player.countCards('he')&&player.canUse({name:'sha',nature:'ice'},target,false);
+ },
+ direct:true,
+ preHidden:true,
+ async content(event,trigger,player){
+ const target=trigger.player;
+ const {result:{bool}}=await player.chooseToUse()
+ .set('openskilldialog',get.prompt2('fakeqingleng',target))
+ .set('norestore',true).set('_backupevent','fakeqingleng_backup')
+ .set('custom',{
+ add:{},
+ replace:{window:function(){}}
+ }).set('targetRequired',true).set('complexSelect',true)
+ .set('filterTarget',function(card,player,target){
+ if(target!=_status.event.sourcex&&!ui.selected.targets.includes(_status.event.sourcex)) return false;
+ return lib.filter.targetEnabled.apply(this,arguments);
+ }).set('sourcex',target).set('addCount',false)
+ .backup('fakeqingleng_backup').set('logSkill',['fakeqingleng',target]);
+ if(bool&&!player.getHistory('sourceDamage',evt=>{
+ return evt.getParent(4)==event;
+ }).length){
+ const {result:{bool,links}}=await player.chooseButton([
+ '清冷:暗置'+get.translation(target)+'的一张武将牌',
+ ''+get.translation(target)+'的武将牌
',
+ [[target.name1,target.name2],'character'],
+ ],true).set('filterButton',button=>!get.is.jun(button.link));
+ if(bool){
+ player.addSkill('fakeqingleng_effect');
+ if(player.getStorage('fakeqingleng_effect').some(list=>list[0]==target)){
+ player.storage.fakeqingleng_effect.indexOf(player.getStorage('fakeqingleng_effect').find(list=>list[0]==target))[1].addArray(links);
+ }
+ else player.markAuto('fakeqingleng_effect',[[target,links[0]]]);
+ target.when(['phaseBegin','die'])
+ .vars({target:player}).then(()=>{
+ const removes=target.getStorage('fakeqingleng_effect').filter(list=>list[0]==player);
+ target.unmarkAuto('fakeqingleng_effect',removes);
+ if(!target.getStorage('fakeqingleng_effect').length){
+ target.removeSkill('fakeqingleng_effect');
+ }
+ });
+ await target.hideCharacter(target.name1==links[0]?0:1);
+ }
+ }
+ },
+ subSkill:{
+ backup:{
+ filterCard:true,
+ check(card){
+ return 7.5-get.value(card);
+ },
+ position:'he',
+ popname:true,
+ viewAs:{name:'sha',nature:'ice'},
+ precontent(){
+ delete event.result.skill;
+ },
+ },
+ effect:{
+ charlotte:true,
+ onremove:true,
+ intro:{
+ content(storage){
+ return '•'+storage.map(list=>{
+ return get.translation(list[0])+'明置'+get.translation(list[1])+'后,对其造成1点伤害';
+ }).join('
•');
+ },
+ },
+ audio:'qingleng',
+ trigger:{global:'showCharacterEnd'},
+ filter(event,player){
+ const list=player.getStorage('fakeqingleng_effect').find(list=>list[0]==event.player);
+ return list&&list[1].includes(event.toShow);
+ },
+ forced:true,
+ logTarget:'player',
+ content(){
+ trigger.player.damage();
+ },
+ },
+ },
+ },
+ fakexijue:{
+ audio:'xijue',
+ trigger:{player:'showCharacterEnd'},
+ filter(event,player){
+ return game.getAllGlobalHistory('everything',evt=>{
+ return evt.name=='showCharacter'&&evt.toShow.some(i=>get.character(i,3).includes('fakexijue'));
+ },event).indexOf(event)==0;
+ },
+ forced:true,
+ popup:false,
+ preHidden:['xijue_tuxi','fakexijue_xiaoguo'],
+ content(){
+ player.addMark('xijue',2);
+ },
+ derivation:['xijue_tuxi','fakexijue_xiaoguo'],
+ group:['fakexijue_effect','xijue_tuxi','fakexijue_xiaoguo'],
+ subSkill:{
+ effect:{
+ audio:'xijue',
+ trigger:{player:['phaseDrawBegin2','phaseEnd']},
+ filter(event,player){
+ if(event.name=='phaseDraw') return !event.numFixed;
+ return player.getHistory('sourceDamage').length;
+ },
+ forced:true,
+ popup:false,
+ content(){
+ if(trigger.name=='phaseDraw') trigger.num=Math.min(player.countMark('xijue'),player.maxHp);
+ else player.addMark('xijue',1);
+ },
+ },
+ xiaoguo:{
+ audio:'xijue_xiaoguo',
+ trigger:{global:'phaseZhunbeiBegin'},
+ filter(event,player){
+ if(!player.hasMark('xijue')) return false;
+ return event.player!=player&&player.countCards('h',card=>{
+ if(_status.connectMode) return true;
+ return get.type(card)=='basic'&&lib.filter.cardDiscardable(card,player);
+ });
+ },
+ async cost(event,trigger,player){
+ event.result=await player.chooseToDiscard(get.prompt('fakexijue_xiaoguo',trigger.player),(card,player)=>{
+ return get.type(card)=='basic';
+ },[1,Math.min(player.countMark('xijue'),player.maxHp)]).set('complexSelect',true).set('ai',card=>{
+ const player=get.event('player'),target=get.event().getTrigger().player;
+ const effect=get.damageEffect(target,player,player);
+ const cards=target.getCards('e',card=>get.attitude(player,target)*get.value(card,target)<0);
+ if(effect<=0&&!cards.length) return 0;
+ if(ui.selected.cards.length>cards.length-(effect<=0?1:0)) return 0;
+ return 1/(get.value(card)||0.5);
+ }).set('logSkill',['fakexiaoguo',trigger.player]).setHiddenSkill('fakexijue_xiaoguo').forResult();
+ },
+ preHidden:true,
+ async content(event,trigger,player){
+ const num=trigger.player.countCards('e'),num2=event.cards.length;
+ await player.chooseToDiscard(trigger.player,'e',num2,true);
+ if(num2>num) await trigger.player.damage();
+ player.removeMark('xijue',1);
+ },
+ },
+ },
+ },
+ fakeqimei:{
+ audio:'qimei',
+ trigger:{player:'phaseZhunbeiBegin'},
+ direct:true,
+ preHidden:true,
+ content(){
+ 'step 0'
+ player.chooseTarget(get.prompt('fakeqimei'),'选择一名其他角色并获得“齐眉”效果',lib.filter.notMe).set('ai',target=>{
+ var player=_status.event.player;
+ return get.attitude(player,target)/(Math.abs(player.countCards('h')+2-target.countCards('h'))+1)
+ }).setHiddenSkill('fakeqimei');
+ 'step 1'
+ if(result.bool){
+ var target=result.targets[0];
+ player.logSkill('fakeqimei',target);
+ player.addTempSkill('fakeqimei_draw');
+ player.storage.fakeqimei_draw=target;
+ game.delayx();
+ }
+ },
+ subSkill:{
+ draw:{
+ audio:'fakeqimei',
+ charlotte:true,
+ forced:true,
+ popup:false,
+ trigger:{global:['equipAfter','addJudgeAfter','gainAfter','loseAsyncAfter','loseAfter','addToExpansionAfter']},
+ filter(event,player){
+ var target=player.storage.fakeqimei_draw;
+ if(!target||!target.isIn()) return false;
+ if(player.countCards('h')!=target.countCards('h')) return false;
+ var hasChange=function(event,player){
+ var gain=0,lose=0;
+ if(event.getg) gain=event.getg(player).length;
+ if(event.getl) lose=event.getl(player).hs.length;
+ return gain!=lose;
+ };
+ return (hasChange(event,player)&&target.isDamaged())||(hasChange(event,target)&&player.isDamaged());
+ },
+ content(){
+ 'step 0'
+ if(trigger.delay===false) game.delayx();
+ 'step 1'
+ var target=player.storage.fakeqimei_draw;
+ player.logSkill('fakeqimei_draw',target);
+ var drawer=[];
+ var hasChange=function(event,player){
+ var gain=0,lose=0;
+ if(event.getg) gain=event.getg(player).length;
+ if(event.getl) lose=event.getl(player).hs.length;
+ return gain!=lose;
+ };
+ if(hasChange(trigger,player)) drawer.push(target);
+ if(hasChange(trigger,target)) drawer.push(player);
+ for(const i of drawers){
+ if(i.isDamaged()) i.recover();
+ }
+ },
+ group:'fakeqimei_hp',
+ onremove:true,
+ mark:'character',
+ intro:{content:'已和$组成齐眉组合'},
+ },
+ hp:{
+ audio:'fakeqimei',
+ trigger:{global:'changeHp'},
+ charlotte:true,
+ forced:true,
+ logTarget(event,player){
+ return player.storage.fakeqimei_draw;
+ },
+ filter(event,player){
+ var target=player.storage.fakeqimei_draw;
+ if(!target||!target.isIn()) return false;
+ if(player!=event.player&&target!=event.player) return false;
+ return player.hp==target.hp;
+ },
+ content(){
+ game.delayx();
+ (player==trigger.player?player.storage.fakeqimei_draw:player).draw();
+ },
+ },
+ },
+ },
//国战典藏2023补充
//吕范
gzdiaodu:{
@@ -17299,7 +17532,7 @@ return event.junling=='junling5'?1:0;});
gzhuishi:'慧识',
gzhuishi_info:'摸牌阶段,你可以放弃摸牌,改为观看牌堆顶的X张牌,获得其中的一半(向下取整),然后将其余牌置入牌堆底。(X为弃牌堆顶的两张牌的名称字数之和)',
gzqingleng:'清冷',
- gzqingleng_info:'一名角色的回合结束时,若其有未明置的,则你可将一张牌当无距离限制的冰属性【杀】对其使用;若其所有武将牌均未明置,则你摸一张牌。',
+ gzqingleng_info:'一名角色的回合结束时,若其有未明置的武将牌,则你可将一张牌当无距离限制的冰属性【杀】对其使用;若其所有武将牌均未明置,则你摸一张牌。',
gzchoufa:'筹伐',
gzchoufa_info:'出牌阶段限一次,你可展示一名其他角色的一张手牌A。你令其所有类型与A不同的手牌的牌名均视为【杀】且均视为无属性直到本回合结束。',
gzbolan:'博览',
@@ -17509,6 +17742,14 @@ return event.junling=='junling5'?1:0;});
fakequanbian_info:'当你于回合内使用或打出牌时,你可以将一张手牌与牌堆顶X张牌的其中一张进行交换(X为你的体力上限)。',
fakezhouting:'骤霆',
fakezhouting_info:'限定技,出牌阶段,你可以依次使用牌堆顶X张牌中所有可以使用的牌,然后获得其中不能使用的牌,然后若有角色因此死亡,则你重置〖骤霆〗(X为你的体力上限)。',
+ fakeqingleng:'清冷',
+ fakeqingleng_info:'其他角色的结束阶段,若其武将牌均明置,则你可以将一张牌当作冰【杀】对其使用(无距离限制)。然后若此牌未对其造成伤害,则你暗置其一张武将牌,且直到其下个回合开始,其明置此武将牌时,你对其造成1点伤害。',
+ fakexijue:'袭爵',
+ fakexijue_info:'①当你首次明置此武将牌时,你获得2枚“爵”标记。②回合结束时,若你本回合造成过伤害,则你获得1枚“爵”标记。③你可以于合适的时机发动〖突袭〗或〖骁果〗(至多弃置X张基本牌),然后移去1枚“爵”标记。④摸牌阶段,你改为摸X张牌。(X为你的“爵”标记数,且X至多为你的体力上限)',
+ fakexijue_xiaoguo:'骁果',
+ fakexijue_xiaoguo_info:'一名其他角色的准备阶段,你可以弃置至多X张基本牌(X为你的“爵”标记数,且X至多为你的体力上限),然后弃置其装备区等量的牌,若其装备区的牌数小于你弃置的牌数,则你对其造成1点伤害。',
+ fakeqimei:'齐眉',
+ fakeqimei_info:'准备阶段,你可以选择一名其他角色。若如此做,直到回合结束:当你或其获得牌/失去手牌后,若你与其手牌数相等,则另一名角色回复1点体力;当你或其的体力值变化后,若你与其体力值相等,则另一名角色摸一张牌。',
guozhan_default:"国战标准",
guozhan_zhen:"君临天下·阵",
From 3de22b4a9afae2a7376e3079534fb3615ed08f82 Mon Sep 17 00:00:00 2001
From: mengxinzxz <2223529500@qq.com>
Date: Fri, 5 Apr 2024 02:17:30 +0800
Subject: [PATCH 16/35] bugfix
---
mode/guozhan.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mode/guozhan.js b/mode/guozhan.js
index 1a98ac61c..63f143eb4 100644
--- a/mode/guozhan.js
+++ b/mode/guozhan.js
@@ -3201,7 +3201,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
},
subSkill:{
draw:{
- audio:'fakeqimei',
+ audio:'qimei',
charlotte:true,
forced:true,
popup:false,
@@ -3243,7 +3243,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
intro:{content:'已和$组成齐眉组合'},
},
hp:{
- audio:'fakeqimei',
+ audio:'qimei',
trigger:{global:'changeHp'},
charlotte:true,
forced:true,
From 9c17321941e2163f3016381a3db3ce4f0bf0a8f6 Mon Sep 17 00:00:00 2001
From: mengxinzxz <2223529500@qq.com>
Date: Fri, 5 Apr 2024 12:43:34 +0800
Subject: [PATCH 17/35] =?UTF-8?q?=E5=9B=BD=E6=88=98=E6=99=8B=E5=A4=8F?=
=?UTF-8?q?=E4=BE=AF=E5=BE=BD=E3=80=81=E7=BE=8A=E5=BE=BD=E7=91=9C=E3=80=81?=
=?UTF-8?q?=E7=8E=8B=E5=85=83=E5=A7=AC?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
mode/guozhan.js | 296 ++++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 289 insertions(+), 7 deletions(-)
diff --git a/mode/guozhan.js b/mode/guozhan.js
index 63f143eb4..7ad6a59c6 100644
--- a/mode/guozhan.js
+++ b/mode/guozhan.js
@@ -573,13 +573,13 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
gz_jin_zhangchunhua:['female','jin',3,['gzhuishi','fakeqingleng']],
gz_jin_simayi:['male','jin',3,['fakequanbian','smyyingshi','fakezhouting']],
- gz_jin_wangyuanji:['female','jin',3,['yanxi']],
+ gz_jin_wangyuanji:['female','jin',3,['fakeyanxi','fakeshiren']],
gz_jin_simazhao:['male','jin',3,['zhaoran','gzchoufa']],
- gz_jin_xiahouhui:['female','jin',3,['jyishi','shiduo']],
+ gz_jin_xiahouhui:['female','jin',3,['fakebaoqie','jyishi','shiduo']],
gz_jin_simashi:['male','jin',5,['gzyimie','gztairan']],
gz_duyu:['male','jin',4,['gzsanchen','gzpozhu']],
gz_zhanghuyuechen:['male','jin',4,['fakexijue']],
- gz_jin_yanghuiyu:['female','jin',3,['ciwei','gzcaiyuan']],
+ gz_jin_yanghuiyu:['female','jin',3,['fakeciwei','fakehuirong']],
gz_simazhou:['male','jin',4,['recaiwang','naxiang']],
gz_shibao:['male','jin',4,['gzzhuosheng']],
gz_weiguan:['male','jin',3,['zhongyun','shenpin']],
@@ -1159,7 +1159,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
filter(event,player){
if(!event.toShow.some(i=>get.character(i,3).includes('fakeyigui'))) return false;
return game.getAllGlobalHistory('everything',evt=>{
- return evt.name=='showCharacter'&&evt.toShow.some(i=>get.character(i,3).includes('fakeyigui'));
+ return evt.name=='showCharacter'&&evt.player==player&&evt.toShow.some(i=>get.character(i,3).includes('fakeyigui'));
},event).indexOf(event)==0;
},
forced:true,
@@ -2064,7 +2064,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
trigger:{player:'showCharacterEnd'},
filter(event,player){
if(game.getAllGlobalHistory('everything',evt=>{
- return evt.name=='showCharacter'&&evt.toShow.some(i=>get.character(i,3).includes('fakedujin'));
+ return evt.name=='showCharacter'&&evt.player==player&&evt.toShow.some(i=>get.character(i,3).includes('fakedujin'));
},event).indexOf(event)!=0) return false;
return game.getAllGlobalHistory('everything',evt=>{
return evt.name=='showCharacter'&&evt.player.isFriendOf(player);
@@ -2969,7 +2969,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
trigger:{player:'showCharacterEnd'},
filter(event,player){
return game.getAllGlobalHistory('everything',evt=>{
- return evt.name=='showCharacter'&&evt.toShow.some(i=>get.character(i,3).includes('fakexuanbei'));
+ return evt.name=='showCharacter'&&evt.player==player&&evt.toShow.some(i=>get.character(i,3).includes('fakexuanbei'));
},event).indexOf(event)==0;
},
forced:true,
@@ -3121,7 +3121,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
trigger:{player:'showCharacterEnd'},
filter(event,player){
return game.getAllGlobalHistory('everything',evt=>{
- return evt.name=='showCharacter'&&evt.toShow.some(i=>get.character(i,3).includes('fakexijue'));
+ return evt.name=='showCharacter'&&evt.player==player&&evt.toShow.some(i=>get.character(i,3).includes('fakexijue'));
},event).indexOf(event)==0;
},
forced:true,
@@ -3263,6 +3263,278 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
},
},
},
+ fakebaoqie:{
+ audio:'baoqie',
+ trigger:{player:'showCharacterEnd'},
+ filter(event,player){
+ if(!game.hasPlayer(target=>{
+ return target.getGainableCards(player,'e').some(card=>get.subtype(card)=='equip5');
+ })) return false;
+ return game.getAllGlobalHistory('everything',evt=>{
+ return evt.name=='showCharacter'&&evt.player==player&&evt.toShow.some(i=>get.character(i,3).includes('fakebaoqie'));
+ },event).indexOf(event)==0;
+ },
+ async cost(event,trigger,player){
+ event.result=await player.chooseTarget(get.prompt('fakebaoqie'),'获得一名角色的宝物牌,然后你可以使用此牌',(card,player,target)=>{
+ return target.getGainableCards(player,'e').some(card=>get.subtype(card)=='equip5');
+ }).set('ai',target=>{
+ const player=get.event('player');
+ return -get.sgn(get.attitude(player,target))*target.getGainableCards(player,'e').filter(card=>{
+ return get.subtype(card)=='equip5';
+ }).reduce((sum,card)=>sum+get.value(card,target),0);
+ }).forResult();
+ },
+ async content(event,trigger,player){
+ const target=event.targets[0];
+ let cards=target.getGainableCards(player,'e').filter(card=>get.subtype(card)=='equip5');
+ await player.gain(cards,target,'giveAuto');
+ cards=cards.filter(i=>get.owner(i)==player&&get.position(i)=='h'&&player.hasUseTarget(i));
+ if(cards.length){
+ const {result:{bool,links}}=await player.chooseButton(['宝箧:是否使用其中一张宝物牌?',cards]).set('ai',button=>{
+ return get.equipValue(button.link,get.event('player'));
+ });
+ if(bool) await player.chooseUseTarget(card,true);
+ }
+ },
+ ai:{mingzhi_no:true},
+ group:'fakebaoqie_damage',
+ subSkill:{
+ damage:{
+ audio:'baoqie',
+ trigger:{player:'damageBegin4'},
+ filter(event,player){
+ if(!player.getStockSkills(true,true,true).includes('fakebaoqie')) return false;
+ return !game.getAllGlobalHistory('everything',evt=>{
+ return evt.name=='showCharacter'&&evt.player==player&&evt.toShow.some(i=>get.character(i,3).includes('fakebaoqie'));
+ }).length;
+ },
+ check(event,player){
+ return !event.source||get.damageEffect(player,event.source,player)<0;
+ },
+ prompt:'宝箧:是否明置此武将牌并防止此伤害?',
+ content(){
+ trigger.cancel();
+ },
+ },
+ },
+ },
+ fakeciwei:{
+ audio:'ciwei',
+ trigger:{global:'useCard'},
+ filter(event,player){
+ if(event.all_excluded||event.player==player||!player.countCards('he')) return false;
+ return event.player.getHistory('useCard').indexOf(event)%2==1;
+ },
+ async cost(event,trigger,player){
+ let str='弃置一张牌,取消'+get.translation(trigger.card)+'的所有目标';
+ if(get.type(trigger.card)=='equip') str+=',然后你获得此牌且你可以使用之';
+ event.result=await player.chooseToDiscard(get.prompt('fakeciwei',trigger.player),str,'he').set('ai',card=>{
+ return (_status.event.goon/1.4)-get.value(card);
+ }).set('goon',function(){
+ if(!trigger.targets.length) return -get.attitude(player,trigger.player);
+ var num=0;
+ for(var i of trigger.targets){
+ num-=get.effect(i,trigger.card,trigger.player,player);
+ }
+ return num;
+ }()).setHiddenSkill('fakeciwei').set('logSkill',['fakeciwei',trigger.player]).forResult();
+ },
+ preHidden:true,
+ popup:false,
+ async content(event,trigger,player){
+ trigger.targets.length=0;
+ trigger.all_excluded=true;
+ if(get.type(trigger.card)=='equip'&&!get.owner(trigger.card)){
+ await player.gain(trigger.card,'gain2');
+ if(get.owner(trigger.card)==player&&player.hasUseTarget(trigger.card)){
+ await player.chooseUseTarget(trigger.card);
+ }
+ }
+ },
+ global:'fakeciwei_ai',
+ subSkill:{
+ ai:{
+ mod:{
+ aiOrder(player,card,num){
+ if(!player.getHistory('useCard').length%2||!game.hasPlayer(current=>{
+ return current!=player&&(get.realAttitude||get.attitude)(current,player)<0&¤t.hasSkill('fakeciwei')&¤t.countCards('he')>0;
+ })) return;
+ if(!player._fakeciwei_temp){
+ player._fakeciwei_temp=true;
+ num/=Math.max(1,player.getUseValue(card));
+ }
+ delete player._fakeciwei_temp;
+ return num;
+ },
+ },
+ },
+ },
+ },
+ fakehuirong:{
+ audio:'huirong',
+ trigger:{player:'showCharacterEnd'},
+ filter(event,player){
+ if(!game.hasPlayer(target=>{
+ return target.countCards('h')!=target.getHp();
+ })) return false;
+ return game.getAllGlobalHistory('everything',evt=>{
+ return evt.name=='showCharacter'&&evt.player==player&&evt.toShow.some(i=>get.character(i,3).includes('fakehuirong'));
+ },event).indexOf(event)==0;
+ },
+ async cost(event,trigger,player){
+ event.result=await player.chooseTarget(get.prompt('fakehuirong'),'令一名角色将手牌数摸至/弃置至与其体力值相同',(card,player,target)=>{
+ return target.countCards('h')!=target.getHp();
+ }).set('ai',target=>{
+ const att=get.attitude(get.event('player'),target);
+ const num=target.countCards('h');
+ if(num>target.hp) return -att*(num-target.getHp());
+ return att*Math.max(0,target.getHp()-target.countCards('h'));
+ }).forResult();
+ },
+ preHidden:true,
+ content(){
+ const target=event.targets[0];
+ if(target.countCards('h'){
+ return evt.name=='showCharacter'&&evt.player==player&&evt.toShow.some(i=>get.character(i,3).includes('fakehuirong'));
+ }).length;
+ },
+ check(event,player){
+ return !event.source||get.damageEffect(player,event.source,player)<0;
+ },
+ prompt:'慧容:是否明置此武将牌并防止此伤害?',
+ content(){
+ trigger.cancel();
+ },
+ },
+ },
+ },
+ fakeyanxi:{
+ audio:'yanxi',
+ enable:'phaseUse',
+ filter(event,player){
+ return game.hasPlayer(target=>{
+ return get.info('fakeyanxi').filterTarget(null,player,target);
+ });
+ },
+ filterTarget(card,player,target){
+ return target!=player&&target.countCards('h');
+ },
+ async content(event,trigger,player){
+ const target=event.target,str=get.translation(target);
+ const {result:{bool,links}}=await player.choosePlayerCard(target,'宴戏:展示'+str+'的一张手牌','h',true);
+ if(bool){
+ let cards=get.cards(2),gains=[];
+ await game.cardsGotoOrdering(cards);
+ cards=links.slice().concat(cards);
+ await player.showCards(cards,get.translation(player)+'发动了【宴戏】');
+ for(const card of cards){
+ gains.unshift(get.color(card));
+ gains.add(get.type2(card));
+ }
+ gains=gains.unique().map(i=>i=='none'?'none2':i);
+ const {result:{control}}=await player.chooseControl(gains).set('cards',cards).set('ai',()=>{
+ const player=get.event('player'),cards=get.event('cards'),getNum=function(cards,control,player){
+ cards=cards.filter(i=>get.type2(i)==control||get.color(i)==control);
+ return cards.reduce((sum,card)=>sum+get.value(card,player),0);
+ };
+ let controls=get.event('controls').slice().map(i=>i=='none2'?'none':i);
+ controls.sort((a,b)=>getNum(cards,b,player)-getNum(cards,a,player));
+ return controls[0]=='none'?'none2':controls[0];
+ }).set('dialog',['获得其中一种颜色或类别的所有牌,然后'+str+'获得剩余牌','hidden',cards]);
+ if(control){
+ const choice=(control=='none2'?'none':control);
+ gains=cards.filter(i=>get.type2(i)==choice||get.color(i)==choice);
+ const num=gains.length;
+ cards.removeArray(gains);
+ if(gains.includes(links[0])){
+ gains.removeArray(links);
+ await player.gain(links,target,'give','bySelf');
+ }
+ if(gains.length) await player.gain(gains,'gain2');
+ player.addTempSkill('fakeyanxi_maxHand');
+ player.addMark('fakeyanxi_maxHand',num,false);
+ cards=cards.filter(i=>!links.includes(i));
+ if(cards.length) await target.gain(cards,'gain2');
+ }
+ }
+ },
+ ai:{
+ order:9,
+ result:{
+ target(player,target){
+ return [-1,1,2][get.sgn(get.attitude(player,target))+1]/target.countCards('h');
+ },
+ },
+ },
+ subSkill:{
+ maxHand:{
+ charlotte:true,
+ onremove:true,
+ intro:{content:'手牌上限+#'},
+ mod:{
+ maxHandcard(player,num){
+ return num+player.countMark('fakeyanxi_maxHand');
+ },
+ },
+ },
+ },
+ },
+ fakeshiren:{
+ audio:'shiren',
+ trigger:{player:'showCharacterEnd'},
+ filter(event,player){
+ if(!game.hasPlayer(target=>{
+ return get.info('fakeyanxi').filterTarget(null,player,target);
+ })) return false;
+ return game.getAllGlobalHistory('everything',evt=>{
+ return evt.name=='showCharacter'&&evt.player==player&&evt.toShow.some(i=>get.character(i,3).includes('fakeshiren'));
+ },event).indexOf(event)==0;
+ },
+ async cost(event,trigger,player){
+ event.result=await player.chooseTarget(get.prompt('fakeshiren'),'发动一次【宴戏】',(card,player,target)=>{
+ return get.info('fakeyanxi').filterTarget(null,player,target);
+ }).set('ai',target=>{
+ const player=get.event('player');
+ return -get.sgn(get.attitude(player,target))*get.info('fakeyanxi').ai.result.target(player,target);
+ }).forResult();
+ },
+ async content(event,trigger,player){
+ const target=event.targets[0];
+ player.useResult({skill:'fakeyanxi',target:target,targets:[target]},event);
+ },
+ ai:{mingzhi_no:true},
+ group:'fakeshiren_damage',
+ subSkill:{
+ damage:{
+ audio:'shiren',
+ trigger:{player:'damageBegin4'},
+ filter(event,player){
+ if(!player.getStockSkills(true,true,true).includes('fakeshiren')) return false;
+ return !game.getAllGlobalHistory('everything',evt=>{
+ return evt.name=='showCharacter'&&evt.player==player&&evt.toShow.some(i=>get.character(i,3).includes('fakeshiren'));
+ }).length;
+ },
+ check(event,player){
+ return !event.source||get.damageEffect(player,event.source,player)<0;
+ },
+ prompt:'识人:是否明置此武将牌并防止此伤害?',
+ content(){
+ trigger.cancel();
+ },
+ },
+ },
+ },
//国战典藏2023补充
//吕范
gzdiaodu:{
@@ -17750,6 +18022,16 @@ return event.junling=='junling5'?1:0;});
fakexijue_xiaoguo_info:'一名其他角色的准备阶段,你可以弃置至多X张基本牌(X为你的“爵”标记数,且X至多为你的体力上限),然后弃置其装备区等量的牌,若其装备区的牌数小于你弃置的牌数,则你对其造成1点伤害。',
fakeqimei:'齐眉',
fakeqimei_info:'准备阶段,你可以选择一名其他角色。若如此做,直到回合结束:当你或其获得牌/失去手牌后,若你与其手牌数相等,则另一名角色回复1点体力;当你或其的体力值变化后,若你与其体力值相等,则另一名角色摸一张牌。',
+ fakebaoqie:'宝箧',
+ fakebaoqie_info:'①当你受到伤害时,若此武将牌未明置过,则你可以明置此武将牌并防止此伤害。②当你首次明置此武将牌时,你可以获得一名角色的宝物牌,然后你可以使用其中的一张牌。',
+ fakeciwei:'慈威',
+ fakeciwei_info:'其他角色于一回合内使用第偶数张牌时,你可以弃置一张牌并取消此牌的所有目标,然后若此牌为装备牌,你可以获得之且你可以使用之。',
+ fakehuirong:'慧容',
+ fakehuirong_info:'①当你受到伤害时,若此武将牌未明置过,则你可以明置此武将牌并防止此伤害。②当你首次明置此武将牌时,你可以令一名角色将手牌数调整至其体力值。',
+ fakeyanxi:'宴戏',
+ fakeyanxi_info:'出牌阶段限一次,你可以展示一名其他角色的一张手牌和牌堆顶的两张牌,然后你获得其中一种颜色或类别的所有牌且本回合手牌上限+X(X为你获得的牌数),然后其获得剩余的牌。',
+ fakeshiren:'识人',
+ fakeshiren_info:'①当你受到伤害时,若此武将牌未明置过,则你可以明置此武将牌并防止此伤害。②当你首次明置此武将牌时,你可以发动一次〖宴戏〗。',
guozhan_default:"国战标准",
guozhan_zhen:"君临天下·阵",
From 186702cb7890746e2fb5fa491997c4c1bb459434 Mon Sep 17 00:00:00 2001
From: mengxinzxz <2223529500@qq.com>
Date: Fri, 5 Apr 2024 13:38:46 +0800
Subject: [PATCH 18/35] =?UTF-8?q?=E5=9B=BD=E6=88=98=E8=BE=9B=E6=95=9E?=
=?UTF-8?q?=E3=80=81=E7=9F=B3=E8=8B=9E=EF=BC=9B=E7=8E=8B=E5=9F=BA=E8=B0=83?=
=?UTF-8?q?=E6=95=B4=E4=B8=BA=E5=BA=94=E5=8F=98=E7=89=8C=E5=A0=86=E4=B8=93?=
=?UTF-8?q?=E5=B1=9E?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
mode/guozhan.js | 231 +++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 228 insertions(+), 3 deletions(-)
diff --git a/mode/guozhan.js b/mode/guozhan.js
index 7ad6a59c6..03fcef476 100644
--- a/mode/guozhan.js
+++ b/mode/guozhan.js
@@ -385,7 +385,9 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
},
yingbian_guozhan:{
gz_sp_duyu:['male','qun',4,['fakezhufu']],
+ gz_wangji:['male','wei',3,['fakeqizhi','fakejinqu']],
gz_yangyan:['female','jin',3,['fakexuanbei','xianwan']],
+ gz_shibao:['male','jin',4,['fakezhuosheng','fakejuhou']],
},
characterSort:{
mode_guozhan:{
@@ -580,14 +582,14 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
gz_duyu:['male','jin',4,['gzsanchen','gzpozhu']],
gz_zhanghuyuechen:['male','jin',4,['fakexijue']],
gz_jin_yanghuiyu:['female','jin',3,['fakeciwei','fakehuirong']],
- gz_simazhou:['male','jin',4,['recaiwang','naxiang']],
+ gz_simazhou:['male','jin',4,['caiwang','gznaxiang']],
gz_shibao:['male','jin',4,['gzzhuosheng']],
gz_weiguan:['male','jin',3,['zhongyun','shenpin']],
gz_zhongyan:['female','jin',3,['gzbolan','yifa']],
gz_yangyan:['female','jin',3,['gzxuanbei','xianwan']],
gz_zuofen:['female','jin',3,['gzzhaosong','gzlisi']],
gz_xuangongzhu:['female','jin',3,['fakeqimei','ybzhuiji']],
- gz_xinchang:['male','jin',3,['canmou','congjian']],
+ gz_xinchang:['male','jin',3,['fakecanmou','congjian']],
gz_yangzhi:['female','jin',3,['gzwanyi','gzmaihuo']],
gz_liaohua:['male','shu',4,['gzdangxian']],
@@ -613,7 +615,6 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
gz_key_ushio:['female','key',3,['ushio_huanxin','ushio_xilv'],['doublegroup:key:wei:shu:wu:qun:jin']],
gz_wangling:['male','wei',4,['fakemibei']],
- gz_wangji:['male','wei',3,['fakeqizhi','fakejinqu']],
gz_yanyan:['male','shu',4,['fakejuzhan']],
gz_xin_zhuran:['male','wu',3,['fakedanshou']],
gz_gaoshun:['male','qun',4,['fakexunxi','fakehuanjia']],
@@ -3535,6 +3536,222 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
},
},
},
+ fakecanmou:{
+ audio:'canmou',
+ trigger:{global:'useCardToPlayer'},
+ direct:true,
+ filter(event,player){
+ if(!event.player.isMaxHandcard(true)||!event.isFirstTarget||get.type(event.card)!='trick') return false;
+ if(event.targets.length>1&&!player.getStorage('fakecanmou_used').includes('-')) return true;
+ return get.info('fakecanmou').filter_add(event,player);
+ },
+ filter_add(event,player){
+ var info=get.info(event.card);
+ if(info.allowMultiple==false) return false;
+ if(event.targets&&!info.multitarget&&!player.getStorage('fakecanmou_used').includes('+')){
+ if(game.hasPlayer(current=>{
+ return !event.targets.includes(current)&&lib.filter.targetEnabled2(event.card,event.player,current);
+ })) return true;
+ }
+ return false;
+ },
+ async cost(event,trigger,player){
+ let str='',goon=get.info('fakecanmou').filter_add(event,player),bool=(trigger.targets.length>1&&!player.getStorage('fakecanmou_used').includes('-'));
+ if(goon) str+='增加';
+ if(goon&&bool) str='或';
+ if(bool) str+='减少';
+ event.result=await player.chooseTarget(get.prompt('fakecanmou'),(card,player,target)=>{
+ const trigger=get.event().getTrigger();
+ if(trigger.targets.length>1&&!player.getStorage('fakecanmou_used').includes('-')&&trigger.targets.includes(target)) return true;
+ return !player.getStorage('fakecanmou_used').includes('+')&&!trigger.targets.includes(target)&&lib.filter.targetEnabled2(trigger.card,trigger.player,target);
+ }).set('prompt2','为'+get.translation(trigger.card)+str+'一个目标').set('ai',target=>{
+ const player=get.event('player'),trigger=get.event().getTrigger();
+ return get.effect(target,trigger.card,trigger.player,player)*(trigger.targets.includes(target)?-1:1);
+ }).setHiddenSkill('fakecanmou').forResult();
+ },
+ preHidden:true,
+ async content(event,trigger,player){
+ const target=event.targets[0],goon=trigger.targets.includes(target);
+ player.addTempSkill('fakecanmou_used');
+ player.markAuto('fakecanmou_used',[goon?'-':'+']);
+ if(goon){
+ trigger.targets.remove(target);
+ game.log(target,'被',player,'移除了目标');
+ }
+ else{
+ trigger.targets.add(target);
+ game.log(target,'成为了',trigger.card,'移除了目标');
+ }
+ },
+ subSkill:{used:{charlotte:true,onremove:true}},
+ },
+ fakezhuosheng:{
+ hiddenCard(player,name){
+ return player.countCards('hs')>1&&get.type(name)=='basic'&&lib.inpile.includes(name)&&!player.getStorage('fakezhuosheng_count').includes(name);
+ },
+ audio:'zhuosheng',
+ enable:'chooseToUse',
+ filter(event,player){
+ if(event.type=='wuxie') return false;
+ if(player.countCards('hs')<2) return false;
+ return get.inpileVCardList(info=>{
+ const name=info[2];
+ return !player.getStorage('fakezhuosheng_count').includes(name)&&get.type(name)=='basic';
+ }).some(card=>event.filterCard({name:card[2],nature:card[3]},player,event));
+ },
+ chooseButton:{
+ dialog(event,player){
+ var list=get.inpileVCardList(info=>{
+ const name=info[2];
+ return !player.getStorage('fakezhuosheng_count').includes(name)&&get.type(name)=='basic';
+ }).filter(card=>event.filterCard({name:card[2],nature:card[3]},player,event));
+ return ui.create.dialog('擢升',[list,'vcard'],'hidden');
+ },
+ check(button){
+ var player=_status.event.player;
+ var evt=_status.event.getParent();
+ var name=button.link[2],card={name:name,nature:button.link[3]};
+ if(name=='shan') return 2;
+ if(evt.type=='dying'){
+ if(get.attitude(player,evt.dying)<2) return 0;
+ if(name=='jiu') return 2.1;
+ return 1.9;
+ }
+ if(evt.type=='phase'){
+ if(button.link[2]=='jiu'){
+ if(player.getUseValue({name:'jiu'})<=0) return 0;
+ var cards=player.getCards('hs',cardx=>get.value(cardx)<8);
+ cards.sort((a,b)=>get.value(a)-get.value(b));
+ if(cards.some(cardx=>get.name(cardx)=='sha'&&!cards.slice(0,2).includes(cardx))) return player.getUseValue({name:'jiu'});
+ return 0;
+ }
+ return player.getUseValue(card)/4;
+ }
+ return 1;
+ },
+ backup(links,player){
+ return {
+ audio:'zhuosheng',
+ filterCard:true,
+ selectCard:[2,Infinity],
+ position:'hs',
+ complexCard:true,
+ check(card){
+ if(ui.selected.cards.length>=2) return 0;
+ return 8-get.value(card);
+ },
+ popname:true,
+ viewAs:{
+ name:links[0][2],
+ nature:links[0][3],
+ },
+ precontent(){
+ var name=event.result.card.name;
+ player.addTempSkill('fakezhuosheng_count');
+ player.markAuto('fakezhuosheng_count',[name]);
+ player.when('yingbian')
+ .filter(evt=>evt.skill=='fakezhuosheng_backup')
+ .then(()=>{
+ if(trigger.cards&&trigger.cards.length){
+ let cards=trigger.cards.slice();
+ cards=cards.filter(i=>get.is.yingbian(i));
+ if(cards.length){
+ if(!Array.isArray(trigger.temporaryYingbian)) trigger.temporaryYingbian=[];
+ trigger.temporaryYingbian.add('force');
+ trigger.temporaryYingbian.addArray(Array.from(lib.yingbian.effect.keys()).filter(value=>{
+ return cards.some(card=>get.cardtag(card,`yingbian_${value}`));
+ }));
+ }
+ }
+ });
+ },
+ }
+ },
+ prompt(links,player){
+ var name=links[0][2];
+ var nature=links[0][3];
+ return '将至少两张手牌当作'+(get.translation(nature)||'')+get.translation(name)+'使用';
+ },
+ },
+ ai:{
+ order(item,player){
+ if(player&&_status.event.type=='phase'){
+ var add=false,max=0;
+ var names=lib.inpile.filter(name=>get.type(name)=='basic'&&!player.getStorage('fakezhuosheng_count').includes(name));
+ if(names.includes('sha')) add=true;
+ names=names.map(namex=>{return {name:namex}});
+ if(add) lib.inpile_nature.forEach(nature=>names.push({name:'sha',nature:nature}));
+ names.forEach(card=>{
+ if(player.getUseValue(card)>0){
+ var temp=get.order(card);
+ if(card.name=='jiu'){
+ var cards=player.getCards('hs',cardx=>get.value(cardx)<8);
+ cards.sort((a,b)=>get.value(a)-get.value(b));
+ if(!cards.some(cardx=>get.name(cardx)=='sha'&&!cards.slice(0,2).includes(cardx))) temp=0;
+ }
+ if(temp>max) max=temp;
+ }
+ });
+ if(max>0) max-=0.001;
+ return max;
+ }
+ return 0.5;
+ },
+ respondShan:true,
+ respondSha:true,
+ fireAttack:true,
+ skillTagFilter(player,tag,arg){
+ if(arg=='respond') return false;
+ const name=(tag=='respondShan'?'shan':'sha');
+ return get.info('fakezhuosheng').hiddenCard(player,name);
+ },
+ result:{
+ player(player){
+ if(_status.event.dying) return get.attitude(player,_status.event.dying);
+ return 1;
+ },
+ },
+ },
+ subSkill:{
+ count:{charlotte:true,onremove:true},
+ backup:{},
+ },
+ },
+ fakejuhou:{
+ zhenfa:'inline',
+ trigger:{global:'useCardToTargeted'},
+ filter(event,player){
+ return (event.card.name=='sha'||get.type(event.card)=='trick')&&event.target.inline(player);
+ },
+ logTarget:'target',
+ async content(event,trigger,player){
+ const target=trigger.target;
+ const {result:{bool,cards}}=await target.chooseCard('he',[1,Infinity],'是否将任意张牌置于武将牌上?').set('ai',card=>{
+ const trigger=get.event().getTrigger(),player=trigger.target;
+ if(card.name=='baiyin'&&get.position(card)=='e'&&player.isDamaged()&&get.recoverEffect(player,player,player)>0) return 1;
+ if(['guohe','shunshou','zhujinqiyuan','chuqibuyi','huogong'].includes(trigger.card.name)&&get.effect(player,trigger.card,trigger.player,player)<0) return 1;
+ return 0;
+ });
+ if(bool){
+ target.addToExpansion(cards,'giveAuto',target).gaintag.add('fakejuhou');
+ target.addSkill('fakejuhou');
+ target.when({global:'useCardAfter'})
+ .filter(evt=>evt==trigger.getParent())
+ .then(()=>{
+ const cards=player.getExpansions('fakejuhou');
+ if(cards.length) player.gain(cards,'gain2');
+ });
+ }
+ },
+ intro:{
+ content:'expansion',
+ markcount:'expansion',
+ },
+ },
+ gznaxiang:{
+ audio:'naxiang',
+ inherit:'naxiang',
+ },
//国战典藏2023补充
//吕范
gzdiaodu:{
@@ -18032,6 +18249,14 @@ return event.junling=='junling5'?1:0;});
fakeyanxi_info:'出牌阶段限一次,你可以展示一名其他角色的一张手牌和牌堆顶的两张牌,然后你获得其中一种颜色或类别的所有牌且本回合手牌上限+X(X为你获得的牌数),然后其获得剩余的牌。',
fakeshiren:'识人',
fakeshiren_info:'①当你受到伤害时,若此武将牌未明置过,则你可以明置此武将牌并防止此伤害。②当你首次明置此武将牌时,你可以发动一次〖宴戏〗。',
+ fakecanmou:'参谋',
+ fakecanmou_info:'每回合每项限一次,一名角色使用普通锦囊牌指定第一个目标时,若其手牌数为全场唯一最多,则你可以为此牌增加或减少一个目标(目标数至少为1)。',
+ fakezhuosheng:'擢升',
+ fakezhuosheng_info:'每回合每种牌名限一次,你可以将至少两张手牌当作任意基本牌使用,若你以此法使用的牌中包含具有应变效果的牌,则你令此牌无视条件获得对应的应变效果。',
+ fakejuhou:'拒后',
+ fakejuhou_info:'阵法技,与你处于同一队列的角色成为【杀】或普通锦囊牌的目标后,你可以令其将任意张牌置于其武将牌上,然后其于此牌结算完毕后获得这些牌。',
+ gznaxiang:'纳降',
+ gznaxiang_info:'锁定技,当你受到其他角色造成的伤害后,或你对其他角色造成伤害后,你对其发动〖才望〗时的“弃置”改为“获得”直到你的下回合开始。',
guozhan_default:"国战标准",
guozhan_zhen:"君临天下·阵",
From 1450b213846669e4b712af68fd9fd8373a2e9958 Mon Sep 17 00:00:00 2001
From: mengxinzxz <2223529500@qq.com>
Date: Fri, 5 Apr 2024 13:58:07 +0800
Subject: [PATCH 19/35] =?UTF-8?q?=E5=9B=BD=E6=88=98=E6=9B=B9=E6=93=8D?=
=?UTF-8?q?=E6=8A=80=E8=83=BD=E9=94=99=E8=AF=AFbugfix?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
character/refresh.js | 4 +++-
mode/guozhan.js | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/character/refresh.js b/character/refresh.js
index 701c0601d..9a9f60351 100755
--- a/character/refresh.js
+++ b/character/refresh.js
@@ -13572,7 +13572,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
},
rejianxiong_old:{
- audio:2,
+ audio:'rejianxiong',
trigger:{player:'damageEnd'},
direct:true,
content:function(){
@@ -15581,6 +15581,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
re_lidian_prefix:'界',
re_xushu:'界徐庶',
re_xushu_prefix:'界',
+ rejianxiong_old:'奸雄',
+ rejianxiong_old_info:'当你受到伤害后,你可以摸一张牌或获得对你造成伤害的牌。',
refresh_standard:'界限突破·标',
refresh_feng:'界限突破·风',
diff --git a/mode/guozhan.js b/mode/guozhan.js
index 03fcef476..32f6d50ef 100644
--- a/mode/guozhan.js
+++ b/mode/guozhan.js
@@ -451,7 +451,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
gz_pengyang:['male','shu',3,['gztongling','gzjinyu'],['doublegroup:shu:qun','gzskin']],
gz_zhuling:['male','wei',4,['gzjuejue','gzfangyuan'],['gzskin']],
- gz_caocao:['male','wei',4,['rejianxiong']],
+ gz_caocao:['male','wei',4,['rejianxiong_old']],
gz_simayi:['male','wei',3,['fankui','guicai']],
gz_xiahoudun:['male','wei',4,['reganglie']],
gz_zhangliao:['male','wei',4,['new_retuxi']],
From 450ce59a723d199dbf62bb45fc83def36d34d7af Mon Sep 17 00:00:00 2001
From: mengxinzxz <2223529500@qq.com>
Date: Fri, 5 Apr 2024 14:10:26 +0800
Subject: [PATCH 20/35] fakejinqu.audio
---
mode/guozhan.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mode/guozhan.js b/mode/guozhan.js
index 32f6d50ef..7c5fd1cb3 100644
--- a/mode/guozhan.js
+++ b/mode/guozhan.js
@@ -2334,7 +2334,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
},
},
fakejinqu:{
- audio:2,
+ audio:'jinqu',
trigger:{player:'phaseJieshuBegin'},
check(event,player){
return player.getHistory('useSkill',evt=>{
From be0a0945e1c88acf1c68b62deca73230bcf542a1 Mon Sep 17 00:00:00 2001
From: mengxinzxz <2223529500@qq.com>
Date: Fri, 5 Apr 2024 15:41:18 +0800
Subject: [PATCH 21/35] =?UTF-8?q?=E9=92=9F=E4=BC=9A=E3=80=81=E8=B4=BE?=
=?UTF-8?q?=E5=85=85=E3=80=81=E5=AE=A3=E5=85=AC=E4=B8=BB=E3=80=81=E7=8E=8B?=
=?UTF-8?q?=E5=87=8Cbugfix?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
mode/guozhan.js | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/mode/guozhan.js b/mode/guozhan.js
index 7c5fd1cb3..e02bd7600 100644
--- a/mode/guozhan.js
+++ b/mode/guozhan.js
@@ -1166,7 +1166,6 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
forced:true,
locked:false,
content(){
- player.storage.fakeyigui_init=true;
get.info('fakeyigui').gainHun(player,2);
},
},
@@ -1182,6 +1181,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
group:'fakejihun_zhiheng',
subSkill:{
zhiheng:{
+ audio:'jihun',
trigger:{player:'phaseZhunbeiBegin'},
filter(event,player){
return player.getStorage('fakeyigui').length;
@@ -1279,8 +1279,8 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
'step 1'
var hs=player.getCards('he');
if(hs.length>0){
- if(hs.length<=num) event._result={bool:true,cards:hs};
- else player.chooseCard('he',true,'选择'+get.cnNumber(num)+'张牌作为“权”',num);
+ if(hs.length<=event.num) event._result={bool:true,cards:hs};
+ else player.chooseCard('he',true,'选择'+get.cnNumber(event.num)+'张牌作为“权”',event.num);
}
else event.finish();
'step 2'
@@ -2181,9 +2181,6 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
filter(event,player){
return !player.isMaxHandcard();
},
- forced:true,
- locked:false,
- preHidden:true,
async cost(event,trigger,player){
const filterTarget=(card,player,target)=>{
return target!=player&&target.isMaxHandcard();
@@ -2196,6 +2193,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
return get.attitude(player,target);
}).forResult();
},
+ preHidden:true,
async content(event,trigger,player){
const target=event.targets[0];
const {result:{junling,targets}}=await target.chooseJunlingFor(player);
@@ -2211,7 +2209,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
if(event.name=='carryOutJunling'){
return event.source.countCards('h')>player.countCards('h');
}
- return event.index==1&&player.countCards('h');
+ return event.result.index==1&&player.countCards('h');
},
forced:true,
locked:false,
@@ -2718,7 +2716,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
if(!event.source||!event.player||!event.source.isIn()||!event.player.isIn()) return false;
return event.source.isFriendOf(event.player)&&[event.source,event.player].some(target=>target.countCards('he'));
},
- async cost(event,player){
+ async cost(event,trigger,player){
event.result=await player.chooseTarget(get.prompt('fakejianhui'),(card,player,target)=>{
const trigger=get.event().getTrigger();
if(!(trigger.source==target&&trigger.player==target)) return false;
@@ -3240,7 +3238,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
},
group:'fakeqimei_hp',
onremove:true,
- mark:'character',
+ mark:true,
intro:{content:'已和$组成齐眉组合'},
},
hp:{
From b02c36a4dcbabf5e122a0765e9fd58290fc375a7 Mon Sep 17 00:00:00 2001
From: mengxinzxz <2223529500@qq.com>
Date: Fri, 5 Apr 2024 15:45:29 +0800
Subject: [PATCH 22/35] =?UTF-8?q?=E8=B4=BE=E5=85=85=E3=80=81=E5=B7=A6?=
=?UTF-8?q?=E6=85=88bugfix?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
mode/guozhan.js | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/mode/guozhan.js b/mode/guozhan.js
index e02bd7600..d3a558201 100644
--- a/mode/guozhan.js
+++ b/mode/guozhan.js
@@ -1201,13 +1201,13 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
};
return game.countPlayer()-getNum(button.link);
});
- event.result={bool:bool,cards:links};
+ event.result={bool:bool,cost_data:links};
},
async content(event,trigger,player){
- player.unmarkAuto('fakeyigui',event.cards);
- _status.characterlist.addArray(event.cards);
- game.log(player,'移除了'+get.cnNumber(event.cards.length)+'张','#g“魂”');
- get.info('fakeyigui').gainHun(player,event.cards.length);
+ player.unmarkAuto('fakeyigui',event.cost_data);
+ _status.characterlist.addArray(event.cost_data);
+ game.log(player,'移除了'+get.cnNumber(event.cost_data.length)+'张','#g“魂”');
+ get.info('fakeyigui').gainHun(player,event.cost_data.length);
},
},
},
@@ -2717,9 +2717,9 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
return event.source.isFriendOf(event.player)&&[event.source,event.player].some(target=>target.countCards('he'));
},
async cost(event,trigger,player){
- event.result=await player.chooseTarget(get.prompt('fakejianhui'),(card,player,target)=>{
+ event.result=await player.chooseTarget(get.prompt2('fakejianhui'),(card,player,target)=>{
const trigger=get.event().getTrigger();
- if(!(trigger.source==target&&trigger.player==target)) return false;
+ if(!(trigger.source==target||trigger.player==target)) return false;
if(!ui.selected.targets.length) return true;
return target.countCards('he');
},2).set('targetprompt',['摸牌','拆牌']).set('ai',target=>{
From e31c1e6e9196e23f46010d3ded3e5c3174e42d77 Mon Sep 17 00:00:00 2001
From: mengxinzxz <2223529500@qq.com>
Date: Fri, 5 Apr 2024 15:59:40 +0800
Subject: [PATCH 23/35] =?UTF-8?q?=E5=B7=A6=E6=85=88=E3=80=81=E8=BE=9B?=
=?UTF-8?q?=E6=95=9Ebugfix?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
mode/guozhan.js | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/mode/guozhan.js b/mode/guozhan.js
index d3a558201..17f1dcea3 100644
--- a/mode/guozhan.js
+++ b/mode/guozhan.js
@@ -972,7 +972,8 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
const storage=player.getStorage('fakeyigui');
if(!storage.length) return false;
if(event.type=='dying'){
- if((!event.filterCard({name:'tao'},player,event)||storage.used.includes('basic'))&&(!event.filterCard({name:'jiu'},player,event)||storage.used.includes('basic'))) return false;
+ if(player.getStorage('fakeyigui2').includes('basic')) return false;
+ if(!event.filterCard({name:'tao'},player,event)&&!event.filterCard({name:'jiu'},player,event)) return false;
const target=event.dying;
return target.identity=='unknown'||target.identity=='ye'||storage.some(i=>{
var group=get.character(i,1);
@@ -990,7 +991,8 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
dialog.add([player.getStorage('fakeyigui'),'character']);
const list=get.inpileVCardList(info=>{
const name=info[2];
- return get.type(name)=='basic'||get.type(card)=='trick';
+ if(player.getStorage('fakeyigui2').includes(get.type(name))) return false;
+ return get.type(name)=='basic'||get.type(name)=='trick';
});
dialog.add([list,'vcard']);
return dialog;
@@ -3537,14 +3539,13 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
fakecanmou:{
audio:'canmou',
trigger:{global:'useCardToPlayer'},
- direct:true,
filter(event,player){
if(!event.player.isMaxHandcard(true)||!event.isFirstTarget||get.type(event.card)!='trick') return false;
if(event.targets.length>1&&!player.getStorage('fakecanmou_used').includes('-')) return true;
return get.info('fakecanmou').filter_add(event,player);
},
filter_add(event,player){
- var info=get.info(event.card);
+ const info=get.info(event.card);
if(info.allowMultiple==false) return false;
if(event.targets&&!info.multitarget&&!player.getStorage('fakecanmou_used').includes('+')){
if(game.hasPlayer(current=>{
@@ -3554,7 +3555,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
return false;
},
async cost(event,trigger,player){
- let str='',goon=get.info('fakecanmou').filter_add(event,player),bool=(trigger.targets.length>1&&!player.getStorage('fakecanmou_used').includes('-'));
+ let str='',goon=get.info('fakecanmou').filter_add(trigger,player),bool=(trigger.targets.length>1&&!player.getStorage('fakecanmou_used').includes('-'));
if(goon) str+='增加';
if(goon&&bool) str='或';
if(bool) str+='减少';
From bae09a45c5ef77782e3f8d8efb425e3de2598040 Mon Sep 17 00:00:00 2001
From: mengxinzxz <2223529500@qq.com>
Date: Fri, 5 Apr 2024 16:02:06 +0800
Subject: [PATCH 24/35] fakequanji bugfix
---
mode/guozhan.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mode/guozhan.js b/mode/guozhan.js
index 17f1dcea3..1bc961699 100644
--- a/mode/guozhan.js
+++ b/mode/guozhan.js
@@ -1270,7 +1270,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
inherit:'gzquanji',
filter(event,player,name){
return !player.hasHistory('useSkill',evt=>{
- return evt.skill=='gzquanji'&&evt.event.triggername==name;
+ return evt.skill=='fakequanji'&&evt.event.triggername==name;
});
},
content(){
From 494910a8d40536d6f232923379d3abe10ee4a849 Mon Sep 17 00:00:00 2001
From: mengxinzxz <2223529500@qq.com>
Date: Fri, 5 Apr 2024 16:25:33 +0800
Subject: [PATCH 25/35] =?UTF-8?q?=E5=BC=A0=E6=98=A5=E5=8D=8E=E3=80=81?=
=?UTF-8?q?=E9=92=9F=E4=BC=9A=E3=80=81=E7=8E=8B=E5=85=83=E5=A7=AC=E3=80=81?=
=?UTF-8?q?=E5=B7=A6=E6=85=88=E3=80=81=E4=B8=A5=E9=A2=9Cbugfix?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
mode/guozhan.js | 108 ++++++++++++++++++++++--------------------------
1 file changed, 49 insertions(+), 59 deletions(-)
diff --git a/mode/guozhan.js b/mode/guozhan.js
index 1bc961699..12377948b 100644
--- a/mode/guozhan.js
+++ b/mode/guozhan.js
@@ -1195,9 +1195,9 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
],[1,2]).set('ai',button=>{
const getNum=(character)=>{
return game.countPlayer(target=>{
- var group=get.character(target,1);
+ const group=get.character(character,1);
if(group=='ye'||target.identity==group) return true;
- var double=get.is.double(i,true);
+ const double=get.is.double(character,true);
if(double&&double.includes(target.identity)) return true;
})+1;
};
@@ -1302,66 +1302,54 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
enable:'phaseUse',
filterTarget:true,
usable:1,
- content(){
- 'step 0'
- player.chooseJunlingFor(target);
- 'step 1'
- event.junling=result.junling;
- event.targets=result.targets;
- const str=get.translation(player),num=get.cnNumber(player.getExpansions('fakequanji').length);
- target.chooseJunlingControl(player,result.junling,result.targets).set('prompt','排异').set('choiceList',[
- '执行此军令,然后'+str+'摸'+num+'张牌并将一张“权”置入弃牌堆',
- '不执行此军令,然后'+str+'可以对至多'+num+'名与你势力相同的角色各造成1点伤害并移去等量的“权”',
- ]).set('ai',()=>{
- const all=player.getExpansions('fakequanji').length;
- const effect=get.junlingEffect(player,result.junling,target,result.targets,target);
- const eff1=(effect-get.effect(player,{name:'draw'},player,target)*all);
- const eff2=((source,player,num)=>{
- let targets=game.filterPlayer(current=>{
- return current.isFriendOf(player)&&get.damageEffect(current,source,source)>0&&get.damageEffect(current,source,player)<0;
- }).sort((a,b)=>{
- return (get.damageEffect(b,source,source)>0-get.damageEffect(b,source,player))-(get.damageEffect(a,source,source)>0-get.damageEffect(a,source,player));
- }).slice(0,num);
- return targets.reduce((sum,target)=>{
- return sum+(get.damageEffect(target,source,source)-get.damageEffect(target,source,player))/2;
- },0);
- })(player,target,all);
- return Math.max(0,get.sgn(eff1-eff2));
- });
- 'step 2'
- const cards=player.getExpansions('fakequanji');
- if(result.index==0){
- target.carryOutJunling(player,event.junling,targets);
- player.draw(cards.length);
- player.chooseButton(['排异:请移去一张“权”',cards],true);
- }
- else{
- player.chooseTarget('排异:是否对至多'+get.cnNumber(cards.length)+'名与'+get.translation(target)+'势力相同的角色各造成1点伤害并移去等量的“权”?',(card,player,target)=>{
- return target.isFriendOf(get.event('target'));
- },[1,cards.length]).set('target',target).set('ai',target=>{
- return get.damageEffect(target,get.event('player'),get.event('player'));
+ async content(event,trigger,player){
+ const target=event.target;
+ const {result:{junling,targets}}=await player.chooseJunlingFor(target);
+ if(junling){
+ const str=get.translation(player),num=get.cnNumber(player.getExpansions('fakequanji').length);
+ const {result:{index}}=await target.chooseJunlingControl(player,junling,targets).set('prompt','排异').set('choiceList',[
+ '执行此军令,然后'+str+'摸'+num+'张牌并将一张“权”置入弃牌堆',
+ '不执行此军令,然后'+str+'可以对至多'+num+'名与你势力相同的角色各造成1点伤害并移去等量的“权”',
+ ]).set('ai',()=>{
+ const all=player.getExpansions('fakequanji').length;
+ const effect=get.junlingEffect(player,junling,target,targets,target);
+ const eff1=(effect-get.effect(player,{name:'draw'},player,target)*all);
+ const eff2=((source,player,num)=>{
+ let targets=game.filterPlayer(current=>{
+ return current.isFriendOf(player)&&get.damageEffect(current,source,source)>0&&get.damageEffect(current,source,player)<0;
+ }).sort((a,b)=>{
+ return (get.damageEffect(b,source,source)>0-get.damageEffect(b,source,player))-(get.damageEffect(a,source,source)>0-get.damageEffect(a,source,player));
+ }).slice(0,num);
+ return targets.reduce((sum,target)=>{
+ return sum+(get.damageEffect(target,source,source)-get.damageEffect(target,source,player))/2;
+ },0);
+ })(player,target,all);
+ return Math.max(0,get.sgn(eff1-eff2));
});
- }
- 'step 3'
- if(result.bool){
- if(result.links){
- player.loseToDiscardpile(result.links);
- event.finish();
+ const cards=player.getExpansions('fakequanji');
+ if(index==0){
+ await target.carryOutJunling(player,junling,targets);
+ if(cards.length){
+ await player.draw(cards.length);
+ const {result:{bool,links}}=await player.chooseButton(['排异:请移去一张“权”',cards],true);
+ if(bool) await player.loseToDiscardpile(links);
+ }
}
- else{
- const cards=player.getExpansions('fakequanji');
- const targets=result.targets.sortBySeat();
- player.line(targets);
- for(const i of targets) i.damage();
- if(cards.length<=targets.length) event._result={bool:true,links:cards};
- else player.chooseButton(['排异:请移去'+get.cnNumber(targets.length)+'张“权”',cards],targets.length,true);
+ else if(cards.length){
+ const {result}=await player.chooseTarget('排异:是否对至多'+get.cnNumber(cards.length)+'名与'+get.translation(target)+'势力相同的角色各造成1点伤害并移去等量的“权”?',(card,player,target)=>{
+ return target.isFriendOf(get.event('target'));
+ },[1,cards.length]).set('target',target).set('ai',target=>{
+ return get.damageEffect(target,get.event('player'),get.event('player'));
+ });
+ if(result.bool){
+ const targetx=result.targets.sortBySeat();
+ player.line(targetx);
+ for(const i of targetx) await i.damage();
+ const {result:{bool,links}}=await player.chooseButton(['排异:请移去'+get.cnNumber(targetx.length)+'张“权”',cards],targetx.length,true);
+ if(bool) await player.loseToDiscardpile(links);
+ }
}
}
- else event.finish();
- 'step 4'
- if(result.bool){
- player.loseToDiscardpile(result.links);
- }
},
ai:{
order:1,
@@ -2372,6 +2360,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
target:'useCardToTargeted',
},
filter(event,player){
+ if(event.card.name!='sha') return false;
const storage=player.storage.fakejuzhan;
if((event.player==player)!=Boolean(storage)) return false;
if(storage&&!event.target.countCards('he')) return false;
@@ -3052,7 +3041,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
.set('filterTarget',function(card,player,target){
if(target!=_status.event.sourcex&&!ui.selected.targets.includes(_status.event.sourcex)) return false;
return lib.filter.targetEnabled.apply(this,arguments);
- }).set('sourcex',target).set('addCount',false)
+ }).set('sourcex',target).set('addCount',false).set('hiddenSkill','fakeqingleng')
.backup('fakeqingleng_backup').set('logSkill',['fakeqingleng',target]);
if(bool&&!player.getHistory('sourceDamage',evt=>{
return evt.getParent(4)==event;
@@ -3431,6 +3420,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
filterTarget(card,player,target){
return target!=player&&target.countCards('h');
},
+ usable:1,
async content(event,trigger,player){
const target=event.target,str=get.translation(target);
const {result:{bool,links}}=await player.choosePlayerCard(target,'宴戏:展示'+str+'的一张手牌','h',true);
From 3cb8661020bd3756f5c3c76b392a973ec24bad1f Mon Sep 17 00:00:00 2001
From: mengxinzxz <2223529500@qq.com>
Date: Fri, 5 Apr 2024 16:26:15 +0800
Subject: [PATCH 26/35] =?UTF-8?q?=E6=9C=B1=E7=84=B6=E8=A1=80=E9=87=8F?=
=?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
mode/guozhan.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mode/guozhan.js b/mode/guozhan.js
index 12377948b..1485b9437 100644
--- a/mode/guozhan.js
+++ b/mode/guozhan.js
@@ -616,7 +616,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
gz_wangling:['male','wei',4,['fakemibei']],
gz_yanyan:['male','shu',4,['fakejuzhan']],
- gz_xin_zhuran:['male','wu',3,['fakedanshou']],
+ gz_xin_zhuran:['male','wu',4,['fakedanshou']],
gz_gaoshun:['male','qun',4,['fakexunxi','fakehuanjia']],
gz_jin_jiachong:['male','jin',3,['fakexiongshu','fakejianhui']],
gz_jin_yanghu:['male','jin',4,['fakechongxin','fakeweirong']],
From 307c8734550a08175587da2248aafc98ec6dc4a5 Mon Sep 17 00:00:00 2001
From: mengxinzxz <2223529500@qq.com>
Date: Fri, 5 Apr 2024 22:08:06 +0800
Subject: [PATCH 27/35] =?UTF-8?q?chooseToUse/chooseToRespond=E9=92=88?=
=?UTF-8?q?=E5=AF=B9=E6=95=B0=E7=BB=84=E5=9E=8BlogSkill=E5=8F=96=E6=B6=88?=
=?UTF-8?q?=E5=8F=91=E5=8A=A8=E7=9A=84bugfix?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
国战春哥【清冷】bug来源
---
noname/library/element/content.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/noname/library/element/content.js b/noname/library/element/content.js
index b80ed762a..f02c00d27 100644
--- a/noname/library/element/content.js
+++ b/noname/library/element/content.js
@@ -3267,7 +3267,7 @@ export const Content = {
event.result._sendskill = event._sendskill;
}
if ((!event.result || !event.result.bool || event.result._noHidingTimer) && (event.result.skill || event.logSkill)) {
- var info = get.info(event.result.skill || event.logSkill);
+ var info = get.info(event.result.skill || (Array.isArray(event.logSkill) ? event.logSkill[0] : event.logSkill));
if (info.direct && !info.clearTime) {
_status.noclearcountdown = 'direct';
}
@@ -3454,11 +3454,11 @@ export const Content = {
if (event.result._sendskill) {
lib.skill[event.result._sendskill[0]] = event.result._sendskill[1];
}
- var info = get.info(event.result.skill);
if (event.onresult) {
event.onresult(event.result);
}
if ((!event.result || !event.result.bool || event.result._noHidingTimer) && (event.result.skill || event.logSkill)) {
+ var info = get.info(event.result.skill || (Array.isArray(event.logSkill) ? event.logSkill[0] : event.logSkill));
if (info.direct && !info.clearTime) {
_status.noclearcountdown = 'direct';
}
From a6a002848e154d9d7d3ca12e837991d8dac83b02 Mon Sep 17 00:00:00 2001
From: mengxinzxz <2223529500@qq.com>
Date: Fri, 5 Apr 2024 22:19:26 +0800
Subject: [PATCH 28/35] =?UTF-8?q?=E4=BF=AE=E5=A4=8DseatTranslation?=
=?UTF-8?q?=E5=9C=A8=E4=B8=8D=E4=BC=A0=E5=85=A5player=E5=8F=82=E6=95=B0?=
=?UTF-8?q?=E5=AF=BC=E8=87=B4=E7=9A=84=E7=BB=93=E6=9E=9C=E5=B0=911?=
=?UTF-8?q?=E7=9A=84bug=EF=BC=88=E4=BF=AE=E5=A4=8D=E5=9B=BD=E6=88=98?=
=?UTF-8?q?=E5=8F=B7=E6=95=B0=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
157→78.5
---
noname/get/index.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/noname/get/index.js b/noname/get/index.js
index 32eccd4ae..31b44caba 100644
--- a/noname/get/index.js
+++ b/noname/get/index.js
@@ -57,8 +57,8 @@ export class Get extends Uninstantable {
* @param {number | Player} seat
*/
static seatTranslation(seat) {
- if (get.itemtype(seat) === 'player') seat = seat.getSeatNum();
- return `${get.cnNumber(seat, true)}号位`;
+ if (get.itemtype(seat) === 'player') seat = seat.getSeatNum() - 1;
+ return `${get.cnNumber(seat + 1, true)}号位`;
}
/**
* @param {number} numberOfPlayers
From 77c7025e2aceb6a96e06fcd9640669c5f6099761 Mon Sep 17 00:00:00 2001
From: mengxinzxz <2223529500@qq.com>
Date: Fri, 5 Apr 2024 22:24:14 +0800
Subject: [PATCH 29/35] =?UTF-8?q?=E9=AB=98=E9=A1=BAbugfix?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
mode/guozhan.js | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/mode/guozhan.js b/mode/guozhan.js
index 1485b9437..adc0157bc 100644
--- a/mode/guozhan.js
+++ b/mode/guozhan.js
@@ -2602,8 +2602,11 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
if(!player.getStorage('fakehuanjia_equip1').includes(target)) return false;
if(event.name=='die'&&event.player==target) return true;
if(event.name=='equip'&&event.player==target) return get.subtype(event.card)=='equip1';
- const evt=event.getl(target);
- return evt&&evt.player==target&&evt.es&&evt.es.some(i=>get.subtype(i)=='equip1');
+ if(event.getl){
+ const evt=event.getl(target);
+ return evt&&evt.player==target&&evt.es&&evt.es.some(i=>get.subtype(i)=='equip1');
+ }
+ return false;
});
},
forced:true,
@@ -2636,8 +2639,11 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
if(!player.getStorage('fakehuanjia_equip2').includes(target)) return false;
if(event.name=='die'&&event.player==target) return true;
if(event.name=='equip'&&event.player==target) return get.subtype(event.card)=='equip2';
- const evt=event.getl(target);
- return evt&&evt.player==target&&evt.es&&evt.es.some(i=>get.subtype(i)=='equip2');
+ if(event.getl){
+ const evt=event.getl(target);
+ return evt&&evt.player==target&&evt.es&&evt.es.some(i=>get.subtype(i)=='equip2');
+ }
+ return false;
});
},
forced:true,
@@ -3052,6 +3058,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
[[target.name1,target.name2],'character'],
],true).set('filterButton',button=>!get.is.jun(button.link));
if(bool){
+ player.line(target);
player.addSkill('fakeqingleng_effect');
if(player.getStorage('fakeqingleng_effect').some(list=>list[0]==target)){
player.storage.fakeqingleng_effect.indexOf(player.getStorage('fakeqingleng_effect').find(list=>list[0]==target))[1].addArray(links);
From fb5e08af3a221e5fc7e8cfff191d5a8766105fa4 Mon Sep 17 00:00:00 2001
From: mengxinzxz <2223529500@qq.com>
Date: Fri, 5 Apr 2024 22:47:12 +0800
Subject: [PATCH 30/35] =?UTF-8?q?=E7=8E=8B=E5=87=8Cbugfix?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
mode/guozhan.js | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/mode/guozhan.js b/mode/guozhan.js
index adc0157bc..eb1ecee67 100644
--- a/mode/guozhan.js
+++ b/mode/guozhan.js
@@ -2248,11 +2248,12 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
},0)-lib.inpile.indexOf(b.name)-get.natureList(b,false).reduce((sum,nature)=>{
return sum+lib.inpile_nature.indexOf(nature);
},0);
- }).slice().map(card=>[get.translation(type),'',card[2],card[3]]);
+ }).slice().map(card=>[get.translation(get.type(card)),'',card.name,card.nature]);
return ui.create.dialog('秘备',[list,'vcard']);
},
filter(button,player){
- return get.event().getParent().filterCard({name:button.link[2],nature:button.link[3]},player,event);
+ const event=get.event().getParent();
+ return event.filterCard({name:button.link[2],nature:button.link[3]},player,event);
},
check(button){
const player=get.event('player');
From 13afdd5e29bf5444fccb847e49675ff178ef8403 Mon Sep 17 00:00:00 2001
From: mengxinzxz <2223529500@qq.com>
Date: Fri, 5 Apr 2024 22:52:04 +0800
Subject: [PATCH 31/35] minor fix
---
mode/guozhan.js | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/mode/guozhan.js b/mode/guozhan.js
index eb1ecee67..1afb046b9 100644
--- a/mode/guozhan.js
+++ b/mode/guozhan.js
@@ -645,6 +645,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
return 1/(get.value(card)||0.5);
}).set('logSkill',['fakexiaoguo',trigger.player]).setHiddenSkill('fakexiaoguo').forResult();
},
+ popup:false,
preHidden:true,
async content(event,trigger,player){
const num=trigger.player.countCards('e'),num2=event.cards.length;
@@ -3165,9 +3166,10 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
if(effect<=0&&!cards.length) return 0;
if(ui.selected.cards.length>cards.length-(effect<=0?1:0)) return 0;
return 1/(get.value(card)||0.5);
- }).set('logSkill',['fakexiaoguo',trigger.player]).setHiddenSkill('fakexijue_xiaoguo').forResult();
+ }).set('logSkill',['fakexijue_xiaoguo',trigger.player]).setHiddenSkill('fakexijue_xiaoguo').forResult();
},
preHidden:true,
+ popup:false,
async content(event,trigger,player){
const num=trigger.player.countCards('e'),num2=event.cards.length;
await player.chooseToDiscard(trigger.player,'e',num2,true);
From d114dcf52bacb97f3d172ac752400981caa7da70 Mon Sep 17 00:00:00 2001
From: mengxinzxz <2223529500@qq.com>
Date: Fri, 5 Apr 2024 22:53:52 +0800
Subject: [PATCH 32/35] =?UTF-8?q?=E5=AE=A3=E5=85=AC=E4=B8=BBbugfix?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
mode/guozhan.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mode/guozhan.js b/mode/guozhan.js
index 1afb046b9..4811a8847 100644
--- a/mode/guozhan.js
+++ b/mode/guozhan.js
@@ -3233,7 +3233,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
};
if(hasChange(trigger,player)) drawer.push(target);
if(hasChange(trigger,target)) drawer.push(player);
- for(const i of drawers){
+ for(const i of drawer){
if(i.isDamaged()) i.recover();
}
},
From acaa9cc2f18f22617a1f733389cfa63bc7596975 Mon Sep 17 00:00:00 2001
From: mengxinzxz <2223529500@qq.com>
Date: Fri, 5 Apr 2024 22:57:00 +0800
Subject: [PATCH 33/35] minor fix
---
mode/guozhan.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mode/guozhan.js b/mode/guozhan.js
index 4811a8847..0d3f449b5 100644
--- a/mode/guozhan.js
+++ b/mode/guozhan.js
@@ -634,7 +634,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
});
},
async cost(event,trigger,player){
- event.result=await player.chooseToDiscard(get.prompt('fakexiaoguo',trigger.player),(card,player)=>{
+ event.result=await player.chooseToDiscard(get.prompt2('fakexiaoguo',trigger.player),(card,player)=>{
return get.type(card)=='basic';
},[1,Infinity]).set('complexSelect',true).set('ai',card=>{
const player=get.event('player'),target=get.event().getTrigger().player;
@@ -3157,7 +3157,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
});
},
async cost(event,trigger,player){
- event.result=await player.chooseToDiscard(get.prompt('fakexijue_xiaoguo',trigger.player),(card,player)=>{
+ event.result=await player.chooseToDiscard(get.prompt2('fakexijue_xiaoguo',trigger.player),(card,player)=>{
return get.type(card)=='basic';
},[1,Math.min(player.countMark('xijue'),player.maxHp)]).set('complexSelect',true).set('ai',card=>{
const player=get.event('player'),target=get.event().getTrigger().player;
From 3c426892f6b41cf4c2007fc0f1a7e7c385882804 Mon Sep 17 00:00:00 2001
From: mengxinzxz <2223529500@qq.com>
Date: Fri, 5 Apr 2024 23:00:16 +0800
Subject: [PATCH 34/35] =?UTF-8?q?=E9=99=88=E8=91=A3=E3=80=81=E4=B9=90?=
=?UTF-8?q?=E8=BF=9Bbugfix?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
mode/guozhan.js | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/mode/guozhan.js b/mode/guozhan.js
index 0d3f449b5..67d09064c 100644
--- a/mode/guozhan.js
+++ b/mode/guozhan.js
@@ -649,7 +649,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
preHidden:true,
async content(event,trigger,player){
const num=trigger.player.countCards('e'),num2=event.cards.length;
- await player.chooseToDiscard(trigger.player,'e',num2,true);
+ await player.discardPlayerCard(trigger.player,'e',num2,true);
if(num2>num) await trigger.player.damage();
},
},
@@ -866,6 +866,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
return target.isLinked();
},
selectTarget:-1,
+ usable:1,
async content(event,trigger,player){
for(const target of event.targets){
if(player==target) await player.chooseToDiscard(true,'he');
@@ -3172,7 +3173,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
popup:false,
async content(event,trigger,player){
const num=trigger.player.countCards('e'),num2=event.cards.length;
- await player.chooseToDiscard(trigger.player,'e',num2,true);
+ await player.discardPlayerCard(trigger.player,'e',num2,true);
if(num2>num) await trigger.player.damage();
player.removeMark('xijue',1);
},
From e187a4a6f3e342222412a37ff3640b81135fae7d Mon Sep 17 00:00:00 2001
From: mengxinzxz <2223529500@qq.com>
Date: Fri, 5 Apr 2024 23:06:42 +0800
Subject: [PATCH 35/35] minor fix
---
mode/guozhan.js | 2 ++
1 file changed, 2 insertions(+)
diff --git a/mode/guozhan.js b/mode/guozhan.js
index 67d09064c..fdfc9ea2e 100644
--- a/mode/guozhan.js
+++ b/mode/guozhan.js
@@ -867,6 +867,8 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
},
selectTarget:-1,
usable:1,
+ multiline:true,
+ multitarget:true,
async content(event,trigger,player){
for(const target of event.targets){
if(player==target) await player.chooseToDiscard(true,'he');