戚乱、窃听、智囊修正,木牛AI
This commit is contained in:
parent
c486dec226
commit
4705ff37db
|
@ -132,13 +132,16 @@ card.refresh={
|
|||
var dialog=ui.create.dialog('木牛流马',player.get('e','5').cards);
|
||||
var trigger=event.parent.parent;
|
||||
player.chooseButton(dialog,function(button){
|
||||
if(get.type(button.link)=='delay') return -1;
|
||||
if(get.type(button.link)=='equip'){
|
||||
var current=player.get('e',{subtype:get.subtype(button.link)})[0];
|
||||
if(current&&ai.get.equipValue(current)>=ai.get.equipValue(button.link)) return -1;
|
||||
return 1;
|
||||
if(get.info(button.link).selectTarget==-1){
|
||||
if(get.type(button.link)=='delay') return -1;
|
||||
if(get.type(button.link)=='equip'){
|
||||
var current=player.get('e',{subtype:get.subtype(button.link)})[0];
|
||||
if(current&&ai.get.equipValue(current)>=ai.get.equipValue(button.link)) return -1;
|
||||
return 1;
|
||||
}
|
||||
if(get.tag(button.link,'multitarget')) return -1;
|
||||
if(button.link.name=='huoshaolianying') return -1;
|
||||
}
|
||||
if(get.tag(button.link,'multitarget')) return -1;
|
||||
return 1;
|
||||
}).filterButton=function(button){
|
||||
return trigger.filterCard(button.link,player,trigger);
|
||||
|
|
|
@ -424,12 +424,15 @@ character.jiange={
|
|||
event.cards2.push(event.cards[i]);
|
||||
}
|
||||
}
|
||||
if(event.cards2.length==0){
|
||||
if(!event.isMine()){
|
||||
player.showCards(event.cards);
|
||||
event.target=player;
|
||||
}
|
||||
"step 1"
|
||||
if(event.cards2.length==0){
|
||||
event.finish();
|
||||
}
|
||||
else{
|
||||
var dialog=ui.create.dialog('将三张牌中的锦囊牌或装备牌交给一名角色');
|
||||
var dialog=ui.create.dialog('将三张牌中的锦囊牌或装备牌交给一名角色','hidden');
|
||||
dialog.add(event.cards);
|
||||
for(var i=0;i<dialog.buttons.length;i++){
|
||||
if(event.cards2.contains(dialog.buttons[i].link)){
|
||||
|
@ -442,7 +445,7 @@ character.jiange={
|
|||
var next=player.chooseTarget(true,dialog);
|
||||
next.ai=function(target){
|
||||
if(player.num('j','lebu')){
|
||||
if(target==player) return 0;
|
||||
if(target==player) return 0.1;
|
||||
}
|
||||
var att=ai.get.attitude(player,target);
|
||||
if(player.num('h')>player.hp){
|
||||
|
@ -451,16 +454,13 @@ character.jiange={
|
|||
if(target==player) return att+5;
|
||||
return att;
|
||||
}
|
||||
if(!event.isMine()){
|
||||
dialog.style.display='none';
|
||||
}
|
||||
}
|
||||
"step 1"
|
||||
"step 2"
|
||||
if(result&&result.targets&&result.targets.length){
|
||||
event.target=result.targets[0];
|
||||
}
|
||||
if(event.cards2.length){
|
||||
event.target.gain(event.cards2,'gain');
|
||||
event.target.gain(event.cards2,'gain2');
|
||||
}
|
||||
},
|
||||
ai:{
|
||||
|
|
|
@ -980,23 +980,38 @@ character.sp={
|
|||
trigger:{source:'dieAfter'},
|
||||
forced:true,
|
||||
priority:-10,
|
||||
content:function(){
|
||||
if(_status.currentPhase!=trigger.player){
|
||||
player.addSkill('qiluan2')
|
||||
}
|
||||
else{
|
||||
player.draw(3);
|
||||
}
|
||||
silent:true,
|
||||
popup:false,
|
||||
filter:function(event){
|
||||
return _status.currentPhase!=event.player;
|
||||
},
|
||||
content:function(){
|
||||
player.storage.qiluan=true;
|
||||
},
|
||||
group:['qiluan2','qiluan3']
|
||||
},
|
||||
qiluan2:{
|
||||
trigger:{global:'phaseAfter'},
|
||||
forced:true,
|
||||
filter:function(event,player){
|
||||
return player.storage.qiluan?true:false;
|
||||
},
|
||||
content:function(){
|
||||
player.draw(3);
|
||||
player.removeSkill('qiluan2');
|
||||
player.storage.qiluan=false;
|
||||
}
|
||||
},
|
||||
qiluan3:{
|
||||
trigger:{source:'dieAfter'},
|
||||
forced:true,
|
||||
priority:-10,
|
||||
filter:function(event){
|
||||
return _status.currentPhase==event.player;
|
||||
},
|
||||
content:function(){
|
||||
player.draw(3);
|
||||
},
|
||||
},
|
||||
shangyi:{
|
||||
enable:'phaseUse',
|
||||
usable:1,
|
||||
|
|
|
@ -1001,6 +1001,7 @@ character.yijiang={
|
|||
},
|
||||
qieting:{
|
||||
global:'qieting2',
|
||||
globalSilent:true,
|
||||
trigger:{global:'phaseEnd'},
|
||||
filter:function(event,player){
|
||||
return event.player!=player&&!event.player.tempSkills['qieting3'];
|
||||
|
|
|
@ -303,6 +303,16 @@ mode.guozhan={
|
|||
ifo.init(game.players[i]);
|
||||
game.players[i].initedSkills.push(game.players[i].hiddenSkills[j]);
|
||||
}
|
||||
if(ifo.globalSilent){
|
||||
if(typeof ifo.global=='string'){
|
||||
lib.skill.global.add(ifo.global);
|
||||
}
|
||||
else{
|
||||
for(var j=0;j<ifo.global.length;j++){
|
||||
lib.skill.global.add(ifo.global[j]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// ui.auto.show();
|
||||
|
@ -422,7 +432,7 @@ mode.guozhan={
|
|||
break;
|
||||
}
|
||||
var initdraw=get.config('initshow_draw');
|
||||
if(!_status.initshown&&initdraw){
|
||||
if(!_status.initshown&&initdraw&&this.isAlive()){
|
||||
this.popup('首亮');
|
||||
game.log(get.translation(this)+'首先明置武将,得到奖励');
|
||||
game.log(get.translation(this)+'摸了'+get.cnNumber(initdraw)+'张牌');
|
||||
|
|
Loading…
Reference in New Issue