隐藏无原画武将来敏、谋小乔、谋卢植

This commit is contained in:
mengxinzxz 2023-10-27 12:25:28 +08:00 committed by GitHub
parent 8c0b782fe1
commit 4eb5e758e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 46 additions and 105 deletions

View File

@ -32,7 +32,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
baoxin:['male','qun',4,['mutao','yimou'],['character:tw_baoxin','die_audio:tw_baoxin']],
jiangji:['male','wei',3,['twjichou','jilun'],['character:tw_jiangji','die_audio:tw_jiangji']],
liwei:['male','shu',4,['jiaohua'],['character:tw_liwei','die:tw_liwei']],
laimin:['male','shu',3,['laishou','luanqun']],
laimin:['male','shu',3,['laishou','luanqun'],['unseen']],
yj_zhoubuyi:['male','wei',3,['mbhuiyao','mbquesong']],
xin_guozhao:['female','wei',3,['yichong','wufei']],
xin_zhangyi:['male','shu',4,['xinwurong','shizhi']],
@ -970,95 +970,32 @@ game.import('character',function(lib,game,ui,get,ai,_status){
audio:2,
enable:'phaseUse',
usable:1,
// filterTarget:lib.filter.notMe,
filterTarget:lib.filter.notMe,
content:function(){
'step 0'
player.damage('nosource');
'step 1'
if(game.countPlayer()<2) event.finish();
if(game.countPlayer()==2) event._result={bool:true,targets:[game.findPlayer(i=>i!=player),player]};
else player.chooseTarget(`慧夭:请选择两名角色`,`令不为你的第一名角色视为对第二名角色造成过1点伤害。`,(card,player,target)=>{
if(!ui.selected.targets.length) return player!=target;
return true;
},2,true).set('multitarget',true).set('targetprompt',['伤害来源','受伤角色']).set('ai',target=>{
return target==get.event('aiTargets')[ui.selected.targets.length]?10:0;
}).set('aiTargets',lib.skill.mbhuiyao.getUnrealDamageTargets(player,[game.filterPlayer(i=>i!=player),game.filterPlayer()],true));
'step 2'
if(result.bool){
var targets=result.targets;
player.line2(targets,'green');
game.delaye();
targets[1].damage(targets[0],'unreal');
}
},
getUnrealDamageTargets:(player,lists,forced)=>{
const targets=[null,null];
let sourceList,targetList;
if(lists.length==2&&lists.every(l=>Array.isArray(l))){
sourceList=lists[0]; targetList=lists[1];
}
else{
sourceList=lists.slice(); targetList=lists.slice();
}
const list=targetList.map(current=>{
const _hp=current.hp,_maxhp=current.maxHp;
current.hp=100; current.maxHp=100;
const att=-get.sgnAttitude(player,current);
let val=get.damageEffect(current,player,current)*att;
current.getSkills(null,false,false).forEach(skill=>{
const info=get.info(skill);
if(info&&info.ai&&(info.ai.maixie||info.ai.maixie_hp||info.ai.maixie_defend)) val=Math[val>0?'max':'min'](val>0?0.1:-0.1,val+2*att);
});
const eff=100/val+15;
current.hp=_hp; current.maxHp=_maxhp;
return [current,eff];
}).sort((a,b)=>b[1]-a[1])[0];
if(list[1]<0&&!forced) return targets;
const targetx=list[0];
targets[1]=targetx;
const list2=sourceList.filter(i=>i!=targetx).map(current=>{
const _hp=targetx.hp,_maxhp=targetx.maxHp;
targetx.hp=100; targetx.maxHp=100;
const att=-get.sgnAttitude(player,current);
const eff=get.damageEffect(targetx,current,current)*att;
targetx.hp=_hp; targetx.maxHp=_maxhp;
return [current,eff];
}).sort((a,b)=>b[1]-a[1])[0];
if(!list2) return targets;
targets[0]=list2[0];
return targets;
target.damage('unreal');
},
ai:{
order:6,
result:{
player:function(player){
if(player.getHp()+player.countCards('hs',card=>player.canSaveCard(card,player))<=1) return 0;
var limit=25;
var quesong=player.hasSkill('mbquesong')&&!player.getStat().damaged;
if(quesong){
limit-=7.5;
target:function(player,target){
if(player.getHp()+player.countCards('hs',card=>player.canSaveCard(card,player))<1) return 0;
var _hp=target.hp,_maxhp=target.maxHp;
target.hp=10; target.maxHp=10;
var att=-get.sgnAttitude(player,target);
var val=get.damageEffect(target,player,target)*att;
target.getSkills(null,false,false).forEach(skill=>{
var info=get.info(skill);
if(info&&info.ai&&(info.ai.maixie||info.ai.maixie_hp||info.ai.maixie_defend)) val=Math[val>0?'max':'min'](val>0?0.1:-0.1,val+2*att);
});
var eff=100/val;
target.hp=_hp; target.maxHp=_maxhp;
var limit=17.5;
if(player.hasSkill('mbquesong')){
if(!player.getStat().damaged) limit+=7.5;
}
if(quesong&&game.hasPlayer(target=>{
var att=get.attitude(player,target);
if(att<0) return false;
return att*Math.sqrt(Math.max(1,[1,2,3,4].reduce((p,c)=>p+target.countEmptySlot(c),0)))>=10||target.getHp()<=2;
})) return 1;
if(!quesong&&game.hasPlayer(target=>{
if(target==player) return false;
var _hp=target.hp,_maxhp=target.maxHp;
target.hp=100; target.maxHp=100;
var att=-get.sgnAttitude(player,target);
var val=get.damageEffect(target,player,target)*att;
target.getSkills(null,false,false).forEach(skill=>{
var info=get.info(skill);
if(info&&info.ai&&(info.ai.maixie||info.ai.maixie_hp||info.ai.maixie_defend)) val=Math[val>0?'max':'min'](val>0?0.1:-0.1,val+2*att);
});
var eff=100/val;
target.hp=_hp; target.maxHp=_maxhp;
if(eff<limit) return false;
return true;
})) return 1;
return 0;
if(eff<limit) return 0;
return eff/30;
}
}
},
@ -1075,7 +1012,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.chooseTarget(get.prompt2('mbquesong')).set('ai',target=>{
var player=_status.event.player;
if(get.attitude(player,target)<=0) return 0;
var len=Math.max(1,[1,2,3,4].reduce((p,c)=>p+target.countEmptySlot(c),0)),hp=target.getHp();
var len=[1,2,3,4,5].reduce((p,c)=>p+target.countEmptySlot(c),0);hp=target.getHp();
return len+target.isTurnedOver()*2+1.5*Math.min(4,target.getDamagedHp())/(hp+1);
});
'step 1'
@ -1083,17 +1020,22 @@ game.import('character',function(lib,game,ui,get,ai,_status){
var target=result.targets[0];
event.target=target;
player.logSkill('mbquesong',target);
var len=Math.max(1,[1,2,3,4].reduce((p,c)=>p+target.countEmptySlot(c),0)),hp=target.getHp();
if(hp==0||target.countCards('h')<hp) event._result={bool:false};
var len=[1,2,3,4,5].reduce((p,c)=>p+target.countEmptySlot(c),0);hp=target.getHp();
var forced=false;
if(len==0) forced=true;
if(hp==0||target.countCards('h')<hp){
if(forced) event.finish();
else event._result={bool:false};
}
else{
var str=`是否弃置${get.cnNumber(hp)}张手牌并回复1点体力或点击“取消”摸${get.cnNumber(len)}张牌并复原武将牌。`;
target.chooseToDiscard(get.translation(player)+'对你发动了【雀颂】',str,'h',hp).set('ai',card=>{
if(!get.event('goon')) return 0;
var str=`${forced?'请':'是否'}弃置${get.cnNumber(hp)}张手牌并回复1点体力${forced?'':'?或点击“取消”摸'+get.cnNumber(len)+'张牌并复原武将牌'}`;
target.chooseToDiscard(get.translation(player)+'对你发动了【雀颂】',str,forced,'h',hp).set('ai',card=>{
if(!_status.event.goon) return 0;
return 6-get.value(card);
}).set('goon',function(){
var _hp=hp+target.isTurnedOver()*1.5;
if(_hp+player.countCards('hs',card=>get.tag(card,'recover'))<=2-len/4) return true;
return len<=_hp;
if(forced||_hp+player.countCards('hs',card=>get.tag(card,'recover'))<=2-len/4) return true;
return len>_hp;
}());
}
}
@ -1104,12 +1046,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
event.finish();
}
else{
target.draw(Math.max(1,[1,2,3,4].reduce((p,c)=>p+target.countEmptySlot(c),0)));
target.draw([1,2,3,4,5].reduce((p,c)=>p+target.countEmptySlot(c),0));
}
'step 3'
target.link(false);
player.link(false);
'step 4'
target.turnOver(false);
player.turnOver(false);
},
ai:{
expose:0.2,
@ -11287,11 +11229,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
content:function(){
'step 0'
player.chooseTarget(get.prompt('zhongzuo'),'令一名角色摸两张牌。若其已受伤,则你摸一张牌。').set('ai',function(target){
if(target.hasSkillTag('nogain')) return target.isDamaged()?0:1;
let att=get.attitude(_status.event.player,target);
if(att<=0) return 0;
if(target.isDamaged()) return 1+att/5;
return att/5;
if(target.hasSkillTag('nogain')&&target!=_status.currentPhase) return target.isDamaged()?0:1;
var att=get.attitude(_status.event.player,target);
if(target.isDamaged()) att=att*1.2;
return att;
});
'step 1'
if(result.bool){
@ -12605,7 +12546,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
'step 3'
if(result.bool){
trigger.player.gain(event.card,'give',player,'bySelf');
player.chooseBool('是否对'+get.translation(trigger.player)+'造成1点伤害?').ai=function(){
player.chooseBool('是否对'+get.translation(trigger.player)+'造成点伤害?').ai=function(){
return get.damageEffect(trigger.player,player,player)>0
};
}
@ -12951,7 +12892,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
event.ingame=game.hasPlayer(function(current){
return ['re_xushu','xin_xushu','xushu','dc_xushu'].contains(current.name)||['re_xushu','xin_xushu','xushu','dc_xushu'].contains(current.name2);
})?true:false;
var prompt='请选择一名角色,令其回复1点体力并摸一张牌';
var prompt='请选择一名角色,令其回复点体力并摸一张牌';
prompt+=event.ingame?',然后你摸一张牌。':'。';
player.chooseTarget(prompt).set('ai',function(target){
var player=_status.event.player;
@ -15510,9 +15451,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
yj_zhoubuyi:'☆周不疑',
yj_zhoubuyi_prefix:'☆',
mbhuiyao:'慧夭',
mbhuiyao_info:'出牌阶段限一次。你可以受到1点无来源伤害然后你选择一名其他角色,令其视为对一名角色造成过1点伤害。',
mbhuiyao_info:'出牌阶段限一次。你可以受到1点无来源伤害视为对一名其他角色造成过1点伤害。',
mbquesong:'雀颂',
mbquesong_info:'一名角色的结束阶段若你于本回合受到过伤害你可以令一名角色选择一项1.摸等同于其装备区中非宝物栏中空栏的数量的牌并复原武将牌(至少摸一张牌)2.弃置等同于其体力值的手牌并回复1点体力。',
mbquesong_info:'一名角色的结束阶段若你于本回合受到过伤害你可以令一名角色选择一项1.摸等同于其装备区中空栏的数量的牌并复原武将牌2.弃置等同于其体力值的手牌并回复1点体力。',
xin_yuanshao:'手杀界袁绍',
xin_yuanshao_prefix:'手杀界',
re_baosanniang:'手杀鲍三娘',

View File

@ -38,8 +38,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
sb_liubiao:['male','qun',3,['sbzishou','sbzongshi']],
sb_zhurong:['female','shu',4,['sblieren','sbjuxiang']],
sb_menghuo:['male','shu',4,['sbhuoshou','sbzaiqi']],
sb_yl_luzhi:['male','qun',3,['nzry_mingren','sbzhenliang']],
sb_xiaoqiao:['female','wu',3,['sbtianxiang','xinhongyan']],
sb_yl_luzhi:['male','qun',3,['nzry_mingren','sbzhenliang'],['unseen']],
sb_xiaoqiao:['female','wu',3,['sbtianxiang','xinhongyan'],['unseen']],
},
characterSort:{
sb:{