Skip to content

Commit

Permalink
Game...Start!
Browse files Browse the repository at this point in the history
  • Loading branch information
Spmario233 authored Aug 24, 2020
1 parent 24caa22 commit 317e184
Show file tree
Hide file tree
Showing 22 changed files with 650 additions and 97 deletions.
Binary file added audio/die/key_saya.mp3
Binary file not shown.
Binary file added audio/skill/saya_powei1.mp3
Binary file not shown.
Binary file added audio/skill/saya_powei2.mp3
Binary file not shown.
Binary file added audio/skill/saya_shouji1.mp3
Binary file not shown.
Binary file added audio/skill/saya_shouji2.mp3
Binary file not shown.
4 changes: 2 additions & 2 deletions card/guozhan.js
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,8 @@ game.import('card',function(lib,game,ui,get,ai,_status){
}
else{
var list=[];
for(var i=0;i<=Math.min(num,damaged);i++){
list.push('摸'+i+'回'+(num-i));
for(var i=Math.min(num,damaged);i>=0;i--){
list.push('摸'+(num-i)+'回'+i);
}
target.chooseControl(list).set('prompt','请分配自己的摸牌数和回复量').ai=function(){
if(player.hasSkill('diaohulishan')) return 0;
Expand Down
10 changes: 6 additions & 4 deletions character/diy.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
ns_caoshuang:['male','wei',4,['nsjiquan','nsfuwei']],
// diy_caocao:['male','wei',4,['xicai','diyjianxiong','hujia']],
// diy_hanlong:['male','wei',4,['siji','ciqiu']],
diy_feishi:['male','shu',3,['shuaiyan','moshou']],
diy_feishi:['male','shu',3,['nsshuaiyan','moshou']],
diy_liuyan:['male','shu',3,['juedao','geju']],
// diy_luxun:['male','wu',3,['shaoying','zonghuo']],
diy_yuji:['male','qun',3,['diyguhuo','diychanyuan']],
Expand Down Expand Up @@ -3357,6 +3357,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
},
saya_powei:{
audio:2,
trigger:{player:'phaseAfter'},
direct:true,
locked:true,
Expand Down Expand Up @@ -3445,6 +3446,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
},
saya_shouji:{
audio:2,
trigger:{player:'useCardAfter'},
filter:function(event,player){
return !player.getStat('skill').saya_shouji&&event.cards.filterInD().length>0;
Expand Down Expand Up @@ -9744,7 +9746,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger.player.identityShown=true;
}
},
shuaiyan:{
nsshuaiyan:{
trigger:{global:'recoverAfter'},
filter:function(event,player){
return event.player!=player&&_status.currentPhase!=player;
Expand Down Expand Up @@ -9982,7 +9984,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
xicai:'惜才',
diyjianxiong:'奸雄',
diy_feishi:'费诗',
shuaiyan:'率言',
nsshuaiyan:'率言',
moshou:'墨守',
diy_hanlong:'韩龙',
diy_luxun:'陆伯言',
Expand Down Expand Up @@ -10595,7 +10597,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
geju_info:'准备阶段开始时,你可以摸X张牌(X为攻击范围内不含有你的势力数)。',
siji_info:'弃牌阶段结束后,你可以摸2X张牌(X为你于此阶段内弃置的【杀】的数量)。',
ciqiu_info:'锁定技,每当你使用【杀】对目标角色造成伤害时,若该角色未受伤,你令此伤害+1;若其因此进入濒死状态,你令其死亡,然后你失去“刺酋”。 ',
shuaiyan_info:'每当其他角色于你的回合外回复体力后,你可以令该角色选择一项:1.令你摸一张牌;2.令你弃置其一张牌。',
nsshuaiyan_info:'每当其他角色于你的回合外回复体力后,你可以令该角色选择一项:1.令你摸一张牌;2.令你弃置其一张牌。',
moshou_info:'锁定技,你不能成为乐不思蜀和兵粮寸断的目标。',
xicai_info:'你可以立即获得对你造成伤害的牌',
diyjianxiong_info:'锁定技,在身份局中,在你回合内死亡的角色均视为反贼,国战中,在你回合内死亡的角色若与你势力相同则随机改为另一个势力',
Expand Down
20 changes: 12 additions & 8 deletions character/mobile.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
mobile:{
mobile_default:["miheng","taoqian","lingcao","sunru","lifeng","zhuling","liuye","zhaotongzhaoguang","majun","simazhao","wangyuanji","pangdegong","shenpei","hujinding","zhangyì","jiakui","yangbiao","chendeng","dongcheng","yangyi","dengzhi","zhengxuan","sp_sufei"],
mobile_yijiang:["yj_zhanghe","yj_zhangliao","yj_xuhuang","yj_ganning"],
mobile_others:["re_jikang","old_bulianshi","old_yuanshu","re_wangyun","re_baosanniang","re_weiwenzhugezhi","re_zhanggong","re_xugong","xin_yuanshao","re_liushan","xin_xiahoudun","re_sp_zhugeliang","re_heqi","re_guanqiujian","re_pangtong","old_liuzan","xin_chengpu","re_sunjian"],
mobile_others:["re_jikang","old_bulianshi","old_yuanshu","re_wangyun","re_baosanniang","re_weiwenzhugezhi","re_zhanggong","re_xugong","xin_yuanshao","re_liushan","xin_xiahoudun","re_sp_zhugeliang","re_heqi","re_guanqiujian","re_pangtong","old_liuzan","xin_chengpu","re_sunjian","re_xusheng"],
mobile_sunben:["re_sunben"],
},
},
character:{
re_xusheng:['male','wu',4,['repojun']],
sp_sufei:['male','qun',4,['zhengjian','gaoyuan']],
yj_zhangliao:['male','qun',4,['weifeng']],
yj_zhanghe:['male','qun',4,['xinzhilve']],
Expand All @@ -32,7 +33,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
re_sp_zhugeliang:["male","shu",3,["bazhen","rehuoji","rekanpo"],[]],
xin_xiahoudun:['male','wei',4,['reganglie','xinqingjian']],
zhangyì:['male','shu',4,['zhiyi']],
jiakui:['male','wei',3,['tongqu','xinwanlan']],
jiakui:['male','wei',3,['zhongzuo','wanlan']],
re_jikang:["male","wei",3,["new_qingxian","new_juexiang"]],
old_bulianshi:['female','wu',3,['anxu','zhuiyi']],
miheng:['male','qun',3,['kuangcai','shejian']],
Expand Down Expand Up @@ -338,7 +339,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
tongqu2:{
trigger:{player:'phaseDrawEnd'},
forced:true,
silent:false,
silent:true,
filter:function(event,player){
var bool=game.hasPlayer(function(current){
return current!=player&&current.hasMark('tongqu');
Expand Down Expand Up @@ -402,7 +403,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger:{global:'damageBegin4'},
filter:function(event,player){
return event.player.hp<=event.num&&player.countCards('he',function(card){
return get.type(card)!='basic';
return lib.filter.cardDiscardable(card,player)&&get.type(card)!='basic';
})>=1;
},
logTarget:'player',
Expand All @@ -416,13 +417,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
var savable=get.info(card).savable;
if(typeof savable=='function') savable=savable(card,player,event.player);
return savable;
})>=1+trigger.num-event.player.hp) return false;
})>=1+event.num-event.player.hp) return false;
if(event.player==player||event.player==get.zhu(player)) return true;
return !player.hasUnknown();
},
content:function(){
player.discard(player.getCards('he',function(card){
return get.type(card)!='basic';
return lib.filter.cardDiscardable(card,player)&&get.type(card)!='basic';
}));
trigger.cancel();
},
Expand Down Expand Up @@ -5070,8 +5071,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){
intro:{
content:'当前“惧”标记名称:$',
onunmark:function(storage,player){
game.log(player,'移去了一个','#g【惧('+get.translation(storage)+')】','标记')
delete player.storage.weifeng2;
if(player.storage.weifeng2){
game.log(player,'移去了一个','#g【惧('+get.translation(player.storage.weifeng2)+')】','标记')
delete player.storage.weifeng2;
}
},
},
marktext:'惧',
Expand Down Expand Up @@ -5664,6 +5667,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
tongqu_info:'游戏开始时,你获得一个“渠”。出牌阶段开始时,你可令一名没有“渠”的角色获得一个“渠”。有“渠”的角色摸牌阶段,其多摸一张牌,然后其将一张牌交给一名有“渠”的其他角色或弃置一张牌。有“渠”的角色受到伤害后,其弃置“渠”',
xinwanlan:'挽澜',
xinwanlan_info:'当有角色受到伤害时,若伤害点数大于其体力值,则你可以弃置所有非基本牌(至少两张)并防止此伤害。',
re_xusheng:'手杀徐盛',
}
};
});
2 changes: 1 addition & 1 deletion character/old.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
},
character:{
old_jiakui:['male','wei',3,['zhongzuo','wanlan']],
old_jiakui:['male','wei',3,['tongqu','xinwanlan']],
pangde:['male','qun',4,['mashu','mengjin']],
ol_huaxiong:["male","qun",6,["new_reyaowu"]],
old_wangyun:['male','qun',4,['wylianji','moucheng']],
Expand Down
94 changes: 91 additions & 3 deletions character/refresh.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
refresh_huo:["ol_sp_zhugeliang","re_xunyu","re_dianwei","re_yanwen","ol_pangtong","ol_yuanshao","ol_pangde","re_taishici"],
refresh_lin:['re_zhurong','re_menghuo','re_dongzhuo','ol_sunjian','re_caopi','re_xuhuang'],
refresh_shan:['re_dengai','re_jiangwei','re_caiwenji','ol_liushan','re_zhangzhang','re_zuoci','re_sunce'],
refresh_yijiang:['re_xusheng','re_wuguotai','re_gaoshun','re_zhangyi','re_caozhi','re_zhuran','re_wuyi','re_liaohua','re_guohuai','re_zhuran','re_chengpu','re_caozhang','re_quancong','yujin_yujin','re_lingtong','re_handang','re_zhonghui','re_sunluban','re_masu'],
refresh_yijiang:['re_wuguotai','re_gaoshun','re_zhangyi','re_caozhi','re_zhuran','re_wuyi','re_liaohua','re_guohuai','re_zhuran','re_chengpu','re_caozhang','re_quancong','yujin_yujin','re_lingtong','re_handang','re_zhonghui','re_sunluban','re_masu','re_jianyong','xin_xusheng'],
},
},
connect:true,
character:{
xin_xusheng:['male','wu',4,['decadepojun']],
re_taishici:['male','wu',4,['tianyi','hanzhan']],
re_masu:['male','shu',3,['resanyao','rezhiman']],
re_sunluban:['female','wu',3,['rechanhui','rejiaojin']],re_zhonghui:['male','wei',4,['requanji','zili']],
Expand All @@ -30,7 +31,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
re_caozhi:['male','wei',3,['reluoying','rejiushi','chengzhang']],
ol_pangtong:['male','shu',3,['xinlianhuan','olniepan'],[]],
re_zhangyi:['male','shu',4,['rewurong','shizhi']],
re_xusheng:['male','wu',4,['repojun']],
re_wuguotai:['female','wu',3,['reganlu','buyi']],
re_gaoshun:['male','qun',4,['rexianzhen','rejinjiu']],
re_caocao:['male','wei',4,['new_rejianxiong','hujia'],['zhu']],
Expand Down Expand Up @@ -92,6 +92,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
re_zhangzhang:['male','wu',3,['rezhijian','guzheng']],

re_sunce:['male','wu',4,['jiang','olhunzi','olzhiba'],['zhu']],
re_jianyong:['male','shu',3,['reqiaoshui','jyzongshi']],
},
characterIntro:{
re_gongsunzan:'群雄之一。出身贵族,因母地位卑贱,只当了郡中小吏。他貌美,声音洪亮,机智善辩。后随卢植于缑氏山中读书,粗通经传。',
Expand All @@ -107,6 +108,89 @@ game.import('character',function(lib,game,ui,get,ai,_status){
sunben:['zhouyu','taishici','daqiao'],
},
skill:{
decadepojun:{
shaRelated:true,
audio:2,
trigger:{player:'useCardToPlayered'},
direct:true,
filter:function(event,player){
return event.card.name=='sha'&&event.target.hp>0&&event.target.countCards('he')>0;
},
content:function(){
'step 0'
var next=player.choosePlayerCard(trigger.target,'he',[1,Math.min(trigger.target.hp,trigger.target.countCards('he'))],get.prompt('decadepojun',trigger.target));
next.set('ai',function(button){
if(!_status.event.goon) return 0;
var val=get.value(button.link);
if(button.link==_status.event.target.getEquip(2)) return 2*(val+3);
return val;
});
next.set('goon',get.attitude(player,trigger.target)<=0);
next.set('forceAuto',true);
'step 1'
if(result.bool){
event.cards=result.cards;
var target=trigger.target;
player.logSkill('decadepojun',trigger.target);
target.addSkill('decadepojun2');
target.markAuto('decadepojun2',result.cards);
target.lose(result.cards,ui.special,'toStorage');
game.log(target,'失去了'+get.cnNumber(result.cards.length)+'张牌');;
}
else event.finish();
'step 2'
var discard=false,draw=false;
for(var i of cards){
var type=get.type2(i);
if(type=='equip') discard=true;
if(type=='trick') draw=true;
}
if(discard){
event.equip=true;
player.chooseButton(['选择一张牌置入弃牌堆',cards],true).set('ai',function(button){
return get.value(button.link,_status.event.getTrigger().target);
});
}
if(draw) event.draw=true;
'step 3'
if(event.equip&&result.links&&result.links.length){
trigger.target.unmarkAuto('decadepojun2',result.links);
trigger.target.$throw(result.links,1000);
game.log(player,'将',result.links,'置入了弃牌堆');
game.cardsDiscard(result.links);
if(!event.draw) game.delayx();
}
if(event.draw) player.draw();
},
ai:{
unequip_ai:true,
skillTagFilter:function(player,tag,arg){
if(arg&&arg.name=='sha'&&arg.target.getEquip(2)) return true;
return false;
}
},
},
decadepojun2:{
init:function(player,skill){
if(!player.storage[skill]) player.storage[skill]=[];
},
trigger:{global:'phaseEnd'},
forced:true,
popup:false,
charlotte:true,
filter:function(event,player){
return player.storage.decadepojun2&&player.storage.decadepojun2.length>0;
},
content:function(){
game.log(player,'收回了'+get.cnNumber(player.gain(player.storage.decadepojun2,'draw','fromStorage').cards.length)+'张〖破军〗牌');
player.storage.decadepojun2.length=0;
player.removeSkill('decadepojun2');
},
intro:{
onunmark:'throw',
content:'cardCount',
},
},
hanzhan:{
audio:2,
trigger:{
Expand Down Expand Up @@ -6884,7 +6968,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
refangquan_info:'你可跳过你的出牌阶段,若如此做,你本回合的手牌上限为你的体力上限,且回合结束时,你可以弃置一张手牌并令一名其他角色进行一个额外的回合。',
re_wuguotai:'界吴国太',
re_gaoshun:'界高顺',
re_xusheng:'界徐盛',
reganlu:'甘露',
reganlu_info:'出牌阶段限一次,你可以选择装备区牌数之差的绝对值不小于X的两名角色或包含你在内的两名角色,然后交换这两名角色装备区内的牌。(X为你已损失的体力值)',
repojun:'破军',
Expand Down Expand Up @@ -6970,6 +7053,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
re_taishici:'界太史慈',
hanzhan:'酣战',
hanzhan_info:'当你发起拼点时,或成为拼点的目标时,你可以令对方选择拼点牌的方式改为随机选择一张手牌。',
re_jianyong:'界简雍',
xin_xusheng:'界徐盛',
decadepojun:'破军',
decadepojun2:'破军',
decadepojun_info:'当你使用【杀】指定目标后,你可以将其的至多X张牌置于其武将牌上。若这些牌中:有装备牌,你将这些牌中的一张置于弃牌堆;有锦囊牌,你摸一张牌。其于回合结束时获得其武将牌上的这些牌。',

refresh_standard:'界限突破·标',
refresh_feng:'界限突破·风',
Expand Down
Loading

0 comments on commit 317e184

Please sign in to comment.