From dfb9bfeae0d3c9b193104549858df4638befe490 Mon Sep 17 00:00:00 2001
From: mengxinzxz <2223529500@qq.com>
Date: Mon, 15 Jan 2024 14:47:49 +0800
Subject: [PATCH 1/3] =?UTF-8?q?=E6=9B=B9=E5=AE=87bugfix=EF=BC=8C=E7=A5=9E?=
=?UTF-8?q?=E5=8D=8E=E4=BD=97=E6=8A=80=E8=83=BD=E6=95=88=E6=9E=9C=E8=B0=83?=
=?UTF-8?q?=E6=95=B4=EF=BC=8C=E4=B9=90=E5=B0=8F=E4=B9=94=E5=8D=A1=E7=89=8C?=
=?UTF-8?q?=E6=A0=87=E8=AE=B0=E5=90=8D=E7=A7=B0=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
character/extra.js | 73 ++++++++++++++++++++++++++-------------------
character/huicui.js | 6 ++--
character/sp.js | 5 +++-
3 files changed, 50 insertions(+), 34 deletions(-)
diff --git a/character/extra.js b/character/extra.js
index 256698cac..93bc0269d 100755
--- a/character/extra.js
+++ b/character/extra.js
@@ -155,8 +155,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
'虎:当你使用指定唯一目标的牌对目标角色造成伤害时,此伤害+1。',
'鹿:①当你获得此效果时,你回复1点体力并弃置判定区的所有牌。②你不能成为延时锦囊牌的目标。',
'熊:每回合限一次,当你受到伤害时,此伤害-1。',
- '猿:出牌阶段开始时,你选择一名角色,随机获得其装备区里的一张牌。',
- '鹤:出牌阶段开始时,你摸三张牌。',
+ '猿:当你获得此效果时,你选择一名其他角色,获得其装备区里的一张牌。',
+ '鹤:当你获得此效果时,你摸三张牌。',
],
updateMark:function(player){
var wuqinxi=player.storage.wuling_wuqinxi;
@@ -177,11 +177,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
game.broadcastAll(function(player,curMark){
if(player.marks.wuling_wuqinxi) player.marks.wuling_wuqinxi.firstChild.innerHTML=curMark;
},player,curMark);
- if(curMark=='鹿'){
- player.logSkill('wuling_wuqinxi');
- player.recover();
- player.discard(player.getCards('j')).discarder=player;
- }
+ var next=game.createEvent('wuling_change');
+ next.player=player;
+ next.setContent('emptyEvent');
},
ai:{
order:7,
@@ -214,7 +212,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
trigger:{
source:'damageBegin1',
- player:['phaseZhunbeiBegin','damageBegin4','phaseUseBegin'],
+ player:['phaseZhunbeiBegin','damageBegin4','wuling_change'],
},
filter:function(event,player,name){
const wuqinxi=player.storage.wuling_wuqinxi&&player.storage.wuling_wuqinxi[0];
@@ -228,9 +226,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){
case 'damageBegin4':
return wuqinxi=='熊'&&!player.hasSkill('wuling_xiong');
default:
- if(wuqinxi=='鹤') return true;
- if(wuqinxi!='猿') return false;
- return game.hasPlayer(target=>target.countGainableCards(player,'e'));
+ switch(wuqinxi){
+ case '鹿':
+ return player.isDamaged()||player.countCards('j');
+ case '鹤':
+ return true;
+ case '猿':
+ return game.hasPlayer(target=>target!=playertarget.countGainableCards(player,'e'));
+ default:
+ return false;
+ }
+ break;
}
},
forced:true,
@@ -256,31 +262,38 @@ game.import('character',function(lib,game,ui,get,ai,_status){
event.finish();
break;
default:
- if(wuqinxi=='鹤'){
- player.draw(3);
- event.finish();
- }
- else{
- player.chooseTarget('五禽戏:获得一名角色装备区里的一张装备牌',function(card,player,target){
- return target.countGainableCards(player,'e');
- }).set('ai',function(target){
- var player=_status.event.player;
- var att=get.attitude(player,target),eff=0;
- target.getCards('e',function(card){
- var val=get.value(card,target);
- eff=Math.max(eff,-val*att);
+ switch(wuqinxi){
+ case '鹿':
+ player.recover();
+ player.discard(player.getCards('j')).discarder=player;
+ event.finish();
+ break;
+ case '鹤':
+ player.draw(3);
+ event.finish();
+ break;
+ case '猿':
+ player.chooseTarget('五禽戏:获得一名其他角色装备区里的一张装备牌',function(card,player,target){
+ return target!=player&&target.countGainableCards(player,'e');
+ }).set('ai',function(target){
+ var player=_status.event.player;
+ var att=get.attitude(player,target),eff=0;
+ target.getCards('e',function(card){
+ var val=get.value(card,target);
+ eff=Math.max(eff,-val*att);
+ });
+ return eff;
});
- return eff;
- });
+ break;
}
+ break;
}
}
'step 1'
if(result.bool){
var target=result.targets[0];
player.line(target,'green');
- var cards=target.getGainableCards(player,'e');
- player.gain(cards.randomGets(1),target,'give');
+ player.gainPlayerCard(target,'e',true);
}
},
ai:{
@@ -8049,8 +8062,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
'