This commit is contained in:
libccy 2016-05-28 17:00:48 +08:00
parent 9c6b3b23ab
commit 8a74b2865f
5 changed files with 138 additions and 16 deletions

View File

@ -369,19 +369,35 @@ character.hearth={
} }
}, },
xunbao:{ xunbao:{
enable:'phaseUse', trigger:{player:'phaseUseBegin'},
frequent:true,
filter:function(event,player){ filter:function(event,player){
return !player.skills.contains('xunbao2'); return !player.skills.contains('xunbao2');
}, },
filterCard:true, // filterCard:true,
check:function(card){ // check:function(card){
return 6-ai.get.value(card); // return 6-ai.get.value(card);
}, // },
position:'he', // position:'he',
content:function(){ content:function(){
player.storage.xunbao2=game.createCard('hsbaowu_cangbaotu'); 'step 0'
event.card=game.createCard('hsbaowu_cangbaotu');
player.storage.xunbao2=event.card;
player.storage.xunbao2_markcount=player.storage.xunbao2.number;
// player.$draw(player.storage.xunbao2);
player.addSkill('xunbao2'); player.addSkill('xunbao2');
player.popup(player.storage.xunbao2.number.toString()); game.delay(2);
event.node=event.card.copy('thrown','center','thrownhighlight',ui.arena).animate('start');
ui.arena.classList.add('thrownhighlight');
game.addVideo('thrownhighlight1');
game.addVideo('centernode',null,get.cardInfo(event.card));
'step 1'
game.addVideo('deletenode',player,[get.cardInfo(event.node)]);
event.node.delete();
event.node.style.transform='scale(0)';
game.addVideo('thrownhighlight2');
ui.arena.classList.remove('thrownhighlight');
}, },
ai:{ ai:{
order:3, order:3,
@ -391,7 +407,8 @@ character.hearth={
} }
}, },
xunbao2:{ xunbao2:{
mark:'card', mark:true,
marktext:'宝',
intro:{ intro:{
content:'card', content:'card',
}, },
@ -3629,7 +3646,7 @@ character.hearth={
zhuizong_info:'出牌阶段限一次,你可以弃置任意张牌,观看牌堆顶的等同于弃牌数四倍的牌,然后获得其中的一张牌', zhuizong_info:'出牌阶段限一次,你可以弃置任意张牌,观看牌堆顶的等同于弃牌数四倍的牌,然后获得其中的一张牌',
xunbao:'寻宝', xunbao:'寻宝',
xunbao2:'寻宝', xunbao2:'寻宝',
xunbao_info:'出牌阶段,若你的武将牌上没有藏宝图,你可以弃置一手牌,并将一张藏宝图置于你的武将牌上;回合开始阶段,你可以弃置一张与藏宝图点数相同的牌并获得此藏宝图', xunbao_info:'出牌阶段开始时,若你的武将牌上没有藏宝图,你可以将一张藏宝图置于你的武将牌上;回合开始阶段,你可以弃置一张与藏宝图点数相同的牌并获得此藏宝图',
xieneng:'邪能', xieneng:'邪能',
xieneng_info:'回合结束阶段,你可以将武将牌翻面,并获得一张神器牌', xieneng_info:'回合结束阶段,你可以将武将牌翻面,并获得一张神器牌',
fbeifa:'北伐', fbeifa:'北伐',

View File

@ -2317,9 +2317,11 @@
} }
if(config.versus_mode=='two'){ if(config.versus_mode=='two'){
map.replace_handcard_two.show(); map.replace_handcard_two.show();
map.change_identity.show();
} }
else{ else{
map.replace_handcard_two.hide(); map.replace_handcard_two.hide();
map.change_identity.remove();
} }
}, },
versus_mode:{ versus_mode:{
@ -2361,6 +2363,20 @@
} }
} }
}, },
change_identity:{
name:'自由选择座位',
init:true,
onclick:function(bool){
game.saveConfig('change_identity',bool,this._link.config.mode);
if(!_status.event.getParent().showConfig&&!_status.event.showConfig) return;
var dialog;
if(ui.cheat2&&ui.cheat2.backup) dialog=ui.cheat2.backup;
else dialog=_status.event.dialog;
if(!dialog.querySelector('table')&&get.config('change_identity')) _status.event.getParent().addSetting(dialog);
else _status.event.getParent().removeSetting(dialog);
ui.update();
}
},
change_choice:{ change_choice:{
name:'开启换将卡', name:'开启换将卡',
init:true, init:true,
@ -7631,7 +7647,10 @@
lib.skill[i].intro&&!lib.skill[i].intro.nocount&&this.storage[i])){ lib.skill[i].intro&&!lib.skill[i].intro.nocount&&this.storage[i])){
this.marks[i].classList.add('overflowmark') this.marks[i].classList.add('overflowmark')
var num; var num;
if(i=='ghujia'){ if(typeof this.storage[i+'_markcount']=='number'){
num=this.storage[i+'_markcount'];
}
else if(i=='ghujia'){
num=this.hujia; num=this.hujia;
} }
else if(typeof this.storage[i]=='number'){ else if(typeof this.storage[i]=='number'){
@ -14620,7 +14639,8 @@
console.log(player); console.log(player);
} }
}, },
deletenode:function(player,cards){ deletenode:function(player,cards,method){
console.log(method);
if(cards){ if(cards){
var nodeList=document.querySelectorAll('#arena>.card,#chess>.card'); var nodeList=document.querySelectorAll('#arena>.card,#chess>.card');
var nodes=[]; var nodes=[];
@ -14631,6 +14651,9 @@
for(var j=0;j<nodes.length;j++){ for(var j=0;j<nodes.length;j++){
if(cards[i][2]==nodes[j].name&&cards[i][0]==nodes[j].suit&&cards[i][1]==nodes[j].number){ if(cards[i][2]==nodes[j].name&&cards[i][0]==nodes[j].suit&&cards[i][1]==nodes[j].number){
nodes[j].delete(); nodes[j].delete();
if(method=='zoom'){
nodes[j].style.transform='scale(0)';
}
cards.splice(i--,1); cards.splice(i--,1);
nodes.splice(j--,1); nodes.splice(j--,1);
break; break;

View File

@ -12,6 +12,7 @@ window.noname_update={
'mode/versus.js', 'mode/versus.js',
'character/yijiang.js', 'character/yijiang.js',
'character/shenhua.js' 'character/shenhua.js'
'character/hearth.js'
], ],
'1.8.11':[], '1.8.11':[],
'1.8.12':[], '1.8.12':[],

View File

@ -555,7 +555,7 @@ mode.chess={
if(_status.mode=='leader'){ if(_status.mode=='leader'){
game.phaseLoopOrdered(p); game.phaseLoopOrdered(p);
} }
else if(get.config('seat_order')=='交替'){ else if(get.config('seat_order')=='指定'){
game.phaseLoopOrdered(p); game.phaseLoopOrdered(p);
} }
else{ else{
@ -1288,7 +1288,7 @@ mode.chess={
event.playername=_status.additionallist.randomRemove(); event.playername=_status.additionallist.randomRemove();
} }
} }
else if(!event.enemy&&get.config('seat_order')=='交替'&&!_status.auto&&_status.replacelist.length){ else if(!event.enemy&&get.config('seat_order')=='指定'&&!_status.auto&&_status.replacelist.length){
_status.replacelist.add(event.playername); _status.replacelist.add(event.playername);
event.dialog=ui.create.dialog('选择替补角色',[_status.replacelist,'character']); event.dialog=ui.create.dialog('选择替补角色',[_status.replacelist,'character']);
event.filterButton=function(){return true;}; event.filterButton=function(){return true;};
@ -3917,7 +3917,7 @@ mode.chess={
// this.dialog.versus_first_less=this.dialog.add(ui.create.switcher('versus_first_less',lib.storage.first_less)).querySelector('.toggle'); // this.dialog.versus_first_less=this.dialog.add(ui.create.switcher('versus_first_less',lib.storage.first_less)).querySelector('.toggle');
dialog.choice.reward=dialog.add(ui.create.switcher('reward',[0,1,2,3,4],get.config('reward'))).querySelector('.toggle'); dialog.choice.reward=dialog.add(ui.create.switcher('reward',[0,1,2,3,4],get.config('reward'))).querySelector('.toggle');
dialog.choice.punish=dialog.add(ui.create.switcher('punish',['弃牌','无','摸牌'],get.config('punish'))).querySelector('.toggle'); dialog.choice.punish=dialog.add(ui.create.switcher('punish',['弃牌','无','摸牌'],get.config('punish'))).querySelector('.toggle');
dialog.choice.seat_order=dialog.add(ui.create.switcher('seat_order',['交替','随机'],get.config('seat_order'))).querySelector('.toggle'); dialog.choice.seat_order=dialog.add(ui.create.switcher('seat_order',['指定','交替'],get.config('seat_order'))).querySelector('.toggle');
dialog.choice.battle_number=dialog.add(ui.create.switcher('battle_number',[1,2,3,4,6,8],get.config('battle_number'))).querySelector('.toggle'); dialog.choice.battle_number=dialog.add(ui.create.switcher('battle_number',[1,2,3,4,6,8],get.config('battle_number'))).querySelector('.toggle');
dialog.choice.replace_number=dialog.add(ui.create.switcher('replace_number',[0,1,2,3,5,7,9,17],get.config('replace_number'))).querySelector('.toggle'); dialog.choice.replace_number=dialog.add(ui.create.switcher('replace_number',[0,1,2,3,5,7,9,17],get.config('replace_number'))).querySelector('.toggle');
dialog.choice.choice_number=dialog.add(ui.create.switcher('choice_number',[3,6,9],get.config('choice_number'))).querySelector('.toggle'); dialog.choice.choice_number=dialog.add(ui.create.switcher('choice_number',[3,6,9],get.config('choice_number'))).querySelector('.toggle');
@ -6433,7 +6433,7 @@ mode.chess={
'杀死对方阵营的角色可摸一张牌,杀死本方阵营无惩罚<li>'+ '杀死对方阵营的角色可摸一张牌,杀死本方阵营无惩罚<li>'+
'若开启主将,双方各选择一名角色成为主将。主将体力上限加一,主将死亡后,若有副将,副将代替之成为主将,否则游戏结束<li>'+ '若开启主将,双方各选择一名角色成为主将。主将体力上限加一,主将死亡后,若有副将,副将代替之成为主将,否则游戏结束<li>'+
'开启无尽模式后,任何一方有角色死亡都将选择一名新角色重新加入战场,直到点击左上角的结束游戏按钮手动结束游戏。结束游戏时,杀敌更多的一方获胜<li>'+ '开启无尽模式后,任何一方有角色死亡都将选择一名新角色重新加入战场,直到点击左上角的结束游戏按钮手动结束游戏。结束游戏时,杀敌更多的一方获胜<li>'+
'开启交替行动时双方无论存活角色角色多少都将轮流进行行动。在一方所有角色行动完毕进行下一轮行动时若其人数比另一方少另一方可指定至多X名角色名摸一张牌X为人数之差<li>'+ '行动顺序为指定双方无论存活角色角色多少都将轮流进行行动。在一方所有角色行动完毕进行下一轮行动时若其人数比另一方少另一方可指定至多X名角色名摸一张牌X为人数之差<li>'+
'开启战场机关后每个回合结束时有一定机率出现一个机关该机关不参与战斗并有一个影响周围或全体角色的效果。机关在出现后的5〜10个回合内消失<li>'+ '开启战场机关后每个回合结束时有一定机率出现一个机关该机关不参与战斗并有一个影响周围或全体角色的效果。机关在出现后的5〜10个回合内消失<li>'+
'开启击退效果后,当一名角色对距离两格以内的目标造成伤害后,受伤害角色将沿反方向移动一格<li>'+ '开启击退效果后,当一名角色对距离两格以内的目标造成伤害后,受伤害角色将沿反方向移动一格<li>'+
'战场上可设置出现随机路障,角色无法移动到路障处。当一名角色的周围四格有至少三格为路障或在战场外时,其可以在回合内清除一个相邻路障</ul>'+ '战场上可设置出现随机路障,角色无法移动到路障处。当一名角色的周围四格有至少三格为路障或在战场外时,其可以在回合内清除一个相邻路障</ul>'+

View File

@ -528,6 +528,7 @@ mode.versus={
}, },
chooseCharacterTwo:function(){ chooseCharacterTwo:function(){
var next=game.createEvent('chooseCharacter',false); var next=game.createEvent('chooseCharacter',false);
next.showConfig=true;
next.content=function(){ next.content=function(){
'step 0' 'step 0'
var bool=Math.random()<0.5; var bool=Math.random()<0.5;
@ -566,8 +567,85 @@ mode.versus={
} }
var choose=[]; var choose=[];
event.list=list; event.list=list;
var addSetting=function(dialog){
dialog.add('选择座位');
var seats=document.createElement('table');
seats.style.margin='0 auto';
seats.style.width='200px';
var tr=document.createElement('tr');
seats.appendChild(tr);
for(var i=1;i<=game.players.length;i++){
var td=document.createElement('td');
tr.appendChild(td);
td.style.width='40px';
td.style.fontSize='25px';
td.style.fontFamily='xinwei';
td.innerHTML=get.cnNumber(i,true);
td.link=i-1;
if(get.distance(_status.firstAct,game.me,'absolute')===i-1){
td.classList.add('thundertext');
}
td.addEventListener(lib.config.touchscreen?'touchend':'click',function(){
if(_status.dragged) return;
if(_status.justdragged) return;
if(get.distance(_status.firstAct,game.me,'absolute')==this.link) return;
var current=this.parentNode.querySelector('.thundertext');
if(current){
current.classList.remove('thundertext');
}
this.classList.add('thundertext');
_status.firstAct=game.me;
for(var i=0;i<this.link;i++){
_status.firstAct=_status.firstAct.previous;
}
var firstChoose=_status.firstAct;
firstChoose.next.side=!firstChoose.side;
firstChoose.next.next.side=!firstChoose.side;
firstChoose.previous.side=firstChoose.side;
for(var i=0;i<game.players.length;i++){
if(game.players[i].side==game.me.side){
game.players[i].node.identity.firstChild.innerHTML='友';
}
else{
game.players[i].node.identity.firstChild.innerHTML='敌';
}
game.players[i].node.identity.dataset.color=game.players[i].side+'zhu';
}
for(var i=0;i<4;i++){
firstChoose.node.name.innerHTML=get.verticalStr(get.cnNumber(i+1,true)+'号位');
firstChoose=firstChoose.next;
}
});
}
dialog.content.appendChild(seats);
if(game.me==game.zhu){
seats.previousSibling.style.display='none';
seats.style.display='none';
}
dialog.add(ui.create.div('.placeholder'));
dialog.add(ui.create.div('.placeholder'));
dialog.add(ui.create.div('.placeholder'));
};
var removeSetting=function(){
var dialog=_status.event.dialog;
if(dialog.querySelector('table')&&!get.config('change_identity')){
dialog.querySelector('table').previousSibling.remove();
dialog.querySelector('table').nextSibling.remove();
dialog.querySelector('table').nextSibling.remove();
dialog.querySelector('table').nextSibling.remove();
dialog.querySelector('table').remove();
}
};
event.addSetting=addSetting;
event.removeSetting=removeSetting;
var dialog=ui.create.dialog('选择角色',[list.randomGets(7),'character']); var dialog=ui.create.dialog('选择角色',[list.randomGets(7),'character']);
game.me.chooseButton(true,dialog); game.me.chooseButton(true,dialog);
if(get.config('change_identity')){
addSetting(dialog);
}
ui.create.cheat=function(){ ui.create.cheat=function(){
_status.createControl=ui.cheat2; _status.createControl=ui.cheat2;
@ -580,6 +658,9 @@ mode.versus={
} }
_status.event.dialog.close(); _status.event.dialog.close();
_status.event.dialog=ui.create.dialog('选择角色',[list.randomGets(7),'character']); _status.event.dialog=ui.create.dialog('选择角色',[list.randomGets(7),'character']);
if(get.config('change_identity')){
addSetting(dialog);
}
game.uncheck(); game.uncheck();
game.check(); game.check();
}); });