Add files via upload

This commit is contained in:
Spmario233 2020-03-23 17:11:24 +08:00 committed by GitHub
parent af2b79673b
commit 67cabb26c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 1513 additions and 1396 deletions

View File

@ -141,6 +141,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
!current.hasSkillTag('filterDamage',null,{
player:player,
card:card,
jiu:true,
})&&
get.effect(current,card,target)>0);
})){

View File

@ -162,10 +162,11 @@ game.import('card',function(lib,game,ui,get,ai,_status){
return 3;
},
result:{
target:function(player,target){
target:function(player,target,card){
if(player.hasSkill('jiu')&&!target.hasSkillTag('filterDamage',null,{
player:player,
card:{name:'sha'},
card:card,
jiu:true,
})){
if(get.attitude(player,target)>0){
return -7;

View File

@ -797,7 +797,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
audio:true,
trigger:{player:'useCard'},
filter:function(event,player){
return (get.type(event.card,'trick')=='trick'&&event.card.isCard&&player.hasMark('renjie'));
return (get.type(event.card)=='trick'&&event.card.isCard&&player.hasMark('renjie'));
},
init:function(player){
player.storage.jilue_jizhi=0;
@ -2431,14 +2431,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
};
};
if(event.list1.length&&event.list2.length){
target.discard(event.list2).delay=false;
player.discard(event.list1).delay=false;
game.delay();
}
else{
target.discard(event.list2);
player.discard(event.list1);
}
else if(event.list2.length){
target.discard(event.list2);
}
else player.discard(event.list1);
};
'step 2'
if(event.list1.length+event.list2.length==4){

View File

@ -234,6 +234,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
content:function(){
trigger.num-=trigger.getParent(2).jiu_add;
},
ai:{
filterDamage:true,
skillTagFilter:function(player,tag,arg){
return arg&&arg.jiu==true;
},
},
},
repojun:{
audio:2,
@ -3032,7 +3038,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger:{player:'useCard'},
frequent:true,
filter:function(event){
return (get.type(event.card)=='trick'&&event.card.isCard);
return (get.type(event.card,'trick')=='trick'&&event.card.isCard);
},
init:function(player){
player.storage.rejizhi=0;
@ -4487,7 +4493,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
"step 0"
player.chooseTarget(get.prompt('fenwei'),
[1,trigger.targets.length],function(card,player,target){
return _status.event.contains(target);
return _status.event.targets.contains(target);
}).set('ai',function(target){
var trigger=_status.event.getTrigger();
if(game.phaseNumber>game.players.length*2&&trigger.targets.length>=game.players.length-1&&!trigger.excluded.contains(target)){

View File

@ -461,7 +461,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger:{
player:"phaseJieshuBegin",
},
group:["drlt_zhenggu2"],
direct:true,
content:function(){
"step 0"
@ -476,57 +475,48 @@ game.import('character',function(lib,game,ui,get,ai,_status){
"step 1"
if(result.bool){
var target=result.targets[0];
player.line(target,'thunder');
player.logSkill('drlt_zhenggu',target);
target.addSkill('drlt_zhenggu2');
player.storage.drlt_zhenggu1=target;
target.storage.drlt_zhenggu=player;
}else{
event.finish();
};
player.addSkill("drlt_zhenggu2");
target.addSkill("drlt_zhenggu_mark");
target.storage.drlt_zhenggu_mark.push(player);
target.markSkill("drlt_zhenggu_mark");
lib.skill.drlt_zhenggu.sync(player,target);
}
},
sync:function(player,target){
var num=player.countCards('h');
var num2=target.countCards('h');
if(num<num2){
target.chooseToDiscard(num2-num,true,'h');
}
else target.drawTo(Math.min(5,num));
},
},
"drlt_zhenggu2":{
audio:2,
audio:"drlt_zhenggu",
trigger:{
player:"phaseEnd",
global:"phaseEnd",
},
forced:true,
popup:false,
charlotte:true,
logTarget:"player",
filter:function(event,player){
return player.storage.drlt_zhenggu!=undefined||player.storage.drlt_zhenggu1!=undefined;
return event.player.storage.drlt_zhenggu_mark&&event.player.storage.drlt_zhenggu_mark.contains(player);
},
content:function(){
if(player.storage.drlt_zhenggu!=undefined){
player.removeSkill("drlt_zhenggu2");
var pl=player.storage.drlt_zhenggu;
if(pl.isAlive()){
var num=Math.min(5,pl.countCards('h'));
var num1=0;
if(num-player.countCards('h')>0) num1=num-player.countCards('h');
if(num-player.countCards('h')<0) num1=num-player.countCards('h');
if(num1!=0){
pl.line(player,'thunder');
pl.logSkill('drlt_zhenggu',player);
}
if(num1<0) player.chooseToDiscard('h',-num1,true);
if(num1>0) player.draw(num1);
}
delete player.storage.drlt_zhenggu;
};
if(player.storage.drlt_zhenggu1!=undefined){
var pl=player.storage.drlt_zhenggu1;
if(pl.isAlive()){
var num=pl.countCards('h');
var num1=0;
var num2=Math.min(5,player.countCards('h'));
if(num2-num>0) num1=num2-num;
if(num2-num<0) num1=num2-num;
if(num1<0) pl.chooseToDiscard('h',-num1,true);
if(num1>0) pl.draw(num1);
}
delete player.storage.drlt_zhenggu1;
};
trigger.player.storage.drlt_zhenggu_mark.remove(player);
if(trigger.player.storage.drlt_zhenggu_mark.length==0) trigger.player.unmarkSkill('drlt_zhenggu_mark');
lib.skill.drlt_zhenggu.sync(player,trigger.player);
},
},
drlt_zhenggu_mark:{
init:function(player,skill){
if(!player.storage[skill]) player.storage[skill]=[];
},
marktext:'镇',
intro:{
name:'镇骨',
content:'已成为$〖镇骨〗的目标',
},
},
"xinfu_zuilun":{
@ -995,7 +985,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
selectCard:1,
position:'he',
filterTarget:function(card,player,target){
return player!=target&&trigger.targets.contains(target);
return player!=target&&_status.event.targets.contains(target);
},
ai1:function(card){
if(card.name=='du') return 20;
@ -1011,6 +1001,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return att-3;
},
prompt:get.prompt2('drlt_congjian'),
targets:trigger.targets,
});
'step 1'
if(result.bool){
@ -5124,7 +5115,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
})){
player.chooseTarget(function(card,player,target){
var source=_status.event.source;
return target!=source&&source.inRange(target)<=1;
return target!=source&&source.inRange(target);
},true).set('ai',function(target){
return get.damageEffect(target,_status.event.source,player);
}).set('source',target);
@ -6803,6 +6794,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
"drlt_huairou":"怀柔",
"drlt_huairou_info":"出牌阶段,你可以重铸装备牌",
"drlt_zhenggu":"镇骨",
drlt_zhenggu2:"镇骨",
"drlt_zhenggu_info":"结束阶段你可以选择一名其他角色你的回合结束后和该角色的下个回合结束时其将手牌摸至或弃至X张。X为你的手牌数且至多为5",
"drlt_zhenrong":"徵荣",
"drlt_zhenrong_info":"当你对其他角色造成伤害后,若其手牌比你多,你可以将其一张牌置于你的武将牌上,称为“荣”",

View File

@ -25,8 +25,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
character:{
sp_gongsunzan:['male','qun',4,['spyicong','sptuji']],
sp_simazhao:['male','wei',3,['spzhaoxin','splanggu']],
sp_wangyuanji:['male','wei',3,['spfuluan','spshude']],
sp_xinxianying:['male','wei',3,['spmingjian','spyinzhi']],
sp_wangyuanji:['female','wei',3,['spfuluan','spshude']],
sp_xinxianying:['female','wei',3,['spmingjian','spyinzhi']],
sp_liuxie:['male','qun',3,['sphuangen','sphantong']],
huangfusong:['male','qun',4,['xinfenyue']],
@ -1065,12 +1065,79 @@ game.import('character',function(lib,game,ui,get,ai,_status){
neifa:{
audio:2,
trigger:{player:'phaseUseBegin'},
direct:true,
content:function(){
'step 0'
player.draw();
_status.noclearcountdown=true;
if(game.hasPlayer(function(current){
return current.countGainableCards(player,'ej')>0;
})){
player.chooseControl('cancel2').set('choiceList',[
'摸两张牌,然后弃置一张牌',
'获得场上的一张牌,然后弃置一张牌',
]).set('prompt',get.prompt('neifa')).set('ai',function(){
if(game.hasPlayer(function(current){
var att=get.attitude(player,current);
if(att==0) return false;
if(att<0) return current.countCards('e',function(card){
return get.value(card)>0;
})>0;
return current.countCards('ej',function(card){
return get.position(card)=='j'||get.value(card)<=0;
})>0;
})) return 1;
return 0;
});
}
else{
player.chooseControl('ok','cancel2').set('prompt',get.prompt2('neifa'));
}
'step 1'
player.chooseToDiscard(true,'he');
if(result.control=='cancel2'){
delete _status.noclearcountdown;
if(!_status.noclearcountdown){
game.stopCountChoose();
}
event.finish();
return;
}
else if(result.index==1){
player.chooseTarget('请选择一名角色,获得其装备区或判定区内的一张牌',true,function(card,player,target){
return target.countGainableCards(player,'ej')>0;
}).set('ai',function(target){
var player=_status.event.player;
var att=get.attitude(player,target);
if(att>0&&target.countCards('e',function(card){
return get.position(card)=='j'||get.value(card)<=0;
})) return 2*att;
else if(att<0&&target.countCards('e',function(card){
return get.value(card)>0;
})) return -att;
return -1;
});
}
else{
delete _status.noclearcountdown;
if(!_status.noclearcountdown){
game.stopCountChoose();
}
player.logSkill('neifa');
player.draw(2);
event.goto(3)
}
'step 2'
delete _status.noclearcountdown;
if(!_status.noclearcountdown){
game.stopCountChoose();
}
if(result.bool){
var target=result.targets[0];
player.logSkill('neifa',target);
player.gainPlayerCard(target,'ej',true);
}
'step 3'
player.chooseToDiscard(true,'he');
'step 4'
if(result.bool&&result.cards&&result.cards.length){
var name=get.type(result.cards[0])=='basic'?'neifa_basic':'neifa_nobasic';
player.addTempSkill(name);
@ -1151,6 +1218,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
filter:function(event,player){
if(get.type(event.card)!='trick') return false;
if(event.targets&&event.targets.length>0) return true;
var info=get.info(event.card);
if(info.allowMultiple==false) return false;
if(event.targets&&!info.multitarget){
@ -1164,15 +1232,15 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
content:function(){
'step 0'
var prompt2='为'+get.translation(trigger.card)+'额外指定一个目标'
var prompt2='为'+get.translation(trigger.card)+'增加或减少一个目标'
player.chooseTarget(get.prompt('neifa'),function(card,player,target){
var player=_status.event.player;
if(_status.event.targets.contains(target)) return false;
if(_status.event.targets.contains(target)) return true;
return lib.filter.targetEnabled2(_status.event.card,player,target)&&lib.filter.targetInRange(_status.event.card,player,target);
}).set('prompt2',prompt2).set('ai',function(target){
var trigger=_status.event.getTrigger();
var player=_status.event.player;
return get.effect(target,trigger.card,player,player);
return get.effect(target,trigger.card,player,player)*(_status.event.targets.contains(target)?-1:1);
}).set('targets',trigger.targets).set('card',trigger.card);
'step 1'
if(result.bool){
@ -1185,7 +1253,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
'step 2'
if(event.targets){
player.logSkill('neifa',event.targets);
trigger.targets.addArray(event.targets);
if(trigger.targets.contains(event.targets[0])) trigger.targets.removeArray(event.targets);
else trigger.targets.addArray(event.targets);
}
},
group:'neifa_use',
@ -1939,7 +2008,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){
'step 0'
player.chooseTarget(get.prompt2('lskuizhu'),function(card,player,target){
return target!=player&&target.isMaxHp();
}).ai=function(){return -1};
}).ai=function(target){
var player=_status.event.player;
var ts=Math.min(5,target.countCards('h'));
var delta=ts-player.countCards('h');
if(delta<=0) return 0;
if(get.attitude(player,target)<1) return false;
return target.countCards('he',function(card){
return lib.skill.zhiheng.check(card)>0;
})>1?delta:0;
};
'step 1'
if(result.bool){
var target=result.targets[0];
@ -1959,10 +2037,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
event.finish();
return;
}
target.chooseToDiscard(true,'h',[1,player.countCards('h')],'弃置至多'+get.cnNumber(player.countCards('h'))+'张手牌,并获得'+get.translation(player)+'等量的手牌').ai=lib.skill.zhiheng.check;
target.chooseToDiscard(true,'h',[1,player.countCards('h')],'弃置至多'+get.cnNumber(player.countCards('h'))+'张手牌,并获得'+get.translation(player)+'等量的手牌').ai=function(card){
if(ui.selected.cards.length>1) return -1;
return lib.skill.zhiheng.check.apply(this,arguments)
};
'step 4'
if(result.bool&&result.cards&&result.cards.length&&player.countGainableCards(target,'h')>0){
target.gainPlayerCard(player,'h',true,result.cards.length)
target.gainPlayerCard(player,'h',true,result.cards.length).visible=true;
}
'step 5'
if(result.bool&&result.cards&&result.cards.length>1){
@ -1977,6 +2058,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
else event.finish();
'step 6'
if(result.bool&&result.targets&&result.targets.length){
player.line(result.targets[0]);
result.targets[0].damage(target);
}
else{
@ -6861,11 +6943,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
skillAnimation:true,
animationColor:'orange',
forceunique:true,
filter:function(event,player){
return player.storage.fanghun2>0;
},
//filter:function(event,player){
// return player.storage.fanghun2>0;
//},
prompt:function(event,player){
var num=player.storage.fanghun2;
var num=Math.max(2,player.storage.fanghun2||0);
var mode=get.mode();
if(mode!='chess'&&mode!='tafang'&&mode!='stone'){
num=Math.min(num,game.players.length+game.dead.length);
@ -6873,7 +6955,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return get.prompt('fuhan')+'(体力上限:'+num+'';
},
check:function(event,player){
var num=player.storage.fanghun2;
var num=Math.max(2,player.storage.fanghun2||0);
if(num==1) return false;
if(player.hp<=1) return true;
if(num==2) return false;
@ -6883,7 +6965,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
content:function(){
'step 0'
if(player.storage.fanghun) player.draw(player.storage.fanghun);
event.num=player.storage.fanghun2;
event.num=Math.max(2,player.storage.fanghun2||0);
var list;
if(_status.characterlist){
list=[];
@ -6925,7 +7007,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
_status.characterlist.remove(result.links[0]);
}
'step 2'
if(player.isMinHp()) player.recover();
player.recover();
}
},
fanghun:{
@ -6946,8 +7028,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return event.card&&event.card.name=='sha';
},
content:function(){
player.storage.fanghun++;
player.storage.fanghun2++;
player.storage.fanghun+=trigger.num;
player.storage.fanghun2+=trigger.num;
player.markSkill('fanghun');
},
group:['fanghun_sha','fanghun_shan','fanghun_draw'],
@ -9083,7 +9165,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
var card=event.card;
if(card.name=='sha') return true;
if(get.color(card)=='black'&&get.type(card)=='trick') return true;
if(get.color(card)=='black'&&get.type(card,'trick')=='trick') return true;
return false;
},
content:function(){
@ -9155,8 +9237,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger.player.markSkill('zhenwei2');
//event.trigger("addCardToStorage");
}
trigger.getParent().excluded.add(trigger.target);
trigger.player.addSkill('zhenwei2');
trigger.targets.length=0;
}
game.delay();
},
@ -12630,13 +12711,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
audio:2,
trigger:{global:'phaseUseBegin'},
filter:function(event,player){
return event.player!=player&&player.countCards('h')>0;
return (get.mode()!='guozhan'||event.player!=player)&&player.countCards('h')>0;
},
direct:true,
content:function(){
"step 0"
var nono=(Math.abs(get.attitude(player,trigger.player))<3);
if(get.damageEffect(trigger.player,player,player)<=0){
if(player==trigger.player||get.damageEffect(trigger.player,player,player)<=0){
nono=true
}
else if(trigger.player.hp>2){
@ -12663,7 +12744,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
event.finish();
}
"step 2"
if(result.bool) trigger.player.damage();
if(result.bool&&trigger.player!=player) trigger.player.damage();
},
ai:{
threaten:2,
@ -12672,6 +12753,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
qiluan:{
audio:'qiluan2',
group:'qiluan_draw',
subfrequent:['draw'],
trigger:{global:'phaseEnd'},
frequent:true,
filter:function(event,player){
@ -12684,7 +12767,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){
else{
player.draw(3*player.getStat('kill'));
}
}
},
subSkill:{
draw:{
trigger:{global:'dieAfter'},
frequent:true,
filter:function(event,player){
return get.mode()!='guozhan'&&player!=event.source;
},
content:function(){player.draw()},
},
},
},
qiluan2:{
audio:2,
@ -14762,7 +14855,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
xinfenyue:'奋钺',
xinfenyue_info:'出牌阶段限X次X为与你不同阵营的存活角色数你可以与一名其他角色拼点若你赢根据你拼点牌的点数依次执行以下效果不大于5你获得其一张牌不大于9你获得牌堆里的一张【杀】; 不大于K视为你对其使用一张雷【杀】。',
neifa:'内伐',
neifa_info:'出牌阶段开始时,你可以摸一张牌,然后弃置一张牌。若弃置的牌是基本牌,本回合你不能使用锦囊和装备牌,且【杀】的使用次数+X且目标+1若弃置的不是基本牌本回合你不能使用基本牌且普通锦囊牌的目标+1前两次使用装备牌时摸X张牌X为你发动〖内伐〗弃牌后手牌中不能使用的牌的数量且最多为5。',
neifa_info:'出牌阶段开始时,你可以摸两张牌或获得场上的一张牌,然后弃置一张牌。若弃置的牌是基本牌,本回合你不能使用锦囊和装备牌,且【杀】的使用次数+X且目标+1若弃置的不是基本牌本回合你不能使用基本牌且普通锦囊牌的目标+1前两次使用装备牌时摸X张牌X为你发动〖内伐〗弃牌后手牌中不能使用的牌的数量且最多为5。',
neifa_use:'内伐',
hmmanyi:'蛮裔',
hmmanyi_info:'锁定技,【南蛮入侵】对你无效。',
@ -15056,9 +15149,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
duanbing:'短兵',
duanbing_info:'当你使用【杀】选择目标后你可以令一名距离为1的其他角色也成为此牌的目标。',
fanghun:'芳魂',
fanghun_info:'当你使用【杀】造成伤害或受到【杀】的伤害后,你获得1个“梅影”标记你可以移去1个“梅影”标记来发动〖龙胆〗并摸一张牌。',
fanghun_info:'当你使用【杀】造成伤害或受到【杀】的伤害后,你获得X个“梅影”标记X为伤害点数你可以移去1个“梅影”标记来发动〖龙胆〗并摸一张牌。',
fuhan:'扶汉',
fuhan_info:'限定技,回合开始时,你可以移去所有“梅影”标记并摸等量的牌,随机观看五名未登场的蜀势力角色,将武将牌替换为其中一名角色,并将体力上限数调整为本局游戏中移去“梅影”标记的数量(至多为游戏开始时的角色数),然后若你是体力值最低的角色,你回复1点体力。',
fuhan_info:'限定技,回合开始时,你可以移去所有“梅影”标记并摸等量的牌,随机观看五名未登场的蜀势力角色,将武将牌替换为其中一名角色,并将体力上限数调整为本局游戏中移去“梅影”标记的数量(至多为游戏开始时的角色数),然后回复1点体力。',
yjixi:'觊玺',
yjixi_info:'觉醒技结束阶段若你连续三回合没有因〖庸肆〗而失去过体力则你增加1点体力上限并回复1点体力然后选择一项获得技能〖妄尊〗摸两张牌并获得当前主公的主公技。',
xinyongsi:'庸肆',
@ -15399,9 +15492,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
qiangwu_info:'出牌阶段,你可以进行判定。若如此做,直到回合结束,你使用点数小于判定结果的【杀】时不受距离限制,且你使用点数大于判定结果的【杀】时不计入出牌阶段的使用次数限制。',
shenxian_info:'每名角色的回合限一次,你的回合外,当有其他角色因弃置而失去基本牌时,你可以摸一张牌。',
oldshenxian_info:'你的回合外,每当有其他角色因弃置而失去基本牌时,你可以摸一张牌。',
qiluan_info:'一名角色的回合结束时你可以摸3X张牌X为你本回合内杀死过的角色数',
qiluan_info:'一名角色的回合结束时你可以摸3X张牌X为你本回合内杀死过的角色数。一名其他角色死亡后,若其不是你杀死的,则你可以摸一张牌。',
qiluan_info_guozhan:'一名角色的回合结束时,若你于回合内杀死过角色,则你可以摸三张牌。',
zhendu_info:'其他角色的出牌阶段开始时,你可以弃置一张手牌,视为该角色使用了一张【酒】。若如此做,你对其造成一点伤害。',
zhendu_info:'一名角色的出牌阶段开始时,你可以弃置一张手牌,视为该角色使用了一张【酒】。若该角色不是你,你对其造成一点伤害。',
zhendu_info_guozhan:'其他角色的出牌阶段开始时,你可以弃置一张手牌,视为该角色使用了一张【酒】。若如此做,你对其造成一点伤害。',
shangyi_info:'出牌阶段限一次,你可以观看一名其他角色的手牌,然后弃置其中的一张黑色牌。',
zniaoxiang_info:'锁定技,当你使用【杀】指定目标后,你令目标角色响应此【杀】所需要使用的【闪】的数目+1。',
shoucheng_info:'当一名其他角色于其回合外失去手牌时,若其没有手牌,则你可令该角色摸一张牌。',

View File

@ -74,27 +74,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player:"useCardEnd",
},
check:function (event,player){
return 18-get.value(event.card)-player.maxHp*2;
return get.value(event.card)-player.maxHp*2-18>0;
},
filter:function (event,player){
if(!player.isPhaseUsing()) return false;
if(event.cards){
if(get.type(event.card)!='trick') return false;
for(var i=0;i<event.cards.length;i++){
if(event.cards[i].isInPile()) return true;
}
}
return false;
return player.isPhaseUsing()&&event.cards.filterInD().length>0;
},
content:function (){
var list=[];
for(var i=0;i<trigger.cards.length;i++){
if(trigger.cards[i].isInPile()){
list.push(trigger.cards[i]);
}
}
player.gain(list,'gain2');
player.loseMaxHp();
player.gain(trigger.cards.filterInD(),'gain2','log');
},
},
"xinfu_xingluan":{
@ -3668,7 +3655,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
"xinfu_limu":{
mod:{
targetInRange:function (card,player,target){
if(player.countCards('j')&&target.inRange(player)){
if(player.countCards('j')&&player.inRange(target)){
return true;
}
},

View File

@ -643,6 +643,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
ai:{
save:true,
skillTagFilter:function(player){
return player.hp<=0&&player.storage.xinfuli!=true;
},
result:{
player:10
},
@ -2407,7 +2410,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
mod:{
maxHandcard:function(player,num){
return num+player.storage.bizhuan.length;
if(player.storage.bizhuan&&player.storage.bizhuan.length) return num+player.storage.bizhuan.length;
}
}
},
@ -7542,6 +7545,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
ai:{
save:true,
skillTagFilter:function(player){
return player.hp<=0&&player.storage.fuli!=true;
},
result:{
player:10
},

View File

@ -2532,20 +2532,20 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger:{player:'useCardAfter'},
direct:true,
filter:function(event,player){
if(get.position(event.card)!='d') return false;
if(event.cards.filterInD().length==0) return false;
if(player.hasSkill('jieyong2')) return false;
return player.countCards('he',{color:'black'})>0;
},
content:function(){
"step 0"
var next=player.chooseToDiscard('he','是否弃置一张黑色牌并收回'+get.translation(trigger.card)+'',{color:'black'});
var next=player.chooseToDiscard('he','是否弃置一张黑色牌并收回'+get.translation(trigger.cards.filterInD())+'',{color:'black'});
next.ai=function(card){
return get.value(trigger.card)-get.value(card);
}
next.logSkill='jieyong';
"step 1"
if(result.bool){
player.gain(trigger.card,'gain2');
player.gain(trigger.cards.filterInD(),'gain2','log');
player.addTempSkill('jieyong2',['phaseAfter','phaseBegin']);
}
},
@ -3111,7 +3111,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
zhulu_info:'回合外,当有普通锦囊牌结算完毕后,你可以立即弃掉一张相同花色手牌或装备区的牌,获得这张锦囊牌。',
jieyong:'节用',
jieyong2:'节用',
jieyong_info:'你使用的卡牌进入弃牌堆后,你可以弃置一张黑色牌并重新获得之(每回合限一次)',
jieyong_info:'你使用的卡牌结算完成后,你可以弃置一张黑色牌并重新获得之(每回合限一次)',
shangtong:'尚同',
shangtong_info:'每当你令其他角色恢复1点血量或掉1点血量时你可以摸1张牌摸牌上限为4',
feiming:'非命',

View File

@ -1,5 +1,5 @@
window.noname_asset_list=[
'1.9.98.4',
'1.9.98.4.1',
'audio/background/aozhan_chaoming.mp3',
'audio/background/aozhan_online.mp3',
'audio/background/aozhan_rewrite.mp3',
@ -2359,6 +2359,15 @@ window.noname_asset_list=[
'audio/skill/zhongzuo1.mp3',
'audio/skill/zhongzuo2.mp3',
'audio/skill/buyi_re_wuguotai1.mp3',
'audio/skill/busuan1.mp3',
'audio/skill/busuan2.mp3',
'audio/skill/gxlianhua1.mp3',
'audio/skill/gxlianhua2.mp3',
'audio/skill/mingjie1.mp3',
'audio/skill/tuiyan1.mp3',
'audio/skill/tuiyan2.mp3',
'audio/skill/zhafu1.mp3',
'audio/skill/zhafu2.mp3',
'font/huangcao.ttf',
'font/shousha.ttf',

View File

@ -32,7 +32,7 @@
},
updateURL:'https://raw.githubusercontent.com/libccy/noname',
mirrorURL:'https://nakamurayuri.coding.net/p/noname/d/noname/git/raw',
hallURL:'noname.pub',
hallURL:'noname.mobi',
assetURL:'',
changeLog:[],
updates:[],
@ -995,7 +995,7 @@
editbg.call(node.lastChild);
}
}
}).inputNode.accept='image/jpeg';
}).inputNode.accept='image/*';
var editbg=function(){
this.classList.toggle('active');
var page=this.parentNode.parentNode;
@ -1255,7 +1255,7 @@
});
});
}
}).inputNode.accept='image/jpeg,image/png';
}).inputNode.accept='image*';
deletepic=ui.create.div('.menubutton.deletebutton','删除图片',node,function(){
if(confirm('确定删除自定义图片?(此操作不可撤销)')){
game.deleteDB('image','card_style');
@ -1379,14 +1379,14 @@
});
});
}
}).inputNode.accept='image/jpeg,image/png';
}).inputNode.accept='image/*';
ui.create.filediv('.menubutton.deletebutton.addbutton','添加翻转图片',node,function(file){
if(file){
game.putDB('image','cardback_style2',file,function(){
node.classList.add('hideadd');
});
}
}).inputNode.accept='image/jpeg,image/png';
}).inputNode.accept='image/*';
deletepic=ui.create.div('.menubutton.deletebutton','删除图片',node,function(){
if(confirm('确定删除自定义图片?(此操作不可撤销)')){
game.deleteDB('image','cardback_style');
@ -1530,7 +1530,7 @@
});
});
}
}).inputNode.accept='image/jpeg,image/png';
}).inputNode.accept='image/*';
deletepic=ui.create.div('.menubutton.deletebutton','删除图片',node,function(){
if(confirm('确定删除自定义图片?(此操作不可撤销)')){
game.deleteDB('image','hp_style1');
@ -1709,7 +1709,7 @@
});
});
}
}).inputNode.accept='image/jpeg,image/png';
}).inputNode.accept='image/*';
deletepic=ui.create.div('.menubutton.deletebutton','删除图片',node,function(){
if(confirm('确定删除自定义图片?(此操作不可撤销)')){
game.deleteDB('image','player_style');
@ -1834,7 +1834,7 @@
});
});
}
}).inputNode.accept='image/jpeg,image/png';
}).inputNode.accept='image/*';
deletepic=ui.create.div('.menubutton.deletebutton','删除图片',node,function(){
if(confirm('确定删除自定义图片?(此操作不可撤销)')){
game.deleteDB('image','border_style');
@ -2024,7 +2024,7 @@
});
});
}
}).inputNode.accept='image/jpeg,image/png';
}).inputNode.accept='image/*';
deletepic=ui.create.div('.menubutton.deletebutton','删除图片',node,function(){
if(confirm('确定删除自定义图片?(此操作不可撤销)')){
game.deleteDB('image','menu_style');
@ -2143,7 +2143,7 @@
});
});
}
}).inputNode.accept='image/jpeg,image/png';
}).inputNode.accept='image/*';
deletepic=ui.create.div('.menubutton.deletebutton','删除图片',node,function(){
if(confirm('确定删除自定义图片?(此操作不可撤销)')){
game.deleteDB('image','control_style');
@ -13345,17 +13345,17 @@
if(att>0){
if(!_status.event.nojudge&&target.countCards('j')) return 10;
if(target.countCards('e',function(card){
return get.value(card)<0&&game.hasPlayer(function(current){
return get.attitude(player,current)<0&&current.isEmpty(get.subtype(card))
return get.value(card,target)<0&&game.hasPlayer(function(current){
return current!=target&&get.attitude(player,current)<0&&current.isEmpty(get.subtype(card))
});
})>0) return 9;
}
else if(att<0){
if(game.hasPlayer(function(current){
if(get.attitude(player,current)>0){
if(current!=target&&get.attitude(player,current)>0){
var es=target.getCards('e');
for(var i=0;i<es.length;i++){
if(get.value(es[i])>0&&current.isEmpty(get.subtype(es[i]))) return true;
if(get.value(es[i],target)>0&&current.isEmpty(get.subtype(es[i]))) return true;
}
}
})){
@ -13368,8 +13368,8 @@
var i;
var att2=get.attitude(player,ui.selected.targets[0]);
for(i=0;i<es.length;i++){
if(sgnatt!=0&&att2!=0&get.sgn(get.value(es[i]))==sgnatt*att&&target.isEmpty(get.subtype(es[i]))){
break;
if(sgnatt!=0&&att2!=0&get.sgn(get.value(es[i]))==sgnatt&&target.isEmpty(get.subtype(es[i]))){
return Math.abs(att);
}
}
if(i==es.length){
@ -14968,6 +14968,9 @@
if(event.animate!==false){
player.$die(source);
}
if(player.hp!=0){
player.changeHp(0-player.hp,false).forceDie=true;
}
"step 1"
if(player.dieAfter) player.dieAfter(source);
"step 2"
@ -25102,6 +25105,15 @@
}
},
chat:function(id,str){
var that=this;
if(!this.id||(!lib.playerOL[this.id]&&(!game.connectPlayers||!function(){
for(var i=0;i<game.connectPlayers.length;i++){
if(game.connectPlayers[i].playerid==that.id){
return true;
}
}
return false;
}()))) return;
var player;
if(lib.playerOL[id]){
player=lib.playerOL[id];
@ -25545,6 +25557,7 @@
_status.over=true;
}
if(observe){
game.observe=true;
game.onlineID=null;
game.roomId=null;
}
@ -26426,6 +26439,7 @@
_status.ip=ip;
},
send:function(){
if(game.observe&&arguments[0]!='reinited') return;
if(game.ws){
var args=Array.from(arguments);
if(typeof args[0]=='function'){
@ -36954,7 +36968,7 @@
var input=document.createElement('input');
input.type='file';
input.accept='image/jpeg';
input.accept='image/*';
input.className='fileinput';
input.onchange=function(){
var fileToLoad=input.files[0];
@ -37439,7 +37453,7 @@
var input=document.createElement('input');
input.type='file';
input.accept='image/jpeg,image/png';
input.accept='image/*';
input.className='fileinput';
input.onchange=function(){
var fileToLoad=input.files[0];
@ -39407,7 +39421,7 @@
var span6_br=ui.create.node('br');
li2.lastChild.appendChild(span6_br);
var span5=ui.create.div('','图片素材(精简,35MB');
var span5=ui.create.div('','图片素材(精简,126MB');
span5.style.fontSize='small';
span5.style.lineHeight='16px';
var span5_check=document.createElement('input');
@ -39421,7 +39435,7 @@
}
var span2_br=ui.create.node('br');
var span4=ui.create.div('','字体素材(16MB');
var span4=ui.create.div('','字体素材(48MB');
span4.style.fontSize='small';
span4.style.lineHeight='16px';
li2.lastChild.appendChild(span4);
@ -39438,7 +39452,7 @@
var span3_br=ui.create.node('br');
li2.lastChild.appendChild(span3_br);
var span3=ui.create.div('','音效素材(36MB');
var span3=ui.create.div('','音效素材(125MB');
span3.style.fontSize='small';
span3.style.lineHeight='16px';
li2.lastChild.appendChild(span3);
@ -39455,7 +39469,7 @@
var span4_br=ui.create.node('br');
li2.lastChild.appendChild(span4_br);
var span2=ui.create.div('','皮肤素材(23MB');
var span2=ui.create.div('','皮肤素材(351MB');
span2.style.fontSize='small';
span2.style.lineHeight='16px';
li2.lastChild.appendChild(span2);
@ -39477,7 +39491,7 @@
li2.lastChild.appendChild(span5_check);
li2.lastChild.appendChild(span2_br);
var span6=ui.create.div('','图片素材(完整,96MB');
var span6=ui.create.div('','图片素材(完整,203MB');
span6.style.fontSize='small';
span6.style.lineHeight='16px';
li2.lastChild.appendChild(span6);
@ -39863,12 +39877,14 @@
}
}
else{
try{
var result=eval(text2.value);
game.print(result);
}
catch(e){
game.print(e);
if(!game.observe&&!game.online){
try{
var result=eval(text2.value);
game.print(result);
}
catch(e){
game.print(e);
}
}
text2.value='';
}
@ -42009,7 +42025,7 @@
}
else{
var func=function(){
if(confirm('是否下载图片和字体素材?(约40MB')){
if(confirm('是否下载图片和字体素材?(约175MB')){
if(!ui.arena.classList.contains('menupaused')){
ui.click.configMenu();
ui.click.menuTab('其它');
@ -43494,11 +43510,15 @@
uiintro.style.height=uiintro.content.offsetHeight+'px';
list.scrollTop=list.scrollHeight;
var node=uiintro.add('<input type="text" value="">');
if(!_status.chatValue) _status.chatValue='';
var node=uiintro.add('<input type="text" value="'+_status.chatValue+'">');
node.style.paddingTop=0;
node.style.marginBottom='16px';
input=node.firstChild;
input.style.width='calc(100% - 20px)';
input.onchange=function(){
_status.chatValue=input.value;
}
input.onkeydown=function(e){
if(e.keyCode==13&&input.value){
var player=game.me;
@ -43525,6 +43545,7 @@
lib.element.player.chat.call(player,str);
}
input.value='';
_status.chatValue='';
}
e.stopPropagation();
}

View File

@ -1,12 +1,12 @@
window.noname_update={
version:'1.9.98.4',
update:'1.9.98.3.2',
version:'1.9.98.4.1',
update:'1.9.98.4',
changeLog:[
'SP贴纸',
'何太后,二袁,赵襄调整',
'bug修复',
],
files:[
//'card/extra.js',
'card/extra.js',
//'card/huanlekapai.js',
//'card/sp.js',
'card/standard.js',
@ -16,13 +16,13 @@ window.noname_update={
//'card/gwent.js',
//'card/zhenfa.js',
//'card/zhulu.js',
'character/diy.js',
//'character/diy.js',
'character/extra.js',
//'character/hearth.js',
//'character/gujian.js',
//'character/gwent.js',
//'character/hearth.js',
'character/mobile.js',
//'character/mobile.js',
//'character/mtg.js',
//'character/old.js',
'character/refresh.js',
@ -30,22 +30,22 @@ window.noname_update={
'character/sp.js',
//'character/tw.js',
//'character/standard.js',
'character/swd.js',
//'character/swd.js',
//'character/xianjian.js',
//'character/xinghuoliaoyuan.js',
'character/xinghuoliaoyuan.js',
'character/yijiang.js',
'character/yxs.js',
//'extension/boss/extension.js',
//'layout/default/layout.css',
//'layout/nova/layout.css',
//'mode/identity.js',
'mode/identity.js',
//'mode/doudizhu.js',
'mode/guozhan.js',
//'mode/chess.js',
//'mode/tafang.js',
//'mode/single.js',
'mode/single.js',
//'mode/stone.js',
'mode/brawl.js',
//'mode/brawl.js',
//'mode/versus.js',
//'mode/boss.js',
'game/game.js',

View File

@ -3804,7 +3804,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
};
for(var i=0;i<friends.length;i++){
for(var j=1;j<=5;j++){
if(friends[i].canEquip(j)){
if(friends[i].isEmpty(j)){
vacancies['equip'+j]++;
}
}
@ -3816,7 +3816,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
var es=sources[i].getCards('e');
for(var j=0;j<es.length;j++){
var type=get.subtype(es[j]);
if(vacancies[type]){
if(vacancies[type]&&get.value(es[j])>0){
num++;
if(num>=3){
return 1;

View File

@ -2470,6 +2470,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
break;
case 'nei':
if(identity2=='zhu'&&game.players.length==2) return -10;
if(identity2!='zhu'&&game.players.length==3) return -8;
var strategy=get.aiStrategy();
if(strategy==4){
if(from==to) return 10;

File diff suppressed because it is too large Load Diff