This commit is contained in:
libccy 2016-09-20 23:26:59 +08:00
parent f713f68254
commit be5fc19788
7 changed files with 128 additions and 22 deletions

View File

@ -18,7 +18,7 @@ card.extra={
return target==player; return target==player;
}, },
content:function(){ content:function(){
if(target==_status.event.getParent(2).dying){ if(target==_status.event.getParent(2).dying||target==_status.dying){
target.recover(); target.recover();
if(_status.currentPhase==target){ if(_status.currentPhase==target){
target.getStat().card.jiu--; target.getStat().card.jiu--;

View File

@ -1131,7 +1131,7 @@ card.swd={
}, },
content:function(){ content:function(){
"step 0" "step 0"
if(target==_status.event.getParent(2).dying) target.recover(); if(target==_status.event.getParent(2).dying||target==_status.dying) target.recover();
else{ else{
target.addTempSkill('tianxianjiu',['phaseAfter','shaAfter']); target.addTempSkill('tianxianjiu',['phaseAfter','shaAfter']);
if(target==targets[0]&&card.clone&&(card.clone.parentNode==player.parentNode||card.clone.parentNode==ui.arena)){ if(target==targets[0]&&card.clone&&(card.clone.parentNode==player.parentNode||card.clone.parentNode==ui.arena)){

View File

@ -288,7 +288,10 @@ character.sp={
intro:{ intro:{
content:'cards' content:'cards'
}, },
group:'tuifeng2' group:'tuifeng2',
ai:{
threaten:0.8
}
}, },
tuifeng2:{ tuifeng2:{
trigger:{player:'phaseBegin'}, trigger:{player:'phaseBegin'},

View File

@ -5714,6 +5714,9 @@ character.yijiang={
return true; return true;
}, },
content:function(){ content:function(){
if(_status.event.getParent(2).type=='dying'){
event.dying=player;
}
player.turnOver(); player.turnOver();
player.useCard({name:'jiu'},player); player.useCard({name:'jiu'},player);
}, },

View File

@ -2696,6 +2696,11 @@
name:'末位可换牌', name:'末位可换牌',
init:true, init:true,
frequent:true, frequent:true,
},
replace_character_two:{
name:'替补模式',
init:false,
frequent:true,
}, },
ban_weak:{ ban_weak:{
name:'屏蔽弱将', name:'屏蔽弱将',
@ -14259,6 +14264,7 @@
event.finish(); event.finish();
return; return;
} }
_status.dying=event.dying;
event.acted.push(player); event.acted.push(player);
// else if(trigger.source&&trigger.source.isDead()){ // else if(trigger.source&&trigger.source.isDead()){
// trigger.start=game.findNext(trigger.source); // trigger.start=game.findNext(trigger.source);

View File

@ -1,15 +1,18 @@
window.noname_update={ window.noname_update={
version:'1.9.1', version:'1.9.1.1',
changeLog:[ changeLog:[
'bug修复', 'bug修复',
'增加牌堆补充扩展',
'塔防模式调整',
'新武将'
], ],
files:{ files:{
global:[ global:[
'game/game.js',
'game/asset.js',
'mode/versus.js',
'character/yijiang.js',
'character/sp.js',
'card/swd.js',
'card/extra.js',
], ],
// '1.9.1':[] '1.9.1':[]
} }
} }

View File

@ -694,7 +694,14 @@ mode.versus={
characterChoice=list.randomGets(7); characterChoice=list.randomGets(7);
} }
var dialog=ui.create.dialog('选择角色',[characterChoice,'character']); var dialog=ui.create.dialog('选择角色',[characterChoice,'character']);
game.me.chooseButton(true,dialog); if(get.config('replace_character_two')){
game.me.chooseButton(true,dialog,2);
_status.replacetwo=true;
game.additionaldead=[];
}
else{
game.me.chooseButton(true,dialog);
}
if(!_status.brawl||!_status.brawl.noAddSetting){ if(!_status.brawl||!_status.brawl.noAddSetting){
if(get.config('change_identity')){ if(get.config('change_identity')){
addSetting(dialog); addSetting(dialog);
@ -773,6 +780,9 @@ mode.versus={
delete ui.cheat2; delete ui.cheat2;
} }
game.me.init(result.links[0]); game.me.init(result.links[0]);
if(_status.replacetwo){
game.me.replacetwo=result.links[1];
}
game.addRecentCharacter(game.me.name); game.addRecentCharacter(game.me.name);
event.list.remove(game.me.name); event.list.remove(game.me.name);
for(var i=0;i<game.players.length;i++){ for(var i=0;i<game.players.length;i++){
@ -781,9 +791,14 @@ mode.versus={
var list=_status.brawl.chooseCharacter(event.list,game.players[i]); var list=_status.brawl.chooseCharacter(event.list,game.players[i]);
game.players[i].init(list.randomGet()); game.players[i].init(list.randomGet());
event.list.remove(game.players[i].name); event.list.remove(game.players[i].name);
if(_status.replacetwo){
game.players[i].replacetwo=list.randomGet(game.players[i].name);
event.list.remove(game.players[i].replacetwo);
}
} }
else{ else{
game.players[i].init(event.list.randomRemove()); game.players[i].init(event.list.randomRemove());
game.players[i].replacetwo=event.list.randomRemove();
} }
} }
} }
@ -2075,6 +2090,12 @@ mode.versus={
next.source=player; next.source=player;
next.setContent('replacePlayer'); next.setContent('replacePlayer');
}, },
replacePlayerTwo:function(player,character){
var next=game.createEvent('replacePlayerTwo');
next.source=player;
next.character=character;
next.setContent('replacePlayerTwo');
},
versusClickToSwap:function(e){ versusClickToSwap:function(e){
if(_status.dragged) return; if(_status.dragged) return;
if(this.link==game.me){ if(this.link==game.me){
@ -2534,6 +2555,33 @@ mode.versus={
// source.skip('phase'); // source.skip('phase');
// } // }
}, },
replacePlayerTwo:function(){
'step 0'
game.delay();
'step 1'
source.revive(null,false);
game.additionaldead.push({
name:source.name,
stat:source.stat
});
game.addVideo('reinit',source,[event.character,get.translation(source.side+'Color')]);
source.uninit();
source.init(event.character);
game.log(source,'出场');
// source.node.identity.dataset.color=source.side+'zhu';
source.draw(4);
_status.event.parent.parent.parent.untrigger(false,source);
var evt=_status.event.parent.parent.parent;
for(var i=0;i<100;i++){
evt=evt.parent;
if(evt.player==source){
evt.finish();
}
if(evt.name=='phase'){
break;
}
}
},
replacePlayerOL:function(){ replacePlayerOL:function(){
'step 0' 'step 0'
game.delay(); game.delay();
@ -2692,6 +2740,9 @@ mode.versus={
game.replacePlayerOL(this); game.replacePlayerOL(this);
} }
else if(_status.mode=='2v2'){ else if(_status.mode=='2v2'){
if(_status.replacetwo){
}
var friend; var friend;
for(var i=0;i<game.players.length;i++){ for(var i=0;i<game.players.length;i++){
if(game.players[i].side==this.side){ if(game.players[i].side==this.side){
@ -2773,20 +2824,57 @@ mode.versus={
friend=game.players[i];break; friend=game.players[i];break;
} }
} }
if(friend){ if(_status.replacetwo){
var next=game.createEvent('versusDraw'); if(this.replacetwo){
next.setContent(function(){ if(source){
'step 0' if(source.side==this.side){
player.chooseBool('是否摸一张牌?'); var he=source.get('he');
'step 1' if(he.length){
if(result.bool){ source.discard(he);
player.draw(); }
}
else{
source.draw(3);
}
} }
}); game.replacePlayerTwo(this,this.replacetwo);
next.player=friend; delete this.replacetwo;
}
else if(friend&&friend.replacetwo){
if(source){
if(source.side==this.side){
var he=source.get('he');
if(he.length){
source.discard(he);
}
}
else{
source.draw(3);
}
}
game.replacePlayerTwo(this,friend.replacetwo);
delete friend.replacetwo;
}
else{
game.over(this.side!=game.me.side);
}
} }
else{ else{
game.over(this.side!=game.me.side); if(friend){
var next=game.createEvent('versusDraw');
next.setContent(function(){
'step 0'
player.chooseBool('是否摸一张牌?');
'step 1'
if(result.bool){
player.draw();
}
});
next.player=friend;
}
else{
game.over(this.side!=game.me.side);
}
} }
return; return;
} }
@ -2884,7 +2972,10 @@ mode.versus={
} }
}, },
help:{ help:{
'对决模式':'<div style="margin:10px">4v4</div><ul style="margin-top:0"><li>双方各有一名主公和三名忠臣,杀死对方主公获胜<li>'+ '对决模式':
'<div style="margin:10px">2v2 替补模式</div><ul style="margin-top:0"><li>选将时额外选择一名替补武将,阵亡时使用自己的替补武将上场,无替补时改为用队友的替补武将,两人均无替补时游戏结束'+
'<li>杀死敌方武将摸3张牌杀死友方武将弃置所有牌</ul>'+
'<div style="margin:10px">4v4</div><ul style="margin-top:0"><li>双方各有一名主公和三名忠臣,杀死对方主公获胜<li>'+
'8号位游戏开始时额外摸一张牌7、8号位可在游戏开始时置换一次手牌<li>'+ '8号位游戏开始时额外摸一张牌7、8号位可在游戏开始时置换一次手牌<li>'+
'杀死对方忠臣摸2+x张牌x为对方含刚被杀的忠臣与己方的存活人数之差主公杀死己方忠臣须弃置所有牌', '杀死对方忠臣摸2+x张牌x为对方含刚被杀的忠臣与己方的存活人数之差主公杀死己方忠臣须弃置所有牌',
} }