parent
cdf6a46988
commit
6473848f06
|
@ -104,6 +104,11 @@ card.guozhan={
|
|||
target.chooseToDiscard(2,'he',true).ai=ai.get.disvalue;
|
||||
},
|
||||
ai:{
|
||||
wuxie:function(target,card,player,viewer){
|
||||
if(lib.config.mode=='guozhan'){
|
||||
return 0;
|
||||
}
|
||||
},
|
||||
basic:{
|
||||
useful:4,
|
||||
value:4,
|
||||
|
|
|
@ -113,7 +113,7 @@ character.refresh={
|
|||
}
|
||||
"step 2"
|
||||
if(result.bool){
|
||||
player.logSkill('guicai');
|
||||
player.logSkill('reguicai');
|
||||
if(trigger.player.judging.clone) trigger.player.judging.clone.delete();
|
||||
ui.discardPile.appendChild(trigger.player.judging);
|
||||
trigger.player.judging=result.cards[0];
|
||||
|
|
|
@ -1548,6 +1548,7 @@ character.sp={
|
|||
}
|
||||
},
|
||||
ai:{
|
||||
threaten:0.8,
|
||||
expose:0.1
|
||||
}
|
||||
},
|
||||
|
|
|
@ -1269,17 +1269,11 @@ character.xianjian={
|
|||
huimeng:{
|
||||
trigger:{player:'recoverAfter'},
|
||||
frequent:true,
|
||||
// filter:function(event,player){
|
||||
// if(event.cards){
|
||||
// for(var i=0;i<event.cards.length;i++){
|
||||
// if(get.color(event.cards[i])!='red') return false;
|
||||
// }
|
||||
// return true;
|
||||
// }
|
||||
// return false;
|
||||
// },
|
||||
content:function(){
|
||||
player.draw(2);
|
||||
},
|
||||
ai:{
|
||||
threaten:0.8
|
||||
}
|
||||
},
|
||||
tianshe:{
|
||||
|
|
|
@ -2091,7 +2091,7 @@ character.yijiang={
|
|||
var num=0;
|
||||
var cards=player.get('h');
|
||||
for(var i=0;i<cards.length;i++){
|
||||
num+=ai.get.value(cards[i]);
|
||||
num+=Math.max(0,ai.get.value(cards[i],player,'raw'));
|
||||
}
|
||||
num/=cards.length;
|
||||
num*=Math.min(cards.length,player.hp);
|
||||
|
@ -3079,11 +3079,13 @@ character.yijiang={
|
|||
"step 2"
|
||||
if(result.bool){
|
||||
player.storage.zyexin.remove(event.card);
|
||||
player.$give(event.card,result.targets[0]);
|
||||
game.delay();
|
||||
if(get.type(event.card)=='equip'){
|
||||
player.$give(event.card,result.targets[0]);
|
||||
result.targets[0].equip(event.card);
|
||||
}
|
||||
else if(get.type(event.card)=='delay'){
|
||||
player.$throw(event.card);
|
||||
result.targets[0].addJudge(event.card);
|
||||
}
|
||||
player.logSkill('zpaiyi',result.targets);
|
||||
|
|
|
@ -130,6 +130,7 @@ window.config={
|
|||
mode_config:'游戏模式',
|
||||
player_number_config:'角色个数',
|
||||
difficulty_config:'AI对人类态度',
|
||||
initshow_draw_config:'首亮摸牌',
|
||||
ai_strategy_config:'内奸策略',
|
||||
ai_identity_config:'身份预知',
|
||||
keep_max_hp_config:'锁定体力上限',
|
||||
|
@ -282,10 +283,13 @@ window.config={
|
|||
},
|
||||
show_identity:true,
|
||||
difficulty:'normal',
|
||||
dierestart:true
|
||||
},
|
||||
guozhan:{
|
||||
double_hp:'pingjun',
|
||||
difficulty:'normal',
|
||||
initshow_draw:0,
|
||||
dierestart:true
|
||||
}
|
||||
},
|
||||
|
||||
|
|
14
game/game.js
14
game/game.js
|
@ -1454,7 +1454,9 @@ window.play={};
|
|||
ui.clear();
|
||||
},
|
||||
draw:function(){
|
||||
if(event.log!=false){
|
||||
game.log(get.translation(player)+'摸了'+get.cnNumber(num)+'张牌');
|
||||
}
|
||||
var cards=get.cards(num);
|
||||
if(event.animate!=false){
|
||||
player.gain(cards,'draw');
|
||||
|
@ -5635,7 +5637,7 @@ window.play={};
|
|||
"step 0"
|
||||
var end=player;
|
||||
do{
|
||||
player.draw(num,false);
|
||||
player.draw(num,false).log=false;
|
||||
player=player.next;
|
||||
}
|
||||
while(player!=end);
|
||||
|
@ -5655,7 +5657,7 @@ window.play={};
|
|||
game.pause();
|
||||
"step 3"
|
||||
if(event.bool){
|
||||
game.me.lose(game.me.get('h'));
|
||||
game.me.lose(game.me.get('h'))._triggered=null;
|
||||
}
|
||||
else{
|
||||
event.dialog.close();
|
||||
|
@ -5664,7 +5666,7 @@ window.play={};
|
|||
}
|
||||
"step 4"
|
||||
game.delay();
|
||||
if(!game.me.skills.contains('yuling')) game.me.draw(num,false);
|
||||
game.me.gain(get.cards(4))._triggered=null;
|
||||
"step 5"
|
||||
event.goto(2);
|
||||
}
|
||||
|
@ -6533,6 +6535,9 @@ window.play={};
|
|||
if(i=='difficulty'&&lib.config.current_mode[i]==true){
|
||||
modeconfig.push(ui.create.switcher('difficulty',['easy','normal','hard'],get.config('difficulty'),ui.click.sidebar.difficulty));
|
||||
}
|
||||
else if(i=='initshow_draw'&&lib.config.current_mode[i]==true){
|
||||
modeconfig.push(ui.create.switcher('initshow_draw',[0,1,2],get.config('initshow_draw'),ui.click.sidebar.initshow_draw));
|
||||
}
|
||||
else if(i=='ai_strategy'&&lib.config.current_mode[i]==true){
|
||||
modeconfig.push(ui.create.switcher('ai_strategy',
|
||||
['ai_strategy_1','ai_strategy_2','ai_strategy_3','ai_strategy_4','ai_strategy_5','ai_strategy_6'],
|
||||
|
@ -8470,6 +8475,9 @@ window.play={};
|
|||
difficulty:function(bool){
|
||||
game.saveConfig('difficulty',bool,true);
|
||||
},
|
||||
initshow_draw:function(bool){
|
||||
game.saveConfig('initshow_draw',bool,true);
|
||||
},
|
||||
ai_strategy:function(strategy){
|
||||
game.saveConfig('ai_strategy',strategy,true);
|
||||
},
|
||||
|
|
|
@ -421,6 +421,14 @@ mode.guozhan={
|
|||
this.classList.remove('unseen2');
|
||||
break;
|
||||
}
|
||||
var initdraw=get.config('initshow_draw');
|
||||
if(!_status.initshown&&initdraw){
|
||||
this.popup('首亮');
|
||||
game.log(get.translation(this)+'首先明置武将,得到奖励');
|
||||
game.log(get.translation(this)+'摸了'+get.cnNumber(initdraw)+'张牌');
|
||||
this.draw(initdraw).log=false;
|
||||
_status.initshown=true;
|
||||
}
|
||||
for(var i=0;i<skills.length;i++){
|
||||
this.hiddenSkills.remove(skills[i]);
|
||||
this.addSkill(skills[i]);
|
||||
|
@ -431,14 +439,44 @@ mode.guozhan={
|
|||
next.player=this;
|
||||
next.content=function(){
|
||||
"step 0"
|
||||
player.chooseBool('是否摸一张牌?');
|
||||
player.chooseBool('你的武将有单独的阴阳鱼,是否摸一张牌?');
|
||||
"step 1"
|
||||
if(result.bool){
|
||||
player.draw();
|
||||
}
|
||||
}
|
||||
}
|
||||
if(this.perfectPair()){
|
||||
var next=game.createEvent('guozhanDraw');
|
||||
next.player=this;
|
||||
next.content=function(){
|
||||
"step 0"
|
||||
player.popup('珠联璧合');
|
||||
game.log(get.translation(player)+'发动了【珠联璧合】');
|
||||
if(player.hp==player.maxHp){
|
||||
player.draw(2);
|
||||
event.finish();
|
||||
}
|
||||
else{
|
||||
player.chooseControl('draw_card','recover_hp',function(){
|
||||
if(player.hp>=2||player.hp>=player.maxHp-1) return 'draw_card';
|
||||
if(player.hp==2&&player.num('h')==0) return 'draw_card';
|
||||
return 'recover_hp';
|
||||
},ui.create.dialog('hidden','珠联璧合:选择一项奖励'));
|
||||
}
|
||||
"step 1"
|
||||
if(result.control=='draw_card'){
|
||||
player.draw(2);
|
||||
}
|
||||
else{
|
||||
player.recover();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
perfectPair:function(){
|
||||
return false;
|
||||
},
|
||||
siege:function(player){
|
||||
if(game.players.length==2) return false;
|
||||
|
@ -683,6 +721,7 @@ mode.guozhan={
|
|||
},
|
||||
config:{
|
||||
player_number:true,
|
||||
initshow_draw:true,
|
||||
free_choose:true,
|
||||
change_choice:true,
|
||||
change_card:true,
|
||||
|
|
Loading…
Reference in New Issue