This commit is contained in:
libccy 2016-10-16 12:39:35 +08:00
parent e00fe6ff94
commit cfabbaad0f
11 changed files with 150 additions and 94 deletions

View File

@ -57,38 +57,55 @@ card.hearth={
zhaomingdan:{ zhaomingdan:{
fullskin:true, fullskin:true,
type:'trick', type:'trick',
chongzhu:true, enable:true,
enable:function(card,player){
for(var i=0;i<game.players.length;i++){
if(game.players[i]!=player&&game.players[i].num('j')) return true;
}
return false;
},
filterTarget:function(card,player,target){ filterTarget:function(card,player,target){
return player!=target&&target.num('j')>0; return player!=target&&target.num('hej')>0;
}, },
content:function(){ content:function(){
target.discard(target.get('j')); 'step 0'
if(target.num('hej')){
player.choosePlayerCard('hej','重铸'+get.translation(target)+'的一张牌',target,true).visible=true;
}
else{
event.goto(2);
}
'step 1'
if(result.bool){
target.$throw(result.links,1000);
target.lose(result.links);
game.delay(0.5);
}
'step 2'
target.draw(false);
target.$draw();
game.delay(0.5);
'step 3'
player.draw(); player.draw();
}, },
ai:{ ai:{
order:9.5, order:9.5,
value:1, value:6,
useful:3,
result:{ result:{
target:function(player,target){ target:function(player,target){
var es=target.get('e');
var nh=target.num('h');
var noe=(es.length==0||target.hasSkillTag('noe'));
var noe2=(es.length==1&&es[0].name=='baiyin'&&target.hp<target.maxHp);
var noh=(nh==0||target.hasSkillTag('noh'));
if(noh&&noe) return 0;
if(noh&&noe2) return 0.01;
if(ai.get.attitude(player,target)<=0) return (target.num('he'))?-1.5:1.5;
var js=target.get('j'); var js=target.get('j');
var num=0; if(js.length){
for(var i=0;i<js.length;i++){ var jj=js[0].viewAs?{name:js[0].viewAs}:js[0];
var jj=js[i].viewAs?{name:js[i].viewAs}:js[i]; if(jj.name=='guohe') return 3;
if(jj.name=='zhaomingdan') num++; if(js.length==1&&ai.get.effect(target,jj,target,player)>=0){
else if(js.length==1&&ai.get.effect(target,jj,target,target)>=0){ return -1.5;
num--;
} }
else{ return 3;
num++;
} }
} return -1.5;
return num;
} }
} }
} }
@ -670,7 +687,7 @@ card.hearth={
shijieshu:'视界术', shijieshu:'视界术',
shijieshu_info:'目标随机装备牌堆中的两张装备牌,然后弃置一张手牌', shijieshu_info:'目标随机装备牌堆中的两张装备牌,然后弃置一张手牌',
zhaomingdan:'照明弹', zhaomingdan:'照明弹',
zhaomingdan_info:'弃置一名其他角色判定区内的所有牌,然后摸一张牌', zhaomingdan_info:'观看一名其他角色的手牌,并重置其区域内的一张牌,然后摸一张牌',
jihuocard:'激活', jihuocard:'激活',
jihuocard_info:'跳过本回合的弃牌阶段,摸一张牌', jihuocard_info:'跳过本回合的弃牌阶段,摸一张牌',
}, },
@ -688,8 +705,8 @@ card.hearth={
['club',3,'shandianjian','thunder'], ['club',3,'shandianjian','thunder'],
['spade',1,'shandianjian','thunder'], ['spade',1,'shandianjian','thunder'],
['spade',7,'shijieshu'], ['spade',7,'shijieshu'],
// ['diamond',5,'zhaomingdan'], ['diamond',5,'zhaomingdan'],
// ['heart',10,'zhaomingdan'], ['heart',10,'zhaomingdan'],
['diamond',2,'jihuocard'], ['diamond',2,'jihuocard'],
['diamond',1,'linghunzhihuo'], ['diamond',1,'linghunzhihuo'],
], ],

View File

@ -277,6 +277,7 @@ card.swd={
player.draw(); player.draw();
}, },
ai:{ ai:{
value:6,
result:{ result:{
target:1 target:1
}, },
@ -724,7 +725,14 @@ card.swd={
useful:6, useful:6,
value:6, value:6,
result:{ result:{
player:1 player:function(){
var cardname=_status.event.cardname;
if(cardname=='tiesuo') return 0;
if(cardname=='jiu') return 0;
if(cardname=='tianxianjiu') return 0;
if(cardname=='toulianghuanzhu') return 0;
return 1;
}
}, },
} }
}, },
@ -1775,13 +1783,7 @@ card.swd={
var mod=game.checkMod(card,player,'unchanged','cardEnabled',player.get('s')); var mod=game.checkMod(card,player,'unchanged','cardEnabled',player.get('s'));
if(mod!='unchanged') return mod; if(mod!='unchanged') return mod;
return true; return true;
},trigger.player,-1).set('ai',function(){ },trigger.player,-1).set('cardname',trigger.card.name).targetRequired=true;
if(trigger.card.name=='tiesuo') return 0;
if(trigger.card.name=='jiu') return 0;
if(trigger.card.name=='tianxianjiu') return 0;
if(trigger.card.name=='toulianghuanzhu') return 0;
return 1;
}).targetRequired=true;
'step 1' 'step 1'
delete player.storage.shenmiguo; delete player.storage.shenmiguo;
} }

