This commit is contained in:
libccy 2017-02-03 23:46:54 +08:00
parent c9353c4cf0
commit f1a0595244
5 changed files with 160 additions and 12 deletions

View File

@ -16,8 +16,8 @@ character.hearth={
hs_magni:['male','shu',4,['zhongjia','dunji']], hs_magni:['male','shu',4,['zhongjia','dunji']],
hs_liadrin:['female','shu',4,['xueren']], hs_liadrin:['female','shu',4,['xueren']],
hs_morgl:['male','wu',3,['s_tuteng']], hs_morgl:['male','wu',3,['s_tuteng']],
// hs_khadgar:['male','shu',3,['s_tuteng']], hs_khadgar:['male','shu',3,['s_tuteng']],
// hs_tyrande:['female','wei',3,['yuelu','xingluo']], hs_tyrande:['female','wei',3,['yuelu','xingluo']],
hs_neptulon:['male','wu',4,['liechao','qingliu']], hs_neptulon:['male','wu',4,['liechao','qingliu']],
hs_wvelen:['male','qun',3,['shengyan','xianzhi']], hs_wvelen:['male','qun',3,['shengyan','xianzhi']],
@ -98,6 +98,102 @@ character.hearth={
hs_malfurion:['hs_malorne'], hs_malfurion:['hs_malorne'],
}, },
skill:{ skill:{
xingluo:{
trigger:{player:'phaseBegin'},
direct:true,
filter:function(event,player){
var nh=player.num('h');
for(var i=0;i<game.players.length;i++){
if(game.players[i].num('h')>nh){
return true;
}
}
return false;
},
content:function(){
'step 0'
var nh=player.num('h');
var num=0;
for(var i=0;i<game.players.length;i++){
if(game.players[i].num('h')>nh){
num++;
}
}
player.chooseTarget(get.prompt('xingluo'),[1,num],function(card,player,target){
return target.num('h')>nh;
}).ai=function(target){
return 0.5-ai.get.attitude(player,target);
}
'step 1'
if(result.bool){
event.cards=[];
event.list=result.targets.slice(0);
event.list.sort(lib.sort.seat);
player.logSkill('xingluo',result.targets);
}
else{
event.finish();
}
'step 2'
if(event.list.length){
event.list.shift().chooseToDiscard('h',true);
}
else{
event.goto(4);
}
'step 3'
if(result.bool&&result.cards.length){
event.cards.push(result.cards[0]);
}
event.goto(2);
'step 4'
if(event.cards.length){
player.chooseCardButton('选择一张加入手牌',event.cards).ai=function(button){
return ai.get.value(button.link);
};
}
else{
event.finish();
}
'step 5'
if(result.bool){
player.gain(result.links,'gain2');
}
},
ai:{
expose:0.2
}
},
yuelu:{
enable:'chooseToUse',
filter:function(event,player){
return event.type=='dying'&&player.num('he',{color:'black'});
},
filterCard:{color:'black'},
position:'he',
check:function(card){
return 11-ai.get.value(card);
},
filterTarget:function(card,player,target){
return target==_status.event.dying;
},
selectTarget:-1,
content:function(){
target.recover();
target.changeHujia();
},
ai:{
order:10,
skillTagFilter:function(player){
if(player.num('he',{color:'black'})==0) return false;
},
save:true,
result:{
target:3
},
threaten:2
},
},
yushou:{ yushou:{
enable:'phaseUse', enable:'phaseUse',
filterCard:true, filterCard:true,
@ -5386,10 +5482,10 @@ character.hearth={
hs_tyrande:'泰兰德', hs_tyrande:'泰兰德',
hs_fenjie:'芬杰', hs_fenjie:'芬杰',
yuelu:'月', yuelu:'月',
yuelu_info:'出牌阶段限一次,你可以弃置一张红桃牌令一名角色回复一点体力并获得一点护甲', yuelu_info:'在一名角色的濒死阶段,你可以弃置一张黑色牌令其回复一点体力并获得一点护甲',
xingluo:'星落', xingluo:'星落',
xingluo_info:'星落', xingluo_info:'回合开始阶段,你可以令任意名手牌数多于你的角色各弃置一张手牌,然后你从弃置的牌中选择一张加入手牌',
yushou:'御兽', yushou:'御兽',
yushou_info:'出牌阶段,你可以弃置一张牌并召唤一个随机的野兽宠物,效果持续到你的下一回合开始', yushou_info:'出牌阶段,你可以弃置一张牌并召唤一个随机的野兽宠物,效果持续到你的下一回合开始',
yushou_misha:'米莎', yushou_misha:'米莎',

View File

@ -35,9 +35,36 @@ character.xianjian={
pal_xiahoujinxuan:['male','shu',3,['xuanmo','danqing']], pal_xiahoujinxuan:['male','shu',3,['xuanmo','danqing']],
pal_muchanglan:['female','wu',3,['feixia','lueying']], pal_muchanglan:['female','wu',3,['feixia','lueying']],
// pal_xia:['male','wei',4,[]], // pal_xia:['male','wei',4,[]],
// pal_jiangcheng:['male','wei',4,[]], // pal_jiangcheng:['male','qun',4,['yanzhan','fenshi']],
}, },
skill:{ skill:{
yanzhan:{
enable:'phaseUse',
viewAs:{name:'sha',nature:'fire'},
usable:1,
viewAsFilter:function(player){
if(!player.num('h',{color:'red'})) return false;
},
filterCard:{color:'red'},
ai:{
order:3.15
},
group:'yanzhan2'
},
yanzhan2:{
trigger:{source:'damageEnd'},
forced:true,
popup:false,
filter:function(event){
return event.parent.skill=='yanzhan';
},
content:function(){
player.getStat().card.sha--;
}
},
fenshi:{
},
feixia:{ feixia:{
enable:'phaseUse', enable:'phaseUse',
usable:1, usable:1,
@ -2391,6 +2418,12 @@ character.xianjian={
pal_changqing:'长卿', pal_changqing:'长卿',
pal_xuanxiao:'玄霄', pal_xuanxiao:'玄霄',
longhuo:'龙火',
longhuo_info:'回合结束阶段,你可以对所有角色各造成一点火焰伤害',
fenshi:'焚世',
fenshi_info:'觉醒技,回合开始阶段,若你没有牌,你回复一点体力并摸三张牌,并获得技能龙火',
yanzhan:'炎斩',
yanzhan_info:'出牌阶段限一次,你可以将一张红色手牌当作火杀使用,若造成了伤害,此杀不计入出牌次数',
feixia:'飞霞', feixia:'飞霞',
feixia_info:'出牌阶段限一次,你可以弃置一张红色牌视为对一名随机敌人使用一张不计入出杀次数的杀', feixia_info:'出牌阶段限一次,你可以弃置一张红色牌视为对一名随机敌人使用一张不计入出杀次数的杀',
lueying:'掠影', lueying:'掠影',

View File

@ -8791,8 +8791,11 @@
},700); },700);
} }
else if(event.animate=='gain2'||event.animate=='draw2'){ else if(event.animate=='gain2'||event.animate=='draw2'){
player.$gain2(cards); var gain2t=300;
game.delayx(1,500); if(player.$gain2(cards)){
gain2t=500;
}
game.delayx(1,gain2t);
setTimeout(function(){ setTimeout(function(){
addv(); addv();
player.node.handcards1.insertBefore(frag1,player.node.handcards1.firstChild); player.node.handcards1.insertBefore(frag1,player.node.handcards1.firstChild);
@ -8800,7 +8803,7 @@
player.update(); player.update();
if(player==game.me) ui.updatehl(); if(player==game.me) ui.updatehl();
broadcast(); broadcast();
},500); },gain2t);
} }
else{ else{
addv(); addv();
@ -13619,7 +13622,10 @@
if(list2.length){ if(list2.length){
game.addVideo('gain2',this,get.cardsInfo(list2)); game.addVideo('gain2',this,get.cardsInfo(list2));
} }
if(list.length) this.$draw(list,'nobroadcast'); if(list.length){
this.$draw(list,'nobroadcast');
return true;
}
}, },
$skill:function(name,type,color){ $skill:function(name,type,color){
if(typeof type!='string') type='legend'; if(typeof type!='string') type='legend';
@ -20807,6 +20813,17 @@
var card=lib.card[i]; var card=lib.card[i];
if(card.filterTarget&&card.selectTarget==undefined){ if(card.filterTarget&&card.selectTarget==undefined){
card.selectTarget=1; card.selectTarget=1;
}
if(card.autoViewAs){
if(!card.ai){
card.ai={};
}
if(!card.ai.order){
card.ai.order=lib.card[card.autoViewAs].ai.order;
if(!card.ai.order&&lib.card[card.autoViewAs].ai.basic){
card.ai.order=lib.card[card.autoViewAs].ai.basic.order;
}
}
} }
if(card.type=='equip'){ if(card.type=='equip'){
if(card.enable==undefined) card.enable=true; if(card.enable==undefined) card.enable=true;

View File

@ -19,7 +19,7 @@ window.noname_update={
// 'character/rank.js', // 'character/rank.js',
// 'character/extra.js', // 'character/extra.js',
'character/ow.js', 'character/ow.js',
// 'character/hearth.js', 'character/hearth.js',
// 'character/refresh.js', // 'character/refresh.js',
// 'character/shenhua.js', // 'character/shenhua.js',
'character/standard.js', 'character/standard.js',

View File

@ -888,6 +888,8 @@ mode.boss={
} }
} }
var rand=Math.random()<0.5?'选项一':'选项二'; var rand=Math.random()<0.5?'选项一':'选项二';
var sourcename=get.translation(trigger.source);
var playername=get.translation(trigger.player);
player.chooseControl('选项一','选项二','cancel2',function(){ player.chooseControl('选项一','选项二','cancel2',function(){
if(att1==0&&att2==0) return rand; if(att1==0&&att2==0) return rand;
if(att1*att2>=0){ if(att1*att2>=0){
@ -912,7 +914,7 @@ mode.boss={
return rand; return rand;
} }
}).set('prompt',get.prompt('boss_yuance')+ }).set('prompt',get.prompt('boss_yuance')+
'<br><br><div class="text">选项一:若结果为黑色,受伤害角色失去一点体力,否则伤害来源失去一点体力</div><br><div class="text">选项二:若结果为红色,受伤害角色回复一点体力,否则伤害来源回复一点体力</div>'); '<br><br><div class="text">选项一:若判定结果为黑色,'+playername+'失去一点体力,否则'+sourcename+'失去一点体力</div><br><div class="text">选项二:若判定结果为红色,'+playername+'回复一点体力,否则'+sourcename+'回复一点体力</div>');
'step 1' 'step 1'
var att1=ai.get.attitude(player,trigger.player); var att1=ai.get.attitude(player,trigger.player);
var att2=ai.get.attitude(player,trigger.source); var att2=ai.get.attitude(player,trigger.source);