Merge pull request #1048 from PZ157/PR-Branch

bugfix
This commit is contained in:
Spmario233 2024-03-09 16:08:02 +08:00 committed by GitHub
commit b63efb8fe5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 13 additions and 9 deletions

View File

@ -665,7 +665,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
mtg_feixu_skill_info:'准备阶段,随机将弃牌堆的一张牌置于牌堆顶。',
mtg_haidao:'海岛',
mtg_haidao_skill:'海岛',
mtg_haidao_info:'选项一获得1点护甲无视地图效果选项二弃置一张牌并回复1点体力。地图效果锁定技,当你获得护甲时,若你已受伤,改为回复等量体力。',
mtg_haidao_info:'选项一获得1点护甲无视地图效果选项二弃置一张牌并回复1点体力。地图效果锁定技,当你获得护甲时,若你已受伤,改为回复等量体力。',
mtg_haidao_skill_info:'锁定技,当你获得护甲时,若你已受伤,改为回复等量体力。',
mtg_youlin:'幽林',
mtg_youlin_skill:'幽林',
@ -686,7 +686,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
mtg_linzhongjianta_skill_info:'若你装备区内有武器牌,你可以将一张基本牌当作杀使用。',
mtg_cangbaohaiwan:'藏宝海湾',
mtg_cangbaohaiwan_skill:'藏宝海湾',
mtg_cangbaohaiwan_info:'选择一个展包,随机获得来自该扩展包的一张衍生牌。地图效果:你在摸牌时有可能摸到衍生牌。',
mtg_cangbaohaiwan_info:'选择一个展包,随机获得来自该扩展包的一张衍生牌。地图效果:你在摸牌时有可能摸到衍生牌。',
mtg_cangbaohaiwan_skill_info:'你在摸牌时有可能摸到衍生牌。',
mtg_longlushanfeng:'龙颅山峰',
mtg_longlushanfeng_skill:'龙颅山峰',

View File

@ -6086,8 +6086,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){
trigger.baseDamage++;
player.addSkill('dccuijin_damage');
player.markAuto('dccuijin_damage',[trigger.card]);
if(!player.storage.dccuijin_map) player.storage.dccuijin_map={};
player.storage.dccuijin_map[trigger.card.cardid]=trigger.targets.slice();
if(!player.storage.dccuijin_map) player.storage.dccuijin_map={cards:[],targets:[]};
player.storage.dccuijin_map.cards.push(trigger.card);
player.storage.dccuijin_map.targets.push(trigger.targets.slice());
}
},
subSkill:{
@ -6108,7 +6109,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
},
content:function(){
'step 0'
var card=trigger.card;
var card=trigger.card,idx=player.storage.dccuijin_map.cards.indexOf(card);
if(event.triggername=='useCardAfter'){
var cards=player.getStorage('dccuijin_damage');
cards=cards.remove(card);
@ -6116,10 +6117,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.removeSkill('dccuijin_damage');
delete player.storage.dccuijin_map;
}
else delete player.storage.dccuijin_map[card.cardid];
else if(idx!==-1){
player.storage.dccuijin_map.cards.splice(idx,1);
player.storage.dccuijin_map.targets.splice(idx,1);
}
event.finish();
}
else{
else if(idx!==-1){
var target,source;
if(trigger.name.indexOf('damage')==0){
target=trigger.player;
@ -6129,11 +6133,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
target=trigger.target;
source=trigger.player;
}
if(player.storage.dccuijin_map[card.cardid].includes(target)&&!target.hasHistory('damage',evt=>{
if(player.storage.dccuijin_map.targets[idx].includes(target)&&!target.hasHistory('damage',evt=>{
return evt.card==card;
})){
player.logSkill('dccuijin_damage',source);
player.storage.dccuijin_map[card.cardid].remove(target);
player.storage.dccuijin_map.targets[idx].remove(target);
player.draw(2);
if(source&&source.isIn()){
player.line(trigger.player,'green');