将sb.js到standard.js中的所有addSkill改为addSkills

This commit is contained in:
Spmario233 2024-02-14 17:18:29 +08:00
parent 25294f52ef
commit 38c141eab1
7 changed files with 89 additions and 124 deletions

View File

@ -552,8 +552,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
game.log(player,'选择了',target2);
const skills=target2.getStockSkills(true,true);
const skills2=player.getStockSkills(true,true);
player.addSkillLog(skills);
player.removeSkillLog(skills2);
player.changeSkills(skills,skills2);
}
}
},
@ -1254,8 +1253,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(player.name2&&get.character(player.name2)[3].includes('sbhuoji')) list.add(player.name2);
if(list.length) list.forEach(name=>player.reinit(name,'sb_zhugeliang'));
else{
player.removeSkill(['sbhuoji','sbkanpo']);
player.addSkill(['sbguanxing','sbkongcheng']);
player.changeSKills(['sbguanxing','sbkongcheng'],['sbhuoji','sbkanpo']);
}
},
},
@ -2302,8 +2300,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
'step 2'
player.draw(3);
'step 3'
player.addSkillLog('sbyingzi');
player.addSkillLog('gzyinghun');
player.addSkills(['sbyingzi','gzyinghun']);
},
ai:{
threaten:function(player,target){
@ -5914,7 +5911,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
content:function(){
player.awakenSkill('sbdujiang');
player.addSkillLog('sbduojing');
player.addSkills('sbduojing');
player.storage.sbkeji=true;
}
},

View File

@ -667,7 +667,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.gain(gains,'gain2','log');
}
'step 2'
player.addSkill('qingce');
player.addSkills('qingce');
game.log(player,'获得了技能','#g【清侧】');
player.loseMaxHp();
},
@ -808,7 +808,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.gain(gains,'gain2','log');
}
'step 2'
player.addSkillLog('drlt_qingce');
player.addSkills('drlt_qingce');
player.loseMaxHp();
},
},
@ -1209,8 +1209,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
"step 1"
var num=player.maxHp-player.countCards('h');
if(num>0) player.draw(num);
player.removeSkill('drlt_jueyan');
player.addSkill('drlt_huairou');
player.changeSkills(['drlt_huairou'],['drlt_jueyan']);
},
},
"drlt_huairou":{
@ -3345,10 +3344,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.chooseDrawRecover(2,true);
"step 1"
player.loseMaxHp();
player.storage.zhiji=true;
if(player.hp>player.maxHp) player.hp=player.maxHp;
player.update();
player.addSkill('reguanxing');
player.addSkills('reguanxing');
}
},
xiangle:{
@ -3724,7 +3720,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
content:function(){
player.awakenSkill('zaoxian');
player.loseMaxHp();
player.addSkill('jixi');
player.addSkills('jixi');
}
},
jixi:{
@ -3818,12 +3814,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
forced:true,
//priority:3,
content:function(){
player.loseMaxHp();
player.addSkill('reyingzi');
player.addSkill('gzyinghun');
game.log(player,'获得了技能','#g【英姿】和【英魂】')
player.awakenSkill(event.name);
player.storage[event.name]=true;
player.loseMaxHp();
player.addSkills(['reyingzi','gzyinghun']);
},
ai:{
threaten:function(player,target){
@ -7650,7 +7643,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
else{
event.betrayer.popup('质疑错误','fire');
event.betrayer.addSkillLog('chanyuan');
event.betrayer.addSkills('chanyuan');
}
'step 7'
game.delay(2);

View File

@ -2168,8 +2168,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.awakenSkill('rechuhai');
game.log(player,'成功完成使命');
if(player.isDamaged()) player.recover(player.maxHp-player.hp);
player.removeSkill('xianghai');
player.addSkill('zhangming');
player.changeSkills(['zhangming'],['xianghai']);
},
},
fail:{
@ -2741,7 +2740,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
if(cards.length) player.gain(cards,'gain2');
'step 1'
player.addSkill('xinmouli');
player.addSkills('xinmouli');
},
group:['mibei_fail','mibei_silent'],
derivation:'xinmouli',
@ -3179,7 +3178,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
content:function(){
game.log(player,'成功完成使命');
player.awakenSkill('qingyu');
player.addSkillLog('xuancun');
player.addSkills('xuancun');
},
},
fail:{
@ -5767,7 +5766,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.awakenSkill('spsanchen');
player.gainMaxHp();
player.recover();
player.addSkillLog('spmiewu');
player.addSkills('spmiewu');
},
ai:{
combo:'wuku',

View File

@ -3955,7 +3955,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
content:function(){
'step 0'
player.awakenSkill('olhuiqi');
player.addSkillLog('olxieju');
player.addSkills('olxieju');
player.insertPhase();
}
},
@ -7118,9 +7118,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
game.log(player,'删除了','#g【笔心】','描述的前五个字符');
if(player.countMark('olbixin')==3){
game.log(player,'交换了','#g【笔心】','方括号中的两个数字');
player.removeSkill('olximo');
game.log(player,'失去了技能','#g【洗墨】');
player.addSkillLog('olfeibai');
//player.removeSkill('olximo');
//game.log(player,'失去了技能','#g【洗墨】');
player.changeSkills(['olfeibai'],['olximo']);
}
},
ai:{
@ -8461,7 +8461,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
else event.finish();
'step 2'
target.addSkill(result.control);
target.addSkills(result.control);
'step 3'
var num=player.countCards('h');
if(num>0) player.chooseToDiscard('h',num,true);
@ -10293,12 +10293,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
content:function(){
var num=Math.min(cards.length,4-player.countMark('spmanwang'));
if(num>=1) player.addSkill('sppanqin');
if(num>=1) player.addSkills('sppanqin');
if(num>=2) player.draw();
if(num>=3) player.recover();
if(num>=4){
player.draw(2);
player.removeSkill('sppanqin');
player.removeSkills('sppanqin');
}
},
intro:{content:'已经移去过#个选项'},
@ -10385,7 +10385,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
switch(player.countMark('spmanwang')){
case 1:
player.draw(2);
player.removeSkill('sppanqin');
player.removeSkills('sppanqin');
break;
case 2:
player.recover();
@ -10394,7 +10394,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.draw();
break;
case 4:
player.addSkill('sppanqin');
player.addSkills('sppanqin');
break;
}
},
@ -10482,7 +10482,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
content:function(){
for(var i of lib.skill.rebaobian.derivation){
if(!player.hasSkill(i,null,null,false)){
player.addSkillLog(i);
player.addSkills(i);
break;
}
}
@ -11220,7 +11220,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
target.gainMaxHp();
target.recover();
target.draw(3);
target.addSkill('olzaowang2');
target.addSkills('olzaowang2');
},
ai:{
order:2,
@ -11950,7 +11950,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
else event.finish();
'step 2'
target.addSkillLog(result.control);
target.addSkills(result.control);
},
},
//邓芝
@ -12582,7 +12582,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
content:function(){
'step 0'
player.awakenSkill('olxushen');
player.addSkill('olzhennan');
player.addSkills('olzhennan');
player.recover(1-player.hp);
'step 1'
if(!player.isDying()&&!game.hasPlayer(function(current){
@ -13677,7 +13677,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return list.randomGet();
});
'step 1'
player.addSkillLog(result.control);
player.addSkills(result.control);
game.broadcastAll(function(skill){
var list=[skill];game.expandSkills(list);
for(var i of list){
@ -13740,7 +13740,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(player.storage.retuogu) player.removeSkill(player.storage.retuogu);
player.storage.retuogu=result.control;
player.markSkill('retuogu');
player.addSkillLog(result.control);
player.addSkills(result.control);
game.broadcastAll(function(skill){
var list=[skill];
game.expandSkills(list);
@ -14074,8 +14074,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
content:function(){
player.awakenSkill('xinmoucheng');
player.addSkill('xinjingong');
player.removeSkill('xinlianji');
player.changeSkills(['xinjingong'],['xinlianji']);
},
},
xinjingong:{
@ -16276,9 +16275,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
animationColor:'gray',
content:function(){
player.awakenSkill('moucheng');
player.removeSkill('wylianji');
game.log(player,'失去了技能','#g【连计】');
player.addSkillLog('jingong');
player.changeSkills(['jingong'],['wylianji']);
}
}
}
@ -17681,7 +17679,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
'step 2'
var map=event.result||result;
if(map&&map.skills&&map.skills.length){
for(var i of map.skills) player.addSkillLog(i);
player.addSkils(map.skills);
}
game.broadcastAll(function(list){
game.expandSkills(list);
@ -17689,7 +17687,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
var info=lib.skill[i];
if(!info) continue;
if(!info.audioname2) info.audioname2={};
info.audioname2.old_yuanshu='weidi';
info.audioname2.zhaoxiang='fuhan';
}
},map.skills);
'step 3'
@ -17906,12 +17904,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}).set('choiceList',['获得技能〖妄尊〗',str]).set('choice',choice);
'step 2'
if(result.control=='选项一'){
player.addSkillLog('rewangzun');
player.addSkills('rewangzun');
}
else{
player.draw(2);
if(event.list){
for(var i of event.list) player.addSkillLog(event.list);
player.addSkills(event.list);
game.broadcastAll(function(list){
game.expandSkills(list);
for(var i of list){
@ -19419,9 +19417,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
});
'step 2'
if(result.control=='xindangxian') player.storage.xinfuli=true;
player.addSkill(result.control);
player.popup(result.control);
game.log(player,'获得了技能','#g【'+get.translation(result.control)+'】');
player.addSkills(result.control);
},
ai:{threaten:2.5},
intro:{
@ -19449,8 +19445,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
else event.finish();
'step 2'
if(result.control){
player.addSkillLog(result.control);
player.popup(result.control);
player.addSkills(result.control);
}
},
ai:{threaten:2},
@ -20287,10 +20282,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return player.getExpansions('fentian').length>=3;
},
content:function(){
player.loseMaxHp();
player.addSkill('xintan');
player.storage.zhiri=true;
player.awakenSkill('zhiri');
player.loseMaxHp();
player.storage.zhiri=true;
}
},
xintan:{
@ -20339,11 +20333,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return !player.storage.danji&&player.countCards('h')>player.hp;
},
content:function(){
player.storage.danji=true;
player.loseMaxHp();
player.addSkill('mashu');
player.addSkill('nuzhan');
player.awakenSkill('danji');
player.loseMaxHp();
player.addSkills(['mashu','nuzhan']);
},
ai:{
maixie:true,
@ -21727,15 +21719,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
content:function(){
"step 0"
player.awakenSkill('fengliang');
player.loseMaxHp();
"step 1"
if(player.hp<2){
player.recover(2-player.hp);
}
"step 2"
player.addSkill('oltiaoxin');
player.storage.kunfen=true;
player.awakenSkill('fengliang');
player.addSkills('oltiaoxin');
},
},
zhuiji:{
@ -22492,12 +22483,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
forced:true,
content:function(){
player.storage.fanxiang=true;
player.awakenSkill('fanxiang');
player.gainMaxHp();
player.recover();
player.removeSkill('liangzhu');
player.addSkill('xiaoji');
player.awakenSkill('fanxiang');
player.changeSkills(['xiaoji'],['liangzhu']);
},
},
mingshi:{
@ -23072,11 +23061,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.awakenSkill('cunsi');
var cards=player.getCards('h');
player.give(cards,target);
player.storage.cunsi=true;
game.delay();
target.addSkill('yongjue');
target.markSkillCharacter('yongjue',player,'存嗣','<div class="skill">【勇决】</div><div>每当其他角色于回合内使用一张杀,若目标不是你,你可以获得之,每回合限一次</div>');
"step 1"
target.addSkills('yongjue');
"step 2"
target.markSkillCharacter('yongjue',player,'存嗣','<div class="skill">【勇决】</div><div>每当其他角色于回合内使用一张杀,若目标不是你,你可以获得之,每回合限一次</div>');
player.turnOver();
},
intro:{
@ -24689,11 +24677,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
unique:true,
juexingji:true,
content:function(){
player.draw(player.maxHp);
player.addSkill('benghuai');
player.addSkill('weizhong');
player.storage.juyi=true;
player.awakenSkill('juyi');
player.draw(player.maxHp);
player.addSkills(['benghuai','weizhong']);
}
},
weizhong:{
@ -25547,7 +25533,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
_status.characterlist.remove('guansuo');
}
player.recover();
player.addSkill('xinfu_zhennan');
player.addSkills('xinfu_zhennan');
},
mark:true,
intro:{

View File

@ -921,7 +921,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if (result.bool) {
var target = result.targets[0];
player.line(target, 'thunder');
target.addSkillLog('dccanyun');
target.addSkills('dccanyun');
}
},
},
@ -1174,14 +1174,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
filter:function(event,player){
return player.countCards('h')>player.hp;
},
content:function(){
'step 0'
player.loseMaxHp();
'step 1'
player.recover(player.maxHp-player.hp);
player.addSkill('mashu');
player.addSkill('dcnuchen');
async content(event, trigger, player){
player.awakenSkill('dcdanji');
await player.loseMaxHp();
await player.recover(player.maxHp-player.hp);
await player.addSkills(['mashu','dcnuchen']);
},
ai:{
maixie:true,
@ -1877,9 +1874,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
event.num2=target.countCards('e');
if(event.num2==4&&num!=4){
player.trySkillAnimate('dccuichuan_animate','dccuichuan_animate',player.checkShow('dccuichuan'));
player.removeSkill('dccuichuan');
game.log(player,'失去了技能','#g【榱椽】');
player.addSkillLog('dczuojian');
//player.removeSkill('dccuichuan');
//game.log(player,'失去了技能','#g【榱椽】');
player.changeSkills(['dczuojian'],['dccuichuan']);
target.insertPhase();
game.delayx();
}
@ -4164,12 +4161,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
var target=result.targets[0];
player.awakenSkill('chuanshu');
player.logSkill('chuanshu',target);
target.addSkillLog('chaofeng');
target.addSkills('chaofeng');
if(player.isDead()) event.finish();
}
else event.finish();
'step 2'
for(var i of lib.skill.chuanshu.derivation) player.addSkillLog(i);
player.addSkills(lib.skill.chuanshu.derivation);
},
derivation:['ollongdan','drlt_congjian','chuanyun'],
},
@ -5661,8 +5658,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.recover(num);
}
'step 2'
player.removeSkill('mouni');
player.addSkill('zhangu');
//player.removeSkill('mouni');
player.changeSkills(['zhangu'],['mouni']);
},
},
zhangu:{
@ -6443,7 +6440,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(result.bool){
var target=result.targets[0];
player.logSkill('cixiao',target);
target.addSkill('panshi');
target.addSkills('panshi');
}
event.finish();
'step 2'
@ -6483,7 +6480,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return true;
}
}).concat(result.targets),'green');
target.addSkill('panshi');
target.addSkills('panshi');
}
else event.finish();
'step 4'
@ -6573,7 +6570,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
content:function(){
player.awakenSkill('decadexushen');
player.addSkill('decadezhennan');
player.addSkills('decadezhennan');
player.addTempSkill('decadexushen2');
trigger.decadexushen=true;
player.recover();
@ -6697,35 +6694,29 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
yujuex:{
audio:'yujue',
content:function(){
'step 0'
player.disableEquip(lib.skill.yujue_backup.position);
'step 1'
async content(event,trigger,player){
await player.disableEquip(lib.skill.yujue_backup.position);
if(player.isIn()&&game.hasPlayer(function(current){
return current!=player&&current.countCards('h');
})){
player.chooseTarget(true,'选择一名角色交给你一张牌并获得技能〖执笏〗',function(card,player,target){
const result = await player.chooseTarget(true,'选择一名角色交给你一张牌并获得技能〖执笏〗',function(card,player,target){
if(player==target) return false;
return target.countCards('h')>0;
}).set('ai',function(target){
return get.attitude(_status.event.player,target)*target.countCards('h');
});
}
else event.finish();
'step 2'
if(result.bool){
var target=result.targets[0];
event.target=target;
player.line(target);
target.chooseCard('h',true,'交给'+get.translation(player)+'一张手牌');
}
else event.finish();
'step 3'
if(result.bool&&result.cards&&result.cards.length){
target.give(result.cards,player);
target.storage.zhihu_mark=player;
target.addSkill('zhihu');
target.addSkill('zhihu_mark');
}).forResult();
if(result.bool){
var target=result.targets[0];
event.target=target;
player.line(target);
const result2 = await target.chooseCard('h',true,'交给'+get.translation(player)+'一张手牌').forResult();
if(result2.bool&&result2.cards&&result2.cards.length){
await target.give(result2.cards,player);
target.storage.zhihu_mark=player;
await target.addSkills('zhihu');
target.addSkill('zhihu_mark');
}
}
}
},
},
@ -9431,8 +9422,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.line(list[i],'green');
}
}
player.removeSkill('guju');
player.addSkill('bmcanshi');
//player.removeSkill('guju');
player.changeSkills(['bmcanshi'],['guju']);
}
},
bmcanshi:{

View File

@ -2103,8 +2103,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
const cards=player.getEquips(1);
if(cards.length) player.discard(cards);
player.loseMaxHp();
player.addSkill('mashu');
player.addSkill('shenji');
player.addSkills(['mashu','shenji']);
},
derivation:['mashu','shenji'],
},

View File

@ -7200,8 +7200,8 @@ export class Player extends HTMLDivElement {
changeSkills(addSkill = [], removeSkill = []){
const next = game.createEvent('changeSkills', false);
next.player = this;
next.addSkill = addSkill.unique();
next.removeSkill = removeSkill.unique();
next.addSkill = addSkill.slice(0).unique();
next.removeSkill = removeSkill.slice(0).unique();
next.setContent('changeSkills');
return next;
}