This commit is contained in:
parent
0ada36f702
commit
a55fb8c5e7
|
@ -176,7 +176,7 @@ character.diy={
|
||||||
},
|
},
|
||||||
content:function(){
|
content:function(){
|
||||||
// if(player!=target) player.draw();
|
// if(player!=target) player.draw();
|
||||||
var list=game.players.slice(0);
|
var list=game.filterPlayer();
|
||||||
get.sortSeat(list,target);
|
get.sortSeat(list,target);
|
||||||
target.useCard({name:'diaobingqianjiang'},list);
|
target.useCard({name:'diaobingqianjiang'},list);
|
||||||
},
|
},
|
||||||
|
@ -185,12 +185,9 @@ character.diy={
|
||||||
result:{
|
result:{
|
||||||
player:function(player,target){
|
player:function(player,target){
|
||||||
if(ai.get.attitude(player,target)<=1) return 0;
|
if(ai.get.attitude(player,target)<=1) return 0;
|
||||||
var num=0;
|
return game.countPlayer(function(current){
|
||||||
for(var i=0;i<game.players.length;i++){
|
return ai.get.effect(current,{name:'diaobingqianjiang'},target,player);
|
||||||
num+=ai.get.effect(game.players[i],{name:'diaobingqianjiang'},target,player);
|
});
|
||||||
}
|
|
||||||
// if(player==target) return num/2;
|
|
||||||
return num;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -660,22 +657,24 @@ character.diy={
|
||||||
trigger:{player:'phaseEnd'},
|
trigger:{player:'phaseEnd'},
|
||||||
frequent:true,
|
frequent:true,
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
var num=0;
|
|
||||||
var list=['wei','shu','wu','qun'];
|
var list=['wei','shu','wu','qun'];
|
||||||
for(var i=0;i<game.players.length&&list.length;i++){
|
var players=game.filterPlayer();
|
||||||
if(list.contains(game.players[i].group)){
|
var num=0;
|
||||||
list.remove(game.players[i].group);
|
for(var i=0;i<players.length&&list.length;i++){
|
||||||
|
if(list.contains(players[i].group)){
|
||||||
|
list.remove(players[i].group);
|
||||||
num++;
|
num++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return player.num('h')<num;
|
return player.num('h')<num;
|
||||||
},
|
},
|
||||||
content:function(){
|
content:function(){
|
||||||
var num=0;
|
|
||||||
var list=['wei','shu','wu','qun'];
|
var list=['wei','shu','wu','qun'];
|
||||||
for(var i=0;i<game.players.length&&list.length;i++){
|
var players=game.filterPlayer();
|
||||||
if(list.contains(game.players[i].group)){
|
var num=0;
|
||||||
list.remove(game.players[i].group);
|
for(var i=0;i<players.length&&list.length;i++){
|
||||||
|
if(list.contains(players[i].group)){
|
||||||
|
list.remove(players[i].group);
|
||||||
num++;
|
num++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1165,14 +1164,15 @@ character.diy={
|
||||||
frequent:true,
|
frequent:true,
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
var list=[];
|
var list=[];
|
||||||
for(var i=0;i<game.players.length;i++){
|
var players=game.filterPlayer();
|
||||||
if(player!=game.players[i]) list.add(game.players[i].group);
|
for(var i=0;i<players.length;i++){
|
||||||
|
if(player!=players[i]) list.add(players[i].group);
|
||||||
}
|
}
|
||||||
list.remove('unknown');
|
list.remove('unknown');
|
||||||
for(var i=0;i<game.players.length;i++){
|
for(var i=0;i<players.length;i++){
|
||||||
if(game.players[i]!=player){
|
if(players[i]!=player){
|
||||||
if(lib.filter.targetInRange({name:'sha'},game.players[i],player)){
|
if(lib.filter.targetInRange({name:'sha'},players[i],player)){
|
||||||
list.remove(game.players[i].group);
|
list.remove(players[i].group);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1180,14 +1180,15 @@ character.diy={
|
||||||
},
|
},
|
||||||
content:function(){
|
content:function(){
|
||||||
var list=[];
|
var list=[];
|
||||||
for(var i=0;i<game.players.length;i++){
|
var players=game.filterPlayer();
|
||||||
if(player!=game.players[i]) list.add(game.players[i].group);
|
for(var i=0;i<players.length;i++){
|
||||||
|
if(player!=players[i]) list.add(players[i].group);
|
||||||
}
|
}
|
||||||
list.remove('unknown');
|
list.remove('unknown');
|
||||||
for(var i=0;i<game.players.length;i++){
|
for(var i=0;i<players.length;i++){
|
||||||
if(game.players[i]!=player){
|
if(players[i]!=player){
|
||||||
if(lib.filter.targetInRange({name:'sha'},game.players[i],player)){
|
if(lib.filter.targetInRange({name:'sha'},players[i],player)){
|
||||||
list.remove(game.players[i].group);
|
list.remove(players[i].group);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,20 +23,19 @@ character.extra={
|
||||||
// event.count=trigger.cards.length-1;
|
// event.count=trigger.cards.length-1;
|
||||||
event.count=1;
|
event.count=1;
|
||||||
}
|
}
|
||||||
var recover=0,lose=0;
|
var recover=0,lose=0,players=game.filterPlayer;
|
||||||
for(var i=0;i<game.players.length;i++){
|
for(var i=0;i<players.length;i++){
|
||||||
if(!game.players[i].isOut()){
|
if(players[i].hp<players[i].maxHp){
|
||||||
if(game.players[i].hp<game.players[i].maxHp){
|
if(ai.get.attitude(player,players[i])>0){
|
||||||
if(ai.get.attitude(player,game.players[i])>0){
|
if(players[i].hp<2){
|
||||||
if(game.players[i].hp<2){
|
|
||||||
lose--;
|
lose--;
|
||||||
recover+=0.5;
|
recover+=0.5;
|
||||||
}
|
}
|
||||||
lose--;
|
lose--;
|
||||||
recover++;
|
recover++;
|
||||||
}
|
}
|
||||||
else if(ai.get.attitude(player,game.players[i])<0){
|
else if(ai.get.attitude(player,players[i])<0){
|
||||||
if(game.players[i].hp<2){
|
if(players[i].hp<2){
|
||||||
lose++;
|
lose++;
|
||||||
recover-=0.5;
|
recover-=0.5;
|
||||||
}
|
}
|
||||||
|
@ -45,15 +44,14 @@ character.extra={
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
if(ai.get.attitude(player,game.players[i])>0){
|
if(ai.get.attitude(player,players[i])>0){
|
||||||
lose--;
|
lose--;
|
||||||
}
|
}
|
||||||
else if(ai.get.attitude(player,game.players[i])<0){
|
else if(ai.get.attitude(player,players[i])<0){
|
||||||
lose++;
|
lose++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
var prompt=get.prompt('qinyin')+'(剩余'+get.cnNumber(event.count)+'次)';
|
var prompt=get.prompt('qinyin')+'(剩余'+get.cnNumber(event.count)+'次)';
|
||||||
player.chooseControl('失去体力','回复体力','cancel2',
|
player.chooseControl('失去体力','回复体力','cancel2',
|
||||||
ui.create.dialog(get.prompt('qinyin'),'hidden')).ai=function(){
|
ui.create.dialog(get.prompt('qinyin'),'hidden')).ai=function(){
|
||||||
|
@ -177,14 +175,11 @@ character.extra={
|
||||||
order:10,
|
order:10,
|
||||||
result:{
|
result:{
|
||||||
player:function(player){
|
player:function(player){
|
||||||
var num=0;
|
return game.countPlayer(function(current){
|
||||||
for(var i=0;i<game.players.length;i++){
|
if(current!=player){
|
||||||
if(game.players[i]!=player){
|
return get.sgn(ai.get.damageEffect(current,player,player));
|
||||||
if(game.players[i].ai.shown==0) return 0;
|
|
||||||
num+=ai.get.damageEffect(game.players[i],player,player)>0?1:-1;
|
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
return num;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -206,14 +201,13 @@ character.extra={
|
||||||
if(!player.storage.shenfen) return 0;
|
if(!player.storage.shenfen) return 0;
|
||||||
var cards=player.get('h','sha');
|
var cards=player.get('h','sha');
|
||||||
if(cards.length){
|
if(cards.length){
|
||||||
for(var i=0;i<game.players.length;i++){
|
if(game.hasPlayer(function(current){
|
||||||
if(player.canUse('sha',game.players[i])&&
|
return (player.canUse('sha',current)&&
|
||||||
ai.get.effect(game.players[i],cards[0],player,player)>0&&
|
ai.get.effect(current,cards[0],player,player)>0&¤t.hasShan());
|
||||||
game.players[i].num('h','shan')){
|
})){
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -522,19 +516,15 @@ character.extra={
|
||||||
trigger:{player:'damageEnd'},
|
trigger:{player:'damageEnd'},
|
||||||
check:function(event,player){
|
check:function(event,player){
|
||||||
if(player.isTurnedOver()) return true;
|
if(player.isTurnedOver()) return true;
|
||||||
var num=0;
|
var num=game.countPlayer(function(current){
|
||||||
for(var i=0;i<game.players.length;i++){
|
if(current.num('he')&¤t!=player&&ai.get.attitude(player,current)<=0){
|
||||||
if(game.players[i].num('he')&&game.players[i]!=player&&
|
return true;
|
||||||
ai.get.attitude(player,game.players[i])<=0){
|
|
||||||
num++;
|
|
||||||
}
|
}
|
||||||
if(game.players[i].num('j')&&game.players[i]!=player&&
|
if(current.num('j')&¤t!=player&&ai.get.attitude(player,current)>0){
|
||||||
ai.get.attitude(player,game.players[i])>0){
|
return true;
|
||||||
num++;
|
|
||||||
}
|
}
|
||||||
if(num>=2) return true;
|
});
|
||||||
}
|
return num>=2;
|
||||||
return false;
|
|
||||||
},
|
},
|
||||||
content:function(){
|
content:function(){
|
||||||
"step 0"
|
"step 0"
|
||||||
|
@ -572,25 +562,22 @@ character.extra={
|
||||||
target:function(card,player,target){
|
target:function(card,player,target){
|
||||||
if(get.tag(card,'damage')){
|
if(get.tag(card,'damage')){
|
||||||
if(player.hasSkill('jueqing')) return [1,-2];
|
if(player.hasSkill('jueqing')) return [1,-2];
|
||||||
if(target.hp==1) return;
|
if(target.hp==1) return 0.8;
|
||||||
if(target.isTurnedOver()) return [0,3];
|
if(target.isTurnedOver()) return [0,3];
|
||||||
var num=0;
|
var num=game.countPlayer(function(current){
|
||||||
for(var i=0;i<game.players.length;i++){
|
if(current.num('he')&¤t!=player&&ai.get.attitude(player,current)<=0){
|
||||||
if(game.players[i].num('he')&&game.players[i]!=player&&
|
return true;
|
||||||
ai.get.attitude(player,game.players[i])<=0){
|
|
||||||
num++;
|
|
||||||
}
|
}
|
||||||
if(game.players[i].num('j')&&game.players[i]!=player&&
|
if(current.num('j')&¤t!=player&&ai.get.attitude(player,current)>0){
|
||||||
ai.get.attitude(player,game.players[i])>0){
|
return true;
|
||||||
num++;
|
|
||||||
}
|
}
|
||||||
|
});
|
||||||
if(num>2) return [0,1];
|
if(num>2) return [0,1];
|
||||||
if(num==2) return [0.5,1];
|
if(num==2) return [0.5,1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
},
|
},
|
||||||
qixing:{
|
qixing:{
|
||||||
audio:2,
|
audio:2,
|
||||||
|
@ -696,7 +683,7 @@ character.extra={
|
||||||
content:function(){
|
content:function(){
|
||||||
"step 0"
|
"step 0"
|
||||||
player.chooseTarget('选择角色获得大雾标记',
|
player.chooseTarget('选择角色获得大雾标记',
|
||||||
[1,Math.min(game.players.length,player.storage.qixing.length)]).ai=function(target){
|
[1,Math.min(game.countPlayer(),player.storage.qixing.length)]).ai=function(target){
|
||||||
if(target.isMin()) return 0;
|
if(target.isMin()) return 0;
|
||||||
if(target.hasSkill('biantian2')) return 0;
|
if(target.hasSkill('biantian2')) return 0;
|
||||||
var att=ai.get.attitude(player,target);
|
var att=ai.get.attitude(player,target);
|
||||||
|
@ -886,14 +873,7 @@ character.extra={
|
||||||
target:function(player,target){
|
target:function(player,target){
|
||||||
if(target.hasSkillTag('nofire')) return 0;
|
if(target.hasSkillTag('nofire')) return 0;
|
||||||
if(lib.config.mode=='versus') return -1;
|
if(lib.config.mode=='versus') return -1;
|
||||||
for(var i=0;i<game.players.length;i++){
|
if(player.hasUnknown()) return 0;
|
||||||
if(lib.config.mode=='identity'){
|
|
||||||
if(game.players[i].ai.shown<=0.2) return 0;
|
|
||||||
}
|
|
||||||
else if(lib.config.mode=='guozhan'){
|
|
||||||
if(game.players[i].identity=='unknown') return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ai.get.damageEffect(target,player);
|
return ai.get.damageEffect(target,player);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,7 @@ character.ow={
|
||||||
// ow_baolei:['male','qun',4,[]],
|
// ow_baolei:['male','qun',4,[]],
|
||||||
ow_banzang:['male','qun',4,['fengshi','yinbo']],
|
ow_banzang:['male','qun',4,['fengshi','yinbo']],
|
||||||
ow_laiyinhate:['male','qun',4,['zhongdun','mengji']],
|
ow_laiyinhate:['male','qun',4,['zhongdun','mengji']],
|
||||||
ow_luba:['male','shu',5,['liangou','xiyang']],
|
ow_luba:['male','shu',4,['liangou','xiyang']],
|
||||||
// ow_wensidun:['male','shu',4,[]],
|
// ow_wensidun:['male','shu',4,[]],
|
||||||
// ow_zhaliya:['female','shu',4,['pingzhang','lichang']],
|
// ow_zhaliya:['female','shu',4,['pingzhang','lichang']],
|
||||||
ow_heiying:['female','wei',3,['qinru','yinshen','maichong']],
|
ow_heiying:['female','wei',3,['qinru','yinshen','maichong']],
|
||||||
|
|
Loading…
Reference in New Issue