Bug、AI修正
This commit is contained in:
parent
64b7d2f8f5
commit
18bc12a031
33
game/game.js
33
game/game.js
|
@ -1051,7 +1051,8 @@ 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);
|
||||||
}
|
}
|
||||||
player.gain(cards);
|
target.lose(cards,ui.special);
|
||||||
|
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'){
|
||||||
|
@ -1067,7 +1068,10 @@ window.play={};
|
||||||
else{
|
else{
|
||||||
target.$give(oths,player);
|
target.$give(oths,player);
|
||||||
}
|
}
|
||||||
game.delay();
|
"step 3"
|
||||||
|
game.delay(2);
|
||||||
|
"step 4"
|
||||||
|
player.gain(event.resultcards);
|
||||||
},
|
},
|
||||||
showHandcards:function(){
|
showHandcards:function(){
|
||||||
"step 0"
|
"step 0"
|
||||||
|
@ -1486,7 +1490,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);
|
event.source.lose(cards,ui.special);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
@ -2616,20 +2620,12 @@ 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(player==event.player){
|
if(event.small&&ai.get.attitude(player,to)>0){
|
||||||
if(event.small){
|
return -get.number(card)-ai.get.value(card)+addi;
|
||||||
return -get.number(card)-ai.get.value(card)/2+addi;
|
|
||||||
}
|
|
||||||
return get.number(card)-ai.get.value(card)/2+addi;
|
|
||||||
}
|
}
|
||||||
if(ai.get.attitude(player,_status.event.parent.player)>0){
|
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)/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;
|
||||||
|
@ -4377,8 +4373,8 @@ window.play={};
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(!event.revealed&&!get.info(event.skill).forced){
|
if(!event.revealed&&!get.info(event.skill).forced){
|
||||||
if(game.versusSwapControl&&get.info(event.skill).direct&&player.isUnderControl()){
|
if(get.info(event.skill).direct&&player.isUnderControl()){
|
||||||
game.versusSwapControl(player);
|
game.modeSwapPlayer(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)){
|
||||||
|
@ -7725,11 +7721,12 @@ 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');
|
||||||
|
|
Loading…
Reference in New Issue