This commit is contained in:
parent
e22aecc6ad
commit
382b30eda4
|
@ -99,12 +99,20 @@ card.guozhan={
|
||||||
type:'trick',
|
type:'trick',
|
||||||
enable:true,
|
enable:true,
|
||||||
filterTarget:function(card,player,target){
|
filterTarget:function(card,player,target){
|
||||||
if(player.identity=='unknown'||player.identity=='ye'||lib.config.mode!='guozhan') return player==target;
|
if(lib.config.mode=='guozhan'){
|
||||||
return player.identity==target.identity;
|
if(player.identity=='unknown'||player.identity=='ye') return player==target;
|
||||||
|
return player.identity==target.identity;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
selectTarget:function(){
|
||||||
|
if(lib.config.mode=='guozhan') return -1;
|
||||||
|
return [1,3];
|
||||||
},
|
},
|
||||||
selectTarget:-1,
|
|
||||||
content:function(){
|
content:function(){
|
||||||
target.draw(lib.config.mode=='guozhan'?2:3);
|
target.draw(2);
|
||||||
target.chooseToDiscard(2,'he',true).ai=ai.get.disvalue;
|
target.chooseToDiscard(2,'he',true).ai=ai.get.disvalue;
|
||||||
},
|
},
|
||||||
ai:{
|
ai:{
|
||||||
|
@ -114,15 +122,17 @@ card.guozhan={
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
basic:{
|
basic:{
|
||||||
useful:4,
|
useful:3,
|
||||||
value:4,
|
value:3,
|
||||||
order:7
|
order:5
|
||||||
},
|
},
|
||||||
result:{
|
result:{
|
||||||
target:function(player,target){
|
target:function(player,target){
|
||||||
if(lib.config.mode!='guozhan') return 1;
|
|
||||||
if(target.num('h')<=1){
|
if(target.num('h')<=1){
|
||||||
return 0;
|
if(target==player){
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return 0.3;
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
},
|
},
|
||||||
|
@ -229,7 +239,7 @@ card.guozhan={
|
||||||
zhibi:'知己知彼',
|
zhibi:'知己知彼',
|
||||||
zhibi_info:'出牌阶段对一名其他角色使用,观看其手牌或装备牌',
|
zhibi_info:'出牌阶段对一名其他角色使用,观看其手牌或装备牌',
|
||||||
yiyi:'以逸待劳',
|
yiyi:'以逸待劳',
|
||||||
yiyi_info:'对与自己势力相同的所有角色使用,摸两张牌然后弃置两张牌(非国战模式改为对自己使用,摸3张弃两张)',
|
yiyi_info:'对与自己势力相同的所有角色使用,摸两张牌然后弃置两张牌(非国战模式改为任意指定三名角色)',
|
||||||
yiyi_bg:'逸',
|
yiyi_bg:'逸',
|
||||||
wuliu:'吴六剑',
|
wuliu:'吴六剑',
|
||||||
wuliu_info:'其他与装备者势力相同的角色攻击范围+1',
|
wuliu_info:'其他与装备者势力相同的角色攻击范围+1',
|
||||||
|
|
|
@ -537,6 +537,27 @@ character.hearth={
|
||||||
if(hs.length>10&&hs.length>player.hp){
|
if(hs.length>10&&hs.length>player.hp){
|
||||||
player.discard(hs.randomGets(hs.length-player.hp));
|
player.discard(hs.randomGets(hs.length-player.hp));
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
ai:{
|
||||||
|
effect:{
|
||||||
|
target:function(card,player,target){
|
||||||
|
if(get.tag(card,'damage')){
|
||||||
|
if(player.skills.contains('jueqing')) return [1,-2];
|
||||||
|
if(!target.hasFriend()) return;
|
||||||
|
var nh=target.num('h');
|
||||||
|
if(nh>5) return [1,-1];
|
||||||
|
if(nh<=1) return [1,-0.1];
|
||||||
|
if(nh==2){
|
||||||
|
if(target.hp>=2) return [1,0.1];
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
if(target.hp>=4) return [1,2];
|
||||||
|
if(target.hp==3) return [1,1.5];
|
||||||
|
if(target.hp==2) return [1,0.5];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
chuidiao:{
|
chuidiao:{
|
||||||
|
|
|
@ -173,8 +173,13 @@ window.characterRank={
|
||||||
'yxs_luzhishen',
|
'yxs_luzhishen',
|
||||||
'sunluyu',
|
'sunluyu',
|
||||||
'swd_xiyan',
|
'swd_xiyan',
|
||||||
|
'hs_jiaziruila',
|
||||||
],
|
],
|
||||||
bp:[
|
bp:[
|
||||||
|
'hs_hudunren',
|
||||||
|
'hs_nate',
|
||||||
|
'hs_shifazhe',
|
||||||
|
'hs_kchromaggus',
|
||||||
'hs_yelise',
|
'hs_yelise',
|
||||||
'hs_loatheb',
|
'hs_loatheb',
|
||||||
'hs_alextrasza',
|
'hs_alextrasza',
|
||||||
|
@ -270,8 +275,18 @@ window.characterRank={
|
||||||
'zumao',
|
'zumao',
|
||||||
'sp_daqiao',
|
'sp_daqiao',
|
||||||
'sp_ganning',
|
'sp_ganning',
|
||||||
|
'jsp_guanyu',
|
||||||
|
'wenpin',
|
||||||
|
'sp_lvmeng',
|
||||||
|
'wangji',
|
||||||
|
'swd_weida',
|
||||||
|
'swd_lilian',
|
||||||
],
|
],
|
||||||
b:[
|
b:[
|
||||||
|
'sp_xiahoudun',
|
||||||
|
'jsp_huangyueying',
|
||||||
|
'cuiyan',
|
||||||
|
'sp_zhangfei',
|
||||||
'hs_nozdormu',
|
'hs_nozdormu',
|
||||||
'yxs_lishimin',
|
'yxs_lishimin',
|
||||||
'hs_ruanniguai',
|
'hs_ruanniguai',
|
||||||
|
|
|
@ -18,7 +18,8 @@
|
||||||
var lib={
|
var lib={
|
||||||
version:'1.7.11',
|
version:'1.7.11',
|
||||||
changeLog:[
|
changeLog:[
|
||||||
'扩展'
|
'扩展',
|
||||||
|
'AI改进'
|
||||||
],
|
],
|
||||||
configprefix:'noname_0.9_',
|
configprefix:'noname_0.9_',
|
||||||
updates:[],
|
updates:[],
|
||||||
|
@ -22514,9 +22515,9 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(e.keyCode==73){
|
else if(e.keyCode==73){
|
||||||
if(game.showIdentity){
|
// if(game.showIdentity){
|
||||||
game.showIdentity();
|
// game.showIdentity();
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
else if(e.keyCode==67){
|
else if(e.keyCode==67){
|
||||||
var node=ui.window.querySelector('#click');
|
var node=ui.window.querySelector('#click');
|
||||||
|
|
|
@ -1138,85 +1138,104 @@ div:hover>.intro{opacity: 1;}
|
||||||
-webkit-animation:identity 0.8s;
|
-webkit-animation:identity 0.8s;
|
||||||
}
|
}
|
||||||
.player .identity[data-color="zhu"],
|
.player .identity[data-color="zhu"],
|
||||||
div[data-nature='fire']{
|
div[data-nature='fire'],
|
||||||
|
span[data-nature='fire']{
|
||||||
text-shadow: black 0 0 1px,rgba(232, 53, 53,1) 0 0 2px,rgba(232, 53, 53,1) 0 0 5px,rgba(232, 53, 53,1) 0 0 10px,
|
text-shadow: black 0 0 1px,rgba(232, 53, 53,1) 0 0 2px,rgba(232, 53, 53,1) 0 0 5px,rgba(232, 53, 53,1) 0 0 10px,
|
||||||
rgba(232, 53, 53,1) 0 0 10px,rgba(232, 53, 53,1) 0 0 20px,rgba(232, 53, 53,1) 0 0 20px
|
rgba(232, 53, 53,1) 0 0 10px,rgba(232, 53, 53,1) 0 0 20px,rgba(232, 53, 53,1) 0 0 20px
|
||||||
}
|
}
|
||||||
div[data-nature='firem']{
|
div[data-nature='firem'],
|
||||||
|
span[data-nature='firem']{
|
||||||
text-shadow: black 0 0 1px,rgba(232, 53, 53,1) 0 0 2px,rgba(232, 53, 53,1) 0 0 5px,rgba(232, 53, 53,1) 0 0 5px,
|
text-shadow: black 0 0 1px,rgba(232, 53, 53,1) 0 0 2px,rgba(232, 53, 53,1) 0 0 5px,rgba(232, 53, 53,1) 0 0 5px,
|
||||||
rgba(232, 53, 53,1) 0 0 5px,black 0 0 1px;
|
rgba(232, 53, 53,1) 0 0 5px,black 0 0 1px;
|
||||||
}
|
}
|
||||||
.player .identity[data-color="zhong"],
|
.player .identity[data-color="zhong"],
|
||||||
.player .identity[data-color="mingzhong"],
|
.player .identity[data-color="mingzhong"],
|
||||||
.player .identity[data-color="qun"],
|
.player .identity[data-color="qun"],
|
||||||
div[data-nature='metal']{
|
div[data-nature='metal'],
|
||||||
|
span[data-nature='metal']{
|
||||||
text-shadow: black 0 0 1px,rgba(255, 203, 0,1) 0 0 2px,rgba(255, 203, 0,1) 0 0 5px,rgba(255, 203, 0,1) 0 0 10px,
|
text-shadow: black 0 0 1px,rgba(255, 203, 0,1) 0 0 2px,rgba(255, 203, 0,1) 0 0 5px,rgba(255, 203, 0,1) 0 0 10px,
|
||||||
rgba(255, 203, 0,1) 0 0 10px
|
rgba(255, 203, 0,1) 0 0 10px
|
||||||
}
|
}
|
||||||
div[data-nature='metalm']{
|
div[data-nature='metalm'],
|
||||||
|
span[data-nature='metalm']{
|
||||||
text-shadow: black 0 0 1px,rgba(255, 203, 0,1) 0 0 2px,rgba(255, 203, 0,1) 0 0 5px,rgba(255, 203, 0,1) 0 0 5px,
|
text-shadow: black 0 0 1px,rgba(255, 203, 0,1) 0 0 2px,rgba(255, 203, 0,1) 0 0 5px,rgba(255, 203, 0,1) 0 0 5px,
|
||||||
rgba(255, 203, 0,1) 0 0 5px,black 0 0 1px;
|
rgba(255, 203, 0,1) 0 0 5px,black 0 0 1px;
|
||||||
}
|
}
|
||||||
div[data-nature='metalmm']{
|
div[data-nature='metalmm'],
|
||||||
|
span[data-nature='metalmm']{
|
||||||
text-shadow: black 0 0 1px,rgba(255, 203, 0,1) 0 0 2px,rgba(255, 203, 0,1) 0 0 2px,rgba(255, 203, 0,1) 0 0 2px,
|
text-shadow: black 0 0 1px,rgba(255, 203, 0,1) 0 0 2px,rgba(255, 203, 0,1) 0 0 2px,rgba(255, 203, 0,1) 0 0 2px,
|
||||||
rgba(255, 203, 0,1) 0 0 2px,black 0 0 1px;
|
rgba(255, 203, 0,1) 0 0 2px,black 0 0 1px;
|
||||||
}
|
}
|
||||||
.player .identity[data-color="nei"],
|
.player .identity[data-color="nei"],
|
||||||
.player .identity[data-color="ye"],
|
.player .identity[data-color="ye"],
|
||||||
div[data-nature='thunder']{
|
div[data-nature='thunder'],
|
||||||
|
span[data-nature='thunder']{
|
||||||
text-shadow: rgba(100, 74, 139,1) 0 0 2px,rgba(100, 74, 139,1) 0 0 5px,rgba(100, 74, 139,1) 0 0 10px,
|
text-shadow: rgba(100, 74, 139,1) 0 0 2px,rgba(100, 74, 139,1) 0 0 5px,rgba(100, 74, 139,1) 0 0 10px,
|
||||||
rgba(100, 74, 139,1) 0 0 10px,rgba(100, 74, 139,1) 0 0 20px,rgba(100, 74, 139,1) 0 0 20px,black 0 0 1px;
|
rgba(100, 74, 139,1) 0 0 10px,rgba(100, 74, 139,1) 0 0 20px,rgba(100, 74, 139,1) 0 0 20px,black 0 0 1px;
|
||||||
}
|
}
|
||||||
div[data-nature='thunderm']{
|
div[data-nature='thunderm'],
|
||||||
|
span[data-nature='thunderm']{
|
||||||
text-shadow: rgba(100, 74, 139,1) 0 0 2px,rgba(100, 74, 139,1) 0 0 5px,rgba(100, 74, 139,1) 0 0 5px,
|
text-shadow: rgba(100, 74, 139,1) 0 0 2px,rgba(100, 74, 139,1) 0 0 5px,rgba(100, 74, 139,1) 0 0 5px,
|
||||||
rgba(100, 74, 139,1) 0 0 5px,black 0 0 1px;
|
rgba(100, 74, 139,1) 0 0 5px,black 0 0 1px;
|
||||||
}
|
}
|
||||||
.player .identity[data-color="fan"],
|
.player .identity[data-color="fan"],
|
||||||
.player .identity[data-color="wu"],
|
.player .identity[data-color="wu"],
|
||||||
div[data-nature='wood']{
|
div[data-nature='wood'],
|
||||||
|
span[data-nature='wood']{
|
||||||
text-shadow: rgba(57, 123, 4,1) 0 0 2px,rgba(57, 123, 4,1) 0 0 5px,rgba(57, 123, 4,1) 0 0 10px,
|
text-shadow: rgba(57, 123, 4,1) 0 0 2px,rgba(57, 123, 4,1) 0 0 5px,rgba(57, 123, 4,1) 0 0 10px,
|
||||||
rgba(57, 123, 4,1) 0 0 10px,rgba(57, 123, 4,1) 0 0 20px,rgba(57, 123, 4,1) 0 0 20px,black 0 0 1px;
|
rgba(57, 123, 4,1) 0 0 10px,rgba(57, 123, 4,1) 0 0 20px,rgba(57, 123, 4,1) 0 0 20px,black 0 0 1px;
|
||||||
}
|
}
|
||||||
div[data-nature='woodm']{
|
div[data-nature='woodm'],
|
||||||
|
span[data-nature='woodm']{
|
||||||
text-shadow: rgba(57, 123, 4,1) 0 0 2px,rgba(57, 123, 4,1) 0 0 5px,rgba(57, 123, 4,1) 0 0 5px,
|
text-shadow: rgba(57, 123, 4,1) 0 0 2px,rgba(57, 123, 4,1) 0 0 5px,rgba(57, 123, 4,1) 0 0 5px,
|
||||||
rgba(57, 123, 4,1) 0 0 5px,black 0 0 1px;
|
rgba(57, 123, 4,1) 0 0 5px,black 0 0 1px;
|
||||||
}
|
}
|
||||||
div[data-nature='woodmm']{
|
div[data-nature='woodmm'],
|
||||||
|
span[data-nature='woodmm']{
|
||||||
text-shadow: rgba(57, 123, 4,1) 0 0 2px,rgba(57, 123, 4,1) 0 0 2px,rgba(57, 123, 4,1) 0 0 2px,
|
text-shadow: rgba(57, 123, 4,1) 0 0 2px,rgba(57, 123, 4,1) 0 0 2px,rgba(57, 123, 4,1) 0 0 2px,
|
||||||
rgba(57, 123, 4,1) 0 0 2px,black 0 0 1px;
|
rgba(57, 123, 4,1) 0 0 2px,black 0 0 1px;
|
||||||
}
|
}
|
||||||
.player .identity[data-color="cai"],
|
.player .identity[data-color="cai"],
|
||||||
.player .identity[data-color="wei"],
|
.player .identity[data-color="wei"],
|
||||||
div[data-nature='water']{
|
div[data-nature='water'],
|
||||||
|
span[data-nature='water']{
|
||||||
text-shadow: rgba(78, 117, 140,1) 0 0 2px,rgba(78, 117, 140,1) 0 0 5px,rgba(78, 117, 140,1) 0 0 10px,
|
text-shadow: rgba(78, 117, 140,1) 0 0 2px,rgba(78, 117, 140,1) 0 0 5px,rgba(78, 117, 140,1) 0 0 10px,
|
||||||
rgba(78, 117, 140,1) 0 0 10px,rgba(78, 117, 140,1) 0 0 20px,rgba(78, 117, 140,1) 0 0 20px,black 0 0 1px;
|
rgba(78, 117, 140,1) 0 0 10px,rgba(78, 117, 140,1) 0 0 20px,rgba(78, 117, 140,1) 0 0 20px,black 0 0 1px;
|
||||||
}
|
}
|
||||||
div[data-nature='waterm']{
|
div[data-nature='waterm'],
|
||||||
|
span[data-nature='waterm']{
|
||||||
text-shadow: rgba(78, 117, 140,1) 0 0 2px,rgba(78, 117, 140,1) 0 0 5px,rgba(78, 117, 140,1) 0 0 5px,
|
text-shadow: rgba(78, 117, 140,1) 0 0 2px,rgba(78, 117, 140,1) 0 0 5px,rgba(78, 117, 140,1) 0 0 5px,
|
||||||
rgba(78, 117, 140,1) 0 0 5px,black 0 0 1px;
|
rgba(78, 117, 140,1) 0 0 5px,black 0 0 1px;
|
||||||
}div[data-nature='watermm']{
|
}
|
||||||
|
div[data-nature='watermm'],
|
||||||
|
span[data-nature='watermm']{
|
||||||
text-shadow: rgba(78, 117, 140,1) 0 0 2px,rgba(78, 117, 140,1) 0 0 2px,rgba(78, 117, 140,1) 0 0 2px,
|
text-shadow: rgba(78, 117, 140,1) 0 0 2px,rgba(78, 117, 140,1) 0 0 2px,rgba(78, 117, 140,1) 0 0 2px,
|
||||||
rgba(78, 117, 140,1) 0 0 2px,black 0 0 1px;
|
rgba(78, 117, 140,1) 0 0 2px,black 0 0 1px;
|
||||||
}
|
}
|
||||||
.player .identity[data-color="shu"],
|
.player .identity[data-color="shu"],
|
||||||
div[data-nature='soil']{
|
div[data-nature='soil'],
|
||||||
|
span[data-nature='soil']{
|
||||||
text-shadow: rgba(128, 59, 2,1) 0 0 2px,rgba(128, 59, 2,1) 0 0 5px,rgba(128, 59, 2,1) 0 0 10px,
|
text-shadow: rgba(128, 59, 2,1) 0 0 2px,rgba(128, 59, 2,1) 0 0 5px,rgba(128, 59, 2,1) 0 0 10px,
|
||||||
rgba(128, 59, 2,1) 0 0 10px,rgba(128, 59, 2,1) 0 0 20px,rgba(128, 59, 2,1) 0 0 20px,black 0 0 1px;
|
rgba(128, 59, 2,1) 0 0 10px,rgba(128, 59, 2,1) 0 0 20px,rgba(128, 59, 2,1) 0 0 20px,black 0 0 1px;
|
||||||
}
|
}
|
||||||
div[data-nature='soilm']{
|
div[data-nature='soilm'],
|
||||||
|
span[data-nature='soilm']{
|
||||||
text-shadow: rgba(128, 59, 2,1) 0 0 2px,rgba(128, 59, 2,1) 0 0 5px,rgba(128, 59, 2,1) 0 0 5px,
|
text-shadow: rgba(128, 59, 2,1) 0 0 2px,rgba(128, 59, 2,1) 0 0 5px,rgba(128, 59, 2,1) 0 0 5px,
|
||||||
rgba(128, 59, 2,1) 0 0 5px,black 0 0 1px;
|
rgba(128, 59, 2,1) 0 0 5px,black 0 0 1px;
|
||||||
}
|
}
|
||||||
div[data-nature='soilmm']{
|
div[data-nature='soilmm'],
|
||||||
|
span[data-nature='soilmm']{
|
||||||
text-shadow: rgba(128, 59, 2,1) 0 0 2px,rgba(128, 59, 2,1) 0 0 2px,rgba(128, 59, 2,1) 0 0 2px,
|
text-shadow: rgba(128, 59, 2,1) 0 0 2px,rgba(128, 59, 2,1) 0 0 2px,rgba(128, 59, 2,1) 0 0 2px,
|
||||||
rgba(128, 59, 2,1) 0 0 2px,black 0 0 1px;
|
rgba(128, 59, 2,1) 0 0 2px,black 0 0 1px;
|
||||||
}
|
}
|
||||||
.player .identity[data-color="unknownx"],
|
.player .identity[data-color="unknownx"],
|
||||||
div[data-nature='black']{
|
div[data-nature='black'],
|
||||||
|
span[data-nature='black']{
|
||||||
text-shadow: rgba(0,0,0,0.5) 0 0 2px,rgba(0,0,0,0.5) 0 0 5px,rgba(0,0,0,0.5) 0 0 10px,
|
text-shadow: rgba(0,0,0,0.5) 0 0 2px,rgba(0,0,0,0.5) 0 0 5px,rgba(0,0,0,0.5) 0 0 10px,
|
||||||
rgba(0,0,0,0.5) 0 0 10px,rgba(0,0,0,0.5) 0 0 20px,rgba(0,0,0,0.5) 0 0 20px,black 0 0 1px;
|
rgba(0,0,0,0.5) 0 0 10px,rgba(0,0,0,0.5) 0 0 20px,rgba(0,0,0,0.5) 0 0 20px,black 0 0 1px;
|
||||||
}
|
}
|
||||||
div[data-color="unknownm"]{
|
div[data-color="unknownm"],
|
||||||
|
span[data-color="unknownm"]{
|
||||||
text-shadow: rgba(0,0,0,0.5) 0 0 2px,rgba(0,0,0,0.2) 0 0 5px,rgba(0,0,0,0.2) 0 0 5px,
|
text-shadow: rgba(0,0,0,0.5) 0 0 2px,rgba(0,0,0,0.2) 0 0 5px,rgba(0,0,0,0.2) 0 0 5px,
|
||||||
rgba(0,0,0,0.2) 0 0 5px,black 0 0 1px;
|
rgba(0,0,0,0.2) 0 0 5px,black 0 0 1px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -263,7 +263,6 @@ mode.identity={
|
||||||
console.log(str);
|
console.log(str);
|
||||||
game.showIdentity();
|
game.showIdentity();
|
||||||
}
|
}
|
||||||
lib.config.ai_guess=true;
|
|
||||||
event.trigger('gameStart');
|
event.trigger('gameStart');
|
||||||
|
|
||||||
var players=get.players(lib.sort.position);
|
var players=get.players(lib.sort.position);
|
||||||
|
@ -802,6 +801,12 @@ mode.identity={
|
||||||
this.identityShown=true;
|
this.identityShown=true;
|
||||||
}
|
}
|
||||||
game.checkResult();
|
game.checkResult();
|
||||||
|
if(game.zhu.isZhu){
|
||||||
|
if(get.population('zhong')+get.population('nei')==0||
|
||||||
|
get.population('zhong')+get.population('fan')==0){
|
||||||
|
game.showIdentity();
|
||||||
|
}
|
||||||
|
}
|
||||||
if(this.identity=='fan'&&source) source.draw(3);
|
if(this.identity=='fan'&&source) source.draw(3);
|
||||||
else if(this.identity=='zhong'&&source&&source.identity=='zhu'&&source.isZhu){
|
else if(this.identity=='zhong'&&source&&source.identity=='zhu'&&source.isZhu){
|
||||||
source.discard(source.get('he'));
|
source.discard(source.get('he'));
|
||||||
|
@ -867,7 +872,11 @@ mode.identity={
|
||||||
else if(shown<0.4) c=0.5;
|
else if(shown<0.4) c=0.5;
|
||||||
else if(shown<0.6) c=0.8;
|
else if(shown<0.6) c=0.8;
|
||||||
else c=1;
|
else c=1;
|
||||||
effect+=ai.get.effect(targets[i],card,this)*c;
|
var eff=ai.get.effect(targets[i],card,this);
|
||||||
|
effect+=eff*c;
|
||||||
|
if(eff==0&&shown==0&&this.identity=='zhong'&&targets[i]!=this){
|
||||||
|
effect+=0.1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(effect>0){
|
if(effect>0){
|
||||||
|
@ -887,8 +896,9 @@ mode.identity={
|
||||||
if(this.ai.shown>0.95) this.ai.shown=0.95;
|
if(this.ai.shown>0.95) this.ai.shown=0.95;
|
||||||
if(this.ai.shown<-0.5) this.ai.shown=-0.5;
|
if(this.ai.shown<-0.5) this.ai.shown=-0.5;
|
||||||
|
|
||||||
if(this!=game.me&&get.config('auto_mark_identity')&&this.ai.identity_mark!='finished'){
|
var marknow=(this!=game.me&&get.config('auto_mark_identity')&&this.ai.identity_mark!='finished');
|
||||||
if(_status.clickingidentity&&_status.clickingidentity[0]==this){
|
if(true){
|
||||||
|
if(marknow&&_status.clickingidentity&&_status.clickingidentity[0]==this){
|
||||||
for(var i=0;i<_status.clickingidentity[1].length;i++){
|
for(var i=0;i<_status.clickingidentity[1].length;i++){
|
||||||
_status.clickingidentity[1][i].delete();
|
_status.clickingidentity[1][i].delete();
|
||||||
_status.clickingidentity[1][i].style.transform='';
|
_status.clickingidentity[1][i].style.transform='';
|
||||||
|
@ -927,28 +937,28 @@ mode.identity={
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(this.identity=='nei'){
|
if(this.identity=='nei'){
|
||||||
if(effect>=0){
|
if(effect>0){
|
||||||
if(this.ai.identity_mark=='fan'){
|
if(this.ai.identity_mark=='fan'){
|
||||||
this.setIdentity();
|
if(marknow) this.setIdentity();
|
||||||
this.ai.identity_mark='finished';
|
this.ai.identity_mark='finished';
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
this.setIdentity('zhong');
|
if(marknow) this.setIdentity('zhong');
|
||||||
this.ai.identity_mark='zhong';
|
this.ai.identity_mark='zhong';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else if(effect<0&&get.population('fan')>0){
|
||||||
if(this.ai.identity_mark=='zhong'){
|
if(this.ai.identity_mark=='zhong'){
|
||||||
this.setIdentity();
|
if(marknow) this.setIdentity();
|
||||||
this.ai.identity_mark='finished';
|
this.ai.identity_mark='finished';
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
this.setIdentity('fan');
|
if(marknow) this.setIdentity('fan');
|
||||||
this.ai.identity_mark='fan';
|
this.ai.identity_mark='fan';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else if(marknow){
|
||||||
if(effect>0&&this.identity!='fan'){
|
if(effect>0&&this.identity!='fan'){
|
||||||
this.setIdentity('zhong');
|
this.setIdentity('zhong');
|
||||||
this.ai.identity_mark='finished';
|
this.ai.identity_mark='finished';
|
||||||
|
@ -959,6 +969,7 @@ mode.identity={
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -980,7 +991,7 @@ mode.identity={
|
||||||
}
|
}
|
||||||
var difficulty=0;
|
var difficulty=0;
|
||||||
if(to==game.me) difficulty=2-get.difficulty();
|
if(to==game.me) difficulty=2-get.difficulty();
|
||||||
if(get.config('ai_identity')||from==to||!lib.config.ai_guess||(to.identityShown)){
|
if(from==to||to.identityShown){
|
||||||
return ai.get.realAttitude(from,to)+difficulty*1.5;
|
return ai.get.realAttitude(from,to)+difficulty*1.5;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
@ -992,11 +1003,23 @@ mode.identity={
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return ai.get.realAttitude(from,to)*to.ai.shown+difficulty*1.5;
|
var aishown=to.ai.shown;
|
||||||
|
if(to.identity=='nei'&&to.ai.shown<1&&(to.ai.identity_mark=='fan'||to.ai.identity_mark=='zhong')){
|
||||||
|
aishown=0.5;
|
||||||
|
}
|
||||||
|
else if(aishown==0&&to.identity!='fan'&&to.identity!='zhu'){
|
||||||
|
var fanshown=true;
|
||||||
|
for(var i=0;i<game.players.length;i++){
|
||||||
|
if(game.players[i].identity=='fan'&&game.players[i].ai.shown==0&&game.players[i]!=from){
|
||||||
|
fanshown=false;break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(fanshown) aishown=0.3;
|
||||||
|
}
|
||||||
|
return ai.get.realAttitude(from,to)*aishown+difficulty*1.5;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
realAttitude:function(from,to){
|
realAttitude:function(from,to){
|
||||||
// if(_status.currentPhase==from&&from.ai.tempIgnore&&from.ai.tempIgnore.contains(to)) return 0;
|
|
||||||
var situation=ai.get.situation();
|
var situation=ai.get.situation();
|
||||||
var identity=from.identity;
|
var identity=from.identity;
|
||||||
var identity2=to.identity;
|
var identity2=to.identity;
|
||||||
|
@ -1004,6 +1027,9 @@ mode.identity={
|
||||||
identity2='zhong';
|
identity2='zhong';
|
||||||
if(from==to) return 10;
|
if(from==to) return 10;
|
||||||
}
|
}
|
||||||
|
if(to.identity=='nei'&&to.ai.shown<1&&(to.ai.identity_mark=='fan'||to.ai.identity_mark=='zhong')){
|
||||||
|
identity2=to.ai.identity_mark;
|
||||||
|
}
|
||||||
var zhongmode=false;
|
var zhongmode=false;
|
||||||
if(!game.zhu.isZhu){
|
if(!game.zhu.isZhu){
|
||||||
zhongmode=true;
|
zhongmode=true;
|
||||||
|
@ -1150,8 +1176,12 @@ mode.identity={
|
||||||
if(situation==1) return -6;
|
if(situation==1) return -6;
|
||||||
if(situation>1) return -5;
|
if(situation>1) return -5;
|
||||||
}
|
}
|
||||||
return -10;
|
return -8;
|
||||||
case 'zhong': return -7;
|
case 'zhong':
|
||||||
|
if(!zhongmode&&game.zhu.hp>=3&&to.hp==1){
|
||||||
|
return -10;
|
||||||
|
}
|
||||||
|
return -7;
|
||||||
case 'mingzhong':return -5;
|
case 'mingzhong':return -5;
|
||||||
case 'nei':
|
case 'nei':
|
||||||
if(zhongmode&&to.ai.sizhong) return -7;
|
if(zhongmode&&to.ai.sizhong) return -7;
|
||||||
|
|
Loading…
Reference in New Issue