将三国杀官方身份武将中的reinit升级为changeCharacter
This commit is contained in:
parent
18ab1ea1b9
commit
2f0814ce40
|
@ -1244,14 +1244,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
locked:false,
|
||||
skillAnimation:true,
|
||||
animationColor:'fire',
|
||||
content:function(){
|
||||
async content(event,trigger,player){
|
||||
player.awakenSkill('sbhuoji');
|
||||
game.log(player,'成功完成使命');
|
||||
var list=[];
|
||||
if(player.name&&get.character(player.name)[3].includes('sbhuoji')) list.add(player.name);
|
||||
if(player.name1&&get.character(player.name1)[3].includes('sbhuoji')) list.add(player.name1);
|
||||
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'));
|
||||
if (get.character(player.name1)[3].includes('sbhuoji')) {
|
||||
player.reinitCharacter(player.name1, 'sb_zhugeliang', false);
|
||||
}
|
||||
else if (player.name2&&get.character(player.name2)[3].includes('sbhuoji')) {
|
||||
player.reinitCharacter(player.name2, 'sb_zhugeliang', false);
|
||||
}
|
||||
else{
|
||||
player.changeSKills(['sbguanxing','sbkongcheng'],['sbhuoji','sbkanpo']);
|
||||
}
|
||||
|
|
|
@ -1852,8 +1852,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(result.bool){
|
||||
var target=result.targets[0];
|
||||
event.target=target;
|
||||
var num=target.maxHp;
|
||||
event.num=num;
|
||||
player.logSkill('skill_zhangji_B',target);
|
||||
var list=[];
|
||||
for(var i=0;i<_status.characterlist.length;i++){
|
||||
|
@ -1872,10 +1870,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
'step 2'
|
||||
if(result.bool){
|
||||
event.character=result.links[0];
|
||||
if(target.name2!=undefined) target.chooseControl(target.name,target.name2).set('prompt','请选择要更换的武将牌').set('ai',function(){
|
||||
if(target.name2!=undefined) target.chooseControl(target.name1,target.name2).set('prompt','请选择要更换的武将牌').set('ai',function(){
|
||||
return lib.skill.skill_zhangji_B.getNum(target.name)<lib.skill.skill_zhangji_B.getNum(target.name2)?target.name:target.name2;
|
||||
});
|
||||
else result.control=target.name;
|
||||
else result.control=target.name1;
|
||||
}
|
||||
else{
|
||||
target.chat('拒绝');
|
||||
|
@ -1883,10 +1881,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
event.finish();
|
||||
}
|
||||
'step 3'
|
||||
if(result.control==target.name) target.changeGroup('wei',false);
|
||||
game.log(target,'将','#g'+get.translation(result.control),'替换为了','#g'+get.translation(event.character));
|
||||
target.reinit(result.control,event.character,false);
|
||||
target.maxHp=num;
|
||||
target.reinitCharacter(result.control,event.character);
|
||||
target.update();
|
||||
},
|
||||
subSkill:{
|
||||
|
@ -12611,12 +12606,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
else event.finish();
|
||||
'step 4'
|
||||
target.reinit(result.control,'guansuo');
|
||||
if(target.name=='guansuo'&&target.group!='shu') target.changeGroup('shu');
|
||||
if(_status.characterlist){
|
||||
_status.characterlist.add(result.control);
|
||||
_status.characterlist.remove('guansuo');
|
||||
}
|
||||
target.reinitCharacter(result.control,'guansuo');
|
||||
},
|
||||
},
|
||||
olzhennan:{
|
||||
|
@ -17528,11 +17518,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
player.awakenSkill('fuhan');
|
||||
'step 1'
|
||||
event.num=Math.min(event.num,8);
|
||||
player.reinit('zhaoxiang',result.links[0],false);
|
||||
if(_status.characterlist){
|
||||
_status.characterlist.add('zhaoxiang');
|
||||
_status.characterlist.remove(result.links[0]);
|
||||
}
|
||||
player.reinitCharacter('zhaoxiang',result.links[0]);
|
||||
'step 2'
|
||||
var num=event.num-player.maxHp;
|
||||
if(num>0) player.gainMaxHp(num);
|
||||
|
@ -25520,16 +25506,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
player.awakenSkill('xinfu_xushen');
|
||||
player.logSkill('xinfu_xushen',trigger.source);
|
||||
if(trigger.source.name2!=undefined){
|
||||
trigger.source.chooseControl(trigger.source.name,trigger.source.name2).set('prompt','请选择要更换的武将牌');
|
||||
}else event._result={control:trigger.source.name};
|
||||
trigger.source.chooseControl(trigger.source.name1,trigger.source.name2).set('prompt','请选择要更换的武将牌');
|
||||
}else event._result={control:trigger.source.name1};
|
||||
}
|
||||
else event.finish();
|
||||
"step 2"
|
||||
trigger.source.reinit(result.control,'guansuo');
|
||||
if(_status.characterlist){
|
||||
_status.characterlist.add(result.control);
|
||||
_status.characterlist.remove('guansuo');
|
||||
}
|
||||
trigger.source.reinitCharacter(result.control,'guansuo');
|
||||
player.recover();
|
||||
player.addSkills('xinfu_zhennan');
|
||||
},
|
||||
|
|
|
@ -6605,16 +6605,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(target.name2!=undefined){
|
||||
target.chooseControl(target.name1,target.name2).set('prompt','请选择要更换的武将牌');
|
||||
}
|
||||
else event._result={control:target.name};
|
||||
else event._result={control:target.name1};
|
||||
}
|
||||
else event.goto(4);
|
||||
'step 3'
|
||||
target.reinit(result.control,'dc_guansuo');
|
||||
if(target.name=='dc_guansuo'&&target.group!='shu') target.changeGroup('shu');
|
||||
if(_status.characterlist){
|
||||
_status.characterlist.add(result.control);
|
||||
_status.characterlist.remove('dc_guansuo');
|
||||
}
|
||||
target.reinitCharacter(result.control,'dc_guansuo');
|
||||
'step 4'
|
||||
target.draw(3);
|
||||
},
|
||||
|
|
|
@ -3208,9 +3208,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(!_status.characterlist){
|
||||
lib.skill.pingjian.initList();
|
||||
}
|
||||
_status.characterlist.remove(character);
|
||||
_status.characterlist.add('ganfurenmifuren');
|
||||
player.reinit('ganfurenmifuren',character,false);
|
||||
player.reinitCharacter('ganfurenmifuren',character);
|
||||
'step 2'
|
||||
player.recover(1-player.hp);
|
||||
player.addTempSkill('dcxunbie_muteki',{player:'phaseAfter'});
|
||||
|
@ -10426,37 +10424,25 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(player!=event.dying) return false;
|
||||
return true;
|
||||
},
|
||||
content:function(){
|
||||
async content(event,trigger,player){
|
||||
'step 0'
|
||||
player.awakenSkill('syxiongyi');
|
||||
if(!_status.characterlist){
|
||||
lib.skill.pingjian.initList();
|
||||
}
|
||||
event.hp=1-player.hp;
|
||||
if(_status.characterlist.includes('xushi')){
|
||||
if(player.name1=='re_sunyi'||player.name2=='re_sunyi') event._result={control:'re_sunyi'};
|
||||
else if(player.name2!=undefined){
|
||||
player.chooseControl(player.name1,player.name2).set('prompt','请选择要更换的武将牌');
|
||||
if (player.name2&&get.character(player.name2)[3].includes('syxiongyi')) {
|
||||
await player.reinitCharacter(player.name2, 'xushi');
|
||||
}
|
||||
else event._result={control:player.name1};
|
||||
hp+=2;
|
||||
_status.characterlist.remove('xushi');
|
||||
_status.characterlist.add('re_sunyi');
|
||||
player.reinit('re_sunyi','xushi',false);
|
||||
else {
|
||||
await player.reinitCharacter(player.name1, 'xushi');
|
||||
}
|
||||
if(player.hp<3) await player.recover(3-player.hp);
|
||||
}
|
||||
else{
|
||||
player.addSkills('olhunzi');
|
||||
event.goto(2);
|
||||
await player.addSkills('olhunzi');
|
||||
if(player.hp<1) await player.recover(1-player.hp);
|
||||
}
|
||||
'step 1'
|
||||
event.hp+=2;
|
||||
var name=result.control;
|
||||
_status.characterlist.remove('xushi');
|
||||
_status.characterlist.add(name);
|
||||
player.reinit(name,'xushi',false);
|
||||
'step 2'
|
||||
var hp=event.hp;
|
||||
if(hp>0) player.recover(hp);
|
||||
},
|
||||
ai:{
|
||||
order:1,
|
||||
|
|
Loading…
Reference in New Issue