FreeKill/test/lua/pattern.lua
notify c3fd8fc9a5
Bugfix (#206)
* 修cost_data
* 修cardMark,仍需自动清理措施
* 修锁视技( **重要!使用牌之前会根据锁视技重新决定使用的卡牌!!**)
2023-06-23 22:18:11 +08:00

23 lines
526 B
Lua

local exp1 = Exppattern:Parse("slash,jink")
local exp2 = Exppattern:Parse("peach,jink")
local exp3 = Exppattern:Parse(".|.|.|.|.|trick")
local exp4 = Exppattern:Parse("peach,ex_nihilo")
local slash = Fk:cloneCard("slash")
TestExppattern = {
testMatchExp = function()
assert(exp1:matchExp(exp2))
end,
testEasyMatchCard = function()
assert(exp1:match(slash))
assert(not exp2:match(slash))
end,
testMatchWithType = function()
assert(not exp3:matchExp(exp1))
assert(exp3:matchExp(exp4))
end,
}