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

View File

@ -182,7 +182,7 @@ card.hearth={
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));
game.log(target,'展示了',event.card2);
player.chooseToDiscard(function(card){
return get.suit(card)==get.suit(_status.event.parent.card2);
},function(card){
@ -215,7 +215,7 @@ card.hearth={
player:function(player){
var nh=player.num('h');
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'})){
return -10;
}
@ -231,7 +231,7 @@ card.hearth={
if(target.skills.contains('shandianjian2')||target.num('h')==0) return 0;
if(player.num('h')<=1) return 0;
if(target==player){
if(_status.event.filterCard&&
if(typeof _status.event.filterCard=='function'&&
_status.event.filterCard({name:'shandianjian'})){
return -1.5;
}

View File

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

View File

@ -148,7 +148,7 @@ card.shenqi={
if(result.bool){
var type=[];
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++){
event.hu.storage.shouna.remove(result.links[i]);
ui.discardPile.appendChild(result.links[i]);
@ -204,7 +204,7 @@ card.shenqi={
hu.storage.shouna.push(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"
if(event.success){
player.popup('收化成功');
game.log(get.translation(player)+'将'+get.translation(target)+'收化');
game.log(player,'将',target,'收化');
target.dataset.position=event.position;
var card=player.get('e','5');
if(!card.storage.shouhua) card.storage.shouhua=[];
@ -397,8 +397,7 @@ card.shenqi={
trigger.result.bool=false;
trigger.player.popup('杯具');
}
game.log(get.translation(trigger.player)+'的判定结果为'+get.translation(card)+
'('+get.translation(get.suit(card))+get.number(card)+')');
game.log(trigger.player,'的判定结果为',card);
trigger.direct=true;
trigger.position.appendChild(card);
game.delay(2);

View File

@ -117,7 +117,12 @@ card.standard={
result:{
target:function(player,target){
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;
},
@ -480,7 +485,7 @@ card.standard={
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.log(target,'选择了',button.link);
game.delay();
},
contentAfter:function(){

View File

@ -319,8 +319,8 @@ card.yibao={
player.$compare(event.card1,target,event.card2);
game.delay(4);
"step 3"
game.log(get.translation(player)+'展示了'+get.translation(event.card1));
game.log(get.translation(target)+'展示了'+get.translation(event.card2));
game.log(player,'展示了',event.card1);
game.log(target,'展示了',event.card2);
if(get.color(event.card2)==get.color(event.card1)){
player.discard(event.card1).animate=false;
target.$gain2(event.card2);
@ -350,7 +350,8 @@ card.yibao={
result:{
player:function(player,target){
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;
}
if(_status.event.skill){

View File

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

View File

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

View File

@ -250,7 +250,7 @@ character.extra={
ui.discardPile.appendChild(trigger.player.judging);
trigger.player.judging=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);
}
},
@ -623,7 +623,7 @@ character.extra={
result.targets[i].popup('dawu');
}
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);
}
else{
@ -1044,7 +1044,7 @@ character.extra={
if(event.insert){
event.card.fix();
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);
}
"step 3"

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -177,7 +177,7 @@ character.standard={
ui.discardPile.appendChild(trigger.player.judging);
trigger.player.judging=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);
}
},
@ -693,7 +693,7 @@ character.standard={
}
event.dialog.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();
game.resume();
}
@ -775,7 +775,7 @@ character.standard={
ui.cardPile.appendChild(bottom[i]);
}
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);
}
},

View File

@ -417,7 +417,7 @@ character.swd={
player.logSkill('guozao',target);
var cards=target.get('h');
target.lose(cards)._triggered=null;
game.log(get.translation(target)+'弃置了'+get.translation(cards)+',并获得三张牌');
game.log(target,'弃置了',cards,',并获得三张牌');
// target.$draw(3);
target.$throw(cards);
target.gain(event.cards,'draw')._triggered=null;
@ -962,7 +962,7 @@ character.swd={
"step 1"
if(result.bool){
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');
}
},
@ -3100,7 +3100,7 @@ character.swd={
player.gain(trigger.player.judging);
trigger.player.judging=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"
game.delay(2);
@ -4194,7 +4194,7 @@ character.swd={
var cards=player.storage.yishan.splice(0,2);
player.gain(cards);
player.$gain2(cards);
game.log(get.translation(player)+'获得了'+get.translation(cards));
game.log(player,'获得了',cards);
},
ai:{
maixie:true,
@ -5326,7 +5326,7 @@ character.swd={
var cards=get.cards(1);
event.card=cards[0];
player.gain(cards,'gain2');
game.log(get.translation(player)+'获得了'+get.translation(event.card));
game.log(player,'获得了',event.card);
"step 1"
var gained=event.card;
if(lib.filter.filterCard(gained)){
@ -5841,7 +5841,11 @@ character.swd={
order:1,
result:{
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);
trigger.player.judging=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;
game.delay(2);
}
@ -6855,7 +6859,7 @@ character.swd={
else if(trigger.cards&&trigger.cards.length){
player.gain(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(){
player.recover();
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');
delete player.storage.zhenjiu2;
},
@ -7627,7 +7631,7 @@ character.swd={
popup:false,
content:function(){
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');
delete player.storage.mazui2;
}

View File

@ -294,12 +294,8 @@ character.wind={
if(player.storage.buqu==undefined) player.storage.buqu=[];
player.storage.buqu.push(event.card);
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.log(player,'的不屈牌为',player.storage.buqu);
player.markSkill('buqu');
"step 1"
for(var i=0;i<player.storage.buqu.length-1;i++){
@ -439,7 +435,7 @@ character.wind={
player.gain(trigger.player.judging);
trigger.player.judging=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"
game.delay(2);

View File

@ -166,14 +166,7 @@ character.woods={
"step 0"
player.gain(trigger.playerCards);
player.$draw(trigger.playerCards);
//trigger.player.$give(trigger.cards,player);
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"
for(var i=0;i<trigger.playerCards.length;i++){
trigger.cards.remove(trigger.playerCards[i]);

View File

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

View File

@ -507,7 +507,7 @@ character.yijiang={
},
content:function(){
var card=get.cards()[0];
game.log(get.translation(player)+'将'+get.translation(card)+'置于武将牌上');
game.log(player,'将',card,'置于武将牌上');
player.$gain2(card);
player.storage.sidi.add(card);
player.markSkill('sidi');
@ -567,7 +567,7 @@ character.yijiang={
if(button){
player.$throw([button]);
player.line(trigger.player,'green');
game.log(get.translation(player)+'将'+get.translation(button)+'置于弃牌堆');
game.log(player,'将',button,'置于弃牌堆');
ui.discardPile.appendChild(button);
trigger.player.addTempSkill('sidi3','phaseAfter');
player.storage.sidi.remove(button);
@ -1128,8 +1128,8 @@ character.yijiang={
player.$compare(event.card1,target,event.card2);
game.delay(4);
"step 3"
game.log(get.translation(player)+'展示了'+get.translation(event.card1));
game.log(get.translation(target)+'展示了'+get.translation(event.card2));
game.log(player,'展示了',event.card1);
game.log(target,'展示了',event.card2);
var name1=event.card1.name;
if(player.hp==1&&name1=='shan'){
name1='sha';
@ -1517,7 +1517,7 @@ character.yijiang={
return 6-ai.get.value(card);
},
content:function(){
game.log(get.translation(player)+'将'+get.translation(cards)+'置于牌堆顶');
game.log(player,'将',cards,'置于牌堆顶');
ui.cardPile.insertBefore(cards[0],ui.cardPile.firstChild);
player.useCard({name:'sha'},targets);
},
@ -1561,7 +1561,7 @@ character.yijiang={
return 8-ai.get.value(card);
},
content:function(){
game.log(get.translation(player)+'将'+get.translation(cards)+'置于牌堆顶');
game.log(player,'将',cards,'置于牌堆顶');
ui.cardPile.insertBefore(cards[0],ui.cardPile.firstChild);
player.useCard({name:'tao'},targets).delayx=false;
},
@ -1605,7 +1605,7 @@ character.yijiang={
return 6-ai.get.value(card);
},
content:function(){
game.log(get.translation(player)+'将'+get.translation(cards)+'置于牌堆顶');
game.log(player,'将',cards,'置于牌堆顶');
ui.cardPile.insertBefore(cards[0],ui.cardPile.firstChild);
player.useCard({name:'jiu'},targets).delayx=false;
},
@ -1662,8 +1662,22 @@ character.yijiang={
selectTarget:function(){
return get.select(get.info(_status.event.player.storage.taoxi).selectTarget);
},
multitarget:true,
multiline:true,
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.taoxi2;
player.unmarkSkill('taoxi');
@ -1745,7 +1759,7 @@ character.yijiang={
if(result.bool){
event.damages.push(event.current);
event.current.line(player,'green');
game.log(get.translation(event.current)+'令'+get.translation(player)+'回复一点体力');
game.log(event.current,'令',player,'回复一点体力');
}
if(event.targets.length){
event.goto(1);
@ -2805,10 +2819,10 @@ character.yijiang={
trigger.untrigger();
trigger.player=event.target;
trigger.trigger('useCard');
game.log(get.translation(event.target)+'成为了'+get.translation(trigger.card)+'的使用者');
game.log(event.target,'成为了',trigger.card,'的使用者');
}
else{
game.log(get.translation(event.target)+'成为了'+get.translation(trigger.card)+'的额外目标');
game.log(event.target,'成为了',trigger.card,'的额外目标');
trigger.targets.push(event.target);
}
}
@ -2845,7 +2859,7 @@ character.yijiang={
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)+'置于武将牌上作为“权”');
game.log(player,'将',result.cards,'置于武将牌上作为“权”');
player.markSkill('quanji');
}
},
@ -3120,7 +3134,7 @@ character.yijiang={
}
else{
trigger.targets.push(event.target);
game.log(get.translation(event.target)+'成为了额外目标');
game.log(event.target,'成为了额外目标');
}
},
ai:{
@ -3406,7 +3420,7 @@ character.yijiang={
}
"step 2"
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.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';
},
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.finish();
},
@ -3520,7 +3534,7 @@ character.yijiang={
}
else{
event.target.gain(cards,'gain2');
game.log(get.translation(event.target)+'获得了'+get.translation(card));
game.log(event.target,'获得了',card);
}
"step 3"
switch(event.effect){
@ -3636,7 +3650,7 @@ character.yijiang={
return (get.type(event.card)=='trick');
},
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.finish();
},
@ -3894,7 +3908,7 @@ character.yijiang={
if(cards.length){
player.gain(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'){
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 cards=[];
for(var i=0;i<ui.cardPile.childNodes.length;i++){
@ -296,7 +296,7 @@ character.yxs={
if(result.control!='cancel'){
player.addTempSkill('bolehuiyan4','phaseAfter');
player.logSkill(['bolehuiyan',result.control],trigger.target);
game.log(get.translation(player)+'预言'+result.control);
game.log(player,'预言'+result.control);
player.storage.bolehuiyan=result.control;
game.delay();
}
@ -369,7 +369,7 @@ character.yxs={
event.dialog.close();
}
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.popup(result.control);
game.delay();
@ -383,7 +383,7 @@ character.yxs={
popup:false,
content:function(){
if(player.storage.bolehuiyan==trigger.result.suit){
game.log(get.translation(player)+'预言成功');
game.log(player,'预言成功');
player.popup('洗具');
player.draw(2);
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -814,9 +814,15 @@ mode.identity={
if(trans.indexOf('rotateY')!=-1){
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)';
}
else{
this.node.dieidentity.style.transform='';
}
}
else{
this.node.dieidentity.style.transform='';
}
},
logAi:function(targets,card){

View File

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

View File

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

View File

@ -72,7 +72,7 @@ play.soldier={
"step 1"
if(event.dialog) event.dialog.close();
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.removeSkill(result.control);
player.popup(result.control);

View File

@ -100,7 +100,7 @@ play.weather={
trigger.untrigger();
trigger.finish();
player.popup('雾');
game.log('大雾使'+get.translation(player)+'躲避了杀');
game.log('大雾使',player,'躲避了杀');
}
},
_weather_bao:{
@ -115,7 +115,7 @@ play.weather={
content:function(){
player.damage('nosource');
player.popup('雹');
game.log(get.translation(player)+'被冰雹砸中');
game.log(player,'被冰雹砸中');
}
},
_weather_feng:{
@ -150,7 +150,7 @@ play.weather={
game.delay();
target.damage('fire',trigger.source||'nosource');
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(list.length){
player.popup('雪');
game.log('由于地滑,'+get.translation(player)+'发生移动');
game.log('由于地滑,',player,'发生移动');
player[list.randomGet()]();
}
}

View File

@ -69,10 +69,10 @@ play.wuxing={
switch(player.wunature){
case 'wood':
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;
case 'water':
game.log(get.translation(player)+'得到'+get.translation(trigger.card.wunature)+'属性卡牌的加成');
game.log(player,'得到'+get.translation(trigger.card.wunature)+'属性卡牌的加成');
player.draw();player.popup('金生水');
return;
default:return;
@ -81,10 +81,10 @@ play.wuxing={
switch(player.wunature){
case 'soil':
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;
case 'fire':
game.log(get.translation(player)+'得到'+get.translation(trigger.card.wunature)+'属性卡牌的加成');
game.log(player,'得到'+get.translation(trigger.card.wunature)+'属性卡牌的加成');
player.draw();player.popup('木生火');
return;
default:return;
@ -93,10 +93,10 @@ play.wuxing={
switch(player.wunature){
case 'fire':
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;
case 'wood':
game.log(get.translation(player)+'得到'+get.translation(trigger.card.wunature)+'属性卡牌的加成');
game.log(player,'得到'+get.translation(trigger.card.wunature)+'属性卡牌的加成');
player.draw();player.popup('水生木');
return;
default:return;
@ -105,10 +105,10 @@ play.wuxing={
switch(player.wunature){
case 'metal':
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;
case 'soil':
game.log(get.translation(player)+'得到'+get.translation(trigger.card.wunature)+'属性卡牌的加成');
game.log(player,'得到'+get.translation(trigger.card.wunature)+'属性卡牌的加成');
player.draw();player.popup('火生土');
return;
default:return;
@ -117,10 +117,10 @@ play.wuxing={
switch(player.wunature){
case 'water':
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;
case 'metal':
game.log(get.translation(player)+'得到'+get.translation(trigger.card.wunature)+'属性卡牌的加成');
game.log(player,'得到'+get.translation(trigger.card.wunature)+'属性卡牌的加成');
player.draw();player.popup('土生金');
return;
default:return;