Revert "Revert "Revert "Bug、AI修正"""

This reverts commit 304df6ee50.
This commit is contained in:
libccy 2015-05-01 16:38:22 +08:00
parent 7b3960a37a
commit 265eb73dc0
1 changed files with 18 additions and 15 deletions

View File

@ -1051,8 +1051,7 @@ window.play={};
for(var i=0;i<event.result.buttons.length;i++){ for(var i=0;i<event.result.buttons.length;i++){
cards.push(event.result.buttons[i].link); cards.push(event.result.buttons[i].link);
} }
target.lose(cards,ui.special); player.gain(cards);
event.resultcards=cards;
var hs=[],oths=[]; var hs=[],oths=[];
for(var i=0;i<cards.length;i++){ for(var i=0;i<cards.length;i++){
if(get.position(cards[i])=='h'){ if(get.position(cards[i])=='h'){
@ -1068,10 +1067,7 @@ window.play={};
else{ else{
target.$give(oths,player); target.$give(oths,player);
} }
"step 3" game.delay();
game.delay(2);
"step 4"
player.gain(event.resultcards);
}, },
showHandcards:function(){ showHandcards:function(){
"step 0" "step 0"
@ -1490,7 +1486,7 @@ window.play={};
if(cards){ if(cards){
event.source=get.owner(cards[0]); event.source=get.owner(cards[0]);
if(event.source){ if(event.source){
event.source.lose(cards,ui.special); event.source.lose(cards);
} }
} }
else{ else{
@ -2620,12 +2616,20 @@ window.play={};
else next.ai=function(card){ else next.ai=function(card){
var player=get.owner(card); var player=get.owner(card);
var event=_status.event.parent; var event=_status.event.parent;
var to=(player==event.player?event.target:event.player);
var addi=(ai.get.value(card)>=8&&get.type(card)!='equip')?-10:0; var addi=(ai.get.value(card)>=8&&get.type(card)!='equip')?-10:0;
if(event.small&&ai.get.attitude(player,to)>0){ if(player==event.player){
return -get.number(card)-ai.get.value(card)+addi; if(event.small){
return -get.number(card)-ai.get.value(card)/2+addi;
} }
return get.number(card)-ai.get.value(card)+addi; return get.number(card)-ai.get.value(card)/2+addi;
}
if(ai.get.attitude(player,_status.event.parent.player)>0){
if(event.small){
return get.number(card)-ai.get.value(card)/2+addi;
}
return -get.number(card)-ai.get.value(card)/2+addi;
}
return get.number(card)-ai.get.value(card)/2+addi;
} }
next.content=lib.element.playerproto.chooseToCompare; next.content=lib.element.playerproto.chooseToCompare;
return next; return next;
@ -4373,8 +4377,8 @@ window.play={};
return; return;
} }
if(!event.revealed&&!get.info(event.skill).forced){ if(!event.revealed&&!get.info(event.skill).forced){
if(get.info(event.skill).direct&&player.isUnderControl()){ if(game.versusSwapControl&&get.info(event.skill).direct&&player.isUnderControl()){
game.modeSwapPlayer(player); game.versusSwapControl(player);
event._result={bool:true}; event._result={bool:true};
} }
else if(get.info(event.skill).frequent&&!lib.config.autoskilllist.contains(event.skill)){ else if(get.info(event.skill).frequent&&!lib.config.autoskilllist.contains(event.skill)){
@ -7721,12 +7725,11 @@ window.play={};
return; return;
} }
var uiintro=this._poppedfunc(); var uiintro=this._poppedfunc();
if(!uiintro) return;
if(ui.currentpopped&&ui.currentpopped._uiintro){ if(ui.currentpopped&&ui.currentpopped._uiintro){
ui.currentpopped._uiintro.delete(); ui.currentpopped._uiintro.delete();
delete ui.currentpopped._uiintro; delete ui.currentpopped._uiintro;
_status.currentpopped=null;
} }
if(!uiintro) return;
ui.currentpopped=this; ui.currentpopped=this;
uiintro.classList.add('popped'); uiintro.classList.add('popped');
uiintro.classList.add('static'); uiintro.classList.add('static');