From 08a118815af3320adc313fce71092abea38dd592 Mon Sep 17 00:00:00 2001 From: Spmario233 Date: Thu, 15 Feb 2024 21:09:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E6=94=B9=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mode/guozhan.js | 20 +++++++++----------- mode/identity.js | 5 +++-- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/mode/guozhan.js b/mode/guozhan.js index 7ca75e0b6..c64b62a4f 100644 --- a/mode/guozhan.js +++ b/mode/guozhan.js @@ -2169,7 +2169,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ event.finish(); } else{ - target.addSkillLog(result.control); + target.addSkills(result.control); target.line(player); player.recover(player.maxHp-player.hp); } @@ -3914,7 +3914,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ if(result.bool){ var target=result.targets[0]; player.logSkill('gzlianyou',target); - target.addSkillLog('gzxinghuo'); + target.addSkills('gzxinghuo'); game.delayx(); } }, @@ -10828,8 +10828,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ if(list.length){ player.gain(list,'gain2'); if(list.length>=3&&player.hasStockSkill('lianzi')){ - player.removeSkill('lianzi'); - player.addSkill('gzzhiheng'); + player.changeSkills(['gzzhiheng'],['lianzi']); } } }, @@ -11997,9 +11996,8 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ player.recover(2-player.hp); } 'step 2' - player.removeSkill('shouyue'); player.removeSkill('wuhujiangdaqi'); - player.addSkill('rerende'); + player.changeSkills(['rerende'],['shouyue']); }, ai:{ order:1, @@ -12420,7 +12418,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ player.removeCharacter(1); } 'step 1' - target.addSkill('gzyongjue'); + target.addSkills('gzyongjue'); if(target!=player){ target.draw(2); } @@ -12504,11 +12502,11 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ 'step 0' player.removeCharacter(1); 'step 1' - player.removeSkill('baoling'); + player.removeSkills('baoling'); player.gainMaxHp(3,true); 'step 2' player.recover(3); - player.addSkill('benghuai'); + player.addSkills('benghuai'); }, derivation:'benghuai' }, @@ -15523,7 +15521,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ if(event.hidden) game.log(player,'替换了副将','#g'+get.translation(player.name2)); else game.log(player,'将副将从','#g'+get.translation(player.name2),'变更为','#g'+get.translation(name)); player.viceChanged=true; - player.reinit(player.name2,name,false); + player.reinitCharacter(player.name2,name,false); }, changeVice:function(){ 'step 0' @@ -15579,7 +15577,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ if(event.hidden) game.log(player,'替换了副将','#g'+get.translation(player.name2)); else game.log(player,'将副将从','#g'+get.translation(player.name2),'变更为','#g'+get.translation(name)); player.viceChanged=true; - player.reinit(player.name2,name,false); + player.reinitCharacter(player.name2,name,false); }, /*----分界线----*/ mayChangeVice:function(){ diff --git a/mode/identity.js b/mode/identity.js index f2fde5338..c1a68d4bf 100644 --- a/mode/identity.js +++ b/mode/identity.js @@ -3874,12 +3874,13 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ 'step 2' player.recover(); player.draw(); - player.getStockSkills(true,true).forEach(stockSkill=>{ + const skills = player.getStockSkills(true,true).forEach(stockSkill=>{ if(player.hasSkill(stockSkill)) return; var info=get.info(stockSkill); if(!info||!info.zhuSkill) return; - player.addSkillLog(stockSkill); + return true; }); + if(skills.length) player.addSkills(skills) } }, stratagem_revitalization:{