用_trueMe检查使用者是否态度不端

isMad()已在attitude里检测,故移除
This commit is contained in:
157 2023-12-25 16:40:24 +08:00
parent 475201527a
commit 56a77baea1
3 changed files with 12 additions and 17 deletions

View File

@ -230,10 +230,10 @@ game.import('card',function(lib,game,ui,get,ai,_status){
value:[3,1], value:[3,1],
useful:1, useful:1,
}, },
wuxie:function(target,card,player,viewer,state){ wuxie:function(target,card,player,viewer,status){
let att=get.attitude(viewer,target), eff=get.effect(target,card,player,target); if(get.attitude(viewer,player._trueMe||player)>0) return 0;
if(status*get.attitude(viewer,player)>0&&!player.isMad() || status*eff*att>=0) return 0; if(status*get.attitude(viewer,target)*get.effect(target,card,player,target)>=0) return 0;
if(get.attitude(viewer,player)>=0 || _status.event.getRand('huogong_wuxie')*4>player.countCards('h')) return 0; if(_status.event.getRand('huogong_wuxie')*4>player.countCards('h')) return 0;
}, },
result:{ result:{
player:function(player){ player:function(player){
@ -302,7 +302,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
recastable:true, recastable:true,
ai:{ ai:{
wuxie:(target,card,player,viewer, status)=>{ wuxie:(target,card,player,viewer, status)=>{
if(status*get.attitude(viewer,player)>0&&!player.isMad() || target.hasSkillTag('nodamage') || target.hasSkillTag('nofire') || target.hasSkillTag('nothunder') || get.attitude(viewer,player)>0 || (1+target.countCards('hs'))*_status.event.getRand()>1.57) return 0; if(status*get.attitude(viewer,player._trueMe||player)>0 || target.hasSkillTag('nodamage') || target.hasSkillTag('nofire') || target.hasSkillTag('nothunder') || get.attitude(viewer,player)>0 || (1+target.countCards('hs'))*_status.event.getRand()>1.57) return 0;
}, },
basic:{ basic:{
order:(item,player)=>{ order:(item,player)=>{

View File

@ -1228,10 +1228,9 @@ game.import('card',function(lib,game,ui,get,ai,_status){
event._result={}; event._result={};
}, },
ai:{ ai:{
wuxie:function(target,card,player,viewer){ wuxie:function(target,card,player,viewer,status){
if(player==game.me&&get.attitude(viewer,player)>0){ if(player===game.me&&get.attitude(viewer,player._trueMe||player)>0) return 0;
return 0; if(status*get.attitude(viewer,target)*get.effect(target,card,player,target)>=0) return 0;
}
}, },
basic:{ basic:{
order:5, order:5,
@ -1295,9 +1294,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
}, },
ai:{ ai:{
wuxie:function(target,card,player,viewer){ wuxie:function(target,card,player,viewer){
if(get.attitude(viewer,player)>0&&get.attitude(viewer,target)>0){ if(get.attitude(viewer,player._trueMe||player)>0) return 0;
return 0;
}
}, },
basic:{ basic:{
order:7.5, order:7.5,
@ -1574,7 +1571,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
}, },
ai:{ ai:{
wuxie:(target,card,player,viewer,status)=>{ wuxie:(target,card,player,viewer,status)=>{
if(status*get.attitude(viewer,player)>0&&!player.isMad() || target.hp>2&&!target.hasCard(i=>{ if(status*get.attitude(viewer,player._trueMe||player)>0 || target.hp>2&&!target.hasCard(i=>{
let val=get.value(i,target),subtypes=get.subtypes(i); let val=get.value(i,target),subtypes=get.subtypes(i);
if(val<8&&target.hp<2&&!subtypes.includes('equip2')&&!subtypes.includes('equip5')) return false; if(val<8&&target.hp<2&&!subtypes.includes('equip2')&&!subtypes.includes('equip5')) return false;
return val>3+Math.min(5,target.hp); return val>3+Math.min(5,target.hp);
@ -1824,9 +1821,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
}, },
ai:{ ai:{
wuxie:function(target,card,player,viewer){ wuxie:function(target,card,player,viewer){
if(player==game.me&&get.attitude(viewer,player)>0){ if(player==game.me&&get.attitude(viewer,player._trueMe||player)>0) return 0;
return 0;
}
}, },
basic:{ basic:{
order:8, order:8,

View File

@ -28,7 +28,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
}, },
ai:{ ai:{
wuxie:function(target,card,player,viewer,status){ wuxie:function(target,card,player,viewer,status){
if(status*get.attitude(viewer,player)>0&&!player.isMad()) return 0; if(get.attitude(viewer,player._trueMe||player)>0) return 0;
if(!card.yingbian_all&&get.distance(player,target)>1&&!target.hasCard(i=>{ if(!card.yingbian_all&&get.distance(player,target)>1&&!target.hasCard(i=>{
let val=get.value(i,target),subtypes=get.subtypes(i); let val=get.value(i,target),subtypes=get.subtypes(i);
if(val<8&&target.hp<2&&!subtypes.includes('equip2')&&!subtypes.includes('equip5')) return false; if(val<8&&target.hp<2&&!subtypes.includes('equip2')&&!subtypes.includes('equip5')) return false;