fix autoplay in fucking chrome66
This commit is contained in:
parent
8631f171e3
commit
fe369f23f1
|
@ -7451,12 +7451,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
});
|
});
|
||||||
'step 1'
|
'step 1'
|
||||||
if(result.control=='cancel2') return;
|
if(result.control=='cancel2') return;
|
||||||
player.logSkill('shiorimiyuki_tingxian');
|
player.logSkill('shiorimiyuki_tingxian1');
|
||||||
var num=1+result.index;
|
var num=1+result.index;
|
||||||
player.draw(num).gaintag=['shiorimiyuki_tingxian'];
|
player.draw(num).gaintag=['shiorimiyuki_tingxian'];
|
||||||
player.recover();
|
player.recover();
|
||||||
player.addTempSkill('shiorimiyuki_tingxian2');
|
player.addTempSkill('shiorimiyuki_tingxian2');
|
||||||
},
|
},
|
||||||
|
group:'shiorimiyuki_tingxian1',
|
||||||
},
|
},
|
||||||
shiorimiyuki_tingxian1:{audio:true},
|
shiorimiyuki_tingxian1:{audio:true},
|
||||||
shiorimiyuki_tingxian2:{
|
shiorimiyuki_tingxian2:{
|
||||||
|
|
|
@ -10473,16 +10473,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
player.awakenSkill('luanfeng');
|
player.awakenSkill('luanfeng');
|
||||||
trigger.player.recover(3-trigger.player.hp);
|
trigger.player.recover(3-trigger.player.hp);
|
||||||
'step 1'
|
'step 1'
|
||||||
var list=[];
|
var list=[],target=trigger.player;
|
||||||
for(var i=1;i<6;i++){
|
for(var i=1;i<6;i++){
|
||||||
for(var j=0;j<player.countDisabledSlot(i);j++){
|
for(var j=0;j<target.countDisabledSlot(i);j++){
|
||||||
list.push(i);
|
list.push(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(list.length>0) player.enableEquip(list);
|
if(list.length>0) target.enableEquip(list);
|
||||||
if(list.length<6) trigger.player.drawTo(6-list.length);
|
if(list.length<6) target.drawTo(6-list.length);
|
||||||
if(trigger.player.storage.kotarou_rewrite) trigger.player.storage.kotarou_rewrite=[];
|
if(target.storage.kotarou_rewrite) target.storage.kotarou_rewrite=[];
|
||||||
if(player==trigger.player) player.storage.youlong2=[];
|
if(player==target) player.storage.youlong2=[];
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
//曹爽,韩遂,何进
|
//曹爽,韩遂,何进
|
||||||
|
|
|
@ -47361,6 +47361,10 @@
|
||||||
ui.backgroundMusic.autoplay=true;
|
ui.backgroundMusic.autoplay=true;
|
||||||
ui.backgroundMusic.addEventListener('ended',game.playBackgroundMusic);
|
ui.backgroundMusic.addEventListener('ended',game.playBackgroundMusic);
|
||||||
ui.window.appendChild(ui.backgroundMusic);
|
ui.window.appendChild(ui.backgroundMusic);
|
||||||
|
ui.window.addEventListener(lib.config.touchscreen?'touchend':'click', function playMusic() {
|
||||||
|
ui.window.removeEventListener(lib.config.touchscreen?'touchend':'click', playMusic, false);
|
||||||
|
if(!ui.backgroundMusic.played.length) ui.backgroundMusic.play();
|
||||||
|
}, false);
|
||||||
if(lib.config.cursor_style=='pointer'){
|
if(lib.config.cursor_style=='pointer'){
|
||||||
ui.window.classList.add('nopointer');
|
ui.window.classList.add('nopointer');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue