This commit is contained in:
libccy 2017-02-05 19:55:50 +08:00
parent c88e83999e
commit 80b5c5e7c2
12 changed files with 81 additions and 33 deletions

View File

@ -533,8 +533,16 @@ card.standard={
contentAfter:function(){ contentAfter:function(){
for(var i=0;i<ui.dialogs.length;i++){ for(var i=0;i<ui.dialogs.length;i++){
if(ui.dialogs[i].videoId==event.preResult){ if(ui.dialogs[i].videoId==event.preResult){
ui.dialogs[i].close(); var dialog=ui.dialogs[i];
_status.dieClose.remove(ui.dialogs[i]); dialog.close();
_status.dieClose.remove(dialog);
if(dialog.buttons.length){
event.remained=[];
for(var i=0;i<dialog.buttons.length;i++){
event.remained.push(dialog.buttons[i].link);
}
event.trigger('wuguRemained');
}
break; break;
} }
} }

View File

@ -21,7 +21,7 @@ character.diy={
diy_liufu:['male','wei',3,['zhucheng','duoqi']], diy_liufu:['male','wei',3,['zhucheng','duoqi']],
diy_xizhenxihong:['male','shu',3,['fuchou','jinyan']], diy_xizhenxihong:['male','shu',3,['fuchou','jinyan']],
diy_liuzan:['male','wu',4,['kangyin']], diy_liuzan:['male','wu',4,['kangyin']],
diy_zaozhirenjun:['male','shu',3,['liangce','jianbi','juntun']], diy_zaozhirenjun:['male','wei',3,['liangce','jianbi','juntun']],
diy_yangyi:['male','shu',3,['choudu','liduan']], diy_yangyi:['male','shu',3,['choudu','liduan']],
diy_tianyu:['male','wei',3,['chezhen','youzhan']], diy_tianyu:['male','wei',3,['chezhen','youzhan']],
}, },
@ -32,12 +32,41 @@ character.diy={
liangce:{ liangce:{
enable:'phaseUse', enable:'phaseUse',
viewAs:{name:'wugu'}, viewAs:{name:'wugu'},
usable:1,
filterCard:{type:'basic'}, filterCard:{type:'basic'},
filter:function(event,player){ filter:function(event,player){
return player.num('h',{type:'basic'})>0; return player.num('h',{type:'basic'})>0;
}, },
check:function(card){ check:function(card){
return 6-ai.get.value(card); return 6-ai.get.value(card);
},
group:'liangce2'
},
liangce2:{
trigger:{global:'wuguRemained'},
direct:true,
filter:function(event){
return event.remained.length>0;
},
content:function(){
'step 0'
var du=0;
for(var i=0;i<trigger.remained.length;i++){
if(trigger.remained[i].name=='du') du++;
}
var dialog=ui.create.dialog(get.prompt('liangce'),trigger.remained,'hidden');
dialog.classList.add('noselect');
player.chooseTarget(dialog).ai=function(target){
var att=ai.get.attitude(player,target);
if(du>=trigger.remained.length/2) return -att;
return att;
}
'step 1'
if(result.bool){
player.logSkill('liangce',result.targets);
result.targets[0].gain(trigger.remained.slice(0),'gain2','log');
trigger.remained.length=0;
}
} }
}, },
jianbi:{ jianbi:{
@ -72,14 +101,25 @@ character.diy={
} }
game.delay(); game.delay();
} }
else{
event.finish();
}
"step 2" "step 2"
player.logSkill('jianbi',event.targets); player.logSkill('jianbi',event.targets);
}, },
ai:{ ai:{
effect:{ effect:{
target:function(card,player,target){ target:function(card,player,target){
if(get.tag(card,'multitarget')&&!get.info(card).multitarget){ if(get.tag(card,'multitarget')){
return [1,1]; var info=get.info(card);
if(info.selectTarget==-1&&!info.multitarget){
if(get.tag(card,'multineg')){
return 0;
}
else{
return [1,Math.min(3,1+target.maxHp-target.hp)];
}
}
} }
} }
} }

View File

@ -329,8 +329,7 @@ character.gujian={
} }
} }
if(cards.length){ if(cards.length){
player.gain(cards,'gain2'); player.gain(cards,'gain2','log');
game.log(player,'获得了',cards);
} }
} }
}, },

