diff --git a/play/character.js b/extension/character/extension.js
similarity index 100%
rename from play/character.js
rename to extension/character/extension.js
diff --git a/play/coin.js b/extension/coin/extension.js
similarity index 100%
rename from play/coin.js
rename to extension/coin/extension.js
diff --git a/play/soldier.js b/extension/soldier/extension.js
similarity index 100%
rename from play/soldier.js
rename to extension/soldier/extension.js
diff --git a/play/weather.js b/extension/weather/extension.js
similarity index 100%
rename from play/weather.js
rename to extension/weather/extension.js
diff --git a/play/wuxing.js b/extension/wuxing/extension.js
similarity index 100%
rename from play/wuxing.js
rename to extension/wuxing/extension.js
diff --git a/game/game.js b/game/game.js
index 873e49d6c..66dc847c9 100755
--- a/game/game.js
+++ b/game/game.js
@@ -1238,261 +1238,6 @@
}
}
},
- 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);
- }
- },
- character_num_playpackconfig:{
- 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);
- }
- },
- 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);
- }
- },
- wuxing_num_playpackconfig:{
- 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);
- }
- },
- // 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%',
- }
- },
- 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;
- }
- },
- 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回合',
- }
- },
- 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回合',
- }
- },
- 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);
- }
- },
- coin_display_playpackconfig:{
- 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');
- }
- }
- },
- coin_hide_playpackconfig:{
- name:'隐藏此扩展',
- clear:true,
- onclick:function(){
- lib.config.hiddenPlayPack.add('coin');
- game.saveConfig('hiddenPlayPack',lib.config.hiddenPlayPack);
- }
- },
- update:function(config,map){
- for(var i in map){
- 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');
- }
- }
- }
- }
- for(var i=0;i