bug fixs
This commit is contained in:
parent
05e44cb1f6
commit
75c1dd26c7
|
@ -381,7 +381,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
||||||
trigger:{player:'equipAfter'},
|
trigger:{player:'equipAfter'},
|
||||||
forced:true,
|
forced:true,
|
||||||
equipSkill:true,
|
equipSkill:true,
|
||||||
filter:(event,player)=>event.card.name=='tianjitu'&&player.hasCard(card=>card!=event.card),
|
filter:(event,player)=>event.card.name=='tianjitu'&&player.hasCard(card=>card!=event.card,'he'),
|
||||||
content:()=>{
|
content:()=>{
|
||||||
player.chooseToDiscard(true,card=>card!=_status.event.getTrigger().card,'he');
|
player.chooseToDiscard(true,card=>card!=_status.event.getTrigger().card,'he');
|
||||||
},
|
},
|
||||||
|
|
|
@ -624,19 +624,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
audio:2,
|
audio:2,
|
||||||
trigger:{player:'useCardAfter'},
|
trigger:{player:'useCardAfter'},
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
if(event.skill=='dccuixin') return false;
|
if(!event._dccuixin||get.type(event.card,false)=='delay'||get.type(event.card,false)=='equip') return false;
|
||||||
if(event.targets.length==0) return false;
|
|
||||||
if(get.type(event.card,false)=='delay'||get.type(event.card,false)=='equip') return false;
|
|
||||||
var card={
|
var card={
|
||||||
name:event.card.name,
|
name:event.card.name,
|
||||||
nature:event.card.nature,
|
nature:event.card.nature,
|
||||||
isCard:true,
|
isCard:true,
|
||||||
}
|
},list=event._dccuixin;
|
||||||
for(var target of event.targets){
|
for(var target of list){
|
||||||
var targetx;
|
var targetx=player[target]();
|
||||||
if(target==player.getNext()) targetx=player.getPrevious();
|
|
||||||
else if(target==player.getPrevious()) targetx=player.getNext();
|
|
||||||
else continue;
|
|
||||||
if(lib.filter.targetEnabled2(card,targetx,player)) return true;
|
if(lib.filter.targetEnabled2(card,targetx,player)) return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -650,21 +645,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
isCard:true,
|
isCard:true,
|
||||||
};
|
};
|
||||||
event.card=card;
|
event.card=card;
|
||||||
var list=trigger.targets.filter(target=>{
|
var list=[];
|
||||||
var targetx;
|
trigger._dccuixin.forEach(target=>{
|
||||||
if(target==player.getNext()) targetx=player.getPrevious();
|
var targetx=player[target]();
|
||||||
else if(target==player.getPrevious()) targetx=player.getNext();
|
if(lib.filter.targetEnabled2(card,targetx,player)) list.add(targetx);
|
||||||
else return false;
|
|
||||||
if(lib.filter.targetEnabled2(card,targetx,player)) return true;
|
|
||||||
}).map(target=>{
|
|
||||||
return target==player.getPrevious()?player.getNext():player.getPrevious();
|
|
||||||
});
|
});
|
||||||
if(list.length==1){
|
if(list.length==1){
|
||||||
event.target=list[0];
|
event.target=list[0];
|
||||||
player.chooseBool('摧心:是否再视为对'+get.translation(list[0])+'使用'+get.translation(card)+'?').set('goon',get.effect(list[0],card,player,player)>0).set('ai',()=>_status.event.goon);
|
player.chooseBool('摧心:是否视为对'+get.translation(list[0])+'使用'+get.translation(card)+'?').set('goon',get.effect(list[0],card,player,player)>0).set('ai',()=>_status.event.goon);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
player.chooseTarget('摧心:是否再视为对上家或下家使用'+get.translation(card)+'?','操作提示:从上家或下家中选择一名角色作为使用目标',function(card,player,target){
|
player.chooseTarget('摧心:是否视为对上家或下家使用'+get.translation(card)+'?','操作提示:从上家或下家中选择一名角色作为使用目标',function(card,player,target){
|
||||||
return (target==player.getNext()||target==player.getPrevious())&&lib.filter.targetEnabled2(_status.event.getParent().card,target,player);
|
return (target==player.getNext()||target==player.getPrevious())&&lib.filter.targetEnabled2(_status.event.getParent().card,target,player);
|
||||||
}).set('ai',function(target){
|
}).set('ai',function(target){
|
||||||
var player=_status.event.player;
|
var player=_status.event.player;
|
||||||
|
@ -677,6 +668,28 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
player.useCard(card,target,false,'dccuixin');
|
player.useCard(card,target,false,'dccuixin');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
group:'dccuixin_silent',
|
||||||
|
subSkill:{
|
||||||
|
silent:{
|
||||||
|
trigger:{player:'useCardToPlayered'},
|
||||||
|
silent:true,
|
||||||
|
forced:true,
|
||||||
|
popup:false,
|
||||||
|
firstDo:true,
|
||||||
|
charlotte:true,
|
||||||
|
filter:function(event,player){
|
||||||
|
if(!event.isFirstTarget||event.getParent().skill=='dccuixin') return false;
|
||||||
|
if(event.targets.length==0) return false;
|
||||||
|
return event.targets.includes(player.getNext())||event.targets.includes(player.getPrevious());
|
||||||
|
},
|
||||||
|
content:function(){
|
||||||
|
var list=[];
|
||||||
|
if(trigger.targets.includes(player.getNext())) list.push('getPrevious');
|
||||||
|
if(trigger.targets.includes(player.getPrevious())) list.push('getNext');
|
||||||
|
trigger.getParent()._dccuixin=list;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
//海外神吕蒙
|
//海外神吕蒙
|
||||||
twshelie:{
|
twshelie:{
|
||||||
|
@ -2828,7 +2841,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
tspowei:{
|
tspowei:{
|
||||||
audio:3,
|
audio:3,
|
||||||
dutySkill:true,
|
dutySkill:true,
|
||||||
locked:true,
|
|
||||||
derivation:'shenzhu',
|
derivation:'shenzhu',
|
||||||
group:['tspowei_init','tspowei_move','tspowei_achieve','tspowei_fail','tspowei_use','tspowei_remove'],
|
group:['tspowei_init','tspowei_move','tspowei_achieve','tspowei_fail','tspowei_use','tspowei_remove'],
|
||||||
subSkill:{
|
subSkill:{
|
||||||
|
@ -7364,7 +7376,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
dcqijing:'奇径',
|
dcqijing:'奇径',
|
||||||
dcqijing_info:'觉醒技。一名角色的回合结束后,若你的三个副区域标签均被激活,则你减1点体力上限,将座位移动至一名其他角色的上家之后,获得〖摧心〗和一个额外回合。',
|
dcqijing_info:'觉醒技。一名角色的回合结束后,若你的三个副区域标签均被激活,则你减1点体力上限,将座位移动至一名其他角色的上家之后,获得〖摧心〗和一个额外回合。',
|
||||||
dccuixin:'摧心',
|
dccuixin:'摧心',
|
||||||
dccuixin_info:'当你不因此技能使用的基本牌或普通锦囊牌结算结束后,若此牌的目标包含你的上家或下家,则你可以视为对下家或上家再使用一张牌名和元素相同的牌。',
|
dccuixin_info:'当你不因此技能使用的基本牌或普通锦囊牌结算结束后,若此牌的目标于你使用此牌指定第一个目标时包含你的上家或下家,则你可以视为对下家或上家再使用一张牌名和元素相同的牌。',
|
||||||
shen_dianwei:'神典韦',
|
shen_dianwei:'神典韦',
|
||||||
juanjia:'捐甲',
|
juanjia:'捐甲',
|
||||||
juanjia_info:'锁定技。游戏开始时,你废除一个防具栏,然后获得一个额外的武器栏。',
|
juanjia_info:'锁定技。游戏开始时,你废除一个防具栏,然后获得一个额外的武器栏。',
|
||||||
|
|
|
@ -2619,15 +2619,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
var cards=result.cards,targets=result.targets;
|
var cards=result.cards,targets=result.targets;
|
||||||
event.cards=cards;
|
event.cards=cards;
|
||||||
var cardx=get.autoViewAs({name:'sha'},cards);
|
var next=player.useCard({name:'sha'},cards,targets,false,'dcsaowei');
|
||||||
event.cardx=cardx;
|
player.when('useCardAfter')
|
||||||
player.useCard(cardx,cards,targets,false,'dcsaowei');
|
.filter(event=>event==next)
|
||||||
|
.then(()=>{
|
||||||
|
if(player.hasHistory('sourceDamage',evt=>evt.card==trigger.card)){
|
||||||
|
var cards=trigger.cards.filterInD();
|
||||||
|
if(cards.length>0) player.gain(cards,'gain2');
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
else event.finish();
|
|
||||||
'step 2'
|
|
||||||
if(player.getHistory('sourceDamage',function(evt){
|
|
||||||
return evt.card==event.cardx;
|
|
||||||
}).length&&cards.filterInD().length) player.gain(cards.filterInD(),'gain2');
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
//向朗
|
//向朗
|
||||||
|
|
|
@ -2367,7 +2367,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
direct:true,
|
direct:true,
|
||||||
content:function(){
|
content:function(){
|
||||||
'step 0'
|
'step 0'
|
||||||
player.chooseToDiscard(get.prompt('jsrgjuelie',trigger.target),'当你使用【杀】指定一名角色为目标后,你可以弃置任意张牌,然后弃置其等量的牌',[1,Infinity],'he').set('ai',card=>{
|
player.chooseToDiscard(get.prompt('jsrgjuelie',trigger.target),'当你使用【杀】指定一名角色为目标后,你可以弃置任意张牌,然后弃置其等量的牌,然后若你的手牌数或体力值最小,此【杀】对其的伤害基数+1。',[1,Infinity],'he').set('ai',card=>{
|
||||||
if(ui.selected.cards.length>=_status.event.max) return 0;
|
if(ui.selected.cards.length>=_status.event.max) return 0;
|
||||||
if(_status.event.goon) return 4.5-get.value(card);
|
if(_status.event.goon) return 4.5-get.value(card);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -137,7 +137,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
var piles=['cardPile','discardPile'];
|
var piles=['cardPile','discardPile'];
|
||||||
for(var pile of piles){
|
for(var pile of piles){
|
||||||
for(var i=0;i<ui[pile].childNodes.length;i++){
|
for(var i=0;i<ui[pile].childNodes.length;i++){
|
||||||
var card=ui.cardPile.childNodes[i];
|
var card=ui[pile].childNodes[i];
|
||||||
var number=get.number(card,false);
|
var number=get.number(card,false);
|
||||||
if(!list.contains(card)&&number==8){
|
if(!list.contains(card)&&number==8){
|
||||||
list.push(card);
|
list.push(card);
|
||||||
|
@ -153,7 +153,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
ai:{
|
ai:{
|
||||||
effect:{
|
effect:{
|
||||||
target:function(card,player,target){
|
target:function(card,player,target){
|
||||||
if(player.hasSkillTag('jueqing')) return;
|
if(target.countCards('h')>=target.getHp()||player.hasSkillTag('jueqing')) return;
|
||||||
if(player._dcxiongmu_temp) return;
|
if(player._dcxiongmu_temp) return;
|
||||||
if(_status.event.getParent('useCard',true)||_status.event.getParent('_wuxie',true)) return;
|
if(_status.event.getParent('useCard',true)||_status.event.getParent('_wuxie',true)) return;
|
||||||
if(get.tag(card,'damage')){
|
if(get.tag(card,'damage')){
|
||||||
|
@ -200,7 +200,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
minus:{
|
minus:{
|
||||||
trigger:{player:'damageBegin4'},
|
trigger:{player:'damageBegin4'},
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
return game.getGlobalHistory('everything',evt=>{
|
return player.countCards('h')<player.hp&&game.getGlobalHistory('everything',evt=>{
|
||||||
return evt.name=='damage'&&evt.player==player;
|
return evt.name=='damage'&&evt.player==player;
|
||||||
},event).indexOf(event)==0;
|
},event).indexOf(event)==0;
|
||||||
},
|
},
|
||||||
|
@ -3799,7 +3799,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
var num=ui.selected.buttons.filter(i=>get.owner(i.link)==target).length;
|
var num=ui.selected.buttons.filter(i=>get.owner(i.link)==target).length;
|
||||||
return -(get.position(card)!='h'?get.value(card,target):(4.5+Math.random()-0.2*(num>2?1:0)))*get.attitude(player,target);
|
var val=get.buttonValue(button);
|
||||||
|
if(num>2) val/=Math.sqrt(num);
|
||||||
|
if(get.attitude(player,owner)>0) return -val;
|
||||||
|
return val;
|
||||||
|
//return -(get.position(card)!='h'?get.value(card,target):(4.5+Math.random()-0.2*(num>2?1:0)))*get.attitude(player,target);
|
||||||
});
|
});
|
||||||
'step 1'
|
'step 1'
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
|
|
|
@ -484,12 +484,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
}());
|
}());
|
||||||
'step 1'
|
'step 1'
|
||||||
var guessedNum=result.index;
|
var guessedNum=result.index;
|
||||||
var type=get.type2(trigger.card,trigger.player);
|
|
||||||
player.chat('我猜'+get.cnNumber(guessedNum)+'张');
|
player.chat('我猜'+get.cnNumber(guessedNum)+'张');
|
||||||
game.log(player,'猜测',trigger.player,'有',get.cnNumber(guessedNum)+'张'+get.translation(type)+'牌');
|
game.log(player,'猜测',trigger.player,'有',get.cnNumber(guessedNum)+'张'+get.translation(type)+'牌');
|
||||||
event.guessedNum=guessedNum;
|
event.guessedNum=guessedNum;
|
||||||
game.delay();
|
game.delay();
|
||||||
'step 2'
|
'step 2'
|
||||||
|
var type=get.type2(trigger.card,trigger.player);
|
||||||
var count=trigger.player.countCards('h',card=>get.type2(card)==type);
|
var count=trigger.player.countCards('h',card=>get.type2(card)==type);
|
||||||
var guessedNum=event.guessedNum;
|
var guessedNum=event.guessedNum;
|
||||||
if(count==guessedNum){
|
if(count==guessedNum){
|
||||||
|
|
|
@ -13778,13 +13778,11 @@
|
||||||
lib.onphase[i]();
|
lib.onphase[i]();
|
||||||
}
|
}
|
||||||
player.phase();
|
player.phase();
|
||||||
|
event.player=player.next;
|
||||||
"step 2"
|
"step 2"
|
||||||
if(!game.players.contains(event.player.next)){
|
if(!game.players.contains(event.player.next)){
|
||||||
event.player=game.findNext(event.player.next);
|
event.player=game.findNext(event.player.next);
|
||||||
}
|
}
|
||||||
else{
|
|
||||||
event.player=event.player.next;
|
|
||||||
}
|
|
||||||
event.goto(1);
|
event.goto(1);
|
||||||
},
|
},
|
||||||
loadPackage:function(){
|
loadPackage:function(){
|
||||||
|
|
Loading…
Reference in New Issue