This commit is contained in:
libccy 2017-04-15 01:12:00 +08:00
parent b67c2280b0
commit fda7771ab0
3 changed files with 65 additions and 32 deletions

View File

@ -13424,6 +13424,7 @@
this.node.identity.firstChild.innerHTML=get.translation(identity); this.node.identity.firstChild.innerHTML=get.translation(identity);
} }
this.node.identity.dataset.color=identity; this.node.identity.dataset.color=identity;
return this;
}, },
insertPhase:function(skill){ insertPhase:function(skill){
var evt=_status.event.getParent('phase'); var evt=_status.event.getParent('phase');
@ -21448,19 +21449,32 @@
} }
}, },
bossSwap:function(player,name){ bossSwap:function(player,name){
player.delete(); if(player&&name){
var boss=ui.create.player().init(name); player.delete();
boss.dataset.position=player.dataset.position; var noboss=false;
game.playerMap[player.dataset.position]=boss; if(name[0]=='_'){
if(game.me==player){ name=name.slice(1);
game.me=boss; noboss=true;
}
var boss=ui.create.player().init(name);
boss.dataset.position=player.dataset.position;
game.playerMap[player.dataset.position]=boss;
if(game.me==player){
game.me=boss;
}
game.players.push(boss);
game.arrangePlayers();
if(!noboss){
game.boss=boss;
boss.setIdentity('zhu');
boss.identity='zhu';
}
else{
boss.setIdentity('zhong');
boss.identity='zhong';
}
ui.arena.appendChild(boss.animate('zoominanim'));
} }
game.players.push(boss);
game.arrangePlayers();
game.boss=boss;
ui.arena.appendChild(boss.animate('zoominanim'));
boss.setIdentity('zhu');
boss.identity='zhu';
}, },
stoneSwap:function(info){ stoneSwap:function(info){
var player=ui.create.player(); var player=ui.create.player();
@ -40594,7 +40608,7 @@
td.innerHTML='手牌'; td.innerHTML='手牌';
tr.appendChild(td); tr.appendChild(td);
td=document.createElement('td'); td=document.createElement('td');
td.innerHTML='轮数'; td.innerHTML='行动';
tr.appendChild(td); tr.appendChild(td);
tr=document.createElement('tr'); tr=document.createElement('tr');

View File

@ -463,34 +463,51 @@ mode.boss={
}, },
game:{ game:{
reserveDead:true, reserveDead:true,
changeBoss:function(name){ addBossFellow:function(position,name){
if(game.additionaldead){ var fellow=game.addFellow(position,name,'zoominanim');
game.additionaldead.push(game.boss); fellow.directgain(get.cards(4));
fellow.side=true;
fellow.identity='zhong';
fellow.setIdentity('zhong');
game.addVideo('setIdentity',fellow,'zhong');
},
changeBoss:function(name,player){
if(!player){
if(game.additionaldead){
game.additionaldead.push(game.boss);
}
else{
game.additionaldead=[game.boss];
}
player=game.boss;
delete game.boss;
} }
else{
game.additionaldead=[game.boss]; player.delete();
} game.players.remove(player);
game.boss.delete(); game.dead.remove(player);
game.dead.remove(game.boss);
var boss=ui.create.player(); var boss=ui.create.player();
boss.getId(); boss.getId();
boss.init(name); boss.init(name);
boss.side=true; boss.side=true;
game.addVideo('bossSwap',game.boss,boss.name); game.addVideo('bossSwap',player,(game.boss?'_':'')+boss.name);
if(game.me==game.boss){ boss.dataset.position=player.dataset.position;
boss.dataset.position=0; if(game.me==player){
game.swapControl(boss); game.swapControl(boss);
} }
else{
boss.dataset.position=7;
}
game.players.push(boss.animate('zoominanim')); game.players.push(boss.animate('zoominanim'));
game.arrangePlayers(); game.arrangePlayers();
game.boss=boss; if(!game.boss){
game.boss=boss;
boss.setIdentity('zhu');
boss.identity='zhu';
}
else{
boss.setIdentity('zhong');
boss.identity='zhong';
}
ui.arena.appendChild(boss); ui.arena.appendChild(boss);
boss.directgain(get.cards(4)); boss.directgain(get.cards(4));
boss.setIdentity('zhu');
boss.identity='zhu';
}, },
checkResult:function(){ checkResult:function(){
if(game.boss==game.me){ if(game.boss==game.me){
@ -960,8 +977,8 @@ mode.boss={
game.players[i].hp=game.players[i].maxHp; game.players[i].hp=game.players[i].maxHp;
game.players[i].update(); game.players[i].update();
} }
game.addFellow(game.me==game.boss?1:5,'boss_yanling','zoominanim').directgain(get.cards(4)).side=true; game.addBossFellow(game.me==game.boss?1:5,'boss_yanling');
game.addFellow(7,'boss_yanling','zoominanim').directgain(get.cards(4)).side=true; game.addBossFellow(7,'boss_yanling');
game.animate.window(2); game.animate.window(2);
'step 3' 'step 3'
while(_status.event.name!='phaseLoop'){ while(_status.event.name!='phaseLoop'){
@ -3743,6 +3760,7 @@ mode.boss={
translate:{ translate:{
zhu:'神', zhu:'神',
cai:'盟', cai:'盟',
zhong:'从',
boss_chi:'魑', boss_chi:'魑',
boss_mo:'魅', boss_mo:'魅',

View File

@ -1285,6 +1285,7 @@ mode.stone={
next.player=player; next.player=player;
next.setContent(function(){ next.setContent(function(){
"step 0" "step 0"
_status.roundStart=game.me;
player.phase(); player.phase();
event.num=0; event.num=0;
"step 1" "step 1"