This commit is contained in:
libccy 2017-02-05 11:56:18 +08:00
parent 538d9b737d
commit 7a13c30823
11 changed files with 143 additions and 48 deletions

View File

@ -2303,9 +2303,7 @@ card.swd={
trigger:{source:'damageEnd'},
forced:true,
popup:false,
onremove:function(player){
delete player.storage.shuchui2;
},
onremove:true,
filter:function(event,player){
return event.card&&event.card.name=='sha'&&!player.storage.shuchui2;
},

View File

@ -957,9 +957,7 @@ card.yunchou={
forced:true,
popup:false,
silent:true,
onremove:function(player){
delete player.storage.youdishenru;
},
onremove:true,
filter:function(event,player){
return event.card&&event.card.name=='sha'&&event.player==player.storage.youdishenru;
},

View File

@ -19,7 +19,7 @@ character.diy={
re_huangyueying:['female','shu',3,['rejizhi','qicai']],
diy_liufu:['male','wei',3,['zhucheng','duoqi']],
diy_xizhenxihong:['male','shu',3,[]],
diy_xizhenxihong:['male','shu',3,['fuchou','jinyan']],
diy_liuzan:['male','wu',4,['kangyin']],
diy_zaozhirenjun:['male','shu',3,[]],
diy_yangyi:['male','shu',3,[]],
@ -29,6 +29,82 @@ character.diy={
yuji:['zuoci']
},
skill:{
fuchou:{
trigger:{target:'shaBefore'},
filter:function(event,player){
return player.num('he')>0;
},
direct:true,
content:function(){
'step 0'
var bool=false;
if(!player.hasShan()&&ai.get.effect(player,trigger.card,trigger.player,player)<0){
bool=true;
}
player.chooseCard('he',get.prompt('fuchou',trigger.player)).ai=function(card){
if(bool){
if(player.hp<=1){
if(get.tag(card,'save')) return 0;
return 8-ai.get.value(card);
}
return 6-ai.get.value(card);
}
return -ai.get.value(card);
}
'step 1'
if(result.bool){
trigger.untrigger();
trigger.finish();
player.logSkill('fuchou',trigger.player);
trigger.player.gain(result.cards,player);
if(get.position(result.cards[0])=='h'){
player.$give(1,trigger.player);
}
else{
player.$give(result.cards,trigger.player);
}
player.storage.fuchou2.add(trigger.player);
}
},
group:'fuchou2'
},
fuchou2:{
init:function(player){
player.storage.fuchou2=[];
},
forced:true,
trigger:{global:'phaseAfter'},
filter:function(event,player){
for(var i=0;i<player.storage.fuchou2.length;i++){
if(player.storage.fuchou2[i].isAlive()) return true;
}
return false;
},
content:function(){
'step 0'
if(player.storage.fuchou2.length){
var target=player.storage.fuchou2.shift();
if(target.isAlive()){
player.draw();
if(player.canUse('sha',target,false)&&player.hasSha()){
player.chooseToUse({name:'sha'},target,-1,'对'+get.translation(target)+'使用一张杀,或失去一点体力');
}
else{
player.loseHp();
event.redo();
}
}
}
else{
event.finish();
}
'step 1'
if(!result.bool){
player.loseHp();
}
event.goto(0);
}
},
chezhen:{
mod:{
globalFrom:function(from,to,distance){
@ -117,9 +193,7 @@ character.diy={
intro:{
content:'到其他角色的距离-#;使用【杀】的额外目标数上限+#'
},
onremove:function(player){
delete player.storage.kangyin2;
},
onremove:true,
mod:{
globalFrom:function(from,to,distance){
return distance-from.storage.kangyin2;
@ -921,6 +995,11 @@ character.diy={
diy_caiwenji:'蔡昭姬',
diy_zhenji:'甄宓',
fuchou:'负仇',
fuchou2:'负仇',
fuchou_info:'当你成为【杀】的目标时你可以将一张牌交给此【杀】的使用者令此【杀】对你无效且你到其的距离于当前回合内视为1若如此做此回合的结束阶段开始时其令你摸一张牌然后你需对其使用【杀】否则失去1点体力',
jinyan:'噤言',
jinyan_info:'锁定技。若你的体力值不大于2你的黑色锦囊牌视为【杀】',
chezhen:'车阵',
chezhen_info:'锁定技。若你的装备区里:没有牌,其他角色到你的距离+1有牌你到其他角色的距离-1',
youzhan:'诱战',

View File

@ -1708,7 +1708,7 @@ character.hearth={
return [list,map];
},
onremove:function(player){
delete player.additionalSkills.maoxian;
player.removeAdditionalSkill('maoxian');
},
content:function(){
'step 0'

View File

@ -82,9 +82,7 @@ character.ow={
if(from==to.storage.liangou2) return -Infinity;
}
},
onremove:function(player){
delete player.storage.liangou2;
},
onremove:true,
trigger:{player:'damageBegin'},
usable:1,
forced:true,

View File

@ -38,10 +38,7 @@ character.refresh={
if(player.storage.rerende2&&player.storage.rerende2.contains(target)) return false;
return player!=target;
},
onremove:function(player){
delete player.storage.rerende;
delete player.storage.rerende2;
},
onremove:['rerende','rerende2'],
check:function(card){
if(ui.selected.cards.length&&ui.selected.cards[0].name=='du') return 0;
if(!ui.selected.cards.length&&card.name=='du') return 20;

View File

@ -426,9 +426,7 @@ character.shenhua={
}
},
qimou2:{
onremove:function(player){
delete player.storage.qimou2;
},
onremove:true,
mod:{
cardUsable:function(card,player,num){
if(typeof player.storage.qimou2=='number'&&card.name=='sha'){

View File

@ -917,9 +917,7 @@ character.sp={
if(card.name=='sha'&&player.storage.tuifeng3) return num+player.storage.tuifeng3;
}
},
onremove:function(player){
delete player.storage.tuifeng3;
}
onremove:true
},
weidi:{
trigger:{global:['gameStart','zhuUpdate']},
@ -4381,9 +4379,7 @@ character.sp={
}
},
mark:true,
onremove:function(player){
delete player.storage.jilei2;
},
onremove:true,
mod:{
cardDiscardable:function(card,player){
if(player.storage.jilei2==get.type(card,'trick')) return false;

View File

@ -4144,10 +4144,7 @@ character.swd={
if(!player.storage.kunlunjing) return false;
return player.hp<player.storage.kunlunjing2;
},
onremove:function(player){
delete player.storage.kunlunjing;
delete player.storage.kunlunjing2;
},
onremove:['kunlunjing','kunlunjing2'],
check:function(event,player){
var storage=player.storage.kunlunjing;
var num=0;

View File

@ -12409,8 +12409,40 @@
var info=lib.skill[skill];
if(info){
if(info.onremove){
if(typeof info.onremove=='function'){
info.onremove(this,skill);
}
else if(typeof info.onremove=='string'){
if(info.onremove=='storage'){
delete this.storage[skill];
}
else{
var cards=this.storage[skill];
if(get.itemtype(cards)=='card'){
cards=[cards];
}
if(get.itemtype(cards)=='cards'){
if(this.onremove=='discard'){
this.$throw(cards);
}
if(this.onremove=='discard'||this.onremove=='lose'){
for(var i=0;i<cards.length;i++){
ui.discardPile.appendChild(cards[i]);
}
delete this.storage[skill];
}
}
}
}
else if(Array.isArray(info.onremove)){
for(var i=0;i<info.onremove.length;i++){
delete this.storage[info.onremove[i]];
}
}
else if(info.onremove===true){
delete this.storage[skill];
}
}
this.removeSkillTrigger(skill);
if(!info.keepSkill){
this.removeAdditionalSkill(skill);

View File

@ -10,26 +10,28 @@ window.noname_update={
// 'game/package.js',
'game/asset.js',
// 'game/source.js',
'card/hearth.js',
'card/swd.js',
'card/gujian.js',
'card/guozhan.js',
'card/standard.js',
'card/yunchou.js',
'character/rank.js',
'card/*',
'character/*',
// 'card/hearth.js',
// 'card/swd.js',
// 'card/gujian.js',
// 'card/guozhan.js',
// 'card/standard.js',
// 'card/yunchou.js',
// 'character/rank.js',
// 'character/extra.js',
'character/ow.js',
'character/hearth.js',
// 'character/ow.js',
// 'character/hearth.js',
// 'character/refresh.js',
// 'character/shenhua.js',
'character/standard.js',
'character/sp.js',
// 'character/standard.js',
// 'character/sp.js',
// 'character/xianjian.js',
'character/swd.js',
'character/diy.js',
'character/gujian.js',
'character/yijiang.js',
'mode/boss.js',
// 'character/swd.js',
// 'character/diy.js',
// 'character/gujian.js',
// 'character/yijiang.js',
// 'mode/boss.js',
// 'mode/chess.js',
// 'mode/versus.js',
// 'mode/guozhan.js',