This commit is contained in:
libccy 2017-05-12 21:29:12 +08:00
parent 3da8829a27
commit c2deb93252
12 changed files with 596 additions and 76 deletions

View File

@ -3,6 +3,330 @@ game.import('card',function(lib,game,ui,get,ai,_status){
return { return {
name:'gwent', name:'gwent',
card:{ card:{
gw_dieyi:{
fullskin:true
},
gw_dieyi_equip1:{
fullskin:true,
vanish:true,
hidden:true,
cardimage:'gw_dieyi',
type:'equip',
subtype:'equip1',
onLose:function(){
lib.skill.gw_dieyi.process(player);
},
loseDelay:false,
skills:[],
ai:{
equipValue:0
}
},
gw_dieyi_equip2:{
fullskin:true,
vanish:true,
hidden:true,
cardimage:'gw_dieyi',
type:'equip',
subtype:'equip2',
onLose:function(){
lib.skill.gw_dieyi.process(player);
},
loseDelay:false,
skills:[],
ai:{
equipValue:0
}
},
gw_dieyi_equip3:{
fullskin:true,
vanish:true,
hidden:true,
cardimage:'gw_dieyi',
type:'equip',
subtype:'equip3',
onLose:function(){
lib.skill.gw_dieyi.process(player);
},
loseDelay:false,
skills:[],
ai:{
equipValue:0
}
},
gw_dieyi_equip4:{
fullskin:true,
vanish:true,
hidden:true,
cardimage:'gw_dieyi',
type:'equip',
subtype:'equip4',
onLose:function(){
lib.skill.gw_dieyi.process(player);
},
loseDelay:false,
skills:[],
ai:{
equipValue:0
}
},
gw_dieyi_equip5:{
fullskin:true,
vanish:true,
hidden:true,
cardimage:'gw_dieyi',
type:'equip',
subtype:'equip5',
onLose:function(){
lib.skill.gw_dieyi.process(player);
},
loseDelay:false,
skills:[],
ai:{
equipValue:0
}
},
gw_dieyi_judge:{
fullskin:true,
vanish:true,
hidden:true,
cardimage:'gw_dieyi',
enable:true,
type:'delay',
filterTarget:true,
effect:function(){
lib.skill.gw_dieyi.process(player);
},
},
gw_hudiewu:{
fullborder:'gold',
type:'spell',
subtype:'spell_gold',
vanish:true,
enable:true,
notarget:true,
contentBefore:function(){
player.$skill('蝴蝶舞','legend','metal');
game.delay(2);
},
content:function(){
'step 0'
event.targets=game.filterPlayer(function(current){
return current.countCards('ej');
}).sortBySeat();
event.targets.remove(player);
'step 1'
if(event.targets.length){
var target=event.targets.shift();
var ej=target.getCards('ej');
player.line(target);
target.removeEquipTrigger();
for(var i=0;i<ej.length;i++){
ui.discardPile.appendChild(game.createCard(ej[i]));
ej[i].init([ej[i].suit,ej[i].number,'gw_dieyi_'+(get.subtype(ej[i])||'judge')]);
}
event.redo();
}
},
contentAfter:function(){
var evt=_status.event.getParent('phaseUse');
if(evt&&evt.name=='phaseUse'){
evt.skipped=true;
}
},
ai:{
value:6,
useful:[6,1],
result:{
player:function(player){
return game.countPlayer(function(current){
if(current==player) return;
return -(current.countCards('e')-current.countCards('j')/3)*get.sgn(get.attitude(player,current));
});
}
},
order:0.7,
}
},
gw_yigeniyin:{
fullborder:'gold',
type:'spell',
subtype:'spell_gold',
vanish:true,
enable:true,
notarget:true,
contentBefore:function(){
player.$skill('伊格尼印','legend','metal');
game.delay(2);
},
content:function(){
'step 0'
var enemies=player.getEnemies();
var target=get.max(enemies,'hp','list').randomGet();
if(target){
player.line(target,'fire');
target.damage('fire');
game.delay();
}
'step 1'
event.targets=game.filterPlayer(function(current){
return current.isMaxHp();
}).sortBySeat();
player.line(event.targets,'fire');
'step 2'
if(event.targets.length){
var target=event.targets.shift();
player.line(target,'fire');
target.damage('fire');
event.redo();
}
},
contentAfter:function(){
var evt=_status.event.getParent('phaseUse');
if(evt&&evt.name=='phaseUse'){
evt.skipped=true;
}
},
ai:{
value:8,
useful:[6,1],
result:{
player:function(player){
var enemies=player.getEnemies();
var players=game.filterPlayer();
var func=function(current){
return current.hp;
};
var max1=get.max(enemies,func);
for(var i=0;i<players.length;i++){
if(players[i].hp==max1){
players.splice(i,1);break;
}
}
var max2=get.max(players,func);
if(max1-1>max2){
return get.damageEffect(get.max(enemies,func,'item'),player,player,'fire');
}
else{
var num;
if(max1>max2){
num=get.sgn(get.damageEffect(get.max(enemies,func,'item'),player,player,'fire'));
}
else if(max1==max2){
num=0;
}
else{
num=1;
}
return num+game.countPlayer(function(current){
if(current.hp>=max2){
return get.sgn(get.damageEffect(current,player,player,'fire'));
}
});
}
}
},
order:0.7,
}
},
gw_leizhoushu:{
fullborder:'gold',
type:'spell',
subtype:'spell_gold',
vanish:true,
enable:true,
notarget:true,
contentBefore:function(){
player.$skill('雷咒术','legend','metal');
game.delay(2);
},
content:function(){
if(player.hasSkill('gw_leizhoushu')){
if(typeof player.storage.gw_leizhoushu!='number'){
player.storage.gw_leizhoushu=2;
}
else{
player.storage.gw_leizhoushu++;
}
player.syncStorage('gw_leizhoushu');
player.updateMarks();
}
else{
player.addSkill('gw_leizhoushu');
}
},
contentAfter:function(){
var evt=_status.event.getParent('phaseUse');
if(evt&&evt.name=='phaseUse'){
evt.skipped=true;
}
},
ai:{
value:8,
useful:[6,1],
result:{
player:function(player){
return game.countPlayer(function(current){
if(current!=player&&current.isMaxHandcard()){
return -get.sgn(get.attitude(player,current));
}
});
}
},
order:0.5,
}
},
gw_aerdeyin:{
fullborder:'gold',
type:'spell',
subtype:'spell_gold',
vanish:true,
enable:true,
notarget:true,
contentBefore:function(){
player.$skill('阿尔德印','legend','metal');
game.delay(2);
},
content:function(){
'step 0'
var list=game.filterPlayer(function(current){
return get.distance(player,current,'pure')==1;
});
event.list=list.sortBySeat();
'step 1'
if(event.list.length){
var target=event.list.shift();
player.line(target,'green');
target.damage();
target.draw(false);
target.$draw();
target.turnOver();
event.redo();
}
'step 2'
game.delay();
},
contentAfter:function(){
var evt=_status.event.getParent('phaseUse');
if(evt&&evt.name=='phaseUse'){
evt.skipped=true;
}
},
ai:{
value:8,
useful:[6,1],
result:{
player:function(player){
return game.countPlayer(function(current){
if(get.distance(player,current,'pure')==1){
return -get.attitude(player,current);
}
});
}
},
order:0.5,
}
},
gw_ansha:{ gw_ansha:{
fullborder:'gold', fullborder:'gold',
type:'spell', type:'spell',
@ -27,7 +351,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
if(list.length){ if(list.length){
var target=list.randomGet(); var target=list.randomGet();
player.line(target); player.line(target);
target.die()._triggered=null; target.die();
} }
}, },
contentAfter:function(){ contentAfter:function(){
@ -62,9 +386,9 @@ game.import('card',function(lib,game,ui,get,ai,_status){
}, },
content:function(){ content:function(){
'step 0' 'step 0'
var target=game.findMax(game.filterPlayer(function(current){ var target=get.max(game.filterPlayer(function(current){
return !current.isUnseen(); return !current.isUnseen();
}).randomSort(),function(current){ },'list').randomSort(),function(current){
var att=get.attitude(player,current); var att=get.attitude(player,current);
var rank=get.rank(current,true); var rank=get.rank(current,true);
if(current.maxHp>=3){ if(current.maxHp>=3){
@ -759,6 +1083,87 @@ game.import('card',function(lib,game,ui,get,ai,_status){
} }
}, },
skill:{ skill:{
gw_dieyi:{
init:function(player){
player.storage.gw_dieyi=1;
},
onremove:true,
trigger:{global:'phaseEnd'},
forced:true,
mark:true,
process:function(player){
if(player.hasSkill('gw_dieyi')){
player.storage.gw_dieyi++;
}
else{
player.addSkill('gw_dieyi');
}
player.syncStorage('gw_dieyi');
player.updateMarks();
},
intro:{
content:'在下一个结束阶段,你随机弃置#张牌'
},
content:function(){
player.randomDiscard(player.storage.gw_dieyi);
player.removeSkill('gw_dieyi');
}
},
gw_leizhoushu:{
mark:true,
intro:{
content:function(storage,player){
if(storage>=2){
return '在每个准备阶段令牌数为全场最多的所有其他角色各随机弃置一张牌(重复'+storage+'次)';
}
else{
return '在每个准备阶段令牌数为全场最多的所有其他角色各随机弃置一张牌';
}
}
},
trigger:{player:'phaseBegin'},
forced:true,
filter:function(event,player){
var list=game.filterPlayer();
for(var i=0;i<list.length;i++){
if(list[i]!=player&&list[i].countCards('he')) return true;
}
return false;
},
content:function(){
'step 0'
if(typeof player.storage.gw_leizhoushu=='number'){
event.num=player.storage.gw_leizhoushu;
}
else{
event.num=1;
}
'step 1'
if(event.num){
var max=0;
var maxp=null;
var list=game.filterPlayer(function(current){
return current.isMaxCard();
}).sortBySeat();
list.remove(player);
if(!list.length){
event.finish();
return;
}
player.line(list,'green');
for(var i=0;i<list.length;i++){
list[i].randomDiscard(false);
}
}
else{
event.finish();
}
'step 2'
event.num--;
event.goto(1);
game.delay();
}
},
_gw_zirankuizeng:{ _gw_zirankuizeng:{
trigger:{player:'useCard'}, trigger:{player:'useCard'},
forced:true, forced:true,
@ -819,7 +1224,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
'昆特牌':'<ul><li>法术为分金、银、铜三类,金卡和银卡不出现在牌堆中<li>'+ '昆特牌':'<ul><li>法术为分金、银、铜三类,金卡和银卡不出现在牌堆中<li>'+
'摸牌阶段有一定概率摸到银卡在16个摸牌阶段中至少会摸到2张银卡<li>'+ '摸牌阶段有一定概率摸到银卡在16个摸牌阶段中至少会摸到2张银卡<li>'+
'摸牌阶段有一定概率摸到金卡在16个摸牌阶段中至少会摸到1张金卡<li>'+ '摸牌阶段有一定概率摸到金卡在16个摸牌阶段中至少会摸到1张金卡<li>'+
'金卡造成的任何效果不会触发相关技能,金卡无视调虎离山、潜行等免疫效果<li>'+ '金卡无视调虎离山、潜行等免疫目标的效果<li>'+
'进行洗牌时金卡、银卡将从弃牌堆中消失,不进入牌堆' '进行洗牌时金卡、银卡将从弃牌堆中消失,不进入牌堆'
}, },
translate:{ translate:{
@ -827,8 +1232,29 @@ game.import('card',function(lib,game,ui,get,ai,_status){
spell_gold:'金卡法术', spell_gold:'金卡法术',
spell_silver:'银卡法术', spell_silver:'银卡法术',
spell_bronze:'铜卡法术', spell_bronze:'铜卡法术',
gw_dieyi:'蝶翼',
gw_dieyi_equip1:'蝶翼·器',
gw_dieyi_equip2:'蝶翼·衣',
gw_dieyi_equip3:'蝶翼·攻',
gw_dieyi_equip4:'蝶翼·防',
gw_dieyi_equip5:'蝶翼·宝',
gw_dieyi_judge:'蝶翼·判',
gw_dieyi_equip1_info:'在你从装备区中失去此牌后,你于下一个结束阶段随机弃置一张牌',
gw_dieyi_equip2_info:'在你从装备区中失去此牌后,你于下一个结束阶段随机弃置一张牌',
gw_dieyi_equip3_info:'在你从装备区中失去此牌后,你于下一个结束阶段随机弃置一张牌',
gw_dieyi_equip4_info:'在你从装备区中失去此牌后,你于下一个结束阶段随机弃置一张牌',
gw_dieyi_equip5_info:'在你从装备区中失去此牌后,你于下一个结束阶段随机弃置一张牌',
gw_dieyi_judge_info:'判定阶段移去此牌,并于下一个结束阶段随机弃置一张牌',
gw_hudiewu:'蝴蝶舞',
gw_hudiewu_info:'将其他角色在场上的所有牌替换为蝶翼(在你失去蝶翼后,你于下一个结束阶段随机弃置一张牌),然后结束出牌阶段',
gw_yigeniyin:'伊格尼印',
gw_yigeniyin_info:'对敌方角色中体力值最大一名随机角色造成一点火焰伤害,然后对场上体力值最大的所有角色各造成一点火焰伤害,然后结束出牌阶段',
gw_leizhoushu:'雷咒术',
gw_leizhoushu_info:'获得技能雷咒术(在每个准备阶段令全场牌数最多的所有其他角色各随机弃置一张牌,重复获得时效果叠加),然后结束出牌阶段',
gw_aerdeyin:'阿尔德印',
gw_aerdeyin_info:'对相邻的角色造成一点伤害,目标摸一张牌并翻面,然后结束出牌阶段',
gw_xinsheng:'新生', gw_xinsheng:'新生',
gw_xinsheng_info:'随机观看12张武将牌选择一张替代一名角色的武将牌不触发技能然后结束出牌阶段', gw_xinsheng_info:'随机观看12张武将牌选择一张替代一名角色的武将牌,然后结束出牌阶段',
gw_zhongmozhizhan:'终末之战', gw_zhongmozhizhan:'终末之战',
gw_zhongmozhizhan_info:'将所有角色区域内的所有牌置入弃牌堆(不触发技能),然后结束出牌阶段', gw_zhongmozhizhan_info:'将所有角色区域内的所有牌置入弃牌堆(不触发技能),然后结束出牌阶段',
gw_butianshu:'卜天术', gw_butianshu:'卜天术',
@ -838,7 +1264,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
gw_niuquzhijing:'纽曲之镜', gw_niuquzhijing:'纽曲之镜',
gw_niuquzhijing_info:'交换全场体力值最大和最小角色的体力值(不触发技能),然后结束出牌阶段', gw_niuquzhijing_info:'交换全场体力值最大和最小角色的体力值(不触发技能),然后结束出牌阶段',
gw_ansha:'暗杀', gw_ansha:'暗杀',
gw_ansha_info:'令一名体力为1的随机敌方角立即死亡(不触发技能),然后结束出牌阶段', gw_ansha_info:'令一名体力为1的随机敌方角立即死亡,然后结束出牌阶段',
gw_shizizhaohuan:'十字召唤', gw_shizizhaohuan:'十字召唤',
gw_shizizhaohuan_info:'从牌堆中获得两张杀以及决斗、火攻、火烧连营、南蛮入侵中的随机一张', gw_shizizhaohuan_info:'从牌堆中获得两张杀以及决斗、火攻、火烧连营、南蛮入侵中的随机一张',
gw_zuihouyuanwang:'最后愿望', gw_zuihouyuanwang:'最后愿望',

View File

@ -66,7 +66,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
hs_xsylvanas:['female','qun',3,['busi','xshixin','xmojian']], hs_xsylvanas:['female','qun',3,['busi','xshixin','xmojian']],
hs_siwangzhiyi:['male','qun',12,['mieshi']], hs_siwangzhiyi:['male','qun',12,['mieshi']],
hs_bilanyoulong:['male','wei',4,['lingzhou']], hs_bilanyoulong:['male','wei',4,['lingzhou']],
hs_jinglinglong:['male','wu',3,['mianyi']], hs_jinglinglong:['male','wu',3,['moyao']],
hs_ruanniguai:['male','wu',3,['nianfu','xiaorong']], hs_ruanniguai:['male','wu',3,['nianfu','xiaorong']],
hs_hudunren:['male','shu',2,['hhudun']], hs_hudunren:['male','shu',2,['hhudun']],
hs_nate:['male','wu',4,['chuidiao']], hs_nate:['male','wu',4,['chuidiao']],
@ -4580,7 +4580,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
} }
} }
}, },
mianyi:{ moyao:{
mod:{ mod:{
targetEnabled:function(card,player,target,now){ targetEnabled:function(card,player,target,now){
if(player!=target){ if(player!=target){
@ -5754,7 +5754,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
ui.discardPile.appendChild(player.storage.bingjia); ui.discardPile.appendChild(player.storage.bingjia);
delete player.storage.bingjia; delete player.storage.bingjia;
player.changeHujia(); player.changeHujia();
player.addTempSkill('bingjia3','phaseAfter'); player.addTempSkill('mianyi','phaseAfter');
}, },
intro:{ intro:{
mark:function(dialog,content,player){ mark:function(dialog,content,player){
@ -5773,28 +5773,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
} }
} }
}, },
bingjia3:{
trigger:{player:'damageBefore'},
mark:true,
forced:true,
content:function(){
trigger.untrigger();
trigger.finish();
},
ai:{
nofire:true,
nothunder:true,
nodamage:true,
effect:{
target:function(card,player,target,current){
if(get.tag(card,'damage')) return [0,0];
}
},
},
intro:{
content:'防止一切伤害'
}
},
bianxing2:{}, bianxing2:{},
zuzhou:{ zuzhou:{
trigger:{player:'phaseBegin'}, trigger:{player:'phaseBegin'},
@ -7826,8 +7804,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
ronghuo_info:'锁定技,你的普通杀均视为火杀', ronghuo_info:'锁定技,你的普通杀均视为火杀',
luoshi:'落石', luoshi:'落石',
luoshi_info:'锁定技,每当你受到一次伤害,你与伤害来源各随机弃置一张牌', luoshi_info:'锁定技,每当你受到一次伤害,你与伤害来源各随机弃置一张牌',
mianyi:'免疫', moyao:'魔耀',
mianyi_info:'锁定技,你不能成为其他角色的普通锦囊牌的目标', moyao_info:'锁定技,你不能成为其他角色的普通锦囊牌的目标',
jiaohui:'教诲', jiaohui:'教诲',
jiaohui_info:'结束阶段,若你没有于本回合内造成伤害,你可以令一名角色摸一张牌或回复一点体力', jiaohui_info:'结束阶段,若你没有于本回合内造成伤害,你可以令一名角色摸一张牌或回复一点体力',
chenshui:'沉睡', chenshui:'沉睡',
@ -7936,8 +7914,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
shengguang_info:'出牌阶段限一次,你可以弃置一张红色牌令一名角色回复一点体力', shengguang_info:'出牌阶段限一次,你可以弃置一张红色牌令一名角色回复一点体力',
bingjia:'冰甲', bingjia:'冰甲',
bingjia2:'冰甲', bingjia2:'冰甲',
bingjia3:'冰甲',
bingjia3_bg:'免',
bingjia_info:'出牌阶段,若你武将牌上没有牌,你可以将一张手牌背面朝上置于你的武将牌上,当你成为其他角色的与此牌花色相同的牌的目标时,你移去此牌,获得一点护甲,并且本回合内防止一切伤害', bingjia_info:'出牌阶段,若你武将牌上没有牌,你可以将一张手牌背面朝上置于你的武将牌上,当你成为其他角色的与此牌花色相同的牌的目标时,你移去此牌,获得一点护甲,并且本回合内防止一切伤害',
bianxing:'变形', bianxing:'变形',
bianxing_info:'当一其他角色于回合内使用卡牌指定了惟一的其他目标后,你可以用一张合理的基本牌替代此牌,每名角色的回合限一次', bianxing_info:'当一其他角色于回合内使用卡牌指定了惟一的其他目标后,你可以用一张合理的基本牌替代此牌,每名角色的回合限一次',

View File

@ -170,7 +170,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}); });
}, },
result:{ result:{
player:1 player:function(player){
if(_status.event.type=='dying'){
return get.attitude(player,_status.event.dying);
}
else{
return 1;
}
}
} }
} }
}, },

View File

@ -54,13 +54,18 @@ window.noname_asset_list=[
'image/card/guohe.png', 'image/card/guohe.png',
'image/card/gw_ansha.png', 'image/card/gw_ansha.png',
'image/card/gw_aozuzhilei.png', 'image/card/gw_aozuzhilei.png',
'image/card/gw_aerdeyin.png',
'image/card/gw_butianshu.png', 'image/card/gw_butianshu.png',
'image/card/gw_dieyi.png',
'image/card/gw_fuyuan.png', 'image/card/gw_fuyuan.png',
'image/card/gw_hudiewu.png',
'image/card/gw_leizhoushu.png',
'image/card/gw_niuquzhijing.png', 'image/card/gw_niuquzhijing.png',
'image/card/gw_poxiao.png', 'image/card/gw_poxiao.png',
'image/card/gw_shizizhaohuan.png', 'image/card/gw_shizizhaohuan.png',
'image/card/gw_tongdi.png', 'image/card/gw_tongdi.png',
'image/card/gw_xinsheng.png', 'image/card/gw_xinsheng.png',
'image/card/gw_yigeniyin.png',
'image/card/gw_youer.png', 'image/card/gw_youer.png',
'image/card/gw_zhihuanjun.png', 'image/card/gw_zhihuanjun.png',
'image/card/gw_zhongmozhizhan.png', 'image/card/gw_zhongmozhizhan.png',

View File

@ -7167,7 +7167,7 @@
lib.cardPack[i]=[]; lib.cardPack[i]=[];
if(card[i].card){ if(card[i].card){
for(var j in card[i].card){ for(var j in card[i].card){
if(card[i].translate[j+'_info']){ if(!card[i].card[j].hidden&&card[i].translate[j+'_info']){
lib.cardPack[i].push(j); lib.cardPack[i].push(j);
} }
} }
@ -8575,6 +8575,7 @@
_lianhuan:'连环', _lianhuan:'连环',
_lianhuan2:'连环', _lianhuan2:'连环',
qianxing:'潜行', qianxing:'潜行',
mianyi:'免疫',
fengyin:'封印', fengyin:'封印',
pause:'暂停', pause:'暂停',
@ -8759,7 +8760,7 @@
lib.cardPack[i]=[]; lib.cardPack[i]=[];
if(card[i].card){ if(card[i].card){
for(var j in card[i].card){ for(var j in card[i].card){
if(card[i].translate[j+'_info']){ if(!card[i].card[j].hidden&&card[i].translate[j+'_info']){
lib.cardPack[i].push(j); lib.cardPack[i].push(j);
} }
} }
@ -9210,12 +9211,21 @@
player.$phaseJudge(event.card); player.$phaseJudge(event.card);
event.cancelled=false; event.cancelled=false;
event.trigger('phaseJudge'); event.trigger('phaseJudge');
player.popup(event.card.viewAs||event.card.name,'thunder'); var name=event.card.viewAs||event.card.name;
player.popup(name,'thunder');
if(!lib.card[name].effect){
game.delay();
event.redo();
}
else if(!lib.card[name].judge){
game.delay();
event.nojudge=true;
}
} }
} }
else event.finish(); else event.finish();
"step 1" "step 1"
if(!event.cancelled) player.judge(event.card).set('type','phase'); if(!event.cancelled&&!event.nojudge) player.judge(event.card).set('type','phase');
"step 2" "step 2"
var name=event.card.viewAs||event.card.name; var name=event.card.viewAs||event.card.name;
if(event.cancelled&&!event.direct){ if(event.cancelled&&!event.direct){
@ -11834,7 +11844,12 @@
source.stat[source.stat.length-1].damage+=num; source.stat[source.stat.length-1].damage+=num;
} }
} }
if(event.notrigger){
player.changeHp(-num,false)._triggered=null;
}
else{
player.changeHp(-num,false); player.changeHp(-num,false);
}
if(event.animate!==false){ if(event.animate!==false){
player.$damage(source); player.$damage(source);
game.broadcastAll(function(nature,player){ game.broadcastAll(function(nature,player){
@ -11849,6 +11864,7 @@
},event.nature,player); },event.nature,player);
player.$damagepop(-num,event.nature); player.$damagepop(-num,event.nature);
} }
if(!event.notrigger){
if(num==0){ if(num==0){
event.trigger('damageZero'); event.trigger('damageZero');
event._triggered=null; event._triggered=null;
@ -11856,6 +11872,7 @@
else{ else{
event.trigger('damage'); event.trigger('damage');
} }
}
"step 2" "step 2"
if(player.hp<=0&&player.isAlive()){ if(player.hp<=0&&player.isAlive()){
game.delayx(); game.delayx();
@ -14457,7 +14474,7 @@
return next; return next;
}, },
randomDiscard:function(){ randomDiscard:function(){
var position='he',num=1; var position='he',num=1,delay=null;
for(var i=0;i<arguments.length;i++){ for(var i=0;i<arguments.length;i++){
if(typeof arguments[i]=='number'){ if(typeof arguments[i]=='number'){
num=arguments[i]; num=arguments[i];
@ -14465,10 +14482,16 @@
else if(get.itemtype(arguments[i])=='select'){ else if(get.itemtype(arguments[i])=='select'){
position=arguments[i]; position=arguments[i];
} }
else if(typeof arguments[i]=='boolean'){
delay=arguments[i];
}
} }
var cards=this.getCards(position).randomGets(num); var cards=this.getCards(position).randomGets(num);
if(cards.length){ if(cards.length){
this.discard(cards); var next=this.discard(cards);
if(typeof delay=='boolean'){
next.delay=delay;
}
} }
return cards; return cards;
}, },
@ -14696,6 +14719,10 @@
else if(arguments[i]=='nosource'){ else if(arguments[i]=='nosource'){
nosource=true; nosource=true;
} }
else if(arguments[i]=='notrigger'){
next._triggered=null;
next.notrigger=true;
}
else if(get.itemtype(arguments[i])=='nature'){ else if(get.itemtype(arguments[i])=='nature'){
next.nature=arguments[i]; next.nature=arguments[i];
} }
@ -16208,6 +16235,32 @@
} }
return true; return true;
}, },
isMaxCard:function(equal){
var nh=this.countCards('he');
for(var i=0;i<game.players.length;i++){
if(game.players[i].isOut()) continue;
if(equal){
if(game.players[i].countCards('he')>=nh) return false;
}
else{
if(game.players[i].countCards('he')>nh) return false;
}
}
return true;
},
isMinCard:function(equal){
var nh=this.countCards('he');
for(var i=0;i<game.players.length;i++){
if(game.players[i].isOut()) continue;
if(equal){
if(game.players[i].countCards('he')<=nh) return false;
}
else{
if(game.players[i].countCards('he')<nh) return false;
}
}
return true;
},
isMaxHandcard:function(equal){ isMaxHandcard:function(equal){
var nh=this.countCards('h'); var nh=this.countCards('h');
for(var i=0;i<game.players.length;i++){ for(var i=0;i<game.players.length;i++){
@ -19225,6 +19278,31 @@
if(player!=target) return false; if(player!=target) return false;
} }
} }
},
mianyi:{
trigger:{player:'damageBefore'},
mark:true,
forced:true,
init:function(player){
game.log(player,'获得了','【免疫】');
},
content:function(){
trigger.untrigger();
trigger.finish();
},
ai:{
nofire:true,
nothunder:true,
nodamage:true,
effect:{
target:function(card,player,target,current){
if(get.tag(card,'damage')) return [0,0];
}
},
},
intro:{
content:'防止一切伤害'
}
}, },
mad:{ mad:{
mark:true, mark:true,
@ -26961,32 +27039,6 @@
} }
return null; return null;
}, },
findMax:function(list,func){
list=list.slice(0);
var list2=[];
list.sort(function(a,b){
return func(b)-func(a);
});
for(var i=0;i<list.length;i++){
if(func(list[i])==func(list[0])){
list2.push(list[i]);
}
}
return list2;
},
findMin:function(list,func){
list=list.slice(0);
var list2=[];
list.sort(function(a,b){
return func(a)-func(b);
});
for(var i=0;i<list.length;i++){
if(func(list[i])==func(list[0])){
list2.push(list[i]);
}
}
return list2;
},
findCards:function(func,all){ findCards:function(func,all){
var cards=[]; var cards=[];
for(var i in lib.card){ for(var i in lib.card){
@ -39730,6 +39782,60 @@
return card; return card;
} }
}, },
max:function(list,func,type){
list=list.slice(0);
if(typeof func=='string'){
var key=func;
func=function(item){
return item[key];
}
}
list.sort(function(a,b){
return func(b)-func(a);
});
if(type=='list'){
var list2=[];
for(var i=0;i<list.length;i++){
if(func(list[i])==func(list[0])){
list2.push(list[i]);
}
}
return list2;
}
else if(type=='item'){
return list[0];
}
else{
return func(list[0]);
}
},
min:function(list,func,type){
list=list.slice(0);
if(typeof func=='string'){
var key=func;
func=function(item){
return item[key];
}
}
list.sort(function(a,b){
return func(a)-func(b);
});
if(type=='list'){
var list2=[];
for(var i=0;i<list.length;i++){
if(func(list[i])==func(list[0])){
list2.push(list[i]);
}
}
return list2;
}
else if(type=='item'){
return list[0];
}
else{
return func(list[0]);
}
},
character:function(name,num){ character:function(name,num){
var info=lib.character[name]; var info=lib.character[name];
if(!info){ if(!info){

BIN
image/card/gw_aerdeyin.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

BIN
image/card/gw_dieyi.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

BIN
image/card/gw_hudiewu.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 58 KiB

BIN
image/card/gw_yigeniyin.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 58 KiB