Merge pull request #696 from mengxinzxz/PR-Branch

bugfix
This commit is contained in:
Spmario233 2023-12-03 23:09:01 +08:00 committed by GitHub
commit 11a51e7f52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 25 additions and 19 deletions

View File

@ -662,7 +662,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
clanmingjie:{
init:function(player){
var skill='clanmingjie_'+player.playerid;
player.addSkill('clanmingjie_record');
},
initSkill:function(skill){
if(!lib.skill[skill]){
lib.skill[skill]={
charlotte:true,
@ -673,7 +675,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
lib.translate[skill]='铭戒';
lib.translate[skill+'_bg']='戒';
}
player.addSkill('clanmingjie_record');
},
onremove:function(player){
player.removeSkill('clanmingjie_record');
@ -690,6 +691,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.awakenSkill('clanmingjie');
player.addSkill('clanmingjie_effect');
var skill='clanmingjie_'+player.playerid;
game.broadcastAll(lib.skill.clanmingjie.initSkill,skill);
target.addTempSkill(skill,{player:'phaseAfter'});
target.storage[skill]=player;
},

View File

@ -1224,9 +1224,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
//郭照
yichong:{
init:function(player){
if(!lib.skill['yichong_'+player.playerid]){
lib.skill['yichong_'+player.playerid]={
initSkill:function(skill){
if(!lib.skill[skill]){
lib.skill[skill]={
charlotte:true,
onremove:true,
mark:true,
marktext:'雀',
@ -1239,8 +1240,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
},
};
lib.translate['yichong_'+player.playerid]='易宠';
lib.translate['yichong_'+player.playerid+'_bg']='雀';
lib.translate[skill]='易宠';
lib.translate[skill+'_bg']='雀';
}
},
getLimit:1,
@ -1302,6 +1303,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
var suit=event.suit;
player.storage.yichong=suit;
player.markSkill('yichong');
var skill='yichong_'+player.playerid;
game.broadcastAll(lib.skill.yichong.initSkill,skill);
game.broadcastAll(function(player,suit){
if(player.marks.yichong) player.marks.yichong.firstChild.innerHTML=get.translation(suit);
},player,suit);

View File

@ -5556,10 +5556,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
xinquanji:{
audio:2,
trigger:{
global:'gainAfter',
player:['damageEnd','loseAsyncAfter'],
player:['damageEnd'],
global:['gainAfter','loseAsyncAfter'],
},
frequent:true,
filter:function(event,player){
if(event.name=='damage') return true;
if(event.name=='loseAsync'){
@ -5579,6 +5578,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
var evt=event.getl(player);
return evt&&evt.cards2&&evt.cards2.length>0;
},
frequent:true,
content:function(){
'step 0'
event.count=(trigger.name=='damage'?trigger.num:1);
@ -5693,7 +5693,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
select:2,
filter:function(button,player){
if(ui.selected.buttons.length) return (typeof ui.selected.buttons[0].link)!=(typeof button.link)
if(typeof button.link=='number'&&player.hasSkill('xinpaiyi_'+button.link)) return false;
if(ui.selected.buttons.length) return (typeof ui.selected.buttons[0].link)!=(typeof button.link);
return true;
},
backup:function(links){

View File

@ -5591,17 +5591,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
},
fyjianyu:{
init:function(player){
if(!lib.skill['fyjianyu_'+player.playerid]){
lib.skill['fyjianyu_'+player.playerid]={
initSkill:function(skill){
if(!lib.skill[skill]){
lib.skill[skill]={
marktext:'喻',
intro:{
markcount:()=>1,
content:'指定另一名有“喻”的角色为目标时,其摸一张牌',
},
};
lib.translate['fyjianyu_'+player.playerid]='谏喻';
lib.translate['fyjianyu_'+player.playerid+'_bg']='喻';
lib.translate[skill]='谏喻';
lib.translate[skill+'_bg']='喻';
}
},
audio:2,
@ -5617,8 +5617,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
selectTarget:2,
content:function(){
var skill='fyjianyu_'+player.playerid;
game.broadcastAll(lib.skill.fyjianyu.initSkill,skill);
player.addTempSkill('fyjianyu_draw',{player:'phaseBegin'});
target.addMark('fyjianyu_'+player.playerid,1);
target.addMark(skill,1);
},
ai:{
order:0.1,

View File

@ -2102,7 +2102,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
filterTarget:()=>true,
filterCard:()=>false,
selectCard:-1,
charlotte:true,
content:function(){
'step 0'
target.draw();
@ -2130,7 +2129,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
filterCard:()=>false,
selectCard:-1,
charlotte:true,
content:function(){
'step 0'
target.chooseToDiscard('he',true,'谏国:请弃置一张牌');