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

View File

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

View File

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

View File

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

View File

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