This commit is contained in:
parent
b67c2280b0
commit
fda7771ab0
40
game/game.js
40
game/game.js
|
@ -13424,6 +13424,7 @@
|
|||
this.node.identity.firstChild.innerHTML=get.translation(identity);
|
||||
}
|
||||
this.node.identity.dataset.color=identity;
|
||||
return this;
|
||||
},
|
||||
insertPhase:function(skill){
|
||||
var evt=_status.event.getParent('phase');
|
||||
|
@ -21448,19 +21449,32 @@
|
|||
}
|
||||
},
|
||||
bossSwap:function(player,name){
|
||||
player.delete();
|
||||
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;
|
||||
if(player&&name){
|
||||
player.delete();
|
||||
var noboss=false;
|
||||
if(name[0]=='_'){
|
||||
name=name.slice(1);
|
||||
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){
|
||||
var player=ui.create.player();
|
||||
|
@ -40594,7 +40608,7 @@
|
|||
td.innerHTML='手牌';
|
||||
tr.appendChild(td);
|
||||
td=document.createElement('td');
|
||||
td.innerHTML='轮数';
|
||||
td.innerHTML='行动';
|
||||
tr.appendChild(td);
|
||||
|
||||
tr=document.createElement('tr');
|
||||
|
|
56
mode/boss.js
56
mode/boss.js
|
@ -463,34 +463,51 @@ mode.boss={
|
|||
},
|
||||
game:{
|
||||
reserveDead:true,
|
||||
changeBoss:function(name){
|
||||
if(game.additionaldead){
|
||||
game.additionaldead.push(game.boss);
|
||||
addBossFellow:function(position,name){
|
||||
var fellow=game.addFellow(position,name,'zoominanim');
|
||||
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];
|
||||
}
|
||||
game.boss.delete();
|
||||
game.dead.remove(game.boss);
|
||||
|
||||
player.delete();
|
||||
game.players.remove(player);
|
||||
game.dead.remove(player);
|
||||
var boss=ui.create.player();
|
||||
boss.getId();
|
||||
boss.init(name);
|
||||
boss.side=true;
|
||||
game.addVideo('bossSwap',game.boss,boss.name);
|
||||
if(game.me==game.boss){
|
||||
boss.dataset.position=0;
|
||||
game.addVideo('bossSwap',player,(game.boss?'_':'')+boss.name);
|
||||
boss.dataset.position=player.dataset.position;
|
||||
if(game.me==player){
|
||||
game.swapControl(boss);
|
||||
}
|
||||
else{
|
||||
boss.dataset.position=7;
|
||||
}
|
||||
game.players.push(boss.animate('zoominanim'));
|
||||
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);
|
||||
boss.directgain(get.cards(4));
|
||||
boss.setIdentity('zhu');
|
||||
boss.identity='zhu';
|
||||
},
|
||||
checkResult:function(){
|
||||
if(game.boss==game.me){
|
||||
|
@ -960,8 +977,8 @@ mode.boss={
|
|||
game.players[i].hp=game.players[i].maxHp;
|
||||
game.players[i].update();
|
||||
}
|
||||
game.addFellow(game.me==game.boss?1:5,'boss_yanling','zoominanim').directgain(get.cards(4)).side=true;
|
||||
game.addFellow(7,'boss_yanling','zoominanim').directgain(get.cards(4)).side=true;
|
||||
game.addBossFellow(game.me==game.boss?1:5,'boss_yanling');
|
||||
game.addBossFellow(7,'boss_yanling');
|
||||
game.animate.window(2);
|
||||
'step 3'
|
||||
while(_status.event.name!='phaseLoop'){
|
||||
|
@ -3743,6 +3760,7 @@ mode.boss={
|
|||
translate:{
|
||||
zhu:'神',
|
||||
cai:'盟',
|
||||
zhong:'从',
|
||||
|
||||
boss_chi:'魑',
|
||||
boss_mo:'魅',
|
||||
|
|
|
@ -1285,6 +1285,7 @@ mode.stone={
|
|||
next.player=player;
|
||||
next.setContent(function(){
|
||||
"step 0"
|
||||
_status.roundStart=game.me;
|
||||
player.phase();
|
||||
event.num=0;
|
||||
"step 1"
|
||||
|
|
Loading…
Reference in New Issue