bug修复,增加观微AI
This commit is contained in:
parent
a11f8906d0
commit
9e2a3e8414
|
@ -2547,6 +2547,9 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(name=='bingliang'&&source.countCards('j')>0&&source.countCards('h')>=source.hp-1){
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
var card2;
|
var card2;
|
||||||
if(name!=card.name){
|
if(name!=card.name){
|
||||||
card2={name:name};
|
card2={name:name};
|
||||||
|
|
|
@ -4770,6 +4770,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
filter:function(event,player,name){
|
filter:function(event,player,name){
|
||||||
if(name=='damageEnd') return true;
|
if(name=='damageEnd') return true;
|
||||||
var evt=event.getParent();
|
var evt=event.getParent();
|
||||||
|
if(evt.player!=player) return false;
|
||||||
return evt.card&&evt.type=='card'&&evt.targets.length==1;
|
return evt.card&&evt.type=='card'&&evt.targets.length==1;
|
||||||
},
|
},
|
||||||
content:function(){
|
content:function(){
|
||||||
|
|
|
@ -280,12 +280,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
event.cards.remove(card);
|
event.cards.remove(card);
|
||||||
if(result.links[0]!='获得剩余的牌') event.finish();
|
if(result.links[0]!='获得剩余的牌') event.finish();
|
||||||
}
|
}
|
||||||
|
else if(event.targets.length) event.goto(1);
|
||||||
else event.finish();
|
else event.finish();
|
||||||
'step 3'
|
'step 3'
|
||||||
var cards=cards.filterInD('d');
|
var cards=cards.filterInD('d');
|
||||||
if(cards.length>0) player.gain(cards,'gain2');
|
if(cards.length>0) player.gain(cards,'gain2');
|
||||||
'step 4'
|
|
||||||
if(event.targets.length) event.goto(1);
|
|
||||||
},
|
},
|
||||||
ai:{
|
ai:{
|
||||||
threaten:1.3,
|
threaten:1.3,
|
||||||
|
|
|
@ -8558,7 +8558,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
check:function(card){
|
check:function(card){
|
||||||
return 6-get.value(card);
|
return 6-get.value(card);
|
||||||
},
|
},
|
||||||
position:'h',
|
position:'hs',
|
||||||
onuse:function(result,player){
|
onuse:function(result,player){
|
||||||
player.addTempSkill('juguan_effect');
|
player.addTempSkill('juguan_effect');
|
||||||
},
|
},
|
||||||
|
|
|
@ -409,7 +409,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
group:'dcguixiu_rec',
|
group:'dcguixiu_rec',
|
||||||
content:function(){
|
content:function(){
|
||||||
player.addMark('dcguixiu',1,false);
|
player.addMark('dcguixiu',1,false);
|
||||||
player.draw();
|
player.draw(2);
|
||||||
},
|
},
|
||||||
subSkill:{
|
subSkill:{
|
||||||
rec:{
|
rec:{
|
||||||
|
@ -17154,12 +17154,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
content:function(){
|
content:function(){
|
||||||
|
'step 0'
|
||||||
player.awakenSkill('syxiongyi');
|
player.awakenSkill('syxiongyi');
|
||||||
if(!_status.characterlist){
|
if(!_status.characterlist){
|
||||||
lib.skill.pingjian.initList();
|
lib.skill.pingjian.initList();
|
||||||
}
|
}
|
||||||
var hp=1-player.hp;
|
event.hp=1-player.hp;
|
||||||
if((player.name1=='re_sunyi'||player.name2=='re_sunyi')&&_status.characterlist.contains('xushi')){
|
if(_status.characterlist.contains('xushi')){
|
||||||
|
if(player.name1=='re_sunyi'||player.name2=='re_sunyi') event._result={control:'re_sunyi'};
|
||||||
|
else if(player.name2!=undefined){
|
||||||
|
player.chooseControl(player.name1,player.name2).set('prompt','请选择要更换的武将牌');
|
||||||
|
}
|
||||||
|
else event._result={control:player.name1};
|
||||||
hp+=2;
|
hp+=2;
|
||||||
_status.characterlist.remove('xushi');
|
_status.characterlist.remove('xushi');
|
||||||
_status.characterlist.add('re_sunyi');
|
_status.characterlist.add('re_sunyi');
|
||||||
|
@ -17167,7 +17173,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
player.addSkillLog('olhunzi');
|
player.addSkillLog('olhunzi');
|
||||||
|
event.goto(2);
|
||||||
}
|
}
|
||||||
|
'step 1'
|
||||||
|
event.hp+=2;
|
||||||
|
var name=result.control;
|
||||||
|
_status.characterlist.remove('xushi');
|
||||||
|
_status.characterlist.add(name);
|
||||||
|
player.reinit(name,'xushi',false);
|
||||||
|
'step 2'
|
||||||
|
var hp=event.hp;
|
||||||
if(hp>0) player.recover(hp);
|
if(hp>0) player.recover(hp);
|
||||||
},
|
},
|
||||||
ai:{
|
ai:{
|
||||||
|
@ -30263,7 +30278,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
syjiqiao:'激峭',
|
syjiqiao:'激峭',
|
||||||
syjiqiao_info:'出牌阶段开始时,你可将牌堆顶的X张牌置于你的武将牌上(X为你的体力上限)。当你于此出牌阶段内使用的牌结算结束后,你可以获得其中的一张牌,然后若剩余牌中红色牌和黑色牌的数量:不相等,你失去1点体力;相等,你回复1点体力。出牌阶段结束时,你将这些牌置入弃牌堆。',
|
syjiqiao_info:'出牌阶段开始时,你可将牌堆顶的X张牌置于你的武将牌上(X为你的体力上限)。当你于此出牌阶段内使用的牌结算结束后,你可以获得其中的一张牌,然后若剩余牌中红色牌和黑色牌的数量:不相等,你失去1点体力;相等,你回复1点体力。出牌阶段结束时,你将这些牌置入弃牌堆。',
|
||||||
syxiongyi:'凶疑',
|
syxiongyi:'凶疑',
|
||||||
syxiongyi_info:'限定技。当你处于濒死状态时,若剩余武将牌堆中:有“徐氏”,则你将体力值回复至3点,并将此武将牌替换为“徐氏”;没有“徐氏”,则你将体力值回复至1点并获得〖魂姿〗。',
|
syxiongyi_info:'限定技。当你处于濒死状态时,若剩余武将牌堆中:有“徐氏”,则你可以将体力值回复至3点,并将此武将牌替换为“徐氏”;没有“徐氏”,则你可以将体力值回复至1点并获得〖魂姿〗。',
|
||||||
zhaoyan:'赵嫣',
|
zhaoyan:'赵嫣',
|
||||||
jinhui:'锦绘',
|
jinhui:'锦绘',
|
||||||
jinhui_info:'出牌阶段限一次,你可以随机展示牌堆中的三张不具有“伤害”标签且使用目标范围为“自己”或“一名角色”的牌,然后选择一名其他角色。该角色选择并按如下“锦绘”规则使用其中一张,然后你可以按如下“锦绘”规则使用剩余的任意张牌:若此牌的使用目标为“自己”,则对自己使用该牌,否则对对方使用该牌(无距离限制且不计入次数限制)。',
|
jinhui_info:'出牌阶段限一次,你可以随机展示牌堆中的三张不具有“伤害”标签且使用目标范围为“自己”或“一名角色”的牌,然后选择一名其他角色。该角色选择并按如下“锦绘”规则使用其中一张,然后你可以按如下“锦绘”规则使用剩余的任意张牌:若此牌的使用目标为“自己”,则对自己使用该牌,否则对对方使用该牌(无距离限制且不计入次数限制)。',
|
||||||
|
|
|
@ -447,6 +447,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
if(!player.isPhaseUsing()) return false;
|
if(!player.isPhaseUsing()) return false;
|
||||||
if(player==event.player) return false;
|
if(player==event.player) return false;
|
||||||
if(!event.player.isIn()) return false;
|
if(!event.player.isIn()) return false;
|
||||||
|
if(!event.card) return false;
|
||||||
return event.card.name=='sha'||get.type(event.card)=='trick'&&get.tag(event.card,'damage');
|
return event.card.name=='sha'||get.type(event.card)=='trick'&&get.tag(event.card,'damage');
|
||||||
},
|
},
|
||||||
logTarget:'player',
|
logTarget:'player',
|
||||||
|
@ -496,38 +497,53 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
if(result.index==0){
|
if(result.index==0){
|
||||||
target.draw();
|
target.draw();
|
||||||
player.addTempSkill('twxianfeng_me',{player:'phaseBegin'});
|
player.addTempSkill('twxianfeng_me',{player:'phaseBegin'});
|
||||||
|
player.addMark('twxianfeng_me',1,false);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
player.draw();
|
player.draw();
|
||||||
target.addTempSkill('twxianfeng_others');
|
target.addSkill('twxianfeng_others');
|
||||||
target.markAuto('twxianfeng_others',[player]);
|
if(!target.storage.twxianfeng_others) target.storage.twxianfeng_others={};
|
||||||
|
if(typeof target.storage.twxianfeng_others[player.playerid]!='number') target.storage.twxianfeng_others[player.playerid]=0;
|
||||||
|
target.storage.twxianfeng_others[player.playerid]++;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
subSkill:{
|
subSkill:{
|
||||||
me:{
|
me:{
|
||||||
charlotte:true,
|
charlotte:true,
|
||||||
mark:true,
|
mark:true,
|
||||||
intro:{content:'至其他角色的距离-1'},
|
intro:{content:'至其他角色的距离-#'},
|
||||||
mod:{
|
mod:{
|
||||||
globalFrom:function(from,to,distance){
|
globalFrom:function(from,to,distance){
|
||||||
return distance-1;
|
return distance-from.countMark('twxianfeng_me');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
others:{
|
others:{
|
||||||
trigger:{global:['phaseBegin','die']},
|
trigger:{global:['phaseBegin','die']},
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
return player.getStorage('twxianfeng_others').contains(event.player);
|
return player.storage.twxianfeng_others&&player.storage.twxianfeng_others[event.player.playerid];
|
||||||
},
|
},
|
||||||
charlotte:true,
|
charlotte:true,
|
||||||
mark:true,
|
mark:true,
|
||||||
intro:{content:'至$的距离-1'},
|
forced:true,
|
||||||
|
intro:{
|
||||||
|
content:function(storage,player){
|
||||||
|
if(!storage) return '';
|
||||||
|
var str='';
|
||||||
|
var map=(_status.connectMode?lib.playerOL:game.playerMap);
|
||||||
|
for(var id of storage){
|
||||||
|
str+='至'+get.translation(map[id])+'的距离-'+storage[id]+'、';
|
||||||
|
}
|
||||||
|
return str.slice(0,-1);
|
||||||
|
}
|
||||||
|
},
|
||||||
content:function(){
|
content:function(){
|
||||||
player.unmarkAuto('twxianfeng_others',[trigger.player]);
|
delete player.storage.twxianfeng_others[trigger.player.playerid];
|
||||||
|
if(get.is.empty(player.storage.twxianfeng_others)) player.removeSkill('twxianfeng_others');
|
||||||
},
|
},
|
||||||
mod:{
|
mod:{
|
||||||
globalFrom:function(from,to,distance){
|
globalFrom:function(from,to,distance){
|
||||||
if(from.getStorage('twxianfeng_others').contains(to)) return distance-1;
|
if(from.storage.twxianfeng_others&&typeof from.storage.twxianfeng_others[to.playerid]=='number') return distance-from.storage.twxianfeng_others[to.playerid];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -836,21 +836,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"xinfu_guanwei":{
|
xinfu_guanwei:{
|
||||||
audio:2,
|
audio:2,
|
||||||
usable:1,
|
usable:1,
|
||||||
trigger:{
|
trigger:{
|
||||||
global:"phaseUseEnd",
|
global:"phaseUseEnd",
|
||||||
},
|
},
|
||||||
filter:function (event,player){
|
filter:function (event,player){
|
||||||
var history=event.player.getHistory('useCard',function(evt){
|
var history=event.player.getHistory('useCard');
|
||||||
return evt.getParent('phaseUse')==event;
|
|
||||||
});
|
|
||||||
var num=0;
|
var num=0;
|
||||||
var suit=false;
|
var suit=false;
|
||||||
for(var i=0;i<history.length;i++){
|
for(var i=0;i<history.length;i++){
|
||||||
var suit2=get.suit(history[i].card);
|
var suit2=get.suit(history[i].card);
|
||||||
if(!suit2) continue;
|
if(!lib.suit.contains(suit2)) return false;
|
||||||
if(suit&&suit!=suit2) return false;
|
if(suit&&suit!=suit2) return false;
|
||||||
suit=suit2;
|
suit=suit2;
|
||||||
num++;
|
num++;
|
||||||
|
@ -858,17 +856,21 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
return num>1;
|
return num>1;
|
||||||
},
|
},
|
||||||
direct:true,
|
direct:true,
|
||||||
|
global:'xinfu_guanwei_ai',
|
||||||
content:function (){
|
content:function (){
|
||||||
'step 0'
|
'step 0'
|
||||||
|
var target=trigger.player;
|
||||||
player.chooseToDiscard('he',get.prompt('xinfu_guanwei',trigger.player),'弃置一张牌,令其摸两张牌并进行一个额外的出牌阶段。').set('ai',function(card){
|
player.chooseToDiscard('he',get.prompt('xinfu_guanwei',trigger.player),'弃置一张牌,令其摸两张牌并进行一个额外的出牌阶段。').set('ai',function(card){
|
||||||
if(get.attitude(_status.event.player,_status.currentPhase)<1) return 0;
|
if(get.attitude(_status.event.player,_status.event.targetx)<1) return 0;
|
||||||
return 9-get.value(card);
|
return 9-get.value(card);
|
||||||
}).set('logSkill','xinfu_guanwei');
|
}).set('logSkill',['xinfu_guanwei',target]).set('targetx',target);
|
||||||
'step 1'
|
'step 1'
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
player.line(trigger.player,'green');
|
player.line(trigger.player,'green');
|
||||||
trigger.player.draw(2);
|
trigger.player.draw(2);
|
||||||
}else{
|
}
|
||||||
|
else{
|
||||||
|
player.storage.counttrigger.xinfu_guanwei--;
|
||||||
event.finish();
|
event.finish();
|
||||||
}
|
}
|
||||||
'step 2'
|
'step 2'
|
||||||
|
@ -879,6 +881,47 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
ai:{
|
ai:{
|
||||||
expose:0.5,
|
expose:0.5,
|
||||||
},
|
},
|
||||||
|
subSkill:{
|
||||||
|
ai:{
|
||||||
|
ai:{
|
||||||
|
effect:{
|
||||||
|
player_use:function(card,player,target){
|
||||||
|
if(typeof card!='object'||!player.isPhaseUsing()) return;
|
||||||
|
var hasPanjun=game.hasPlayer(function(current){
|
||||||
|
return current.hasSkill('xinfu_guanwei')&&(!current.storage.counttrigger||!current.storage.counttrigger.xinfu_guanwei)&&
|
||||||
|
get.attitude(current,player)>=1&¤t.hasCard(function(card){
|
||||||
|
return get.value(card)<7||(current!=game.me&&!current.isUnderControl()&&!current.isOnline())&&get.value(card)<9;
|
||||||
|
},'he');
|
||||||
|
});
|
||||||
|
if(!hasPanjun) return;
|
||||||
|
var suitx=get.suit(card);
|
||||||
|
var history=player.getHistory('useCard');
|
||||||
|
if(!history.length){
|
||||||
|
var val=0;
|
||||||
|
if(player.hasCard(function(cardx){
|
||||||
|
return get.suit(cardx)==suitx&&card!=cardx&&(!card.cards||!card.cards.contains(cardx))&&player.hasValueTarget(cardx);
|
||||||
|
},'hs')) val=[2,0.1];
|
||||||
|
if(val) return val;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
var num=0;
|
||||||
|
var suit=false;
|
||||||
|
for(var i=0;i<history.length;i++){
|
||||||
|
var suit2=get.suit(history[i].card);
|
||||||
|
if(!lib.suit.contains(suit2)) return;
|
||||||
|
if(suit&&suit!=suit2) return;
|
||||||
|
suit=suit2;
|
||||||
|
num++;
|
||||||
|
}
|
||||||
|
if(suitx==suit&&num==1) return [1,0.1];
|
||||||
|
if(suitx!=suit&&(num>1||num<=1&&player.hasCard(function(cardx){
|
||||||
|
return get.suit(cardx)==suit&&player.hasValueTarget(cardx);
|
||||||
|
},'hs'))) return 'zeroplayertarget';
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
xinfu_gongqing_gz_panjun:{audio:2},
|
xinfu_gongqing_gz_panjun:{audio:2},
|
||||||
"xinfu_gongqing":{
|
"xinfu_gongqing":{
|
||||||
|
@ -1537,7 +1580,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
"xinfu_zengdao2":"赠刀",
|
"xinfu_zengdao2":"赠刀",
|
||||||
"xinfu_zengdao2_info":"",
|
"xinfu_zengdao2_info":"",
|
||||||
"xinfu_guanwei":"观微",
|
"xinfu_guanwei":"观微",
|
||||||
"xinfu_guanwei_info":"每回合限一次。一名角色的出牌阶段结束时,若其于出牌阶段内使用过两张以上的牌且花色均相同,则你可以弃置一张牌,令其摸两张牌并进行一个额外的出牌阶段。",
|
"xinfu_guanwei_info":"每回合限一次。一名角色的出牌阶段结束时,若其本回合使用过两张以上的牌且这些牌均有花色且花色均相同,则你可以弃置一张牌,令其摸两张牌并进行一个额外的出牌阶段。",
|
||||||
"xinfu_gongqing":"公清",
|
"xinfu_gongqing":"公清",
|
||||||
"xinfu_gongqing_info":"锁定技。当你受到伤害时,若伤害来源的攻击范围:<3,则你令此伤害的数值减为1。>3,你令此伤害+1。",
|
"xinfu_gongqing_info":"锁定技。当你受到伤害时,若伤害来源的攻击范围:<3,则你令此伤害的数值减为1。>3,你令此伤害+1。",
|
||||||
"xinfu_andong":"安东",
|
"xinfu_andong":"安东",
|
||||||
|
|
Loading…
Reference in New Issue