View File

@ -1894,9 +1894,8 @@ character.hearth={
} }
cards2.push(game.createCard(list.randomGet())); cards2.push(game.createCard(list.randomGet()));
} }
player.gain(cards2); player.gain(cards2,'log');
player.$draw(cards2); player.$draw(cards2);
game.log(player,'获得了',cards2);
}, },
ai:{ ai:{
order:8, order:8,
@ -1996,8 +1995,7 @@ character.hearth={
}; };
'step 1' 'step 1'
if(result.bool){ if(result.bool){
player.gain(player.storage.xunbao2,'gain2'); player.gain(player.storage.xunbao2,'gain2','log');
game.log(player,'获得了',player.storage.xunbao2);
delete player.storage.xunbao2; delete player.storage.xunbao2;
player.removeSkill('xunbao2'); player.removeSkill('xunbao2');
} }
@ -3343,8 +3341,7 @@ character.hearth={
return get.type(card)==type; return get.type(card)==type;
}); });
if(card){ if(card){
player.gain(card,'gain2'); player.gain(card,'gain2','log');
game.log(player,'获得了',card);
} }
}, },
ai:{ ai:{

View File

@ -360,9 +360,15 @@ window.characterRank={
'pal_lixiaoyao', 'pal_lixiaoyao',
'sunjian', 'sunjian',
'pangtong', 'pangtong',
'caochun',
'diy_tianyu',
'diy_liuzan',
'diy_zaozhirenjun',
'diy_yangyi',
], ],
b:[ b:[
'caochun', 'diy_liufu',
'diy_xizhenxihong',
'old_zhuran', 'old_zhuran',
'old_lingtong', 'old_lingtong',
'sp_pangde', 'sp_pangde',

View File

@ -244,8 +244,7 @@ character.refresh={
content:function(){ content:function(){
"step 0" "step 0"
var cards=get.cards(); var cards=get.cards();
player.gain(cards,'gain2'); player.gain(cards,'gain2','log');
game.log(player,'获得了',cards);
if(get.type(cards[0])!='basic'){ if(get.type(cards[0])!='basic'){
event.finish(); event.finish();
} }
@ -805,9 +804,8 @@ character.refresh={
} }
else if(result.targets){ else if(result.targets){
player.line(result.targets,'green'); player.line(result.targets,'green');
result.targets[0].gain(event.card); result.targets[0].gain(event.card,'log');
event.node.moveDelete(result.targets[0]); event.node.moveDelete(result.targets[0]);
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)]);
game.broadcast(function(card,target){ game.broadcast(function(card,target){
ui.arena.classList.remove('thrownhighlight'); ui.arena.classList.remove('thrownhighlight');

View File

@ -1029,6 +1029,7 @@ character.shenhua={
} }
} }
}, },
locked:false,
ai:{ ai:{
effect:{ effect:{
target:function(card,player,target,current){ target:function(card,player,target,current){

View File

@ -628,15 +628,13 @@ character.sp={
var undone=false; var undone=false;
if(num==0){ if(num==0){
if(event.basic.length){ if(event.basic.length){
result.targets[0].gain(event.basic,'gain2'); result.targets[0].gain(event.basic,'gain2','log');
game.log(result.targets[0],'获得了',event.basic);
} }
} }
else{ else{
if(result.bool){ if(result.bool){
if(event.basic.length){ if(event.basic.length){
player.gain(event.basic,'gain2'); player.gain(event.basic,'gain2','log');
game.log(player,'获得了',event.basic);
} }
} }
else{ else{
@ -652,8 +650,7 @@ character.sp={
} }
'step 3' 'step 3'
if(player.storage.zhaolie.isAlive()){ if(player.storage.zhaolie.isAlive()){
game.log(player.storage.zhaolie,'获得了',event.basic); player.storage.zhaolie.gain(event.basic,'gain2','log');
player.storage.zhaolie.gain(event.basic,'gain2');
} }
else{ else{
for(var i=0;i<event.basic.length;i++){ for(var i=0;i<event.basic.length;i++){
@ -2463,10 +2460,9 @@ character.sp={
forced:true, forced:true,
content:function(){ content:function(){
var cards=player.storage.yanxiao2.concat(player.get('j')); var cards=player.storage.yanxiao2.concat(player.get('j'));
player.gain(cards,'gain2'); player.gain(cards,'gain2','log');
delete player.storage.yanxiao2; delete player.storage.yanxiao2;
player.removeSkill('yanxiao2'); player.removeSkill('yanxiao2');
game.log(player,'获得了',cards);
}, },
ai:{ ai:{
effect:{ effect:{
@ -2955,9 +2951,8 @@ character.sp={
} }
else{ else{
var target=result.targets[0]; var target=result.targets[0];
game.log(target,'获得了',player.storage.yinbing);
target.recover(); target.recover();
target.gain(player.storage.yinbing.slice(0),'gain2'); target.gain(player.storage.yinbing.slice(0),'gain2','log');
target.draw(player.storage.yinbing.length); target.draw(player.storage.yinbing.length);
player.storage.yinbing.length=0; player.storage.yinbing.length=0;
} }
@ -3931,8 +3926,7 @@ character.sp={
'step 1' 'step 1'
if(result.bool){ if(result.bool){
player.logSkill('bushi'); player.logSkill('bushi');
game.log(player,'获得了',result.links); trigger.player.gain(result.links[0],'draw2','log');
trigger.player.gain(result.links[0],'draw2');
player.storage.yishe.remove(result.links[0]); player.storage.yishe.remove(result.links[0]);
player.syncStorage('yishe'); player.syncStorage('yishe');
if(player.storage.yishe.length==0){ if(player.storage.yishe.length==0){
@ -4496,8 +4490,7 @@ character.sp={
} }
"step 2" "step 2"
if(result.bool){ if(result.bool){
game.log(player,'获得了',event.cards); player.gain(event.cards,'gain2','log');
player.gain(event.cards,'gain2');
} }
}, },
ai:{ ai:{

View File

@ -1671,7 +1671,7 @@ character.swd={
} }
"step 1" "step 1"
if(result.bool){ if(result.bool){
player.logSkill('fzhenwei'); player.logSkill('fzhenwei',result.targets);
game.log(result.targets[0],'获得了',event.cards); game.log(result.targets[0],'获得了',event.cards);
result.targets[0].gain(event.cards,'gain2'); result.targets[0].gain(event.cards,'gain2');
} }

View File

@ -8896,6 +8896,9 @@
if(player==game.me) ui.updatehl(); if(player==game.me) ui.updatehl();
broadcast(); broadcast();
} }
if(event.log){
game.log(player,'获得了',cards);
}
}, },
lose:function(){ lose:function(){
"step 0" "step 0"
@ -11358,6 +11361,9 @@
else if(get.itemtype(arguments[i])=='card'){ else if(get.itemtype(arguments[i])=='card'){
next.cards=[arguments[i]]; next.cards=[arguments[i]];
} }
else if(arguments[i]==='log'){
next.log=true;
}
else if(typeof arguments[i]=='string'){ else if(typeof arguments[i]=='string'){
next.animate=arguments[i]; next.animate=arguments[i];
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 133 KiB

After

Width:  |  Height:  |  Size: 149 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 KiB

After

Width:  |  Height:  |  Size: 111 KiB