commit
401221398e
|
@ -5111,8 +5111,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
audio:2,
|
||||
trigger:{player:'phaseJieshuBegin'},
|
||||
filter:function(event,player){
|
||||
var num=player.storage.mobileyanzhu?player.maxHp:player.hp;
|
||||
return num>0;
|
||||
return (player.storage.mobileyanzhu?player.maxHp:player.hp)>0;
|
||||
},
|
||||
direct:true,
|
||||
content:function(){
|
||||
|
@ -5144,7 +5143,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
'step 3'
|
||||
if(event.current&&event.current.countCards('he')){
|
||||
if(player.storage.mobileyanzhu||event.targets2.length==1) event.current.chooseCard('选择一张牌置于牌堆顶','he',true);
|
||||
if(!player.storage.mobileyanzhu||event.targets2.length==1) event.current.chooseCard('选择一张牌置于牌堆顶','he',true);
|
||||
else event.current.chooseCardTarget({
|
||||
prompt:'将一张牌置于牌堆顶,或交给其他目标角色',
|
||||
filterCard:true,
|
||||
|
@ -5212,7 +5211,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
player.removeSkill('mobileyanzhu');
|
||||
player.storage.mobileyanzhu=true;
|
||||
player.popup('兴学');
|
||||
game.log(player,'修改了技能','【兴学】');
|
||||
game.log(player,'修改了技能','#g【兴学】');
|
||||
}
|
||||
else{
|
||||
player.gainPlayerCard(target,true,'hej');
|
||||
|
|
|
@ -4165,7 +4165,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
init:function(player){
|
||||
if(!player.storage.huashen){
|
||||
player.storage.huashen={
|
||||
shown:[],
|
||||
owned:{}
|
||||
};
|
||||
}
|
||||
|
@ -4173,11 +4172,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
intro:{
|
||||
content:function(storage,player){
|
||||
var str='';
|
||||
var slist=storage.owned;
|
||||
var list=[];
|
||||
for(var i in slist){
|
||||
list.push(i);
|
||||
}
|
||||
var list=Object.keys(storage.owned);
|
||||
if(list.length){
|
||||
str+=get.translation(list[0]);
|
||||
for(var i=1;i<list.length;i++){
|
||||
|
@ -4190,36 +4185,29 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
return str;
|
||||
},
|
||||
onunmark:function(storage,player){
|
||||
_status.characterlist.addArray(Object.keys(storage.owned));
|
||||
storage.owned=[];
|
||||
},
|
||||
mark:function(dialog,content,player){
|
||||
var slist=content.owned;
|
||||
var list=[];
|
||||
for(var i in slist){
|
||||
list.push(i);
|
||||
}
|
||||
var list=Object.keys(content.owned);
|
||||
if(list.length){
|
||||
dialog.addSmall([list,(item,type,position,noclick,node)=>lib.skill.rehuashen.$createButton(item,type,position,noclick,node)]);
|
||||
}
|
||||
for(var i=0;i<dialog.buttons.length;i++){
|
||||
if(!player.isUnderControl(true)){
|
||||
if(!content.shown.contains(dialog.buttons[i].link)){
|
||||
dialog.buttons[i].node.group.remove();
|
||||
dialog.buttons[i].node.hp.remove();
|
||||
dialog.buttons[i].node.intro.remove();
|
||||
dialog.buttons[i].node.name.innerHTML=get.verticalStr('未知');
|
||||
dialog.buttons[i].node.name.dataset.nature='';
|
||||
dialog.buttons[i].style.background='';
|
||||
dialog.buttons[i]._nointro=true;
|
||||
dialog.buttons[i].classList.add('menubg');
|
||||
}
|
||||
var skill=player.storage.huashen.current2;
|
||||
var character=player.storage.huashen.current;
|
||||
if(skill&&character){
|
||||
dialog.addSmall([[character],(item,type,position,noclick,node)=>lib.skill.rehuashen.$createButton(item,type,position,noclick,node)]);
|
||||
dialog.add('<div><div class="skill">【'+get.translation(lib.translate[skill+'_ab']||get.translation(skill).slice(0,2))+'】</div>'+
|
||||
'<div>'+get.skillInfoTranslation(skill,player)+'</div></div>');
|
||||
}
|
||||
if(dialog.buttons[i].link==player.storage.huashen.current){
|
||||
dialog.buttons[i].classList.add('glow2');
|
||||
if(player.isUnderControl(true)){
|
||||
dialog.addSmall([list,(item,type,position,noclick,node)=>lib.skill.rehuashen.$createButton(item,type,position,noclick,node)]);
|
||||
}
|
||||
else{
|
||||
dialog.addText('共有'+get.cnNumber(list.length)+'张“化身”');
|
||||
}
|
||||
}
|
||||
var skill=player.storage.huashen.current2;
|
||||
if(skill){
|
||||
dialog.add('<div><div class="skill">【'+get.translation(lib.translate[skill+'_ab']||get.translation(skill).slice(0,2))+'】</div>'+
|
||||
'<div>'+get.skillInfoTranslation(skill,player)+'</div></div>');
|
||||
else{
|
||||
return '没有化身';
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -4425,7 +4413,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var skill=map.skill,character=map.character;
|
||||
if(character!=player.storage.huashen.current){
|
||||
player.storage.huashen.current=character;
|
||||
player.storage.huashen.shown.add(character);
|
||||
player.markSkill('huashen');
|
||||
game.broadcastAll(function(character,player){
|
||||
player.sex=lib.character[character][0];
|
||||
|
|
|
@ -12790,25 +12790,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
var name=button.link[2];
|
||||
var evt=_status.event.getParent();
|
||||
if(get.type(name)=='basic'){
|
||||
if(evt.type=='phase'){
|
||||
var card={name:name,nature:button.link[3],isCard:true};
|
||||
if(name=='shan') return 2;
|
||||
if(evt.type=='dying'){
|
||||
if(get.attitude(player,evt.dying)<2) return false;
|
||||
if(name=='jiu') return 2.1;
|
||||
return 1.9;
|
||||
}
|
||||
if(evt.type=='phase') return player.getUseValue({name:name,nature:button.link[3],isCard:true});
|
||||
return 1;
|
||||
return player.getUseValue(card);
|
||||
}
|
||||
if(!['chuqibuyi','shuiyanqijunx','juedou','nanman','wanjian','shunshou','zhujinqiyuan'].contains(name)) return 0;
|
||||
var card={name:name,isCard:true};
|
||||
if(['shunshou','zhujinqiyuan'].contains(card.name)){
|
||||
if(!game.hasPlayer(function(current){
|
||||
return get.attitude(player,current)!=0&&get.distance(player,current)<=1&&player.canUse(card,current)&&get.effect(current,card,player,player)>0;
|
||||
})) return 0;
|
||||
return player.getUseValue(card)-7;
|
||||
}
|
||||
return player.getUseValue(card)-4;
|
||||
return 1;
|
||||
},
|
||||
backup:function(links,player){
|
||||
if(typeof links[1]=='number') links.reverse();
|
||||
|
@ -12852,10 +12844,26 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var name=(tag=='respondSha'?'sha':'shan');
|
||||
return !player.storage.youlong2.contains(name);
|
||||
},
|
||||
order:1,
|
||||
result:{
|
||||
player:1,
|
||||
order:function(item,player){
|
||||
if(player&&_status.event.type=='phase'){
|
||||
var max=0,add=false;
|
||||
var type=player.storage.youlong?'basic':'trick';
|
||||
var list=lib.inpile.filter(name=>get.type(name)==type&&!player.storage.youlong2.includes(name));
|
||||
if(list.includes('sha')) add=true;
|
||||
list=list.map(namex=>{return {name:namex,isCard:true}});
|
||||
if(add) lib.inpile_nature.forEach(naturex=>list.push({name:'sha',nature:naturex,isCard:true}));
|
||||
for(var card of list){
|
||||
if(player.getUseValue(card)>0){
|
||||
var temp=get.order(card);
|
||||
if(temp>max) max=temp;
|
||||
}
|
||||
}
|
||||
if(max>0) max+=0.3;
|
||||
return max;
|
||||
}
|
||||
return 1;
|
||||
},
|
||||
result:{player:1},
|
||||
},
|
||||
},
|
||||
youlong_true:{charlotte:true},
|
||||
|
|
Loading…
Reference in New Issue