Merge branch 'PR-Branch' of https://github.com/libccy/noname into PR-Branch

This commit is contained in:
Spmario233 2023-10-03 21:07:48 +08:00
commit 7666846230
18 changed files with 405 additions and 451 deletions

View File

@ -781,7 +781,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
if(card.name=='sha'){ if(card.name=='sha'){
var equip1=player.getEquip('zhuque'); var equip1=player.getEquip('zhuque');
if(equip1&&equip1.name=='zhuque') return 1.9; if(equip1&&equip1.name=='zhuque') return 1.9;
if(!card.hasNature()) return 'zerotarget'; if(!game.hasNature(card)) return 'zerotarget';
} }
} }
} }
@ -810,7 +810,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
effect:{ effect:{
target:function(card,player,target,current){ target:function(card,player,target,current){
if(card.name=='sha'){ if(card.name=='sha'){
if(card.hasNature('fire')) return 2; if(game.hasNature(card,'fire')) return 2;
if(player.hasSkill('zhuque_skill')) return 1.9; if(player.hasSkill('zhuque_skill')) return 1.9;
} }
if(get.tag(card,'fireDamage')&&current<0) return 2; if(get.tag(card,'fireDamage')&&current<0) return 2;
@ -830,7 +830,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
target:player, target:player,
card:event.card card:event.card
})) return false; })) return false;
if(event.card.name=='sha'&&!event.card.hasNature()) return true; if(event.card.name=='sha'&&!game.hasNature(event.card)) return true;
return false; return false;
}, },
content:function(){ content:function(){
@ -906,7 +906,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
trigger:{player:'useCard1'}, trigger:{player:'useCard1'},
//priority:7, //priority:7,
filter:function(event,player){ filter:function(event,player){
if(event.card.name=='sha'&&!event.card.hasNature()) return true; if(event.card.name=='sha'&&!game.hasNature(event.card)) return true;
}, },
audio:true, audio:true,
check:function(event,player){ check:function(event,player){

View File

@ -1211,7 +1211,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
}, },
filter:function(event,player){ filter:function(event,player){
if(['huoshaolianying','huogong'].contains(event.card.name)) return true; if(['huoshaolianying','huogong'].contains(event.card.name)) return true;
if(event.card.name=='sha') return event.card.hasNature('fire'); if(event.card.name=='sha') return game.hasNature(event.card,'fire');
return false; return false;
}, },
content:function(){ content:function(){
@ -1220,7 +1220,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
ai:{ ai:{
effect:{ effect:{
target:function(card,player,target,current){ target:function(card,player,target,current){
if(['huoshaolianying','huogong'].contains(card.name)||(card.name=='sha'&&card.hasNature('fire'))){ if(['huoshaolianying','huogong'].contains(card.name)||(card.name=='sha'&&game.hasNature(card,'fire'))){
return 'zeroplayertarget'; return 'zeroplayertarget';
} }
}, },

View File

@ -134,7 +134,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
if(event.shanRequired>1){ if(event.shanRequired>1){
next.set('prompt2','(共需使用'+event.shanRequired+'张闪)'); next.set('prompt2','(共需使用'+event.shanRequired+'张闪)');
} }
else if(event.card.hasNature('stab')){ else if(game.hasNature(event.card,'stab')){
next.set('prompt2','(在此之后仍需弃置一张手牌)'); next.set('prompt2','(在此之后仍需弃置一张手牌)');
} }
next.set('ai1',function(card){ next.set('ai1',function(card){
@ -168,7 +168,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
if(event.shanRequired>0){ if(event.shanRequired>0){
event.goto(1); event.goto(1);
} }
else if(event.card.hasNature('stab')&&target.countCards('h')>0){ else if(game.hasNature(event.card,'stab')&&target.countCards('h')>0){
event.responded=result; event.responded=result;
event.goto(4); event.goto(4);
} }
@ -265,7 +265,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
}, },
order:function(item,player){ order:function(item,player){
if(player.hasSkillTag('presha',true,null,true)) return 10; if(player.hasSkillTag('presha',true,null,true)) return 10;
if(item.hasNature('linked')){ if(game.hasNature(item,'linked')){
if(game.hasPlayer(function(current){ if(game.hasPlayer(function(current){
return current!=player&&current.isLinked()&&player.canUse(item,current,null,true)&&get.effect(current,item,player,player)>0&&lib.card.sha.ai.canLink(player,current,item); return current!=player&&current.isLinked()&&player.canUse(item,current,null,true)&&get.effect(current,item,player,player)>0&&lib.card.sha.ai.canLink(player,current,item);
})&&game.countPlayer(function(current){ })&&game.countPlayer(function(current){
@ -306,20 +306,20 @@ game.import('card',function(lib,game,ui,get,ai,_status){
respond:1, respond:1,
respondShan:1, respondShan:1,
damage:function(card){ damage:function(card){
if(card.hasNature('poison')) return; if(game.hasNature(card,'poison')) return;
return 1; return 1;
}, },
natureDamage:function(card){ natureDamage:function(card){
if(card.hasNature()) return 1; if(game.hasNature(card)) return 1;
}, },
fireDamage:function(card,nature){ fireDamage:function(card,nature){
if(card.hasNature('fire')) return 1; if(game.hasNature(card,'fire')) return 1;
}, },
thunderDamage:function(card,nature){ thunderDamage:function(card,nature){
if(card.hasNature('thunder')) return 1; if(game.hasNature(card,'thunder')) return 1;
}, },
poisonDamage:function(card,nature){ poisonDamage:function(card,nature){
if(card.hasNature('poison')) return 1; if(game.hasNature(card,'poison')) return 1;
} }
} }
} }
@ -338,20 +338,20 @@ game.import('card',function(lib,game,ui,get,ai,_status){
respond:1, respond:1,
respondShan:1, respondShan:1,
damage:function(card){ damage:function(card){
if(card.hasNature('poison')) return; if(game.hasNature(card,'poison')) return;
return 1; return 1;
}, },
natureDamage:function(card){ natureDamage:function(card){
if(card.hasNature()) return 1; if(game.hasNature(card)) return 1;
}, },
fireDamage:function(card,nature){ fireDamage:function(card,nature){
if(card.hasNature('fire')) return 1; if(game.hasNature(card,'fire')) return 1;
}, },
thunderDamage:function(card,nature){ thunderDamage:function(card,nature){
if(card.hasNature('thunder')) return 1; if(game.hasNature(card,'thunder')) return 1;
}, },
poisonDamage:function(card,nature){ poisonDamage:function(card,nature){
if(card.hasNature('poison')) return 1; if(game.hasNature(card,'poison')) return 1;
} }
} }
} }

View File

@ -307,7 +307,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
equipSkill:true, equipSkill:true,
trigger:{player:'useCard1'}, trigger:{player:'useCard1'},
filter:function(event,player){ filter:function(event,player){
return (event.card.name=='sha'&&lib.linked.some(n=>n!='kami'&&event.card.hasNature(n))); return (event.card.name=='sha'&&lib.linked.some(n=>n!='kami'&&game.hasNature(event.card,n)));
}, },
audio:true, audio:true,
direct:true, direct:true,

View File

@ -1076,7 +1076,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
try{ try{
var cards=player.getCards('hs',cardx=>{ var cards=player.getCards('hs',cardx=>{
if(get.name(cardx)!='sha') return false; if(get.name(cardx)!='sha') return false;
return cardx.hasNature('linked'); return game.hasNature(cardx,'linked');
}); });
cards.map(i=>[i,get.effect(target,i,player,player)]); cards.map(i=>[i,get.effect(target,i,player,player)]);
cards.sort((a,b)=>b[1]-a[1]); cards.sort((a,b)=>b[1]-a[1]);
@ -1096,7 +1096,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return get.name(card)=='jiu'&&player.hasUseTarget(card); return get.name(card)=='jiu'&&player.hasUseTarget(card);
})&&player.countCards('hs',card=>{ })&&player.countCards('hs',card=>{
if(get.name(card)!='sha') return false; if(get.name(card)!='sha') return false;
return card.hasNature('linked'); return game.hasNature(card,'linked');
})); }));
'step 1' 'step 1'
if(result.bool){ if(result.bool){

View File

@ -875,7 +875,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
var player=_status.event.player,target=_status.event.getParent().target; var player=_status.event.player,target=_status.event.getParent().target;
if(get.attitude(player,target)<0) return false; if(get.attitude(player,target)<0) return false;
if(!_status.event.colors.contains(get.color(card,player))) return 0; if(!_status.event.colors.contains(get.color(card,player))) return 0;
if(card.hasNature()) return 1.2; if(game.hasNature(card)) return 1.2;
return 1; return 1;
}) })
'step 3' 'step 3'

View File

@ -6177,7 +6177,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(['trick','delay'].contains(lib.card[card.name].type)) return 'thunder'; if(['trick','delay'].contains(lib.card[card.name].type)) return 'thunder';
}, },
cardUsable:function(card,player){ cardUsable:function(card,player){
if(card.name=='sha'&&card.hasNature('thunder')) return Infinity; if(card.name=='sha'&&game.hasNature(card,'thunder')) return Infinity;
}, },
}, },
ai:{ ai:{

View File

@ -6437,7 +6437,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
prompt2:function(event,player){ prompt2:function(event,player){
var str=('令'+get.translation(event.player)+'即将受到的'); var str=('令'+get.translation(event.player)+'即将受到的');
str+=(''+event.num+'点'); str+=(''+event.num+'点');
if(lib.linked.some(n=>event.hasNature(n))){ if(event.hasNature('linked')){
str+=(get.translation(event.nature)+'属性'); str+=(get.translation(event.nature)+'属性');
} }
str+='伤害+1'; str+='伤害+1';
@ -7061,7 +7061,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}).length; }).length;
//var str='视为额外使用'+get.cnNumber(num)+'张' //var str='视为额外使用'+get.cnNumber(num)+'张'
var str='额外结算'+get.cnNumber(num)+'次' var str='额外结算'+get.cnNumber(num)+'次'
if(event.card.name=='sha'&&event.card.hasNature()) str+=get.translation(event.card.nature); if(event.card.name=='sha'&&game.hasNature(event.card)) str+=get.translation(event.card.nature);
return (str+'【'+get.translation(event.card.name)+'】'); return (str+'【'+get.translation(event.card.name)+'】');
}, },
check:function(event,player){ check:function(event,player){

View File

@ -9624,7 +9624,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
group:['relihuo_baigei','relihuo_damage'], group:['relihuo_baigei','relihuo_damage'],
trigger:{player:'useCard1'}, trigger:{player:'useCard1'},
filter:function(event,player){ filter:function(event,player){
if(event.card.name=='sha'&&!event.card.hasNature()) return true; if(event.card.name=='sha'&&!game.hasNature(event.card)) return true;
}, },
check:function(event,player){ check:function(event,player){
return false; return false;
@ -9650,7 +9650,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
forced:true, forced:true,
audio:'relihuo', audio:'relihuo',
filter:function(event,player){ filter:function(event,player){
if(event.card.name!='sha'||!event.card.hasNature('fire')) return false; if(event.card.name!='sha'||!game.hasNature(event.card,'fire')) return false;
var num=0; var num=0;
player.getHistory('sourceDamage',function(evt){ player.getHistory('sourceDamage',function(evt){
if(evt.card==event.card) num+=evt.num; if(evt.card==event.card) num+=evt.num;

View File

@ -940,7 +940,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
filter:function(event,player){ filter:function(event,player){
if(!player.hasEmptySlot(2)) return false; if(!player.hasEmptySlot(2)) return false;
if(event.card.name!='sha') return false; if(event.card.name!='sha') return false;
return event.card.hasNature(); return game.hasNature(event.card);
}, },
content:function(){ content:function(){
trigger.cancel(); trigger.cancel();
@ -6234,7 +6234,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
fulu:{ fulu:{
trigger:{player:'useCard1'}, trigger:{player:'useCard1'},
filter:function(event,player){ filter:function(event,player){
if(event.card.name=='sha'&&!event.card.hasNature()) return true; if(event.card.name=='sha'&&!game.hasNature(event.card)) return true;
}, },
audio:true, audio:true,
check:function(event,player){ check:function(event,player){

View File

@ -6111,7 +6111,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
trigger:{player:'useCard1'}, trigger:{player:'useCard1'},
filter:function(event,player){ filter:function(event,player){
if(event.card.name=='sha'&&!event.card.hasNature()) return true; if(event.card.name=='sha'&&!game.hasNature(event.card)) return true;
return false; return false;
}, },
audio:'lihuo', audio:'lihuo',
@ -6139,7 +6139,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
ollihuo2:{ ollihuo2:{
trigger:{player:'useCard2'}, trigger:{player:'useCard2'},
filter:function(event,player){ filter:function(event,player){
if(event.card.name!='sha'||!event.card.hasNature('fire')) return false; if(event.card.name!='sha'||!game.hasNature(event.card,'fire')) return false;
return game.hasPlayer(function(current){ return game.hasPlayer(function(current){
return !event.targets.contains(current)&&lib.filter.targetEnabled(event.card,player,current)&&lib.filter.targetInRange(event.card,player,current); return !event.targets.contains(current)&&lib.filter.targetEnabled(event.card,player,current)&&lib.filter.targetInRange(event.card,player,current);
}); });
@ -7604,7 +7604,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
decadelihuo:{ decadelihuo:{
trigger:{player:'useCard1'}, trigger:{player:'useCard1'},
filter:function(event,player){ filter:function(event,player){
if(event.card.name=='sha'&&!event.card.hasNature()) return true; if(event.card.name=='sha'&&!game.hasNature(event.card)) return true;
return false; return false;
}, },
audio:'lihuo', audio:'lihuo',
@ -7630,7 +7630,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
decadelihuo2:{ decadelihuo2:{
trigger:{player:'useCard2'}, trigger:{player:'useCard2'},
filter:function(event,player){ filter:function(event,player){
if(event.card.name!='sha'||!event.card.hasNature('fire')) return false; if(event.card.name!='sha'||!game.hasNature(event.card,'fire')) return false;
return game.hasPlayer(function(current){ return game.hasPlayer(function(current){
return !event.targets.contains(current)&&player.canUse(event.card,current); return !event.targets.contains(current)&&player.canUse(event.card,current);
}); });
@ -7660,7 +7660,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
decadelihuo3:{ decadelihuo3:{
trigger:{player:'useCardAfter'}, trigger:{player:'useCardAfter'},
filter:function(event,player){ filter:function(event,player){
return event.card.name=='sha'&&event.card.hasNature('fire')&&event.targets.length>1&&player.getHistory('sourceDamage',function(evt){ return event.card.name=='sha'&&game.hasNature(event.card,'fire')&&event.targets.length>1&&player.getHistory('sourceDamage',function(evt){
return evt.card==event.card; return evt.card==event.card;
}).length>0; }).length>0;
}, },

View File

@ -19389,7 +19389,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
effect:{ effect:{
target:function(card,player,target,current){ target:function(card,player,target,current){
if(card.name=='sha'){ if(card.name=='sha'){
if(card.hasNature('fire')||player.hasSkill('zhuque_skill')) return 2; if(game.hasNature(card,'fire')||player.hasSkill('zhuque_skill')) return 2;
} }
if(get.tag(card,'fireDamage')&&current<0) return 2; if(get.tag(card,'fireDamage')&&current<0) return 2;
} }
@ -19415,7 +19415,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
hanyong:{ hanyong:{
trigger:{player:'useCard'}, trigger:{player:'useCard'},
filter:function(event,player){ filter:function(event,player){
return event.card&&(event.card.name=='nanman'||event.card.name=='wanjian'||(event.card.name=='sha'&&!event.card.hasNature()&&get.suit(event.card)=='spade'))&&player.isDamaged(); return event.card&&(event.card.name=='nanman'||event.card.name=='wanjian'||(event.card.name=='sha'&&!game.hasNature(event.card)&&get.suit(event.card)=='spade'))&&player.isDamaged();
}, },
content:function(){ content:function(){
trigger.baseDamage++; trigger.baseDamage++;

View File

@ -6560,7 +6560,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
} }
else{ else{
var vcard=[get.type(trigger.card),'',trigger.card.name]; var vcard=[get.type(trigger.card),'',trigger.card.name];
if(trigger.card.hasNature()) vcard.push(get.nature(trigger.card)); if(game.hasNature(trigger.card)) vcard.push(get.nature(trigger.card));
player.storage.juanhui3.push(vcard); player.storage.juanhui3.push(vcard);
player.markSkill('juanhui2'); player.markSkill('juanhui2');
} }
@ -7361,7 +7361,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
target:function(card,player,target,current){ target:function(card,player,target,current){
if(target.hasMark('cangchu')){ if(target.hasMark('cangchu')){
if(card.name=='sha'){ if(card.name=='sha'){
if(lib.skill.global.contains('huoshaowuchao')||card.hasNature('fire')||player.hasSkill('zhuque_skill')) return 2; if(lib.skill.global.contains('huoshaowuchao')||game.hasNature(card,'fire')||player.hasSkill('zhuque_skill')) return 2;
} }
if(get.tag(card,'fireDamage')&&current<0) return 2; if(get.tag(card,'fireDamage')&&current<0) return 2;
} }

View File

@ -6039,7 +6039,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
var list=[]; var list=[];
player.getHistory('useCard',function(evt){ player.getHistory('useCard',function(evt){
if(get.type(evt.card)!='basic') return; if(get.type(evt.card)!='basic') return;
var name=evt.card.name,nature=evt.card.hasNature()?get.nature(evt.card):''; var name=evt.card.name,nature=game.hasNature(evt.card)?get.nature(evt.card):'';
if(!list.contains(name+nature)) list.push(name+nature); if(!list.contains(name+nature)) list.push(name+nature);
}); });
event.addDamage=list.length>1; event.addDamage=list.length>1;
@ -10452,7 +10452,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
twlihuo:{ twlihuo:{
trigger:{player:'useCard1'}, trigger:{player:'useCard1'},
filter:function(event,player){ filter:function(event,player){
if(event.card.name=='sha'&&!event.card.hasNature()) return true; if(event.card.name=='sha'&&!game.hasNature(event.card)) return true;
return false; return false;
}, },
audio:'lihuo', audio:'lihuo',
@ -10477,7 +10477,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
twlihuo2:{ twlihuo2:{
trigger:{player:'useCard2'}, trigger:{player:'useCard2'},
filter:function(event,player){ filter:function(event,player){
if(event.card.name!='sha'||!event.card.hasNature('fire')) return false; if(event.card.name!='sha'||!game.hasNature(event.card,'fire')) return false;
return game.hasPlayer(function(current){ return game.hasPlayer(function(current){
return !event.targets.contains(current)&&player.canUse(event.card,current); return !event.targets.contains(current)&&player.canUse(event.card,current);
}); });

View File

@ -7010,7 +7010,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
lihuo:{ lihuo:{
trigger:{player:'useCard1'}, trigger:{player:'useCard1'},
filter:function(event,player){ filter:function(event,player){
if(event.card.name=='sha'&&!event.card.hasNature()) return true; if(event.card.name=='sha'&&!game.hasNature(event.card)) return true;
return false; return false;
}, },
audio:2, audio:2,
@ -7038,7 +7038,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
lihuo2:{ lihuo2:{
trigger:{player:'useCard2'}, trigger:{player:'useCard2'},
filter:function(event,player){ filter:function(event,player){
if(event.card.name!='sha'||!event.card.hasNature('fire')) return false; if(event.card.name!='sha'||!game.hasNature(event.card,'fire')) return false;
return game.hasPlayer(function(current){ return game.hasPlayer(function(current){
return !event.targets.contains(current)&&player.canUse(event.card,current); return !event.targets.contains(current)&&player.canUse(event.card,current);
}); });

View File

@ -1,6 +1,7 @@
window.config={ window.config={
extension_sources:{ extension_sources:{
Coding:'https://raw.fgit.cf/libccy/noname-extension/master/', 'GitHub Proxy':'https://ghproxy.com/https://raw.githubusercontent.com/libccy/noname-extension/master/',
FastGit:'https://raw.fgit.cf/libccy/noname-extension/master/',
GitHub:'https://raw.githubusercontent.com/libccy/noname-extension/master/' GitHub:'https://raw.githubusercontent.com/libccy/noname-extension/master/'
}, },
extension_source:'Coding', extension_source:'Coding',

File diff suppressed because it is too large Load Diff

View File

@ -2659,7 +2659,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
if(!player.hasEmptySlot('equip2')) return false; if(!player.hasEmptySlot('equip2')) return false;
if(event.card.name=='nanman') return true; if(event.card.name=='nanman') return true;
if(event.card.name=='wanjian') return true; if(event.card.name=='wanjian') return true;
return event.card.name=='sha'&&event.card.hasNature(); return event.card.name=='sha'&&game.hasNature(event.card);
}, },
content:function(){ content:function(){
trigger.cancel(); trigger.cancel();
@ -2672,7 +2672,7 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
if(card.name=='sha'){ if(card.name=='sha'){
var equip1=player.getEquip(1); var equip1=player.getEquip(1);
if(equip1&&equip1.name=='zhuque') return 1.9; if(equip1&&equip1.name=='zhuque') return 1.9;
if(!card.hasNature()) return 'zerotarget'; if(!game.hasNature(card)) return 'zerotarget';
} }
} }
} }
@ -4683,14 +4683,14 @@ game.import('mode',function(lib,game,ui,get,ai,_status){
equipSkill:true, equipSkill:true,
inherit:'cixiong_skill', inherit:'cixiong_skill',
filter:function(event,player){ filter:function(event,player){
return event.card.hasNature('linked'); return game.hasNature(event.card,'linked');
}, },
}, },
qicaishenlu:{ qicaishenlu:{
trigger:{source:'damageBegin1'}, trigger:{source:'damageBegin1'},
forced:true, forced:true,
filter:function(event,player){ filter:function(event,player){
return event.card.hasNature('linked'); return game.hasNature(event.card,'linked');
}, },
content:function(){ content:function(){
trigger.num++; trigger.num++;