This commit is contained in:
parent
11e4b1f493
commit
0b54d36350
|
@ -1941,7 +1941,7 @@ card.swd={
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
ai:{
|
ai:{
|
||||||
order:1,
|
order:10,
|
||||||
result:{
|
result:{
|
||||||
target:-1
|
target:-1
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ character.ow={
|
||||||
enable:'phaseUse',
|
enable:'phaseUse',
|
||||||
usable:1,
|
usable:1,
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
return player.num('h')>=2;
|
return player.num('h')>=1;
|
||||||
},
|
},
|
||||||
filterTarget:function(card,player,target){
|
filterTarget:function(card,player,target){
|
||||||
return target!=player;
|
return target!=player;
|
||||||
|
@ -2361,7 +2361,7 @@ character.ow={
|
||||||
mianzhen_info:'出牌阶段限一次,你可以弃置一张牌并令一名其他角色打出一张闪,否则该角色不能使用或打出卡牌直到其受到伤害或下一回合结束',
|
mianzhen_info:'出牌阶段限一次,你可以弃置一张牌并令一名其他角色打出一张闪,否则该角色不能使用或打出卡牌直到其受到伤害或下一回合结束',
|
||||||
aqianghua:'强化',
|
aqianghua:'强化',
|
||||||
aqianghua2:'强化',
|
aqianghua2:'强化',
|
||||||
aqianghua_info:'出牌阶段限一次,你可以将你的全部手牌(至少两张)交给一名其他角色,该角色获得一点护甲且下一次造成的伤害+1',
|
aqianghua_info:'出牌阶段限一次,你可以将你的全部手牌(至少一张)交给一名其他角色,该角色获得一点护甲且下一次造成的伤害+1',
|
||||||
zhiyuan:'支援',
|
zhiyuan:'支援',
|
||||||
zhiyuan_info:'每当你即将造成伤害,你可以防止此伤害,改为令目标回复等量的体力',
|
zhiyuan_info:'每当你即将造成伤害,你可以防止此伤害,改为令目标回复等量的体力',
|
||||||
juji:'狙击',
|
juji:'狙击',
|
||||||
|
|
|
@ -1381,6 +1381,12 @@ character.shenhua={
|
||||||
filter:function(event){
|
filter:function(event){
|
||||||
return event.playerCards&&event.playerCards.length>0
|
return event.playerCards&&event.playerCards.length>0
|
||||||
},
|
},
|
||||||
|
check:function(event){
|
||||||
|
for(var i=0;i<event.playerCards.length;i++){
|
||||||
|
if(event.playerCards[i].name=='du') return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
content:function(){
|
content:function(){
|
||||||
"step 0"
|
"step 0"
|
||||||
player.gain(trigger.playerCards);
|
player.gain(trigger.playerCards);
|
||||||
|
|
|
@ -22,7 +22,7 @@ character.swd={
|
||||||
swd_jiliang:['male','wu',3,['yunchou','gongxin','qimou']],
|
swd_jiliang:['male','wu',3,['yunchou','gongxin','qimou']],
|
||||||
swd_shuijing:['female','qun',4,['mojian','duanyue']],
|
swd_shuijing:['female','qun',4,['mojian','duanyue']],
|
||||||
swd_quxian:['female','qun',3,['mojian','huanxia']],
|
swd_quxian:['female','qun',3,['mojian','huanxia']],
|
||||||
swd_xiyan:['male','qun',3,['tianshu','daofa']],
|
swd_xiyan:['male','qun',3,['zaowu','daofa']],
|
||||||
swd_cheyun:['female','wu',3,['shengong','xianjiang','qiaoxie']],
|
swd_cheyun:['female','wu',3,['shengong','xianjiang','qiaoxie']],
|
||||||
swd_huanyuanzhi:['male','qun',3,['tianshu','lanzhi','mufeng']],
|
swd_huanyuanzhi:['male','qun',3,['tianshu','lanzhi','mufeng']],
|
||||||
swd_murongshi:['female','shu',4,['duanyi','guxing']],
|
swd_murongshi:['female','shu',4,['duanyi','guxing']],
|
||||||
|
@ -125,7 +125,7 @@ character.swd={
|
||||||
swd_yuli:['swd_chunyuheng'],
|
swd_yuli:['swd_chunyuheng'],
|
||||||
swd_jiuyou:['swd_zhiyin'],
|
swd_jiuyou:['swd_zhiyin'],
|
||||||
swd_qiner:['swd_hengai'],
|
swd_qiner:['swd_hengai'],
|
||||||
swd_huzhongxian:['swd_jiliang','swd_jipeng'],
|
swd_huzhongxian:['swd_jiliang','swd_jipeng','swd_xiyan'],
|
||||||
swd_anka:['swd_kama'],
|
swd_anka:['swd_kama'],
|
||||||
swd_septem:['swd_nicole','swd_kama','swd_weida','swd_wangsiyue'],
|
swd_septem:['swd_nicole','swd_kama','swd_weida','swd_wangsiyue'],
|
||||||
swd_nicole:['swd_lilian'],
|
swd_nicole:['swd_lilian'],
|
||||||
|
@ -143,6 +143,21 @@ character.swd={
|
||||||
swd_luchengxuan:['swd_xiarou'],
|
swd_luchengxuan:['swd_xiarou'],
|
||||||
},
|
},
|
||||||
skill:{
|
skill:{
|
||||||
|
zaowu:{
|
||||||
|
enable:'chooseToUse',
|
||||||
|
filter:function(event,player){
|
||||||
|
return player.num('he',{suit:'spade'})>0;
|
||||||
|
},
|
||||||
|
position:'he',
|
||||||
|
filterCard:{suit:'spade'},
|
||||||
|
viewAs:{name:'fengyinzhidan'},
|
||||||
|
check:function(card){
|
||||||
|
return 6-ai.get.value(card);
|
||||||
|
},
|
||||||
|
ai:{
|
||||||
|
order:2,
|
||||||
|
}
|
||||||
|
},
|
||||||
huanxia:{
|
huanxia:{
|
||||||
enable:'chooseToUse',
|
enable:'chooseToUse',
|
||||||
filterCard:function(card){
|
filterCard:function(card){
|
||||||
|
@ -1672,6 +1687,9 @@ character.swd={
|
||||||
},
|
},
|
||||||
content:function(){
|
content:function(){
|
||||||
player.unmark(player.storage.huanxing+'_charactermark');
|
player.unmark(player.storage.huanxing+'_charactermark');
|
||||||
|
if(player.additionalSkills.yizhuang){
|
||||||
|
player.removeSkill(player.additionalSkills.yizhuang);
|
||||||
|
}
|
||||||
delete player.storage.huanxing;
|
delete player.storage.huanxing;
|
||||||
delete player.additionalSkills.huanxing;
|
delete player.additionalSkills.huanxing;
|
||||||
player.checkMarks();
|
player.checkMarks();
|
||||||
|
@ -2580,13 +2598,15 @@ character.swd={
|
||||||
mufeng:{
|
mufeng:{
|
||||||
trigger:{global:'phaseEnd'},
|
trigger:{global:'phaseEnd'},
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
return event.player!=player&&event.player.num('h')>player.num('h');
|
return !player.hasSkill('mufeng2')&&event.player!=player&&
|
||||||
|
Math.min(5,event.player.num('h'))>player.num('h');
|
||||||
},
|
},
|
||||||
frequent:true,
|
|
||||||
content:function(){
|
content:function(){
|
||||||
player.draw();
|
player.draw(Math.min(5,trigger.player.num('h'))-player.num('h'));
|
||||||
|
player.addTempSkill('mufeng2',{player:'phaseBegin'});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
mufeng2:{},
|
||||||
jiying:{
|
jiying:{
|
||||||
// trigger:{player:'respond'},
|
// trigger:{player:'respond'},
|
||||||
// filter:function(event,player){
|
// filter:function(event,player){
|
||||||
|
@ -3849,7 +3869,8 @@ character.swd={
|
||||||
target:function(card,player,target,current){
|
target:function(card,player,target,current){
|
||||||
if(get.type(card)=='equip') return [1,3];
|
if(get.type(card)=='equip') return [1,3];
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
noe:true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
qiaoxie2:{
|
qiaoxie2:{
|
||||||
|
@ -5353,10 +5374,13 @@ character.swd={
|
||||||
tianshu:{
|
tianshu:{
|
||||||
unique:true,
|
unique:true,
|
||||||
enable:'phaseUse',
|
enable:'phaseUse',
|
||||||
usable:1,
|
|
||||||
filterCard:function(card){
|
filterCard:function(card){
|
||||||
return get.type(card,'trick')=='trick';
|
return get.type(card,'trick')=='trick';
|
||||||
},
|
},
|
||||||
|
discard:false,
|
||||||
|
prepare:function(cards,player,targets){
|
||||||
|
player.$give(cards,targets[0]);
|
||||||
|
},
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
return player.num('h',{type:['trick','delay']})>0;
|
return player.num('h',{type:['trick','delay']})>0;
|
||||||
},
|
},
|
||||||
|
@ -5432,6 +5456,7 @@ character.swd={
|
||||||
},
|
},
|
||||||
content:function(){
|
content:function(){
|
||||||
"step 0"
|
"step 0"
|
||||||
|
target.gain(cards);
|
||||||
event.skillai=function(list){
|
event.skillai=function(list){
|
||||||
return list.randomGet();
|
return list.randomGet();
|
||||||
};
|
};
|
||||||
|
@ -5468,9 +5493,15 @@ character.swd={
|
||||||
ai:{
|
ai:{
|
||||||
order:1,
|
order:1,
|
||||||
result:{
|
result:{
|
||||||
player:function(player){
|
player:function(player,target){
|
||||||
|
if(ai.get.attitude(player,target)<0) return 0;
|
||||||
if(player.num('h')>player.hp) return 1;
|
if(player.num('h')>player.hp) return 1;
|
||||||
return 0;
|
return 0;
|
||||||
|
},
|
||||||
|
target:function(player,target){
|
||||||
|
if(ai.get.attitude(player,target)<0) return 0;
|
||||||
|
if(player.num('h')>target.num('h')) return 1;
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7952,7 +7983,7 @@ character.swd={
|
||||||
qimou:'奇谋',
|
qimou:'奇谋',
|
||||||
qimou_info:'每当你于回合外受到一次伤害,你可以摸一张牌,并立即使用之',
|
qimou_info:'每当你于回合外受到一次伤害,你可以摸一张牌,并立即使用之',
|
||||||
mufeng:'沐风',
|
mufeng:'沐风',
|
||||||
mufeng_info:'在一名角色的回合结束阶段,若你的手牌数比其少,你可以摸一张牌',
|
mufeng_info:'在一名角色的回合结束阶段,若你的手牌数比其少,你可以将手牌补至与该角色相同(最多补至5),每轮限一次',
|
||||||
mufeng_old_info:'锁定技,每当你于回合外失去牌,你的防御距离+1;若防御距离的变化值超过了存活角色数的一半,则降至0',
|
mufeng_old_info:'锁定技,每当你于回合外失去牌,你的防御距离+1;若防御距离的变化值超过了存活角色数的一半,则降至0',
|
||||||
lexue:'乐学',
|
lexue:'乐学',
|
||||||
lexue_info:'回合内,你随机获得制衡、集智、缔盟、驱虎中的一个技能;回合外,你随机获得遗计、急救、鬼道、反馈中的一个技能',
|
lexue_info:'回合内,你随机获得制衡、集智、缔盟、驱虎中的一个技能;回合外,你随机获得遗计、急救、鬼道、反馈中的一个技能',
|
||||||
|
@ -8152,8 +8183,8 @@ character.swd={
|
||||||
pozhen_info:'每当你受到一次伤害,若你的手牌数大于伤害来源,你可以弃置X张手牌对其造成一点伤害;若你的手牌数小于伤害来源,你可以弃置其X张手牌。X为你与伤害来源的手牌数之差。',
|
pozhen_info:'每当你受到一次伤害,若你的手牌数大于伤害来源,你可以弃置X张手牌对其造成一点伤害;若你的手牌数小于伤害来源,你可以弃置其X张手牌。X为你与伤害来源的手牌数之差。',
|
||||||
yunchou_info:'出牌阶段限一次,你可以弃置任意张手牌,并弃置一张其他角色的手牌,你弃置的手牌中每有一张与此牌的颜色相同,你摸一张牌,否则对方摸一张牌',
|
yunchou_info:'出牌阶段限一次,你可以弃置任意张手牌,并弃置一张其他角色的手牌,你弃置的手牌中每有一张与此牌的颜色相同,你摸一张牌,否则对方摸一张牌',
|
||||||
tianshu_old_info:'回合结束阶段,你可以弃置一张牌并从三名随机武将中选择一个,在2X回合后你将其所有技能加入你的天书列表,X为其技能数;在技能加入天书列表时,或于出牌阶段,你可以装备一项天书列表中的技能',
|
tianshu_old_info:'回合结束阶段,你可以弃置一张牌并从三名随机武将中选择一个,在2X回合后你将其所有技能加入你的天书列表,X为其技能数;在技能加入天书列表时,或于出牌阶段,你可以装备一项天书列表中的技能',
|
||||||
tianshu_info:'出牌阶段限一次,你可以弃置一张锦囊牌,然后获得一名存活角色的一项技能直到该角色死亡(替换以此法获得的前一个技能)',
|
tianshu_info:'出牌阶段限,你可以交给一名其他角色一张锦囊牌,然后获得该角色的一项技能直到该角色死亡(替换以此法获得的前一个技能)',
|
||||||
zaowu_info:'出牌阶段限一次,你可以移除一个天书列表中的技能,然后随机获得一张衍生牌',
|
zaowu_info:'你可以将一张黑桃牌当作封印之蛋使用',
|
||||||
luomei_info:'每当你使用或打出一张梅花花色的牌,你可以摸一张牌',
|
luomei_info:'每当你使用或打出一张梅花花色的牌,你可以摸一张牌',
|
||||||
xingdian_info:'出牌阶段限一次,你可以弃置一张手牌,然后指定至多两名角色令其各弃置一张牌',
|
xingdian_info:'出牌阶段限一次,你可以弃置一张手牌,然后指定至多两名角色令其各弃置一张牌',
|
||||||
yulin_info:'每当你即将受到伤害,你可以弃置一张装备牌抵消此伤害',
|
yulin_info:'每当你即将受到伤害,你可以弃置一张装备牌抵消此伤害',
|
||||||
|
|
|
@ -722,6 +722,9 @@ character.yxs={
|
||||||
content:function(){
|
content:function(){
|
||||||
"step 0"
|
"step 0"
|
||||||
player.unmark(player.storage.yizhuang+'_charactermark');
|
player.unmark(player.storage.yizhuang+'_charactermark');
|
||||||
|
if(player.additionalSkills.yizhuang){
|
||||||
|
player.removeSkill(player.additionalSkills.yizhuang);
|
||||||
|
}
|
||||||
delete player.storage.yizhuang;
|
delete player.storage.yizhuang;
|
||||||
delete player.additionalSkills.yizhuang;
|
delete player.additionalSkills.yizhuang;
|
||||||
player.checkMarks();
|
player.checkMarks();
|
||||||
|
@ -803,6 +806,9 @@ character.yxs={
|
||||||
},
|
},
|
||||||
content:function(){
|
content:function(){
|
||||||
player.unmark(player.storage.yizhuang+'_charactermark');
|
player.unmark(player.storage.yizhuang+'_charactermark');
|
||||||
|
if(player.additionalSkills.yizhuang){
|
||||||
|
player.removeSkill(player.additionalSkills.yizhuang);
|
||||||
|
}
|
||||||
delete player.storage.yizhuang;
|
delete player.storage.yizhuang;
|
||||||
delete player.additionalSkills.yizhuang;
|
delete player.additionalSkills.yizhuang;
|
||||||
player.checkMarks();
|
player.checkMarks();
|
||||||
|
|
120
game/game.js
120
game/game.js
|
@ -9804,13 +9804,20 @@
|
||||||
return this;
|
return this;
|
||||||
},
|
},
|
||||||
removeSkill:function(skill){
|
removeSkill:function(skill){
|
||||||
this.unmarkSkill(skill);
|
if(Array.isArray(skill)){
|
||||||
this.skills.remove(skill);
|
for(var i=0;i<skill.length;i++){
|
||||||
this.checkConflict();
|
this.removeSkill(skill[i]);
|
||||||
delete this.tempSkills[skill];
|
}
|
||||||
if(lib.skill[skill]&&lib.skill[skill].onremove){
|
}
|
||||||
lib.skill[skill].onremove(this);
|
else{
|
||||||
}
|
this.unmarkSkill(skill);
|
||||||
|
this.skills.remove(skill);
|
||||||
|
this.checkConflict();
|
||||||
|
delete this.tempSkills[skill];
|
||||||
|
if(lib.skill[skill]&&lib.skill[skill].onremove){
|
||||||
|
lib.skill[skill].onremove(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
return skill;
|
return skill;
|
||||||
},
|
},
|
||||||
addTempSkill:function(skill,expire){
|
addTempSkill:function(skill,expire){
|
||||||
|
@ -21791,6 +21798,36 @@
|
||||||
newCharacter.style.display='';
|
newCharacter.style.display='';
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
var updateButton=function(){
|
||||||
|
var name=page.querySelector('input.new_name').value;
|
||||||
|
if(!name){
|
||||||
|
editnode.classList.add('disabled');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
name=name.split('|');
|
||||||
|
name=name[0];
|
||||||
|
if(currentButton){
|
||||||
|
if(currentButton.link!=name){
|
||||||
|
if(lib.character[name]||page.content.pack.character[name]){
|
||||||
|
editnode.classList.add('disabled');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
if(lib.character[name]||page.content.pack.character[name]){
|
||||||
|
editnode.classList.add('disabled');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(!fakeme.image){
|
||||||
|
if(!page.content.image[name+'.jpg']){
|
||||||
|
editnode.classList.add('disabled');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
editnode.classList.remove('disabled');
|
||||||
|
};
|
||||||
var clickButton=function(){
|
var clickButton=function(){
|
||||||
if(currentButton==this){
|
if(currentButton==this){
|
||||||
resetEditor();
|
resetEditor();
|
||||||
|
@ -21834,6 +21871,7 @@
|
||||||
|
|
||||||
toggle.innerHTML='编辑武将 <div>></div>';
|
toggle.innerHTML='编辑武将 <div>></div>';
|
||||||
editnode.innerHTML='编辑武将';
|
editnode.innerHTML='编辑武将';
|
||||||
|
editnode.classList.remove('disabled');
|
||||||
delnode.innerHTML='删除';
|
delnode.innerHTML='删除';
|
||||||
delnode.button=this;
|
delnode.button=this;
|
||||||
}
|
}
|
||||||
|
@ -21971,6 +22009,7 @@
|
||||||
skillList.firstChild.innerHTML='';
|
skillList.firstChild.innerHTML='';
|
||||||
toggle.innerHTML='创建武将 <div>></div>';
|
toggle.innerHTML='创建武将 <div>></div>';
|
||||||
editnode.innerHTML='创建武将';
|
editnode.innerHTML='创建武将';
|
||||||
|
editnode.classList.add('disabled');
|
||||||
delnode.innerHTML='取消';
|
delnode.innerHTML='取消';
|
||||||
delete delnode.button;
|
delete delnode.button;
|
||||||
}
|
}
|
||||||
|
@ -21995,6 +22034,7 @@
|
||||||
fileReader.onload = function(fileLoadedEvent)
|
fileReader.onload = function(fileLoadedEvent)
|
||||||
{
|
{
|
||||||
fakeme.image=fileLoadedEvent.target.result;
|
fakeme.image=fileLoadedEvent.target.result;
|
||||||
|
updateButton();
|
||||||
};
|
};
|
||||||
fileReader.readAsArrayBuffer(fileToLoad, "UTF-8");
|
fileReader.readAsArrayBuffer(fileToLoad, "UTF-8");
|
||||||
};
|
};
|
||||||
|
@ -22007,6 +22047,7 @@
|
||||||
|
|
||||||
ui.create.div('.indent','姓名:<input class="new_name" type="text">',newCharacter).style.paddingTop='10px';
|
ui.create.div('.indent','姓名:<input class="new_name" type="text">',newCharacter).style.paddingTop='10px';
|
||||||
ui.create.div('.indent','体力:<input class="new_hp" type="text">',newCharacter).style.paddingTop='10px';
|
ui.create.div('.indent','体力:<input class="new_hp" type="text">',newCharacter).style.paddingTop='10px';
|
||||||
|
newCharacter.querySelector('input.new_name').onblur=updateButton;
|
||||||
var sexes=ui.create.selectlist([
|
var sexes=ui.create.selectlist([
|
||||||
['male','男'],
|
['male','男'],
|
||||||
['female','女'],
|
['female','女'],
|
||||||
|
@ -22122,7 +22163,7 @@
|
||||||
};
|
};
|
||||||
var skillList=ui.create.div('.skill_list',newCharacter);
|
var skillList=ui.create.div('.skill_list',newCharacter);
|
||||||
ui.create.div(skillList);
|
ui.create.div(skillList);
|
||||||
var editnode=ui.create.div('.menubutton.large','创建武将',ui.create.div(skillList),function(){
|
var editnode=ui.create.div('.menubutton.large.disabled','创建武将',ui.create.div(skillList),function(){
|
||||||
var name=page.querySelector('input.new_name').value;
|
var name=page.querySelector('input.new_name').value;
|
||||||
if(!name){
|
if(!name){
|
||||||
alert('请填写武将名\n提示:武将名格式为id+|+中文名,其中id必须惟一');
|
alert('请填写武将名\n提示:武将名格式为id+|+中文名,其中id必须惟一');
|
||||||
|
@ -22214,6 +22255,34 @@
|
||||||
newCard.style.display='';
|
newCard.style.display='';
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
var updateButton=function(){
|
||||||
|
var name=page.querySelector('input.new_name').value;
|
||||||
|
if(!name){
|
||||||
|
editnode.classList.add('disabled');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
name=name.split('|');
|
||||||
|
name=name[0];
|
||||||
|
if(currentButton){
|
||||||
|
if(currentButton.link!=name){
|
||||||
|
if(lib.card[name]||page.content.pack.card[name]){
|
||||||
|
editnode.classList.add('disabled');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
if(lib.card[name]||page.content.pack.card[name]){
|
||||||
|
editnode.classList.add('disabled');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(!fakeme.image&&!fakeme.classList.contains('inited')){
|
||||||
|
editnode.classList.add('disabled');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
editnode.classList.remove('disabled');
|
||||||
|
};
|
||||||
var clickButton=function(){
|
var clickButton=function(){
|
||||||
if(currentButton==this){
|
if(currentButton==this){
|
||||||
resetEditor();
|
resetEditor();
|
||||||
|
@ -22246,6 +22315,7 @@
|
||||||
|
|
||||||
toggle.innerHTML='编辑卡牌 <div>></div>';
|
toggle.innerHTML='编辑卡牌 <div>></div>';
|
||||||
editnode.innerHTML='编辑卡牌';
|
editnode.innerHTML='编辑卡牌';
|
||||||
|
editnode.classList.remove('disabled');
|
||||||
delnode.innerHTML='删除';
|
delnode.innerHTML='删除';
|
||||||
delnode.button=this;
|
delnode.button=this;
|
||||||
}
|
}
|
||||||
|
@ -22415,6 +22485,7 @@
|
||||||
}
|
}
|
||||||
toggle.innerHTML='创建卡牌 <div>></div>';
|
toggle.innerHTML='创建卡牌 <div>></div>';
|
||||||
editnode.innerHTML='创建卡牌';
|
editnode.innerHTML='创建卡牌';
|
||||||
|
editnode.classList.add('disabled');
|
||||||
delnode.innerHTML='取消';
|
delnode.innerHTML='取消';
|
||||||
delete delnode.button;
|
delete delnode.button;
|
||||||
container.code='card={\n \n}\n\n\/*\n示例:\ncard={\n type:"basic",\n enable:true,\n filterTarget:true,\n content:function(){\n target.draw()\n },\n ai:{\n order:1,\n result:{\n target:1\n }\n }\n}\n此例的效果为目标摸一张牌\n导出时本段代码中的换行、缩进以及注释将被清除\n*\/';
|
container.code='card={\n \n}\n\n\/*\n示例:\ncard={\n type:"basic",\n enable:true,\n filterTarget:true,\n content:function(){\n target.draw()\n },\n ai:{\n order:1,\n result:{\n target:1\n }\n }\n}\n此例的效果为目标摸一张牌\n导出时本段代码中的换行、缩进以及注释将被清除\n*\/';
|
||||||
|
@ -22451,6 +22522,7 @@
|
||||||
fileReader.onload = function(fileLoadedEvent)
|
fileReader.onload = function(fileLoadedEvent)
|
||||||
{
|
{
|
||||||
fakeme.image=fileLoadedEvent.target.result;
|
fakeme.image=fileLoadedEvent.target.result;
|
||||||
|
updateButton();
|
||||||
};
|
};
|
||||||
fileReader.readAsArrayBuffer(fileToLoad, "UTF-8");
|
fileReader.readAsArrayBuffer(fileToLoad, "UTF-8");
|
||||||
};
|
};
|
||||||
|
@ -22464,6 +22536,7 @@
|
||||||
|
|
||||||
ui.create.div('.indent','名称:<input class="new_name" type="text">',newCard).style.paddingTop='8px';
|
ui.create.div('.indent','名称:<input class="new_name" type="text">',newCard).style.paddingTop='8px';
|
||||||
ui.create.div('.indent','描述:<input class="new_description" type="text">',newCard).style.paddingTop='6px';
|
ui.create.div('.indent','描述:<input class="new_description" type="text">',newCard).style.paddingTop='6px';
|
||||||
|
newCard.querySelector('input.new_name').onblur=updateButton;
|
||||||
var codeButton=document.createElement('button');
|
var codeButton=document.createElement('button');
|
||||||
newCard.appendChild(codeButton);
|
newCard.appendChild(codeButton);
|
||||||
codeButton.innerHTML='编辑代码';
|
codeButton.innerHTML='编辑代码';
|
||||||
|
@ -22612,7 +22685,7 @@
|
||||||
var editor=ui.create.div(editorpage);
|
var editor=ui.create.div(editorpage);
|
||||||
container.code='card={\n \n}\n\n\/*\n示例:\ncard={\n type:"basic",\n enable:true,\n filterTarget:true,\n content:function(){\n target.draw()\n },\n ai:{\n order:1,\n result:{\n target:1\n }\n }\n}\n此例的效果为目标摸一张牌\n导出时本段代码中的换行、缩进以及注释将被清除\n*\/';
|
container.code='card={\n \n}\n\n\/*\n示例:\ncard={\n type:"basic",\n enable:true,\n filterTarget:true,\n content:function(){\n target.draw()\n },\n ai:{\n order:1,\n result:{\n target:1\n }\n }\n}\n此例的效果为目标摸一张牌\n导出时本段代码中的换行、缩进以及注释将被清除\n*\/';
|
||||||
|
|
||||||
var editnode=ui.create.div('.menubutton.large.new_card','创建卡牌',newCard,function(){
|
var editnode=ui.create.div('.menubutton.large.new_card.disabled','创建卡牌',newCard,function(){
|
||||||
var name=page.querySelector('input.new_name').value;
|
var name=page.querySelector('input.new_name').value;
|
||||||
if(!name){
|
if(!name){
|
||||||
alert('请填写卡牌名\n提示:卡牌名格式为id+|+中文名,其中id必须惟一');
|
alert('请填写卡牌名\n提示:卡牌名格式为id+|+中文名,其中id必须惟一');
|
||||||
|
@ -22823,6 +22896,30 @@
|
||||||
}());
|
}());
|
||||||
var dash3=(function(){
|
var dash3=(function(){
|
||||||
var page=ui.create.div('.hidden.menu-buttons.new_skill');
|
var page=ui.create.div('.hidden.menu-buttons.new_skill');
|
||||||
|
var updateButton=function(){
|
||||||
|
var name=page.querySelector('input.new_name').value;
|
||||||
|
if(!name){
|
||||||
|
editnode.classList.add('disabled');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
name=name.split('|');
|
||||||
|
name=name[0];
|
||||||
|
if(currentButton){
|
||||||
|
if(currentButton.link!=name){
|
||||||
|
if(lib.skill[name]||page.content.pack.skill[name]){
|
||||||
|
editnode.classList.add('disabled');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
if(lib.skill[name]||page.content.pack.skill[name]){
|
||||||
|
editnode.classList.add('disabled');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
editnode.classList.remove('disabled');
|
||||||
|
};
|
||||||
page.init=function(){
|
page.init=function(){
|
||||||
if(!page.querySelector('.menubutton:not(.large)')){
|
if(!page.querySelector('.menubutton:not(.large)')){
|
||||||
toggle.classList.add('on');
|
toggle.classList.add('on');
|
||||||
|
@ -22895,6 +22992,7 @@
|
||||||
|
|
||||||
toggle.innerHTML='编辑技能 <div>></div>';
|
toggle.innerHTML='编辑技能 <div>></div>';
|
||||||
editnode.innerHTML='编辑技能';
|
editnode.innerHTML='编辑技能';
|
||||||
|
editnode.classList.remove('disabled');
|
||||||
delnode.button=this;
|
delnode.button=this;
|
||||||
delnode.innerHTML='删除';
|
delnode.innerHTML='删除';
|
||||||
}
|
}
|
||||||
|
@ -22930,6 +23028,7 @@
|
||||||
}
|
}
|
||||||
toggle.innerHTML='创建技能 <div>></div>';
|
toggle.innerHTML='创建技能 <div>></div>';
|
||||||
editnode.innerHTML='创建技能';
|
editnode.innerHTML='创建技能';
|
||||||
|
editnode.classList.add('disabled');
|
||||||
delnode.innerHTML='取消';
|
delnode.innerHTML='取消';
|
||||||
delete delnode.button;
|
delete delnode.button;
|
||||||
container.code='skill={\n \n}\n\n\/*\n示例:\nskill={\n trigger:{player:"phaseEnd"},\n frequent:true,\n content:function(){\n player.draw()\n }\n}\n此例为闭月代码\n导出时本段代码中的换行、缩进以及注释将被清除\n*\/';
|
container.code='skill={\n \n}\n\n\/*\n示例:\nskill={\n trigger:{player:"phaseEnd"},\n frequent:true,\n content:function(){\n player.draw()\n }\n}\n此例为闭月代码\n导出时本段代码中的换行、缩进以及注释将被清除\n*\/';
|
||||||
|
@ -22942,6 +23041,7 @@
|
||||||
page.newSkill=newSkill;
|
page.newSkill=newSkill;
|
||||||
var namenode=ui.create.div('.config','名称:<input class="new_name" type="text" style="width:120px"></input>',newSkill);
|
var namenode=ui.create.div('.config','名称:<input class="new_name" type="text" style="width:120px"></input>',newSkill);
|
||||||
var descnode=ui.create.div('.config','描述:<input class="new_description" type="text" style="width:120px"></input>',newSkill);
|
var descnode=ui.create.div('.config','描述:<input class="new_description" type="text" style="width:120px"></input>',newSkill);
|
||||||
|
namenode.querySelector('input.new_name').onblur=updateButton;
|
||||||
var commandline=ui.create.div('.config',newSkill);
|
var commandline=ui.create.div('.config',newSkill);
|
||||||
var editbutton=document.createElement('button');
|
var editbutton=document.createElement('button');
|
||||||
editbutton.innerHTML='编辑代码';
|
editbutton.innerHTML='编辑代码';
|
||||||
|
@ -23118,7 +23218,7 @@
|
||||||
cancelSkillButton.style.display='none';
|
cancelSkillButton.style.display='none';
|
||||||
}
|
}
|
||||||
|
|
||||||
var editnode=ui.create.div('.menubutton.large.new_skill','创建技能',function(){
|
var editnode=ui.create.div('.menubutton.large.new_skill.disabled','创建技能',function(){
|
||||||
var name=page.querySelector('input.new_name').value;
|
var name=page.querySelector('input.new_name').value;
|
||||||
if(!name){
|
if(!name){
|
||||||
alert('请填写技能名\n提示:技能名格式为id+|+中文名,其中id必须惟一');
|
alert('请填写技能名\n提示:技能名格式为id+|+中文名,其中id必须惟一');
|
||||||
|
|
|
@ -11,8 +11,11 @@ window.noname_update={
|
||||||
'character/swd.js',
|
'character/swd.js',
|
||||||
'character/ow.js',
|
'character/ow.js',
|
||||||
'character/sp.js',
|
'character/sp.js',
|
||||||
|
'character/shenhua.js',
|
||||||
|
'character/yxs.js',
|
||||||
'card/swd.js',
|
'card/swd.js',
|
||||||
'card/hearth.js',
|
'card/hearth.js',
|
||||||
|
'layout/default/menu.css',
|
||||||
],
|
],
|
||||||
'1.8.19.5':[],
|
'1.8.19.5':[],
|
||||||
}
|
}
|
||||||
|
|
|
@ -1616,6 +1616,9 @@ span[data-color="unknownm"]{
|
||||||
.config.disabled{
|
.config.disabled{
|
||||||
opacity:0.4;
|
opacity:0.4;
|
||||||
}
|
}
|
||||||
|
.menubutton.large.disabled{
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
.config>.toggle.onoff>div>div{
|
.config>.toggle.onoff>div>div{
|
||||||
width:8px;
|
width:8px;
|
||||||
height:8px;
|
height:8px;
|
||||||
|
|
|
@ -793,7 +793,7 @@
|
||||||
}
|
}
|
||||||
#create-extension>.menu-buttons>.new_character>.skill_list>div:first-child:not(*:empty){
|
#create-extension>.menu-buttons>.new_character>.skill_list>div:first-child:not(*:empty){
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
margin-bottom: 17px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
#create-extension>.menu-buttons>.new_character>.skill_list>div:first-child>button{
|
#create-extension>.menu-buttons>.new_character>.skill_list>div:first-child>button{
|
||||||
margin-right: 3px;
|
margin-right: 3px;
|
||||||
|
|
Loading…
Reference in New Issue