|
@ -1,6 +1,2 @@
|
|||
1.4.1
|
||||
game.print命令(在命令输入框中输出结果)
|
||||
修正触屏问题
|
||||
修正技能bug
|
||||
新布局
|
||||
素材(by @tanyuanjkl)
|
||||
1.4.2
|
||||
富含bug的录像功能
|
||||
|
|
|
@ -19,6 +19,7 @@ card.extra={
|
|||
target.addTempSkill('jiu','phaseAfter');
|
||||
if(card.clone&&card.clone.parentNode==ui.arena){
|
||||
card.clone.moveTo(target).delete();
|
||||
game.addVideo('gain2',target,get.cardsInfo([card]));
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -88,6 +89,8 @@ card.extra={
|
|||
};
|
||||
"step 1"
|
||||
event.dialog=ui.create.dialog(get.translation(target.name)+'展示的手牌',result.cards);
|
||||
event.videoId=lib.status.videoId++;
|
||||
game.addVideo('cardDialog',null,[get.translation(target.name)+'展示的手牌',get.cardsInfo(result.cards),event.videoId]);
|
||||
event.card2=result.cards[0];
|
||||
game.log(get.translation(target.name)+'展示了'+get.translation(event.card2));
|
||||
player.chooseToDiscard(function(card){
|
||||
|
@ -106,6 +109,7 @@ card.extra={
|
|||
else{
|
||||
target.addTempSkill('huogong2','phaseBegin');
|
||||
}
|
||||
game.addVideo('cardDialog',null,event.videoId);
|
||||
event.dialog.close();
|
||||
},
|
||||
ai:{
|
||||
|
|
|
@ -180,6 +180,8 @@ card.hearth={
|
|||
"step 1"
|
||||
event.dialog=ui.create.dialog(get.translation(target.name)+'展示的手牌',result.cards);
|
||||
event.card2=result.cards[0];
|
||||
event.videoId=lib.status.videoId++;
|
||||
game.addVideo('cardDialog',null,[get.translation(target.name)+'展示的手牌',get.cardsInfo(result.cards),event.videoId]);
|
||||
game.log(get.translation(target.name)+'展示了'+get.translation(event.card2));
|
||||
player.chooseToDiscard(function(card){
|
||||
return get.suit(card)==get.suit(_status.event.parent.card2);
|
||||
|
@ -197,6 +199,7 @@ card.hearth={
|
|||
else{
|
||||
target.addTempSkill('shandianjian2','phaseBegin');
|
||||
}
|
||||
game.addVideo('cardDialog',null,event.videoId);
|
||||
event.dialog.close();
|
||||
},
|
||||
ai:{
|
||||
|
@ -396,6 +399,7 @@ card.hearth={
|
|||
event.current=targets.randomGet();
|
||||
}
|
||||
if(!targets.length) event.finish();
|
||||
event.num=0;
|
||||
'step 1'
|
||||
var current;
|
||||
if(targets.length>1){
|
||||
|
@ -411,7 +415,10 @@ card.hearth={
|
|||
}
|
||||
if(hs.length>1){
|
||||
event.current=current;
|
||||
event.redo();
|
||||
event.num++;
|
||||
if(event.num<10){
|
||||
event.redo();
|
||||
}
|
||||
}
|
||||
},
|
||||
ai:{
|
||||
|
@ -620,7 +627,7 @@ card.hearth={
|
|||
xingjiegoutong:'星界沟通',
|
||||
xingjiegoutong_info:'增加一点体力上限并回复一点体力,弃置你的所有手牌',
|
||||
tanshezhiren:'弹射之刃',
|
||||
tanshezhiren_info:'弃置一名随机角色的手牌,重复此过程直到有一名角色失去最后一张手牌',
|
||||
tanshezhiren_info:'弃置一名随机角色的手牌,重复此过程直到有一名角色失去最后一张手牌(最多重复10次)',
|
||||
chuansongmen:'传送门',
|
||||
chuansongmen_info:'摸一张牌,若你能立即使用之,则将此牌回手(每回合最多使用3次)',
|
||||
dunpaigedang:'盾牌格挡',
|
||||
|
|
|
@ -168,10 +168,12 @@ card.qimou={
|
|||
player.gain([result.player,result.target]);
|
||||
result.player.clone.moveTo(player).delete();
|
||||
result.target.clone.moveTo(player).delete();
|
||||
game.addVideo('gain2',player,get.cardsInfo([result.player,result.target]));
|
||||
}
|
||||
else if(!result.cancelled){
|
||||
result.player.clone.delete();
|
||||
result.target.clone.delete();
|
||||
game.addVideo('deletenode',player,get.cardsInfo([result.player,result.target]));
|
||||
}
|
||||
},
|
||||
ai:{
|
||||
|
|
|
@ -424,18 +424,36 @@ card.standard={
|
|||
game.delay();
|
||||
"step 1"
|
||||
ui.clear();
|
||||
ui.create.dialog('五谷丰登',get.cards(game.players.length),true).id='wugu';
|
||||
var cards=get.cards(game.players.length);
|
||||
var dialog=ui.create.dialog('五谷丰登',cards,true);
|
||||
dialog.videoId=lib.status.videoId++;
|
||||
game.addVideo('cardDialog',null,['五谷丰登',get.cardsInfo(cards),dialog.videoId]);
|
||||
event.parent.preResult=dialog.videoId;
|
||||
},
|
||||
content:function(){
|
||||
"step 0"
|
||||
target.chooseButton(true,function(button){
|
||||
return ai.get.value(button.link,_status.event.player);
|
||||
});
|
||||
for(var i=0;i<ui.dialogs.length;i++){
|
||||
if(ui.dialogs[i].videoId==event.preResult){
|
||||
event.dialog=ui.dialogs[i];
|
||||
}
|
||||
}
|
||||
if(!event.dialog){
|
||||
event.finish();
|
||||
return;
|
||||
}
|
||||
if(event.dialog.buttons.length>1){
|
||||
var next=target.chooseButton(event.dialog,true,function(button){
|
||||
return ai.get.value(button.link,_status.event.player);
|
||||
});
|
||||
next.closeDialog=false;
|
||||
next.dialog.style.display='';
|
||||
}
|
||||
else{
|
||||
event.directButton=event.dialog.buttons[0];
|
||||
}
|
||||
"step 1"
|
||||
var dialog;
|
||||
if(ui.dialog.id=='wugu') dialog=ui.dialog;
|
||||
else dialog=document.getElementById('wugu');
|
||||
var button=result.buttons[0];
|
||||
var dialog=event.dialog;
|
||||
var button=event.directButton||result.buttons[0];
|
||||
if(button.link){
|
||||
target.gain(button.link);
|
||||
target.$gain2(button.link);
|
||||
|
@ -444,12 +462,18 @@ card.standard={
|
|||
button.getElementsByClassName('info')[0].innerHTML=get.translation(target.name);
|
||||
dialog.content.firstChild.innerHTML=
|
||||
get.translation(target)+'选择了'+get.translation(button.link);
|
||||
game.addVideo('dialogCapt',null,[dialog.videoId,dialog.content.firstChild.innerHTML]);
|
||||
game.log(get.translation(target)+'选择了'+get.translation(button.link));
|
||||
game.delay();
|
||||
},
|
||||
contentAfter:function(){
|
||||
if(ui.dialog.id=='wugu') ui.dialog.close();
|
||||
else document.getElementById('wugu').close();
|
||||
for(var i=0;i<ui.dialogs.length;i++){
|
||||
if(ui.dialogs[i].videoId==event.preResult){
|
||||
ui.dialogs[i].close();
|
||||
break;
|
||||
}
|
||||
}
|
||||
game.addVideo('cardDialog',null,event.preResult);
|
||||
},
|
||||
ai:{
|
||||
wuxie:function(){
|
||||
|
|
|
@ -262,6 +262,7 @@ card.swd={
|
|||
target.addTempSkill('tianxianjiu',['phaseAfter','shaAfter']);
|
||||
if(card.clone&&card.clone.parentNode==ui.arena){
|
||||
card.clone.moveTo(target).delete();
|
||||
game.addVideo('gain2',target,get.cardsInfo([card]));
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -245,6 +245,7 @@ card.yibao={
|
|||
"step 0"
|
||||
target.chooseToDiscard('he',[1,2]).ai=function(card){
|
||||
if(target.hasSkillTag('nofire')) return 0;
|
||||
if(ai.get.damageEffect(target,player,target,'fire')>=0) return 0;
|
||||
if(target.hasSkillTag('maixie')&&target.hp>1&&ui.selected.cards.length){
|
||||
return 0;
|
||||
}
|
||||
|
@ -323,6 +324,7 @@ card.yibao={
|
|||
clone.style.transition='all 0.5s';
|
||||
clone.style.webkitTransform='scale(1.2)';
|
||||
clone.delete();
|
||||
game.addVideo('deletenode',player,get.cardsInfo([clone]));
|
||||
}
|
||||
target.loseHp();
|
||||
}
|
||||
|
|
|
@ -39,9 +39,11 @@ character.extra={
|
|||
},
|
||||
init:function(player){
|
||||
player.storage.baonu=2;
|
||||
game.addVideo('storage',player,['baonu',player.storage.baonu]);
|
||||
},
|
||||
content:function(){
|
||||
player.storage.baonu+=trigger.num;
|
||||
game.addVideo('storage',player,['baonu',player.storage.baonu]);
|
||||
},
|
||||
intro:{
|
||||
content:'mark'
|
||||
|
@ -142,9 +144,11 @@ character.extra={
|
|||
},
|
||||
init:function(player){
|
||||
player.storage.renjie=0;
|
||||
game.addVideo('storage',player,['renjie',player.storage.renjie]);
|
||||
},
|
||||
content:function(){
|
||||
player.storage.renjie+=trigger.num;
|
||||
game.addVideo('storage',player,['renjie',player.storage.renjie]);
|
||||
},
|
||||
intro:{
|
||||
content:'mark'
|
||||
|
@ -186,6 +190,7 @@ character.extra={
|
|||
},
|
||||
content:function(){
|
||||
player.storage.renjie+=trigger.cards.length;
|
||||
game.addVideo('storage',player,['renjie',player.storage.renjie]);
|
||||
}
|
||||
},
|
||||
sbaiyin:{
|
||||
|
@ -239,7 +244,10 @@ character.extra={
|
|||
if(result.bool){
|
||||
player.logSkill('jilue_guicai');
|
||||
player.storage.renjie--;
|
||||
if(trigger.player.judging.clone) trigger.player.judging.clone.delete();
|
||||
if(trigger.player.judging.clone){
|
||||
trigger.player.judging.clone.delete();
|
||||
game.addVideo('deletenode',player,get.cardsInfo([trigger.player.judging.clone]));
|
||||
}
|
||||
ui.discardPile.appendChild(trigger.player.judging);
|
||||
trigger.player.judging=result.cards[0];
|
||||
trigger.position.appendChild(result.cards[0]);
|
||||
|
@ -504,12 +512,16 @@ character.extra={
|
|||
"step 0"
|
||||
player.gain(get.cards(7))._triggered=null;
|
||||
"step 1"
|
||||
if(player==game.me){
|
||||
game.addVideo('delay',null);
|
||||
}
|
||||
player.chooseCard('选择七张牌作为星',7,true).ai=function(card){
|
||||
return ai.get.value(card);
|
||||
};
|
||||
"step 2"
|
||||
player.lose(result.cards,ui.special)._triggered=null;
|
||||
player.storage.qixing=result.cards;
|
||||
game.addVideo('storage',player,['qixing',get.cardsInfo(player.storage.qixing),'cards']);
|
||||
},
|
||||
mark:true,
|
||||
intro:{
|
||||
|
@ -550,6 +562,7 @@ character.extra={
|
|||
player.logSkill('qixing');
|
||||
player.lose(result.cards,ui.special)._triggered=null;
|
||||
player.storage.qixing=player.storage.qixing.concat(result.cards);
|
||||
game.addVideo('storage',player,['qixing',get.cardsInfo(player.storage.qixing),'cards']);
|
||||
event.num=result.cards.length;
|
||||
}
|
||||
else{
|
||||
|
@ -570,6 +583,7 @@ character.extra={
|
|||
for(var i=0;i<result.links.length;i++){
|
||||
player.storage.qixing.remove(result.links[i]);
|
||||
}
|
||||
game.addVideo('storage',player,['qixing',get.cardsInfo(player.storage.qixing),'cards']);
|
||||
if(player==game.me&&_status.auto){
|
||||
game.delay(0.5);
|
||||
}
|
||||
|
@ -619,6 +633,7 @@ character.extra={
|
|||
if(player.storage.qixing.length==0){
|
||||
player.unmarkSkill('qixing');
|
||||
}
|
||||
game.addVideo('storage',player,['qixing',get.cardsInfo(player.storage.qixing),'cards']);
|
||||
player.discard(result.links);
|
||||
},
|
||||
group:'dawu3'
|
||||
|
@ -699,6 +714,7 @@ character.extra={
|
|||
if(player.storage.qixing.length==0){
|
||||
player.unmarkSkill('qixing');
|
||||
}
|
||||
game.addVideo('storage',player,['qixing',get.cardsInfo(player.storage.qixing),'cards']);
|
||||
player.discard(result.links);
|
||||
},
|
||||
},
|
||||
|
|
|
@ -527,6 +527,7 @@ character.gujian={
|
|||
player.addSkill('juejing');
|
||||
player.storage.shahun=3;
|
||||
player.markSkill('shahun');
|
||||
game.addVideo('storage',player,['shahun',player.storage.shahun]);
|
||||
},
|
||||
group:'shahun2',
|
||||
intro:{
|
||||
|
@ -552,6 +553,7 @@ character.gujian={
|
|||
content:function(){
|
||||
if(player.storage.shahun>1){
|
||||
player.storage.shahun--;
|
||||
game.addVideo('storage',player,['shahun',player.storage.shahun]);
|
||||
}
|
||||
else{
|
||||
player.die();
|
||||
|
@ -680,6 +682,7 @@ character.gujian={
|
|||
content:function(){
|
||||
player.storage.xuanning=3;
|
||||
player.markSkill('xuanning');
|
||||
game.addVideo('storage',player,['xuanning',player.storage.xuanning]);
|
||||
},
|
||||
ai:{
|
||||
result:{
|
||||
|
@ -710,6 +713,7 @@ character.gujian={
|
|||
if(!player.storage.xuanning){
|
||||
player.unmarkSkill('xuanning');
|
||||
}
|
||||
game.addVideo('storage',player,['xuanning',player.storage.xuanning]);
|
||||
}
|
||||
},
|
||||
liuguang:{
|
||||
|
@ -735,6 +739,7 @@ character.gujian={
|
|||
event.targets=result.targets.slice(0);
|
||||
event.targets.sort(lib.sort.seat);
|
||||
player.logSkill('liuguang',result.targets);
|
||||
game.addVideo('storage',player,['xuanning',player.storage.xuanning]);
|
||||
}
|
||||
else{
|
||||
event.finish();
|
||||
|
@ -780,6 +785,7 @@ character.gujian={
|
|||
content:function(){
|
||||
player.storage.yangming2=2;
|
||||
player.addSkill('yangming2');
|
||||
game.addVideo('storage',player,['yangming2',player.storage.yangming2]);
|
||||
},
|
||||
check:function(card){
|
||||
return 6-ai.get.value(card);
|
||||
|
@ -798,6 +804,7 @@ character.gujian={
|
|||
content:function(){
|
||||
"step 0"
|
||||
player.storage.yangming2--;
|
||||
game.addVideo('storage',player,['yangming2',player.storage.yangming2]);
|
||||
if(player.storage.yangming2>0){
|
||||
event.finish();
|
||||
}
|
||||
|
@ -839,6 +846,7 @@ character.gujian={
|
|||
forbid:['infinity'],
|
||||
init:function(player){
|
||||
player.storage.zhaolu=Math.min(5,game.players.length);
|
||||
game.addVideo('storage',player,['zhaolu',player.storage.zhaolu]);
|
||||
},
|
||||
trigger:{player:['phaseEnd','damageEnd'],global:'dieAfter'},
|
||||
forced:true,
|
||||
|
@ -852,6 +860,7 @@ character.gujian={
|
|||
player.loseMaxHp(true);
|
||||
player.storage.zhaolu=Math.min(5,game.players.length);
|
||||
}
|
||||
game.addVideo('storage',player,['zhaolu',player.storage.zhaolu]);
|
||||
},
|
||||
intro:{
|
||||
content:'turn'
|
||||
|
@ -875,6 +884,7 @@ character.gujian={
|
|||
intro:{
|
||||
content:'limited'
|
||||
},
|
||||
// mark:true,
|
||||
line:'fire',
|
||||
filterTarget:function(card,player,target){
|
||||
return player!=target;
|
||||
|
@ -885,6 +895,7 @@ character.gujian={
|
|||
player.storage.jiehuo2=player.maxHp;
|
||||
player.addSkill('jiehuo2');
|
||||
}
|
||||
player.storage.jiehuo=true;
|
||||
target.damage(Math.min(target.hp,player.storage.jiehuo2),'fire');
|
||||
}
|
||||
},
|
||||
|
|
|
@ -72,6 +72,7 @@ character.hearth={
|
|||
mark:true,
|
||||
init:function(player){
|
||||
player.storage.chongsheng=0;
|
||||
game.addVideo('storage',player,['chongsheng',player.storage.chongsheng]);
|
||||
},
|
||||
filter:function(event,player){
|
||||
if(event.type!='dying') return false;
|
||||
|
@ -88,6 +89,7 @@ character.hearth={
|
|||
}
|
||||
if(player.classList.contains('linked')) player.link();
|
||||
if(player.classList.contains('turnedover')) player.turnOver();
|
||||
game.addVideo('storage',player,['chongsheng',player.storage.chongsheng]);
|
||||
},
|
||||
ai:{
|
||||
skillTagFilter:function(player){
|
||||
|
@ -104,7 +106,7 @@ character.hearth={
|
|||
},
|
||||
intro:{
|
||||
content:function(storage){
|
||||
return '剩余'+get.cnNumber(3-storage)+'次';
|
||||
return '剩余'+get.cnNumber(2-storage)+'次';
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -122,6 +124,7 @@ character.hearth={
|
|||
player.draw(num);
|
||||
player.addSkill('guozai2');
|
||||
player.storage.guozai2+=num;
|
||||
game.addVideo('storage',player,['guozai2',player.storage.guozai2]);
|
||||
},
|
||||
ai:{
|
||||
order:1,
|
||||
|
@ -174,7 +177,7 @@ character.hearth={
|
|||
trigger:{global:'dieAfter'},
|
||||
forced:true,
|
||||
filter:function(event,player){
|
||||
return event.player.skills.contains('bingshi');
|
||||
return event.player.skills.contains('bingshi')&&event.player.isDead();
|
||||
},
|
||||
content:function(){
|
||||
trigger.player.line(player,'thunder');
|
||||
|
@ -198,6 +201,11 @@ character.hearth={
|
|||
name:'唤雾',
|
||||
content:'已发动'
|
||||
});
|
||||
game.addVideo('mark',target,{
|
||||
name:'唤雾',
|
||||
content:'已发动',
|
||||
id:'huanwu'
|
||||
});
|
||||
},
|
||||
ai:{
|
||||
threaten:1.2,
|
||||
|
@ -805,6 +813,7 @@ character.hearth={
|
|||
content:function(){
|
||||
player.storage.bingjia=cards[0];
|
||||
player.addSkill('bingjia2');
|
||||
game.addVideo('storage',player,['bingjia',get.cardInfo(cards[0]),'card']);
|
||||
},
|
||||
ai:{
|
||||
order:1,
|
||||
|
@ -828,6 +837,7 @@ character.hearth={
|
|||
delete player.storage.bingjia;
|
||||
player.changeHujia();
|
||||
player.removeSkill('bingjia2');
|
||||
game.addVideo('storage',player,['bingjia',null]);
|
||||
},
|
||||
intro:{
|
||||
mark:function(dialog,content,player){
|
||||
|
@ -913,6 +923,7 @@ character.hearth={
|
|||
target.storage.mdzhoufu2=cards[0];
|
||||
target.addSkill('mdzhoufu2');
|
||||
target.storage.mdzhoufu3=player;
|
||||
game.addVideo('storage',target,['mdzhoufu2',get.cardInfo(cards[0]),'card']);
|
||||
ui.special.appendChild(cards[0]);
|
||||
},
|
||||
check:function(card){
|
||||
|
@ -1132,6 +1143,7 @@ character.hearth={
|
|||
trigger.player.$gain2(trigger.cards);
|
||||
trigger.player.gain(trigger.cards);
|
||||
trigger.player.storage.mengun2=trigger.cards[0];
|
||||
game.addVideo('storage',player,['mengun2',get.cardInfo(trigger.cards[0]),'card']);
|
||||
trigger.player.addTempSkill('mengun2','phaseEnd');
|
||||
}
|
||||
},
|
||||
|
@ -1865,7 +1877,7 @@ character.hearth={
|
|||
zhongjia:'重甲',
|
||||
zhongjia_info:'锁定技,每当你受到一次伤害,你获得一点护甲值;当你的体力值大于1时,你的护甲不为你抵挡伤害',
|
||||
dunji:'盾击',
|
||||
dunji_info:'出牌阶段限,你可以失去你的所有护甲,并对等量的其他角色各造成一点伤害',
|
||||
dunji_info:'出牌阶段,你可以失去你的所有护甲,并对等量的其他角色各造成一点伤害',
|
||||
qiaodong:'巧动',
|
||||
qiaodong_info:'你可以将一张装备牌当作闪使用或打出',
|
||||
fengxian:'奉献',
|
||||
|
|
|
@ -411,7 +411,7 @@ character.jiange={
|
|||
event.cards2.push(event.cards[i]);
|
||||
}
|
||||
}
|
||||
if(!event.isMine()){
|
||||
if(!event.isMine()||event.cards2.length==0){
|
||||
player.showCards(event.cards);
|
||||
}
|
||||
"step 1"
|
||||
|
|
|
@ -145,6 +145,12 @@ character.mountain={
|
|||
name:'放权',
|
||||
content:'进行一个额外的回合'
|
||||
});
|
||||
game.addVideo('markCharacter',target,{
|
||||
name:'放权',
|
||||
content:'进行一个额外的回合',
|
||||
id:'fangquan',
|
||||
target:player.dataset.position
|
||||
});
|
||||
target.phase();
|
||||
target.addSkill('fangquan3');
|
||||
player.removeSkill('fangquan2');
|
||||
|
@ -159,6 +165,7 @@ character.mountain={
|
|||
if(player.marks.fangquan){
|
||||
player.marks.fangquan.delete();
|
||||
delete player.marks.fangquan;
|
||||
game.addVideo('unmark',player,'fangquan');
|
||||
}
|
||||
player.removeSkill('fangquan3');
|
||||
}
|
||||
|
@ -452,7 +459,9 @@ character.mountain={
|
|||
result.card.goto(ui.special);
|
||||
player.storage.tuntian.push(result.card);
|
||||
result.node.moveTo(player).delete();
|
||||
game.addVideo('gain2',player,get.cardsInfo([result.node]));
|
||||
player.markSkill('tuntian');
|
||||
game.addVideo('storage',player,['tuntian',get.cardsInfo(player.storage.tuntian),'cards']);
|
||||
}
|
||||
},
|
||||
init:function(player){
|
||||
|
@ -519,6 +528,7 @@ character.mountain={
|
|||
var card=result.buttons[0].link;
|
||||
event.card=card;
|
||||
player.storage.tuntian.remove(card);
|
||||
game.addVideo('storage',player,['tuntian',get.cardsInfo(player.storage.tuntian),'cards']);
|
||||
if(!player.storage.tuntian.length){
|
||||
player.unmarkSkill('tuntian');
|
||||
}
|
||||
|
|
|
@ -5,7 +5,6 @@ window.characterRank={
|
|||
'swd_septem',
|
||||
'hs_sthrall',
|
||||
'hs_malorne',
|
||||
'swd_yuwentuo',
|
||||
'swd_duguningke',
|
||||
'swd_guyue',
|
||||
'swd_murongshi',
|
||||
|
@ -18,6 +17,7 @@ window.characterRank={
|
|||
],
|
||||
ap:[
|
||||
'swd_xuanyuanjianxian',
|
||||
'swd_yuwentuo',
|
||||
'pal_xuanxiao',
|
||||
'xk_fujianhan',
|
||||
'swd_cheyun',
|
||||
|
|
|
@ -119,7 +119,10 @@ character.refresh={
|
|||
"step 2"
|
||||
if(result.bool){
|
||||
player.logSkill('reguicai');
|
||||
if(trigger.player.judging.clone) trigger.player.judging.clone.delete();
|
||||
if(trigger.player.judging.clone){
|
||||
trigger.player.judging.clone.delete();
|
||||
game.addVideo('deletenode',player,get.cardsInfo([trigger.player.judging.clone]));
|
||||
}
|
||||
ui.discardPile.appendChild(trigger.player.judging);
|
||||
trigger.player.judging=result.cards[0];
|
||||
game.delay(2);
|
||||
|
@ -393,6 +396,7 @@ character.refresh={
|
|||
},
|
||||
content:function(){
|
||||
player.storage.reqianxun2=player.storage.reqianxun2.concat(player.get('h'));
|
||||
game.addVideo('storage',player,['reqianxun2',get.cardsInfo(player.storage.reqianxun2),'cards']);
|
||||
player.lose(player.get('h'),ui.special);
|
||||
player.addSkill('reqianxun2');
|
||||
},
|
||||
|
@ -409,6 +413,7 @@ character.refresh={
|
|||
player.gain(player.storage.reqianxun2);
|
||||
player.removeSkill('reqianxun2');
|
||||
player.storage.reqianxun2=[];
|
||||
game.addVideo('storage',player,['reqianxun2',get.cardsInfo(player.storage.reqianxun2),'cards']);
|
||||
},
|
||||
mark:true,
|
||||
intro:{
|
||||
|
@ -496,6 +501,7 @@ character.refresh={
|
|||
silent:true,
|
||||
content:function(){
|
||||
player.storage.retishen2=player.hp;
|
||||
game.addVideo('storage',player,['retishen2',player.storage.retishen2]);
|
||||
},
|
||||
intro:{
|
||||
content:function(storage,player){
|
||||
|
@ -515,6 +521,7 @@ character.refresh={
|
|||
"step 0"
|
||||
event.card=get.cards()[0];
|
||||
event.node=event.card.copy('thrown','center',ui.arena).animate('start');
|
||||
game.addVideo('centernode',null,get.cardInfo(event.card));
|
||||
if(get.type(event.card,'trick')==get.type(trigger.card,'trick')){
|
||||
player.chooseTarget('选择获得此牌的角色').ai=function(target){
|
||||
var att=ai.get.attitude(player,target);
|
||||
|
@ -539,15 +546,18 @@ character.refresh={
|
|||
game.log(get.translation(player)+'展示并弃掉了'+get.translation(event.card));
|
||||
ui.discardPile.appendChild(event.card);
|
||||
}
|
||||
game.addVideo('deletenode',player,[get.cardInfo(event.node)]);
|
||||
}
|
||||
else if(result.targets){
|
||||
result.targets[0].gain(event.card);
|
||||
event.node.moveTo(result.targets[0]);
|
||||
game.log(get.translation(result.targets[0])+'获得了'+get.translation(event.card));
|
||||
game.addVideo('gain2',result.targets[0],[get.cardInfo(event.node)]);
|
||||
}
|
||||
else{
|
||||
game.log(get.translation(player)+'展示并弃掉了'+get.translation(event.card));
|
||||
ui.discardPile.appendChild(event.card);
|
||||
game.addVideo('deletenode',player,[get.cardInfo(event.node)]);
|
||||
}
|
||||
event.node.delete();
|
||||
},
|
||||
|
@ -636,6 +646,7 @@ character.refresh={
|
|||
result.targets[0].storage.reyiji2=result.cards;
|
||||
}
|
||||
player.$give(result.cards.length,result.targets[0]);
|
||||
game.addVideo('storage',result.targets[0],['reyiji2',get.cardsInfo(result.targets[0].storage.reyiji2),'cards']);
|
||||
if(num==1){
|
||||
event.temp=result.targets[0];
|
||||
event.num++;
|
||||
|
|
|
@ -394,6 +394,7 @@ character.sp={
|
|||
content:function(){
|
||||
"step 0"
|
||||
player.storage.zuixiang=get.cards(3);
|
||||
game.addVideo('storage',player,['zuixiang',get.cardsInfo(player.storage.zuixiang),'cards']);
|
||||
player.showCards(player.storage.zuixiang);
|
||||
"step 1"
|
||||
var cards=player.storage.zuixiang;
|
||||
|
@ -402,6 +403,7 @@ character.sp={
|
|||
cards[2].number==cards[1].number){
|
||||
player.gain(player.storage.zuixiang,'draw2');
|
||||
player.storage.zuixiang=[];
|
||||
player.unmarkSkill('zuixiang');
|
||||
delete player.storage.zuixiang2;
|
||||
}
|
||||
else{
|
||||
|
@ -447,7 +449,7 @@ character.sp={
|
|||
zuixiang2:{
|
||||
unique:true,
|
||||
trigger:{player:'phaseBegin'},
|
||||
priority:10,
|
||||
priority:9.5,
|
||||
filter:function(event,player){
|
||||
if(player.storage.zuixiang&&player.storage.zuixiang.length) return true;
|
||||
return false;
|
||||
|
@ -465,6 +467,7 @@ character.sp={
|
|||
ui.discardPile.appendChild(player.storage.zuixiang[i]);
|
||||
}
|
||||
player.storage.zuixiang=get.cards(3);
|
||||
game.addVideo('storage',player,['zuixiang',get.cardsInfo(player.storage.zuixiang),'cards']);
|
||||
player.showCards(player.storage.zuixiang);
|
||||
}
|
||||
"step 1"
|
||||
|
@ -615,6 +618,7 @@ character.sp={
|
|||
target.addSkill('zhoufu2');
|
||||
target.storage.zhoufu3=player;
|
||||
ui.special.appendChild(cards[0]);
|
||||
game.addVideo('storage',target,['zhoufu2',get.cardInfo(cards[0]),'card']);
|
||||
},
|
||||
check:function(card){
|
||||
return 3-ai.get.value(card)
|
||||
|
@ -661,7 +665,7 @@ character.sp={
|
|||
trigger:{player:'phaseEnd'},
|
||||
forced:true,
|
||||
content:function(){
|
||||
player.unmark(player.storage.zhoufu2);
|
||||
player.unmark(player.storage.zhoufu2.name);
|
||||
if(player.storage.zhoufu3.isAlive()){
|
||||
player.storage.zhoufu3.gain(player.storage.zhoufu2);
|
||||
player.$give(player.storage.zhoufu2,player.storage.zhoufu3);
|
||||
|
@ -1289,6 +1293,12 @@ character.sp={
|
|||
name:'存嗣',
|
||||
content:'$<div><div class="skill">【勇决】</div><div>每当其他角色于回合内使用一张杀,若目标不是你,你可以获得之(每回合最多能以此法获得一张杀)</div></div>'
|
||||
})
|
||||
game.addVideo('markCharacter',target,{
|
||||
name:'存嗣',
|
||||
content:'$<div><div class="skill">【勇决】</div><div>每当其他角色于回合内使用一张杀,若目标不是你,你可以获得之(每回合最多能以此法获得一张杀)',
|
||||
id:'yongjue',
|
||||
target:player.dataset.position
|
||||
});
|
||||
"step 1"
|
||||
player.turnOver();
|
||||
player.removeSkill('guixiu');
|
||||
|
@ -2003,7 +2013,10 @@ character.sp={
|
|||
}
|
||||
"step 2"
|
||||
if(result.bool){
|
||||
if(trigger.player.judging.clone) trigger.player.judging.clone.delete();
|
||||
if(trigger.player.judging.clone){
|
||||
trigger.player.judging.clone.delete();
|
||||
game.addVideo('deletenode',player,get.cardsInfo([trigger.player.judging.clone]));
|
||||
}
|
||||
ui.discardPile.appendChild(trigger.player.judging);
|
||||
trigger.player.judging=event.card;
|
||||
game.delay(2);
|
||||
|
@ -2246,6 +2259,11 @@ character.sp={
|
|||
name:'颂词',
|
||||
content:'已发动'
|
||||
});
|
||||
game.addVideo('mark',target,{
|
||||
name:'颂词',
|
||||
content:'已发动',
|
||||
id:'songci'
|
||||
});
|
||||
},
|
||||
ai:{
|
||||
order:7,
|
||||
|
|
|
@ -169,7 +169,10 @@ character.standard={
|
|||
"step 2"
|
||||
if(result.bool){
|
||||
player.logSkill('guicai');
|
||||
if(trigger.player.judging.clone) trigger.player.judging.clone.delete();
|
||||
if(trigger.player.judging.clone){
|
||||
trigger.player.judging.clone.delete();
|
||||
game.addVideo('deletenode',player,get.cardsInfo([trigger.player.judging.clone]));
|
||||
}
|
||||
ui.discardPile.appendChild(trigger.player.judging);
|
||||
trigger.player.judging=result.cards[0];
|
||||
trigger.position.appendChild(result.cards[0]);
|
||||
|
|
160
character/swd.js
|
@ -1422,6 +1422,7 @@ character.swd={
|
|||
player.addTempSkill('hutian4','phaseAfter');
|
||||
target.addSkill('hutian2');
|
||||
target.storage.hutian2=result.cards;
|
||||
game.addVideo('storage',target,['hutian2',get.cardsInfo(result.cards),'cards']);
|
||||
}
|
||||
else{
|
||||
event.finish();
|
||||
|
@ -1561,6 +1562,12 @@ character.swd={
|
|||
}
|
||||
player.additionalSkills.huanxing=list;
|
||||
player.markCharacter(name,null,true,true);
|
||||
game.addVideo('markCharacter',player,{
|
||||
name:'幻形',
|
||||
content:'',
|
||||
id:'huanxing',
|
||||
target:name
|
||||
});
|
||||
player.storage.huanxing=name;
|
||||
}
|
||||
},
|
||||
|
@ -1790,6 +1797,7 @@ character.swd={
|
|||
if(player.storage.pozhou){
|
||||
player.markSkill('pozhou');
|
||||
}
|
||||
game.addVideo('storage',player,['pozhou',player.storage.pozhou]);
|
||||
},
|
||||
intro:{
|
||||
content:'mark'
|
||||
|
@ -3408,6 +3416,42 @@ character.swd={
|
|||
kunlunjing:{
|
||||
unique:true,
|
||||
group:['kunlunjing1','kunlunjing2'],
|
||||
video:function(player,data){
|
||||
if(data){
|
||||
for(var i in data){
|
||||
var current=game.playerMap[i];
|
||||
current.node.handcards1.innerHTML='';
|
||||
current.node.handcards2.innerHTML='';
|
||||
current.node.equips.innerHTML='';
|
||||
current.node.judges.innerHTML='';
|
||||
current.directgain(get.infoCards(data[i].h));
|
||||
var es=get.infoCards(data[i].e);
|
||||
for(var j=0;j<es.length;j++){
|
||||
current.$equip(es[j]);
|
||||
}
|
||||
var js=get.infoCards(data[i].j);
|
||||
for(var j=0;j<js.length;j++){
|
||||
player.node.judges.appendChild(js[j]);
|
||||
}
|
||||
}
|
||||
ui.window.classList.remove('zoomout3');
|
||||
ui.window.classList.add('zoomin3');
|
||||
document.body.appendChild(ui.window);
|
||||
setTimeout(function(){
|
||||
ui.window.show();
|
||||
ui.window.classList.remove('zoomin3');
|
||||
setTimeout(function(){
|
||||
ui.window.style.transition='';
|
||||
},500);
|
||||
},100);
|
||||
}
|
||||
else{
|
||||
ui.window.style.transition='all 0.5s';
|
||||
ui.window.classList.add('zoomout3');
|
||||
ui.window.delete();
|
||||
ui.window.hide();
|
||||
}
|
||||
},
|
||||
intro:{
|
||||
content:function(storage,player){
|
||||
if(true){
|
||||
|
@ -3461,7 +3505,7 @@ character.swd={
|
|||
return false;
|
||||
},
|
||||
check:function(event,player){
|
||||
if(event.name=='phase'&&player.hp<3) return false;
|
||||
// if(event.name=='phase'&&player.hp<3) return false;
|
||||
var storage=event.player.storage.kunlunjing;
|
||||
var num=0;
|
||||
for(var i=0;i<storage.length;i++){
|
||||
|
@ -3477,6 +3521,8 @@ character.swd={
|
|||
}
|
||||
}
|
||||
}
|
||||
// return num>2;
|
||||
if(player.hp==2) return num>4;
|
||||
return num>Math.min(3,game.players.length);
|
||||
},
|
||||
content:function(){
|
||||
|
@ -3484,10 +3530,12 @@ character.swd={
|
|||
game.delay(0.5);
|
||||
"step 1"
|
||||
event.player.storage.kunlunjing2=true;
|
||||
ui.arena.classList.add('zoomout3');
|
||||
ui.arena.delete();
|
||||
ui.arena.hide();
|
||||
ui.window.style.transition='all 0.5s';
|
||||
ui.window.classList.add('zoomout3');
|
||||
ui.window.delete();
|
||||
ui.window.hide();
|
||||
game.delay(0,500);
|
||||
game.addVideo('skill',event.player,'kunlunjing');
|
||||
"step 2"
|
||||
var storage=event.player.storage.kunlunjing;
|
||||
var player,frag;
|
||||
|
@ -3537,15 +3585,35 @@ character.swd={
|
|||
}
|
||||
}
|
||||
game.delay(0,100);
|
||||
ui.arena.classList.remove('zoomout3');
|
||||
ui.arena.classList.add('zoomin3');
|
||||
ui.window.appendChild(ui.arena);
|
||||
ui.window.classList.remove('zoomout3');
|
||||
ui.window.classList.add('zoomin3');
|
||||
document.body.appendChild(ui.window);
|
||||
var data={};
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
data[game.players[i].dataset.position]={
|
||||
h:get.cardsInfo(game.players[i].get('h')),
|
||||
e:get.cardsInfo(game.players[i].get('e')),
|
||||
j:get.cardsInfo(game.players[i].get('j'))
|
||||
}
|
||||
}
|
||||
game.addVideo('skill',event.player,['kunlunjing',data]);
|
||||
"step 3"
|
||||
ui.arena.show();
|
||||
ui.arena.classList.remove('zoomin3');
|
||||
ui.window.show();
|
||||
ui.window.classList.remove('zoomin3');
|
||||
setTimeout(function(){
|
||||
ui.window.style.transition='';
|
||||
game.resume();
|
||||
},500);
|
||||
event.player.storage.kunlunjing3='已发动';
|
||||
game.pause();
|
||||
'step 4'
|
||||
if(trigger.name=='phase'){
|
||||
event.player.loseHp();
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(game.players[i].hp<event.player.hp){
|
||||
event.player.loseHp();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -4042,6 +4110,7 @@ character.swd={
|
|||
},
|
||||
init:function(player){
|
||||
player.storage.yishan=[];
|
||||
game.addVideo('storage',player,['yishan',get.cardsInfo(player.storage.yishan),'cards']);
|
||||
},
|
||||
mark:true,
|
||||
content:function(){
|
||||
|
@ -4119,6 +4188,7 @@ character.swd={
|
|||
for(var i=0;i<trigger.cards.length;i++){
|
||||
player.storage.yishan.unshift(trigger.cards[i]);
|
||||
}
|
||||
game.addVideo('storage',player,['yishan',get.cardsInfo(player.storage.yishan),'cards']);
|
||||
}
|
||||
},
|
||||
guanhu:{
|
||||
|
@ -4786,6 +4856,7 @@ character.swd={
|
|||
player.chooseCardTarget({
|
||||
prompt:'是否发动【挟雷】?',
|
||||
filterCard:true,
|
||||
position:'he',
|
||||
filterTarget:function(card,player,target){
|
||||
if(player==target) return false;
|
||||
if(trigger.name=='respond'){
|
||||
|
@ -4814,6 +4885,53 @@ character.swd={
|
|||
threaten:1.6
|
||||
}
|
||||
},
|
||||
jingjie:{
|
||||
enable:'phaseUse',
|
||||
init:function(player){
|
||||
player.storage.jingjie=false;
|
||||
},
|
||||
mark:true,
|
||||
intro:{
|
||||
content:'limited',
|
||||
},
|
||||
filter:function(event,player){
|
||||
return !player.storage.jingjie;
|
||||
},
|
||||
content:function(){
|
||||
'step 0'
|
||||
player.storage.jingjie=true;
|
||||
player.unmarkSkill('jingjie');
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
game.players[i].discard(game.players[i].get('hej'))._triggered=null;
|
||||
}
|
||||
'step 1'
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
game.players[i].directgain(get.cards(2));
|
||||
game.players[i].$draw(2);
|
||||
}
|
||||
|
||||
},
|
||||
ai:{
|
||||
threaten:1.3,
|
||||
order:1,
|
||||
result:{
|
||||
player:function(player){
|
||||
var num=0;
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
var att=ai.get.attitude(player,game.players[i]);
|
||||
if(att>0){
|
||||
num-=game.players[i].num('he')-2;
|
||||
}
|
||||
else if(att<0){
|
||||
num+=game.players[i].num('he')-2;
|
||||
}
|
||||
}
|
||||
if(player.hp==1) return num-1;
|
||||
return num-game.players.length/2;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
ningjian:{
|
||||
group:['ningjian1','ningjian2'],
|
||||
ai:{
|
||||
|
@ -5292,6 +5410,12 @@ character.swd={
|
|||
name:get.translation(link),
|
||||
content:lib.translate[link+'_info']
|
||||
});
|
||||
game.addVideo('markCharacter',player,{
|
||||
name:'get.translation(link)',
|
||||
content:lib.translate[link+'_info'],
|
||||
id:'tianshu',
|
||||
target:target.name
|
||||
});
|
||||
player.storage.tianshu=target.name;
|
||||
player.checkMarks();
|
||||
player.addTempSkill('tianshu_ai','phaseAfter');
|
||||
|
@ -5389,6 +5513,12 @@ character.swd={
|
|||
name:get.translation(link),
|
||||
content:lib.translate[link+'_info']
|
||||
});
|
||||
game.addVideo('markCharacter',player,{
|
||||
name:'get.translation(link)',
|
||||
content:lib.translate[link+'_info'],
|
||||
id:'tianshu',
|
||||
target:target.name
|
||||
});
|
||||
player.storage.tianshu=target.name;
|
||||
player.checkMarks();
|
||||
player.popup(link);
|
||||
|
@ -7003,6 +7133,7 @@ character.swd={
|
|||
"step 1"
|
||||
ui.auto.show();
|
||||
player.storage.mailun=event.choice;
|
||||
game.addVideo('storage',player,['mailun',player.storage.mailun]);
|
||||
if(event.choice){
|
||||
player.logSkill('mailun');
|
||||
player.markSkill('mailun');
|
||||
|
@ -7314,12 +7445,14 @@ character.swd={
|
|||
discard:false,
|
||||
prepare:function(cards,player,targets){
|
||||
player.$give(cards,targets[0]);
|
||||
player.line(targets[0],'green');
|
||||
},
|
||||
content:function(){
|
||||
"step 0"
|
||||
game.delay();
|
||||
"step 1"
|
||||
target.storage.zhenjiu2=cards[0];
|
||||
game.addVideo('storage',target,['zhenjiu2',get.cardInfo(target.storage.zhenjiu2),'card']);
|
||||
target.addSkill('zhenjiu2');
|
||||
},
|
||||
ai:{
|
||||
|
@ -7364,6 +7497,7 @@ character.swd={
|
|||
discard:false,
|
||||
prepare:function(cards,player,targets){
|
||||
player.$give(cards,targets[0]);
|
||||
player.line(targets[0],'green');
|
||||
},
|
||||
content:function(){
|
||||
"step 0"
|
||||
|
@ -7371,6 +7505,7 @@ character.swd={
|
|||
"step 1"
|
||||
target.storage.mazui2=cards[0];
|
||||
target.addSkill('mazui2');
|
||||
game.addVideo('storage',target,['mazui2',get.cardInfo(target.storage.mazui2),'card']);
|
||||
},
|
||||
ai:{
|
||||
expose:0.2,
|
||||
|
@ -7644,6 +7779,9 @@ character.swd={
|
|||
swd_lanmoshen:'蓝魔神',
|
||||
swd_wushi:'巫师',
|
||||
|
||||
jingjie:'镜界',
|
||||
jingjie_info:'回合开始阶段,你可以流失一点体力,并',
|
||||
jingjie_old_info:'限定技,出牌阶段,你可以令所有角色弃置所有牌,然后摸两张牌(不触发任何技能)',
|
||||
kongmo:'恐魔',
|
||||
kongmo_info:'锁定技,你使用基本牌或非延时锦囊牌后将额外结算一次卡牌效果',
|
||||
miaobi:'妙笔',
|
||||
|
@ -7992,7 +8130,7 @@ character.swd={
|
|||
shengshou_info:'你可以将一张黑色手牌当作草药使用',
|
||||
susheng_info:'在任意一名角色即将死亡时,你可以弃置一张手牌防止其死亡,并将其体力回复至1,每回合限发动一次',
|
||||
zhanlu_info:'出牌阶段,你可以弃置一张黑桃牌令至多3名角色各回复一点体力',
|
||||
kunlunjing_info:'回合开始前,你可以令场上所有牌还原到你上一回合结束时的位置,然后流失一点体力',
|
||||
kunlunjing_info:'回合开始前,你可以令场上所有牌还原到你上一回合结束时的位置,此时有其他角色的体力值比你少,你流失一点体力',
|
||||
swd_xiuluo_info:'回合开始阶段,你可以弃一张手牌来弃置你判断区里的一张延时类锦囊(必须花色相同)',
|
||||
xianyin_info:'出牌阶段,你可以令所有判定区内有牌的角色弃置判定区内的牌,然后交给你一张手牌',
|
||||
qiaoxie_info:'每当你装备一张牌,可摸一张牌,每当你失去一张装备牌(不含替换),你可以弃置其他角色的一张牌',
|
||||
|
|
|
@ -221,16 +221,15 @@ character.wind={
|
|||
event.card=get.cards()[0];
|
||||
if(player.storage.buqu==undefined) player.storage.buqu=[];
|
||||
player.storage.buqu.push(event.card);
|
||||
event.dialog=ui.create.dialog('不屈',player.storage.buqu);
|
||||
game.addVideo('storage',player,['buqu',get.cardsInfo(player.storage.buqu),'cards']);
|
||||
var str=get.translation(player)+'的不屈牌为'+player.storage.buqu[0].number;
|
||||
for(var i=1;i<player.storage.buqu.length;i++){
|
||||
str+='、'+player.storage.buqu[i].number;
|
||||
}
|
||||
player.showCards(player.storage.buqu,'不屈')
|
||||
game.log(str);
|
||||
game.delay(2);
|
||||
player.markSkill('buqu');
|
||||
"step 1"
|
||||
event.dialog.close();
|
||||
for(var i=0;i<player.storage.buqu.length-1;i++){
|
||||
if(get.number(event.card)&&get.number(event.card)==get.number(player.storage.buqu[i])) return;
|
||||
}
|
||||
|
|
|
@ -215,6 +215,7 @@ character.xianjian={
|
|||
content:function(){
|
||||
target.storage.tianfu2=cards[0];
|
||||
target.storage.tianfu3=player;
|
||||
game.addVideo('storage',target,['tianfu2',get.cardInfo(cards[0]),'card']);
|
||||
target.addSkill('tianfu2');
|
||||
},
|
||||
ai:{
|
||||
|
@ -304,11 +305,13 @@ character.xianjian={
|
|||
var clone=result.cards[0].clone;
|
||||
setTimeout(function(){
|
||||
clone.moveTo(player,'flip').delete();
|
||||
game.addVideo('gain2',player,get.cardsInfo([clone]));
|
||||
},500);
|
||||
player.logSkill('shuiyun');
|
||||
player.storage.shuiyun.push(result.cards[0]);
|
||||
player.lose(result.cards,ui.special);
|
||||
player.markSkill('shuiyun');
|
||||
game.addVideo('storage',player,['shuiyun',get.cardsInfo(player.storage.shuiyun),'cards']);
|
||||
}
|
||||
},
|
||||
intro:{
|
||||
|
@ -369,6 +372,7 @@ character.xianjian={
|
|||
trigger.player.draw();
|
||||
}
|
||||
player.logSkill('shuiyun5',trigger.player,'thunder');
|
||||
game.addVideo('storage',player,['shuiyun',get.cardsInfo(player.storage.shuiyun),'cards']);
|
||||
}
|
||||
"step 2"
|
||||
if(trigger.player!=player){
|
||||
|
@ -472,6 +476,12 @@ character.xianjian={
|
|||
name:'长念',
|
||||
content:'$<div><div class="skill">【追思】</div><div>锁定技,回合结束阶段,你摸一张牌</div></div>'
|
||||
});
|
||||
game.addVideo('markCharacter',target,{
|
||||
name:'长念',
|
||||
content:'$<div><div class="skill">【追思】</div><div>锁定技,回合结束阶段,你摸一张牌</div></div>',
|
||||
id:'changnian',
|
||||
target:player.dataset.position
|
||||
});
|
||||
}
|
||||
},
|
||||
ai:{
|
||||
|
@ -617,10 +627,13 @@ character.xianjian={
|
|||
if(player.storage.shuangren){
|
||||
player.unmark(player.storage.shuangren,'shuangren');
|
||||
player.discard(player.storage.shuangren);
|
||||
game.addVideo('unmarkId',player,[get.cardInfo(player.storage.shuangren),'shuangren']);
|
||||
}
|
||||
if(card.clone){
|
||||
card.clone.moveTo(player,'flip').delete();
|
||||
game.addVideo('gain2',player,get.cardsInfo([card.clone]));
|
||||
player.mark(card,'shuangren');
|
||||
game.addVideo('markId',player,[get.cardInfo(card),'shuangren']);
|
||||
}
|
||||
ui.special.appendChild(card);
|
||||
player.storage.shuangren=card;
|
||||
|
@ -1103,6 +1116,7 @@ character.xianjian={
|
|||
var card=get.cards()[0];
|
||||
target.$draw(card);
|
||||
target.storage.zhimeng2=card;
|
||||
game.addVideo('storage',target,['zhimeng2',get.cardInfo(card),'card']);
|
||||
target.addSkill('zhimeng2');
|
||||
event.finish();
|
||||
player.logSkill('zhimeng',target);
|
||||
|
|
|
@ -465,6 +465,7 @@ character.yijiang={
|
|||
result.targets[0].storage.qianxi2=event.color;
|
||||
result.targets[0].addSkill('qianxi2');
|
||||
player.line(result.targets,'green');
|
||||
game.addVideo('storage',result.targets[0],['qianxi2',event.color]);
|
||||
}
|
||||
},
|
||||
},
|
||||
|
@ -734,6 +735,7 @@ character.yijiang={
|
|||
var card=target.get('h').randomGet();
|
||||
player.showCards(card);
|
||||
player.storage.qiangzhi=get.type(card,'trick');
|
||||
game.addVideo('storage',player,['qiangzhi',player.storage.qiangzhi]);
|
||||
player.markSkill('qiangzhi');
|
||||
},
|
||||
intro:{
|
||||
|
@ -938,6 +940,7 @@ character.yijiang={
|
|||
if(result.cards&&result.cards.length){
|
||||
player.lose(result.cards,ui.special);
|
||||
player.storage.quanji=player.storage.quanji.concat(result.cards);
|
||||
game.addVideo('storage',player,['quanji',get.cardsInfo(player.storage.quanji),'cards']);
|
||||
game.log(get.translation(player)+'将'+get.translation(result.cards)+'置于武将牌上作为“权”');
|
||||
player.markSkill('quanji');
|
||||
}
|
||||
|
@ -1016,6 +1019,7 @@ character.yijiang={
|
|||
if(!player.storage.quanji.length){
|
||||
player.unmarkSkill('quanji');
|
||||
}
|
||||
game.addVideo('storage',player,['quanji',get.cardsInfo(player.storage.quanji),'cards']);
|
||||
"step 2"
|
||||
target.draw(2);
|
||||
"step 3"
|
||||
|
@ -2675,20 +2679,28 @@ character.yijiang={
|
|||
},
|
||||
content:function(){
|
||||
"step 0"
|
||||
if(trigger.player!=player) event.card=trigger.player.get('h').randomGet();
|
||||
else{
|
||||
event.card=trigger.player.get('h',function(card){
|
||||
return get.type(card)!='basic';
|
||||
}).randomGet();
|
||||
if(trigger.player!=player){
|
||||
event.card=trigger.player.get('h').randomGet();
|
||||
}
|
||||
else{
|
||||
player.chooseCard(true,'选择展示一张手牌').ai=function(card){
|
||||
if(get.type(card)!='basic'){
|
||||
return 10-ai.get.value(card);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
event.selfSelect=true;
|
||||
}
|
||||
event.dialog=ui.create.dialog(get.translation(player)+'展示的手牌',[event.card]);
|
||||
game.delay(2);
|
||||
"step 1"
|
||||
if(event.selfSelect){
|
||||
event.card=result.cards[0];
|
||||
}
|
||||
player.showCards([event.card],get.translation(player)+'展示的手牌');
|
||||
"step 2"
|
||||
if(get.type(event.card)!='basic'){
|
||||
trigger.player.recover();
|
||||
trigger.player.discard(event.card);
|
||||
}
|
||||
event.dialog.close();
|
||||
},
|
||||
ai:{
|
||||
threaten:1.4
|
||||
|
@ -2742,6 +2754,8 @@ character.yijiang={
|
|||
event.dialog=ui.create.dialog('称象',event.cards);
|
||||
game.delay(2);
|
||||
}
|
||||
game.addVideo('showCards',player,['称象',get.cardsInfo(event.cards)]);
|
||||
game.addVideo('delay',null,2);
|
||||
"step 1"
|
||||
if(event.dialog) event.dialog.close();
|
||||
var dialog=ui.create.dialog('称象:选择任意张点数小于13的牌',event.cards);
|
||||
|
@ -2917,6 +2931,7 @@ character.yijiang={
|
|||
if(result.bool){
|
||||
player.markSkill('xiansi');
|
||||
player.storage.xiansi=player.storage.xiansi.concat(result.links);
|
||||
game.addVideo('storage',player,['xiansi',get.cardsInfo(player.storage.xiansi),'cards']);
|
||||
event.current.lose(result.links,ui.special);
|
||||
event.current.$give(result.links,player);
|
||||
event.goto(2);
|
||||
|
@ -2977,6 +2992,7 @@ character.yijiang={
|
|||
for(var i=0;i<result.links.length;i++){
|
||||
event.target.storage.xiansi.remove(result.links[i]);
|
||||
}
|
||||
game.addVideo('storage',event.target,['xiansi',get.cardsInfo(event.target.storage.xiansi),'cards']);
|
||||
if(!event.target.storage.xiansi.length){
|
||||
event.target.unmarkSkill('xiansi');
|
||||
}
|
||||
|
@ -3162,6 +3178,7 @@ character.yijiang={
|
|||
player.storage.zyexin.push(card);
|
||||
player.$draw(card);
|
||||
player.markSkill('zyexin');
|
||||
game.addVideo('storage',player,['zyexin',get.cardsInfo(player.storage.zyexin),'cards']);
|
||||
},
|
||||
group:'zyexin2'
|
||||
},
|
||||
|
@ -3191,6 +3208,7 @@ character.yijiang={
|
|||
for(var i=0;i<result.links.length;i++){
|
||||
player.storage.zyexin.remove(result.links[i]);
|
||||
}
|
||||
game.addVideo('storage',player,['zyexin',get.cardsInfo(player.storage.zyexin),'cards']);
|
||||
},
|
||||
ai:{
|
||||
order:5,
|
||||
|
@ -3262,6 +3280,7 @@ character.yijiang={
|
|||
"step 2"
|
||||
if(result.bool){
|
||||
player.storage.zyexin.remove(event.card);
|
||||
game.addVideo('storage',player,['zyexin',get.cardsInfo(player.storage.zyexin),'cards']);
|
||||
game.delay();
|
||||
if(get.type(event.card)=='equip'){
|
||||
player.$give(event.card,result.targets[0]);
|
||||
|
|
|
@ -240,6 +240,7 @@ window.config={
|
|||
modeconfig:false,
|
||||
gameconfig:false,
|
||||
appearence:false,
|
||||
video:'20',
|
||||
|
||||
intro:'i',
|
||||
right_click:'pause',
|
||||
|
|
1252
game/game.js
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 32 KiB |
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 181 KiB |
After Width: | Height: | Size: 78 KiB |
After Width: | Height: | Size: 13 KiB |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 22 KiB |
After Width: | Height: | Size: 62 KiB |
After Width: | Height: | Size: 344 KiB |
After Width: | Height: | Size: 62 KiB |
After Width: | Height: | Size: 79 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 9.0 KiB |
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 27 KiB |
|
@ -465,22 +465,22 @@ margin-bottom: 5px;
|
|||
.flash{-webkit-animation:flash 1s;}
|
||||
.flip{-webkit-animation:flip 1s;}
|
||||
/*--------样式--------*/
|
||||
#arena.selecting .player[data-position='0'] .card:not(.selectable)>.background,
|
||||
#arena.selecting .player[data-position='0'] .card:not(.selectable)>.image,
|
||||
#arena.selecting .player[data-position='0'] .card:not(.selectable)>.name,
|
||||
#arena.selecting .player[data-position='0'] .card:not(.selectable)>.name2,
|
||||
#arena.selecting .player[data-position='0'] .card:not(.selectable)>.info,
|
||||
#arena.selecting #me .card:not(.selectable)>.background,
|
||||
#arena.selecting #me .card:not(.selectable)>.image,
|
||||
#arena.selecting #me .card:not(.selectable)>.name,
|
||||
#arena.selecting #me .card:not(.selectable)>.name2,
|
||||
#arena.selecting #me .card:not(.selectable)>.info,
|
||||
#arena.selecting #me .card:not(.selectable)>.addinfo,
|
||||
#arena.selecting .dialog:not(.noselect) .button:not(.selectable):not(.noclick),
|
||||
#arena.selecting:not(.video) .player[data-position='0'] .card:not(.selectable)>.background,
|
||||
#arena.selecting:not(.video) .player[data-position='0'] .card:not(.selectable)>.image,
|
||||
#arena.selecting:not(.video) .player[data-position='0'] .card:not(.selectable)>.name,
|
||||
#arena.selecting:not(.video) .player[data-position='0'] .card:not(.selectable)>.name2,
|
||||
#arena.selecting:not(.video) .player[data-position='0'] .card:not(.selectable)>.info,
|
||||
#arena.selecting:not(.video) #me .card:not(.selectable)>.background,
|
||||
#arena.selecting:not(.video) #me .card:not(.selectable)>.image,
|
||||
#arena.selecting:not(.video) #me .card:not(.selectable)>.name,
|
||||
#arena.selecting:not(.video) #me .card:not(.selectable)>.name2,
|
||||
#arena.selecting:not(.video) #me .card:not(.selectable)>.info,
|
||||
#arena.selecting:not(.video) #me .card:not(.selectable)>.addinfo,
|
||||
#arena.selecting:not(.video) .dialog:not(.noselect) .button:not(.selectable):not(.noclick),
|
||||
.dead,.likedead{opacity: 0.6;}
|
||||
.unselectable:not(.selected):not(.removing){opacity: 0.6 !important}
|
||||
.mark>.background{opacity: 1 !important;}
|
||||
#arena.selecting #me .card:not(.selectable){
|
||||
#arena.selecting:not(.video) #me .card:not(.selectable){
|
||||
opacity:0.8
|
||||
}
|
||||
|
||||
|
@ -557,6 +557,9 @@ div:hover>.intro{opacity: 1;}
|
|||
border-style:solid;
|
||||
border-color:transparent;
|
||||
}
|
||||
.underlinenode.slim{
|
||||
padding-bottom: 0;
|
||||
}
|
||||
.on>.underline,.underlinenode.on{
|
||||
border-color:rgb(0, 133, 255);
|
||||
}
|
||||
|
|
|
@ -38,6 +38,14 @@
|
|||
.menu-cheat>.selecting{
|
||||
box-shadow: rgba(0, 0, 0, 0.2) 0 0 0 1px, rgba(255, 0, 0, 0.8) 0 0 5px, rgba(255, 0, 0, 0.8) 0 0 5px !important
|
||||
}
|
||||
.menu-cheat.config>.menubutton{
|
||||
height:16px;
|
||||
line-height: 16px;
|
||||
transform: translateY(-10px);
|
||||
}
|
||||
.menu-cheat.config{
|
||||
transition-property: opacity;
|
||||
}
|
||||
.menu-buttons>.toggle{
|
||||
position:relative;
|
||||
margin-bottom: 10px !important;
|
||||
|
@ -375,3 +383,54 @@
|
|||
background-image: linear-gradient(rgba(47,101,150,1), rgba(43, 90, 132,1));
|
||||
box-shadow: rgba(0,0,0,0.2) 0 0 0 1px;
|
||||
}
|
||||
.videonode.menubutton{
|
||||
width: calc(100% - 50px);
|
||||
height: 70px;
|
||||
margin-bottom: 6px;
|
||||
margin-left: -10px;
|
||||
margin-top: 6px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.videonode.menubutton>div{
|
||||
position: absolute;
|
||||
}
|
||||
.videonode.menubutton>.videoavatar{
|
||||
width: 56px;
|
||||
height: 56px;
|
||||
top:7px;
|
||||
left:7px;
|
||||
background-size: cover;
|
||||
}
|
||||
.videonode.menubutton>.videoavatar2{
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
top:43px;
|
||||
left:3px;
|
||||
background-size: cover;
|
||||
border-radius: 100%;
|
||||
}
|
||||
.videonode.menubutton>.caption{
|
||||
display: inline-block;
|
||||
left: 84px;
|
||||
top: 6px;
|
||||
padding-top: 0;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.videonode.menubutton>.text{
|
||||
font-size: 14px;
|
||||
left: 85px;
|
||||
top: 35px;
|
||||
line-height: 20px;
|
||||
text-align: left;
|
||||
font-family:'STHeiti','SimHei','Microsoft JhengHei','Microsoft YaHei','WenQuanYi Micro Hei',Helvetica,Arial,sans-serif
|
||||
}
|
||||
.videonode.menubutton>.victory{
|
||||
font-family: 'huangcao';
|
||||
font-size: 25px;
|
||||
text-shadow: black 0 0 1px,rgba(255, 203, 0,1) 0 0 2px,rgba(255, 203, 0,1) 0 0 5px,rgba(255, 203, 0,1) 0 0 5px,
|
||||
rgba(255, 203, 0,1) 0 0 5px,black 0 0 1px;
|
||||
color:white;
|
||||
position: absolute;
|
||||
left: 48px;
|
||||
top: 48px;
|
||||
}
|
||||
|
|
|
@ -8,10 +8,10 @@
|
|||
left: 3%;
|
||||
}
|
||||
#control{
|
||||
width: 100%;
|
||||
width: calc(5000% / 47 - 240px);
|
||||
left:calc(-150% / 47 + 120px);
|
||||
bottom:150px;
|
||||
height: 40px;
|
||||
left:0;
|
||||
}
|
||||
/*#control>div{
|
||||
height: 40px;
|
||||
|
@ -42,11 +42,15 @@
|
|||
}
|
||||
|
||||
#arena:not(.chess) .player[data-position='0']>.equips>div{
|
||||
width: 42px;
|
||||
height: 42px;
|
||||
width: 45px;
|
||||
height: 45px;
|
||||
margin: 0;
|
||||
border-radius: 4px;
|
||||
position: absolute;
|
||||
}
|
||||
#arena:not(.chess) .player[data-position='0']>.equips>.equip5{
|
||||
border-radius: 45px;
|
||||
}
|
||||
#arena:not(.chess) .player[data-position='0']{
|
||||
width: calc(5000% / 47);
|
||||
left:calc(-150% / 47);
|
||||
|
@ -59,6 +63,7 @@
|
|||
box-shadow: none !important;
|
||||
}
|
||||
#arena:not(.chess) .player[data-position='0']:not(.minskin)>.avatar,
|
||||
#arena:not(.chess) .player[data-position='0']:not(.minskin)>.avatar2,
|
||||
#arena:not(.chess) .player[data-position='0']:not(.minskin)>.equips{
|
||||
width:120px;
|
||||
height:120px;
|
||||
|
@ -147,9 +152,16 @@
|
|||
#arena:not(.chess) .player[data-position='0'].linked{
|
||||
transform: none;
|
||||
}
|
||||
#arena:not(.chess) .player[data-position='0'].linked .avatar{
|
||||
#arena:not(.chess) .player[data-position='0'].linked .avatar,
|
||||
#arena:not(.chess) .player[data-position='0'].linked .avatar2{
|
||||
transform: rotate(-90deg);
|
||||
}
|
||||
#arena:not(.chess) .player[data-position='0'].fullskin2 .avatar{
|
||||
transform-origin: right center;
|
||||
}
|
||||
#arena:not(.chess) .player[data-position='0'].fullskin2 .avatar2{
|
||||
transform-origin: left center;
|
||||
}
|
||||
|
||||
.dialog{
|
||||
height:calc(100% - 370px);
|
||||
|
|
52
mode/boss.js
|
@ -22,10 +22,43 @@ mode.boss={
|
|||
game.over(!game.boss.isAlive());
|
||||
}
|
||||
},
|
||||
getVideoName:function(){
|
||||
var str=get.translation(game.me.name);
|
||||
if(game.me.name2){
|
||||
str+='/'+get.translation(game.me.name2);
|
||||
}
|
||||
var str2='挑战';
|
||||
if(game.me!=game.boss){
|
||||
str2+=' - '+get.translation(game.boss);
|
||||
}
|
||||
var name=[str,str2];
|
||||
return name;
|
||||
},
|
||||
start:function(){
|
||||
var next=game.createEvent('game',false);
|
||||
next.content=function(){
|
||||
"step 0"
|
||||
var playback=localStorage.getItem(lib.configprefix+'playback');
|
||||
if(playback){
|
||||
ui.create.arena();
|
||||
ui.create.me();
|
||||
ui.arena.style.display='none';
|
||||
ui.system.style.display='none';
|
||||
_status.playback=playback;
|
||||
localStorage.removeItem(lib.configprefix+'playback');
|
||||
var store=lib.db.transaction(['video'],'readwrite').objectStore('video');
|
||||
store.get(parseInt(playback)).onsuccess=function(e){
|
||||
if(e.target.result){
|
||||
game.playVideoContent(e.target.result.video);
|
||||
}
|
||||
else{
|
||||
alert('播放失败:找不到录像');
|
||||
game.reload();
|
||||
}
|
||||
}
|
||||
event.finish();
|
||||
return;
|
||||
}
|
||||
for(var i in lib.skill){
|
||||
if(lib.skill[i].changeSeat){
|
||||
lib.skill[i]={};
|
||||
|
@ -158,9 +191,11 @@ mode.boss={
|
|||
boss.style.left=(rect.left-ui.arena.offsetLeft)+'px';
|
||||
boss.style.top=(rect.top-ui.arena.offsetTop)+'px';
|
||||
boss.setIdentity('zhu');
|
||||
boss.identity='zhu';
|
||||
for(var i=0;i<result.links.length;i++){
|
||||
var player=ui.create.player(ui.arena).init(result.links[i]).animate('start');
|
||||
player.setIdentity('cai');
|
||||
player.identity='cai';
|
||||
player.side=false;
|
||||
game.players.push(player);
|
||||
if(result.boss){
|
||||
|
@ -257,6 +292,20 @@ mode.boss={
|
|||
for(var i=0;i<game.players.length;i++){
|
||||
ui.create.div('.action',game.players[i].node.avatar).innerHTML='行动';
|
||||
}
|
||||
|
||||
var players=get.players(lib.sort.position);
|
||||
var info=[];
|
||||
for(var i=0;i<players.length;i++){
|
||||
info.push({
|
||||
name:players[i].name,
|
||||
identity:players[i].identity,
|
||||
position:players[i].dataset.position
|
||||
});
|
||||
}
|
||||
_status.videoInited=true,
|
||||
info.boss=(game.me==game.boss);
|
||||
game.addVideo('init',null,info);
|
||||
|
||||
"step 3"
|
||||
game.gameDraw(game.boss);
|
||||
game.bossPhaseLoop();
|
||||
|
@ -328,6 +377,7 @@ mode.boss={
|
|||
},
|
||||
onSwapControl:function(){
|
||||
if(game.me==game.boss) return;
|
||||
game.addVideo('onSwapControl');
|
||||
var name=game.me.name;
|
||||
if(ui.fakeme&&ui.fakeme.current!=name){
|
||||
ui.fakeme.current=name;
|
||||
|
@ -1421,7 +1471,7 @@ mode.boss={
|
|||
boss_zhangjiao:'天公将军',
|
||||
boss_zuoci:'迷之仙人',
|
||||
boss_yuji:'琅琊道士',
|
||||
boss_liubei:'昭烈皇帝',
|
||||
boss_liubei:'蜀汉烈帝',
|
||||
boss_caiwenji:'异乡孤女',
|
||||
boss_huatuo:'药坛圣手',
|
||||
boss_luxun:'蹁跹君子',
|
||||
|
|
193
mode/chess.js
|
@ -24,6 +24,10 @@ mode.chess={
|
|||
this.style.transition='all 0.5s';
|
||||
this.style.webkitTransform='rotate(180deg)';
|
||||
}
|
||||
else{
|
||||
this.style.transition='all 0.5s';
|
||||
this.style.webkitTransform='';
|
||||
}
|
||||
return this;
|
||||
},
|
||||
},
|
||||
|
@ -62,6 +66,7 @@ mode.chess={
|
|||
return this.moveTo(x+xy[0],y+xy[1]);
|
||||
},
|
||||
moveTo:function(x,y){
|
||||
game.addVideo('moveTo',this,[x,y]);
|
||||
if(x>=ui.chesswidth){
|
||||
x=ui.chesswidth-1;
|
||||
}
|
||||
|
@ -79,6 +84,7 @@ mode.chess={
|
|||
return this;
|
||||
},
|
||||
chessFocus:function(){
|
||||
game.addVideo('chessFocus',this);
|
||||
if(ui.chess._chessdrag) return;
|
||||
if(_status.chessscrolling) return;
|
||||
var player=this;
|
||||
|
@ -194,6 +200,20 @@ mode.chess={
|
|||
game.over(game.me.side==game.players[0].side);
|
||||
},
|
||||
$draw:function(num){
|
||||
var cards;
|
||||
if(get.itemtype(num)=='cards'){
|
||||
cards=num;
|
||||
}
|
||||
else if(get.itemtype(num)=='card'){
|
||||
cards=[num];
|
||||
}
|
||||
if(cards){
|
||||
game.addVideo('chessgainmod',this,get.cardsInfo(num));
|
||||
}
|
||||
else if(!num||typeof num=='number'){
|
||||
game.addVideo('chessgainmod',this,num);
|
||||
}
|
||||
|
||||
return this.$gainmod(num);
|
||||
},
|
||||
$drawx:function(num){
|
||||
|
@ -265,18 +285,29 @@ mode.chess={
|
|||
var that=this;
|
||||
if(num&&num>1){
|
||||
if(cards){
|
||||
that.$gain(cards)
|
||||
that.$gain(cards,null,false)
|
||||
}
|
||||
else{
|
||||
that.$gain(num-1)
|
||||
that.$gain(num-1,null,false)
|
||||
}
|
||||
}
|
||||
},
|
||||
$throw:function(card,time){
|
||||
$throw:function(card,time,init){
|
||||
if(init!==false){
|
||||
if(get.itemtype(card)!='cards'){
|
||||
if(get.itemtype(card)=='card'){
|
||||
card=[card];
|
||||
}
|
||||
else{
|
||||
return;
|
||||
}
|
||||
}
|
||||
game.addVideo('throw',this,[get.cardsInfo(card),time]);
|
||||
}
|
||||
this.chessFocus();
|
||||
if(get.itemtype(card)=='cards'){
|
||||
for(var i=0;i<card.length;i++){
|
||||
this.$throw(card[i],time);
|
||||
this.$throw(card[i],time,false);
|
||||
}
|
||||
}
|
||||
else{
|
||||
|
@ -350,6 +381,7 @@ mode.chess={
|
|||
return node;
|
||||
},
|
||||
$phaseJudge:function(card){
|
||||
game.addVideo('phaseJudge',this,get.cardInfo(card));
|
||||
var clone=card.copy('thrown',this.parentNode).animate('judgestart');
|
||||
var player=this;
|
||||
clone.style.opacity=0.6;
|
||||
|
@ -522,7 +554,14 @@ mode.chess={
|
|||
game:{
|
||||
minskin:true,
|
||||
singleHandcard:true,
|
||||
addChessPlayer:function(name,enemy,num){
|
||||
getVideoName:function(){
|
||||
var name=[
|
||||
get.translation(game.me.name),
|
||||
'战棋'+get.translation(get.config('chess_mode'))+' - '+_status.friendCount+'v'+_status.enemyCount
|
||||
];
|
||||
return name;
|
||||
},
|
||||
addChessPlayer:function(name,enemy,num,pos){
|
||||
if(typeof num!='number'){
|
||||
num=4;
|
||||
}
|
||||
|
@ -539,24 +578,35 @@ mode.chess={
|
|||
if(enemy){
|
||||
player.side=!game.me.side;
|
||||
player.setIdentity('enemy');
|
||||
player.identity='enemy';
|
||||
}
|
||||
else{
|
||||
player.side=game.me.side;
|
||||
player.setIdentity('friend');
|
||||
player.identity='friend';
|
||||
}
|
||||
player.node.identity.dataset.color=get.translation(player.side+'Color');
|
||||
game.players.push(player);
|
||||
ui.chess.appendChild(player);
|
||||
player.dataset.position=grids.randomGet();
|
||||
if(_status.video){
|
||||
player.dataset.position=pos;
|
||||
}
|
||||
else{
|
||||
player.dataset.position=grids.randomGet();
|
||||
}
|
||||
lib.posmap[player.dataset.position]=player;
|
||||
game.addVideo('addChessPlayer',null,[name,enemy,num,player.dataset.position]);
|
||||
if(num){
|
||||
player.directgain(get.cards(num));
|
||||
}
|
||||
game.arrangePlayers();
|
||||
|
||||
|
||||
return player;
|
||||
},
|
||||
addOverDialog:function(dialog,result){
|
||||
dialog.classList.add('center');
|
||||
if(get.config('chess_mode')!='leader') return;
|
||||
if(result=='战斗胜利'){
|
||||
_status.victory=true;
|
||||
if(!_status.enterArena){
|
||||
|
@ -580,6 +630,8 @@ mode.chess={
|
|||
}
|
||||
},
|
||||
controlOver:function(){
|
||||
ui.create.control(get.config('chess_mode')=='leader'?'返回':'重新开始',game.reload);
|
||||
if(get.config('chess_mode')!='leader') return;
|
||||
if(_status.enterArena){
|
||||
game.data.arena.acted.length=0;
|
||||
if(_status.victory){
|
||||
|
@ -613,7 +665,6 @@ mode.chess={
|
|||
}
|
||||
}
|
||||
}
|
||||
ui.create.control('返回',game.reload);
|
||||
},
|
||||
phaseLoopOrdered:function(player){
|
||||
var next=game.createEvent('phaseLoop');
|
||||
|
@ -676,6 +727,13 @@ mode.chess={
|
|||
if(player.side==game.me.side){
|
||||
player=game.me;
|
||||
}
|
||||
if(player.isDead()){
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(game.players[i].side==player.side){
|
||||
player=game.players[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(game.players[i].side==player.side){
|
||||
if(!game.players[i].classList.contains('acted')){
|
||||
|
@ -815,6 +873,7 @@ mode.chess={
|
|||
game.finishCards();
|
||||
if(get.config('chess_character')){
|
||||
for(var i in lib.chess_character){
|
||||
if(i.indexOf('leader_')==0) continue;
|
||||
lib.character[i]=lib.chess_character[i];
|
||||
if(!lib.character[i][4]){
|
||||
lib.character[i][4]=[];
|
||||
|
@ -830,22 +889,69 @@ mode.chess={
|
|||
ui.chess.appendChild(ui.canvas2);
|
||||
ui.ctx2=ui.canvas2.getContext('2d');
|
||||
game.me=ui.create.player();
|
||||
switch(get.config('chess_mode')){
|
||||
case 'leader':{
|
||||
game.leaderView();
|
||||
break;
|
||||
var playback=localStorage.getItem(lib.configprefix+'playback');
|
||||
if(playback){
|
||||
game.pause();
|
||||
ui.system.style.display='none';
|
||||
_status.playback=playback;
|
||||
localStorage.removeItem(lib.configprefix+'playback');
|
||||
var store=lib.db.transaction(['video'],'readwrite').objectStore('video');
|
||||
store.get(parseInt(playback)).onsuccess=function(e){
|
||||
if(e.target.result){
|
||||
event.video=e.target.result.video;
|
||||
game.resume();
|
||||
}
|
||||
else{
|
||||
alert('播放失败:找不到录像');
|
||||
game.reload();
|
||||
}
|
||||
}
|
||||
case 'combat':{
|
||||
game.chooseCharacter();
|
||||
break;
|
||||
}
|
||||
default:{
|
||||
game.chooseCharacter();
|
||||
}
|
||||
else{
|
||||
switch(get.config('chess_mode')){
|
||||
case 'leader':{
|
||||
game.leaderView();
|
||||
break;
|
||||
}
|
||||
case 'combat':{
|
||||
if(lib.storage.test){
|
||||
_status.auto=true;
|
||||
setTimeout(function(){
|
||||
console.log(get.translation(game.players));
|
||||
ui.updateh(true);
|
||||
},500);
|
||||
ui.auto.classList.add('glow');
|
||||
}
|
||||
game.chooseCharacter();
|
||||
break;
|
||||
}
|
||||
default:{
|
||||
game.chooseCharacter();
|
||||
}
|
||||
}
|
||||
}
|
||||
"step 1"
|
||||
ui.arena.classList.add('chess');
|
||||
var num=Math.round((_status.mylist.length+_status.enemylist.length)/2);
|
||||
var mylistmap,enemylistmap;
|
||||
if(event.video){
|
||||
var videocontent=event.video[0].content;
|
||||
_status.mylist=[];
|
||||
_status.enemylist=[];
|
||||
mylistmap=[];
|
||||
enemylistmap=[];
|
||||
for(var i=0;i<videocontent.length;i++){
|
||||
if(videocontent[i].identity=='friend'){
|
||||
_status.mylist.push(videocontent[i].name);
|
||||
mylistmap.push(videocontent[i].position);
|
||||
}
|
||||
else{
|
||||
_status.enemylist.push(videocontent[i].name);
|
||||
enemylistmap.push(videocontent[i].position);
|
||||
}
|
||||
}
|
||||
game.playerMap=lib.posmap;
|
||||
}
|
||||
var num=Math.round((_status.mylist.length+_status.enemylist.length)/2);
|
||||
var friend,enemy;
|
||||
var side;
|
||||
if(get.config('chess_mode')=='leader'){
|
||||
|
@ -948,28 +1054,40 @@ mode.chess={
|
|||
friend.init(_status.mylist.shift());
|
||||
friend.side=side;
|
||||
friend.setIdentity('friend');
|
||||
friend.identity='friend';
|
||||
friend.node.identity.dataset.color=get.translation(side+'Color');
|
||||
game.players.push(friend);
|
||||
ui.chess.appendChild(friend);
|
||||
friend.dataset.position=grids.randomRemove();
|
||||
if(event.video){
|
||||
friend.dataset.position=mylistmap.shift();
|
||||
}
|
||||
else{
|
||||
friend.dataset.position=grids.randomRemove();
|
||||
if(_status.enterArena&&game.data.arena.acted.contains(friend.name)){
|
||||
friend.hp--;
|
||||
friend.update();
|
||||
}
|
||||
if(_status.enterArena){
|
||||
friend.addSkill('arenaAdd');
|
||||
}
|
||||
}
|
||||
lib.posmap[friend.dataset.position]=friend;
|
||||
if(_status.enterArena&&game.data.arena.acted.contains(friend.name)){
|
||||
friend.hp--;
|
||||
friend.update();
|
||||
}
|
||||
if(_status.enterArena){
|
||||
friend.addSkill('arenaAdd');
|
||||
}
|
||||
}
|
||||
while(_status.enemylist.length){
|
||||
enemy=ui.create.player().animate('start');
|
||||
enemy.init(_status.enemylist.shift());
|
||||
enemy.side=!side;
|
||||
enemy.setIdentity('enemy');
|
||||
enemy.identity='enemy';
|
||||
enemy.node.identity.dataset.color=get.translation(!side+'Color');
|
||||
game.players.push(enemy);
|
||||
ui.chess.appendChild(enemy);
|
||||
enemy.dataset.position=grids.randomRemove();
|
||||
if(event.video){
|
||||
enemy.dataset.position=enemylistmap.shift();
|
||||
}
|
||||
else{
|
||||
enemy.dataset.position=grids.randomRemove();
|
||||
}
|
||||
lib.posmap[enemy.dataset.position]=enemy;
|
||||
}
|
||||
|
||||
|
@ -1017,6 +1135,11 @@ mode.chess={
|
|||
game.arrangePlayers();
|
||||
"step 2"
|
||||
ui.control.style.display='';
|
||||
if(event.video){
|
||||
game.playVideoContent(event.video);
|
||||
game.setChessInfo(game.me);
|
||||
return;
|
||||
}
|
||||
var p;
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
if(_status.lord){
|
||||
|
@ -1034,6 +1157,19 @@ mode.chess={
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
var players=get.players(lib.sort.position);
|
||||
var info=[];
|
||||
for(var i=0;i<players.length;i++){
|
||||
info.push({
|
||||
name:players[i].name,
|
||||
identity:players[i].identity,
|
||||
position:players[i].dataset.position
|
||||
});
|
||||
}
|
||||
_status.videoInited=true,
|
||||
game.addVideo('init',null,info);
|
||||
|
||||
event.trigger('gameStart');
|
||||
game.gameDraw(p);
|
||||
if(get.config('chess_mode')=='leader'){
|
||||
|
@ -2755,8 +2891,10 @@ mode.chess={
|
|||
}
|
||||
},
|
||||
modeSwapPlayer:function(player){
|
||||
var content=[game.me.dataset.position,player.dataset.position];
|
||||
game.me.node.avatar.classList.remove('glow2');
|
||||
player.node.avatar.classList.add('glow2');
|
||||
game.addVideo('chessSwap',null,content);
|
||||
game.swapControl(player);
|
||||
player.chessFocus();
|
||||
ui.create.fakeme();
|
||||
|
@ -3861,6 +3999,7 @@ mode.chess={
|
|||
playergrid:function(){
|
||||
if(!_status.paused) return;
|
||||
delete lib.posmap[this.link.dataset.position];
|
||||
game.addVideo('moveTox',this.link,this.dataset.position);
|
||||
this.link.dataset.position=this.dataset.position;
|
||||
lib.posmap[this.link.dataset.position]=this.link;
|
||||
if(ui.movegrids){
|
||||
|
|
|
@ -1,12 +1,44 @@
|
|||
'use strict';
|
||||
mode.guozhan={
|
||||
game:{
|
||||
getVideoName:function(){
|
||||
var str=get.translation(game.me.name1)+'/'+get.translation(game.me.name2);
|
||||
var str2=get.cnNumber(parseInt(get.config('player_number')))+'人'+
|
||||
get.translation(lib.config.mode);
|
||||
if(game.me.identity=='ye'){
|
||||
str2+=' - 野心家';
|
||||
}
|
||||
var name=[str,str2];
|
||||
return name;
|
||||
},
|
||||
start:function(){
|
||||
var next=game.createEvent('game',false);
|
||||
next.content=function(){
|
||||
"step 0"
|
||||
game.prepareArena();
|
||||
game.delay();
|
||||
var playback=localStorage.getItem(lib.configprefix+'playback');
|
||||
if(playback){
|
||||
ui.create.arena();
|
||||
ui.create.me();
|
||||
ui.arena.style.display='none';
|
||||
ui.system.style.display='none';
|
||||
_status.playback=playback;
|
||||
localStorage.removeItem(lib.configprefix+'playback');
|
||||
var store=lib.db.transaction(['video'],'readwrite').objectStore('video');
|
||||
store.get(parseInt(playback)).onsuccess=function(e){
|
||||
if(e.target.result){
|
||||
game.playVideoContent(e.target.result.video);
|
||||
}
|
||||
else{
|
||||
alert('播放失败:找不到录像');
|
||||
game.reload();
|
||||
}
|
||||
}
|
||||
event.finish();
|
||||
}
|
||||
else{
|
||||
game.prepareArena();
|
||||
game.delay();
|
||||
}
|
||||
"step 1"
|
||||
if(lib.storage.test){
|
||||
_status.auto=true;
|
||||
|
@ -37,6 +69,7 @@ mode.guozhan={
|
|||
player=game.players[Math.floor(Math.random()*game.players.length)];
|
||||
}
|
||||
event.trigger('gameStart');
|
||||
|
||||
game.gameDraw(player);
|
||||
if(get.config('ai_identity')){
|
||||
game.showIdentity(true);
|
||||
|
@ -53,6 +86,20 @@ mode.guozhan={
|
|||
}
|
||||
}
|
||||
game.phaseLoop(player);
|
||||
|
||||
|
||||
var players=get.players(lib.sort.position);
|
||||
var info=[];
|
||||
for(var i=0;i<players.length;i++){
|
||||
info.push({
|
||||
name:game.players[i].name,
|
||||
translate:lib.translate[game.players[i].name],
|
||||
name1:players[i].name1,
|
||||
name2:players[i].name2,
|
||||
});
|
||||
}
|
||||
_status.videoInited=true,
|
||||
game.addVideo('init',null,info);
|
||||
}
|
||||
},
|
||||
showIdentity:function(started){
|
||||
|
@ -369,6 +416,7 @@ mode.guozhan={
|
|||
if(!this.classList.contains('unseen')&&!this.classList.contains('unseen2')){
|
||||
return;
|
||||
}
|
||||
game.addVideo('showCharacter',this,num);
|
||||
if(this.identity=='unknown'){
|
||||
this.group=lib.character[this.name1][1];
|
||||
// this.node.identity.style.backgroundColor=get.translation(this.group+'Color');
|
||||
|
|
|
@ -1,16 +1,49 @@
|
|||
'use strict';
|
||||
mode.identity={
|
||||
game:{
|
||||
getVideoName:function(){
|
||||
var str=get.translation(game.me.name);
|
||||
if(game.me.name2){
|
||||
str+='/'+get.translation(game.me.name2);
|
||||
}
|
||||
var name=[
|
||||
str,
|
||||
get.cnNumber(parseInt(get.config('player_number')))+'人'+
|
||||
get.translation(lib.config.mode)+' - '+lib.translate[game.me.identity+'2']
|
||||
];
|
||||
return name;
|
||||
},
|
||||
start:function(){
|
||||
var next=game.createEvent('game',false);
|
||||
next.content=function(){
|
||||
"step 0"
|
||||
game.prepareArena();
|
||||
game.delay();
|
||||
var playback=localStorage.getItem(lib.configprefix+'playback');
|
||||
if(playback){
|
||||
ui.create.arena();
|
||||
ui.create.me();
|
||||
ui.arena.style.display='none';
|
||||
ui.system.style.display='none';
|
||||
_status.playback=playback;
|
||||
localStorage.removeItem(lib.configprefix+'playback');
|
||||
var store=lib.db.transaction(['video'],'readwrite').objectStore('video');
|
||||
store.get(parseInt(playback)).onsuccess=function(e){
|
||||
if(e.target.result){
|
||||
game.playVideoContent(e.target.result.video);
|
||||
}
|
||||
else{
|
||||
alert('播放失败:找不到录像');
|
||||
game.reload();
|
||||
}
|
||||
}
|
||||
event.finish();
|
||||
}
|
||||
else{
|
||||
game.prepareArena();
|
||||
game.delay();
|
||||
}
|
||||
"step 1"
|
||||
if(lib.storage.test){
|
||||
_status.auto=true;
|
||||
// ui.auto.innerHTML='手动';
|
||||
ui.auto.classList.add('glow');
|
||||
}
|
||||
game.chooseCharacter();
|
||||
|
@ -54,6 +87,19 @@ mode.identity={
|
|||
}
|
||||
lib.config.ai_guess=true;
|
||||
event.trigger('gameStart');
|
||||
|
||||
var players=get.players(lib.sort.position);
|
||||
var info=[];
|
||||
for(var i=0;i<players.length;i++){
|
||||
info.push({
|
||||
name:players[i].name,
|
||||
name2:players[i].name2,
|
||||
identity:players[i].identity
|
||||
});
|
||||
}
|
||||
_status.videoInited=true,
|
||||
game.addVideo('init',null,info);
|
||||
|
||||
game.gameDraw(game.zhu);
|
||||
game.phaseLoop(game.zhu);
|
||||
}
|
||||
|
|
|
@ -17,7 +17,13 @@ mode.stone={
|
|||
player.updateActCount();
|
||||
}
|
||||
},
|
||||
updateActCount:function(used){
|
||||
updateActCount:function(used,countx,current){
|
||||
if(_status.video){
|
||||
this.actcount=countx||2;
|
||||
}
|
||||
else{
|
||||
game.addVideo('updateActCount',this,[used,this.actcount,this.getActCount()]);
|
||||
}
|
||||
for(var i=0;i<10;i++){
|
||||
if(this.actcount>this.node.actcount.childElementCount){
|
||||
ui.create.div(this.node.actcount);
|
||||
|
@ -30,7 +36,13 @@ mode.stone={
|
|||
}
|
||||
}
|
||||
if(used!==false){
|
||||
var count=this.actcount-this.getActCount();
|
||||
var count;
|
||||
if(_status.video){
|
||||
count=this.actcount-(current||0);
|
||||
}
|
||||
else{
|
||||
count=this.actcount-this.getActCount();
|
||||
}
|
||||
for(var i=0;i<this.actcount;i++){
|
||||
if(i<count){
|
||||
this.node.actcount.childNodes[i].classList.remove('lost');
|
||||
|
@ -82,6 +94,7 @@ mode.stone={
|
|||
}
|
||||
}
|
||||
this.actcharacterlist[i]=fellow;
|
||||
game.addVideo('stonePosition',null,[fellow.dataset.position,i+4+(this==game.me?0:4)]);
|
||||
fellow.dataset.position=i+4+(this==game.me?0:4);
|
||||
return this;
|
||||
},
|
||||
|
@ -121,6 +134,14 @@ mode.stone={
|
|||
}
|
||||
game.players.push(player);
|
||||
ui.arena.appendChild(player);
|
||||
|
||||
game.addVideo('stoneSwap',null,{
|
||||
name:player.name,
|
||||
name2:player.name2,
|
||||
position:player.dataset.position,
|
||||
actcount:player.actcount,
|
||||
me:true
|
||||
});
|
||||
game.swapControl(player);
|
||||
game.arrangePlayers();
|
||||
player.draw(2+game.enemy.countFellow(),false);
|
||||
|
@ -156,6 +177,13 @@ mode.stone={
|
|||
game.players.push(player);
|
||||
game.enemy=player;
|
||||
ui.arena.appendChild(player);
|
||||
|
||||
game.addVideo('stoneSwap',null,{
|
||||
name:player.name,
|
||||
name2:player.name2,
|
||||
position:player.dataset.position,
|
||||
actcount:player.actcount,
|
||||
});
|
||||
game.arrangePlayers();
|
||||
player.draw(2+game.me.countFellow(),false);
|
||||
game.resume();
|
||||
|
@ -181,6 +209,16 @@ mode.stone={
|
|||
},
|
||||
game:{
|
||||
reserveDead:true,
|
||||
getVideoName:function(){
|
||||
var str=get.translation(game.me.name);
|
||||
if(game.me.name2){
|
||||
str+='/'+get.translation(game.me.name2);
|
||||
}
|
||||
var name=[
|
||||
str,'炉石 - '+get.config('battle_number')+'人'
|
||||
];
|
||||
return name;
|
||||
},
|
||||
updateStatusCount:function(){
|
||||
_status.friendCount.innerHTML='我方兵力:'+get.cnNumber(1+_status.mylist.length/(_status.double_character?2:1),true);
|
||||
_status.enemyCount.innerHTML='敌方兵力:'+get.cnNumber(1+_status.enemylist.length/(_status.double_character?2:1),true);
|
||||
|
@ -293,9 +331,32 @@ mode.stone={
|
|||
"step 0"
|
||||
lib.init.css('layout/mode/','stone');
|
||||
game.initStone();
|
||||
game.prepareArena(2);
|
||||
|
||||
var playback=localStorage.getItem(lib.configprefix+'playback');
|
||||
if(playback){
|
||||
ui.create.arena();
|
||||
ui.create.me();
|
||||
ui.arena.style.display='none';
|
||||
ui.system.style.display='none';
|
||||
_status.playback=playback;
|
||||
localStorage.removeItem(lib.configprefix+'playback');
|
||||
var store=lib.db.transaction(['video'],'readwrite').objectStore('video');
|
||||
store.get(parseInt(playback)).onsuccess=function(e){
|
||||
if(e.target.result){
|
||||
game.playVideoContent(e.target.result.video);
|
||||
}
|
||||
else{
|
||||
alert('播放失败:找不到录像');
|
||||
game.reload();
|
||||
}
|
||||
}
|
||||
event.finish();
|
||||
}
|
||||
else{
|
||||
game.prepareArena(2);
|
||||
game.delay();
|
||||
}
|
||||
ui.arena.classList.add('stone');
|
||||
game.delay();
|
||||
"step 1"
|
||||
for(var i=0;i<game.players.length;i++){
|
||||
game.players[i].classList.add('noidentity');
|
||||
|
@ -335,6 +396,19 @@ mode.stone={
|
|||
|
||||
game.me.side=Math.random()<0.5;
|
||||
game.enemy.side=!game.me.side;
|
||||
|
||||
var players=get.players(lib.sort.position);
|
||||
var info=[];
|
||||
for(var i=0;i<players.length;i++){
|
||||
info.push({
|
||||
name:players[i].name,
|
||||
name2:players[i].name2,
|
||||
count:players[i].actcount
|
||||
});
|
||||
}
|
||||
_status.videoInited=true,
|
||||
game.addVideo('init',null,info);
|
||||
|
||||
game.gameDraw(game.me,2);
|
||||
if(game.me.side){
|
||||
game.stoneLoop(game.me);
|
||||
|
|
|
@ -1,13 +1,45 @@
|
|||
'use strict';
|
||||
mode.versus={
|
||||
game:{
|
||||
getVideoName:function(){
|
||||
var str=get.translation(game.me.name);
|
||||
if(game.me.name2){
|
||||
str+='/'+get.translation(game.me.name2);
|
||||
}
|
||||
var name=[
|
||||
str,'对决 - '+lib.storage.number+'v'+lib.storage.number
|
||||
];
|
||||
return name;
|
||||
},
|
||||
start:function(){
|
||||
var next=game.createEvent('game',false);
|
||||
next.content=function(){
|
||||
"step 0"
|
||||
var playback=localStorage.getItem(lib.configprefix+'playback');
|
||||
if(playback){
|
||||
ui.create.arena();
|
||||
ui.create.me();
|
||||
ui.arena.style.display='none';
|
||||
ui.system.style.display='none';
|
||||
_status.playback=playback;
|
||||
localStorage.removeItem(lib.configprefix+'playback');
|
||||
var store=lib.db.transaction(['video'],'readwrite').objectStore('video');
|
||||
store.get(parseInt(playback)).onsuccess=function(e){
|
||||
if(e.target.result){
|
||||
game.playVideoContent(e.target.result.video);
|
||||
}
|
||||
else{
|
||||
alert('播放失败:找不到录像');
|
||||
game.reload();
|
||||
}
|
||||
}
|
||||
event.finish();
|
||||
return;
|
||||
}
|
||||
if(lib.storage.choice==undefined) game.save('choice',20);
|
||||
if(lib.storage.zhu==undefined) game.save('zhu',true);
|
||||
if(lib.storage.noreplace_end==undefined) game.save('noreplace_end',true);
|
||||
if(lib.storage.die_stop==undefined) game.save('die_stop',true);
|
||||
if(lib.storage.autoreplaceinnerhtml==undefined) game.save('autoreplaceinnerhtml',true);
|
||||
if(lib.storage.only_zhu==undefined) game.save('only_zhu',true);
|
||||
if(lib.storage.single_control==undefined) game.save('single_control',true);
|
||||
|
@ -465,10 +497,24 @@ mode.versus={
|
|||
}
|
||||
_status.friend.splice(0,num);
|
||||
_status.enemy.splice(0,num);
|
||||
if(lib.storage.single_control&&lib.storage.control_all){
|
||||
if(lib.storage.single_control&&lib.storage.control_all&&game.players.length>=4){
|
||||
ui.fakemebg.show();
|
||||
game.onSwapControl();
|
||||
}
|
||||
|
||||
var players=get.players(lib.sort.position);
|
||||
var info=[];
|
||||
for(var i=0;i<players.length;i++){
|
||||
info.push({
|
||||
name:players[i].name,
|
||||
name2:players[i].name2,
|
||||
identity:players[i].node.identity.firstChild.innerHTML,
|
||||
color:players[i].node.identity.dataset.color
|
||||
});
|
||||
}
|
||||
_status.videoInited=true,
|
||||
info.bool=(lib.storage.single_control&&lib.storage.control_all&&game.players.length>=4);
|
||||
game.addVideo('init',null,info);
|
||||
}
|
||||
},
|
||||
versusPhaseLoop:function(player){
|
||||
|
@ -575,6 +621,7 @@ mode.versus={
|
|||
name:source.name,
|
||||
stat:source.stat
|
||||
});
|
||||
game.addVideo('reinit',source,[event.character,get.translation(source.side+'Color')]);
|
||||
source.uninit();
|
||||
source.init(event.character);
|
||||
source.node.identity.dataset.color=get.translation(source.side+'Color');
|
||||
|
@ -824,6 +871,7 @@ mode.versus={
|
|||
game.save('autoreplaceinnerhtml',this.classList.contains('on'));
|
||||
},
|
||||
onSwapControl:function(){
|
||||
game.addVideo('onSwapControl');
|
||||
var name=game.me.name;
|
||||
if(ui.fakeme&&ui.fakeme.current!=name){
|
||||
ui.fakeme.current=name;
|
||||
|
|