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;
|
return true;
|
||||||
};
|
};
|
||||||
'step 1'
|
'step 1'
|
||||||
var fakecard=game.createCard(result.links[0][2]);
|
player.chooseUseTarget(game.createCard(result.links[0][2],get.suit(card),get.number(card)));
|
||||||
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);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
ai:{
|
ai:{
|
||||||
value:7,
|
value:7,
|
||||||
|
|
|
@ -7,10 +7,9 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
||||||
type:'zhenfa',
|
type:'zhenfa',
|
||||||
chongzhu:true,
|
chongzhu:true,
|
||||||
enable:true,
|
enable:true,
|
||||||
filterTarget:true,
|
notarget:true,
|
||||||
selectTarget:-1,
|
|
||||||
multitarget:true,
|
|
||||||
content:function(){
|
content:function(){
|
||||||
|
var targets=game.filterPlayer();
|
||||||
var n=targets.length;
|
var n=targets.length;
|
||||||
while(n--){
|
while(n--){
|
||||||
game.swapSeat(targets.randomGet(),targets.randomGet());
|
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);
|
return current!=player&¤t.isFriendOf(player);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
filterTarget:function(card,player,target){
|
notarget:true,
|
||||||
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,
|
|
||||||
content:function(){
|
content:function(){
|
||||||
if(targets.length==1){
|
if(player.inline()){
|
||||||
game.swapSeat(targets[0],game.me.getNext(),true,true);
|
var targets=game.filterPlayer(function(current){
|
||||||
}
|
return player.inline(current);
|
||||||
else{
|
});
|
||||||
|
player.line(targets);
|
||||||
game.asyncDraw(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'],
|
mode:['guozhan'],
|
||||||
ai:{
|
ai:{
|
||||||
order:6.5,
|
order:6.5,
|
||||||
result:{
|
result:{
|
||||||
target:1,
|
player:1,
|
||||||
},
|
},
|
||||||
tag:{
|
tag:{
|
||||||
draw:1
|
draw:1
|
||||||
|
@ -80,7 +79,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
||||||
},
|
},
|
||||||
selectTarget:-1,
|
selectTarget:-1,
|
||||||
content:function(){
|
content:function(){
|
||||||
target.chooseToDiscard('he',true);
|
target.chooseToDiscard('he',true).delay=false;
|
||||||
},
|
},
|
||||||
mode:['guozhan'],
|
mode:['guozhan'],
|
||||||
ai:{
|
ai:{
|
||||||
|
@ -101,14 +100,13 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
||||||
return current.isNotMajor();
|
return current.isNotMajor();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
multitarget:true,
|
|
||||||
multiline:true,
|
|
||||||
filterTarget:function(card,player,target){
|
filterTarget:function(card,player,target){
|
||||||
return target.isNotMajor();
|
return target.isNotMajor();
|
||||||
},
|
},
|
||||||
selectTarget:-1,
|
selectTarget:-1,
|
||||||
content:function(){
|
content:function(){
|
||||||
game.asyncDraw(targets);
|
target.draw(false);
|
||||||
|
target.$draw();
|
||||||
},
|
},
|
||||||
mode:['guozhan'],
|
mode:['guozhan'],
|
||||||
ai:{
|
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);
|
return current!=player&¤t.identity==player.identity&&!player.inline(current);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
filterTarget:function(card,player,target){
|
notarget:true,
|
||||||
return target.identity==player.identity;
|
|
||||||
},
|
|
||||||
multitarget:true,
|
|
||||||
selectTarget:-1,
|
|
||||||
content:function(){
|
content:function(){
|
||||||
|
var targets=game.filterPlayer(function(current){
|
||||||
|
return current.identity==player.identity;
|
||||||
|
});
|
||||||
targets.sortBySeat();
|
targets.sortBySeat();
|
||||||
for(var i=1;i<targets.length;i++){
|
for(var i=1;i<targets.length;i++){
|
||||||
game.swapSeat(targets[i],targets[i-1].next,false);
|
game.swapSeat(targets[i],targets[i-1].next,false);
|
||||||
|
@ -227,7 +224,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
||||||
ai:{
|
ai:{
|
||||||
order:7,
|
order:7,
|
||||||
result:{
|
result:{
|
||||||
target:1,
|
player:1,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -232,42 +232,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
}
|
}
|
||||||
'step 2'
|
'step 2'
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
var name=result.links[0][2];
|
player.chooseUseTarget(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);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
ai:{
|
ai:{
|
||||||
|
|
|
@ -50,6 +50,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
gw_bierna:['female','qun',4,['gwfengshi']],
|
gw_bierna:['female','qun',4,['gwfengshi']],
|
||||||
gw_haizhiyezhu:['male','qun',4,['yangfan']],
|
gw_haizhiyezhu:['male','qun',4,['yangfan']],
|
||||||
gw_nitelila:['male','wei',4,['shuangxi']],
|
gw_nitelila:['male','wei',4,['shuangxi']],
|
||||||
|
|
||||||
|
gw_linjing:['male','wu',4,['gwyewu']],
|
||||||
},
|
},
|
||||||
characterIntro:{
|
characterIntro:{
|
||||||
gw_huoge:'那个老年痴呆?不知道他是活着还是已经被制成标本了!',
|
gw_huoge:'那个老年痴呆?不知道他是活着还是已经被制成标本了!',
|
||||||
|
@ -65,6 +67,66 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
gw_yioufeisi:'国王还是乞丐,两者有何区别,人类少一个算一个',
|
gw_yioufeisi:'国王还是乞丐,两者有何区别,人类少一个算一个',
|
||||||
},
|
},
|
||||||
skill:{
|
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:{
|
shuangxi:{
|
||||||
enable:'phaseUse',
|
enable:'phaseUse',
|
||||||
round:2,
|
round:2,
|
||||||
|
@ -2225,6 +2287,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
card:{
|
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:{
|
gw_dudayuanshuai1:{
|
||||||
type:'special',
|
type:'special',
|
||||||
fullimage:true,
|
fullimage:true,
|
||||||
|
@ -2304,6 +2379,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
gw_haizhiyezhu:'海之野猪',
|
gw_haizhiyezhu:'海之野猪',
|
||||||
gw_nitelila:'尼斯里拉',
|
gw_nitelila:'尼斯里拉',
|
||||||
|
|
||||||
|
gw_linjing:'林精',
|
||||||
|
gw_nvyemo:'女夜魔',
|
||||||
|
gw_mierjiata:'米尔加塔',
|
||||||
|
|
||||||
|
gw_wuyao:'雾妖',
|
||||||
|
gw_wuyao_info:'在你行动时可当作杀使用;回合结束后,从手牌中消失',
|
||||||
|
gwyewu:'叶舞',
|
||||||
|
gwyewu_info:'出牌阶段限一次,你可以弃置一张牌,并弃置一名随机敌人的一张随机牌;若目标弃置的牌与你弃置的牌颜色相同,则重复发动;每以此法弃置一张敌方角色的牌,你获得一张【雾妖】',
|
||||||
shuangxi:'霜袭',
|
shuangxi:'霜袭',
|
||||||
shuangxi_info:'每两轮限一次,出牌阶段,你可以视为使用一张【刺骨寒霜】;若你在本回合造成过伤害,改为使用【白霜】',
|
shuangxi_info:'每两轮限一次,出牌阶段,你可以视为使用一张【刺骨寒霜】;若你在本回合造成过伤害,改为使用【白霜】',
|
||||||
gwfengshi:'风蚀',
|
gwfengshi:'风蚀',
|
||||||
|
|
|
@ -81,6 +81,7 @@ window.noname_asset_list=[
|
||||||
'image/card/gw_tongdi.jpg',
|
'image/card/gw_tongdi.jpg',
|
||||||
'image/card/gw_tunshi.jpg',
|
'image/card/gw_tunshi.jpg',
|
||||||
'image/card/gw_wenyi.jpg',
|
'image/card/gw_wenyi.jpg',
|
||||||
|
'image/card/gw_wuyao.jpg',
|
||||||
'image/card/gw_xinsheng.jpg',
|
'image/card/gw_xinsheng.jpg',
|
||||||
'image/card/gw_yanziyaoshui.jpg',
|
'image/card/gw_yanziyaoshui.jpg',
|
||||||
'image/card/gw_yigeniyin.jpg',
|
'image/card/gw_yigeniyin.jpg',
|
||||||
|
@ -403,6 +404,7 @@ window.noname_asset_list=[
|
||||||
'image/character/gw_laduoweide.jpg',
|
'image/character/gw_laduoweide.jpg',
|
||||||
'image/character/gw_laomaotou.jpg',
|
'image/character/gw_laomaotou.jpg',
|
||||||
'image/character/gw_laomaotou2.jpg',
|
'image/character/gw_laomaotou2.jpg',
|
||||||
|
'image/character/gw_linjing.jpg',
|
||||||
'image/character/gw_luobo.jpg',
|
'image/character/gw_luobo.jpg',
|
||||||
'image/character/gw_luoqi.jpg',
|
'image/character/gw_luoqi.jpg',
|
||||||
'image/character/gw_meizi.jpg',
|
'image/character/gw_meizi.jpg',
|
||||||
|
|
48
game/game.js
48
game/game.js
|
@ -10430,6 +10430,10 @@
|
||||||
}
|
}
|
||||||
if(event.dialog) event.dialog.close();
|
if(event.dialog) event.dialog.close();
|
||||||
event.resume();
|
event.resume();
|
||||||
|
"step 2"
|
||||||
|
if(event.onresult){
|
||||||
|
event.onresult(event.result);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
chooseCardTarget:function(){
|
chooseCardTarget:function(){
|
||||||
"step 0"
|
"step 0"
|
||||||
|
@ -14442,6 +14446,50 @@
|
||||||
next._args=Array.from(arguments);
|
next._args=Array.from(arguments);
|
||||||
return next;
|
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(){
|
chooseTarget:function(){
|
||||||
var next=game.createEvent('chooseTarget');
|
var next=game.createEvent('chooseTarget');
|
||||||
next.player=this;
|
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'
|
'step 1'
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
var name=result.links[0][2];
|
player.chooseUseTarget(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);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
ai:{
|
ai:{
|
||||||
|
|
Loading…
Reference in New Issue