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