This commit is contained in:
parent
95f2f73773
commit
9cf7dd0e7a
|
@ -1242,29 +1242,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
return true;
|
||||
};
|
||||
'step 1'
|
||||
var fakecard=game.createCard(result.links[0][2]);
|
||||
var info=get.info(fakecard);
|
||||
event.fakecard=fakecard;
|
||||
if(info.notarget){
|
||||
player.useCard(fakecard);
|
||||
event.finish();
|
||||
}
|
||||
else if(info.selectTarget==-1){
|
||||
player.useCard(fakecard,game.filterPlayer(function(current){
|
||||
return player.canUse(fakecard,current);
|
||||
}).sortBySeat());
|
||||
}
|
||||
else{
|
||||
player.chooseTarget('选择'+get.translation(fakecard)+'的目标',function(card,player,target){
|
||||
return player.canUse(fakecard,target);
|
||||
},true).ai=function(target){
|
||||
return get.effect(target,fakecard,player,player);
|
||||
};
|
||||
}
|
||||
'step 2'
|
||||
if(result.bool&&result.targets&&result.targets.length){
|
||||
player.useCard(event.fakecard,result.targets);
|
||||
}
|
||||
player.chooseUseTarget(game.createCard(result.links[0][2],get.suit(card),get.number(card)));
|
||||
},
|
||||
ai:{
|
||||
value:7,
|
||||
|
|
|
@ -7,10 +7,9 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
type:'zhenfa',
|
||||
chongzhu:true,
|
||||
enable:true,
|
||||
filterTarget:true,
|
||||
selectTarget:-1,
|
||||
multitarget:true,
|
||||
notarget:true,
|
||||
content:function(){
|
||||
var targets=game.filterPlayer();
|
||||
var n=targets.length;
|
||||
while(n--){
|
||||
game.swapSeat(targets.randomGet(),targets.randomGet());
|
||||
|
@ -34,33 +33,33 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
return current!=player&¤t.isFriendOf(player);
|
||||
});
|
||||
},
|
||||
filterTarget:function(card,player,target){
|
||||
if(player.inline()) return player.inline(target);
|
||||
if(!player.getNext()) return false;
|
||||
var list=game.filterPlayer(function(current){
|
||||
return current!=player&¤t.isFriendOf(player);
|
||||
});
|
||||
list.sort(function(a,b){
|
||||
return get.distance(player,a,'absolute')-get.distance(player,b,'absolute');
|
||||
});
|
||||
return target==list[0];
|
||||
},
|
||||
selectTarget:-1,
|
||||
multitarget:true,
|
||||
multiline:true,
|
||||
notarget:true,
|
||||
content:function(){
|
||||
if(targets.length==1){
|
||||
game.swapSeat(targets[0],game.me.getNext(),true,true);
|
||||
}
|
||||
else{
|
||||
if(player.inline()){
|
||||
var targets=game.filterPlayer(function(current){
|
||||
return player.inline(current);
|
||||
});
|
||||
player.line(targets);
|
||||
game.asyncDraw(targets);
|
||||
}
|
||||
else if(player.getNext()){
|
||||
var list=game.filterPlayer(function(current){
|
||||
return current!=player&¤t.isFriendOf(player);
|
||||
});
|
||||
if(list.length){
|
||||
list.sort(function(a,b){
|
||||
return get.distance(player,a,'absolute')-get.distance(player,b,'absolute');
|
||||
});
|
||||
player.line(list[0]);
|
||||
game.swapSeat(list[0],player.getNext(),true,true);
|
||||
}
|
||||
}
|
||||
},
|
||||
mode:['guozhan'],
|
||||
ai:{
|
||||
order:6.5,
|
||||
result:{
|
||||
target:1,
|
||||
player:1,
|
||||
},
|
||||
tag:{
|
||||
draw:1
|
||||
|
@ -80,7 +79,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
selectTarget:-1,
|
||||
content:function(){
|
||||
target.chooseToDiscard('he',true);
|
||||
target.chooseToDiscard('he',true).delay=false;
|
||||
},
|
||||
mode:['guozhan'],
|
||||
ai:{
|
||||
|
@ -101,14 +100,13 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
return current.isNotMajor();
|
||||
});
|
||||
},
|
||||
multitarget:true,
|
||||
multiline:true,
|
||||
filterTarget:function(card,player,target){
|
||||
return target.isNotMajor();
|
||||
},
|
||||
selectTarget:-1,
|
||||
content:function(){
|
||||
game.asyncDraw(targets);
|
||||
target.draw(false);
|
||||
target.$draw();
|
||||
},
|
||||
mode:['guozhan'],
|
||||
ai:{
|
||||
|
@ -211,12 +209,11 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
return current!=player&¤t.identity==player.identity&&!player.inline(current);
|
||||
});
|
||||
},
|
||||
filterTarget:function(card,player,target){
|
||||
return target.identity==player.identity;
|
||||
},
|
||||
multitarget:true,
|
||||
selectTarget:-1,
|
||||
notarget:true,
|
||||
content:function(){
|
||||
var targets=game.filterPlayer(function(current){
|
||||
return current.identity==player.identity;
|
||||
});
|
||||
targets.sortBySeat();
|
||||
for(var i=1;i<targets.length;i++){
|
||||
game.swapSeat(targets[i],targets[i-1].next,false);
|
||||
|
@ -227,7 +224,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
ai:{
|
||||
order:7,
|
||||
result:{
|
||||
target:1,
|
||||
player:1,
|
||||
},
|
||||
}
|
||||
},
|
||||
|
|
|
@ -232,42 +232,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
'step 2'
|
||||
if(result.bool){
|
||||
var name=result.links[0][2];
|
||||
var info=lib.card[name];
|
||||
var card={name:name};
|
||||
if(info.selectTarget==-1){
|
||||
var targets=game.filterPlayer(function(current){
|
||||
return lib.filter.filterTarget(card,player,current);
|
||||
});
|
||||
if(targets.length){
|
||||
targets.sort(lib.sort.seat);
|
||||
player.useCard(card,targets);
|
||||
}
|
||||
event.finish();
|
||||
}
|
||||
else if(info.notarget){
|
||||
player.useCard(card);
|
||||
}
|
||||
else{
|
||||
var next=player.chooseTarget('选择'+get.translation(name)+'的目标');
|
||||
next._get_card=card;
|
||||
next.filterTarget=lib.filter.filterTarget;
|
||||
next.ai=get.effect;
|
||||
if(typeof info.selectTarget=='function'){
|
||||
next.selectTarget=info.selectTarget;
|
||||
}
|
||||
else{
|
||||
next.selectTarget=get.select(info.selectTarget);
|
||||
}
|
||||
event.card=card;
|
||||
}
|
||||
}
|
||||
else{
|
||||
event.finish();
|
||||
}
|
||||
'step 3'
|
||||
if(result.bool){
|
||||
player.useCard(event.card,result.targets);
|
||||
player.chooseUseTarget(result.links[0][2]);
|
||||
}
|
||||
},
|
||||
ai:{
|
||||
|
|
|
@ -50,6 +50,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
gw_bierna:['female','qun',4,['gwfengshi']],
|
||||
gw_haizhiyezhu:['male','qun',4,['yangfan']],
|
||||
gw_nitelila:['male','wei',4,['shuangxi']],
|
||||
|
||||
gw_linjing:['male','wu',4,['gwyewu']],
|
||||
},
|
||||
characterIntro:{
|
||||
gw_huoge:'那个老年痴呆?不知道他是活着还是已经被制成标本了!',
|
||||
|
@ -65,6 +67,66 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
gw_yioufeisi:'国王还是乞丐,两者有何区别,人类少一个算一个',
|
||||
},
|
||||
skill:{
|
||||
gwyewu:{
|
||||
enable:'phaseUse',
|
||||
usable:1,
|
||||
filter:function(event,player){
|
||||
if(!player.countCards('he')) return false;
|
||||
var targets=player.getEnemies();
|
||||
for(var i=0;i<targets.length;i++){
|
||||
if(targets[i].countCards('he')) return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
filterCard:true,
|
||||
position:'he',
|
||||
check:function(card){
|
||||
return 8-get.value(card);
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
event.targets=player.getEnemies();
|
||||
event.color=get.color(cards[0]);
|
||||
event.num=0;
|
||||
'step 1'
|
||||
event.repeat=false;
|
||||
var list=game.filterPlayer(function(current){
|
||||
return event.targets.contains(current)&¤t.countCards('he');
|
||||
});
|
||||
if(list.length){
|
||||
var target=list.randomGet();
|
||||
var card=target.randomDiscard()[0];
|
||||
player.line(target,'green');
|
||||
event.num++;
|
||||
if(card&&get.color(card)==event.color){
|
||||
event.redo();
|
||||
}
|
||||
}
|
||||
'step 2'
|
||||
var togain=[];
|
||||
for(var i=0;i<event.num;i++){
|
||||
togain.push(game.createCard('gw_wuyao'));
|
||||
}
|
||||
player.gain(togain,'gain2');
|
||||
},
|
||||
global:'gw_wuyao',
|
||||
ai:{
|
||||
order:8,
|
||||
result:{
|
||||
player:1
|
||||
}
|
||||
}
|
||||
},
|
||||
gw_wuyao:{
|
||||
trigger:{player:'phaseAfter'},
|
||||
silent:true,
|
||||
content:function(){
|
||||
var cards=player.getCards('h','gw_wuyao');
|
||||
if(cards.length){
|
||||
player.lose(cards).position=null;
|
||||
}
|
||||
}
|
||||
},
|
||||
shuangxi:{
|
||||
enable:'phaseUse',
|
||||
round:2,
|
||||
|
@ -2225,6 +2287,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
},
|
||||
card:{
|
||||
gw_wuyao:{
|
||||
type:'special',
|
||||
fullimage:true,
|
||||
derivation:'gw_linjing',
|
||||
vanish:true,
|
||||
addinfo:'杀',
|
||||
autoViewAs:'sha',
|
||||
ai:{
|
||||
order:function(){
|
||||
return lib.card.sha.ai.order()+0.5;
|
||||
}
|
||||
}
|
||||
},
|
||||
gw_dudayuanshuai1:{
|
||||
type:'special',
|
||||
fullimage:true,
|
||||
|
@ -2304,6 +2379,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
gw_haizhiyezhu:'海之野猪',
|
||||
gw_nitelila:'尼斯里拉',
|
||||
|
||||
gw_linjing:'林精',
|
||||
gw_nvyemo:'女夜魔',
|
||||
gw_mierjiata:'米尔加塔',
|
||||
|
||||
gw_wuyao:'雾妖',
|
||||
gw_wuyao_info:'在你行动时可当作杀使用;回合结束后,从手牌中消失',
|
||||
gwyewu:'叶舞',
|
||||
gwyewu_info:'出牌阶段限一次,你可以弃置一张牌,并弃置一名随机敌人的一张随机牌;若目标弃置的牌与你弃置的牌颜色相同,则重复发动;每以此法弃置一张敌方角色的牌,你获得一张【雾妖】',
|
||||
shuangxi:'霜袭',
|
||||
shuangxi_info:'每两轮限一次,出牌阶段,你可以视为使用一张【刺骨寒霜】;若你在本回合造成过伤害,改为使用【白霜】',
|
||||
gwfengshi:'风蚀',
|
||||
|
|
|
@ -81,6 +81,7 @@ window.noname_asset_list=[
|
|||
'image/card/gw_tongdi.jpg',
|
||||
'image/card/gw_tunshi.jpg',
|
||||
'image/card/gw_wenyi.jpg',
|
||||
'image/card/gw_wuyao.jpg',
|
||||
'image/card/gw_xinsheng.jpg',
|
||||
'image/card/gw_yanziyaoshui.jpg',
|
||||
'image/card/gw_yigeniyin.jpg',
|
||||
|
@ -403,6 +404,7 @@ window.noname_asset_list=[
|
|||
'image/character/gw_laduoweide.jpg',
|
||||
'image/character/gw_laomaotou.jpg',
|
||||
'image/character/gw_laomaotou2.jpg',
|
||||
'image/character/gw_linjing.jpg',
|
||||
'image/character/gw_luobo.jpg',
|
||||
'image/character/gw_luoqi.jpg',
|
||||
'image/character/gw_meizi.jpg',
|
||||
|
|
48
game/game.js
48
game/game.js
|
@ -10430,6 +10430,10 @@
|
|||
}
|
||||
if(event.dialog) event.dialog.close();
|
||||
event.resume();
|
||||
"step 2"
|
||||
if(event.onresult){
|
||||
event.onresult(event.result);
|
||||
}
|
||||
},
|
||||
chooseCardTarget:function(){
|
||||
"step 0"
|
||||
|
@ -14442,6 +14446,50 @@
|
|||
next._args=Array.from(arguments);
|
||||
return next;
|
||||
},
|
||||
chooseUseTarget:function(card){
|
||||
// not online-ready
|
||||
if(typeof card=='string'){
|
||||
card={name:card};
|
||||
}
|
||||
var name=card.name;
|
||||
var info=lib.card[name];
|
||||
var player=this;
|
||||
if(info.selectTarget==-1){
|
||||
var targets=game.filterPlayer(function(current){
|
||||
return lib.filter.filterTarget(card,player,current);
|
||||
});
|
||||
if(targets.length){
|
||||
targets.sort(lib.sort.seat);
|
||||
player.useCard(card,targets);
|
||||
}
|
||||
}
|
||||
else if(info.notarget){
|
||||
player.useCard(card);
|
||||
}
|
||||
else if(game.hasPlayer(function(current){
|
||||
return player.canUse(card,current);
|
||||
})){
|
||||
if(info.multicheck&&!info.multicheck(card,player)){
|
||||
return;
|
||||
}
|
||||
var next=player.chooseTarget('选择'+get.translation(card)+'的目标');
|
||||
next._get_card=card;
|
||||
next.filterTarget=lib.filter.filterTarget;
|
||||
next.ai=get.effect;
|
||||
if(typeof info.selectTarget=='function'){
|
||||
next.selectTarget=info.selectTarget;
|
||||
}
|
||||
else{
|
||||
next.selectTarget=get.select(info.selectTarget);
|
||||
}
|
||||
next.forced=true;
|
||||
next.onresult=function(result){
|
||||
if(result.bool){
|
||||
player.useCard(card,result.targets);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
chooseTarget:function(){
|
||||
var next=game.createEvent('chooseTarget');
|
||||
next.player=this;
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 47 KiB |
Binary file not shown.
After Width: | Height: | Size: 84 KiB |
38
mode/boss.js
38
mode/boss.js
|
@ -2330,43 +2330,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
|
|||
}
|
||||
'step 1'
|
||||
if(result.bool){
|
||||
var name=result.links[0][2];
|
||||
var info=lib.card[name];
|
||||
var card=game.createCard(name);
|
||||
if(info.selectTarget==-1){
|
||||
var targets=game.filterPlayer(function(current){
|
||||
return lib.filter.filterTarget(card,player,current);
|
||||
});
|
||||
if(targets.length){
|
||||
targets.sort(lib.sort.seat);
|
||||
player.useCard(card,targets);
|
||||
}
|
||||
event.finish();
|
||||
}
|
||||
else if(info.notarget){
|
||||
player.useCard(card);
|
||||
}
|
||||
else{
|
||||
var next=player.chooseTarget('选择'+get.translation(name)+'的目标');
|
||||
next._get_card=card;
|
||||
next.filterTarget=lib.filter.filterTarget;
|
||||
next.ai=get.effect;
|
||||
if(typeof info.selectTarget=='function'){
|
||||
next.selectTarget=info.selectTarget;
|
||||
}
|
||||
else{
|
||||
next.selectTarget=get.select(info.selectTarget);
|
||||
}
|
||||
event.card=card;
|
||||
}
|
||||
}
|
||||
else{
|
||||
event.finish();
|
||||
}
|
||||
'step 2'
|
||||
if(result.bool){
|
||||
// player.addTempSkill('fengqi2',{player:'useCardAfter'});
|
||||
player.useCard(event.card,result.targets);
|
||||
player.chooseUseTarget(result.links[0][2]);
|
||||
}
|
||||
},
|
||||
ai:{
|
||||
|
|
Loading…
Reference in New Issue