This commit is contained in:
libccy 2016-06-04 16:04:13 +08:00
parent 4fa3d617c1
commit 91ab467222
3 changed files with 148 additions and 13 deletions

View File

@ -11,7 +11,7 @@ character.shenhua={
zhangjiao:['male','qun',3,['leiji','guidao','huangtian'],['zhu']],
sp_zhangjiao:['male','qun',3,['releiji','guidao','huangtian'],['zhu']],
// yuji:['male','qun',3,['guhuo']],
xin_yuji:['male','qun',3,['guhuo']],
// xin_yuji:['male','qun',3,['guhuo']],
sp_zhugeliang:['male','shu',3,['huoji','bazhen','kanpo']],
pangtong:['male','shu',3,['lianhuan','niepan']],
@ -2949,18 +2949,71 @@ character.shenhua={
}
},
guhuo:{
trigger:{player:'phaseBegin'},
forced:true,
content:function(){
player.draw();
player.chooseToDiscard('hej',true).ai=ai.get.disvalue;
enable:'phaseUse',
usable:1,
audio:2,
filter:function(event,player){
return player.num('h')>0
},
chooseButton:{
dialog:function(){
var list=['sha','tao','jiu','taoyuan','wugu','juedou','huogong','jiedao','tiesuo','guohe','shunshou','wuzhong','wanjian','nanman'];
for(var i=0;i<list.length;i++){
if(i<3){
list[i]=['基本','',list[i]];
}
else{
list[i]=['锦囊','',list[i]];
}
}
return ui.create.dialog([list,'vcard']);
},
filter:function(button,player){
return lib.filter.filterCard({name:button.link[2]},player,_status.event.getParent());
},
check:function(button){
var player=_status.event.player;
if(player.num('h','wuzhong')){
if(player.hp==1&&player.num('tao')){
return button.link=='tao'?1:0;
}
return button.link=='wuzhong'?1:0;
}
if(player.hp<player.maxHp){
if(player.num('h','tao')){
return button.link=='tao'?1:0;
}
}
},
backup:function(links,player){
return {
filterCard:true,
selectCard:-1,
audio:2,
popname:true,
viewAs:{name:links[0][2]},
}
},
prompt:function(links,player){
return '将全部手牌当'+get.translation(links[0][2])+'使用';
}
},
ai:{
effect:{
target:function(card){
if(get.type(card)=='delay') return [0,1];
order:1,
result:{
player:function(player){
var num=0;
var cards=player.get('h');
if(cards.length>=3&&player.hp>=3) return 0;
for(var i=0;i<cards.length;i++){
num+=Math.max(0,ai.get.value(cards[i],player,'raw'));
}
num/=cards.length;
num*=Math.min(cards.length,player.hp);
return 12-num;
}
},
threaten:1.6,
}
},
huangtian:{
@ -3207,7 +3260,7 @@ character.shenhua={
huangtian_info:
'主公技,群雄角色可在他们各自的回合里给你一张【闪】或【闪电】。',
guhuo_info:
'锁定技,回合开始阶段,你摸一张牌并弃置区域内的一张牌',
'每名角色的回合限一次你可以扣置一张手牌当一张基本牌或非延时类锦囊牌使用或打出。其他角色依次选择是否质疑。一旦有其他角色质疑则翻开此牌若为假则此牌作废若为真则质疑角色获得技能“缠怨”锁定技你不能质疑于吉只要你的体力值为1你失去你的武将技能',
fenji_info:
'每当一名角色的手牌于回合外被弃置时你可以失去1点体力然后该角色摸两张牌。'
},

View File

@ -59,7 +59,7 @@ character.sp={
guansuo:['male','shu',4,['zhengnan','xiefang']],
tadun:['male','qun',4,['luanzhan']],
yanbaihu:['male','qun',4,['zhidao','jili']],
chengyu:['male','wei',3,[]],
chengyu:['male','wei',3,['shefu','benyu']],
},
perfectPair:{
zhugejin:['zhugeke'],
@ -80,6 +80,85 @@ character.sp={
cuiyan:['caocao'],
},
skill:{
shefu:{
trigger:{player:'phaseEnd'},
direct:true,
init:function(player){
player.storage.shefu=[];
player.storage.shefu2=[];
},
filter:function(event,player){
return player.num('h')>0;
},
intro:{
content:'cards',
mark:function(dialog,content,player){
if(content&&content.length){
dialog.add(content);
if(player.isUnderControl(true)){
var str='';
for(var i=0;i<player.storage.shefu2.length;i++){
str+=get.translation(player.storage.shefu2[i]);
if(i<player.storage.shefu2.length-1){
str+='、';
}
}
dialog.add('<div class="text center">'+str+'</div>')
}
}
},
},
content:function(){
'step 0'
var list1=[],list2=[];
for(var i=0;i<lib.inpile.length;i++){
var type=get.type(lib.inpile[i]);
if(type=='basic'){
list1.push(['基本','',lib.inpile[i]]);
}
else if(type=='trick'){
list2.push(['锦囊','',lib.inpile[i]]);
}
}
player.chooseButton(['是否发动【设伏】?',[list1.concat(list2),'vcard']]).set('filterButton',function(button){
var player=_status.event.player;
if(player.storage.shefu2&&player.storage.shefu2.contains(button.link[2])) return false;
return true;
}).set('ai',function(button){
var rand=_status.event.rand;
switch(button.link[2]){
case 'sha':return 5+rand[1];
case 'tao':return 5+rand[2];
case 'lebu':return 3+rand[3];
case 'shan':return 4+rand[4];
case 'wuzhong':return 4+rand[5];
case 'shunshou':return 3+rand[6];
case 'nanman':return 2+rand[7];
case 'wanjian':return 2+rand[8];
default:return rand[9];
}
}).set('rand',[Math.random(),Math.random(),Math.random(),Math.random(),
Math.random(),Math.random(),Math.random(),Math.random()],Math.random());
'step 1'
if(result.bool){
player.storage.shefu2.push(result.links[0][2]);
player.logSkill('shefu');
player.chooseCard('h','选择一张手牌作为“伏兵”',true);
}
else{
event.finish();
}
'step 2'
if(result.bool){
var card=result.cards[0];
player.lose(card,ui.special);
player.storage.shefu.push(card);
player.syncStorage('shefu');
player.markSkill('shefu');
player.$give(card,player);
}
}
},
jili:{
trigger:{global:'useCard'},
forced:true,
@ -5712,6 +5791,10 @@ character.sp={
tadun:'蹋顿',
yanbaihu:'严白虎',
shefu:'设伏',
shefu_info:'结束阶段开始时,你可以将一张手牌移出游戏,称为"伏兵"。然后为"伏兵"记录一个基本牌或锦囊牌名称(须与其他"伏兵"记录的名称均不同)。你的回合外,当有其他角色使用与你记录的"伏兵"牌名相同的牌时,你可以令此牌无效,然后将该"伏兵"置入弃牌堆',
benyu:'贲育',
benyu_info:'每当你受到伤害后若你的手牌数不大于伤害来源手牌数你可以将手牌摸至与伤害来源手牌数相同最多摸至5张否则你可以弃置大于伤害来源手牌数的手牌然后对其造成1点伤害',
zhidao:'雉盗',
zhidao_info:'锁定技,当你于你的回合内第一次对区域里有牌的其他角色造成伤害后,你获得其手牌、装备区和判定区里的各一张牌,然后直到回合结束,其他角色不能被选择为你使用牌的目标',
jili:'寄篱',

View File

@ -15,7 +15,6 @@ window.noname_update={
'theme/woodden/style.css',
'game/game.js',
'character/yijiang.js',
'character/shenhua.js',
'character/sp.js',
],
'1.8.12.1':[],