This commit is contained in:
parent
de56fd31fe
commit
9795055550
|
@ -170,19 +170,16 @@ card.guozhan={
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
skill:{
|
skill:{
|
||||||
wuliu_skill:{
|
wuliu_skill:{},
|
||||||
global:'wuliu_skill2'
|
_wuliu_skill2:{
|
||||||
},
|
|
||||||
wuliu_skill2:{
|
|
||||||
mod:{
|
mod:{
|
||||||
attackFrom:function(from,to,distance){
|
attackFrom:function(from,to,distance){
|
||||||
for(var i=0;i<game.players.length;i++){
|
for(var i=0;i<game.players.length;i++){
|
||||||
if(game.players[i]==from) continue;
|
if(game.players[i]==from) continue;
|
||||||
if(game.players[i].identity=='unknown'||game.players[i].identity=='ye') continue;
|
if(game.players[i].identity=='unknown'||game.players[i].identity=='ye') continue;
|
||||||
if(game.players[i].identity!=from.identity) continue;
|
if(game.players[i].identity!=from.identity) continue;
|
||||||
if(game.players[i].skills.contains('wuliu')) distance--;
|
if(game.players[i].get('s').contains('wuliu_skill')) distance--;
|
||||||
}
|
}
|
||||||
if(from.skills.contains('wuliu')) distance--;
|
|
||||||
return distance;
|
return distance;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -235,7 +232,7 @@ card.guozhan={
|
||||||
yiyi_info:'对与自己势力相同的所有角色使用,摸两张牌然后弃置两张牌(非国战模式改为对自己使用,摸3张弃两张)',
|
yiyi_info:'对与自己势力相同的所有角色使用,摸两张牌然后弃置两张牌(非国战模式改为对自己使用,摸3张弃两张)',
|
||||||
yiyi_bg:'逸',
|
yiyi_bg:'逸',
|
||||||
wuliu:'吴六剑',
|
wuliu:'吴六剑',
|
||||||
wuliu_info:'与装备者势力相同的角色攻击范围+1',
|
wuliu_info:'其他与装备者势力相同的角色攻击范围+1',
|
||||||
sanjian:'三尖两刃刀',
|
sanjian:'三尖两刃刀',
|
||||||
sanjian_info:'当你使用杀造成伤害后,可以弃置1张手牌对一名距离受伤害角色1以内的其他角色造成1点伤害',
|
sanjian_info:'当你使用杀造成伤害后,可以弃置1张手牌对一名距离受伤害角色1以内的其他角色造成1点伤害',
|
||||||
wuliu_skill:'吴六剑',
|
wuliu_skill:'吴六剑',
|
||||||
|
|
|
@ -2482,7 +2482,7 @@ character.boss={
|
||||||
if(event.target){
|
if(event.target){
|
||||||
var es=event.target.get('e');
|
var es=event.target.get('e');
|
||||||
if(es.length){
|
if(es.length){
|
||||||
event.discard(es);
|
event.target.discard(es);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -267,7 +267,6 @@ character.sp={
|
||||||
prepare:function(cards,player,targets){
|
prepare:function(cards,player,targets){
|
||||||
player.$give(cards,targets[0]);
|
player.$give(cards,targets[0]);
|
||||||
},
|
},
|
||||||
line:'green',
|
|
||||||
content:function(){
|
content:function(){
|
||||||
if(target.skills.contains('yanxiao2')&&target.storage.yanxiao2){
|
if(target.skills.contains('yanxiao2')&&target.storage.yanxiao2){
|
||||||
target.storage.yanxiao2.push(cards[0]);
|
target.storage.yanxiao2.push(cards[0]);
|
||||||
|
@ -1524,7 +1523,7 @@ character.sp={
|
||||||
var tosave=trigger.player;
|
var tosave=trigger.player;
|
||||||
var att=ai.get.attitude(target,tosave);
|
var att=ai.get.attitude(target,tosave);
|
||||||
var hastao=target.num('h','tao');
|
var hastao=target.num('h','tao');
|
||||||
target.chooseToDiscard(4,true).ai=function(card){
|
target.chooseToDiscard(4,true,'he').ai=function(card){
|
||||||
if(!hastao&&att>0){
|
if(!hastao&&att>0){
|
||||||
var suit=get.suit(card);
|
var suit=get.suit(card);
|
||||||
for(var i=0;i<ui.selected.cards.length;i++){
|
for(var i=0;i<ui.selected.cards.length;i++){
|
||||||
|
@ -1604,7 +1603,8 @@ character.sp={
|
||||||
},
|
},
|
||||||
mozhix:{
|
mozhix:{
|
||||||
filterCard:true,
|
filterCard:true,
|
||||||
selectCard:1
|
selectCard:1,
|
||||||
|
popname:true,
|
||||||
},
|
},
|
||||||
mozhi2:{
|
mozhi2:{
|
||||||
trigger:{player:'phaseAfter'},
|
trigger:{player:'phaseAfter'},
|
||||||
|
|
|
@ -1627,9 +1627,33 @@ character.yijiang={
|
||||||
ui.cardPile.insertBefore(event.card,ui.cardPile.firstChild);
|
ui.cardPile.insertBefore(event.card,ui.cardPile.firstChild);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
group:['huomo_sha','huomo_jiu','huomo_tao']
|
group:['huomo_count','huomo_count2','huomo_sha','huomo_jiu','huomo_tao']
|
||||||
},
|
},
|
||||||
huomo2:{},
|
huomo2:{},
|
||||||
|
huomo_count:{
|
||||||
|
init:function(player){
|
||||||
|
player.storage.huomo={};
|
||||||
|
},
|
||||||
|
trigger:{global:'phaseBegin'},
|
||||||
|
forced:true,
|
||||||
|
popup:false,
|
||||||
|
silent:true,
|
||||||
|
content:function(){
|
||||||
|
player.storage.huomo={};
|
||||||
|
}
|
||||||
|
},
|
||||||
|
huomo_count2:{
|
||||||
|
trigger:{player:'useCard'},
|
||||||
|
forced:true,
|
||||||
|
popup:false,
|
||||||
|
silent:true,
|
||||||
|
content:function(){
|
||||||
|
switch(trigger.card.name){
|
||||||
|
case 'sha':player.storage.huomo.sha=true;break;
|
||||||
|
case 'tao':player.storage.huomo.tao=true;break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
huomo_sha:{
|
huomo_sha:{
|
||||||
enable:'phaseUse',
|
enable:'phaseUse',
|
||||||
discard:false,
|
discard:false,
|
||||||
|
@ -1637,10 +1661,10 @@ character.yijiang={
|
||||||
player.$throw(cards);
|
player.$throw(cards);
|
||||||
},
|
},
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
|
if(player.storage.huomo.sha) return false;
|
||||||
if(!lib.filter.filterCard({name:'sha'},player,event)){
|
if(!lib.filter.filterCard({name:'sha'},player,event)){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(player.getStat().card.sha) return false;
|
|
||||||
var hs=player.get('he',{color:'black'});
|
var hs=player.get('he',{color:'black'});
|
||||||
for(var i=0;i<hs.length;i++){
|
for(var i=0;i<hs.length;i++){
|
||||||
if(get.type(hs[i])!='basic'){
|
if(get.type(hs[i])!='basic'){
|
||||||
|
@ -1678,16 +1702,13 @@ character.yijiang={
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
huomo_tao:{
|
huomo_tao:{
|
||||||
enable:'phaseUse',
|
enable:'chooseToUse',
|
||||||
discard:false,
|
discard:false,
|
||||||
prepare:function(cards,player){
|
prepare:function(cards,player){
|
||||||
player.$throw(cards);
|
player.$throw(cards);
|
||||||
},
|
},
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
if(!lib.filter.filterCard({name:'tao'},player,event)){
|
if(player.storage.huomo.tao) return false;
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if(player.getStat().card.tao) return false;
|
|
||||||
var hs=player.get('he',{color:'black'});
|
var hs=player.get('he',{color:'black'});
|
||||||
for(var i=0;i<hs.length;i++){
|
for(var i=0;i<hs.length;i++){
|
||||||
if(get.type(hs[i])!='basic'){
|
if(get.type(hs[i])!='basic'){
|
||||||
|
@ -1695,6 +1716,13 @@ character.yijiang={
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(i==hs.length) return false;
|
if(i==hs.length) return false;
|
||||||
|
if(event.type=='dying'){
|
||||||
|
return event.filterCard({name:'tao'},player);
|
||||||
|
}
|
||||||
|
if(event.parent.name!='phaseUse') return false;
|
||||||
|
if(!lib.filter.filterCard({name:'tao'},player,event)){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
return player.hp<player.maxHp;
|
return player.hp<player.maxHp;
|
||||||
},
|
},
|
||||||
position:'he',
|
position:'he',
|
||||||
|
@ -1702,6 +1730,9 @@ character.yijiang={
|
||||||
return get.type(card)!='basic'&&get.color(card)=='black';
|
return get.type(card)!='basic'&&get.color(card)=='black';
|
||||||
},
|
},
|
||||||
filterTarget:function(card,player,target){
|
filterTarget:function(card,player,target){
|
||||||
|
if(_status.event.type=='dying'){
|
||||||
|
return target==_status.event.dying;
|
||||||
|
}
|
||||||
return player==target;
|
return player==target;
|
||||||
},
|
},
|
||||||
selectTarget:-1,
|
selectTarget:-1,
|
||||||
|
@ -1714,6 +1745,18 @@ character.yijiang={
|
||||||
player.useCard({name:'tao'},targets).delayx=false;
|
player.useCard({name:'tao'},targets).delayx=false;
|
||||||
},
|
},
|
||||||
ai:{
|
ai:{
|
||||||
|
skillTagFilter:function(player){
|
||||||
|
if(player.storage.huomo.tao) return false;
|
||||||
|
var hs=player.get('he',{color:'black'});
|
||||||
|
for(var i=0;i<hs.length;i++){
|
||||||
|
if(get.type(hs[i])!='basic'){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
threaten:1.5,
|
||||||
|
save:true,
|
||||||
order:9,
|
order:9,
|
||||||
result:{
|
result:{
|
||||||
target:function(player,target){
|
target:function(player,target){
|
||||||
|
@ -1824,6 +1867,7 @@ character.yijiang={
|
||||||
owner.lose(card,ui.special);
|
owner.lose(card,ui.special);
|
||||||
}
|
}
|
||||||
event.card=card;
|
event.card=card;
|
||||||
|
player.$throw(card);
|
||||||
'step 1'
|
'step 1'
|
||||||
player.useCard(event.card,targets).animate=false;
|
player.useCard(event.card,targets).animate=false;
|
||||||
delete player.storage.taoxi;
|
delete player.storage.taoxi;
|
||||||
|
@ -4486,7 +4530,8 @@ character.yijiang={
|
||||||
qice2:{
|
qice2:{
|
||||||
filterCard:true,
|
filterCard:true,
|
||||||
selectCard:-1,
|
selectCard:-1,
|
||||||
audio:2
|
audio:2,
|
||||||
|
popname:true
|
||||||
},
|
},
|
||||||
qice3:{
|
qice3:{
|
||||||
trigger:{player:'useCardBefore'},
|
trigger:{player:'useCardBefore'},
|
||||||
|
|
|
@ -1809,6 +1809,7 @@ character.yxs={
|
||||||
},
|
},
|
||||||
jieyong2:{
|
jieyong2:{
|
||||||
filterCard:{suit:'heart'},
|
filterCard:{suit:'heart'},
|
||||||
|
popname:true,
|
||||||
},
|
},
|
||||||
jieyong3:{
|
jieyong3:{
|
||||||
trigger:{player:'useCardBefore'},
|
trigger:{player:'useCardBefore'},
|
||||||
|
|
12
game/game.js
12
game/game.js
|
@ -16,9 +16,9 @@
|
||||||
dieClose:[]
|
dieClose:[]
|
||||||
};
|
};
|
||||||
var lib={
|
var lib={
|
||||||
version:1.78,
|
version:1.79,
|
||||||
changeLog:[
|
changeLog:[
|
||||||
'修bug',
|
'自动标身份',
|
||||||
],
|
],
|
||||||
configprefix:'noname_0.9_',
|
configprefix:'noname_0.9_',
|
||||||
updates:[],
|
updates:[],
|
||||||
|
@ -1686,6 +1686,10 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
auto_mark_identity:{
|
||||||
|
name:'自动标记身份',
|
||||||
|
init:false
|
||||||
|
},
|
||||||
ban_weak:{
|
ban_weak:{
|
||||||
name:'屏蔽弱将',
|
name:'屏蔽弱将',
|
||||||
init:false,
|
init:false,
|
||||||
|
@ -4216,8 +4220,10 @@
|
||||||
cardaudio=false;
|
cardaudio=false;
|
||||||
}
|
}
|
||||||
player.logSkill(event.skill);
|
player.logSkill(event.skill);
|
||||||
|
if(get.info(event.skill).popname){
|
||||||
player.popup(event.card.name);
|
player.popup(event.card.name);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if(lib.config.show_card_prompt){
|
else if(lib.config.show_card_prompt){
|
||||||
if(get.type(event.card)=='equip'&&lib.config.hide_card_prompt_equip);
|
if(get.type(event.card)=='equip'&&lib.config.hide_card_prompt_equip);
|
||||||
else if(get.type(event.card)=='basic'&&lib.config.hide_card_prompt_basic);
|
else if(get.type(event.card)=='basic'&&lib.config.hide_card_prompt_basic);
|
||||||
|
@ -4471,7 +4477,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if((info.line||info.discard!=false)&&targets.length){
|
if(info.line!=false&&targets.length){
|
||||||
var config={};
|
var config={};
|
||||||
if(info.line=='fire'){
|
if(info.line=='fire'){
|
||||||
config.color='fire';
|
config.color='fire';
|
||||||
|
|
|
@ -886,6 +886,79 @@ mode.identity={
|
||||||
if(this!=game.me) this.ai.shown*=2;
|
if(this!=game.me) this.ai.shown*=2;
|
||||||
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'){
|
||||||
|
if(_status.clickingidentity&&_status.clickingidentity[0]==this){
|
||||||
|
for(var i=0;i<_status.clickingidentity[1].length;i++){
|
||||||
|
_status.clickingidentity[1][i].delete();
|
||||||
|
_status.clickingidentity[1][i].style.transform='';
|
||||||
|
}
|
||||||
|
delete _status.clickingidentity;
|
||||||
|
}
|
||||||
|
if(!Array.isArray(targets)){
|
||||||
|
targets=[];
|
||||||
|
}
|
||||||
|
var effect=0,c,shown;
|
||||||
|
var zhu=game.zhu;
|
||||||
|
if(_status.mode=='zhong'&&!game.zhu.isZhu){
|
||||||
|
zhu=game.zhong;
|
||||||
|
}
|
||||||
|
if(targets.length==1&&targets[0]==this){
|
||||||
|
effect=0;
|
||||||
|
}
|
||||||
|
else if(this.identity!='nei'){
|
||||||
|
if(this.ai.shown>0){
|
||||||
|
if(this.identity=='fan'){
|
||||||
|
effect=-1;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
effect=1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(targets.length>0){
|
||||||
|
for(var i=0;i<targets.length;i++){
|
||||||
|
shown=Math.abs(targets[i].ai.shown);
|
||||||
|
if(shown<0.2||targets[i].identity=='nei') c=0;
|
||||||
|
else if(shown<0.4) c=0.5;
|
||||||
|
else if(shown<0.6) c=0.8;
|
||||||
|
else c=1;
|
||||||
|
effect+=ai.get.effect(targets[i],card,this,zhu)*c;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(this.identity=='nei'){
|
||||||
|
if(effect>=0){
|
||||||
|
if(this.ai.identity_mark=='fan'){
|
||||||
|
this.setIdentity();
|
||||||
|
this.ai.identity_mark='finished';
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.setIdentity('zhong');
|
||||||
|
this.ai.identity_mark='zhong';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
if(this.ai.identity_mark=='zhong'){
|
||||||
|
this.setIdentity();
|
||||||
|
this.ai.identity_mark='finished';
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.setIdentity('fan');
|
||||||
|
this.ai.identity_mark='fan';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
if(effect>0&&this.identity!='fan'){
|
||||||
|
this.setIdentity('zhong');
|
||||||
|
this.ai.identity_mark='finished';
|
||||||
|
}
|
||||||
|
else if(effect<0&&this.identity=='fan'){
|
||||||
|
this.setIdentity('fan');
|
||||||
|
this.ai.identity_mark='finished';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -942,6 +1015,7 @@ mode.identity={
|
||||||
case 'zhong':case 'mingzhong': return 6;
|
case 'zhong':case 'mingzhong': return 6;
|
||||||
case 'nei':
|
case 'nei':
|
||||||
if(game.players.length==2) return -10;
|
if(game.players.length==2) return -10;
|
||||||
|
if(zhongmode&&to.ai.sizhong) return 6;
|
||||||
if(get.population('fan')==0) return -0.5;
|
if(get.population('fan')==0) return -0.5;
|
||||||
if(situation>1) return 0;
|
if(situation>1) return 0;
|
||||||
return Math.min(3,get.population('fan'));
|
return Math.min(3,get.population('fan'));
|
||||||
|
@ -953,6 +1027,7 @@ mode.identity={
|
||||||
case 'zhu': return 10;
|
case 'zhu': return 10;
|
||||||
case 'zhong':case 'mingzhong': return 4;
|
case 'zhong':case 'mingzhong': return 4;
|
||||||
case 'nei':
|
case 'nei':
|
||||||
|
if(zhongmode&&to.ai.sizhong) return 6;
|
||||||
if(get.population('fan')==0) return -2;
|
if(get.population('fan')==0) return -2;
|
||||||
return Math.min(3,-situation);
|
return Math.min(3,-situation);
|
||||||
case 'fan': return -8;
|
case 'fan': return -8;
|
||||||
|
@ -1008,6 +1083,12 @@ mode.identity={
|
||||||
if(strategy==3) num++;
|
if(strategy==3) num++;
|
||||||
return num;
|
return num;
|
||||||
case 'mingzhong':
|
case 'mingzhong':
|
||||||
|
if(zhongmode){
|
||||||
|
if(from.ai.sizhong==undefined){
|
||||||
|
from.ai.sizhong=(Math.random()<0.5);
|
||||||
|
}
|
||||||
|
if(from.ai.sizhong) return 6;
|
||||||
|
}
|
||||||
if(strategy==5) return Math.min(0,-situation);
|
if(strategy==5) return Math.min(0,-situation);
|
||||||
if(strategy==6) return Math.max(-1,-situation);
|
if(strategy==6) return Math.max(-1,-situation);
|
||||||
if(get.population('fan')==0) num=-5;
|
if(get.population('fan')==0) num=-5;
|
||||||
|
@ -1044,6 +1125,7 @@ mode.identity={
|
||||||
case 'zhong': return -7;
|
case 'zhong': return -7;
|
||||||
case 'mingzhong':return -5;
|
case 'mingzhong':return -5;
|
||||||
case 'nei':
|
case 'nei':
|
||||||
|
if(zhongmode&&to.ai.sizhong) return -7;
|
||||||
if(get.population('fan')==1) return 0;
|
if(get.population('fan')==1) return 0;
|
||||||
if(get.population('zhong')+get.population('mingzhong')==0) return -7;
|
if(get.population('zhong')+get.population('mingzhong')==0) return -7;
|
||||||
if(game.zhu&&game.zhu.hp<=2) return -1;
|
if(game.zhu&&game.zhu.hp<=2) return -1;
|
||||||
|
|
Loading…
Reference in New Issue