Skip to content

Commit

Permalink
Merge pull request #413 from libccy/PR-Branch
Browse files Browse the repository at this point in the history
v1.10.2
  • Loading branch information
Spmario233 authored Sep 28, 2023
2 parents 4ef8c89 + 128129b commit e843780
Show file tree
Hide file tree
Showing 170 changed files with 17,829 additions and 12,923 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "eslint:recommended",
"extends": "chrome 46",
"env": {
"browser": true,
"node": true,
Expand Down
Binary file added audio/die/shen_dianwei.mp3
Binary file not shown.
Binary file modified audio/die/shen_sunce.mp3
Binary file not shown.
Binary file modified audio/die/yuantanyuanshang.mp3
Binary file not shown.
Binary file modified audio/effect/damage.mp3
Binary file not shown.
Binary file modified audio/effect/damage2.mp3
Binary file not shown.
Binary file added audio/effect/damage_fire.mp3
Binary file not shown.
Binary file added audio/effect/damage_fire2.mp3
Binary file not shown.
Binary file added audio/effect/damage_ice.mp3
Binary file not shown.
Binary file added audio/effect/damage_ice2.mp3
Binary file not shown.
Binary file added audio/effect/damage_thunder.mp3
Binary file not shown.
Binary file added audio/effect/damage_thunder2.mp3
Binary file not shown.
Binary file added audio/effect/flappybird_die.wav
Binary file not shown.
Binary file added audio/effect/flappybird_flap.wav
Binary file not shown.
Binary file added audio/effect/flappybird_hit.wav
Binary file not shown.
Binary file added audio/effect/flappybird_score.wav
Binary file not shown.
Binary file added audio/effect/flappybird_start.wav
Binary file not shown.
Binary file added audio/effect/hujia_damage.mp3
Binary file not shown.
Binary file added audio/effect/hujia_damage2.mp3
Binary file not shown.
Binary file added audio/effect/hujia_damage_fire.mp3
Binary file not shown.
Binary file added audio/effect/hujia_damage_fire2.mp3
Binary file not shown.
Binary file added audio/effect/hujia_damage_thunder.mp3
Binary file not shown.
Binary file added audio/effect/hujia_damage_thunder2.mp3
Binary file not shown.
Binary file added audio/skill/cuijue1.mp3
Binary file not shown.
Binary file added audio/skill/cuijue2.mp3
Binary file not shown.
Binary file modified audio/skill/gnjinfan_gain1.mp3
Binary file not shown.
Binary file modified audio/skill/gnjinfan_gain2.mp3
Binary file not shown.
Binary file added audio/skill/juanjia1.mp3
Binary file not shown.
Binary file added audio/skill/juanjia2.mp3
Binary file not shown.
Binary file modified audio/skill/mouli1.mp3
Binary file not shown.
Binary file modified audio/skill/mouli2.mp3
Binary file not shown.
Binary file modified audio/skill/neifa1.mp3
Binary file not shown.
Binary file modified audio/skill/neifa2.mp3
Binary file not shown.
Binary file modified audio/skill/pinghe1.mp3
Binary file not shown.
Binary file modified audio/skill/pinghe2.mp3
Binary file not shown.
Binary file added audio/skill/qiexie1.mp3
Binary file not shown.
Binary file added audio/skill/qiexie2.mp3
Binary file not shown.
Binary file modified audio/skill/scfuhai1.mp3
Binary file not shown.
Binary file modified audio/skill/scfuhai2.mp3
Binary file not shown.
Binary file modified audio/skill/twfeifu1.mp3
Binary file not shown.
Binary file modified audio/skill/twfeifu2.mp3
Binary file not shown.
Binary file modified audio/skill/xingqi1.mp3
Binary file not shown.
Binary file modified audio/skill/xingqi2.mp3
Binary file not shown.
Binary file modified audio/skill/yingba1.mp3
Binary file not shown.
Binary file modified audio/skill/yingba2.mp3
Binary file not shown.
23 changes: 13 additions & 10 deletions card/extra.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
content:function(){
if(typeof event.baseDamage!='number') event.baseDamage=1;
if(target.isDying()||event.getParent(2).type=='dying'){
target.recover(event.baseDamage);
target.recover();
if(_status.currentPhase==target){
target.getStat().card.jiu--;
}
Expand Down Expand Up @@ -210,7 +210,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
game.delay(2);
"step 2"
if(result.bool){
target.damage('fire',event.baseDamage||1);
target.damage('fire');
}
else{
target.addTempSkill('huogong2');
Expand Down Expand Up @@ -689,7 +689,10 @@ game.import('card',function(lib,game,ui,get,ai,_status){
delete player.storage.jiu;
},
ai:{
damageBonus:true
damageBonus:true,
skillTagFilter:function(player,tag,arg){
if(tag==='damageBonus') return arg&&arg.card&&arg.card.name==='sha';
}
},
group:'jiu2'
},
Expand Down Expand Up @@ -778,7 +781,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
if(card.name=='sha'){
var equip1=player.getEquip('zhuque');
if(equip1&&equip1.name=='zhuque') return 1.9;
if(!card.nature) return 'zerotarget';
if(!card.hasNature()) return 'zerotarget';
}
}
}
Expand All @@ -788,7 +791,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
equipSkill:true,
trigger:{player:'damageBegin3'},
filter:function(event,player){
if(event.nature!='fire') return false;
if(!event.hasNature('fire')) return false;
if(player.hasSkillTag('unequip2')) return false;
if(event.source&&event.source.hasSkillTag('unequip',false,{
name:event.card?event.card.name:null,
Expand All @@ -807,7 +810,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
effect:{
target:function(card,player,target,current){
if(card.name=='sha'){
if(card.nature=='fire') return 2;
if(card.hasNature('fire')) return 2;
if(player.hasSkill('zhuque_skill')) return 1.9;
}
if(get.tag(card,'fireDamage')&&current<0) return 2;
Expand All @@ -827,7 +830,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
target:player,
card:event.card
})) return false;
if(event.card.name=='sha'&&!event.card.nature) return true;
if(event.card.name=='sha'&&!event.card.hasNature()) return true;
return false;
},
content:function(){
Expand Down Expand Up @@ -903,7 +906,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
trigger:{player:'useCard1'},
//priority:7,
filter:function(event,player){
if(event.card.name=='sha'&&!event.card.nature) return true;
if(event.card.name=='sha'&&!event.card.hasNature()) return true;
},
audio:true,
check:function(event,player){
Expand All @@ -921,14 +924,14 @@ game.import('card',function(lib,game,ui,get,ai,_status){
return '将'+get.translation(event.card)+'改为火属性';
},
content:function(){
trigger.card.nature='fire';
game.setNature(trigger.card,'fire');
if(get.itemtype(trigger.card)=='card'){
var next=game.createEvent('zhuque_clear');
next.card=trigger.card;
event.next.remove(next);
trigger.after.push(next);
next.setContent(function(){
delete card.nature;
game.setNature(trigger.card,[]);
});
}
}
Expand Down
16 changes: 8 additions & 8 deletions card/guozhan.js
Original file line number Diff line number Diff line change
Expand Up @@ -462,14 +462,14 @@ game.import('card',function(lib,game,ui,get,ai,_status){
target.discard(target.getCards('e',function(card){
return lib.filter.cardDiscardable(card,target,'shuiyanqijunx');
}));
target.damage('thunder',event.baseDamage||1);
target.damage('thunder');
event.finish();
}
else if(!target.countCards('e',function(card){
return lib.filter.cardDiscardable(card,target,'shuiyanqijunx');
})){
var next=target.damage(event.baseDamage||1);
if(!get.is.single()) next.nature='thunder';
var next=target.damage();
if(!get.is.single()) game.setNature(next,'thunder',true);
event.finish();
return;
}
Expand All @@ -489,8 +489,8 @@ game.import('card',function(lib,game,ui,get,ai,_status){
}));
}
else{
var next=target.damage(event.baseDamage||1);
if(!get.is.single()) next.nature='thunder'
var next=target.damage();
if(!get.is.single()) game.setNature(next,'thunder',true);
}
event.finish();
},
Expand Down Expand Up @@ -861,7 +861,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
selectTarget:-1,
modTarget:true,
content:function(){
target.damage('fire',event.baseDamage||1);
target.damage('fire');
},
ai:{
order:5,
Expand Down Expand Up @@ -1211,7 +1211,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
},
filter:function(event,player){
if(['huoshaolianying','huogong'].contains(event.card.name)) return true;
if(event.card.name=='sha') return event.card.nature=='fire';
if(event.card.name=='sha') return event.card.hasNature('fire');
return false;
},
content:function(){
Expand All @@ -1220,7 +1220,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
ai:{
effect:{
target:function(card,player,target,current){
if(['huoshaolianying','huogong'].contains(card.name)||(card.name=='sha'&&card.nature=='fire')){
if(['huoshaolianying','huogong'].contains(card.name)||(card.name=='sha'&&card.hasNature('fire'))){
return 'zeroplayertarget';
}
},
Expand Down
60 changes: 34 additions & 26 deletions card/standard.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,17 @@ game.import('card',function(lib,game,ui,get,ai,_status){
},
selectTarget:1,
cardPrompt:function(card){
if(card.nature=='stab') return '出牌阶段,对你攻击范围内的一名角色使用。其须使用一张【闪】,且在此之后需弃置一张手牌(没有则不弃)。否则你对其造成1点伤害。';
if(lib.linked.contains(card.nature)) return '出牌阶段,对你攻击范围内的一名角色使用。其须使用一张【闪】,否则你对其造成1点'+get.translation(card.nature)+'属性伤害。';
return '出牌阶段,对你攻击范围内的一名角色使用。其须使用一张【闪】,否则你对其造成1点伤害。';
var natures=get.natureList(Array.isArray(card)?card[3]:card);
if(lib.translate['sha_nature_'+natures[0]+'_info']) return lib.translate['sha_nature_'+natures[0]+'_info'];
var str='出牌阶段,对你攻击范围内的一名角色使用。其须使用一张【闪】,';
if(natures.includes('stab')){
str+='且在此之后需弃置一张手牌(没有则不弃)。';
}
str+='否则你对其造成1点';
var linked=lib.linked.filter(n=>natures.includes(n));
if(linked.length) str+=get.translation(get.nature(linked))+'属性';
str+='伤害。';
return str;
},
defaultYingbianEffect:'add',
filterTarget:function(card,player,target){return player!=target},
Expand Down Expand Up @@ -126,7 +134,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
if(event.shanRequired>1){
next.set('prompt2','(共需使用'+event.shanRequired+'张闪)');
}
else if(event.card.nature=='stab'){
else if(event.card.hasNature('stab')){
next.set('prompt2','(在此之后仍需弃置一张手牌)');
}
next.set('ai1',function(card){
Expand Down Expand Up @@ -160,7 +168,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
if(event.shanRequired>0){
event.goto(1);
}
else if(event.card.nature=='stab'&&target.countCards('h')>0){
else if(event.card.hasNature('stab')&&target.countCards('h')>0){
event.responded=result;
event.goto(4);
}
Expand All @@ -171,7 +179,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
}
"step 3"
if((!result||!result.bool||!result.result||result.result!='shaned')&&!event.unhurt){
target.damage(get.nature(event.card),event.baseDamage+event.extraDamage);
target.damage(get.nature(event.card));
event.result={bool:true}
event.trigger('shaDamage');
}
Expand All @@ -193,7 +201,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
});
"step 5"
if((!result||!result.bool)&&!event.unhurt){
target.damage(get.nature(event.card),event.baseDamage+event.extraDamage);
target.damage(get.nature(event.card));
event.result={bool:true}
event.trigger('shaDamage');
event.finish();
Expand All @@ -203,7 +211,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
}
"step 6"
if((!result||!result.bool)&&!event.unhurt){
target.damage(get.nature(event.card),event.baseDamage+event.extraDamage);
target.damage(get.nature(event.card));
event.result={bool:true}
event.trigger('shaDamage');
event.finish();
Expand Down Expand Up @@ -257,7 +265,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
},
order:function(item,player){
if(player.hasSkillTag('presha',true,null,true)) return 10;
if(lib.linked.contains(get.nature(item))){
if(item.hasNature('linked')){
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);
})&&game.countPlayer(function(current){
Expand Down Expand Up @@ -298,20 +306,20 @@ game.import('card',function(lib,game,ui,get,ai,_status){
respond:1,
respondShan:1,
damage:function(card){
if(card.nature=='poison') return;
if(card.hasNature('poison')) return;
return 1;
},
natureDamage:function(card){
if(card.nature) return 1;
if(card.hasNature()) return 1;
},
fireDamage:function(card,nature){
if(card.nature=='fire') return 1;
if(card.hasNature('fire')) return 1;
},
thunderDamage:function(card,nature){
if(card.nature=='thunder') return 1;
if(card.hasNature('thunder')) return 1;
},
poisonDamage:function(card,nature){
if(card.nature=='poison') return 1;
if(card.hasNature('poison')) return 1;
}
}
}
Expand All @@ -330,20 +338,20 @@ game.import('card',function(lib,game,ui,get,ai,_status){
respond:1,
respondShan:1,
damage:function(card){
if(card.nature=='poison') return;
if(card.hasNature('poison')) return;
return 1;
},
natureDamage:function(card){
if(card.nature) return 1;
if(card.hasNature()) return 1;
},
fireDamage:function(card,nature){
if(card.nature=='fire') return 1;
if(card.hasNature('fire')) return 1;
},
thunderDamage:function(card,nature){
if(card.nature=='thunder') return 1;
if(card.hasNature('thunder')) return 1;
},
poisonDamage:function(card,nature){
if(card.nature=='poison') return 1;
if(card.hasNature('poison')) return 1;
}
}
}
Expand Down Expand Up @@ -388,7 +396,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
return target.hp<target.maxHp;
},
content:function(){
target.recover(event.baseDamage||1);
target.recover();
},
ai:{
basic:{
Expand Down Expand Up @@ -846,7 +854,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
return target.isHealthy();
},
content:function(){
target.recover(event.baseDamage||1);
target.recover();
},
ai:{
basic:{
Expand Down Expand Up @@ -895,7 +903,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
}
"step 1"
if(result.bool==false){
target.damage(event.baseDamage,event.customSource||player);
target.damage();
}
},
ai:{
Expand Down Expand Up @@ -970,7 +978,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
}
"step 1"
if(result.bool==false){
target.damage(event.baseDamage);
target.damage();
}
},
ai:{
Expand Down Expand Up @@ -1147,10 +1155,10 @@ game.import('card',function(lib,game,ui,get,ai,_status){
}
else{
if(event.turn==target){
target.damage(event.baseDamage+event.extraDamage);
target.damage();
}
else{
player.damage(target,event.baseDamage+event.extraDamage);
player.damage(target);
}
}
}
Expand Down Expand Up @@ -1907,7 +1915,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
equipSkill:false,
ruleSkill:true,
filter:function(event){
return event.nature=='ice'&&event.notLink()&&event.player.getCards('he').length>0;
return event.hasNature('ice')&&event.notLink()&&event.player.getCards('he').length>0;
},
},
renwang_skill:{
Expand Down
6 changes: 3 additions & 3 deletions card/swd.js
Original file line number Diff line number Diff line change
Expand Up @@ -4441,7 +4441,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
direct:true,
filter:function(event,player){
if(event._notrigger.contains(event.player)) return false;
return event.nature&&event.player&&event.player.isAlive();
return event.hasNature()&&event.player&&event.player.isAlive();
},
content:function(){
player.gainPlayerCard(get.prompt('qinglonglingzhu',trigger.player),trigger.player,function(button){
Expand Down Expand Up @@ -4507,7 +4507,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
trigger:{source:'damageBegin'},
forced:true,
filter:function(event){
return event.nature=='fire'&&event.notLink();
return event.hasNature('fire')&&event.notLink();
},
content:function(){
trigger.num++;
Expand Down Expand Up @@ -4870,7 +4870,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
trigger:{player:'damageBefore'},
forced:true,
filter:function(event){
return event.nature=='thunder';
return event.hasNature('thunder');
},
content:function(){
trigger.cancel();
Expand Down
Loading

0 comments on commit e843780

Please sign in to comment.