Skip to content

Commit

Permalink
1.9.4
Browse files Browse the repository at this point in the history
  • Loading branch information
libccy authored and libccy committed Jan 16, 2017
1 parent 951723a commit f8d6b19
Show file tree
Hide file tree
Showing 17 changed files with 453 additions and 106 deletions.
4 changes: 2 additions & 2 deletions character/extra.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,14 @@ character.extra={
}
}
var prompt=get.prompt('qinyin')+'(剩余'+get.cnNumber(event.count)+'次)';
player.chooseControl('失去体力','回复体力','cancel',
player.chooseControl('失去体力','回复体力','cancel2',
ui.create.dialog(get.prompt('qinyin'),'hidden')).ai=function(){
if(lose>recover&&lose>0) return 0;
if(lose<recover&&recover>0) return 1;
return 2;
}
"step 1"
if(result.bool==false||result.control=='cancel'){
if(result.control=='cancel2'){
event.finish();
}
else{
Expand Down
10 changes: 5 additions & 5 deletions character/hearth.js
Original file line number Diff line number Diff line change
Expand Up @@ -1964,14 +1964,14 @@ character.hearth={
},
content:function(){
'step 0'
player.chooseControl('draw_card','出杀','cancel',function(){
player.chooseControl('draw_card','出杀','cancel2',function(){
if(ai.get.effect(trigger.target,{name:'sha'},player,player)>0){
return '出杀';
}
return 'draw_card';
}).prompt='是对'+get.translation(trigger.target)+'发动否发动【远征】?';
'step 1'
if(result.control!='cancel'){
if(result.control!='cancel2'){
if(result.control=='draw_card'){
player.draw();
player.logSkill('yuanzheng');
Expand Down Expand Up @@ -3829,10 +3829,10 @@ character.hearth={
var cards=[ui.cardPile.childNodes[0],ui.cardPile.childNodes[1]];
var att=ai.get.attitude(player,trigger.player);
var delta=trigger.judge(ui.cardPile.childNodes[1])-trigger.judge(ui.cardPile.childNodes[0]);
player.chooseControl('调换顺序','cancel',
player.chooseControl('调换顺序','cancel2',
ui.create.dialog('先知:'+get.translation(trigger.player)+'的'+str+'判定',cards,'hidden')).ai=function(){
if(att*delta>0) return '调换顺序';
else return 'cancel';
else return 'cancel2';
};
'step 1'
if(result.control=='调换顺序'){
Expand Down Expand Up @@ -5258,7 +5258,7 @@ character.hearth={
ayuling:'玉灵',
ayuling_info:'每当你受到一次伤害,你可以获得一张随机青玉牌;每当你使用一张青玉牌,你的手牌上限+1;当你累计使用两张青玉牌后,你可以于回合开始阶段摸一张牌;当你累计使用六张青玉牌后,你可以于回合结束阶段摸一张牌',
lianjin:'炼金',
lianjin_info:'出牌阶段限两次,将一张手牌永久转化为一张由三张随机牌组成的药水',
lianjin_info:'出牌阶段限两次,你可以将一张手牌永久转化为一张由三张随机牌组成的药水',
shouji:'收集',
shouji_info:'每回合限发动一次,每当你使用一张杀,你可以获得一张目标随机手牌的复制;每当你的杀被闪避,你可以获得一张目标随机装备牌的复制',
guimou:'鬼谋',
Expand Down
8 changes: 4 additions & 4 deletions character/ow.js
Original file line number Diff line number Diff line change
Expand Up @@ -2377,13 +2377,13 @@ character.ow={
if(player.hp<player.maxHp){
controls.push('recover_hp');
}
controls.push('cancel');
controls.push('cancel2');
player.chooseControl(controls).set('prompt',get.prompt('ziyu')).set('ai',function(event,player){
if(player.hp<player.maxHp) return 'recover_hp';
return 'draw_card';
});
"step 1"
if(result.control!='cancel'){
if(result.control!='cancel2'){
player.logSkill('ziyu');
if(result.control=='draw_card'){
player.draw();
Expand All @@ -2406,13 +2406,13 @@ character.ow={
if(player.hp<player.maxHp){
controls.push('recover_hp');
}
controls.push('cancel');
controls.push('cancel2');
player.chooseControl(controls).set('prompt',get.prompt('ziyu')).set('ai',function(event,player){
if(player.hp<player.maxHp) return 'recover_hp';
return 'draw_card';
});
"step 1"
if(result.control!='cancel'){
if(result.control!='cancel2'){
player.logSkill('ziyu');
if(result.control=='draw_card'){
player.draw();
Expand Down
2 changes: 1 addition & 1 deletion character/rank.js
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,7 @@ window.characterRank={
'hs_liadrin',
'hs_anomalus',
'mifuren',
'hanba',
],
b:[
'caochun',
Expand All @@ -366,7 +367,6 @@ window.characterRank={
'hs_nozdormu',
'yxs_lishimin',
'hs_ruanniguai',
'hanba',
'daxiaoqiao',
'pal_linyueru',
'zhuran',
Expand Down
10 changes: 5 additions & 5 deletions character/refresh.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ character.refresh={
list.push('jiu');
}
if(list.length){
list.push('cancel');
list.push('cancel2');
player.chooseControl(list,function(){
var controls=_status.event.controls;
var player=_status.event.player;
Expand All @@ -103,7 +103,7 @@ character.refresh={
}
}
}
return 'cancel';
return 'cancel2';
}).set('prompt','是否视为使用一张基本牌?');
}
else{
Expand All @@ -119,7 +119,7 @@ character.refresh={
event.finish();
}
'step 1'
if(result&&result.control&&result.control!='cancel'){
if(result&&result.control&&result.control!='cancel2'){
if(result.control=='sha'){
player.chooseTarget(function(card,player,target){
return player.canUse({name:'sha'},target,true,true);
Expand Down Expand Up @@ -834,14 +834,14 @@ character.refresh={
content:function(){
"step 0"
if(get.itemtype(trigger.cards)=='cards'&&get.position(trigger.cards[0])=='d'){
player.chooseControl('rejianxiong_mopai','rejianxiong_napai','cancel').ai=function(){
player.chooseControl('rejianxiong_mopai','rejianxiong_napai','cancel2').ai=function(){
var trigger=_status.event.getTrigger();
if(trigger.cards.length==1&&trigger.cards[0].name=='sha') return 0;
return 1;
};
}
else{
player.chooseControl('rejianxiong_mopai','cancel');
player.chooseControl('rejianxiong_mopai','cancel2');
}
"step 1"
if(result.control=='rejianxiong_napai'){
Expand Down
12 changes: 6 additions & 6 deletions character/shenhua.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ character.shenhua={
audio:'kuanggu',
content:function(){
'step 0'
var controls=['draw_card','cancel'];
var controls=['draw_card','cancel2'];
if(player.hp<player.maxHp) controls.unshift('recover_hp');
player.chooseControl(controls).set('prompt',get.prompt('xinkuanggu')).set('ai',function(event,player){
if(player.hp==player.maxHp) return 'draw_card';
Expand All @@ -160,7 +160,7 @@ character.shenhua={
return 'recover_hp';
});
'step 1'
if(result.control!='cancel'){
if(result.control!='cancel2'){
player.logSkill('xinkuanggu');
if(result.control=='draw_card'){
player.draw();
Expand Down Expand Up @@ -1263,10 +1263,10 @@ character.shenhua={
event.control=ui.create.control();
}
else{
event.control=ui.create.control(['cancel']);
event.control=ui.create.control(['cancel2']);
}
event.clickControl=function(link){
if(link!='cancel'){
if(link!='cancel2'){
var currentname=event.dialog.querySelector('.selected.button').link;
var mark=player.marks.huashen;
if(trigger.name=='game'){
Expand Down Expand Up @@ -1358,7 +1358,7 @@ character.shenhua={
event.control.style.opacity=0;
}
else{
event.control.replace(['cancel']);
event.control.replace(['cancel2']);
}
}
else{
Expand Down Expand Up @@ -1388,7 +1388,7 @@ character.shenhua={
event.control.style.opacity=0;
}
else{
event.control.replace(['cancel']);
event.control.replace(['cancel2']);
}
event.control.custom=event.clickControl;
return;
Expand Down
89 changes: 76 additions & 13 deletions character/sp.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ character.sp={
simalang:['male','wei',3,['junbing','quji']],
zhangxingcai:['female','shu',3,['shenxian','qiangwu']],
fuwan:['male','qun',4,['moukui']],
sp_sunshangxiang:['female','shu',3,['liangzhu','xiaoji']],
sp_sunshangxiang:['female','shu',3,['liangzhu','fanxiang']],
caoang:['male','wei',4,['kaikang']],
re_yuanshu:['male','qun',4,['wangzun','tongji']],
sp_caoren:['male','wei',4,['kuiwei','yanzheng']],
Expand Down Expand Up @@ -4012,9 +4012,9 @@ character.sp={
content:function(){
'step 0'
player.addTempSkill('fengpo3','phaseAfter');
player.chooseControl('draw_card','加伤害','cancel').set('prompt',get.prompt('fengpo'));
player.chooseControl('draw_card','加伤害','cancel2').set('prompt',get.prompt('fengpo'));
'step 1'
if(result.control&&result.control!='cancel'){
if(result.control&&result.control!='cancel2'){
player.logSkill('fengpo');
var nd=trigger.target.num('h',{suit:'diamond'});
if(result.control=='draw_card'){
Expand Down Expand Up @@ -4346,15 +4346,15 @@ character.sp={
},
content:function(){
'step 0'
player.chooseControl('basic','trick','equip','cancel',function(){
player.chooseControl('basic','trick','equip','cancel2',function(){
var source=_status.event.source;
if(ai.get.attitude(_status.event.player,source)>0) return 'cancel';
if(ai.get.attitude(_status.event.player,source)>0) return 'cancel2';
if(_status.currentPhase!=source) return 'trick';
if(lib.filter.cardUsable({name:'sha'},source)&&source.num('h')>=2) return 'basic';
return 'trick';
}).set('prompt',get.prompt('jilei',trigger.source)).set('source',trigger.source);
'step 1'
if(result.control!='cancel'){
if(result.control!='cancel2'){
player.logSkill('jilei',trigger.source);
player.popup(get.translation(result.control)+'牌');
trigger.source.storage.jilei2=result.control;
Expand Down Expand Up @@ -5009,19 +5009,79 @@ character.sp={
liangzhu:{
audio:2,
trigger:{global:'recoverAfter'},
check:function(event,player){
return ai.get.attitude(player,event.player)>=0;
},
direct:true,
filter:function(event,player){
return event.player!=player&&_status.currentPhase==event.player;
return _status.currentPhase==event.player;
},
content:function(){
game.asyncDraw([trigger.player,player]);
'step 0'
if(player==trigger.player){
player.chooseControl('摸一张','摸两张','cancel2',function(){
return '摸两张';
}).set('prompt',get.prompt('liangzhu'));
event.single=true;
}
else{
player.chooseTarget(get.prompt('liangzhu'),function(card,player,target){
return target==_status.event.player||target==_status.event.target;
}).set('target',trigger.player).set('ai',function(target){
var player=_status.event.player;
if(player==target) return 1;
return ai.get.attitude(player,target)-1.5;
});
}
'step 1'
if(event.single){
if(result.control!='cancel2'){
player.logSkill('liangzhu',player);
if(result.control=='摸一张'){
player.draw();
}
else{
player.draw(2);
player.storage.liangzhu=player;
}
}
}
else if(result.bool){
var target=result.targets[0];
player.logSkill('liangzhu',target);
if(target==player){
target.draw();
}
else{
target.draw(2);
target.storage.liangzhu=player;
}
}
},
ai:{
expose:0.2
expose:0.1
}
},
fanxiang:{
skillAnimation:true,
animationColor:'fire',
audio:2,
unique:true,
forceunique:true,
trigger:{player:'phaseBegin'},
filter:function(event,player){
for(var i=0;i<game.players.length;i++){
if(game.players[i].storage.liangzhu==player&&game.players[i].isDamaged()){
return true;
}
}
return false;
},
forced:true,
content:function(){
player.gainMaxHp();
player.recover();
player.removeSkill('liangzhu');
player.addSkill('xiaoji');
},
},
mingshi:{
audio:2,
trigger:{player:'damageBegin'},
Expand Down Expand Up @@ -6457,6 +6517,7 @@ character.sp={
player.storage.bifa[1].gain(result.cards,player);
player.$give(result.cards,player.storage.bifa[1]);
player.gain(player.storage.bifa[0],'draw2');
game.log(player,'获得了',player.storage.bifa[0]);
}
else{
ui.discardPile.appendChild(player.storage.bifa[0]);
Expand Down Expand Up @@ -7367,6 +7428,8 @@ character.sp={
yawang:'雅望',
xunzhi:'殉志',
yingjian:'影箭',
fanxiang:'返乡',
fanxiang_info:'觉醒技,准备阶段开始时,若全场有至少一名已受伤且你曾发动【良助】令其摸牌的角色,则你回复1点体力和体力上限,失去技能【良助】并获得技能【枭姬】',
yingjian_info:'回合开始阶段,你可以视为使用一张无视距离的杀',
xunzhi_info:'准备阶段开始时,若你的上家和下家与你的体力值均不相等,你可以失去1点体力。若如此做,你的手牌上限+2',
yawang_info:'锁定技,摸牌阶段开始时,你放弃摸牌,改为摸x张牌,然后你于出牌阶段内至多使用x张牌(x为与你体力值相等的角色数)',
Expand Down Expand Up @@ -7417,7 +7480,7 @@ character.sp={
tongji_info:'锁定技。若你的手牌数大于你的体力值,则只要你在任一其他角色的攻击范围内,该角色使用【杀】时便不能指定你以外的角色为目标',
wangzun_info:'其他角色的回合开始时,你可以摸一张牌,然后令该角色此回合的手牌上限-1;直到你的回合开始,你不能再次发动此技',
kaikang_info:'每当你距离1以内的角色成为杀的目标后,你可以摸一张牌。若如此做,你交给其一张牌并展示之,若该牌为装备牌,该角色可以使用此牌。',
liangzhu_info:'其他角色在其回合内回复体力时,你可以与其各摸一张牌 ',
liangzhu_info:'当一名角色于其出牌阶段内回复体力时,你可以选择一项:1、摸一张牌;2、令该角色摸两张牌 ',
mingshi_info:'当你即将受到伤害时,若伤害来源的体力值大于你,你可以弃置一张黑色手牌令伤害-1 ',
lirang_info:'你可以将你弃置的卡牌交给一名其他角色 ',
moukui_info:'当你使用【杀】指定一名角色为目标后,你可以选择一项:摸一张牌,或弃置其一张牌。若如此做,此【杀】被【闪】抵消时,该角色弃置你的一张牌。 ',
Expand Down
4 changes: 2 additions & 2 deletions character/swd.js
Original file line number Diff line number Diff line change
Expand Up @@ -6576,15 +6576,15 @@ character.swd={
if(todiscard.length){
choice.push('discard_card');
}
choice.push('cancel');
choice.push('cancel2');
if(choice.length>1){
if(event.isMine()){
event.dialog=ui.create.dialog(get.prompt('xielv'));
}
player.chooseControl(choice).ai=function(){
if(choice.contains('recover_hp')) return 'recover_hp';
else if(ainum>0) return 'discard_card';
else return 'cancel';
else return 'cancel2';
}
event.todiscard=todiscard;
event.filter=filter;
Expand Down
Loading

0 comments on commit f8d6b19

Please sign in to comment.