From b18b1959473a36a78c72dcf2033e86d2979853a6 Mon Sep 17 00:00:00 2001 From: libccy Date: Thu, 11 May 2017 03:08:28 +0800 Subject: [PATCH] 4 --- card/gwent.js | 258 ++++++++++++++++++++++- card/swd.js | 6 + character/swd.js | 44 ++-- game/asset.js | 7 + game/game.js | 109 +++++++++- image/card/gw_butianshu.jpg | Bin 0 -> 50637 bytes image/card/gw_niuquzhijing.jpg | Bin 0 -> 52120 bytes image/card/gw_zhihuanjun.jpg | Bin 0 -> 48034 bytes image/card/gw_zhongmozhizhan.jpg | Bin 0 -> 66923 bytes layout/default/layout.css | 51 +++++ theme/style/card/image/border_bronze.jpg | Bin 0 -> 81530 bytes theme/style/card/image/border_gold.jpg | Bin 0 -> 84321 bytes theme/style/card/image/border_silver.jpg | Bin 0 -> 72851 bytes 13 files changed, 449 insertions(+), 26 deletions(-) create mode 100644 image/card/gw_butianshu.jpg create mode 100644 image/card/gw_niuquzhijing.jpg create mode 100644 image/card/gw_zhihuanjun.jpg create mode 100644 image/card/gw_zhongmozhizhan.jpg create mode 100644 theme/style/card/image/border_bronze.jpg create mode 100644 theme/style/card/image/border_gold.jpg create mode 100644 theme/style/card/image/border_silver.jpg diff --git a/card/gwent.js b/card/gwent.js index 6b6b3071e..8a97d625a 100644 --- a/card/gwent.js +++ b/card/gwent.js @@ -3,15 +3,269 @@ game.import('card',function(lib,game,ui,get,ai,_status){ return { name:'gwent', card:{ - + gw_niuquzhijing:{ + fullborder:'gold', + type:'spell', + subtype:'spell_gold', + vanish:true, + enable:function(card,player){ + if(game.hasPlayer(function(current){ + return current.hp!=player.hp; + })){ + return !player.storage.spell_gold; + } + }, + filterTarget:function(card,player,target){ + return target.isHighestHp()||target.isLowestHp(); + }, + chongzhu:function(event,player){ + return player.storage.spell_gold?true:false; + }, + selectTarget:-1, + multitarget:true, + multiline:true, + contentBefore:function(){ + player.$skill('纽曲之镜','legend','metal'); + game.delay(2); + }, + content:function(){ + var max=null,min=null; + for(var i=0;i0){ + if(button.link[2]=='bingliang'){ + if(bing) return 2; + return 0.7; + } + if(button.link[2]=='lebu'){ + return 1; + } + if(button.link[2]=='guiyoujie'){ + return 0.5; + } + if(button.link[2]=='caomu'){ + return 0.3; + } + return 0.2; + } + return 0; + }).filterButton=function(button){ + return !target.hasJudge(button.link[2]); + }; + 'step 1' + var card=game.createCard(result.links[0][2]); + event.judgecard=card; + target.$draw(card); + game.delay(0.7); + 'step 2' + target.addJudge(event.judgecard); + }, + contentAfter:function(){ + if(player.storage.spell_silver==1){ + player.storage.spell_silver=2; + } + else{ + player.storage.spell_silver=1; + } + }, + ai:{ + value:8, + result:{ + player:function(player,target){ + var eff=0; + for(var i in lib.card){ + if(lib.card[i].type=='delay'){ + var current=ai.get.effect(target,{name:i},player,player); + if(current>eff){ + eff=current; + } + } + } + return eff; + } + }, + order:6, + } + }, + gw_zhihuanjun:{ + fullborder:'bronze', + type:'spell', + subtype:'spell_bronze', + enable:true, + filterTarget:function(card,player,target){ + return target.isDamaged(); + }, + content:function(){ + target.loseMaxHp(true); + }, + ai:{ + value:4, + result:{ + target:function(player,target){ + if(target.maxHp-target.hp==1){ + return -1/target.maxHp; + } + else{ + return -1/target.maxHp/3; + } + } + }, + order:8, + } + } }, skill:{ + }, + help:{ + '昆特牌':'