diff --git a/rules.lua b/rules.lua index a4d267e..8f91ffd 100644 --- a/rules.lua +++ b/rules.lua @@ -33,6 +33,7 @@ Stype: a go stone of some type W: full block wall WE0-WE3: edge concrete WC0-WC3: corner concrete +WB: other goban concrete --]] local function _check_position_uncached(pos) local node = minetest.get_node(pos) @@ -60,6 +61,10 @@ local function _check_position_uncached(pos) return "WE" .. node.param2 elseif reg_item.pattern_def.name == "corny" then return "WC" .. node.param2 + elseif reg_item.pattern_def.name == "crossy" then + return "WB" + elseif reg_item.pattern_def.name == "starcrossy" then + return "WB" end end @@ -257,7 +262,13 @@ function lc_liberties.handle_placement(pos) local proximal_c = 0 for i2, v2 in pairs(v.stones) do - nodecore.set_loud(v2, {name = "nc_fire:fire"}) + local under = check_position(v2 + down) + print(under) + if (under:sub(1, 1) == "W") and (under:len() > 1) then + nodecore.set_loud(v2, {name = "nc_fire:fire"}) + else + nodecore.set_loud(v2, {name = "air"}) + end count = count + 1 if (v2:distance(pos) < 2.3) then proximal_c = proximal_c + 1