v1.9.95.9

This commit is contained in:
Spmario233 2019-12-05 23:05:56 +08:00 committed by GitHub
parent bb42e2fe67
commit fe66f8e9a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 57 additions and 30 deletions

View File

@ -565,6 +565,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
}, },
muniu_skill3:{ muniu_skill3:{
trigger:{player:'chooseToRespondBegin'}, trigger:{player:'chooseToRespondBegin'},
cardSkill:true,
filter:function(event,player){ filter:function(event,player){
if(event.responded) return false; if(event.responded) return false;
var muniu=player.getEquip(5); var muniu=player.getEquip(5);
@ -635,7 +636,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
return true; return true;
}, },
check:function(button){ check:function(button){
if(button.link.name=='du') return -2; if(button.link.name=='du') return 2;
var player=_status.event.player; var player=_status.event.player;
if(button.link.name=='xingjiegoutong'&&player.countCards('h')>1) return -2; if(button.link.name=='xingjiegoutong'&&player.countCards('h')>1) return -2;
if(get.select(get.info(button.link).selectTarget)[1]==-1){ if(get.select(get.info(button.link).selectTarget)[1]==-1){
@ -921,12 +922,12 @@ game.import('card',function(lib,game,ui,get,ai,_status){
var eff=0; var eff=0;
for(var i=0;i<event.targets.length;i++){ for(var i=0;i<event.targets.length;i++){
var target=event.targets[i]; var target=event.targets[i];
var eff1=get.effect(target,event.card,player,player); var eff1=get.damageEffect(target,player,player);
var eff2=get.effect(target,{name:'sha',nature:'fire',suit:get.suit(event.card),number:get.number(event.card)},player,player); var eff2=get.damageEffect(target,player,player,'fire');
eff+=eff2; eff+=eff2;
eff-=eff1; eff-=eff1;
} }
return eff>0; return eff>=0;
}, },
content:function(){ content:function(){
trigger.card.nature='fire'; trigger.card.nature='fire';

View File

@ -1146,9 +1146,8 @@ game.import('card',function(lib,game,ui,get,ai,_status){
} }
} }
if(cards.length){ if(cards.length){
for(var i=0;i<cards.length;i++){ game.cardsGotoSpecial(cards);
cards[i].remove(); game.log(cards,'已被移出游戏');
}
_status.chiling=true; _status.chiling=true;
player.popup('敕令'); player.popup('敕令');
} }
@ -1160,12 +1159,13 @@ game.import('card',function(lib,game,ui,get,ai,_status){
forced:true, forced:true,
popup:false, popup:false,
filter:function(event,player){ filter:function(event,player){
if(event.result.card.parentNode.id!='discardPile') return false; if(get.position(event.result.card)!='d') return false;
return event.result.card.name=='chiling'; return event.result.card.name=='chiling';
}, },
content:function(){ content:function(){
_status.chiling=true; _status.chiling=true;
trigger.result.card.remove(); game.cardsGotoSpecial(trigger.result.card);
game.log(trigger.result.card,'已被移出游戏');
player.popup('敕令'); player.popup('敕令');
} }
}, },
@ -1175,7 +1175,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
forced:true, forced:true,
popup:false, popup:false,
filter:function(){ filter:function(){
return _status.chiling; return _status.chiling==true;
}, },
content:function(){ content:function(){
'step 0' 'step 0'
@ -1227,7 +1227,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
}, },
g_diaohulishan:{}, g_diaohulishan:{},
diaohulishan:{ diaohulishan:{
trigger:{player:['damageBefore','loseHpBefore','recoverBefore']}, trigger:{player:['damageBegin3','loseHpBefore','recoverBefore']},
forced:true, forced:true,
popup:false, popup:false,
content:function(){ content:function(){

View File

@ -443,7 +443,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
skill:{ skill:{
lanyinjia:{ lanyinjia:{
equipSkill:true, equipSkill:true,
enable:['chooseToRespond'], enable:['chooseToUse','chooseToRespond'],
filterCard:true, filterCard:true,
viewAs:{name:'shan'}, viewAs:{name:'shan'},
viewAsFilter:function(player){ viewAsFilter:function(player){

View File

@ -78,36 +78,56 @@ game.import('card',function(lib,game,ui,get,ai,_status){
if(typeof event.baseDamage!='number') event.baseDamage=1; if(typeof event.baseDamage!='number') event.baseDamage=1;
if(typeof event.extraDamage!='number') event.extraDamage=0; if(typeof event.extraDamage!='number') event.extraDamage=0;
"step 1" "step 1"
if(event.directHit){ if(event.directHit||(!target.hasShan()&&!_status.connectMode)){
event._result={bool:false}; event._result={bool:false};
} }
else if(event.skipShan){ else if(event.skipShan){
event._result={bool:true}; event._result={result:'shaned'};
} }
else{ else{
var next=target.chooseToRespond({name:'shan'}); var next=target.chooseToUse('请使用一张闪响应杀');
next.set('filterCard',function(card,player){
if(get.name(card)!='shan') return false;
return lib.filter.cardEnabled(card,player,'forceEnable');
});
if(event.shanRequired>1){ if(event.shanRequired>1){
next.set('prompt2','(共需打出'+event.shanRequired+'张闪)'); next.set('prompt2','(共需使用'+event.shanRequired+'张闪)');
} }
next.set('ai',function(card){ next.set('ai1',function(card){
var target=_status.event.player; var target=_status.event.player;
var evt=_status.event.getParent(); var evt=_status.event.getParent();
var bool=true;
if(_status.event.shanRequired>1&&target.countCards('h','shan')<_status.event.shanRequired){ if(_status.event.shanRequired>1&&target.countCards('h','shan')<_status.event.shanRequired){
return -1 bool=false;
} }
if(target.hasSkillTag('useShan')){ else if(target.hasSkillTag('useShan')){
return 11-get.value(card); bool=true;
} }
if(target.hasSkillTag('noShan')){ else if(target.hasSkillTag('noShan')){
return -1; bool=false;
} }
if(get.damageEffect(target,evt.player,target,evt.card.nature)>=0) return -1; else if(get.damageEffect(target,evt.player,target,evt.card.nature)>=0) bool=false;
return 11-get.value(card); if(bool){
if(typeof card=='string'){
var info=get.info(card);
if(info.ai&&info.ai.order){
if(typeof info.ai.order=='number'){
return info.ai.order;
}
else if(typeof info.ai.order=='function'){
return info.ai.order();
}
}
}
return 3;
}
return 0;
}).set('shanRequired',event.shanRequired); }).set('shanRequired',event.shanRequired);
next.autochoose=lib.filter.autoRespondShan; next.set('respondTo',[player,card]);
//next.autochoose=lib.filter.autoRespondShan;
} }
"step 2" "step 2"
if(result.bool==false){ if(result.result!='shaned'){
event.trigger('shaHit'); event.trigger('shaHit');
} }
else{ else{
@ -212,11 +232,17 @@ game.import('card',function(lib,game,ui,get,ai,_status){
fullskin:true, fullskin:true,
type:'basic', type:'basic',
cardcolor:'red', cardcolor:'red',
notarget:true,
content:function(){
event.result='shaned';
},
ai:{ ai:{
basic:{ basic:{
useful:[7,2], useful:[7,2],
value:[7,2] value:[7,2],
} },
result:{player:1},
expose:0.2
} }
}, },
tao:{ tao:{
@ -1778,11 +1804,11 @@ game.import('card',function(lib,game,ui,get,ai,_status){
}, },
bagua_skill:{ bagua_skill:{
equipSkill:true, equipSkill:true,
trigger:{player:'chooseToRespondBegin'}, trigger:{player:['chooseToRespondBegin','chooseToUseBegin']},
filter:function(event,player){ filter:function(event,player){
if(event.responded) return false; if(event.responded) return false;
if(!event.filterCard({name:'shan'})) return false; if(!event.filterCard({name:'shan'})) return false;
if(!lib.filter.cardRespondable({name:'shan'},player,event)) return false; if(event.name=='chooseToRespond'&&!lib.filter.cardRespondable({name:'shan'},player,event)) return false;
if(player.hasSkillTag('unequip2')) return false; if(player.hasSkillTag('unequip2')) return false;
var evt=event.getParent(); var evt=event.getParent();
if(evt.player&&evt.player.hasSkillTag('unequip',false,{ if(evt.player&&evt.player.hasSkillTag('unequip',false,{