Skip to content

Commit

Permalink
だんご大家族
Browse files Browse the repository at this point in the history
  • Loading branch information
Spmario233 authored Jun 6, 2020
1 parent f7a52a1 commit 07f4cd9
Show file tree
Hide file tree
Showing 16 changed files with 412 additions and 86 deletions.
7 changes: 5 additions & 2 deletions card/sp.js
Original file line number Diff line number Diff line change
Expand Up @@ -547,9 +547,12 @@ game.import('card',function(lib,game,ui,get,ai,_status){
},
content:function(){
'step 0'
player.chooseToUse({name:'jinchan'},'是否对'+get.translation(trigger.card)+'使用【金蝉脱壳】?').set('ai1',function(card){
player.chooseToUse('是否对'+get.translation(trigger.card)+'使用【金蝉脱壳】?').set('ai1',function(card){
return _status.event.bool;
}).set('bool',-get.effect(player,trigger.card,trigger.player,player)).set('respondTo',[trigger.player,trigger.card]);
}).set('bool',-get.effect(player,trigger.card,trigger.player,player)).set('respondTo',[trigger.player,trigger.card]).set('filterCard',function(card,player){
if(get.name(card)!='jinchan') return false;
return lib.filter.cardEnabled(card,player,'forceEnable');
});
trigger.jinchan=true;
'step 1'
delete trigger.jinchan;
Expand Down
288 changes: 281 additions & 7 deletions character/diy.js

Large diffs are not rendered by default.

9 changes: 7 additions & 2 deletions character/extra.js
Original file line number Diff line number Diff line change
Expand Up @@ -299,9 +299,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.logSkill('olzhiti',target);
var list=[];
for(var i=1;i<6;i++){
if(!target.isDisabled(i)) list.push(i);
if(!target.isDisabled(i)) list.add((i==3||i==4)?6:i);
}
var num=list.randomGet();
if(num!=6) target.disableEquip(num);
else{
target.disableEquip(3);
target.disableEquip(4);
}
target.disableEquip(list.randomGet());
}
},
},
Expand Down
5 changes: 2 additions & 3 deletions character/mobile.js
Original file line number Diff line number Diff line change
Expand Up @@ -1280,7 +1280,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.draw();
}
else{
var next=player.chooseUseTarget({name:trigger.card.name,nature:trigger.card.nature},false,true);
var next=player.chooseUseTarget({name:trigger.card.name,nature:trigger.card.nature,isCard:true},false,true);
_status.event.next.remove(next);
event.evt.after.push(next);
next.logSkill='zhiyi';
Expand Down Expand Up @@ -1775,11 +1775,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(get.nature(card)) return 1.5;
return 1;
},
prepare:'give',
discard:false,
content:function(){
'step 0'
target.gain(cards,player);
target.gain(cards,player,'giveAuto');
player.recover();
'step 1'
var num=1;
Expand Down
36 changes: 19 additions & 17 deletions character/refresh.js
Original file line number Diff line number Diff line change
Expand Up @@ -542,10 +542,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
}
},
jiushi:{
audio:'jiushi1',
group:['jiushi1','jiushi2','jiushi3'],
},
chengzhang:{
trigger:{player:'phaseZhunbeiBegin'},
derivation:'rejiushi_mark',
Expand Down Expand Up @@ -585,6 +581,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
filter:function(event,player){
return player.storage.chengzhang==true;
},
prompt:'是否发动【酒诗】,获得牌堆中的一张锦囊牌?',
content:function(){
var card=get.cardPile2(function(card){
return get.type2(card)=='trick';
Expand All @@ -599,12 +596,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
enable:'chooseToUse',
filter:function(event,player){
if(player.classList.contains('turnedover')) return false;
if(event.parent.name=='phaseUse'){
return lib.filter.filterCard({name:'jiu'},player,event);
}
if(event.type!='dying') return false;
if(player!=event.dying) return false;
return true;
return event.filterCard({name:'jiu',isCard:true},player,event);
},
content:function(){
if(_status.event.getParent(2).type=='dying'){
Expand Down Expand Up @@ -704,6 +696,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
return false;
},
prompt:function(event,player){
var str='是否发动【酒诗】,将武将牌翻面';
if(!player.storage.chengzhang) str+=',并获得牌堆中的一张锦囊牌';
str+='?'
return str;
},
content:function(){
delete trigger.rejiushi;
player.turnOver();
Expand Down Expand Up @@ -731,7 +729,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
trigger:{player:'loseEnd'},
filter:function(event,player){
if(player==_status.currentPhase||!event.visible||player.hp>=player.countCards('h')) return false;
if(player==_status.currentPhase||!event.visible||player.hp<=player.countCards('h')) return false;
for(var i=0;i<event.cards2.length;i++){
if(get.suit(event.cards2[i],player)=='heart') return true;
}
Expand Down Expand Up @@ -1910,10 +1908,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
addHuashen:function(player){
if(!player.storage.rehuashen) return;
if(!_status.characterlist){
var list=[];
for(var i in lib.character){
if(lib.filter.characterDisabled2(i)||lib.filter.characterDisabled(i)) continue;
list.push(i);
if(_status.connectMode) var list=get.charactersOL();
else{
var list=[];
for(var i in lib.character){
if(lib.filter.characterDisabled2(i)||lib.filter.characterDisabled(i)) continue;
list.push(i);
}
}
game.countPlayer2(function(current){
list.remove(current.name);
Expand Down Expand Up @@ -4590,11 +4591,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return 8-get.value(card);
},
discard:false,
prepare:'give',
lose:false,
delay:false,
content:function(){
"step 0"
target.storage.refanjian=cards[0];
target.gain(cards[0],player);
target.gain(cards[0],player,'give');
"step 1"
target.chooseControl('refanjian_card','refanjian_hp').ai=function(event,player){
var cards=player.getCards('he',{suit:get.suit(player.storage.refanjian)});
Expand Down
10 changes: 6 additions & 4 deletions character/shenhua.js
Original file line number Diff line number Diff line change
Expand Up @@ -2015,7 +2015,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
discard:false,
line:true,
prepare:'give',
lose:false,
delay:false,
position:'he',
filterCard:true,
filterTarget:function(card,player,target){
Expand All @@ -2029,7 +2030,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
content:function(){
'step 0'
player.storage.nzry_shenshi=true;
target.gain(cards,player);
target.gain(cards,player,'giveAuto');
target.damage('nocard');
'step 1'
if(!target.isAlive()){
Expand Down Expand Up @@ -6638,11 +6639,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
audio:2,
enable:'phaseUse',
discard:false,
lose:false,
delay:false,
line:true,
direct:true,
prepare:function(cards,player,targets){
targets[0].logSkill('huangtian');
player.$give(cards,targets[0]);
},
prompt:function(){
var player=_status.event.player;
Expand Down Expand Up @@ -6671,7 +6673,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
//usable:1,
//forceaudio:true,
content:function(){
target.gain(cards,player);
target.gain(cards,player,'giveAuto');
target.addTempSkill('huangtian3','phaseUseEnd');
},
ai:{
Expand Down
34 changes: 24 additions & 10 deletions character/sp.js
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return (player.getStat().skill.liji||0)<(event.liji_num||0);
},
onChooseToUse:function(event){
if(game.online) return
var num=0;
game.getGlobalHistory('cardMove',function(evt){
if(evt.name=='cardsDiscard'||(evt.name=='lose'&&evt.position==ui.discardPile)) num+=evt.cards.length;
Expand All @@ -612,6 +613,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
xinkuangfu:{
enable:'phaseUse',
usable:1,
delay:false,
filterTarget:function(card,player,target){
if(player==target) return player.countCards('e',function(card){
return lib.filter.cardDiscardable(card,player);
Expand Down Expand Up @@ -1965,9 +1967,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
initList:function(){
var list=[];
for(var i in lib.character){
if(lib.filter.characterDisabled2(i)||lib.filter.characterDisabled(i)) continue;
list.push(i);
if(_status.connectMode) var list=get.charactersOL();
else{
var list=[];
for(var i in lib.character){
if(lib.filter.characterDisabled2(i)||lib.filter.characterDisabled(i)) continue;
list.push(i);
}
}
game.countPlayer2(function(current){
list.remove(current.name);
Expand Down Expand Up @@ -6908,10 +6914,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return player.countCards('h','sha');
},
discard:false,
prepare:'give',
lose:false,
delay:false,
filterCard:{name:'sha'},
content:function(){
target.gain(cards,player);
target.gain(cards,player,'giveAuto');
target.storage.fuman3=cards[0];
target.storage.fuman2=player;
target.addTempSkill('fuman2',{player:'phaseAfter'});
Expand Down Expand Up @@ -7455,10 +7462,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return 0;
},
discard:false,
prepare:'give',
lose:false,
delay:false,
content:function(){
'step 0'
target.gain(cards,player);
target.gain(cards,player,'giveAuto');
if(get.color(cards[0])=='black'){
target.chooseToDiscard(2,'he','弃置两张牌,或令'+get.translation(player)+'摸两张牌').set('ai',function(card){
if(_status.event.goon) return 7-get.value(card);
Expand Down Expand Up @@ -8098,7 +8106,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return ui.selected.cards.length+2;
},
discard:false,
prepare:'give',
lose:false,
delay:false,
filterTarget:function(card,player,target){
return player!=target;
},
Expand All @@ -8121,7 +8130,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return 0;
},
content:function(){
target.gain(cards,player);
target.gain(cards,player,'giveAuto');
target.recover();
},
ai:{
Expand Down Expand Up @@ -13444,15 +13453,19 @@ game.import('character',function(lib,game,ui,get,ai,_status){
direct:true,
content:function(){
"step 0"
event.count=trigger.num;
"step 1"
player.chooseTarget(get.prompt('shushen'),'令一名其他角色选择摸两张牌或回复1点体力',function(card,player,target){
return target!=player;
}).set('ai',function(target){
return get.attitude(_status.event.player,target);
});
"step 1"
"step 2"
if(result.bool){
event.count--;
player.logSkill('shushen',result.targets);
result.targets[0].chooseDrawRecover(2,true);
if(event.count) event.goto(1);
}
},
ai:{
Expand Down Expand Up @@ -17171,6 +17184,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
sunluyu:'孙鲁育',
hanba:'旱魃',
panfeng:'旧潘凤',
gz_panfeng:'潘凤',
zumao:'祖茂',
daxiaoqiao:'大小乔',
sp_daqiao:'☆SP大乔',
Expand Down
24 changes: 11 additions & 13 deletions character/yijiang.js
Original file line number Diff line number Diff line change
Expand Up @@ -6912,10 +6912,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
filterCard:true,
selectCard:-1,
discard:false,
lose:true,
lose:false,
delay:false,
content:function(){
player.$give(cards.length,target);
target.gain(cards,player);
target.gain(cards,player,'giveAuto');
target.addTempSkill('mingjian2',{player:'phaseAfter'});
target.storage.mingjian2++;
target.updateMarks('mingjian2');
Expand Down Expand Up @@ -8894,8 +8894,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
selectTarget:2,
multitarget:true,
discard:false,
lose:false,
targetprompt:['得到牌','出杀目标'],
prepare:'give',
filterTarget:function(card,player,target){
if(ui.selected.targets.length==0){
return player!=target;
Expand All @@ -8904,9 +8904,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return ui.selected.targets[0].inRange(target);
}
},
delay:false,
content:function(){
"step 0"
targets[0].gain(cards,player);
targets[0].gain(cards,player,'give');
"step 1"
if(!lib.filter.filterTarget({name:'sha',isCard:true},targets[0],targets[1])) event._result={control:'draw_card'};
else targets[0].chooseControl('draw_card','出杀',function(){
Expand Down Expand Up @@ -9525,12 +9526,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
enable:'chooseToUse',
filter:function(event,player){
if(player.classList.contains('turnedover')) return false;
if(event.parent.name=='phaseUse'){
return lib.filter.filterCard({name:'jiu'},player,event);
}
if(event.type!='dying') return false;
if(player!=event.dying) return false;
return true;
return event.filterCard({name:'jiu',isCard:true},player,event);
},
content:function(){
if(_status.event.getParent(2).type=='dying'){
Expand Down Expand Up @@ -9624,6 +9620,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
check:function(event,player){
return player.isTurnedOver();
},
prompt:'是否发动【酒诗】,将武将牌翻面?',
filter:function(event,player){
if(event.jiushi){
return true;
Expand Down Expand Up @@ -10151,7 +10148,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
enable:'phaseUse',
usable:1,
discard:false,
prepare:'give2',
lose:false,
delay:0,
filter:function(event,player){
return player.countCards('he',{suit:'heart'});
},
Expand All @@ -10173,7 +10171,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
content:function(){
"step 0"
target.gain(cards,player);
target.gain(cards,player,'give');
// game.delay();
"step 1"
player.gainPlayerCard(target,'he',true);
Expand Down
5 changes: 4 additions & 1 deletion game/asset.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
window.noname_asset_list=[
'v1.9.99.2',
'v1.9.99.3',
'audio/background/aozhan_chaoming.mp3',
'audio/background/aozhan_online.mp3',
'audio/background/aozhan_rewrite.mp3',
Expand Down Expand Up @@ -3042,6 +3042,9 @@ window.noname_asset_list=[
'image/character/yujin_yujin.jpg', 'image/character/key_hinata.jpg',
'image/character/key_hisako.jpg',
'image/character/key_noda.jpg',
'image/character/key_ayato.jpg',
'image/character/key_nagisa.jpg',
'image/character/key_tomoya.jpg',

'image/character/baiwuchang.jpg',
'image/character/baosanniang.jpg',
Expand Down
Loading

0 comments on commit 07f4cd9

Please sign in to comment.