游戏王残局简化版

Annotation For 残局文料/lua_lib/游戏王_则拟器_原版_残局_卡_全筛.lua
Login

Annotation For 残局文料/lua_lib/游戏王_则拟器_原版_残局_卡_全筛.lua

Origin for each line in 残局文料/lua_lib/游戏王_则拟器_原版_残局_卡_全筛.lua from check-in a4c0b3bd26:

8c1e3abceb 2024-02-12    1: local 字集库 = require("u8_to_a")
8c1e3abceb 2024-02-12    2: local 位算库 = require(字集库.u8_to_a("算机_程语_月_基类_数_位算"))
5b9fb5e09f 2024-02-13    3: local s = {}
8c1e3abceb 2024-02-12    4: local TYPE_MONSTER = 0x1
8c1e3abceb 2024-02-12    5: local TYPE_SPELL = 0x2
8c1e3abceb 2024-02-12    6: local TYPE_TRAP = 0x4
8c1e3abceb 2024-02-12    7: local TYPE_EFFECT = 0x20
8c1e3abceb 2024-02-12    8: local TYPE_PENDULUM = 0x1000000
8c1e3abceb 2024-02-12    9: local 有效果卡的类排 = {
8c1e3abceb 2024-02-12   10: TYPE_SPELL
8c1e3abceb 2024-02-12   11: , TYPE_TRAP
8c1e3abceb 2024-02-12   12: , TYPE_EFFECT
8c1e3abceb 2024-02-12   13: }
8c1e3abceb 2024-02-12   14: local 无效果灵摆怪兽排 = {
8c1e3abceb 2024-02-12   15:   28363749 --火蛋白石头龙头领
8c1e3abceb 2024-02-12   16:   , 19474136 --曼陀林草龙
8c1e3abceb 2024-02-12   17:   , 17390179 --闪光之骑士
8c1e3abceb 2024-02-12   18:   , 83980492 --铜锣龙
8c1e3abceb 2024-02-12   19:   }
8c1e3abceb 2024-02-12   20: --~ 卡对
5b69db85ea 2024-02-13   21: function s.筛有效果卡(u1_0)
a4c0b3bd26 2024-02-13   22:   for u1 = 1, #有效果卡的类排 do
a4c0b3bd26 2024-02-13   23:     if 位算库.位和(有效果卡的类排[u1], u1_0.type) == 0 then
8c1e3abceb 2024-02-12   24:     else
5b69db85ea 2024-02-13   25:       return u1_0
8c1e3abceb 2024-02-12   26:       end
8c1e3abceb 2024-02-12   27:     end
5b69db85ea 2024-02-13   28:   if 位算库.位和(TYPE_PENDULUM, u1_0.type) == 0 then
8c1e3abceb 2024-02-12   29:   else
5b69db85ea 2024-02-13   30:     if 无效果灵摆怪兽排[u1_0.id] then
8c1e3abceb 2024-02-12   31:     else
5b69db85ea 2024-02-13   32:       return u1_0
8c1e3abceb 2024-02-12   33:       end
8c1e3abceb 2024-02-12   34:     end
8c1e3abceb 2024-02-12   35:   end
8c1e3abceb 2024-02-12   36: --~ 卡对
5b69db85ea 2024-02-13   37: function s.筛怪兽卡(u1_0)
5b69db85ea 2024-02-13   38:   if 位算库.位和(TYPE_MONSTER, u1_0.type) == 0 then
8c1e3abceb 2024-02-12   39:   else
5b69db85ea 2024-02-13   40:     return u1_0
8c1e3abceb 2024-02-12   41:     end
8c1e3abceb 2024-02-12   42:   end
8c1e3abceb 2024-02-12   43: --~ 卡对
5b69db85ea 2024-02-13   44: function s.筛攻击力(u1_0)
5b69db85ea 2024-02-13   45:   return u1_0.atk
8c1e3abceb 2024-02-12   46:   end
5b9fb5e09f 2024-02-13   47: return s