This commit is contained in:
libccy 2017-02-26 09:44:20 +08:00
parent 124e82a11b
commit c8b894ac5b
4 changed files with 125 additions and 15 deletions

View File

@ -773,6 +773,7 @@ card.guozhan={
result:{
player:function(player,target){
if(target.isUnseen()) return 0;
if(player.isMajor()) return 0;
return 0.5;
},
target:function(player,target){

View File

@ -1090,19 +1090,24 @@ character.shenhua={
ai:{
effect:{
target:function(card,player,target,current){
if(!target.hasFriend()) return;
if(!target.hasFriend()&&!player.hasUnknown()) return;
if(_status.currentPhase==target) return;
if(get.tag(card,'loseCard')&&target.num('he')){
if(target.hasSkill('ziliang')) return 0.7;
return [0.5,Math.max(2,target.num('h'))];
}
if(target.isUnderControl(true,player)){
if(get.tag(card,'respondSha')&&player.num('h','sha')) return [0.5,1];
if(get.tag(card,'respondShan')&&player.num('h','shan')) return [0.5,1];
if((get.tag(card,'respondSha')&&target.num('h','sha'))||
(get.tag(card,'respondShan')&&target.num('h','shan'))){
if(target.hasSkill('ziliang')) return 0.7;
return [0.5,1];
}
}
else if(get.tag(card,'respondSha')||get.tag(card,'respondShan')){
if(ai.get.attitude(player,target)>0&&card.name=='juedou') return;
if(target.num('h')==0) return 2;
return [0.5,target.num('h','sha')+target.num('h','shan')];
if(target.hasSkill('ziliang')) return 0.7;
return [0.5,Math.max(target.num('h')/4,target.num('h','sha')+target.num('h','shan'))];
}
}
},
@ -1146,7 +1151,8 @@ character.shenhua={
viewAs:{name:'shunshou'},
cards:links,
onuse:function(result,player){
result.cards=lib.skill.jixi_backup.cards;
console.log(result.skill);
result.cards=lib.skill[result.skill].cards;
var card=result.cards[0];
player.storage.tuntian.remove(card);
player.syncStorage('tuntian');
@ -1251,13 +1257,13 @@ character.shenhua={
content:function(){
"step 0"
if(target.storage.hunzi){
target.chooseBool('是否拒绝制霸拼点?').set('choice',ai.get.attitude(target,player)<=0);
target.chooseControl('拒绝','不拒绝').set('prompt','是否拒绝制霸拼点?').set('choice',ai.get.attitude(target,player)<=0);
}
else{
event.forced=true;
}
"step 1"
if(!event.forced&&result.bool){
if(!event.forced&&result.control=='拒绝'){
game.log(target,'拒绝了拼点');
target.chat('拒绝');
event.finish();
@ -3370,7 +3376,7 @@ character.shenhua={
content:function(){
"step 0"
var check= player.num('h')>2;
player.chooseTarget(get.prompt('xinshensu'),function(card,player,target){
player.chooseTarget(get.prompt('shensu'),function(card,player,target){
if(player==target) return false;
return player.canUse({name:'sha'},target,false);
}).set('check',check).set('ai',function(target){
@ -3397,7 +3403,7 @@ character.shenhua={
"step 0"
var check=player.needsToDiscard();
player.chooseCardTarget({
prompt:get.prompt('xinshensu'),
prompt:get.prompt('shensu'),
filterCard:function(card,player){
return get.type(card)=='equip'&&lib.filter.cardDiscardable(card,player)
},
@ -3433,7 +3439,7 @@ character.shenhua={
content:function(){
"step 0"
var check=player.needsToDiscard()||player.isTurnedOver();
player.chooseTarget(get.prompt('xinshensu'),function(card,player,target){
player.chooseTarget(get.prompt('shensu'),function(card,player,target){
if(player==target) return false;
return player.canUse({name:'sha'},target,false);
}).set('check',check).set('ai',function(target){

View File

@ -7533,9 +7533,6 @@ character.sp={
player.discardPlayerCard(true,result.targets[0],'hej');
}
},
ai:{
threaten:1.2
}
},
tianming:{
audio:2,

View File

@ -232,8 +232,8 @@ mode.guozhan={
gz_panfeng:['male','qun',4,['kuangfu']],
gz_zoushi:['female','qun',3,['huoshui','qingcheng']],
// gz_dengai:['male','wei',4,['tuntian','ziliang','gzjixi']],
// gz_caohong:['male','wei',4,['huyuan','heyi']],
gz_dengai:['male','wei',4,['tuntian','ziliang','gzjixi']],
gz_caohong:['male','wei',4,['huyuan','heyi']],
// gz_jiangfei:['male','shu',3,['shengxi','gzshoucheng']],
gz_jiangwei:['male','shu',4,['tiaoxin','yizhi','tianfu']],
// gz_xusheng:['male','wu',4,['yicheng']],
@ -257,6 +257,112 @@ mode.guozhan={
zoushi:'军阀张济之妻,张绣之婶。张绣降曹后,邹氏遂被曹操霸占。贾诩献计趁机诛杀曹操,险些得手。曹操在损失爱将典韦、侄子曹安民和长子曹昂后方才逃出生天。',
},
skill:{
gzjixi:{
inherit:'jixi',
init:function(player){
if(player.checkMainSkill('gzjixi')){
player.removeMaxHp();
}
}
},
ziliang:{
trigger:{global:'damageEnd'},
filter:function(event,player){
return event.player.isFriendOf(player)&&player.storage.tuntian&&player.storage.tuntian.length;
},
init:function(player){
player.checkViceSkill('ziliang');
},
logTarget:'player',
content:function(){
'step 0'
player.chooseCardButton('将一张“田”交给'+get.translation(trigger.player),player.storage.tuntian).set('ai',function(button){
return ai.get.value(button.link);
});
'step 1'
if(result.bool){
var card=result.links[0];
player.storage.tuntian.remove(card);
player.syncStorage('tuntian');
if(!player.storage.tuntian.length){
player.unmarkSkill('tuntian');
}
else{
player.updateMarks();
}
trigger.player.gain(card);
if(trigger.player==player){
player.$draw(card);
}
else{
player.$give(card,trigger.player);
}
}
}
},
huyuan:{
audio:'yuanhu',
trigger:{player:'phaseEnd'},
direct:true,
filter:function(event,player){
return player.num('he',{type:'equip'})>0;
},
content:function(){
"step 0"
player.chooseCardTarget({
filterCard:function(card){
return get.type(card)=='equip';
},
position:'he',
filterTarget:function(card,player,target){
return !target.get('e',get.subtype(card)[5]);
},
ai1:function(card){
return 6-ai.get.value(card);
},
ai2:function(target){
return ai.get.attitude(_status.event.player,target)-3;
},
prompt:get.prompt('yuanhu')
});
"step 1"
if(result.bool){
var target=result.targets[0];
player.logSkill('yuanhu',target);
target.equip(result.cards[0]);
if(target!=player){
player.$give(result.cards,target);
}
player.chooseTarget(true,'弃置一名角色的一张牌',function(card,player,target){
var source=_status.event.source;
return get.distance(source,target)<=1&&source!=target&&target.num('he');
}).set('ai',function(target){
return -ai.get.attitude(_status.event.player,target);
}).set('source',target);
}
else{
event.finish();
}
"step 2"
if(result.targets.length){
player.discardPlayerCard(true,result.targets[0],'he');
}
},
},
heyi:{
zhenfa:'inline'
},
_heyi:{
mod:{
globalTo:function(from,to,distance){
if(game.hasPlayer(function(current){
return current.hasSkill('heyi')&&current.inline(to);
})){
return distance+1;
}
}
}
},
tianfu:{
init:function(player){
player.checkMainSkill('tianfu');