This commit is contained in:
libccy 2017-07-21 20:03:04 +08:00
parent d0f0c0b431
commit d2eb74ba18
5 changed files with 138 additions and 14 deletions

View File

@ -1043,7 +1043,9 @@ game.import('card',function(lib,game,ui,get,ai,_status){
type:'spell',
subtype:'spell_bronze',
enable:true,
filterTarget:true,
filterTarget:function(card,player,target){
return !target.hasSkill('gw_qinpendayu');
},
changeTarget:function(player,targets){
game.filterPlayer(function(current){
return get.distance(targets[0],current,'pure')==1;
@ -1059,6 +1061,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
result:{
player:function(player,target){
return game.countPlayer(function(current){
if(current.hasSkill('gw_qinpendayu')) return 0;
if(current==target||(get.distance(target,current,'pure')==1)){
var num=-get.sgn(get.attitude(player,current));
if(current.needsToDiscard()) return num;
@ -1082,7 +1085,9 @@ game.import('card',function(lib,game,ui,get,ai,_status){
subtype:'spell_bronze',
enable:true,
usable:1,
filterTarget:true,
filterTarget:function(card,player,target){
return !target.hasSkill('gw_birinongwu');
},
changeTarget:function(player,targets){
game.filterPlayer(function(current){
return get.distance(targets[0],current,'pure')==1;
@ -1097,6 +1102,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
result:{
player:function(player,target){
return game.countPlayer(function(current){
if(current.hasSkill('gw_birinongwu')) return 0;
if(current==target||(get.distance(target,current,'pure')==1)){
return -get.sgn(get.attitude(player,current));
}
@ -1116,7 +1122,9 @@ game.import('card',function(lib,game,ui,get,ai,_status){
subtype:'spell_bronze',
enable:true,
usable:1,
filterTarget:true,
filterTarget:function(card,player,target){
return !target.hasSkill('gw_ciguhanshuang');
},
changeTarget:function(player,targets){
game.filterPlayer(function(current){
return get.distance(targets[0],current,'pure')==1;
@ -1131,6 +1139,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
result:{
player:function(player,target){
return game.countPlayer(function(current){
if(current.hasSkill('gw_ciguhanshuang')) return 0;
if(current==target||(get.distance(target,current,'pure')==1)){
return -get.sgn(get.attitude(player,current));
}

View File

@ -18,7 +18,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
gw_bulanwang:['male','qun',4,['bolang']],
// gw_kuite:['male','qun',3,[]],
// gw_fuertaisite:['male','qun',3,[]],
// gw_hengsaite:['male','wei',4,['jinsheng']],
gw_hengsaite:['male','wei',3,['jielue']],
gw_fulisi:['male','qun',3,['lanquan']],
gw_gaier:['male','shu',3,['hunmo']],
@ -53,6 +53,27 @@ game.import('character',function(lib,game,ui,get,ai,_status){
gw_yioufeisi:'国王还是乞丐,两者有何区别,人类少一个算一个',
},
skill:{
jielue:{
trigger:{player:'useCard'},
frequent:true,
oncancel:function(event,player){
player.addTempSkill('jielue2');
},
usable:1,
filter:function(event,player){
return !player.hasSkill('jielue2')&&get.type(event.card)=='basic';
},
check:function(event,player){
return get.value(event.card)>3;
},
content:function(){
player.gain([game.createCard(trigger.card),game.createCard(trigger.card)],'gain2');
},
ai:{
pretao:true
}
},
jielue2:{},
bolang:{
trigger:{player:'phaseBegin'},
frequent:true,
@ -931,7 +952,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
}
},
nuhou:{
nuhou_old:{
enable:'phaseUse',
usable:1,
position:'he',
@ -963,6 +984,44 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
},
},
nuhou:{
trigger:{player:'damageEnd'},
direct:true,
filter:function(event,player){
return player.countCards('he')>0;
},
content:function(){
'step 0'
player.chooseToDiscard(get.prompt2('nuhou'),'he').set('ai',function(card){
return 8-get.useful(card);
}).set('logSkill','nuhou');
'step 1'
if(result.bool){
var targets=player.getEnemies();
if(targets.length){
var target=targets.randomGet();
player.line(target,'green');
target.damage();
target.randomDiscard();
}
}
},
ai:{
threaten:0.8,
maixie:true,
maixie_hp:true,
effect:{
target:function(card,player,target){
if(get.tag(card,'damage')){
var nh=target.countCards('he');
if(player.hasSkillTag('jueqing',false,target)||nh==0) return [1,-2];
if(!target.hasFriend()||nh<=1) return;
if(target.hp>=2) return [1,get.tag(card,'damage')*0.5];
}
}
}
}
},
shewu:{
enable:'phaseUse',
usable:1,
@ -1654,6 +1713,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
gw_zhangyujushou:'章鱼巨兽',
gw_zhuoertan:'卓尔坦',
jielue:'劫掠',
jielue_info:'当你于回合内首次使用基本牌时,你可以获得两张该牌的复制',
gwfengchi:'风驰',
gwfengchi_info:'锁定技出牌阶段开始时你随机观看3个可以在出牌阶段使用的技能并获得其中一个技能直到此阶段结束',
gwjushi:'巨噬',
@ -1691,7 +1752,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
gwjiquan:'集权',
gwjiquan_info:'出牌阶段限一次,你可以从任意名角色处各获得一张牌,每拿一张牌,被拿牌的角色视为对你使用一张杀',
nuhou:'怒吼',
nuhou_info:'出牌阶段限一次,你可以弃置一张牌,然后所有敌人随机弃置一张牌',
nuhou_info:'每当你受到一次伤害,你可以弃置一张牌,然后对一名随机敌人造成一点伤害并随机弃置其一张牌',
shewu:'蛇舞',
shewu_info:'出牌阶段限一次你可以弃置1至3张牌然后摸3张牌若你弃置了至少2张牌你本回合使用卡牌无视距离若你弃置了3张牌你回复一点体力',
gwzhanjiang:'斩将',

View File

@ -179,8 +179,11 @@ window.noname_character_rank={
're_lidian',
'hs_kalimosi',
'hs_zhihuanhua',
'xizhicai',
],
am:[
'gw_hengsaite',
'sunqian',
'pal_anu',
'gw_mieren',
'gw_sanhanya',
@ -293,6 +296,7 @@ window.noname_character_rank={
'hs_mojinbaozi',
],
bp:[
'quyi',
'wangyun',
'pal_xiaoman',
'pal_jiangyunfan',

View File

@ -3069,7 +3069,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
group:'tuifeng2',
ai:{
threaten:0.8
threaten:0.8,
maixie:true,
maixie_hp:true
}
},
tuifeng2:{

View File

@ -9018,8 +9018,11 @@
}
}
"step 3"
if(result&&result.bool==false) return;
var info=get.info(event.skill);
if(result&&result.bool==false){
if(info.oncancel) info.oncancel(trigger,player);
return;
}
var next=game.createEvent(event.skill);
if(typeof info.usable=='number'){
player.addSkill('counttrigger');
@ -14176,10 +14179,17 @@
if(next.prompt){
next.prompt2=arguments[i];
}
else{
if(arguments[i].indexOf('###')==0){
var prompts=arguments[i].slice(3).split('###');
next.prompt=prompts[0];
next.prompt2=prompts[1];
}
else{
next.prompt=arguments[i];
}
}
}
if(arguments[i]===null){
for(var i=0;i<arguments.length;i++){
console.log(arguments[i]);
@ -14367,11 +14377,18 @@
if(next.prompt){
next.prompt2=arguments[i];
}
else{
if(arguments[i].indexOf('###')==0){
var prompts=arguments[i].slice(3).split('###');
next.prompt=prompts[0];
next.prompt2=prompts[1];
}
else{
next.prompt=arguments[i];
}
}
}
}
if(next.filterCard==undefined) next.filterCard=lib.filter.all;
if(next.selectCard==undefined) next.selectCard=[1,1];
if(next.ai==undefined) next.ai=get.unuseful3;
@ -14404,11 +14421,18 @@
if(next.prompt){
next.prompt2=arguments[i];
}
else{
if(arguments[i].indexOf('###')==0){
var prompts=arguments[i].slice(3).split('###');
next.prompt=prompts[0];
next.prompt2=prompts[1];
}
else{
next.prompt=arguments[i];
}
}
}
}
if(next.filterTarget==undefined) next.filterTarget=lib.filter.all;
if(next.selectTarget==undefined) next.selectTarget=[1,1];
if(next.ai==undefined) next.ai=get.attitude2;
@ -14518,8 +14542,19 @@
next.ai=arguments[i];
}
else if(typeof arguments[i]=='string'){
if(next.prompt) next.prompt2=arguments[i];
else next.prompt=arguments[i];
if(next.prompt){
next.prompt2=arguments[i];
}
else{
if(arguments[i].indexOf('###')==0){
var prompts=arguments[i].slice(3).split('###');
next.prompt=prompts[0];
next.prompt2=prompts[1];
}
else{
next.prompt=arguments[i];
}
}
}
else if(get.itemtype(arguments[i])=='dialog'){
next.dialog=arguments[i];
@ -14779,10 +14814,17 @@
if(next.prompt){
next.prompt2=arguments[i];
}
else{
if(arguments[i].indexOf('###')==0){
var prompts=arguments[i].slice(3).split('###');
next.prompt=prompts[0];
next.prompt2=prompts[1];
}
else{
next.prompt=arguments[i];
}
}
}
else if(Array.isArray(arguments[i])){
for(var j=0;j<arguments[i].length;j++){
if(typeof arguments[i][j]!='string') break;
@ -24527,6 +24569,7 @@
else{
card=ui.create.card(ui.special);
}
card.storage.vanish=true;
return card.init([suit,number,name,nature]);
},
forceOver:function(bool,callback){
@ -40747,6 +40790,11 @@
else{
return '是否发动【'+get.skillTranslation(skill,player)+'】?';
}
},
prompt2:function(skill,target,player){
var str=get.prompt.apply(this,arguments);
if(!lib.translate[skill+'_info']) return str;
return '###'+str+'###'+lib.translate[skill+'_info'];
},
url:function(master){
var url=lib.config.updateURL||lib.updateURL;