This commit is contained in:
libccy 2016-08-19 18:33:20 +08:00
parent 2ba4e22028
commit e154c845bb
8 changed files with 305 additions and 73 deletions

View File

@ -509,7 +509,7 @@ card.extra={
}, },
translate:{ translate:{
jiu:'酒', jiu:'酒',
jiu_info:'出牌阶段,对自己使用,令自己的下一张使用的【杀】造成的伤害+1每回合限使用1次 任何时候,当自己进入濒死阶段,对自己使用,立即回复1点体力', jiu_info:'出牌阶段,对自己使用,令自己的下一张使用的【杀】造成的伤害+1每回合限使用1次 濒死阶段对自己使用回复1点体力',
huogong:'火攻', huogong:'火攻',
tiesuo:'铁锁连环', tiesuo:'铁锁连环',
huogong_bg:'攻', huogong_bg:'攻',

View File

@ -1553,7 +1553,7 @@ card.standard={
if(player.isUnderControl(true)&&!_status.auto&&!ui.tempnowuxie&&tempnowuxie){ if(player.isUnderControl(true)&&!_status.auto&&!ui.tempnowuxie&&tempnowuxie){
var translation=get.translation(card.name); var translation=get.translation(card.name);
if(translation.length>=4){ if(translation.length>=4){
translation=translation.slice(0,2); translation=lib.translate[card.name+'_ab']||translation.slice(0,2);
} }
ui.tempnowuxie=ui.create.control('不无懈'+translation,ui.click.tempnowuxie); ui.tempnowuxie=ui.create.control('不无懈'+translation,ui.click.tempnowuxie);
ui.tempnowuxie._origin=id2; ui.tempnowuxie._origin=id2;

View File

@ -60,7 +60,7 @@ card.swd={
content:function(){ content:function(){
"step 0" "step 0"
if(target.num('h')){ if(target.num('h')){
var next=target.chooseToDiscard('机关筒:弃置一张手牌或受到一点伤害'); var next=target.chooseToDiscard('机关筒:弃置一张手牌或受到一点火焰伤害');
next.set('ai',function(card){ next.set('ai',function(card){
var evt=_status.event.getParent(); var evt=_status.event.getParent();
if(ai.get.damageEffect(evt.target,evt.player,evt.target)>=0) return 0; if(ai.get.damageEffect(evt.target,evt.player,evt.target)>=0) return 0;
@ -68,14 +68,19 @@ card.swd={
}); });
} }
else{ else{
target.damage(); target.damage('fire');
event.parent.preResult=true;
event.finish(); event.finish();
} }
"step 1" "step 1"
if(result.bool==false){ if(result.bool==false){
target.damage(); target.damage('fire');
event.parent.preResult=true;
} }
}, },
contentAfter:function(){
if(!event.preResult) player.draw();
},
ai:{ ai:{
wuxie:function(target,card,player,viewer){ wuxie:function(target,card,player,viewer){
if(ai.get.attitude(viewer,target)>0){ if(ai.get.attitude(viewer,target)>0){
@ -106,6 +111,8 @@ card.swd={
discard:1, discard:1,
loseCard:1, loseCard:1,
damage:1, damage:1,
natureDamage:1,
fireDamage:1,
multitarget:1, multitarget:1,
multineg:1, multineg:1,
} }
@ -3633,7 +3640,8 @@ card.swd={
jiguanyuan:'机关鸢', jiguanyuan:'机关鸢',
jiguanyuan_info:'出牌阶段对一名其他角色使用,你将此牌和一张其它牌交给该角色,然后摸一张牌', jiguanyuan_info:'出牌阶段对一名其他角色使用,你将此牌和一张其它牌交给该角色,然后摸一张牌',
jiguantong:'机关火筒', jiguantong:'机关火筒',
jiguantong_info:'出牌阶段对所有其他角色使用,目标弃置一张手牌,或受到一点火焰伤害', jiguantong_ab:'火筒',
jiguantong_info:'出牌阶段对所有其他角色使用,目标弃置一张手牌,或受到一点火焰伤害;若没有人因此受到伤害,使用者摸一张牌',
jiutiansuanchi:'九天算尺', jiutiansuanchi:'九天算尺',
jiutiansuanchi_info:'每当你使用杀造成伤害,你可以弃置一张牌并展示受伤害角色的一张手牌,若此牌与你弃置的牌花色或点数相同,此杀的伤害+2', jiutiansuanchi_info:'每当你使用杀造成伤害,你可以弃置一张牌并展示受伤害角色的一张手牌,若此牌与你弃置的牌花色或点数相同,此杀的伤害+2',
fengyinzhidan:'封印之蛋', fengyinzhidan:'封印之蛋',

View File

@ -49,6 +49,7 @@ character.standard={
trigger:{player:'chooseToRespondBegin'}, trigger:{player:'chooseToRespondBegin'},
filter:function(event,player){ filter:function(event,player){
if(event.responded) return false; if(event.responded) return false;
if(player.storage.hujiaing) return false;
if(!player.hasZhuSkill('hujia')) return false; if(!player.hasZhuSkill('hujia')) return false;
if(event.filterCard({name:'shan'})==false) return false; if(event.filterCard({name:'shan'})==false) return false;
for(var i=0;i<game.players.length;i++){ for(var i=0;i<game.players.length;i++){
@ -56,6 +57,10 @@ character.standard={
} }
return false; return false;
}, },
check:function(event,player){
if(ai.get.damageEffect(player,event.player,player)>=0) return false;
return true;
},
content:function(){ content:function(){
"step 0" "step 0"
if(event.current==undefined) event.current=player.next; if(event.current==undefined) event.current=player.next;
@ -66,6 +71,7 @@ character.standard={
if((event.current==game.me&&!_status.auto)||( if((event.current==game.me&&!_status.auto)||(
ai.get.attitude(event.current,player)>2)|| ai.get.attitude(event.current,player)>2)||
event.current.isOnline()){ event.current.isOnline()){
player.storage.hujiaing=true;
var next=event.current.chooseToRespond('是否替'+get.translation(player)+'打出一张闪?',{name:'shan'}); var next=event.current.chooseToRespond('是否替'+get.translation(player)+'打出一张闪?',{name:'shan'});
next.set('ai',function(){ next.set('ai',function(){
var event=_status.event; var event=_status.event;
@ -76,6 +82,7 @@ character.standard={
} }
} }
"step 1" "step 1"
player.storage.hujiaing=false;
if(result.bool){ if(result.bool){
event.finish(); event.finish();
trigger.result=result; trigger.result=result;
@ -564,6 +571,7 @@ character.standard={
trigger:{player:'chooseToRespondBegin'}, trigger:{player:'chooseToRespondBegin'},
filter:function(event,player){ filter:function(event,player){
if(event.responded) return false; if(event.responded) return false;
if(player.storage.jijianging) return false;
if(!player.hasZhuSkill('jijiang')) return false; if(!player.hasZhuSkill('jijiang')) return false;
if(event.filterCard({name:'sha'})==false) return false; if(event.filterCard({name:'sha'})==false) return false;
for(var i=0;i<game.players.length;i++){ for(var i=0;i<game.players.length;i++){
@ -571,10 +579,6 @@ character.standard={
} }
return false; return false;
}, },
check:function(event,player){
if(player.storage.jijianging) return false;
return true;
},
content:function(){ content:function(){
"step 0" "step 0"
if(event.current==undefined) event.current=player.next; if(event.current==undefined) event.current=player.next;

View File

@ -2063,7 +2063,7 @@ character.swd={
} }
}, },
ai:{ ai:{
order:9, order:9.5,
expose:0.2, expose:0.2,
result:{ result:{
target:function(player,target){ target:function(player,target){

View File

@ -2922,16 +2922,16 @@
map.skill_bar.hide(); map.skill_bar.hide();
} }
}, },
stone_mode:{ // stone_mode:{
name:'游戏模式', // name:'游戏模式',
init:'deck', // init:'deck',
item:{ // item:{
deck:'构筑', // deck:'构筑',
random:'随机' // random:'随机'
}, // },
restart:true, // restart:true,
frequent:true, // frequent:true,
}, // },
// deck_length:{ // deck_length:{
// name:'卡组长度', // name:'卡组长度',
// init:'30', // init:'30',
@ -31435,7 +31435,7 @@
uiintro.addSmall(node.get('h')); uiintro.addSmall(node.get('h'));
} }
var skills=node.skills; var skills=node.get('s');
var skills2=game.filterSkills(node.skills,node); var skills2=game.filterSkills(node.skills,node);
for(i=0;i<skills.length;i++){ for(i=0;i<skills.length;i++){
if(lib.skill[skills[i]]&&lib.skill[skills[i]].nopop) continue; if(lib.skill[skills[i]]&&lib.skill[skills[i]].nopop) continue;

View File

@ -65,11 +65,17 @@ mode.brawl={
showcase.style.width='100%'; showcase.style.width='100%';
showcase.style.display='block' showcase.style.display='block'
showcase.action=info.showcase; showcase.action=info.showcase;
node.nodes=[ if(info.fullshow){
ui.create.div('.caption',caption), node.nodes=[showcase];
ui.create.div('.text center',intro), showcase.style.height='100%';
showcase }
]; else{
node.nodes=[
ui.create.div('.caption',caption),
ui.create.div('.text center',intro),
showcase
];
}
node.link=name; node.link=name;
node._nostart=info.nostart; node._nostart=info.nostart;
if(lib.storage.currentBrawl==name){ if(lib.storage.currentBrawl==name){
@ -828,19 +834,40 @@ mode.brawl={
submode:'normal' submode:'normal'
}, },
nostart:true, nostart:true,
fullshow:true,
showcase:function(init){ showcase:function(init){
if(init){ if(init){
lib.translate.zhu=lib.translate.zhu||'主';
lib.translate.zhong=lib.translate.zhong||'忠';
lib.translate.nei=lib.translate.nei||'内';
lib.translate.fan=lib.translate.fan||'反';
this.style.transition='all 0s'; this.style.transition='all 0s';
this.style.height=(this.offsetHeight-10)+'px'; this.style.height=(this.offsetHeight-10)+'px';
this.style.overflow='scroll'; this.style.overflow='scroll';
lib.setScroll(this); lib.setScroll(this);
this.style.paddingTop='10px';
var style={marginLeft:'3px',marginRight:'3px'}; var style={marginLeft:'3px',marginRight:'3px'};
var style2={position:'relative',display:'block',left:0,top:0,marginBottom:'6px',padding:0,width:'100%'}; var style2={position:'relative',display:'block',left:0,top:0,marginBottom:'6px',padding:0,width:'100%'};
var style3={marginLeft:'4px',marginRight:'4px',position:'relative'}
var scenename=ui.create.node('input',ui.create.div(style2,'','场景名称:',this),{width:'120px'});
scenename.type='text';
scenename.style.marginTop='20px';
var sceneintro=ui.create.node('input',ui.create.div(style2,'','场景名称:',this),{width:'120px'});
sceneintro.type='text';
sceneintro.style.marginBottom='10px';
var line1=ui.create.div(style2,this); var line1=ui.create.div(style2,this);
var current=null; var current=null;
var addCharacter=ui.create.node('button','添加角色',line1,function(){ var addCharacter=ui.create.node('button','添加角色',line1,function(){
line1.style.display='none'; // line1.style.display='none';
resetStatus();
editPile.disabled=true;
editCode.disabled=true;
saveButton.disabled=true;
exportButton.disabled=true;
line7.style.display='none'; line7.style.display='none';
line2.style.display='block'; line2.style.display='block';
line2_t.style.display='block'; line2_t.style.display='block';
@ -856,17 +883,44 @@ mode.brawl={
if(line6_e.childElementCount) capt_e.style.display='block'; if(line6_e.childElementCount) capt_e.style.display='block';
if(line6_j.childElementCount) capt_j.style.display='block'; if(line6_j.childElementCount) capt_j.style.display='block';
},style); },style);
var editPile=ui.create.node('button','游戏状态',line1,function(){ var editPile=ui.create.node('button','设置状态',line1,function(){
resetCharacter();
addCharacter.disabled=true;
editCode.disabled=true;
saveButton.disabled=true;
exportButton.disabled=true;
line7.style.display='none';
line8.style.display='block';
capt8.style.display='block';
line9.style.display='block';
line10.style.display='block';
line11.style.display='block';
capt9.style.display='block';
line3.style.display='block';
line6_t.style.display='block';
line6_b.style.display='block';
line6_d.style.display='block';
if(line6_t.childElementCount) capt_t.style.display='block';
if(line6_b.childElementCount) capt_b.style.display='block';
if(line6_d.childElementCount) capt_d.style.display='block';
},style);
var editCode=ui.create.node('button','编辑代码',line1,function(){
console.log(1); console.log(1);
},style); },style);
var saveButton=ui.create.node('button','保存',line1,function(){ var saveButton=ui.create.node('button','保存',line1,function(){
console.log(1); console.log(1);
},style); },style);
var exportButton=ui.create.node('button','导出',line1,function(){
console.log(1);
},style);
var capt1=ui.create.div(style2,'','角色信息',this); var capt1=ui.create.div(style2,'','角色信息',this);
var line2=ui.create.div(style2,this); var line2=ui.create.div(style2,this);
line2.style.display='none'; line2.style.display='none';
var identity=ui.create.selectlist([['zhu','主公'],['zhong','忠臣'],['nei','内奸'],['fan','反贼']],'zhu',line2); var identity=ui.create.selectlist([['zhu','主公'],['zhong','忠臣'],['nei','内奸'],['fan','反贼']],'zhu',line2);
identity.value='fan';
identity.style.marginLeft='3px'; identity.style.marginLeft='3px';
identity.style.marginRight='3px'; identity.style.marginRight='3px';
var position=ui.create.selectlist([['0','随机位置'],['1','一号位'],['2','二号位'],['3','三号位'],['4','四号位'],['5','五号位'],['6','六号位'],['7','七号位'],['8','八号位']],'1',line2); var position=ui.create.selectlist([['0','随机位置'],['1','一号位'],['2','二号位'],['3','三号位'],['4','四号位'],['5','五号位'],['6','六号位'],['7','七号位'],['8','八号位']],'1',line2);
@ -874,7 +928,7 @@ mode.brawl={
position.style.marginRight='3px'; position.style.marginRight='3px';
var line2_t=ui.create.div(style2,this); var line2_t=ui.create.div(style2,this);
line2_t.style.display='none'; line2_t.style.display='none';
line2_t.style.marginBottom='10px'; // line2_t.style.marginBottom='10px';
ui.create.node('span','体力:',line2_t); ui.create.node('span','体力:',line2_t);
var hp=ui.create.node('input',line2_t,{width:'40px'}); var hp=ui.create.node('input',line2_t,{width:'40px'});
hp.type='text'; hp.type='text';
@ -919,6 +973,10 @@ mode.brawl={
name2.style.marginRight='3px'; name2.style.marginRight='3px';
name2.style.maxWidth='80px'; name2.style.maxWidth='80px';
var capt9=ui.create.div(style2,'','编辑牌堆',this);
capt9.style.display='none';
var capt2=ui.create.div(style2,'','添加卡牌',this); var capt2=ui.create.div(style2,'','添加卡牌',this);
var line3=ui.create.div(style2,this); var line3=ui.create.div(style2,this);
line3.style.display='none'; line3.style.display='none';
@ -950,7 +1008,7 @@ mode.brawl={
var cardpileaddname=ui.create.selectlist(pileaddlist,null,line3); var cardpileaddname=ui.create.selectlist(pileaddlist,null,line3);
cardpileaddname.style.marginLeft='3px'; cardpileaddname.style.marginLeft='3px';
cardpileaddname.style.marginRight='3px'; cardpileaddname.style.marginRight='3px';
cardpileaddname.style.maxWidth='80px'; cardpileaddname.style.width='85px';
var cardpileaddsuit=ui.create.selectlist([ var cardpileaddsuit=ui.create.selectlist([
['random','随机花色'], ['random','随机花色'],
['heart','红桃'], ['heart','红桃'],
@ -960,11 +1018,13 @@ mode.brawl={
],null,line3); ],null,line3);
cardpileaddsuit.style.marginLeft='3px'; cardpileaddsuit.style.marginLeft='3px';
cardpileaddsuit.style.marginRight='3px'; cardpileaddsuit.style.marginRight='3px';
cardpileaddsuit.style.width='85px';
var cardpileaddnumber=ui.create.selectlist([ var cardpileaddnumber=ui.create.selectlist([
['random','随机点数'],1,2,3,4,5,6,7,8,9,10,11,12,13 ['random','随机点数'],1,2,3,4,5,6,7,8,9,10,11,12,13
],null,line3); ],null,line3);
cardpileaddnumber.style.marginLeft='3px'; cardpileaddnumber.style.marginLeft='3px';
cardpileaddnumber.style.marginRight='3px'; cardpileaddnumber.style.marginRight='3px';
cardpileaddnumber.style.width='85px';
var fakecard=function(name,suit,number){ var fakecard=function(name,suit,number){
var card=ui.create.card(null,'noclick',true); var card=ui.create.card(null,'noclick',true);
@ -988,7 +1048,7 @@ mode.brawl={
} }
return card; return card;
}; };
var cc_h=ui.create.node('button','加入手牌',line5,function(){ var cc_h=ui.create.node('button','加入手牌',line5,function(){
var card=fakecard(cardpileaddname.value,cardpileaddsuit.value,cardpileaddnumber.value); var card=fakecard(cardpileaddname.value,cardpileaddsuit.value,cardpileaddnumber.value);
card.listen(function(){ card.listen(function(){
this.remove(); this.remove();
@ -997,7 +1057,7 @@ mode.brawl={
line6_h.appendChild(card); line6_h.appendChild(card);
capt_h.style.display='block'; capt_h.style.display='block';
}); });
var cc_e=ui.create.node('button','加入装备',line5,function(){ var cc_e=ui.create.node('button','加入装备',line5,function(){
if(get.type(cardpileaddname.value)!='equip') return; if(get.type(cardpileaddname.value)!='equip') return;
var subtype=get.subtype(cardpileaddname.value); var subtype=get.subtype(cardpileaddname.value);
for(var i=0;i<line6_e.childElementCount;i++){ for(var i=0;i<line6_e.childElementCount;i++){
@ -1013,7 +1073,7 @@ mode.brawl={
line6_e.appendChild(card); line6_e.appendChild(card);
capt_e.style.display='block'; capt_e.style.display='block';
}); });
var cc_j=ui.create.node('button','加入判定',line5,function(){ var cc_j=ui.create.node('button','加入判定',line5,function(){
if(get.type(cardpileaddname.value)!='delay') return; if(get.type(cardpileaddname.value)!='delay') return;
for(var i=0;i<line6_j.childElementCount;i++){ for(var i=0;i<line6_j.childElementCount;i++){
if(line6_j.childNodes[i].name==cardpileaddname.value){ if(line6_j.childNodes[i].name==cardpileaddname.value){
@ -1030,10 +1090,13 @@ mode.brawl={
}); });
cc_h.style.marginLeft='3px'; cc_h.style.marginLeft='3px';
cc_h.style.marginRight='3px'; cc_h.style.marginRight='3px';
cc_h.style.width='85px';
cc_e.style.marginLeft='3px'; cc_e.style.marginLeft='3px';
cc_e.style.marginRight='3px'; cc_e.style.marginRight='3px';
cc_e.style.width='85px';
cc_j.style.marginLeft='3px'; cc_j.style.marginLeft='3px';
cc_j.style.marginRight='3px'; cc_j.style.marginRight='3px';
cc_j.style.width='85px';
var capt_h=ui.create.div(style2,'','手牌区',this); var capt_h=ui.create.div(style2,'','手牌区',this);
var line6_h=ui.create.div(style2,this); var line6_h=ui.create.div(style2,this);
@ -1046,10 +1109,70 @@ mode.brawl={
capt_e.style.display='none'; capt_e.style.display='none';
capt_j.style.display='none'; capt_j.style.display='none';
var line10=ui.create.div(style2,this);
line10.style.display='none';
var ac_h=ui.create.node('button','加入牌堆顶',line10,function(){
var card=fakecard(cardpileaddname.value,cardpileaddsuit.value,cardpileaddnumber.value);
card.listen(function(){
this.remove();
if(!line6_t.childElementCount) capt_t.style.display='none';
});
line6_t.appendChild(card);
capt_t.style.display='block';
});
var ac_e=ui.create.node('button','加入牌堆底',line10,function(){
var card=fakecard(cardpileaddname.value,cardpileaddsuit.value,cardpileaddnumber.value);
card.listen(function(){
this.remove();
if(!line6_b.childElementCount) capt_b.style.display='none';
});
line6_b.appendChild(card);
capt_b.style.display='block';
});
var ac_j=ui.create.node('button','加入弃牌堆',line10,function(){
var card=fakecard(cardpileaddname.value,cardpileaddsuit.value,cardpileaddnumber.value);
card.listen(function(){
this.remove();
if(!line6_d.childElementCount) capt_d.style.display='none';
});
line6_d.appendChild(card);
capt_d.style.display='block';
});
ac_h.style.marginLeft='3px';
ac_h.style.marginRight='3px';
ac_h.style.width='85px';
ac_e.style.marginLeft='3px';
ac_e.style.marginRight='3px';
ac_e.style.width='85px';
ac_j.style.marginLeft='3px';
ac_j.style.marginRight='3px';
ac_j.style.width='85px';
var line11=ui.create.div(style2,this,'','替换牌堆');
line11.style.display='none';
var replacepile=ui.create.node('input',line11);
replacepile.type='checkbox';
var capt_t=ui.create.div(style2,'','牌堆顶',this);
var line6_t=ui.create.div(style2,this);
var capt_b=ui.create.div(style2,'','牌堆底',this);
var line6_b=ui.create.div(style2,this);
var capt_d=ui.create.div(style2,'','弃牌堆',this);
var line6_d=ui.create.div(style2,this);
line6_d.style.marginBottom='10px';
capt_t.style.display='none';
capt_b.style.display='none';
capt_d.style.display='none';
var line4=ui.create.div(style2,this); var line4=ui.create.div(style2,this);
line4.style.display='none'; line4.style.display='none';
line4.style.marginTop='20px';
var resetCharacter=function(){ var resetCharacter=function(){
line1.style.display='block'; // line1.style.display='block';
editPile.disabled=false;
editCode.disabled=false;
saveButton.disabled=false;
exportButton.disabled=false;
line7.style.display='block'; line7.style.display='block';
line2.style.display='none'; line2.style.display='none';
line2_t.style.display='none'; line2_t.style.display='none';
@ -1067,8 +1190,8 @@ mode.brawl={
name1.value='random'; name1.value='random';
name2.value='none'; name2.value='none';
identity.value='zhu'; identity.value='fan';
position.value='1'; position.value='0';
hp.value=''; hp.value='';
maxHp.value=''; maxHp.value='';
line6_h.innerHTML=''; line6_h.innerHTML='';
@ -1077,29 +1200,12 @@ mode.brawl={
cardpileaddname.value='random'; cardpileaddname.value='random';
cardpileaddsuit.value='random'; cardpileaddsuit.value='random';
cardpileaddnumber.value='random'; cardpileaddnumber.value='random';
linked.checked=false;
turnedover.checked=false;
}; };
ui.create.node('button','确定',line4,style,function(){ var createCharacter=function(info){
var info={
name:name1.value,
name2:name2.value,
identity:identity.value,
position:position.value,
hp:hp.value,
maxHp:maxHp.value,
handcards:[],
equips:[],
judges:[]
};
for(var i=0;i<line6_h.childElementCount;i++){
info.handcards.push([line6_h.childNodes[i].name,line6_h.childNodes[i].suit,line6_h.childNodes[i].number]);
}
for(var i=0;i<line6_e.childElementCount;i++){
info.equips.push([line6_e.childNodes[i].name,line6_e.childNodes[i].suit,line6_e.childNodes[i].number]);
}
for(var i=0;i<line6_j.childElementCount;i++){
info.judges.push([line6_j.childNodes[i].name,line6_j.childNodes[i].suit,line6_j.childNodes[i].number]);
}
var player=ui.create.player(null,true); var player=ui.create.player(null,true);
player.info=info;
var name=info.name,name3=info.name2; var name=info.name,name3=info.name2;
if(name=='random'){ if(name=='random'){
name='re_caocao'; name='re_caocao';
@ -1134,13 +1240,66 @@ mode.brawl={
for(var i=0;i<info.judges.length;i++){ for(var i=0;i<info.judges.length;i++){
player.node.judges.appendChild(fakecard.apply(this,info.judges[i])); player.node.judges.appendChild(fakecard.apply(this,info.judges[i]));
} }
player.setIdentity(info.identity);
var pos=parseInt(info.position);
if(pos==0){
pos='随机位置';
}
else{
pos=get.cnNumber(pos,true)+'号位'
}
if(info.linked&&info.turnedover){
pos+='<br>横置 - 翻面'
}
else{
if(info.linked) pos+=' - 横置';
if(info.turnedover) pos+=' - 翻面';
}
player.setNickname(pos);
player.update(); player.update();
player.style.transform='scale(0.6)'; player.style.transform='scale(0.7)';
player.style.position='relative'; player.style.position='relative';
player.style.left=0; player.style.left=0;
player.style.top=0; player.style.top=0;
player.style.margin='-26px'; player.style.margin='-18px';
player.node.marks.remove(); player.node.marks.remove();
return player;
};
ui.create.div('.menubutton.large','确定',line4,style3,function(){
var info={
name:name1.value,
name2:name2.value,
identity:identity.value,
position:position.value,
hp:parseInt(hp.value),
maxHp:parseInt(maxHp.value),
linked:linked.checked,
turnedover:turnedover.checked,
position:position.value,
handcards:[],
equips:[],
judges:[]
};
for(var i=0;i<line7.childElementCount;i++){
if(info.identity=='zhu'&&line7.childNodes[i].info.identity=='zhu'){
alert('不能有两个主公');
return;
}
if(info.position!='0'&&info.position==line7.childNodes[i].info.position){
alert('座位与现在角色相同');
return;
}
}
for(var i=0;i<line6_h.childElementCount;i++){
info.handcards.push([line6_h.childNodes[i].name,line6_h.childNodes[i].suit,line6_h.childNodes[i].number]);
}
for(var i=0;i<line6_e.childElementCount;i++){
info.equips.push([line6_e.childNodes[i].name,line6_e.childNodes[i].suit,line6_e.childNodes[i].number]);
}
for(var i=0;i<line6_j.childElementCount;i++){
info.judges.push([line6_j.childNodes[i].name,line6_j.childNodes[i].suit,line6_j.childNodes[i].number]);
}
var player=createCharacter(info);
line7.appendChild(player); line7.appendChild(player);
player.listen(function(){ player.listen(function(){
if(confirm('是否删除此角色?')){ if(confirm('是否删除此角色?')){
@ -1149,11 +1308,64 @@ mode.brawl={
}); });
resetCharacter(); resetCharacter();
}); });
ui.create.node('button','取消',line4,style,resetCharacter); ui.create.div('.menubutton.large','取消',line4,style3,resetCharacter);
var line7=ui.create.div(style2,this); var line7=ui.create.div(style2,this);
line7.style.marginTop='12px'; line7.style.marginTop='12px';
var capt8=ui.create.div(style2,'','胜负条件',this);
capt8.style.display='none';
var line8=ui.create.div(style2,this);
line8.style.display='none';
line8.style.marginTop='10px';
line8.style.marginBottom='10px';
var turnslist=[['1','一'],['2','二'],['3','三'],['4','四'],['5','五'],['6','六'],['7','七'],['8','八'],['9','九'],['10','十']];
var results=[['none','无'],['win','胜利'],['lose','失败'],['tie','平局']];
var turns=ui.create.selectlist(turnslist,'1',line8);
ui.create.node('span','个回合后',line8,style);
var turnsresult=ui.create.selectlist(results,'none',line8);
var washes=ui.create.selectlist(turnslist,'1',line8);
washes.style.marginLeft='20px';
ui.create.node('span','次洗牌后',line8,style);
var washesresult=ui.create.selectlist(results,'none',line8);
var line9=ui.create.div(style2,this);
line9.style.display='none';
line9.style.marginTop='20px';
var resetStatus=function(){
addCharacter.disabled=false;
editCode.disabled=false;
saveButton.disabled=false;
exportButton.disabled=false;
cardpileaddname.value='random';
cardpileaddsuit.value='random';
cardpileaddnumber.value='random';
line8.style.display='none';
capt8.style.display='none';
capt9.style.display='none';
line9.style.display='none';
line10.style.display='none';
line11.style.display='none';
line3.style.display='none';
line7.style.display='block';
line6_t.style.display='none';
line6_b.style.display='none';
line6_d.style.display='none';
capt_t.style.display='none';
capt_b.style.display='none';
capt_d.style.display='none';
}
ui.create.div('.menubutton.large','确定',line9,style3,resetStatus);
} }
} }
} }
} },
}; };

View File

@ -3,7 +3,7 @@ mode.stone={
start:function(){ start:function(){
"step 0" "step 0"
lib.init.css(lib.assetURL+'layout/mode/','stone'); lib.init.css(lib.assetURL+'layout/mode/','stone');
_status.mode=get.config('stone_mode'); _status.mode='deck';
game.initStone(); game.initStone();
var playback=localStorage.getItem(lib.configprefix+'playback'); var playback=localStorage.getItem(lib.configprefix+'playback');
@ -1268,7 +1268,7 @@ mode.stone={
careerList:['mage','shaman','druid','paladin','rogue','priest','hunter','warrior','warlock'], careerList:['mage','shaman','druid','paladin','rogue','priest','hunter','warrior','warlock'],
game:{ game:{
reserveDead:true, reserveDead:true,
bannedcards:['lebu','guiyoujie','xietianzi'], bannedcards:['lebu','guiyoujie','xietianzi','lingjiandai','jiguanshu','sifeizhenmian','mujiaren'],
onwash:function(){ onwash:function(){
if(_status.mode!='deck') return; if(_status.mode!='deck') return;
var list=[]; var list=[];
@ -9086,17 +9086,25 @@ mode.stone={
unique:true, unique:true,
enable:['chooseToRespond'], enable:['chooseToRespond'],
viewAs:{name:'shan'}, viewAs:{name:'shan'},
filterCard:{type:'stonecharacter'}, filterCard:{type:['stonecharacter','stonecard']},
mod:{
cardEnabled:function(card){
if(get.type(card)=='stonecard') return false;
},
cardSavable:function(card){
if(get.type(card)=='stonecard') return false;
},
},
check:function(){return 1}, check:function(){return 1},
filter:function(event,player){ filter:function(event,player){
return player.num('h',{type:'stonecharacter'})>0; return player.num('h',{type:['stonecharacter','stonecard']})>0;
}, },
viewAsFilter:function(player){ viewAsFilter:function(player){
return player.num('h',{type:'stonecharacter'})>0; return player.num('h',{type:['stonecharacter','stonecard']})>0;
}, },
ai:{ ai:{
skillTagFilter:function(player){ skillTagFilter:function(player){
return player.num('h',{type:'stonecharacter'})>0; return player.num('h',{type:['stonecharacter','stonecard']})>0;
}, },
respondShan:true, respondShan:true,
order:4, order:4,
@ -10102,15 +10110,15 @@ mode.stone={
stonesha:'进攻', stonesha:'进攻',
stonesha_info:'锁定技,你的装备牌均视为杀', stonesha_info:'锁定技,你的装备牌均视为杀',
stoneshan:'格挡', stoneshan:'格挡',
stoneshan_info:'锁定技,你的随从牌均视为闪', stoneshan_info:'锁定技,你的随从和法术牌均视为闪',
stonecharacter:'随从', stonecharacter:'随从',
spell_shengerpingdeng:'生而平等', spell_shengerpingdeng:'生而平等',
spell_shengerpingdeng_info:'将所有随从体力上限降为1', spell_shengerpingdeng_info:'将所有随从体力上限降为1',
spell_jingshenkongzhi:'精神控制', spell_jingshenkongzhi:'精神控制',
spell_jingshenkongzhi_info:'限主将使用,将一名敌方随从吸收为己方', spell_jingshenkongzhi_info:'将一名敌方随从吸收为己方',
spell_anyingkuangluan:'暗影狂乱', spell_anyingkuangluan:'暗影狂乱',
spell_anyingkuangluan_info:'限主将使用,将一名敌方随从吸收为己方,并令其于下个回合结束后死亡', spell_anyingkuangluan_info:'将一名敌方随从吸收为己方,并令其于下个回合结束后死亡',
spell_anyingkuangluan_die:'暗影狂乱', spell_anyingkuangluan_die:'暗影狂乱',
spell_anyingkuangluan_die_info:'下个回合结束后死亡', spell_anyingkuangluan_die_info:'下个回合结束后死亡',
spell_binghuan:'冰环', spell_binghuan:'冰环',
@ -10180,7 +10188,7 @@ mode.stone={
'<div style="margin:10px">战斗</div><ul style="margin-top:0"><li>游戏流程类似1v1场上有两名主将进行对抗主将的体力上限+1'+ '<div style="margin:10px">战斗</div><ul style="margin-top:0"><li>游戏流程类似1v1场上有两名主将进行对抗主将的体力上限+1'+
'<li>游戏牌堆移除了乐不思蜀等跳过出牌阶段的卡牌'+ '<li>游戏牌堆移除了乐不思蜀等跳过出牌阶段的卡牌'+
'<li>主将出牌阶段的出牌数量行动值有上限从1开始递增后手的首个回合有一点额外行动值装备牌不计入出牌上限<li>游戏每进行一轮,主将的出牌上限+1超过6时减至3并重新累加'+ '<li>主将出牌阶段的出牌数量行动值有上限从1开始递增后手的首个回合有一点额外行动值装备牌不计入出牌上限<li>游戏每进行一轮,主将的出牌上限+1超过6时减至3并重新累加'+
'<li>使用随从牌可召唤一个随从随从出场时背面朝上。每一方在场的随从数不能超过4<li>随从于摸牌阶段摸牌基数为1随从的随从牌均视为闪,装备牌均视为杀<li>'+ '<li>使用随从牌可召唤一个随从随从出场时背面朝上。每一方在场的随从数不能超过4<li>随从于摸牌阶段摸牌基数为1随从的法术和随从牌均视为闪,装备牌均视为杀<li>'+
'随从与其他所有角色相互距离基数为1<li>'+ '随从与其他所有角色相互距离基数为1<li>'+
'主将杀死对方随从后获得一个额外的行动值并从牌库中获得一张牌,杀死己方随从无惩罚,随从杀死随从无效果'+ '主将杀死对方随从后获得一个额外的行动值并从牌库中获得一张牌,杀死己方随从无惩罚,随从杀死随从无效果'+
'<li>主将可重铸随从牌但回合内总的重铸次数不能超过3随从不能重铸任何牌包括铁索等默认可以重铸的牌若重铸的牌为随从牌或法术牌则摸牌改为获得一张随机法术牌'+ '<li>主将可重铸随从牌但回合内总的重铸次数不能超过3随从不能重铸任何牌包括铁索等默认可以重铸的牌若重铸的牌为随从牌或法术牌则摸牌改为获得一张随机法术牌'+