优化【纯刚】ai

This commit is contained in:
157 2024-03-17 12:14:56 +08:00
parent d124f8edd6
commit 8a75817f33
4 changed files with 41 additions and 8 deletions

View File

@ -369,7 +369,8 @@ game.import('card',function(lib,game,ui,get,ai,_status){
useful:4, useful:4,
value:10, value:10,
tag:{ tag:{
draw:2 draw:3,
discard:1
}, },
result:{ result:{
target:function(player,target){ target:function(player,target){

View File

@ -1089,7 +1089,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
value:7, value:7,
useful:1, useful:1,
tag:{ tag:{
draw:2 gain:1
}, },
result:{ result:{
target:function(player,target){ target:function(player,target){

View File

@ -407,7 +407,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
value:[6,1], value:[6,1],
useful:[3,1], useful:[3,1],
tag:{ tag:{
draw:1 draw:3
}, },
result:{ result:{
target:function(player,target){ target:function(player,target){
@ -551,7 +551,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
} }
}, },
tag:{ tag:{
draw:1, draw:1.2,
recover:0.5 recover:0.5
} }
} }

View File

@ -2278,6 +2278,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
twchungang:{ twchungang:{
audio:2, audio:2,
init: ()=>{
game.addGlobalSkill('twchungang_global');
},
onremove: player => {
if (!game.hasPlayer(i => {
return player !== i && i.hasSkill('twchungang');
}, true)) game.removeGlobalSkill('twchungang_global');
},
trigger:{global:['gainAfter','loseAsyncAfter']}, trigger:{global:['gainAfter','loseAsyncAfter']},
filter:function(event,player){ filter:function(event,player){
var evt=event.getParent('phaseDraw'); var evt=event.getParent('phaseDraw');
@ -2299,10 +2307,34 @@ game.import('character',function(lib,game,ui,get,ai,_status){
i.chooseToDiscard('he',true); i.chooseToDiscard('he',true);
} }
}, },
ai:{ subSkill: {
//能和一技能有配合但仍旧搅shi棍技能 global: {
threaten:3, trigger: {
player: 'dieAfter'
}, },
filter(event, player) {
return !game.hasPlayer(i => i.hasSkill('twchungang'), true)
},
silent: true,
forceDie: true,
charlotte: true,
content() {
game.removeGlobalSkill('twchungang_global');
},
ai: {
effect: {
target(card, player, target) {
if ((get.tag(card, 'gain') || 0) < 2 && (get.tag(card, 'draw') || 0) < 2) return;
let evt = _status.event.getParent('phaseDraw'), dis = game.countPlayer(i => {
return target !== i && i.hasSkill('twchungang');
});
if (!dis || evt && evt.player === target) return;
return [1, -dis];
}
}
}
}
}
}, },
//海外主公技 //海外主公技
//张鲁 //张鲁