This commit is contained in:
libccy 2015-12-08 21:54:44 +08:00
parent ada03e728a
commit 7cdf88b1e8
35 changed files with 375 additions and 279 deletions

View File

@ -58,7 +58,6 @@ card.extra={
target:function(player,target){ target:function(player,target){
if(target&&target==_status.dying) return 2; if(target&&target==_status.dying) return 2;
var shas=target.get('h','sha'); var shas=target.get('h','sha');
var ok=false;
if(player.num('h','sha')>1){ if(player.num('h','sha')>1){
if(player.num('e','zhuge')) return 0; if(player.num('e','zhuge')) return 0;
if(player.skills.contains('paoxiao')) return 0; if(player.skills.contains('paoxiao')) return 0;
@ -68,15 +67,15 @@ card.extra={
if(player.skills.contains('zhaxiang2')) return 0; if(player.skills.contains('zhaxiang2')) return 0;
} }
} }
var card;
if(shas.length){ if(shas.length){
for(var i=0;i<shas.length;i++){ for(var i=0;i<shas.length;i++){
if(lib.filter.filterCard(shas[i],target)){ if(lib.filter.filterCard(shas[i],target)){
ok=true;break; card=shas[i];break;
} }
} }
} }
if(ok){ if(card){
var card=target.get('h','sha',0);
for(var i=0;i<game.players.length;i++){ for(var i=0;i<game.players.length;i++){
if(ai.get.attitude(target,game.players[i])<0&& if(ai.get.attitude(target,game.players[i])<0&&
target.canUse(card,game.players[i],true,true)&& target.canUse(card,game.players[i],true,true)&&
@ -118,7 +117,7 @@ card.extra={
event.videoId=lib.status.videoId++; event.videoId=lib.status.videoId++;
game.addVideo('cardDialog',null,[get.translation(target.name)+'展示的手牌',get.cardsInfo(result.cards),event.videoId]); game.addVideo('cardDialog',null,[get.translation(target.name)+'展示的手牌',get.cardsInfo(result.cards),event.videoId]);
event.card2=result.cards[0]; event.card2=result.cards[0];
game.log(get.translation(target.name)+'展示了'+get.translation(event.card2)); game.log(target,'展示了',event.card2);
player.chooseToDiscard(function(card){ player.chooseToDiscard(function(card){
return get.suit(card)==get.suit(_status.event.parent.card2); return get.suit(card)==get.suit(_status.event.parent.card2);
},function(card){ },function(card){
@ -151,7 +150,7 @@ card.extra={
player:function(player){ player:function(player){
var nh=player.num('h'); var nh=player.num('h');
if(nh<=player.hp&&nh<=4&&_status.event.name=='chooseToUse'){ if(nh<=player.hp&&nh<=4&&_status.event.name=='chooseToUse'){
if(_status.event.filterCard&& if(typeof _status.event.filterCard=='function'&&
_status.event.filterCard({name:'huogong'})){ _status.event.filterCard({name:'huogong'})){
return -10; return -10;
} }
@ -167,7 +166,7 @@ card.extra={
if(target.skills.contains('huogong2')||target.num('h')==0) return 0; if(target.skills.contains('huogong2')||target.num('h')==0) return 0;
if(player.num('h')<=1) return 0; if(player.num('h')<=1) return 0;
if(target==player){ if(target==player){
if(_status.event.filterCard&& if(typeof _status.event.filterCard=='function'&&
_status.event.filterCard({name:'huogong'})){ _status.event.filterCard({name:'huogong'})){
return -1.5; return -1.5;
} }

View File

@ -182,7 +182,7 @@ card.hearth={
event.card2=result.cards[0]; event.card2=result.cards[0];
event.videoId=lib.status.videoId++; event.videoId=lib.status.videoId++;
game.addVideo('cardDialog',null,[get.translation(target.name)+'展示的手牌',get.cardsInfo(result.cards),event.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)); game.log(target,'展示了',event.card2);
player.chooseToDiscard(function(card){ player.chooseToDiscard(function(card){
return get.suit(card)==get.suit(_status.event.parent.card2); return get.suit(card)==get.suit(_status.event.parent.card2);
},function(card){ },function(card){
@ -215,7 +215,7 @@ card.hearth={
player:function(player){ player:function(player){
var nh=player.num('h'); var nh=player.num('h');
if(nh<=player.hp&&nh<=4&&_status.event.name=='chooseToUse'){ if(nh<=player.hp&&nh<=4&&_status.event.name=='chooseToUse'){
if(_status.event.filterCard&& if(typeof _status.event.filterCard=='function'&&
_status.event.filterCard({name:'shandianjian'})){ _status.event.filterCard({name:'shandianjian'})){
return -10; return -10;
} }
@ -231,7 +231,7 @@ card.hearth={
if(target.skills.contains('shandianjian2')||target.num('h')==0) return 0; if(target.skills.contains('shandianjian2')||target.num('h')==0) return 0;
if(player.num('h')<=1) return 0; if(player.num('h')<=1) return 0;
if(target==player){ if(target==player){
if(_status.event.filterCard&& if(typeof _status.event.filterCard=='function'&&
_status.event.filterCard({name:'shandianjian'})){ _status.event.filterCard({name:'shandianjian'})){
return -1.5; return -1.5;
} }

View File

@ -45,6 +45,13 @@ card.refresh={
ui.special.appendChild(cards[i]); ui.special.appendChild(cards[i]);
} }
var muniu=player.get('e','5'); var muniu=player.get('e','5');
if(!muniu){
for(var i=0;i<cards.length;i++){
ui.discardPile.appendChild(cards[i]);
}
event.finish();
return;
}
if(muniu.cards==undefined) muniu.cards=[]; if(muniu.cards==undefined) muniu.cards=[];
muniu.cards.push(cards[0]); muniu.cards.push(cards[0]);
var players=[]; var players=[];
@ -228,11 +235,7 @@ card.refresh={
if(card.cards&&card.cards.length){ if(card.cards&&card.cards.length){
player.$throw(card.cards,1000); player.$throw(card.cards,1000);
player.popup('muniu'); player.popup('muniu');
var str='木牛流马掉落了'+get.translation(card.cards[0]); game.log('木牛流马掉落了',card.cards);
for(var j=1;j<card.cards.length;j++){
str+='、'+get.translation(card.cards[j]);
}
game.log(str);
while(card.cards.length){ while(card.cards.length){
card2=card.cards.shift(); card2=card.cards.shift();
if(card2.parentNode.id=='special'){ if(card2.parentNode.id=='special'){

View File

@ -148,7 +148,7 @@ card.shenqi={
if(result.bool){ if(result.bool){
var type=[]; var type=[];
player.$throw(result.links); player.$throw(result.links);
game.log(get.translation(player)+'弃置了'+get.translation(result.links)); game.log(player,'弃置了',result.links);
for(var i=0;i<result.links.length;i++){ for(var i=0;i<result.links.length;i++){
event.hu.storage.shouna.remove(result.links[i]); event.hu.storage.shouna.remove(result.links[i]);
ui.discardPile.appendChild(result.links[i]); ui.discardPile.appendChild(result.links[i]);
@ -204,7 +204,7 @@ card.shenqi={
hu.storage.shouna.push(cards[i]); hu.storage.shouna.push(cards[i]);
ui.special.appendChild(cards[i]); ui.special.appendChild(cards[i]);
} }
game.log(get.translation(player)+'将'+get.translation(cards)+'收入炼妖壶'); game.log(player,'将',cards,'收入炼妖壶');
} }
}, },
}, },
@ -340,7 +340,7 @@ card.shenqi={
"step 2" "step 2"
if(event.success){ if(event.success){
player.popup('收化成功'); player.popup('收化成功');
game.log(get.translation(player)+'将'+get.translation(target)+'收化'); game.log(player,'将',target,'收化');
target.dataset.position=event.position; target.dataset.position=event.position;
var card=player.get('e','5'); var card=player.get('e','5');
if(!card.storage.shouhua) card.storage.shouhua=[]; if(!card.storage.shouhua) card.storage.shouhua=[];
@ -397,8 +397,7 @@ card.shenqi={
trigger.result.bool=false; trigger.result.bool=false;
trigger.player.popup('杯具'); trigger.player.popup('杯具');
} }
game.log(get.translation(trigger.player)+'的判定结果为'+get.translation(card)+ game.log(trigger.player,'的判定结果为',card);
'('+get.translation(get.suit(card))+get.number(card)+')');
trigger.direct=true; trigger.direct=true;
trigger.position.appendChild(card); trigger.position.appendChild(card);
game.delay(2); game.delay(2);

View File

@ -117,7 +117,12 @@ card.standard={
result:{ result:{
target:function(player,target){ target:function(player,target){
if(player.skills.contains('jiu')&&!target.num('e','baiyin')){ if(player.skills.contains('jiu')&&!target.num('e','baiyin')){
return -3; if(ai.get.attitude(player,target)>0){
return -6;
}
else{
return -3;
}
} }
return -1.5; return -1.5;
}, },
@ -480,7 +485,7 @@ card.standard={
dialog.content.firstChild.innerHTML= dialog.content.firstChild.innerHTML=
get.translation(target)+'选择了'+get.translation(button.link); get.translation(target)+'选择了'+get.translation(button.link);
game.addVideo('dialogCapt',null,[dialog.videoId,dialog.content.firstChild.innerHTML]); game.addVideo('dialogCapt',null,[dialog.videoId,dialog.content.firstChild.innerHTML]);
game.log(get.translation(target)+'选择了'+get.translation(button.link)); game.log(target,'选择了',button.link);
game.delay(); game.delay();
}, },
contentAfter:function(){ contentAfter:function(){

View File

@ -319,8 +319,8 @@ card.yibao={
player.$compare(event.card1,target,event.card2); player.$compare(event.card1,target,event.card2);
game.delay(4); game.delay(4);
"step 3" "step 3"
game.log(get.translation(player)+'展示了'+get.translation(event.card1)); game.log(player,'展示了',event.card1);
game.log(get.translation(target)+'展示了'+get.translation(event.card2)); game.log(target,'展示了',event.card2);
if(get.color(event.card2)==get.color(event.card1)){ if(get.color(event.card2)==get.color(event.card1)){
player.discard(event.card1).animate=false; player.discard(event.card1).animate=false;
target.$gain2(event.card2); target.$gain2(event.card2);
@ -350,7 +350,8 @@ card.yibao={
result:{ result:{
player:function(player,target){ player:function(player,target){
if(player.num('h')<=Math.max(2,player.hp)&&_status.event.name=='chooseToUse'){ if(player.num('h')<=Math.max(2,player.hp)&&_status.event.name=='chooseToUse'){
if(_status.event.filterCard({name:'dujian'})){ if(typeof _status.event.filterCard=='function'&&
_status.event.filterCard({name:'dujian'})){
return -10; return -10;
} }
if(_status.event.skill){ if(_status.event.skill){

View File

@ -116,7 +116,7 @@ card.zhenfa={
content:function(){ content:function(){
target.addTempSkill('feiying',{player:'damageAfter'}); target.addTempSkill('feiying',{player:'damageAfter'});
target.popup('feiying'); target.popup('feiying');
game.log(get.translation(target)+'获得了技能飞影'); game.log(target,'获得了技能','【飞影】');
}, },
mode:['guozhan'], mode:['guozhan'],
ai:{ ai:{
@ -137,7 +137,7 @@ card.zhenfa={
content:function(){ content:function(){
target.addTempSkill('wushuang',{source:'damageAfter'}); target.addTempSkill('wushuang',{source:'damageAfter'});
target.popup('wushuang'); target.popup('wushuang');
game.log(get.translation(target)+'获得了技能无双'); game.log(target,'获得了技能','【无双】');
}, },
mode:['guozhan'], mode:['guozhan'],
ai:{ ai:{

View File

@ -642,7 +642,7 @@ character.boss={
content:function(){ content:function(){
var cards=get.cards(); var cards=get.cards();
player.gain(cards,'gain2'); player.gain(cards,'gain2');
game.log(get.translation(player)+'获得了'+get.translation(cards)); game.log(player,'获得了',cards);
}, },
ai:{ ai:{
threaten:1.4 threaten:1.4

View File

@ -250,7 +250,7 @@ character.extra={
ui.discardPile.appendChild(trigger.player.judging); ui.discardPile.appendChild(trigger.player.judging);
trigger.player.judging=result.cards[0]; trigger.player.judging=result.cards[0];
trigger.position.appendChild(result.cards[0]); trigger.position.appendChild(result.cards[0]);
game.log(get.translation(trigger.player)+'的判定牌改为'+get.translation(result.cards[0])); game.log(trigger.player,'的判定牌改为',result.cards[0]);
game.delay(2); game.delay(2);
} }
}, },
@ -623,7 +623,7 @@ character.extra={
result.targets[i].popup('dawu'); result.targets[i].popup('dawu');
} }
player.logSkill('dawu',result.targets,'thunder'); player.logSkill('dawu',result.targets,'thunder');
game.log(get.translation(player)+'对'+get.translation(result.targets)+'发动了大雾') game.log(player,'对',result.targets,'发动了大雾')
player.chooseCardButton('弃置'+get.cnNumber(length)+'枚星',length,player.storage.qixing,true); player.chooseCardButton('弃置'+get.cnNumber(length)+'枚星',length,player.storage.qixing,true);
} }
else{ else{
@ -1044,7 +1044,7 @@ character.extra={
if(event.insert){ if(event.insert){
event.card.fix(); event.card.fix();
ui.cardPile.insertBefore(event.card,ui.cardPile.firstChild); ui.cardPile.insertBefore(event.card,ui.cardPile.firstChild);
game.log(get.translation(player)+'将'+get.translation(event.card)+'置于牌堆顶'); game.log(player,'将',event.card,'置于牌堆顶');
game.delay(2); game.delay(2);
} }
"step 3" "step 3"

View File

@ -49,7 +49,7 @@ character.gujian={
if(list.length){ if(list.length){
event.target=list.randomGet(); event.target=list.randomGet();
event.target.popup('zuizhan'); event.target.popup('zuizhan');
game.log(get.translation(event.target)+'被追加为额外目标'); game.log(event.target,'被追加为额外目标');
trigger.targets.push(event.target); trigger.targets.push(event.target);
player.draw(); player.draw();
} }

View File

@ -493,7 +493,7 @@ character.hearth={
}); });
if(card){ if(card){
player.gain(card,'gain2'); player.gain(card,'gain2');
game.log(get.translation(player)+'获得了'+get.translation(card)); game.log(player,'获得了',card);
} }
}, },
ai:{ ai:{
@ -990,7 +990,7 @@ character.hearth={
player.lose(result.cards); player.lose(result.cards);
event.cards=result.cards; event.cards=result.cards;
player.logSkill('bianxing',trigger.player); player.logSkill('bianxing',trigger.player);
game.log(get.translation(player)+'将'+get.translation(trigger.card.name)+'变为'+get.translation(result.cards)); game.log(player,'将',trigger.card,'变为',result.cards);
game.delay(0.5); game.delay(0.5);
trigger.untrigger(); trigger.untrigger();
trigger.card=card; trigger.card=card;
@ -1184,7 +1184,7 @@ character.hearth={
player.judging=player.storage.mdzhoufu2; player.judging=player.storage.mdzhoufu2;
trigger.position.appendChild(player.storage.mdzhoufu2); trigger.position.appendChild(player.storage.mdzhoufu2);
// trigger.untrigger(); // trigger.untrigger();
game.log(get.translation(player)+'的判定牌改为'+get.translation(player.storage.mdzhoufu2)); game.log(player,'的判定牌改为',player.storage.mdzhoufu2);
player.removeSkill('mdzhoufu2'); player.removeSkill('mdzhoufu2');
delete player.storage.mdzhoufu2; delete player.storage.mdzhoufu2;
delete player.storage.mdzhoufu3; delete player.storage.mdzhoufu3;
@ -1250,7 +1250,7 @@ character.hearth={
var card=ui.cardPile.firstChild; var card=ui.cardPile.firstChild;
ui.cardPile.removeChild(card); ui.cardPile.removeChild(card);
ui.cardPile.insertBefore(card,ui.cardPile.firstChild.nextSibling); ui.cardPile.insertBefore(card,ui.cardPile.firstChild.nextSibling);
game.log(get.translation(player)+'调换了牌堆顶两张牌的顺序'); game.log(player,'调换了牌堆顶两张牌的顺序');
} }
}, },
ai:{ ai:{
@ -1352,7 +1352,7 @@ character.hearth={
} }
"step 1" "step 1"
if(result.bool){ if(result.bool){
game.log(get.translation(trigger.player)+'收回了'+get.translation(trigger.cards)); game.log(trigger.player,'收回了',trigger.cards);
trigger.untrigger(); trigger.untrigger();
trigger.finish(); trigger.finish();
game.delay(); game.delay();

View File

@ -790,12 +790,12 @@ character.mountain={
player.logSkill('guzheng',trigger.player); player.logSkill('guzheng',trigger.player);
trigger.player.gain(result.buttons[0].link); trigger.player.gain(result.buttons[0].link);
trigger.player.$gain2(result.buttons[0].link); trigger.player.$gain2(result.buttons[0].link);
game.log(get.translation(trigger.player)+'收回了'+get.translation(result.buttons[0].link)); game.log(trigger.player,'收回了',result.buttons[0].link);
event.cards.remove(result.buttons[0].link); event.cards.remove(result.buttons[0].link);
if(event.cards.length){ if(event.cards.length){
player.gain(event.cards); player.gain(event.cards);
player.$gain2(event.cards); player.$gain2(event.cards);
game.log(get.translation(player)+'收回了'+get.translation(event.cards)); game.log(player,'收回了',event.cards);
} }
game.delay(); game.delay();
} }
@ -893,7 +893,7 @@ character.mountain={
} }
player.storage.huashen.owned[name]=skills; player.storage.huashen.owned[name]=skills;
player.popup(name); player.popup(name);
game.log(get.translation(player)+'获得了一个化身'); game.log(player,'获得了一个化身');
} }
} }
} }
@ -1025,7 +1025,7 @@ character.mountain={
player.additionalSkills.huashen=link; player.additionalSkills.huashen=link;
player.logSkill('huashen2'); player.logSkill('huashen2');
game.log(get.translation(player)+'获得技能'+get.translation(link)); game.log(player,'获得技能','【'+get.translation(link)+'】');
player.popup(link); player.popup(link);
for(var i=0;i<event.dialog.buttons.length;i++){ for(var i=0;i<event.dialog.buttons.length;i++){

View File

@ -78,7 +78,7 @@ character.refresh={
"step 0" "step 0"
var cards=get.cards(); var cards=get.cards();
player.gain(cards,'gain2'); player.gain(cards,'gain2');
game.log(get.translation(player)+'获得了'+get.translation(cards)); game.log(player,'获得了',cards);
if(get.type(cards[0])!='basic'){ if(get.type(cards[0])!='basic'){
event.finish(); event.finish();
} }
@ -155,7 +155,7 @@ character.refresh={
ui.discardPile.appendChild(trigger.player.judging); ui.discardPile.appendChild(trigger.player.judging);
trigger.player.judging=result.cards[0]; trigger.player.judging=result.cards[0];
trigger.position.appendChild(result.cards[0]); trigger.position.appendChild(result.cards[0]);
game.log(get.translation(trigger.player)+'的判定牌改为'+get.translation(result.cards[0])); game.log(trigger.player,'的判定牌改为',result.cards[0]);
game.delay(2); game.delay(2);
} }
}, },
@ -576,11 +576,11 @@ character.refresh={
"step 1" "step 1"
if(event.disbool){ if(event.disbool){
if(!result.bool){ if(!result.bool){
game.log(get.translation(player)+'展示了'+get.translation(event.card)); game.log(player,'展示了',event.card);
ui.cardPile.insertBefore(event.card,ui.cardPile.firstChild); ui.cardPile.insertBefore(event.card,ui.cardPile.firstChild);
} }
else{ else{
game.log(get.translation(player)+'展示并弃掉了'+get.translation(event.card)); game.log(player,'展示并弃掉了',event.card);
ui.discardPile.appendChild(event.card); ui.discardPile.appendChild(event.card);
} }
game.addVideo('deletenode',player,[get.cardInfo(event.node)]); game.addVideo('deletenode',player,[get.cardInfo(event.node)]);
@ -588,11 +588,11 @@ character.refresh={
else if(result.targets){ else if(result.targets){
result.targets[0].gain(event.card); result.targets[0].gain(event.card);
event.node.moveDelete(result.targets[0]); event.node.moveDelete(result.targets[0]);
game.log(get.translation(result.targets[0])+'获得了'+get.translation(event.card)); game.log(result.targets[0],'获得了',event.card);
game.addVideo('gain2',result.targets[0],[get.cardInfo(event.node)]); game.addVideo('gain2',result.targets[0],[get.cardInfo(event.node)]);
} }
else{ else{
game.log(get.translation(player)+'展示并弃掉了'+get.translation(event.card)); game.log(player,'展示并弃掉了',event.card);
ui.discardPile.appendChild(event.card); ui.discardPile.appendChild(event.card);
game.addVideo('deletenode',player,[get.cardInfo(event.node)]); game.addVideo('deletenode',player,[get.cardInfo(event.node)]);
event.node.delete(); event.node.delete();
@ -1249,7 +1249,7 @@ character.refresh={
re_daqiao:'界大乔', re_daqiao:'界大乔',
re_ganning:'界甘宁', re_ganning:'界甘宁',
re_huatuo:'界华佗', re_huatuo:'界华佗',
re_lidian:'李典', re_lidian:'李典',
qinxue:'勤学', qinxue:'勤学',
retuxi:'突袭·新', retuxi:'突袭·新',
reluoyi:'裸衣·新', reluoyi:'裸衣·新',

View File

@ -413,7 +413,7 @@ character.sp={
ui.discardPile.appendChild(trigger.player.judging); ui.discardPile.appendChild(trigger.player.judging);
trigger.player.judging=event.card; trigger.player.judging=event.card;
trigger.position.appendChild(event.card); trigger.position.appendChild(event.card);
game.log(get.translation(trigger.player)+'的判定牌改为'+get.translation(event.card)); game.log(trigger.player,'的判定牌改为',event.card);
event.card.expired=true; event.card.expired=true;
game.delay(2); game.delay(2);
} }
@ -900,7 +900,7 @@ character.sp={
} }
"step 2" "step 2"
if(result.bool){ if(result.bool){
game.log(get.translation(player)+'获得了'+get.translation(event.cards)); game.log(player,'获得了',event.cards);
player.gain(event.cards,'gain2'); player.gain(event.cards,'gain2');
} }
}, },
@ -1182,7 +1182,7 @@ character.sp={
player.judging=player.storage.zhoufu2; player.judging=player.storage.zhoufu2;
trigger.position.appendChild(player.storage.zhoufu2); trigger.position.appendChild(player.storage.zhoufu2);
// trigger.untrigger(); // trigger.untrigger();
game.log(get.translation(player)+'的判定牌改为'+get.translation(player.storage.zhoufu2)); game.log(player,'的判定牌改为',player.storage.zhoufu2);
player.removeSkill('zhoufu2'); player.removeSkill('zhoufu2');
delete player.storage.zhoufu2; delete player.storage.zhoufu2;
delete player.storage.zhoufu3; delete player.storage.zhoufu3;
@ -2382,7 +2382,7 @@ character.sp={
} }
"step 1" "step 1"
if(result.bool){ if(result.bool){
game.log(get.translation(player)+'傲才发动成功'); game.log(player,'傲才发动成功');
trigger.untrigger(); trigger.untrigger();
trigger.responded=true; trigger.responded=true;
result.buttons[0].link.remove(); result.buttons[0].link.remove();
@ -2429,7 +2429,7 @@ character.sp={
player.popup('aocai'); player.popup('aocai');
"step 1" "step 1"
if(result.bool){ if(result.bool){
game.log(get.translation(player)+'发动了傲才') game.log(player,'发动了傲才')
lib.skill.aocai3.viewAs=result.buttons[0].link; lib.skill.aocai3.viewAs=result.buttons[0].link;
event.parent.parent.backup('aocai3'); event.parent.parent.backup('aocai3');
event.parent.parent.step=0; event.parent.parent.step=0;
@ -2761,7 +2761,7 @@ character.sp={
} }
else{ else{
ui.discardPile.appendChild(player.storage.bifa[0]); ui.discardPile.appendChild(player.storage.bifa[0]);
game.log(get.translation(player.storage.bifa[0])+'进入弃牌堆'); game.log(player.storage.bifa[0],'进入弃牌堆');
player.$throw(player.storage.bifa[0]); player.$throw(player.storage.bifa[0]);
player.loseHp(); player.loseHp();
} }

View File

@ -177,7 +177,7 @@ character.standard={
ui.discardPile.appendChild(trigger.player.judging); ui.discardPile.appendChild(trigger.player.judging);
trigger.player.judging=result.cards[0]; trigger.player.judging=result.cards[0];
trigger.position.appendChild(result.cards[0]); trigger.position.appendChild(result.cards[0]);
game.log(get.translation(trigger.player)+'的判定牌改为'+get.translation(result.cards[0])); game.log(trigger.player,'的判定牌改为',result.cards[0]);
game.delay(2); game.delay(2);
} }
}, },
@ -693,7 +693,7 @@ character.standard={
} }
event.dialog.close(); event.dialog.close();
event.control.close(); event.control.close();
game.log(get.translation(player)+'将'+get.cnNumber(event.top.length)+'张牌置于牌堆顶'); game.log(player,'将'+get.cnNumber(event.top.length)+'张牌置于牌堆顶');
ui.auto.show(); ui.auto.show();
game.resume(); game.resume();
} }
@ -775,7 +775,7 @@ character.standard={
ui.cardPile.appendChild(bottom[i]); ui.cardPile.appendChild(bottom[i]);
} }
player.popup(get.cnNumber(top.length)+'上'+get.cnNumber(bottom.length)+'下'); player.popup(get.cnNumber(top.length)+'上'+get.cnNumber(bottom.length)+'下');
game.log(get.translation(player)+'将'+get.cnNumber(top.length)+'张牌置于牌堆顶'); game.log(player,'将'+get.cnNumber(top.length)+'张牌置于牌堆顶');
game.delay(2); game.delay(2);
} }
}, },

View File

@ -417,7 +417,7 @@ character.swd={
player.logSkill('guozao',target); player.logSkill('guozao',target);
var cards=target.get('h'); var cards=target.get('h');
target.lose(cards)._triggered=null; target.lose(cards)._triggered=null;
game.log(get.translation(target)+'弃置了'+get.translation(cards)+',并获得三张牌'); game.log(target,'弃置了',cards,',并获得三张牌');
// target.$draw(3); // target.$draw(3);
target.$throw(cards); target.$throw(cards);
target.gain(event.cards,'draw')._triggered=null; target.gain(event.cards,'draw')._triggered=null;
@ -962,7 +962,7 @@ character.swd={
"step 1" "step 1"
if(result.bool){ if(result.bool){
player.logSkill('zhenwei'); player.logSkill('zhenwei');
game.log(get.translation(result.targets[0])+'获得了'+get.translation(event.cards)); game.log(result.targets[0],'获得了',event.cards);
result.targets[0].gain(event.cards,'gain2'); result.targets[0].gain(event.cards,'gain2');
} }
}, },
@ -3100,7 +3100,7 @@ character.swd={
player.gain(trigger.player.judging); player.gain(trigger.player.judging);
trigger.player.judging=result.cards[0]; trigger.player.judging=result.cards[0];
trigger.position.appendChild(result.cards[0]); trigger.position.appendChild(result.cards[0]);
game.log(get.translation(trigger.player)+'的判定牌改为'+get.translation(result.cards[0])); game.log(trigger.player,'的判定牌改为',result.cards[0]);
} }
"step 3" "step 3"
game.delay(2); game.delay(2);
@ -4194,7 +4194,7 @@ character.swd={
var cards=player.storage.yishan.splice(0,2); var cards=player.storage.yishan.splice(0,2);
player.gain(cards); player.gain(cards);
player.$gain2(cards); player.$gain2(cards);
game.log(get.translation(player)+'获得了'+get.translation(cards)); game.log(player,'获得了',cards);
}, },
ai:{ ai:{
maixie:true, maixie:true,
@ -5326,7 +5326,7 @@ character.swd={
var cards=get.cards(1); var cards=get.cards(1);
event.card=cards[0]; event.card=cards[0];
player.gain(cards,'gain2'); player.gain(cards,'gain2');
game.log(get.translation(player)+'获得了'+get.translation(event.card)); game.log(player,'获得了',event.card);
"step 1" "step 1"
var gained=event.card; var gained=event.card;
if(lib.filter.filterCard(gained)){ if(lib.filter.filterCard(gained)){
@ -5841,7 +5841,11 @@ character.swd={
order:1, order:1,
result:{ result:{
target:function(player,target){ target:function(player,target){
return ai.get.damageEffect(target,player,target,'fire'); var eff=ai.get.damageEffect(target,player,target,'fire');
if(player==target&&player.hp<=1&&eff<0){
eff*10;
}
return eff;
} }
} }
} }
@ -6331,7 +6335,7 @@ character.swd={
ui.discardPile.appendChild(trigger.player.judging); ui.discardPile.appendChild(trigger.player.judging);
trigger.player.judging=event.card; trigger.player.judging=event.card;
trigger.position.appendChild(event.card); trigger.position.appendChild(event.card);
game.log(get.translation(trigger.player)+'的判定牌改为'+get.translation(event.card)); game.log(trigger.player,'的判定牌改为',event.card);
event.card.expired=true; event.card.expired=true;
game.delay(2); game.delay(2);
} }
@ -6855,7 +6859,7 @@ character.swd={
else if(trigger.cards&&trigger.cards.length){ else if(trigger.cards&&trigger.cards.length){
player.gain(trigger.cards); player.gain(trigger.cards);
player.$gain2(trigger.cards); player.$gain2(trigger.cards);
game.log(get.translation(player)+'收回了'+get.translation(trigger.cards)); game.log(player,'收回了',trigger.cards);
} }
} }
}, },
@ -7562,7 +7566,7 @@ character.swd={
content:function(){ content:function(){
player.recover(); player.recover();
player.gain(player.storage.zhenjiu2,'gain2'); player.gain(player.storage.zhenjiu2,'gain2');
game.log(get.translation(player)+'获得了'+get.translation(player.storage.zhenjiu2)); game.log(player,'获得了',player.storage.zhenjiu2);
player.removeSkill('zhenjiu2'); player.removeSkill('zhenjiu2');
delete player.storage.zhenjiu2; delete player.storage.zhenjiu2;
}, },
@ -7627,7 +7631,7 @@ character.swd={
popup:false, popup:false,
content:function(){ content:function(){
player.gain(player.storage.mazui2,'gain2'); player.gain(player.storage.mazui2,'gain2');
game.log(get.translation(player)+'获得了'+get.translation(player.storage.mazui2)); game.log(player,'获得了',player.storage.mazui2);
player.removeSkill('mazui3'); player.removeSkill('mazui3');
delete player.storage.mazui2; delete player.storage.mazui2;
} }

View File

@ -294,12 +294,8 @@ character.wind={
if(player.storage.buqu==undefined) player.storage.buqu=[]; if(player.storage.buqu==undefined) player.storage.buqu=[];
player.storage.buqu.push(event.card); player.storage.buqu.push(event.card);
game.addVideo('storage',player,['buqu',get.cardsInfo(player.storage.buqu),'cards']); 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,'不屈') player.showCards(player.storage.buqu,'不屈')
game.log(str); game.log(player,'的不屈牌为',player.storage.buqu);
player.markSkill('buqu'); player.markSkill('buqu');
"step 1" "step 1"
for(var i=0;i<player.storage.buqu.length-1;i++){ for(var i=0;i<player.storage.buqu.length-1;i++){
@ -439,7 +435,7 @@ character.wind={
player.gain(trigger.player.judging); player.gain(trigger.player.judging);
trigger.player.judging=result.cards[0]; trigger.player.judging=result.cards[0];
trigger.position.appendChild(result.cards[0]); trigger.position.appendChild(result.cards[0]);
game.log(get.translation(trigger.player)+'的判定牌改为'+get.translation(result.cards[0])); game.log(trigger.player,'的判定牌改为',result.cards[0]);
} }
"step 3" "step 3"
game.delay(2); game.delay(2);

View File

@ -166,14 +166,7 @@ character.woods={
"step 0" "step 0"
player.gain(trigger.playerCards); player.gain(trigger.playerCards);
player.$draw(trigger.playerCards); player.$draw(trigger.playerCards);
//trigger.player.$give(trigger.cards,player);
game.delay(); game.delay();
// var card=trigger.cards;
// var str=get.translation(player)+'获得了'+get.translation(card[0]);
// for(var i=1;i<card.length;i++){
// str+='、'+get.translation(card[i]);
// }
// game.log(str);
"step 1" "step 1"
for(var i=0;i<trigger.playerCards.length;i++){ for(var i=0;i<trigger.playerCards.length;i++){
trigger.cards.remove(trigger.playerCards[i]); trigger.cards.remove(trigger.playerCards[i]);

View File

@ -560,7 +560,7 @@ character.xianjian={
var card=cards.randomGet(); var card=cards.randomGet();
player.gain(card); player.gain(card);
player.$gain2(card); player.$gain2(card);
game.log(get.translation(player)+'获得了'+get.translation(card)); game.log(player,'获得了',card);
player.addTempSkill('jubao2','phaseAfter'); player.addTempSkill('jubao2','phaseAfter');
} }
}, },
@ -951,7 +951,7 @@ character.xianjian={
if(cards.length){ if(cards.length){
player.gain(cards,'draw'); player.gain(cards,'draw');
player.logSkill('longxi'); player.logSkill('longxi');
game.log(get.translation(player)+'获得了'+get.cnNumber(cards.length)+'张牌'); game.log(player,'获得了'+get.cnNumber(cards.length)+'张牌');
} }
}, },
ai:{ ai:{
@ -1173,7 +1173,7 @@ character.xianjian={
ui.discardPile.appendChild(player.storage.zhimeng2); ui.discardPile.appendChild(player.storage.zhimeng2);
} }
else{ else{
game.log(get.translation(player)+'发动织梦,获得了'+get.translation(player.storage.zhimeng2)); game.log(player,'发动织梦,获得了',player.storage.zhimeng2);
player.gain(player.storage.zhimeng2,'gain2'); player.gain(player.storage.zhimeng2,'gain2');
player.popup('zhimeng'); player.popup('zhimeng');
} }

View File

@ -507,7 +507,7 @@ character.yijiang={
}, },
content:function(){ content:function(){
var card=get.cards()[0]; var card=get.cards()[0];
game.log(get.translation(player)+'将'+get.translation(card)+'置于武将牌上'); game.log(player,'将',card,'置于武将牌上');
player.$gain2(card); player.$gain2(card);
player.storage.sidi.add(card); player.storage.sidi.add(card);
player.markSkill('sidi'); player.markSkill('sidi');
@ -567,7 +567,7 @@ character.yijiang={
if(button){ if(button){
player.$throw([button]); player.$throw([button]);
player.line(trigger.player,'green'); player.line(trigger.player,'green');
game.log(get.translation(player)+'将'+get.translation(button)+'置于弃牌堆'); game.log(player,'将',button,'置于弃牌堆');
ui.discardPile.appendChild(button); ui.discardPile.appendChild(button);
trigger.player.addTempSkill('sidi3','phaseAfter'); trigger.player.addTempSkill('sidi3','phaseAfter');
player.storage.sidi.remove(button); player.storage.sidi.remove(button);
@ -1128,8 +1128,8 @@ character.yijiang={
player.$compare(event.card1,target,event.card2); player.$compare(event.card1,target,event.card2);
game.delay(4); game.delay(4);
"step 3" "step 3"
game.log(get.translation(player)+'展示了'+get.translation(event.card1)); game.log(player,'展示了',event.card1);
game.log(get.translation(target)+'展示了'+get.translation(event.card2)); game.log(target,'展示了',event.card2);
var name1=event.card1.name; var name1=event.card1.name;
if(player.hp==1&&name1=='shan'){ if(player.hp==1&&name1=='shan'){
name1='sha'; name1='sha';
@ -1517,7 +1517,7 @@ character.yijiang={
return 6-ai.get.value(card); return 6-ai.get.value(card);
}, },
content:function(){ content:function(){
game.log(get.translation(player)+'将'+get.translation(cards)+'置于牌堆顶'); game.log(player,'将',cards,'置于牌堆顶');
ui.cardPile.insertBefore(cards[0],ui.cardPile.firstChild); ui.cardPile.insertBefore(cards[0],ui.cardPile.firstChild);
player.useCard({name:'sha'},targets); player.useCard({name:'sha'},targets);
}, },
@ -1561,7 +1561,7 @@ character.yijiang={
return 8-ai.get.value(card); return 8-ai.get.value(card);
}, },
content:function(){ content:function(){
game.log(get.translation(player)+'将'+get.translation(cards)+'置于牌堆顶'); game.log(player,'将',cards,'置于牌堆顶');
ui.cardPile.insertBefore(cards[0],ui.cardPile.firstChild); ui.cardPile.insertBefore(cards[0],ui.cardPile.firstChild);
player.useCard({name:'tao'},targets).delayx=false; player.useCard({name:'tao'},targets).delayx=false;
}, },
@ -1605,7 +1605,7 @@ character.yijiang={
return 6-ai.get.value(card); return 6-ai.get.value(card);
}, },
content:function(){ content:function(){
game.log(get.translation(player)+'将'+get.translation(cards)+'置于牌堆顶'); game.log(player,'将',cards,'置于牌堆顶');
ui.cardPile.insertBefore(cards[0],ui.cardPile.firstChild); ui.cardPile.insertBefore(cards[0],ui.cardPile.firstChild);
player.useCard({name:'jiu'},targets).delayx=false; player.useCard({name:'jiu'},targets).delayx=false;
}, },
@ -1662,8 +1662,22 @@ character.yijiang={
selectTarget:function(){ selectTarget:function(){
return get.select(get.info(_status.event.player.storage.taoxi).selectTarget); return get.select(get.info(_status.event.player.storage.taoxi).selectTarget);
}, },
multitarget:true,
multiline:true,
content:function(){ content:function(){
player.useCard(player.storage.taoxi,targets); 'step 0'
var card=player.storage.taoxi;
if(!card){
event.finish();
return;
}
var owner=get.owner(card);
if(owner){
owner.lose(card,ui.special);
}
event.card=card;
'step 1'
player.useCard(event.card,targets).animate=false;
delete player.storage.taoxi; delete player.storage.taoxi;
delete player.storage.taoxi2; delete player.storage.taoxi2;
player.unmarkSkill('taoxi'); player.unmarkSkill('taoxi');
@ -1745,7 +1759,7 @@ character.yijiang={
if(result.bool){ if(result.bool){
event.damages.push(event.current); event.damages.push(event.current);
event.current.line(player,'green'); event.current.line(player,'green');
game.log(get.translation(event.current)+'令'+get.translation(player)+'回复一点体力'); game.log(event.current,'令',player,'回复一点体力');
} }
if(event.targets.length){ if(event.targets.length){
event.goto(1); event.goto(1);
@ -2805,10 +2819,10 @@ character.yijiang={
trigger.untrigger(); trigger.untrigger();
trigger.player=event.target; trigger.player=event.target;
trigger.trigger('useCard'); trigger.trigger('useCard');
game.log(get.translation(event.target)+'成为了'+get.translation(trigger.card)+'的使用者'); game.log(event.target,'成为了',trigger.card,'的使用者');
} }
else{ else{
game.log(get.translation(event.target)+'成为了'+get.translation(trigger.card)+'的额外目标'); game.log(event.target,'成为了',trigger.card,'的额外目标');
trigger.targets.push(event.target); trigger.targets.push(event.target);
} }
} }
@ -2845,7 +2859,7 @@ character.yijiang={
player.lose(result.cards,ui.special); player.lose(result.cards,ui.special);
player.storage.quanji=player.storage.quanji.concat(result.cards); player.storage.quanji=player.storage.quanji.concat(result.cards);
game.addVideo('storage',player,['quanji',get.cardsInfo(player.storage.quanji),'cards']); game.addVideo('storage',player,['quanji',get.cardsInfo(player.storage.quanji),'cards']);
game.log(get.translation(player)+'将'+get.translation(result.cards)+'置于武将牌上作为“权”'); game.log(player,'将',result.cards,'置于武将牌上作为“权”');
player.markSkill('quanji'); player.markSkill('quanji');
} }
}, },
@ -3120,7 +3134,7 @@ character.yijiang={
} }
else{ else{
trigger.targets.push(event.target); trigger.targets.push(event.target);
game.log(get.translation(event.target)+'成为了额外目标'); game.log(event.target,'成为了额外目标');
} }
}, },
ai:{ ai:{
@ -3406,7 +3420,7 @@ character.yijiang={
} }
"step 2" "step 2"
if(result.bool&&result.targets.length){ if(result.bool&&result.targets.length){
game.log(get.translation(player)+'指定的出杀目标为'+get.translation(result.targets)); game.log(player,'指定的出杀目标为',result.targets);
event.target.line(result.targets); event.target.line(result.targets);
event.target.chooseToUse('对'+get.translation(result.targets)+'使用一张杀,或令'+get.translation(player)+'获得你的两张牌',{name:'sha'},result.targets[0],-1); event.target.chooseToUse('对'+get.translation(result.targets)+'使用一张杀,或令'+get.translation(player)+'获得你的两张牌',{name:'sha'},result.targets[0],-1);
} }
@ -3445,7 +3459,7 @@ character.yijiang={
return get.type(event.card)=='trick'||event.card.name=='sha'; return get.type(event.card)=='trick'||event.card.name=='sha';
}, },
content:function(){ content:function(){
game.log(get.translation(player)+'发动了智迟,'+get.translation(trigger.card)+'对'+get.translation(trigger.target)+'失效') game.log(player,'发动了智迟,',trigger.card,'对',trigger.target,'失效')
trigger.untrigger(); trigger.untrigger();
trigger.finish(); trigger.finish();
}, },
@ -3520,7 +3534,7 @@ character.yijiang={
} }
else{ else{
event.target.gain(cards,'gain2'); event.target.gain(cards,'gain2');
game.log(get.translation(event.target)+'获得了'+get.translation(card)); game.log(event.target,'获得了',card);
} }
"step 3" "step 3"
switch(event.effect){ switch(event.effect){
@ -3636,7 +3650,7 @@ character.yijiang={
return (get.type(event.card)=='trick'); return (get.type(event.card)=='trick');
}, },
content:function(){ content:function(){
game.log(get.translation(player)+'发动了无言,'+get.translation(trigger.card)+'对'+get.translation(trigger.target)+'失效') game.log(player,'发动了无言,',trigger.card,'对',trigger.target,'失效');
trigger.untrigger(); trigger.untrigger();
trigger.finish(); trigger.finish();
}, },
@ -3894,7 +3908,7 @@ character.yijiang={
if(cards.length){ if(cards.length){
player.gain(cards); player.gain(cards);
player.$gain2(cards); player.$gain2(cards);
game.log(get.translation(player)+'发动落英,获得了'+get.translation(cards)); game.log(player,'发动落英,获得了',cards);
} }
}, },
}, },

View File

@ -212,7 +212,7 @@ character.yxs={
} }
if(result.control!='cancel'){ if(result.control!='cancel'){
player.logSkill('sheshi'); player.logSkill('sheshi');
game.log(get.translation(player)+'指定的花色为'+get.translation(result.control)); game.log(player,'指定的花色为',result.control);
var suit=result.control.slice(0,result.control.length-1); var suit=result.control.slice(0,result.control.length-1);
var cards=[]; var cards=[];
for(var i=0;i<ui.cardPile.childNodes.length;i++){ for(var i=0;i<ui.cardPile.childNodes.length;i++){
@ -296,7 +296,7 @@ character.yxs={
if(result.control!='cancel'){ if(result.control!='cancel'){
player.addTempSkill('bolehuiyan4','phaseAfter'); player.addTempSkill('bolehuiyan4','phaseAfter');
player.logSkill(['bolehuiyan',result.control],trigger.target); player.logSkill(['bolehuiyan',result.control],trigger.target);
game.log(get.translation(player)+'预言'+result.control); game.log(player,'预言'+result.control);
player.storage.bolehuiyan=result.control; player.storage.bolehuiyan=result.control;
game.delay(); game.delay();
} }
@ -369,7 +369,7 @@ character.yxs={
event.dialog.close(); event.dialog.close();
} }
if(result.control!='cancel'){ if(result.control!='cancel'){
game.log(get.translation(player)+'预言判定结果为'+get.translation(result.control)); game.log(player,'预言判定结果为'+get.translation(result.control));
player.storage.bolehuiyan=result.control.slice(0,result.control.length-1); player.storage.bolehuiyan=result.control.slice(0,result.control.length-1);
player.popup(result.control); player.popup(result.control);
game.delay(); game.delay();
@ -383,7 +383,7 @@ character.yxs={
popup:false, popup:false,
content:function(){ content:function(){
if(player.storage.bolehuiyan==trigger.result.suit){ if(player.storage.bolehuiyan==trigger.result.suit){
game.log(get.translation(player)+'预言成功'); game.log(player,'预言成功');
player.popup('洗具'); player.popup('洗具');
player.draw(2); player.draw(2);
} }

View File

@ -248,6 +248,7 @@ window.config={
button_press:true, button_press:true,
damage_shake:true, damage_shake:true,
slim_player:true, slim_player:true,
log_highlight:true,
modeconfig:false, modeconfig:false,
gameconfig:false, gameconfig:false,

View File

@ -78,6 +78,7 @@
if(!node._listeningEnd){ if(!node._listeningEnd){
node._listeningEnd=true; node._listeningEnd=true;
node.addEventListener('webkitTransitionEnd',function(){ node.addEventListener('webkitTransitionEnd',function(){
delete node._listeningEnd;
if(node._onEndMoveDelete){ if(node._onEndMoveDelete){
node.moveDelete(node._onEndMoveDelete); node.moveDelete(node._onEndMoveDelete);
} }
@ -611,6 +612,11 @@
} }
} }
}, },
log_highlight:{
name:'历史记录高亮',
init:true,
unfrequent:true,
},
glow_phase:{ glow_phase:{
name:'当前回合角色高亮', name:'当前回合角色高亮',
unfrequent:true, unfrequent:true,
@ -2892,6 +2898,7 @@
} }
player.phaseDiscard() player.phaseDiscard()
game.delayx(); game.delayx();
delete player.using;
delete player._noSkill; delete player._noSkill;
}, },
phaseJudge:function(){ phaseJudge:function(){
@ -2940,6 +2947,7 @@
ui.tempnowuxie.close(); ui.tempnowuxie.close();
delete ui.tempnowuxie; delete ui.tempnowuxie;
} }
delete player.using;
}, },
phaseDiscard:function(){ phaseDiscard:function(){
"step 0" "step 0"
@ -3173,7 +3181,7 @@
event.finish(); event.finish();
return; return;
} }
game.log(get.translation(player)+'对'+get.translation(target)+'发起拼点'); game.log(player,'对',target,'发起拼点');
player.chooseCard('请选择拼点牌',true).ai=event.ai; player.chooseCard('请选择拼点牌',true).ai=event.ai;
"step 1" "step 1"
event.card1=result.cards[0]; event.card1=result.cards[0];
@ -3193,8 +3201,8 @@
player.$compare(event.card1,target,event.card2); player.$compare(event.card1,target,event.card2);
// player.$throw(event.card1); // player.$throw(event.card1);
// target.$throw(event.card2); // target.$throw(event.card2);
game.log(get.translation(player)+'的拼点牌为'+get.translation(event.card1)); game.log(player,'的拼点牌为',event.card1);
game.log(get.translation(target)+'的拼点牌为'+get.translation(event.card2)); game.log(target,'的拼点牌为',event.card2);
event.result={ event.result={
player:event.card1, player:event.card1,
target:event.card2, target:event.card2,
@ -3659,7 +3667,7 @@
var cards=player.get('h'); var cards=player.get('h');
var str=get.translation(player.name)+'的手牌'; var str=get.translation(player.name)+'的手牌';
event.dialog=ui.create.dialog(str,cards); event.dialog=ui.create.dialog(str,cards);
game.log(get.translation(player)+'展示了'+get.translation(cards)); game.log(player,'展示了',cards);
game.addVideo('showCards',player,[str,get.cardsInfo(cards)]); game.addVideo('showCards',player,[str,get.cardsInfo(cards)]);
game.delayx(2); game.delayx(2);
"step 1" "step 1"
@ -3675,11 +3683,7 @@
event.str=get.translation(player.name)+'展示的牌'; event.str=get.translation(player.name)+'展示的牌';
} }
event.dialog=ui.create.dialog(event.str,cards); event.dialog=ui.create.dialog(event.str,cards);
var str=get.translation(player)+'展示了'+get.translation(cards[0]); game.log(player,'展示了',cards);
for(var i=1;i<cards.length;i++){
str+='、'+get.translation(cards[i]);
}
game.log(str);
game.delayx(2); game.delayx(2);
game.addVideo('showCards',player,[event.str,get.cardsInfo(cards)]); game.addVideo('showCards',player,[event.str,get.cardsInfo(cards)]);
"step 1" "step 1"
@ -3774,18 +3778,21 @@
// player.$sha(event.card.nature); // player.$sha(event.card.nature);
// } // }
if(get.type(card)!='equip'){ if(get.type(card)!='equip'){
var str=get.translation(player); var str='';
if(targets.length){ if(targets.length){
str+='对'+(targets[0]==player?'自己':get.translation(targets[0])); str+='对<span class="bluetext">'+(targets[0]==player?'自己':get.translation(targets[0]));
for(var i=1;i<targets.length;i++){ for(var i=1;i<targets.length;i++){
str+='、'+(targets[i]==player?'自己':get.translation(targets[i])); str+='、'+(targets[i]==player?'自己':get.translation(targets[i]));
} }
str+='</span>'
} }
str+='使用了'+get.translation(card); str+='使用了';
if(cards.length&&(cards.length>1||cards[0]!=card)){ if(cards.length&&(cards.length>1||cards[0]!=card)){
str+=''+get.translation(cards)+''; game.log(player,str,card,'',cards,'');
}
else{
game.log(player,str,card);
} }
game.log(str);
} }
if(event.addCount!=false){ if(event.addCount!=false){
if(player.stat[player.stat.length-1].card[card.name]==undefined){ if(player.stat[player.stat.length-1].card[card.name]==undefined){
@ -3943,16 +3950,17 @@
player.line(targets,config); player.line(targets,config);
} }
} }
var str=get.translation(player); var str='';
if(targets&&targets.length){ if(targets&&targets.length){
str+='对'+(targets[0]==player?'自己':get.translation(targets[0])); str+='对<span class="bluetext">'+(targets[0]==player?'自己':get.translation(targets[0]));
for(var i=1;i<targets.length;i++){ for(var i=1;i<targets.length;i++){
str+='、'+(targets[i]==player?'自己':get.translation(targets[i])); str+='、'+(targets[i]==player?'自己':get.translation(targets[i]));
} }
str+='</span>'
} }
str+='发动了'+get.translation(skill); str+='发动了';
if(!info.direct){ if(!info.direct){
game.log(str); game.log(player,str,'【'+get.translation(skill)+'】');
player.popup(skill); player.popup(skill);
} }
if(event.addCount!=false){ if(event.addCount!=false){
@ -4046,7 +4054,7 @@
game.playAudio('effect','draw'); game.playAudio('effect','draw');
} }
if(event.log!=false){ if(event.log!=false){
game.log(get.translation(player)+'摸了'+get.cnNumber(num)+'张牌'); game.log(player,'摸了'+get.cnNumber(num)+'张牌');
} }
var cards=get.cards(num); var cards=get.cards(num);
if(event.animate!=false){ if(event.animate!=false){
@ -4062,12 +4070,7 @@
if(lib.config.background_audio){ if(lib.config.background_audio){
game.playAudio('effect','discard'); game.playAudio('effect','discard');
} }
var str=get.translation(player)+'弃置了'; game.log(player,'弃置了',cards);
str+=get.translation(cards[0]);
for(var i=1;i<cards.length;i++){
str+='、'+get.translation(cards[i]);
}
game.log(str);
player.lose(cards); player.lose(cards);
if(event.animate!=false) player.$throw(cards,1000); if(event.animate!=false) player.$throw(cards,1000);
event.trigger('discard'); event.trigger('discard');
@ -4096,12 +4099,12 @@
} }
} }
} }
var str=get.translation(player)+'打出了';
str+=get.translation(card);
if(cards.length&&(cards.length>1||cards[0].name!=card.name)){ if(cards.length&&(cards.length>1||cards[0].name!=card.name)){
str+=''+get.translation(cards)+''; game.log(player,'打出了',card,'',cards,'');
}
else{
game.log(player,'打出了',card);
} }
game.log(str);
for(var i=0;i<cards.length;i++){ for(var i=0;i<cards.length;i++){
player.lose(cards[i]); player.lose(cards[i]);
if(event.animate!=false) player.$throw(cards[i]); if(event.animate!=false) player.$throw(cards[i]);
@ -4282,12 +4285,12 @@
if(num>0&&player.hujia&&!player.hasSkillTag('nohujia')){ if(num>0&&player.hujia&&!player.hasSkillTag('nohujia')){
if(num>=player.hujia){ if(num>=player.hujia){
num-=player.hujia; num-=player.hujia;
game.log(get.translation(player)+'的护甲抵挡了'+get.cnNumber(player.hujia)+'点伤害'); game.log(player,'的护甲抵挡了'+get.cnNumber(player.hujia)+'点伤害');
player.hujia=0; player.hujia=0;
} }
else{ else{
player.hujia-=num; player.hujia-=num;
game.log(get.translation(player)+'的护甲抵挡了'+get.cnNumber(num)+'点伤害'); game.log(player,'的护甲抵挡了'+get.cnNumber(num)+'点伤害');
num=0; num=0;
} }
event.hujia=true; event.hujia=true;
@ -4297,12 +4300,12 @@
if(lib.config.background_audio){ if(lib.config.background_audio){
game.playAudio('effect','damage'+(num>1?'2':'')); game.playAudio('effect','damage'+(num>1?'2':''));
} }
var str=get.translation(player)+'受到了'; var str='受到了';
if(source) str+='来自'+(source==player?'自己':get.translation(source)+'的'); if(source) str+='来自<span class="bluetext">'+(source==player?'自己':get.translation(source))+'</span>的';
str+=get.cnNumber(num)+'点'; str+=get.cnNumber(num)+'点';
if(event.nature) str+=get.translation(event.nature)+'属性'; if(event.nature) str+=get.translation(event.nature)+'属性';
str+='伤害'; str+='伤害';
game.log(str); game.log(player,str);
if(player.stat[player.stat.length-1].damaged==undefined){ if(player.stat[player.stat.length-1].damaged==undefined){
player.stat[player.stat.length-1].damaged=num; player.stat[player.stat.length-1].damaged=num;
} }
@ -4379,7 +4382,7 @@
else{ else{
player.popup('+'+num); player.popup('+'+num);
} }
game.log(get.translation(player)+'回复了'+get.cnNumber(num)+'点体力') game.log(player,'回复了'+get.cnNumber(num)+'点体力')
} }
}, },
loseHp:function(){ loseHp:function(){
@ -4387,7 +4390,7 @@
if(lib.config.background_audio){ if(lib.config.background_audio){
game.playAudio('effect','loseHp'); game.playAudio('effect','loseHp');
} }
game.log(get.translation(player)+'失去了'+get.cnNumber(num)+'点体力') game.log(player,'失去了'+get.cnNumber(num)+'点体力')
player.changeHp(-num); player.changeHp(-num);
"step 1" "step 1"
if(player.hp<=0){ if(player.hp<=0){
@ -4405,7 +4408,7 @@
}, },
loseMaxHp:function(){ loseMaxHp:function(){
"step 0" "step 0"
game.log(get.translation(player)+'失去了'+get.cnNumber(num)+'点体力上限'); game.log(player,'失去了'+get.cnNumber(num)+'点体力上限');
if(!event.forced&&typeof player.singleHp==='boolean'){ if(!event.forced&&typeof player.singleHp==='boolean'){
if(player.singleHp){ if(player.singleHp){
player.singleHp=false; player.singleHp=false;
@ -4432,7 +4435,7 @@
}, },
gainMaxHp:function(){ gainMaxHp:function(){
"step 0" "step 0"
game.log(get.translation(player)+'获得了'+get.cnNumber(num)+'点体力上限'); game.log(player,'获得了'+get.cnNumber(num)+'点体力上限');
if(typeof player.singleHp==='boolean'){ if(typeof player.singleHp==='boolean'){
if(player.singleHp){ if(player.singleHp){
player.singleHp=false; player.singleHp=false;
@ -4465,14 +4468,14 @@
"step 0" "step 0"
_status.dying=player; _status.dying=player;
event.trigger('dying'); event.trigger('dying');
game.log(get.translation(player)+'濒死') game.log(player,'濒死')
"step 1" "step 1"
if(_status.dying==player) delete _status.dying; if(_status.dying==player) delete _status.dying;
if(player.hp<=0) player.die(event.reason); if(player.hp<=0) player.die(event.reason);
}, },
die:function(){ die:function(){
if(source){ if(source){
game.log(get.translation(player)+'被'+get.translation(source)+'杀害'); game.log(player,'被',source,'杀害');
if(source.stat[source.stat.length-1].kill==undefined){ if(source.stat[source.stat.length-1].kill==undefined){
source.stat[source.stat.length-1].kill=1; source.stat[source.stat.length-1].kill=1;
} }
@ -4481,7 +4484,7 @@
} }
} }
else{ else{
game.log(get.translation(player)+'遇难') game.log(player,'遇难')
} }
event.cards=player.get('hej'); event.cards=player.get('hej');
event.playerCards=player.get('he'); event.playerCards=player.get('he');
@ -4490,12 +4493,7 @@
event.cards[i].goto(ui.discardPile); event.cards[i].goto(ui.discardPile);
} }
player.$throw(event.cards,1000); player.$throw(event.cards,1000);
var card=event.cards; game.log(player,'弃置了',event.cards);
var str=get.translation(player)+'弃置了'+get.translation(card[0]);
for(var i=1;i<card.length;i++){
str+='、'+get.translation(card[i]);
}
game.log(str);
} }
if(!game.reserveDead){ if(!game.reserveDead){
for(var mark in player.marks){ for(var mark in player.marks){
@ -4587,7 +4585,7 @@
} }
player.$equip(card); player.$equip(card);
game.addVideo('equip',player,get.cardInfo(card)); game.addVideo('equip',player,get.cardInfo(card));
game.log(get.translation(player)+'装备了'+get.translation(card)); game.log(player,'装备了',card);
"step 2" "step 2"
var info=get.info(card); var info=get.info(card);
if(info.onEquip&&(!info.filterEquip||info.filterEquip(card,player))){ if(info.onEquip&&(!info.filterEquip||info.filterEquip(card,player))){
@ -4629,10 +4627,10 @@
delete cards[0].viewAs; delete cards[0].viewAs;
} }
if(cards[0].viewAs&&cards[0].viewAs!=cards[0].name){ if(cards[0].viewAs&&cards[0].viewAs!=cards[0].name){
game.log(get.translation(player)+'被贴上了'+get.translation(cards[0].viewAs)+''+get.translation(cards)+''); game.log(player,'被贴上了<span class="yellowtext">'+get.translation(cards[0].viewAs)+'</span>',cards,'');
} }
else{ else{
game.log(get.translation(player)+'被贴上了'+get.translation(cards)); game.log(player,'被贴上了',cards);
} }
game.addVideo('addJudge',player,[get.cardInfo(cards[0]),cards[0].viewAs]); game.addVideo('addJudge',player,[get.cardInfo(cards[0]),cards[0].viewAs]);
} }
@ -4653,7 +4651,7 @@
ui.arena.classList.add('thrownhighlight'); ui.arena.classList.add('thrownhighlight');
event.dialog=ui.create.dialog(judgestr); event.dialog=ui.create.dialog(judgestr);
event.dialog.classList.add('center'); event.dialog.classList.add('center');
game.log(get.translation(player)+'进行'+event.judgestr+'判定,亮出的判定牌为'+get.translation(player.judging)); game.log(player,'进行'+event.judgestr+'判定,亮出的判定牌为',player.judging);
game.delay(2); game.delay(2);
event.trigger('judge'); event.trigger('judge');
"step 1" "step 1"
@ -4678,24 +4676,25 @@
event.dialog.close(); event.dialog.close();
game.addVideo('judge2',null,event.videoId); game.addVideo('judge2',null,event.videoId);
ui.arena.classList.remove('thrownhighlight'); ui.arena.classList.remove('thrownhighlight');
game.log(get.translation(player)+'的判定结果为'+get.translation(event.result.card)); game.log(player,'的判定结果为',event.result.card);
if(!get.owner(event.result.card)) event.position.appendChild(event.result.card); if(!get.owner(event.result.card)) event.position.appendChild(event.result.card);
}, },
turnOver:function(){ turnOver:function(){
game.log(get.translation(player)+'翻面'); game.log(player,'翻面');
player.classList.toggle('turnedover'); player.classList.toggle('turnedover');
game.addVideo('turnOver',player,player.classList.contains('turnedover')); game.addVideo('turnOver',player,player.classList.contains('turnedover'));
}, },
link:function(){ link:function(){
if(player.isLinked()){ if(player.isLinked()){
game.log(get.translation(player)+'解除连环'); game.log(player,'解除连环');
} }
else{ else{
game.log(get.translation(player)+'被连环'); game.log(player,'被连环');
} }
if(lib.config.background_audio){ if(lib.config.background_audio){
game.playAudio('effect','link'); game.playAudio('effect','link');
} }
player.classList.remove('target');
player.classList.toggle('linked'); player.classList.toggle('linked');
game.addVideo('link',player,player.classList.contains('linked')); game.addVideo('link',player,player.classList.contains('linked'));
}, },
@ -5258,7 +5257,7 @@
} }
this.hujia+=num; this.hujia+=num;
if(num>0){ if(num>0){
game.log(get.translation(this)+'获得了'+get.cnNumber(num)+'点护甲值'); game.log(this,'获得了'+get.cnNumber(num)+'点护甲值');
} }
if(this.hujia<0){ if(this.hujia<0){
this.hujia=0; this.hujia=0;
@ -6176,7 +6175,7 @@
return next; return next;
}, },
revive:function(hp){ revive:function(hp){
game.log(get.translation(this)+'复活'); game.log(this,'复活');
if(this.maxHp<1) this.maxHp=1; if(this.maxHp<1) this.maxHp=1;
if(hp) this.hp=hp; if(hp) this.hp=hp;
else{ else{
@ -6224,11 +6223,11 @@
}, },
goMad:function(){ goMad:function(){
this.addSkill('mad'); this.addSkill('mad');
game.log(get.translation(this)+'进入混乱状态'); game.log(this,'进入混乱状态');
}, },
unMad:function(){ unMad:function(){
this.removeSkill('mad'); this.removeSkill('mad');
game.log(get.translation(this)+'解除混乱状态'); game.log(this,'解除混乱状态');
}, },
equip:function(card){ equip:function(card){
var next=game.createEvent('equip'); var next=game.createEvent('equip');
@ -6286,10 +6285,10 @@
out:function(bool){ out:function(bool){
if(this.lockOut) return; if(this.lockOut) return;
if(this.isOut()){ if(this.isOut()){
game.log(get.translation(this)+'进入游戏'); game.log(this,'进入游戏');
} }
else{ else{
game.log(get.translation(this)+'离开游戏'); game.log(this,'离开游戏');
} }
this.classList.toggle('out'); this.classList.toggle('out');
if(bool) this.lockOut=bool; if(bool) this.lockOut=bool;
@ -6313,15 +6312,10 @@
if(lib.translate[name]){ if(lib.translate[name]){
if(!nopop) this.popup(name); if(!nopop) this.popup(name);
if(typeof targets=='object'&&targets.length){ if(typeof targets=='object'&&targets.length){
var str=get.translation(this)+'对'+get.translation(targets[0]); game.log(this,'对',targets,'发动了','【'+get.translation(name)+'】');
for(var i=1;i<targets.length;i++){
str+='、'+get.translation(targets[i]);
}
str+='发动了'+get.translation(name);
game.log(str);
} }
else{ else{
game.log(get.translation(this)+'发动了'+get.translation(name)); game.log(this,'发动了','【'+get.translation(name)+'】');
} }
} }
if(nature!=false){ if(nature!=false){
@ -7258,11 +7252,7 @@
} }
if(get.itemtype(card)=='cards'){ if(get.itemtype(card)=='cards'){
if(log!=false){ if(log!=false){
var str=get.translation(player)+'从'+get.translation(this)+'获得了'+get.translation(card[0]); game.log(player,'从',this,'获得了',card);
for(var i=1;i<card.length;i++){
str+='、'+get.translation(card[i]);
}
game.log(str);
} }
if(this.$givemod){ if(this.$givemod){
this.$givemod(card,player); this.$givemod(card,player);
@ -7275,7 +7265,7 @@
} }
else if(typeof card=='number'&&card>=0){ else if(typeof card=='number'&&card>=0){
if(log!=false){ if(log!=false){
game.log(get.translation(player)+'从'+get.translation(this)+'获得了'+get.cnNumber(card)+'张牌'); game.log(player,'从',this,'获得了'+get.cnNumber(card)+'张牌');
} }
if(this.$givemod){ if(this.$givemod){
this.$givemod(card,player); this.$givemod(card,player);
@ -7287,10 +7277,10 @@
else{ else{
if(log!=false){ if(log!=false){
if(get.itemtype(card)=='card'&&log!=false){ if(get.itemtype(card)=='card'&&log!=false){
game.log(get.translation(player)+'从'+get.translation(this)+'获得了'+get.translation(card)); game.log(player,'从',this,'获得了',card);
} }
else{ else{
game.log(get.translation(player)+'从'+get.translation(this)+'获得了一张牌'); game.log(player,'从',this,'获得了一张牌');
} }
} }
if(this.$givemod){ if(this.$givemod){
@ -7307,7 +7297,7 @@
// node.dataset.position=this.dataset.position; // node.dataset.position=this.dataset.position;
node.fixed=true; node.fixed=true;
this.$throwordered(node); this.$throwordered(node);
lib.listenEnd(node); // lib.listenEnd(node);
// node.hide(); // node.hide();
// node.style.transitionProperty='left,top,opacity'; // node.style.transitionProperty='left,top,opacity';
// //
@ -7384,11 +7374,7 @@
} }
if(get.itemtype(card)=='cards'){ if(get.itemtype(card)=='cards'){
if(log!=false){ if(log!=false){
var str=get.translation(this)+'获得了'+get.translation(card[0]); game.log(this,'获得了',card);
for(var i=1;i<card.length;i++){
str+='、'+get.translation(card[i]);
}
game.log(str);
} }
if(this.$gainmod){ if(this.$gainmod){
this.$gainmod(card); this.$gainmod(card);
@ -7401,7 +7387,7 @@
} }
else if(typeof card=='number'&&card>1){ else if(typeof card=='number'&&card>1){
if(log!=false){ if(log!=false){
game.log(get.translation(this)+'获得了'+get.cnNumber(card)+'张牌'); game.log(this,'获得了'+get.cnNumber(card)+'张牌');
} }
if(this.$gainmod){ if(this.$gainmod){
this.$gainmod(card); this.$gainmod(card);
@ -7414,7 +7400,7 @@
} }
else{ else{
if(get.itemtype(card)=='card'&&log!=false){ if(get.itemtype(card)=='card'&&log!=false){
game.log(get.translation(this)+'获得了'+get.translation(card)); game.log(this,'获得了',card);
} }
if(this.$gainmod){ if(this.$gainmod){
this.$gainmod(card); this.$gainmod(card);
@ -7885,6 +7871,7 @@
_status.event.aiexclude.add(this); _status.event.aiexclude.add(this);
}, },
moveDelete:function(player){ moveDelete:function(player){
this.fixed=true;
if(!this._listeningEnd||this._transitionEnded){ if(!this._listeningEnd||this._transitionEnded){
this.moveTo(player).delete(); this.moveTo(player).delete();
} }
@ -8177,7 +8164,7 @@
if(info.popup!=false&&!info.direct){ if(info.popup!=false&&!info.direct){
if(info.popup){ if(info.popup){
player.popup(info.popup); player.popup(info.popup);
game.log(get.translation(player)+'发动了'+get.translation(event.skill)); game.log(player,'发动了','【'+event.skill+'】');
} }
else{ else{
player.logSkill(event.skill); player.logSkill(event.skill);
@ -8264,6 +8251,9 @@
ui.dialog.refocus(); ui.dialog.refocus();
ui.update(); ui.update();
} }
// if(ui.arenalog){
// ui.arenalog.classList.remove('withdialog');
// }
return this; return this;
}, },
setCaption:function(str){ setCaption:function(str){
@ -8585,7 +8575,7 @@
game.addVideo('phaseChange',player); game.addVideo('phaseChange',player);
_status.currentPhase=player; _status.currentPhase=player;
game.log(); game.log();
game.log(get.translation(player)+'的回合开始'); game.log(player,'的回合开始');
game.phaseNumber++; game.phaseNumber++;
if(get.config('identity_mode')!='zhong'){ if(get.config('identity_mode')!='zhong'){
var num; var num;
@ -11018,10 +11008,8 @@
var custom=event.custom||{}; var custom=event.custom||{};
var ok=true,auto=true; var ok=true,auto=true;
var player=event.player; var player=event.player;
// ui.roundmenu.show();
if(!event.filterButton&&!event.filterCard&&!event.filterTarget&&!event.skill) return; if(!event.filterButton&&!event.filterCard&&!event.filterTarget&&!event.skill) return;
if(event.filterButton){ if(event.filterButton){
// ui.roundmenu.hide();
var dialog=event.dialog; var dialog=event.dialog;
range=get.select(event.selectButton); range=get.select(event.selectButton);
if(range[0]!=range[1]||range[0]>1) auto=false; if(range[0]!=range[1]||range[0]>1) auto=false;
@ -11396,7 +11384,7 @@
} }
} }
if(prompt!=false){ if(prompt!=false){
game.log(get.translation(player1)+'将座位移至'+get.translation(player2)+'后'); game.log(player1,'将座位移至',player2,'后');
} }
} }
else{ else{
@ -11424,7 +11412,7 @@
} }
} }
if(prompt!=false){ if(prompt!=false){
game.log(get.translation(player1)+'和'+get.translation(player2)+'交换了座位'); game.log(player1,'和',player2,'交换了座位');
} }
} }
}, },
@ -11721,7 +11709,41 @@
game.finishCards(); game.finishCards();
}, },
log:function(str){ log:function(str){
if(str==undefined) str=''; var str='';
for(var i=0;i<arguments.length;i++){
var itemtype=get.itemtype(arguments[i]);
if(itemtype=='player'||itemtype=='players'){
if(lib.config.log_highlight){
str+='<span class="bluetext">'+get.translation(arguments[i])+'</span>';
}
else{
str+=get.translation(arguments[i]);
}
}
else if(itemtype=='cards'||itemtype=='card'||(typeof arguments[i]=='object'&&arguments[i].name)){
if(lib.config.log_highlight){
str+='<span class="yellowtext">'+get.translation(arguments[i])+'</span>';
}
else{
str+=get.translation(arguments[i]);
}
}
else if(typeof arguments[i]=='object'){
str+=get.translation(arguments[i]);
}
else if(typeof arguments[i]=='string'&&arguments[i][0]=='【'&&arguments[i][arguments[i].length-1]=='】'){
if(lib.config.log_highlight){
str+='<span class="greentext">'+get.translation(arguments[i])+'</span>';
}
else{
str+=get.translation(arguments[i]);
}
}
else{
str+=arguments[i];
}
}
var node=ui.create.div(); var node=ui.create.div();
node.innerHTML=str; node.innerHTML=str;
ui.sidebar.insertBefore(node,ui.sidebar.firstChild); ui.sidebar.insertBefore(node,ui.sidebar.firstChild);
@ -12420,7 +12442,7 @@
if(!hidden){ if(!hidden){
dialog.open(); dialog.open();
} }
if(!lib.config.touchscreen) dialog.contentContainer.onscroll=ui.update; // if(!lib.config.touchscreen) dialog.contentContainer.onscroll=ui.update;
dialog.contentContainer.ontouchstart=ui.click.touchStart; dialog.contentContainer.ontouchstart=ui.click.touchStart;
dialog.contentContainer.ontouchmove = ui.click.touchScroll; dialog.contentContainer.ontouchmove = ui.click.touchScroll;
dialog.contentContainer.style.WebkitOverflowScrolling='touch'; dialog.contentContainer.style.WebkitOverflowScrolling='touch';
@ -12713,7 +12735,6 @@
ui.arena.dataset.global_font=lib.config.global_font||'default'; ui.arena.dataset.global_font=lib.config.global_font||'default';
// ui.arena.dataset.font_size=lib.config.font_size||'16'; // ui.arena.dataset.font_size=lib.config.font_size||'16';
ui.arena.dataset.glow_phase=lib.config.glow_phase; ui.arena.dataset.glow_phase=lib.config.glow_phase;
ui.updatePhone();
ui.backgroundMusic=document.createElement('audio'); ui.backgroundMusic=document.createElement('audio');
ui.backgroundMusic.volume=lib.config.volumn_background/8; ui.backgroundMusic.volume=lib.config.volumn_background/8;
game.playBackgroundMusic(); game.playBackgroundMusic();
@ -18038,6 +18059,25 @@
ui.dialog.classList.remove('slim'); ui.dialog.classList.remove('slim');
} }
} }
else{
if(!ui.dialog.buttons||!ui.dialog.buttons.length){
ui.dialog.classList.add('nobutton');
if(ui.dialog.content.offsetHeight<240){
ui.dialog.style.height=ui.dialog.content.offsetHeight+'px';
if(lib.config.show_log!='off'){
ui.dialog.classList.add('scroll1');
ui.dialog.classList.add('scroll2');
return;
}
}
else{
ui.dialog.style.height='';
}
}
else{
ui.dialog.classList.remove('nobutton');
}
}
if(false&&lib.config.layout=='mobile'){ if(false&&lib.config.layout=='mobile'){
ui.dialog.style.height=''; ui.dialog.style.height='';
if(ui.dialog.contentContainer.offsetHeight>=ui.dialog.content.offsetHeight){ if(ui.dialog.contentContainer.offsetHeight>=ui.dialog.content.offsetHeight){
@ -18069,23 +18109,6 @@
} }
} }
} }
// ui.updatePhone();
},
updatePhone:function(){
if(lib.config.layout=='phone'&&lib.config.touchscreen){
if(document.body.offsetWidth<document.body.offsetHeight){
var windowWidth=document.body.offsetHeight;
var windowHeight=document.body.offsetWidth;
ui.window.style.height=windowHeight+'px';
ui.window.style.width=windowWidth+'px';
ui.window.style.transform='rotate(90deg)';
ui.window.style.transformOrigin='top left';
ui.window.style.left=windowHeight+'px';
}
else{
ui.window.removeAttribute('style');
}
}
}, },
recycle:function(node,key){ recycle:function(node,key){
if(!ui._recycle) ui._recycle={}; if(!ui._recycle) ui._recycle={};
@ -19243,20 +19266,29 @@
} }
lib.temp={}; lib.temp={};
buttons=get.selectableButtons(); buttons=get.selectableButtons();
buttons2=buttons.slice(0);
buttons.sort(function(a,b){
return check(b,buttons2)-check(a,buttons2);
});
if(buttons.length==0){ if(buttons.length==0){
return ok; return ok;
} }
if(check(buttons[0])<=0){ buttons2=buttons.slice(0);
var ix=0;
var checkix=check(buttons[0],buttons2);
for(i=1;i<buttons.length;i++){
var checkixtmp=check(buttons[i],buttons2);
if(checkixtmp>checkix){
ix=i;
checkix=checkixtmp;
}
}
// buttons.sort(function(a,b){
// return check(b,buttons2)-check(a,buttons2);
// });
if(check(buttons[ix])<=0){
if(!forced||ok){ if(!forced||ok){
return ok; return ok;
} }
} }
buttons[0].classList.add('selected'); buttons[ix].classList.add('selected');
ui.selected.buttons.add(buttons[0]); ui.selected.buttons.add(buttons[ix]);
game.check(); game.check();
if(ui.selected.buttons.length>=range[0]){ if(ui.selected.buttons.length>=range[0]){
ok=true; ok=true;
@ -19292,20 +19324,29 @@
if(!_status.event.player._noSkill){ if(!_status.event.player._noSkill){
cards=cards.concat(get.skills()); cards=cards.concat(get.skills());
} }
cards2=cards.slice(0);
cards.sort(function(a,b){
return (check(b,cards2)-check(a,cards2));
});
if(cards.length==0){ if(cards.length==0){
return ok; return ok;
} }
if(check(cards[0])<=0){ cards2=cards.slice(0);
// cards.sort(function(a,b){
// return (check(b,cards2)-check(a,cards2));
// });
var ix=0;
var checkix=check(cards[0],cards2);
for(i=1;i<cards.length;i++){
var checkixtmp=check(cards[i],cards2);
if(checkixtmp>checkix){
ix=i;
checkix=checkixtmp;
}
}
if(check(cards[ix])<=0){
if(!forced||ok){ if(!forced||ok){
return ok; return ok;
} }
} }
if(typeof cards[0]=='string'){ if(typeof cards[ix]=='string'){
ui.click.skill(cards[0]); ui.click.skill(cards[ix]);
var info=get.info(event.skill); var info=get.info(event.skill);
if(info.filterCard){ if(info.filterCard){
check=info.check||ai.get.unuseful2; check=info.check||ai.get.unuseful2;
@ -19316,10 +19357,10 @@
} }
} }
else{ else{
cards[0].classList.add('selected'); cards[ix].classList.add('selected');
ui.selected.cards.add(cards[0]); ui.selected.cards.add(cards[ix]);
game.check(); game.check();
if(ui.selected.cards.length>=range[0]){ if(ui.selected.cards.length>=range[ix]){
ok=true; ok=true;
} }
if(ui.selected.cards.length==range[1]){ if(ui.selected.cards.length==range[1]){
@ -19350,20 +19391,29 @@
} }
lib.temp={}; lib.temp={};
targets=get.selectableTargets(); targets=get.selectableTargets();
targets2=targets.slice(0);
targets.sort(function(a,b){
return check(b)-check(a);
});
if(targets.length==0){ if(targets.length==0){
return ok; return ok;
} }
if(check(targets[0])<=0){ targets2=targets.slice(0);
// targets.sort(function(a,b){
// return check(b)-check(a);
// });
var ix=0;
var checkix=check(targets[0],targets2);
for(i=1;i<targets.length;i++){
var checkixtmp=check(targets[i],targets2);
if(checkixtmp>checkix){
ix=i;
checkix=checkixtmp;
}
}
if(check(targets[ix])<=0){
if(!forced||ok){ if(!forced||ok){
return ok; return ok;
} }
} }
targets[0].classList.add('selected'); targets[ix].classList.add('selected');
ui.selected.targets.add(targets[0]); ui.selected.targets.add(targets[ix]);
game.check(); game.check();
if(ui.selected.targets.length>=range[0]){ if(ui.selected.targets.length>=range[0]){
ok=true; ok=true;
@ -19698,13 +19748,18 @@
return this; return this;
}; };
HTMLDivElement.prototype.delete=function(time){ HTMLDivElement.prototype.delete=function(time){
if(time==undefined) time=500; if(!this._listeningEnd||this._transitionEnded){
this.classList.add('removing'); if(time==undefined) time=500;
var that=this; this.classList.add('removing');
this.timeout=setTimeout(function(){ var that=this;
that.remove(); this.timeout=setTimeout(function(){
that.classList.remove('removing'); that.remove();
},time); that.classList.remove('removing');
},time);
}
else{
this._onEndDelete=true;
}
return this; return this;
}; };
HTMLDivElement.prototype.goto=function(position,time){ HTMLDivElement.prototype.goto=function(position,time){

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

View File

@ -98,6 +98,9 @@ table{table-layout: fixed;}
top:200px; top:200px;
overflow: hidden; overflow: hidden;
} }
#arenalog.withdialog{
opacity: 0.5;
}
#arena:not(.oldlayout)>#arenalog[data-position="center"]{ #arena:not(.oldlayout)>#arenalog[data-position="center"]{
left: calc(25% + 105px); left: calc(25% + 105px);
} }
@ -414,7 +417,7 @@ div:not(.handcards)>.card>.name,
display: block !important; display: block !important;
} }
/*--------窗口--------*/ /*--------窗口--------*/
.dialog{text-align: center;z-index:4;} .dialog{text-align: center;z-index:4;transition-property:opacity,background,box-shadow,top}
.dialog{width: calc(90% - 420px);height: calc(100% / 3 - 160px / 3 + 120px);} .dialog{width: calc(90% - 420px);height: calc(100% / 3 - 160px / 3 + 120px);}
.dialog.fullheight{height:calc(100% - 80px) !important;top:40px !important} .dialog.fullheight{height:calc(100% - 80px) !important;top:40px !important}
.dialog.fullwidth{left:calc(5% + 60px) !important;width:calc(90% - 120px) !important} .dialog.fullwidth{left:calc(5% + 60px) !important;width:calc(90% - 120px) !important}
@ -422,7 +425,8 @@ div:not(.handcards)>.card>.name,
.dialog.halfleft{left:5% !important} .dialog.halfleft{left:5% !important}
.dialog.halfright{left:52% !important} .dialog.halfright{left:52% !important}
.dialog{top:calc(100% / 3 - 100px / 3);left: calc(5% + 210px);} .dialog{top:calc(100% / 3 - 100px / 3);left: calc(5% + 210px);}
.dialog.nobutton{width: 400px;left:calc(50% - 200px);bottom:auto !important;min-height: 0px !important;}
.dialog.nobutton .content>div:last-child{padding-bottom: 8px;}
#window>.dialog.popped{ #window>.dialog.popped{
z-index:5; z-index:5;
width:220px; width:220px;
@ -964,9 +968,11 @@ div:hover>.intro{opacity: 1;}
} }
.dialog>.content-container{ .dialog>.content-container{
width:100%; width:100%;
height:calc(100% - 5px); height:calc(100% - 0px);
/*height:calc(100% - 5px);*/
left:0; left:0;
top:5px; top:0px;
/*top:5px;*/
position:absolute; position:absolute;
overflow:scroll; overflow:scroll;
} }
@ -1220,6 +1226,15 @@ div[data-color="unknownm"]{
.firetext{ .firetext{
color: rgb(255,119,63); color: rgb(255,119,63);
} }
.yellowtext{
color: #FFFF7A;
}
.bluetext{
color: rgb(150, 202, 255);
}
.greentext{
color: rgb(104,221,127);
}
.thundertext, .thundertext,
.controlthundertext{ .controlthundertext{
color: rgb(117,186,255); color: rgb(117,186,255);
@ -1251,7 +1266,7 @@ div:hover>.wunature{
display: none !important; display: none !important;
} }
.player .actcount.hp{ .player .actcount.hp{
left: -24px; left: 216px;
top: 9px; top: 9px;
width: 20px; width: 20px;
} }

View File

@ -360,6 +360,10 @@
animation: dialog_start2 0.5s; animation: dialog_start2 0.5s;
-webkit-animation: dialog_start2 0.5s; -webkit-animation: dialog_start2 0.5s;
} }
.dialog.nobutton{
bottom:auto !important;
top:200px !important;
}
#arena.stone .dialog{ #arena.stone .dialog{
width: calc(90% - 440px); width: calc(90% - 440px);
left: calc(5% + 220px); left: calc(5% + 220px);

View File

@ -333,7 +333,7 @@ mode.boss={
if(player.maxHp>0){ if(player.maxHp>0){
if(player.hp<player.maxHp){ if(player.hp<player.maxHp){
player.hp++; player.hp++;
game.log(get.translation(player)+'回复了一点体力'); game.log(player,'回复了一点体力');
} }
else{ else{
var card=get.cards()[0]; var card=get.cards()[0];
@ -343,7 +343,7 @@ mode.boss={
card.animate('start'); card.animate('start');
position.insertBefore(card,position.firstChild); position.insertBefore(card,position.firstChild);
player.$draw(); player.$draw();
game.log(get.translation(player)+'摸了一张牌'); game.log(player,'摸了一张牌');
} }
player.update(); player.update();
if(player.storage.boss_chongzheng>=game.bossinfo.chongzheng){ if(player.storage.boss_chongzheng>=game.bossinfo.chongzheng){

View File

@ -4340,7 +4340,7 @@ mode.chess={
game.over(); game.over();
} }
else{ else{
game.log('招降'+get.translation(target)+'失败') game.log('招降',target,'失败')
player.popup('招降失败'); player.popup('招降失败');
player.damage(target); player.damage(target);
} }
@ -4519,7 +4519,7 @@ mode.chess={
player.additionalSkills.tongshuai=link; player.additionalSkills.tongshuai=link;
game.addVideo('chess_tongshuai_skill',player,[currentname,link]); game.addVideo('chess_tongshuai_skill',player,[currentname,link]);
player.logSkill('tongshuai2'); player.logSkill('tongshuai2');
game.log(get.translation(player)+'获得技能'+get.translation(link)); game.log(player,'获得技能','【'+get.translation(link)+'】');
player.popup(link); player.popup(link);
for(var i=0;i<event.dialog.buttons.length;i++){ for(var i=0;i<event.dialog.buttons.length;i++){

View File

@ -81,6 +81,7 @@ mode.guozhan={
"step 2" "step 2"
if(lib.storage.test){ if(lib.storage.test){
lib.config.game_speed='vfast'; lib.config.game_speed='vfast';
lib.config.low_performance=true;
_status.auto=true; _status.auto=true;
ui.auto.classList.add('glow'); ui.auto.classList.add('glow');
} }
@ -495,21 +496,21 @@ mode.guozhan={
var skills; var skills;
switch(num){ switch(num){
case 0: case 0:
if(log!==false) game.log(get.translation(this)+'展示了主将'+get.translation(this.name1)); if(log!==false) game.log(this,'展示了主将'+get.translation(this.name1));
this.name=this.name1; this.name=this.name1;
skills=lib.character[this.name][3]; skills=lib.character[this.name][3];
this.sex=lib.character[this.name][0]; this.sex=lib.character[this.name][0];
this.classList.remove('unseen'); this.classList.remove('unseen');
break; break;
case 1: case 1:
if(log!==false) game.log(get.translation(this)+'展示了副将'+get.translation(this.name2)); if(log!==false) game.log(this,'展示了副将'+get.translation(this.name2));
skills=lib.character[this.name2][3]; skills=lib.character[this.name2][3];
if(this.sex=='unknown') this.sex=lib.character[this.name2][0]; if(this.sex=='unknown') this.sex=lib.character[this.name2][0];
if(this.name.indexOf('unknown')==0) this.name=this.name2; if(this.name.indexOf('unknown')==0) this.name=this.name2;
this.classList.remove('unseen2'); this.classList.remove('unseen2');
break; break;
case 2: case 2:
if(log!==false) game.log(get.translation(this)+'展示了主将'+get.translation(this.name1)+'、副将'+get.translation(this.name2)); if(log!==false) game.log(this,'展示了主将'+get.translation(this.name1)+'、副将'+get.translation(this.name2));
this.name=this.name1; this.name=this.name1;
skills=lib.character[this.name][3].concat(lib.character[this.name2][3]); skills=lib.character[this.name][3].concat(lib.character[this.name2][3]);
this.sex=lib.character[this.name][0]; this.sex=lib.character[this.name][0];
@ -520,8 +521,8 @@ mode.guozhan={
var initdraw=parseInt(get.config('initshow_draw')); var initdraw=parseInt(get.config('initshow_draw'));
if(!_status.initshown&&initdraw&&this.isAlive()&&get.config('guozhan_mode')!='mingjiang'){ if(!_status.initshown&&initdraw&&this.isAlive()&&get.config('guozhan_mode')!='mingjiang'){
this.popup('首亮'); this.popup('首亮');
game.log(get.translation(this)+'首先明置武将,得到奖励'); game.log(this,'首先明置武将,得到奖励');
game.log(get.translation(this)+'摸了'+get.cnNumber(initdraw)+'张牌'); game.log(this,'摸了'+get.cnNumber(initdraw)+'张牌');
this.draw(initdraw).log=false; this.draw(initdraw).log=false;
_status.initshown=true; _status.initshown=true;
} }
@ -539,7 +540,7 @@ mode.guozhan={
next.content=function(){ next.content=function(){
"step 0" "step 0"
player.popup('珠联璧合'); player.popup('珠联璧合');
game.log(get.translation(player)+'发动了【珠联璧合】'); game.log(player,'发动了【珠联璧合】');
if(player.hp==player.maxHp){ if(player.hp==player.maxHp){
player.draw(2); player.draw(2);
event.finish(); event.finish();

View File

@ -814,9 +814,15 @@ mode.identity={
if(trans.indexOf('rotateY')!=-1){ if(trans.indexOf('rotateY')!=-1){
this.node.dieidentity.style.transform='rotateY(180deg)'; this.node.dieidentity.style.transform='rotateY(180deg)';
} }
if(trans.indexOf('rotateX')!=-1){ else if(trans.indexOf('rotateX')!=-1){
this.node.dieidentity.style.transform='rotateX(180deg)'; this.node.dieidentity.style.transform='rotateX(180deg)';
} }
else{
this.node.dieidentity.style.transform='';
}
}
else{
this.node.dieidentity.style.transform='';
} }
}, },
logAi:function(targets,card){ logAi:function(targets,card){

View File

@ -860,7 +860,7 @@ mode.stone={
content:function(){ content:function(){
target.addSkill('chaofeng'); target.addSkill('chaofeng');
target.markSkill('chaofeng'); target.markSkill('chaofeng');
game.log(get.translation(target)+'获得了嘲讽'); game.log(target,'获得了嘲讽');
target.popup('嘲讽'); target.popup('嘲讽');
}, },
ai:{ ai:{

View File

@ -64,7 +64,7 @@ play.character={
if(list.length){ if(list.length){
var skill=list.randomGet(); var skill=list.randomGet();
target.popup(skill); target.popup(skill);
game.log(get.translation(target)+'获得技能'+get.translation(skill)); game.log(target,'获得技能','【'+get.translation(skill)+'】');
target.addSkill(skill); target.addSkill(skill);
target.skills.remove(skill); target.skills.remove(skill);
target.additionalSkills.charactercard=skill; target.additionalSkills.charactercard=skill;

View File

@ -72,7 +72,7 @@ play.soldier={
"step 1" "step 1"
if(event.dialog) event.dialog.close(); if(event.dialog) event.dialog.close();
if(result.control!='cancel'&&result.control){ if(result.control!='cancel'&&result.control){
game.log(get.translation(player)+'牺牲了'+get.translation(result.control)); game.log(player,'牺牲了'+get.translation(result.control));
player.storage.soldier.remove(result.control); player.storage.soldier.remove(result.control);
player.removeSkill(result.control); player.removeSkill(result.control);
player.popup(result.control); player.popup(result.control);

View File

@ -100,7 +100,7 @@ play.weather={
trigger.untrigger(); trigger.untrigger();
trigger.finish(); trigger.finish();
player.popup('雾'); player.popup('雾');
game.log('大雾使'+get.translation(player)+'躲避了杀'); game.log('大雾使',player,'躲避了杀');
} }
}, },
_weather_bao:{ _weather_bao:{
@ -115,7 +115,7 @@ play.weather={
content:function(){ content:function(){
player.damage('nosource'); player.damage('nosource');
player.popup('雹'); player.popup('雹');
game.log(get.translation(player)+'被冰雹砸中'); game.log(player,'被冰雹砸中');
} }
}, },
_weather_feng:{ _weather_feng:{
@ -150,7 +150,7 @@ play.weather={
game.delay(); game.delay();
target.damage('fire',trigger.source||'nosource'); target.damage('fire',trigger.source||'nosource');
target.popup('风'); target.popup('风');
game.log('大风使'+get.translation(target)+'受到波及'); game.log('大风使',target,'受到波及');
} }
} }
}, },
@ -172,7 +172,7 @@ play.weather={
if(player.movable(0,1)) list.push('moveDown'); if(player.movable(0,1)) list.push('moveDown');
if(list.length){ if(list.length){
player.popup('雪'); player.popup('雪');
game.log('由于地滑,'+get.translation(player)+'发生移动'); game.log('由于地滑,',player,'发生移动');
player[list.randomGet()](); player[list.randomGet()]();
} }
} }

View File

@ -69,10 +69,10 @@ play.wuxing={
switch(player.wunature){ switch(player.wunature){
case 'wood': case 'wood':
if(player.num('he')){ if(player.num('he')){
game.log(get.translation(player)+'被'+get.translation(trigger.card.wunature)+'属性的卡牌克制'); game.log(player,'被'+get.translation(trigger.card.wunature)+'属性的卡牌克制');
player.chooseToDiscard('你被金属性卡牌克制,需弃置一张牌',true,'he').ai=ai.get.disvalue;player.popup('金克木')};return; player.chooseToDiscard('你被金属性卡牌克制,需弃置一张牌',true,'he').ai=ai.get.disvalue;player.popup('金克木')};return;
case 'water': case 'water':
game.log(get.translation(player)+'得到'+get.translation(trigger.card.wunature)+'属性卡牌的加成'); game.log(player,'得到'+get.translation(trigger.card.wunature)+'属性卡牌的加成');
player.draw();player.popup('金生水'); player.draw();player.popup('金生水');
return; return;
default:return; default:return;
@ -81,10 +81,10 @@ play.wuxing={
switch(player.wunature){ switch(player.wunature){
case 'soil': case 'soil':
if(player.num('he')){ if(player.num('he')){
game.log(get.translation(player)+'被'+get.translation(trigger.card.wunature)+'属性的卡牌克制'); game.log(player,'被'+get.translation(trigger.card.wunature)+'属性的卡牌克制');
player.chooseToDiscard('你被木属性卡牌克制,需弃置一张牌',true,'he').ai=ai.get.disvalue;player.popup('木克土')};return; player.chooseToDiscard('你被木属性卡牌克制,需弃置一张牌',true,'he').ai=ai.get.disvalue;player.popup('木克土')};return;
case 'fire': case 'fire':
game.log(get.translation(player)+'得到'+get.translation(trigger.card.wunature)+'属性卡牌的加成'); game.log(player,'得到'+get.translation(trigger.card.wunature)+'属性卡牌的加成');
player.draw();player.popup('木生火'); player.draw();player.popup('木生火');
return; return;
default:return; default:return;
@ -93,10 +93,10 @@ play.wuxing={
switch(player.wunature){ switch(player.wunature){
case 'fire': case 'fire':
if(player.num('he')){ if(player.num('he')){
game.log(get.translation(player)+'被'+get.translation(trigger.card.wunature)+'属性的卡牌克制'); game.log(player,'被'+get.translation(trigger.card.wunature)+'属性的卡牌克制');
player.chooseToDiscard('你被水属性卡牌克制,需弃置一张牌',true,'he').ai=ai.get.disvalue;player.popup('水克火')};return; player.chooseToDiscard('你被水属性卡牌克制,需弃置一张牌',true,'he').ai=ai.get.disvalue;player.popup('水克火')};return;
case 'wood': case 'wood':
game.log(get.translation(player)+'得到'+get.translation(trigger.card.wunature)+'属性卡牌的加成'); game.log(player,'得到'+get.translation(trigger.card.wunature)+'属性卡牌的加成');
player.draw();player.popup('水生木'); player.draw();player.popup('水生木');
return; return;
default:return; default:return;
@ -105,10 +105,10 @@ play.wuxing={
switch(player.wunature){ switch(player.wunature){
case 'metal': case 'metal':
if(player.num('he')){ if(player.num('he')){
game.log(get.translation(player)+'被'+get.translation(trigger.card.wunature)+'属性的卡牌克制'); game.log(player,'被'+get.translation(trigger.card.wunature)+'属性的卡牌克制');
player.chooseToDiscard('你被火属性卡牌克制,需弃置一张牌',true,'he').ai=ai.get.disvalue;player.popup('火克金')};return; player.chooseToDiscard('你被火属性卡牌克制,需弃置一张牌',true,'he').ai=ai.get.disvalue;player.popup('火克金')};return;
case 'soil': case 'soil':
game.log(get.translation(player)+'得到'+get.translation(trigger.card.wunature)+'属性卡牌的加成'); game.log(player,'得到'+get.translation(trigger.card.wunature)+'属性卡牌的加成');
player.draw();player.popup('火生土'); player.draw();player.popup('火生土');
return; return;
default:return; default:return;
@ -117,10 +117,10 @@ play.wuxing={
switch(player.wunature){ switch(player.wunature){
case 'water': case 'water':
if(player.num('he')){ if(player.num('he')){
game.log(get.translation(player)+'被'+get.translation(trigger.card.wunature)+'属性的卡牌克制'); game.log(player,'被'+get.translation(trigger.card.wunature)+'属性的卡牌克制');
player.chooseToDiscard('你被土属性卡牌克制,需弃置一张牌',true,'he').ai=ai.get.disvalue;player.popup('土克水')};return; player.chooseToDiscard('你被土属性卡牌克制,需弃置一张牌',true,'he').ai=ai.get.disvalue;player.popup('土克水')};return;
case 'metal': case 'metal':
game.log(get.translation(player)+'得到'+get.translation(trigger.card.wunature)+'属性卡牌的加成'); game.log(player,'得到'+get.translation(trigger.card.wunature)+'属性卡牌的加成');
player.draw();player.popup('土生金'); player.draw();player.popup('土生金');
return; return;
default:return; default:return;