修复本体中所有使用mayHaveShan丢参的地方
This commit is contained in:
parent
fa746efba6
commit
22e8aa0c10
|
@ -235,7 +235,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
if(get.cardtag(card,'yingbian_hit')){
|
||||
hit=true;
|
||||
if(targets.some(target=>{
|
||||
return target.mayHaveShan(viewer,'use',target.getCards(i=>{
|
||||
return target.mayHaveShan(viewer,'use',target.getCards('h',i=>{
|
||||
return i.hasGaintag('sha_notshan');
|
||||
}))&&get.attitude(viewer,target)<0&&get.damageEffect(target,player,viewer,get.natureList(card))>0;
|
||||
})) base+=5;
|
||||
|
@ -247,7 +247,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
if(get.cardtag(card,'yingbian_damage')){
|
||||
if(targets.some(target=>{
|
||||
return get.attitude(player,target)<0&&(hit||!target.mayHaveShan(viewer,'use',target.getCards(i=>{
|
||||
return get.attitude(player,target)<0&&(hit||!target.mayHaveShan(viewer,'use',target.getCards('h',i=>{
|
||||
return i.hasGaintag('sha_notshan');
|
||||
}))||player.hasSkillTag('directHit_ai',true,{
|
||||
target:target,
|
||||
|
@ -309,7 +309,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
if(!player.hasSkillTag('directHit_ai',true,{
|
||||
target:target,
|
||||
card:card,
|
||||
},true)) odds-=0.7*target.mayHaveShan(player,'use',target.getCards(i=>{
|
||||
},true)) odds-=0.7*target.mayHaveShan(player,'use',target.getCards('h',i=>{
|
||||
return i.hasGaintag('sha_notshan');
|
||||
}),'odds');
|
||||
_status.event.putTempCache('sha_result','eff',{
|
||||
|
|
|
@ -3516,7 +3516,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
list.remove(player.storage.kyou_zhidian);
|
||||
player.chooseControl(list).set('prompt','掷典:请为'+get.translation(trigger.card)+'选择一种效果').set('choice',function(){
|
||||
if(list.includes('不计入次数')&&player.hasSha()) return '不计入次数';
|
||||
if(list.includes('不可被响应')&&trigger.target.mayHaveShan(player,'use',trigger.target.getCards(i=>{
|
||||
if(list.includes('不可被响应')&&trigger.target.mayHaveShan(player,'use',trigger.target.getCards('h',i=>{
|
||||
return i.hasGaintag('sha_notshan');
|
||||
}))) return '不可被响应';
|
||||
if(list.includes('伤害+1')) return '伤害+1';
|
||||
|
|
|
@ -1261,7 +1261,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
}
|
||||
var hasRuanshizi=game.hasPlayer(function(target){
|
||||
return target!=player&&player.canUse('sha',target,null,true)&&!target.mayHaveShan(player,'use',target.getCards(i=>{
|
||||
return target!=player&&player.canUse('sha',target,null,true)&&!target.mayHaveShan(player,'use',target.getCards('h',i=>{
|
||||
return i.hasGaintag('sha_notshan');
|
||||
}))&&get.attitude(player,target)<0&&get.effect(target,{name:'sha'},player,player)>0;
|
||||
})
|
||||
|
|
|
@ -11109,7 +11109,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
let ph=player.countCards('h');
|
||||
if(game.hasPlayer(i=>{
|
||||
if(!player.canUse('sha',i,true,true)||get.effect(i,{name:'sha'},player,player)<=0) return false;
|
||||
return !ph||!i.mayHaveShan(player,'use',i.getCards(i=>{
|
||||
return !ph||!i.mayHaveShan(player,'use',i.getCards('h',i=>{
|
||||
return i.hasGaintag('sha_notshan');
|
||||
}));
|
||||
})) return 1;
|
||||
|
|
|
@ -4270,7 +4270,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
result:{
|
||||
target:function(player,target){
|
||||
var eff=get.effect(target,{name:'sha',nature:'fire'},player,target)/30;
|
||||
if(!target.mayHaveShan(player,'use',target.getCards(i=>{
|
||||
if(!target.mayHaveShan(player,'use',target.getCards('h',i=>{
|
||||
return i.hasGaintag('sha_notshan');
|
||||
}))) eff*=2;
|
||||
var del=target.countCards('h')-player.countCards('h')+1.5;
|
||||
|
@ -7124,7 +7124,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(_status.event.all) return 1;
|
||||
if(ui.selected.buttons.length) return 0;
|
||||
return Math.random();
|
||||
}).set('all',!target.mayHaveShan(player,'use',target.getCards(i=>{
|
||||
}).set('all',!target.mayHaveShan(player,'use',target.getCards('h',i=>{
|
||||
return i.hasGaintag('sha_notshan');
|
||||
}))&&Math.random()<0.75).set('forceAuto',true);
|
||||
'step 1'
|
||||
|
|
|
@ -9137,7 +9137,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
]).set('ai',function(){
|
||||
var target=_status.event.getTrigger().target;
|
||||
var player=_status.event.player;
|
||||
var num=target.mayHaveShan(player,'use',target.getCards(i=>{
|
||||
var num=target.mayHaveShan(player,'use',target.getCards('h',i=>{
|
||||
return i.hasGaintag('sha_notshan');
|
||||
}))?0:1;
|
||||
if(get.attitude(player,target)>0) num=1-num;
|
||||
|
|
|
@ -168,7 +168,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
d1=true;
|
||||
if(trigger.player.hasSkill('jueqing')||trigger.player.hasSkill('gangzhi')) d1=false;
|
||||
for(var target of trigger.targets){
|
||||
if(!target.mayHaveShan(player,'use',target.getCards(i=>{
|
||||
if(!target.mayHaveShan(player,'use',target.getCards('h',i=>{
|
||||
return i.hasGaintag('sha_notshan');
|
||||
}))||trigger.player.hasSkillTag('directHit_ai',true,{
|
||||
target:target,
|
||||
|
@ -299,7 +299,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var effect=0;
|
||||
for(var target of trigger.targets){
|
||||
var eff=get.effect(target,trigger.card,trigger.player,player);
|
||||
if(!target.mayHaveShan(player,'use',target.getCards(i=>{
|
||||
if(!target.mayHaveShan(player,'use',target.getCards('h',i=>{
|
||||
return i.hasGaintag('sha_notshan');
|
||||
}))||trigger.player.hasSkillTag('directHit_ai',true,{
|
||||
target:target,
|
||||
|
|
|
@ -11142,7 +11142,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(!target.isHealthy()) club+=2;
|
||||
if(!club&&!spade) return 1;
|
||||
if(name==='sha'){
|
||||
if(!target.mayHaveShan(player,'use',target.getCards(i=>{
|
||||
if(!target.mayHaveShan(player,'use',target.getCards('h',i=>{
|
||||
return i.hasGaintag('sha_notshan');
|
||||
}))) return;
|
||||
}
|
||||
|
|
|
@ -3676,7 +3676,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
ai:{
|
||||
effect:{
|
||||
target:function(card,player,target,current){
|
||||
if(typeof card==='object'&&get.name(card)==='sha'&&target.mayHaveShan(player,'use',target.getCards(i=>{
|
||||
if(typeof card==='object'&&get.name(card)==='sha'&&target.mayHaveShan(player,'use',target.getCards('h',i=>{
|
||||
return i.hasGaintag('sha_notshan');
|
||||
}))) return [0.6,0.75];
|
||||
if(!target.hasFriend()&&!player.hasUnknown()) return;
|
||||
|
@ -6221,7 +6221,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(!target.isHealthy()) club+=2;
|
||||
if(!club&&!spade) return 1;
|
||||
if(card.name==='sha'){
|
||||
if(!target.mayHaveShan(player,'use',target.getCards(i=>{
|
||||
if(!target.mayHaveShan(player,'use',target.getCards('h',i=>{
|
||||
return i.hasGaintag('sha_notshan');
|
||||
}))) return;
|
||||
}
|
||||
|
@ -7209,7 +7209,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
return get.attitude(target,current)<0&&get.damageEffect(current,target,target,'thunder')>0;
|
||||
})){
|
||||
if(card.name==='sha'){
|
||||
if(!target.mayHaveShan(player,'use',target.getCards(i=>{
|
||||
if(!target.mayHaveShan(player,'use',target.getCards('h',i=>{
|
||||
return i.hasGaintag('sha_notshan');
|
||||
}))) return;
|
||||
}
|
||||
|
|
|
@ -5479,7 +5479,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
if(!player.hasSkillTag('directHit_ai',true,{
|
||||
target:target,
|
||||
card:card,
|
||||
},true)) odds-=0.7*target.mayHaveShan(player,'use',target.getCards(i=>{
|
||||
},true)) odds-=0.7*target.mayHaveShan(player,'use',target.getCards('h',i=>{
|
||||
return i.hasGaintag('sha_notshan');
|
||||
}),'odds');
|
||||
_status.event.putTempCache('sha_result','eff',{
|
||||
|
@ -7275,7 +7275,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
else{
|
||||
var target=trigger.target;
|
||||
if(trigger.targets.length>1||target.mayHaveShan(player,'use',target.getCards(i=>{
|
||||
if(trigger.targets.length>1||target.mayHaveShan(player,'use',target.getCards('h',i=>{
|
||||
return i.hasGaintag('sha_notshan');
|
||||
}))) return 0;
|
||||
}
|
||||
|
@ -14777,7 +14777,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
else if(get.tag(card,'respondShan')>0){
|
||||
if(current<0&&used==target.getAttackRange()-1){
|
||||
if(card.name==='sha'){
|
||||
if(!target.mayHaveShan(player,'use',target.getCards(i=>{
|
||||
if(!target.mayHaveShan(player,'use',target.getCards('h',i=>{
|
||||
return i.hasGaintag('sha_notshan');
|
||||
}))) return;
|
||||
}
|
||||
|
|
|
@ -5030,7 +5030,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
})) return 3;
|
||||
return Math.sqrt(target.countCards('he'));
|
||||
}
|
||||
if(target.mayHaveShan(player,'use',target.getCards(i=>{
|
||||
if(target.mayHaveShan(player,'use',target.getCards('h',i=>{
|
||||
return i.hasGaintag('sha_notshan');
|
||||
}))&&player.countCards('hs',function(card){
|
||||
return !ui.selected.cards.includes(card)&&get.name(card)=='sha'&&player.canUse(card,target)&&get.effect(target,card,player,player)!=0;
|
||||
|
@ -5364,7 +5364,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
player.addSkill('mouni2');
|
||||
player.chooseTarget(get.prompt2('mouni'),lib.filter.notMe).set('ai',function(target){
|
||||
var player=_status.event.player,cards=player.getCards('h','sha');
|
||||
if(get.attitude(player,target)>=0||!player.canUse(cards[0],target,false)||(!player.hasJudge('lebu')&&target.mayHaveShan(player,'use',target.getCards(i=>{
|
||||
if(get.attitude(player,target)>=0||!player.canUse(cards[0],target,false)||(!player.hasJudge('lebu')&&target.mayHaveShan(player,'use',target.getCards('h',i=>{
|
||||
return i.hasGaintag('sha_notshan');
|
||||
}))&&!player.hasSkillTag('directHit_ai',true,{
|
||||
target:target,
|
||||
|
|
|
@ -1095,7 +1095,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}).set('goon',function(){
|
||||
var d1=true;
|
||||
if(player.hasSkill('jueqing')||player.hasSkill('gangzhi')) d1=false;
|
||||
if(!target.mayHaveShan(player,'use',target.getCards(i=>{
|
||||
if(!target.mayHaveShan(player,'use',target.getCards('h',i=>{
|
||||
return i.hasGaintag('sha_notshan');
|
||||
}))||player.hasSkillTag('directHit_ai',true,{
|
||||
target:target,
|
||||
|
@ -3697,7 +3697,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
expose:0.2,
|
||||
result:{
|
||||
target:function(player,target){
|
||||
if(target.countCards('h')<=target.hp&&!target.mayHaveShan(player,'use',target.getCards(i=>{
|
||||
if(target.countCards('h')<=target.hp&&!target.mayHaveShan(player,'use',target.getCards('h',i=>{
|
||||
return i.hasGaintag('sha_notshan');
|
||||
}))&&get.effect(target,{name:'sha',isCard:true},player,player)>0) return -1;
|
||||
else if(target.countCards('h')>target.hp&&target.hp>2&&target.hasShan()) return 1;
|
||||
|
@ -7273,7 +7273,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var player=_status.event.player;
|
||||
if(player.hp+player.countCards('hs',{name:['tao','jiu']})<=1) return -1;
|
||||
var num=1;
|
||||
if((!target.mayHaveShan(player,'use',target.getCards(i=>{
|
||||
if((!target.mayHaveShan(player,'use',target.getCards('h',i=>{
|
||||
return i.hasGaintag('sha_notshan');
|
||||
}))||player.hasSkillTag('directHit_ai',true,{
|
||||
target:target,
|
||||
|
@ -11796,7 +11796,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
var d1=true;
|
||||
if(trigger.player.hasSkill('jueqing')||trigger.player.hasSkill('gangzhi')) d1=false;
|
||||
for(var target of trigger.targets){
|
||||
if(!target.mayHaveShan(player,'use',target.getCards(i=>{
|
||||
if(!target.mayHaveShan(player,'use',target.getCards('h',i=>{
|
||||
return i.hasGaintag('sha_notshan');
|
||||
}))||trigger.player.hasSkillTag('directHit_ai',true,{
|
||||
target:target,
|
||||
|
|
|
@ -2228,7 +2228,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
case 2:{
|
||||
var num=1.3;
|
||||
if(event.card.name=='sha'&&event.targets.filter(function(current){
|
||||
if(current.mayHaveShan(player,'use',current.getCards(i=>{
|
||||
if(current.mayHaveShan(player,'use',current.getCards('h',i=>{
|
||||
return i.hasGaintag('sha_notshan');
|
||||
}))&&get.attitude(player,current)<=0){
|
||||
if(current.hasSkillTag('useShan')) num=1.9;
|
||||
|
|
|
@ -3529,7 +3529,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
]).set('prompt',get.prompt('gzliegong',trigger.target)).setHiddenSkill('gzliegong').set('ai',function(){
|
||||
var player=_status.event.player,target=_status.event.getTrigger().target;
|
||||
if(get.attitude(player,target)>0) return 2;
|
||||
return target.mayHaveShan(player,'use',target.getCards(i=>{
|
||||
return target.mayHaveShan(player,'use',target.getCards('h',i=>{
|
||||
return i.hasGaintag('sha_notshan');
|
||||
}))?1:0;
|
||||
});
|
||||
|
@ -10657,7 +10657,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
goon=false;
|
||||
}
|
||||
else if(trigger.card.name=='sha'){
|
||||
if(trigger.target.mayHaveShan(player,'use',trigger.target.getCards(i=>{
|
||||
if(trigger.target.mayHaveShan(player,'use',trigger.target.getCards('h',i=>{
|
||||
return i.hasGaintag('sha_notshan');
|
||||
}))||trigger.target.hp>=3){
|
||||
goon=false;
|
||||
|
|
|
@ -9681,8 +9681,8 @@ export class Library extends Uninstantable {
|
|||
},
|
||||
//装备栏相关
|
||||
/**
|
||||
* @param { Card } card
|
||||
* @param { Player } player
|
||||
* @param { Card } card
|
||||
* @param { Player } player
|
||||
* @returns { boolean }
|
||||
*/
|
||||
canBeReplaced: function (card, player) {
|
||||
|
@ -10323,7 +10323,7 @@ export class Library extends Uninstantable {
|
|||
if (game.hasPlayer(current => {
|
||||
if (!player.canUse(card, current)) return false;
|
||||
const storage = player.storage, zhibi = storage.zhibi;
|
||||
return (zhibi && !zhibi.includes(current) || get.effect(current, card, player, player) >= 2 - Math.max(0, (storage.stratagem_fury || 0) - 1)) && current.mayHaveShan(player, 'use', current.getCards(i => {
|
||||
return (zhibi && !zhibi.includes(current) || get.effect(current, card, player, player) >= 2 - Math.max(0, (storage.stratagem_fury || 0) - 1)) && current.mayHaveShan(player, 'use', current.getCards('h', i => {
|
||||
return i.hasGaintag('sha_notshan');
|
||||
})) && player.hasSkill('jiu');
|
||||
})) return 1;
|
||||
|
@ -10396,7 +10396,7 @@ export class Library extends Uninstantable {
|
|||
if (game.hasPlayer(current => {
|
||||
if (!player.canUse(card, current)) return false;
|
||||
const storage = player.storage, zhibi = storage.zhibi;
|
||||
return (zhibi && !zhibi.includes(current) || (get.effect(current, card, player, player) >= 2 - Math.max(0, (storage.stratagem_fury || 0) - 1))) && current.mayHaveShan(player, 'use', current.getCards(i => {
|
||||
return (zhibi && !zhibi.includes(current) || (get.effect(current, card, player, player) >= 2 - Math.max(0, (storage.stratagem_fury || 0) - 1))) && current.mayHaveShan(player, 'use', current.getCards('h', i => {
|
||||
return i.hasGaintag('sha_notshan');
|
||||
}));
|
||||
})) return get.order(card, player) + 0.5;
|
||||
|
|
Loading…
Reference in New Issue