diff --git a/character/yijiang.js b/character/yijiang.js index 441dde8f9..bab253ab2 100755 --- a/character/yijiang.js +++ b/character/yijiang.js @@ -1349,7 +1349,7 @@ character.yijiang={ }, zhanjue2:{ audio:false, - trigger:{player:'phaseBegin'}, + trigger:{player:'phaseBefore'}, forced:true, popup:false, silent:true, diff --git a/game/config.js b/game/config.js index c00bd9c3b..da592ed95 100755 --- a/game/config.js +++ b/game/config.js @@ -17,7 +17,7 @@ window.config={ forbiddouble:['zhugedan','swd_kangnalishi','dongzhuo','wutugu','jg_simayi','hs_siwangzhiyi','hs_ronghejuren','hs_shanlingjuren'], layoutfixed:['chess'], all:{ - mode:['identity','guozhan','versus','boss','chess','stone'], + stockmode:['identity','guozhan','versus','boss','chess','stone'], layout:['default','newlayout'], theme:['woodden','music','simple'], card_font:['xiaozhuan','huangcao','caoshu','xingshu'], @@ -209,6 +209,7 @@ window.config={ hiddenModePack:[], hiddenCharacterPack:[], hiddenCardPack:[], + hiddenPlayPack:[], theme:'woodden', layout:'mobile', @@ -261,6 +262,7 @@ window.config={ cards:['standard','ex','extra','refresh'], characters:['standard','shenhua','refresh','yijiang'], plays:[], + extensions:[], banned:[], bannedcards:[], bannedpile:{}, diff --git a/game/game.js b/game/game.js index 52561409c..e3e04e2cf 100755 --- a/game/game.js +++ b/game/game.js @@ -25,7 +25,6 @@ updates:[], canvasUpdates:[], video:[], - arenaReady:[], _onDB:[], customCharacters:[], customCards:[], @@ -35,6 +34,7 @@ onresize:[], onwash:[], onover:[], + arenaReady:[], onDB:function(func){ if(lib.db){ func(); @@ -1234,197 +1234,255 @@ } } }, - playpack:{ - name:'玩法', + extension:{ + name:'扩展', config:{ character:{ - name:'技能卡牌', - init:false, - restart:true, - onclick:function(bool){ - if(bool){ - lib.config.plays.add('character'); - } - else{ - lib.config.plays.remove('character'); - } - game.saveConfig('plays',lib.config.plays); - } + name:'技能卡牌', + init:false, + restart:true, + onclick:function(bool){ + if(bool){ + lib.config.plays.add('character'); + } + else{ + lib.config.plays.remove('character'); + } + game.saveConfig('plays',lib.config.plays); + } }, character_num_playpackconfig:{ - name:'卡牌比例', - init:'0.05', - item:{ - '0.02':'2%', - '0.05':'5%', - '0.1':'10%', - '0.2':'20%', + name:'卡牌比例', + init:'0.05', + item:{ + '0.02':'2%', + '0.05':'5%', + '0.1':'10%', + '0.2':'20%', + } + }, + character_hide_playpackconfig:{ + name:'隐藏此扩展', + clear:true, + onclick:function(){ + lib.config.hiddenPlayPack.add('character'); + game.saveConfig('hiddenPlayPack',lib.config.hiddenPlayPack); } }, soldier:{ - name:'士兵模式', - init:false, - restart:true, - onclick:function(bool){ - if(bool){ - lib.config.plays.add('soldier'); - } - else{ - lib.config.plays.remove('soldier'); - } - game.saveConfig('plays',lib.config.plays); + name:'士兵模式', + init:false, + restart:true, + onclick:function(bool){ + if(bool){ + lib.config.plays.add('soldier'); + } + else{ + lib.config.plays.remove('soldier'); + } + game.saveConfig('plays',lib.config.plays); + } + }, + soldier_hide_playpackconfig:{ + name:'隐藏此扩展', + clear:true, + onclick:function(){ + lib.config.hiddenPlayPack.add('soldier'); + game.saveConfig('hiddenPlayPack',lib.config.hiddenPlayPack); } }, wuxing:{ - name:'五行生克', - init:false, - restart:true, - onclick:function(bool){ - if(bool){ - lib.config.plays.add('wuxing'); - } - else{ - lib.config.plays.remove('wuxing'); - } - game.saveConfig('plays',lib.config.plays); - } + name:'五行生克', + init:false, + restart:true, + onclick:function(bool){ + if(bool){ + lib.config.plays.add('wuxing'); + } + else{ + lib.config.plays.remove('wuxing'); + } + game.saveConfig('plays',lib.config.plays); + } }, wuxing_num_playpackconfig:{ - name:'带属性卡牌', - init:'0.3', - item:{ - '0.1':'10%', - '0.2':'20%', - '0.3':'30%', - '0.5':'50%', + name:'带属性卡牌', + init:'0.3', + item:{ + '0.1':'10%', + '0.2':'20%', + '0.3':'30%', + '0.5':'50%', + } + }, + wuxing_hide_playpackconfig:{ + name:'隐藏此扩展', + clear:true, + onclick:function(){ + lib.config.hiddenPlayPack.add('wuxing'); + game.saveConfig('hiddenPlayPack',lib.config.hiddenPlayPack); } }, weather:{ - name:'天气变化', - init:false, - restart:true, - onclick:function(bool){ - if(bool){ - lib.config.plays.add('weather'); - } - else{ - lib.config.plays.remove('weather'); - } - game.saveConfig('plays',lib.config.plays); - } + name:'天气变化', + init:false, + restart:true, + onclick:function(bool){ + if(bool){ + lib.config.plays.add('weather'); + } + else{ + lib.config.plays.remove('weather'); + } + game.saveConfig('plays',lib.config.plays); + } }, // weather_animation_playpackconfig:{ // name:'天气动画', // init:true // }, weather_noqing_playpackconfig:{ - name:'异常天气出现概率', - init:'0.5', - item:{ - '0.1':'10%', - '0.3':'30%', - '0.5':'50%', - '0.7':'70%', - '0.9':'90%', - } + name:'异常天气出现概率', + init:'0.5', + item:{ + '0.1':'10%', + '0.3':'30%', + '0.5':'50%', + '0.7':'70%', + '0.9':'90%', + } }, weather_chance_playpackconfig:{ - name:'天气效果触发概率', - init:'0.5', - item:{ - '0.1':'10%', - '0.2':'20%', - '0.3':'30%', - '0.5':'50%', - '0.8':'80%', - }, - onclick:function(item){ - game.saveConfig('weather_chance_playpackconfig',item); - _status.weatherchance=parseFloat(lib.config.weather_chance_playpackconfig)||0; - } + name:'天气效果触发概率', + init:'0.5', + item:{ + '0.1':'10%', + '0.2':'20%', + '0.3':'30%', + '0.5':'50%', + '0.8':'80%', + }, + onclick:function(item){ + game.saveConfig('weather_chance_playpackconfig',item); + _status.weatherchance=parseFloat(lib.config.weather_chance_playpackconfig)||0; + } }, weather_duration_playpackconfig:{ - name:'异常天气持续时间', - init:'[4,4]', - item:{ - '[2,4]':'1~3回合', - '[4,4]':'3~6回合', - '[4,7]':'3~9回合', - '[7,4]':'6~9回合', - '[7,7]':'6~12回合', - } + name:'异常天气持续时间', + init:'[4,4]', + item:{ + '[2,4]':'1~3回合', + '[4,4]':'3~6回合', + '[4,7]':'3~9回合', + '[7,4]':'6~9回合', + '[7,7]':'6~12回合', + } }, weather_qingduration_playpackconfig:{ - name:'晴朗天气持续时间', - init:'[2,4]', - item:{ - '[2,4]':'1~3回合', - '[4,4]':'3~6回合', - '[4,7]':'3~9回合', - '[7,4]':'6~9回合', - '[7,7]':'6~12回合', + name:'晴朗天气持续时间', + init:'[2,4]', + item:{ + '[2,4]':'1~3回合', + '[4,4]':'3~6回合', + '[4,7]':'3~9回合', + '[7,4]':'6~9回合', + '[7,7]':'6~12回合', + } + }, + weather_hide_playpackconfig:{ + name:'隐藏此扩展', + clear:true, + onclick:function(){ + lib.config.hiddenPlayPack.add('weather'); + game.saveConfig('hiddenPlayPack',lib.config.hiddenPlayPack); } }, coin:{ - name:'富甲天下', - init:false, - restart:true, - onclick:function(bool){ - if(bool){ - lib.config.plays.add('coin'); - } - else{ - lib.config.plays.remove('coin'); - } - game.saveConfig('plays',lib.config.plays); - } + name:'富甲天下', + init:false, + restart:true, + onclick:function(bool){ + if(bool){ + lib.config.plays.add('coin'); + } + else{ + lib.config.plays.remove('coin'); + } + game.saveConfig('plays',lib.config.plays); + } }, coin_display_playpackconfig:{ - name:'金币显示', - init:'text', - item:{ - symbol:'符号', - text:'文字' - }, - onclick:function(item){ - game.saveConfig('coin_display_playpackconfig',item); - if(game.changeCoin) game.changeCoin(0); - } + name:'金币显示', + init:'text', + item:{ + symbol:'符号', + text:'文字' + }, + onclick:function(item){ + game.saveConfig('coin_display_playpackconfig',item); + if(game.changeCoin) game.changeCoin(0); + } }, coin_canvas_playpackconfig:{ - name:'特效置顶', - init:false, - onclick:function(bool){ - game.saveConfig('coin_canvas_playpackconfig',bool); - if(bool){ - ui.window.classList.add('canvas_top'); - } - else{ - ui.window.classList.remove('canvas_top'); - } + name:'特效置顶', + init:false, + onclick:function(bool){ + game.saveConfig('coin_canvas_playpackconfig',bool); + if(bool){ + ui.window.classList.add('canvas_top'); + } + else{ + ui.window.classList.remove('canvas_top'); + } + } + }, + coin_hide_playpackconfig:{ + name:'隐藏此扩展', + clear:true, + onclick:function(){ + lib.config.hiddenPlayPack.add('coin'); + game.saveConfig('hiddenPlayPack',lib.config.hiddenPlayPack); } }, - // coin_free_playpackconfig:{ - // name:'仅在空闲时显示特效', - // init:false, - // }, update:function(config,map){ for(var i in map){ - if(i.indexOf('_playpackconfig')!=-1){ - map[i].classList.add('indent'); - if(lib.config.plays.contains(i.slice(0,i.indexOf('_')))){ - map[i].show(); - } - else{ + if(i.indexOf('extension_')==0) continue; + if(i.indexOf('_playpackconfig')!=-1){ + var packname=i.slice(0,i.indexOf('_')); + map[i].classList.add('indent'); + if(!lib.config.hiddenPlayPack.contains(packname)&& + lib.config.plays.contains(packname)){ + map[i].show(); + } + else{ + map[i].hide(); + } + } + else{ + if(lib.config.hiddenPlayPack.contains(i)){ map[i].hide(); } - } - else{ - if(lib.config.plays.contains(i)){ - map[i].classList.add('on'); - } else{ - map[i].classList.remove('on'); + if(lib.config.plays.contains(i)){ + map[i].classList.add('on'); + } + else{ + map[i].classList.remove('on'); + } + } + } + } + for(var i=0;i回复体力
player.recover(num)
  • 摸牌
    player.draw(num)
  • 获得牌
    player.gain(cards)
  • 弃牌
    player.discard(cards)'+ '
  • 使用卡牌
    player.useCard(card,
    targets)
  • 死亡
    player.die()
  • 复活
    player.revive(hp)'+ '
    游戏操作
    '+ - '
    富甲天下
    ', '身份模式':'
    选项
    '+ '
    明忠