View File

@ -9,7 +9,7 @@ character.swd={
// swd_miles:['male','qun',4,['aojian','miles_xueyi','mohua2']], // swd_miles:['male','qun',4,['aojian','miles_xueyi','mohua2']],
swd_nicole:['female','qun',3,['huanjian','lingwu','minjing']], swd_nicole:['female','qun',3,['huanjian','lingwu','minjing']],
swd_wangsiyue:['female','wei',3,['duishi','biyue']], swd_wangsiyue:['female','wei',3,['duishi','biyue']],
swd_weida:['female','qun',3,['yueren','zhenlie']], swd_weida:['female','qun',3,['yueren','duijue']],
swd_xuanyuanjianxian:['male','qun',4,['pozhou','huajian']], swd_xuanyuanjianxian:['male','qun',4,['pozhou','huajian']],
swd_chenjingchou:['male','wu',3,['youyin','yihua']], swd_chenjingchou:['male','wu',3,['youyin','yihua']],
@ -7039,7 +7039,10 @@ character.swd={
}, },
duijue:{ duijue:{
enable:'phaseUse', enable:'phaseUse',
usable:1, mark:true,
unique:true,
forceunique:true,
skillAnimation:true,
filter:function(event,player){ filter:function(event,player){
return !player.storage.duijue; return !player.storage.duijue;
}, },
@ -7047,38 +7050,95 @@ character.swd={
return player!=target&&target!=game.zhu; return player!=target&&target!=game.zhu;
}, },
content:function(){ content:function(){
var players=game.players.concat(game.dead);
players.remove(player);
players.remove(target);
for(var i=0;i<players.length;i++){
players[i].classList.add('out');
players[i].storage.duijue2=true;
}
player.addSkill('duijue2');
target.addSkill('duijue2');
player.storage.duijue=true; player.storage.duijue=true;
player.unmarkSkill('duijue');
var evt=_status.event;
for(var i=0;i<10;i++){
if(evt&&evt.getParent){
evt=evt.getParent();
}
if(evt.name=='phaseUse'){
evt.skipped=true;
break;
}
}
player.storage.duijue3=target;
player.addSkill('duijue3');
}, },
init:function(player){ init:function(player){
player.storage.duijue=false; player.storage.duijue=false;
}, },
intro:{ intro:{
content:'limited' content:'limited'
},
ai:{
order:1,
result:{
target:function(player,target){
if(target.hp==1&&player.hp>=3) return -1;
if(target.hp<player.hp&&target.num('h')<=player.num('h')) return -1;
return 0;
}
}
} }
}, },
duijue2:{ duijue3:{
trigger:{global:'dieAfter'}, trigger:{player:'phaseAfter'},
forced:true, forced:true,
popup:false, popup:false,
content:function(){ content:function(){
var players=game.players.concat(game.dead); 'step 0'
for(var i=0;i<players.length;i++){ event.target=player.storage.duijue3;
if(players[i].storage.duijue2&&players[i].isOut()){ delete player.storage.duijue3;
players[i].classList.remove('out'); player.removeSkill('duijue3');
delete players[i].storage.duijue2; for(var i=0;i<game.players.length;i++){
} if(game.players[i]!=player&&game.players[i]!=event.target){
players[i].removeSkill('duijue2'); game.players[i].addSkill('duijue2');
} }
} }
'step 1'
target.phase();
'step 2'
if(target.isAlive()){
player.phase();
}
else{
event.goto(4);
}
'step 3'
if(target.isAlive()){
event.goto(1);
}
'step 4'
for(var i=0;i<game.players.length;i++){
if(game.players[i]!=player&&game.players[i]!=target){
game.players[i].removeSkill('duijue2');
}
}
}
},
duijue2:{
mod:{
cardEnabled:function(){
return false;
},
cardSavable:function(){
return false;
},
targetEnabled:function(){
return false;
}
},
init:function(player){
player.classList.add('transparent');
},
onremove:function(player){
player.classList.remove('transparent');
},
intro:{
content:'不计入距离的计算且不能使用牌且不是牌的合法目标'
},
group:'undist'
}, },
yueren:{ yueren:{
trigger:{player:'shaBegin'}, trigger:{player:'shaBegin'},
@ -8432,7 +8492,7 @@ character.swd={
xuying_info:'锁定技,每当你即将受到伤害,你防止此伤害,若你此时有手牌,你流失一点体力', xuying_info:'锁定技,每当你即将受到伤害,你防止此伤害,若你此时有手牌,你流失一点体力',
yinguo_info:'除你之外的任意一名角色即将受到受到伤害时,若有伤害来源,你可以弃置一张牌将伤害来源和目标对调', yinguo_info:'除你之外的任意一名角色即将受到受到伤害时,若有伤害来源,你可以弃置一张牌将伤害来源和目标对调',
yueren_info:'每当你使用一张杀,可以进行一次判定,若结果为黑色,你弃置目标一张牌,若结果为红色,你将此杀收回,每回合限发动一次', yueren_info:'每当你使用一张杀,可以进行一次判定,若结果为黑色,你弃置目标一张牌,若结果为红色,你将此杀收回,每回合限发动一次',
duijue_info:'限定技,出牌阶段,你可以指定一名角色与其单挑,直到一方死亡为止', duijue_info:'限定技,出牌阶段,你可以指定一名非主公的其他角色,你结束出牌阶段,然后该角色与你轮流进行回合,直到一方死亡为止;在此之前,所有其他角色不计入距离的计算且不能使用牌且不是牌的合法目标',
wuying_info:'锁定技你的杀和单体x锦囊目标锁定为范围内的所有角色', wuying_info:'锁定技你的杀和单体x锦囊目标锁定为范围内的所有角色',
xiehun_info:'锁定技,受到来自你伤害的角色进入混乱状态,行为不受控制,且会攻击队友,直到你的下一回合开始', xiehun_info:'锁定技,受到来自你伤害的角色进入混乱状态,行为不受控制,且会攻击队友,直到你的下一回合开始',
jumo_info:'锁定技回合结束阶段你摸X-1张牌X为未进入混乱状态的角色数与进入混乱状态的角色数之差若为双将则改为X', jumo_info:'锁定技回合结束阶段你摸X-1张牌X为未进入混乱状态的角色数与进入混乱状态的角色数之差若为双将则改为X',

View File

@ -32969,6 +32969,13 @@
} }
}, },
get:{ get:{
attitude:function(from,to){
if(!from||!to) return 0;
var att=ai.get.rawAttitude.apply(this,arguments);
if(from.isMad()) return -att;
if(to.isMad()) return 0;
return att;
},
useful:function(card){ useful:function(card){
if(get.position(card)=='j') return -1; if(get.position(card)=='j') return -1;
if(get.position(card)=='e') return ai.get.equipValue(card); if(get.position(card)=='e') return ai.get.equipValue(card);

View File

@ -38,5 +38,13 @@ window.noname_update={
// 'character/ow.js', // 'character/ow.js',
// 'character/sp.js', // 'character/sp.js',
// 'character/swd.js',
// 'character/rank.js', // 'character/rank.js',
// 'card/swd.js', // 'card/swd.js',
// 'card/hearth.js',
// 'mode/boss.js',
// 'mode/chess.js',
// 'mode/guozhan.js',
// 'mode/identity.js',
// 'mode/stone.js',
// 'mode/versus.js',

View File

@ -3023,16 +3023,8 @@ mode.boss={
}, },
ai:{ ai:{
get:{ get:{
attitude:function(from,to){ rawAttitude:function(from,to){
if(!from||!to) return 0; return (from.side===to.side?6:-6);
var t=(from.side===to.side?1:-1);
if(from.isMad()){
t=-t;
}
else if(to.isMad()){
t=0;
}
return 6*t;
} }
} }
}, },

View File

@ -5257,16 +5257,8 @@ mode.chess={
}, },
ai:{ ai:{
get:{ get:{
attitude:function(from,to){ rawAttitude:function(from,to){
if(!from||!to) return 0; return (from.side===to.side?6:-6);
var t=(from.side===to.side?1:-1);
if(from.isMad()){
t=-t;
}
else if(to.isMad()){
t=0;
}
return 6*t;
} }
} }
}, },

View File

@ -1258,13 +1258,7 @@ mode.guozhan={
if(to_p<max-1) return 0; if(to_p<max-1) return 0;
return -0.5; return -0.5;
}, },
attitude:function(from){
var att=ai.get.rawAttitude.apply(this,arguments);
if(from&&from.isMad()) return -att;
return att;
},
rawAttitude:function(from,to){ rawAttitude:function(from,to){
if(!from||!to) return 0;
if(to.identity=='unknown'&&game.players.length==2) return -5; if(to.identity=='unknown'&&game.players.length==2) return -5;
if(_status.currentPhase==from&&from.ai.tempIgnore&& if(_status.currentPhase==from&&from.ai.tempIgnore&&
from.ai.tempIgnore.contains(to)&&to.identity=='unknown'&& from.ai.tempIgnore.contains(to)&&to.identity=='unknown'&&

View File

@ -1433,13 +1433,7 @@ mode.identity={
}, },
ai:{ ai:{
get:{ get:{
attitude:function(from){
var att=ai.get.rawAttitude.apply(this,arguments);
if(from&&from.isMad()) return -att;
return att;
},
rawAttitude:function(from,to){ rawAttitude:function(from,to){
if(!from||!to) return 0;
var x=0,num=0,temp,i; var x=0,num=0,temp,i;
if(_status.ai.customAttitude){ if(_status.ai.customAttitude){
for(i=0;i<_status.ai.customAttitude.length;i++){ for(i=0;i<_status.ai.customAttitude.length;i++){

View File

@ -10159,8 +10159,7 @@ mode.stone={
}, },
ai:{ ai:{
get:{ get:{
attitude:function(from,to){ rawAttitude:function(from,to){
if(!from||!to) return 0;
var num; var num;
if(to.isMin()&&!to.hasSkill('chaofeng')){ if(to.isMin()&&!to.hasSkill('chaofeng')){
num=5; num=5;
@ -10168,9 +10167,6 @@ mode.stone={
else{ else{
num=6; num=6;
} }
if(from&&from.isMad()){
num=-num;
}
return num*(from.side==to.side?1:-1); return num*(from.side==to.side?1:-1);
} }
} }

View File

@ -3970,13 +3970,7 @@ mode.versus={
}, },
ai:{ ai:{
get:{ get:{
attitude:function(from){
var att=ai.get.rawAttitude.apply(this,arguments);
if(from&&from.isMad()) return -att;
return att;
},
rawAttitude:function(from,to){ rawAttitude:function(from,to){
if(!from||!to) return 0;
if(from.side==to.side){ if(from.side==to.side){
if(to.identity=='zhu'){ if(to.identity=='zhu'){
if(_status.connectMode){ if(_status.connectMode){