This commit is contained in:
parent
c88e83999e
commit
80b5c5e7c2
|
@ -533,8 +533,16 @@ card.standard={
|
|||
contentAfter:function(){
|
||||
for(var i=0;i<ui.dialogs.length;i++){
|
||||
if(ui.dialogs[i].videoId==event.preResult){
|
||||
ui.dialogs[i].close();
|
||||
_status.dieClose.remove(ui.dialogs[i]);
|
||||
var dialog=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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ character.diy={
|
|||
diy_liufu:['male','wei',3,['zhucheng','duoqi']],
|
||||
diy_xizhenxihong:['male','shu',3,['fuchou','jinyan']],
|
||||
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_tianyu:['male','wei',3,['chezhen','youzhan']],
|
||||
},
|
||||
|
@ -32,12 +32,41 @@ character.diy={
|
|||
liangce:{
|
||||
enable:'phaseUse',
|
||||
viewAs:{name:'wugu'},
|
||||
usable:1,
|
||||
filterCard:{type:'basic'},
|
||||
filter:function(event,player){
|
||||
return player.num('h',{type:'basic'})>0;
|
||||
},
|
||||
check:function(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:{
|
||||
|
@ -72,14 +101,25 @@ character.diy={
|
|||
}
|
||||
game.delay();
|
||||
}
|
||||
else{
|
||||
event.finish();
|
||||
}
|
||||
"step 2"
|
||||
player.logSkill('jianbi',event.targets);
|
||||
},
|
||||
ai:{
|
||||
effect:{
|
||||
target:function(card,player,target){
|
||||
if(get.tag(card,'multitarget')&&!get.info(card).multitarget){
|
||||
return [1,1];
|
||||
if(get.tag(card,'multitarget')){
|
||||
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)];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -329,8 +329,7 @@ character.gujian={
|
|||
}
|
||||
}
|
||||
if(cards.length){
|
||||
player.gain(cards,'gain2');
|
||||
game.log(player,'获得了',cards);
|
||||
player.gain(cards,'gain2','log');
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -1894,9 +1894,8 @@ character.hearth={
|
|||
}
|
||||
cards2.push(game.createCard(list.randomGet()));
|
||||
}
|
||||
player.gain(cards2);
|
||||
player.gain(cards2,'log');
|
||||
player.$draw(cards2);
|
||||
game.log(player,'获得了',cards2);
|
||||
},
|
||||
ai:{
|
||||
order:8,
|
||||
|
@ -1996,8 +1995,7 @@ character.hearth={
|
|||
};
|
||||
'step 1'
|
||||
if(result.bool){
|
||||
player.gain(player.storage.xunbao2,'gain2');
|
||||
game.log(player,'获得了',player.storage.xunbao2);
|
||||
player.gain(player.storage.xunbao2,'gain2','log');
|
||||
delete player.storage.xunbao2;
|
||||
player.removeSkill('xunbao2');
|
||||
}
|
||||
|
@ -3343,8 +3341,7 @@ character.hearth={
|
|||
return get.type(card)==type;
|
||||
});
|
||||
if(card){
|
||||
player.gain(card,'gain2');
|
||||
game.log(player,'获得了',card);
|
||||
player.gain(card,'gain2','log');
|
||||
}
|
||||
},
|
||||
ai:{
|
||||
|
|
|
@ -360,9 +360,15 @@ window.characterRank={
|
|||
'pal_lixiaoyao',
|
||||
'sunjian',
|
||||
'pangtong',
|
||||
'caochun',
|
||||
'diy_tianyu',
|
||||
'diy_liuzan',
|
||||
'diy_zaozhirenjun',
|
||||
'diy_yangyi',
|
||||
],
|
||||
b:[
|
||||
'caochun',
|
||||
'diy_liufu',
|
||||
'diy_xizhenxihong',
|
||||
'old_zhuran',
|
||||
'old_lingtong',
|
||||
'sp_pangde',
|
||||
|
|
|
@ -244,8 +244,7 @@ character.refresh={
|
|||
content:function(){
|
||||
"step 0"
|
||||
var cards=get.cards();
|
||||
player.gain(cards,'gain2');
|
||||
game.log(player,'获得了',cards);
|
||||
player.gain(cards,'gain2','log');
|
||||
if(get.type(cards[0])!='basic'){
|
||||
event.finish();
|
||||
}
|
||||
|
@ -805,9 +804,8 @@ character.refresh={
|
|||
}
|
||||
else if(result.targets){
|
||||
player.line(result.targets,'green');
|
||||
result.targets[0].gain(event.card);
|
||||
result.targets[0].gain(event.card,'log');
|
||||
event.node.moveDelete(result.targets[0]);
|
||||
game.log(result.targets[0],'获得了',event.card);
|
||||
game.addVideo('gain2',result.targets[0],[get.cardInfo(event.node)]);
|
||||
game.broadcast(function(card,target){
|
||||
ui.arena.classList.remove('thrownhighlight');
|
||||
|
|
|
@ -1029,6 +1029,7 @@ character.shenhua={
|
|||
}
|
||||
}
|
||||
},
|
||||
locked:false,
|
||||
ai:{
|
||||
effect:{
|
||||
target:function(card,player,target,current){
|
||||
|
|
|
@ -628,15 +628,13 @@ character.sp={
|
|||
var undone=false;
|
||||
if(num==0){
|
||||
if(event.basic.length){
|
||||
result.targets[0].gain(event.basic,'gain2');
|
||||
game.log(result.targets[0],'获得了',event.basic);
|
||||
result.targets[0].gain(event.basic,'gain2','log');
|
||||
}
|
||||
}
|
||||
else{
|
||||
if(result.bool){
|
||||
if(event.basic.length){
|
||||
player.gain(event.basic,'gain2');
|
||||
game.log(player,'获得了',event.basic);
|
||||
player.gain(event.basic,'gain2','log');
|
||||
}
|
||||
}
|
||||
else{
|
||||
|
@ -652,8 +650,7 @@ character.sp={
|
|||
}
|
||||
'step 3'
|
||||
if(player.storage.zhaolie.isAlive()){
|
||||
game.log(player.storage.zhaolie,'获得了',event.basic);
|
||||
player.storage.zhaolie.gain(event.basic,'gain2');
|
||||
player.storage.zhaolie.gain(event.basic,'gain2','log');
|
||||
}
|
||||
else{
|
||||
for(var i=0;i<event.basic.length;i++){
|
||||
|
@ -2463,10 +2460,9 @@ character.sp={
|
|||
forced:true,
|
||||
content:function(){
|
||||
var cards=player.storage.yanxiao2.concat(player.get('j'));
|
||||
player.gain(cards,'gain2');
|
||||
player.gain(cards,'gain2','log');
|
||||
delete player.storage.yanxiao2;
|
||||
player.removeSkill('yanxiao2');
|
||||
game.log(player,'获得了',cards);
|
||||
},
|
||||
ai:{
|
||||
effect:{
|
||||
|
@ -2955,9 +2951,8 @@ character.sp={
|
|||
}
|
||||
else{
|
||||
var target=result.targets[0];
|
||||
game.log(target,'获得了',player.storage.yinbing);
|
||||
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);
|
||||
player.storage.yinbing.length=0;
|
||||
}
|
||||
|
@ -3931,8 +3926,7 @@ character.sp={
|
|||
'step 1'
|
||||
if(result.bool){
|
||||
player.logSkill('bushi');
|
||||
game.log(player,'获得了',result.links);
|
||||
trigger.player.gain(result.links[0],'draw2');
|
||||
trigger.player.gain(result.links[0],'draw2','log');
|
||||
player.storage.yishe.remove(result.links[0]);
|
||||
player.syncStorage('yishe');
|
||||
if(player.storage.yishe.length==0){
|
||||
|
@ -4496,8 +4490,7 @@ character.sp={
|
|||
}
|
||||
"step 2"
|
||||
if(result.bool){
|
||||
game.log(player,'获得了',event.cards);
|
||||
player.gain(event.cards,'gain2');
|
||||
player.gain(event.cards,'gain2','log');
|
||||
}
|
||||
},
|
||||
ai:{
|
||||
|
|
|
@ -1671,7 +1671,7 @@ character.swd={
|
|||
}
|
||||
"step 1"
|
||||
if(result.bool){
|
||||
player.logSkill('fzhenwei');
|
||||
player.logSkill('fzhenwei',result.targets);
|
||||
game.log(result.targets[0],'获得了',event.cards);
|
||||
result.targets[0].gain(event.cards,'gain2');
|
||||
}
|
||||
|
|
|
@ -8896,6 +8896,9 @@
|
|||
if(player==game.me) ui.updatehl();
|
||||
broadcast();
|
||||
}
|
||||
if(event.log){
|
||||
game.log(player,'获得了',cards);
|
||||
}
|
||||
},
|
||||
lose:function(){
|
||||
"step 0"
|
||||
|
@ -11358,6 +11361,9 @@
|
|||
else if(get.itemtype(arguments[i])=='card'){
|
||||
next.cards=[arguments[i]];
|
||||
}
|
||||
else if(arguments[i]==='log'){
|
||||
next.log=true;
|
||||
}
|
||||
else if(typeof arguments[i]=='string'){
|
||||
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 |
Loading…
Reference in New Issue