Fixbug (#74)
- 修复ak和咆哮失效 - 修复服务端调viewAs的时候缺个Self - 修复不能显示数字型标记 - 新函数player:gainAnExtraTurn,可用来进行额外回合
This commit is contained in:
parent
63ae487230
commit
694deecdf1
|
@ -150,6 +150,7 @@ Fk:loadTranslationTable{
|
|||
|
||||
-- phase
|
||||
["#PhaseSkipped"] = "%from 跳过了 %arg",
|
||||
["#GainAnExtraTurn"] = "%from 开始进行一个额外的回合",
|
||||
|
||||
-- useCard
|
||||
["#UseCard"] = "%from 使用了牌 %card",
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
---@class Skill : Object
|
||||
---@field name string
|
||||
---@field trueName string
|
||||
---@field package Package
|
||||
---@field frequency Frequency
|
||||
---@field visible boolean
|
||||
|
@ -30,6 +31,9 @@ function Skill:initialize(name, frequency)
|
|||
self.anim_type = ""
|
||||
self.related_skills = {}
|
||||
|
||||
local name_splited = name:split("__")
|
||||
self.trueName = name_splited[#name_splited]
|
||||
|
||||
if string.sub(name, 1, 1) == "#" then
|
||||
self.visible = false
|
||||
end
|
||||
|
|
|
@ -994,6 +994,7 @@ function Room:handleUseCardReply(player, data)
|
|||
end)
|
||||
return nil
|
||||
elseif skill:isInstanceOf(ViewAsSkill) then
|
||||
Self = player
|
||||
local c = skill:viewAs(selected_cards)
|
||||
if c then
|
||||
self:useSkill(player, skill)
|
||||
|
|
|
@ -433,6 +433,19 @@ function ServerPlayer:skip(phase)
|
|||
end
|
||||
end
|
||||
|
||||
function ServerPlayer:gainAnExtraTurn()
|
||||
local room = self.room
|
||||
room:sendLog{
|
||||
type = "#GainAnExtraTurn",
|
||||
from = self.id
|
||||
}
|
||||
|
||||
local current = room.current
|
||||
room.current = self
|
||||
GameEvent(GameEvent.Turn):exec()
|
||||
room.current = current
|
||||
end
|
||||
|
||||
function ServerPlayer:drawCards(num, skillName, fromPlace)
|
||||
return self.room:drawCards(self, num, skillName, fromPlace)
|
||||
end
|
||||
|
|
|
@ -3,7 +3,7 @@ local extension = Package:new("maneuvering", Package.CardPack)
|
|||
local slash = Fk:cloneCard("slash")
|
||||
|
||||
local thunderSlashSkill = fk.CreateActiveSkill{
|
||||
name = "thunder_slash_skill",
|
||||
name = "thunder__slash_skill",
|
||||
max_phase_use_time = 1,
|
||||
target_num = 1,
|
||||
can_use = slash.skill.canUse,
|
||||
|
@ -40,7 +40,7 @@ extension:addCards{
|
|||
}
|
||||
|
||||
local fireSlashSkill = fk.CreateActiveSkill{
|
||||
name = "fire_slash_skill",
|
||||
name = "fire__slash_skill",
|
||||
max_phase_use_time = 1,
|
||||
target_num = 1,
|
||||
can_use = slash.skill.canUse,
|
||||
|
|
|
@ -843,7 +843,7 @@ callbacks["SetPlayerMark"] = function(jsonData) {
|
|||
let data = JSON.parse(jsonData);
|
||||
let player = getPhotoOrSelf(data[0]);
|
||||
let mark = data[1];
|
||||
let value = data[2];
|
||||
let value = data[2].toString();
|
||||
if (value == 0) {
|
||||
player.markArea.removeMark(mark);
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue