Skip to content

Commit

Permalink
fix: fix re_boss_xuzhang display
Browse files Browse the repository at this point in the history
  • Loading branch information
S-N-O-R-L-A-X committed Nov 23, 2024
1 parent fa777fd commit 909aa84
Showing 1 changed file with 22 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -567,12 +567,12 @@ export const skill = {
player.addTempSkill("re_boss_eyi_effect_used");
},
},
"effect_used":{
"effect_used": {

}
}
},


"re_boss_xuzhang": {
trigger: {
Expand All @@ -586,20 +586,35 @@ export const skill = {
content: () => {
const target = trigger.player;
player.line(target);
target.addMark('re_boss_xuzhang', trigger.num);
target.addMark('re_boss_xuzhang_effect', trigger.num);
target.markSkill('re_boss_xuzhang_effect');
}
},
"re_boss_xuzhang_effect": {
forced: true,
mark: true,
intro: { content: "mark" },
intro: {
name: '瘴',
content: '当前有#个标记',
},
trigger: { player: 'phaseZhunbeiBegin' },
filter: function (event, player) {
return player.storage.re_boss_xuzhang_effect && player.storage.re_boss_xuzhang_effect > 0;
},
content: () => {
player.loseHp(player.storage.re_boss_xuzhang_effect);
content: async () => {
const choices = ["失去" + player.storage.re_boss_xuzhang_effect + "点体力", "失去" + player.storage.re_boss_xuzhang_effect + "点体力上限"];
const result = await player.chooseControl(choices).set("ai", () => {
if(player.hp<re_boss_xuzhang_effect && player.maxHp>re_boss_xuzhang_effect) {
return 1;
}
return 0;
})
if(result.index===0) {
player.loseHp(player.storage.re_boss_xuzhang_effect);
}
else {
player.loseMaxHp(player.storage.re_boss_xuzhang_effect);
}
player.storage.re_boss_xuzhang_effect = 0;
}
},
Expand Down

0 comments on commit 909aa84

Please sign in to comment.