This commit is contained in:
libccy 2017-02-17 10:23:52 +08:00
parent 6b8dd3b3d3
commit b7c2e99ddc
10 changed files with 376 additions and 49 deletions

View File

@ -741,7 +741,7 @@ card.gujian={
},
ai:{
order:2,
value:[5,1],
value:[4,1],
useful:1,
result:{
target:-1.5

View File

@ -54,6 +54,13 @@ card.sp={
ai:{
value:-5,
useful:6,
result:{
player:function(player,target){
if(player.hasSkillTag('usedu')) return 5;
return -1;
}
},
order:7.5
},
enable:true,
modTarget:true,
@ -532,6 +539,7 @@ card.sp={
popup:false,
forced:true,
filter:function(event,player){
if(player.hasSkillTag('nodu')) return false;
if(event.cards){
for(var i=0;i<event.cards.length;i++){
if(event.cards[i].name=='du'&&event.cards[i].original!='j') return true;

View File

@ -1920,7 +1920,7 @@ card.swd={
skills:['yiluan'],
ai:{
basic:{
equipValue:7
equipValue:6
}
},
},
@ -3341,24 +3341,23 @@ card.swd={
check:function(card){
return 6-ai.get.value(card);
},
filter:function(event,player){
return !player.isTurnedOver();
},
filterTarget:function(card,player,target){
return target.num('h')<player.num('h');
return target!=player&&!target.isMad();
},
content:function(){
'step 0'
var card=get.cards(0);
ui.discardPile.appendChild(card);
player.showCards('意乱',card);
event.bool=(get.color(card)=='black');
player.judge(function(card){
return get.color(card)=='black'?1:0;
});
'step 1'
if(!event.bool){
// target.draw();
if(result.color=='red'){
game.asyncDraw([player,target]);
}
else{
var e5=player.getEquip('sifeizhenmian');
if(e5){
player.discard(e5);
}
if(!player.isTurnedOver()) player.turnOver();
target.goMad({player:'phaseAfter'});
}
},
@ -3366,8 +3365,7 @@ card.swd={
order:10,
result:{
target:function(player,target){
if(target.isMad()) return 0;
return -1;
return -target.num('h');
}
}
}
@ -4987,9 +4985,9 @@ card.swd={
guangshatianyi_bg:'纱',
guangshatianyi_info:'锁定技,每当你即将受到伤害,有三分之一的概率令伤害减一',
sifeizhenmian:'四非真面',
sifeizhenmian_info:'出牌阶段限一次,你可以弃置一张牌并指定一名手牌数少于你的角色,你亮出牌堆顶的一张牌,若此牌为黑色,你弃置四非真面,该角色进入混乱状态直到下一回合结束',
sifeizhenmian_info:'出牌阶段限一次,若你没翻面,你可以弃置一张牌并指定一名其他角色进行判定,若结果为黑色,你翻面,该角色进入混乱状态直到下一回合结束;若结果为红色,你与其各摸一张牌',
yiluan:'意乱',
yiluan_info:'出牌阶段限一次,你可以弃置一张牌并指定一名手牌数少于你的角色,你亮出牌堆顶的一张牌,若此牌为黑色,你弃置四非真面,该角色进入混乱状态直到下一回合结束',
yiluan_info:'出牌阶段限一次,若你没翻面,你可以弃置一张牌并指定一名其他角色进行判定,若结果为黑色,你翻面,该角色进入混乱状态直到下一回合结束;若结果为红色,你与其各摸一张牌',
donghuangzhong:'东皇钟',
xuanyuanjian:'轩辕剑',
xuanyuanjian2:'轩辕剑',

View File

@ -241,7 +241,7 @@ card.yunchou={
},
ai:{
order:6,
value:[4,1],
value:[3,1],
result:{
target:function(player,target){
return -2/Math.sqrt(1+target.num('h'));
@ -322,8 +322,10 @@ card.yunchou={
event.current.chooseBool('是否响应'+get.translation(target)+'的舌战群儒?',function(event,player){
if(ai.get.attitude(player,_status.event.source)>=0) return false;
var hs=player.get('h');
var dutag=player.hasSkillTag('nodu');
for(var i=0;i<hs.length;i++){
var value=ai.get.value(hs[i],player);
if(hs[i].name=='du'&&dutag) continue;
if(value<0) return true;
if(!_status.event.hasTarget){
if(hs[i].number>=8&&value<=7) return true;

View File

@ -6,7 +6,7 @@ character.hearth={
hs_wuther:['male','qun',4,['fengxian','jieming']],
hs_jgarrosh:['male','shu',4,['zhanhou','qiangxi']],
hs_malfurion:['male','wu',4,['jihuo']],
hs_guldan:['male','wei',3,['fenliu','hongxi']],
hs_guldan:['male','wei',3,['moxie','fuhua','hongxi']],
hs_anduin:['male','qun',3,['shengguang','shijie','anying']],
hs_sthrall:['male','wu',4,['tuteng','guozai','zuling']],
hs_waleera:['female','shu',3,['jianren','mengun','wlianji']],
@ -47,7 +47,7 @@ character.hearth={
hs_kcthun:['male','qun',4,['luanji','xianji']],
hs_anomalus:['male','wei',4,['mobao']],
hs_blingtron:['male','shu',3,['zengli','xiubu']],
hs_yogg:['male','wu',4,['kuangluan']],
hs_yogg:['male','wu',3,['kuangluan','qianhou']],
hs_xialikeer:['female','shu',3,['duxin']],
hs_zhishigushu:['male','shu',4,['jiaohui']],
@ -98,6 +98,264 @@ character.hearth={
hs_malfurion:['hs_malorne'],
},
skill:{
fuhua:{
enable:'phaseUse',
filterCard:{name:'du'},
check:function(){return 1},
filterTarget:function(card,player,target){
return !target.hasSkill('moxie')&&!target.storage.fuhua_failed;
},
filter:function(event,player){
return player.num('h','du');
},
discard:false,
prepare:'give',
content:function(){
'step 0'
target.gain(cards,player);
var choice=1;
if(ai.get.attitude(target,player)>0||(target.hp<=1&&!target.hasSha())){
choice=0;
}
target.chooseControl(function(){
return choice;
}).set('choiceList',['获得技能魔血,每个出牌阶段开始时需交给'+get.translation(player)+'一张牌',
'视为'+get.translation(player)+'对你使用一张决斗,若你赢,本局不能再成为腐化目标']);
'step 1'
if(result.index==0){
target.storage.fuhua2=player;
target.addSkill('fuhua2');
target.addSkill('moxie');
}
else{
player.useCard({name:'juedou'},target);
}
},
ai:{
threaten:2,
order:8,
expos:0.2,
result:{
player:function(player,target){
if(ai.get.attitude(target,player)>0) return 1;
if(ai.get.effect(target,{name:'juedou'},player,player)>0) return 1.5;
return 0;
}
}
},
group:'fuhua3'
},
fuhua2:{
trigger:{player:'phaseUseBegin'},
forced:true,
filter:function(event,player){
return player.storage.fuhua2.isIn()&&player.num('he')>0;
},
mark:'character',
intro:{
content:function(storage){
return '每个出牌阶段开始时需交给'+get.translation(storage)+'一张牌';
}
},
content:function(){
'step 0'
player.chooseCard('he',true,'交给'+player.storage.fuhua2+'一张牌');
'step 1'
if(result.bool){
player.storage.fuhua2.gain(result.cards,player);
player.$give(result.cards,player.storage.fuhua2);
player.line(player.storage.fuhua2,'green');
}
},
group:'fuhua2_remove',
onremove:true,
subSkill:{
remove:{
trigger:{global:'dieAfter'},
forced:true,
popup:false,
filter:function(event,player){
return event.player==player.storage.fuhua2;
},
content:function(){
player.removeSkill('fuhua2');
}
}
}
},
fuhua3:{
trigger:{player:'damageBefore'},
forced:true,
popup:false,
filter:function(event,player){
var evt=event.getParent(3);
return evt.name=='fuhua'&&evt.target==event.source;
},
content:function(){
trigger.getParent(3).target.storage.fuhua_failed=true;
}
},
moxie:{
trigger:{player:'duBegin'},
forced:true,
content:function(){
player.draw(2);
},
ai:{
threaten:1.2,
nodu:true,
usedu:true,
},
group:'moxie2'
},
moxie2:{
trigger:{player:'phaseEnd'},
forced:true,
content:function(){
var hs=player.get('h');
for(var i=0;i<hs.length;i++){
if(hs[i].name=='du'){
hs.splice(i--,1);
}
}
if(hs.length){
var card=hs.randomGet();
card.init([card.suit,card.number,'du']);
game.log(player,'将一张手牌转化为',{name:'du'});
}
}
},
moxue_old:{
trigger:{player:'phaseEnd'},
filter:function(event,player){
return game.hasPlayer(function(current){
return current.hp>player.hp;
});
},
logTarget:function(event,player){
return game.filterPlayer(function(current){
return current.hp>player.hp;
});
},
content:function(){
'step 0'
event.targets=game.filterPlayer(function(current){
return current.hp>player.hp;
});
get.sortSeat(event.targets);
'step 1'
if(event.targets.length){
event.target=event.targets.shift();
if(event.target.num('he',{color:'black'})){
event.target.chooseCard('he','交给'+get.translation(player)+'一张黑色牌,或失去一点体力',{color:'black'}).ai=function(card){
if(ai.get.attitude(event.target,player)>0) return 10-ai.get.value(card);
return 7-ai.get.value(card);
}
}
else{
event.target.loseHp();
event.redo();
}
}
else{
event.finish();
}
'step 2'
if(result.bool){
player.gain(result.cards,event.target);
if(get.position(result.cards[0])=='e'){
event.target.$give(result.cards,player);
}
else{
event.target.$give(result.cards.length,player);
}
}
else{
event.target.loseHp();
}
event.goto(1);
}
},
gfuhun:{
trigger:{player:'phaseEnd'},
direct:true,
filter:function(event,player){
return player.num('h')>0&&!player.isTurnedOver();
},
content:function(){
'step 0'
player.chooseTarget(get.prompt('gfuhun'),function(card,player,target){
return target!=player&&target.num('h')>0;
}).ai=function(target){
return -ai.get.attitude(player,target);
}
'step 1'
if(result.bool){
player.logSkill('gfuhun',result.targets);
event.target=result.targets[0];
player.chooseToCompare(event.target);
}
else{
event.finish();
}
'step 2'
if(result.bool){
event.target.goMad({player:'phaseAfter'});
if(!player.isTurnedOver()) player.turnOver();
}
},
ai:{
expose:0.2,
threaten:1.5
}
},
qianhou:{
trigger:{player:'phaseBegin'},
forced:true,
content:function(){
var list=[];
for(var i=0;i<lib.inpile.length;i++){
if(lib.filter.filterCard({name:lib.inpile[i]},player)){
var info=lib.card[lib.inpile[i]];
if(info.type=='trick'&&!info.multitarget&&!info.notarget){
if(Array.isArray(info.selectTarget)){
if(info.selectTarget[0]>0&&info.selectTarget[1]>=info.selectTarget[0]){
list.push(lib.inpile[i]);
}
}
else if(typeof info.selectTarget=='number'){
list.push(lib.inpile[i]);
}
}
}
}
while(list.length){
var card={name:list.randomRemove()};
var info=get.info(card);
var targets=game.filterPlayer(function(current){
return lib.filter.filterTarget(card,player,current);
});
if(targets.length){
targets.sort(lib.sort.seat);
if(info.selectTarget==-1){
player.useCard(card,targets,'noai');
}
else{
var num=info.selectTarget;
if(Array.isArray(num)){
if(targets.length<num[0]) continue;
num=num[0]+Math.floor(Math.random()*(num[1]-num[0]+1));
}
else{
if(targets.length<num) continue;
}
player.useCard(card,targets.randomGets(num),'noai');
}
break;
}
}
}
},
longyi:{
mod:{
maxHandcard:function(player,num){
@ -1356,23 +1614,23 @@ character.hearth={
forced:true,
priority:10,
filter:function(event,player){
return event.source&&event.source.isAlive()&&event.source!=player;
return event.source&&event.source.isIn()&&event.source!=player;
},
intro:{
content:'players'
},
content:function(){
trigger.source.goMad('phaseAfter');
if(!player.storage.kuangluan){
player.storage.kuangluan=[];
}
player.storage.kuangluan.add(trigger.source);
player.markSkill('kuangluan');
// if(!player.storage.kuangluan){
// player.storage.kuangluan=[];
// }
// player.storage.kuangluan.add(trigger.source);
// player.markSkill('kuangluan');
},
ai:{
threaten:0.3
},
group:['kuangluan2','kuangluan3']
// group:['kuangluan2','kuangluan3']
},
kuangluan2:{
trigger:{player:'phaseBegin'},
@ -3080,14 +3338,15 @@ character.hearth={
else if(att<0){
max=false;
}
num=att*dh;
}
}
if(max) return 10;
return 0.5;
},
result:{
target:function(player,target){
return player.num('h')-target.num('h');
player:function(player,target){
return (player.num('h')-target.num('h'))*ai.get.attitude(player,target);
}
},
expose:0.2
@ -4853,6 +5112,13 @@ character.hearth={
threaten:1.2
}
},
fenliu2:{
mod:{
maxHandcard:function(player,num){
return num+1;
}
}
},
hongxi:{
trigger:{global:'dieAfter'},
filter:function(event,player){
@ -5544,6 +5810,14 @@ character.hearth={
hs_tyrande:'泰兰德',
hs_fenjie:'芬杰',
fuhua:'腐化',
fuhua2:'腐化',
fuhua_info:'出牌阶段你可以将一张毒交给一名没有魔血技能的其他角色该角色选择一项1. 获得技能魔血此后每个出牌阶段开始时需交给你一张牌2. 视为你对其使用一张决斗,若你因此受到伤害,本局不能再对其发动腐化',
moxie:'魔血',
moxie2:'魔血',
moxie_info:'锁定技,你失去毒时不流失体力;你使用毒时摸两张牌;结束阶段,你将一张随机手牌转化为毒',
gfuhun:'附魂',
gfuhun_info:'结束阶段,若你未翻面,你可以和一名其他角色拼点,若你赢,你将武将牌翻至背面,该角色进入混乱状态直到下一回合结束',
longyi:'龙裔',
longyi_info:'锁定技,你的黑色牌不占用手牌上限',
zhongji:'重击',
@ -5621,7 +5895,7 @@ character.hearth={
kuangluan:'狂乱',
kuangluan2:'狂乱',
// kuangluan_info:'锁定技,每当你于回合内使用一张通常锦囊牌,便于出牌阶段结束时随机使用一张通常锦囊牌(随机指定目标)',
kuangluan_info:'锁定技,每当一名其他角色对你造成伤害,该角色进入混乱状态直到当前回合结束;准备阶段,若上轮有至少两名不同角色因你而进入混乱状态,你回复全部体力并进入混乱状态进到本回合结束',
kuangluan_info:'锁定技,每当一名其他角色对你造成伤害,该角色进入混乱状态直到当前回合结束',
zengli:'赠礼',
zengli_info:'出牌阶段限一次,你指定一名其他角色与你各装备一把武器',
xiubu:'修补',
@ -5793,6 +6067,8 @@ character.hearth={
aoshu:'奥术',
aoshu_info:'出牌阶段限一次,你可以将一张黑桃牌当作无中生有使用',
qianhou:'千喉',
qianhou_info:'锁定技,准备阶段,你视为使用一张随机锦囊(随机指定目标)',
fengxing:'风行',
fengxing_info:'每当你于回合外首次失去牌,你可以弃置一张牌并摸两张牌',
xinci:'心刺',

View File

@ -62,13 +62,13 @@ window.characterRank={
'gjqt_ouyangshaogong',
'ow_liekong',
'ow_ana',
'hs_aya',
],
a:[
'hs_khadgar',
'hs_tyrande',
'diy_zaozhirenjun',
'pal_muchanglan',
'hs_aya',
'ow_heiying',
'pal_longkui',
'pal_nangonghuang',
@ -232,6 +232,7 @@ window.characterRank={
'wangyi',
'swd_weida',
'yxs_libai',
'hs_yogg',
],
bp:[
'yxs_weizhongxian',
@ -376,9 +377,11 @@ window.characterRank={
're_guojia',
'cuiyan',
'sp_zhugeliang',
'hs_guldan',
],
b:[
'diy_liufu',
'yxs_mingchenghuanghou',
'diy_lukang',
'diy_tianyu',
'old_zhuran',
@ -450,34 +453,32 @@ window.characterRank={
'lingju',
're_ganning',
'xin_yujin',
'hs_yogg',
'diy_feishi',
'yxs_lvzhi',
'madai',
'sunce',
'huangyueying',
'guojia',
'jiangfei',
'xiahouba',
'yxs_tangbohu',
'caozhang',
],
bm:[
'diy_xizhenxihong',
'yxs_tangbohu',
'zhuzhi',
'tadun',
'guohuai',
'sunluban',
'caozhang',
'zhouyu',
'guanyinping',
'dingfeng',
'mayunlu',
'yxs_mingchenghuanghou',
'shen_guanyu',
'jiangfei',
're_caocao',
're_lvbu',
'chendong',
'xiahouba',
'simayi',
'guojia',
'zhenji',
'huangyueying',
'ganning',
'luxun',
'zhangjiao',
@ -485,8 +486,6 @@ window.characterRank={
'xuhuang',
'jsp_zhaoyun',
'tianfeng',
'sunce',
'hs_guldan',
'old_zhonghui',
'xusheng',
'liru',
@ -506,6 +505,7 @@ window.characterRank={
'old_caozhen',
'old_caoxiu',
'old_madai',
'zhuzhi',
'liaohua',
'zhaoyun',
'machao',

View File

@ -93,7 +93,7 @@ character.refresh={
player.chooseControl(list,function(){
var controls=_status.event.controls;
var player=_status.event.player;
if(controls.contains('tao')) return 'tao';
if(controls.contains('tao')&&(player.hp<=1||(player.hp==2&&!player.hasShan()))) return 'tao';
if(controls.contains('sha')){
var players=game.filterPlayer();
for(var i=0;i<players.length;i++){
@ -104,6 +104,8 @@ character.refresh={
}
}
}
if(controls.contains('tao')) return 'tao';
if(controls.contains('jiu')) return 'jiu';
return 'cancel2';
}).set('prompt','是否视为使用一张基本牌?');
}

View File

@ -1731,6 +1731,7 @@ character.sp={
if(_status.currentPhase!=player) return false;
var type=get.type(event.card,'trick');
if(type!='basic'&&type!='trick') return false;
if(event.noai) return false;
return game.hasPlayer(function(target){
return !event.targets.contains(target)&&target.num('he')>0;
});

View File

@ -928,6 +928,7 @@ character.yxs={
if(result.bool){
result.targets[0].gain(card,player);
player.$give(1,result.targets[0]);
player.line(result.targets,'green');
game.delay();
}
},
@ -1051,13 +1052,17 @@ character.yxs={
return _status.currentPhase!=player;
},
content:function(){
player.addTempSkill('chajue2',['phaseAfter','phaseBefore']);
player.addTempSkill('chajue2',{player:'phaseBegin'});
}
},
chajue2:{
trigger:{target:'useCardToBefore'},
forced:true,
priority:15,
mark:true,
intro:{
content:'杀或通常锦囊牌对你无效'
},
filter:function(event,player){
return get.type(event.card)=='trick'||event.card.name=='sha';
},
@ -1077,7 +1082,7 @@ character.yxs={
tiewan:{
trigger:{global:'useCardAfter'},
filter:function(event,player){
return (event.card.viewAs||event.card.name)=='lebu'&&event.player!=player;
return get.type(event.card.viewAs||event.card.name)=='delay'&&event.player!=player;
},
direct:true,
content:function(){
@ -1101,6 +1106,9 @@ character.yxs={
player.logSkill('tiewan');
player.useCard({name:'lebu'},result.cards,result.targets);
}
},
ai:{
threaten:1.5
}
},
qianglue:{
@ -2674,9 +2682,9 @@ character.yxs={
heqin_info:'限定技,你可以与场上一名男性角色形成【和亲】状态,你与该男性角色于摸牌阶段摸牌数+1。你或者男性角色阵亡【和亲】状态消失',
chajue:'察觉',
chajue2:'察觉',
chajue_info:'锁定技,你的回合外,你每受到一次伤害,任何【杀】或通常锦囊牌均对你无效,直到该回合结束。',
chajue_info:'锁定技,你的回合外,你每受到一次伤害,任何【杀】或通常锦囊牌均对你无效,直到你的回合开始',
tiewan:'铁腕',
tiewan_info:'每当其他角色使用乐不思蜀时,你可以立即将一张红色牌当作乐不思蜀使用',
tiewan_info:'每当其他角色使用延时类锦囊牌时,你可以立即将一张红色牌当作乐不思蜀使用',
qianglue:'强掠',
qianglue_info:'每当你的杀被闪避时,你可以进行一次判定,若结果为黑色,你可以获得对方的一张牌',
xiadao:'侠盗',

View File

@ -659,7 +659,7 @@
change_skin:{
name:'开启换肤',
init:true,
intro:'双点头像或在右键菜单中换肤,皮肤可在选项-文件-图片文件-皮肤文件中添加'
intro:'双点头像或在右键菜单中换肤,皮肤可在选项-文件-图片文件-皮肤图片中添加'
},
change_skin_auto:{
name:'自动换肤',
@ -673,6 +673,7 @@
},
intro:'游戏每进行一段时间自动为一个随机角色更换皮肤',
onclick:function(item){
game.saveConfig('change_skin_auto',item);
clearTimeout(_status.skintimeout);
if(item!='off'){
_status.skintimeout=setTimeout(ui.click.autoskin,parseInt(item));
@ -6039,7 +6040,38 @@
targets.add(game.me);
source.useCard(game.createCard(card.name,card.suit,card.number,card.nature),targets);
},
r:function(){
r:function(bool){
var list=['s','ap','a','am','bp','b','bm','c','d'];
var str='';
for(var i=0;i<list.length;i++){
if(str) str+=' 、 ';
str+=list[i]+'-'+lib.rank[list[i]].length;
}
console.log(str);
for(var i in lib.characterPack){
if(!bool&&lib.config.all.sgscharacters.contains(i)) continue;
var map={};
var str='';
for(var j in lib.characterPack[i]){
var rank=get.rank(j);
if(!map[rank]){
map[rank]=1;
}
else{
map[rank]++;
}
}
for(var j=0;j<list.length;j++){
if(map[list[j]]){
if(str) str+=' 、 ';
str+=list[j]+'-'+map[list[j]];
}
}
if(str){
console.log(lib.translate[i+'_character_config']+''+str);
}
}
var list=lib.rank.s.concat(lib.rank.ap).concat(lib.rank.a).concat(lib.rank.am).
concat(lib.rank.bp).concat(lib.rank.b).concat(lib.rank.bm).concat(lib.rank.c).concat(lib.rank.d);
for(var i in lib.character){