316
card/gwent.js
|
@ -3,6 +3,48 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
return {
|
||||
name:'gwent',
|
||||
card:{
|
||||
gw_ansha:{
|
||||
fullborder:'gold',
|
||||
type:'spell',
|
||||
subtype:'spell_gold',
|
||||
vanish:true,
|
||||
enable:function(card,player){
|
||||
var enemies=player.getEnemies();
|
||||
return game.hasPlayer(function(current){
|
||||
return current.hp==1&&enemies.contains(current);
|
||||
});
|
||||
},
|
||||
notarget:true,
|
||||
contentBefore:function(){
|
||||
player.$skill('暗杀','legend','metal');
|
||||
game.delay(2);
|
||||
},
|
||||
content:function(){
|
||||
var enemies=player.getEnemies();
|
||||
var list=game.filterPlayer(function(current){
|
||||
return current.hp==1&&enemies.contains(current);
|
||||
});
|
||||
if(list.length){
|
||||
var target=list.randomGet();
|
||||
player.line(target);
|
||||
target.die()._triggered=null;
|
||||
}
|
||||
},
|
||||
contentAfter:function(){
|
||||
var evt=_status.event.getParent('phaseUse');
|
||||
if(evt&&evt.name=='phaseUse'){
|
||||
evt.skipped=true;
|
||||
}
|
||||
},
|
||||
ai:{
|
||||
value:8,
|
||||
useful:[6,1],
|
||||
result:{
|
||||
player:1
|
||||
},
|
||||
order:0.6,
|
||||
}
|
||||
},
|
||||
gw_xinsheng:{
|
||||
fullborder:'gold',
|
||||
type:'spell',
|
||||
|
@ -252,6 +294,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
order:0.5,
|
||||
}
|
||||
},
|
||||
|
||||
gw_butianshu:{
|
||||
fullborder:'silver',
|
||||
type:'spell',
|
||||
|
@ -321,6 +364,109 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
order:6,
|
||||
}
|
||||
},
|
||||
gw_shizizhaohuan:{
|
||||
fullborder:'silver',
|
||||
type:'spell',
|
||||
subtype:'spell_silver',
|
||||
vanish:true,
|
||||
enable:true,
|
||||
filterTarget:function(card,player,target){
|
||||
return target==player;
|
||||
},
|
||||
selectTarget:-1,
|
||||
contentBefore:function(){
|
||||
player.$skill('十字召唤','legend','water');
|
||||
game.delay(2);
|
||||
},
|
||||
content:function(){
|
||||
var list=[];
|
||||
list.push(get.cardPile('sha','cardPile'));
|
||||
list.push(get.cardPile('shan','cardPile'));
|
||||
list.push(get.cardPile('tao','cardPile'));
|
||||
list.push(get.cardPile('jiu','cardPile'));
|
||||
if(list.length){
|
||||
player.gain(list,'gain2');
|
||||
}
|
||||
},
|
||||
ai:{
|
||||
value:8,
|
||||
useful:[6,1],
|
||||
result:{
|
||||
player:1
|
||||
},
|
||||
order:6,
|
||||
}
|
||||
},
|
||||
gw_zuihouyuanwang:{
|
||||
fullborder:'silver',
|
||||
type:'spell',
|
||||
subtype:'spell_silver',
|
||||
vanish:true,
|
||||
enable:true,
|
||||
filterTarget:function(card,player,target){
|
||||
return target==player;
|
||||
},
|
||||
selectTarget:-1,
|
||||
contentBefore:function(){
|
||||
player.$skill('最后愿望','legend','water');
|
||||
game.delay(2);
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
event.num=game.countPlayer();
|
||||
player.draw(event.num);
|
||||
'step 1'
|
||||
player.chooseToDiscard(true,event.num,'he');
|
||||
},
|
||||
ai:{
|
||||
value:6,
|
||||
useful:[4,1],
|
||||
result:{
|
||||
player:1
|
||||
},
|
||||
order:7,
|
||||
}
|
||||
},
|
||||
gw_zirankuizeng:{
|
||||
fullborder:'silver',
|
||||
type:'spell',
|
||||
subtype:'spell_silver',
|
||||
vanish:true,
|
||||
enable:function(card,player){
|
||||
if(!player.storage.gw_zirankuizeng) return false;
|
||||
var evtcard=player.storage.gw_zirankuizeng[0];
|
||||
var targets=player.storage.gw_zirankuizeng[1];
|
||||
if(!lib.filter.cardEnabled(evtcard,player)) return false;
|
||||
for(var i=0;i<targets.length;i++){
|
||||
if(!targets[i].isIn()) return false;
|
||||
if(!player.canUse(evtcard,targets[i],false)){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
},
|
||||
notarget:true,
|
||||
contentBefore:function(){
|
||||
player.$skill('自然馈赠','legend','water');
|
||||
game.delay(2);
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
var info=player.storage.gw_zirankuizeng;
|
||||
player.useCard(game.createCard(info[0]),info[1]);
|
||||
'step 1'
|
||||
player.draw();
|
||||
},
|
||||
ai:{
|
||||
value:6,
|
||||
useful:[4,1],
|
||||
result:{
|
||||
player:1
|
||||
},
|
||||
order:7,
|
||||
}
|
||||
},
|
||||
|
||||
gw_zhihuanjun:{
|
||||
fullborder:'bronze',
|
||||
type:'spell',
|
||||
|
@ -334,6 +480,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
ai:{
|
||||
value:4,
|
||||
useful:[3,1],
|
||||
result:{
|
||||
target:function(player,target){
|
||||
if(target.maxHp-target.hp==1){
|
||||
|
@ -346,9 +493,144 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
},
|
||||
order:8,
|
||||
}
|
||||
},
|
||||
gw_zumoshoukao:{
|
||||
fullborder:'bronze',
|
||||
type:'spell',
|
||||
subtype:'spell_bronze',
|
||||
enable:true,
|
||||
filterTarget:true,
|
||||
content:function(){
|
||||
target.addTempSkill('fengyin',{player:'phaseAfter'});
|
||||
if(target.hujia){
|
||||
target.changeHujia(-target.hujia);
|
||||
}
|
||||
},
|
||||
ai:{
|
||||
value:4,
|
||||
useful:[4,1],
|
||||
result:{
|
||||
target:function(player,target){
|
||||
var threaten=ai.get.threaten(target,player,true);
|
||||
if(target.hujia){
|
||||
threaten*=(target.hujia+1);
|
||||
}
|
||||
return -threaten;
|
||||
}
|
||||
},
|
||||
order:9.5,
|
||||
}
|
||||
},
|
||||
gw_aozuzhilei:{
|
||||
fullborder:'bronze',
|
||||
type:'spell',
|
||||
subtype:'spell_bronze',
|
||||
enable:true,
|
||||
cardnature:'thunder',
|
||||
filterTarget:function(card,player,target){
|
||||
return target.hp>=player.hp;
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
target.damage('thunder');
|
||||
'step 1'
|
||||
if(target.isIn()){
|
||||
target.draw();
|
||||
}
|
||||
},
|
||||
ai:{
|
||||
basic:{
|
||||
order:1.8,
|
||||
value:[6,1],
|
||||
useful:[4,1],
|
||||
},
|
||||
result:{
|
||||
target:-1
|
||||
},
|
||||
tag:{
|
||||
damage:1,
|
||||
thunderDamage:1,
|
||||
natureDamage:1,
|
||||
}
|
||||
}
|
||||
},
|
||||
gw_poxiao:{
|
||||
fullborder:'bronze',
|
||||
type:'spell',
|
||||
subtype:'spell_bronze',
|
||||
enable:true,
|
||||
notarget:true,
|
||||
content:function(){
|
||||
'step 0'
|
||||
var choice=1;
|
||||
if(game.countPlayer(function(current){
|
||||
if(current.countCards('j')){
|
||||
if(get.attitude(player,current)>0){
|
||||
choice=0;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
})){
|
||||
player.chooseControl().set('choiceList',[
|
||||
'弃置一名角色判定区内的所有牌',
|
||||
'随机获得一张铜卡法术(破晓除外)并展示之'
|
||||
],function(){
|
||||
return choice;
|
||||
});
|
||||
}
|
||||
else{
|
||||
event.directfalse=true;
|
||||
}
|
||||
'step 1'
|
||||
if(!event.directfalse&&result.index==0){
|
||||
player.chooseTarget(true,'弃置一名角色判定区内的所有牌',function(card,player,target){
|
||||
return target.countCards('j');
|
||||
}).ai=function(target){
|
||||
return get.attitude(player,target)*target.countCards('j');
|
||||
};
|
||||
}
|
||||
else{
|
||||
var list=get.libCard(function(info,name){
|
||||
return name!='gw_poxiao'&&info.subtype=='spell_bronze';
|
||||
});
|
||||
if(list.length){
|
||||
player.gain(game.createCard(list.randomGet()),'gain2');
|
||||
}
|
||||
else{
|
||||
player.draw();
|
||||
}
|
||||
event.finish();
|
||||
}
|
||||
'step 2'
|
||||
if(result.targets[0]){
|
||||
player.line(result.targets[0],'green');
|
||||
result.targets[0].discard(result.targets[0].getCards('j'));
|
||||
}
|
||||
},
|
||||
ai:{
|
||||
order:4,
|
||||
useful:[3,1],
|
||||
result:{
|
||||
player:1,
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
skill:{
|
||||
_gw_zirankuizeng:{
|
||||
trigger:{player:'useCard'},
|
||||
forced:true,
|
||||
popup:false,
|
||||
silent:true,
|
||||
filter:function(event,player){
|
||||
if(get.info(event.card).complexTarget) return false;
|
||||
if(!event.targets) return false;
|
||||
return (get.type(event.card)=='trick'&&event.cards[0]&&event.cards[0]==event.card);
|
||||
},
|
||||
content:function(){
|
||||
player.storage.gw_zirankuizeng=[trigger.cards[0],trigger.targets.concat(trigger.addedTargets||[])];
|
||||
}
|
||||
},
|
||||
_gainspell:{
|
||||
trigger:{player:'drawBegin'},
|
||||
forced:true,
|
||||
|
@ -362,7 +644,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
if(!player.storage.spell_gain||Math.max.apply(null,player.storage.spell_gain)<0){
|
||||
var tmp=player.storage.spell_gain2;
|
||||
player.storage.spell_gain=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15].randomGets(3);
|
||||
player.storage.spell_gain2=15-Math.max.apply(null,player.storage.spell_gain);
|
||||
player.storage.spell_gain2=Math.floor((15-Math.max.apply(null,player.storage.spell_gain))/2);
|
||||
if(tmp){
|
||||
for(var i=0;i<3;i++){
|
||||
player.storage.spell_gain[i]+=tmp;
|
||||
|
@ -395,6 +677,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
'昆特牌':'<ul><li>法术为分金、银、铜三类,金卡和银卡不出现在牌堆中<li>'+
|
||||
'摸牌阶段有一定概率摸到银卡,在16个摸牌阶段中至少会摸到2张银卡<li>'+
|
||||
'摸牌阶段有一定概率摸到金卡,在16个摸牌阶段中至少会摸到1张金卡<li>'+
|
||||
'金卡造成的任何效果不会触发相关技能,金卡无视调虎离山、潜行等免疫效果<li>'+
|
||||
'进行洗牌时金卡、银卡将从弃牌堆中消失,不进入牌堆'
|
||||
},
|
||||
translate:{
|
||||
|
@ -403,15 +686,31 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
spell_silver:'银卡法术',
|
||||
spell_bronze:'铜卡法术',
|
||||
gw_xinsheng:'新生',
|
||||
gw_xinsheng_info:'结束出牌阶段,随机观看12张武将牌,选择一张替代一名角色的武将牌',
|
||||
gw_xinsheng_info:'随机观看12张武将牌,选择一张替代一名角色的武将牌(不触发技能),然后结束出牌阶段',
|
||||
gw_zhongmozhizhan:'终末之战',
|
||||
gw_zhongmozhizhan_info:'结束出牌阶段,将所有角色区域内的所有牌置入弃牌堆,无视免疫效果且不触发技能',
|
||||
gw_zhongmozhizhan_info:'将所有角色区域内的所有牌置入弃牌堆(不触发技能),然后结束出牌阶段',
|
||||
gw_butianshu:'卜天术',
|
||||
gw_butianshu_info:'出牌阶段对任意角色使用,将任意一张延时锦囊牌置入其判定区',
|
||||
gw_zhihuanjun:'致幻菌',
|
||||
gw_zhihuanjun_info:'出牌阶段对一名已受伤角色使用,令其减少一点体力上限',
|
||||
gw_niuquzhijing:'纽曲之镜',
|
||||
gw_niuquzhijing_info:'结束出牌阶段,交换全场体力值最大和最小角色的体力值,无视免疫效果且不触发技能',
|
||||
gw_niuquzhijing_info:'交换全场体力值最大和最小角色的体力值(不触发技能),然后结束出牌阶段',
|
||||
gw_ansha:'暗杀',
|
||||
gw_ansha_info:'令一名体力为1的随机敌方角立即死亡(不触发技能),然后结束出牌阶段',
|
||||
gw_shizizhaohuan:'十字召唤',
|
||||
gw_shizizhaohuan_info:'从牌堆中获得一张杀、一张闪和一张桃和一张酒',
|
||||
gw_zuihouyuanwang:'最后愿望',
|
||||
gw_zuihouyuanwang_info:'摸X张牌并弃置X张牌,X为存活角色数',
|
||||
gw_zirankuizeng:'自然馈赠',
|
||||
gw_zirankuizeng_info:'重新结算一次你上一张使用的非转化普通锦囊牌,然后摸一张牌',
|
||||
gw_poxiao:'破晓',
|
||||
gw_poxiao_info:'选择一项:弃置一名角色判定区内的所有牌,或随机获得一张铜卡法术(破晓除外)并展示之',
|
||||
gw_baoxueyaoshui:'暴雪药水',
|
||||
gw_baoxueyaoshui_info:'令一名角色摸两张牌并翻面',
|
||||
gw_zumoshoukao:'阻魔手铐',
|
||||
gw_zumoshoukao_info:'令一名角色失去所有护甲且非锁定技失效直到下一回合结束',
|
||||
gw_aozuzhilei:'奥祖之雷',
|
||||
gw_aozuzhilei_info:'对一名体力值不小于你的角色造成一点雷属性伤害,然后该角色摸一张牌',
|
||||
},
|
||||
cardType:{
|
||||
spell:0.5,
|
||||
|
@ -422,6 +721,15 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
list:[
|
||||
['club',3,'gw_zhihuanjun'],
|
||||
['spade',2,'gw_zhihuanjun'],
|
||||
|
||||
['heart',7,'gw_poxiao'],
|
||||
['diamond',4,'gw_poxiao'],
|
||||
|
||||
['spade',9,'gw_aozuzhilei','thunder'],
|
||||
['club',7,'gw_aozuzhilei','thunder'],
|
||||
|
||||
['club',1,'gw_zumoshoukao'],
|
||||
['spade',1,'gw_zumoshoukao'],
|
||||
],
|
||||
};
|
||||
});
|
||||
|
|
|
@ -21,7 +21,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
|||
basic:{
|
||||
order:1.8,
|
||||
value:[6,1],
|
||||
useful:2,
|
||||
useful:[4,1],
|
||||
},
|
||||
result:{
|
||||
player:function(player,target){
|
||||
|
|
|
@ -913,6 +913,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
|||
quanzhang:'权杖',
|
||||
quanzhang_backup:'权杖',
|
||||
quanzhang_info:'出牌阶段限一次,你可以观看牌堆顶的6张牌,并选择一张使用',
|
||||
|
||||
chaoyong:'潮涌',
|
||||
chaoyong_info:'准备阶段,你可以弃置一张牌,视为对所有敌方角色使用一张南蛮入侵或万箭齐发',
|
||||
}
|
||||
};
|
||||
});
|
||||
|
|
|
@ -52,10 +52,18 @@ window.noname_asset_list=[
|
|||
'image/card/guiyanfadao.png',
|
||||
'image/card/guilingzhitao.png',
|
||||
'image/card/guohe.png',
|
||||
'image/card/gw_ansha.png',
|
||||
'image/card/gw_aozuzhilei.png',
|
||||
'image/card/gw_butianshu.png',
|
||||
'image/card/gw_niuquzhijing.png',
|
||||
'image/card/gw_poxiao.png',
|
||||
'image/card/gw_shizizhaohuan.png',
|
||||
'image/card/gw_xinsheng.png',
|
||||
'image/card/gw_zhihuanjun.png',
|
||||
'image/card/gw_zhongmozhizhan.png',
|
||||
'image/card/gw_zirankuizeng.png',
|
||||
'image/card/gw_zuihouyuanwang.png',
|
||||
'image/card/gw_zumoshoukao.png',
|
||||
'image/card/hanbing.png',
|
||||
'image/card/haotianta.png',
|
||||
'image/card/heilonglinpian.png',
|
||||
|
|
55
game/game.js
|
@ -41206,27 +41206,29 @@
|
|||
return ui.cardPile.childNodes[i];
|
||||
}
|
||||
}
|
||||
for(var i=0;i<ui.discardPile.childNodes.length;i++){
|
||||
if(filter(ui.discardPile.childNodes[i])){
|
||||
return ui.discardPile.childNodes[i];
|
||||
}
|
||||
}
|
||||
if(create=='field'){
|
||||
var found=null;
|
||||
game.findPlayer(function(current){
|
||||
var ej=current.getCards('ej');
|
||||
for(var i=0;i<ej.length;i++){
|
||||
if(filter(ej[i])){
|
||||
found=ej[i];
|
||||
return true;
|
||||
}
|
||||
if(create!='cardPile'){
|
||||
for(var i=0;i<ui.discardPile.childNodes.length;i++){
|
||||
if(filter(ui.discardPile.childNodes[i])){
|
||||
return ui.discardPile.childNodes[i];
|
||||
}
|
||||
});
|
||||
return found;
|
||||
}
|
||||
if(create=='field'){
|
||||
var found=null;
|
||||
game.findPlayer(function(current){
|
||||
var ej=current.getCards('ej');
|
||||
for(var i=0;i<ej.length;i++){
|
||||
if(filter(ej[i])){
|
||||
found=ej[i];
|
||||
return true;
|
||||
}
|
||||
}
|
||||
});
|
||||
return found;
|
||||
}
|
||||
else if(create){
|
||||
return game.createCard(name);
|
||||
}
|
||||
}
|
||||
else if(create){
|
||||
return game.createCard(name);
|
||||
}
|
||||
return null;
|
||||
},
|
||||
aiStrategy:function(){
|
||||
|
@ -42143,9 +42145,12 @@
|
|||
}
|
||||
return links;
|
||||
},
|
||||
threaten:function(target,player){
|
||||
threaten:function(target,player,hp){
|
||||
var threaten=1;
|
||||
var skills=target.getSkills();
|
||||
if(!player&&player!==false){
|
||||
player=_status.event.player;
|
||||
}
|
||||
for(var i=0;i<skills.length;i++){
|
||||
var info=get.info(skills[i]);
|
||||
if(info&&info.ai&&info.ai.threaten){
|
||||
|
@ -42160,6 +42165,16 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
if(hp){
|
||||
switch(target.hp){
|
||||
case 0:threaten*=1.5;break;
|
||||
case 1:threaten*=1.2;break;
|
||||
}
|
||||
switch(target.countCards('h')){
|
||||
case 0:threaten*=1.5;break;
|
||||
case 1:threaten*=1.2;break;
|
||||
}
|
||||
}
|
||||
return threaten;
|
||||
},
|
||||
attitude:function(from,to){
|
||||
|
|
After Width: | Height: | Size: 71 KiB |
After Width: | Height: | Size: 62 KiB |
After Width: | Height: | Size: 66 KiB |
After Width: | Height: | Size: 72 KiB |
Before Width: | Height: | Size: 408 KiB After Width: | Height: | Size: 65 KiB |
After Width: | Height: | Size: 66 KiB |
After Width: | Height: | Size: 72 KiB |
After Width: | Height: | Size: 43 KiB |