This commit is contained in:
parent
538d9b737d
commit
7a13c30823
|
@ -2303,9 +2303,7 @@ card.swd={
|
||||||
trigger:{source:'damageEnd'},
|
trigger:{source:'damageEnd'},
|
||||||
forced:true,
|
forced:true,
|
||||||
popup:false,
|
popup:false,
|
||||||
onremove:function(player){
|
onremove:true,
|
||||||
delete player.storage.shuchui2;
|
|
||||||
},
|
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
return event.card&&event.card.name=='sha'&&!player.storage.shuchui2;
|
return event.card&&event.card.name=='sha'&&!player.storage.shuchui2;
|
||||||
},
|
},
|
||||||
|
|
|
@ -957,9 +957,7 @@ card.yunchou={
|
||||||
forced:true,
|
forced:true,
|
||||||
popup:false,
|
popup:false,
|
||||||
silent:true,
|
silent:true,
|
||||||
onremove:function(player){
|
onremove:true,
|
||||||
delete player.storage.youdishenru;
|
|
||||||
},
|
|
||||||
filter:function(event,player){
|
filter:function(event,player){
|
||||||
return event.card&&event.card.name=='sha'&&event.player==player.storage.youdishenru;
|
return event.card&&event.card.name=='sha'&&event.player==player.storage.youdishenru;
|
||||||
},
|
},
|
||||||
|
|
|
@ -19,7 +19,7 @@ character.diy={
|
||||||
re_huangyueying:['female','shu',3,['rejizhi','qicai']],
|
re_huangyueying:['female','shu',3,['rejizhi','qicai']],
|
||||||
|
|
||||||
diy_liufu:['male','wei',3,['zhucheng','duoqi']],
|
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_liuzan:['male','wu',4,['kangyin']],
|
||||||
diy_zaozhirenjun:['male','shu',3,[]],
|
diy_zaozhirenjun:['male','shu',3,[]],
|
||||||
diy_yangyi:['male','shu',3,[]],
|
diy_yangyi:['male','shu',3,[]],
|
||||||
|
@ -29,6 +29,82 @@ character.diy={
|
||||||
yuji:['zuoci']
|
yuji:['zuoci']
|
||||||
},
|
},
|
||||||
skill:{
|
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:{
|
chezhen:{
|
||||||
mod:{
|
mod:{
|
||||||
globalFrom:function(from,to,distance){
|
globalFrom:function(from,to,distance){
|
||||||
|
@ -117,9 +193,7 @@ character.diy={
|
||||||
intro:{
|
intro:{
|
||||||
content:'到其他角色的距离-#;使用【杀】的额外目标数上限+#'
|
content:'到其他角色的距离-#;使用【杀】的额外目标数上限+#'
|
||||||
},
|
},
|
||||||
onremove:function(player){
|
onremove:true,
|
||||||
delete player.storage.kangyin2;
|
|
||||||
},
|
|
||||||
mod:{
|
mod:{
|
||||||
globalFrom:function(from,to,distance){
|
globalFrom:function(from,to,distance){
|
||||||
return distance-from.storage.kangyin2;
|
return distance-from.storage.kangyin2;
|
||||||
|
@ -921,6 +995,11 @@ character.diy={
|
||||||
diy_caiwenji:'蔡昭姬',
|
diy_caiwenji:'蔡昭姬',
|
||||||
diy_zhenji:'甄宓',
|
diy_zhenji:'甄宓',
|
||||||
|
|
||||||
|
fuchou:'负仇',
|
||||||
|
fuchou2:'负仇',
|
||||||
|
fuchou_info:'当你成为【杀】的目标时,你可以将一张牌交给此【杀】的使用者,令此【杀】对你无效且你到其的距离于当前回合内视为1,若如此做,此回合的结束阶段开始时,其令你摸一张牌,然后你需对其使用【杀】,否则失去1点体力',
|
||||||
|
jinyan:'噤言',
|
||||||
|
jinyan_info:'锁定技。若你的体力值不大于2,你的黑色锦囊牌视为【杀】',
|
||||||
chezhen:'车阵',
|
chezhen:'车阵',
|
||||||
chezhen_info:'锁定技。若你的装备区里:没有牌,其他角色到你的距离+1;有牌,你到其他角色的距离-1',
|
chezhen_info:'锁定技。若你的装备区里:没有牌,其他角色到你的距离+1;有牌,你到其他角色的距离-1',
|
||||||
youzhan:'诱战',
|
youzhan:'诱战',
|
||||||
|
|
|
@ -1708,7 +1708,7 @@ character.hearth={
|
||||||
return [list,map];
|
return [list,map];
|
||||||
},
|
},
|
||||||
onremove:function(player){
|
onremove:function(player){
|
||||||
delete player.additionalSkills.maoxian;
|
player.removeAdditionalSkill('maoxian');
|
||||||
},
|
},
|
||||||
content:function(){
|
content:function(){
|
||||||
'step 0'
|
'step 0'
|
||||||
|
|
|
@ -82,9 +82,7 @@ character.ow={
|
||||||
if(from==to.storage.liangou2) return -Infinity;
|
if(from==to.storage.liangou2) return -Infinity;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onremove:function(player){
|
onremove:true,
|
||||||
delete player.storage.liangou2;
|
|
||||||
},
|
|
||||||
trigger:{player:'damageBegin'},
|
trigger:{player:'damageBegin'},
|
||||||
usable:1,
|
usable:1,
|
||||||
forced:true,
|
forced:true,
|
||||||
|
|
|
@ -38,10 +38,7 @@ character.refresh={
|
||||||
if(player.storage.rerende2&&player.storage.rerende2.contains(target)) return false;
|
if(player.storage.rerende2&&player.storage.rerende2.contains(target)) return false;
|
||||||
return player!=target;
|
return player!=target;
|
||||||
},
|
},
|
||||||
onremove:function(player){
|
onremove:['rerende','rerende2'],
|
||||||
delete player.storage.rerende;
|
|
||||||
delete player.storage.rerende2;
|
|
||||||
},
|
|
||||||
check:function(card){
|
check:function(card){
|
||||||
if(ui.selected.cards.length&&ui.selected.cards[0].name=='du') return 0;
|
if(ui.selected.cards.length&&ui.selected.cards[0].name=='du') return 0;
|
||||||
if(!ui.selected.cards.length&&card.name=='du') return 20;
|
if(!ui.selected.cards.length&&card.name=='du') return 20;
|
||||||
|
|
|
@ -426,9 +426,7 @@ character.shenhua={
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
qimou2:{
|
qimou2:{
|
||||||
onremove:function(player){
|
onremove:true,
|
||||||
delete player.storage.qimou2;
|
|
||||||
},
|
|
||||||
mod:{
|
mod:{
|
||||||
cardUsable:function(card,player,num){
|
cardUsable:function(card,player,num){
|
||||||
if(typeof player.storage.qimou2=='number'&&card.name=='sha'){
|
if(typeof player.storage.qimou2=='number'&&card.name=='sha'){
|
||||||
|
|
|
@ -917,9 +917,7 @@ character.sp={
|
||||||
if(card.name=='sha'&&player.storage.tuifeng3) return num+player.storage.tuifeng3;
|
if(card.name=='sha'&&player.storage.tuifeng3) return num+player.storage.tuifeng3;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onremove:function(player){
|
onremove:true
|
||||||
delete player.storage.tuifeng3;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
weidi:{
|
weidi:{
|
||||||
trigger:{global:['gameStart','zhuUpdate']},
|
trigger:{global:['gameStart','zhuUpdate']},
|
||||||
|
@ -4381,9 +4379,7 @@ character.sp={
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mark:true,
|
mark:true,
|
||||||
onremove:function(player){
|
onremove:true,
|
||||||
delete player.storage.jilei2;
|
|
||||||
},
|
|
||||||
mod:{
|
mod:{
|
||||||
cardDiscardable:function(card,player){
|
cardDiscardable:function(card,player){
|
||||||
if(player.storage.jilei2==get.type(card,'trick')) return false;
|
if(player.storage.jilei2==get.type(card,'trick')) return false;
|
||||||
|
|
|
@ -4144,10 +4144,7 @@ character.swd={
|
||||||
if(!player.storage.kunlunjing) return false;
|
if(!player.storage.kunlunjing) return false;
|
||||||
return player.hp<player.storage.kunlunjing2;
|
return player.hp<player.storage.kunlunjing2;
|
||||||
},
|
},
|
||||||
onremove:function(player){
|
onremove:['kunlunjing','kunlunjing2'],
|
||||||
delete player.storage.kunlunjing;
|
|
||||||
delete player.storage.kunlunjing2;
|
|
||||||
},
|
|
||||||
check:function(event,player){
|
check:function(event,player){
|
||||||
var storage=player.storage.kunlunjing;
|
var storage=player.storage.kunlunjing;
|
||||||
var num=0;
|
var num=0;
|
||||||
|
|
32
game/game.js
32
game/game.js
|
@ -12409,8 +12409,40 @@
|
||||||
var info=lib.skill[skill];
|
var info=lib.skill[skill];
|
||||||
if(info){
|
if(info){
|
||||||
if(info.onremove){
|
if(info.onremove){
|
||||||
|
if(typeof info.onremove=='function'){
|
||||||
info.onremove(this,skill);
|
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);
|
this.removeSkillTrigger(skill);
|
||||||
if(!info.keepSkill){
|
if(!info.keepSkill){
|
||||||
this.removeAdditionalSkill(skill);
|
this.removeAdditionalSkill(skill);
|
||||||
|
|
|
@ -10,26 +10,28 @@ window.noname_update={
|
||||||
// 'game/package.js',
|
// 'game/package.js',
|
||||||
'game/asset.js',
|
'game/asset.js',
|
||||||
// 'game/source.js',
|
// 'game/source.js',
|
||||||
'card/hearth.js',
|
'card/*',
|
||||||
'card/swd.js',
|
'character/*',
|
||||||
'card/gujian.js',
|
// 'card/hearth.js',
|
||||||
'card/guozhan.js',
|
// 'card/swd.js',
|
||||||
'card/standard.js',
|
// 'card/gujian.js',
|
||||||
'card/yunchou.js',
|
// 'card/guozhan.js',
|
||||||
'character/rank.js',
|
// 'card/standard.js',
|
||||||
|
// 'card/yunchou.js',
|
||||||
|
// 'character/rank.js',
|
||||||
// 'character/extra.js',
|
// 'character/extra.js',
|
||||||
'character/ow.js',
|
// 'character/ow.js',
|
||||||
'character/hearth.js',
|
// 'character/hearth.js',
|
||||||
// 'character/refresh.js',
|
// 'character/refresh.js',
|
||||||
// 'character/shenhua.js',
|
// 'character/shenhua.js',
|
||||||
'character/standard.js',
|
// 'character/standard.js',
|
||||||
'character/sp.js',
|
// 'character/sp.js',
|
||||||
// 'character/xianjian.js',
|
// 'character/xianjian.js',
|
||||||
'character/swd.js',
|
// 'character/swd.js',
|
||||||
'character/diy.js',
|
// 'character/diy.js',
|
||||||
'character/gujian.js',
|
// 'character/gujian.js',
|
||||||
'character/yijiang.js',
|
// 'character/yijiang.js',
|
||||||
'mode/boss.js',
|
// 'mode/boss.js',
|
||||||
// 'mode/chess.js',
|
// 'mode/chess.js',
|
||||||
// 'mode/versus.js',
|
// 'mode/versus.js',
|
||||||
// 'mode/guozhan.js',
|
// 'mode/guozhan.js',
|
||||||
|
|
Loading…
Reference in New Issue