mirror of
https://github.com/Qsgs-Fans/FreeKill.git
synced 2024-11-16 11:42:45 +08:00
CardPrompt
This commit is contained in:
parent
766e93378e
commit
27bdfe9afc
|
@ -724,6 +724,10 @@ function updateSelectedTargets(playerid, selected) {
|
|||
}
|
||||
}
|
||||
}
|
||||
const prompt = lcall("CardPrompt", card, selected_targets);
|
||||
if (prompt !== "") {
|
||||
roomScene.setPrompt(Util.processPrompt(prompt));
|
||||
}
|
||||
} else {
|
||||
all_photos.forEach(photo => {
|
||||
photo.state = "normal";
|
||||
|
|
|
@ -382,6 +382,22 @@ function CardFeasible(card, selected_targets)
|
|||
return ret
|
||||
end
|
||||
|
||||
---@param card string | integer
|
||||
---@param selected_targets integer[] @ ids of selected players
|
||||
function CardPrompt(card, selected_targets)
|
||||
local c ---@type Card
|
||||
local selected_cards
|
||||
if type(card) == "number" then
|
||||
c = Fk:getCardById(card)
|
||||
selected_cards = {card}
|
||||
else
|
||||
local t = json.decode(card)
|
||||
return ActiveSkillPrompt(t.skill, t.subcards, selected_targets)
|
||||
end
|
||||
|
||||
return ActiveSkillPrompt(c.skill, selected_cards, selected_targets)
|
||||
end
|
||||
|
||||
-- Handle skills
|
||||
|
||||
function GetSkillData(skill_name)
|
||||
|
|
Loading…
Reference in New Issue
Block a user