This commit is contained in:
libccy 2018-01-14 11:24:58 +08:00
parent 56811d5a1b
commit 2eed22e8e9
9 changed files with 295 additions and 39 deletions

View File

@ -1390,7 +1390,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
},targets);
},
content:function(){
target.addTempSkill('gw_qinpendayu',{player:'phaseAfter'});
target.addSkill('gw_qinpendayu');
},
ai:{
value:[5,1],
@ -1426,7 +1426,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
},targets);
},
content:function(){
target.addTempSkill('gw_birinongwu',{player:'phaseAfter'});
target.addSkill('gw_birinongwu');
},
ai:{
value:[5,1],
@ -1962,7 +1962,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
mark:true,
nopop:true,
intro:{
content:'手牌上限-1直到下一回合结束'
content:'手牌上限-1直到下一个弃牌阶段结束'
},
mod:{
maxHandcard:function(player,num){
@ -1971,13 +1971,23 @@ game.import('card',function(lib,game,ui,get,ai,_status){
},
ai:{
weather:true
},
group:'gw_qinpendayu_clear',
subSkill:{
clear:{
trigger:{player:'phaseDiscardAfter'},
silent:true,
content:function(){
player.removeSkill('gw_qinpendayu');
}
}
}
},
gw_birinongwu:{
mark:true,
nopop:true,
intro:{
content:'不能使用杀直到下一回合结束'
content:'不能使用杀直到下一个出牌阶段结束'
},
mod:{
cardEnabled:function(card){
@ -1986,6 +1996,16 @@ game.import('card',function(lib,game,ui,get,ai,_status){
},
ai:{
weather:true
},
group:'gw_birinongwu_clear',
subSkill:{
clear:{
trigger:{player:'phaseUseAfter'},
silent:true,
content:function(){
player.removeSkill('gw_birinongwu');
}
}
}
},
gw_ciguhanshuang:{
@ -2239,10 +2259,10 @@ game.import('card',function(lib,game,ui,get,ai,_status){
gw_baoxueyaoshui_info:'令一名角色弃置两张手牌并摸一张牌',
gw_birinongwu:'蔽日浓雾',
gw_birinongwu_bg:'雾',
gw_birinongwu_info:'天气牌,出牌阶段对一名角色及其相邻角色使用,目标不能使用杀直到下一回合结束',
gw_birinongwu_info:'天气牌,出牌阶段对一名角色及其相邻角色使用,目标不能使用杀直到下一个出牌阶段结束',
gw_qinpendayu:'倾盆大雨',
gw_qinpendayu_bg:'雨',
gw_qinpendayu_info:'天气牌,出牌阶段对一名角色及其相邻角色使用,目标手牌上限-1直到下一回合结束',
gw_qinpendayu_info:'天气牌,出牌阶段对一名角色及其相邻角色使用,目标手牌上限-1直到下一个弃牌阶段结束',
gw_ciguhanshuang:'刺骨寒霜',
gw_ciguhanshuang_bg:'霜',
gw_ciguhanshuang_info:'天气牌,出牌阶段对一名角色及其相邻角色使用,目标下个摸牌阶段摸牌数-1',

View File

@ -3,7 +3,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return {
name:'diy',
connect:true,
connectBanned:['diy_tianyu','diy_yangyi','diy_lukang','ns_huamulan','ns_yuji','ns_duangui'],
connectBanned:['diy_tianyu','diy_yangyi','diy_lukang','ns_huamulan','ns_yuji','ns_duangui','ns_liuzhang'],
character:{
// diy_caocao:['male','wei',4,['xicai','diyjianxiong','hujia']],
// diy_hanlong:['male','wei',4,['siji','ciqiu']],
@ -59,8 +59,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
ns_lvmeng:['male','wu',3,['nsqinxue','nsbaiyi']],
ns_shenpei:['male','qun',3,['nshunji','shibei']],
ns_yujisp:['male','qun',3,['nsguhuo']],
ns_yangyi:['male','shu',3,['nsjuanli','nsyuanchou']],
ns_liuzhang:['male','qun',3,['nsanruo','nsxunshan','nskaicheng']],
// ns_zhaoyun:['male','qun',3,[]],
// ns_yuji:['male','qun',3,[]],
// ns_lvmeng:['male','qun',3,[]],
// ns_zhaoyunshen:['male','qun',3,[]],
// ns_lisu:['male','qun',3,[]],
@ -91,6 +93,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
ns_huamulan:'#p哎别管我是谁',
ns_jinke:'#p哎别管我是谁',
ns_huangzu:'#r小芯儿童鞋',
ns_lisu:'#r小芯儿童鞋',
ns_yanliang:'#r橙续缘',
ns_wenchou:'#r橙续缘',
ns_caocao:'#r一瞬间遗忘',
@ -101,16 +104,227 @@ game.import('character',function(lib,game,ui,get,ai,_status){
ns_wangyue:'#p废城君',
ns_sunjian:'#b兔子两只2',
ns_lvmeng:'#b兔子两只2',
ns_yujisp:'#b兔子两只2',
ns_yuji:'#g蔚屿凉音',
ns_simazhao:'#r一纸载春秋',
ns_duangui:'#b宝宝酱紫萌萌哒',
ns_masu:'#g修女',
ns_zhangxiu:'#p本因坊神策',
ns_yangyi:'#p本因坊神策',
ns_liuzhang:'#r矮子剑薄荷糖',
},
perfectPair:{
yuji:['zuoci']
},
skill:{
// nsanruo:{
//
// },
nsjuanli:{
enable:'phaseUse',
usable:1,
filterTarget:function(card,player,target){
return target!=player&&target.countCards('h');
},
filter:function(event,player){
return player.countCards('h');
},
init:function(player){
player.storage.nsjuanli_win=[];
player.storage.nsjuanli_lose=[];
},
intro:{
content:function(storage,player){
var str='';
if(player.storage.nsjuanli_win.length){
str+=get.translation(player.storage.nsjuanli_win)+'与你距离-1直到与你下次赌牌';
}
if(player.storage.nsjuanli_lose.length){
if(str.length){
str+='';
}
str+=get.translation(player.storage.nsjuanli_lose)+'与你距离+1直到与你下次赌牌';
}
return str;
}
},
onremove:['nsjuanli_win','nsjuanli_lose'],
content:function(){
'step 0'
player.storage.nsjuanli_win.remove(target);
player.storage.nsjuanli_lose.remove(target);
event.prompt2='赌牌的两名角色分别亮开一张手牌,若花色相同则赌牌平局,若花色不同,则依次展示牌堆顶的牌直到翻开的牌与其中一人亮出牌的花色相同,则该角色获得赌牌的胜利';
player.chooseCard('h',true).set('prompt2',event.prompt2);
'step 1'
if(result.bool){
event.card1=result.cards[0];
target.chooseCard('h',true).set('prompt2',event.prompt2);
}
else{
event.finish();
}
'step 2'
if(result.bool){
event.card2=result.cards[0];
}
else{
event.finish();
}
'step 3'
player.$compare(event.card1,event.target,event.card2);
game.delay(0,1500);
game.log(player,'亮出的牌为',event.card1);
game.log(target,'亮出的牌为',event.card2);
'step 4'
var suit1=get.suit(event.card1);
var suit2=get.suit(event.card2);
if(suit1==suit2){
game.broadcastAll(function(str){
var dialog=ui.create.dialog(str);
dialog.classList.add('center');
setTimeout(function(){
dialog.close();
},1000);
},'平局');
game.delay(2);
if(!player.storage.nsjuanli_win.length&&!player.storage.nsjuanli_lose.length){
player.unmarkSkill('nsjuanli');
}
}
else{
var cards=[];
for(var i=0;i<1000;i++){
var current=get.cards();
if(current&&current.length){
current=current[0];
current.discard();
cards.push(current);
var suit=get.suit(current);
if(suit==suit1){
player.showCards(cards,get.translation(player)+'赌牌获胜');
player.storage.nsjuanli_win.add(target);
target.loseHp();
player.markSkill('nsjuanli');
break;
}
else if(suit==suit2){
player.showCards(cards,get.translation(target)+'赌牌获胜');
player.storage.nsjuanli_lose.add(target);
target.recover();
player.markSkill('nsjuanli');
break;
}
}
else{
break;
}
}
}
},
mod:{
globalTo:function(from,to,distance){
if(to.storage.nsjuanli_win&&to.storage.nsjuanli_win.contains(from)){
return distance-1;
}
if(to.storage.nsjuanli_lose&&to.storage.nsjuanli_lose.contains(from)){
return distance+1;
}
}
},
ai:{
order:4,
result:{
target:function(player,target){
if(target.isHealthy()){
return -1/(1+target.hp);
}
else{
return -0.3/(1+target.hp);
}
}
}
}
},
nsyuanchou:{
trigger:{target:'useCardToBefore'},
forced:true,
priority:15,
check:function(event,player){
return get.effect(event.target,event.card,event.player,player)<0;
},
filter:function(event,player){
return get.type(event.card,'trick')=='trick'&&get.distance(event.player,player)>1;
},
content:function(){
trigger.cancel();
},
ai:{
effect:{
target:function(card,player,target,current){
if(get.type(card,'trick')=='trick'&&get.distance(player,target)>1) return 'zeroplayertarget';
},
}
}
},
nsguhuo:{
trigger:{player:'useCardAfter'},
forced:true,
filter:function(event,player){
if(event.parent.name=='nsguhuo') return false;
if(event.card==event.cards[0]){
var type=get.type(event.card,'trick');
var names=[];
if(get.cardPile(function(card){
if(get.type(card,'trick')!=type) return false;
if(get.info(card).multitarget) return false;
if(names.contains(card.name)) return false;
if(player.hasUseTarget(card)){
return true;
}
else{
names.add(card.name);
return false;
}
})){
return true;
}
}
return true;
},
content:function(){
var type=get.type(trigger.card,'trick');
var names=[];
var card=get.cardPile(function(card){
if(get.type(card,'trick')!=type) return false;
if(get.info(card).multitarget) return false;
if(names.contains(card.name)) return false;
if(player.hasUseTarget(card)){
return true;
}
else{
names.add(card.name);
return false;
}
});
if(card){
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);
var select=get.select(info.selectTarget);
if(select[0]==-1||select[1]==-1){
player.useCard(card,targets,'noai');
}
else if(targets.length>=select[0]){
var num=select[0]+Math.floor(Math.random()*(select[1]-select[0]+1));
player.useCard(card,targets.randomGets(num),'noai');
}
}
}
}
},
nsbaiyi:{
trigger:{player:'phaseDiscardBefore'},
forced:true,
@ -4298,6 +4512,23 @@ game.import('character',function(lib,game,ui,get,ai,_status){
ns_zhangxiu:'张绣',
ns_lvmeng:'吕蒙',
ns_yujisp:'于吉',
ns_lisu:'李肃',
ns_yangyi:'杨仪',
ns_liuzhang:'刘璋',
nsanruo:'暗弱',
nsanruo_info:'锁定技,你手牌中的[杀]和普通锦囊牌(除[借刀杀人]外)均对你不可见。但你可以正常使用之',
nsxunshan:'循善',
nsxunshan_info:'锁定技,你使用【暗弱】牌可以为其指定任意名合法目标',
nskaicheng:'开城',
nskaicheng_info:'主公技,你的回合内,你可以将一张【暗弱】牌交给一名群势力其他角色观看,其可以选择是否告诉你此牌的名字。然后你选择一项:使用这张牌并摸一张牌;或结束此回合',
nsjuanli:'狷戾',
nsjuanli_info:'出牌阶段限一次你可以和一名有手牌的其他角色进行赌牌若你赢目标角色失去1点体力且该角色与你距离-1直到与你下次赌牌若你没赢目标角色回复1点体力且该角色与你距离+1直到与你的下次赌牌。赌牌:赌牌的两名角色分别亮开一张手牌,若花色相同则赌牌平局,若花色不同,则依次展示牌堆顶的牌直到翻开的牌与其中一人亮出牌的花色相同,则该角色获得赌牌的胜利)',
nsyuanchou:'远筹',
nsyuanchou_info:'锁定技当你成为锦囊牌的目标时若来源角色与你的距离大于1则取消之',
nsguhuo:'蛊惑',
nsguhuo_info:'锁定技,每当你使用一张牌。则你对一名随机角色从牌堆(牌堆无则从弃牌堆)随机使用一张同类别卡牌',
nsqinxue:'勤学',
nsqinxue_info:'每个效果每回合只能使用一次。①当你使用一张基本牌时,你从牌堆随机获得一张锦囊牌;②当你使用一张锦囊牌时,你从牌堆随机获得一张装备牌;③当你使用一张装备牌时,你从牌堆随机获得一张基本牌',
nsbaiyi:'白衣',
@ -4334,7 +4565,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
nstianji_info:'限定技当一名其他角色进入濒死状态你可自减一点体力上限令其回复体力至1并增加一点体力上限',
nszhaoxin:'昭心',
nszhaoxin_info:'锁定技,你始终展示手牌',
nsxiuxin:'穆',
nsxiuxin:'穆',
nsxiuxin_info:'锁定技,若你没有某种花色的手牌,你不能成为这种花色的牌的目标',
nsshijun:'弑君',
nsshijun_info:'锁定技,你造成伤害时,你令此伤害+1并在结算后失去一点体力',

View File

@ -3251,7 +3251,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
vanish:true,
derivation:'gw_diandian',
image:'character/gw_yioufeisisp',
enable:true,
enable:function(){
return game.countPlayer()>2;
},
filterTarget:function(card,player,target){
return target!=player;
},
@ -3320,7 +3322,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
order:1,
result:{
target:function(player,target){
return -get.effect(target,{name:'sha'},player,target);
return get.effect(target,{name:'sha'},player,target);
}
}
}
@ -3359,6 +3361,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(eff>0){
eff=Math.sqrt(eff);
if(target.isMaxHp()&&target.hp>2){
if(get.attitude(player,target)>0) return 0;
switch(target.hp){
case 3:return eff*2;
case 4:return eff*1.5;
@ -3588,34 +3591,32 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return target!=player&&target.countCards('h');
},
selectTarget:[1,3],
multitarget:true,
multiline:true,
content:function(){
'step 0'
if(player.countCards('h')){
player.chooseCardButton(get.translation(target)+'的手牌(可用一张手牌替换)',target.getCards('h')).ai=function(button){
return get.value(button.link)-5;
var dialog=ui.create.dialog('弃置至多2张手牌','hidden');
for(var i=0;i<targets.length;i++){
var hs=targets[i].getCards('h');
if(hs.length){
dialog.addText(get.translation(targets[i]));
dialog.add(hs);
}
}
else{
player.viewHandcards(target);
event.finish();
}
player.chooseButton(dialog,[1,2]).ai=function(button){
return get.value(button.link,get.owner(button.link));
};
'step 1'
if(result.bool){
event.card=result.links[[0]];
player.chooseCard('h',true,'用一张手牌替换'+get.translation(event.card)).ai=function(card){
return -get.value(card);
};
}
else{
event.finish();
}
'step 2'
if(result.bool){
player.gain(event.card,target);
target.gain(result.cards,player);
player.$giveAuto(result.cards,target);
target.$giveAuto(event.card,player);
game.log(player,'与',target,'交换了一张手牌');
var owner1=get.owner(result.links[0]);
var owner2=get.owner(result.links[1]);
if(owner1==owner2){
owner1.discard(result.links.slice(0));
}
else{
owner1.discard(result.links[0]).delay=false;
owner2.discard(result.links[1]);
}
}
},
contentAfter:function(){
@ -4170,7 +4171,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
gwmaoxian_enxier:'恩希尔',
gwmaoxian_enxier_info:'与一名手牌并不超过1的其他角色交换手牌然后结束出牌阶段',
gwmaoxian_fulisi:'符里斯',
gwmaoxian_fulisi_info:'选择至多三名角色,观看目标的手牌并可以用自己的手牌交换一张,然后结束出牌阶段',
gwmaoxian_fulisi_info:'选择至多三名角色,观看目标的手牌并可以弃置其中1~2张,然后结束出牌阶段',
gwmaoxian_kaerweite:'卡尔维特',
gwmaoxian_kaerweite_info:'获得至多两名角色各一张手牌,然后结束出牌阶段',
gwmaoxian_bulanwang:'布兰王',

View File

@ -1,5 +1,5 @@
(function(){
if(typeof require !== 'function') return;
if(typeof require !== 'function'||typeof document !== 'undefined') return;
global.window=global;
require(__dirname+'/update.js');
var fs=require('fs');
@ -1899,6 +1899,8 @@ window.noname_asset_list=[
'image/character/ns_huamulan.jpg',
'image/character/ns_huangzu.jpg',
'image/character/ns_jinke.jpg',
'image/character/ns_lisu.jpg',
'image/character/ns_liuzhang.jpg',
'image/character/ns_lvmeng.jpg',
'image/character/ns_lvzhi.jpg',
'image/character/ns_masu.jpg',
@ -1912,8 +1914,10 @@ window.noname_asset_list=[
'image/character/ns_wangyun.jpg',
'image/character/ns_wenchou.jpg',
'image/character/ns_xinxianying.jpg',
'image/character/ns_yangyi.jpg',
'image/character/ns_yanliang.jpg',
'image/character/ns_yuji.jpg',
'image/character/ns_yujisp.jpg',
'image/character/ns_zhangbao.jpg',
'image/character/ns_zhangxiu.jpg',
'image/character/ns_zhugeliang.jpg',

View File

@ -1,6 +1,6 @@
window.config={
forbidai:[],
forbidai_user:['miheng'],
forbidai:['miheng','ns_liuzhang'],
forbidai_user:[],
forbidall:['xiahouyuan','huangzhong','weiyan','dianwei','zhangjiao',
'caocao','simayi','guanyu','zhangfei','zhaoyun','ganning','lvmeng','lvbu'],
forbidversus:['swd_kangnalishi'],

View File

@ -4,12 +4,12 @@ window.noname_update={
changeLog:[
'bug修复',
'部分DIY比赛武将',
'players://["gw_yioufeisisp","gw_diandian","gw_fenghuang","gw_yisilinni","gw_lanbote","gw_feilafanruide"]',
'players://["ns_yujisp","ns_yangyi","ns_liuzhang","gw_yioufeisisp","gw_diandian","gw_fenghuang","gw_yisilinni","gw_lanbote","gw_feilafanruide"]',
],
files:[
'game/game.js',
// 'game/package.js',
// 'game/config.js',
'game/config.js',
// 'game/source.js',
// 'game/pressure.js',
'game/asset.js',

BIN
image/character/ns_lisu.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB